/* Crow Hollow. The farm itself is a canvas; this is the frame around it. */
:root {
  --bg: #1a1226; --panel: #2a1d3a; --panel2: #382649; --ink: #fdf3e0; --muted: #c2b0cf;
  --accent: #ffb347; --accent2: #f0703a; --good: #8fe08a; --bad: #ff7a6b; --wood: #8a5a32;
  --lb-accent: #ffb347; --lb-text: #fdf3e0; --lb-dim: #c2b0cf;
  --lb-edge: rgba(255, 179, 71, .25); --lb-panel: rgba(255, 255, 255, .05);
  --fs-accent: #ffb347; --fs-text: #fdf3e0; --fs-dim: #c2b0cf;
  --fs-edge: rgba(255, 179, 71, .25); --fs-panel: rgba(255, 255, 255, .05);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  overscroll-behavior: none; -webkit-tap-highlight-color: transparent; }
button { font: inherit; cursor: pointer; color: inherit; touch-action: manipulation; }
.muted { color: var(--muted); }
.lb-panel, .lb-card { --lb-accent: #ffb347; --lb-text: #fdf3e0; --lb-dim: #c2b0cf;
  --lb-edge: rgba(255, 179, 71, .25); --lb-panel: rgba(255, 255, 255, .05); }
/* the overlay board lives in the site's .overlay-card, capped at 420px by
   web/style.css — a max-width is what lifts it (CLAUDE.md) */
.lb-card { max-width: min(640px, 96vw) !important; }

/* ── the round ───────────────────────────────────────────────────────── */
#game { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center;
  justify-content: center; background: #0e0915; user-select: none; -webkit-user-select: none; }
.stage { position: relative; overflow: hidden; background: #231942; touch-action: none; }
#view { display: block; width: 100%; height: 100%; cursor: none; }
body.watching #view { cursor: default; }

/* landscape: the bars float over the picture */
.topbar { position: absolute; top: 0; left: 0; right: 0; z-index: 6; display: flex; align-items: flex-start;
  justify-content: space-between; padding: 8px 12px; pointer-events: none; gap: 8px; }
/* only the buttons take the pointer: a bird behind the score or the clock
   must still be shootable */
.topbar .tb-right { pointer-events: auto; }
.tb-left, .tb-right { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tb-left { flex-direction: column; align-items: flex-start; gap: 2px; }
.tb-score { display: flex; align-items: baseline; gap: 8px; padding: 4px 14px 5px; border-radius: 14px;
  background: rgba(26, 18, 38, .72); border: 2px solid rgba(255, 179, 71, .55);
  box-shadow: 0 3px 0 rgba(0, 0, 0, .3); }
.tb-score b { font: 900 30px/1 Georgia, "Times New Roman", serif; color: #ffe2a8; min-width: 2ch; text-align: right;
  font-variant-numeric: tabular-nums; }
.tb-score.bump b { animation: bump .22s ease-out; }
@keyframes bump { 0% { transform: scale(1.35); color: #fff; } 100% { transform: scale(1); } }
.mult-chip { font: 800 14px system-ui; color: #2a1505; background: var(--accent); border-radius: 9px; padding: 2px 7px; display: none; }
.mult-chip.on { display: inline-block; animation: bump .3s ease-out; }
.mult-chip.x2 { background: #ff5d5d; color: #fff; }
.tb-streak { font: 700 12px system-ui; color: #ffe2a8; text-shadow: 0 1px 2px #000; padding-left: 6px; min-height: 15px; }
.tb-mid { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.tb-clock { font: 900 30px/1 Georgia, serif; padding: 4px 16px 5px; border-radius: 14px; color: #fff;
  background: rgba(26, 18, 38, .72); border: 2px solid rgba(255, 255, 255, .35); font-variant-numeric: tabular-nums;
  box-shadow: 0 3px 0 rgba(0, 0, 0, .3); }
.tb-clock.rush { color: #fff; background: #c2332b; border-color: #ffd0c8; animation: pulse .5s ease-in-out infinite alternate; }
.tb-clock.plus { animation: bump .5s ease-out; border-color: #ffd54a; }
@keyframes pulse { from { transform: scale(1); } to { transform: scale(1.08); } }
.tb-round { font: 700 11px system-ui; color: #fff; text-shadow: 0 1px 2px #000; letter-spacing: .04em; text-transform: uppercase; }
.tb-btn, .hud-gear summary { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-size: 16px; background: rgba(26, 18, 38, .72); border: 1.5px solid rgba(255, 179, 71, .5);
  color: var(--ink); padding: 0; }
.hud-gear { position: relative; flex: 0 0 auto; }
.hud-gear summary { list-style: none; cursor: pointer; }
.hud-gear summary::-webkit-details-marker { display: none; }
/* site_audio.css pins #hudAudio fixed bottom-centre; inside the gear it sits
   under the button instead, so restate ALL four placement properties. */
#hudAudio { position: absolute; top: 44px; right: 0; left: auto; bottom: auto; transform: none;
  z-index: 30; width: max-content; max-width: 92vw; }
/* web/style.css pins .volume-slider position:fixed top:12px — undo it here
   (CLAUDE.md item 5). */
.volume-slider { position: static !important; top: auto !important; }

.gunbar { position: absolute; left: 0; right: 0; bottom: 0; z-index: 6; display: flex; align-items: flex-end;
  gap: 12px; padding: 0 12px 10px; pointer-events: none; }
.gunbar .reload-btn, .gunbar .minimap { pointer-events: auto; }
.ammo { display: flex; gap: 4px; padding: 6px 9px; border-radius: 12px; background: rgba(26, 18, 38, .72);
  border: 2px solid rgba(255, 179, 71, .45); }
.cork { width: 13px; height: 26px; border-radius: 4px 4px 6px 6px; position: relative;
  background: linear-gradient(90deg, #b98a52, #e8c79a 45%, #a9743c); box-shadow: inset 0 -5px 0 rgba(90, 50, 20, .35);
  transition: transform .12s, opacity .12s; }
.cork.spent { opacity: .18; transform: translateY(5px) scale(.85); }
.ammo.reloading .cork { animation: load .5s ease-out both; }
.ammo.empty { border-color: var(--bad); animation: shake .25s linear 2; }
@keyframes load { from { transform: translateY(-18px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.reload-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 6px 16px;
  border-radius: 12px; border: 2px solid rgba(255, 179, 71, .6); background: rgba(26, 18, 38, .72); color: var(--ink);
  font-weight: 800; line-height: 1.1; min-height: 42px; }
.reload-btn small { font-weight: 600; font-size: 10.5px; color: var(--muted); }
.reload-btn.urge { background: var(--accent2); border-color: #fff; color: #fff; animation: pulse .4s ease-in-out infinite alternate; }
.reload-btn.urge small { color: #fff; }
.minimap { flex: 1; min-width: 80px; height: 18px; border-radius: 9px; background: rgba(26, 18, 38, .72);
  border: 1.5px solid rgba(255, 255, 255, .3); cursor: pointer; }

.hud-board { position: absolute; left: 10px; top: 74px; z-index: 5; display: flex; flex-direction: column; gap: 4px;
  max-width: 230px; pointer-events: none; }
.hud-board .row { display: flex; align-items: center; gap: 6px; padding: 3px 9px 3px 5px; border-radius: 11px;
  background: rgba(26, 18, 38, .66); font-size: 13px; border-left: 4px solid var(--c, #fff); }
body.watching .hud-board .row { pointer-events: auto; cursor: pointer; }
.hud-board .row.me { background: rgba(255, 179, 71, .28); }
.hud-board .row.watch { outline: 2px solid #fff; }
.hud-board .row .who { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.hud-board .row .pts { font-weight: 800; font-variant-numeric: tabular-nums; }
.hud-board .row .fire { font-size: 11px; color: #ffd27a; min-width: 26px; text-align: right; }
.hud-board .team-head { font: 800 11px system-ui; letter-spacing: .06em; text-transform: uppercase; padding: 2px 8px;
  border-radius: 8px; background: rgba(26, 18, 38, .8); display: flex; justify-content: space-between; gap: 10px; }
.watch-tag { position: absolute; left: 50%; top: 62px; transform: translateX(-50%); z-index: 5; padding: 5px 14px;
  border-radius: 12px; background: rgba(26, 18, 38, .8); border: 1.5px solid #fff; font-weight: 700; font-size: 13px;
  text-align: center; max-width: 92%; }
.callouts { position: absolute; left: 0; right: 0; top: 23%; z-index: 5; display: flex; flex-direction: column;
  align-items: center; gap: 6px; pointer-events: none; }
.callout { font: 900 30px/1.05 Georgia, serif; color: #fff; text-align: center; padding: 0 10px;
  text-shadow: 0 3px 0 #5a1e12, 0 0 14px rgba(0, 0, 0, .55); animation: callout 1.6s ease-out both; }
.callout.gold { color: #ffd54a; }
.callout.bad { color: #ff9a8f; text-shadow: 0 3px 0 #4a0f0f, 0 0 14px rgba(0, 0, 0, .55); }
.callout.small { font-size: 21px; }
@keyframes callout { 0% { transform: scale(.4); opacity: 0; } 12% { transform: scale(1.15); opacity: 1; }
  22% { transform: scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translateY(-16px); } }
.countdown { position: absolute; inset: 0; z-index: 7; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 8px; font: 900 110px/1 Georgia, serif; color: #fff;
  text-shadow: 0 6px 0 #5a1e12, 0 0 30px rgba(0, 0, 0, .5); pointer-events: none; }
.countdown small { font: 800 20px system-ui; letter-spacing: .05em; text-shadow: 0 2px 4px #000; text-align: center; padding: 0 16px; }
.countdown .num { animation: bump .5s ease-out; }
.coach { position: absolute; left: 50%; top: 92px; transform: translateX(-50%); z-index: 8; display: flex; gap: 10px;
  align-items: center; background: #fff8e6; color: #3a2414; border-radius: 16px; padding: 10px 14px;
  border: 3px solid var(--accent2); box-shadow: 0 6px 0 rgba(0, 0, 0, .3); max-width: min(560px, 94%); font-weight: 700; }
.coach-text b { color: #c2332b; }
.mini-btn { border: 0; border-radius: 9px; padding: 7px 12px; background: #3a2414; color: #fff8e6; font-weight: 700; white-space: nowrap; }
.reveal { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 9;
  background: rgba(34, 22, 48, .95); border: 2px solid var(--accent); border-radius: 18px; padding: 14px 18px;
  width: min(520px, 94%); max-height: 92%; overflow: auto; box-shadow: 0 16px 50px rgba(0, 0, 0, .5); }
.reveal h2 { margin: 0 0 8px; font: 900 24px Georgia, serif; text-align: center; color: #ffe2a8; }
.rv-rows { display: flex; flex-direction: column; gap: 5px; }
.rv-row { display: grid; grid-template-columns: 22px 1fr auto auto; gap: 8px; align-items: center; padding: 6px 10px;
  border-radius: 10px; background: rgba(255, 255, 255, .06); border-left: 4px solid var(--c, #fff); }
.rv-row.me { background: rgba(255, 179, 71, .22); }
.rv-row .who { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rv-row .meta { font-size: 12px; color: var(--muted); white-space: nowrap; }
.rv-row .pts { font: 900 19px Georgia, serif; color: #ffe2a8; }
.rv-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.toast-box { position: absolute; left: 0; right: 0; bottom: 70px; z-index: 12; display: flex; flex-direction: column;
  align-items: center; gap: 6px; pointer-events: none; }
.toast { background: rgba(26, 18, 38, .92); border: 1.5px solid var(--accent); border-radius: 12px; padding: 8px 14px;
  font-weight: 600; max-width: 90vw; text-align: center; }
.toast.bad { border-color: var(--bad); }
.toast.floating { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 90; }

/* portrait: the picture is a band; score above, gun below, rivals under that */
body.portrait #game { justify-content: flex-start; }
body.portrait .topbar { position: static; width: 100%; padding: 6px 8px; align-items: center; }
body.portrait .gunbar { position: static; width: 100%; padding: 8px 8px 4px; align-items: stretch; flex-wrap: wrap; }
body.portrait .tb-score b, body.portrait .tb-clock { font-size: 24px; }
body.portrait .tb-btn, body.portrait .hud-gear summary { width: 32px; height: 32px; }
body.portrait .tb-right { gap: 5px; }
body.portrait .reload-btn { flex: 1; min-height: 58px; font-size: 19px; background: #4a2f66; }
body.portrait .reload-btn small { display: none; }
body.portrait .ammo { align-items: center; padding: 6px 8px; }
body.portrait .cork { width: 14px; height: 32px; }
body.portrait .minimap { flex: 1 0 100%; order: -1; height: 16px; }
body.portrait .hud-board { position: static; flex-direction: row; flex-wrap: wrap; max-width: none; width: 100%;
  padding: 4px 8px; order: 5; }
body.portrait .hud-board .row { flex: 1 1 44%; }
body.portrait .callout { font-size: 23px; }
body.portrait .callout.small { font-size: 17px; }
body.portrait .countdown { font-size: 84px; }
body.portrait .coach { top: 8px; font-size: 14px; padding: 7px 10px; }
body.portrait .watch-tag { top: 8px; }

/* ── overlays ────────────────────────────────────────────────────────── */
#lobbyOverlay { position: fixed; inset: 0; z-index: 40; display: flex; align-items: flex-start; justify-content: center;
  overflow-y: auto; padding: 18px 10px 30px;
  background: radial-gradient(900px 500px at 70% 78%, rgba(245, 138, 75, .45), transparent 60%),
              linear-gradient(180deg, #231942 0%, #5e3b76 46%, #c9567a 78%, #f58a4b 100%); }
.card { width: min(480px, 100%); background: rgba(34, 22, 48, .93); border: 2px solid rgba(255, 179, 71, .5);
  border-radius: 22px; padding: 16px 20px 16px; box-shadow: 0 18px 60px rgba(0, 0, 0, .5); position: relative;
  display: flex; flex-direction: column; }
.card.results-wide { width: min(720px, 100%); }
.card > div[id$="Pane"] { display: flex; flex-direction: column; gap: 10px; }
.card-top { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 4px; min-height: 30px; }
.lobby-audio { display: flex; justify-content: center; min-width: 0; }
.ch-title { margin: 4px 0 0; display: flex; flex-direction: column; align-items: center; line-height: .86; }
.ch-crow { font: 900 64px/0.9 Georgia, "Times New Roman", serif; color: #ffe2a8; letter-spacing: -.02em;
  text-shadow: 0 4px 0 #7a2f1a, 0 9px 22px rgba(0, 0, 0, .45); }
.ch-hollow { font: 900 44px/1 Georgia, serif; color: var(--accent2); font-style: italic; letter-spacing: .02em;
  text-shadow: 0 3px 0 #4a1408; }
.ch-title.small .ch-crow { font-size: 38px; }
.ch-title.small .ch-hollow { font-size: 27px; }
.ch-head { margin: 4px 0 0; font: 900 34px/1.05 Georgia, serif; text-align: center; color: #ffe2a8; text-shadow: 0 3px 0 #7a2f1a; }
.tagline { margin: 0; text-align: center; color: var(--muted); }
#nameInput { width: 100%; padding: 12px 14px; border-radius: 12px; border: 2px solid rgba(255, 179, 71, .4);
  background: #1a1226; color: var(--ink); font: 600 17px system-ui; text-align: center; }
.primary, .secondary { width: 100%; border-radius: 14px; padding: 13px 14px; font-weight: 800; font-size: 17px; border: 0; }
.primary { background: linear-gradient(180deg, #ffbe5c, #f0703a); color: #2a1505; box-shadow: 0 4px 0 #9a3d17; }
.primary:active { transform: translateY(2px); box-shadow: 0 2px 0 #9a3d17; }
.secondary { background: var(--panel2); color: var(--ink); border: 1.5px solid rgba(255, 179, 71, .35); }
.primary:disabled, .secondary:disabled { opacity: .5; }
.small-btn { width: auto; padding: 8px 16px; font-size: 15px; }
.daily-btn { display: flex; flex-direction: column; align-items: center; gap: 1px; }
.daily-btn small { font-weight: 600; font-size: 12px; color: var(--muted); }
.link-row { display: flex; justify-content: center; gap: 4px 14px; flex-wrap: wrap; }
.link-btn { background: none; border: 0; color: #ffd9a0; font-weight: 700; padding: 6px 4px; }
.back-link { color: var(--muted); text-align: center; font-size: 14px; text-decoration: none; padding: 4px; }
.settings-row { display: flex; align-items: center; gap: 8px; }
.settings-label { width: 74px; flex: 0 0 74px; font-size: 13px; color: var(--muted); font-weight: 700; }
.seg { display: flex; flex: 1; border-radius: 11px; overflow: hidden; border: 1.5px solid rgba(255, 179, 71, .35); }
.seg button { flex: 1; padding: 9px 4px; border: 0; background: #1a1226; color: var(--muted); font-weight: 700; font-size: 13.5px; }
.seg button + button { border-left: 1px solid rgba(255, 179, 71, .2); }
.seg button.on { background: var(--accent); color: #2a1505; }
.seg.locked button { cursor: default; }
.setup { display: flex; flex-direction: column; gap: 8px; }
.setup.no-bots .bots-only { display: none; }
.mode-note { margin: -2px 0 0 82px; font-size: 12.5px; }
.squad-count { text-align: center; font-weight: 700; color: var(--muted); }
.player-list { display: flex; flex-direction: column; gap: 5px; }
.player-row { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 10px; background: rgba(255, 255, 255, .06); }
.player-row .dot { width: 14px; height: 14px; border-radius: 50%; background: var(--c, #fff); flex: 0 0 auto; }
.player-name { flex: 1; font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag { font-size: 12px; color: var(--muted); }
.help-btn.corner { position: absolute; right: 14px; top: 12px; width: 32px; height: 32px; border-radius: 50%;
  background: var(--panel2); border: 1.5px solid rgba(255, 179, 71, .45); font-weight: 800; }
.need-more { text-align: center; margin: 0; }
#waitHost { text-align: center; margin: 0; }
.leaderboard { margin-top: 4px; }
.daily-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.daily-stats .ds { background: rgba(255, 255, 255, .06); border-radius: 12px; padding: 10px 6px; text-align: center; }
.daily-stats .ds b { display: block; font: 900 26px Georgia, serif; color: #ffe2a8; }
.daily-stats .ds span { font-size: 12px; color: var(--muted); }
.result-note { text-align: center; color: #ffd9a0; font-weight: 700; min-height: 0; }
.result-mine { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.result-mine .ds { background: rgba(255, 255, 255, .06); border-radius: 12px; padding: 8px 4px; text-align: center; }
.result-mine .ds b { display: block; font: 900 22px Georgia, serif; color: #ffe2a8; }
.result-mine .ds span { font-size: 11.5px; color: var(--muted); }
.podium { display: flex; justify-content: center; align-items: flex-end; gap: 8px; }
.pod { flex: 1; max-width: 170px; text-align: center; min-width: 0; }
.pod .pname { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pod .ppts { font-size: 13px; color: var(--muted); }
.pod .block { margin-top: 4px; border-radius: 10px 10px 0 0; font: 900 22px Georgia, serif; color: #2a1505;
  background: linear-gradient(180deg, #ffd27a, #f0a03a); display: flex; align-items: center; justify-content: center; }
.pod.p1 .block { height: 74px; }
.pod.p2 .block { height: 52px; background: linear-gradient(180deg, #e3e6ee, #a9b0c0); }
.pod.p3 .block { height: 38px; background: linear-gradient(180deg, #e0a878, #b06a3a); }
.result-btns { display: flex; flex-direction: column; gap: 8px; }

.howto { position: fixed; inset: 0; z-index: 80; background: rgba(14, 9, 21, .78); display: flex; align-items: center;
  justify-content: center; padding: 12px; }
.howto-card { width: min(600px, 100%); max-height: 96vh; overflow: auto; background: #fff8e6; color: #3a2414;
  border-radius: 20px; border: 3px solid var(--accent2); padding: 16px 18px; position: relative; }
.howto-card h2 { margin: 0 0 4px; font: 900 28px Georgia, serif; color: #7a2f1a; }
.how-lead { margin: 0 0 10px; font-weight: 600; }
.howto-x { position: absolute; right: 10px; top: 10px; width: 34px; height: 34px; border-radius: 50%; border: 0;
  background: #3a2414; color: #fff8e6; font-weight: 800; }
.how-grid { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.how-row { display: grid; grid-template-columns: 96px 1fr; gap: 10px; align-items: baseline; font-size: 14.5px; }
.how-row .key { font-weight: 800; color: #c2332b; }
.how-birds { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 5px; margin: 8px 0; }
.how-bird { display: flex; flex-direction: column; align-items: center; background: #f6e7c6; border-radius: 12px;
  padding: 4px 4px 7px; text-align: center; font-size: 12.5px; font-weight: 700; }
.how-bird canvas { width: 54px; height: 54px; }
.how-bird b { color: #1f7a3a; font-size: 14px; }
.how-bird.no b { color: #c2332b; }
.tut-link { color: #7a2f1a; display: block; margin: 4px auto 0; }

@media (max-width: 560px) {
  .card { padding: 12px 13px; }
  .ch-crow { font-size: 52px; }
  .ch-hollow { font-size: 36px; }
  .settings-label { width: 56px; flex-basis: 56px; font-size: 12px; }
  .seg button { font-size: 12.5px; padding: 8px 3px; }
  .mode-note { margin-left: 0; }
  .result-mine { grid-template-columns: repeat(2, 1fr); }
  .fs-table th, .fs-table td { padding: 6px 4px; font-size: 12.5px; }
  .fs-table th { letter-spacing: 0; font-size: 10px; }
}
@media (max-height: 520px) {
  .tb-score b, .tb-clock { font-size: 22px; }
  .tb-btn, .hud-gear summary { width: 30px; height: 30px; }
  .hud-board { top: 56px; }
  .hud-board .row { font-size: 11.5px; padding: 2px 7px 2px 4px; }
  .callout { font-size: 22px; }
  .countdown { font-size: 70px; }
  .cork { height: 20px; width: 11px; }
  .reload-btn { min-height: 34px; padding: 4px 14px; }
}
