:root {
  --bg: #0e1116; --panel: #161b23; --panel2: #1d2430; --line: #2b3444; --text: #eef2f7; --muted: #9aa7b8;
  --brass: #f0c04a; --brass-ink: #1a1405; --a: #34d0bb; --b: #c993ff;
  --ok: #3ddc84; --warn: #ffb02e; --bad: #ff5a5f; --info: #62a8ff;
  --blue: #3d8bff; --green: #2fbf71; --magenta: #d44fd1; --orange: #ff9a2e; --red: #ff4d4d;
  --radius: 12px; --nav-h: 62px; --tap: 46px;
  --head: "Bahnschrift", "Roboto Condensed", "Arial Narrow", system-ui, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-tap-highlight-color: transparent; }
button, input, select { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--head); letter-spacing: .02em; margin: .2em 0 .4em; line-height: 1.15; }
h2 { font-size: 1.5rem; } h3 { font-size: 1.15rem; } h4 { font-size: 1rem; color: var(--brass); text-transform: uppercase; letter-spacing: .08em; }
p { margin: .4em 0; } small, .small { font-size: .82rem; } .muted { color: var(--muted); }
a { color: var(--brass); } .ref { color: var(--info); text-decoration: underline dotted; text-underline-offset: 3px; cursor: pointer; white-space: nowrap; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.2rem 0; }
mark { background: #5c4a00; color: #fff3c4; border-radius: 3px; padding: 0 2px; }
:focus-visible { outline: 3px solid var(--brass); outline-offset: 2px; }

/* ---------- shell ---------- */
#app { display: grid; grid-template-rows: auto 1fr; grid-template-columns: 1fr; height: 100%; }
.topbar { display: flex; align-items: center; gap: .6rem; padding: .5rem .9rem; background: #0b0e13; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.brand { font-family: var(--head); font-size: 1.25rem; letter-spacing: .06em; margin-right: auto; } .brand b { color: var(--brass); }
.turn-badge { display: flex; align-items: center; gap: .5rem; background: var(--panel2); border: 1px solid var(--line); border-radius: 999px; padding: .3rem .8rem; cursor: pointer; }
.tb-turn { font-family: var(--head); font-weight: 700; } .tb-phase { background: var(--pc); color: #111; font-weight: 800; border-radius: 6px; padding: 0 .45rem; font-family: var(--head); }
.nav { position: fixed; left: 0; right: 0; bottom: 0; height: var(--nav-h); background: #0b0e13; border-top: 1px solid var(--line); display: flex; z-index: 30; padding-bottom: env(safe-area-inset-bottom); }
.nav-btn { flex: 1; background: none; border: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--muted); cursor: pointer; min-height: var(--tap); }
.nav-btn .ni { font-size: 1.25rem; line-height: 1; } .nav-btn .nl { font-size: .72rem; letter-spacing: .04em; }
.nav-btn.on { color: var(--brass); background: linear-gradient(0deg, rgba(240,192,74,.12), transparent); box-shadow: inset 0 3px 0 var(--brass); }
main#view { overflow-y: auto; padding: .9rem .9rem calc(var(--nav-h) + 5.5rem); max-width: 1180px; width: 100%; margin: 0 auto; outline: none; }
#app { overflow: hidden; }
@media (min-width: 900px) {
  #app { grid-template-columns: 92px 1fr; grid-template-rows: auto 1fr; }
  .topbar { grid-column: 1 / -1; }
  .nav { position: static; flex-direction: column; justify-content: flex-start; height: auto; width: 92px; border-top: 0; border-right: 1px solid var(--line); padding-top: .6rem; }
  .nav-btn { flex: 0 0 auto; padding: .9rem 0; } .nav-btn.on { box-shadow: inset 3px 0 0 var(--brass); background: linear-gradient(90deg, rgba(240,192,74,.12), transparent); }
  main#view { padding-bottom: 6rem; }
}

/* ---------- buttons / inputs ---------- */
.btn { background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: .55rem .95rem; min-height: var(--tap); cursor: pointer; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: .4rem; }
.btn:hover { border-color: #46546c; } .btn:active { transform: translateY(1px); } .btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--brass); color: var(--brass-ink); border-color: var(--brass); }
.btn.danger { background: #5b1b1f; border-color: #8b2b31; } .btn.big { min-height: 56px; font-size: 1.05rem; } .btn.small { min-height: 36px; padding: .3rem .7rem; font-size: .9rem; } .grow { flex: 1; }
.icon-btn { background: none; border: 1px solid var(--line); border-radius: 50%; width: 38px; height: 38px; cursor: pointer; }
.link { background: none; border: 0; color: var(--info); text-decoration: underline; cursor: pointer; padding: .2rem; }
input, select { background: #0e131a; border: 1px solid var(--line); border-radius: 8px; padding: .5rem .6rem; min-height: 42px; max-width: 100%; }
input.num { width: 6.2rem; } input.sm { width: 4rem; text-align: center; } input.search { width: 100%; } input.big { min-height: 54px; font-size: 1.1rem; }
input[type=checkbox] { width: 22px; height: 22px; min-height: 0; accent-color: var(--brass); flex: none; }
select { width: 100%; }
.row { display: flex; align-items: center; gap: .6rem; margin: .5rem 0; } .row.wrap { flex-wrap: wrap; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .7rem .9rem; margin: .6rem 0; } .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.fld { display: flex; flex-direction: column; gap: .2rem; } .fld > span { font-size: .85rem; color: var(--muted); } .fld small { color: var(--muted); }
.chk { display: flex; gap: .55rem; align-items: center; min-height: 40px; cursor: pointer; } .chk small { color: var(--muted); }
.chk-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .2rem .9rem; margin: .4rem 0; }
.stepper { display: inline-flex; align-items: center; gap: .3rem; } .stepper button { width: 42px; height: 42px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel2); font-size: 1.3rem; cursor: pointer; } .stepper b { min-width: 1.6rem; text-align: center; font-size: 1.15rem; }
.seg { display: flex; gap: .4rem; flex-wrap: wrap; margin: .4rem 0; } .seg.big .chip { flex: 1; min-height: 52px; font-size: 1rem; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin: .45rem 0; }
.chip { background: var(--panel2); border: 1px solid var(--line); border-radius: 999px; padding: .38rem .85rem; cursor: pointer; min-height: 38px; }
.chip.on { background: var(--brass); color: var(--brass-ink); border-color: var(--brass); font-weight: 700; }
.chip.side-A.on { background: var(--a); border-color: var(--a); } .chip.side-B.on { background: var(--b); border-color: var(--b); }
.swatch { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: -2px; margin-right: .3rem; flex: none; }
ul.plain { list-style: none; padding: 0; }
.side-pill { border-radius: 6px; padding: .05rem .5rem; font-weight: 700; color: #07120f; background: var(--a); } .side-pill.side-B { background: var(--b); color: #170a24; }
.side-A { color: var(--a); } .side-B { color: var(--b); }

/* ---------- tracker ---------- */
.turn-head { display: grid; gap: .6rem; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem 1rem; }
.big-turn { font-family: var(--head); font-size: 1.8rem; font-weight: 700; } .big-turn small { font-size: 1rem; color: var(--muted); }
.player-turn { font-size: 1.05rem; }
.roles { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.role { border: 1px solid var(--line); border-radius: 10px; padding: .5rem .7rem; display: flex; flex-direction: column; background: var(--panel2); }
.role.att { border-left: 5px solid var(--brass); } .role.def { border-left: 5px solid #6c7a90; } .role small:first-child { letter-spacing: .12em; color: var(--muted); } .role b { font-size: 1.1rem; }
.env { display: flex; gap: .4rem; flex-wrap: wrap; } .tag { background: #0e131a; border: 1px solid var(--line); border-radius: 6px; padding: .12rem .5rem; font-size: .8rem; color: var(--muted); }
.phase-bar { display: grid; grid-template-columns: repeat(8, 1fr); gap: .35rem; margin: .8rem 0; }
.phase-chip { border: 1px solid var(--line); background: var(--panel); border-radius: 10px; min-height: 58px; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; position: relative; overflow: hidden; }
.phase-chip .pn { font-family: var(--head); font-size: 1.15rem; font-weight: 700; } .phase-chip .pl { font-size: .7rem; letter-spacing: .04em; }
.phase-chip.done { background: #1d2a22; color: #9fd8b3; } .phase-chip.done::after { content: "✓"; position: absolute; top: 1px; right: 5px; font-size: .75rem; }
.phase-chip.now { background: var(--pc); color: #0e1116; border-color: var(--pc); box-shadow: 0 0 0 3px rgba(255,255,255,.18), 0 6px 18px rgba(0,0,0,.4); transform: translateY(-2px); font-weight: 800; }
.phase-chip.todo { color: var(--muted); } .phase-chip.todo::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--pc); opacity: .55; }
.phase-controls { display: flex; gap: .6rem; margin: .4rem 0 .8rem; position: sticky; top: 52px; z-index: 5; background: linear-gradient(var(--bg) 70%, transparent); padding: .3rem 0 .5rem; }
.phase-card { background: var(--panel); border: 1px solid var(--line); border-top: 6px solid var(--pc); border-radius: var(--radius); padding: .9rem 1rem 1rem; }
.phase-title { display: flex; align-items: baseline; gap: .7rem; } .phase-title h2 { margin: 0; font-size: 1.7rem; } .phase-num { background: var(--pc); color: #0e1116; border-radius: 8px; font-family: var(--head); font-weight: 800; padding: 0 .55rem; font-size: 1.4rem; }
.intro { color: #cdd6e3; } .tool-links { display: flex; gap: .4rem; flex-wrap: wrap; margin: .5rem 0; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin-top: .6rem; } @media (max-width: 800px) { .cols { grid-template-columns: 1fr; } }
.role-col { background: var(--panel2); border-radius: 10px; padding: .6rem .8rem; border-top: 4px solid #6c7a90; } .role-col.att { border-top-color: var(--brass); }
.role-col h3 { margin-top: 0; } .sec h4 { margin: .7rem 0 .2rem; font-size: .78rem; color: var(--muted); }
.step { display: flex; gap: .6rem; align-items: flex-start; padding: .45rem .1rem; border-bottom: 1px dashed #2b3444; cursor: pointer; } .step:last-child { border-bottom: 0; }
.step input { margin-top: .2rem; } .step.done .step-text { opacity: .5; text-decoration: line-through; } .step.must { background: linear-gradient(90deg, rgba(255,90,95,.10), transparent); }
.badge.must { font-style: normal; font-size: .68rem; font-weight: 800; background: var(--bad); color: #1b0505; border-radius: 5px; padding: 0 .35rem; letter-spacing: .08em; }
.reminders { margin-top: .8rem; padding: .6rem .8rem; border: 1px solid #5b4a1a; background: rgba(240,192,74,.07); border-radius: 10px; } .reminders ul { margin: .2rem 0; padding-left: 1.1rem; }
.markers { margin-top: 1rem; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem 1rem; }
.legend { display: flex; flex-wrap: wrap; gap: .3rem .9rem; font-size: .8rem; color: var(--muted); }
.marker-grid { display: grid; gap: .3rem; margin-top: .6rem; }
.mg-head, .mrow { display: grid; grid-template-columns: minmax(0, 1fr) 138px 138px; gap: .5rem; align-items: center; } .mg-head { font-family: var(--head); font-weight: 700; text-align: center; } @media (max-width: 560px) { .mg-head, .mrow { grid-template-columns: minmax(0, 1fr) 112px 112px; } .stepper button { width: 34px; height: 38px; } }
.mrow { padding: .35rem .4rem; border-radius: 8px; background: var(--panel2); } .mrow.due { outline: 2px solid var(--warn); background: rgba(255,176,46,.1); }
.mname { display: flex; align-items: flex-start; gap: .1rem; } .mname small { display: block; color: var(--muted); } .mname details p { font-size: .85rem; } .mname summary { font-size: .75rem; color: var(--info); cursor: pointer; }
.mrow .stepper { justify-content: center; } .rm { color: var(--brass); }

/* ---------- banners & results ---------- */
.banner { border-radius: 10px; padding: .55rem .8rem; margin: .5rem 0; border-left: 6px solid; background: var(--panel2); } .banner ul { margin: .25rem 0 0; padding-left: 1.1rem; }
.banner.bad { border-color: var(--bad); background: rgba(255,90,95,.14); } .banner.warn { border-color: var(--warn); background: rgba(255,176,46,.12); } .banner.info { border-color: var(--info); background: rgba(98,168,255,.1); } .banner.ok { border-color: var(--ok); background: rgba(61,220,132,.1); }
.calc { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem 1rem 1rem; }
.subtabs { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .5rem; margin-bottom: .5rem; scrollbar-width: thin; }
.subtab { flex: none; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: .5rem .9rem; min-height: 44px; cursor: pointer; font-weight: 600; } .subtab.on { background: var(--brass); color: var(--brass-ink); border-color: var(--brass); }
.dice-block { margin: .8rem 0; padding: .6rem .8rem; background: var(--panel2); border-radius: 10px; border: 1px dashed #3b475b; }
.calc-out { margin-top: .6rem; } .kvs { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .4rem; } .kv { background: var(--panel2); border-radius: 8px; padding: .4rem .7rem; display: flex; flex-direction: column; } .kv span { font-size: .78rem; color: var(--muted); } .kv b { font-size: 1.05rem; word-break: break-word; }
.result-big { border-radius: 12px; padding: .7rem 1rem; margin: .6rem 0; text-align: center; border: 2px solid; display: flex; flex-direction: column; } .result-big b { font-family: var(--head); font-size: 2.2rem; letter-spacing: .04em; } .result-big small { color: #d9e0ea; }
.result-big.ok { border-color: var(--ok); background: rgba(61,220,132,.12); } .result-big.bad { border-color: var(--bad); background: rgba(255,90,95,.12); } .result-big.kia { border-color: #ff3d71; background: rgba(255,61,113,.17); } .result-big.k { border-color: var(--orange); background: rgba(255,154,46,.14); } .result-big.mc { border-color: var(--info); background: rgba(98,168,255,.12); } .result-big.none { border-color: #55627a; background: rgba(255,255,255,.04); }
.explain { background: var(--panel2); border-radius: 8px; padding: .55rem .8rem; }
.outcomes h4 { margin-top: 1rem; } .oc-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(64px, 1fr)); gap: .3rem; } .oc { background: var(--panel2); border-radius: 8px; text-align: center; padding: .25rem; } .oc small { display: block; color: var(--muted); } .oc.hit { outline: 3px solid var(--brass); background: #3a3014; }
.res-line { font-size: .88rem; color: #cdd6e3; margin: .3rem 0; }

/* ---------- tables ---------- */
.tbl-wrap { overflow-x: auto; margin: .5rem 0; border: 1px solid var(--line); border-radius: 10px; -webkit-overflow-scrolling: touch; }
.tbl { border-collapse: collapse; width: 100%; font-size: .9rem; } .tbl th, .tbl td { border: 1px solid #263042; padding: .35rem .5rem; text-align: center; white-space: nowrap; } .tbl td:last-child, .tbl.terrain td:last-child { white-space: normal; text-align: left; }
.tbl th { background: #1d2635; font-weight: 700; } .tbl thead th { position: sticky; top: 0; } .tbl tbody th, .tbl td:first-child { text-align: left; }
.tbl.terrain tbody th { position: sticky; left: 0; background: #1d2635; z-index: 1; } .tbl.terrain td.tem { font-weight: 700; color: var(--brass); } .tbl.terrain td { white-space: normal; min-width: 54px; }
.tbl.ift td { font-weight: 700; min-width: 54px; } .tbl.ift th.colh, .tbl.ift th.rowh { cursor: pointer; } .tbl.ift th.sel, .tbl.ift td.sel, .tbl.ift tr.sel td, .tbl.ift tr.sel th { outline: 2px solid var(--brass); outline-offset: -2px; }
.xtra th, .xtra td { background: #151b25; font-weight: 500; color: var(--muted); }
.c-kia { background: #4a1630; color: #ffd1e0; } .c-k { background: #4d2b0c; color: #ffe0bd; } .c-mc { background: #15304f; color: #cfe3ff; } .c-ptc { background: #173a29; color: #c9f5da; } .c-none { background: transparent; }
.red, .redtxt { color: #ff7b7b; }
.tbl.cct td, .tbl.th td { min-width: 46px; }
.official figure { margin: 0 0 1.2rem; } .official img { width: 100%; border-radius: 10px; border: 1px solid var(--line); cursor: zoom-in; background: #fff; }
.zoomwrap { overflow: auto; max-height: 65vh; border: 1px solid var(--line); border-radius: 8px; margin-top: .5rem; } .zoomwrap img { display: block; max-width: none; }

/* ---------- flowcharts ---------- */
.crumbs { display: flex; flex-wrap: wrap; gap: .3rem; margin: .4rem 0; } .crumb { background: var(--panel2); border: 1px solid var(--line); border-radius: 999px; padding: .2rem .7rem; cursor: pointer; font-size: .8rem; color: var(--muted); } .crumb.on { color: var(--brass-ink); background: var(--brass); }
.flow-card { background: var(--panel); border: 1px solid var(--line); border-left: 6px solid var(--brass); border-radius: var(--radius); padding: .8rem 1rem; margin: .6rem 0; } .flow-opts { display: grid; gap: .5rem; margin-top: .8rem; } .flow-opt { justify-content: flex-start; text-align: left; min-height: 52px; }

/* ---------- search ---------- */
.res { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: .6rem .8rem; margin: .5rem 0; cursor: pointer; } .res header { display: flex; gap: .7rem; align-items: baseline; flex-wrap: wrap; } .res .rid { font-family: var(--head); font-weight: 700; font-size: 1.05rem; color: var(--brass); } .res small { color: var(--muted); } .res .snip { margin: .3rem 0 0; font-size: .93rem; } .res.open { border-color: var(--brass); cursor: default; }

/* ---------- modal / toast ---------- */
dialog.modal { background: var(--panel); color: var(--text); border: 1px solid #3b475b; border-radius: 14px; padding: 0; width: min(92vw, 640px); max-height: 88vh; overflow: hidden; } dialog.modal.wide { width: min(96vw, 980px); } dialog::backdrop { background: rgba(0,0,0,.7); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: .7rem 1rem; border-bottom: 1px solid var(--line); } .modal-head h3 { margin: 0; } .modal-body { padding: .8rem 1rem; overflow: auto; max-height: calc(88vh - 140px); } .modal-actions { display: flex; gap: .5rem; justify-content: flex-end; flex-wrap: wrap; padding: .7rem 1rem; border-top: 1px solid var(--line); }
#toast { position: fixed; left: 50%; bottom: calc(var(--nav-h) + 4.5rem); transform: translate(-50%, 20px); background: #232d3c; border: 1px solid #46546c; padding: .6rem 1rem; border-radius: 10px; opacity: 0; pointer-events: none; transition: .2s; z-index: 80; max-width: 92vw; } #toast.show { opacity: 1; transform: translate(-50%, 0); }
.mgmt { margin-top: 1.5rem; } .sides { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; } @media (max-width: 640px) { .sides { grid-template-columns: 1fr; } }
.side-box { border: 1px solid var(--line); border-radius: 10px; padding: .5rem .8rem .8rem; } .side-box legend { font-family: var(--head); padding: 0 .4rem; } .side-box.side-A legend { color: var(--a); } .side-box.side-B legend { color: var(--b); }

/* ---------- dice widget ---------- */
.fab { position: fixed; right: 16px; bottom: calc(var(--nav-h) + 14px); width: 66px; height: 66px; border-radius: 50%; border: 3px solid #fff3c4; background: radial-gradient(circle at 30% 30%, #ffd566, #d59a16); font-size: 2rem; cursor: pointer; z-index: 40; box-shadow: 0 8px 22px rgba(0,0,0,.55); }
.fab.open { background: #2a3342; border-color: var(--brass); }
@media (min-width: 900px) { .fab { bottom: 20px; right: 24px; } }
.dice-panel { position: fixed; right: 12px; bottom: calc(var(--nav-h) + 90px); width: min(420px, calc(100vw - 24px)); max-height: calc(100vh - var(--nav-h) - 130px); overflow-y: auto; background: #121821; border: 1px solid #46546c; border-radius: 16px; padding: .7rem .8rem 1rem; z-index: 39; box-shadow: 0 20px 50px rgba(0,0,0,.65); }
.dice-panel[hidden] { display: none; }
@media (min-width: 900px) { .dice-panel { bottom: 96px; right: 24px; max-height: calc(100vh - 140px); } }
.dp-head { display: flex; justify-content: space-between; align-items: center; font-family: var(--head); font-size: 1.2rem; }
.dice-row { display: flex; align-items: center; justify-content: center; gap: 1rem; padding: .6rem 0; } .die-wrap { display: flex; flex-direction: column; align-items: center; gap: 3px; } .die-wrap small { color: var(--muted); }
.die { width: 74px; height: 74px; border-radius: 14px; display: grid; place-items: center; box-shadow: inset 0 -4px 0 rgba(0,0,0,.25), 0 4px 10px rgba(0,0,0,.5); } .die.white { background: #f6f3ea; color: #15191f; } .die.colored { background: #d62839; color: #fff; }
.pips { display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); width: 54px; height: 54px; } .pips i { display: grid; place-items: center; } .pips i.on::after { content: ""; width: 12px; height: 12px; border-radius: 50%; background: currentColor; } .die-q { font-size: 2rem; opacity: .4; }
.dr-total { display: flex; flex-direction: column; align-items: center; min-width: 76px; } .dr-total b { font-family: var(--head); font-size: 3.1rem; line-height: 1; color: var(--brass); } .dr-total small { color: var(--muted); }
.roll-anim .die { animation: tumble .45s ease-out; } @keyframes tumble { 0% { transform: rotate(-200deg) scale(.5); opacity: .2; } 60% { transform: rotate(14deg) scale(1.08); } 100% { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .roll-anim .die { animation: none; } }
.dp-actions { display: flex; gap: .5rem; margin: .4rem 0; } .dp-actions .big { flex: 1; } .big-dr { text-align: center; font-family: var(--head); font-size: 2rem; margin: 0; color: var(--brass); }
details.manual, details.tip { margin: .4rem 0; background: var(--panel2); border-radius: 8px; padding: .3rem .6rem; } details summary { cursor: pointer; padding: .3rem 0; color: #cdd6e3; } details.tip ol { padding-left: 1.2rem; margin: .3rem 0; font-size: .88rem; }
.hist-head { display: flex; justify-content: space-between; align-items: center; margin-top: .6rem; } .hist { list-style: none; margin: 0; padding: 0; max-height: 190px; overflow-y: auto; } .hist li { display: flex; gap: .5rem; align-items: center; padding: .25rem .2rem; border-bottom: 1px solid #222c3a; } .hist .flags { margin-left: auto; letter-spacing: .1em; } .hist .who { color: var(--muted); } .hist li.hi-san { background: rgba(255,90,95,.14); } .hist li.hi-o2 { background: rgba(255,176,46,.12); }

.side-pill.side-A { color: #07120f; } .side-pill.side-B { color: #170a24; }
.brand { white-space: nowrap; } .turn-badge { white-space: nowrap; }
@media (max-width: 520px) { .brand span { display: none; } .tbl.terrain tbody th { max-width: 110px; white-space: normal; } }
.mtoggle { width: 100%; min-height: 42px; border-radius: 10px; border: 1px solid var(--line); background: #0e131a; color: var(--muted); font-weight: 700; cursor: pointer; }
.mtoggle.on.side-A { background: var(--a); color: #07120f; border-color: var(--a); } .mtoggle.on.side-B { background: var(--b); color: #170a24; border-color: var(--b); }
