/* ==========================================================================
   CityHunt — design system
   Dark noir theme, RTL first. All sizes tuned to the supplied mock-ups.
   ========================================================================== */

@font-face {
  font-family: 'Vazirmatn';
  src: local('Vazirmatn'), local('Vazir'), url('../assets/fonts/Vazirmatn-Regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Vazirmatn';
  src: local('Vazirmatn Bold'), local('Vazir Bold'), url('../assets/fonts/Vazirmatn-Bold.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}

:root {
  --bg: #0a0a0b;
  --bg-elev: #0f0f11;
  --surface: #141417;
  --surface-2: #1a1a1e;
  --surface-3: #202026;
  --line: #26262c;
  --line-soft: #1d1d22;

  --red: #e21b2c;
  --red-bright: #ff2b3d;
  --red-dim: rgba(226, 27, 44, 0.14);
  --red-glow: rgba(226, 27, 44, 0.45);

  --text: #f4f4f5;
  --text-2: #c9c9cf;
  --muted: #7e7e88;
  --muted-2: #5b5b64;

  --gold: #e0a92e;
  --silver: #c7ccd4;
  --bronze: #b3763a;
  --blue: #3f7fd0;
  --purple: #8b56c9;
  --green: #35c26b;

  --r-lg: 20px;
  --r-md: 14px;
  --r-sm: 10px;

  --nav-h: 62px;
  --header-h: 58px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
  --font: 'Vazirmatn', 'IRANSansX', 'IRANSans', 'Segoe UI', Tahoma, system-ui, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.7;
  overscroll-behavior-y: none;
}

body { -webkit-font-smoothing: antialiased; }

button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}
button { cursor: pointer; border: none; background: none; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* icons default to a text-sized box unless a component states otherwise */
svg:not([width]) { width: 17px; height: 17px; flex: none; }

::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-thumb { background: #2a2a31; border-radius: 4px; }

/* ---------- app shell ---------- */

.app-shell {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100%;
  background: var(--bg);
  position: relative;
  overflow-x: hidden;
}

.screen {
  min-height: 100vh;
  padding-bottom: calc(var(--nav-h) + 18px + env(safe-area-inset-bottom));
  animation: fade-in 0.22s ease;
}
.screen.no-nav { padding-bottom: 24px; }

@keyframes fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.container { padding: 0 16px; }

/* ---------- status + header ---------- */

.statusbar {
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  font-size: 12px;
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.4px;
}
.statusbar .sb-icons { display: flex; gap: 5px; align-items: center; opacity: 0.9; }

.appbar {
  height: var(--header-h);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 14px;
  position: relative;
}
.appbar-logo { height: 40px; width: auto; margin: 0 auto; }
.appbar-side { display: flex; align-items: center; gap: 10px; }
.appbar-side.start { justify-content: flex-start; }
.appbar-side.end { justify-content: flex-end; }

.icon-btn {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 50%;
  color: var(--text-2);
}
.icon-btn:active { background: var(--surface-2); }

.ghost-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: rgba(20, 20, 23, 0.75);
  color: var(--text-2);
  font-size: 12px;
}
.ghost-btn.small { padding: 5px 10px; font-size: 11px; }
.ghost-btn:active { background: var(--surface-2); }

.page-title { text-align: center; margin: 4px 0 2px; font-size: 21px; font-weight: 700; }
.page-sub { text-align: center; color: var(--muted); font-size: 12px; margin-bottom: 10px; }
.title-rule { width: 46px; height: 3px; background: var(--red); border-radius: 3px; margin: 6px auto 16px; }

/* ---------- bottom navigation ---------- */

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(9, 9, 10, 0.97);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--line-soft);
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  z-index: 40;
}
.nav-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px;
  color: var(--muted);
  font-size: 10.5px;
  position: relative;
  padding-top: 4px;
}
.nav-item svg { width: 21px; height: 21px; }
.nav-item.active { color: var(--red); }
.nav-item.active::after {
  content: '';
  position: absolute;
  bottom: 4px;
  width: 26px; height: 2.5px;
  border-radius: 2px;
  background: var(--red);
}
.nav-badge {
  position: absolute; top: 0; inset-inline-end: 22%;
  min-width: 15px; height: 15px; padding: 0 3px;
  border-radius: 9px; background: var(--red); color: #fff;
  font-size: 9px; display: grid; place-items: center; font-weight: 700;
}

/* ---------- cards ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  padding: 14px;
  margin-bottom: 12px;
}
.card.tight { padding: 10px; }
.card.active-outline { border-color: var(--red); box-shadow: 0 0 0 1px rgba(226,27,44,.25), 0 0 24px -8px var(--red-glow); }

.card-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.card-head h3 { margin: 0; font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 7px; }
.card-head .link { color: var(--red); font-size: 11.5px; display: inline-flex; align-items: center; gap: 3px; }

.section-title { font-size: 15px; font-weight: 700; margin: 18px 0 10px; display: flex; align-items: center; gap: 8px; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%;
  padding: 13px 16px;
  border-radius: var(--r-md);
  background: var(--red);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  transition: transform 0.08s ease, filter 0.15s ease;
}
.btn:active { transform: scale(0.985); filter: brightness(0.92); }
.btn[disabled] { opacity: 0.5; pointer-events: none; }
.btn.outline { background: transparent; border: 1.5px solid var(--red); color: var(--red); }
.btn.dark { background: var(--surface-2); border: 1px solid var(--line); color: var(--text-2); font-weight: 500; }
.btn.small { padding: 9px 14px; font-size: 12.5px; width: auto; }
.btn.block { width: 100%; }
.btn.lock { background: var(--surface-3); color: var(--muted); }

.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 11px;
  color: var(--text-2);
}
.chip.red { background: var(--red-dim); border-color: rgba(226,27,44,.4); color: #ff6a76; }
.chip.green { background: rgba(53,194,107,.12); border-color: rgba(53,194,107,.35); color: var(--green); }
.chip.gold { background: rgba(224,169,46,.12); border-color: rgba(224,169,46,.35); color: var(--gold); }

/* ---------- forms ---------- */

.field { margin-bottom: 14px; }
.field label { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-2); margin-bottom: 7px; }
.field .hint-text { color: var(--muted); font-size: 11px; margin-top: 6px; }

.input, .textarea, .select {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 13px 14px;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s ease;
}
.input:focus, .textarea:focus, .select:focus { border-color: var(--red); }
.input::placeholder, .textarea::placeholder { color: var(--muted-2); }
.textarea { min-height: 92px; resize: vertical; line-height: 1.8; }
.select { appearance: none; background-image: none; }
.input.ltr { direction: ltr; text-align: right; }

.row { display: flex; gap: 10px; }
.row > * { flex: 1; }

.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.switch input { display: none; }
.switch .track {
  width: 42px; height: 24px; border-radius: 999px;
  background: var(--surface-3); border: 1px solid var(--line);
  position: relative; transition: background 0.18s ease;
}
.switch .track::after {
  content: ''; position: absolute; top: 2px; inset-inline-start: 2px;
  width: 18px; height: 18px; border-radius: 50%; background: var(--muted);
  transition: transform 0.18s ease, background 0.18s ease;
}
.switch input:checked + .track { background: var(--red-dim); border-color: var(--red); }
.switch input:checked + .track::after { background: var(--red); transform: translateX(-18px); }

/* ---------- toast + modal ---------- */

.toasts {
  position: fixed; bottom: calc(var(--nav-h) + 18px); left: 0; right: 0;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  z-index: 90; pointer-events: none;
}
.toast {
  background: var(--surface-3);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 12.5px;
  box-shadow: var(--shadow);
  animation: toast-in 0.2s ease;
  max-width: 88%;
  text-align: center;
}
.toast.ok { border-color: rgba(53,194,107,.45); color: #79e2a2; }
.toast.err { border-color: rgba(226,27,44,.5); color: #ff7b86; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; } }

.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.72);
  backdrop-filter: blur(3px); z-index: 80;
  display: flex; align-items: flex-end; justify-content: center;
  animation: fade-in .18s ease;
}
.modal {
  width: 100%; max-width: 480px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 22px 22px 0 0;
  padding: 18px 16px calc(20px + env(safe-area-inset-bottom));
  max-height: 88vh; overflow-y: auto;
  animation: sheet-up .25s cubic-bezier(.2,.8,.2,1);
}
@keyframes sheet-up { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }
.modal h3 { margin: 0 0 12px; font-size: 16px; }
.modal .grabber { width: 40px; height: 4px; border-radius: 4px; background: var(--line); margin: 0 auto 14px; }

/* ---------- splash ---------- */

.splash {
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 26px;
  background:
    radial-gradient(120% 60% at 50% 105%, rgba(226,27,44,.22), transparent 60%),
    linear-gradient(180deg, #0b0b0c 0%, #0a0a0b 55%, #050505 100%);
  position: relative; overflow: hidden;
}
.splash .logo { width: 62%; max-width: 240px; filter: drop-shadow(0 8px 26px rgba(0,0,0,.6)); }
.splash .skyline {
  position: absolute; bottom: 0; left: 0; right: 0; width: 100%;
  opacity: .55; mask-image: linear-gradient(180deg, transparent, #000 45%);
}
.splash .loading { display: flex; flex-direction: column; align-items: center; gap: 12px; z-index: 2; }
.splash .spinner {
  width: 42px; height: 42px; border-radius: 50%;
  border: 3px solid #2b2b31; border-top-color: var(--red);
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.splash .loading span { color: var(--muted); font-size: 12.5px; }

/* ---------- login ---------- */

.login-wrap { min-height: 100vh; display: flex; flex-direction: column; position: relative; }
.login-wrap .skyline-bg {
  position: absolute; bottom: 0; left: 0; right: 0; opacity: .45;
  mask-image: linear-gradient(180deg, transparent, #000 60%);
}
.login-hero { text-align: center; padding: 26px 16px 10px; }
.login-hero img { width: 130px; margin: 0 auto 14px; }
.login-hero h1 { font-size: 19px; margin: 0 0 6px; }
.login-hero h1 b { color: var(--red); }
.login-hero p { color: var(--muted); font-size: 12.5px; margin: 0; }

.tabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.tab { padding: 12px 6px; text-align: center; font-size: 13px; color: var(--muted); position: relative; }
.tab.active { color: var(--red); font-weight: 700; }
.tab.active::after { content: ''; position: absolute; bottom: -1px; left: 12%; right: 12%; height: 2px; background: var(--red); border-radius: 2px; }

.divider-text { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 11.5px; margin: 16px 0; }
.divider-text::before, .divider-text::after { content: ''; height: 1px; background: var(--line); flex: 1; }

.social-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.social-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px; border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--surface); font-size: 12.5px; color: var(--text-2);
}

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 22px 6px 12px; z-index: 2; }
.feature { text-align: center; }
.feature svg { width: 26px; height: 26px; color: var(--red); margin: 0 auto 7px; }
.feature b { display: block; font-size: 12px; margin-bottom: 3px; }
.feature span { color: var(--muted); font-size: 10.5px; line-height: 1.6; display: block; }

.legal { text-align: center; color: var(--muted-2); font-size: 10.5px; padding: 8px 16px calc(16px + env(safe-area-inset-bottom)); z-index: 2; }
.legal a { color: var(--red); }

/* ---------- games list ---------- */

.games-hero {
  padding: 4px 16px 12px;
  background:
    linear-gradient(180deg, rgba(226,27,44,.10), transparent 70%);
}
.games-hero h2 { font-size: 19px; margin: 0 0 4px; border-inline-start: 3px solid var(--red); padding-inline-start: 10px; }
.games-hero p { color: var(--muted); font-size: 12.5px; margin: 0; padding-inline-start: 13px; }

.filter-bar {
  display: flex; gap: 18px; padding: 6px 16px 14px;
  overflow-x: auto; scrollbar-width: none;
}
.filter-bar::-webkit-scrollbar { display: none; }
.filter {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  color: var(--muted); font-size: 11.5px; white-space: nowrap; position: relative; padding-bottom: 7px;
}
.filter svg { width: 19px; height: 19px; }
.filter.active { color: var(--red); font-weight: 700; }
.filter.active::after { content: ''; position: absolute; bottom: 0; width: 100%; height: 2px; background: var(--red); border-radius: 2px; }

.game-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-bottom: 14px;
}
.game-card .flag {
  position: absolute; top: 12px; left: 0;
  background: var(--red); color: #fff; font-size: 10.5px; font-weight: 700;
  padding: 3px 12px 3px 10px; border-radius: 0 6px 6px 0; z-index: 2;
}
.game-card .flag.grey { background: var(--surface-3); color: var(--muted); }
.game-card .bookmark { position: absolute; top: 12px; right: 12px; color: var(--red); z-index: 2; }
.game-card .body { display: flex; flex-direction: row-reverse; gap: 12px; padding: 12px; }
.game-card .thumb { width: 92px; height: 92px; border-radius: var(--r-md); object-fit: cover; flex: none; background: var(--surface-2); }
.game-card .info { flex: 1; min-width: 0; padding-inline-start: 26px; }
.game-card h3 { margin: 0 0 4px; font-size: 15px; }
.game-card .desc { color: var(--muted); font-size: 11.5px; margin: 0 0 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meta-row { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 11px; flex-wrap: wrap; }
.meta-row .m { display: inline-flex; align-items: center; gap: 4px; }
.meta-row .m svg { width: 14px; height: 14px; opacity: .85; }
.game-card .foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  border-top: 1px solid var(--line-soft); padding: 10px 12px;
}

/* ---------- home ---------- */

.game-hero {
  position: relative; padding: 14px 16px 16px;
  background: linear-gradient(180deg, rgba(226,27,44,.12), transparent 75%);
  overflow: hidden;
}
.game-hero .hero-map {
  position: absolute; inset: 0; opacity: .16;
  background-image: url('../assets/skyline.jpg');
  background-size: cover; background-position: center;
  filter: grayscale(1) contrast(1.2);
}
.game-hero .hero-inner { position: relative; display: flex; flex-direction: row-reverse; gap: 12px; align-items: flex-start; }
.game-hero img.cover { width: 80px; height: 100px; object-fit: cover; border-radius: var(--r-md); flex: none; }
.game-hero h2 { margin: 0 0 8px; font-size: 17px; flex: 1; }
.game-hero .meta { display: flex; flex-direction: column; gap: 5px; color: var(--text-2); font-size: 11.5px; }
.game-hero .meta .m { display: flex; align-items: center; gap: 6px; }
.game-hero .meta svg { width: 14px; height: 14px; color: var(--muted); }

.status-card { display: grid; grid-template-columns: repeat(2, 1fr) auto repeat(2, 1fr); align-items: center; gap: 8px; }
.status-col { text-align: center; }
.status-col .k { color: var(--muted); font-size: 10.5px; display: flex; align-items: center; justify-content: center; gap: 4px; margin-bottom: 4px; }
.status-col .k svg { width: 14px; height: 14px; }
.status-col .v { font-size: 17px; font-weight: 700; color: var(--red); direction: ltr; }
.status-col .s { color: var(--muted); font-size: 10px; }

.ring { width: 96px; height: 96px; position: relative; margin: 0 auto; }
.ring svg { transform: rotate(-90deg); }
.ring .ring-label {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 1px;
}
.ring .ring-label b { font-size: 17px; direction: ltr; }
.ring .ring-label span { color: var(--muted); font-size: 10px; }

.tile-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; margin-bottom: 10px; }
.tile-grid.three { grid-template-columns: repeat(3, 1fr); }
.tile {
  background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: var(--r-md); padding: 12px 6px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  text-align: center; position: relative;
}
.tile svg { width: 22px; height: 22px; color: var(--text-2); }
.tile b { font-size: 11.5px; font-weight: 700; }
.tile span { color: var(--muted); font-size: 10px; }
.tile.active { border-color: var(--red); background: rgba(226,27,44,.07); }
.tile.active svg { color: var(--red); }
.tile .dot-badge {
  position: absolute; top: 8px; inset-inline-end: 8px;
  min-width: 16px; height: 16px; border-radius: 8px; background: var(--red);
  color: #fff; font-size: 9px; display: grid; place-items: center; font-weight: 700;
}

/* stage strip on home */
.stage-strip { display: flex; align-items: flex-start; gap: 0; overflow-x: auto; padding: 6px 2px 4px; scrollbar-width: none; }
.stage-strip::-webkit-scrollbar { display: none; }
.stage-node { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 45px; position: relative; }
.stage-node .bubble {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1.5px solid var(--line); display: grid; place-items: center;
  font-size: 14px; font-weight: 700; color: var(--muted); background: var(--surface);
}
.stage-node.solved .bubble { border-color: var(--red); color: var(--red); }
.stage-node.active .bubble { border-color: var(--red); color: #fff; background: var(--red-dim); box-shadow: 0 0 0 3px rgba(226,27,44,.18), 0 0 20px -4px var(--red-glow); }
.stage-node .lbl { font-size: 9.5px; color: var(--muted); text-align: center; }
.stage-node .st { font-size: 9px; color: var(--muted-2); }
.stage-node.solved .st { color: var(--red); }
.stage-node.active .lbl, .stage-node.active .st { color: var(--red); font-weight: 700; }
.stage-node::after {
  content: ''; position: absolute; top: 17px; inset-inline-end: -50%;
  width: 100%; height: 1px; background: var(--line); z-index: -1;
}
.stage-node:last-child::after { display: none; }
.stage-node .pin-mark { position: absolute; top: -16px; color: var(--red); }

.current-stage-card { display: flex; flex-direction: row-reverse; gap: 12px; }
.current-stage-card img { width: 92px; height: 92px; object-fit: cover; border-radius: var(--r-md); flex: none; }
.current-stage-card .txt { flex: 1; min-width: 0; }
.current-stage-card .txt .lead { color: var(--red); font-size: 11px; margin-bottom: 3px; }
.current-stage-card h3 { margin: 0 0 6px; font-size: 15px; }
.current-stage-card p { color: var(--muted); font-size: 11.5px; margin: 0 0 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- puzzle ---------- */

.puzzle-topbar {
  display: grid; grid-template-columns: 1fr 1.4fr 1fr;
  border-bottom: 1px solid var(--line-soft);
  padding: 10px 14px 12px; gap: 6px; position: relative;
}
.puzzle-topbar .cell { text-align: center; }
.puzzle-topbar .cell .k { color: var(--muted); font-size: 10.5px; }
.puzzle-topbar .cell .v { font-size: 16px; font-weight: 700; }
.puzzle-topbar .cell.mid .v { font-size: 13.5px; }
.puzzle-topbar .cell + .cell { border-inline-end: 1px solid var(--line-soft); }
.puzzle-topbar .progress-line { position: absolute; bottom: -1px; inset-inline-start: 0; height: 2px; background: var(--red); border-radius: 2px; }

.puzzle-card .lead { color: var(--red); font-size: 11.5px; }
.puzzle-card h2 { font-size: 19px; margin: 4px 0 10px; }
.puzzle-card .question { font-size: 13.5px; line-height: 2; color: var(--text-2); white-space: pre-line; }
.puzzle-media { border-radius: var(--r-md); overflow: hidden; margin: 14px 0; border: 1px solid var(--line-soft); }
.puzzle-media img, .puzzle-media video { width: 100%; display: block; }

.answer-label { color: var(--text-2); font-size: 12.5px; margin: 12px 0 8px; }
.answer-box { display: flex; align-items: center; gap: 10px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-md); padding: 4px 12px; }
.answer-box input { flex: 1; background: none; border: none; outline: none; padding: 12px 0; }
.answer-box svg { color: var(--muted); width: 20px; height: 20px; }

.hint-cta { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--surface-2); border: 1px solid var(--line-soft); border-radius: var(--r-md); padding: 10px 12px; margin-top: 12px; }
.hint-cta .next { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11.5px; }
.hint-cta .next b { display: block; color: var(--text-2); font-size: 12px; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mini-card { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--r-md); padding: 12px; }
.mini-card .t { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); margin-bottom: 8px; }
.mini-card .t svg { width: 15px; height: 15px; color: var(--muted); }
.mini-card p { margin: 0; color: var(--muted); font-size: 11.5px; line-height: 1.9; }
.mini-card .area { color: var(--red); font-size: 11.5px; margin-top: 8px; }

.attempt-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 0; border-bottom: 1px dashed var(--line-soft); font-size: 11.5px; }
.attempt-row:last-child { border-bottom: none; }
.attempt-row .a { color: var(--text-2); }
.attempt-row .t { color: var(--muted-2); font-size: 10.5px; direction: ltr; }
.attempt-row .x { color: var(--red); }
.attempt-row .ok { color: var(--green); }

/* ---------- hints screen ---------- */

.hint-summary { display: flex; flex-direction: row-reverse; gap: 12px; align-items: center; }
.hint-summary img { width: 92px; height: 78px; object-fit: cover; border-radius: var(--r-md); flex: none; }
.hint-summary .lead { color: var(--red); font-size: 11.5px; }
.hint-summary h3 { margin: 3px 0 6px; font-size: 17px; }
.hint-summary p { margin: 0; color: var(--muted); font-size: 11.5px; line-height: 1.8; }

.hint-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.hint-stats .c { text-align: center; }
.hint-stats .c .k { color: var(--muted); font-size: 10px; display: flex; align-items: center; justify-content: center; gap: 4px; }
.hint-stats .c .v { font-weight: 700; font-size: 13px; margin-top: 3px; }

.hint-card {
  display: flex; flex-direction: row-reverse; gap: 12px; align-items: stretch;
  background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: var(--r-lg); padding: 14px; margin-bottom: 12px;
}
.hint-card.next { border-color: var(--red); box-shadow: 0 0 22px -12px var(--red-glow); }
.hint-card.unlocked { border-color: rgba(53,194,107,.35); }
.hint-card .bulb {
  width: 52px; flex: none; display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.hint-card .bulb .circle {
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  border: 1.5px solid var(--line); color: var(--muted); background: var(--surface-2);
}
.hint-card.next .bulb .circle { border-color: var(--red); color: var(--red); box-shadow: 0 0 0 3px rgba(226,27,44,.12), 0 0 20px -6px var(--red-glow); }
.hint-card.unlocked .bulb .circle { border-color: var(--green); color: var(--green); }
.hint-card .bulb b { font-size: 11px; }
.hint-card.next .bulb b { color: var(--red); }
.hint-card .bulb .tag { font-size: 9.5px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 1px 7px; }
.hint-card.next .bulb .tag { color: var(--red); border-color: rgba(226,27,44,.5); }
.hint-card .body { flex: 1; min-width: 0; }
.hint-card .body p { margin: 0; font-size: 12.5px; line-height: 1.95; color: var(--text-2); }
.hint-card .body .note { color: var(--muted-2); font-size: 10.5px; margin-top: 8px; }
.hint-card .body .locked-text { color: var(--muted-2); filter: blur(3.5px); user-select: none; }
.hint-card .side { width: 104px; flex: none; text-align: center; display: flex; flex-direction: column; gap: 8px; justify-content: center; }
.hint-card .side .k { color: var(--muted); font-size: 10px; }
.hint-card .side .v { color: var(--red); font-size: 12.5px; font-weight: 700; }

.warn-box {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--r-lg);
  padding: 13px; color: var(--muted); font-size: 11.5px; line-height: 1.9;
}
.warn-box svg { width: 20px; height: 20px; color: var(--red); flex: none; }

/* ---------- game map (path) ---------- */

.path-wrap { position: relative; padding: 8px 0 16px; }
.path-bg {
  position: absolute; inset: 0;
  background-image: url('../assets/path-bg.jpg');
  background-size: cover; background-position: center;
  opacity: .12; filter: grayscale(1);
  mask-image: radial-gradient(70% 60% at 50% 40%, #000, transparent);
}
.legend { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--r-md); padding: 9px 12px; font-size: 11px; width: max-content; }
.legend .l { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.legend .l svg { width: 14px; height: 14px; }

.path { position: relative; display: flex; flex-direction: column; align-items: center; gap: 0; padding: 6px 16px 0; }
.path-item { display: flex; align-items: center; gap: 12px; position: relative; width: 100%; justify-content: center; }
.path-item .node {
  width: 54px; height: 54px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-size: 17px; font-weight: 700;
  border: 2px solid var(--line); color: var(--muted); background: var(--bg-elev); position: relative;
}
.path-item.solved .node { border-color: var(--red); color: var(--red); }
.path-item.active .node { border-color: var(--red); color: #fff; background: rgba(226,27,44,.16); box-shadow: 0 0 0 4px rgba(226,27,44,.12), 0 0 30px -4px var(--red-glow); }
.path-item .node .badge {
  position: absolute; bottom: -6px; inset-inline-end: -4px;
  width: 20px; height: 20px; border-radius: 50%; background: var(--bg);
  display: grid; place-items: center; border: 1px solid var(--line);
}
.path-item.solved .node .badge { border-color: var(--red); color: var(--red); }
.path-item .label {
  background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: var(--r-md); padding: 8px 12px; min-width: 150px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.path-item.active .label { border-color: var(--red); }
.path-item .label b { font-size: 12.5px; display: block; }
.path-item .label span { font-size: 10.5px; color: var(--muted); }
.path-item.solved .label span, .path-item.active .label span { color: var(--red); }
.path-connector { height: 40px; width: 2px; position: relative; }
.path-connector::before {
  content: ''; position: absolute; inset: 0;
  background-image: linear-gradient(var(--line) 55%, transparent 0);
  background-size: 2px 9px;
}
.path-connector.done::before { background-image: linear-gradient(var(--red) 55%, transparent 0); }

.path-footer {
  position: sticky; bottom: calc(var(--nav-h) + 8px);
  margin: 14px 16px 0;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--r-lg); padding: 10px 14px;
}
.path-footer .c { text-align: center; }
.path-footer .k { color: var(--muted); font-size: 10.5px; display: flex; align-items: center; justify-content: center; gap: 4px; }
.path-footer .v { font-weight: 700; font-size: 14px; color: var(--red); direction: ltr; }

/* ---------- real map ---------- */

.map-toolbar { display: flex; align-items: center; justify-content: space-between; padding: 0 16px 10px; }
.map-legend-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin: 0 16px 10px; padding: 9px 12px;
  background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--r-md);
  font-size: 10.5px; color: var(--muted); flex-wrap: wrap;
}
.map-legend-bar .l { display: inline-flex; align-items: center; gap: 5px; }
.map-legend-bar .l .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--red); }
.map-legend-bar .l .dot.blue { background: #2f7ef5; box-shadow: 0 0 0 3px rgba(47,126,245,.25); }
.map-legend-bar .l .dot.grey { background: var(--muted-2); }

#map { height: 58vh; min-height: 340px; background: #101014; }
.leaflet-container { background: #0d0d10 !important; font-family: var(--font); }
.leaflet-tile { filter: grayscale(0.9) invert(0.92) hue-rotate(180deg) brightness(0.86) contrast(1.05); }
.leaflet-control-attribution { background: rgba(0,0,0,.5) !important; color: #6a6a72 !important; font-size: 9px; }
.leaflet-control-attribution a { color: #8a8a92 !important; }
.leaflet-bar a { background: var(--surface) !important; color: var(--text-2) !important; border-color: var(--line) !important; }

.map-fallback { height: 58vh; min-height: 340px; display: flex; flex-direction: column; gap: 10px; align-items: center; justify-content: center; color: var(--muted); text-align: center; padding: 20px; background: var(--surface); }

.marker-pin {
  width: 30px; height: 30px; border-radius: 50% 50% 50% 0;
  background: var(--red); transform: rotate(-45deg);
  display: grid; place-items: center; border: 2px solid #fff2;
  box-shadow: 0 4px 12px rgba(0,0,0,.5);
}
.marker-pin span { transform: rotate(45deg); color: #fff; font-weight: 700; font-size: 12px; }
.marker-pin.locked { background: var(--surface-3); }
.marker-label {
  background: rgba(10,10,12,.9); border: 1px solid var(--line);
  border-radius: 7px; padding: 3px 8px; font-size: 10.5px; color: var(--text-2); white-space: nowrap;
}
.me-dot { width: 18px; height: 18px; border-radius: 50%; background: #2f7ef5; border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(47,126,245,.25); }

.map-bottom-card { display: flex; flex-direction: row-reverse; gap: 12px; align-items: center; }
.map-bottom-card img { width: 84px; height: 62px; object-fit: cover; border-radius: var(--r-sm); flex: none; }
.map-bottom-card .txt { flex: 1; min-width: 0; }
.map-bottom-card h4 { margin: 0 0 4px; font-size: 13.5px; }
.map-bottom-card p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.progress-bar { height: 6px; border-radius: 6px; background: var(--surface-3); overflow: hidden; margin-top: 8px; }
.progress-bar i { display: block; height: 100%; background: var(--red); border-radius: 6px; }

/* ---------- leaderboard ---------- */

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--r-md); padding: 5px; margin: 0 16px 16px; }
.seg button { padding: 9px 6px; border-radius: 10px; font-size: 12px; color: var(--muted); display: flex; align-items: center; justify-content: center; gap: 6px; }
.seg button svg { width: 15px; height: 15px; }
.seg button.active { background: rgba(226,27,44,.12); border: 1px solid var(--red); color: var(--red); font-weight: 700; }

.podium {
  display: grid; grid-template-columns: 1fr 1.15fr 1fr; align-items: end; gap: 8px;
  padding: 16px 16px 8px; margin: 0 0 4px; position: relative; overflow: hidden;
}
.podium::before {
  content: ''; position: absolute; inset: 0;
  background: url('../assets/skyline.jpg') center/cover;
  opacity: .28; filter: grayscale(.6);
  mask-image: linear-gradient(180deg, #000 30%, transparent);
}
.podium > * { position: relative; }
.podium .p { text-align: center; }
.podium .avatar-wrap { position: relative; width: 74px; margin: 0 auto 8px; }
.podium .p2 .avatar-wrap, .podium .p3 .avatar-wrap { width: 64px; }
.podium .avatar-wrap img { width: 100%; aspect-ratio: 1; border-radius: 50%; object-fit: cover; border: 2px solid var(--line); }
.podium .p1 .avatar-wrap img { border-color: var(--gold); box-shadow: 0 0 24px -6px rgba(224,169,46,.7); }
.podium .p2 .avatar-wrap img { border-color: var(--silver); }
.podium .p3 .avatar-wrap img { border-color: var(--bronze); }
.podium .crown { position: absolute; top: -16px; left: 50%; transform: translateX(-50%); }
.podium .p1 .crown { color: var(--gold); }
.podium .p2 .crown { color: var(--silver); }
.podium .p3 .crown { color: var(--bronze); }
.podium .rank-badge {
  position: absolute; bottom: -8px; left: 50%; transform: translateX(-50%);
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: var(--bg); border: 2px solid var(--gold); font-size: 12px; font-weight: 700; color: var(--gold);
}
.podium .p2 .rank-badge { border-color: var(--silver); color: var(--silver); }
.podium .p3 .rank-badge { border-color: var(--bronze); color: var(--bronze); }
.podium .plate { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--r-md); padding: 10px 8px; }
.podium .plate b { font-size: 12.5px; display: block; margin-bottom: 4px; }
.podium .plate .score { color: var(--gold); font-weight: 700; font-size: 14px; display: flex; align-items: center; justify-content: center; gap: 4px; direction: ltr; }
.podium .p2 .plate .score, .podium .p3 .plate .score { color: var(--gold); font-size: 13px; }
.podium .plate .stage { color: var(--muted); font-size: 10px; margin-top: 3px; }

.me-row {
  display: flex; flex-direction: row-reverse; align-items: center; gap: 12px;
  margin: 12px 16px 14px; padding: 12px 14px;
  border: 1.5px solid var(--red); border-radius: var(--r-lg);
  background: rgba(226,27,44,.05);
}
.me-row .rank { font-size: 20px; font-weight: 700; min-width: 30px; text-align: center; }
.me-row .av { position: relative; width: 46px; flex: none; }
.me-row .av img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; }
.me-row .av .you { position: absolute; bottom: -4px; left: 50%; transform: translateX(-50%); background: var(--red); color: #fff; font-size: 8px; padding: 1px 5px; border-radius: 999px; font-weight: 700; }
.me-row .info { flex: 1; }
.me-row .info b { font-size: 13.5px; }
.me-row .info .score { color: var(--red); font-weight: 700; display: flex; align-items: center; gap: 4px; font-size: 13px; direction: ltr; }
.me-row .stage { color: var(--muted); font-size: 11px; }

.rank-list { margin: 0 16px; background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--r-lg); overflow: hidden; }
.rank-row { display: flex; flex-direction: row-reverse; align-items: center; gap: 12px; padding: 11px 14px; border-bottom: 1px solid var(--line-soft); }
.rank-row:last-child { border-bottom: none; }
.rank-row .n { width: 20px; text-align: center; color: var(--text-2); font-size: 13px; }
.rank-row img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; flex: none; }
.rank-row .nm { flex: 1; font-size: 12.5px; }
.rank-row .sc { color: var(--red); font-weight: 700; font-size: 12.5px; display: flex; align-items: center; gap: 4px; direction: ltr; }
.rank-row .stg { color: var(--muted); font-size: 10.5px; min-width: 50px; text-align: start; }
.rank-row.me { background: rgba(226,27,44,.07); }

.summary-card { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 16px 0; }
.summary-card .c { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--r-lg); padding: 14px; display: flex; align-items: center; gap: 10px; }
.summary-card .c svg { width: 26px; height: 26px; color: var(--gold); }
.summary-card .c .k { color: var(--muted); font-size: 11px; }
.summary-card .c .v { font-size: 19px; font-weight: 700; color: var(--red); direction: ltr; }
.summary-card .c .s { color: var(--muted); font-size: 10px; }

/* ---------- profile ---------- */

.profile-head { display: flex; flex-direction: row-reverse; align-items: center; gap: 14px; padding: 6px 16px 18px; }
.profile-head .av { position: relative; width: 96px; flex: none; }
.profile-head .av img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); }
.profile-head .av .edit {
  position: absolute; bottom: 2px; inset-inline-start: 2px;
  width: 30px; height: 30px; border-radius: 50%; background: var(--red);
  display: grid; place-items: center; color: #fff; border: 3px solid var(--bg);
}
.profile-head h2 { margin: 0 0 2px; font-size: 20px; }
.profile-head .title { color: var(--muted); font-size: 12px; margin-bottom: 8px; }
.profile-head .score { color: var(--red); font-weight: 700; font-size: 17px; display: flex; align-items: center; gap: 6px; direction: ltr; justify-content: flex-end; }
.profile-head .stage { color: var(--muted); font-size: 11.5px; display: flex; align-items: center; gap: 5px; margin-top: 3px; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.stat {
  background: var(--surface-2); border: 1px solid var(--line-soft); border-radius: var(--r-md);
  padding: 12px 4px; text-align: center;
}
.stat svg { width: 22px; height: 22px; color: var(--text-2); margin: 0 auto 8px; }
.stat .v { color: var(--red); font-size: 19px; font-weight: 700; direction: ltr; }
.stat .k { color: var(--muted); font-size: 10px; margin-top: 2px; }

.achievements { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.achievements::-webkit-scrollbar { display: none; }
.ach { width: 96px; flex: none; text-align: center; }
.ach .medal {
  width: 66px; height: 66px; border-radius: 50%; margin: 0 auto 8px;
  display: grid; place-items: center; color: #fff;
  background: radial-gradient(circle at 32% 28%, #d9d9d9, #8a8a8a);
  box-shadow: inset 0 -4px 8px rgba(0,0,0,.35), 0 6px 16px rgba(0,0,0,.45);
}
.ach .medal svg { width: 30px; height: 30px; }
.ach.bronze .medal { background: radial-gradient(circle at 32% 28%, #e0a877, #8a5326); }
.ach.silver .medal { background: radial-gradient(circle at 32% 28%, #eef1f4, #8f979f); }
.ach.gold .medal { background: radial-gradient(circle at 32% 28%, #ffe08a, #c08a12); }
.ach.blue .medal { background: radial-gradient(circle at 32% 28%, #6ea8e8, #1d4f8f); }
.ach.purple .medal { background: radial-gradient(circle at 32% 28%, #c79bea, #6a2fa5); }
.ach.locked .medal { background: radial-gradient(circle at 32% 28%, #3a3a42, #1e1e24); color: var(--muted-2); }
.ach b { font-size: 11.5px; display: block; margin-bottom: 3px; }
.ach span { color: var(--muted); font-size: 9.5px; line-height: 1.6; display: block; }

.activity { display: flex; align-items: flex-start; gap: 11px; padding: 11px 0; border-bottom: 1px solid var(--line-soft); }
.activity:last-child { border-bottom: none; }
.activity .ic { width: 34px; height: 34px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--line-soft); display: grid; place-items: center; flex: none; color: var(--text-2); }
.activity .ic svg { width: 16px; height: 16px; }
.activity .tx { flex: 1; font-size: 12px; }
.activity .pts { color: var(--red); font-size: 11px; font-weight: 700; margin-top: 3px; direction: ltr; }
.activity .pts.minus { color: var(--muted); }
.activity .when { color: var(--muted-2); font-size: 10.5px; white-space: nowrap; }

.sub-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sub-card .k { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.sub-card .state { color: var(--green); font-weight: 700; font-size: 14px; margin-top: 6px; }
.sub-card .until { color: var(--muted); font-size: 11px; margin-top: 2px; }

/* ---------- team ---------- */

.member { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.member:last-child { border-bottom: none; }
.member img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; }
.member .nm { flex: 1; font-size: 13px; }
.member .rl { color: var(--muted); font-size: 11px; }
.code-box {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--surface-2); border: 1px dashed var(--line); border-radius: var(--r-md); padding: 12px 14px;
}
.code-box b { font-size: 19px; letter-spacing: 3px; direction: ltr; }

/* ---------- announcements ---------- */

.announce { border-inline-start: 3px solid var(--red); padding-inline-start: 12px; margin-bottom: 14px; }
.announce h4 { margin: 0 0 4px; font-size: 13.5px; }
.announce p { margin: 0; color: var(--muted); font-size: 11.5px; line-height: 1.9; }
.announce .when { color: var(--muted-2); font-size: 10px; margin-top: 5px; direction: ltr; }

/* ---------- empty / loading ---------- */

.empty { text-align: center; padding: 46px 20px; color: var(--muted); }
.empty svg { width: 44px; height: 44px; color: var(--muted-2); margin: 0 auto 12px; }
.empty b { display: block; margin-bottom: 6px; color: var(--text-2); font-size: 13.5px; }
.empty p { font-size: 12px; margin: 0 0 14px; }

.skeleton { background: linear-gradient(90deg, #141417, #1c1c21, #141417); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: var(--r-md); }
@keyframes shimmer { to { background-position: -200% 0; } }
.loading-screen { display: grid; place-items: center; min-height: 60vh; }

/* ---------- admin ---------- */

.admin { padding-bottom: 40px; }
.admin-bar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 16px; background: rgba(10,10,11,.96); border-bottom: 1px solid var(--line-soft);
  backdrop-filter: blur(10px);
}
.admin-bar h2 { margin: 0; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.admin-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 12px 16px; scrollbar-width: none; }
.admin-tabs::-webkit-scrollbar { display: none; }
.admin-tab { padding: 8px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 12px; color: var(--muted); white-space: nowrap; }
.admin-tab.active { background: var(--red-dim); border-color: var(--red); color: #ff6a76; font-weight: 700; }

.admin-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 0 16px 12px; }
.admin-stat { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--r-md); padding: 13px; }
.admin-stat .v { font-size: 21px; font-weight: 700; color: var(--red); direction: ltr; }
.admin-stat .k { color: var(--muted); font-size: 11px; }

.list-item {
  display: flex; flex-direction: row-reverse; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: var(--r-md); padding: 12px; margin-bottom: 10px;
}
.list-item img.th { width: 52px; height: 52px; border-radius: var(--r-sm); object-fit: cover; flex: none; background: var(--surface-2); }
.list-item .main { flex: 1; min-width: 0; }
.list-item .main b { font-size: 13px; display: block; margin-bottom: 3px; }
.list-item .main span { color: var(--muted); font-size: 11px; }
.list-item .actions { display: flex; gap: 6px; flex: none; }
.icon-action {
  width: 32px; height: 32px; border-radius: var(--r-sm);
  display: grid; place-items: center; background: var(--surface-2);
  border: 1px solid var(--line); color: var(--text-2);
}
.icon-action.danger { color: #ff7b86; border-color: rgba(226,27,44,.35); }
.icon-action svg { width: 15px; height: 15px; }

.stage-editor { border-inline-start: 2px solid var(--line); padding-inline-start: 12px; margin-bottom: 16px; }
.answers-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.answers-chips .chip button { color: var(--muted); display: grid; place-items: center; }

.table { width: 100%; border-collapse: collapse; font-size: 12px; }
.table th, .table td { text-align: start; padding: 9px 8px; border-bottom: 1px solid var(--line-soft); }
.table th { color: var(--muted); font-weight: 500; font-size: 11px; }
.table tbody tr:last-child td { border-bottom: none; }

.uploader { display: flex; align-items: center; gap: 10px; }
.uploader .preview { width: 62px; height: 62px; border-radius: var(--r-sm); object-fit: cover; background: var(--surface-2); border: 1px solid var(--line); }

/* ---------- utilities ---------- */

.mt-0 { margin-top: 0; } .mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; }
.mb-0 { margin-bottom: 0; } .mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; }
.muted { color: var(--muted); }
.red { color: var(--red); }
.center { text-align: center; }
.ltr { direction: ltr; }
.flex { display: flex; align-items: center; gap: 8px; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; }
.hide { display: none !important; }
.small { font-size: 11px; }
.bold { font-weight: 700; }
