/* ============================================================
   AURORA HUNTING PRO — style
   Dark-first (night use). Red mode preserves night vision.
   ============================================================ */

:root {
  --bg: #060913;
  --bg2: #0a1122;
  --panel: rgba(15, 23, 44, .82);
  --panel-solid: #0e1628;
  --line: #1d2c49;
  --text: #e9f1fc;
  --dim: #8fa3c2;
  --faint: #5a6c8c;
  --acc: #3dffb5;
  --acc-soft: rgba(61, 255, 181, .14);
  --acc2: #8a6bff;
  --warn: #ffc857;
  --bad: #ff5878;
  --go: #2bea9c;
  --maybe: #ffc857;
  --low: #ff5878;
  --radius: 16px;
  --nav-h: 62px;
  --header-h: 58px;
  --shadow: 0 8px 30px rgba(0, 0, 0, .45);
  --font: -apple-system, "Segoe UI", system-ui, Roboto, "Helvetica Neue", sans-serif;
}

/* Red mode — astronomer's night-vision palette */
html[data-red] {
  --bg: #0c0304;
  --bg2: #150506;
  --panel: rgba(34, 8, 10, .85);
  --panel-solid: #1d0709;
  --line: #47121a;
  --text: #ffb4a8;
  --dim: #c26f66;
  --faint: #8c463f;
  --acc: #ff6a5a;
  --acc-soft: rgba(255, 106, 90, .14);
  --acc2: #ff8f7a;
  --warn: #ff9a6a;
  --bad: #ff4d4d;
  --go: #ff7a5a;
  --maybe: #e0705a;
  --low: #a84438;
}
html[data-red] img, html[data-red] iframe { filter: grayscale(1) sepia(1) saturate(3) hue-rotate(-25deg) brightness(.75); }

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(138, 107, 255, .12), transparent 60%),
    radial-gradient(1000px 600px at 10% -20%, rgba(61, 255, 181, .10), transparent 55%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 14px);
  overscroll-behavior-y: contain;
}
html[data-red] body { background: var(--bg); }

button { font-family: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 15px; color: var(--text); background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; outline: none; width: 100%; }
input:focus, textarea:focus { border-color: var(--acc); }
a { color: var(--acc); text-decoration: none; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 8px; }

/* ---------- header ---------- */
header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  display: flex; align-items: center; gap: 10px;
  padding: 0 12px;
  background: linear-gradient(180deg, rgba(6, 9, 19, .96), rgba(6, 9, 19, .82));
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
html[data-red] header { background: linear-gradient(180deg, rgba(12,3,4,.96), rgba(12,3,4,.85)); }
.logo { width: 34px; height: 34px; border-radius: 9px; flex: 0 0 auto; }
.brand { line-height: 1.05; margin-right: auto; min-width: 0; }
.brand b { font-size: 15.5px; letter-spacing: .04em; display: block; white-space: nowrap; }
.brand span { font-size: 10.5px; color: var(--dim); letter-spacing: .14em; text-transform: uppercase; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); background: var(--panel);
  padding: 7px 11px; border-radius: 999px;
  font-size: 12.5px; color: var(--text); white-space: nowrap;
  max-width: 40vw; overflow: hidden; text-overflow: ellipsis;
}
.chip:active { transform: scale(.97); }
.iconbtn {
  width: 38px; height: 38px; border-radius: 11px; flex: 0 0 auto;
  display: grid; place-items: center; font-size: 17px;
  border: 1px solid var(--line); background: var(--panel);
}
.iconbtn.on { border-color: var(--acc); color: var(--acc); background: var(--acc-soft); }
.iconbtn:active { transform: scale(.94); }
@keyframes spin { to { transform: rotate(360deg); } }
.spinning { animation: spin 1s linear infinite; display: inline-block; }

/* ---------- layout ---------- */
main { max-width: 860px; margin: 0 auto; padding: 14px 12px 30px; }
.page { display: none; animation: fadein .25s ease; }
.page.active { display: block; }
@keyframes fadein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.section-title {
  font-size: 12px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--dim); margin: 22px 2px 10px; display: flex; align-items: center; gap: 8px;
}
.section-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow);
}
.grid { display: grid; gap: 10px; }
.grid.metrics { grid-template-columns: repeat(auto-fit, minmax(158px, 1fr)); }

/* ---------- verdict ---------- */
.verdict { display: flex; gap: 16px; align-items: center; padding: 16px; }
.ring-wrap { position: relative; width: 108px; height: 108px; flex: 0 0 auto; }
.ring-wrap svg { transform: rotate(-90deg); }
.ring-score { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.ring-score b { font-size: 30px; line-height: 1; }
.ring-score span { font-size: 9.5px; color: var(--dim); letter-spacing: .1em; }
.verdict-info { min-width: 0; flex: 1; }
.verdict-label { font-size: 21px; font-weight: 800; letter-spacing: .03em; margin-bottom: 3px; }
.verdict-label.go { color: var(--go); } .verdict-label.maybe { color: var(--maybe); } .verdict-label.low { color: var(--low); }
.verdict-why { color: var(--dim); font-size: 13px; line-height: 1.45; }
.verdict-best { margin-top: 9px; font-size: 13px; }
.verdict-best button { color: var(--acc); font-weight: 700; font-size: 13px; padding: 0; }

/* ---------- metric cards ---------- */
.metric h3 { font-size: 11px; color: var(--dim); letter-spacing: .12em; text-transform: uppercase; display: flex; justify-content: space-between; align-items: center; }
.metric h3 .tag { font-size: 9.5px; border: 1px solid var(--line); padding: 1.5px 7px; border-radius: 99px; letter-spacing: .05em; }
.metric .val { font-size: 27px; font-weight: 800; margin: 6px 0 1px; display: flex; align-items: baseline; gap: 6px; }
.metric .val small { font-size: 12px; color: var(--dim); font-weight: 600; }
.metric .sub { font-size: 11.5px; color: var(--dim); line-height: 1.4; }
.metric canvas { width: 100%; height: 34px; margin-top: 7px; display: block; }
.kp-official { margin-top: 4px; padding-top: 4px; border-top: 1px dashed var(--line); color: var(--faint) !important; }
.c-good { color: var(--go); } .c-warn { color: var(--warn); } .c-bad { color: var(--bad); } .c-dim { color: var(--dim); }

.kp-forecast-bars { display: flex; gap: 3px; align-items: flex-end; height: 40px; margin-top: 8px; }
.kp-forecast-bars i { flex: 1; border-radius: 3px 3px 0 0; min-height: 3px; opacity: .9; }
.kp-forecast-lbls { display: flex; gap: 3px; margin-top: 3px; }
.kp-forecast-lbls span { flex: 1; text-align: center; font-size: 8.5px; color: var(--faint); }

.ovalimg { width: 100%; border-radius: 10px; display: block; background: #000; min-height: 120px; }
.imgnote { font-size: 10.5px; color: var(--faint); margin-top: 6px; }

.updatebar { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--faint); margin: 12px 2px 4px; flex-wrap: wrap; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--go); display: inline-block; }
.dot.stale { background: var(--warn); }
.dot.err { background: var(--bad); }

/* ---------- alert banner ---------- */
.alertbar {
  display: none; margin-bottom: 12px; border-radius: var(--radius);
  padding: 13px 15px; font-weight: 700; font-size: 14px;
  background: linear-gradient(90deg, rgba(61,255,181,.2), rgba(138,107,255,.18));
  border: 1px solid var(--acc); color: var(--text);
  animation: pulse 1.6s ease-in-out infinite;
}
.alertbar.show { display: flex; align-items: center; gap: 10px; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(61,255,181,.28);} 50% { box-shadow: 0 0 22px 2px rgba(61,255,181,.32);} }

/* ---------- SKY tab ---------- */
.controls { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.fchip {
  border: 1px solid var(--line); background: var(--panel);
  padding: 7px 13px; border-radius: 999px; font-size: 12.5px; color: var(--dim);
}
.fchip.on { border-color: var(--acc); color: var(--acc); background: var(--acc-soft); font-weight: 700; }

.spot { padding: 13px 14px; margin-bottom: 10px; }
.spot-top { display: flex; align-items: center; gap: 9px; }
.rank { font-size: 12px; font-weight: 800; color: var(--faint); width: 22px; text-align: center; flex: 0 0 auto; }
.spot-name { font-weight: 700; font-size: 15.5px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spot-name small { color: var(--faint); font-weight: 600; font-size: 10.5px; margin-left: 5px; letter-spacing: .06em; }
.spot-drive { margin-left: auto; font-size: 12px; color: var(--dim); white-space: nowrap; }
.scorepill { font-size: 13px; font-weight: 800; border-radius: 99px; padding: 4px 11px; flex: 0 0 auto; }
.scorepill.go { background: rgba(43, 234, 156, .16); color: var(--go); }
.scorepill.maybe { background: rgba(255, 200, 87, .14); color: var(--maybe); }
.scorepill.low { background: rgba(255, 88, 120, .12); color: var(--low); }

.cloudstrip { display: flex; gap: 2px; margin-top: 10px; }
.cloudstrip i { flex: 1; height: 22px; border-radius: 4px; position: relative; opacity: .55; }
.cloudstrip i.darkhr { opacity: 1; box-shadow: inset 0 0 0 1px rgba(255,255,255,.09); }
.striplbl { display: flex; gap: 2px; margin-top: 3px; }
.striplbl span { flex: 1; text-align: center; font-size: 8.5px; color: var(--faint); }
.spot-meta { display: flex; gap: 14px; margin-top: 9px; font-size: 11.5px; color: var(--dim); flex-wrap: wrap; }
.spot-meta b { color: var(--text); font-weight: 700; }
.spot-actions { display: flex; gap: 8px; margin-top: 11px; flex-wrap: wrap; }
.abtn {
  border: 1px solid var(--line); background: var(--bg2);
  border-radius: 10px; padding: 8px 12px; font-size: 12.5px; font-weight: 600; color: var(--text);
  display: inline-flex; align-items: center; gap: 6px;
}
.abtn:active { transform: scale(.96); }
.abtn.primary { border-color: var(--acc); color: var(--acc); background: var(--acc-soft); }
.spot-detail { display: none; margin-top: 12px; border-top: 1px dashed var(--line); padding-top: 10px; }
.spot-detail.open { display: block; }
.hr-legend { font-size: 11px; color: var(--dim); line-height: 1.55; margin-bottom: 9px; background: var(--bg2); border-radius: 9px; padding: 8px 10px; }
.hr-legend b { color: var(--text); }
.lg-low { color: var(--bad); font-weight: 800; }
.lg-mid { color: var(--warn); font-weight: 800; }
.lg-high { color: #7aa7e8; font-weight: 800; }
.hrrow2 { display: grid; grid-template-columns: 42px 50px 1fr 1fr 1fr 40px; gap: 6px; align-items: center; padding: 2.5px 0; font-size: 11.5px; color: var(--dim); }
.hrrow2.hrhead { font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.hrrow2 .effpill { text-align: center; font-weight: 800; font-size: 11px; border-radius: 6px; padding: 2.5px 0; color: #06210f; }
.hrrow2 .lay { position: relative; height: 16px; background: var(--bg2); border-radius: 5px; overflow: hidden; }
.hrrow2 .lay i { position: absolute; top: 0; bottom: 0; left: 0; border-radius: 5px; opacity: .5; }
.hrrow2 .lay.low i { background: var(--bad); }
.hrrow2 .lay.mid i { background: var(--warn); }
.hrrow2 .lay.high i { background: #7aa7e8; }
.hrrow2 .lay b { position: relative; font-size: 10px; line-height: 16px; padding-left: 5px; color: var(--text); font-weight: 700; }
.bestwin { font-size: 12.5px; margin-top: 8px; color: var(--acc); font-weight: 600; }

/* ---------- numbers (guide) ---------- */
.numgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 7px; }
.numchip {
  border: 1px solid var(--line); background: var(--panel); border-radius: 12px;
  padding: 9px 8px; text-align: center; display: flex; flex-direction: column; gap: 2px; align-items: center;
}
.numchip:active { transform: scale(.94); }
.numchip.speaking { border-color: var(--acc); background: var(--acc-soft); }
.numchip .nn { font-size: 17px; font-weight: 800; color: var(--acc); }
.numchip .nw { font-size: 12.5px; line-height: 1.25; }
.numchip .nr { font-size: 10.5px; color: var(--dim); font-style: italic; }
.speakrow { display: flex; gap: 8px; margin: 4px 0 14px; flex-wrap: wrap; }

/* ---------- learn mode: beginner explainer bubbles ---------- */
.hint {
  display: none; margin: 9px 0 10px; font-size: 12px; line-height: 1.55; color: var(--text);
  background: var(--acc-soft); border: 1px dashed var(--acc); border-radius: 11px;
  padding: 8px 11px 8px 32px; position: relative;
}
html[data-learn] .hint { display: block; }
.hint:empty { display: none !important; }
.hint::before { content: "🎓"; position: absolute; left: 10px; top: 7px; font-size: 14px; }
.metric .hint, .verdict-info .hint, .tonight-card .hint { margin-bottom: 0; }
.learntopic {
  width: 100%; text-align: left; display: flex; gap: 12px; align-items: center;
  background: var(--bg2); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 13px; margin-bottom: 7px;
}
.learntopic:active { transform: scale(.985); }
.learntopic .em { font-size: 21px; }
.learntopic b { font-size: 14px; flex: 1; }
.learntopic .arrow { color: var(--faint); }
.learnbody { font-size: 15px; line-height: 1.6; white-space: pre-line; margin: 10px 0 4px; }

/* ---------- tonight-at-base card ---------- */
.tonight-card { padding: 13px 15px; }
.tn-head { font-size: 11px; letter-spacing: .14em; color: var(--dim); text-transform: uppercase; margin-bottom: 8px; }
.tn-main { display: flex; gap: 18px; flex-wrap: wrap; align-items: baseline; }
.tn-main .tn-item b { font-size: 21px; }
.tn-main .tn-item span { display: block; font-size: 10px; color: var(--faint); letter-spacing: .08em; text-transform: uppercase; margin-top: 1px; }
.tn-rows { margin-top: 10px; border-top: 1px dashed var(--line); padding-top: 8px; display: grid; gap: 5px; }
.tn-row { font-size: 12.5px; color: var(--dim); display: flex; gap: 8px; align-items: baseline; }
.tn-row b { color: var(--text); }
.tn-row .lbl { flex: 0 0 auto; font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); min-width: 128px; }

/* ---------- road cams ---------- */
.cam .cam-img-wrap { position: relative; }
.cam .cam-km { position: absolute; right: 7px; bottom: 7px; background: rgba(4,7,15,.72); border-radius: 7px; padding: 2px 8px; font-size: 10px; color: var(--text); }
.cam .cam-cycle {
  position: absolute; right: 7px; top: 7px;
  background: rgba(4,7,15,.78); border: 1px solid var(--line); border-radius: 8px;
  padding: 3px 9px; font-size: 11px; color: var(--text); font-weight: 700;
}
.cam .cam-cycle:active { transform: scale(.92); }

/* ---------- parking flags ---------- */
.pflags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 3px; }
.pflags span { font-size: 9.5px; border: 1px solid var(--line); border-radius: 99px; padding: 1px 7px; color: var(--dim); }
.pflags .warn { border-color: var(--warn); color: var(--warn); }
.pflags .bad { border-color: var(--bad); color: var(--bad); }

/* ---------- parking finder ---------- */
.parkrow { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 1px solid var(--line); }
.parkrow:last-child { border-bottom: none; }
.parkrow .pic { font-size: 19px; flex: 0 0 26px; text-align: center; }
.parkrow .pt { flex: 1; min-width: 0; }
.parkrow .pt b { font-size: 13.5px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.parkrow .pt span { font-size: 10.5px; color: var(--dim); }
.parkrow .pd { font-size: 11.5px; color: var(--dim); white-space: nowrap; text-align: right; }
.parkrow .pd b { color: var(--text); }
.parkrow .abtn { padding: 6px 9px; font-size: 11.5px; }
.parkrow.mypin { background: rgba(255, 200, 87, .06); border-radius: 8px; }
.parkcats { font-size: 11px; color: var(--dim); line-height: 1.6; margin: 8px 0 2px; }

/* ---------- cams ---------- */
.camgrid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.cam { overflow: hidden; padding: 0; }
.cam img { width: 100%; height: 140px; object-fit: cover; display: block; background: #000; }
.cam img.keo { object-fit: contain; background: #05070d; }
.cam .cam-body { padding: 11px 13px; }
.cam .cam-name { font-weight: 700; font-size: 14px; }
.cam .cam-sub { font-size: 11.5px; color: var(--dim); margin-top: 2px; }
.linkgrid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.linkcard { display: flex; gap: 10px; align-items: center; padding: 11px 13px; }
.linkcard .ic { font-size: 21px; flex: 0 0 auto; }
.linkcard .t { min-width: 0; }
.linkcard .t b { font-size: 13.5px; display: block; }
.linkcard .t span { font-size: 11px; color: var(--dim); }

/* ---------- guide / FAQ ---------- */
.langgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.langbtn {
  border: 1px solid var(--line); background: var(--panel); border-radius: 13px;
  padding: 10px 6px 8px; display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.langbtn svg { width: 44px; height: 30px; border-radius: 5px; box-shadow: 0 0 0 1px rgba(255,255,255,.12); }
.langbtn b { font-size: 12px; }
.langbtn span { font-size: 9.5px; color: var(--dim); line-height: 1.2; text-align: center; }
.langbtn.on { border-color: var(--acc); background: var(--acc-soft); }
.langbtn:active { transform: scale(.95); }

.tonight-banner {
  margin-top: 12px; border-radius: var(--radius); padding: 14px 16px;
  font-size: 15.5px; font-weight: 700; line-height: 1.45; border: 1px solid var(--line);
}
.tonight-banner.good { background: rgba(43,234,156,.13); border-color: rgba(43,234,156,.45); }
.tonight-banner.fair { background: rgba(255,200,87,.11); border-color: rgba(255,200,87,.4); }
.tonight-banner.poor { background: rgba(255,88,120,.10); border-color: rgba(255,88,120,.4); }
.tonight-banner small { display: block; font-weight: 500; font-size: 11.5px; color: var(--dim); margin-top: 4px; }

.faqlist { margin-top: 6px; }
.faqitem {
  width: 100%; text-align: left; display: flex; gap: 12px; align-items: center;
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: 13px 14px; margin-bottom: 8px;
}
.faqitem:active { transform: scale(.985); }
.faqitem .em { font-size: 22px; flex: 0 0 auto; }
.faqitem .qt { min-width: 0; flex: 1; }
.faqitem .qt b { font-size: 14.5px; display: block; line-height: 1.35; }
.faqitem .qt span { font-size: 11.5px; color: var(--dim); display: block; margin-top: 2px; }
.faqitem .arrow { color: var(--faint); font-size: 18px; }

.phrasegrid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.phrase {
  border: 1px solid var(--line); background: var(--panel); border-radius: 12px;
  padding: 11px 12px; text-align: left;
}
.phrase b { display: block; font-size: 13.5px; line-height: 1.35; }
.phrase span { display: block; font-size: 10.5px; color: var(--dim); margin-top: 3px; }
.phrasegrid.ann { grid-template-columns: 1fr; }
.phrasegrid.ann .phrase b { font-size: 13px; font-weight: 600; }
.showmode.sm { font-size: 19px; line-height: 1.55; }

/* ---------- modal ---------- */
.modal {
  position: fixed; inset: 0; z-index: 100; display: none;
  background: rgba(3, 5, 12, .78); backdrop-filter: blur(8px);
  align-items: flex-end; justify-content: center;
}
.modal.open { display: flex; }
.sheet {
  background: var(--panel-solid); border: 1px solid var(--line);
  border-radius: 22px 22px 0 0; width: 100%; max-width: 860px;
  max-height: 92vh; overflow-y: auto; padding: 18px 18px 26px;
  animation: sheetup .25s ease;
}
@keyframes sheetup { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }
@media (min-width: 700px) {
  .modal { align-items: center; padding: 24px; }
  .sheet { border-radius: 22px; }
}
.sheet-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.sheet-head .em { font-size: 26px; }
.sheet-head .x { margin-left: auto; }
.bigq { font-size: 21px; font-weight: 800; line-height: 1.3; margin-bottom: 4px; }
.bigq-en { font-size: 12.5px; color: var(--dim); margin-bottom: 14px; }
.biga { font-size: 19px; line-height: 1.55; margin-bottom: 14px; white-space: pre-line; }
.biga-en { font-size: 13px; color: var(--dim); line-height: 1.5; border-top: 1px dashed var(--line); padding-top: 12px; white-space: pre-line; }
.showmode { font-size: 26px; line-height: 1.5; }
.diagram { margin: 8px 0 16px; }
.diagram svg { width: 100%; height: auto; display: block; }
.diag-caps { display: grid; gap: 5px; margin-top: 8px; }
.diag-caps span { font-size: 13px; color: var(--dim); }
.diag-caps b { color: var(--acc); margin-right: 5px; }
.sheet-nav { display: flex; gap: 10px; margin-top: 16px; }
.sheet-nav .abtn { flex: 1; justify-content: center; padding: 12px; }
.editarea { margin-top: 10px; }
.editarea textarea { min-height: 110px; margin-top: 6px; }
.editarea label { font-size: 11px; color: var(--dim); letter-spacing: .1em; text-transform: uppercase; }

/* ---------- settings ---------- */
.setrow { display: flex; align-items: center; gap: 12px; padding: 13px 2px; border-bottom: 1px solid var(--line); }
.setrow:last-child { border-bottom: none; }
.setrow .st { flex: 1; min-width: 0; }
.setrow .st b { font-size: 14px; display: block; }
.setrow .st span { font-size: 11.5px; color: var(--dim); display: block; margin-top: 2px; line-height: 1.4; }
.switch { position: relative; width: 46px; height: 26px; flex: 0 0 auto; }
.switch input { display: none; }
.switch i {
  position: absolute; inset: 0; border-radius: 99px; background: var(--bg2);
  border: 1px solid var(--line); transition: .2s;
}
.switch i::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 19px; height: 19px;
  border-radius: 50%; background: var(--dim); transition: .2s;
}
.switch input:checked + i { background: var(--acc-soft); border-color: var(--acc); }
.switch input:checked + i::after { left: 23px; background: var(--acc); }
.numin { width: 74px !important; text-align: center; }

/* ---------- hunt log & team ---------- */
.loggrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.logbtn {
  border: 1px solid var(--line); background: var(--panel); border-radius: 14px;
  padding: 14px 8px; display: flex; flex-direction: column; align-items: center; gap: 5px;
}
.logbtn span { font-size: 26px; }
.logbtn b { font-size: 11.5px; letter-spacing: .04em; }
.logbtn:active { transform: scale(.94); }
.logbtn.big { border-color: var(--acc); background: var(--acc-soft); }
.logbtn.big b { color: var(--acc); }
.logrow { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.logrow:last-child { border-bottom: none; }
.logrow .lic { font-size: 19px; flex: 0 0 26px; text-align: center; }
.logrow .lt { flex: 1; min-width: 0; }
.logrow .lt b { font-size: 13px; display: block; }
.logrow .lt span { font-size: 11px; color: var(--dim); display: block; }
.logrow .abtn { padding: 5px 9px; font-size: 11px; }

/* ---------- work hours ---------- */
.openshift { font-size: 15px; font-weight: 700; color: var(--acc); margin-bottom: 10px; }
.abtn.big { width: 100%; justify-content: center; padding: 14px; font-size: 15px; }
.hrtable { margin-top: 12px; border-top: 1px dashed var(--line); padding-top: 8px; }
.hrhead, .hrline { display: grid; grid-template-columns: 78px 1fr 58px 34px; gap: 8px; align-items: center; }
.hrhead { font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); padding-bottom: 5px; }
.hrline { padding: 5px 0; border-bottom: 1px solid var(--line); font-size: 12px; color: var(--dim); }
.hrline:last-child { border-bottom: none; }
.hrline b { color: var(--text); font-size: 13px; }
.hrline i { font-style: normal; }
.hrline input[type="time"] {
  width: 78px; padding: 4px 6px; font-size: 12px; display: inline-block; margin-right: 4px;
  background: var(--bg2); border: 1px solid var(--line); border-radius: 7px; color: var(--text);
}
.hrline .abtn { padding: 4px 7px; font-size: 11px; }

/* ---------- team photos ---------- */
.teamphoto { padding: 8px 0; border-bottom: 1px solid var(--line); }
.teamphoto:last-child { border-bottom: none; }
.teamphoto img { width: 100%; max-height: 320px; object-fit: cover; border-radius: 11px; display: block; background: #000; }
.teamphoto .cap { font-size: 11.5px; color: var(--dim); margin-top: 5px; }
.teamphoto .cap b { color: var(--text); }

/* ---------- local tips ---------- */
.tip { padding: 13px 14px; margin-bottom: 9px; }
.tip-top { display: flex; align-items: center; gap: 10px; }
.tip-top .em { font-size: 22px; flex: 0 0 auto; }
.tip-name { flex: 1; min-width: 0; }
.tip-name b { font-size: 15px; display: block; }
.tip-name span { font-size: 11px; color: var(--dim); }
.tip-d { font-size: 14.5px; line-height: 1.5; margin: 9px 0 3px; }
.tip-d-en { font-size: 12px; color: var(--dim); line-height: 1.45; margin-bottom: 3px; }
.tipcat { border-color: var(--acc) !important; color: var(--acc) !important; font-weight: 800; letter-spacing: .07em; }
.tipcat.sight { border-color: var(--acc2) !important; color: var(--acc2) !important; }

/* ---------- voice coverage ---------- */
.covgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 6px; }
.covitem {
  border: 1px solid var(--line); background: var(--bg2); border-radius: 10px;
  padding: 8px 10px; text-align: left; display: flex; flex-direction: column; gap: 2px;
}
.covitem b { font-size: 12px; }
.covitem span { font-size: 10.5px; color: var(--dim); }
.covitem.none { border-color: rgba(255, 88, 120, .55); }
.covitem.none b, .covitem.none span { color: var(--bad); }
.covitem.nomale span { color: var(--warn); }
.covitem.cur { border-color: var(--acc); background: var(--acc-soft); }
.covitem:active { transform: scale(.96); }
.novoice { font-size: 11.5px; color: var(--warn); margin: -4px 0 12px; line-height: 1.5; }

/* ---------- voice list ---------- */
.voicerow { display: flex; align-items: center; gap: 9px; padding: 7px 6px; border-bottom: 1px solid var(--line); }
.voicerow:last-child { border-bottom: none; }
.voicerow.act { background: var(--acc-soft); border-radius: 9px; border-bottom-color: transparent; }
.voicerow .vn { flex: 1; min-width: 0; }
.voicerow .vn b { font-size: 13px; }
.voicerow .vn span { display: block; font-size: 10.5px; color: var(--dim); }
.voicerow .abtn { padding: 6px 10px; }

/* ---------- bottom nav ---------- */
nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 60;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  display: flex;
  background: linear-gradient(0deg, rgba(6, 9, 19, .98), rgba(6, 9, 19, .88));
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}
html[data-red] nav { background: linear-gradient(0deg, rgba(12,3,4,.98), rgba(12,3,4,.9)); }
nav button {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; font-size: 10px; color: var(--faint); letter-spacing: .06em; font-weight: 600;
}
nav button .em { font-size: 20px; filter: grayscale(1) opacity(.6); transition: .15s; }
nav button.on { color: var(--acc); }
nav button.on .em { filter: none; transform: translateY(-1px); }

/* ---------- location modal bits ---------- */
.locbtns { display: grid; gap: 8px; grid-template-columns: 1fr 1fr; margin: 10px 0; }
.locbtns .abtn { justify-content: center; padding: 12px; }
.locresults { margin-top: 8px; }
.locresult {
  width: 100%; text-align: left; padding: 11px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--bg2); margin-bottom: 6px; font-size: 14px;
}
.locresult span { color: var(--dim); font-size: 11.5px; display: block; }
.presetwrap { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

.mut { color: var(--dim); font-size: 12px; line-height: 1.5; }
.footer-note { margin: 26px 4px 8px; font-size: 10.5px; color: var(--faint); text-align: center; line-height: 1.6; }
.hidden { display: none !important; }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--nav-h) + 20px); transform: translateX(-50%);
  background: var(--panel-solid); border: 1px solid var(--acc); color: var(--text);
  border-radius: 12px; padding: 11px 17px; font-size: 13.5px; z-index: 200;
  box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: .25s; white-space: nowrap;
}
.toast.show { opacity: 1; }

@media (max-width: 420px) {
  .verdict { gap: 12px; padding: 13px; }
  .ring-wrap { width: 92px; height: 92px; }
  .ring-score b { font-size: 25px; }
  .verdict-label { font-size: 18px; }
}
