/* Duck Power — one look for splash, board and player screens. A marsh at
   dusk: deep pond teal, reed green, a low sun in gold, and the evening Neck in
   coral. Player colours are Okabe–Ito and always come with a mark. */
:root {
  --pond: #0b2430; --pond2: #10303e; --pond3: #174152; --reed: #2f6b5a;
  --ink: #f4ecd6; --dim: #94aeb3; --line: #24505f;
  --sun: #f2c14e; --sun2: #d99a2b; --neck: #e2614f; --belly: #3aa7a0;
  --good: #66d19e; --warm: #f0a53a; --bad: #ff7b66;
  --display: "Fredoka", "Trebuchet MS", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
}
* { box-sizing: border-box; margin: 0; }
html, body { min-height: 100%; }
body {
  color: var(--ink); font: 15px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--pond) radial-gradient(ellipse at 50% -10%, #1d5468, var(--pond) 65%) fixed;
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: .3px; }
h1 { color: var(--sun); font-size: 46px; line-height: 1; }
h2 { color: var(--sun); font-size: 22px; }
h3 { font-size: 16px; color: var(--ink); }
button { background: var(--pond3); border: 1px solid var(--line); color: var(--ink); padding: 8px 12px;
  border-radius: 10px; font: inherit; font-size: 14px; cursor: pointer; }
button:hover:not(:disabled) { border-color: var(--dim); }
button.primary { background: var(--sun); border-color: var(--sun); color: #2a1d02; font-weight: 700; }
button.danger { border-color: var(--neck); color: #ffd3cb; }
button.ghost { background: transparent; }
button:disabled { opacity: .35; cursor: default; }
button.sel { outline: 2px solid var(--sun); outline-offset: 1px; }
select, input { font: inherit; padding: 6px 8px; border-radius: 8px; background: var(--pond2); color: var(--ink); border: 1px solid var(--line); }
.muted { color: var(--dim); } .small { font-size: 12px; }
.tagg { color: var(--dim); font-size: 13px; margin-left: 6px; }
.good { color: var(--good); } .warm { color: var(--warm); } .bad { color: var(--bad); }
#toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%) translateY(140px); background: var(--sun);
  color: #2a1d02; padding: 10px 18px; border-radius: 10px; transition: transform .25s; z-index: 50; max-width: 92vw; font-weight: 600; }
#toast.show { transform: translateX(-50%) translateY(0); }
#conn { position: fixed; top: 8px; right: 8px; background: var(--neck); color: #fff; padding: 4px 10px; border-radius: 8px;
  font-size: 13px; display: none; z-index: 60; }
#conn.show { display: block; }
.av { border-radius: 50%; vertical-align: middle; margin-right: 4px; }

/* ---- chips ---------------------------------------------------------------- */
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px 1px 4px; border-radius: 999px;
  background: color-mix(in srgb, var(--pc) 22%, transparent); border: 1px solid color-mix(in srgb, var(--pc) 70%, transparent);
  white-space: nowrap; margin: 0 2px; }
.chip i { font-style: normal; color: var(--pc); font-size: .95em; width: 1.1em; text-align: center; }
.mk { font-style: normal; }
.quack { font-style: normal; color: var(--neck); font-weight: 700; font-size: .85em; }
.hot { color: var(--neck); } .warm { color: var(--warm); } .cool { color: var(--belly); }

/* ---- the strip ---------------------------------------------------------- */
.strip { position: relative; height: calc(var(--sh) + 6px); overflow: hidden; border-radius: 14px;
  background: linear-gradient(#0e2d3a, #0a2029); box-shadow: inset 0 0 0 1px var(--line); }
.strip .band { position: absolute; top: 3px; left: calc(50% - 2 * var(--slot)); will-change: transform; }
.strip svg { display: block; }
.strip .slot { fill: transparent; stroke: #ffffff0d; }
.strip .slot.neck { fill: #e2614f14; }
.strip .slot.belly { fill: #3aa7a012; }
.strip .hr { fill: var(--dim); font: 11px var(--mono); text-anchor: middle; }
.strip .dm { fill: #ffffff55; font: 10px var(--mono); text-anchor: middle; }
.strip .demand { fill: #e2614f40; stroke: var(--neck); stroke-width: 2; }
.strip .net { fill: #3aa7a055; stroke: var(--belly); stroke-width: 1.5; stroke-dasharray: 4 3; }
.strip .sun { fill: #f2c14e30; stroke: var(--sun); stroke-width: 1.5; }
.strip .duckhead { text-anchor: middle; }
.strip .windows { position: absolute; inset: 0; pointer-events: none; }
.strip .win { position: absolute; top: 0; bottom: 0; width: var(--slot); border: 3px solid var(--sun); border-radius: 10px;
  background: #0b243066; box-shadow: 0 0 0 2000px #00000038; display: flex; flex-direction: column; align-items: center;
  justify-content: flex-start; padding-top: 16px; gap: 1px; text-align: center; text-shadow: 0 1px 3px #000; }
.strip .win + .win { box-shadow: none; }
.strip .wlab { font-family: var(--display); font-weight: 600; font-size: 13px; color: var(--sun); text-transform: uppercase; letter-spacing: 1px; }
.strip .wtime { font: 600 15px var(--mono); }
.strip .wdem { font-size: 12px; } .strip .wdem b { font-size: 20px; }
.strip .wenv { font-size: 13px; display: flex; gap: 4px; align-items: center; }
.strip .wenv small { font-size: 10px; color: var(--sun); }
.strip .wwx { display: flex; gap: 2px; flex-wrap: wrap; justify-content: center; }
.strip.compact .win { padding-top: 14px; border-width: 2px; }
.strip.compact .wtime { font-size: 11px; } .strip.compact .wlab { font-size: 9px; letter-spacing: 0; }
.wbars { display: inline-flex; gap: 1px; align-items: flex-end; height: 12px; }
.wbars i { width: 3px; background: #ffffff33; border-radius: 1px; }
.wbars i:nth-child(1) { height: 5px; } .wbars i:nth-child(2) { height: 8px; } .wbars i:nth-child(3) { height: 12px; }
.wbars i.on { background: #bfe8ff; }
.wx { display: inline-flex; align-items: center; font-size: 15px; }
.wx small { font-size: 9px; color: var(--dim); margin-left: 1px; }

/* ---- the map ------------------------------------------------------------- */
.map { display: grid; grid-template-columns: 1fr 26px 1fr 26px 1fr 26px 1fr; gap: 0; align-items: stretch; }
.zone { background: #0a1f2999; border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.zone .zh { display: flex; justify-content: space-between; gap: 6px; align-items: baseline; font-size: 13px; }
.zone .zh b { font-family: var(--display); font-weight: 600; font-size: 15px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zone .zh .muted { font-size: 11px; white-space: nowrap; }
.zone .zstat { display: flex; gap: 10px; align-items: baseline; font-size: 13px; flex-wrap: wrap; }
.zone .ztime { font: 600 13px var(--mono); color: var(--sun); }
.zone .zp { margin-left: auto; font: 700 16px var(--mono); }
.zone .slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.zone .zfoot { display: flex; align-items: center; gap: 6px; min-height: 28px; }
.tile { position: relative; aspect-ratio: 1; border-radius: 8px; display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--pc) 26%, #0b2430); border: 2px solid var(--pc); overflow: hidden; font-size: 20px; }
.tile.empty { background: #ffffff06; border: 1px dashed #ffffff22; }
.tile.pending { border-style: dashed; opacity: .6; }
.tile.tripped { filter: grayscale(1); opacity: .45; }
.tile.mine { box-shadow: 0 0 0 2px #fff6; }
.tile .ic { position: relative; z-index: 1; }
.tile .own { position: absolute; right: 2px; bottom: 0; font-style: normal; font-size: 11px; color: var(--pc); z-index: 2; text-shadow: 0 0 2px #000; }
.tile .fill { position: absolute; left: 0; right: 0; bottom: 0; background: #66d19e55; }
.link { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 4px; }
.link .ln { width: 26px; height: 8px; border-radius: 4px; background: var(--pc); position: relative; }
.link .ln i { position: absolute; top: -13px; left: 0; right: 0; text-align: center; font-style: normal; font-size: 10px; color: var(--pc); }
.link .ln.pending { opacity: .45; }
.link .ln.sag { background: repeating-linear-gradient(90deg, var(--pc) 0 4px, transparent 4px 7px); }
.link .ln.none { background: #ffffff10; height: 2px; }
.spark { flex: none; } .spark path { fill: none; stroke: var(--sun); stroke-width: 1.6; }

/* ---- bid stack, charts ------------------------------------------------------ */
.bids .axis { stroke: #ffffff33; }
.bids .acc { opacity: .95; } .bids .rej { opacity: .28; }
.bids .clear { stroke: var(--sun); stroke-dasharray: 5 3; stroke-width: 1.5; }
.bids .dline { stroke: #fff; stroke-width: 1.5; }
.bids .dl { fill: #fffc; font: 10px var(--mono); }
.bids .bm { font-size: 10px; text-anchor: middle; }
.heat .hl { fill: var(--dim); font: 12px system-ui; text-anchor: end; }
.heat .hh { fill: var(--dim); font: 10px var(--mono); text-anchor: middle; }
.coins .cl { fill: none; stroke-width: 2.5; }
.coins .cm { font-size: 13px; }
.coins .gl { stroke: #ffffff18; } .coins .gt { fill: var(--dim); font: 10px var(--mono); text-anchor: end; }

/* ---- shared panels -------------------------------------------------------------- */
.panel { background: #0a1f29cc; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.timer { height: 5px; border-radius: 3px; background: #ffffff18; overflow: hidden; }
.timer i { display: block; height: 100%; background: var(--sun); width: 100%; transition: width .25s linear; }
.timer.low i { background: var(--neck); }
.standing { display: grid; grid-template-columns: 2em 1fr auto auto; gap: 4px 12px; align-items: center; }
.standing .r { font-family: var(--display); font-size: 20px; color: var(--sun); }
.standing .sc { font: 700 18px var(--mono); }
.standing .br { font-size: 12px; color: var(--dim); }
.how ul { padding-left: 20px; } .how li { margin: 4px 0; }
