:root {
  --ink: #201b15;
  --muted: #7a7061;
  --paper: #ece5d6;
  --surface: #fbf8f0;
  --line: #ddd3bf;
  --accent: #e0a027;
  --accent-dark: #b87c17;
  --green: #2c7a4d;
  --yellow: #eaba3a;
  --dark: #17130e;

  --font-display: 'Oswald', 'Arial Narrow', sans-serif;
  --font-body: 'Inter', Arial, Helvetica, sans-serif;
  --font-mono: 'JetBrains Mono', 'Consolas', monospace;

  --radius-s: 3px;
  --radius-m: 6px;
  --shadow-card: 0 1px 2px rgba(23,19,13,.06);
  --shadow-lift: 0 14px 32px rgba(23,19,13,.16);
  --shadow-deep: 0 24px 70px rgba(10,8,5,.4);
}

/* Community, private messages and vehicle registration. */
.cash-compact { display: none !important; }
#garage-view .workspace-switcher { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.car-plate { position: absolute; z-index: 5; left: 50%; bottom: 9px; transform: translateX(-50%); min-width: 92px; height: 24px; display: grid; grid-template-columns: minmax(0, 1fr) 27px; overflow: hidden; border: 2px solid #111; border-radius: 3px; background: #fff; color: #111; font-family: var(--font-mono); font-weight: 900; white-space: nowrap; box-shadow: 0 1px 4px rgba(0,0,0,.3); }
.car-plate > strong { display: grid; place-items: center; padding: 0 4px; font-size: 9px; }
.car-plate > span { display: grid; grid-template-rows: 1fr auto; place-items: center; border-left: 2px solid #111; line-height: 1; }
.car-plate em { font-size: 6px; font-style: normal; }
.car-plate small { display: flex; align-items: center; gap: 1px; font-size: 4px; line-height: 1; }
.car-plate .russian-flag { width: 10px; height: 4px; display: grid; overflow: hidden; border: 0; }
.plate-dashboard { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 1px; margin-bottom: 14px; border: 1px solid var(--line); background: var(--line); }
.plate-dashboard > div { padding: 14px; background: var(--surface); }
.plate-dashboard span, .plate-dashboard strong { display: block; }
.plate-dashboard span { color: var(--muted); font-size: 9px; text-transform: uppercase; }
.plate-dashboard strong { margin-top: 4px; font-size: 22px; }
.plate-dashboard > button { min-height: 100%; border-radius: 0; }
.registration-panel, .plate-section { margin-bottom: 16px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--surface); }
.registration-list { display: grid; gap: 8px; margin-top: 14px; }
.registration-car { display: grid; grid-template-columns: 170px minmax(180px, 1fr) minmax(260px, auto); align-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-s); }
.registration-car .car-art { width: 100%; min-width: 0; height: 108px; aspect-ratio: auto; }
.registration-car > div:not(.car-art) { min-width: 0; display: grid; gap: 5px; padding: 12px; overflow-wrap: anywhere; }
.registration-car small { color: var(--muted); font-size: 9px; }
.registration-status { width: max-content; padding: 3px 6px; border-radius: 3px; background: #f3e7e1; color: var(--danger); font-size: 9px; font-weight: 800; }
.registration-status.registered { background: #e6efe5; color: var(--green); }
.registration-actions { grid-template-columns: minmax(150px, 1fr) auto; }
.registration-actions select { min-width: 0; height: 40px; border: 1px solid var(--line); background: white; }
.plate-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin-top: 14px; }
.plate-card { display: grid; gap: 10px; align-content: start; padding: 13px; border: 1px solid var(--line); border-left: 4px solid #8b9198; border-radius: var(--radius-s); background: #fff; }
.plate-card.rarity-rare { border-left-color: #397a82; }
.plate-card.rarity-premium { border-left-color: #b47b18; }
.plate-card.rarity-legendary { border-left-color: #9d4038; background: #fffaf0; }
.license-plate { width: min(270px, 100%); min-height: 56px; display: grid; grid-template-columns: minmax(0, 1fr) 64px; align-items: stretch; overflow: hidden; border: 3px solid #111; border-radius: 7px; background: #fff; color: #0b0b0b; box-shadow: inset 0 0 0 1px #8d8d8d, 0 2px 5px rgba(0,0,0,.12); }
.license-plate strong { display: grid; place-items: center; padding: 7px 8px; font-family: var(--font-mono); font-size: 25px; line-height: 1; text-align: center; white-space: nowrap; }
.license-plate > .plate-region { align-self: stretch; display: grid; grid-template-rows: 1fr auto; place-items: center; gap: 2px; padding: 4px 3px 3px; border-left: 3px solid #111; font-family: var(--font-mono); font-weight: 900; line-height: 1; text-align: center; }
.plate-region > em { font-size: 15px; font-style: normal; line-height: 1; }
.plate-region > span { display: flex; align-items: center; justify-content: center; gap: 3px; }
.plate-region .russian-flag { width: 22px; height: 9px; display: grid; overflow: hidden; border: 1px solid #888; }
.russian-flag b { display: block; }
.russian-flag b:nth-child(1) { background: #fff; }
.russian-flag b:nth-child(2) { background: #0c47a1; }
.russian-flag b:nth-child(3) { background: #d52b1e; }
.plate-region small { font-size: 7px; font-style: normal; line-height: 1; }
.plate-meta strong, .plate-meta small, .plate-offer strong, .plate-offer small { display: block; }
.plate-meta small, .plate-offer small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.plate-list-action, .plate-offer { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; margin-top: auto; }
.plate-list-action input { min-width: 0; height: 40px; border: 1px solid var(--line); padding: 0 8px; }
.plate-offer strong, .plate-offer small { grid-column: 1 / -1; }
.plate-offer button { grid-column: 1 / -1; }
.plate-filters { display: grid; grid-template-columns: 1fr 220px; gap: 8px; margin-top: 14px; }
.plate-filters input, .plate-filters select { min-width: 0; height: 42px; border: 1px solid var(--line); padding: 0 10px; background: #fff; }
.plate-empty { grid-column: 1 / -1; padding: 28px 14px; border: 1px dashed var(--line); color: var(--muted); font-size: 11px; text-align: center; }
.chat-switcher { max-width: 680px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.direct-shell { display: grid; grid-template-columns: 300px minmax(0, 1fr); height: min(68vh, 720px); min-height: 520px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--surface); }
.direct-sidebar { min-width: 0; overflow: hidden; border-right: 1px solid var(--line); }
.direct-sidebar-head { min-height: 66px; display: grid; align-content: center; gap: 3px; padding: 10px 12px; }
.direct-sidebar-head strong, .direct-sidebar-head span { display: block; }
.direct-sidebar-head strong { font-size: 12px; }
.direct-sidebar-head span { color: var(--muted); font-size: 9px; }
.direct-users { height: calc(100% - 66px); overflow-y: auto; border-top: 1px solid var(--line); }
.direct-empty { padding: 20px 12px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.direct-user { width: 100%; min-height: 62px; display: grid; gap: 4px; border: 0; border-bottom: 1px solid var(--line); padding: 10px 12px; background: transparent; color: var(--ink); text-align: left; cursor: pointer; }
.direct-user:hover, .direct-user.active { background: #f2ead4; }
.direct-user span { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; font-weight: 800; }
.direct-user b { min-width: 18px; height: 18px; display: grid; place-items: center; border-radius: 9px; background: var(--danger); color: #fff; font-size: 9px; }
.direct-user small { overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.direct-conversation { min-width: 0; display: grid; grid-template-rows: auto 1fr auto; }
#direct-head { min-height: 62px; display: grid; align-content: center; gap: 3px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
#direct-head strong, #direct-head span { display: block; }
#direct-head span { color: var(--muted); font-size: 9px; }
.direct-profile-link { width: fit-content; border: 0; padding: 0; background: transparent; color: var(--ink); font-size: 13px; font-weight: 900; text-decoration: underline; text-decoration-color: #9db7e8; text-underline-offset: 3px; }
.direct-messages { height: auto; min-height: 0; }
.player-name-link { color: inherit; font-weight: 900; text-decoration: underline; text-decoration-color: #9db7e8; text-underline-offset: 2px; cursor: pointer; }
.player-name-link:hover, .player-name-link:focus-visible { color: var(--accent-dark); outline: none; text-decoration-color: currentColor; }
.include-plate-option { display: flex !important; align-items: start; gap: 10px; padding: 12px; border: 1px solid #9db7e8; border-radius: var(--radius-s); background: #eff6ff; cursor: pointer; }
.include-plate-option input { flex: 0 0 auto; width: 18px !important; height: 18px !important; margin: 2px 0 0; }
.include-plate-option span, .include-plate-option strong, .include-plate-option small { display: block; }
.include-plate-option small { margin-top: 4px; color: var(--muted); line-height: 1.4; }
.player-profile-panel { width: min(760px, calc(100% - 24px)); }
.public-profile-head { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 28px; border-bottom: 1px solid var(--line); }
.public-profile-avatar { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: white; font-family: var(--font-display); font-size: 25px; }
.public-profile-head h2 { margin: 0 0 4px; font-size: 28px; }
.public-profile-head > div > span { color: var(--muted); font-size: 11px; }
.public-profile-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); }
.public-profile-stats div { min-width: 0; padding: 14px; background: white; }
.public-profile-stats span, .public-profile-stats strong { display: block; }
.public-profile-stats span { color: var(--muted); font-size: 8px; text-transform: uppercase; }
.public-profile-stats strong { margin-top: 5px; overflow-wrap: anywhere; font-size: 15px; }
.public-profile-listings { display: grid; gap: 9px; padding: 22px 28px 28px; }
.public-profile-listings h3 { margin: 0 0 8px; }
.public-profile-listings > button { min-width: 0; display: grid; grid-template-columns: 120px minmax(0, 1fr); align-items: center; gap: 12px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-s); padding: 0; background: white; color: var(--ink); text-align: left; }
.public-profile-listings .car-art { width: 120px; height: 78px; min-height: 0; }
.public-profile-listings strong, .public-profile-listings small { display: block; }
.public-profile-listings small { margin-top: 4px; color: var(--muted); }
.direct-conversation { min-height: 0; overflow: hidden; }
#direct-messages { height: auto; min-height: 0; }

@media (max-width: 760px) {
  .wallet #cash { display: none; }
  .wallet .cash-compact { display: block !important; max-width: 116px; overflow: visible; font-size: 11px; text-overflow: clip; }
  .wallet span { display: block !important; color: var(--muted); font-size: 8px; }
  #garage-view .workspace-switcher button { padding-right: 5px; padding-left: 5px; font-size: 10px; }
  #garage-view .workspace-switcher button span { font-size: 7px; }
  .plate-dashboard { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .plate-dashboard > button { grid-column: 1 / -1; min-height: 48px; }
  .registration-panel, .plate-section { padding: 12px; }
  .registration-car { grid-template-columns: 105px minmax(0, 1fr); }
  .registration-car .car-art { height: 92px; }
  .registration-actions { grid-column: 1 / -1; grid-template-columns: 1fr; border-top: 1px solid var(--line); }
  .registration-actions button, .registration-actions select { width: 100%; min-height: 44px; }
  .plate-grid { grid-template-columns: 1fr; }
  .plate-filters { grid-template-columns: 1fr; }
  .direct-shell { grid-template-columns: 122px minmax(0, 1fr); height: calc(100dvh - 380px); min-height: 430px; }
  .direct-sidebar-head { min-height: 58px; padding: 8px; }
  .direct-sidebar-head span { display: none; }
  .direct-users { height: calc(100% - 58px); }
  .direct-user { min-height: 58px; padding: 8px; }
  .direct-user span { font-size: 10px; }
  .direct-user small { font-size: 8px; }
  #direct-head { min-height: 58px; padding: 8px 10px; }
  .direct-messages { padding: 10px; }
  .direct-conversation .chat-form { padding: 8px; }
  .public-profile-head { grid-template-columns: 52px minmax(0, 1fr); gap: 11px; padding: 20px 16px; }
  .public-profile-avatar { width: 52px; height: 52px; font-size: 21px; }
  .public-profile-head h2 { font-size: 22px; }
  .public-profile-head > button { grid-column: 1 / -1; width: 100%; min-height: 44px; }
  .public-profile-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .public-profile-listings { padding: 17px 16px 22px; }
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--paper); }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: var(--font-body); -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

h1, h2, h3, h4,
.join-brand, .logo, .profile-monogram, .empty-icon,
.container-visual b {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: .01em;
}

#cash, .wallet strong, .garage-value strong, .my-profit strong,
.market-dashboard strong, .parts-summary strong, .modal-price strong,
.exchange-price strong, .reward-stats strong, .leader-profit,
.contract-card > span, .car-price-row strong, .container-bid-state strong,
.auction-timer, .part-lot > span, .status-line strong,
.market-stat-row strong, .part-metrics strong, .offer-head span,
.badge, .place, .property-income-panel strong, #property-income-value {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.01em;
}

.join-screen { min-height: 100vh; display: grid; grid-template-columns: minmax(360px, 1.1fr) minmax(440px, .9fr); background: var(--dark); }
.join-visual { position: relative; min-height: 660px; overflow: hidden; }
.join-visual::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 65%, var(--dark)); }
.join-visual img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
.join-brand { position: absolute; z-index: 1; top: 34px; left: 42px; color: white; font-size: 28px; font-weight: 900; letter-spacing: 0; }
.join-brand span, .logo span { color: var(--accent); }
.join-panel { align-self: center; padding: 70px clamp(36px, 7vw, 110px) 70px 50px; color: #f8f4e9; }
.eyebrow { margin: 0 0 11px; text-transform: uppercase; font-size: 11px; line-height: 1.4; font-weight: 800; color: var(--accent); }
.join-panel h1 { margin: 0; max-width: 620px; font-size: clamp(46px, 5.3vw, 82px); line-height: .94; letter-spacing: 0; text-transform: uppercase; }
.join-copy { max-width: 560px; margin: 27px 0 36px; color: #c1baaf; font-size: 17px; line-height: 1.55; }
.join-panel label { display: block; margin-bottom: 9px; color: #dbd6cf; font-size: 12px; font-weight: 700; }
.auth-fields { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.auth-switch { display: flex; gap: 4px; margin-bottom: 18px; padding-bottom: 5px; border-bottom: 1px solid #504a40; }
.auth-switch-button { border: 0; border-bottom: 2px solid transparent; padding: 7px 0; margin-right: 18px; background: transparent; color: #938878; font-size: 12px; font-weight: 800; }
.auth-switch-button.active { border-bottom-color: var(--accent); color: white; }
.forgot-link { border: 0; margin-top: 12px; padding: 0; background: transparent; color: #c9bda9; font-size: 11px; text-decoration: underline; text-underline-offset: 3px; }
.forgot-link:hover { color: white; }
.recovery-form { max-width: 520px; }
.recovery-form label { display: block; color: #dbd6cf; font-size: 12px; font-weight: 700; }
.recovery-form input { display: block; width: 100%; height: 54px; margin-top: 9px; border: 1px solid #504a40; background: #292520; color: white; padding: 0 16px; outline: none; }
.recovery-form > button[type="submit"] { width: 100%; height: 54px; margin-top: 16px; border: 0; background: var(--accent); color: white; font-weight: 800; }
.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--dark); }
.auth-card { width: min(520px, 100%); padding: 42px; background: #211e1a; color: #f8f4e9; border-top: 4px solid var(--accent); box-shadow: 0 24px 70px rgba(0,0,0,.32); }
.auth-card h1 { margin: 0; font-family: var(--font-display); font-size: clamp(36px, 7vw, 58px); line-height: .98; text-transform: uppercase; }
.auth-lead { color: #b7ac98; line-height: 1.5; }
.reset-form label { display: block; margin-top: 18px; color: #dbd6cf; font-size: 12px; font-weight: 700; }
.reset-form input { display: block; width: 100%; height: 54px; margin-top: 8px; border: 1px solid #504a40; background: #292520; color: white; padding: 0 16px; outline: none; }
.reset-form > button { width: 100%; height: 54px; margin-top: 20px; border: 0; background: var(--accent); color: #201b15; font-weight: 800; }
.password-rule { color: #938878; font-size: 11px; line-height: 1.45; }
.form-success { color: #8ed39a; font-size: 12px; }
.supporter-benefits { margin-top: 10px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.supporter-benefits strong, .supporter-benefits span { display: block; }
.supporter-benefits strong { color: var(--accent-dark); font-size: 11px; }
.profile-badge, .admin-badge { display: inline-block; margin-left: 5px; padding: 3px 6px; border-radius: 999px; background: #26231f; color: #f3c76d; font-size: 8px; font-style: normal; font-weight: 900; letter-spacing: .02em; text-transform: uppercase; vertical-align: middle; }
.admin-badge { background: #9b3e32; color: white; }
@media (max-width: 560px) { .auth-page { padding: 0; align-items: start; } .auth-card { min-height: 100vh; padding: 30px 22px 42px; } }
.auth-fields label { margin: 0; }
.auth-fields input { display: block; width: 100%; height: 54px; margin-top: 9px; border: 1px solid #504a40; background: #292520; color: white; padding: 0 16px; outline: none; }
.auth-fields input:focus { border-color: var(--accent); }
.auth-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }
.auth-actions button, .empty-state button { height: 54px; padding: 0 20px; border: 0; background: var(--accent); color: white; font-weight: 800; }
.auth-actions button:hover, .empty-state button:hover { background: #f7ae39; }
.auth-actions .auth-secondary { border: 1px solid #61594d; background: transparent; }
.auth-actions .auth-secondary:hover { background: #36322b; }
.form-error { min-height: 18px; margin: 8px 0 0; color: #ff8678; font-size: 12px; }
.auth-hint { margin: 8px 0 0; color: #938878; font-size: 11px; }
.registration-only { display: block; }
.join-stats { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 42px; padding-top: 24px; border-top: 1px solid #3e3931; gap: 16px; }
.join-stats strong, .join-stats span { display: block; }
.join-stats strong { font-size: 14px; }
.join-stats span { margin-top: 5px; color: #938878; font-size: 11px; }
.public-links { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 22px; font-size: 11px; }
.public-links a { color: #c9bda9; text-decoration: underline; text-underline-offset: 3px; }

.game { min-height: 100vh; }
.topbar { position: sticky; z-index: 20; top: 0; height: 72px; display: grid; grid-template-columns: 170px 1fr auto auto auto; align-items: center; gap: 18px; padding: 0 max(24px, calc((100vw - 1400px) / 2)); border-bottom: 1px solid #37332c; background: var(--dark); color: white; }
.logo { color: white; text-decoration: none; font-weight: 900; font-size: 23px; }
.tabs { align-self: stretch; display: flex; }
.mobile-profile-tab, .section-menu-button { display: none; }
.tab { position: relative; border: 0; padding: 0 20px; background: transparent; color: #9e9486; font-size: 13px; font-weight: 700; }
.tab:hover { color: white; }
.tab.active { color: white; }
.tab.active::after { content: ""; position: absolute; height: 3px; left: 20px; right: 20px; bottom: 0; background: var(--accent); }
.mobile-filter-toggle { display: none; }
.badge { display: inline-grid; min-width: 21px; height: 21px; place-items: center; margin-left: 5px; padding: 0 5px; border-radius: 11px; background: #3b352d; color: #c9c3b9; font-size: 10px; }
.wallet { padding-right: 24px; border-right: 1px solid #403b33; text-align: right; }
.wallet span, .wallet strong { display: block; white-space: nowrap; }
.wallet span { color: #847a6b; font-size: 10px; text-transform: uppercase; }
.wallet strong { margin-top: 3px; font-size: 16px; }
.profile-button { display: flex; align-items: center; gap: 9px; border: 0; background: transparent; color: white; font-weight: 700; }
.profile-button, .profile-button > span:last-child { min-width: 0; }
.profile-button > span:last-child { max-width: 145px; }
.profile-button > span:first-child { width: 34px; height: 34px; display: grid; place-items: center; background: var(--accent); font-size: 13px; }
.profile-button b, .profile-button small { display: block; text-align: left; }
.profile-button b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-button small { margin-top: 2px; color: #938878; font-size: 9px; font-weight: 600; }
.notification-button { position: relative; width: 34px; height: 34px; border: 1px solid #4c453b; border-radius: 50%; background: transparent; color: #c0b9ae; font-size: 14px; font-weight: 900; }
.notification-button:hover { border-color: var(--accent); color: white; }
.notification-button span { position: absolute; top: -7px; right: -7px; min-width: 18px; height: 18px; display: grid; place-items: center; padding: 0 4px; border-radius: 9px; background: var(--accent); color: white; font-size: 9px; }
.chat-shortcut { position: relative; width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid #d9d0bd; border-radius: 50%; background: transparent; color: var(--muted); }
.chat-shortcut:hover { border-color: var(--accent); color: var(--accent-dark); }
.chat-shortcut > i { position: relative; width: 16px; height: 12px; display: block; border: 2px solid currentColor; border-radius: 2px; }
.chat-shortcut > i::after { content: ""; position: absolute; left: 2px; top: -1px; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); }
.chat-shortcut .badge { position: absolute; top: -7px; right: -7px; min-width: 18px; height: 18px; margin: 0; padding: 0 4px; border-radius: 9px; background: var(--danger); color: white; font-size: 9px; }
.utility-nav { position: sticky; z-index: 19; top: 72px; display: flex; justify-content: center; min-height: 48px; border-bottom: 1px solid var(--line); background: rgba(255,254,249,.97); }
.utility-nav button { min-width: 118px; border: 0; border-bottom: 3px solid transparent; padding: 7px 14px 6px; background: transparent; color: var(--muted); text-align: left; }
.utility-nav button:hover, .utility-nav button.active { border-bottom-color: var(--accent); color: var(--ink); background: #f4f1e9; }
.utility-nav span, .utility-nav small { display: block; }
.utility-nav span { font-size: 10px; font-weight: 900; text-transform: uppercase; }
.utility-nav small { margin-top: 3px; font-size: 8px; }
.utility-nav .badge { display: inline-grid; height: 16px; min-width: 16px; margin-left: 3px; font-size: 8px; }

.content { width: min(1400px, calc(100% - 48px)); margin: 0 auto; padding: 52px 0 80px; }
.view { display: none; }
.view.active-view { display: block; }
.section-heading { min-height: 72px; display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.section-heading h2 { margin: 0; font-size: clamp(31px, 4vw, 48px); line-height: 1; text-transform: uppercase; }
.market-pulse { display: flex; align-items: center; gap: 8px; padding-bottom: 5px; color: var(--muted); font-size: 12px; }
.market-pulse b { margin-left: 6px; color: var(--ink); font-size: 10px; font-variant-numeric: tabular-nums; }
.market-pulse i { width: 8px; height: 8px; border-radius: 50%; background: #39a666; box-shadow: 0 0 0 5px rgba(57,166,109,.13); }
.garage-value, .my-profit { text-align: right; }
.garage-value span, .garage-value strong, .my-profit span, .my-profit strong { display: block; }
.garage-value span, .my-profit span { color: var(--muted); font-size: 11px; text-transform: uppercase; }
.garage-value strong, .my-profit strong { margin-top: 5px; font-size: 22px; }
.market-dashboard { display: grid; grid-template-columns: repeat(4, 1fr); margin-bottom: 14px; border-top: 2px solid var(--ink); background: var(--line); gap: 1px; }
.market-dashboard > div { padding: 16px 18px; background: var(--surface); }
.market-dashboard span, .market-dashboard strong { display: block; }
.market-dashboard span { color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.market-dashboard strong { margin-top: 6px; font-size: 23px; }
.market-index { margin: 30px 0 0; border-top: 2px solid var(--ink); background: var(--surface); }
.market-index-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; padding: 18px 20px; cursor: pointer; list-style: none; }
.market-index-head::-webkit-details-marker { display: none; }
.market-index-head h3 { margin: 0; font-size: 21px; text-transform: uppercase; }
.market-index-head > span { color: var(--muted); font-size: 10px; }
.market-index-head > span::after { content: " +"; color: var(--ink); font-size: 15px; font-weight: 900; }
.market-index[open] .market-index-head > span::after { content: " −"; }
.market-stats-head, .market-stat-row { display: grid; grid-template-columns: minmax(150px, 1.2fr) repeat(3, minmax(130px, 1fr)); align-items: center; gap: 14px; min-height: 43px; padding: 0 20px; border-top: 1px solid var(--line); }
.market-stats-head { color: var(--muted); background: #ebe9e1; font-size: 9px; text-transform: uppercase; }
.market-stat-row { font-size: 11px; }
.market-stat-row strong { font-size: 12px; }
.market-stat-row small { display: block; margin-top: 2px; color: var(--muted); font-size: 9px; }
.market-trend { margin-left: 4px; color: var(--muted); font-size: 9px; }
.market-trend.up { color: var(--green); }
.market-trend.down { color: var(--accent-dark); }
.market-quick-filters { display: flex; gap: 6px; margin: 18px 0 8px; overflow-x: auto; }
.quick-filter { flex: 0 0 auto; min-height: 36px; padding: 0 13px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 10px; font-weight: 800; }
.quick-filter:hover, .quick-filter.active { border-color: var(--ink); background: var(--ink); color: white; }
.market-filters { display: grid; grid-template-columns: repeat(6, minmax(115px, 1fr)) auto auto; align-items: end; gap: 8px; margin-bottom: 18px; padding: 14px; border-top: 2px solid var(--ink); background: var(--surface); }
.market-filters .market-search { grid-column: span 2; }
.market-filters label { color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.market-filters input, .market-filters select { width: 100%; height: 40px; margin-top: 6px; border: 1px solid var(--line); background: white; padding: 0 10px; }
.market-filters button { min-height: 40px; }
.filter-result { grid-column: 1 / -1; color: var(--muted); font-size: 10px; }
.market-load-more { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 18px; border: 1px solid var(--line); border-top: 0; background: var(--surface); }
.market-load-more button { min-height: 40px; }
.market-load-more span { color: var(--muted); font-size: 10px; }
.empty-filter { grid-column: 1 / -1; padding: 55px 20px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--muted); text-align: center; }
.price-signal { display: inline-block; margin-top: 8px; padding: 4px 6px; background: #e8eee8; color: var(--green); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.price-signal.high { background: #f8efe0; color: var(--accent-dark); }
.price-signal.normal { background: #f5edd7; color: #8a6b15; }
.market-tag { display: inline-block; margin: 8px 0 0 5px; color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.offer-note { margin-top: 10px; color: var(--accent); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.auction-note { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--line); color: var(--accent-dark); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.auction-timer { font-variant-numeric: tabular-nums; }
.progress-strip { display: grid; grid-template-columns: 170px 1fr auto; align-items: center; gap: 20px; margin-bottom: 20px; padding: 15px 18px; background: var(--dark); color: white; }
.garage-management { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-bottom: 18px; background: var(--line); border-top: 2px solid var(--ink); }
.garage-management > div { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 5px 12px; padding: 14px; background: var(--surface); }
.garage-management span { color: var(--muted); font-size: 9px; text-transform: uppercase; }
.garage-management strong { grid-column: 1; font-size: 15px; }
.garage-management button { grid-column: 2; grid-row: 1 / 3; min-height: 38px; }
.training-strip { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: -8px 0 18px; padding: 14px 18px; border-left: 4px solid var(--yellow); background: #f6efd8; }
.training-strip strong, .training-strip span { display: block; }
.training-strip strong { font-size: 12px; text-transform: uppercase; }
.training-strip span { margin-top: 4px; color: var(--muted); font-size: 10px; }
.parts-market-panel, .group-panel, .npc-panel { margin: 18px 0; padding: 20px; border-top: 2px solid var(--ink); background: var(--surface); }
.parts-toolbar { display: grid; grid-template-columns: 1fr minmax(460px, 1.3fr); align-items: end; gap: 20px; margin-bottom: 16px; }
.parts-toolbar h3 { margin: 0; font-size: 21px; text-transform: uppercase; }
.parts-purchase { display: grid; grid-template-columns: 1fr auto; gap: 6px; }
.parts-purchase select { min-width: 0; height: 38px; border: 1px solid var(--line); background: white; padding: 0 8px; }
.parts-purchase button { min-height: 38px; }
.parts-market-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; }
.part-lot { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 10px; padding: 11px; border: 1px solid var(--line); }
.part-lot strong, .part-lot small { display: block; }
.part-lot strong { font-size: 11px; }
.part-component { display: inline-block; margin-bottom: 5px; padding: 3px 5px; background: #eceae2; color: var(--muted); font-size: 8px; font-weight: 900; text-transform: uppercase; }
.part-lot small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.part-lot > span { font-size: 12px; font-weight: 800; }
.parts-market-trends { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 12px; }
.parts-market-trends > span { padding: 7px 9px; background: #eceae2; color: var(--muted); font-size: 10px; }
.parts-market-trends b { color: var(--ink); margin-right: 3px; }
.parts-market-trends small { display: block; margin-top: 2px; font-size: 8px; }
.part-list-action { display: flex; gap: 5px; }
.part-list-action input { width: 105px; height: 36px; border: 1px solid var(--line); padding: 0 7px; }
.parts-market-heading { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.parts-summary { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 2px solid var(--ink); border-left: 1px solid var(--line); background: var(--surface); }
.parts-summary > div { min-width: 0; padding: 15px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.parts-summary span, .parts-summary strong, .parts-summary small { display: block; }
.parts-summary span { color: var(--muted); font-size: 9px; text-transform: uppercase; }
.parts-summary strong { margin-top: 7px; font-size: 22px; overflow-wrap: anywhere; }
.parts-summary small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.parts-mode-controls { display: grid; grid-template-columns: repeat(3, 1fr); margin: 18px 0; border: 1px solid var(--ink); background: var(--surface); }
.parts-mode-controls button { min-width: 0; min-height: 48px; border: 0; border-right: 1px solid var(--ink); background: transparent; color: var(--muted); font-size: 11px; font-weight: 900; }
.parts-mode-controls button:last-child { border-right: 0; }
.parts-mode-controls button.active { background: var(--ink); color: white; }
.parts-mode-controls span { display: inline-grid; min-width: 21px; height: 21px; place-items: center; margin-left: 6px; background: #ece9df; color: var(--ink); font-size: 9px; }
.parts-mode-controls button.active span { background: var(--yellow); }
.parts-hub-panel { padding: 20px; border-top: 2px solid var(--ink); background: var(--surface); }
.parts-hub-panel[hidden] { display: none; }
.parts-panel-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 16px; }
.parts-panel-heading h3 { margin: 0; font-size: 22px; text-transform: uppercase; }
.parts-panel-heading > span { color: var(--muted); font-size: 10px; }
.parts-needs-list { display: grid; gap: 9px; }
.parts-car-switcher { display: flex; gap: 7px; margin: -2px 0 14px; padding-bottom: 4px; overflow-x: auto; scrollbar-width: thin; }
.parts-car-switcher button { flex: 0 0 auto; min-width: 150px; min-height: 54px; padding: 9px 11px; border: 1px solid var(--line); background: white; text-align: left; }
.parts-car-switcher button.active { border-color: var(--ink); background: var(--ink); color: white; }
.parts-car-switcher strong, .parts-car-switcher span { display: block; }
.parts-car-switcher strong { font-size: 10px; }
.parts-car-switcher span { margin-top: 5px; color: var(--muted); font-size: 8px; }
.parts-car-switcher button.active span { color: #c7c0b5; }
.part-need-row { display: grid; grid-template-columns: 150px minmax(220px, .8fr) minmax(420px, 1.4fr); align-items: stretch; border: 1px solid var(--line); }
.part-need-car { display: grid; align-content: center; padding: 15px; background: #2b2720; color: white; }
.part-need-car span { color: var(--yellow); font-size: 9px; font-weight: 900; }
.part-need-car strong { margin-top: 5px; font-size: 14px; overflow-wrap: anywhere; }
.part-need-car small { margin-top: 6px; color: #b8b0a3; font-size: 9px; }
.part-need-info { min-width: 0; padding: 14px; border-right: 1px solid var(--line); }
.part-sku { color: var(--muted); font-family: Consolas, monospace; font-size: 8px; font-weight: 800; }
.part-need-info h3, .inventory-part h3 { margin: 5px 0 0; font-size: 15px; text-transform: uppercase; overflow-wrap: anywhere; }
.part-need-info p { margin: 5px 0; color: var(--muted); font-size: 10px; line-height: 1.35; }
.part-need-info small { color: var(--green); font-size: 9px; font-weight: 800; }
.part-need-action { display: grid; align-content: center; gap: 8px; min-width: 0; padding: 12px; }
.part-need-action > select { width: 100%; height: 40px; border: 1px solid var(--line); background: white; padding: 0 9px; font-size: 10px; }
.quality-offers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.quality-offers button { min-width: 0; min-height: 76px; padding: 9px; border: 1px solid var(--line); background: white; text-align: left; }
.quality-offers button:hover:not(:disabled) { border-color: var(--ink); }
.quality-offers span, .quality-offers strong, .quality-offers small { display: block; }
.quality-offers span { color: var(--muted); font-size: 8px; font-weight: 900; text-transform: uppercase; }
.quality-offers strong { margin-top: 5px; font-size: 12px; }
.quality-offers small { margin-top: 4px; color: var(--muted); font-size: 8px; line-height: 1.3; }
.service-with-part { width: 100%; min-height: 38px; }
.install-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.install-actions button { min-width: 0; min-height: 42px; padding: 7px; font-size: 9px; }
.repair-readiness { width: 100%; min-height: 30px; border: 0; padding: 5px 7px; background: #f1ead7; color: #755e15; font-size: 8px; font-weight: 800; text-align: left; line-height: 1.35; }
.repair-readiness.ready { display: block; background: #e3ece4; color: var(--green); }
.parts-empty > button { margin-top: 14px; }
.parts-inventory-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.inventory-part { display: grid; align-content: start; gap: 8px; min-width: 0; padding: 14px; border: 1px solid var(--line); }
.part-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.quality-tag, .needed-tag { display: inline-block; padding: 4px 6px; background: #ece9df; color: var(--muted); font-size: 8px; font-weight: 900; text-transform: uppercase; }
.quality-original { background: #2b2720; color: #f4cc4c; }
.quality-analog { background: #e3ece4; color: var(--green); }
.quality-economy { background: #f3e9d1; color: #836916; }
.quality-restored { background: #ebe8e2; color: #886d41; }
.inventory-part > p { min-height: 26px; margin: 0; color: var(--muted); font-size: 10px; line-height: 1.35; }
.inventory-part > small { color: var(--green); font-size: 9px; font-weight: 800; }
.part-metrics { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.part-metrics span { min-width: 0; padding: 8px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--muted); font-size: 8px; text-transform: uppercase; }
.part-metrics strong { display: block; margin-top: 4px; color: var(--ink); font-size: 10px; overflow-wrap: anywhere; }
.inventory-part .part-list-action { display: grid; grid-template-columns: minmax(0, 1fr) auto; margin-top: auto; padding-top: 8px; border-top: 1px solid var(--line); }
.inventory-part .part-list-action input { width: 100%; min-width: 0; }
.parts-filters { display: grid; grid-template-columns: 180px 180px 1fr; gap: 7px; margin-bottom: 13px; }
.parts-filters select, .parts-filters input { min-width: 0; height: 42px; border: 1px solid var(--line); background: white; padding: 0 10px; }
.parts-exchange-list { display: grid; gap: 7px; }
.exchange-part { display: grid; grid-template-columns: minmax(260px, 1fr) 180px auto; align-items: center; gap: 15px; padding: 12px; border: 1px solid var(--line); }
.exchange-part.needed { border-left: 4px solid var(--green); background: #f1f4ef; }
.exchange-part > div:first-child > strong, .exchange-part > div:first-child > small { display: block; }
.exchange-part > div:first-child > strong { margin-top: 6px; font-size: 12px; }
.exchange-part > div:first-child > small { margin-top: 4px; color: var(--muted); font-size: 9px; overflow-wrap: anywhere; }
.needed-tag { margin-left: 5px; background: var(--green); color: white; }
.exchange-price { text-align: right; }
.exchange-price strong, .exchange-price small { display: block; }
.exchange-price strong { font-size: 14px; }
.exchange-price small { margin-top: 4px; color: var(--muted); font-size: 8px; }
.exchange-part > button { min-width: 105px; min-height: 40px; }
.parts-empty { display: grid; grid-column: 1 / -1; place-items: center; min-height: 170px; padding: 24px; border: 1px dashed var(--line); text-align: center; }
.parts-empty strong { font-size: 16px; text-transform: uppercase; }
.parts-empty span { max-width: 520px; margin-top: 7px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.repair-part-status { padding: 8px; background: #eceae2; }
.repair-part-status strong, .repair-part-status small { display: block; }
.repair-part-status strong { font-size: 10px; }
.repair-part-status small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.level-block { display: flex; justify-content: space-between; gap: 12px; font-size: 11px; }
.level-block span { color: #a69d8f; }
.xp-track { height: 6px; overflow: hidden; background: #423c34; }
.xp-track i { display: block; width: 0; height: 100%; background: var(--accent); transition: width .25s; }
.skill-points { color: #a69d8f; font-size: 11px; }
.skill-points strong { color: var(--yellow); font-size: 17px; }
.workshop-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 32px; }
.workshop-section { padding: 20px; border-top: 2px solid var(--ink); background: var(--surface); }
.workshop-heading h3, .deals-section h3 { margin: 0 0 16px; font-size: 20px; text-transform: uppercase; }
.upgrade-grid { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.upgrade-item { min-width: 0; padding: 13px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.upgrade-top { display: flex; align-items: start; justify-content: space-between; gap: 8px; }
.upgrade-top strong { font-size: 12px; }
.upgrade-level { flex: 0 0 auto; padding: 3px 6px; background: #ece9df; color: var(--muted); font-size: 9px; font-weight: 800; }
.upgrade-item p { min-height: 28px; margin: 7px 0 11px; color: var(--muted); font-size: 10px; line-height: 1.4; }
.upgrade-item button { width: 100%; min-height: 33px; padding: 0 8px; border: 1px solid var(--ink); background: transparent; font-size: 10px; font-weight: 800; }
.upgrade-item button:hover:not(:disabled) { background: var(--ink); color: white; }
.upgrade-item button:disabled { cursor: not-allowed; border-color: var(--line); color: #b0a89c; }

.car-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.car-card { min-width: 0; border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); text-align: left; padding: 0; transition: transform .15s, box-shadow .15s; }
.car-card:hover { position: relative; z-index: 1; transform: translateY(-3px); box-shadow: 0 12px 30px rgba(31,33,29,.11); }
.car-art { position: relative; height: 155px; overflow: hidden; background: #e8e5dc; }
.car-photo { position: absolute; z-index: 2; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .2s; }
.car-art.photo-loaded .car-photo { opacity: 1; }
.car-art.photo-loaded .car-window, .car-art.photo-loaded .wheel, .car-art.photo-loaded .car-make { display: none; }
.car-art.photo-loaded::before, .car-art.photo-loaded::after { opacity: 0; }
.car-art.photo-loaded::after { content: ""; z-index: 2; inset: auto 0 0; width: auto; height: 35%; transform: none; border-radius: 0; background: linear-gradient(0deg, rgba(0,0,0,.48), transparent); filter: none; opacity: 1; }
.car-art::before { content: ""; position: absolute; left: 50%; bottom: 18px; width: 72%; height: 39%; transform: translateX(-50%); border-radius: 45% 48% 18% 18% / 60% 60% 25% 25%; background: var(--car-color); box-shadow: inset 0 -10px rgba(0,0,0,.13); }
.car-art::after { content: ""; position: absolute; left: 50%; bottom: 13px; width: 78%; height: 13px; transform: translateX(-50%); border-radius: 50%; background: rgba(0,0,0,.22); filter: blur(4px); }
.car-window { position: absolute; z-index: 1; left: 50%; bottom: 56px; width: 37%; height: 32px; transform: translateX(-50%); clip-path: polygon(17% 0, 82% 0, 100% 100%, 0 100%); background: #918066; border: 5px solid var(--car-color); }
.wheel { position: absolute; z-index: 2; bottom: 16px; width: 31px; height: 31px; border: 7px solid #24211d; border-radius: 50%; background: #958b7c; }
.wheel.left { left: 24%; } .wheel.right { right: 24%; }
.vehicle-classic::before { width: 68%; height: 43%; border-radius: 9% 12% 8% 8%; clip-path: polygon(8% 38%, 25% 4%, 73% 4%, 92% 38%, 100% 48%, 96% 100%, 3% 100%, 0 49%); }
.vehicle-classic .car-window { width: 34%; height: 36px; clip-path: polygon(8% 0, 92% 0, 100% 100%, 0 100%); }
.vehicle-hatch::before { width: 62%; height: 46%; border-radius: 32% 18% 15% 15%; clip-path: polygon(10% 34%, 30% 0, 78% 4%, 96% 40%, 100% 100%, 0 100%); }
.vehicle-hatch .wheel.left { left: 29%; } .vehicle-hatch .wheel.right { right: 27%; }
.vehicle-sedan::before { width: 76%; height: 39%; clip-path: polygon(4% 51%, 22% 43%, 35% 3%, 67% 3%, 78% 41%, 97% 48%, 100% 100%, 0 100%); }
.vehicle-suv::before { width: 74%; height: 54%; border-radius: 12% 18% 8% 8%; clip-path: polygon(7% 24%, 22% 0, 78% 0, 95% 28%, 100% 100%, 0 100%, 0 39%); }
.vehicle-suv .car-window { bottom: 67px; width: 40%; height: 45px; }
.vehicle-suv .wheel { width: 36px; height: 36px; bottom: 12px; }
.vehicle-coupe::before { width: 74%; height: 34%; border-radius: 55% 55% 13% 13%; clip-path: polygon(3% 58%, 25% 48%, 43% 0, 68% 5%, 80% 45%, 98% 54%, 100% 100%, 0 100%); }
.vehicle-coupe .car-window { bottom: 50px; width: 29%; height: 26px; }
.vehicle-van::before { width: 68%; height: 62%; border-radius: 8% 15% 6% 6%; clip-path: polygon(5% 7%, 70% 7%, 95% 34%, 100% 100%, 0 100%, 0 15%); }
.vehicle-van .car-window { bottom: 72px; left: 62%; width: 23%; height: 48px; clip-path: polygon(0 0, 72% 0, 100% 100%, 0 100%); }
.vehicle-electric::before { width: 74%; height: 37%; border-radius: 60% 45% 16% 16%; clip-path: polygon(2% 58%, 25% 48%, 39% 2%, 70% 2%, 82% 45%, 99% 56%, 100% 100%, 0 100%); }
.vehicle-electric .car-window { width: 36%; background: #91b9c1; }
.vehicle-premium::before { width: 82%; height: 38%; border-radius: 25% 34% 10% 10%; clip-path: polygon(1% 56%, 28% 45%, 39% 2%, 70% 2%, 82% 45%, 99% 52%, 100% 100%, 0 100%); }
.vehicle-premium .wheel.left { left: 20%; } .vehicle-premium .wheel.right { right: 20%; }
.vehicle-wagon::before { width: 78%; height: 48%; border-radius: 16% 20% 10% 10%; clip-path: polygon(4% 37%, 23% 4%, 76% 4%, 93% 37%, 100% 100%, 0 100%, 0 49%); }
.vehicle-wagon .car-window { bottom: 62px; width: 45%; height: 40px; }
.vehicle-pickup::before { width: 78%; height: 48%; border-radius: 10%; clip-path: polygon(2% 48%, 19% 42%, 27% 2%, 53% 2%, 64% 45%, 98% 45%, 100% 100%, 0 100%); }
.vehicle-pickup .car-window { left: 43%; bottom: 62px; width: 24%; height: 38px; }
.vehicle-roadster::before { width: 76%; height: 29%; border-radius: 62% 50% 13% 13%; clip-path: polygon(1% 52%, 34% 42%, 45% 3%, 65% 10%, 74% 43%, 98% 49%, 100% 100%, 0 100%); }
.vehicle-roadster .car-window { left: 55%; bottom: 43px; width: 20%; height: 22px; border-width: 4px; }
.car-year { position: absolute; z-index: 3; top: 12px; left: 12px; padding: 5px 7px; background: rgba(255,255,255,.9); font-size: 10px; font-weight: 800; }
.seller-label { position: absolute; z-index: 3; top: 12px; right: 12px; max-width: 45%; overflow: hidden; padding: 5px 7px; color: white; background: rgba(27,29,26,.83); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.car-make { position: absolute; z-index: 3; left: 50%; bottom: 33px; transform: translateX(-50%); max-width: 32%; overflow: hidden; color: rgba(255,255,255,.78); font-size: 8px; font-weight: 900; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.car-info { padding: 17px; }
.car-info h3 { margin: 0; font-size: 18px; line-height: 1.2; }
.car-meta { display: flex; justify-content: space-between; gap: 8px; margin: 9px 0 17px; color: var(--muted); font-size: 11px; }
.car-price-row { display: flex; align-items: end; justify-content: space-between; gap: 12px; }
.car-price-row strong { font-size: 20px; }
.condition { color: var(--green); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.condition.mid { color: #9d7313; } .condition.low { color: var(--accent-dark); }

.garage-list { display: grid; gap: 16px; }
.garage-cars-heading, .auction-section-head { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin: 24px 0 12px; padding-top: 15px; border-top: 2px solid var(--ink); }
.garage-cars-heading h3, .auction-section-head h3 { margin: 0; font-size: 20px; text-transform: uppercase; }
.garage-cars-heading > span, .auction-section-head > span { color: var(--muted); font-size: 10px; }
.garage-workshop { margin-top: 28px; border-top: 2px solid var(--ink); background: var(--surface); }
.garage-workshop > summary { display: flex; align-items: end; justify-content: space-between; padding: 18px 20px; cursor: pointer; list-style: none; }
.garage-workshop > summary::-webkit-details-marker { display: none; }
.garage-workshop > summary h3 { margin: 0; font-size: 20px; text-transform: uppercase; }
.garage-workshop > summary > span { color: var(--muted); font-size: 10px; }
.garage-workshop > summary > span::after { content: " +"; color: var(--ink); font-size: 15px; font-weight: 900; }
.garage-workshop[open] > summary > span::after { content: " −"; }
.garage-workshop > .training-strip, .garage-workshop > .ad-slot { margin-left: 20px; margin-right: 20px; }
.garage-workshop > .parts-market-panel { margin-left: 20px; margin-right: 20px; }
.garage-workshop > .workshop-grid { margin: 0 20px 24px; }
.garage-car { display: grid; grid-template-columns: 260px minmax(230px, 1fr) minmax(250px, 1.2fr) auto; align-items: center; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); }
.garage-car .car-art { height: 170px; }
.garage-main, .garage-status, .garage-actions { padding: 22px; }
.garage-main h3 { margin: 0 0 8px; font-size: 23px; }
.garage-main p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.garage-status { border-left: 1px solid var(--line); }
.status-line { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 11px; }
.status-bar { height: 7px; overflow: hidden; background: #e5e3db; }
.status-bar i { display: block; height: 100%; background: var(--green); }
.defect-count { margin: 13px 0 0; color: var(--muted); font-size: 11px; }
.garage-actions { display: grid; gap: 8px; min-width: 190px; }
.primary-button, .secondary-button, .danger-button { min-height: 40px; border: 1px solid var(--ink); padding: 0 15px; font-weight: 800; font-size: 12px; }
.primary-button { background: var(--ink); color: white; }
.primary-button:hover { background: #3c362e; }
.secondary-button { background: transparent; color: var(--ink); }
.secondary-button:hover { background: #e8e6de; }
.danger-button { border-color: var(--accent); background: var(--accent); color: white; }
.empty-state { padding: 80px 20px; border: 1px dashed #c9c1b6; text-align: center; }
.empty-icon { width: 58px; height: 58px; display: grid; place-items: center; margin: 0 auto 20px; background: var(--ink); color: white; font-size: 25px; font-weight: 900; }
.empty-state h3 { margin: 0; font-size: 24px; }
.empty-state p { max-width: 430px; margin: 10px auto 22px; color: var(--muted); line-height: 1.5; }

.leaderboard { border-top: 2px solid var(--ink); background: var(--surface); }
.leader-head, .leader-row { display: grid; grid-template-columns: 1fr 120px 180px; align-items: center; min-height: 64px; padding: 0 24px; border-bottom: 1px solid var(--line); }
.leader-head { min-height: 42px; color: var(--muted); font-size: 10px; text-transform: uppercase; }
.leader-row.current { background: #faefde; }
.leader-player { display: flex; align-items: center; gap: 15px; font-weight: 800; }
.place { width: 28px; color: var(--muted); font-size: 12px; }
.leader-profit { font-weight: 900; }
.deals-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.deals-section { min-width: 0; padding: 20px; border-top: 2px solid var(--ink); background: var(--surface); }
.offers-list { display: grid; gap: 10px; }
.offer-card { padding: 15px; border: 1px solid var(--line); }
.offer-card.bot { border-left: 4px solid var(--yellow); }
.offer-head { display: flex; align-items: start; justify-content: space-between; gap: 14px; }
.offer-head strong { font-size: 14px; }
.offer-head span { flex: 0 0 auto; font-size: 17px; font-weight: 900; }
.offer-car { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.offer-reason { margin: 12px 0; padding: 9px 11px; background: #f2f0e9; color: #5f574b; font-size: 11px; line-height: 1.45; }
.offer-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.offer-actions button { min-height: 34px; }
.counter-row { display: flex; gap: 6px; width: 100%; }
.counter-row input { min-width: 0; flex: 1; height: 34px; border: 1px solid var(--line); padding: 0 8px; }
.no-offers { padding: 28px 12px; border: 1px dashed var(--line); color: var(--muted); text-align: center; font-size: 12px; }
.contracts-section { margin-top: 22px; padding: 20px; border-top: 2px solid var(--ink); background: var(--surface); }
.contracts-section .workshop-heading { display: flex; align-items: end; justify-content: space-between; }
.reputation-badge { padding: 7px 10px; background: #e8eee8; color: var(--green); font-size: 10px; font-weight: 800; }
.contracts-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.contract-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 98px; padding: 13px; border: 1px solid var(--line); }
.contract-card strong, .contract-card p, .contract-card small { display: block; }
.contract-card strong { font-size: 12px; }
.contract-card p { margin: 6px 0; color: var(--muted); font-size: 10px; line-height: 1.35; }
.contract-card small { color: var(--muted); font-size: 9px; }
.contract-card > span { flex: 0 0 auto; color: var(--green); font-size: 11px; font-weight: 800; }
.contract-card.completed { background: #e8eee8; }
.contract-card.completed > span { color: var(--green); }
.contract-card.failed { opacity: .55; }

.modal { position: fixed; z-index: 50; inset: 0; display: grid; place-items: center; padding: 22px; }
.modal-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: rgba(17,18,16,.72); backdrop-filter: blur(3px); }
.modal-panel { position: relative; z-index: 1; width: min(720px, 100%); max-height: calc(100vh - 44px); overflow: auto; background: var(--surface); box-shadow: 0 24px 80px rgba(0,0,0,.35); }
.close-button { position: absolute; z-index: 8; top: 12px; right: 12px; background: var(--ink); color: white; }
.modal-car-art .seller-label { right: 58px; }
.modal.reward-modal .close-button { display: none; }
.modal.reward-modal .modal-backdrop { cursor: default; }
.icon-button { width: 36px; height: 36px; border: 0; background: var(--ink); color: white; font-size: 25px; line-height: 1; }
.modal-car-art { height: 180px; }
.modal-car-art::before { width: 58%; height: 38%; bottom: 26px; }
.modal-car-art::after { width: 62%; bottom: 20px; }
.modal-car-art .car-window { bottom: 67px; }
.modal-car-art .wheel { bottom: 20px; width: 27px; height: 27px; border-width: 6px; }
.modal-body { padding: 28px; }
.modal-body h2 { margin: 0; font-size: 33px; text-transform: uppercase; }
.modal-subtitle { margin: 7px 0 24px; color: var(--muted); }
.inspection-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.inspection-grid div { padding: 14px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.inspection-grid span, .inspection-grid strong { display: block; }
.inspection-grid span { color: var(--muted); font-size: 10px; text-transform: uppercase; }
.inspection-grid strong { margin-top: 5px; }
.description { margin: 22px 0; padding-left: 15px; border-left: 3px solid var(--yellow); color: #595247; font-size: 14px; line-height: 1.5; }
.modal-action-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.modal-price span, .modal-price strong { display: block; }
.modal-price span { color: var(--muted); font-size: 10px; text-transform: uppercase; }
.modal-price strong { margin-top: 3px; font-size: 26px; }
.modal-action-row button { min-height: 48px; padding: 0 24px; }
.reward-hero { display: grid; grid-template-columns: minmax(250px, .9fr) 1.1fr; min-height: 220px; background: #27231e; color: white; }
.reward-hero .reward-car-art { height: 220px; background: #dcd5cb; }
.reward-title { align-self: center; min-width: 0; padding: 28px; }
.reward-title h2 { margin: 10px 0 4px; font-size: 30px; line-height: 1; text-transform: uppercase; overflow-wrap: anywhere; }
.reward-title p:last-child { margin: 0; color: #b9b1a4; font-size: 11px; }
.rarity-badge { display: inline-block; padding: 5px 8px; border: 1px dashed #f3c949; color: #f3c949; font-size: 9px; font-weight: 900; text-transform: uppercase; transform: rotate(-2deg); }
.reward-stats { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.reward-stats > div { padding: 13px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.reward-stats span, .reward-stats strong { display: block; }
.reward-stats span { color: var(--muted); font-size: 9px; text-transform: uppercase; }
.reward-stats strong { margin-top: 5px; font-size: 14px; }
.reward-positive { color: var(--green); }
.reward-negative { color: var(--accent-dark); }
.reward-market-note { display: flex; justify-content: space-between; gap: 20px; margin: 16px 0; padding: 13px 15px; border-left: 4px solid var(--yellow); background: #f6efd8; }
.reward-market-note strong { flex: 0 0 42%; font-size: 11px; text-transform: uppercase; }
.reward-market-note span { color: var(--muted); font-size: 10px; line-height: 1.45; }
.reward-claim { width: 100%; min-height: 50px; }
.defect-list { display: grid; gap: 8px; margin: 20px 0; }
.defect-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 14px; min-height: 50px; padding: 10px 12px 10px 14px; border: 1px solid var(--line); font-size: 12px; }
.defect-row.repaired { color: var(--muted); text-decoration: line-through; }
.defect-row button { min-height: 32px; }
.repair-actions { display: grid; min-width: 170px; gap: 6px; }
.repair-actions select { max-width: 245px; height: 35px; border: 1px solid var(--line); background: white; padding: 0 7px; font-size: 9px; }
.repair-actions button:disabled { cursor: not-allowed; opacity: .4; }
.part-order-button { min-height: 34px; border: 1px solid var(--ink); background: var(--ink); color: white; font-size: 10px; font-weight: 800; }
.defect-detail { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; font-weight: 400; line-height: 1.35; }
.severity { display: inline-block; margin-left: 6px; color: var(--accent); font-size: 9px; text-transform: uppercase; }
.inspection-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 18px 0; }
.inspection-button { min-height: 55px; border: 1px solid var(--line); background: white; padding: 8px 10px; text-align: left; }
.inspection-button:hover:not(:disabled) { border-color: var(--ink); }
.inspection-button:disabled { color: #a39a8d; background: #efede6; cursor: not-allowed; }
.inspection-button strong, .inspection-button small { display: block; }
.inspection-button small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.free-action { display: inline-block; margin-left: 4px; padding: 2px 5px; border-radius: 3px; background: #e8f4ec; color: var(--green); font-size: 8px; font-style: normal; font-weight: 700; vertical-align: middle; }
.inspection-summary { margin: 16px 0; padding: 12px; background: #f2f0e9; font-size: 11px; line-height: 1.5; }
.service-diagnostic { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 18px 0; padding: 15px; border-left: 4px solid var(--accent); background: #f5ede1; }
.service-diagnostic strong, .service-diagnostic span { display: block; }
.service-diagnostic span { margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.4; }
.market-comparison { display: grid; grid-template-columns: repeat(3, 1fr); margin: 20px 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.market-comparison div { padding: 12px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.market-comparison span, .market-comparison strong { display: block; }
.market-comparison span { color: var(--muted); font-size: 9px; text-transform: uppercase; }
.market-comparison strong { margin-top: 5px; font-size: 13px; }
.offer-form { display: flex; gap: 7px; margin-top: 12px; }
.offer-form input { min-width: 0; flex: 1; height: 42px; border: 1px solid var(--line); padding: 0 10px; }
.offer-form button { min-height: 42px; }
.list-form { display: grid; gap: 13px; margin-top: 20px; }
.list-form label { font-size: 11px; font-weight: 800; }
.list-form input { width: 100%; height: 46px; margin-top: 7px; border: 1px solid var(--line); padding: 0 13px; background: white; outline: none; }
.list-form input:focus { border-color: var(--ink); }
.sale-mode { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.sale-mode label { position: relative; margin: 0; padding: 13px; border: 1px solid var(--line); cursor: pointer; }
.sale-mode label:has(input:checked) { border-color: var(--ink); background: #eceae2; }
.sale-mode input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sale-mode strong, .sale-mode small { display: block; }
.sale-mode small { margin-top: 4px; color: var(--muted); font-size: 9px; line-height: 1.4; }
.auction-duration { display: none; }
.list-form:has(input[value="auction"]:checked) .auction-duration { display: block; }
.seller-summary { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 20px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.seller-summary > div { min-width: 0; padding: 12px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.seller-summary span, .seller-summary strong { display: block; }
.seller-summary span { color: var(--muted); font-size: 9px; text-transform: uppercase; }
.seller-summary strong { margin-top: 5px; font-size: 12px; overflow-wrap: anywhere; }
.seller-verdict { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 7px 16px; padding: 12px; background: #eceae2; }
.seller-verdict span { color: var(--muted); font-size: 10px; }
.seller-verdict strong { font-size: 11px; }
.seller-verdict b { grid-column: 1 / -1; font-size: 13px; }
.high-interest, .profit-positive { color: var(--green); }
.medium-interest { color: #8a6b15; }
.low-interest, .profit-negative { color: var(--accent-dark); }
.auction-duration select { width: 100%; height: 46px; margin-top: 7px; border: 1px solid var(--line); padding: 0 13px; background: white; }
.bid-form { display: flex; gap: 7px; margin-top: 14px; }
.bid-form input { min-width: 0; flex: 1; height: 46px; border: 1px solid var(--line); padding: 0 10px; }
.auction-status { margin: 18px 0; padding: 13px; border-left: 4px solid var(--accent); background: #f5ede1; }
.auction-status strong, .auction-status span { display: block; }
.auction-status span { margin-top: 5px; color: var(--muted); font-size: 10px; }
.profile-hero { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 20px; padding: 28px; background: var(--dark); color: white; }
.profile-monogram { width: 72px; height: 72px; display: grid; place-items: center; background: var(--accent); font-size: 30px; font-weight: 900; }
.profile-hero h3 { margin: 0; font-size: 30px; text-transform: uppercase; }
.profile-hero p:last-child { margin: 6px 0 0; color: #9e9486; font-size: 11px; }
.profile-capital { text-align: right; }
.profile-capital span, .profile-capital strong { display: block; }
.profile-capital span { color: #9e9486; font-size: 9px; text-transform: uppercase; }
.profile-capital strong { margin-top: 6px; font-size: 25px; }
.profile-reputation { text-align: right; }
.profile-reputation span, .profile-reputation strong { display: block; }
.profile-reputation span { color: #9e9486; font-size: 9px; text-transform: uppercase; }
.profile-reputation strong { margin-top: 6px; color: var(--yellow); font-size: 22px; }
.group-content { min-height: 50px; }
.group-summary, .group-create { display: grid; gap: 7px; }
.group-summary strong { font-size: 18px; }
.group-summary span, .group-summary small, .group-create small { color: var(--muted); font-size: 10px; }
.group-summary > div, .group-create { display: flex; gap: 7px; margin-top: 7px; }
.group-summary input, .group-create input, .group-summary select { min-width: 0; flex: 1; height: 38px; border: 1px solid var(--line); background: white; padding: 0 9px; }
.group-members, .group-garage, .group-employees { margin-top: 22px; }
.group-members h4, .group-garage h4, .group-employees h4, .group-jobs h4 { margin: 0 0 9px; font-size: 12px; text-transform: uppercase; }
.group-business { margin-top: 20px; }
.business-dashboard { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.business-dashboard > div { min-width: 0; padding: 13px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.business-dashboard span, .business-dashboard strong, .business-dashboard small { display: block; }
.business-dashboard span { color: var(--muted); font-size: 8px; text-transform: uppercase; }
.business-dashboard strong { margin-top: 7px; font-size: 18px; overflow-wrap: anywhere; }
.business-dashboard small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.business-xp { height: 5px; overflow: hidden; background: #e1dbd1; }
.business-xp i { display: block; height: 100%; background: var(--green); transition: width .25s; }
.group-jobs { margin-top: 22px; }
.group-section-title { display: flex; align-items: end; justify-content: space-between; gap: 14px; margin-bottom: 9px; }
.group-section-title h4 { margin: 0; }
.group-section-title small, .group-section-title > span { color: var(--muted); font-size: 9px; }
.active-job-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; }
.active-job { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; border-left: 3px solid var(--yellow); background: #f6efd8; }
.active-job strong, .active-job small { display: block; }
.active-job strong { font-size: 11px; }
.active-job small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.active-job time { flex: 0 0 auto; color: var(--accent-dark); font-size: 15px; font-weight: 900; }
.group-member { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.group-member strong, .group-member small { display: block; }
.group-member strong { font-size: 11px; }
.group-member small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.group-member select { height: 34px; border: 1px solid var(--line); background: white; }
.group-garage { display: grid; gap: 8px; }
.group-garage h4 { grid-column: 1 / -1; }
.group-car { display: grid; grid-template-columns: 140px 1fr auto; align-items: center; gap: 12px; border: 1px solid var(--line); }
.group-car .car-art { height: 90px; }
.group-car strong, .group-car small { display: block; }
.group-car strong { font-size: 12px; }
.group-car small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.group-car button { margin-right: 10px; }
.group-car-actions { display: flex; flex-wrap: wrap; justify-content: end; gap: 6px; margin-right: 10px; }
.group-car-actions button { margin-right: 0; }
.employee-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.employee-card { display: grid; align-content: start; gap: 7px; padding: 12px; border: 1px solid var(--line); }
.employee-card.hired { border-left: 3px solid var(--green); background: #eef2ed; }
.employee-card.busy { border-left-color: var(--yellow); background: #f6f0de; }
.employee-card strong { font-size: 11px; }
.employee-card span, .employee-card small { color: var(--muted); font-size: 9px; }
.employee-head { display: flex; align-items: start; justify-content: space-between; gap: 8px; }
.employee-head strong, .employee-head span { display: block; }
.employee-head span { margin-top: 3px; }
.employee-head b { color: var(--green); font-size: 8px; text-transform: uppercase; }
.employee-card.busy .employee-head b { color: #8a6b15; }
.employee-energy { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 8px; }
.employee-energy > i { height: 5px; overflow: hidden; background: #dcd7cf; }
.employee-energy > i b { display: block; height: 100%; background: var(--green); }
.employee-job { display: grid; gap: 5px; margin-top: 3px; padding-top: 9px; border-top: 1px solid #d5cfc7; }
.employee-job strong, .employee-job small { display: block; }
.employee-card button { width: 100%; min-height: 37px; margin-top: 3px; }
.group-activity { margin-top: 24px; }
.group-activity h4 { margin: 0 0 9px; font-size: 12px; text-transform: uppercase; }
.group-activity > div { border-top: 1px solid var(--line); }
.group-activity p { display: grid; grid-template-columns: 45px 1fr; gap: 9px; margin: 0; padding: 8px 3px; border-bottom: 1px solid var(--line); font-size: 10px; }
.group-activity time { color: var(--muted); font-size: 9px; }
.npc-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; }
.npc-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px; border: 1px solid var(--line); }
.npc-row strong, .npc-row small { display: block; }
.npc-row strong { font-size: 11px; }
.npc-row small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.npc-row > span { color: var(--green); font-size: 10px; font-weight: 800; }
.profile-stats { display: grid; grid-template-columns: repeat(4, 1fr); border-left: 1px solid var(--line); }
.profile-stats div { min-height: 86px; padding: 17px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); }
.profile-stats span, .profile-stats strong { display: block; }
.profile-stats span { color: var(--muted); font-size: 9px; text-transform: uppercase; }
.profile-stats strong { margin-top: 10px; font-size: 20px; }
.profile-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 28px; }
.profile-columns > section { padding: 20px; border-top: 2px solid var(--ink); background: var(--surface); }
.profile-columns h3 { margin: 0 0 15px; font-size: 21px; text-transform: uppercase; }
.profile-list { border-top: 1px solid var(--line); }
.profile-list > div { display: flex; align-items: center; justify-content: space-between; gap: 15px; min-height: 47px; padding: 8px 4px; border-bottom: 1px solid var(--line); font-size: 11px; }
.profile-list small { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; }
.profile-list strong { flex: 0 0 auto; }

.chat-shell { border-top: 2px solid var(--ink); background: var(--surface); }
.chat-messages { height: min(62vh, 650px); min-height: 360px; overflow-y: auto; padding: 18px; }
.chat-message { max-width: 720px; margin: 0 0 10px; padding: 10px 12px; border-left: 3px solid var(--line); background: #f1efe8; }
.chat-message.own { margin-left: auto; border-left-color: var(--accent); background: #f6efe3; }
.chat-message > div { display: flex; justify-content: space-between; gap: 18px; }
.chat-message > div > span { display: flex; align-items: center; gap: 8px; }
.chat-message strong { font-size: 11px; }
.chat-message time { color: var(--muted); font-size: 9px; }
.chat-report { border: 0; padding: 0; background: transparent; color: var(--accent); font-size: 8px; font-weight: 900; text-decoration: underline; }
.chat-message p { margin: 6px 0 0; font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; }
.chat-empty { padding: 80px 20px; color: var(--muted); text-align: center; font-size: 12px; }
.chat-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 14px; border-top: 1px solid var(--line); }
.chat-form input { min-width: 0; height: 46px; border: 1px solid var(--line); padding: 0 13px; }
.chat-form button { min-height: 46px; }
.car-history { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); }
.car-history h3 { margin: 0 0 10px; font-size: 15px; text-transform: uppercase; }
.car-history div { display: flex; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 11px; }
.car-history time { flex: 0 0 72px; color: var(--muted); font-size: 9px; }

.toast { position: fixed; z-index: 70; left: 50%; bottom: 24px; transform: translate(-50%, 120px); padding: 13px 18px; background: var(--ink); color: white; box-shadow: 0 8px 30px rgba(0,0,0,.25); font-size: 13px; opacity: 0; transition: .25s; }
.toast.visible { transform: translate(-50%, 0); opacity: 1; }
.toast.error { background: var(--accent-dark); }

.ad-slot { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px; min-height: 96px; margin: 18px 0; padding: 10px 14px; border: 1px solid var(--line); background: var(--surface); overflow: hidden; }
.ad-label { align-self: start; color: var(--muted); font-size: 8px; font-weight: 900; text-transform: uppercase; }
.ad-network { width: 100%; min-width: 0; min-height: 70px; }
.market-cars-label { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: 26px 0 12px; border-top: 2px solid var(--ink); padding-top: 15px; }
.market-cars-label h3 { margin: 0; font-size: 20px; text-transform: uppercase; }
.market-cars-label > span { color: var(--muted); font-size: 10px; }
.parts-buy-box { display: grid !important; grid-template-columns: 1fr 1fr; gap: 5px 10px; }
.parts-buy-box > span { grid-column: 1 / -1; }
.parts-buy-box select { grid-column: 1 / -1; height: 32px; border: 1px solid var(--line); background: white; padding: 0 7px; font-size: 10px; }
.parts-buy-box button { grid-column: 1 / -1; }
.upgrade-section { margin-top: 22px; padding-top: 18px; border-top: 2px solid var(--ink); }
.upgrade-section .workshop-heading { display: flex; align-items: end; justify-content: space-between; gap: 12px; }
.upgrade-section .workshop-heading h3 { margin: 0; font-size: 20px; text-transform: uppercase; }
.upgrade-section .workshop-heading > span { color: var(--muted); font-size: 10px; }
.upgrade-options { display: grid; gap: 7px; margin-top: 13px; }
.car-upgrade { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); }
.car-upgrade strong, .car-upgrade small { display: block; }
.car-upgrade strong { font-size: 12px; }
.car-upgrade small { margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.35; }
.car-upgrade.installed { background: #e8eee8; }
.car-upgrade > b { color: var(--green); font-size: 10px; text-transform: uppercase; }
.site-footer { display: flex; justify-content: space-between; gap: 16px; width: min(1400px, calc(100% - 48px)); margin: 0 auto; padding: 20px 0 28px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.site-footer a { color: var(--ink); font-weight: 800; }
.developer-note { margin-top: 28px; padding: 22px; border-top: 2px solid var(--ink); background: var(--surface); }
.developer-note h3 { margin: 0 0 8px; font-size: 20px; text-transform: uppercase; }
.developer-note p:not(.eyebrow) { max-width: 700px; margin: 0 0 10px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.developer-note a { color: var(--ink); font-size: 11px; font-weight: 800; }
.legal-page { min-height: 100vh; padding: 50px 20px; }
.legal-page main { width: min(780px, 100%); margin: 0 auto; padding: 38px 42px; border-top: 4px solid var(--ink); background: var(--surface); }
.legal-brand { display: inline-block; margin-bottom: 45px; color: var(--ink); font-size: 23px; font-weight: 900; text-decoration: none; }
.legal-brand span { color: var(--accent); }
.legal-page h1 { margin: 0; font-size: 38px; line-height: 1.05; text-transform: uppercase; }
.legal-updated { margin: 12px 0 38px; color: var(--muted); font-size: 10px; }
.legal-page section { padding: 20px 0; border-top: 1px solid var(--line); }
.legal-page h2 { margin: 0 0 8px; font-size: 15px; text-transform: uppercase; }
.legal-page section p { margin: 0; color: #60584c; font-size: 12px; line-height: 1.65; }
.legal-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 0; }
.legal-actions a { padding: 12px 15px; background: var(--ink); color: white; font-size: 10px; font-weight: 900; text-decoration: none; text-transform: uppercase; }
.container-guide { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; margin-bottom: 18px; background: var(--line); }
.container-range { display: block; margin-top: 6px; color: var(--muted); font-size: 9px; font-weight: 800; }
.container-guide > div { padding: 14px 16px; background: var(--surface); }
.container-guide strong, .container-guide span { display: block; }
.container-guide strong { font-size: 12px; text-transform: uppercase; }
.container-guide span { margin-top: 4px; color: var(--muted); font-size: 10px; }
.container-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.container-card { overflow: hidden; border-top: 3px solid var(--box-color); background: var(--surface); }
.container-card, .auction-car { position: relative; }
.player-lot { box-shadow: inset 0 0 0 2px var(--green); }
.outbid-lot { box-shadow: inset 0 0 0 2px var(--accent); }
.player-bid-status { position: absolute; z-index: 5; top: 10px; left: 50%; transform: translateX(-50%) rotate(-2deg); max-width: calc(100% - 24px); padding: 6px 9px; border-radius: 2px; background: var(--green); color: white; font-size: 9px; font-weight: 900; text-transform: uppercase; white-space: nowrap; box-shadow: 0 3px 8px rgba(23,19,14,.25); }
.outbid-lot .player-bid-status { background: var(--danger); }
.auction-section { margin-bottom: 36px; }
.auction-section-head { margin-top: 0; }
.auction-filters { display: grid; grid-template-columns: repeat(4, minmax(130px, 1fr)) auto auto; gap: 7px; margin: -2px 0 14px; }
.auction-filters select, .auction-filters input { min-width: 0; height: 40px; border: 1px solid var(--line); padding: 0 9px; background: white; }
.auction-filters button { min-height: 40px; }
.auction-filters span { align-self: center; color: var(--muted); font-size: 9px; }
.auction-car-grid { display: grid; gap: 10px; }
.auction-car-lot { position: relative; display: grid; grid-template-columns: 280px 1fr; min-width: 0; border: 1px solid var(--line); background: var(--surface); }
.auction-car-lot.player-lot { border-color: var(--ink); }
.auction-car-lot.outbid-lot { border-color: var(--accent); }
.auction-car-preview { min-width: 0; border: 0; padding: 0; background: #e9e7df; text-align: left; }
.auction-car-preview .car-art { height: 190px; }
.auction-details-link { display: block; padding: 10px 14px; color: var(--ink); font-size: 9px; font-weight: 900; text-transform: uppercase; }
.auction-car-content { display: grid; align-content: start; gap: 12px; padding: 15px; }
.auction-car-title { display: flex; justify-content: space-between; gap: 16px; }
.auction-car-title h3 { margin: 3px 0 5px; font-size: 20px; }
.auction-car-title small { color: var(--muted); font-size: 9px; }
.auction-defects { min-width: 0; padding: 10px 12px; background: #efede6; }
.auction-defects strong, .auction-defects span { display: block; font-size: 9px; }
.auction-defects ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 16px; margin: 7px 0 0; padding-left: 16px; color: #5f574b; font-size: 9px; }
.auction-car-content form { display: grid; grid-template-columns: 1fr auto; gap: 7px; }
.auction-car-content form input { min-width: 0; height: 42px; border: 1px solid var(--line); padding: 0 10px; }
.auction-own-note { color: var(--muted); font-size: 9px; font-weight: 800; }
.container-auction-section { padding-top: 6px; }
.auction-notifications { display: grid; gap: 6px; margin: -8px 0 24px; }
.auction-alert { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 12px 15px; border-left: 4px solid var(--accent); background: #f6eee2; }
.auction-alert.read { border-left-color: var(--line); background: var(--surface); }
.auction-alert strong, .auction-alert p { display: block; }
.auction-alert strong { font-size: 11px; text-transform: uppercase; }
.auction-alert p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.auction-alert time { flex: 0 0 auto; color: var(--muted); font-size: 9px; }
.container-visual { position: relative; height: 170px; display: grid; place-items: center; overflow: hidden; background: #e1dbd3; }
.container-visual i { position: absolute; width: 58%; height: 68%; border: 8px solid #2c2822; background: var(--box-color); box-shadow: inset 0 0 0 3px rgba(255,255,255,.25), 0 16px 25px rgba(0,0,0,.18); }
.container-visual b { z-index: 1; color: white; font-size: 48px; }
.container-visual > span { position: absolute; z-index: 2; top: 12px; left: 12px; padding: 5px 7px; background: var(--ink); color: white; font-size: 9px; }
.container-info { padding: 17px; }
.container-info h3 { margin: 0; font-size: 19px; text-transform: uppercase; }
.container-info > span { display: block; min-height: 30px; margin-top: 7px; color: var(--muted); font-size: 10px; line-height: 1.4; }
.container-bid-state { display: grid; grid-template-columns: 1fr auto; gap: 3px 10px; margin: 15px 0; padding: 11px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.container-bid-state strong { font-size: 20px; }
.container-bid-state small { grid-column: 1; color: var(--muted); font-size: 9px; }
.container-bid-state time { grid-column: 2; grid-row: 1 / 3; align-self: center; color: var(--accent-dark); font-size: 13px; font-weight: 900; }
.container-info form { display: grid; grid-template-columns: 1fr auto; gap: 6px; }
.container-info form input { min-width: 0; height: 40px; border: 1px solid var(--line); padding: 0 8px; }
.store-intro { display: flex; align-items: center; justify-content: space-between; gap: 30px; margin-bottom: 16px; padding: 18px 20px; border-left: 4px solid var(--accent); background: var(--surface); }
.store-intro strong { font-size: 15px; text-transform: uppercase; }
.store-intro p { max-width: 760px; margin: 5px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.store-intro > span { flex: 0 0 auto; color: var(--green); font-size: 10px; font-weight: 900; text-transform: uppercase; }
.store-packages { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.store-package { position: relative; display: grid; grid-template-rows: auto auto auto auto 1fr auto auto; min-height: 330px; padding: 20px; border: 1px solid var(--line); border-top: 3px solid var(--ink); background: var(--surface); }
.store-package.popular { border-color: var(--accent); border-top-width: 4px; box-shadow: 0 10px 30px rgba(60,35,25,.09); }
.store-package-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 22px; }
.store-package-head > span { color: var(--muted); font-size: 9px; font-weight: 900; text-transform: uppercase; }
.store-package-head b { padding: 5px 7px; background: var(--accent); color: white; font-size: 8px; text-transform: uppercase; }
.store-package h3 { margin: 13px 0 22px; font-size: 17px; text-transform: uppercase; }
.store-package > strong { font-size: 28px; }
.store-package > small { margin-top: 3px; color: var(--muted); font-size: 9px; text-transform: uppercase; }
.store-package > p { margin: 16px 0 10px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.store-package ul { margin: 0 0 12px; padding: 0; list-style: none; color: var(--ink); font-size: 10px; line-height: 1.7; }
.store-package li::before { content: "✓"; margin-right: 6px; color: var(--green); font-weight: 900; }
.store-package > em { color: var(--green); font-size: 10px; font-style: normal; font-weight: 900; }
.store-package button { align-self: end; margin-top: 18px; }
.store-package button:disabled { cursor: not-allowed; filter: grayscale(.7); opacity: .65; }
.store-notice { margin-top: 14px; padding: 15px 18px; border-left: 4px solid var(--yellow); background: #f6efd8; }
.store-notice strong { font-size: 11px; text-transform: uppercase; }
.store-notice p { margin: 5px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.store-notice a { color: var(--ink); font-weight: 800; }
.supporter-badge { display: inline-block; margin-left: 5px; padding: 3px 5px; background: #5b564f; color: white; font-size: 8px; font-style: normal; font-weight: 900; line-height: 1; text-transform: uppercase; vertical-align: middle; }
.supporter-badge.tier-bronze { background: #8d6c38; }
.supporter-badge.tier-silver { background: #887a66; }
.supporter-badge.tier-gold { background: #a57813; }
.supporter-badge.tier-platinum { background: #3d6570; }
.supporter-badge.tier-founder { background: var(--accent-dark); }
.admin-panel { margin-top: 22px; padding: 20px; border-top: 2px solid var(--ink); background: var(--surface); }
.admin-panel h3 { margin: 0 0 16px; font-size: 20px; text-transform: uppercase; }
.admin-players { display: grid; gap: 7px; }
.admin-player { display: grid; grid-template-columns: minmax(170px, 1fr) auto minmax(430px, 1.6fr); align-items: center; gap: 14px; padding: 12px; border: 1px solid var(--line); }
.admin-player.banned { border-left: 4px solid var(--accent); background: #f6eee2; }
.admin-player strong, .admin-player small { display: block; }
.admin-player b { display: block; margin-top: 6px; color: var(--accent); font-size: 9px; }
.admin-player small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.admin-player > span { font-size: 14px; font-weight: 900; }
.admin-actions { display: grid; grid-template-columns: 110px 1fr auto; gap: 6px; }
.admin-actions input { min-width: 0; height: 36px; border: 1px solid var(--line); padding: 0 8px; }
.admin-actions button { min-height: 36px; }
.admin-player-tools { display: grid; gap: 6px; }
.admin-ban-actions { display: grid; grid-template-columns: 110px 1fr auto; gap: 6px; }
.admin-ban-actions select, .admin-ban-actions input { min-width: 0; height: 36px; border: 1px solid var(--line); padding: 0 8px; background: white; }
.admin-ban-actions button { min-height: 36px; }
.admin-reports { display: grid; gap: 8px; }
.admin-report { display: grid; grid-template-columns: 1fr auto; gap: 16px; padding: 13px; border: 1px solid var(--line); }
.admin-report strong, .admin-report small, .admin-report span { display: block; }
.admin-report small, .admin-report span { margin-top: 4px; color: var(--muted); font-size: 9px; }
.admin-report p { margin: 9px 0 0; font-size: 11px; }
.admin-report > div:last-child { display: flex; flex-wrap: wrap; align-content: start; gap: 6px; }

.asset-summary { margin-bottom: 14px; }
.asset-summary button { margin-top: 6px; min-height: 30px; }
.asset-mode-controls { display: grid; grid-template-columns: repeat(4, 1fr); margin-bottom: 14px; border: 1px solid var(--line); background: var(--surface); }
.asset-mode-controls button { min-height: 48px; border: 0; border-right: 1px solid var(--line); background: transparent; color: var(--muted); font-size: 10px; font-weight: 900; text-transform: uppercase; }
.asset-mode-controls button:last-child { border-right: 0; }
.asset-mode-controls button.active { background: var(--ink); color: white; }
.asset-mode-controls span { margin-left: 4px; color: #61b985; font-size: 7px; }
.property-income-panel { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 24px; margin-bottom: 14px; padding: 17px 20px; border-left: 4px solid var(--green); background: var(--surface); }
.property-income-panel h3 { margin: 0 0 4px; font-size: 17px; text-transform: uppercase; }
.property-income-panel > div:first-child > span, .property-income-panel small { color: var(--muted); font-size: 9px; }
.property-income-panel > div:nth-child(2) span, .property-income-panel > div:nth-child(2) strong, .property-income-panel > div:nth-child(2) small { display: block; text-align: right; }
.property-income-panel > div:nth-child(2) span { color: var(--muted); font-size: 8px; text-transform: uppercase; }
.property-income-panel > div:nth-child(2) strong { margin: 3px 0; font-size: 21px; }
.owned-property { align-items: stretch; }
.owned-property > div:first-child { flex: 1; }
.property-operations { display: grid; grid-template-columns: repeat(4, minmax(110px, 1fr)); gap: 1px; margin-top: 12px; background: var(--line); border: 1px solid var(--line); }
.property-operations span { display: block; padding: 9px; background: var(--surface); color: var(--muted); font-size: 8px; text-transform: uppercase; }
.property-operations strong { display: block; margin-top: 4px; color: var(--ink); font-size: 11px; text-transform: none; }
.property-actions, .business-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.business-owned-section, .business-market-section { margin-top: 22px; }
.business-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.business-card { min-width: 0; padding: 18px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); }
.business-card-head span, .business-card-head strong, .business-card-head small { display: block; }
.business-card-head span { color: var(--green); font-size: 8px; text-transform: uppercase; }
.business-card-head strong { margin-top: 5px; font-size: 18px; }
.business-card-head small, .business-card-head p { margin: 6px 0 0; color: var(--muted); font-size: 9px; }
.business-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-top: 15px; background: var(--line); border: 1px solid var(--line); }
.business-metrics span { min-width: 0; padding: 10px; background: var(--surface-soft); color: var(--muted); font-size: 8px; text-transform: uppercase; }
.business-metrics strong { display: block; margin-top: 5px; color: var(--ink); font-size: 11px; overflow-wrap: anywhere; text-transform: none; }
.business-offer .business-metrics { grid-template-columns: repeat(3, 1fr); }
.business-buy { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 15px; }
.business-buy > strong { font-size: 18px; }
.asset-filters { grid-template-columns: repeat(4, minmax(120px, 1fr)) auto auto; }
.asset-section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin: 25px 0 12px; padding-top: 15px; border-top: 2px solid var(--ink); }
.asset-section-head h3 { margin: 0; font-size: 20px; text-transform: uppercase; }
.asset-section-head > span { color: var(--muted); font-size: 9px; }
.asset-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.asset-card { min-width: 0; border: 1px solid var(--line); background: var(--surface); }
.asset-visual { display: flex; align-items: center; justify-content: space-between; height: 92px; padding: 14px; background: #302c25; color: white; }
.asset-property .asset-visual { background: #42656b; }
.asset-crypto .asset-visual { background: #2c2822; }
.asset-crypto .asset-visual strong { color: #68bd8b; }
.asset-visual span { font-size: 8px; font-weight: 900; }
.asset-visual strong { color: var(--yellow); font-size: 38px; }
.asset-card-body { display: grid; gap: 9px; padding: 14px; }
.asset-card-body h3 { min-height: 38px; margin: 0; font-size: 16px; }
.asset-card-body > p:not(.eyebrow) { min-height: 46px; margin: 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.asset-metrics { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); }
.asset-metrics span { min-width: 0; padding: 8px; color: var(--muted); font-size: 7px; }
.asset-metrics span + span { border-left: 1px solid var(--line); }
.asset-metrics strong { display: block; margin-top: 4px; color: var(--ink); font-size: 10px; }
.asset-estimate { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 8px; }
.asset-buy { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.asset-buy > strong { font-size: 18px; }
.asset-buy > small { grid-column: 1; color: var(--muted); font-size: 8px; }
.asset-buy button { grid-column: 2; grid-row: 1 / span 2; }
.owned-assets { display: grid; gap: 7px; }
.owned-asset { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 16px; padding: 13px 15px; border: 1px solid var(--line); }
.owned-asset > div:last-child { display: grid; grid-template-columns: auto auto; align-items: center; gap: 3px 12px; text-align: right; }
.owned-asset span, .owned-asset small { display: block; color: var(--muted); font-size: 8px; }
.owned-asset strong { display: block; margin: 4px 0; font-size: 12px; }
.owned-asset button { grid-column: 2; grid-row: 1 / span 2; }
.crypto-move { font-weight: 900; }
.crypto-move.up { color: var(--green); }
.crypto-move.down { color: var(--accent); }
.asset-income-line { margin-top: 5px; color: var(--green) !important; font-weight: 800; }
.clothing-workshop { display:flex; align-items:center; justify-content:space-between; gap:16px; margin:14px 0; padding:16px; border:1px solid var(--line); background:var(--surface); }
.clothing-workshop h3 { margin:3px 0; font-size:18px; } .clothing-workshop span { color:var(--muted); font-size:10px; }
.clothing-craft-actions { display:flex; align-items:center; gap:8px; } .clothing-craft-actions strong { min-width:125px; color:var(--green); font-size:12px; }
.clothing-inventory-stats { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; margin-bottom:10px; }
.clothing-inventory-stats > div { padding:12px; border:1px solid var(--line); background:var(--surface); } .clothing-inventory-stats span { display:block; color:var(--muted); font-size:9px; } .clothing-inventory-stats strong { display:block; margin-top:5px; font-size:17px; }
.clothing-inventory { display:grid; gap:8px; } .clothing-item { display:grid; grid-template-columns:110px 1fr auto; align-items:center; gap:14px; padding:10px; border:1px solid var(--line); border-left:5px solid #777; background:var(--surface); }
.clothing-item.rarity-uncommon { border-left-color:#4d9b62; } .clothing-item.rarity-rare { border-left-color:#4775c9; } .clothing-item.rarity-epic { border-left-color:#8b55ae; } .clothing-item.rarity-legendary { border-left-color:#c39128; }
.clothing-item h4 { margin:3px 0; font-size:14px; } .clothing-item p,.clothing-item small,.clothing-item > div:last-child span { margin:0; color:var(--muted); font-size:9px; } .clothing-item > div:last-child { display:grid; justify-items:end; gap:6px; }
.clothing-placeholder { display:grid; place-content:center; min-height:76px; padding:8px; background:linear-gradient(145deg,#f5eee2,#e4d7c5); color:#24211d; text-align:center; overflow:hidden; } .clothing-placeholder span { font-size:8px; font-weight:900; letter-spacing:.04em; text-transform:uppercase; } .clothing-placeholder strong { margin-top:5px; color:#8b3d35; font-size:15px; }
.clothing-placeholder img { width:100%; height:76px; object-fit:cover; display:block; }
.clothing-reel-card .clothing-placeholder { min-height:210px; padding:0; overflow:hidden; }
.clothing-reel-card .clothing-placeholder img { height:210px; object-fit:cover; }
.clothing-placeholder.photo-failed img { display:none; }
.clothing-reel-card .clothing-placeholder.photo-failed { min-height:210px; }
.clothing-rarity { color:var(--green); font-size:9px; font-weight:900; text-transform:uppercase; }
.clothing-reveal { text-align:center; } .clothing-reel { display:grid; place-items:center; min-height:250px; margin:18px 0; overflow:hidden; border:1px solid var(--line); background:var(--paper); }
.clothing-reel-card { width:min(280px,85%); padding:12px; border:2px solid #777; background:var(--surface); box-shadow:var(--shadow); } .clothing-reel-card.rarity-uncommon { border-color:#4d9b62; } .clothing-reel-card.rarity-rare { border-color:#4775c9; } .clothing-reel-card.rarity-epic { border-color:#8b55ae; } .clothing-reel-card.rarity-legendary { border-color:#c39128; box-shadow:0 0 24px rgba(195,145,40,.35); } .clothing-reel-card > span { display:block; margin-top:10px; color:var(--muted); font-size:10px; font-weight:900; text-transform:uppercase; } .clothing-reel-card h3 { margin:5px 0; }
.clothing-reward-value { margin:12px 0; color:var(--muted); } .clothing-reward-value strong { color:var(--ink); }
@media (max-width:760px) { .clothing-workshop { align-items:stretch; flex-direction:column; } .clothing-craft-actions { flex-wrap:wrap; } .clothing-craft-actions strong { flex:1 0 100%; } }
@media (max-width:760px) { .clothing-inventory-stats { grid-template-columns:repeat(2,minmax(0,1fr)); } .clothing-item { grid-template-columns:82px 1fr; } .clothing-item > div:last-child { grid-column:1 / -1; grid-template-columns:1fr auto; align-items:center; justify-items:start; } .clothing-item > div:last-child button { justify-self:end; } }
.known-defects { margin: 12px 0; padding: 10px 12px; background: #f6efe3; color: var(--accent-dark); font-size: 11px; line-height: 1.45; }
.market-inspection { margin-top: 18px; padding-top: 15px; border-top: 2px solid var(--ink); }
.market-inspection .workshop-heading { display: flex; align-items: end; justify-content: space-between; gap: 12px; }
.market-inspection .workshop-heading h3 { margin: 0; font-size: 18px; text-transform: uppercase; }
.market-inspection .workshop-heading > span { color: var(--muted); font-size: 10px; }

@media (max-width: 1350px) and (min-width: 761px) {
  .topbar { grid-template-columns: 130px minmax(0, 1fr) auto 135px 34px; gap: 10px; }
  .tab { padding: 0 10px; font-size: 11px; }
  .tab.active::after { left: 10px; right: 10px; }
  .wallet { padding-right: 12px; }
}

@media (max-width: 1050px) {
  .market-filters { grid-template-columns: repeat(4, minmax(120px, 1fr)); }
  .car-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .garage-car { grid-template-columns: 210px 1fr 1fr; }
  .garage-actions { grid-column: 2 / 4; grid-template-columns: 1fr 1fr; padding-top: 0; }
  .workshop-grid { grid-template-columns: 1fr; }
  .garage-management { grid-template-columns: 1fr; }
  .parts-market-list, .npc-list { grid-template-columns: 1fr; }
  .employee-grid { grid-template-columns: 1fr 1fr; }
  .business-dashboard { grid-template-columns: 1fr 1fr; }
  .ad-slot { grid-template-columns: auto 1fr; }
  .container-grid { grid-template-columns: repeat(2, 1fr); }
  .parts-toolbar { grid-template-columns: 1fr; }
  .admin-player { grid-template-columns: 1fr auto; }
  .part-need-row { grid-template-columns: 130px 1fr; }
  .part-need-action { grid-column: 1 / -1; border-top: 1px solid var(--line); }
  .parts-inventory-grid { grid-template-columns: 1fr 1fr; }
  .admin-actions { grid-column: 1 / -1; }
  .asset-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .utility-nav button { min-width: 0; padding-left: 9px; padding-right: 9px; }
  .utility-nav small { display: none; }
  .auction-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .auction-car-lot { grid-template-columns: 220px 1fr; }
}

@media (max-width: 760px) {
  .business-grid { grid-template-columns: 1fr; }
  .business-metrics, .property-operations { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .legal-page { padding: 0; }
  .legal-page main { padding: 28px 20px 42px; }
  .legal-brand { margin-bottom: 35px; }
  .legal-page h1 { font-size: 29px; }
  .join-screen { display: block; background: var(--dark); }
  .join-visual { min-height: 38vh; height: 38vh; }
  .join-visual img { object-position: 68% center; }
  .join-visual::after { background: linear-gradient(0deg, var(--dark), transparent 55%); }
  .join-panel { padding: 12px 22px 42px; }
  .join-panel h1 { font-size: 43px; }
  .join-copy { margin: 18px 0 24px; font-size: 14px; }
  .auth-fields { grid-template-columns: 1fr; }
  .join-stats { margin-top: 26px; }
  .join-stats strong { font-size: 12px; }
  .topbar { height: 58px; grid-template-columns: 1fr auto auto auto; gap: 9px; padding: 0 14px; }
  .logo { font-size: 20px; }
  .wallet { grid-column: 2; grid-row: 1; border: 0; padding: 0; }
  .wallet span { font-size: 8px; }
  .wallet strong { font-size: 14px; }
  .notification-button { grid-column: 3; grid-row: 1; }
  .section-menu-button { grid-column: 4; grid-row: 1; width: 34px; height: 34px; border: 1px solid #4c453b; background: transparent; place-content: center; gap: 4px; }
  .section-menu-button { display: grid; }
  .section-menu-button i { display: block; width: 14px; height: 2px; background: #c0b9ae; }
  .profile-button { display: none; }
  .tabs { position: fixed; z-index: 45; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(5, 1fr); width: 100%; height: 62px; overflow: visible; border-top: 1px solid #3b352c; background: var(--dark); }
  .tabs > .desktop-team-tab { display: none; }
  .tabs > .mobile-profile-tab { display: block; }
  .tab { min-width: 0; padding: 0 3px; font-size: 9px; white-space: normal; line-height: 1.15; }
  .tab .badge { display: block; width: max-content; height: 16px; min-width: 16px; margin: 3px auto 0; font-size: 8px; }
  .tab.active::after { top: 0; bottom: auto; left: 7px; right: 7px; }
  .utility-nav { position: fixed; z-index: 44; top: 66px; right: 12px; left: 12px; display: none; grid-template-columns: 1fr 1fr; padding: 8px; border: 1px solid #4c453b; background: var(--dark); box-shadow: 0 18px 45px rgba(0,0,0,.35); }
  .utility-nav.open { display: grid; }
  .utility-nav button { min-height: 60px; border: 1px solid #3b352c; padding: 10px; color: #c0b9ae; }
  .utility-nav button:hover, .utility-nav button.active { border-color: var(--accent); background: #2a2620; color: white; }
  .utility-nav small { display: block; color: #847a6b; }
  .content { width: calc(100% - 24px); padding: 24px 0 92px; }
  .section-heading { align-items: start; }
  .section-heading { min-height: 0; margin-bottom: 20px; }
  .section-heading h2 { font-size: 29px; }
  .market-pulse { flex-wrap: wrap; justify-content: flex-end; max-width: 220px; }
  .car-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .market-index[open] { overflow-x: auto; }
  .market-stats-head, .market-stat-row { min-width: 660px; }
  .market-dashboard { grid-template-columns: 1fr 1fr; }
  .market-dashboard strong { font-size: 19px; }
  .market-dashboard > div { padding: 13px; }
  .market-quick-filters { margin-top: 12px; scrollbar-width: none; }
  .market-quick-filters::-webkit-scrollbar { display: none; }
  .mobile-filter-toggle { display: block; width: 100%; min-height: 42px; margin: 8px 0 12px; }
  .market-filters { display: none; grid-template-columns: 1fr 1fr; padding: 12px; }
  .asset-filters { display: grid; }
  .market-filters.mobile-open { display: grid; }
  .market-filters .market-search { grid-column: 1 / -1; }
  .ad-slot-market { display: none; }
  .reward-hero { grid-template-columns: 1fr; }
  .reward-hero .reward-car-art { height: 155px; }
  .reward-title { padding: 20px; }
  .reward-title h2 { font-size: 25px; }
  .reward-stats { grid-template-columns: 1fr 1fr; }
  .car-art { height: 125px; }
  .car-info { padding: 13px; }
  .car-info h3 { font-size: 15px; }
  .car-meta { display: block; line-height: 1.6; }
  .car-meta span { display: block; }
  .car-price-row { display: block; }
  .car-price-row strong { font-size: 17px; }
  .condition { margin-top: 6px; display: block; }
  .garage-car { grid-template-columns: 1fr; }
  .garage-car .car-art { height: 165px; }
  .garage-main, .garage-status, .garage-actions { padding: 15px; }
  .garage-main { padding-bottom: 8px; }
  .garage-management { margin-top: 18px; }
  .garage-management > div { padding: 11px; }
  .garage-status { border-left: 0; border-top: 1px solid var(--line); }
  .garage-actions { grid-column: auto; grid-template-columns: 1fr 1fr; padding-top: 0; }
  .progress-strip { grid-template-columns: 1fr auto; }
  .xp-track { grid-column: 1 / 3; grid-row: 2; }
  .deals-columns { grid-template-columns: 1fr; }
  .contracts-list { grid-template-columns: 1fr; }
  .profile-stats { grid-template-columns: repeat(2, 1fr); }
  .profile-columns { grid-template-columns: 1fr; }
  .site-footer { width: calc(100% - 28px); display: grid; gap: 7px; }
  .ad-slot { grid-template-columns: 1fr; }
  .ad-label { position: absolute; margin: 6px; }
  .store-intro { align-items: start; flex-direction: column; gap: 10px; }
  .store-packages { grid-template-columns: 1fr; }
  .container-grid { grid-template-columns: 1fr; }
  .container-guide { display: flex; gap: 6px; overflow-x: auto; background: transparent; scrollbar-width: none; }
  .container-guide::-webkit-scrollbar { display: none; }
  .container-guide > div { flex: 0 0 78%; border: 1px solid var(--line); }
  .container-visual { height: 145px; }
  .container-info { padding: 14px; }
  .container-info form { grid-template-columns: 1fr; }
  .container-info form button { min-height: 42px; }
  .auction-alert { align-items: start; padding: 11px; }
  .auction-filters { grid-template-columns: 1fr 1fr; }
  .auction-filters span { grid-column: 1 / -1; }
  .auction-car-lot { grid-template-columns: 1fr; }
  .auction-car-preview .car-art { height: 170px; }
  .auction-defects ul { grid-template-columns: 1fr; }
  .asset-grid { grid-template-columns: 1fr; }
  .asset-section-head > span { display: none; }
  .admin-report { grid-template-columns: 1fr; }
  .admin-ban-actions { grid-template-columns: 1fr; }
  .garage-workshop > summary > span, .garage-cars-heading > span, .auction-section-head > span { display: none; }
  .training-strip { align-items: stretch; flex-direction: column; }
  .parts-purchase { grid-template-columns: 1fr; }
  .admin-player { grid-template-columns: 1fr; }
  .admin-actions { grid-column: auto; grid-template-columns: 1fr; }
  .group-car { grid-template-columns: 105px 1fr; }
  .group-car button { grid-column: 1 / 3; margin: 0 10px 10px; }
  .leader-head, .leader-row { grid-template-columns: 1fr 64px 100px; padding: 0 12px; font-size: 12px; }
  .leader-head { font-size: 9px; }
  .modal { padding: 10px; }
  .modal-panel { max-height: calc(100dvh - 20px); }
  .modal-car-art { height: 155px; }
  .modal-body { padding: 20px; }
  .modal-body h2 { font-size: 27px; }
  .inspection-grid { grid-template-columns: 1fr 1fr; }
  .seller-summary { grid-template-columns: 1fr 1fr; }
  .active-job-grid { grid-template-columns: 1fr; }
  .parts-summary { grid-template-columns: 1fr 1fr; }
  .parts-hub-panel { padding: 14px; }
  .parts-panel-heading { align-items: start; flex-direction: column; gap: 5px; }
  .part-need-row { grid-template-columns: 1fr; }
  .part-need-car { min-height: 82px; }
  .part-need-info { border-right: 0; border-bottom: 1px solid var(--line); }
  .part-need-action { grid-column: auto; border-top: 0; }
  .parts-filters { grid-template-columns: 1fr; }
  .exchange-part { grid-template-columns: 1fr auto; gap: 9px; }
  .exchange-price { text-align: right; }
  .exchange-part > button { grid-column: 1 / -1; width: 100%; }
}

/* Mobile touch layout: every action gets its own predictable row. */
@media (max-width: 760px) {
  button, input, select { min-height: 44px; }
  .content { overflow-x: hidden; }
  .section-heading { display: block; }
  .section-heading .market-pulse { justify-content: flex-start; max-width: none; margin-top: 8px; }
  .market-quick-filters { padding-bottom: 2px; }
  .market-quick-filters .quick-filter { flex: 0 0 auto; min-height: 42px; padding: 0 12px; }
  .market-filters { grid-template-columns: 1fr; gap: 10px; }
  .market-filters .market-search { grid-column: auto; }
  .market-filters > button { width: 100%; }
  .asset-summary, .parts-summary, .business-dashboard { grid-template-columns: 1fr 1fr; }
  .asset-summary > div, .parts-summary > div, .business-dashboard > div { min-width: 0; padding: 12px 10px; }
  .asset-summary strong, .parts-summary strong, .business-dashboard strong { font-size: 16px; overflow-wrap: anywhere; }
  .asset-card-body { min-width: 0; }
  .asset-buy { display: grid; grid-template-columns: 1fr; gap: 8px; align-items: stretch; }
  .asset-buy button { width: 100%; }
  .owned-asset { grid-template-columns: 1fr; gap: 12px; padding: 14px; }
  .owned-asset > div:last-child { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; align-items: center; }
  .owned-asset > div:last-child button { grid-column: 1 / -1; width: 100%; }
  .property-actions, .business-actions, .garage-actions, .group-car-actions { display: grid; grid-template-columns: 1fr; gap: 8px; }
  .property-actions button, .business-actions button, .garage-actions button, .group-car-actions button { width: 100%; }
  .property-operations { gap: 1px; }
  .property-operations > span { min-width: 0; padding: 9px 7px; }
  .property-operations strong { overflow-wrap: anywhere; }
  .clothing-item { grid-template-columns: 82px minmax(0, 1fr); gap: 10px; }
  .clothing-item > div:last-child { grid-column: 1 / -1; }
  .clothing-list-control { grid-template-columns: 1fr; }
  .clothing-list-control button { width: 100%; }
  .crypto-trade { grid-template-columns: 1fr; }
  .crypto-trade label { grid-column: auto; }
  .crypto-trade button { width: 100%; }
  .item-container { grid-template-columns: 1fr; gap: 9px; }
  .item-container > div:nth-child(2) { display: flex; align-items: baseline; justify-content: space-between; }
  .item-container time { margin-top: 0; }
  .item-container form { grid-template-columns: 1fr; }
  .item-container form button { width: 100%; }
  .property-detail-kpis, .property-costs { gap: 1px; }
  .property-detail-kpis > div, .property-costs > span { min-width: 0; padding: 10px 8px; }
  .property-detail-kpis strong, .property-costs strong { font-size: 12px; overflow-wrap: anywhere; }
  .modal { align-items: end; padding: 0; }
  .modal-panel { width: 100%; max-width: none; max-height: calc(100dvh - 8px); border-radius: 12px 12px 0 0; }
  .modal-body { padding: 16px 14px 24px; }
  .modal-action-row, .offer-actions, .inspection-actions { grid-template-columns: 1fr; display: grid; gap: 8px; }
  .modal-action-row button, .offer-actions button, .inspection-actions button { width: 100%; }
  .tabs { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .tab { min-height: 62px; overflow-wrap: anywhere; }
}

/* Trading, wardrobe market and property analytics. */
#assets-view #clothing-inventory-panel { display: none !important; }
.crypto-terminal { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 12px; margin-bottom: 18px; }
.crypto-quote-tabs { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 7px; }
.crypto-quote-tabs button { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; min-height: 64px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-m); background: white; color: var(--ink); text-align: left; }
.crypto-quote-tabs button.active { border-color: var(--accent); background: #eff6ff; box-shadow: inset 0 -3px 0 var(--accent); }
.crypto-quote-tabs span { font-family: var(--font-mono); font-size: 12px; text-align: right; }
.crypto-quote-tabs small { grid-column: 1 / -1; font-size: 10px; }
.crypto-chart-panel { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-m); background: white; }
#crypto-chart-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
#crypto-chart-head span, #crypto-chart-head strong { display: block; }
#crypto-chart-head strong { margin-top: 3px; font-family: var(--font-mono); font-size: 21px; }
#crypto-chart-head small { color: var(--muted); font-size: 9px; }
.crypto-trade { display: grid; grid-template-columns: 1fr 1fr; align-content: end; gap: 8px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-m); background: white; }
.crypto-trade label { grid-column: 1 / -1; color: var(--muted); font-size: 10px; font-weight: 700; }
.crypto-trade input, .clothing-list-control input, .item-container input { width: 100%; min-width: 0; min-height: 42px; margin-top: 6px; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px; background: #f8fafc; color: var(--ink); font: 12px var(--font-mono); }
.market-chart { min-height: 190px; }
.market-chart svg { display: block; width: 100%; height: 170px; overflow: visible; }
.market-chart line { stroke: #e5e7eb; stroke-width: .35; }
.market-chart polyline { fill: none; stroke-width: 1.4; vector-effect: non-scaling-stroke; }
.market-chart polyline.up { stroke: #079455; }
.market-chart polyline.down { stroke: #d92d20; }
.chart-range { display: flex; justify-content: space-between; color: var(--muted); font: 9px var(--font-mono); }
.clothing-list-control { display: grid; grid-template-columns: minmax(90px, 1fr) auto; gap: 6px; margin-top: 8px; }
.clothing-list-control input { margin: 0; }
.clothing-market, .item-container-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 9px; }
.clothing-market-lot { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 7px 12px; min-height: 94px; padding: 13px; border: 1px solid var(--line); border-radius: var(--radius-m); background: white; }
.clothing-market-lot span, .clothing-market-lot small, .item-container span, .item-container small { display: block; color: var(--muted); font-size: 9px; }
.clothing-market-lot > strong { font-family: var(--font-mono); }
.clothing-market-lot button { grid-column: 2; }
.item-container { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 14px; border: 1px solid var(--line); border-left: 4px solid #98a2b3; border-radius: var(--radius-m); background: white; }
.item-container.rarity-rare { border-left-color: #2e90fa; }.item-container.rarity-epic { border-left-color: #7f56d9; }.item-container.rarity-legendary { border-left-color: #f79009; }
.item-container > div > strong, .item-container time { display: block; }
.item-container time { margin-top: 4px; color: var(--muted); font: 10px var(--font-mono); text-align: right; }
.item-container form { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr auto; gap: 7px; }
.item-container form input { margin: 0; }
.leading-bid-note { grid-column: 1 / -1; padding: 8px 10px; background: #ecfdf3; color: #067647 !important; font-weight: 800; }
.property-detail-panel { width: min(880px, calc(100vw - 28px)); }
.property-detail-head { padding-right: 42px; }
.property-detail-head h2 { margin: 4px 0 7px; font-size: 26px; }
.property-detail-head > p:last-child { color: var(--muted); }
.property-detail-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin: 20px 0; background: var(--line); border: 1px solid var(--line); }
.property-detail-kpis > div { padding: 13px; background: white; }
.property-detail-kpis span, .property-costs span { color: var(--muted); font-size: 9px; }
.property-detail-kpis strong, .property-costs strong { display: block; margin-top: 5px; font: 14px var(--font-mono); color: var(--ink); }
.property-chart { padding: 16px; border: 1px solid var(--line); background: #f8fafc; }
.property-chart > div:first-child { display: flex; justify-content: space-between; margin-bottom: 8px; }
.property-chart > div:first-child span { color: var(--muted); font-size: 10px; }
.property-costs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 12px; }
.property-costs > span { padding: 12px; border-bottom: 2px solid var(--line); }
.asset-property, .owned-property { cursor: pointer; }

@media (max-width: 760px) {
  .crypto-terminal { grid-template-columns: 1fr; }
  .crypto-quote-tabs { display: flex; overflow-x: auto; scrollbar-width: none; }
  .crypto-quote-tabs button { flex: 0 0 150px; }
  .crypto-chart-panel, .crypto-trade { grid-column: 1; }
  .market-chart { min-height: 150px; }.market-chart svg { height: 130px; }
  .property-detail-kpis, .property-costs { grid-template-columns: repeat(2, 1fr); }
  .property-detail-head h2 { font-size: 22px; }
  .clothing-market, .item-container-grid { grid-template-columns: 1fr; }
}

/* Final mobile nav override: keep the five primary destinations inside an iPhone viewport. */
@media screen and (max-width: 760px) {
  .tabs > .desktop-collection-tab { display: none !important; }
  .tabs { display: grid !important; grid-template-columns: repeat(5, minmax(0, 1fr)) !important; width: 100vw !important; max-width: 100vw !important; overflow: hidden !important; }
  .tabs > .desktop-team-tab,
  .tabs > [data-view="business"] { display: none !important; }
  .tabs > [data-view="market"],
  .tabs > [data-view="garage"],
  .tabs > [data-view="auctions"],
  .tabs > [data-view="assets"],
  .tabs > .more-sections-tab { display: flex !important; min-width: 0 !important; width: auto !important; max-width: none !important; overflow: hidden !important; }
  .tabs > .desktop-collection-tab { display: none !important; }
  .tabs > .more-sections-tab { padding-inline: 2px !important; font-size: 10px !important; white-space: nowrap; }
}

/* Compact workspaces keep long management pages focused without hiding mechanics. */
.workspace-switcher {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin: 0 0 18px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: #eee7d8;
}
#garage-view .workspace-switcher { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.workspace-switcher button {
  min-width: 0;
  min-height: 54px;
  display: grid;
  align-content: center;
  gap: 3px;
  border: 1px solid transparent;
  border-radius: var(--radius-s);
  padding: 8px 14px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}
.workspace-switcher button:hover { color: var(--ink); background: rgba(255,255,255,.55); }
.workspace-switcher button.active { border-color: #d6cbb4; background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(32,27,21,.08); }
.workspace-switcher button span { overflow: hidden; color: var(--muted); font-size: 9px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.workspace-panel[hidden] { display: none !important; }
#garage-cars-panel .garage-cars-heading { margin-top: 6px; }
#garage-development-panel .progress-strip { margin-top: 0; }
#garage-development-panel .garage-workshop { margin-top: 14px; }
#profile-overview-panel .developer-note { margin-top: 14px; }
#profile-progress-panel .profile-columns,
#profile-history-panel .deal-history-panel { margin-top: 0; }
.field-hint { display: block; margin-top: 6px; color: var(--muted); font-size: 9px; font-weight: 500; line-height: 1.4; }

@media (max-width: 760px) {
  .workspace-switcher { position: sticky; z-index: 12; top: 8px; gap: 4px; margin-bottom: 12px; padding: 4px; box-shadow: 0 5px 18px rgba(32,27,21,.1); }
  .workspace-switcher button { min-height: 48px; padding: 7px 9px; font-size: 11px; text-align: center; }
  .workspace-switcher button span { font-size: 8px; }
  #profile-view .workspace-switcher button span { display: none; }
  #garage-cars-panel .garage-cars-heading { margin-top: 10px; }
  #profile-overview-panel .profile-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #profile-overview-panel .developer-note { padding: 16px; }
}

@media (max-width: 430px) {
  .join-stats { grid-template-columns: 1fr 1fr; }
  .join-stats div:last-child { display: none; }
  .car-grid { grid-template-columns: 1fr; }
  .car-art { height: 170px; }
  .garage-actions { grid-template-columns: 1fr; }
  .upgrade-grid, .inspection-actions { grid-template-columns: 1fr; }
  .section-heading { display: block; }
  .market-pulse { justify-content: flex-start; max-width: none; margin-top: 14px; }
  .garage-value, .my-profit { margin-top: 15px; text-align: left; }
  .modal-action-row { align-items: stretch; flex-direction: column; }
  .service-diagnostic { align-items: stretch; flex-direction: column; }
  .market-comparison { grid-template-columns: 1fr; }
  .market-filters button { width: 100%; }
  .market-index-head > span { display: none; }
  .reward-market-note { display: block; }
  .reward-market-note strong, .reward-market-note span { display: block; }
  .reward-market-note span { margin-top: 6px; }
  .chat-form { grid-template-columns: 1fr; }
  .asset-filters { grid-template-columns: 1fr; }
  .asset-mode-controls { display: flex; overflow-x: auto; }
  .asset-mode-controls button { flex: 0 0 42%; }
  .property-income-panel { grid-template-columns: 1fr auto; gap: 14px; padding: 14px; }
  .property-income-panel > button { grid-column: 1 / -1; }
  .asset-section-head { align-items: start; }
  .owned-asset { grid-template-columns: 1fr; }
  .owned-asset > div:last-child { grid-template-columns: 1fr auto; text-align: left; }
  .auction-filters { grid-template-columns: 1fr; }
  .auction-car-title { align-items: start; flex-direction: column; }
  .auction-car-content form { grid-template-columns: 1fr; }
  .profile-hero { grid-template-columns: auto 1fr; padding: 20px; }
  .profile-capital { grid-column: 1 / 3; text-align: left; }
  .profile-reputation { grid-column: 1 / 3; text-align: left; }
  .parts-market-panel, .group-panel, .npc-panel, .admin-panel { padding: 14px; }
  .part-lot, .part-lot.inventory { grid-template-columns: 1fr auto; align-items: start; }
  .part-lot > div:first-child { min-width: 0; }
  .part-lot > button, .part-list-action { grid-column: 1 / -1; }
  .part-list-action { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
  .part-list-action input { width: 100%; }
  .group-summary > div, .group-create { display: grid; grid-template-columns: 1fr; }
  .group-member { align-items: start; flex-direction: column; }
  .group-member select { width: 100%; }
  .repair-actions { width: 100%; min-width: 0; }
  .repair-actions select { width: 100%; max-width: none; }
  .defect-row { grid-template-columns: 1fr; }
  .defect-row span:nth-child(2) { display: none; }
  .employee-grid { grid-template-columns: 1fr; }
  .group-section-title { align-items: start; flex-direction: column; }
  .parts-mode-controls button { min-height: 54px; padding: 5px; font-size: 9px; line-height: 1.25; }
  .parts-mode-controls span { display: block; width: max-content; margin: 4px auto 0; }
  .quality-offers, .install-actions, .parts-inventory-grid { grid-template-columns: 1fr; }
  .parts-car-switcher { margin-right: -14px; padding-right: 14px; }
  .parts-car-switcher button { min-width: 138px; }
  .quality-offers button { min-height: 66px; }
  .inventory-part .part-list-action { grid-template-columns: 1fr; }
  .inventory-part .part-list-action button { min-height: 40px; }
  .offer-form, .bid-form { display: grid; grid-template-columns: 1fr; }
  .offer-form input, .bid-form input { width: 100%; min-width: 0; }
  .seller-summary, .inspection-grid, .reward-stats { grid-template-columns: 1fr 1fr; }
}

/* Interface refresh: a neutral classifieds workspace with restrained status colors. */
:root {
  --ink: #182230;
  --muted: #667085;
  --paper: #f3f5f7;
  --surface: #ffffff;
  --line: #dfe3e8;
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --green: #16825d;
  --yellow: #d97706;
  --dark: #111827;
  --danger: #c2413a;
  --font-display: Arial, Helvetica, sans-serif;
  --font-body: Arial, Helvetica, sans-serif;
  --shadow-card: 0 1px 2px rgba(16,24,40,.05);
  --shadow-lift: 0 10px 24px rgba(16,24,40,.10);
  --shadow-deep: 0 24px 64px rgba(16,24,40,.26);
}

* { letter-spacing: 0 !important; }
body { background: var(--paper); }
h1, h2, h3, h4 { text-transform: none !important; }
.eyebrow { color: #526071; text-transform: none; font-weight: 700; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline-color: rgba(37,99,235,.3); }
input, select, textarea { border-radius: 5px; color: var(--ink); background: var(--surface); }

.join-screen { background: var(--dark); }
.join-visual img { opacity: .64; filter: saturate(.75) contrast(1.06); }
.join-visual::after { background: rgba(17,24,39,.16); }
.join-panel { color: #f8fafc; background: var(--dark); }
.join-panel .eyebrow, .join-brand span, .logo span { color: #60a5fa; }
.join-copy, .join-panel label { color: #cbd5e1; }
.auth-fields input { border-color: #475569; background: #1e293b; }
.auth-actions button, .empty-state button { background: #3b82f6; color: white; }
.auth-actions button:hover, .empty-state button:hover { background: #2563eb; }

.topbar { border-color: var(--line); background: rgba(255,255,255,.98); box-shadow: 0 1px 3px rgba(16,24,40,.06); }
.logo { font-size: 22px; font-weight: 700; text-transform: none; }
.tab { color: #667085; font-weight: 600; }
.tab:hover, .tab.active { color: #1d4ed8; }
.tab.active::after { background: var(--accent); }
.badge { background: #eef2f6; color: #526071; }
.profile-button > span:first-child { background: #e8eef8; color: #1d4ed8; }
.notification-button { border-color: var(--line); color: #526071; }

.utility-nav { gap: 2px; border-color: var(--line); background: rgba(255,255,255,.98); }
.utility-nav button { color: #526071; }
.utility-nav button:hover, .utility-nav button.active { border-bottom-color: var(--accent); background: #eff6ff; color: #1d4ed8; }
.utility-group-label { align-self: center; margin: 0 5px 0 14px; color: #98a2b3; font-size: 9px; font-weight: 700; text-transform: uppercase; }
.utility-spacer { flex: 1; }
.utility-team-link { display: none; }

.section-heading h2 { font-weight: 700; }
.market-dashboard > div, .market-filters, .asset-filters, .auction-filters,
.car-card, .garage-car, .admin-panel, .profile-columns > section, .deal-history-panel,
.activity-board, .container-card, .auction-car-lot { border-color: var(--line); background: var(--surface); box-shadow: var(--shadow-card); }
.market-dashboard strong, .car-price-row strong { font-family: Arial, Helvetica, sans-serif; }
.car-card::after { display: none; }
.car-card:hover { border-color: #b8c0cc; }
.price-signal { background: #eaf7f1; color: #11684b; }
.auction-defects { background: #f5f7fa; }
.auction-alert { border-left-color: #f59e0b; background: #fff8e8; }

.primary-button, .secondary-button, .danger-button { min-height: 40px; border-radius: 5px; font-size: 12px; font-weight: 700; }
.primary-button { border-color: var(--accent); background: var(--accent); color: white; }
.primary-button:hover { border-color: var(--accent-dark); background: var(--accent-dark); color: white; }
.primary-button:disabled { border-color: #d0d5dd; background: #e4e7ec; color: #98a2b3; cursor: not-allowed; }
.secondary-button { border-color: #cfd5dd; background: white; color: #344054; }
.secondary-button:hover { border-color: #98a2b3; background: #f8fafc; }
.danger-button { border-color: #e0aaa5; background: white; color: var(--danger); }
.danger-button:hover { background: var(--danger); color: white; }

.container-card { border: 1px solid var(--line); border-top: 4px solid var(--box-color); }
.container-visual { background: #edf0f4; }
.container-visual > span { border-radius: 4px; background: rgba(17,24,39,.88); }
.container-info h3 { text-transform: none; }
.player-bid-status { transform: translateX(-50%); border-radius: 12px; text-transform: none; box-shadow: none; }
.outbid-lot { box-shadow: inset 0 0 0 2px var(--danger); }
.container-info form { grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 8px; }
.container-info form label { display: grid; gap: 4px; color: #667085; font-size: 10px; font-weight: 700; }
.container-info form input { width: 100%; height: 42px; border-color: #cfd5dd; padding: 0 11px; font-size: 14px; font-variant-numeric: tabular-nums; }
.leading-bid-note { min-height: 64px; display: grid; align-content: center; gap: 3px; padding: 10px 12px; border: 1px solid #a8dfc8; border-radius: 5px; background: #effaf5; }
.leading-bid-note strong, .leading-bid-note span { display: block; }
.leading-bid-note strong { color: #11684b; font-size: 12px; }
.leading-bid-note span { color: #527066; font-size: 10px; line-height: 1.4; }

.profile-hero { grid-template-columns: auto minmax(260px, 1fr) auto auto; align-items: center; border: 1px solid var(--line); border-radius: 6px; padding: 24px; background: white; color: var(--ink); box-shadow: var(--shadow-card); }
.profile-monogram { width: 64px; height: 64px; border-radius: 50%; background: #e8eef8; color: #1d4ed8; font-size: 25px; font-weight: 700; }
.profile-hero h3 { font-size: 25px; font-weight: 700; text-transform: none; }
.profile-hero p:last-child { color: var(--muted); }
.profile-identity { min-width: 0; }
.profile-identity .eyebrow { margin: 0 0 2px; }
.profile-level-track { width: min(320px, 100%); height: 5px; margin-top: 11px; overflow: hidden; border-radius: 3px; background: #e9edf2; }
.profile-level-track i { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.profile-identity > small { display: block; margin-top: 5px; color: #7b8492; font-size: 9px; }
.profile-capital, .profile-reputation { min-width: 132px; padding-left: 20px; border-left: 1px solid var(--line); text-align: left; }
.profile-capital span, .profile-reputation span { color: var(--muted); font-size: 10px; text-transform: none; }
.profile-capital strong, .profile-reputation strong { margin-top: 5px; color: var(--ink); font-size: 20px; }
.profile-reputation strong { color: #11684b; }
.profile-shortcuts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 12px 0; }
.profile-shortcuts button { min-height: 74px; display: grid; align-content: center; gap: 5px; border: 1px solid var(--line); border-radius: 6px; padding: 12px 14px; background: white; color: var(--ink); text-align: left; }
.profile-shortcuts button:hover { border-color: #9db7e8; background: #f7faff; }
.profile-shortcuts strong, .profile-shortcuts span { display: block; }
.profile-shortcuts strong { color: #1d4ed8; font-size: 12px; }
.profile-shortcuts span { color: var(--muted); font-size: 10px; line-height: 1.35; }
.profile-stats { grid-template-columns: repeat(6, 1fr); gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: var(--line); }
.profile-stats div { min-height: 76px; border: 0; padding: 14px; }
.profile-stats span { font-size: 10px; text-transform: none; }
.profile-stats strong { margin-top: 7px; font-size: 17px; }
.profile-columns { gap: 12px; margin-top: 12px; }
.profile-columns > section { border: 1px solid var(--line); border-radius: 6px; }
.profile-columns h3 { font-size: 18px; text-transform: none; }
.profile-list > div { min-height: 54px; font-size: 11px; }
.deal-history-panel { margin-top: 12px; }
.developer-note { border-left-color: #94a3b8; background: #f8fafc; }

.admin-panel { border: 1px solid var(--line); border-radius: 6px; }
.admin-panel h3 { text-transform: none; }
.admin-players { gap: 12px; }
.admin-player { display: grid; grid-template-columns: minmax(220px, .8fr) minmax(210px, .55fr) minmax(520px, 1.65fr); align-items: start; gap: 18px; border: 1px solid var(--line); border-radius: 6px; padding: 16px; background: white; }
.admin-player.banned { border-left: 4px solid var(--danger); background: #fffafa; }
.admin-player header { display: flex; align-items: center; gap: 10px; }
.admin-player-avatar { width: 38px; height: 38px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: #eef2f6; color: #344054; font-weight: 700; }
.admin-player b { color: var(--danger); }
.admin-current-values { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.admin-current-values span { padding: 9px 10px; border-radius: 5px; background: #f5f7fa; color: var(--muted); font-size: 9px; }
.admin-current-values strong { margin-top: 4px; color: var(--ink); font-size: 13px; }
.admin-player-tools { gap: 8px; }
.admin-value-row { display: grid; grid-template-columns: 180px minmax(150px, 1fr) auto; align-items: end; gap: 7px; }
.admin-value-row label, .admin-reason { display: grid; gap: 4px; color: var(--muted); font-size: 9px; font-weight: 700; }
.admin-value-row input, .admin-value-row select, .admin-reason input { min-width: 0; width: 100%; height: 38px; border: 1px solid #cfd5dd; padding: 0 9px; }
.admin-reason { margin: 2px 0; }
.admin-ban-actions select, .admin-ban-actions input { border-color: #cfd5dd; border-radius: 5px; }

@media (max-width: 1120px) {
  .utility-group-label { display: none; }
  .admin-player { grid-template-columns: 1fr 1fr; }
  .admin-player-tools { grid-column: 1 / -1; }
  .profile-stats { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 760px) {
  .utility-nav { gap: 6px; background: white; }
  .utility-nav .utility-team-link { display: block; }
  .utility-nav .utility-spacer, .utility-nav .utility-group-label { display: none; }
  .utility-nav button { border-color: var(--line); color: #475467; }
  .utility-nav button:hover, .utility-nav button.active { border-color: #9db7e8; background: #eff6ff; color: #1d4ed8; }
  .tabs { background: white; }
  .tab { color: #7b8492; }
  .tab:hover, .tab.active { color: #1d4ed8; }
  .profile-hero { grid-template-columns: auto 1fr; padding: 17px; }
  .profile-capital, .profile-reputation { grid-column: auto; min-width: 0; padding: 13px 0 0; border-top: 1px solid var(--line); border-left: 0; }
  .profile-capital { grid-column: 1; }
  .profile-reputation { grid-column: 2; }
  .profile-shortcuts { grid-template-columns: 1fr 1fr; }
  .profile-stats { grid-template-columns: repeat(2, 1fr); }
  .container-info form { grid-template-columns: 1fr; }
  .admin-player { grid-template-columns: 1fr; padding: 13px; }
  .admin-player-tools { grid-column: auto; }
  .admin-value-row { grid-template-columns: 1fr; padding-top: 8px; border-top: 1px solid var(--line); }
  .admin-current-values { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 430px) {
  .profile-shortcuts { grid-template-columns: 1fr; }
  .profile-shortcuts button { min-height: 64px; }
  .profile-monogram { width: 52px; height: 52px; }
  .profile-hero h3 { font-size: 21px; }
  .profile-capital strong, .profile-reputation strong { font-size: 17px; }
}

/* A missing photo must never fall back to the old illustrated car silhouette. */
.car-art::before,
.car-art::after,
.car-art .car-window,
.car-art .wheel,
.car-art .car-make {
  display: none !important;
  content: none !important;
}
.car-art.photo-failed {
  background: #eee9dc;
}
.car-art.photo-failed .photo-placeholder {
  display: grid;
}

/* Final cascade for the refreshed workspace. */
body { background: var(--paper); }
h1, h2, h3, h4, .logo, .profile-monogram { font-family: Arial, Helvetica, sans-serif; text-transform: none !important; }
.eyebrow { color: #526071; text-transform: none; }
.topbar, .utility-nav { background: rgba(255,255,255,.98); border-color: var(--line); }
.logo { color: var(--ink); font-weight: 700; }
.logo span { color: var(--accent); }
.tab { color: #667085; }
.tab:hover, .tab.active { color: var(--accent-dark); }
.tab.active::after { background: var(--accent); }
.utility-nav { gap: 2px; justify-content: flex-start; }
.utility-nav button { min-width: auto; color: #526071; text-align: center; }
.utility-nav span { text-transform: none; }
.utility-nav button:hover, .utility-nav button.active { border-bottom-color: var(--accent); background: #eff6ff; color: var(--accent-dark); }
.utility-group-label { align-self: center; margin: 0 5px 0 14px; color: #98a2b3; font-size: 9px; font-weight: 700; text-transform: uppercase; }
.utility-spacer { flex: 1; }
.utility-team-link { display: none; }
.primary-button { border-color: var(--accent); background: var(--accent); color: white; }
.primary-button:hover { border-color: var(--accent-dark); background: var(--accent-dark); color: white; }
.secondary-button { border-color: #cfd5dd; background: white; color: #344054; }
.secondary-button:hover { border-color: #98a2b3; background: #f8fafc; }
.car-card::after { display: none; }
.container-card { border: 1px solid var(--line); border-top: 4px solid var(--box-color); }
.container-visual { background: #edf0f4; }
.container-info h3, .admin-panel h3 { text-transform: none; }
.player-bid-status { transform: translateX(-50%); border-radius: 12px; text-transform: none; box-shadow: none; }
.outbid-lot { box-shadow: inset 0 0 0 2px var(--danger); }
.container-info form { grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 8px; }
.container-info form label { display: grid; gap: 4px; color: var(--muted); font-size: 10px; font-weight: 700; }
.container-info form input { width: 100%; height: 42px; border-color: #cfd5dd; padding: 0 11px; font-size: 14px; }
.leading-bid-note { min-height: 64px; display: grid; align-content: center; gap: 3px; padding: 10px 12px; border: 1px solid #a8dfc8; border-radius: 5px; background: #effaf5; }
.leading-bid-note strong, .leading-bid-note span { display: block; }
.leading-bid-note strong { color: #11684b; font-size: 12px; }
.leading-bid-note span { color: #527066; font-size: 10px; line-height: 1.4; }
.profile-hero { grid-template-columns: auto minmax(260px, 1fr) auto auto; align-items: center; border: 1px solid var(--line); border-radius: 6px; padding: 24px; background: white; color: var(--ink); box-shadow: var(--shadow-card); }
.profile-monogram { width: 64px; height: 64px; border-radius: 50%; background: #e8eef8; color: var(--accent-dark); font-size: 25px; font-weight: 700; }
.profile-hero h3 { font-size: 25px; font-weight: 700; }
.profile-hero p:last-child { color: var(--muted); }
.profile-identity { min-width: 0; }
.profile-identity h3 { max-width: 100%; overflow-wrap: anywhere; word-break: break-word; }
.profile-level-track { width: min(320px, 100%); height: 5px; margin-top: 11px; overflow: hidden; border-radius: 3px; background: #e9edf2; }
.profile-level-track i { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.profile-identity > small { display: block; margin-top: 5px; color: #7b8492; font-size: 9px; }
.profile-capital, .profile-reputation { min-width: 132px; padding-left: 20px; border-left: 1px solid var(--line); text-align: left; }
.profile-capital span, .profile-reputation span { color: var(--muted); font-size: 10px; text-transform: none; }
.profile-capital strong, .profile-reputation strong { margin-top: 5px; color: var(--ink); font-size: 20px; }
.profile-reputation strong { color: #11684b; }
.profile-shortcuts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 12px 0; }
.profile-shortcuts button { min-height: 74px; display: grid; align-content: center; gap: 5px; border: 1px solid var(--line); border-radius: 6px; padding: 12px 14px; background: white; color: var(--ink); text-align: left; }
.profile-shortcuts button:hover { border-color: #9db7e8; background: #f7faff; }
.profile-shortcuts strong { color: var(--accent-dark); font-size: 12px; }
.profile-shortcuts span { color: var(--muted); font-size: 10px; line-height: 1.35; }
.profile-stats { grid-template-columns: repeat(6, 1fr); gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: var(--line); }
.profile-stats div { min-height: 76px; border: 0; padding: 14px; }
.profile-stats span { font-size: 10px; text-transform: none; }
.profile-columns { gap: 12px; margin-top: 12px; }
.profile-columns > section { border: 1px solid var(--line); border-radius: 6px; }
.profile-columns h3 { font-size: 18px; text-transform: none; }
.deal-history-panel { margin-top: 12px; }
.developer-note { border-left-color: #94a3b8; background: #f8fafc; }
.admin-panel { border: 1px solid var(--line); border-radius: 6px; }
.admin-players { gap: 12px; }
.admin-player { grid-template-columns: minmax(220px,.8fr) minmax(210px,.55fr) minmax(520px,1.65fr); align-items: start; gap: 18px; border-radius: 6px; padding: 16px; background: white; }
.admin-player.banned { border-left: 4px solid var(--danger); background: #fffafa; }
.admin-player header { display: flex; align-items: center; gap: 10px; }
.admin-player-avatar { width: 38px; height: 38px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: #eef2f6; font-weight: 700; }
.admin-current-values { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.admin-current-values span { padding: 9px 10px; border-radius: 5px; background: #f5f7fa; color: var(--muted); font-size: 9px; }
.admin-current-values strong { margin-top: 4px; color: var(--ink); font-size: 13px; }
.admin-value-row { display: grid; grid-template-columns: 180px minmax(150px,1fr) auto; align-items: end; gap: 7px; }
.admin-value-row label, .admin-reason { display: grid; gap: 4px; color: var(--muted); font-size: 9px; font-weight: 700; }
.admin-value-row input, .admin-value-row select, .admin-reason input { min-width: 0; width: 100%; height: 38px; border: 1px solid #cfd5dd; padding: 0 9px; }

@media (max-width: 1120px) {
  .utility-group-label { display: none; }
  .profile-stats { grid-template-columns: repeat(3, 1fr); }
  .admin-player { grid-template-columns: 1fr 1fr; }
  .admin-player-tools { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .utility-nav .utility-team-link { display: block; }
  .utility-nav .utility-spacer, .utility-nav .utility-group-label { display: none; }
  .utility-nav button { color: #475467; text-align: left; }
  .tabs { background: white; }
  .tab, .tab:hover, .tab.active { color: var(--accent-dark); }
  .wallet { min-width: 0; }
  .wallet strong { max-width: 92px; overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
  .notification-button { overflow: hidden; }
  .profile-hero { grid-template-columns: auto 1fr; padding: 17px; }
  .profile-capital, .profile-reputation { grid-column: auto; min-width: 0; padding: 13px 0 0; border-top: 1px solid var(--line); border-left: 0; }
  .profile-shortcuts, .profile-stats { grid-template-columns: 1fr 1fr; }
  .auction-filters { grid-template-columns: 1fr 1fr; }
  .auction-filters > * { min-width: 0; }
  .auction-filters span { grid-column: 1 / -1; width: auto; white-space: normal; }
  .container-info form, .admin-player, .admin-value-row { grid-template-columns: 1fr; }
  .admin-player-tools { grid-column: auto; }
}
@media (max-width: 430px) {
  .profile-shortcuts { grid-template-columns: 1fr; }
  .profile-monogram { width: 52px; height: 52px; }
  .profile-hero h3 { font-size: 18px; line-height: 1.2; }
}

.activity-board { margin: 18px 0 20px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--surface); box-shadow: var(--shadow-card); }
.activity-board-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.activity-board-head h3 { margin: 0; font-size: 20px; }
.activity-board-head > span { color: var(--muted); font-size: 11px; font-weight: 700; }
.activity-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.activity-card { display: flex; min-width: 0; flex-direction: column; padding: 14px; border: 1px solid var(--line); background: #fdfbf6; }
.activity-card.completed { border-color: #a7b9a8; background: #eef3ed; }
.activity-card-top { display: flex; align-items: center; justify-content: space-between; gap: 7px; }
.activity-index { color: var(--accent-dark); font-family: var(--font-mono); font-size: 10px; font-weight: 800; }
.activity-reward { color: var(--green); font-size: 9px; font-weight: 800; white-space: nowrap; }
.activity-card h4 { margin: 14px 0 5px; font-size: 14px; }
.activity-card p { min-height: 45px; margin: 0 0 9px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.activity-card small { min-height: 25px; margin-bottom: 9px; color: var(--accent-dark); font-size: 9px; }
.activity-card small.ready { color: var(--green); }
.activity-card button { width: 100%; margin-top: auto; min-height: 38px; padding: 0 8px; font-size: 10px; }
.activity-card button:disabled { border-color: #cfd5cd; background: #dfe6df; color: #6e796f; cursor: default; }
.sequence-grid, .choice-grid, .risk-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin: 18px 0; }

.wire-board { display:grid; grid-template-columns:1fr 1fr; gap:28px; margin:20px 0; }
.wire-board > div { display:grid; gap:9px; }
.wire { display:flex; align-items:center; gap:10px; padding:12px; border:1px solid var(--line); border-radius:var(--radius-m); background:var(--paper); cursor:pointer; }
.wire i { width:16px; height:16px; border-radius:50%; background:currentColor; box-shadow:0 0 0 3px color-mix(in srgb,currentColor 20%,transparent); }
.wire[data-wire-color="Красный"] { color:#c94b43; } .wire[data-wire-color="Синий"] { color:#4775c9; } .wire[data-wire-color="Жёлтый"] { color:#c39128; } .wire[data-wire-color="Зелёный"] { color:#4d9b62; }
.wire.selected { outline:2px solid var(--ink); } .wire.matched { opacity:.45; text-decoration:line-through; } .wire.wrong { background:#f5d7d2; }
.vin-compare { display:grid; gap:14px; margin:20px 0; } .vin-compare > div { padding:14px; border:1px solid var(--line); border-radius:var(--radius-m); background:var(--paper); } .vin-compare small { display:block; margin-bottom:8px; color:var(--muted); } .vin-compare strong { letter-spacing:2px; }
.vin-digits { display:flex; flex-wrap:wrap; gap:4px; } .vin-digits button { min-width:28px; padding:8px 4px; border:1px solid var(--line); background:#fff; cursor:pointer; font-weight:700; }
.edit-listing-form { display:flex; align-items:end; gap:8px; margin:12px 0; } .edit-listing-form label { display:grid; gap:4px; font-size:.8rem; color:var(--muted); } .edit-listing-form input { width:150px; padding:9px; border:1px solid var(--line); border-radius:8px; }
.sequence-step, .choice-card, .risk-card { min-height: 58px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface); color: var(--ink); cursor: pointer; }
.sequence-step { font-weight: 800; }
.sequence-step:hover, .choice-card:hover, .risk-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.sequence-step.hit { border-color: var(--green); background: #e8f0e8; }
.sequence-step.miss { border-color: var(--danger); background: #f5e6e2; }
.choice-card, .risk-card { display: grid; gap: 4px; padding: 10px; text-align: left; }
.choice-card strong, .risk-card strong { font-size: 12px; }
.choice-card small, .risk-card small { color: var(--muted); font-size: 9px; }
.risk-0 { border-left: 4px solid #82978a; }
.risk-1 { border-left: 4px solid var(--accent); }
.risk-2 { border-left: 4px solid var(--danger); }

@media (max-width: 1050px) {
  .activity-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .activity-board { padding: 13px; }
  .activity-board-head { align-items: start; flex-direction: column; gap: 5px; }
  .activity-grid { grid-template-columns: 1fr; }
  .activity-card p { min-height: 0; }
}

/* Design system: "Гаражный ценник" — kraft-paper marketplace with hazard-amber price tags. */
:root {
  --danger: #c5493b;
}

html { background: var(--paper); }
body { min-height: 100%; color: var(--ink); background: var(--paper); font-family: var(--font-body); line-height: 1.45; overflow-x: hidden; }
button, input, select, textarea { font-family: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(224,160,39,.35); outline-offset: 2px; }

.join-screen { grid-template-columns: minmax(420px, 1fr) minmax(440px, 540px); background: var(--dark); }
.join-visual { min-height: 680px; background: var(--dark); }
.join-visual img { opacity: .5; filter: grayscale(.3) sepia(.18) contrast(1.05); }
.join-visual::after { background: linear-gradient(100deg, rgba(23,19,14,.15) 45%, var(--dark) 96%); }
.join-brand { top: 40px; left: 48px; font-size: 26px; letter-spacing: .02em; }
.join-brand span, .logo span { color: var(--accent); }
.join-panel { padding: 64px 54px; color: #f3ede0; background: var(--dark); }
.join-panel .eyebrow { color: var(--accent); }
.join-panel h1 { max-width: 470px; font-size: clamp(44px, 4.8vw, 70px); line-height: .98; font-weight: 600; }
.join-copy { margin: 22px 0 32px; color: #b7ac98; font-size: 16px; }
.join-panel label { color: #cfc6b4; font-size: 11px; }
.auth-fields { grid-template-columns: 1fr 150px; gap: 10px; }
.auth-fields input { height: 50px; border: 1px solid #43392a; border-radius: var(--radius-s); background: #221c14; color: #f3ede0; }
.auth-fields input:focus { border-color: var(--accent); }
.auth-actions { gap: 10px; }
.auth-actions button, .empty-state button { height: 48px; border-radius: var(--radius-s); background: var(--accent); color: #201b15; font-weight: 700; }
.auth-actions button:hover, .empty-state button:hover { background: #eab04a; }
.auth-actions .auth-secondary { border-color: #4a4032; color: #f3ede0; background: transparent; }
.auth-actions .auth-secondary:hover { background: #29221a; }
.join-stats { border-color: #3a3122; }
.join-stats span { color: #a89c86; }
.join-stats strong { color: #f3ede0; }

.topbar { height: 64px; grid-template-columns: 150px minmax(0, 1fr) auto auto auto; gap: 14px; padding: 0 max(24px, calc((100vw - 1280px) / 2)); border-color: var(--line); background: rgba(251,248,240,.97); color: var(--ink); box-shadow: 0 1px 0 rgba(32,27,21,.05); }
.logo { color: var(--ink); font-size: 21px; }
.tab { padding: 0 15px; color: var(--muted); font-size: 13px; font-weight: 600; }
.tab:hover, .tab.active { color: var(--ink); }
.tab.active::after { left: 15px; right: 15px; height: 3px; background: var(--accent); }
.badge { border-radius: 10px; background: var(--line); color: #5f5748; }
.wallet { border-color: var(--line); }
.wallet span { color: var(--muted); text-transform: uppercase; }
.wallet strong { color: var(--ink); font-size: 16px; }
.profile-button { color: var(--ink); }
.profile-button > span:first-child { border-radius: 50%; background: var(--ink); color: var(--accent); }
.profile-button small { color: var(--muted); }
.notification-button { border-color: #d9d0bd; color: var(--muted); }
.notification-button:hover { border-color: var(--accent); color: var(--accent-dark); }
.notification-button span { background: var(--danger); }

.utility-nav { top: 64px; min-height: 44px; justify-content: flex-start; padding: 0 max(24px, calc((100vw - 1280px) / 2)); border-color: var(--line); background: rgba(251,248,240,.97); }
.utility-nav button { min-width: auto; padding: 7px 16px 6px; text-align: center; }
.utility-nav button:hover, .utility-nav button.active { border-bottom-color: var(--accent); background: #f2ead4; }
.utility-nav span { font-size: 11px; font-weight: 700; }
.utility-nav small { display: none; }

.content { width: min(1280px, calc(100% - 48px)); padding: 36px 0 72px; }
.section-heading { min-height: 54px; align-items: center; margin-bottom: 20px; }
.section-heading h2 { font-size: clamp(28px, 3vw, 40px); line-height: 1.05; }
.eyebrow { margin-bottom: 6px; color: var(--accent-dark); font-size: 11px; font-weight: 700; }
.market-pulse { padding: 8px 0; }
.market-pulse i { width: 7px; height: 7px; }
.market-pulse b { font-weight: 600; }

.market-dashboard { gap: 12px; margin-bottom: 16px; border: 0; background: transparent; }
.market-dashboard > div { padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--surface); box-shadow: var(--shadow-card); }
.market-dashboard span { font-size: 11px; font-weight: 600; }
.market-dashboard strong { margin-top: 4px; font-size: 22px; }
.market-quick-filters { gap: 8px; margin-bottom: 12px; }
.quick-filter { min-height: 36px; border: 1px solid #ddd2bb; border-radius: 18px; padding: 0 15px; background: var(--surface); color: #5f5748; font-size: 12px; font-weight: 600; }
.quick-filter:hover, .quick-filter.active { border-color: var(--ink); background: var(--ink); color: var(--accent); }
.market-filters, .asset-filters, .auction-filters { grid-template-columns: repeat(4, minmax(130px, 1fr)); gap: 10px; margin-bottom: 18px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--surface); }
.market-filters .market-search { grid-column: span 2; }
.market-filters label, .asset-filters label, .auction-filters label { color: var(--muted); font-size: 11px; font-weight: 700; }
.market-filters input, .market-filters select, .asset-filters input, .asset-filters select, .auction-filters input, .auction-filters select { height: 42px; border-color: var(--line); border-radius: var(--radius-s); background: #fdfbf6; }
.filter-result { align-self: center; color: var(--muted); font-size: 11px; }
.market-cars-label, .garage-cars-heading, .auction-section-head, .asset-section-head { margin: 26px 0 13px; padding-top: 0; border: 0; }
.market-cars-label h3, .garage-cars-heading h3, .auction-section-head h3, .asset-section-head h3 { font-size: 20px; }

.primary-button, .secondary-button, .danger-button { min-height: 40px; border-radius: var(--radius-s); padding: 0 15px; font-size: 12px; font-weight: 700; letter-spacing: .01em; transition: background .12s, border-color .12s, transform .08s; }
.primary-button { border-color: var(--ink); background: var(--ink); color: var(--accent); }
.primary-button:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: var(--ink); }
.primary-button:active { transform: translateY(1px); }
.secondary-button { border-color: var(--line); background: var(--surface); color: var(--ink); }
.secondary-button:hover { border-color: var(--ink); background: #f4efe1; }
.danger-button { border-color: var(--danger); background: var(--surface); color: var(--danger); }
.danger-button:hover { background: var(--danger); color: var(--surface); }

.car-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; border: 0; }
.car-card { position: relative; overflow: visible; border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--surface); box-shadow: var(--shadow-card); transition: border-color .15s, box-shadow .15s, transform .15s; }
.car-card::after { content: ""; position: absolute; z-index: 3; top: -1px; right: -1px; width: 22px; height: 22px; background: var(--accent); clip-path: polygon(100% 0, 0 0, 100% 100%); opacity: 0; transition: opacity .15s; border-top-right-radius: var(--radius-m); }
.car-card:hover { transform: translateY(-3px); border-color: #cdc0a0; box-shadow: var(--shadow-lift); }
.car-card:hover::after { opacity: 1; }
.car-card, .auction-car-lot, .container-card { overflow: hidden; }
.car-art { height: auto; aspect-ratio: 16 / 9; background: #e6ddc8; }
.car-photo { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .2s; }
.car-art.photo-loaded .car-photo { opacity: 1; }
.photo-placeholder { position: absolute; inset: 0; display: grid; place-content: center; gap: 4px; padding: 24px; color: var(--muted); text-align: center; }
.photo-placeholder b { color: var(--ink); font-size: 20px; }
.photo-placeholder small { font-size: 11px; }
.car-art.photo-loaded .photo-placeholder { display: none; }
.photo-credit { position: absolute; z-index: 5; right: 9px; bottom: 8px; padding: 3px 6px; border-radius: 3px; background: rgba(23,19,14,.72); color: rgba(255,255,255,.88); font-size: 8px; text-decoration: none; }
.photo-credit:hover { color: white; text-decoration: underline; }
.car-year, .seller-label { top: 10px; padding: 4px 7px; border-radius: 4px; font-size: 10px; }
.car-year { left: 10px; background: rgba(251,248,240,.94); font-family: var(--font-mono); }
.seller-label { right: 10px; background: rgba(23,19,14,.85); }
.car-info { padding: 15px 16px 17px; }
.car-info h3 { font-size: 17px; }
.car-meta { margin: 7px 0 14px; font-size: 11px; }
.car-price-row strong { font-size: 21px; }
.condition { padding: 3px 0; font-size: 10px; }
.price-signal { border-radius: 4px; background: #e7f0e6; }

.garage-list { gap: 12px; }
.garage-car { grid-template-columns: 220px minmax(180px, .8fr) minmax(260px, 1.1fr) 230px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--surface); }
.garage-car .car-art { height: 150px; aspect-ratio: auto; }
.garage-main, .garage-status, .garage-actions { padding: 18px; }
.garage-actions { gap: 7px; }
.garage-workshop, .parts-market-panel, .group-panel, .npc-panel, .admin-panel, .profile-columns > div, .deals-section { border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--surface); }
.garage-workshop { border-top: 1px solid var(--line); }
.progress-strip, .training-strip, .property-income-panel, .store-intro { border-radius: var(--radius-m); }
.upgrade-item, .employee-card, .contract-card, .container-card, .asset-card, .store-package { border-radius: var(--radius-m); overflow: hidden; }
.asset-visual { background: #2f4636; }
.asset-property .asset-visual { background: #3f5c48; }
.asset-crypto .asset-visual { background: #263c32; }

.modal { background: rgba(20,16,11,.62); backdrop-filter: blur(3px); }
.modal-panel { overflow: hidden; border-radius: 10px; background: var(--surface); box-shadow: var(--shadow-deep); }
.modal-car-art { height: auto; max-height: 410px; aspect-ratio: 16 / 8; }
.modal-body { padding: 26px 28px; }
.modal-body h2, .reward-title h2 { font-size: 30px; }
.modal-close { border-radius: 50%; }
.inspection-grid, .seller-summary, .reward-stats { gap: 1px; border-radius: var(--radius-s); overflow: hidden; }

.site-footer { width: min(1280px, calc(100% - 48px)); font-size: 11px; }
.site-footer a { font-weight: 700; }
.deal-history-panel { margin: 18px 0; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--surface); }
.deal-history-panel .workshop-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 13px; }
.deal-history-panel h3 { margin: 0; font-size: 20px; }
.deal-history-panel .workshop-heading > span { color: var(--muted); font-size: 11px; }
.deal-history { display: grid; max-height: 480px; overflow-y: auto; border-top: 1px solid var(--line); }
.ledger-entry { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 11px; min-height: 66px; padding: 10px 4px; border-bottom: 1px solid var(--line); }
.ledger-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--paper); color: var(--muted); font-size: 16px; font-weight: 700; }
.ledger-entry:has(.profit-positive) .ledger-icon { background: #e5f0e6; color: var(--green); }
.ledger-entry:has(.profit-negative) .ledger-icon { background: #f7e7e3; color: var(--danger); }
.ledger-entry strong, .ledger-entry small { display: block; }
.ledger-entry > div:nth-child(2) > strong { font-size: 12px; }
.ledger-entry small { margin-top: 3px; color: var(--muted); font-size: 9px; line-height: 1.5; }
.ledger-money { min-width: 130px; text-align: right; }
.ledger-money > strong { font-size: 13px; }

.skill-challenge { position: fixed; z-index: 90; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(20,16,11,.8); backdrop-filter: blur(8px); }
.challenge-panel { width: min(620px, 100%); padding: 28px; border-radius: 10px; background: var(--surface); box-shadow: var(--shadow-deep); }
.challenge-head { display: flex; align-items: start; justify-content: space-between; gap: 20px; }
.challenge-head h2, .challenge-result h2 { margin: 0; font-size: 27px; }
.challenge-instruction, .challenge-result p { margin: 17px 0; color: var(--muted); font-size: 13px; }
.timing-track { position: relative; height: 64px; margin: 30px 0 16px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-m); background: repeating-linear-gradient(90deg, var(--paper) 0, var(--paper) 9.8%, #e2d8c2 10%); }
.timing-target { position: absolute; top: 0; bottom: 0; border-left: 2px solid var(--accent); border-right: 2px solid var(--accent); background: rgba(224,160,39,.2); }
.timing-marker { position: absolute; z-index: 2; top: 8px; bottom: 8px; width: 5px; transform: translateX(-50%); border-radius: 3px; background: var(--ink); box-shadow: 0 0 0 4px rgba(32,27,21,.12); }
.timing-marker.hit { background: var(--green); }
.timing-marker.miss { background: var(--danger); }
.challenge-progress { display: flex; justify-content: center; gap: 7px; margin-bottom: 15px; }
.challenge-progress i { width: 28px; height: 4px; border-radius: 2px; background: var(--line); }
.challenge-progress i.active { background: var(--accent); }
.challenge-progress i.done { background: var(--green); }
.challenge-action { width: 100%; height: 52px; border: 0; border-radius: var(--radius-m); background: var(--ink); color: var(--accent); font-size: 14px; font-weight: 700; }
.challenge-action:active { transform: translateY(1px); }
.challenge-result { text-align: center; }
.challenge-score { display: block; margin: 20px 0 5px; color: var(--accent-dark); font-family: var(--font-mono); font-size: 64px; line-height: 1; }
.challenge-score.great { color: var(--green); }
.challenge-score.poor { color: var(--danger); }
.challenge-result .primary-button { min-width: 180px; min-height: 46px; }
.reward-hero .reward-car-art { width: 100%; height: 100%; min-height: 220px; max-height: none; aspect-ratio: auto; }
.reward-hero .reward-car-art .car-photo { object-fit: cover; }
.leader-profit.profit-negative, #my-profit.profit-negative, .reward-negative, .profit-negative { color: var(--danger) !important; }
.leader-profit.profit-positive, #my-profit.profit-positive, .reward-positive, .profit-positive { color: var(--green) !important; }
.modal-panel { overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.auction-car-preview { overflow: hidden; background: #ece3cd; }
.auction-car-preview .car-art { width: 100%; height: 100%; min-height: 210px; aspect-ratio: auto; }
.auction-car-preview .car-photo { object-fit: cover; }
.auction-details-link { border-top: 1px solid var(--line); background: var(--surface); font-size: 11px; font-weight: 700; }
.auction-car-lot { grid-template-columns: minmax(260px, 32%) minmax(0, 1fr); overflow: hidden; border-radius: var(--radius-m); }
.auction-car-content { min-width: 0; }

@media (max-width: 1050px) and (min-width: 761px) {
  .topbar { grid-template-columns: 120px minmax(0, 1fr) auto 120px 34px; }
  .tab { padding: 0 9px; font-size: 11px; }
  .car-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .garage-car { grid-template-columns: 210px 1fr 1fr; }
}

@media (max-width: 760px) {
  html:has(#join-screen:not([hidden])) { background: var(--dark); }
  .join-screen { display: block; min-height: 100dvh; background: var(--dark); }
  .join-visual { min-height: 96px; height: 96px; background: var(--dark); }
  .join-visual img { display: none; }
  .join-brand { top: 32px; left: 22px; }
  .join-panel { padding: 34px 20px 44px; }
  .join-panel h1 { font-size: 40px; }
  .topbar { background: rgba(251,248,240,.98); }
  .logo { color: var(--ink); }
  .section-menu-button { border-color: var(--line); background: var(--surface); }
  .section-menu-button i { background: #5f5748; }
  .tabs { height: 64px; border-color: var(--line); background: var(--surface); box-shadow: 0 -4px 16px rgba(32,27,21,.08); }
  .tab { color: #8a8071; }
  .tab:hover, .tab.active { color: var(--accent-dark); }
  .tab.active::after { background: var(--accent); }
  .utility-nav { top: 64px; padding: 8px; border-color: var(--line); background: var(--surface); box-shadow: 0 16px 36px rgba(25,20,14,.2); }
  .utility-nav button { min-height: 52px; border-color: var(--line); color: #5f5748; text-align: left; }
  .utility-nav button:hover, .utility-nav button.active { border-color: var(--accent); background: #f2ead4; color: var(--accent-dark); }
  .utility-nav small { display: block; color: #988d7c; }
  .content { width: calc(100% - 28px); padding-top: 24px; }
  .section-heading h2 { font-size: 28px; }
  .market-dashboard { gap: 8px; }
  .market-filters { grid-template-columns: 1fr 1fr; padding: 12px; }
  .car-grid { grid-template-columns: 1fr; gap: 12px; }
  .car-art { height: auto; aspect-ratio: 16 / 9; }
  .garage-car { grid-template-columns: 1fr; }
  .garage-car .car-art { height: auto; aspect-ratio: 16 / 8; }
  .garage-main, .garage-status, .garage-actions { padding: 14px; }
  .modal-car-art { height: auto; aspect-ratio: 16 / 9; }
  .modal-panel { max-height: calc(100dvh - 20px); -webkit-overflow-scrolling: touch; }
  .modal-body { padding: 20px; }
  .auction-car-lot { grid-template-columns: 1fr; }
  .auction-car-preview .car-art { height: auto; min-height: 0; aspect-ratio: 16 / 9; }
  .site-footer { width: calc(100% - 28px); }
  .deal-history-panel { padding: 14px; }
  .deal-history-panel .workshop-heading { align-items: start; flex-direction: column; gap: 4px; }
  .ledger-entry { grid-template-columns: 30px minmax(0, 1fr); }
  .ledger-money { grid-column: 2; min-width: 0; text-align: left; }
  .challenge-panel { padding: 22px 18px; }
  .challenge-head h2, .challenge-result h2 { font-size: 23px; }
  .timing-track { height: 72px; margin-top: 24px; }
  .challenge-action { height: 58px; }
  .reward-hero .reward-car-art { height: auto; min-height: 0; aspect-ratio: 16 / 9; }
}

@media (max-width: 760px) {
  .tabs > .tab { align-items: center; justify-content: center; text-align: center; }
  .tabs > .tab span { width: 100%; text-align: center; }
  .tabs > .tab .badge { align-self: center; }
  .tabs > .tab .badge { display: none; }
  .tabs > .tab { height: 64px; min-height: 64px; line-height: 1; }
}

@media (max-width: 430px) {
  .join-panel h1 { font-size: 36px; }
  .auth-actions { grid-template-columns: 1fr; }
  .market-dashboard > div { padding: 11px 12px; }
  .market-filters { grid-template-columns: 1fr; }
  .market-filters .market-search { grid-column: auto; }
  .car-info { padding: 14px; }
}

/* Photos are the only vehicle visual. Never render the legacy CSS silhouette. */
.photo-credit, .car-year { display: none !important; }

/* The registration screen must keep its dark background through mobile overscroll. */
html:has(#join-screen:not([hidden])),
body:has(#join-screen:not([hidden])) {
  min-height: 100%;
  background: var(--dark) !important;
}
body:has(#join-screen:not([hidden])) {
  min-height: 100dvh;
  overscroll-behavior-y: none;
}
#join-screen:not([hidden]) {
  min-height: 100dvh;
}
.car-art::before,
.car-art::after,
.car-art .car-window,
.car-art .wheel,
.car-art .car-make {
  display: none !important;
  content: none !important;
}
.car-art.photo-failed {
  background: #eee9dc;
}
.car-art.photo-failed .photo-placeholder {
  display: grid;
}

/* Keep the workspace theme last in the cascade. */
.topbar, .utility-nav { background: rgba(255,255,255,.98); border-color: var(--line); }
.logo { color: var(--ink); text-transform: none; }
.logo span { color: var(--accent); }
.tab { color: #667085; }
.tab:hover, .tab.active { color: var(--accent-dark); }
.tab.active::after { background: var(--accent); }
.utility-nav span { text-transform: none; }
.utility-nav button:hover, .utility-nav button.active { border-bottom-color: var(--accent); background: #eff6ff; color: var(--accent-dark); }
.primary-button { border-color: var(--accent); background: var(--accent); color: white; }
.primary-button:hover { border-color: var(--accent-dark); background: var(--accent-dark); color: white; }
.secondary-button { border-color: #cfd5dd; background: white; color: #344054; }
.secondary-button:hover { border-color: #98a2b3; background: #f8fafc; }
.container-info h3, .admin-panel h3 { text-transform: none; }

@media (max-width: 760px) {
  .topbar, .tabs, .utility-nav { background: white; }
  .tab, .tab:hover, .tab.active { color: var(--accent-dark); }
  .auction-filters { grid-template-columns: 1fr 1fr; }
  .auction-filters > * { min-width: 0; }
  .auction-filters span { grid-column: 1 / -1; width: auto; white-space: normal; }
}

/* Leaderboard and cross-device gameplay ergonomics. Keep this layer last. */
.utility-menu-head,
.utility-menu-backdrop { display: none; }

.leader-podium {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.podium-place {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-top: 4px solid #98a2b3;
  border-radius: var(--radius-m);
  background: white;
  box-shadow: var(--shadow-card);
}
.podium-place.podium-1 { border-top-color: #d89a25; }
.podium-place.podium-2 { border-top-color: #8591a2; }
.podium-place.podium-3 { border-top-color: #a66b45; }
.podium-place.current { box-shadow: inset 0 0 0 2px #8eb1eb; }
.podium-place span,
.podium-place strong,
.podium-place small,
.podium-place b { display: block; }
.podium-place span { color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; }
.podium-place strong { overflow-wrap: anywhere; margin-top: 8px; font-size: 17px; }
.podium-place small { margin-top: 5px; color: var(--muted); font-size: 10px; }
.podium-place b { margin-top: 14px; font-family: var(--font-mono); font-size: 17px; }
.leader-player { min-width: 0; }
.leader-player strong,
.leader-player small { display: block; }
.leader-player strong { overflow-wrap: anywhere; }
.leader-player small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.leader-row.current { background: #eef5ff; box-shadow: inset 3px 0 0 #3974cf; }
.leader-divider { padding: 9px 24px; border-bottom: 1px solid var(--line); background: #f2f4f7; color: var(--muted); font-size: 10px; font-weight: 700; text-align: center; }

.garage-more-actions { width: 100%; }
.garage-more-actions summary {
  min-height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  color: #475467;
  background: white;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  list-style: none;
}
.garage-more-actions summary::-webkit-details-marker { display: none; }
.garage-more-actions summary::after { content: " +"; }
.garage-more-actions[open] summary::after { content: " -"; }
.garage-more-actions > div { display: grid; gap: 7px; margin-top: 7px; }

@media (max-width: 760px) {
  body { padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
  .section-menu-button { display: none; }
  .utility-menu-backdrop {
    position: fixed;
    z-index: 42;
    inset: 0;
    display: block;
    border: 0;
    background: rgba(16, 24, 40, .44);
  }
  .utility-nav {
    position: fixed;
    z-index: 44;
    top: auto;
    right: 10px;
    bottom: calc(72px + env(safe-area-inset-bottom));
    left: 10px;
    display: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    max-height: min(72dvh, 620px);
    min-height: 0;
    overflow-y: auto;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: white;
    box-shadow: 0 18px 50px rgba(16, 24, 40, .24);
    overscroll-behavior: contain;
  }
  .utility-nav.open { display: grid; }
  .utility-menu-head {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 52px;
    padding: 2px 2px 8px 8px;
    border-bottom: 1px solid var(--line);
  }
  .utility-menu-head strong,
  .utility-menu-head small { display: block; }
  .utility-menu-head strong { color: var(--ink); font-size: 15px; }
  .utility-menu-head small { margin-top: 2px; color: var(--muted); font-size: 10px; }
  .utility-menu-head button {
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: white;
    color: var(--ink);
    font-size: 25px;
    text-align: center;
  }
  .utility-nav > button {
    min-width: 0;
    min-height: 58px;
    padding: 9px 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius-m);
    text-align: left;
  }
  .utility-nav > button span { font-size: 11px; }
  .utility-nav > button small { margin-top: 4px; font-size: 9px; line-height: 1.3; }
  .tabs { height: calc(66px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); }
  .tabs .tab { min-height: 64px; padding: 0 6px; line-height: 1.15; }
  .tabs [data-mobile-menu][aria-expanded="true"] { color: var(--accent-dark); background: #eff6ff; }

  .content { width: calc(100% - 24px); padding-top: 18px; padding-bottom: 28px; }
  .section-heading { min-height: 0; align-items: start; margin-bottom: 18px; }
  .section-heading h2 { font-size: 26px; line-height: 1.08; }
  .section-heading .eyebrow { margin-bottom: 7px; font-size: 9px; }
  .view button:not(.modal-backdrop),
  .view input,
  .view select { min-height: 44px; }
  .view input,
  .view select { font-size: 16px; }
  .primary-button,
  .secondary-button,
  .danger-button { padding-right: 13px; padding-left: 13px; }
  .mobile-filter-toggle { min-height: 46px; }
  .quick-filter { min-height: 42px; padding: 0 14px; }

  .market-dashboard {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
    margin-bottom: 12px;
  }
  .market-dashboard > div { min-width: 0; padding: 9px 6px; text-align: center; }
  .market-dashboard span { min-height: 24px; font-size: 8px; line-height: 1.35; }
  .market-dashboard strong { margin-top: 3px; font-size: 15px; }
  .market-cars-label,
  .garage-cars-heading,
  .auction-section-head,
  .asset-section-head { align-items: start; margin-top: 18px; }
  .market-cars-label h3,
  .garage-cars-heading h3,
  .auction-section-head h3,
  .asset-section-head h3 { font-size: 18px; }
  .market-cars-label > span,
  .garage-cars-heading > span,
  .auction-section-head > span,
  .asset-section-head > span { max-width: 42%; font-size: 9px; line-height: 1.4; text-align: right; }
  .market-load-more { flex-direction: column; gap: 7px; padding: 12px; }
  .market-load-more button { width: 100%; min-height: 48px; }
  .activity-board { margin-top: 24px; }

  .garage-car { gap: 0; }
  .garage-main,
  .garage-status,
  .garage-actions { padding: 12px 14px; }
  .garage-main,
  .garage-status { border-bottom: 1px solid var(--line); }
  .garage-actions { grid-template-columns: 1fr 1fr; gap: 8px; }
  .garage-actions > button { min-height: 48px; }
  .garage-more-actions { grid-column: 1 / -1; }
  .garage-more-actions summary { min-height: 44px; }
  .garage-more-actions > div button { width: 100%; min-height: 44px; }

  .parts-purchase button,
  .repair-readiness,
  .part-order-button,
  .chat-report { min-height: 44px; }
  .repair-readiness { padding: 9px 10px; font-size: 10px; }
  .chat-report { padding: 0 10px; font-size: 10px; text-decoration: none; }
  .parts-mode-controls button { min-height: 56px; }
  .team-role select,
  .team-role button,
  .employee-card button,
  .group-panel button,
  .npc-panel button { min-height: 44px; }

  .modal { align-items: end; padding: 0; }
  .modal-panel {
    width: 100%;
    max-height: calc(100dvh - 8px);
    border-radius: 12px 12px 0 0;
    scrollbar-gutter: auto;
  }
  .modal-body { padding: 18px 14px 24px; }
  .modal-body h2,
  .reward-title h2 { padding-right: 40px; font-size: 24px; line-height: 1.1; }
  .close-button { width: 44px; height: 44px; }
  .modal .primary-button,
  .modal .secondary-button,
  .modal .danger-button { min-height: 48px; }

  .leader-podium {
    grid-template-columns: repeat(3, minmax(145px, 1fr));
    overflow-x: auto;
    gap: 8px;
    margin: 0 -12px 12px;
    padding: 0 12px 6px;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }
  .leader-podium::-webkit-scrollbar { display: none; }
  .podium-place { padding: 13px; scroll-snap-align: start; }
  .podium-place strong { font-size: 14px; }
  .podium-place b { margin-top: 10px; font-size: 13px; }
  .leader-head,
  .leader-row { grid-template-columns: minmax(0, 1fr) 48px minmax(96px, auto); min-height: 58px; padding: 0 10px; gap: 5px; }
  .leader-head { font-size: 8px; }
  .leader-row { font-size: 11px; }
  .leader-profit { overflow-wrap: anywhere; font-size: 10px; text-align: right; }
  .leader-divider { padding: 9px 10px; }
  .my-profit { flex: 0 0 auto; margin-top: 0; text-align: right; }
  .my-profit span { font-size: 8px; }
  .my-profit strong { font-size: 15px; }

  .asset-grid { grid-template-columns: 1fr; }
}

@media (max-width: 430px) {
  .garage-actions { grid-template-columns: 1fr; }
  .garage-more-actions { grid-column: auto; }
  #rating-view .section-heading { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
  #rating-view .section-heading h2 { font-size: 23px; }
}

/* Compact navigation and auction workspaces. */
.tabs > .more-sections-tab { display: block; }
.tabs { min-width: 0; }
.tabs > .tab {
  min-width: 84px;
  height: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding-right: 11px;
  padding-left: 11px;
  line-height: 1.15;
  white-space: nowrap;
}
.tabs > .tab .badge {
  flex: 0 0 32px;
  width: 32px;
  min-width: 32px;
  margin-left: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.utility-menu-backdrop {
  position: fixed;
  z-index: 42;
  inset: 0;
  display: block;
  border: 0;
  background: rgba(16, 24, 40, .38);
}
.utility-nav {
  position: fixed;
  z-index: 44;
  top: 72px;
  right: max(24px, calc((100vw - 1400px) / 2));
  left: auto;
  display: none;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 7px;
  width: min(500px, calc(100vw - 48px));
  max-height: calc(100dvh - 92px);
  min-height: 0;
  overflow-y: auto;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 20px 60px rgba(16, 24, 40, .22);
}
.utility-nav.open { display: grid; }
.utility-nav .utility-menu-head {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 2px 2px 8px 8px;
  border-bottom: 1px solid var(--line);
}
.utility-menu-head strong,
.utility-menu-head small { display: block; }
.utility-menu-head strong { color: var(--ink); font-size: 15px; }
.utility-menu-head small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.utility-menu-head > button {
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: white;
  color: var(--ink);
  font-size: 24px;
  text-align: center;
}
.utility-nav > button {
  min-width: 0;
  min-height: 58px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  color: #475467;
  text-align: left;
}
.utility-nav > button:hover,
.utility-nav > button.active { border-color: #9db7e8; background: #eff6ff; color: var(--accent-dark); }
.utility-nav > button span { font-size: 11px; text-transform: none; }
.utility-nav > button small { display: block; margin-top: 4px; color: #667085; font-size: 9px; line-height: 1.3; }
.utility-nav .utility-team-link,
.utility-nav .utility-spacer,
.utility-nav .utility-group-label { display: none; }

.auction-workspace-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}
.auction-workspace-tabs button {
  position: relative;
  min-width: 0;
  min-height: 72px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-content: center;
  gap: 3px 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: white;
  color: #475467;
  text-align: left;
}
.auction-workspace-tabs button:hover { border-color: #9db7e8; }
.auction-workspace-tabs button.active { border-color: var(--accent); background: #eff6ff; color: var(--accent-dark); box-shadow: inset 0 -3px 0 var(--accent); }
.auction-workspace-tabs span { overflow: hidden; font-size: 14px; font-weight: 800; text-overflow: ellipsis; }
.auction-workspace-tabs b { font-family: var(--font-mono); font-size: 17px; }
.auction-workspace-tabs small { grid-column: 1 / -1; color: var(--muted); font-size: 9px; }

.auction-notification-panel,
.auction-filter-panel,
.container-guide-panel {
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: white;
}
.auction-notification-panel > summary,
.auction-filter-panel > summary,
.container-guide-panel > summary {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 14px;
  cursor: pointer;
  list-style: none;
}
.auction-notification-panel > summary::-webkit-details-marker,
.auction-filter-panel > summary::-webkit-details-marker,
.container-guide-panel > summary::-webkit-details-marker { display: none; }
.auction-notification-panel > summary span,
.auction-filter-panel > summary span,
.container-guide-panel > summary span { font-size: 12px; font-weight: 800; }
.auction-notification-panel > summary b,
.auction-filter-panel > summary b,
.container-guide-panel > summary b { color: var(--muted); font-size: 9px; }
.auction-notification-panel > summary b::after,
.auction-filter-panel > summary b::after,
.container-guide-panel > summary b::after { content: " +"; color: var(--accent-dark); font-size: 14px; }
.auction-notification-panel[open] > summary b::after,
.auction-filter-panel[open] > summary b::after,
.container-guide-panel[open] > summary b::after { content: " -"; }
.auction-notifications { gap: 1px; margin: 0; border-top: 1px solid var(--line); background: var(--line); }
.auction-alert { border-left-width: 3px; background: white; }
.auction-alert.read { background: #f8fafc; }
.auction-filters { margin: 0; padding: 12px; border: 0; border-top: 1px solid var(--line); border-radius: 0; box-shadow: none; }
.container-guide-panel .container-guide { margin: 0; border-top: 1px solid var(--line); }

.auction-section { margin: 0 0 24px; }
.auction-section-head { margin: 18px 0 10px; }
.auction-car-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.auction-car-lot { grid-template-columns: minmax(170px, 31%) minmax(0, 1fr); }
.auction-car-preview .car-art { min-height: 188px; }
.auction-car-content { gap: 9px; padding: 13px; }
.auction-defects { padding: 8px 10px; }
.auction-defects ul { gap: 3px 12px; }
.auction-empty-state {
  grid-column: 1 / -1;
  min-height: 120px;
  display: grid;
  place-items: center;
  padding: 24px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-m);
  color: var(--muted);
  background: #f8fafc;
  font-size: 12px;
  text-align: center;
}
.market-access-note {
  grid-column: 1 / -1;
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
}
.market-access-note strong { color: var(--ink); font-size: 13px; white-space: nowrap; }
@media (max-width: 560px) {
  .market-access-note { display: grid; gap: 4px; }
}

@media (max-width: 1180px) {
  .auction-car-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .topbar { grid-template-columns: 1fr auto auto auto; }
  .chat-shortcut { grid-column: 3; grid-row: 1; }
  .section-menu-button { grid-column: 4; }
  html { scroll-behavior: auto; }
  .car-card,
  .garage-car,
  .auction-car-lot { content-visibility: auto; contain-intrinsic-size: 320px; }
  .car-card,
  .garage-car,
  .plate-card,
  .registration-car,
  .auction-car-lot,
  .primary-button,
  .secondary-button,
  .danger-button { transition-duration: 0s; }
  .utility-nav {
    top: auto;
    right: 10px;
    bottom: calc(72px + env(safe-area-inset-bottom));
    left: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: auto;
    max-height: min(72dvh, 620px);
    border-radius: 10px;
  }
  .tabs {
    width: 100vw;
    max-width: 100vw;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    box-sizing: border-box;
  }
  .tabs > .more-sections-tab { display: block; }
  .tabs > .desktop-team-tab,
  .tabs > [data-view="business"] { display: none; }
  .tabs > .more-sections-tab {
    display: flex !important;
    grid-column: 5;
    visibility: visible;
    opacity: 1;
    z-index: 2;
  }
  .tabs > .tab {
    min-width: 0;
    width: 100%;
    max-width: 100%;
    height: 64px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 5px 2px 3px;
    font-size: 9px;
    line-height: 1.1;
    white-space: normal;
    overflow: hidden;
  }
  .tabs > .tab.more-sections-tab { min-width: 0 !important; width: 100%; }
  .tabs > .tab .badge {
    flex: 0 0 16px;
    width: auto;
    min-width: 22px;
    max-width: 38px;
    height: 16px;
    margin: 0;
    padding: 0 4px;
  }
  #auctions-view .section-heading { margin-bottom: 14px; }
  #auctions-view .market-pulse { display: none; }
  .auction-workspace-tabs { gap: 5px; margin-bottom: 10px; }
  .auction-workspace-tabs button { min-height: 68px; gap: 2px 5px; padding: 9px 8px; }
  .auction-workspace-tabs span { font-size: 11px; }
  .auction-workspace-tabs b { font-size: 13px; }
  .auction-workspace-tabs small { font-size: 8px; line-height: 1.2; }
  .auction-notification-panel > summary,
  .auction-filter-panel > summary,
  .container-guide-panel > summary { min-height: 48px; padding: 0 12px; }
  .auction-section-head { margin-top: 15px; }
  .auction-filters { grid-template-columns: 1fr; }
  .auction-car-grid { grid-template-columns: 1fr; }
  .auction-car-lot { grid-template-columns: 1fr; }
  .auction-car-preview .car-art { min-height: 0; }
  .auction-defects ul { grid-template-columns: 1fr; }
  .container-guide-panel .container-guide { padding: 8px; }
  .container-guide-panel .container-guide > div { flex-basis: 74%; }
}

.plate-result-panel{width:min(520px,calc(100vw - 28px));padding:20px}.plate-result-panel .plate-card{margin:0}.plate-result-panel .primary-button{width:100%;margin-top:14px;min-height:48px}@media(max-width:760px){.plate-result-panel{width:100%;max-height:calc(100dvh - 8px);border-radius:12px 12px 0 0;padding:16px 14px 24px}}

.profile-edit-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, .65fr) auto;
  align-items: end;
  gap: 12px;
  margin: 12px 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
}
.profile-edit-form > div { grid-column: 1 / -1; }
.profile-edit-form h3 { margin: 2px 0 0; font-size: 18px; }
.profile-edit-form label { min-width: 0; color: var(--muted); font-size: 10px; font-weight: 800; }
.profile-edit-form label input { width: 100%; height: 42px; margin-top: 6px; border: 1px solid var(--line); padding: 0 10px; color: var(--ink); }
.profile-edit-form label small { display: block; margin-top: 5px; color: var(--muted); font-size: 9px; font-weight: 500; }
.profile-edit-form button { min-height: 42px; }
.profile-edit-form .form-error { grid-column: 1 / -1; min-height: 16px; margin: 0; color: #b42318; }
.profile-edit-form .form-error.success { color: #067647; }

@media (max-width: 700px) {
  .profile-edit-form { grid-template-columns: 1fr; padding: 14px; }
  .profile-edit-form button { width: 100%; }
}

.admin-player { grid-template-columns: minmax(220px, .65fr) minmax(0, 1.7fr); }
.admin-profile-controls {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) auto minmax(150px, 1fr) auto;
  align-items: end;
  gap: 7px;
}
.admin-profile-controls label { display: grid; gap: 4px; color: var(--muted); font-size: 9px; font-weight: 700; }
.admin-profile-controls select { min-width: 0; width: 100%; height: 38px; border: 1px solid #cfd5dd; padding: 0 9px; }
.admin-profile-controls [data-admin-access] { grid-column: 1 / -1; justify-self: start; }
.admin-save-feedback { min-height: 16px; margin: 0; color: #067647; font-size: 10px; font-weight: 700; }

@media (max-width: 900px) {
  .admin-player { grid-template-columns: 1fr; }
  .admin-profile-controls { grid-template-columns: minmax(0, 1fr) auto; }
  .admin-profile-controls [data-admin-access] { grid-column: 1 / -1; }
}

@media (max-width: 520px) {
  .admin-profile-controls { grid-template-columns: 1fr; }
  .admin-profile-controls [data-admin-access] { grid-column: auto; width: 100%; }
}

.achievement-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.achievement-card { min-width: 0; display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 11px; align-items: start; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-m); background: #fff; }
.achievement-card.locked { opacity: .58; filter: saturate(.45); }
.achievement-card.unlocked { border-color: #b7cfbd; background: #f5fbf5; }
.achievement-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: #fff; font-family: var(--font-mono); font-size: 11px; font-weight: 900; }
.achievement-card.unlocked .achievement-icon { background: var(--green); }
.achievement-card strong, .achievement-card p, .achievement-card small { display: block; }
.achievement-card strong { font-size: 13px; }
.achievement-card p { min-height: 32px; margin: 5px 0; color: var(--muted); font-size: 10px; line-height: 1.4; }
.achievement-card small { color: var(--muted); font-size: 9px; font-weight: 700; }
.property-role { display: inline-flex; width: fit-content; margin: 2px 0 8px; padding: 4px 7px; border: 1px solid #c6d7ec; border-radius: 3px; background: #f1f6fc; color: #315c8a; font-size: 9px; font-weight: 800; }
.upgrade-profile { color: #315c8a !important; font-weight: 800; }
.inspection-methods, .repair-plan-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.repair-plan-grid { grid-column: 1 / -1; width: 100%; }
.inspection-methods button, .repair-plan-grid button { min-width: 0; display: grid; gap: 8px; padding: 16px; text-align: left; white-space: normal; }
.inspection-methods small, .repair-plan-grid small { font-size: 12px; line-height: 1.5; color: #53616e; }
.inspection-methods strong, .repair-plan-grid strong { font-size: 14px; overflow-wrap: anywhere; }
@media (max-width: 760px) { .inspection-methods, .repair-plan-grid { grid-template-columns: 1fr; } }
.skill-path-card { display: grid; gap: 4px; padding: 14px; border: 1px solid #c6d7ec; border-radius: var(--radius-m); background: #f4f8fd; }
.skill-path-card > span, .skill-path-card > small { color: #53708d; font-size: 9px; text-transform: uppercase; font-weight: 800; }
.skill-path-card > strong { font-size: 15px; }
.skill-path-card > p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.4; }
.career-mission { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 14px 0 18px; padding: 15px 17px; border: 1px solid #c6d7ec; border-left: 4px solid #315c8a; border-radius: var(--radius-m); background: #f4f8fd; }
.career-mission div { min-width: 0; display: grid; gap: 3px; }
.career-mission strong { font-size: 15px; }
.career-mission span { color: var(--muted); font-size: 10px; }
.career-mission > b { flex: 0 0 auto; color: #315c8a; font-size: 12px; }
#market-view .market-dashboard { display: flex; gap: 24px; margin: 0; background: transparent; border: 0; }
#market-view .market-dashboard > div { padding: 0; border: 0; box-shadow: none; background: transparent; }
#market-view .market-dashboard strong { font-size: 19px; }
#market-view .career-mission { border: 0; border-left: 3px solid #2864da; border-radius: 0; background: transparent; padding: 8px 16px; }
#market-view .market-filters { padding: 12px 0; border: 0; box-shadow: none; background: transparent; }
#market-view .market-filters input, #market-view .market-filters select { background: white; }
#market-view .section-heading { margin-bottom: 18px; }
.car-card .car-info { padding: 16px; }
.car-card .car-info h3 { font-size: 19px; overflow-wrap: anywhere; }
.car-card .car-meta { font-size: 12px; }
.car-card .car-price-row strong { font-size: 23px; }
.car-card .market-tag { display: none; }
.car-card .car-art { aspect-ratio: 16 / 10; }
.deal-summary { display: flex; flex-wrap: wrap; gap: 12px 24px; padding: 16px 0; border-top: 1px solid #dce2e8; border-bottom: 1px solid #dce2e8; margin: 16px 0; }
.deal-summary div { display: grid; gap: 5px; min-width: 130px; }
.deal-summary span { font-size: 12px; color: #53616e; }
.deal-summary strong { font-size: 18px; }
.career-progress { margin: 20px 0; padding: 16px 0; border-block: 1px solid #dce2e8; }
.career-heading { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.career-heading > strong { font-size: 19px; }
.career-heading > span, .career-goals span { color: #53616e; font-size: 12px; }
.career-goals { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; }
.career-goals > div { display: grid; gap: 6px; min-width: 0; }
.career-goals strong { font-size: 14px; }
.career-goals progress { width: 100%; height: 6px; accent-color: #2864da; }
.garage-phase { font-size: 11px; font-weight: 700; color: #315c8a; }
.garage-main > small, .garage-main > strong { display: block; margin-top: 5px; }
@media (max-width: 520px) { .career-heading { flex-direction: column; } .career-goals { grid-template-columns: 1fr; gap: 12px; } }
.repair-plan-grid button { border-color: #ced8e2; background: #fff; color: #19242d; }
.repair-plan-grid button:hover { border-color: #2864da; background: #f1f6ff; }
@media (max-width: 760px) { #market-view .market-dashboard { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; } #market-view .market-dashboard span { font-size: 9px; } }
@media (max-width: 520px) { .career-mission { align-items: start; flex-direction: column; gap: 8px; } }
@media (max-width: 760px) { .achievement-grid { grid-template-columns: 1fr; } }
.inspection-game { width: min(560px, calc(100vw - 24px)); max-height: 90dvh; overflow: auto; }
.inspection-game h2 { font-size: 22px; overflow-wrap: anywhere; }
.inspection-game h3 { font-size: 18px; }
.inspection-game > .primary-button { width: 100%; margin-top: 20px; min-height: 48px; }
.inspection-gauge { position: relative; height: 32px; margin: 24px 8px; background: #333; border-radius: 4px; }
.inspection-target { position: absolute; height: 100%; background: #309563; }
.inspection-needle { position: absolute; width: 4px; height: 44px; top: -6px; background: #fff; transform: translateX(-2px); }
.engine-reading { display: flex; justify-content: center; align-items: baseline; gap: 12px; margin: 24px; }
.engine-reading strong { font: 40px monospace; width: 4ch; }
.inspection-readings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.inspection-readings button { min-width: 0; min-height: 88px; display: grid; gap: 8px; padding: 10px; }
.inspection-readings strong { overflow-wrap: anywhere; font-size: 16px; }
.body-panels { border-top: 5px solid #919ba4; padding-top: 16px; }
.test-road { height: 100px; background: #414141; position: relative; overflow: hidden; text-align: center; }
.test-car { position: relative; z-index: 1; height: 100px; display: flex; align-items: center; justify-content: center; }
.road-stripe { position: absolute; top: 0; left: 50%; width: 3px; height: 200px; background: repeating-linear-gradient(#eee 0 20px, transparent 20px 40px); animation: road-drive .5s linear infinite; }
@keyframes road-drive { to { transform: translateY(-40px); } }
@media (prefers-reduced-motion: reduce) { .road-stripe { animation: none; } }
.deal-workflow { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid #bbb; margin: 20px 0; }
.deal-workflow button { padding: 12px 16px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: inherit; font: inherit; }
.deal-workflow button.active { border-bottom-color: #b62935; font-weight: 700; }
.workflow-sale { margin-top: 20px; }
.npc-profile { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin: 12px 0; }
.npc-profile span { display: grid; gap: 4px; font-size: 13px; }
.repair-comparison { margin-top: 12px; width: 100%; grid-column: 1 / -1; }
.defect-row > details { min-width: 0; }
.defect-row { grid-template-columns: minmax(0, 1fr); }
.repair-plan-grid strong { overflow-wrap: normal; }
#garage-development-panel .garage-workshop { background: transparent; border: 0; border-radius: 0; }
#garage-development-panel .garage-workshop > .workshop-grid { margin-inline: 0; }
.car-upgrade { flex-wrap: wrap; }
.car-upgrade > details { width: 100%; }
.repair-comparison summary, .defect-row details > summary { padding: 12px 0; cursor: pointer; font-weight: 600; }
.repair-plan-grid > article { min-width: 0; padding: 12px; border: 1px solid #a9a9a9; border-radius: 6px; }
.repair-plan-grid p { font-size: 13px; line-height: 1.5; }
.repair-plan-grid button { width: 100%; min-height: 44px; white-space: normal; }
.skill-prerequisite { display: block; margin: 8px 0; }
.upgrade-item progress { width: 100%; accent-color: #b62935; }
#profile-journey { padding: 24px 0; border-block: 1px solid #ccc; margin: 20px 0; }
#profile-journey progress { display: block; width: 100%; margin: 8px 0; accent-color: #b62935; }
.workplace-controls { border-top: 1px solid #aaa; padding-top: 20px; margin-top: 20px; }
.career-details, .profile-edit-details { padding: 12px 0; }
.career-details > summary, .profile-edit-details > summary { cursor: pointer; font-weight: 600; }
#profile-overview-panel > .profile-hero { border: 0; box-shadow: none; border-radius: 0; }
.deals-section { border: 0; background: transparent; border-radius: 0; }
@media (max-width: 600px) {
  .repair-plan-grid { grid-template-columns: 1fr !important; }
  .deal-workflow button { padding: 10px; font-size: 14px; }
  .npc-profile { grid-template-columns: 1fr; }
  #reset-skills { width: 100%; white-space: normal; }
  .workplace-controls .property-actions { display: grid; }
  .workplace-controls button { white-space: normal; }
}
