/* IVY Leaguer — ivy green, olive drab and khaki, built for phones first. */
:root {
  --bg: #12170f;
  --bg2: #171d13;
  --panel: #1d2418;
  --panel2: #252e1e;
  --line: #354129;
  --ink: #ece6d1;
  --muted: #a8a58e;
  --ivy: #6fa83a;
  --ivy-hi: #8cc653;
  --ivy-deep: #2f5a22;
  --od: #4b5320;
  --khaki: #c3b091;
  --gold: #d6b44c;
  --danger: #d0603f;
  --ok: #43d17a;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --font: 'IBM Plex Sans', system-ui, sans-serif;
  --head: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--font); -webkit-text-size-adjust: 100%; }
body { min-height: 100vh; background:
  radial-gradient(1200px 500px at 85% -10%, rgba(111, 168, 58, .12), transparent 60%),
  radial-gradient(900px 400px at -10% 10%, rgba(75, 83, 32, .35), transparent 60%), var(--bg); }
body.noscroll { overflow: hidden; }
a { color: var(--ivy-hi); }
h1, h2, h3 { font-family: var(--head); letter-spacing: .02em; line-height: 1.1; margin: 0 0 .4em; }
h1 { font-size: 2rem; } h2 { font-size: 1.55rem; } h3 { font-size: 1.25rem; }
p { margin: .4em 0 .8em; }
img { max-width: 100%; }
.mono, .mono-wrap { font-family: var(--mono); }
.mono-wrap { word-break: break-word; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.center { text-align: center; }
.lead { font-size: 1.08rem; }
.ok { color: var(--ok); }
.mt { margin-top: .7rem; }
.eyebrow { font-family: var(--head); text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; color: var(--khaki); font-weight: 700; display: flex; align-items: center; gap: .35em; }
.ic { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }
.row { display: flex; align-items: center; }
.row.gap { gap: .55rem; } .row.wrap { flex-wrap: wrap; } .row.between { justify-content: space-between; gap: .6rem; } .row.end { justify-content: flex-end; } .row.center { justify-content: center; }
.grow { flex: 1; }
.stack { display: grid; gap: .7rem; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
@media (max-width: 420px) { .grid2 { grid-template-columns: 1fr; } }

/* layout */
.topbar { position: sticky; top: 0; z-index: 900; display: flex; align-items: center; justify-content: space-between; padding: .6rem 16px; padding-top: max(.6rem, env(safe-area-inset-top)); background: rgba(18, 23, 15, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: .5rem; text-decoration: none; color: var(--ink); font-family: var(--head); font-size: 1.35rem; letter-spacing: .06em; text-transform: uppercase; }
.brand b { color: var(--ivy-hi); }
.leaf { width: 30px; height: 30px; color: var(--ivy); }
.top-right { display: flex; align-items: center; gap: .5rem; }
.team-chip { font-family: var(--head); font-weight: 700; letter-spacing: .05em; font-size: .9rem; padding: .15rem .6rem; border-radius: 99px; border: 1px solid var(--tc); color: var(--ink); background: color-mix(in srgb, var(--tc) 22%, transparent); }
.view { max-width: 760px; margin: 0 auto; padding: 16px 16px 110px; }
.tabbar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 900; display: grid; grid-template-columns: repeat(4, 1fr); background: rgba(23, 29, 19, .97); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.tabbar a { position: relative; display: grid; justify-items: center; gap: 2px; padding: .55rem 0 .5rem; color: var(--muted); text-decoration: none; font-size: .72rem; font-weight: 600; letter-spacing: .03em; }
.tabbar a .ic { width: 22px; height: 22px; }
.tabbar a.on { color: var(--ivy-hi); }
.tabbar a.on::before { content: ''; position: absolute; width: 34px; height: 3px; border-radius: 3px; background: var(--ivy-hi); top: 0; left: 50%; transform: translateX(-50%); }
.foot { text-align: center; color: var(--muted); font-size: .75rem; padding: 0 16px 90px; max-width: 760px; margin: 0 auto; }
.page-h { display: flex; align-items: center; gap: .4em; margin: .2em 0 .6em; }
.sub-h { font-size: 1.05rem; color: var(--khaki); margin: 1rem 0 .4rem; text-transform: uppercase; letter-spacing: .08em; }
.loading { display: flex; align-items: center; justify-content: center; gap: .6rem; padding: 3rem 0; color: var(--muted); }
.loading.boot { min-height: 70vh; }

/* cards & controls */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: .8rem; }
.card.empty, .card.warn { color: var(--muted); }
.card.warn { border-color: var(--gold); color: var(--gold); }
.error-card { border-color: var(--danger); }
.btn { appearance: none; border: 1px solid var(--line); background: var(--panel2); color: var(--ink); font: 600 .95rem var(--font); padding: .7rem 1rem; border-radius: 11px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: .45rem; text-decoration: none; min-height: 44px; transition: background .15s, transform .05s; }
.btn:hover { background: #2e3925; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--ivy); border-color: var(--ivy); color: #0e1409; }
.btn.primary:hover { background: var(--ivy-hi); }
.btn.ghost { background: transparent; }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.danger-t { color: var(--danger); }
.btn.small { padding: .4rem .7rem; min-height: 36px; font-size: .85rem; }
.btn.block { width: 100%; }
.btn.on { border-color: var(--gold); color: var(--gold); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.link { background: none; border: 0; color: var(--ivy-hi); cursor: pointer; font: inherit; text-decoration: underline; padding: 0 .3em; }
.icon-btn { position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; color: var(--ink); border: 1px solid var(--line); background: var(--panel); text-decoration: none; cursor: pointer; font-weight: 700; }
.icon-btn.on { color: var(--ivy-hi); border-color: var(--ivy); }
.dot-badge { position: absolute; top: -6px; right: -6px; background: var(--danger); color: #fff; font: 700 .7rem var(--font); font-style: normal; border-radius: 99px; padding: 1px 6px; }
input, select, textarea { width: 100%; font: 16px var(--font); color: var(--ink); background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: .65rem .75rem; min-height: 44px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--ivy); outline-offset: 1px; border-color: var(--ivy); }
input[type=color] { width: 54px; padding: 4px; }
input[type=checkbox], input[type=radio] { width: 20px; height: 20px; min-height: 0; accent-color: var(--ivy); flex: none; }
.form { display: grid; gap: .8rem; }
.form label, .field { display: grid; gap: .3rem; font-weight: 600; font-size: .9rem; color: var(--khaki); }
.field { margin: .6rem 0; }
.search { margin-bottom: .8rem; }
.pill { white-space: nowrap; display: inline-flex; align-items: baseline; gap: 1px; font: 700 .78rem var(--font); padding: .15rem .5rem; border-radius: 99px; background: var(--panel2); border: 1px solid var(--line); color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.pill.score { font-family: var(--mono); font-size: .95rem; text-transform: none; letter-spacing: 0; color: var(--ink); }
.pill.score small { color: var(--muted); font-size: .75em; }
.pill.score.hi { border-color: var(--ivy); color: var(--ivy-hi); }
.pill.score.mid { border-color: var(--gold); color: var(--gold); }
.pill.score.lo { border-color: var(--danger); color: #f09a7e; }
.pill.st-active { color: var(--ivy-hi); border-color: var(--ivy-deep); }
.pill.st-pending { color: var(--gold); border-color: var(--gold); }
.pill.st-disabled { color: var(--danger); border-color: var(--danger); }
.spin { width: 18px; height: 18px; border: 2.5px solid currentColor; border-right-color: transparent; border-radius: 50%; display: inline-block; animation: spin .7s linear infinite; vertical-align: -3px; }
@keyframes spin { to { transform: rotate(360deg); } }
#toast { position: fixed; left: 50%; bottom: 96px; transform: translate(-50%, 20px); background: var(--panel2); border: 1px solid var(--line); color: var(--ink); padding: .7rem 1rem; border-radius: 12px; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: .25s; z-index: 3000; max-width: calc(100% - 32px); }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.error { border-color: var(--danger); color: #ffc3b1; }

/* modal */
.modal-wrap { position: fixed; inset: 0; z-index: 2000; background: rgba(5, 8, 4, .72); display: flex; align-items: flex-end; justify-content: center; padding: 0; }
.modal { position: relative; width: 100%; max-width: 560px; max-height: 92vh; overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 18px 18px 0 0; padding: 20px 16px calc(20px + env(safe-area-inset-bottom)); box-shadow: var(--shadow); }
.modal.wide { max-width: 760px; }
@media (min-width: 700px) { .modal-wrap { align-items: center; padding: 20px; } .modal { border-radius: 18px; } }
.modal-x { position: absolute; top: 10px; right: 10px; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel2); color: var(--ink); cursor: pointer; display: grid; place-items: center; z-index: 2; }
.lightbox { position: fixed; inset: 0; z-index: 2500; background: rgba(0, 0, 0, .92); display: grid; place-items: center; padding: 10px; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; }

/* auth */
.auth-wrap { min-height: 100vh; display: grid; align-content: center; justify-items: center; padding: 24px 16px; gap: 1rem; }
.auth-brand { text-align: center; }
.auth-brand .leaf { width: 64px; height: 64px; }
.auth-brand h1 { font-size: 2.6rem; text-transform: uppercase; letter-spacing: .08em; margin: .2em 0 .1em; }
.auth-brand h1 b { color: var(--ivy-hi); }
.auth-brand p { color: var(--khaki); margin: 0; }
.auth-card { width: 100%; max-width: 440px; }

/* home */
.hero { padding: .6rem 0 .4rem; }
.hero h1 { font-size: clamp(2rem, 8vw, 2.8rem); text-transform: uppercase; }
.hero h1 span { color: var(--ivy-hi); display: block; }
.session-banner { display: flex; align-items: center; gap: .9rem; text-decoration: none; color: var(--ink); background: linear-gradient(120deg, var(--ivy-deep), var(--od)); border: 1px solid var(--ivy); border-radius: var(--radius); padding: 14px 16px; margin: .8rem 0; }
.session-banner > div { flex: 1; }
.session-banner b { font-family: var(--head); font-size: 1.3rem; letter-spacing: .03em; }
.pulse { width: 12px; height: 12px; border-radius: 50%; background: var(--ivy-hi); box-shadow: 0 0 0 0 rgba(140, 198, 83, .7); animation: pulse 1.6s infinite; flex: none; }
@keyframes pulse { 70% { box-shadow: 0 0 0 12px rgba(140, 198, 83, 0); } 100% { box-shadow: 0 0 0 0 rgba(140, 198, 83, 0); } }
.cat { margin-top: 1.2rem; }
.cat-h { font-size: 1rem; text-transform: uppercase; letter-spacing: .14em; color: var(--khaki); border-bottom: 1px solid var(--line); padding-bottom: .35rem; }
.drill-grid { display: grid; gap: .6rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .drill-grid { grid-template-columns: 1fr 1fr; } }
.drill { display: flex; gap: .8rem; text-align: left; align-items: flex-start; width: 100%; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; color: var(--ink); font: inherit; cursor: pointer; transition: border-color .15s, transform .1s; }
.drill:hover { border-color: var(--ivy); }
.drill:active { transform: scale(.99); }
.drill-ic { width: 46px; height: 46px; border-radius: 12px; background: linear-gradient(145deg, var(--ivy-deep), var(--od)); display: grid; place-items: center; color: var(--ivy-hi); flex: none; }
.drill-ic .ic { width: 24px; height: 24px; }
.drill-body { display: grid; gap: .2rem; }
.drill-body b { font-family: var(--head); font-size: 1.2rem; letter-spacing: .03em; }
.drill-meta { font-size: .78rem; color: var(--khaki); }
.drill-meta em { color: var(--ivy-hi); font-style: normal; }

/* sessions & boards */
.session-row { display: flex; justify-content: space-between; align-items: center; text-decoration: none; color: var(--ink); }
.session-row b { font-family: var(--head); font-size: 1.25rem; }
.countdown { display: inline-flex; align-items: center; gap: .4rem; font-family: var(--mono); font-size: 1.3rem; color: var(--gold); margin-bottom: .8rem; }
.chips { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .5rem; }
.chip-btn { display: inline-flex; align-items: center; gap: .35rem; background: var(--panel2); border: 1px solid var(--line); color: var(--ink); border-radius: 99px; padding: .5rem .8rem; font: 600 .88rem var(--font); cursor: pointer; min-height: 40px; }
.chip-btn:hover:not(:disabled) { border-color: var(--ivy); }
.chip-btn:disabled { opacity: .5; }
.board { list-style: none; padding: 0; margin: 0; display: grid; gap: .3rem; }
.board li { display: grid; grid-template-columns: 2rem 1fr auto; align-items: center; gap: .5rem; padding: .55rem .7rem; background: var(--bg2); border-radius: 10px; border: 1px solid transparent; }
.board li.me { border-color: var(--ivy); }
.board .rank { font-family: var(--mono); color: var(--muted); }
.board li:nth-child(1) .rank { color: var(--gold); font-weight: 700; }
.board b { font-family: var(--mono); }
.board .name { display: flex; align-items: center; gap: .4rem; min-width: 0; }
.board.teams li { border-left: 4px solid var(--tc); }
.sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; background: var(--tc); }
.board.big li { font-size: 1.4rem; padding: .7rem 1rem; }

body.projector .foot { display: none; }
.projector-wrap { padding: 24px 32px; min-height: 100vh; }
.proj-clock { font-family: var(--mono); font-size: 2.6rem; color: var(--gold); display: flex; gap: .5rem; align-items: center; }
.proj-body h1 { font-size: 3.4rem; text-transform: uppercase; margin: 1rem 0; }
.proj-cols { display: grid; gap: 2rem; grid-template-columns: 1fr; }
@media (min-width: 900px) { .proj-cols { grid-template-columns: 1fr 1fr; } }

/* scores / lists */
.hist, .list, .round-list, .ex-list, .members { list-style: none; padding: 0; margin: 0; display: grid; gap: .35rem; }
.hist a, .hist-btn { display: flex; justify-content: space-between; align-items: center; gap: .6rem; padding: .6rem .7rem; background: var(--bg2); border-radius: 10px; text-decoration: none; color: var(--ink); width: 100%; border: 0; font: inherit; text-align: left; cursor: pointer; }
.hist a span, .hist-btn span { display: grid; }
.list li, .ex-list li { display: flex; justify-content: space-between; align-items: center; gap: .6rem; padding: .55rem .2rem; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.round-list li { display: grid; grid-template-columns: auto 1fr auto; gap: .6rem; align-items: center; padding: .5rem .6rem; background: var(--bg2); border-radius: 10px; }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: .6rem; margin: .6rem 0; }
.badge { display: grid; justify-items: center; gap: .3rem; text-align: center; opacity: .4; }
.badge.earned { opacity: 1; }
.badge-ic { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; border: 2px dashed var(--line); color: var(--muted); }
.badge.earned .badge-ic, .badge-ic.earned { border: 2px solid var(--gold); color: var(--gold); background: rgba(214, 180, 76, .12); }

/* runner */
.runner { display: grid; gap: .5rem; }
.run-head { display: flex; align-items: center; gap: .7rem; }
.run-title { flex: 1; min-width: 0; }
.run-title h2 { margin: 0; display: flex; align-items: center; gap: .35em; font-size: 1.4rem; }
.dots { display: flex; gap: 6px; }
.dot { flex: 1; height: 6px; border-radius: 6px; background: var(--line); }
.dot.cur { background: var(--khaki); }
.dot.hi { background: var(--ivy); } .dot.mid { background: var(--gold); } .dot.lo { background: var(--danger); }
.session-timer { font-family: var(--mono); font-size: .85rem; color: var(--muted); display: flex; align-items: center; gap: .35rem; }
.session-timer.late, .timer.late { color: var(--danger); }
.round-label { font-family: var(--head); text-transform: uppercase; letter-spacing: .14em; color: var(--muted); font-size: .8rem; }
.stage { display: grid; gap: .7rem; }
.target-card { background: linear-gradient(160deg, var(--panel2), var(--panel)); border: 1px solid var(--line); border-left: 4px solid var(--ivy); border-radius: var(--radius); padding: 12px 14px; }
.target-card h2 { font-size: 1.7rem; margin: .1em 0; }
.target-card p { margin: .3em 0; }
.target-card.ctf { border-left-color: var(--gold); }
.tool-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.tool-card h3 { margin: 0; }
.instr { color: var(--muted); font-size: .9rem; margin: 0; }
.tip-box { display: flex; gap: .6rem; background: rgba(214, 180, 76, .08); border: 1px solid rgba(214, 180, 76, .35); border-radius: 12px; padding: 10px 12px; font-size: .9rem; }
.tip-box > .ic { color: var(--gold); margin-top: 2px; }
.map { height: 46vh; min-height: 300px; border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; background: #0d110b; }
.map.tall { height: 58vh; }
.map.short { height: 260px; min-height: 0; }
.capture-map { height: 55vh; margin: .6rem 0; }
.submit-bar { position: sticky; bottom: calc(64px + env(safe-area-inset-bottom)); z-index: 800; padding: .4rem 0; background: linear-gradient(transparent, var(--bg) 35%); }
.result-card { background: var(--panel); border: 1px solid var(--ivy); border-radius: var(--radius); padding: 14px 16px; margin: .6rem 0 1rem; box-shadow: var(--shadow); }
.result-card h3 { margin: 0; }
.photo-frame { position: relative; border-radius: var(--radius); overflow: hidden; background: #000; border: 1px solid var(--line); }
.photo-frame img { display: block; width: 100%; max-height: 52vh; object-fit: contain; margin: 0 auto; cursor: zoom-in; }
.photo-frame .credit { position: absolute; left: 0; right: 0; bottom: 0; font-size: .7rem; padding: .3rem .6rem; background: rgba(0, 0, 0, .55); color: #ddd; }
.zoom-btn { position: absolute; top: 8px; right: 8px; width: 38px; height: 38px; border-radius: 10px; border: 0; background: rgba(0, 0, 0, .55); color: #fff; display: grid; place-items: center; cursor: pointer; }
.hints { display: grid; gap: .4rem; justify-items: start; }
.hint-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .3rem; }
.hint-list li { color: var(--gold); display: flex; gap: .4rem; align-items: center; }
.grid-input { font-size: 1.3rem; text-transform: uppercase; letter-spacing: .06em; }
.choices, .checks { border: 0; padding: 0; margin: 0; display: grid; gap: .45rem; }
.choices legend, .checks legend { font-weight: 700; color: var(--khaki); margin-bottom: .4rem; font-size: .92rem; }
.choice, .check { display: flex; gap: .65rem; align-items: flex-start; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: .7rem .8rem; cursor: pointer; font-weight: 500; color: var(--ink); flex-wrap: wrap; }
.choice:has(input:checked), .check:has(input:checked) { border-color: var(--ivy); background: rgba(111, 168, 58, .12); }
.choice span, .check span { flex: 1; }
.check small { flex-basis: 100%; color: var(--muted); padding-left: 2rem; }
.check.ok { border-color: var(--ivy); } .check.bad { border-color: var(--danger); }
.checks.tight { grid-template-columns: 1fr 1fr; }
@media (max-width: 420px) { .checks.tight { grid-template-columns: 1fr; } }
.checks.tight .check { padding: .5rem .6rem; font-size: .9rem; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th, .tbl td { text-align: left; padding: .35rem .3rem; border-bottom: 1px solid var(--line); }
.rubric, .why { list-style: none; padding: 0; margin: .4rem 0; display: grid; gap: .25rem; font-size: .9rem; }
.rubric li { display: flex; justify-content: space-between; gap: .6rem; }
.rubric .ok, .why .ok { color: var(--ivy-hi); } .rubric .bad, .why .bad { color: #f09a7e; }
.summary { text-align: center; }
.big-score { font-family: var(--mono); display: flex; justify-content: center; align-items: baseline; gap: .3rem; margin: .4rem 0; }
.big-score span { font-size: 4rem; color: var(--ivy-hi); font-weight: 700; }
.big-score small { font-size: 1.4rem; color: var(--muted); }
.summary .round-list { text-align: left; margin: 1rem 0; }
.timer.big { display: flex; align-items: center; justify-content: center; gap: .5rem; font-family: var(--mono); font-size: 2rem; color: var(--gold); }
.exif { background: #0b0f09; border: 1px solid var(--line); border-radius: 12px; padding: 12px; font: 600 .85rem/1.6 var(--mono); color: #b9e08f; overflow-x: auto; margin: 0; }
.video { position: relative; aspect-ratio: 16/9; border-radius: var(--radius); overflow: hidden; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* scenes */
.scene-box { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #000; }
.scene-box svg, .scene-box canvas { display: block; width: 100%; height: auto; }
.measure canvas { cursor: crosshair; touch-action: manipulation; }
.measure-out { color: var(--gold); font-weight: 700; }
.spot-box { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); user-select: none; touch-action: manipulation; cursor: crosshair; }
.spot-box .spot-layer { line-height: 0; }
.spot-box .spot-layer.before { position: absolute; inset: 0; }
.spot-box svg, .spot-box img { width: 100%; height: auto; display: block; }
.spot-box .tag { position: absolute; top: 8px; font: 700 .7rem var(--head); letter-spacing: .12em; background: rgba(0, 0, 0, .6); padding: .2rem .5rem; border-radius: 6px; pointer-events: none; }
.spot-box .tag.l { left: 8px; } .spot-box .tag.r { right: 8px; }
.spot-marks { position: absolute; inset: 0; pointer-events: none; }
.mark { pointer-events: auto; position: absolute; transform: translate(-50%, -50%); width: 30px; height: 30px; border-radius: 50%; border: 2.5px solid #ffd60a; background: rgba(255, 214, 10, .25); color: #fff; font: 700 .8rem var(--mono); cursor: pointer; padding: 0; }
.ring { position: absolute; transform: translate(-50%, -50%); aspect-ratio: 1; border-radius: 50%; border: 3px solid var(--ok); pointer-events: auto; }
.ring.miss { border-color: #ff3b30; border-style: dashed; }
.ring em { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); white-space: nowrap; font: 700 .7rem var(--font); font-style: normal; background: rgba(0, 0, 0, .75); padding: .1rem .35rem; border-radius: 4px; }
.swipe { width: 100%; accent-color: var(--ivy); min-height: 32px; padding: 0; background: none; border: 0; }
.swipe-labels { display: flex; justify-content: space-between; align-items: center; font-family: var(--mono); font-size: .8rem; color: var(--muted); }
.compare .leaflet-tile-pane { background: #000; }
.post { background: #fff; color: #111; border-radius: var(--radius); overflow: hidden; }
.post-head { display: flex; gap: .6rem; align-items: center; padding: .6rem .8rem; }
.post-head .muted { color: #666; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: #dfe6d5; display: grid; place-items: center; color: #4b5320; }
.post-img { position: relative; cursor: crosshair; touch-action: manipulation; line-height: 0; }
.post-img svg { width: 100%; height: auto; display: block; }
.post-cap { padding: .5rem .8rem .8rem; margin: 0; }
.terrain-box { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); line-height: 0; }
.terrain-canvas { width: 100%; height: auto; display: block; cursor: crosshair; touch-action: manipulation; }
.legend { display: flex; flex-wrap: wrap; gap: .4rem .9rem; color: var(--muted); }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }
.legend i.ln { height: 2px; background: #5a3c1e; }

/* leaflet bits */
.leaflet-container { font-family: var(--font); background: #0d110b; }
.pin span { display: block; width: 22px; height: 22px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); margin: 2px; border: 2px solid #111; }
.pin.guess span { background: #ffd60a; }
.pin.answer span { background: #ff3b30; }
.tip { font: 700 .75rem var(--font); }
.gridlab { font: 700 11px var(--mono); color: #1a1a00; background: rgba(227, 211, 107, .9); border-radius: 3px; padding: 0 3px; width: auto !important; height: auto !important; }

/* annotator */
.annot { display: grid; gap: .6rem; }
.annot-tools { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.annot-tools .sep { width: 1px; height: 28px; background: var(--line); margin: 0 .2rem; }
.tool { width: 42px; height: 42px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel2); color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.tool.on { border-color: var(--ivy); color: var(--ivy-hi); }
.swatch { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--line); background: var(--c); cursor: pointer; }
.swatch.on { outline: 3px solid var(--ink); outline-offset: 1px; }
.slide-canvas { width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--line); touch-action: none; background: #10140d; }
.tasking p { font-size: 1.05rem; margin: .2rem 0 0; }

/* admin */
.subtabs { display: flex; gap: .3rem; overflow-x: auto; padding-bottom: .4rem; margin-bottom: .6rem; scrollbar-width: none; }
.subtabs a { display: inline-flex; gap: .35rem; align-items: center; white-space: nowrap; padding: .5rem .8rem; border-radius: 99px; border: 1px solid var(--line); text-decoration: none; color: var(--muted); font-weight: 600; font-size: .88rem; }
.subtabs a.on { color: #0e1409; background: var(--ivy); border-color: var(--ivy); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin-bottom: .8rem; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: .7rem; text-align: center; }
.stat b { display: block; font: 700 1.6rem var(--mono); color: var(--ivy-hi); }
.stat small { color: var(--muted); }
.user-row select[data-team] { width: auto; min-width: 150px; }
.team-cols { display: grid; gap: .7rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .team-cols { grid-template-columns: 1fr 1fr; } }
.team-card { border-top: 4px solid var(--tc); }
.team-card h3 { display: flex; align-items: center; gap: .4rem; margin: 0; }
.members { margin: .5rem 0; }
.gallery { display: grid; gap: .7rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .gallery { grid-template-columns: 1fr 1fr; } }
.prod img { width: 100%; border-radius: 8px; cursor: zoom-in; margin-bottom: .4rem; }
.filters select { width: auto; flex: 1; min-width: 160px; }
.media-prev { position: relative; line-height: 0; }
.media-prev img { max-height: 300px; width: auto; border-radius: 8px; }
.media-prev.spot-edit { cursor: crosshair; display: inline-block; }
.media-prev.spot-edit img { max-height: none; width: 100%; }

@media (min-width: 900px) {
  .view { padding-top: 24px; }
  .map { height: 52vh; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
