/* Frost Command Calculators. Base styles and the four skins are the same as SvS Prep's app.css (keep them in step); calculator parts at the end. */
/* SvS Prep. Layout: a booking desk. Tabs on top; a day at a time; each position a 48-cell half-hour grid (UTC, the game's clock). Frost Command brand tokens. */
:root {
  --bg: #edf2f8; --panel: #ffffff; --panel-2: #f4f7fb; --rule: #d3dce8; --ink: #0f1a2b; --mist: #5a6a80;
  --accent: #1d6fa8; --accent-ink: #ffffff; --accent-soft: #dcebf7; --call: #a5650f; --call-soft: #fbefd9;
  --good: #23784d; --good-soft: #dff2e7; --hit: #b8372f; --hit-soft: #f9e2df; --heat: 29 111 168;
  --display: 'Saira Condensed', 'Arial Narrow', sans-serif; --body: 'Public Sans', 'Segoe UI', system-ui, sans-serif; --mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  --radius: 10px;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0b1322; --panel: #111c2e; --panel-2: #16233a; --rule: #233451; --ink: #eef4fb; --mist: #93a6c0;
  --accent: #9ad8ff; --accent-ink: #06223a; --accent-soft: #15324d; --call: #ffc23d; --call-soft: #3a2c10;
  --good: #5cc48b; --good-soft: #12301f; --hit: #ff7a6e; --hit-soft: #3a1714; --heat: 154 216 255; color-scheme: dark; } }
:root[data-theme="dark"] {
  --bg: #0b1322; --panel: #111c2e; --panel-2: #16233a; --rule: #233451; --ink: #eef4fb; --mist: #93a6c0;
  --accent: #9ad8ff; --accent-ink: #06223a; --accent-soft: #15324d; --call: #ffc23d; --call-soft: #3a2c10;
  --good: #5cc48b; --good-soft: #12301f; --hit: #ff7a6e; --hit-soft: #3a1714; --heat: 154 216 255; color-scheme: dark; }
* { box-sizing: border-box; }
[hidden] { display: none !important; } /* the sign-in screen and the app take turns */
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 15px/1.5 var(--body); }
.wrap { max-width: 76rem; margin: 0 auto; padding-block: 18px 64px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); display: grid; gap: 16px; }
h1, h2, h3 { font-family: var(--display); text-transform: uppercase; letter-spacing: .03em; margin: 0; text-wrap: balance; }
h1 { font-size: 1.9rem; line-height: 1.05; font-weight: 800; }
h2 { font-size: 1.3rem; font-weight: 700; }
h3 { font-size: 1.05rem; font-weight: 700; }
p { margin: 0; }
.muted { color: var(--mist); }
.mono, .num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.small { font-size: .82rem; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input[type=text], input[type=number], input[type=date], select { background: var(--panel); border: 1px solid var(--rule); border-radius: 8px; padding: 7px 10px; min-width: 0; width: 100%; }
label.f { display: grid; gap: 4px; font-size: .8rem; color: var(--mist); font-weight: 600; }
.btn { border: 1px solid var(--rule); background: var(--panel); border-radius: 8px; padding: 7px 14px; font-weight: 600; white-space: nowrap; }
.btn:hover { border-color: var(--mist); }
a.btn { text-decoration: none; color: inherit; display: inline-block; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.danger { color: var(--hit); }
.btn.armed { background: var(--hit); border-color: var(--hit); color: #fff; }
.btn.sm { padding: 4px 10px; font-size: .85rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.sp { flex: 1; }

/* header: a band of its own, so the room's details sit apart from what players work with */
:root { --band: #10233d; --band-ink: #eef4fb; --band-mist: #a9bbd3; --band-line: #9ad8ff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --band: #18304f; --band-ink: #eef4fb; --band-mist: #a9bbd3; --band-line: #9ad8ff; } }
:root[data-theme="dark"] { --band: #18304f; }
.band { background: var(--band); color: var(--band-ink); border-bottom: 3px solid var(--band-line); }
.band .wrap { padding-block: 16px; }
.band .eyebrow { color: var(--band-line); }
.band #subtitle { color: var(--band-mist); max-width: 46rem; }
.band .chip { background: rgb(255 255 255 / .08); border-color: rgb(255 255 255 / .2); color: var(--band-ink); }
.band .chip.on { background: rgb(92 196 139 / .2); border-color: transparent; color: #8fe6b3; }
.band .chip.off { background: rgb(255 194 61 / .18); border-color: transparent; color: #ffd47a; }
.band .chip.offline { background: rgb(255 122 110 / .22); color: #ffb0a8; }
.band .btn { background: transparent; color: var(--band-ink); border-color: rgb(255 255 255 / .35); }
.band .btn:hover { border-color: var(--band-ink); }
.band .role { background: var(--band-line); color: #06223a; }
.band .role.manager { background: #5cc48b; color: #06220f; }
.linkish { background: none; border: 0; padding: 0; color: var(--band-line); text-decoration: underline; text-underline-offset: 2px; font-weight: 600; }
.top { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 20px; }
.brand { display: grid; gap: 2px; }
.eyebrow { font: 600 .72rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--rule); background: var(--panel); border-radius: 999px; padding: 3px 10px; font-size: .8rem; }
.chip b { font-family: var(--mono); font-weight: 600; }
.chip.on { background: var(--good-soft); border-color: transparent; color: var(--good); }
.chip.off { background: var(--call-soft); border-color: transparent; color: var(--call); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--rule); overflow-x: auto; }
.tabs button { background: none; border: 0; border-bottom: 3px solid transparent; padding: 8px 12px; font: 700 1rem/1.2 var(--display); text-transform: uppercase; letter-spacing: .05em; color: var(--mist); white-space: nowrap; }
.tabs button[aria-selected=true] { color: var(--ink); border-bottom-color: var(--accent); }
.note { border-radius: var(--radius); padding: 10px 14px; background: var(--accent-soft); font-size: .9rem; }
.note.warn { background: var(--call-soft); }
.note.bad { background: var(--hit-soft); }

/* panels */
.panel { background: var(--panel); border: 1px solid var(--rule); border-radius: var(--radius); padding: 16px; display: grid; gap: 14px; min-width: 0; }
.stack { display: grid; gap: 16px; min-width: 0; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; align-items: end; }
.day-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.day-no { font: 800 2.1rem/0.9 var(--display); color: var(--accent); }
.pos-toggle { display: flex; flex-wrap: wrap; gap: 8px; }
.pos-toggle button { border: 1px solid var(--rule); background: var(--panel-2); border-radius: 8px; padding: 8px 12px; text-align: start; display: grid; gap: 1px; }
.pos-toggle button b { font-weight: 700; }
.pos-toggle button span { font-size: .78rem; color: var(--mist); }
.pos-toggle button[aria-pressed=true] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.pos-toggle button[aria-pressed=true] span { color: inherit; opacity: .85; }
.res { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.res label.f small { font-weight: 400; }
.pts { display: flex; align-items: baseline; gap: 8px; padding: 10px 12px; border-radius: 8px; background: var(--panel-2); }
.pts b { font: 700 1.5rem/1 var(--mono); }

/* the half-hour grid */
.slots { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 3px; }
@media (max-width: 720px) { .slots { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.slot { position: relative; border: 1px solid var(--rule); border-radius: 6px; padding: 6px 2px 5px; background: rgb(var(--heat) / calc(var(--h, 0) * .28)); font: 400 .78rem/1.1 var(--mono); text-align: center; min-height: 40px; }
.slot .w { display: block; font-size: .64rem; color: var(--mist); margin-top: 2px; }
.slot[aria-pressed=true] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.slot[aria-pressed=true] .w { color: inherit; }
.slot .rank { position: absolute; top: -7px; inset-inline-end: -5px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--call); color: var(--bg); font: 700 .7rem/18px var(--mono); padding: 0 4px; }
.slot.got { outline: 2px solid var(--good); outline-offset: 1px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .78rem; color: var(--mist); align-items: center; }
.legend i { display: inline-block; width: 14px; height: 14px; border-radius: 4px; border: 1px solid var(--rule); vertical-align: -2px; margin-inline-end: 4px; }
.outcome { border-radius: 8px; padding: 8px 12px; font-size: .88rem; }
.outcome.ok { background: var(--good-soft); }
.outcome.no { background: var(--hit-soft); }
.check { display: inline-flex; gap: 8px; align-items: center; font-size: .9rem; }
.seg { display: inline-flex; border: 1px solid var(--rule); border-radius: 8px; overflow: hidden; }
.seg button { border: 0; background: var(--panel); padding: 5px 10px; font-size: .82rem; font-weight: 600; }
.seg button[aria-pressed=true] { background: var(--ink); color: var(--bg); }

/* schedule */
.daychips { display: flex; flex-wrap: wrap; gap: 6px; }
.daychips button { border: 1px solid var(--rule); background: var(--panel); border-radius: 8px; padding: 6px 12px; font-weight: 600; display: grid; text-align: start; }
.daychips button small { font-weight: 400; color: var(--mist); font-size: .75rem; }
.daychips button[aria-pressed=true] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; align-items: start; }
.sched { width: 100%; border-collapse: collapse; font-size: .88rem; }
.sched td { border-top: 1px solid var(--rule); padding: 4px 8px; vertical-align: middle; }
.sched td.t { font-family: var(--mono); white-space: nowrap; width: 1%; }
.sched td.t small { display: block; color: var(--mist); font-size: .7rem; }
.sched tr.empty td { color: var(--mist); padding-block: 2px; font-size: .8rem; }
.sched tr.mine td { background: var(--good-soft); }
.sched td.p { font-family: var(--mono); text-align: end; color: var(--mist); width: 1%; white-space: nowrap; }
.tag { font: 600 .72rem/1 var(--mono); border: 1px solid var(--rule); border-radius: 4px; padding: 2px 4px; color: var(--mist); margin-inline-start: 4px; }
.ex { font: 700 .66rem/1 var(--mono); letter-spacing: .08em; background: var(--call-soft); color: var(--call); border-radius: 4px; padding: 3px 5px; }
.waitlist { display: grid; gap: 4px; font-size: .88rem; }
.tbl { overflow-x: auto; }
table.list { width: 100%; border-collapse: collapse; font-size: .88rem; }
table.list th { text-align: start; font: 700 .78rem/1.2 var(--display); letter-spacing: .06em; text-transform: uppercase; color: var(--mist); padding: 6px 8px; }
table.list td { border-top: 1px solid var(--rule); padding: 7px 8px; vertical-align: top; }
table.list td.num { text-align: end; }
.items { display: grid; gap: 6px; }
.item-row { display: grid; grid-template-columns: auto minmax(0, 2fr) 130px 110px auto; gap: 6px; align-items: center; }
.item-row .check { font-size: .82rem; white-space: nowrap; }
.pos-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto; gap: 6px; align-items: center; }
@media (max-width: 560px) { .item-row { grid-template-columns: 1fr 1fr; } .pos-row { grid-template-columns: 1fr; } }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(18px + env(safe-area-inset-bottom, 0px)); background: var(--ink); color: var(--bg); padding: 9px 16px; border-radius: 8px; font-weight: 600; z-index: 20; max-width: calc(100% - 32px); }
@media (prefers-reduced-motion: no-preference) { .slot { transition: background-color .12s, color .12s; } }

/* sign-in screen and the signed-in bar */
#gate { min-height: 100vh; display: grid; place-items: start center; padding: 6vh max(16px, env(safe-area-inset-right, 0px)) 40px max(16px, env(safe-area-inset-left, 0px)); }
.gate-card { width: 100%; max-width: 460px; display: grid; gap: 16px; }
.gate-brand { display: grid; gap: 2px; }
.gate-form { background: var(--panel); border: 1px solid var(--rule); border-radius: var(--radius); padding: 16px; display: grid; gap: 10px; }
.gate-form h2 { display: inline; }
.gate-form summary { cursor: pointer; }
details.gate-form[open] summary { margin-bottom: 10px; }
details.gate-form form { display: grid; gap: 10px; }
.gate-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gate-err { color: var(--hit); margin: 0; font-weight: 600; }
.gate-err:empty { display: none; }
.gate-msg { margin: 0; padding: 10px 12px; border-radius: 8px; background: var(--call-soft); font-weight: 600; }
.gate-closed { border-color: var(--call); }
.gate-foot { color: var(--mist); font-size: .78rem; text-align: center; margin: 0; }
.help { color: var(--mist); font-size: .85rem; margin: 0; }
.who { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.role { font: 700 .72rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; border-radius: 999px; padding: 5px 9px; background: var(--accent-soft); color: var(--accent); }
.role.manager { background: var(--good-soft); color: var(--good); }
.offline { background: var(--hit-soft); color: var(--hit); }
.pw-row { display: grid; grid-template-columns: 5rem minmax(0, 1fr) auto auto; gap: 8px; align-items: center; }
.pw-row.off { grid-template-columns: 11rem minmax(0, 1fr) auto auto; }
@media (max-width: 560px) { .pw-row, .pw-row.off { grid-template-columns: 1fr 1fr; } }
input[type=password] { background: var(--panel); border: 1px solid var(--rule); border-radius: 8px; padding: 7px 10px; min-width: 0; width: 100%; }

/* how priority works */
details.how summary { cursor: pointer; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; list-style-position: outside; }
details.how summary h2 { display: inline; }
.rules { margin: 0; padding-inline-start: 1.4rem; display: grid; gap: 6px; font-size: .92rem; }
.rules b { font-weight: 700; }
details.prio { border-top: 1px solid var(--rule); padding-top: 10px; }
details.prio summary { cursor: pointer; font: 700 .95rem/1.2 var(--display); text-transform: uppercase; letter-spacing: .04em; }
details.prio[open] summary { margin-bottom: 6px; }
.bad-t { color: var(--hit); }
.good-t { color: var(--good); }
.deadline { border: 1px dashed var(--rule); border-radius: 8px; padding: 10px 12px; display: grid; gap: 6px; }
input[type=datetime-local], input[type=search] { background: var(--panel); border: 1px solid var(--rule); border-radius: 8px; padding: 7px 10px; min-width: 0; width: 100%; }
.tabs .count { display: inline-block; min-width: 1.4em; padding: 0 .35em; border-radius: 999px; background: var(--call); color: var(--bg); font: 700 .72rem/1.4 var(--mono); vertical-align: 2px; }

/* activity log */
ol.log { list-style: none; margin: 0; padding: 0; display: grid; }
.log-row { display: grid; grid-template-columns: 3.5rem 11rem 7rem minmax(0, 1fr) auto; gap: 4px 12px; align-items: baseline; padding: 8px 0; border-top: 1px solid var(--rule); }
.log-row:first-child { border-top: 0; }
.log-row p { font-size: .9rem; overflow-wrap: anywhere; }
.log-row time { white-space: nowrap; }
.log-row.undone p { text-decoration: line-through; text-decoration-color: var(--mist); color: var(--mist); }
.log-n { color: var(--mist); font-size: .8rem; }
.log-acts { display: flex; gap: 6px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.who-chip { justify-self: start; font: 700 .7rem/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; border-radius: 999px; padding: 4px 8px; background: var(--panel-2); color: var(--mist); }
.who-chip.manager { background: var(--good-soft); color: var(--good); }
.who-chip.reps { background: var(--accent-soft); color: var(--accent); }
.who-chip.officers { background: var(--hit-soft); color: var(--hit); }
.who-chip.system { background: var(--call-soft); color: var(--call); }
@media (max-width: 720px) { .log-row { grid-template-columns: auto auto 1fr; } .log-row p, .log-acts { grid-column: 1 / -1; justify-content: flex-start; } }

.closes { margin: 0; padding-inline-start: 1.2rem; display: grid; gap: 3px; }
input[type=time] { background: var(--panel); border: 1px solid var(--rule); border-radius: 8px; padding: 7px 10px; min-width: 0; width: 100%; }
.panel.locked .pos-toggle, .panel.locked .res, .panel.locked .slots { opacity: .7; }

/* ================= skins: four dark looks (html[data-skin]) ================= */
html[data-skin]:root { color-scheme: dark; }
html[data-skin] .btn.primary { font-weight: 700; }

/* 1. Rally Night: the Rally Coordinator's look. Near-black, slate panels, sky blue, amber. */
html[data-skin="rally"]:root {
  --bg: #070b14; --panel: #0f172a; --panel-2: #131d33; --rule: #1e293b; --ink: #f1f5f9; --mist: #94a3b8;
  --accent: #38bdf8; --accent-ink: #04121f; --accent-soft: rgb(56 189 248 / .14); --call: #fbbf24; --call-soft: rgb(251 191 36 / .12);
  --good: #4ade80; --good-soft: rgb(34 197 94 / .14); --hit: #f87171; --hit-soft: rgb(239 68 68 / .15); --heat: 56 189 248;
  --band: #0b1220; --band-ink: #f1f5f9; --band-mist: #94a3b8; --band-line: #38bdf8;
  --display: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; --body: var(--display);
  --mono: ui-monospace, "SF Mono", "Roboto Mono", Menlo, Consolas, monospace; --radius: 14px;
}
html[data-skin="rally"] h1, html[data-skin="rally"] h2, html[data-skin="rally"] h3 { text-transform: none; letter-spacing: -.01em; font-weight: 700; }
html[data-skin="rally"] .tabs button { text-transform: none; letter-spacing: 0; font-weight: 600; }
html[data-skin="rally"] .band { border-bottom: 1px solid #1e293b; }
html[data-skin="rally"] .panel { box-shadow: 0 1px 0 rgb(255 255 255 / .03) inset; }
html[data-skin="rally"] .slot[aria-pressed=true] { box-shadow: 0 0 0 1px #7dd3fc inset; }

/* 2. Whiteout: frosted glass over a polar night, ice-cyan light, faint snowfall. */
html[data-skin="whiteout"]:root {
  --bg: #061220; --panel: rgb(16 36 60 / .58); --panel-2: rgb(30 58 92 / .5); --rule: rgb(170 220 255 / .16); --ink: #ecf8ff; --mist: #a3bdd4;
  --accent: #a5ecff; --accent-ink: #032130; --accent-soft: rgb(165 236 255 / .14); --call: #ffd98a; --call-soft: rgb(255 217 138 / .12);
  --good: #7ef0c0; --good-soft: rgb(126 240 192 / .13); --hit: #ff9a90; --hit-soft: rgb(255 120 110 / .14); --heat: 165 236 255;
  --band: rgb(8 26 46 / .72); --band-ink: #f2fbff; --band-mist: #a9c6dd; --band-line: #a5ecff; --radius: 16px;
}
html[data-skin="whiteout"] body {
  background:
    radial-gradient(1100px 520px at 85% -8%, rgb(120 205 255 / .2), transparent 62%),
    radial-gradient(900px 560px at -12% 18%, rgb(70 130 220 / .16), transparent 60%),
    linear-gradient(180deg, #08192d 0%, #050d18 100%) fixed;
}
html[data-skin="whiteout"] body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .5;
  background-image:
    radial-gradient(1.5px 1.5px at 20px 30px, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 120px 80px, #dff4ff 50%, transparent 51%),
    radial-gradient(2px 2px at 200px 160px, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 60px 200px, #cfeaff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 260px 40px, #fff 50%, transparent 51%);
  background-size: 300px 240px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 70%);
}
html[data-skin="whiteout"] #app, html[data-skin="whiteout"] #gate { position: relative; z-index: 1; }
html[data-skin="whiteout"] .panel, html[data-skin="whiteout"] .gate-form { backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); box-shadow: inset 0 1px 0 rgb(255 255 255 / .08), 0 12px 32px rgb(0 0 0 / .28); }
html[data-skin="whiteout"] .band { backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid rgb(165 236 255 / .3); box-shadow: 0 1px 24px rgb(120 205 255 / .12); }
html[data-skin="whiteout"] h1 { text-shadow: 0 0 22px rgb(165 236 255 / .45); }
html[data-skin="whiteout"] .slot[aria-pressed=true] { box-shadow: 0 0 14px rgb(165 236 255 / .55); }
html[data-skin="whiteout"] input, html[data-skin="whiteout"] select { background: rgb(4 18 32 / .6) !important; }

/* 3. Furnace: the city's furnace against the cold. Charcoal, ember orange, ice-blue details. */
html[data-skin="furnace"]:root {
  --bg: #0c0e13; --panel: #14171f; --panel-2: #1a1e29; --rule: #292f3d; --ink: #f4efe8; --mist: #a7a9b3;
  --accent: #ff8a3d; --accent-ink: #1e0a00; --accent-soft: rgb(255 138 61 / .14); --call: #ffd166; --call-soft: rgb(255 209 102 / .12);
  --good: #6ee7a8; --good-soft: rgb(110 231 168 / .12); --hit: #ff6b6b; --hit-soft: rgb(255 107 107 / .14); --heat: 255 138 61;
  --band: #120f0e; --band-ink: #fbf3ea; --band-mist: #b7aea6; --band-line: #ff8a3d; --radius: 10px;
}
html[data-skin="furnace"] body { background: radial-gradient(900px 420px at 50% -12%, rgb(255 120 40 / .13), transparent 65%), #0c0e13; }
html[data-skin="furnace"] .band { background: linear-gradient(100deg, #1d1210 0%, #14100f 45%, #0f131b 100%); border-bottom: 2px solid #ff8a3d; box-shadow: 0 2px 28px rgb(255 120 40 / .22); }
html[data-skin="furnace"] .band .eyebrow, html[data-skin="furnace"] .linkish { color: #9ad8ff; }
html[data-skin="furnace"] .day-no { color: #ff8a3d; text-shadow: 0 0 18px rgb(255 120 40 / .5); }
html[data-skin="furnace"] .slot[aria-pressed=true] { box-shadow: 0 0 14px rgb(255 138 61 / .5); }
html[data-skin="furnace"] .tabs button[aria-selected=true] { border-bottom-color: #ff8a3d; }
html[data-skin="furnace"] .panel { border-top: 1px solid #343b4d; }

/* 4. Aurora: polar night with the northern lights. Teal to violet, soft glow. */
html[data-skin="aurora"]:root {
  --bg: #070912; --panel: #0d1121; --panel-2: #131a2e; --rule: #232a46; --ink: #eef1ff; --mist: #9ba4c9;
  --accent: #5eead4; --accent-ink: #022620; --accent-soft: rgb(94 234 212 / .13); --call: #fcd34d; --call-soft: rgb(252 211 77 / .11);
  --good: #86efac; --good-soft: rgb(134 239 172 / .12); --hit: #fda4af; --hit-soft: rgb(253 164 175 / .13); --heat: 94 234 212;
  --band: #0b1424; --band-ink: #f2f4ff; --band-mist: #b4bde0; --band-line: #a78bfa; --radius: 14px;
}
html[data-skin="aurora"] body { background: radial-gradient(1000px 500px at 70% -10%, rgb(167 139 250 / .12), transparent 60%), radial-gradient(800px 420px at 10% -5%, rgb(94 234 212 / .1), transparent 60%), #070912; }
html[data-skin="aurora"] .band { background: linear-gradient(115deg, #08202a 0%, #0b2c33 28%, #17204a 64%, #2a1442 100%); border-bottom: 1px solid rgb(167 139 250 / .5); position: relative; overflow: hidden; }
html[data-skin="aurora"] .band::after { content: ""; position: absolute; inset: -40% -10% auto; height: 160%; pointer-events: none; background: radial-gradient(60% 40% at 30% 60%, rgb(94 234 212 / .22), transparent 70%), radial-gradient(50% 35% at 75% 40%, rgb(167 139 250 / .25), transparent 70%); filter: blur(8px); }
html[data-skin="aurora"] .band .wrap { position: relative; z-index: 1; }
html[data-skin="aurora"] h1 { background: linear-gradient(90deg, #5eead4, #a5b4fc 55%, #c4b5fd); -webkit-background-clip: text; background-clip: text; color: transparent; }
html[data-skin="aurora"] .tabs button[aria-selected=true] { border-image: linear-gradient(90deg, #5eead4, #a78bfa) 1; }
html[data-skin="aurora"] .slot[aria-pressed=true] { background: linear-gradient(135deg, #5eead4, #a78bfa); border-color: transparent; color: #0b0d1a; box-shadow: 0 0 14px rgb(140 180 250 / .45); }
html[data-skin="aurora"] .btn.primary { background: linear-gradient(135deg, #5eead4, #8b9cf8); border-color: transparent; }

.gate-skin { display: flex; justify-content: center; }

/* Glows and gradients stay put behind the page (no repeat seam on short pages). */
html[data-skin] body { background-attachment: fixed; min-height: 100vh; }

/* Longer languages on phones: buttons and the log filter wrap instead of widening the page. */
.btn { max-width: 100%; }
.seg { flex-wrap: wrap; max-width: 100%; }
.panel > * { min-width: 0; }
@media (max-width: 560px) { .btn { white-space: normal; } }

/* ================= calculators ================= */
.band .sub { color: var(--band-mist); max-width: 46rem; }
.band .eyebrow a { color: inherit; text-decoration: none; }
.stack { display: grid; gap: 16px; }
.foot { border-top: 1px solid var(--rule); padding-top: 12px; display: grid; gap: 4px; }
.foot a { color: var(--accent); }
.lede { max-width: 52rem; }
/* the five prep days, side by side; a row of cards that wraps on phones */
.days { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 760px) { .days { grid-template-columns: repeat(2, minmax(0, 1fr)); } .days .day.all { grid-column: 1 / -1; } }
.day { border: 1px solid var(--rule); background: var(--panel-2); border-radius: var(--radius); padding: 10px 12px; display: grid; gap: 4px; align-content: start; min-width: 0; }
.day h3 { font-size: .95rem; }
.day .theme { font-size: .78rem; color: var(--mist); }
.day .pts { font: 700 1.35rem/1.1 var(--mono); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.day .bonus { font-size: .78rem; color: var(--good); }
.day ul { margin: 4px 0 0; padding: 0; list-style: none; font-size: .78rem; color: var(--mist); display: grid; gap: 2px; }
.day ul li { display: flex; gap: 6px; justify-content: space-between; }
.day ul li span:last-child { font-family: var(--mono); white-space: nowrap; }
.day.all { background: var(--accent-soft); border-color: transparent; }
/* one item: name, what you have, then an amount box for each day it scores on */
.items { display: grid; gap: 0; }
.item { display: grid; grid-template-columns: minmax(12rem, 1.4fr) 7.5rem repeat(5, minmax(4.6rem, 1fr)); gap: 8px; align-items: center; padding: 8px 0; border-top: 1px solid var(--rule); }
.item.head { border-top: 0; padding-top: 0; font-size: .75rem; color: var(--mist); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.item .name b { font-weight: 600; }
.item .name .hint { display: block; font-size: .76rem; color: var(--mist); }
.item .left { font-size: .76rem; color: var(--mist); }
.item .left.over { color: var(--hit); }
.item .cell { position: relative; }
.item .cell input { text-align: end; font-family: var(--mono); padding: 6px 8px; }
.item .cell .dl { display: none; }
.item .cell.off { visibility: hidden; }
.item .best { font-size: .76rem; padding: 2px 8px; margin-top: 4px; }
@media (max-width: 760px) {
  .item.head { display: none; }
  .item { grid-template-columns: repeat(auto-fill, minmax(5.4rem, 1fr)); }
  .item .name { grid-column: 1 / -1; }
  .item .cell.off { display: none; }
  .item .cell .dl { display: block; font-size: .7rem; color: var(--mist); margin-bottom: 2px; }
}
.troop { display: grid; grid-template-columns: 9rem 6rem 6rem 8rem auto 1fr; gap: 8px; align-items: end; }
@media (max-width: 760px) { .troop { grid-template-columns: 1fr 1fr; } }
.troop .pts { font-family: var(--mono); font-size: .9rem; }
.vals { display: grid; grid-template-columns: repeat(5, minmax(0, 6rem)); gap: 8px; }
@media (max-width: 560px) { .vals { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.send { display: grid; grid-template-columns: 7rem 7rem auto; gap: 10px; align-items: end; justify-content: start; }
@media (max-width: 560px) { .send { grid-template-columns: 1fr 1fr; } .send .btn { grid-column: 1 / -1; } }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 2px 12px; font-size: .85rem; }

/* Gear & charms */
.sub-h { font-size: .85rem; color: var(--mist); text-transform: uppercase; letter-spacing: .04em; margin-top: 4px; }
.mats { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 9.5rem), 1fr)); gap: 8px; }
.mat { border: 1px solid var(--rule); background: var(--panel-2); border-radius: var(--radius); padding: 10px 12px; display: grid; gap: 4px; align-content: start; min-width: 0; }
.mat b { font-size: .85rem; font-weight: 600; }
.mat .need { margin-top: -4px; font: 700 1.3rem/1.1 var(--mono); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.mat input { text-align: end; font-family: var(--mono); padding: 6px 8px; }
.uprows { display: grid; }
.uprow { display: grid; grid-template-columns: 7rem minmax(10rem, 14rem) minmax(10rem, 14rem) minmax(0, 1fr); gap: 8px 12px; align-items: end; padding: 8px 0; border-top: 1px solid var(--rule); }
.uprows .uprow:first-child { border-top: 0; }
.uprow > b { align-self: center; font-weight: 600; }
.uprow .cost { align-self: center; }
.uprow.all { grid-template-columns: 7rem minmax(10rem, 14rem) minmax(10rem, 14rem) auto; justify-content: start; background: var(--panel-2); border: 1px dashed var(--rule); border-radius: var(--radius); padding: 8px 12px; }
.charms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; max-width: 52rem; }
@media (max-width: 640px) { .charms { grid-template-columns: 1fr; } }
.charmpiece { border: 1px solid var(--rule); border-radius: var(--radius); padding: 10px 12px; display: grid; gap: 6px; align-content: start; }
.charmpiece b { font-weight: 600; }
.charm { display: grid; grid-template-columns: 3.2rem minmax(0, 11rem) auto minmax(0, 11rem); gap: 6px; align-items: center; }
.charm select { padding: 5px 6px; }
.charm .arrow { color: var(--mist); }
.tbl { overflow-x: auto; margin-top: 8px; }
.tbl table { border-collapse: collapse; font-size: .82rem; width: 100%; }
.tbl th, .tbl td { padding: 4px 8px; border-top: 1px solid var(--rule); text-align: end; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tbl th { color: var(--mist); font-weight: 600; font-size: .75rem; border-top: 0; }
.tbl th:first-child, .tbl td:first-child { text-align: start; }
details summary { cursor: pointer; padding: 4px 0; }
@media (max-width: 640px) {
  .uprow, .uprow.all { grid-template-columns: 1fr 1fr; }
  .uprow > b, .uprow .cost { grid-column: 1 / -1; }
  .uprow.all .btn { grid-column: 1 / -1; justify-self: start; }
}
