:root {
  color-scheme: dark;
  --bg: #111214;
  --surface: #17181b;
  --surface-2: #1d1f23;
  --surface-3: #23252a;
  --line: #2c2f34;
  --line-strong: #464b53;
  --text: #e7e8ea;
  --muted: #858a93;
  --muted-2: #626770;
  --success: #7eaa69;
  --danger: #ca6b6b;
  --gold: #c6a252;
  --radius: 5px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); font-size: 12px; line-height: 1.45; text-transform: lowercase; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; text-transform: lowercase; }
button { color: inherit; }
img { display: block; max-width: 100%; }
.skin-name, .case-name, .normal-case, .google-signin { text-transform: none !important; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 10px; }
.layer-open { overflow: hidden; }

h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: 20px; line-height: 1.2; font-weight: 600; letter-spacing: -.02em; }
h2 { margin-bottom: 0; font-size: 15px; line-height: 1.25; font-weight: 600; }
h3 { margin-bottom: 0; font-size: 12px; font-weight: 600; }

button, .button, input, select { min-height: 34px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); color: var(--text); }
button { cursor: pointer; }
button:hover:not(:disabled), .button:hover:not(:disabled) { border-color: var(--line-strong); background: var(--surface-3); }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 1px solid #b7bac0; outline-offset: 2px; }
button:disabled { cursor: not-allowed; opacity: .42; }
input, select { padding: 7px 9px; outline: 0; }
input::placeholder { color: var(--muted-2); }
.button { display: inline-flex; align-items: center; justify-content: center; padding: 7px 12px; white-space: nowrap; }
.button.primary { border-color: #c8cbd0; background: #d6d8dc; color: #151619; }
.button.primary:hover:not(:disabled) { border-color: #fff; background: #eef0f2; }
.button.danger { border-color: #684142; color: #e19a9a; }
.text-button { min-height: auto; padding: 0; border: 0; background: transparent; color: var(--muted); }
.text-button:hover:not(:disabled) { border: 0; background: transparent; color: var(--text); }

.loading-overlay { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; background: var(--bg); transition: opacity .18s linear, visibility .18s linear; }
.loading-overlay.hidden-loader { visibility: hidden; opacity: 0; pointer-events: none; }
.loading-center { width: min(360px, calc(100vw - 40px)); }
.loading-brand { margin-bottom: 18px; color: var(--muted-2); font-size: 9px; letter-spacing: .13em; }
.loading-title { display: flex; align-items: center; gap: 5px; font-size: 13px; }
.loading-dots { display: inline-flex; gap: 3px; }
.loading-dots i { width: 2px; height: 2px; background: var(--text); opacity: .2; animation: loading-dot 1.2s infinite; }
.loading-dots i:nth-child(2) { animation-delay: .2s; }
.loading-dots i:nth-child(3) { animation-delay: .4s; }
.loading-feed { min-height: 86px; margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line); color: var(--muted-2); font: 9px/1.7 ui-monospace, SFMono-Regular, Consolas, monospace; }
.loading-feed-line.latest { color: var(--muted); }
@keyframes loading-dot { 0%, 70%, 100% { opacity: .2; } 35% { opacity: 1; } }

.toast { position: fixed; z-index: 400; right: 16px; bottom: 16px; max-width: min(360px, calc(100vw - 32px)); padding: 9px 11px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface-2); color: var(--text); font-size: 10px; visibility: hidden; opacity: 0; }
.toast.show { visibility: visible; opacity: 1; }
.toast.error { border-color: #6f4445; color: #e6a0a0; }

.center-stage { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-card { width: min(340px, 100%); text-align: center; }
.auth-card h1 { margin-bottom: 8px; font-size: 18px; }
.auth-card p { margin: 0 auto 20px; color: var(--muted); font-size: 11px; line-height: 1.55; }
.google-signin { width: 100%; min-height: 42px; display: flex; align-items: center; justify-content: center; gap: 10px; border-color: #8e918f; border-radius: 4px; background: #131314; color: #e3e3e3; font-size: 13px; font-weight: 500; }
.google-signin:hover:not(:disabled) { border-color: #aeb1af; background: #1c1c1d; }
.google-signin img { width: 18px; height: 18px; object-fit: contain; }
.username-form { display: grid; grid-template-columns: 1fr auto; gap: 7px; }
.input-note, .signed-in-email { margin-top: 8px; color: var(--muted-2); font-size: 9px; }

.nav-dock { position: fixed; inset: 0 auto 0 0; z-index: 50; width: 154px; display: flex; flex-direction: column; border-right: 1px solid var(--line); background: var(--bg); }
.nav-title { height: 48px; display: flex; align-items: center; padding: 0 14px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 9px; letter-spacing: .08em; }
.side-nav { display: flex; flex: 1; flex-direction: column; gap: 2px; padding: 10px 8px; }
.side-nav-item { width: 100%; min-height: 31px; display: flex; align-items: center; justify-content: space-between; padding: 0 7px; border-color: transparent; background: transparent; color: var(--muted); font-size: 10px; text-align: left; }
.side-nav-item:hover:not(:disabled) { border-color: transparent; background: var(--surface); color: var(--text); }
.side-nav-item.active { border-color: var(--line); background: var(--surface); color: var(--text); }
.nav-badge { min-width: 17px; min-height: 15px; padding: 1px 4px; border: 1px solid var(--line-strong); border-radius: 3px; color: var(--text); font-size: 8px; text-align: center; }
.menu-account { width: calc(100% - 16px); min-height: 48px; display: grid; align-items: center; margin: 8px; padding: 7px; border-color: var(--line); background: var(--surface); text-align: left; }
.menu-account-copy, .profile-card-copy, .profile-inventory-item-copy { min-width: 0; display: flex; flex-direction: column; }
.menu-account-name { overflow: hidden; font-size: 10px; white-space: nowrap; text-overflow: ellipsis; }

.app-shell { min-height: 100vh; }
.in-app .app-shell { margin-left: 154px; }
.page-masthead { position: sticky; top: 0; z-index: 20; height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 24px; border-bottom: 1px solid var(--line); background: var(--bg); color: var(--muted); font-size: 9px; }
.page-view { display: none; width: min(1480px, 100%); margin: 0 auto; padding: 26px 24px 60px; }
.page-view.active { display: block; }
.page-head { min-height: 36px; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 16px; }
.title-line { display: flex; align-items: baseline; gap: 10px; }
.page-count, .page-subtitle { color: var(--muted); font-size: 9px; }
.page-head-actions { display: flex; align-items: center; gap: 14px; }
.value-box { display: flex; align-items: baseline; gap: 6px; }
.value-box span { color: var(--muted); font-size: 8px; }
.value-box strong { font-size: 12px; font-weight: 600; }
.toolbar, .profiles-search { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(150px, auto); gap: 7px; margin-bottom: 12px; }
.market-toolbar { grid-template-columns: minmax(220px, 1fr) minmax(150px, auto) auto; }
.empty { grid-column: 1 / -1; min-height: 80px; display: grid; place-items: center; padding: 20px; border: 1px dashed var(--line); color: var(--muted-2); font-size: 10px; text-align: center; }

.inventory-grid, .skin-market-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); gap: 7px; }
.item-card, .market-skin-card { --rarity: #b0c3d9; position: relative; min-width: 0; overflow: hidden; padding: 0; border-color: var(--line); background: var(--surface); text-align: left; }
.item-card::after, .market-skin-card::after, .content-card::after, .reward-card::after, .profile-inventory-item::after { content: ""; position: absolute; inset: auto 0 0; height: 2px; background: var(--rarity); }
.item-card:hover:not(:disabled), .market-skin-card:hover:not(:disabled) { border-color: var(--line-strong); background: var(--surface-2); }
.item-art, .market-skin-art { height: 126px; display: grid; place-items: center; padding: 10px; border-bottom: 1px solid var(--line); }
.item-art img, .market-skin-art img { width: 100%; height: 100%; object-fit: contain; }
.item-info, .market-skin-info { padding: 9px 9px 10px; }
.item-name, .market-skin-name { min-height: 32px; overflow: hidden; font-size: 10px; line-height: 1.35; }
.rarity-line, .market-skin-variant { margin-top: 5px; color: var(--muted); font-size: 8px; }
.item-meta, .market-skin-meta { display: flex; justify-content: space-between; gap: 8px; margin-top: 7px; color: var(--muted-2); font: 8px ui-monospace, SFMono-Regular, Consolas, monospace; }
.item-price, .market-skin-price { color: var(--text); font: 600 10px -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif; }
.market-skin-info .button { width: 100%; min-height: 29px; margin-top: 8px; font-size: 9px; }
.lock-tag { position: absolute; z-index: 2; top: 6px; right: 6px; padding: 2px 4px; border: 1px solid var(--line-strong); border-radius: 3px; background: var(--surface-2); color: var(--muted); font-size: 7px; }

.case-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 7px; }
.case-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.case-art { height: 150px; display: grid; place-items: center; padding: 16px; border-bottom: 1px solid var(--line); }
.case-art img { width: 100%; height: 100%; object-fit: contain; }
.case-info { padding: 10px; }
.case-title { min-height: 34px; font-size: 11px; }
.case-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 4px 0 9px; color: var(--muted); font-size: 8px; }
.case-price { color: var(--text); font-size: 10px; font-weight: 600; }
.case-info .button { width: 100%; }

.market-tabs, .filter-pills { display: flex; gap: 5px; margin-bottom: 12px; }
.market-tab, .filter-pill, .currency-option { min-height: 28px; padding: 4px 10px; background: transparent; color: var(--muted); font-size: 9px; }
.market-tab.active, .filter-pill.active, .currency-option.active { border-color: var(--line-strong); background: var(--surface-2); color: var(--text); }
.market-panel { display: none; }
.market-panel.active { display: block; }
.result-line { display: flex; justify-content: space-between; gap: 12px; margin: -3px 0 10px; color: var(--muted-2); font-size: 8px; }

.weekly-package { max-width: 1000px; }
.weekly-head, .weekly-actions { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; }
.weekly-head { justify-content: flex-end; }
.weekly-reset { color: var(--muted); font-size: 9px; }
.weekly-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.reward-card { --rarity: #b0c3d9; position: relative; overflow: hidden; padding: 0; background: var(--surface); text-align: left; }
.reward-card.selected { border-color: #c8cbd0; }
.reward-art { height: 150px; display: grid; place-items: center; padding: 12px; border-bottom: 1px solid var(--line); }
.reward-art img { width: 100%; height: 100%; object-fit: contain; }
.reward-info { padding: 9px; }
.reward-name { min-height: 34px; font-size: 10px; }
.reward-price { margin-top: 5px; color: var(--muted); font-size: 8px; }
.weekly-actions { justify-content: flex-end; margin-top: 9px; }
.weekly-done { padding: 14px; border: 1px solid var(--line); color: var(--muted); }

.profiles-search { grid-template-columns: minmax(180px, 420px) auto; }
.profiles-grid, .trades-list { display: grid; gap: 6px; }
.profile-card { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 18px; min-height: 58px; padding: 9px 11px; background: var(--surface); text-align: left; }
.profile-card-main { min-width: 0; display: flex; align-items: center; gap: 9px; }
.profile-card-name { font-size: 11px; }
.profile-card-joined, .profile-joined { color: var(--muted); font-size: 8px; }
.profile-card-stats { display: grid; grid-template-columns: repeat(3, minmax(62px, auto)); gap: 14px; }
.profile-card-stat { display: flex; flex-direction: column; align-items: flex-end; color: var(--muted); font-size: 8px; }
.profile-card-stat strong { color: var(--text); font-size: 10px; font-weight: 500; }

.trade-card { padding: 11px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); cursor: pointer; }
.trade-card:hover { border-color: var(--line-strong); }
.trade-card-head, .trade-card-preview, .preview-label { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.trade-card-title { font-size: 11px; }
.trade-card-subtitle { margin-top: 3px; color: var(--muted); font-size: 8px; }
.trade-state { padding: 2px 5px; border: 1px solid var(--line-strong); border-radius: 3px; color: var(--muted); font-size: 8px; }
.trade-state.completed { border-color: #445f3c; color: #8fb57d; }
.trade-state.declined, .trade-state.cancelled, .trade-state.expired { border-color: #5d3c3d; color: #bd7777; }
.trade-card-preview { display: grid; grid-template-columns: 1fr auto 1fr; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.preview-side { min-width: 0; }
.preview-label { color: var(--muted); font-size: 8px; }
.preview-images { display: flex; gap: 4px; margin-top: 5px; }
.preview-image, .preview-more { width: 40px; height: 40px; padding: 3px; border: 1px solid var(--line); border-bottom: 2px solid var(--rarity); background: var(--surface-2); object-fit: contain; }
.preview-more { display: grid; place-items: center; color: var(--muted); font-size: 8px; }
.trade-card-divider { width: 1px; align-self: stretch; background: var(--line); }

.settings-stack { display: grid; gap: 6px; max-width: 880px; }
.settings-card { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.settings-title { font-size: 10px; }
.settings-sub { margin-top: 3px; color: var(--muted); font-size: 8px; }
.currency-picker { display: flex; gap: 4px; }

.modal-backdrop { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 16px; background: rgba(0,0,0,.78); }
.window-head, .layer-topbar { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 9px 12px; border-bottom: 1px solid var(--line); background: var(--surface); }
.window-label { color: var(--muted); font-size: 8px; }
.window-title, .layer-title { margin-top: 2px; font-size: 12px; }
.window-close { min-height: 28px; padding: 4px 8px; border-color: transparent; background: transparent; color: var(--muted); font-size: 9px; }
.window-close:hover:not(:disabled) { border-color: var(--line); background: var(--surface-2); color: var(--text); }

.trade-window { width: min(1280px, 100%); max-height: calc(100vh - 32px); overflow: hidden; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--bg); }
.trade-composer-window { height: min(880px, calc(100vh - 32px)); display: flex; flex-direction: column; }
.trade-finder-stage { flex: 1; display: grid; place-items: center; padding: 30px; }
.trade-finder-form { width: min(360px, 100%); }
.trade-finder-form label { display: block; margin-bottom: 7px; color: var(--muted); font-size: 9px; }
.find-row { display: grid; grid-template-columns: 1fr auto; gap: 6px; }
.trade-workspace { min-height: 0; flex: 1; display: flex; flex-direction: column; }
.trade-columns { min-height: 0; flex: 1; display: grid; grid-template-columns: minmax(0,1fr) 1px minmax(0,1fr); }
.trade-divider { background: var(--line-strong); }
.trade-side { min-width: 0; min-height: 0; display: flex; flex-direction: column; padding: 14px; }
.trade-side-head { min-height: 48px; display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.trade-side-head h2 { font-size: 15px; }
.trade-username { margin-top: 3px; color: var(--muted); font-size: 8px; }
.trade-side-stats { display: flex; flex-direction: column; align-items: flex-end; color: var(--muted); font-size: 8px; }
.trade-side-stats strong { color: var(--text); font-size: 10px; font-weight: 500; }
.trade-search { width: 100%; min-height: 31px; margin-bottom: 7px; font-size: 9px; }
.trade-item-grid { min-height: 0; flex: 1; display: grid; grid-template-columns: repeat(5, minmax(72px, 1fr)); align-content: start; gap: 5px; overflow: auto; padding-right: 3px; }
.trade-item { --rarity: #b0c3d9; position: relative; min-width: 0; aspect-ratio: .92; overflow: hidden; padding: 4px; border: 1px solid var(--line); border-bottom: 2px solid var(--rarity); border-radius: 3px; background: var(--surface); text-align: left; }
.trade-item:hover:not(:disabled) { border-color: var(--line-strong); border-bottom-color: var(--rarity); background: var(--surface-2); }
.trade-item.selected { border-color: #d1d3d6; border-bottom-color: var(--rarity); background: var(--surface-2); }
.trade-item.selected::before { content: "selected"; position: absolute; z-index: 2; top: 3px; right: 3px; padding: 1px 3px; border: 1px solid var(--line-strong); border-radius: 2px; background: var(--bg); color: var(--text); font-size: 6px; }
.trade-item.locked { opacity: .38; }
.trade-item img { width: 100%; height: 64%; object-fit: contain; }
.trade-item-name { display: block; overflow: hidden; color: var(--muted); font-size: 7px; line-height: 1.2; white-space: nowrap; text-overflow: ellipsis; }
.trade-item-price { display: block; margin-top: 3px; font-size: 8px; }
.trade-footer { min-height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 14px; border-top: 1px solid var(--line); background: var(--surface); }
.trade-summary { font-size: 10px; }
.trade-difference { margin-top: 3px; color: var(--muted); font-size: 8px; }

.trade-review-window { width: min(1040px, 100%); }
.trade-review-content { max-height: calc(100vh - 96px); overflow: auto; padding: 12px; }
.trade-review-summary { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.trade-review-person { font-size: 11px; }
.trade-review-meta { margin-top: 3px; color: var(--muted); font-size: 8px; }
.trade-review-columns { display: grid; grid-template-columns: minmax(0,1fr) 1px minmax(0,1fr); margin-top: 12px; }
.trade-review-divider { background: var(--line-strong); }
.trade-review-side { min-width: 0; padding: 0 12px; }
.trade-review-side:first-child { padding-left: 0; }
.trade-review-side:last-child { padding-right: 0; }
.trade-review-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 7px; color: var(--muted); font-size: 9px; }
.trade-review-items { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; min-height: 170px; align-content: start; }
.trade-review-item { --rarity: #b0c3d9; min-width: 0; overflow: hidden; padding: 5px; border: 1px solid var(--line); border-bottom: 2px solid var(--rarity); background: var(--surface); text-align: left; }
.trade-review-item img { width: 100%; height: 72px; object-fit: contain; }
.trade-review-item-name { display: block; min-height: 26px; overflow: hidden; font-size: 7px; line-height: 1.25; }
.trade-review-item-meta { display: block; margin-top: 3px; color: var(--muted); font-size: 7px; }
.trade-review-actions { display: flex; justify-content: flex-end; gap: 6px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }

.profile-window { width: min(1080px, 100%); max-height: calc(100vh - 32px); overflow: hidden; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--bg); }
.profile-modal-content { max-height: calc(100vh - 82px); overflow: auto; padding: 14px; }
.profile-hero { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.profile-identity { display: flex; align-items: center; gap: 10px; }
.profile-name { font-size: 14px; }
.profile-stat-grid { display: grid; grid-template-columns: repeat(7, minmax(90px,1fr)); gap: 1px; margin-top: 12px; background: var(--line); }
.profile-stat { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding: 8px; background: var(--surface); }
.profile-stat span { color: var(--muted); font-size: 7px; }
.profile-stat strong { overflow: hidden; font-size: 9px; font-weight: 500; text-overflow: ellipsis; }
.profile-inventory-section { margin-top: 14px; }
.profile-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 7px; }
.profile-section-head span { color: var(--muted); font-size: 8px; }
.profile-inventory-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px,1fr)); gap: 5px; }
.profile-inventory-item { --rarity: #b0c3d9; position: relative; display: grid; grid-template-columns: 48px minmax(0,1fr); align-items: center; gap: 7px; min-width: 0; padding: 6px; background: var(--surface); text-align: left; }
.profile-inventory-item img { width: 48px; height: 48px; object-fit: contain; }
.profile-inventory-item-name { overflow: hidden; font-size: 8px; white-space: nowrap; text-overflow: ellipsis; }
.profile-inventory-item-price { color: var(--muted); font-size: 7px; }

.fullscreen-layer { position: fixed; inset: 0; z-index: 140; overflow: auto; background: var(--bg); }
.layer-topbar { position: sticky; top: 0; z-index: 3; }
.layer-content { width: min(1180px, 100%); margin: 0 auto; padding: 28px 24px 60px; }
.item-detail-layout, .case-detail, .reveal-card { display: grid; grid-template-columns: minmax(300px, 1fr) minmax(280px, .75fr); gap: 28px; }
.item-detail-art, .detail-art, .reveal-art { --rarity: #b0c3d9; min-height: 420px; display: grid; place-items: center; padding: 24px; border: 1px solid var(--line); border-bottom: 2px solid var(--rarity); background: var(--surface); }
.item-detail-art img, .detail-art img, .reveal-art img { width: 100%; height: 100%; max-height: 460px; object-fit: contain; }
.item-detail-panel, .detail-copy, .reveal-info { align-self: center; }
.detail-rarity { padding-left: 7px; border-left: 2px solid var(--rarity); color: var(--muted); font-size: 8px; }
.item-detail-name, .reveal-name { margin: 9px 0 5px; font-size: 18px; font-weight: 600; }
.detail-price { margin: 5px 0 12px; font-size: 17px; font-weight: 600; }
.detail-note { margin-top: 8px; color: var(--muted); font-size: 8px; line-height: 1.5; }
.stats-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1px; background: var(--line); }
.stat { min-width: 0; padding: 8px; background: var(--surface); }
.stat-label { color: var(--muted); font-size: 7px; }
.stat-value { margin-top: 2px; overflow: hidden; font: 9px ui-monospace, SFMono-Regular, Consolas, monospace; text-overflow: ellipsis; }
.detail-actions, .opening-result-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.case-odds { margin: 12px 0; border-top: 1px solid var(--line); }
.odd-row { display: grid; grid-template-columns: 7px 1fr auto; align-items: center; gap: 7px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 8px; }
.odd-color { width: 5px; height: 5px; }
.contents-section { margin-top: 22px; }
.contents-title { margin-bottom: 8px; font-size: 10px; }
.contents-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px,1fr)); gap: 5px; }
.content-card { --rarity: #b0c3d9; position: relative; min-width: 0; padding: 7px 7px 9px; border: 1px solid var(--line); background: var(--surface); font-size: 8px; }
.content-card img { width: 100%; height: 100px; object-fit: contain; }
.content-card .muted { margin-top: 3px; font-size: 7px; }

.opening-layer { position: fixed; inset: 0; z-index: 180; display: grid; align-content: center; overflow: hidden; background: var(--bg); }
.opening-head { display: flex; justify-content: space-between; padding: 0 20px 12px; }
.opening-reel-window { position: relative; height: 180px; overflow: hidden; border-block: 1px solid var(--line); background: var(--surface); }
.opening-marker { position: absolute; z-index: 2; top: 0; bottom: 0; left: 50%; width: 1px; background: #e2e3e5; }
.opening-reel { height: 100%; display: flex; align-items: center; gap: 6px; padding-left: 10px; will-change: transform; }
.reel-item { --rarity: #b0c3d9; flex: 0 0 132px; height: 145px; overflow: hidden; padding: 7px; border: 1px solid var(--line); border-bottom: 2px solid var(--rarity); background: var(--bg); }
.reel-item img { width: 100%; height: 105px; object-fit: contain; }
.reel-item-name { overflow: hidden; font-size: 7px; white-space: nowrap; text-overflow: ellipsis; }
.opening-result { position: absolute; inset: 0; z-index: 4; display: grid; place-items: center; padding: 20px; background: var(--bg); }
.opening-result-card { --rarity: #b0c3d9; width: min(430px, 100%); padding: 16px; border: 1px solid var(--line); border-bottom: 2px solid var(--rarity); background: var(--surface); text-align: center; }
.opening-result-card img { width: 100%; height: 250px; object-fit: contain; }
.opening-result-meta { margin-top: 6px; color: var(--muted); font-size: 8px; }
.opening-result-actions { justify-content: center; }

.reveal-content { width: min(1100px, 100%); margin: 0 auto; padding: 26px 24px 100px; }
.reveal-counter { margin-bottom: 8px; color: var(--muted); font-size: 8px; }
.reveal-nav { position: fixed; z-index: 4; right: 0; bottom: 0; left: 0; min-height: 70px; display: flex; align-items: center; justify-content: center; gap: 5px; padding: 8px; border-top: 1px solid var(--line); background: var(--bg); }
.reveal-thumb { --rarity: #b0c3d9; width: 50px; height: 50px; padding: 3px; border-bottom: 2px solid var(--rarity); background: var(--surface); }
.reveal-thumb.active { border-color: #d1d3d6; border-bottom-color: var(--rarity); }
.reveal-thumb img { width: 100%; height: 100%; object-fit: contain; }
.reveal-arrow { min-height: 28px; padding: 3px 8px; font-size: 8px; }

@media (max-width: 1100px) {
  .trade-item-grid { grid-template-columns: repeat(4, minmax(68px,1fr)); }
  .profile-stat-grid { grid-template-columns: repeat(4, minmax(90px,1fr)); }
}

@media (max-width: 900px) {
  .nav-dock { inset: 0 0 auto; width: 100%; height: 44px; flex-direction: row; border-right: 0; border-bottom: 1px solid var(--line); }
  .nav-title, .menu-account { display: none !important; }
  .side-nav { min-width: 0; flex: 1; flex-direction: row; gap: 1px; overflow-x: auto; padding: 5px 7px; }
  .side-nav-item { width: auto; flex: 0 0 auto; min-height: 32px; padding: 0 8px; }
  .in-app .app-shell { margin-left: 0; padding-top: 44px; }
  .page-masthead { top: 44px; }
  .weekly-grid { grid-template-columns: repeat(2,1fr); }
  .item-detail-layout, .case-detail, .reveal-card { grid-template-columns: 1fr; }
  .item-detail-art, .detail-art, .reveal-art { min-height: 300px; }
}

@media (max-width: 700px) {
  .modal-backdrop { padding: 0; }
  .trade-window, .profile-window { width: 100%; height: 100vh; max-height: 100vh; border: 0; border-radius: 0; }
  .trade-columns { display: block; overflow: auto; }
  .trade-divider { width: auto; height: 1px; }
  .trade-side { min-height: 420px; }
  .trade-footer { flex: 0 0 auto; }
  .trade-review-columns { display: block; }
  .trade-review-divider { height: 1px; margin: 12px 0; }
  .trade-review-side { padding: 0; }
  .trade-review-items { grid-template-columns: repeat(3,1fr); min-height: 100px; }
  .profile-card { grid-template-columns: 1fr; }
  .profile-card-stats { grid-template-columns: repeat(3,1fr); }
  .profile-card-stat { align-items: flex-start; }
  .profile-stat-grid { grid-template-columns: repeat(2,1fr); }
}

@media (max-width: 560px) {
  body { font-size: 11px; }
  .page-masthead { padding: 0 14px; }
  .page-view { padding: 20px 14px 50px; }
  .page-head { align-items: flex-start; }
  .toolbar, .market-toolbar { grid-template-columns: 1fr; }
  .inventory-grid, .skin-market-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .case-grid { grid-template-columns: 1fr; }
  .item-art, .market-skin-art { height: 112px; }
  .weekly-grid { grid-template-columns: 1fr; }
  .settings-card { align-items: flex-start; flex-direction: column; }
  .trade-side { min-height: 380px; padding: 10px; }
  .trade-item-grid { grid-template-columns: repeat(3, minmax(70px,1fr)); }
  .trade-footer { align-items: stretch; flex-direction: column; }
  .trade-footer .button { width: 100%; }
  .layer-content, .reveal-content { padding: 18px 14px 90px; }
  .item-detail-art, .detail-art, .reveal-art { min-height: 240px; }
  .stats-grid { grid-template-columns: 1fr; }
  .trade-card-preview { grid-template-columns: 1fr; }
  .trade-card-divider { width: auto; height: 1px; }
}
