:root {
  color-scheme: dark;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  --ink: #f7f7f7;
  --muted: #a7a7aa;
  --panel: rgba(8, 9, 11, 0.9);
  --card: rgba(25, 26, 29, 0.88);
  --line: rgba(255, 255, 255, 0.78);
  --gold: #e4a92e;
  --green: #167a32;
  --red: #991d21;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  overflow: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 72% 20%, rgba(176, 117, 30, 0.17), transparent 28rem),
    linear-gradient(135deg, #050607, #111317 55%, #08090b);
}
button { font: inherit; }

.shell {
  height: 100vh;
  display: grid;
  grid-template-columns: 260px 1fr;
  grid-template-rows: 78px 1fr;
  overflow: hidden;
}
.topbar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 28px;
  background: #020303;
  border-bottom: 1px solid #1d2024;
  position: relative;
  z-index: 20;
}
.brand { font-size: 1.15rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.topbar-right { display: flex; align-items: center; justify-content: flex-end; gap: 18px; min-width: 0; }
.top-stats { display: flex; gap: 18px; flex-wrap: wrap; justify-content: flex-end; }
.top-stats b { margin-right: 5px; }
.money { color: var(--gold); }
.account-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.notification-button {
  position: relative;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.45);
  border-radius: 8px;
  background: rgba(255,255,255,.08);
  cursor: pointer;
}
.notification-button img {
  width: 25px;
  height: 25px;
  object-fit: contain;
}
.notification-button.unread {
  border-color: rgba(228,169,46,.85);
  box-shadow: 0 0 0 2px rgba(228,169,46,.18);
}
.notifications-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 28px;
  z-index: 60;
  width: min(420px, calc(100vw - 32px));
  padding: 16px;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 10px;
  background: rgba(12,13,15,.98);
  box-shadow: 0 22px 70px rgba(0,0,0,.65);
}
.notifications-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}
.notifications-header h2 {
  margin: 2px 0 0;
  font-size: 1.35rem;
}
.notification-close {
  position: static;
  flex: 0 0 auto;
}
.notifications-scroll {
  max-height: min(480px, 60vh);
}
.public-chat {
  position: fixed;
  z-index: 42;
  width: min(360px, calc(100vw - 20px));
  color: #f5f5f5;
  background: rgba(8, 9, 11, .72);
  border: 1px solid rgba(255,255,255,.26);
  border-radius: 8px;
  box-shadow: 0 18px 40px rgba(0,0,0,.45);
  backdrop-filter: blur(7px);
  overflow: hidden;
}
.public-chat.dragging { user-select: none; }
.public-chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  cursor: move;
  background: rgba(0,0,0,.28);
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.public-chat-header strong { font-size: 1rem; }
.public-chat-toggle {
  position: relative;
  min-width: 56px;
  min-height: 34px;
  padding: 6px 10px;
  color: #fff;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 6px;
  font-weight: 900;
  cursor: pointer;
}
.public-chat-toggle:hover { border-color: var(--gold); }
.chat-unread-dot {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 11px;
  height: 11px;
  border: 2px solid #111;
  border-radius: 999px;
  background: var(--gold);
  box-shadow: 0 0 12px rgba(228,169,46,.8);
}
.public-chat.collapsed { width: 210px; }
.public-chat.collapsed .public-chat-header { border-bottom: 0; }
.public-chat-messages {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 270px;
  padding: 10px 12px;
  overflow-y: auto;
}
.public-chat-message {
  padding: 8px 10px;
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 7px;
}
.public-chat-message > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}
.public-chat-message span {
  color: var(--muted);
  font-size: .75rem;
  white-space: nowrap;
}
.public-chat-message p {
  margin: 4px 0 0;
  color: #f3f3f3;
  overflow-wrap: anywhere;
}
.public-chat-empty {
  padding: 18px 8px;
  color: var(--muted);
  text-align: center;
}
.public-chat-compose {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 10px 12px 12px;
  border-top: 1px solid rgba(255,255,255,.12);
}
.public-chat-compose input {
  min-height: 42px;
  padding: 9px 11px;
  color: #fff;
  background: rgba(0,0,0,.72);
  border: 1px solid rgba(255,255,255,.34);
  border-radius: 6px;
  outline: none;
}
.public-chat-compose input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(228,169,46,.18);
}
.public-chat-compose .button {
  min-width: 74px;
  min-height: 42px;
}
.account-name { color: var(--gold); font-weight: 700; }
.account-name-btn {
  background: none; border: none; padding: 0;
  color: var(--gold); font-weight: 700; cursor: pointer;
  text-decoration: underline dotted; font-size: inherit;
}
.account-name-btn:hover { color: #f5c842; }
.account-button {
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid rgba(255,255,255,.55);
  border-radius: 5px;
  color: white;
  background: #292b30;
  cursor: pointer;
  font-weight: 700;
}
.account-button.primary { background: var(--green); }

.sidebar {
  padding: 20px 14px;
  background: rgba(0, 0, 0, .72);
  border-right: 1px solid rgba(255,255,255,.12);
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.nav-heading {
  width: calc(100% - 16px);
  margin: 18px 8px 8px;
  padding: 8px 0;
  border-block: 2px solid var(--line);
  border-inline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 1.35rem;
  font-weight: 800;
  text-align: center;
  cursor: pointer;
}
.nav-heading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.nav-chevron {
  color: var(--gold);
  font-size: 1rem;
}
.nav-section.collapsed .nav-heading {
  border-bottom-color: rgba(255,255,255,.35);
}
.nav-button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  color: var(--ink);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 7px;
  cursor: pointer;
  text-align: left;
}
.nav-button { margin-bottom: 4px; }
.nav-button:hover, .nav-button.active { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.2); }
.nav-icon { width: 28px; height: 28px; object-fit: contain; filter: brightness(0) invert(1); }

.main {
  position: relative;
  min-height: 0;
  min-width: 0;
  padding: 30px clamp(18px, 4vw, 62px) 60px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.page-title {
  max-width: 820px;
  margin: 0 auto 34px;
  padding: 10px;
  border-block: 3px solid var(--line);
  font-size: clamp(2rem, 5vw, 4rem);
  text-align: center;
  font-weight: 300;
}
.status { display: none; }
.status-hidden {
  min-height: 24px;
  margin: -18px 0 18px;
  color: var(--gold);
  text-align: center;
}
/* ── Toast notifications ─────────────────────────────────────────────────── */
#rotd-toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  max-width: 340px;
  padding: 13px 20px;
  background: rgba(18, 18, 26, 0.97);
  color: var(--gold);
  border: 1px solid rgba(228, 169, 46, 0.45);
  border-radius: 10px;
  font-size: .92rem;
  line-height: 1.45;
  z-index: 9999;
  box-shadow: 0 8px 36px rgba(0,0,0,.65);
  pointer-events: none;
  transition: opacity .35s ease, transform .35s ease;
}
.rotd-toast-in  { opacity: 1; transform: translateY(0); }
.rotd-toast-out { opacity: 0; transform: translateY(10px); }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.card {
  padding: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.card h3 { margin: 0 0 7px; }
.card p { color: var(--muted); line-height: 1.5; }
.crime-meta { display: flex; flex-wrap: wrap; gap: 7px 14px; margin: 15px 0; color: #dedede; font-size: .9rem; }
.button {
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid rgba(255,255,255,.8);
  border-radius: 6px;
  color: white;
  background: #33363b;
  cursor: pointer;
  font-weight: 750;
}
.button:hover:not(:disabled) { filter: brightness(1.2); transform: translateY(-1px); }
.button.primary { background: var(--green); }
.button.danger { background: var(--red); }
.button:disabled { cursor: not-allowed; opacity: .42; }
.progress { height: 11px; overflow: hidden; border-radius: 99px; background: #2a2c31; }
.progress > span { display: block; height: 100%; background: var(--gold); }
.metric { display: flex; justify-content: space-between; gap: 10px; margin: 10px 0; }
.marketplace {
  display: grid;
  gap: 18px;
}
.market-panel {
  padding: 18px;
  border: 1px solid rgba(255,255,255,.55);
  border-radius: 8px;
  background: rgba(9,10,12,.78);
}
.market-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.market-header h2 {
  margin: 3px 0 0;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}
.market-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 140px 180px auto;
  gap: 12px;
  align-items: end;
}
#market-list-preview {
  margin-top: 14px;
}
.market-preview-row {
  border-color: rgba(228,169,46,.42);
  background: linear-gradient(90deg, rgba(228,169,46,.10), rgba(255,255,255,.035));
}
.market-list-preview.empty {
  margin-top: 14px;
  padding: 14px;
  border: 1px dashed rgba(255,255,255,.24);
  border-radius: 8px;
  color: var(--muted);
}
.market-form label,
.market-buy-controls label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 700;
}
.market-form input,
.market-form select,
.market-buy-controls input {
  width: 100%;
  min-height: 44px;
  padding: 9px 10px;
  border: 1px solid rgba(255,255,255,.45);
  border-radius: 6px;
  color: var(--ink);
  background: rgba(0,0,0,.45);
  font: inherit;
}
.market-list {
  display: grid;
  gap: 10px;
}
.market-row {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(255,255,255,.035), rgba(228,169,46,.045));
}
.market-item-image {
  width: 82px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 8px;
  background: rgba(255,255,255,.06);
}
.market-item-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.market-row h3 {
  margin: 4px 0;
  font-size: 1.2rem;
}
.market-row p {
  margin: 0;
  color: var(--muted);
}
.market-buy-controls {
  display: grid;
  grid-template-columns: 86px 140px auto;
  gap: 8px;
  align-items: center;
}
.market-search {
  margin-bottom: 14px;
}
.market-search label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 700;
}
.market-search input {
  min-height: 44px;
  padding: 9px 10px;
  border: 1px solid rgba(255,255,255,.45);
  border-radius: 6px;
  color: var(--ink);
  background: rgba(0,0,0,.45);
  font: inherit;
}
.market-subtitle {
  margin: 16px 0 8px;
  color: var(--gold);
  font-size: .82rem;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.vehicle-mod-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 10px;
}
.vehicle-mod-actions select {
  min-height: 44px;
  padding: 9px 10px;
  border: 1px solid rgba(255,255,255,.45);
  border-radius: 6px;
  color: var(--ink);
  background: rgba(0,0,0,.45);
  font: inherit;
}
.mechanic-layout {
  display: grid;
  gap: 18px;
}
.mechanic-row {
  grid-template-columns: 82px minmax(0, 1fr) minmax(260px, 360px);
}
.mechanic-stats {
  margin-top: 10px;
}
.cyber-layout {
  display: grid;
  gap: 18px;
}
.cyber-hero,
.cyber-console {
  border: 1px solid rgba(228,169,46,.45);
  background: linear-gradient(135deg, rgba(6,18,20,.95), rgba(18,15,12,.96));
  border-radius: 8px;
  padding: 24px;
}
.cyber-hero {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
}
.cyber-hero h2,
.cyber-console h3 {
  margin: 4px 0 8px;
}
.cyber-hero p,
.cyber-console p {
  color: var(--muted);
  margin: 0;
}
.cyber-signal {
  display: grid;
  place-items: center;
  min-width: 150px;
  min-height: 110px;
  border: 1px solid rgba(45,197,96,.55);
  border-radius: 8px;
  background: rgba(45,197,96,.08);
}
.cyber-signal span {
  color: #5ff48d;
  font-size: 2rem;
  font-weight: 900;
}
.cyber-signal small,
.cyber-target small,
.cyber-target em {
  color: var(--muted);
}
.cyber-target-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.cyber-target {
  display: grid;
  gap: 8px;
  text-align: left;
  color: var(--text);
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.035);
  border-radius: 8px;
  padding: 16px;
  cursor: pointer;
}
.cyber-target:hover:not(:disabled),
.cyber-target.active {
  border-color: var(--gold);
  background: rgba(228,169,46,.08);
}
.cyber-target span,
.cyber-method-heading {
  color: var(--gold);
  font-size: .8rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.cyber-target strong {
  font-size: 1.15rem;
}
.cyber-target em {
  font-style: normal;
  font-weight: 800;
}
.cyber-console-header,
.cyber-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
}
.cyber-match-meter {
  min-width: 110px;
  text-align: center;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 8px;
  padding: 12px;
  background: rgba(0,0,0,.22);
}
.cyber-match-meter strong {
  display: block;
  color: var(--gold);
  font-size: 1.7rem;
}
.cyber-match-meter span {
  color: var(--muted);
  font-size: .82rem;
}
.cyber-plan {
  display: grid;
  gap: 14px;
  margin: 20px 0;
}
.cyber-method-buttons {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 8px;
}
.cyber-method {
  display: grid;
  gap: 5px;
  text-align: left;
  color: var(--text);
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.04);
  border-radius: 8px;
  padding: 12px;
  cursor: pointer;
}
.cyber-method.active {
  border-color: #8bbcff;
  background: rgba(79,139,220,.12);
}
.cyber-method.matched {
  border-color: #46d36f;
  background: rgba(45,197,96,.12);
}
.cyber-method span,
.cyber-readout {
  color: var(--muted);
}
.cyber-readout {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.cyber-readout span {
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(0,0,0,.2);
}
.cyber-minigame {
  border-color: rgba(80, 180, 220, .55);
}
.cyber-trace {
  height: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  background: rgba(0,0,0,.35);
  margin: 16px 0;
}
.cyber-trace span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #31c46d, #e4a92e, #a51e2b);
  transition: width .18s;
}
.cyber-stage {
  display: grid;
  gap: 14px;
}
.cyber-sequence,
.cyber-pad {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.cyber-sequence span,
.cyber-key,
.cyber-node {
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 8px;
  color: var(--text);
  background: rgba(0,0,0,.28);
}
.cyber-sequence span {
  min-width: 96px;
  padding: 12px 14px;
  text-align: center;
  font-weight: 900;
  color: #8bdcff;
}
.cyber-sequence.hidden span {
  color: var(--muted);
}
.cyber-key {
  min-height: 44px;
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 850;
}
.cyber-key:hover:not(:disabled),
.cyber-node:hover:not(:disabled) {
  border-color: var(--gold);
}
.cyber-timing {
  position: relative;
  height: 54px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 8px;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,.06) 0 1px, transparent 1px 10%);
}
.cyber-window {
  position: absolute;
  top: 8px;
  bottom: 8px;
  border-radius: 6px;
  background: rgba(45,197,96,.28);
  box-shadow: inset 0 0 0 1px rgba(45,197,96,.8);
}
.cyber-pulse {
  position: absolute;
  top: 4px;
  bottom: 4px;
  width: 4px;
  border-radius: 999px;
  background: #8bdcff;
  box-shadow: 0 0 18px rgba(139,220,255,.95);
}
.cyber-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(54px, 1fr));
  gap: 8px;
  max-width: 520px;
}
.cyber-node {
  min-height: 58px;
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 900;
}
.cyber-node.used {
  border-color: rgba(45,197,96,.65);
  background: rgba(45,197,96,.12);
}
.cyber-node.current {
  color: #5ff48d;
  box-shadow: 0 0 0 2px rgba(45,197,96,.35);
}
.cyber-node.goal {
  border-color: var(--gold);
}
.cyber-result {
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 8px;
  padding: 16px;
  background: rgba(0,0,0,.24);
}
.levels-dashboard {
  display: grid;
  gap: 18px;
}
.levels-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, .9fr);
  gap: 20px;
  align-items: center;
  padding: 18px;
  border: 1px solid rgba(228,169,46,.55);
  background: rgba(16, 14, 10, .72);
}
.levels-summary h2 {
  margin: 4px 0 8px;
  font-size: 2.2rem;
}
.levels-summary p {
  margin: 0;
  color: var(--muted);
}
.levels-summary-stats,
.level-stat-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.levels-summary-stats span,
.level-stat-row span {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.035);
}
.levels-summary-stats small,
.level-stat-row small,
.level-next small {
  color: var(--muted);
  font-size: .76rem;
  font-weight: 800;
  text-transform: uppercase;
}
.levels-summary-stats strong,
.level-stat-row strong {
  color: var(--gold);
  font-size: 1.2rem;
}
.levels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.level-card {
  display: grid;
  align-content: start;
  gap: 10px;
}
.level-card-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
}
.level-card h3 {
  margin: 4px 0 0;
  font-size: 1.35rem;
}
.level-badge {
  min-width: 58px;
  min-height: 50px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(228,169,46,.75);
  color: var(--gold);
  background: rgba(228,169,46,.08);
  font-size: 1.2rem;
}
.level-progress {
  height: 13px;
}
.level-card.maxed .level-progress > span {
  background: #38a169;
}
.level-next {
  display: grid;
  gap: 4px;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,.12);
}
.level-next strong {
  color: var(--ink);
}
.level-next span {
  color: var(--muted);
}
.collection-toolbar {
  display: grid;
  grid-template-columns: minmax(190px, .75fr) minmax(0, 1.8fr) minmax(240px, .9fr);
  gap: 12px;
  align-items: end;
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid #34363b;
  background: rgba(255,255,255,.035);
}
.collection-toolbar > div:first-child {
  display: grid;
  gap: 2px;
}
.collection-toolbar strong { font-size: 1.35rem; }
.collection-toolbar small { color: var(--muted); }
.collection-tabs {
  margin: 0;
  justify-content: flex-end;
}
.collection-tabs .button {
  min-height: 36px;
  padding: 7px 11px;
  font-size: .82rem;
}
.collection-tabs.compact .button { min-width: 92px; }
.collection-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.inventory-card {
  min-height: 330px;
  display: grid;
  grid-template-rows: auto auto 1fr auto auto auto;
  text-align: center;
  gap: 8px;
  position: relative;
}
.inventory-card.equipped-card {
  border-color: rgba(228,169,46,.62);
  box-shadow: inset 0 0 0 1px rgba(228,169,46,.18);
}
.collection-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 24px;
  gap: 8px;
}
.collection-type, .equipped-badge {
  color: var(--gold);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}
.equipped-badge {
  padding: 3px 7px;
  border: 1px solid rgba(228,169,46,.55);
  background: rgba(228,169,46,.12);
}
.collection-image {
  min-height: 128px;
  display: grid;
  place-items: center;
  margin: 8px 0;
  overflow: hidden;
  border-radius: 6px;
  background: rgb(212, 203, 195);
}
.collection-image img { width: 100%; height: 150px; object-fit: contain; }
.quantity { color: var(--gold); font-size: 1.4rem; font-weight: 800; }
.inventory-card p { color: var(--muted); margin: 0; }
.rare-note { color: var(--gold); font-size: .8rem; }
.vehicle-stats, .weapon-stats {
  display: grid;
  gap: 7px;
  text-align: left;
}
.weapon-stats.compact-stats {
  margin-bottom: 8px;
}
.vehicle-stats div, .weapon-stats div {
  display: grid;
  grid-template-columns: 70px 38px 1fr;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: .82rem;
}
.vehicle-stats strong, .weapon-stats strong { color: #fff; text-align: right; }
.vehicle-stats i, .weapon-stats i {
  height: 7px;
  display: block;
  background: var(--gold);
  box-shadow: 0 0 10px rgba(228,169,46,.25);
}
.shop-stat-note {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: .88rem;
}
.arms-layout {
  display: grid;
  gap: 16px;
  max-width: 920px;
  margin: 0 auto;
}
.arms-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.arms-deal-flow {
  display: grid;
  gap: 14px;
}
.arms-jobs {
  margin-bottom: 0;
}
.arms-summary strong {
  color: var(--gold);
}
.arms-cargo-row small {
  color: var(--muted);
}
.arms-cargo-row .rare-note {
  margin-left: 4px;
}
.arms-footer {
  margin-top: 0;
  grid-template-columns: auto auto 1fr auto;
}
.arms-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 8px;
  background: rgba(0,0,0,.28);
}
.arms-banner h3,
.arms-panel h3 { margin: 2px 0 6px; }
.arms-banner p { margin: 0; color: var(--muted); }
.arms-banner strong { color: var(--gold); }
.arms-banner.pending { border-color: rgba(228,169,46,.6); background: rgba(228,169,46,.06); }
.arms-banner.ready { border-color: rgba(70,190,105,.62); background: rgba(70,190,105,.08); }
.arms-banner.danger { border-color: rgba(225,74,74,.65); background: rgba(225,74,74,.11); }
.arms-penalty,
.arms-heat-gain { color: #ff8a8a; }
.arms-deal-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.arms-deal-list span {
  padding: 4px 8px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 5px;
  color: var(--muted);
  background: rgba(255,255,255,.04);
  font-size: .78rem;
}
.arms-panel {
  display: grid;
  gap: 14px;
}
.arms-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}
.arms-panel-header > span,
.arms-muted {
  color: var(--muted);
  font-size: .9rem;
}
.arms-upgrade-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}
.arms-upgrade-card p { color: var(--muted); }
.arms-heat-meter { display: grid; gap: 7px; }
.arms-heat-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.arms-heat-label span { font-weight: 900; }
.arms-heat-label small { color: var(--muted); }
.arms-heat-progress { height: 14px; }
.arms-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.arms-risk-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 14px;
  padding: 12px 14px;
  border-radius: 7px;
  background: rgba(0,0,0,.22);
}
.arms-risk-grid span { color: var(--gold); font-weight: 800; }
.arms-risk-grid p { margin: 0; color: var(--muted); }
.arms-upgrade-card {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 7px;
  background: rgba(255,255,255,.04);
}
.arms-upgrade-card strong { color: var(--gold); }
.shop-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
}
.shop-grid { display: grid; gap: 13px; }
.shop-card {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr) minmax(130px, 180px);
  align-items: center;
  gap: 18px;
}
.shop-card.locked-card { opacity: .62; }
.shop-image {
  width: 116px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 6px;
  background: rgb(212, 203, 195);
}
.shop-image img { width: 100%; height: 100%; object-fit: contain; }
.shop-copy { min-width: 0; }
.shop-copy h3 { margin: 3px 0 7px; font-size: 1.2rem; }
.shop-copy p { margin: 0; }
.shop-kicker {
  color: var(--gold);
  font-size: .75rem;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.shop-price { margin-top: 10px; color: var(--gold); font-size: 1.15rem; font-weight: 850; }
.mafia-layout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.mafia-layout.single { grid-template-columns: 1fr; }
.mafia-panel h2, .mafia-hero h2 { margin: 4px 0 10px; font-size: clamp(1.45rem, 3vw, 2.35rem); }
.mafia-panel p, .mafia-hero p { color: var(--muted); }
.mafia-options, .mafia-bank-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin: 14px 0;
}
.mafia-options label, .mafia-bank-grid label {
  display: grid;
  gap: 6px;
  color: #dedede;
  font-weight: 700;
}
.mafia-options select, .mafia-bank-grid input, .mafia-panel input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #777b83;
  border-radius: 6px;
  color: white;
  background: #050607;
  outline: none;
}
.mafia-options select:focus, .mafia-bank-grid input:focus, .mafia-panel input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(228,169,46,.22);
}
.mafia-list { display: grid; gap: 10px; }
.mafia-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.6);
  border-radius: 8px;
  background: rgba(0,0,0,.25);
}
.mafia-row small { display: block; margin-top: 4px; color: var(--muted); }
.mafia-row-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.mafia-row-actions .button {
  min-width: 110px;
}
.mafia-invite-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(130px, 180px);
  align-items: end;
  gap: 12px;
}
.mafia-invite-panel {
  border-color: rgba(228,169,46,.65);
}
.mafia-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.mafia-bank-total { color: var(--gold); font-size: clamp(1.6rem, 4vw, 3rem); font-weight: 900; }
.compact-empty { padding: 28px 14px; }
.mafia-subtabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 10px;
}
.mafia-subtabs .button { width: 100%; }
.mafia-quick-section {
  display: grid;
  gap: 12px;
  margin: 18px 0;
}
.mafia-quick-row {
  display: grid;
  grid-template-columns: 150px repeat(4, minmax(100px, 1fr));
  align-items: center;
  gap: 10px;
}
.mafia-quick-row span {
  color: var(--gold);
  font-size: .8rem;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.mafia-quick-row .button {
  min-height: 40px;
  padding: 8px 10px;
}
.mafia-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 16px;
}
.mafia-overview-grid .mafia-hero {
  grid-column: 1 / -1;
}
.mafia-log-card {
  min-height: 0;
}
.info-grid {
  grid-template-columns: minmax(280px, .9fr) minmax(320px, 1.4fr);
}
.info-summary-card h2,
.activity-card h2 {
  margin-top: 4px;
}
.info-metrics {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}
.activity-list {
  display: grid;
  gap: 9px;
  margin-top: 12px;
}
.activity-scroll {
  max-height: 340px;
  overflow-y: auto;
  padding-right: 6px;
  scrollbar-color: rgba(228,169,46,.78) rgba(255,255,255,.08);
}
.activity-scroll .activity-list { margin-top: 0; }
.activity-scroll .empty { padding: 34px 12px; }
.activity-row {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 8px;
  background: rgba(0,0,0,.26);
}
.activity-mark {
  width: 100%;
  padding: 5px 8px;
  border: 1px solid rgba(228,169,46,.55);
  border-radius: 999px;
  color: var(--gold);
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-align: center;
  text-transform: uppercase;
}
.activity-copy {
  min-width: 0;
}
.activity-copy strong {
  display: block;
  overflow-wrap: anywhere;
  color: #f4f4f4;
  line-height: 1.25;
}
.activity-copy small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}
.activity-amount {
  color: var(--gold);
  font-weight: 900;
  white-space: nowrap;
}
.oc-section {
  display: grid;
  gap: 16px;
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid rgba(255,255,255,.55);
  border-radius: 10px;
  background: rgba(0,0,0,.28);
}
.oc-lobby { border-color: rgba(236, 176, 36, .68); }
.oc-lobby-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
}
.oc-lobby-header h2 {
  margin: 2px 0 4px;
  font-size: clamp(1.4rem, 3vw, 2.3rem);
}
.oc-lobby-header p { margin: 0; color: var(--muted); }
.oc-note {
  max-width: 430px;
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.45;
  text-align: right;
}
.oc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); gap: 16px; }
.oc-card { display: flex; flex-direction: column; gap: 12px; }
.oc-card.locked-card { opacity: .72; }
.role-list { display: grid; gap: 8px; margin: 6px 0 12px; }
.role-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
  align-items: center;
  gap: 12px;
  padding: 9px 10px;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 6px;
  background: rgba(0,0,0,.22);
}
.role-row strong { color: var(--gold); }
.role-row span { color: var(--muted); text-align: right; }
.role-row small { display: block; margin-top: 4px; color: var(--muted); }
.oc-role-row > div,
.oc-slot-state {
  min-width: 0;
}
.oc-slot-state {
  overflow-wrap: anywhere;
}
.oc-role-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 7px;
}
.oc-role-chips span {
  width: auto;
  padding: 3px 7px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 5px;
  background: rgba(255,255,255,.05);
  color: var(--muted);
  font-size: .74rem;
  line-height: 1.25;
  text-align: left;
}
.oc-role-chip {
  position: relative;
  cursor: help;
}
.oc-role-chip:hover,
.oc-role-chip:focus-visible {
  border-color: rgba(228,169,46,.55);
  color: #fff;
}
.oc-role-chip::after {
  content: attr(data-tooltip);
  position: absolute;
  z-index: 40;
  left: 0;
  bottom: calc(100% + 8px);
  width: max-content;
  max-width: 280px;
  padding: 8px 10px;
  border: 1px solid rgba(228,169,46,.55);
  border-radius: 6px;
  background: #050607;
  color: #fff;
  box-shadow: 0 14px 40px rgba(0,0,0,.55);
  font-size: .78rem;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity .12s ease, transform .12s ease;
}
.oc-role-chip:hover::after,
.oc-role-chip:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}
.role-actions {
  display: grid;
  align-items: center;
  gap: 10px;
  min-width: 0;
  width: 100%;
}
.role-actions.has-participant {
  grid-template-columns: minmax(120px, 1fr) auto minmax(120px, 176px);
}
.role-actions.open-slot {
  grid-template-columns: minmax(64px, 120px) minmax(0, 1fr);
}
.role-actions .button {
  min-width: 0;
  width: 100%;
}
.equipment-layout { display: grid; gap: 18px; }
.equipment-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}
.equipment-summary h2 { margin: 2px 0 6px; }
.equipment-summary p { max-width: 720px; margin: 0; color: var(--muted); }
.equipment-protection-total {
  min-width: 180px;
  padding: 14px;
  border: 1px solid rgba(228,169,46,.55);
  border-radius: 8px;
  background: rgba(228,169,46,.1);
  text-align: center;
}
.equipment-protection-total span {
  display: block;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.equipment-protection-total strong {
  display: block;
  margin-top: 4px;
  color: var(--gold);
  font-size: 2rem;
}
.equipment-section {
  display: grid;
  gap: 10px;
}
.equipment-armor-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 14px;
}
.equipment-utility-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(210px, 1fr));
  gap: 14px;
}
.equipment-slot { min-height: 360px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.compact-equipment-slot { min-height: 390px; }
.equipment-slot .button { width: 100%; margin-top: auto; }
.equipped-image { width: min(180px, 80%); margin: 16px auto; }
.equipment-empty { width: 100%; margin: auto 0; }
.active-boost { color: var(--gold); font-weight: 800; }
.crime-card {
  min-height: 245px;
  display: flex;
  align-items: stretch;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}
.crime-content { width: 100%; display: flex; flex-direction: column; align-items: flex-start; }
.crime-content .button { margin-top: auto; }
.empty { padding: 70px 20px; color: var(--muted); text-align: center; border: 1px dashed #555; border-radius: 10px; }
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0,0,0,.78);
  backdrop-filter: blur(4px);
}
.auth-modal {
  position: relative;
  width: min(430px, 100%);
  padding: 28px;
  border: 1px solid white;
  border-radius: 10px;
  background: #121316;
  box-shadow: 0 22px 80px rgba(0,0,0,.65);
}
.auth-modal h2 { margin: 0 0 8px; font-size: 1.8rem; }
.auth-modal p { margin: 0 0 22px; color: var(--muted); }
.auth-modal label { display: grid; gap: 7px; margin: 14px 0; color: #dedede; font-weight: 700; }
.auth-modal input {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #74777e;
  border-radius: 5px;
  color: white;
  background: #050607;
  outline: none;
}
.auth-modal input:focus { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(228,169,46,.2); }
.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 0;
  color: white;
  background: transparent;
  cursor: pointer;
  font-size: 1.2rem;
}
.auth-message { min-height: 24px; margin: 8px 0; color: var(--gold); }
.auth-submit { width: 100%; margin-top: 5px; }

/* Profile modal */
.profile-modal { width: min(880px, 100%); max-height: 90vh; overflow-y: auto; }
.profile-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 18px;
  padding-right: 34px;
}
.profile-header h2 { margin: 2px 0 4px; font-size: clamp(1.8rem, 4vw, 3rem); }
.profile-username { margin: 0; color: var(--muted); font-size: .95rem; }
.profile-rank-pill {
  min-width: 130px;
  padding: 9px 12px;
  border: 1px solid rgba(228,169,46,.7);
  border-radius: 999px;
  color: var(--gold);
  font-weight: 900;
  text-align: center;
}
.profile-tabs { display: grid; grid-template-columns: repeat(5, minmax(110px, 1fr)); gap: 6px; margin-bottom: 16px; }
.profile-tab-content { min-height: 160px; }
.profile-panel {
  padding: 16px;
  margin-top: 14px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 8px;
  background: rgba(0,0,0,.22);
}
.profile-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}
.profile-stat,
.profile-loadout-item {
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 8px;
  background: rgba(255,255,255,.04);
}
.profile-stat span,
.profile-loadout-item span {
  display: block;
  color: var(--muted);
  font-size: .76rem;
  font-weight: 850;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.profile-stat strong,
.profile-loadout-item strong {
  display: block;
  margin-top: 5px;
  overflow-wrap: anywhere;
  color: #f5f5f5;
  font-size: 1.05rem;
}
.profile-loadout-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}
.profile-private-note {
  margin-top: 10px;
  padding: 16px;
  border: 1px dashed rgba(255,255,255,.28);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}
.profile-activity-scroll { max-height: 420px; }
.profile-section {
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  padding: 16px;
  margin: 16px 0 0;
}
.profile-section legend { padding: 0 8px; color: var(--gold); font-weight: 700; font-size: .9rem; }
.profile-hint { margin: 0 0 10px; color: var(--muted); font-size: .85rem; }
.profile-radio-group { display: grid; gap: 8px; }
.profile-radio-group label { display: flex; align-items: center; gap: 8px; font-weight: 400; color: #dedede; cursor: pointer; }
.profile-radio-group input[type=radio] { accent-color: var(--gold); }
.profile-message { min-height: 20px; margin: 12px 0 4px; font-size: .9rem; }
.profile-ok { color: var(--green); }
.profile-err { color: #e05252; }
.profile-stats { display: flex; gap: 16px; flex-wrap: wrap; margin: 12px 0; }
.profile-equipped { margin: 12px 0; display: grid; gap: 6px; }
.profile-equip-item { color: #dedede; font-size: .9rem; }

.oc-participant-name { display: block; font-weight: 600; }
.oc-participant-stats { display: block; color: var(--muted); font-size: .78rem; margin-top: 1px; }
.oc-member-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
  margin-top: 5px;
}
.oc-member-chips span,
.oc-contribution-chip {
  display: inline-flex;
  align-items: center;
  width: auto;
  padding: 3px 7px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 5px;
  background: rgba(255,255,255,.05);
  color: var(--muted);
  font-size: .74rem;
  font-weight: 800;
  line-height: 1.25;
}
.oc-contribution-chip.positive {
  border-color: rgba(70, 190, 105, .7);
  background: rgba(70, 190, 105, .16);
  color: #74e49a;
}
.oc-contribution-chip.neutral {
  border-color: rgba(228,169,46,.65);
  background: rgba(228,169,46,.13);
  color: var(--gold);
}
.oc-contribution-chip.negative {
  border-color: rgba(225, 74, 74, .72);
  background: rgba(225, 74, 74, .15);
  color: #ff8a8a;
}
.oc-add-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(118px, 170px);
  gap: 8px;
  align-items: center;
  width: 100%;
  min-width: 0;
}
.oc-add-dropdown {
  position: relative;
  min-width: 0;
}
.oc-add-dropdown summary {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid #74777e;
  border-radius: 5px;
  background: #050607;
  color: #fff;
  cursor: pointer;
  font-weight: 800;
  list-style: none;
}
.oc-add-dropdown summary::-webkit-details-marker { display: none; }
.oc-add-dropdown summary::after {
  content: "v";
  color: var(--gold);
}
.oc-add-dropdown[open] summary {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(228,169,46,.14);
}
.oc-add-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  display: grid;
  gap: 6px;
  max-height: 280px;
  overflow-y: auto;
  padding: 8px;
  border: 1px solid rgba(228,169,46,.55);
  border-radius: 6px;
  background: #050607;
  box-shadow: 0 18px 50px rgba(0,0,0,.55);
}
.oc-add-option {
  display: grid;
  grid-template-columns: auto minmax(90px, 1fr) auto minmax(110px, 1fr);
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 8px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 6px;
  background: rgba(255,255,255,.04);
  color: var(--muted);
  font: inherit;
  font-size: .78rem;
  text-align: left;
  cursor: pointer;
}
.oc-add-option strong { color: #fff; }
.oc-add-option:hover,
.oc-add-option:focus-visible {
  border-color: var(--gold);
  outline: none;
}
.oc-add-option.positive { border-color: rgba(70, 190, 105, .42); background: rgba(70, 190, 105, .08); }
.oc-add-option.neutral { border-color: rgba(228,169,46,.38); background: rgba(228,169,46,.07); }
.oc-add-option.negative { border-color: rgba(225, 74, 74, .42); background: rgba(225, 74, 74, .08); }
.oc-add-row > .oc-add-select,
.oc-add-row > .oc-add-previews,
.oc-add-row > [data-oc-add-lobby] {
  display: none;
}
@media (max-width: 1180px) {
  .oc-role-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
  .role-actions.has-participant,
  .role-actions.open-slot {
    grid-template-columns: 1fr;
    justify-items: stretch;
  }
  .role-row span,
  .oc-member-chips {
    justify-content: flex-start;
    text-align: left;
  }
}
.oc-add-previews {
  grid-column: 1 / -1;
  display: grid;
  gap: 6px;
}
.oc-add-preview {
  display: grid;
  grid-template-columns: auto minmax(90px, 1fr) auto minmax(110px, 1fr);
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 6px;
  background: rgba(255,255,255,.04);
  color: var(--muted);
  font-size: .78rem;
}
.oc-add-preview strong { color: #fff; }
.oc-add-preview.positive { border-color: rgba(70, 190, 105, .42); background: rgba(70, 190, 105, .08); }
.oc-add-preview.neutral { border-color: rgba(228,169,46,.38); background: rgba(228,169,46,.07); }
.oc-add-preview.negative { border-color: rgba(225, 74, 74, .42); background: rgba(225, 74, 74, .08); }
.oc-add-select {
  min-width: 0; padding: 6px 10px; border-radius: 5px;
  border: 1px solid #74777e; background: #050607; color: white;
  font-size: .85rem; cursor: pointer;
}

/* Clickable player name links */
.link-btn {
  background: none; border: none; padding: 0;
  color: inherit; cursor: pointer; font: inherit;
  text-decoration: underline dotted rgba(255,255,255,.4);
}
.link-btn:hover { color: var(--gold); text-decoration-color: var(--gold); }
.game-lock {
  position: fixed;
  inset: 78px 0 0 0;
  z-index: 55;
  display: grid;
  place-content: center;
  justify-items: center;
  padding: 24px;
  text-align: center;
  background: rgba(5, 6, 7, .78);
  backdrop-filter: blur(5px);
}
.game-lock-icon {
  padding: 8px 14px;
  margin-bottom: 12px;
  border: 1px solid var(--gold);
  border-radius: 5px;
  color: var(--gold);
  font-weight: 900;
  letter-spacing: .12em;
}
.game-lock h2 { margin: 0 0 8px; font-size: clamp(1.8rem, 5vw, 3rem); }
.game-lock p { max-width: 520px; margin: 0 0 22px; color: #d2d2d4; }
.game-lock-actions { display: flex; gap: 12px; }
.jail-overlay {
  position: fixed;
  inset: 78px 0 0 260px;
  z-index: 25;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 12px;
  padding: 24px;
  text-align: center;
  background: rgba(5, 6, 7, .82);
  backdrop-filter: blur(5px);
}
.jail-overlay[hidden] { display: none; }
.jail-release-overlay {
  background: rgba(4, 18, 10, .84);
}
.jail-release-overlay .jail-overlay-icon {
  border-color: #45d978;
  color: #45d978;
}
.jail-overlay-icon {
  padding: 8px 14px;
  border: 1px solid var(--gold);
  border-radius: 5px;
  color: var(--gold);
  font-weight: 900;
  letter-spacing: .12em;
}
.jail-overlay h2 {
  margin: 0;
  font-size: clamp(1.9rem, 5vw, 3.5rem);
}
.jail-overlay p {
  max-width: 560px;
  margin: 0;
  color: #d2d2d4;
  line-height: 1.55;
}
.jail-overlay strong {
  color: var(--gold);
  font-size: clamp(1.2rem, 3vw, 1.7rem);
}
.jail-overlay .button { min-width: 210px; margin-top: 8px; }
.success-overlay {
  position: fixed;
  inset: 78px 0 0 260px;
  z-index: 30;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 12px;
  padding: 24px;
  text-align: center;
  background: rgba(4, 14, 8, .84);
  backdrop-filter: blur(5px);
}
.success-mark {
  padding: 8px 14px;
  border: 1px solid #45d978;
  border-radius: 5px;
  color: #45d978;
  font-weight: 900;
  letter-spacing: .12em;
}
.success-overlay h2 {
  margin: 0;
  font-size: clamp(1.9rem, 5vw, 3.5rem);
}
.success-image {
  width: min(360px, 70vw);
  height: min(280px, 42vh);
  padding: 18px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.38);
  border-radius: 8px;
  background: rgb(212, 203, 195);
}
.success-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.success-overlay strong {
  color: var(--gold);
  font-size: clamp(1.3rem, 4vw, 2rem);
}
.success-overlay p {
  max-width: 520px;
  margin: 0;
  color: #d2d2d4;
}
.success-overlay .button { min-width: 210px; margin-top: 8px; }
.dev-warning {
  max-width: 900px;
  margin: 0 auto 18px;
  padding: 14px 18px;
  color: #f4dca8;
  background: rgba(228, 169, 46, .12);
  border: 1px solid rgba(228, 169, 46, .75);
  border-radius: 8px;
}
.dev-warning strong { display: block; margin-bottom: 3px; color: var(--gold); }
.dev-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(275px, 1fr)); gap: 16px; }
.dev-panel { display: flex; flex-direction: column; gap: 12px; }
.dev-panel h3 { font-size: 1.45rem; }
.dev-quick-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.dev-quick-buttons .button { flex: 1 1 90px; }
.dev-field { display: grid; gap: 6px; color: #dedede; font-size: .88rem; font-weight: 750; }
.dev-field input,
.dev-field select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #74777e;
  border-radius: 5px;
  color: white;
  background: #050607;
  outline: none;
}
.dev-field input:focus,
.dev-field select:focus { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(228,169,46,.2); }
.dev-unlock-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.dev-progress-list {
  display: grid;
  gap: 8px;
}
.dev-progress-list span {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 6px;
  padding: 8px 10px;
  background: rgba(0,0,0,.2);
}
.dev-progress-list small {
  color: var(--muted);
  font-weight: 750;
}
.dev-progress-list strong {
  color: var(--gold);
  white-space: nowrap;
}
.admin-wide { grid-column: 1 / -1; }
.admin-skill-grid { display: grid; gap: 10px; }
.admin-skill-row {
  display: grid;
  grid-template-columns: minmax(145px, .7fr) minmax(100px, 1fr) auto minmax(110px, 1fr) auto minmax(110px, 1fr) auto;
  gap: 10px;
  align-items: end;
  padding: 10px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 7px;
  background: rgba(255,255,255,.025);
}
.admin-skill-row > strong { align-self: center; color: var(--gold); }
@media (max-width: 1100px) {
  .admin-skill-row { grid-template-columns: 1fr; }
}
.locked-view {
  min-height: 420px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  padding: 30px;
  text-align: center;
  border: 1px solid rgba(255,255,255,.6);
  border-radius: 10px;
  background: rgba(12,13,16,.86);
}
.locked-view h2, .locked-view p { margin: 0; }
.locked-view p { max-width: 520px; color: var(--muted); }
.locked-view strong, .lock-mark { color: var(--gold); }
.lock-mark { padding: 8px 13px; border: 1px solid var(--gold); border-radius: 5px; font-weight: 900; letter-spacing: .12em; }
.jail-panel { display: grid; gap: 16px; }
.jail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.jail-header h2 { margin: 0 0 4px; font-size: clamp(1.6rem, 3vw, 2.2rem); }
.jail-header p { margin: 0; color: var(--muted); }
.jail-header .button { min-width: 140px; }
.jail-list { display: grid; gap: 12px; }
.jail-card {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(320px, 2fr) minmax(260px, .9fr);
  align-items: center;
  gap: 18px;
}
.jail-person { display: grid; gap: 4px; }
.jail-person strong { font-size: 1.2rem; }
.jail-person span, .jail-stats small { color: var(--muted); }
.jail-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}
.jail-stats span {
  display: grid;
  gap: 4px;
  padding: 10px;
  background: rgba(0,0,0,.32);
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 7px;
}
.jail-stats strong { color: var(--gold); }
.jail-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.fence-jobs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.fence-job {
  min-height: 82px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  padding: 12px;
  color: white;
  text-align: left;
  background: #18191c;
  border: 1px solid #666970;
  border-radius: 7px;
  cursor: pointer;
}
.fence-job span { display: flex; justify-content: space-between; gap: 8px; }
.fence-job small { color: var(--muted); }
.fence-job.selected { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.fence-job:disabled { cursor: not-allowed; opacity: .42; }
.fence-category-tabs { margin-bottom: 14px; }
.fence-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.fence-summary span {
  display: grid;
  gap: 3px;
  padding: 12px;
  background: rgba(25,26,29,.88);
  border: 1px solid rgba(255,255,255,.45);
  border-radius: 7px;
}
.fence-summary small, .fence-cargo-row small, .fence-footer small { color: var(--muted); }
.fence-cargo { display: grid; gap: 10px; }
.fence-cargo-row {
  display: grid;
  grid-template-columns: 76px minmax(160px, 1fr) minmax(150px, 220px) 110px;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  background: var(--card);
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 8px;
}
.fence-cargo-row img {
  width: 76px;
  height: 62px;
  object-fit: contain;
  border-radius: 4px;
  background: rgb(212,203,195);
}
.fence-cargo-row > div, .fence-cargo-row label { display: grid; gap: 4px; }
.fence-cargo-row input {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  color: white;
  background: #08090b;
  border: 1px solid #6d7077;
  border-radius: 5px;
}
.fence-line-estimate { color: var(--gold); text-align: right; }
.fence-footer {
  position: sticky;
  bottom: 0;
  display: grid;
  grid-template-columns: minmax(130px, 220px) 1fr minmax(180px, 300px);
  align-items: center;
  gap: 16px;
  min-height: 92px;
  margin-top: 16px;
  padding: 15px;
  background: rgba(3,4,5,.96);
  border: 1px solid rgba(255,255,255,.5);
  border-radius: 8px;
}
.fence-footer > div { display: grid; justify-items: center; }
.fence-footer strong { color: var(--gold); font-size: 1.55rem; }

@media (max-width: 760px) {
  body { overflow: auto; }
  #rotd-toast { right: 12px; left: 12px; bottom: 16px; max-width: none; }
  .shell { min-height: 100vh; height: auto; grid-template-columns: 1fr; grid-template-rows: auto auto 1fr; overflow: visible; }
  .topbar { position: static; padding: 14px 16px; align-items: flex-start; }
  .topbar-right { align-items: flex-end; flex-direction: column; gap: 8px; }
  .notifications-popover {
    top: 88px;
    right: 12px;
    left: 12px;
    width: auto;
  }
  .top-stats { gap: 7px 14px; font-size: .86rem; }
  .sidebar {
    display: block;
    max-height: 260px;
    height: auto;
    position: static;
    gap: 8px;
    padding: 10px;
    overflow-y: auto;
    border-right: 0;
    border-bottom: 1px solid rgba(255,255,255,.12);
  }
  .nav-heading { font-size: 1rem; margin: 8px 4px 6px; }
  .nav-button { min-width: 0; padding: 9px 12px; }
  .main { min-height: auto; padding: 22px 14px 44px; overflow: visible; }
  .page-title { margin-bottom: 28px; font-size: 2.2rem; }
  .shop-card {
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 12px;
    padding: 13px;
  }
  .shop-card .button { grid-column: 1 / -1; width: 100%; }
  .shop-image { width: 82px; }
  .collection-toolbar { grid-template-columns: 1fr; align-items: stretch; }
  .collection-tabs { justify-content: stretch; }
  .collection-tabs .button { flex: 1 1 120px; }
  .collection-grid { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
  .market-header,
  .market-row,
  .mechanic-row {
    grid-template-columns: 1fr;
  }
  .market-header {
    display: grid;
  }
  .market-form,
  .market-buy-controls {
    grid-template-columns: 1fr;
  }
  .vehicle-mod-actions {
    grid-template-columns: 1fr;
  }
  .equipment-summary {
    align-items: stretch;
    flex-direction: column;
  }
  .equipment-protection-total {
    width: 100%;
  }
  .equipment-armor-grid,
  .equipment-utility-grid {
    grid-template-columns: 1fr;
  }
  .cyber-hero,
  .cyber-console-header,
  .cyber-footer {
    align-items: stretch;
    flex-direction: column;
  }
  .cyber-signal {
    min-width: 0;
  }
  .cyber-target-grid,
  .cyber-method-buttons {
    grid-template-columns: 1fr;
  }
  .arms-banner,
  .arms-panel-header,
  .arms-heat-label {
    align-items: flex-start;
    flex-direction: column;
  }
  .arms-risk-grid { grid-template-columns: 1fr; }
  .mafia-layout, .mafia-layout.single, .oc-grid { grid-template-columns: 1fr; }
  .mafia-overview-grid { grid-template-columns: 1fr; }
  .info-grid { grid-template-columns: 1fr; }
  .mafia-subtabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mafia-hero { align-items: flex-start; flex-direction: column; }
  .profile-header {
    align-items: stretch;
    flex-direction: column;
    padding-right: 34px;
  }
  .profile-rank-pill {
    width: max-content;
    max-width: 100%;
  }
  .profile-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-stat-grid,
  .profile-loadout-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .activity-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
  .activity-mark {
    width: max-content;
    max-width: 100%;
  }
  .mafia-row, .oc-lobby-header { align-items: flex-start; flex-direction: column; }
  .role-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
  .mafia-row .button, .mafia-panel .button, .role-row .button { width: 100%; }
  .role-row span { text-align: left; }
  .role-actions {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
    min-width: 0;
  }
  .oc-add-row { grid-template-columns: 1fr; }
  .oc-add-preview { grid-template-columns: 1fr; align-items: stretch; }
  .oc-add-menu { position: static; margin-top: 6px; }
  .oc-add-option { grid-template-columns: 1fr; align-items: stretch; }
  .oc-member-chips { justify-content: flex-start; }
  .oc-note { max-width: none; text-align: left; }
  .mafia-bank-grid { grid-template-columns: 1fr; }
  .mafia-quick-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mafia-quick-row span { grid-column: 1 / -1; }
  .equipment-grid { grid-template-columns: 1fr; }
  .jail-overlay, .success-overlay { inset: 0; }
  .jail-header { align-items: stretch; flex-direction: column; }
  .jail-header .button { width: 100%; }
  .jail-card { grid-template-columns: 1fr; }
  .jail-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fence-jobs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fence-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fence-cargo-row {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 10px;
  }
  .fence-cargo-row img { width: 64px; height: 58px; }
  .fence-cargo-row label, .fence-line-estimate { grid-column: 1 / -1; }
  .fence-line-estimate { text-align: left; }
  .fence-footer { grid-template-columns: 1fr; }
  .arms-footer { grid-template-columns: 1fr; }
  .fence-footer .button { width: 100%; }
}
.bragboard-panel { display: grid; gap: 16px; }
.bragboard-subtabs {
  margin-bottom: 0;
}
.bragboard-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}
.bragboard-metrics .button {
  min-height: 38px;
  padding: 7px 14px;
  font-size: .88rem;
}
.bragboard-list { display: grid; gap: 0; }
.bb-header {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 8px 14px;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(255,255,255,.18);
}
.bb-row {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 11px 14px;
  border-bottom: 1px solid rgba(255,255,255,.09);
  transition: background .12s;
}
.bb-row:last-child { border-bottom: 0; }
.bb-row:hover { background: rgba(255,255,255,.04); }
.bb-row.bb-self {
  background: rgba(228,169,46,.08);
  border-bottom-color: rgba(228,169,46,.2);
}
.bb-rank {
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--muted);
  text-align: center;
}
.bb-row:nth-child(-n+4) .bb-rank { color: var(--gold); }
.bb-row.bb-self .bb-rank { color: var(--gold); }
.bb-name { font-weight: 700; }
.bb-self .bb-name::after {
  content: " (you)";
  color: var(--gold);
  font-size: .82rem;
  font-weight: 700;
}
.bb-self.bb-mafia .bb-name::after {
  content: " (your Mafia)";
}
.bb-value {
  color: var(--gold);
  font-weight: 850;
  font-size: 1.05rem;
  text-align: right;
  white-space: nowrap;
}
@media (max-width: 760px) {
  .levels-summary {
    grid-template-columns: 1fr;
  }
  .levels-summary-stats,
  .level-stat-row {
    grid-template-columns: 1fr;
  }
  .bragboard-metrics { gap: 6px; }
  .bragboard-metrics .button { flex: 1 1 120px; text-align: center; }
}

/* BragBoard header row uses .bb-row.bb-header combined */
.bb-row.bb-header {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(255,255,255,.18);
  background: transparent !important;
}
.bb-row.bb-header:hover { background: transparent !important; }
.bb-row.bb-header .bb-value { color: var(--muted); font-size: .78rem; font-weight: 850; }
