:root {
  --bg: #101217;
  --panel: #181b22;
  --panel-2: #20242d;
  --line: #2c313c;
  --text: #ecebe6;
  --muted: #9a9ea8;
  --accent: #ff7a1a;
  --accent-2: #2ec4b6;
  --warn: #f4c430;
  --ok: #5fd37a;
  --radius: 14px;
  --head: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --body: "Inter", system-ui, -apple-system, sans-serif;
  --nav-h: 64px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 var(--body);
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { width: 1em; height: 1em; flex: none; }
h1, h2, h3 { font-family: var(--head); letter-spacing: .02em; line-height: 1.1; margin: 0; text-transform: uppercase; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Top bar / nav ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px max(16px, env(safe-area-inset-left));
  background: rgba(16, 18, 23, .9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font: 800 24px/1 var(--head); letter-spacing: .06em; }
.brand b { color: var(--accent); }
.brand-mark {
  width: 26px; height: 26px; border-radius: 50%;
  background: conic-gradient(var(--accent) 0 25%, var(--warn) 0 50%, var(--accent-2) 0 75%, #e84d4d 0);
  box-shadow: inset 0 0 0 5px var(--bg);
}
.nav { display: flex; gap: 4px; }
.nav a {
  position: relative;
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 10px;
  font: 700 17px/1 var(--head); text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted);
}
.nav a svg { font-size: 20px; }
.nav a:hover { color: var(--text); background: var(--panel); }
.nav a.active { color: var(--accent); background: var(--panel); }
.badge {
  font: 700 11px/1 var(--body); font-style: normal;
  background: var(--accent); color: #000; border-radius: 99px; padding: 3px 6px;
}

@media (max-width: 720px) {
  /* backdrop-filter would make the header the containing block for the fixed bottom nav */
  .topbar { justify-content: center; backdrop-filter: none; background: var(--bg); }
  .nav {
    position: fixed; left: 0; right: 0; bottom: 0;
    height: calc(var(--nav-h) + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    background: rgba(16, 18, 23, .96); backdrop-filter: blur(10px);
    border-top: 1px solid var(--line);
    gap: 0;
  }
  .nav a { flex: 1; flex-direction: column; justify-content: center; gap: 4px; font-size: 13px; border-radius: 0; }
  .nav a.active { background: none; }
  .nav a svg { font-size: 24px; }
  .badge { position: absolute; top: 6px; left: calc(50% + 6px); }
  main { padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 24px) !important; }
}

/* ---------- Layout ---------- */
main { max-width: 1180px; margin: 0 auto; padding: 20px 16px 48px; outline: none; }
.section { margin-top: 28px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-head h2 { font-size: 24px; }
.section-head a { color: var(--accent); font-weight: 600; font-size: 14px; }
.muted { color: var(--muted); }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 600; margin-bottom: 14px; }
.back:hover { color: var(--text); }
.page-title { font-size: clamp(32px, 6vw, 48px); margin-bottom: 4px; }

/* ---------- Search ---------- */
.search {
  display: flex; align-items: center; gap: 10px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0 16px; height: 54px;
}
.search:focus-within { border-color: var(--accent); }
.search svg { font-size: 20px; color: var(--muted); }
.search input { flex: 1; min-width: 0; background: none; border: 0; outline: none; font-size: 17px; }
.search kbd { font: 12px var(--body); color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 2px 6px; }
@media (max-width: 720px) { .search kbd { display: none; } }

/* ---------- Art tiles (image-first cards) ---------- */
.art {
  --hue: 28;
  position: relative; overflow: hidden;
  aspect-ratio: 16 / 9;
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,.04) 0 1px, transparent 1px 22px),
    repeating-linear-gradient(90deg, rgba(255,255,255,.04) 0 1px, transparent 1px 22px),
    radial-gradient(120% 90% at 85% 100%, hsl(var(--hue) 85% 52% / .55), transparent 60%),
    linear-gradient(140deg, hsl(var(--hue) 40% 22%), hsl(calc(var(--hue) + 40) 30% 10%));
}
.art > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.art > .art-icon {
  position: absolute; right: -6%; bottom: -14%;
  font-size: clamp(90px, 48%, 180px); width: 48%; height: auto; aspect-ratio: 1;
  color: hsl(var(--hue) 90% 70% / .35);
}
.art .play {
  position: absolute; inset: 0; margin: auto;
  width: 64px; height: 64px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(0,0,0,.6); color: #fff; font-size: 30px;
  border: 2px solid rgba(255,255,255,.85);
}
.art .play svg { margin-left: 4px; }

.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.grid.big { grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
@media (max-width: 720px) {
  .grid.big { grid-template-columns: 1fr 1fr; gap: 10px; }
}

.card {
  display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden;
  transition: transform .15s ease, border-color .15s ease;
}
.card:hover { transform: translateY(-2px); border-color: hsl(var(--hue, 28) 80% 55% / .7); }
.card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; }
.card h3 { font-size: 22px; }
.card p { margin: 0; color: var(--muted); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* Category / map tiles: title sits on the art */
.tile { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); transition: transform .15s ease; }
.tile:hover { transform: translateY(-2px); }
.tile .art { aspect-ratio: 4 / 3; }
.tile-label {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 28px 14px 12px;
  background: linear-gradient(transparent, rgba(0,0,0,.8));
}
.tile-label h3 { font-size: clamp(20px, 4.6vw, 28px); }
.tile-label span { color: #d9d7d0; font-size: 13px; }
@media (max-width: 720px) { .tile-label span { display: none; } }
.tile .count {
  position: absolute; top: 10px; left: 10px;
  font: 700 13px/1 var(--head); letter-spacing: .06em;
  background: rgba(0,0,0,.55); padding: 5px 8px; border-radius: 6px;
}

/* ---------- Chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 99px;
  background: hsl(var(--hue, 28) 60% 50% / .16); color: hsl(var(--hue, 28) 90% 72%);
  white-space: nowrap;
}
.chip svg { font-size: 13px; }

/* ---------- Tracking strip on home ---------- */
.strip { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; }
.strip > * { scroll-snap-align: start; }
.mini {
  flex: 0 0 auto; min-width: 180px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px;
}
.mini strong { display: block; font: 700 18px/1.15 var(--head); text-transform: uppercase; }
.bar { height: 6px; border-radius: 6px; background: var(--panel-2); margin-top: 8px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: inherit; }
.bar.done i { background: var(--ok); }

/* ---------- Guide page ---------- */
.hero { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); margin-bottom: 18px; }
.hero .art { aspect-ratio: 21 / 9; }
.hero iframe, .card iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; }
@media (max-width: 720px) {
  .hero button.art { aspect-ratio: 16 / 9; }
  .card .art:not(:has(img)) { aspect-ratio: 5 / 2; }
}
button.art { display: block; width: 100%; border: 0; padding: 0; }

.answer {
  border-left: 4px solid var(--accent);
  background: var(--panel); border-radius: 0 var(--radius) var(--radius) 0;
  padding: 14px 16px; font-size: 16px; margin: 14px 0 6px;
}
.answer b { font-family: var(--head); text-transform: uppercase; letter-spacing: .06em; color: var(--accent); display: block; font-size: 14px; }

.layout { display: grid; gap: 24px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .layout { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; } .layout aside { position: sticky; top: 80px; } }

.spots { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.spot { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.spot h4 { margin: 0 0 4px; font-size: 16px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.spot p { margin: 0; color: #cfcdc6; }

.steps { list-style: none; padding: 0; margin: 0; counter-reset: s; display: grid; gap: 8px; }
.steps li {
  counter-increment: s; position: relative;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px 12px 54px; min-height: 48px;
}
.steps li::before {
  content: counter(s); position: absolute; left: 12px; top: 10px;
  width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center;
  background: var(--accent); color: #000; font: 800 18px/1 var(--head);
}

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.panel + .panel { margin-top: 14px; }
.panel h3 { font-size: 18px; margin-bottom: 10px; color: var(--muted); }
.panel textarea {
  width: 100%; min-height: 110px; resize: vertical;
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px;
}
.panel ul { margin: 0; padding-left: 18px; }
.panel li + li { margin-top: 6px; }
.panel a.link { color: var(--accent-2); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 40px; padding: 0 14px; border-radius: 10px;
  background: var(--panel-2); border: 1px solid var(--line); font-weight: 600;
}
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #111; }
.btn.ghost { background: none; }
.btn.sm { min-height: 32px; padding: 0 10px; font-size: 13px; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center;
  background: var(--panel-2); border: 1px solid var(--line); font-size: 18px;
}
.icon-btn:hover { border-color: var(--muted); }
.item-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.item-row + .item-row { margin-top: 10px; }

/* ---------- Tracker ---------- */
.tabs { display: flex; gap: 6px; background: var(--panel); padding: 5px; border-radius: 12px; border: 1px solid var(--line); margin: 14px 0 16px; }
.tabs button {
  flex: 1; border: 0; background: none; border-radius: 8px; padding: 10px 6px;
  font: 700 16px/1 var(--head); text-transform: uppercase; letter-spacing: .05em; color: var(--muted);
}
.tabs button[aria-selected="true"] { background: var(--panel-2); color: var(--accent); }

.add { display: flex; gap: 8px; margin-bottom: 14px; }
.add input {
  flex: 1; min-width: 0; height: 46px; padding: 0 14px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
}
.add input:focus { border-color: var(--accent); outline: none; }
.add input.qty { flex: 0 0 72px; text-align: center; }
.add .btn { min-height: 46px; }

.list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.row {
  display: flex; align-items: center; gap: 12px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px;
}
.row .grow { flex: 1; min-width: 0; }
.row .name { font-weight: 600; overflow-wrap: anywhere; }
.row .sub { font-size: 12px; color: var(--muted); }
.row .sub a { color: var(--accent-2); }
.row.done .name { text-decoration: line-through; color: var(--muted); }
.counter { display: flex; align-items: center; gap: 6px; }
.counter output { min-width: 54px; text-align: center; font: 700 20px/1 var(--head); }
.row.complete { border-color: hsl(135 55% 45% / .6); }
.row.complete .counter output { color: var(--ok); }

.check {
  appearance: none; flex: none; width: 26px; height: 26px; margin: 0;
  border: 2px solid var(--muted); border-radius: 7px; display: grid; place-items: center;
}
.check:checked { background: var(--ok); border-color: var(--ok); }
.check:checked::after { content: ""; width: 7px; height: 13px; border: solid #111; border-width: 0 3px 3px 0; transform: translateY(-1px) rotate(45deg); }

.empty { text-align: center; color: var(--muted); padding: 30px 12px; border: 1px dashed var(--line); border-radius: var(--radius); }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin-top: 14px; }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--nav-h) + 20px); transform: translateX(-50%);
  background: var(--text); color: #111; font-weight: 600; padding: 10px 16px; border-radius: 10px;
  z-index: 50; box-shadow: 0 8px 30px rgba(0,0,0,.4);
}
@media (min-width: 721px) { .toast { bottom: 24px; } }

/* ---------- Crew ---------- */
.eyebrow { font: 700 14px/1.2 var(--head); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }

/* Landing hero: the recruitment banner (title is part of the art) with the pitch underneath. */
.crew-hero {
  overflow: hidden; border-radius: var(--radius); border: 1px solid var(--line);
  background: radial-gradient(120% 120% at 0% 100%, rgba(255,122,26,.22), transparent 60%), var(--panel);
}
/* Desktop crops the bottom of the art; object-position top keeps the title and faces in frame. */
.crew-hero-img { display: block; width: 100%; aspect-ratio: 2.4 / 1; object-fit: cover; object-position: center top; }
.crew-hero-text { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 24px 28px 26px; }
.crew-hero-text h1 { font-size: clamp(30px, 4.4vw, 52px); margin: 6px 0 8px; }
.crew-hero-text p { margin: 0; font-size: 17px; color: #d6d4cd; max-width: 52ch; }
.crew-hero-side { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; flex: none; }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 4px; }
.cta .btn { min-height: 46px; padding: 0 20px; }
.founded { font-size: 13px; color: var(--muted); }
.founded b { color: var(--text); }
@media (max-width: 860px) {
  .crew-hero-text { flex-direction: column; align-items: flex-start; padding: 18px 18px 20px; gap: 14px; }
  .crew-hero-side { align-items: flex-start; }
}
@media (max-width: 720px) {
  /* Phones show the whole banner so the title isn't cut. */
  .crew-hero-img { aspect-ratio: 1376 / 768; }
}

.role-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.role-mini { position: relative; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); aspect-ratio: 16 / 9; }
.role-mini img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; transition: transform .25s ease; }
.role-mini:hover img { transform: scale(1.04); }
.role-mini span {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 34px 10px 8px;
  background: linear-gradient(transparent, rgba(0,0,0,.75) 40%, rgba(0,0,0,.92));
  font: 700 clamp(14px, 2.4vw, 20px)/1.05 var(--head); text-transform: uppercase;
}
.role-mini small { display: block; font: 700 11px var(--body); text-transform: none; color: var(--warn); }
/* Phones: the landscape role art is too small at a third of the width, so the strip scrolls sideways. */
@media (max-width: 720px) {
  .role-strip {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
    margin-left: -16px; margin-right: -16px; padding: 0 16px 4px; scrollbar-width: none;
  }
  .role-strip::-webkit-scrollbar { display: none; }
  .role-mini { flex: 0 0 78%; scroll-snap-align: start; }
  .role-mini span { font-size: 20px; }
}

.crew-page-banner { display: block; width: 100%; aspect-ratio: 2.4 / 1; object-fit: cover; object-position: center top; border-radius: var(--radius); border: 1px solid var(--line); }
@media (max-width: 720px) { .crew-page-banner { aspect-ratio: 1376 / 768; } }
.crew-banner-text { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; max-width: 760px; }
.crew-banner-text p { margin: 0; color: #d6d4cd; }
.crew-banner .pitch { font-size: 18px; font-weight: 600; color: var(--text); border-left: 3px solid var(--accent); padding-left: 12px; }

.protocol .num { font: 800 34px/1 var(--head); color: var(--accent); }
.protocol h3 { color: var(--text); font-size: 22px; margin: 6px 0; }
.protocol p { margin: 0; color: #cfcdc6; }

.card.role > img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: center 30%; }
.card.role p { -webkit-line-clamp: unset; }
.card-body > .chip { align-self: flex-start; }
/* Exactly-three rows (protocol, roles) fill the width instead of leaving an empty fourth column. */
.grid.fill { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.card.role .btn { align-self: flex-start; margin-top: 6px; }

.founder {
  display: grid; grid-template-columns: 220px 1fr; gap: 20px; align-items: center;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px;
}
.founder img { width: 100%; aspect-ratio: 1; object-fit: cover; object-position: center 15%; border-radius: 12px; }
.founder h2 { font-size: 36px; margin: 2px 0 8px; }
.founder p { margin: 0 0 8px; color: #cfcdc6; }
.founder .motto { font-style: italic; color: var(--text); }
@media (max-width: 720px) { .founder { grid-template-columns: 96px 1fr; gap: 14px; } .founder h2 { font-size: 26px; } }

.join { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; font-weight: 600; font-size: 14px; }
.field input, .field textarea {
  width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-weight: 400;
}
.field input { height: 46px; }
.field textarea { min-height: 110px; resize: vertical; font-family: ui-monospace, Menlo, monospace; font-size: 13px; }
.field input:focus { border-color: var(--accent); outline: none; }
.role-pick { display: flex; flex-wrap: wrap; gap: 8px; }

@media (max-width: 720px) { .nav .desktop-only { display: none; } }
a.link, .muted a.link { color: var(--accent-2); font-weight: 600; }

/* ---------- Blacklist ---------- */
.verdict { border-radius: 12px; padding: 14px 16px; font-size: 16px; border: 1px solid; }
.verdict.bad { border-color: #e84d4d; background: rgba(232, 77, 77, .12); color: #ffc4c4; }
.verdict.maybe { border-color: var(--warn); background: rgba(244, 196, 48, .1); color: #ffe7a3; }
.verdict.ok { border-color: var(--ok); background: rgba(95, 211, 122, .1); color: #c8f5d2; }
.bl-row { align-items: flex-start; border-left: 3px solid #e84d4d; }
.bl-row .name { font: 700 20px/1.15 var(--head); letter-spacing: .03em; }
.bl-reason { margin: 4px 0; color: #d6d4cd; }
.bl-row .sub a { color: var(--accent-2); font-weight: 600; }
.admin-unlock summary { cursor: pointer; font: 700 16px/1 var(--head); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }

/* ---------- Home promos ---------- */
.home-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
/* Stacked panels get a gap, but panels laid out side by side in a grid must not. */
.home-duo .panel + .panel, .grid > .panel + .panel { margin-top: 0; }
.promo { display: flex; flex-direction: column; gap: 6px; transition: border-color .15s ease; }
.promo:hover { border-color: var(--accent); }
.panel.promo h3 { color: var(--text); font-size: 22px; margin: 0; }
.promo p { margin: 0; color: var(--muted); font-size: 14px; }
@media (max-width: 720px) { .home-duo { grid-template-columns: 1fr; } }

/* ---------- Blog ---------- */
.post-card .art { aspect-ratio: 16 / 9; }
.post-card .art img { object-position: center 20%; }
.post { max-width: 720px; margin: 0 auto; }
.post-hero { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: center 22%; border-radius: var(--radius); border: 1px solid var(--line); margin-bottom: 18px; }
.post .page-title { margin: 6px 0 10px; }
.post-lede { font-size: 18px; color: var(--text); margin: 0 0 20px; }
.post h2 { font-size: 26px; margin: 30px 0 10px; }
.post p, .post li { font-size: 16.5px; line-height: 1.7; color: #d6d4cd; }
.post ul { padding-left: 22px; }
.post li + li { margin-top: 6px; }
.post blockquote {
  margin: 20px 0; padding: 14px 18px;
  border-left: 4px solid var(--accent); background: var(--panel); border-radius: 0 12px 12px 0;
  font: 700 clamp(22px, 4vw, 28px)/1.2 var(--head); text-transform: uppercase; color: var(--text);
}
.post-cta { margin-top: 24px; }

/* ---------- Squad Finder ---------- */
.join h3 { color: var(--text); font-size: 22px; margin: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 720px) { .field-row { grid-template-columns: 1fr; } }
.field select {
  width: 100%; height: 46px; padding: 0 10px; font-weight: 400;
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
}
.field .muted { font-weight: 400; }
.checked-in {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  border-color: hsl(135 55% 45% / .6); margin: 16px 0 0;
}
.checked-in h3 { color: var(--text); font-size: 26px; margin: 2px 0; }
.checked-in .eyebrow { color: var(--ok); }
.panel.join + #squad-live { margin-top: 0; }
#squad-live > .empty.error { margin-top: 16px; }
.empty.error { border-color: #e84d4d; color: #ffb3b3; }
.row.mine { border-color: var(--accent); }
.row .chip { margin-left: 6px; vertical-align: middle; }
.seg { display: flex; gap: 6px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 4px; }
.seg label { flex: 1; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span {
  display: block; text-align: center; padding: 10px 8px; border-radius: 8px; cursor: pointer;
  font: 700 16px/1 var(--head); text-transform: uppercase; letter-spacing: .05em; color: var(--muted);
}
.seg input:checked + span { background: var(--panel-2); color: var(--accent); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); }

.quick-lobby {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  border-color: hsl(185 60% 45% / .6);
  background: linear-gradient(120deg, hsl(185 60% 30% / .25), var(--panel) 60%);
}
.quick-lobby p { margin: 4px 0 0; color: #cfcdc6; }
.quick-lobby .eyebrow { color: var(--accent-2); }

.group + .group { margin-top: 18px; }
.group-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.group-head h3 { font-size: 20px; }
.group-head .muted { margin-left: auto; font-size: 13px; }
.group.lobby .group-head h3 { color: var(--accent-2); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Intel: creators we back */
.panel.creator { display: flex; gap: 14px; align-items: center; color: inherit; text-decoration: none; }
.panel.creator > svg { flex: 0 0 auto; width: 36px; height: 36px; padding: 8px; border-radius: 10px; background: #c4302b; color: #fff; }
.panel.creator h3 { margin: 0 0 4px; }
.panel.creator p { margin: 0; }
.panel.creator:hover { border-color: var(--accent, #ffcc00); }

/* Squad Finder: live server match under the Server ID field */
.server-input { text-transform: uppercase; letter-spacing: .04em; }
#server-match:empty { display: none; }
.match { margin: 2px 0 12px; padding: 10px 12px; border-radius: 10px; font-size: 14px; line-height: 1.45; border: 1px solid var(--line); }
.match.hit { border-color: var(--accent-2); background: color-mix(in srgb, var(--accent-2) 12%, transparent); }
.match.hit b { color: var(--accent-2); }
.match.none { color: var(--muted); }
details.more { margin: 4px 0 8px; }
details.more > summary { cursor: pointer; color: var(--muted); font-size: 14px; padding: 6px 0; }
details.more[open] > summary { margin-bottom: 8px; }
.group-head .muted + .btn { margin-left: 0; }

/* Unit comms */
.compose-row { display: flex; gap: 8px; }
.compose-row input, .compose-row select {
  height: 46px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; color: inherit; font: inherit;
}
.compose-row input:focus, .compose-row select:focus { border-color: var(--accent); outline: none; }
.compose-row input { flex: 1; min-width: 0; }
.compose-row select { flex: 0 0 auto; max-width: 42%; }
.feed-seg { margin: 14px 0 6px; }
.feed-seg button {
  flex: 1; border: 0; background: none; padding: 9px 8px; border-radius: 8px; cursor: pointer;
  font: 700 15px/1 var(--head); text-transform: uppercase; letter-spacing: .05em; color: var(--muted);
}
.feed-seg button.on { background: var(--panel-2); color: var(--accent); }
.feed { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.feed-msg { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; }
.feed-msg.to-me { border-color: var(--accent); }
.feed-msg.mine { background: var(--panel-2); }
.feed-msg p { margin: 4px 0 0; overflow-wrap: anywhere; }
.feed-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 14px; }
.feed-meta .to { color: var(--accent); font-weight: 600; }
.feed-meta .btn { margin-left: auto; }
.feed-event { display: flex; align-items: center; gap: 8px; padding: 4px 6px; font-size: 14px; color: var(--muted); }
.feed-event svg { width: 16px; height: 16px; flex: 0 0 auto; color: var(--accent-2); }
.feed-event span { flex: 1; }
.feed-event b { color: var(--text, #e8e8ea); }
@media (max-width: 720px) {
  .compose-row { flex-wrap: wrap; }
  .compose-row select { max-width: none; flex: 1 1 100%; }
}

.post-sources { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 14px; }
.post-sources h2 { font-size: 18px; }

/* ---------- Raider Studio (creator + cam booth) ---------- */
.studio-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.studio-grid.booth { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
@media (max-width: 860px) { .studio-grid, .studio-grid.booth { grid-template-columns: 1fr; } }
.studio-stage { position: sticky; top: 76px; }
@media (max-width: 860px) { .studio-stage { position: static; } }
#raider-preview svg { display: block; width: 100%; max-width: 480px; height: auto; margin: 0 auto; border-radius: var(--radius); border: 1px solid var(--line); }
.studio-controls { display: grid; gap: 14px; }
.studio-controls .seg span { padding: 9px 4px; font-size: 15px; }
.studio-controls .seg label { position: relative; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch { width: 40px; height: 40px; border-radius: 10px; border: 2px solid var(--line); }
.swatch:hover { border-color: var(--text); }
.colors { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.color { display: grid; justify-items: center; gap: 4px; font-size: 13px; color: var(--muted); cursor: pointer; }
.color input { width: 100%; height: 40px; padding: 2px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); cursor: pointer; }
.studio-actions { justify-content: flex-start; margin-top: 0; }
.booth-canvas { display: block; width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--line); background: #0b0c10; touch-action: none; cursor: grab; }
.booth-canvas:active { cursor: grabbing; }
.booth-canvas.tall { width: auto; max-width: 100%; max-height: 72vh; margin: 0 auto; }
.booth-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.booth-status { font-size: 14px; }
.btn.rec i { width: 10px; height: 10px; border-radius: 50%; background: #e84d4d; }
.btn.rec.on { border-color: #e84d4d; color: #ffb3b3; }
.btn.rec.on i { border-radius: 2px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.checks { display: flex; flex-wrap: wrap; gap: 10px 18px; }
.checks label { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; cursor: pointer; }
.studio-controls input[type="range"] { width: 100%; accent-color: var(--accent); }
.booth-tip { font-size: 13px; margin: 0; }
.booth-result { margin-top: 14px; }
.booth-result video { display: block; width: 100%; max-height: 60vh; border-radius: 10px; background: #000; }
.booth-result .toolbar { justify-content: flex-start; align-items: center; }

/* ---------- Guide sections fold; Raid mode stepper ---------- */
.fold > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::before { content: "▸"; color: var(--accent); transition: transform .15s ease; }
.fold[open] > summary::before { transform: rotate(90deg); }
.fold > summary .muted { margin-left: auto; font-size: 13px; }
.raid-go { width: 100%; min-height: 52px; margin: 14px 0 4px; font: 800 18px/1 var(--head); text-transform: uppercase; letter-spacing: .05em; }
.stepper {
  position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column;
  background: var(--bg); padding: max(14px, env(safe-area-inset-top)) 16px max(14px, env(safe-area-inset-bottom));
}
.stepper-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stepper-bar { height: 6px; border-radius: 3px; background: var(--panel-2); margin: 12px 0; overflow: hidden; }
.stepper-bar i { display: block; height: 100%; background: var(--accent); transition: width .2s ease; }
.stepper-secs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px 4px; padding: 0 16px 4px; }
.stepper-secs::-webkit-scrollbar { display: none; }
.stepper-secs button {
  flex: none; min-height: 40px; padding: 0 14px; border-radius: 999px; white-space: nowrap;
  background: var(--panel); border: 1px solid var(--line); color: var(--muted);
  font: 700 15px/1 var(--head); text-transform: uppercase; letter-spacing: .05em;
}
.stepper-secs button.on { background: var(--accent); border-color: var(--accent); color: #111; }
.stepper-body { flex: 1; min-height: 0; overflow-y: auto; align-content: center; max-width: 720px; width: 100%; margin: 0 auto; display: grid; gap: 14px; justify-items: start; }
.stepper-sec { font: 700 15px/1 var(--head); text-transform: uppercase; letter-spacing: .08em; color: var(--accent-2); }
.stepper-body h2 { font-size: clamp(34px, 8vw, 56px); }
.stepper-body p { margin: 0; font-size: clamp(19px, 4.4vw, 24px); line-height: 1.45; color: #e2e0d9; }
.stepper-body p.big { font-size: clamp(24px, 6vw, 34px); color: var(--text); }
.stepper-nav { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; max-width: 720px; width: 100%; margin: 0 auto; }
.stepper-nav .btn { min-height: 64px; font: 800 20px/1 var(--head); text-transform: uppercase; letter-spacing: .05em; }
.stepper-nav .muted { font-weight: 600; }

/* ---------- Raid HUD (top of Home) ---------- */
.hud { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
@media (max-width: 720px) { .hud { grid-template-columns: 1fr 1fr; } .hud .go { grid-column: 1 / -1; } }
.hud-tile {
  display: flex; flex-direction: column; gap: 4px; min-height: 104px; padding: 14px; text-align: left;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text);
}
.hud-tile:hover { border-color: var(--accent); }
.hud-tile b { font: 800 24px/1.05 var(--head); text-transform: uppercase; letter-spacing: .03em; }
.hud-tile > span:not(.eyebrow) { color: var(--muted); font-size: 14px; }
.hud-tile.go { border-color: var(--accent); background: linear-gradient(120deg, rgba(255, 122, 26, .18), var(--panel) 70%); }
.hud-tile .bar { margin-top: auto; }

/* ---------- Post tables (one card per row on phones) ---------- */
.post-table { margin: 20px 0; }
.post-table table { width: 100%; border-collapse: collapse; font-size: 15px; }
.post-table th, .post-table td { text-align: left; vertical-align: top; padding: 12px; border: 1px solid var(--line); }
.post-table th { font: 700 15px/1.2 var(--head); text-transform: uppercase; letter-spacing: .05em; color: var(--accent-2); background: var(--panel); }
.post-table td { color: #d6d4cd; line-height: 1.55; }
@media (max-width: 720px) {
  .post-table thead { display: none; }
  .post-table table, .post-table tbody, .post-table td { display: block; width: 100%; }
  .post-table tr { display: grid; gap: 0; margin-bottom: 12px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--panel); }
  .post-table td { border: 0; border-top: 1px solid var(--line); }
  .post-table td:first-child { border-top: 0; }
  .post-table td::before { content: attr(data-label); display: block; margin-bottom: 4px; font: 700 13px/1 var(--head); text-transform: uppercase; letter-spacing: .06em; color: var(--accent-2); }
}

/* ---------- Favorite clips: upright cards for Shorts ---------- */
.clip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 240px)); gap: 14px; }
.clip-card .art { display: block; width: 100%; padding: 0; border: 0; aspect-ratio: 9 / 16; }
.clip-card .art img { width: 100%; height: 100%; object-fit: cover; }
.clip-card iframe { display: block; width: 100%; aspect-ratio: 9 / 16; border: 0; }

/* ---------- Studio additions ---------- */
.shared-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; }
.shared-banner .toolbar { margin-top: 0; }
.callsign-row { display: flex; gap: 8px; align-items: center; }
.callsign-row input { flex: 1; min-width: 0; }
.callsign-row .btn { min-height: 46px; }
.picker { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 6px; }
.picker label { position: relative; }
.picker input { position: absolute; opacity: 0; pointer-events: none; }
.picker span {
  display: grid; place-items: center; min-height: 44px; padding: 6px; text-align: center; cursor: pointer;
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  font: 700 15px/1.05 var(--head); text-transform: uppercase; letter-spacing: .04em; color: var(--muted);
}
.picker input:checked + span { color: var(--accent); border-color: var(--accent); background: var(--panel-2); }
.picker input:focus-visible + span { outline: 2px solid var(--accent); }
.picker.with-thumbs { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); }
.picker.with-thumbs span { align-content: start; gap: 4px; padding: 8px 4px; font-size: 14px; }
.mask-thumb { display: block; width: 56px; height: 64px; }
.picker-head { margin-top: 6px; font-size: 12px; font-weight: 500; color: var(--muted); }
.callouts { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 6px; margin-top: 10px; }
.callout {
  display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 10px; text-align: left;
  background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--c); border-radius: 8px;
  font: 700 15px/1.05 var(--head); text-transform: uppercase; letter-spacing: .03em;
}
.callout:hover { border-color: var(--c); }
.callout kbd { font: 700 11px var(--body); color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; }
@media (hover: none) { .callout kbd { display: none; } }

/* ---------- Wrist Deck (Tracker) ----------
   A field device on a forearm: read at a glance, hit with one finger, nothing that needs precision. */
.deck {
  --c: #ffb347; /* phosphor colour, changes with the raid phase */
  --deck-bg: #0c0e0b;
  --deck-panel: #151812;
  --deck-line: #2d3226;
  position: relative; display: flex; flex-direction: column;
  max-width: 460px; height: min(860px, calc(100dvh - 110px)); margin: 0 auto; overflow: hidden;
  background: var(--deck-bg); border: 2px solid #3a3f33; border-radius: 22px;
  box-shadow: 0 0 0 6px #17191a, 0 18px 50px rgba(0,0,0,.5);
  touch-action: manipulation; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent;
}
.deck[data-phase="live"] { --c: #5fe8d6; }
.deck[data-phase="warn"] { --c: #f4c430; }
.deck[data-phase="crit"] { --c: #ff4d4d; }
/* Scanlines over the whole device, never in the way of a tap. */
.deck::after {
  content: ""; position: absolute; inset: 0; z-index: 6; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,.14) 0 1px, transparent 1px 3px);
}
/* Critical phase: the frame pulses, since iPhones can't vibrate from a web page. */
.deck[data-phase="crit"]::before {
  content: ""; position: absolute; inset: 0; z-index: 5; pointer-events: none;
  box-shadow: inset 0 0 0 5px var(--c), inset 0 0 40px rgba(255,77,77,.5);
  animation: deck-pulse 1s steps(2) infinite;
}
.deck[data-phase="warn"]::before {
  content: ""; position: absolute; inset: 0; z-index: 5; pointer-events: none;
  box-shadow: inset 0 0 0 3px var(--c);
}
@keyframes deck-pulse { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .deck[data-phase="crit"]::before { animation: none; } }

.deck-top {
  position: relative; flex: none; display: flex; align-items: center; gap: 8px;
  padding: max(8px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) 8px max(10px, env(safe-area-inset-left));
  background: var(--deck-panel); border-bottom: 3px solid transparent;
  border-image: repeating-linear-gradient(135deg, #f4c430 0 10px, #15161a 10px 20px) 3;
  font: 700 15px/1 var(--head); text-transform: uppercase; letter-spacing: .08em; color: var(--muted);
}
.deck-home { display: grid; place-items: center; width: 40px; height: 40px; font-size: 20px; border: 1px solid var(--deck-line); border-radius: 8px; color: var(--text); }
.deck-id { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.deck-id b { color: var(--c); font-weight: 800; font-size: 18px; }
.deck-wake {
  display: flex; align-items: center; gap: 4px; min-height: 40px; padding: 0 8px;
  background: none; border: 1px solid var(--deck-line); border-radius: 8px; color: var(--muted);
  font: inherit; letter-spacing: .04em;
}
.deck-wake svg { font-size: 16px; }
.deck-wake.on { color: var(--ok); border-color: var(--ok); }
.deck-now { font-size: 20px; color: var(--text); font-variant-numeric: tabular-nums; }

.deck-screen {
  flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  padding: 10px max(10px, env(safe-area-inset-right)) 12px max(10px, env(safe-area-inset-left));
}
.deck-split { display: grid; gap: 10px; }
.deck-h { margin: 10px 0 6px; font-size: 16px; letter-spacing: .1em; color: var(--muted); }
.deck-split > div > .deck-h:first-child { margin-top: 2px; }

.deck-clock {
  display: grid; justify-items: center; padding: 10px 10px 12px;
  background: radial-gradient(90% 90% at 50% 40%, color-mix(in srgb, var(--c) 14%, transparent), transparent), #070806;
  border: 1px solid var(--deck-line); border-radius: 12px;
}
.deck-phase { font: 800 19px/1 var(--head); text-transform: uppercase; letter-spacing: .18em; color: var(--c); }
.deck-time {
  font: 800 clamp(86px, 29vw, 124px)/.98 var(--head); font-variant-numeric: tabular-nums; letter-spacing: .01em;
  color: var(--c); text-shadow: 0 0 22px color-mix(in srgb, var(--c) 55%, transparent);
}
.deck-track { display: block; width: 100%; height: 8px; background: #20241b; border-radius: 2px; overflow: hidden; }
.deck-track i { display: block; height: 100%; background: var(--c); }

.deck-mins { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 8px; }
.deck-mins button {
  min-height: 48px; background: var(--deck-panel); border: 1px solid var(--deck-line); border-radius: 8px; color: var(--muted);
  font: 700 18px/1 var(--head); text-transform: uppercase;
}
.deck-mins button.on { color: #111; background: var(--c); border-color: var(--c); }

.deck-big {
  display: grid; grid-auto-flow: column; justify-content: center; align-items: center; column-gap: 10px;
  width: 100%; min-height: 76px; padding: 8px; border-radius: 12px; border: 2px solid;
  font: 800 28px/1 var(--head); text-transform: uppercase; letter-spacing: .05em;
}
.deck-big svg { font-size: 30px; }
.deck-big small { grid-column: 1 / span 2; grid-row: 2; margin-top: 4px; font: 700 14px/1 var(--head); letter-spacing: .04em; text-align: center; opacity: .85; }
.deck-big:active { transform: translateY(2px); filter: brightness(1.25); }
.deck-big.deploy { margin-top: 8px; min-height: 92px; font-size: 38px; color: #111; background: #ffb347; border-color: #ffb347; box-shadow: 0 5px 0 #8a5a16; }
.deck-big.extract { color: #0a1a0e; background: var(--ok); border-color: var(--ok); box-shadow: 0 4px 0 #2e7d44; }
.deck-big.kia { color: #ffb3b3; background: #2a1212; border-color: #e84d4d; box-shadow: 0 4px 0 #7a2020; }
.deck-end { display: grid; grid-template-columns: 3fr 2fr; gap: 8px; margin-top: 10px; }
.deck-end .deck-big { font-size: 24px; min-height: 88px; }

.deck-line {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 56px; margin-top: 12px; padding: 0 14px;
  background: var(--deck-panel); border: 1px solid var(--deck-line); border-radius: 10px;
  font: 700 19px/1 var(--head); text-transform: uppercase; letter-spacing: .04em;
}
.deck-line span { flex: 1; text-align: left; }
.deck-line svg { font-size: 22px; color: var(--muted); }
.deck-line b { font-size: 22px; color: var(--warn); font-variant-numeric: tabular-nums; }
.deck-line b.ok { color: var(--ok); }

.deck-stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.deck-stats div { display: grid; justify-items: center; gap: 2px; padding: 8px 2px; background: var(--deck-panel); border: 1px solid var(--deck-line); border-radius: 8px; }
.deck-stats b { font: 800 24px/1 var(--head); font-variant-numeric: tabular-nums; }
.deck-stats span { font: 700 11px/1 var(--head); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.deck-stats .ok b { color: var(--ok); }
.deck-stats .bad b { color: #e84d4d; }
.btn.deck-recap { width: 100%; margin-top: 6px; min-height: 44px; }
.deck-tools { margin-top: 12px; color: var(--muted); }
.deck-tools summary { display: flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; font: 700 16px/1 var(--head); text-transform: uppercase; letter-spacing: .06em; list-style: none; }
.deck-tools summary::-webkit-details-marker { display: none; }
.deck-tools .toolbar { justify-content: flex-start; margin-top: 4px; }

.deck-undo {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; padding: 8px 12px;
  background: #1d2118; border: 1px solid var(--c); border-radius: 10px; font: 700 18px/1.1 var(--head); text-transform: uppercase;
}
.deck-undo .btn { min-height: 44px; flex: none; }

/* Hunt rows: the whole row is +1. Minus sits apart so it can't be hit by accident. */
.hunt-list, .deck-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.hunt-row { display: grid; grid-template-columns: 1fr 52px; gap: 4px; }
.hunt-tap {
  display: flex; align-items: center; gap: 10px; min-width: 0; min-height: 72px; padding: 8px 10px; text-align: left;
  background: var(--deck-panel); border: 1px solid var(--deck-line); border-radius: 10px;
}
.hunt-tap:active { background: color-mix(in srgb, var(--c) 28%, var(--deck-panel)); border-color: var(--c); }
.hunt-minus { background: #10120e; border: 1px solid var(--deck-line); border-radius: 10px; font-size: 20px; color: var(--muted); display: grid; place-items: center; }
.hunt-minus:active { color: var(--text); border-color: var(--muted); }
.hunt-main { flex: 1; min-width: 0; display: grid; gap: 4px; }
.hunt-main b { font: 700 19px/1.05 var(--head); text-transform: uppercase; letter-spacing: .02em; overflow-wrap: anywhere; }
.hunt-main small { font-size: 12px; font-weight: 500; line-height: 1.2; color: var(--muted); }
.hunt-main .bar { margin-top: 0; display: block; }
.hunt-count { flex: none; font: 800 32px/1 var(--head); font-variant-numeric: tabular-nums; color: var(--c); }
.hunt-count em { font-style: normal; color: var(--warn); font-size: 24px; }
.hunt-count u { text-decoration: none; color: var(--muted); font-size: 22px; font-weight: 700; }
.hunt-row.full .hunt-tap { border-color: var(--warn); }
.hunt-row.complete .hunt-tap { border-color: hsl(135 55% 45% / .6); }
.hunt-row.complete .hunt-count { color: var(--ok); }
.hunt-edit { grid-column: 1 / -1; display: flex; gap: 6px; justify-content: flex-end; padding-bottom: 4px; }
.pips { display: flex; flex-wrap: wrap; gap: 3px; }
.pips i { width: 16px; height: 7px; background: #2a2e23; transform: skewX(-18deg); }
.pips i.on { background: var(--ok); }
.pips i.bag { background: var(--warn); }
.item-badge {
  flex: none; display: grid; place-items: center; width: 50px; height: 56px; overflow: hidden;
  clip-path: polygon(50% 0, 100% 24%, 100% 76%, 50% 100%, 0 76%, 0 24%);
  background: hsl(var(--h, 30) 34% 24%); color: hsl(var(--h, 30) 80% 78%);
  font: 800 20px/1 var(--head); letter-spacing: .02em;
}
.item-badge.has-art { background: #20241b; }
.item-badge img { width: 100%; height: 100%; object-fit: contain; }

.deck-bar { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.deck-bar .btn { min-height: 44px; }
.deck-note { flex: 1; min-width: 0; font: 700 15px/1.1 var(--head); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.deck .add input { background: var(--deck-panel); border-color: var(--deck-line); font-size: 16px; -webkit-user-select: text; user-select: text; }
.deck-empty { padding: 24px 12px; text-align: center; color: var(--muted); border: 1px dashed var(--deck-line); border-radius: 10px; }
.deck-checks li { display: flex; align-items: center; gap: 6px; }
.deck-checks label {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 8px 12px; cursor: pointer;
  background: var(--deck-panel); border: 1px solid var(--deck-line); border-radius: 10px;
  font: 600 16px/1.25 var(--body);
}
.deck-checks label:active { border-color: var(--c); }
.deck-checks .check { width: 32px; height: 32px; }
.deck-checks li.done label { color: var(--muted); text-decoration: line-through; }

.deck-tabs {
  position: relative; flex: none; display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--deck-panel); border-top: 1px solid var(--deck-line);
  padding-bottom: env(safe-area-inset-bottom);
}
.deck-tabs button {
  position: relative; display: grid; justify-items: center; align-content: center; gap: 3px; min-height: 62px;
  background: none; border: 0; color: var(--muted);
  font: 700 15px/1 var(--head); text-transform: uppercase; letter-spacing: .06em;
}
.deck-tabs svg { font-size: 25px; }
.deck-tabs button[aria-selected="true"] { color: var(--c); box-shadow: inset 0 3px 0 var(--c); }
.deck-tabs em {
  position: absolute; top: 6px; left: calc(50% + 8px); min-width: 18px; padding: 2px 4px; border-radius: 99px;
  background: var(--c); color: #111; font: 800 12px/1 var(--head); font-style: normal; text-align: center;
}

/* On a phone the deck is the whole screen: the site's header and nav step aside. */
@media (max-width: 720px), (max-height: 500px) {
  body.deck-on .topbar { display: none; }
  body.deck-on main { max-width: none; padding: 0 !important; }
  .deck { position: fixed; inset: 0; z-index: 30; max-width: none; height: auto; margin: 0; border: 0; border-radius: 0; box-shadow: none; }
  body.deck-on .toast { bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 60; }
}
/* Wrist held sideways: tabs become a rail, and the clock sits beside the action. */
@media (max-height: 500px) and (orientation: landscape) {
  .deck { display: grid; grid-template-columns: 74px minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .deck-top { grid-column: 1 / -1; padding-top: 5px; padding-bottom: 5px; }
  .deck-screen { grid-column: 2; grid-row: 2; }
  .deck-tabs { grid-column: 1; grid-row: 2; grid-template-columns: 1fr; grid-auto-rows: 1fr; padding: 0 0 0 env(safe-area-inset-left); border-top: 0; border-right: 1px solid var(--deck-line); }
  .deck-tabs button { min-height: 0; }
  .deck-tabs button[aria-selected="true"] { box-shadow: inset 3px 0 0 var(--c); }
  .deck-split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .deck-time { font-size: clamp(64px, 19vh, 92px); }
  .deck-big.deploy { min-height: 64px; font-size: 30px; }
  .deck-end .deck-big { min-height: 66px; font-size: 22px; }
  .deck-mins button { min-height: 40px; }
  .deck-line { margin-top: 8px; min-height: 46px; }
}
