﻿:root {
  --bg: #f2eef6;
  --panel: rgba(255, 255, 255, 0.9);
  --text: #241f2e;
  --muted: #6f637c;
  --line: #ded2e9;
  --head: #f2edf7;
  --green: #8d45c7;
  --teal: #8e57cb;
  --teal-dark: #6d36a5;
  --gold: #d48b45;
  --danger: #bd3333;
  --rose: #e89ab9;
  --violet-soft: #f5effb;
  --shadow: 0 24px 60px rgba(67, 48, 91, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% -12%, rgba(185, 155, 231, 0.28), transparent 34%),
    radial-gradient(circle at 86% 0%, rgba(232, 154, 185, 0.22), transparent 30%),
    repeating-linear-gradient(135deg, rgba(142, 92, 180, 0.035) 0 44px, transparent 44px 88px),
    linear-gradient(180deg, #fbf8ff 0, #f7f2fa 360px, var(--bg) 100%);
  color: var(--text);
  font-family: "Microsoft YaHei", "Segoe UI", sans-serif;
}

header {
  position: sticky;
  top: 0;
  z-index: 5;
  border-bottom: 1px solid rgba(142, 87, 203, 0.2);
  background: rgba(250, 247, 253, 0.78);
  backdrop-filter: blur(18px);
  box-shadow: 0 14px 36px rgba(79, 54, 103, 0.08);
}

.wrap {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 62px;
  gap: 14px;
}

.brand h1 {
  margin: 0;
  font-size: 21px;
  color: #2d2536;
  letter-spacing: 0.5px;
}

.brand p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

nav {
  display: flex;
  gap: 6px;
  border: 1px solid rgba(142, 87, 203, 0.22);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.68);
  padding: 3px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

button,
.nav-btn {
  border: 0;
  border-radius: 10px;
  background: linear-gradient(90deg, #9b6eda 0%, #df93b5 100%);
  color: white;
  cursor: pointer;
  font-weight: 700;
  padding: 9px 14px;
  box-shadow: 0 12px 24px rgba(142, 87, 203, 0.18);
  transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.nav-btn {
  background: transparent;
  color: #4a3a5e;
  box-shadow: none;
}

.nav-btn.active,
button:hover {
  background: linear-gradient(90deg, #8e57cb 0%, #e89ab9 100%);
  color: white;
}

button:hover,
.link-action:hover {
  transform: translateY(-1px);
}

button.secondary {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
  box-shadow: 0 10px 22px rgba(67, 48, 91, 0.06);
}

button.secondary:hover {
  background: #fbf7ff;
  color: var(--text);
}

button:disabled,
.link-action.disabled {
  opacity: 0.48;
  cursor: not-allowed;
  pointer-events: none;
}

main {
  padding: 20px 0 36px;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.summary {
  display: grid;
  grid-template-columns: 176px 1fr 144px;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    radial-gradient(circle at 8% 0%, rgba(185, 155, 231, 0.22), transparent 34%),
    radial-gradient(circle at 100% 0%, rgba(232, 154, 185, 0.18), transparent 30%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(249, 243, 253, 0.9));
  box-shadow: var(--shadow);
  padding: 20px;
  backdrop-filter: blur(12px);
}

.stars-box {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 54px;
  border: 1px solid rgba(142, 87, 203, 0.2);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(246, 238, 253, 0.92));
  padding: 8px 14px;
  color: var(--muted);
  font-size: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.stars-box strong {
  margin: 4px 0 0;
  color: #7f43b8;
  font-size: 21px;
}

.exchange-summary {
  grid-template-columns: 176px minmax(260px, 1fr) minmax(240px, 300px) 144px;
}

.draw-result {
  display: none;
}

.draw-result img {
  max-width: 112px;
  max-height: 72px;
  justify-self: center;
}

.draw-result h3 {
  margin: 0 0 4px;
  font-size: 17px;
}

.draw-meta {
  display: grid;
  gap: 2px;
  color: var(--muted);
  font-size: 13px;
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  place-items: center;
  background: rgba(35, 28, 46, 0.52);
  padding: 24px;
}

.overlay.active {
  display: grid;
}

.draw-page {
  width: min(680px, 100%);
  max-height: min(620px, calc(100vh - 48px));
  overflow: auto;
  border: 1px solid rgba(142, 87, 203, 0.22);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(249, 242, 253, 0.96));
  box-shadow: 0 30px 90px rgba(44, 30, 60, 0.35);
  padding: 20px;
}

.overlay.single-draw .draw-page {
  width: min(520px, 100%);
}

.draw-page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.draw-page-head h2 {
  margin: 0;
  font-size: 22px;
}

.draw-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}

.overlay.single-draw .draw-list {
  grid-template-columns: 1fr;
}

.timing-detail {
  display: none;
  margin-top: 14px;
  border: 1px solid rgba(142, 87, 203, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  padding: 12px 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}

.timing-detail.active {
  display: block;
}

.timing-detail strong {
  color: #3b2c49;
}

.draw-card {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto 1fr;
  gap: 0;
  border: 1px solid rgba(142, 87, 203, 0.18);
  border-radius: 12px;
  padding: 0;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 12px 28px rgba(67, 48, 91, 0.08);
  overflow: hidden;
}

.draw-card-image-wrap {
  position: relative;
  background: #f0eef5;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 110px;
  overflow: hidden;
}

.draw-card-image-wrap img {
  max-width: 100%;
  max-height: 130px;
  object-fit: contain;
}

.draw-card-badge {
  position: absolute;
  top: 0;
  left: 0;
  text-align: center;
  color: #fff;
  font-size: 11px;
  padding: 2px 8px;
  font-weight: 700;
  z-index: 2;
  border-radius: 0 0 6px 0;
}

.draw-card-wear {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: transparent;
  color: #222;
  font-size: 14px;
  font-weight: 700;
  padding: 2px 6px;
  text-align: center;
  font-family: monospace;
  z-index: 2;
}

.draw-card-info {
  padding: 8px 10px 10px;
}

.draw-card-info h3 {
  margin: 0 0 6px;
  font-size: 13px;
  line-height: 1.35;
}

.draw-card-meta {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.draw-card-meta > div {
  margin-bottom: 2px;
}

.draw-card-price {
  display: flex;
  align-items: center;
  margin: 2px 0 0;
  border: 1px solid #888;
  border-radius: 4px;
  overflow: hidden;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
}

.draw-card-price:first-of-type {
  margin-top: 8px;
}

.draw-card-price.steam-row {
  border-color: #0e4375;
  color: #0e4375;
}

.draw-card-price.steam-row .price-label {
  border-right: 1px solid #0e4375;
}

.draw-card-price.buff-row {
  border-color: #37a305;
  color: #37a305;
}

.draw-card-price.buff-row .price-label {
  border-right: 1px solid #37a305;
}

.draw-card-price.uu-row {
  border-color: #1379cd;
  color: #1379cd;
}

.draw-card-price.uu-row .price-label {
  border-right: 1px solid #1379cd;
}

.draw-card-price.c5-row {
  border-color: #971edf;
  color: #971edf;
}

.draw-card-price.c5-row .price-label {
  border-right: 1px solid #971edf;
}

.draw-card-price .price-label {
  padding: 2px 6px;
  font-size: 10px;
  white-space: nowrap;
}

.draw-card-price .price-value {
  padding: 2px 6px;
  width: 100%;
  text-align: center;
}

.price-panel {
  padding: 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(226, 214, 255, 0.9);
  box-shadow: 0 10px 28px rgba(30, 41, 59, 0.05);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-content: start;
}

#myItemsTotal {
  display: contents;
}

.price-card {
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid #edf0f7;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.04);
}

.price-card .platform-icon {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 16px;
  font-weight: 900;
  background: #f8fafc;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06);
}

.price-card .platform-name {
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 2px;
}

.price-card .platform-price {
  font-size: 16px;
  line-height: 1;
  font-weight: 900;
}

.price-card.steam { border-color: rgba(37, 99, 235, 0.18); }
.price-card.steam .platform-icon,
.price-card.steam .platform-name,
.price-card.steam .platform-price { color: #174a86; }

.price-card.buff { border-color: rgba(34, 197, 94, 0.2); }
.price-card.buff .platform-icon,
.price-card.buff .platform-name,
.price-card.buff .platform-price { color: #2ca314; }

.price-card.uu { border-color: rgba(14, 165, 233, 0.2); }
.price-card.uu .platform-icon,
.price-card.uu .platform-name,
.price-card.uu .platform-price { color: #1687d9; }

.price-card.c5 { border-color: rgba(147, 51, 234, 0.2); }
.price-card.c5 .platform-icon,
.price-card.c5 .platform-name,
.price-card.c5 .platform-price { color: #8a22e6; }

.link-panel {
  padding: 16px 20px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(226, 214, 255, 0.95);
  box-shadow: 0 10px 28px rgba(30, 41, 59, 0.05);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.link-label {
  font-size: 16px;
  font-weight: 800;
  color: #3f3a4f;
  margin-bottom: 10px;
}

.link-input {
  width: 100%;
  height: 42px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid rgba(167, 139, 250, 0.45);
  outline: none;
  background: rgba(255, 255, 255, 0.9);
  font-size: 15px;
  font-weight: 500;
  color: #262334;
  transition: 0.2s ease;
}

.link-input:focus {
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.action-row {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.save-btn,
.clear-btn {
  height: 40px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s ease;
}

.save-btn {
  border: none;
  color: #fff;
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  box-shadow: 0 6px 18px rgba(124, 58, 237, 0.2);
}

.save-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(124, 58, 237, 0.26);
}

.clear-btn {
  border: 1px solid rgba(226, 214, 255, 0.95);
  background: rgba(255, 255, 255, 0.82);
  color: #252130;
}

.clear-btn:hover {
  background: #f7f2ff;
}

.link-status {
  font-size: 11px;
  color: var(--muted);
  margin-top: 6px;
  min-height: 16px;
}

.link-status.error {
  color: var(--danger);
}

.my-items-dashboard {
  margin-bottom: 20px;
  display: grid;
  grid-template-columns: 150px 1fr 1.4fr;
  gap: 16px;
  align-items: stretch;
}

.gain-card {
  position: relative;
  min-height: 160px;
  padding: 18px 20px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(167, 139, 250, 0.35);
  box-shadow: 0 10px 28px rgba(124, 58, 237, 0.1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.gain-title {
  font-size: 14px;
  font-weight: 700;
  color: #625773;
  margin-bottom: 10px;
}

.gain-number {
  font-size: 52px;
  line-height: 1;
  font-weight: 900;
  color: #7c3aed;
  letter-spacing: -1px;
}

@media (max-width: 980px) {
  .my-items-dashboard {
    grid-template-columns: 1fr 1fr;
  }
  .link-panel {
    grid-column: 1 / -1;
  }
}

@media (max-width: 520px) {
  .my-items-dashboard {
    grid-template-columns: 1fr;
  }
  .price-panel {
    grid-template-columns: 1fr;
  }
}

.summary h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: 0.5px;
}

.summary p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

th {
  height: 62px;
  background: linear-gradient(90deg, #f3edf8, #f8f0f6);
  color: #31273d;
  font-size: 16px;
  font-weight: 700;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 20px 18px;
  text-align: center;
  vertical-align: middle;
}

tbody tr {
  transition: background 0.16s ease;
}

tbody tr:hover {
  background: #fbfdfe;
}

tr:last-child td {
  border-bottom: 0;
}

.thumb-cell {
  width: 33%;
}

.armory-card {
  width: 196px;
  height: 112px;
  margin: 0 auto;
  border-radius: 4px;
  object-fit: cover;
  display: block;
  box-shadow: 0 8px 24px rgba(30, 48, 60, 0.13);
}

.name-cell {
  font-size: 20px;
}

.price-cell {
  font-size: 20px;
}

.actions-cell {
  width: 210px;
}

.armory-grid {
  display: grid;
  grid-template-columns: repeat(60, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.armory-tile {
  grid-column: span 12;
  overflow: hidden;
  border: 1px solid rgba(142, 87, 203, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(250, 246, 253, 0.92));
  box-shadow: 0 14px 32px rgba(59, 43, 77, 0.14);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.armory-tile:hover {
  transform: translateY(-3px);
  border-color: rgba(142, 87, 203, 0.42);
  box-shadow: 0 24px 58px rgba(59, 43, 77, 0.2);
}

.armory-tile.wide {
  grid-column: span 20;
}

.armory-tile.fill-4 {
  grid-column: span 15;
}

.armory-tile.fill-3 {
  grid-column: span 15;
}

.armory-cover {
  position: relative;
  aspect-ratio: 425 / 276;
  background: #211b2c;
  overflow: hidden;
}

.armory-tile.wide .armory-cover {
  aspect-ratio: 425 / 276;
}

.armory-cover img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  transition: transform 0.18s ease, filter 0.18s ease;
}

.armory-tile:hover .armory-cover img {
  transform: scale(1.025);
  filter: saturate(1.04);
}

.armory-tile-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 9px 8px 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 240, 252, 0.98));
}

.link-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 76px;
  min-height: 28px;
  margin: 3px 0;
  border-radius: 999px;
  color: #7d39b8;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.link-action:hover {
  background: linear-gradient(90deg, rgba(185, 155, 231, 0.22), rgba(232, 154, 185, 0.2));
  box-shadow: inset 0 0 0 1px rgba(142, 87, 203, 0.16);
}

.panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(248, 242, 252, 0.9));
  padding: 20px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.login-panel {
  width: min(1120px, calc(100vw - 36px));
  margin: 24px auto 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.login-panel h2 {
  margin: 0;
  font-size: 24px;
}

.login-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}

body.login-mode {
  background:
    repeating-linear-gradient(135deg, rgba(142, 92, 180, 0.035) 0 46px, transparent 46px 92px),
    linear-gradient(135deg, #f4f4f6 0%, #ffffff 52%, #f1f1f4 100%);
}

body.login-mode header {
  display: none;
}

body.login-mode main {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 36px 0;
}

body.login-mode .wrap {
  width: min(1280px, calc(100% - 42px));
}

.pickup-shell {
  display: grid;
  gap: 46px;
}

.pickup-card {
  position: relative;
  border: 1px solid #8e57cb;
  border-radius: 4px;
  background:
    linear-gradient(90deg, rgba(123, 72, 180, 0.05), transparent 18%, transparent 82%, rgba(123, 72, 180, 0.05)),
    rgba(255, 255, 255, 0.64);
  padding: 58px 56px 46px;
  color: #44404a;
  box-shadow: 0 22px 55px rgba(82, 61, 106, 0.08);
}

.pickup-card::before,
.pickup-card::after {
  content: "CSBIGAME";
  position: absolute;
  top: 18px;
  color: rgba(143, 101, 175, 0.055);
  font-size: 42px;
  font-weight: 900;
  letter-spacing: 6px;
  pointer-events: none;
}

.pickup-card::before {
  left: 22px;
}

.pickup-card::after {
  right: 22px;
}

.pickup-title {
  position: absolute;
  left: 50%;
  top: -30px;
  width: min(500px, calc(100% - 120px));
  transform: translateX(-50%);
  border: 1px solid #8e57cb;
  border-radius: 4px;
  background: rgba(207, 198, 215, 0.82);
  color: #333238;
  text-align: center;
  padding: 14px 18px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.pickup-title::before,
.pickup-title::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #a579be;
  transform: translateY(-50%);
}

.pickup-title::before {
  left: 5px;
}

.pickup-title::after {
  right: 5px;
}

.pickup-copy {
  width: min(790px, 100%);
  margin: 0 auto;
  font-size: 18px;
  line-height: 1.85;
}

.pickup-copy p {
  margin: 12px 0;
  color: #514d58;
}

.pickup-copy strong {
  color: #2d2b31;
  font-weight: 800;
}

.pickup-copy .accent {
  color: #a567dd;
  font-weight: 800;
}

.pickup-form {
  padding: 58px 58px 60px;
}

.pickup-form-inner {
  width: min(940px, 100%);
  margin: 0 auto;
}

.pickup-form label {
  margin-bottom: 14px;
  color: #333238;
  font-size: 18px;
  font-weight: 800;
}

.pickup-form input {
  height: 48px;
  border-color: #d8d1de;
  border-radius: 4px;
  background: rgba(211, 205, 218, 0.78);
  color: #342b3c;
  font-size: 17px;
}

.pickup-form input::placeholder {
  color: #8f7ba8;
}

.pickup-submit {
  width: min(560px, 100%);
  height: 52px;
  border-radius: 6px;
  background: linear-gradient(90deg, #b99be7 0%, #eba2be 100%);
  box-shadow: none;
}

.pickup-submit:hover {
  filter: brightness(1.02);
}

.pickup-form .status {
  display: block;
  min-height: 22px;
  margin: 12px 0 0;
  text-align: center;
  color: #8e57cb;
}

.pickup-form .status.error {
  color: var(--danger);
}

.order-badge {
  border: 1px solid var(--line);
  border-radius: 11px;
  min-height: 70px;
  padding: 11px 14px;
  color: var(--muted);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(246, 238, 253, 0.76));
  line-height: 1.45;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.order-badge strong {
  color: var(--text);
  font-size: 16px;
}

.logout-button {
  width: 100%;
  min-height: 70px;
  align-self: center;
}

.trade-settings {
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.5fr 0.5fr 0.55fr;
  gap: 12px;
  align-items: end;
}

.wide {
  grid-column: 1 / -1;
}

label {
  display: block;
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 13px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--text);
  padding: 11px 12px;
  font: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(142, 87, 203, 0.16);
  border-color: var(--teal);
}

textarea {
  min-height: 74px;
  resize: vertical;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.trade-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 16px;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
}

.section-title h2 {
  margin: 0;
  font-size: 18px;
}

.items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  max-height: 540px;
  overflow: auto;
}

.steam-item {
  position: relative;
  display: grid;
  grid-template-rows: 74px auto;
  gap: 8px;
  min-height: 150px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 9px;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.steam-item.selected {
  border-color: var(--teal);
  background: #eef8f9;
}

.steam-item input {
  position: absolute;
  top: 8px;
  left: 8px;
  width: auto;
}

.steam-item img {
  align-self: center;
  justify-self: center;
  max-width: 74px;
  max-height: 74px;
}

.item-name {
  min-height: 42px;
  font-weight: 700;
  line-height: 1.35;
}

.small,
.status {
  color: var(--muted);
  font-size: 13px;
}

.notice {
  background: #f6fbfc;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  padding: 12px 14px;
  line-height: 1.7;
}

.status.error {
  color: var(--danger);
}

pre {
  max-height: 230px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 13px;
}

@media (max-width: 980px) {
  body {
    background:
      radial-gradient(circle at 20% -8%, rgba(185, 155, 231, 0.2), transparent 30%),
      linear-gradient(180deg, #fbf8ff 0, #f5eef9 100%);
  }

  header {
    position: sticky;
    top: 0;
  }

  .wrap {
    width: min(100% - 24px, 720px);
  }

  .topbar,
  nav {
    align-items: stretch;
  }

  .topbar {
    flex-direction: column;
    min-height: 0;
    gap: 10px;
    padding: 10px 0;
  }

  .brand {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
  }

  .brand h1 {
    font-size: 19px;
  }

  .brand p {
    margin: 0;
    font-size: 12px;
  }

  nav {
    width: 100%;
    overflow-x: auto;
  }

  .nav-btn {
    flex: 1 0 auto;
    min-height: 40px;
  }

  .summary,
  .exchange-summary {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 14px;
    padding: 14px;
    border-radius: 12px;
  }

  .stars-box,
  .order-badge,
  .logout-button {
    min-height: 56px;
  }

  .stars-box strong {
    font-size: 20px;
  }

  .summary h2 {
    font-size: 20px;
  }

  .summary p {
    font-size: 12px;
    line-height: 1.45;
  }

  .order-badge {
    font-size: 13px;
    padding: 10px 12px;
  }

  .trade-settings,
  .trade-grid {
    grid-template-columns: 1fr;
  }

  .pickup-card,
  .pickup-form {
    padding: 52px 22px 30px;
  }

  .pickup-title {
    width: min(420px, calc(100% - 40px));
    font-size: 19px;
  }

  .pickup-copy {
    font-size: 15px;
    line-height: 1.75;
  }

  .wide {
    grid-column: auto;
  }

  th,
  td {
    padding: 14px 8px;
  }

  .name-cell,
  .price-cell,
  .link-action {
    font-size: 15px;
  }

  .thumb-cell {
    width: auto;
  }

  .armory-card {
    width: 150px;
    height: 86px;
  }

  .armory-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .armory-tile,
  .armory-tile.wide,
  .armory-tile.fill-4,
  .armory-tile.fill-3 {
    grid-column: auto;
  }

  .armory-tile-actions {
    gap: 6px;
    padding: 8px 6px;
  }

  .link-action {
    min-width: 0;
    flex: 1 1 0;
    min-height: 34px;
    font-size: 14px;
  }
}

@media (max-width: 520px) {
  .wrap {
    width: min(100% - 16px, 420px);
  }

  main {
    padding: 12px 0 24px;
  }

  .brand {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .brand h1 {
    font-size: 18px;
  }

  nav {
    border-radius: 10px;
  }

  .nav-btn {
    padding: 9px 10px;
    font-size: 13px;
  }

  .exchange-summary {
    grid-template-columns: 1fr 1fr;
  }

  .exchange-summary > div:nth-child(2),
  .exchange-summary > .order-badge {
    grid-column: 1 / -1;
  }

  .logout-button {
    grid-column: 2;
  }

  .armory-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .armory-cover {
    aspect-ratio: 425 / 236;
  }

  .draw-page {
    width: 100%;
    max-height: calc(100vh - 24px);
    padding: 14px;
  }

  .draw-list {
    grid-template-columns: 1fr;
  }
}

body {
  background: #f6f8fc;
  color: #18233a;
}

header {
  border-bottom: 1px solid #edf1f7;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 28px rgba(35, 52, 86, 0.05);
}

.wrap {
  width: min(1540px, calc(100% - 64px));
}

.topbar {
  min-height: 86px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-logo {
  display: block;
  width: min(232px, 42vw);
  height: 58px;
  object-fit: contain;
  object-position: left center;
}

.brand h1 {
  color: #172441;
  font-size: 25px;
  font-weight: 900;
  letter-spacing: 0;
}

.brand p {
  margin-top: 6px;
  color: #8b96ab;
  font-size: 15px;
  font-weight: 700;
}

nav {
  gap: 0;
  border-color: #e7ecf5;
  border-radius: 10px;
  background: #fff;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 8px 22px rgba(25, 51, 95, 0.04);
}

button,
.nav-btn,
.link-action {
  border-radius: 8px;
  background: #2165f4;
  color: #fff;
  box-shadow: 0 10px 22px rgba(33, 101, 244, 0.18);
  letter-spacing: 0;
}

.nav-btn {
  min-width: 118px;
  min-height: 46px;
  border-radius: 0;
  background: #fff;
  color: #6f7c91;
  box-shadow: none;
  font-size: 15px;
}

.nav-btn.active,
button:hover {
  background: #2165f4;
  color: #fff;
}

header nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(118px, 1fr));
  align-items: stretch;
}

header .nav-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 22px;
  border-radius: 0;
  transform: none;
}

header .nav-btn:first-child {
  border-radius: 9px 0 0 9px;
}

header .nav-btn:last-child {
  border-radius: 0 9px 9px 0;
}

header .nav-btn:hover {
  background: #f6f9ff;
  color: #2165f4;
  box-shadow: none;
  transform: none;
}

header .nav-btn.active,
header .nav-btn.active:hover {
  background: #2165f4;
  color: #fff;
}

button.secondary {
  border: 1px solid #a9c0ff;
  background: #fff;
  color: #2165f4;
  box-shadow: 0 10px 22px rgba(33, 101, 244, 0.08);
}

button.secondary:hover {
  background: #f5f8ff;
  color: #1256db;
}

main {
  padding: 22px 0 38px;
}

.exchange-summary {
  grid-template-columns: minmax(250px, 336px) 1fr minmax(360px, 500px);
  gap: 14px;
  margin-bottom: 26px;
  border-color: #e9edf5;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(29, 45, 73, 0.05);
  padding: 12px;
}

.stars-box {
  min-height: 126px;
  display: grid;
  grid-template-columns: 76px 1fr;
  align-items: center;
  justify-content: start;
  gap: 18px;
  border-color: #eef2f8;
  border-radius: 8px;
  background: #fff;
  padding: 22px 28px;
  box-shadow: none;
  text-align: left;
}

.stars-box::before {
  content: "★";
  width: 70px;
  height: 70px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #2165f4;
  font-size: 40px;
  background: #edf3ff;
}

.stars-label {
  display: block;
  color: #69758b;
  font-size: 16px;
  font-weight: 800;
}

.stars-box strong {
  display: block;
  margin: 8px 0 4px;
  color: #2165f4;
  font-size: 36px;
  line-height: 1;
  letter-spacing: 0;
}

.stars-note {
  display: block;
  color: #a0a9b8;
  font-size: 13px;
  font-weight: 700;
}

.exchange-heading {
  min-height: 126px;
  display: grid;
  place-items: center;
  border-right: 1px solid #edf1f6;
  text-align: center;
}

.exchange-heading h2 {
  color: #172441;
  font-size: 28px;
  font-weight: 900;
}

.exchange-heading p {
  margin-top: 14px;
  color: #a0a9b8;
  font-size: 15px;
  font-weight: 700;
}

.order-panel {
  min-height: 126px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
  border: 1px solid #e9edf5;
  border-radius: 8px;
  background: #fff;
  padding: 18px 22px;
}

.order-badge {
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
  color: #7b8799;
  font-size: 15px;
  font-weight: 700;
}

.order-badge > div:first-child {
  margin-bottom: 16px;
  color: #172441;
  font-size: 17px;
  font-weight: 900;
}

.order-badge strong {
  color: #2165f4;
  font-size: 17px;
  font-weight: 900;
}

.logout-button {
  width: 118px;
  min-height: 46px;
  align-self: center;
  font-size: 15px;
}

.exchange-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.exchange-filters {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}

.filter-chip {
  min-width: 98px;
  min-height: 39px;
  border: 1px solid #e6ebf3;
  border-radius: 10px;
  background: #fff;
  color: #68758b;
  box-shadow: 0 8px 20px rgba(28, 45, 74, 0.04);
  font-size: 14px;
  font-weight: 800;
  padding: 0 18px;
}

.filter-chip.active,
.filter-chip:hover {
  border-color: #2165f4;
  background: #2165f4;
  color: #fff;
}

.sort-select {
  width: 164px;
  height: 39px;
  border-color: #e6ebf3;
  border-radius: 10px;
  background: #fff;
  color: #8c97a8;
  font-size: 14px;
  font-weight: 800;
  padding: 0 18px;
  box-shadow: 0 8px 20px rgba(28, 45, 74, 0.04);
}

.armory-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
}

.armory-tile,
.armory-tile.wide,
.armory-tile.fill-4,
.armory-tile.fill-3 {
  grid-column: auto;
  border-color: #e8edf5;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(29, 45, 73, 0.055);
}

.armory-tile:hover {
  transform: translateY(-2px);
  border-color: #d8e2f2;
  box-shadow: 0 18px 40px rgba(29, 45, 73, 0.08);
}

.armory-cover {
  aspect-ratio: 1.9 / 1;
  margin: 10px 10px 0;
  border-radius: 6px;
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
}

.armory-tile.wide .armory-cover {
  aspect-ratio: 1.9 / 1;
}

.armory-cover img {
  width: 100%;
  height: 100%;
  padding: 0;
  object-fit: contain;
  transform: scale(1.40);
}

.armory-tile.category-limited .armory-cover img,
.armory-tile.category-weapon .armory-cover img {
  transform: scale(1.60);
}

.armory-tile.category-charm .armory-cover img {
  transform: scale(1.00);
}

.armory-tile.category-case .armory-cover img {
  transform: scale(1.40);
}

.armory-tile.category-sticker .armory-cover img {
  transform: scale(1.80);
}

.armory-tile:hover .armory-cover img {
  transform: scale(1.10);
  filter: saturate(1.10);
}

.armory-tile.category-limited:hover .armory-cover img,
.armory-tile.category-weapon:hover .armory-cover img {
  transform: scale(1.60);
}

.armory-tile.category-charm:hover .armory-cover img {
  transform: scale(1.10);
}

.armory-tile.category-case:hover .armory-cover img {
  transform: scale(1.50);
}

.armory-tile.category-sticker:hover .armory-cover img {
  transform: scale(1.90);
}

.armory-info {
  padding: 10px 14px 0;
}

.armory-name {
  min-height: 38px;
  margin: 0;
  color: #34435b;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.35;
}

.armory-price {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 7px;
  color: #46546b;
  font-size: 15px;
  font-weight: 800;
}

.armory-price::before {
  content: "★";
  color: #2165f4;
  font-size: 17px;
  line-height: 1;
}

.armory-tile-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 12px 14px 14px;
  background: #fff;
}

.link-action {
  min-width: 0;
  min-height: 34px;
  margin: 0;
  border: 1px solid #2165f4;
  border-radius: 6px;
  background: #2165f4;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 9px 18px rgba(33, 101, 244, 0.16);
}

.link-action[data-batch] {
  border-color: #e4eaf3;
  background: #fff;
  color: #66738a;
  box-shadow: none;
}

.link-action:hover {
  background: #1256db;
  color: #fff;
  box-shadow: 0 12px 22px rgba(33, 101, 244, 0.2);
}

.link-action[data-batch]:hover {
  border-color: #2165f4;
  background: #f6f9ff;
  color: #2165f4;
}

@media (max-width: 1200px) {
  .armory-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .wrap {
    width: min(100% - 28px, 760px);
  }

  .topbar {
    align-items: stretch;
  }

  .exchange-summary {
    grid-template-columns: 1fr;
  }

  .exchange-heading {
    border-right: 0;
    border-top: 1px solid #edf1f6;
    border-bottom: 1px solid #edf1f6;
  }

  header nav {
    width: min(356px, 100%);
    align-self: center;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  header .nav-btn {
    flex: initial;
    min-width: 0;
  }

  .armory-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .wrap {
    width: min(100% - 10px, 430px);
  }

  header {
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
  }

  .topbar {
    min-height: 0;
    gap: 6px;
    padding: 6px 0 8px;
  }

  .brand {
    justify-content: center;
  }

  .brand-logo {
    width: min(132px, 48vw);
    height: 34px;
  }

  header nav {
    width: 100%;
    border-radius: 9px;
  }

  header .nav-btn {
    min-height: 34px;
    padding: 0 10px;
    font-size: 13px;
    border-radius: 8px;
  }

  main.wrap {
    padding-top: 8px;
  }

  .exchange-summary {
    grid-template-columns: 92px 1fr;
    gap: 6px;
    margin-bottom: 8px;
    padding: 6px;
  }

  .exchange-toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 8px;
  }

  .exchange-filters {
    flex-wrap: nowrap;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .filter-chip {
    flex: 0 0 auto;
    min-width: auto;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 7px;
    font-size: 11px;
  }

  .sort-select {
    width: 100%;
    height: 30px;
    border-radius: 8px;
    font-size: 11px;
  }

  .stars-box,
  .order-panel {
    min-height: 0;
    padding: 8px 10px;
    text-align: left;
  }

  .stars-box {
    grid-template-columns: 28px 1fr;
    gap: 6px;
  }

  .stars-box::before {
    width: 28px;
    height: 28px;
    font-size: 16px;
  }

  .stars-label,
  .stars-note,
  .exchange-heading p,
  .order-badge {
    font-size: 11px;
  }

  .stars-box strong {
    margin: 1px 0;
    font-size: 20px;
  }

  .exchange-heading {
    display: none;
  }

  .order-panel {
    grid-column: 1 / -1;
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .order-badge > div:first-child,
  .order-badge strong {
    font-size: 12px;
  }

  .logout-button {
    width: 100%;
    min-height: 30px;
    font-size: 11px;
  }

  .armory-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .armory-tile,
  .armory-tile.wide,
  .armory-tile.fill-4,
  .armory-tile.fill-3 {
    min-height: 0;
    border-radius: 8px;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
  }

  .armory-cover,
  .armory-tile.wide .armory-cover {
    height: clamp(78px, 24vw, 104px);
    margin: 6px 6px 0;
    aspect-ratio: auto;
  }

  .armory-cover img,
  .armory-tile:hover .armory-cover img {
    transform: scale(1.05);
  }

  .armory-tile.category-limited .armory-cover img,
  .armory-tile.category-weapon .armory-cover img,
  .armory-tile.category-limited:hover .armory-cover img,
  .armory-tile.category-weapon:hover .armory-cover img {
    transform: scale(1.08);
  }

  .armory-tile.category-charm .armory-cover img,
  .armory-tile.category-charm:hover .armory-cover img {
    transform: scale(0.72);
  }

  .armory-tile.category-case .armory-cover img,
  .armory-tile.category-case:hover .armory-cover img {
    transform: scale(1.05);
  }

  .armory-tile.category-sticker .armory-cover img,
  .armory-tile.category-sticker:hover .armory-cover img {
    transform: scale(1.08);
  }

  .armory-info {
    padding: 6px 8px 0;
  }

  .armory-name {
    min-height: 32px;
    font-size: 12px;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .armory-price {
    margin-top: 5px;
    gap: 4px;
    font-size: 12px;
  }

  .armory-price::before {
    font-size: 13px;
  }

  .armory-tile-actions {
    gap: 6px;
    padding: 7px 8px 8px;
  }

  .link-action {
    min-height: 28px;
    border-radius: 6px;
    font-size: 11px;
  }

  .my-items-dashboard {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 12px;
  }

  .gain-card,
  .link-panel,
  .price-panel {
    min-height: 0;
    padding: 12px;
    border-radius: 10px;
  }

  .gain-title,
  .link-label {
    margin-bottom: 8px;
    font-size: 13px;
  }

  .gain-number {
    font-size: 34px;
  }

  .link-input {
    height: 36px;
    padding: 0 12px;
    border-radius: 8px;
    font-size: 13px;
  }

  .action-row {
    margin-top: 8px;
    gap: 8px;
  }

  .save-btn,
  .clear-btn {
    height: 34px;
    border-radius: 8px;
    font-size: 13px;
  }

  .price-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .price-card {
    padding: 7px 8px;
    border-radius: 8px;
    gap: 6px;
  }

  .price-card .platform-icon {
    width: 24px;
    height: 24px;
    flex-basis: 24px;
    font-size: 12px;
  }

  .price-card .platform-name {
    font-size: 11px;
  }

  .price-card .platform-price {
    font-size: 13px;
  }

  .draw-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .draw-card {
    border-radius: 8px;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
  }

  .draw-card-image-wrap {
    min-height: 76px;
  }

  .draw-card-image-wrap img {
    max-height: 82px;
  }

  .draw-card-info {
    padding: 6px 7px 8px;
  }

  .draw-card-info h3 {
    margin-bottom: 5px;
    font-size: 12px;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .draw-card-price {
    font-size: 10px;
  }

  .draw-card-price .price-label,
  .draw-card-price .price-value {
    padding: 2px 4px;
  }
}
