@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  color-scheme: dark;
  --ground: #0d1215;
  --surface: #171f26;
  --surface-deep: #11191e;
  --surface-raised: #202d32;
  --border: #344147;
  --border-strong: #4d6368;
  --text: #f5f7f6;
  --muted: #b4c0c1;
  --primary: #ff9b5e;
  --cyan: #71e9eb;
  --cyan-soft: #b0edf0;
  --warm-surface: #3a2b25;
  --warm-border: #8b5941;
  --heading: 'Space Grotesk', 'Segoe UI', sans-serif;
  font-family: 'DM Sans', 'Segoe UI', sans-serif;
  color: var(--text);
  background: var(--ground);
  line-height: 1.5;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
img { display: block; max-width: 100%; }
svg { display: block; flex: none; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--heading); line-height: 1.12; }
[hidden] { display: none !important; }

.shell { min-height: 100vh; display: grid; grid-template-columns: 231px minmax(0, 1fr); background: radial-gradient(ellipse at 76% 1%, #3b271d70, transparent 52%), radial-gradient(ellipse at 38% 98%, #14303766, transparent 57%), var(--ground); }
.sidebar { position: sticky; z-index: 2; top: 0; height: 100dvh; display: flex; flex-direction: column; padding: 23px 16px 18px; background: linear-gradient(155deg, #1e282db8, #11181de8 59%); border-right: 1px solid var(--border); backdrop-filter: blur(24px); }
.brand { display: flex; align-items: center; gap: 11px; min-height: 42px; margin: 0 3px 38px; color: var(--text); border: 0; background: none; padding: 0; text-align: left; }
.brand img { width: 40px; height: 40px; box-shadow: 0 4px 16px #ff95573e; border-radius: 11px; }
.brand strong { display: block; font: 700 17px/1.2 var(--heading); letter-spacing: -.6px; white-space: nowrap; }
.brand small { display: block; color: var(--primary); font: 600 12px/1.5 'DM Sans', sans-serif; letter-spacing: .06em; }
.nav-group { display: grid; gap: 4px; }
.nav-group + .nav-group { margin-top: 28px; }
.nav-label { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .105em; text-transform: uppercase; padding: 0 11px; margin-bottom: 5px; }
.nav-button { display: flex; align-items: center; width: 100%; gap: 11px; min-height: 43px; border: 1px solid transparent; border-radius: 9px; padding: 7px 9px 7px 11px; color: #c8d4d4; background: transparent; text-align: left; font-size: 14px; font-weight: 600; }
.nav-button svg { color: #a9bdbf; }
.nav-button:hover { color: var(--text); background: var(--surface-raised); border-color: var(--border); }
.nav-button[aria-current='page'] { color: #ffddc6; background: var(--warm-surface); border-color: var(--warm-border); }
.nav-button[aria-current='page'] svg { color: var(--primary); }
.nav-button .bubble { margin-left: auto; }
.bubble { background: var(--cyan); color: var(--ground); border-radius: 7px; padding: 0 6px; font-size: 12px; line-height: 19px; }
.game-mark { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; flex: none; }
.game-mark.go-up { color: #ffc29b; background: var(--warm-surface); }
.game-mark.steal { color: #70e7d4; background: #183d3c; }
.game-mark svg { color: inherit; }
.sidebar-bottom { margin-top: auto; display: grid; gap: 8px; padding: 10px 3px 0; }
.sidebar-bottom button { min-height: 45px; }

.workspace { min-width: 0; }
.topbar { position: relative; z-index: 1; min-height: 73px; border-bottom: 1px solid var(--border); background: #10171bcc; backdrop-filter: blur(20px); }
.topbar-inner, .content { max-width: 1510px; margin-inline: auto; padding-inline: clamp(24px, 3.1vw, 49px); }
.topbar-inner { min-height: inherit; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.top-search { position: relative; display: flex; align-items: center; gap: 10px; color: var(--muted); max-width: 389px; flex: 1 1 auto; padding: 9px 12px; background: #1c262bcc; border: 1px solid var(--border); border-radius: 9px; }
.top-search:focus-within { border-color: var(--cyan); }
.top-search input { min-width: 0; width: 100%; color: var(--text); border: 0; background: none; padding: 0; font-size: 14px; outline: 0; }
.top-search:not(:focus-within) .search-suggestions { display: none; }
.search-suggestions { position: absolute; inset: calc(100% + 6px) -1px auto; padding: 4px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 9px; box-shadow: 0 12px 28px #070c10ad; }
.search-classification { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: 2px 8px; width: 100%; min-height: 42px; padding: 7px 9px; font-size: 14px; text-align: left; color: var(--text); background: transparent; border: 0; border-radius: 6px; }
.search-classification:hover, .search-classification:focus-visible { background: var(--surface-raised); }
.search-classification:focus-visible { outline-offset: -2px; }
.search-classification strong { color: var(--rank-color); }
.search-classification small { color: var(--muted); font-size: 12px; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.btn, .icon-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 9px; min-height: 40px; padding: 8px 14px; font-weight: 700; font-size: 14px; text-decoration: none; white-space: nowrap; color: var(--text); transition: background-color .15s, border-color .15s; }
.btn.primary { color: #20140e; background: linear-gradient(180deg, #ffb17d, var(--primary)); border-color: #ffd0ae8c; box-shadow: inset 0 1px #fff0d45c, 0 4px 18px #f681412b; }
.btn.primary:hover { background: #ffc39a; }
.btn.secondary, .icon-btn { background: #202d32bf; border-color: var(--border-strong); }
.btn.secondary:hover, .icon-btn:hover { background: #263b41; border-color: #729396; }
.btn.ghost { background: transparent; border-color: var(--border-strong); }
.btn.ghost:hover { background: var(--surface-raised); }
.icon-btn { width: 40px; padding: 0; position: relative; }
.language-toggle { font-size: 12px; letter-spacing: .03em; }
.language-options { display: flex; flex-wrap: wrap; gap: 8px; }
.language-options [aria-pressed="true"] { color: var(--cyan-soft); border-color: var(--cyan); }
.icon-btn .dot { position: absolute; top: 7px; right: 7px; width: 7px; height: 7px; background: var(--cyan); border-radius: 50%; box-shadow: 0 0 0 2px var(--surface); }
.top-profile { width: 39px; height: 39px; min-height: 39px; border-radius: 50%; background: radial-gradient(circle at 35% 22%, #324b50, #1c2b30 71%); color: var(--cyan-soft); font-family: var(--heading); }
.mobile-brand, .mobile-nav { display: none; }

.content { padding-top: 26px; padding-bottom: 30px; }
.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(12px, 2vw, 33px);
  min-height: clamp(21rem, 33vw, 29rem);
  padding: 10px clamp(24px, 3.8vw, 60px);
  border: 1px solid #735644;
  border-radius: 24px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 77% 41%, #603322 0%, #36241f 27%, transparent 63%),
    radial-gradient(ellipse at 15% 100%, #183239 0%, transparent 56%),
    linear-gradient(116deg, #1c252c, #12191e 47%, #171b1e);
  box-shadow: inset 0 1px #edf8ff29, 0 18px 52px #060c12a3;
}
.hero::before { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(122deg, #e2f5ff17, #bfecff04 27%, transparent 50%); }
.hero-copy { position: relative; z-index: 1; min-width: 0; padding-block: clamp(26px, 4vw, 60px); }
.hero-copy::before { content: ''; display: block; width: 3rem; height: 3px; margin-bottom: 1.1rem; border-radius: 10px; background: linear-gradient(90deg, var(--primary), #ff9b5e45); box-shadow: 0 0 12px #ff935750; }
.hero h1 { font-size: clamp(2.375rem, 4.5vw, 4.75rem); font-weight: 700; letter-spacing: -.068em; line-height: .98; }
.hero h1 span { display: block; color: var(--primary); }
.hero p { max-width: 355px; margin: 17px 0 24px; color: #d1dddd; line-height: 1.58; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.hero-actions .btn { min-height: 44px; }
.hero-actions .btn.ghost { background: #121a1db0; }
.hero-actions .btn.ghost:hover { background: #2a3e44; }
.hero-stage { position: relative; isolation: isolate; display: grid; place-items: center; align-self: stretch; min-width: 0; }
.hero-stage::before {
  content: '';
  position: absolute;
  inset: 0 -22% 0 -17%;
  z-index: -2;
  background:
    repeating-radial-gradient(circle at 53% 50%, transparent 0 53px, #ffb78c3b 54px 55px, transparent 56px 69px),
    linear-gradient(#ffd2ba17 1px, transparent 1px),
    linear-gradient(90deg, #ffd2ba17 1px, transparent 1px);
  background-size: auto, 27px 27px, 27px 27px;
  mask-image: radial-gradient(ellipse, #000 15%, #000c 44%, transparent 74%);
}
.hero-stage::after {
  content: '';
  position: absolute;
  bottom: 7%;
  left: 12%;
  width: 78%;
  height: 19%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(ellipse, #090e13bb 0%, #0f1e22aa 32%, #7fcacc45 47%, #fc985738 53%, transparent 70%);
  filter: blur(2px);
}
.hero-stage img { width: min(106%, 27rem); max-width: 106%; height: auto; max-height: 27rem; object-fit: contain; filter: drop-shadow(0 15px 15px #080e1399); }
.catalog { margin-top: 29px; scroll-margin-top: 15px; }
.page-heading { margin: 7px 0 23px; }
.listing-page-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 14px; margin-bottom: 18px; }
.listing-page-heading .page-heading { margin: 7px 0; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; margin-bottom: 15px; }
.section-head h2, .page-heading h1 { font-size: clamp(25px, 3.05vw, 34px); letter-spacing: -.047em; }
.section-head p, .page-heading p { color: var(--muted); font-size: 14px; margin-top: 4px; }
.toolbar { display: flex; align-items: center; gap: 9px; margin-bottom: 16px; }
.toolbar .filters { flex: 1 1 auto; }
.rarity-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 9px 13px; margin: 0 0 16px; padding: 9px 12px; border: 1px solid var(--border); border-radius: 10px; background: linear-gradient(130deg, #223138a6, #10181dd9); }
.rarity-filter { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 700; }
.rarity-toolbar .btn { min-height: 34px; padding: 5px 10px; }
.rarity-badge { --rarity-color: #d1dddd; display: inline-flex; gap: 6px; align-items: center; width: fit-content; padding: 2px 7px; border: 1px solid color-mix(in srgb, var(--rarity-color) 41%, var(--border)); border-radius: 6px; background: color-mix(in srgb, var(--rarity-color) 13%, var(--surface-deep)); color: var(--rarity-color); font-size: 12px; font-weight: 700; }
.rarity-badge::before, .rarity-choice::before { content: ''; width: 6px; height: 6px; flex: none; background: var(--rarity-color); border-radius: 50%; }
.rarity-badge.warning { --rarity-color: #ffd18a; }
.stb-rank-badge { display: inline-block; width: fit-content; padding: 2px 7px; border-inline-start: 2px solid var(--rank-color); border-radius: 4px; background: color-mix(in srgb, var(--rank-color) 10%, var(--surface-deep)); color: var(--rank-color); font-size: 12px; font-weight: 700; }
.detail-rarity { display: flex; align-items: center; gap: 9px; margin-top: 11px; color: var(--muted); font-size: 14px; }
.detail-rank { margin-top: 6px; }
.trade-target { margin-top: 10px; padding: 8px 10px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface-raised); }
.trade-target > span { display: block; color: var(--muted); font-size: 13px; }
.trade-target > div { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; overflow-wrap: anywhere; }
.trade-match-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.trade-notices { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.trade-notices h3 { font-size: 17px; margin-bottom: 6px; }
.rarity-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.rarity-choice { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 7px; min-height: 39px; text-align: center; font-weight: 700; font-size: 14px; border: 1px solid color-mix(in srgb, var(--rarity-color) 34%, var(--border)); border-radius: 8px; background: color-mix(in srgb, var(--rarity-color) 11%, var(--surface-deep)); color: var(--rarity-color); }
.rarity-choice:hover, .rarity-choice[aria-pressed='true'] { border-color: var(--rarity-color); background: color-mix(in srgb, var(--rarity-color) 20%, var(--surface-deep)); }
.stb-rank-guide { margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--border); }
.stb-rank-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 8px; }
.filters { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.chip { color: var(--muted); border: 1px solid var(--border); background: #17212bc9; min-height: 35px; padding: 6px 12px; border-radius: 8px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.chip:hover, .chip[aria-pressed='true'] { color: #ffddc6; background: var(--warm-surface); border-color: var(--warm-border); }
.select-wrap { display: inline-grid; grid-template-columns: auto 15px; align-items: center; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-deep); color: var(--muted); }
.select-wrap select { color: inherit; width: 100%; appearance: none; grid-column: 1 / -1; grid-row: 1; border: 0; border-radius: 8px; background: none; padding: 7px 30px 7px 10px; font-size: 13px; }
.select-wrap svg { pointer-events: none; grid-column: 2; grid-row: 1; margin-left: -8px; }
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(11px, 1.18vw, 18px); }
.listing-pagination { display: flex; align-items: center; justify-content: center; gap: 9px 13px; flex-wrap: wrap; margin-top: 20px; }
.listing-pagination span { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.listing-pagination button:disabled { opacity: .46; cursor: default; }
#catalog-title, #profile-catalog-title, #page-title { scroll-margin-top: 16px; }
.card { overflow: hidden; min-width: 0; border: 1px solid var(--border); border-radius: 13px; background: linear-gradient(160deg, #223138a6, #10181dd9); backdrop-filter: blur(18px); box-shadow: inset 0 1px #c5e8ef22, 0 9px 21px #07141c4d; position: relative; transition: border-color .2s, transform .2s; }
.card:hover { border-color: #366268; transform: translateY(-2px); }
.card-visual { display: block; isolation: isolate; position: relative; overflow: hidden; aspect-ratio: 1.53; background: radial-gradient(ellipse at 60% 42%, #27444a, #16262d 72%); border: 0; padding: 0; width: 100%; color: var(--cyan-soft); }
.card-visual img { width: 100%; height: 100%; object-fit: cover; }
.card-visual > .missing-art { position: absolute; inset: 0; display: grid; place-items: center; }
.card-visual > .missing-art svg { width: 34px; height: 34px; opacity: .65; }
.card-visual::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, #060c122b, transparent 54%, #08131b45); }
.tag { display: inline-flex; align-items: center; width: fit-content; gap: 6px; padding: 3px 7px; border: 1px solid #ffc29b80; border-radius: 6px; color: #ffddc6; background: #3c2923ed; font-size: 12px; line-height: 1.3; font-weight: 700; }
.tag.sale { background: #492b21ed; color: #ffddc6; }
.tag.trade { background: #123733ed; color: #b5ffeb; border-color: #63ad9f82; }
.tag.both { background: #3c2b14ed; color: #ffe7a8; border-color: #c09a53a8; }
.tag.wanted { background: #14254bed; color: #d1dcff; border-color: #6379adb0; }
.card-mode { position: absolute; top: 10px; left: 10px; z-index: 1; pointer-events: none; max-width: calc(100% - 53px); text-align: left; }
.favourite { position: absolute; top: 8px; right: 8px; width: 33px; min-height: 33px; z-index: 1; background: #10191ebb; border-color: #a8ccd748; backdrop-filter: blur(10px); }
.favourite[aria-pressed='true'] svg { color: #f3a2dd; fill: #f3a2dd; }
.card-body { padding: 12px 12px 11px; }
.card-game { color: var(--primary); font-size: 12px; font-weight: 700; }
.card-game.steal { color: #99e3d5; }
.card-title { color: var(--text); border: 0; background: transparent; padding: 0; text-align: left; margin: 4px 0 6px; font: 700 clamp(15px, 1.52vw, 20px)/1.2 var(--heading); letter-spacing: -.035em; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; display: block; }
.card-title:hover { color: var(--cyan-soft); }
.card-meta { display: grid; justify-items: start; gap: 4px; margin-bottom: 10px; }
.card-foot { display: flex; justify-content: space-between; align-items: center; gap: 4px; border-top: 1px solid var(--border); padding-top: 8px; }
.card-foot strong { font-size: 14px; color: var(--text); }
.card-foot small { font-size: 11px; color: var(--muted); white-space: nowrap; }
.empty, .glass { padding: 22px; border: 1px solid var(--border); border-radius: 13px; background: linear-gradient(155deg,#223138a6,#10181dd9); }
.empty p { color: var(--muted); margin-top: 7px; }
.empty .btn { margin-top: 14px; }
.demo-footer { display: flex; gap: 6px; flex-wrap: wrap; justify-content: space-between; color: var(--muted); margin-top: 24px; font-size: 12px; }

dialog { color: var(--text); background: linear-gradient(150deg, #142127f9, #10161bfc); border: 1px solid var(--border-strong); border-radius: 17px; width: min(640px, calc(100% - 22px)); max-height: min(89dvh, 940px); padding: 22px; box-shadow: 0 18px 100px #070e15de, inset 0 1px #c5e8ef22; }
dialog::backdrop { background: #080e13c7; backdrop-filter: blur(7px); }
.dialog-head { display: flex; align-items: start; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.dialog-head h2 { font-size: 28px; letter-spacing: -.04em; }
.dialog-head .icon-btn { width: 34px; min-height: 34px; }
.detail-visual { display: block; width: 100%; max-height: 310px; object-fit: contain; border-radius: 11px; background: var(--surface-deep); }
.photo-original:not([hidden]) { display: inline-flex; align-items: center; min-height: 2.75rem; color: var(--cyan-soft); font-size: .9rem; text-underline-offset: .2em; }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.thumbs button { width: 65px; height: 50px; border: 1px solid var(--border-strong); background: var(--surface-deep); border-radius: 6px; overflow: hidden; padding: 0; }
.thumbs button[aria-pressed='true'] { border-color: var(--cyan); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.detail-meta, .dialog-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin-top: 13px; }
.detail-meta { color: var(--muted); font-size: 14px; }
.detail-price { font: 700 26px var(--heading); margin-top: 11px; }
.detail-copy { color: #d1dddd; margin-top: 8px; white-space: pre-wrap; overflow-wrap: anywhere; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.trade-fields { grid-column: 1 / -1; min-width: 0; margin: 0; padding: 7px 11px 11px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface-raised); }
.trade-fields legend { color: var(--text); padding-inline: 5px; font: 700 15px var(--heading); }
.trade-fields > .help { margin-top: 0; }
.photo-panel { min-width: 0; margin: 2px 0 15px; padding: 7px 11px 11px; border: 1px solid var(--border-strong); border-radius: 10px; background: linear-gradient(130deg, #223138a6, #10181dd9); }
.photo-panel legend { color: var(--text); padding-inline: 5px; font: 700 15px var(--heading); }
.photo-panel .help { margin: 0 0 9px; }
.photo-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.photo-count { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.photo-picker { position: relative; cursor: pointer; }
.photo-picker:focus-within { outline: 2px solid var(--cyan); outline-offset: 3px; }
.photo-picker.disabled { opacity: .65; cursor: default; }
.photo-picker input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: inherit; }
.photo-previews { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 7px; margin: 0 0 10px; padding: 0; list-style: none; }
.photo-previews li { position: relative; aspect-ratio: 1.2; min-width: 0; overflow: hidden; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface-deep); }
.photo-previews img, .photo-placeholder { width: 100%; height: 100%; object-fit: cover; }
.photo-placeholder { display: grid; place-items: center; color: var(--cyan-soft); }
.photo-previews .remove-photo { position: absolute; top: 3px; right: 3px; width: 31px; min-height: 31px; background: #121a20e8; }
.cover-tag { position: absolute; bottom: 4px; left: 4px; padding: 1px 5px; border-radius: 4px; background: #121a20e8; color: var(--text); font-size: 11px; font-weight: 700; }
.photo-status { color: var(--muted); margin: 6px 0 0; font-size: 13px; }
.photo-status:empty { display: none; }
.photo-status.error { color: #ffc0d5; }
button:disabled { opacity: .6; cursor: default; }
.field { display: grid; align-content: start; gap: 5px; font-size: 14px; color: var(--text); }
.field.full { grid-column: 1 / -1; }
.field input, .field select, .field textarea, .chat-composer input { width: 100%; min-width: 0; color: var(--text); border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface-deep); padding: 9px 10px; }
.field select { appearance: none; padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='%23b0edf0' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
.field textarea { resize: vertical; min-height: 79px; }
.check-field { display: flex; align-items: center; gap: 7px; color: var(--text); font-size: 14px; }
.check-field.full { grid-column: 1 / -1; }
.check-field input { accent-color: var(--primary); }
.help { color: var(--muted); font-size: 13px; margin: 7px 0; }
.form-error { color: #ffc0d5; min-height: 19px; margin-top: 6px; font-size: 14px; }
.status-select { max-width: 210px; }
.manage { padding: 9px 11px 13px; }
.manage .btn { margin-top: 9px; }
.toast { position: fixed; bottom: 19px; right: 19px; max-width: min(385px, calc(100% - 38px)); z-index: 7; font-size: 14px; color: var(--text); background: var(--warm-surface); border: 1px solid var(--warm-border); padding: 10px 14px; border-radius: 9px; box-shadow: 0 10px 30px #0610169c; }
.toast:empty { display: none; }

.messages { display: grid; grid-template-columns: minmax(190px, 31%) minmax(0, 1fr); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: #10181dd9; min-height: 470px; }
.message-list { padding: 10px; border-right: 1px solid var(--border); }
.thread-button { width: 100%; display: grid; grid-template-columns: 33px 1fr auto; gap: 8px; align-items: center; background: transparent; color: var(--text); border: 1px solid transparent; border-radius: 8px; padding: 9px 6px; text-align: left; }
.thread-button:hover, .thread-button[aria-current='true'] { background: var(--surface-raised); border-color: var(--border-strong); }
.thread-button span:nth-child(2) { display: grid; min-width: 0; }
.thread-button strong, .thread-button small { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.thread-button small { color: var(--muted); }
.thread-button .thread-outcome { color: var(--cyan-soft); font-weight: 600; }
.avatar { border-radius: 50%; width: 33px; height: 33px; display: grid; place-items: center; background: #27444a; color: var(--cyan-soft); font: 700 15px var(--heading); }
.chat { min-width: 0; min-height: 460px; display: flex; flex-direction: column; padding: 15px; }
.chat-heading { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.chat-heading p { color: var(--muted); font-size: 13px; }
.chat-item { display: flex; align-items: center; gap: 8px; }
.chat-item > img { width: 42px; height: 42px; object-fit: cover; border-radius: 7px; }
.chat-log { display: flex; flex: 1; flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px 3px; min-height: 205px; max-height: 420px; overflow-y: auto; }
.message { background: var(--surface-raised); border: 1px solid var(--border); max-width: 85%; border-radius: 10px; padding: 8px 11px; font-size: 14px; overflow-wrap: anywhere; }
.message > span { white-space: pre-wrap; }
.message.self { background: #25434a; border-color: #426e73; align-self: end; }
.message time { display: block; color: var(--muted); font-size: 11px; }
.message.offer { display: grid; gap: 4px; }
.message.offer .btn { min-height: 32px; padding: 4px 8px; }
.chat-composer { display: flex; align-items: center; gap: 8px; }
.chat-actions { display: flex; flex-wrap: wrap; gap: 7px; margin: 7px 0; }
.chat-actions .btn { min-height: 32px; padding-block: 4px; }
.chat-outcome-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--border); }
.chat-outcome { border: 1px solid var(--border-strong); border-radius: 9px; padding: 9px 11px; background: var(--surface-raised); }
.chat-outcome.completed { border-color: #447267; background: #1d3834; }
.chat-outcome p { color: var(--muted); font-size: 13px; }
.profile { max-width: 600px; }
.team-contact { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 10px; padding: 12px; }
.team-member { flex: 1; min-width: 90px; }
.team-member .help { margin: 2px 0 0; }
.mobile-team { display: none; }
.footer-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 13px; }
.report-rules { display: grid; gap: 15px; }
.report-rules h3 { margin-bottom: 6px; font-size: 17px; }
.report-rules p { color: #d1dddd; font-size: 14px; }
.report-rules p + p { margin-top: 6px; }
.profile-link { color: var(--cyan-soft); background: none; border: 0; padding: 0; font-size: inherit; text-decoration: underline; text-underline-offset: 3px; }
.card-foot .profile-link { font-size: 12px; text-overflow: ellipsis; white-space: nowrap; overflow: hidden; min-width: 0; }
.chat-outcome .dialog-actions { margin-top: 9px; }
.profile-header { padding: 19px; }
.profile-banner { display: flex; align-items: center; gap: 13px; flex-wrap: wrap; }
.profile-banner h1 { font-size: clamp(24px, 4vw, 38px); letter-spacing: -.045em; overflow-wrap: anywhere; }
.profile-banner > .btn { margin-left: auto; }
.profile-avatar { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 15px; background: #27444a; color: #ffe3d0; font: 700 27px var(--heading); }
.profile-score { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 5px 7px; color: #d1dddd; font-size: 14px; }
.profile-stars { position: relative; display: inline-block; color: #748e91; font-size: 15px; letter-spacing: .13em; white-space: nowrap; }
.profile-stars .filled { position: absolute; inset: 0 auto 0 0; width: var(--fill); overflow: hidden; color: #ffdb79; }
.profile-section { margin-top: 23px; }
.profile-reviews { display: grid; gap: 7px; padding: 0; margin: 0; list-style: none; }
.profile-reviews .glass { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 9px 12px; }
.profile-reviews time, .snapshot-trade { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.snapshot-trade { margin-bottom: 5px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.rating-picker { display: flex; flex-wrap: wrap; gap: 7px; margin: 14px 0 0; min-width: 0; border: 1px solid var(--border); border-radius: 8px; padding: 8px; }
.rating-picker legend { padding: 0 4px; }
.rating-picker label { display: flex; align-items: center; gap: 4px; padding: 4px 7px; border: 1px solid var(--border-strong); border-radius: 6px; cursor: pointer; }
.rating-picker label:has(:checked) { background: #25434a; border-color: var(--cyan); }
.rating-picker label > span > span:first-child { color: #ffda7e; }
.rating-picker input { accent-color: var(--primary); }
[data-form='public-review'] .check-field { margin-top: 10px; }

@media (max-width: 1110px) {
  .shell { grid-template-columns: 199px minmax(0, 1fr); }
  .sidebar { padding-inline: 12px; }
}
@media (max-width: 990px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 880px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { min-height: 18rem; border-radius: 19px; padding-inline: 24px; }
  .hero h1 { font-size: clamp(2rem, 4.2vw, 2.4rem); }
}
@media (max-width: 700px), (orientation: landscape) and (max-height: 600px) and (max-width: 1024px) {
  .mobile-team { display: inline-block; }
  .shell { display: block; }
  .sidebar { display: none; }
  .mobile-brand { display: block; border: 0; background: none; padding: 0; flex: none; }
  .mobile-brand img { width: 35px; height: 35px; }
  .topbar { min-height: 60px; }
  .topbar-inner, .content { padding-inline: 14px; }
  .topbar-inner { gap: 8px; }
  .top-actions { gap: 6px; }
  .top-actions .btn.primary { display: none; }
  .top-actions .icon-btn { width: 35px; height: 35px; min-height: 35px; }
  .top-search { min-height: 36px; padding: 6px 8px; }
  .top-search input { font-size: 16px; }
  .content { padding-top: 14px; padding-bottom: 81px; }
  .mobile-nav { position: fixed; display: flex; align-items: stretch; justify-content: space-around; inset: auto 0 0; padding: 5px 4px max(5px, env(safe-area-inset-bottom)); z-index: 5; background: #131d22f2; border-top: 1px solid var(--border-strong); backdrop-filter: blur(22px); }
  .mobile-nav .nav-button { display: grid; justify-items: center; gap: 2px; font-size: 11px; text-align: center; width: auto; flex: 1 1 0; padding: 5px 2px; position: relative; }
  .mobile-nav .bubble { position: absolute; top: 0; right: 12%; line-height: 16px; }
  .toast { bottom: 66px; }
  .hero { min-height: 16.75rem; border-radius: 16px; padding: 8px 18px; }
  .hero-copy { padding-block: 17px; }
  .hero-copy::before { margin-bottom: .8rem; }
  .hero h1 { font-size: clamp(2.125rem, 5.8vw, 2.95rem); }
  .hero p { max-width: 30ch; margin: 12px 0 16px; }
  .hero-stage img { max-height: 15rem; }
  .catalog { margin-top: 22px; }
  .toolbar { flex-wrap: wrap; gap: 8px; }
  .toolbar .filters { flex: 1 0 100%; }
  .filters { gap: 5px; }
  .chip { padding-inline: 8px; }
  .card-body { padding: 9px 8px 8px; }
  .card-meta, .card-game { font-size: 11px; }
  .card-foot { align-items: flex-start; flex-wrap: wrap; }
  .card-title { font-size: 16px; }
  .messages { grid-template-columns: 1fr; }
  .message-list { border-right: 0; border-bottom: 1px solid var(--border); }
  .chat { min-height: 360px; padding: 11px; }
  .field input, .field select, .field textarea, .chat-composer input { font-size: 16px; }
}
@media (orientation: landscape) and (max-height: 600px) and (max-width: 1024px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 540px) and (orientation: portrait) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
    padding: 21px 18px 8px;
    background:
      radial-gradient(ellipse at 57% 80%, #62341f 0%, #36241e 32%, transparent 70%),
      linear-gradient(140deg, #202c34, #131a1f 55%);
  }
  .hero-copy { padding-block: 0; }
  .hero h1 { font-size: clamp(2.25rem, 10vw, 2.95rem); }
  .hero-actions { gap: 7px; }
  .hero-actions .btn { gap: 5px; padding-inline: 8px; font-size: .8125rem; }
  .hero-actions .btn svg { width: 16px; height: 16px; }
  .hero-stage img { width: min(100%, 16rem); max-height: none; }
  .hero-stage::before { inset: -13% -14% -5%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
@media (max-width: 420px) {
  .topbar-inner { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 7px 8px; padding-block: 8px; }
  .top-search { max-width: none; }
  .top-actions { grid-column: 1 / -1; justify-self: end; }
  .rarity-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .photo-previews { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .trade-match-pair { grid-template-columns: 1fr; }
}
