:root {
  --bg: #03060b;
  --panel: rgba(10, 15, 22, 0.88);
  --panel-solid: #0b1119;
  --text: #e8edf0;
  --muted: #8d9ba6;
  --line: #1f2a35;
  --accent: #ff5a36;      /* fire / event */
  --radar: #7fd18b;       /* HV, vegetation */
  --passes: #ffd23f;
  --showcase: #ff5a36;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); }
body { display: grid; grid-template-rows: auto 1fr auto; overflow: hidden; }
button { font: inherit; }
[hidden] { display: none !important; }

/* ---- top bar ---- */
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 8px 16px;
  border-bottom: 1px solid var(--line); background: rgba(3, 6, 11, .9); z-index: 10; }
.brand { display: flex; align-items: baseline; gap: 10px; }
.brand .logo { color: var(--accent); font-size: 16px; text-shadow: 0 0 10px rgba(255, 90, 54, .7); }
.brand strong { letter-spacing: .04em; text-transform: uppercase; font-size: 14px; }
.brand .sub { color: var(--muted); font-size: 13px; }
.top-actions { display: flex; gap: 6px; }

/* ---- map + space backdrop ---- */
.layout { position: relative; min-height: 0; }
#map { position: absolute; inset: 0; }
.space {
  background:
    radial-gradient(1px 1px at 12% 18%, #fff8, transparent 60%),
    radial-gradient(1px 1px at 27% 72%, #fff6, transparent 60%),
    radial-gradient(1.5px 1.5px at 41% 33%, #fffa, transparent 60%),
    radial-gradient(1px 1px at 58% 84%, #fff7, transparent 60%),
    radial-gradient(1px 1px at 66% 12%, #fff9, transparent 60%),
    radial-gradient(1.5px 1.5px at 79% 47%, #fff8, transparent 60%),
    radial-gradient(1px 1px at 88% 76%, #fff6, transparent 60%),
    radial-gradient(1px 1px at 94% 22%, #fff9, transparent 60%),
    radial-gradient(1px 1px at 6% 58%, #fff7, transparent 60%),
    radial-gradient(1px 1px at 35% 6%, #fff6, transparent 60%),
    radial-gradient(ellipse at 50% 50%, #0a1628 0%, #03060b 70%);
  background-size: 420px 420px, 420px 420px, 420px 420px, 420px 420px, 420px 420px,
    420px 420px, 420px 420px, 420px 420px, 420px 420px, 420px 420px, 100% 100%;
}

/* ---- left panel ---- */
.panel {
  position: absolute; top: 14px; left: 14px; width: 360px; max-height: calc(100% - 28px); overflow-y: auto;
  background: var(--panel); backdrop-filter: blur(10px); border: 1px solid var(--line);
  border-radius: 12px; padding: 16px 18px; z-index: 4;
  scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
.panel h1 { font-size: 22px; margin: 0 0 8px; font-weight: 650; }
.panel h2 { font-size: 18px; margin: 0 0 4px; font-weight: 650; }
.panel h3 { font-size: 13px; color: var(--muted); font-weight: 600; margin: 14px 0 6px; text-transform: uppercase; letter-spacing: .05em; }
.panel p { line-height: 1.5; margin: 6px 0; font-size: 14px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.legend { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.swatch { width: 14px; height: 14px; border-radius: 3px; display: inline-block; }
.swatch.passes { background: var(--passes); opacity: .7; }
.swatch.showcase { background: var(--showcase); border-radius: 50%; }
.row-between { display: flex; align-items: center; justify-content: space-between; }

/* segmented layer switch */
.seg { display: flex; margin-top: 12px; background: #0f1720; border: 1px solid var(--line); border-radius: 8px; padding: 3px; }
.seg-btn { flex: 1; background: none; border: 0; color: var(--muted); padding: 6px 8px; border-radius: 6px; cursor: pointer; font-size: 13px; }
.seg-btn.on { background: #1f2b37; color: var(--text); }

/* legend */
.legend-box { margin-top: 10px; display: grid; gap: 4px; }
.lg { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.sw { width: 12px; height: 12px; border-radius: 3px; display: inline-block; flex: none; border: 1px solid #ffffff22; }

/* summary */
.summary { margin-top: 12px; padding: 10px 12px; border-left: 3px solid var(--accent); background: #ff5a3610;
  border-radius: 0 8px 8px 0; font-size: 13.5px; line-height: 1.5; }
.summary a { color: var(--accent); }

/* buttons */
.btn { margin-top: 10px; background: #18222c; color: var(--text); border: 1px solid var(--line); border-radius: 6px;
  padding: 6px 12px; cursor: pointer; font-size: 13px; }
.btn:hover { border-color: var(--accent); }
.btn:focus-visible, .seg-btn:focus-visible, .tl-dot:focus-visible, .tl-track:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn.ghost { margin-top: 0; background: transparent; }
.btn.small { margin-top: 0; padding: 3px 8px; font-size: 12px; }
.btn:disabled { opacity: .4; cursor: default; }
#series { min-height: 40px; color: var(--muted); }

/* ---- bottom time strip ---- */
.strip { border-top: 1px solid var(--line); background: rgba(3, 6, 11, .95); padding: 8px 16px 10px; z-index: 10; }
.strip-row { display: grid; grid-template-columns: 64px 1fr; align-items: center; gap: 12px; min-height: 44px; }
.strip-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.strip-body { font-size: 13px; }
.tl { display: grid; grid-template-columns: auto 1fr 240px; align-items: center; gap: 16px; }
.tl-play { background: #18222c; color: var(--text); border: 1px solid var(--line); border-radius: 50%; width: 32px; height: 32px; cursor: pointer; }
.tl-track { position: relative; height: 40px; margin: 6px 10px 0; }
.tl-axis { position: absolute; left: 0; right: 0; top: 14px; height: 2px; background: var(--line); }
.tl-month { position: absolute; top: 24px; transform: translateX(-50%); font-size: 10.5px; color: var(--muted); font-family: var(--mono); }
.tl-month::before { content: ""; position: absolute; left: 50%; top: -9px; width: 1px; height: 5px; background: var(--line); }
.tl-fire { position: absolute; top: -12px; transform: translateX(-50%); font-size: 12px; filter: drop-shadow(0 0 4px rgba(255, 90, 54, .9)); }
.tl-dot { position: absolute; top: 8px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; cursor: pointer;
  background: var(--radar); border: 2px solid var(--bg); padding: 0; transition: transform .15s; }
.tl-dot.other { background: var(--bg); border: 2px dashed var(--radar); }
.tl-dot:hover { transform: scale(1.25); }
.tl-dot.on { transform: scale(1.45); box-shadow: 0 0 0 3px #7fd18b55, 0 0 12px #7fd18b; }
.tl-label { display: flex; flex-direction: column; font-size: 13px; font-variant-numeric: tabular-nums; }
.tl-label span { font-size: 11px; color: var(--muted); font-family: var(--mono); }

/* ---- before / after swipe ---- */
.cmp-wrap { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.cmp-handle { position: absolute; top: 0; bottom: 0; width: 0; z-index: 3; border-left: 2px solid #fff; cursor: ew-resize; touch-action: none; }
.cmp-grip { position: absolute; top: 50%; left: -16px; width: 30px; height: 30px; margin-top: -15px; border-radius: 50%; background: #fff; color: #111; display: grid; place-items: center; font-weight: 700; pointer-events: auto; }
.cmp-tag { position: absolute; top: 12px; white-space: nowrap; background: rgba(10,15,22,.88); border: 1px solid var(--line); border-radius: 6px; padding: 3px 8px; font-size: 12px; }
.cmp-tag.left { right: 14px; } .cmp-tag.right { left: 14px; }

/* ---- tooltip ---- */
.explain { position: absolute; z-index: 5; width: 300px; pointer-events: none; background: rgba(10,15,22,.94); border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; font-size: 13px; line-height: 1.45; box-shadow: 0 6px 24px #0008; }
.ex-head { display: flex; align-items: center; gap: 7px; font-weight: 600; margin-bottom: 4px; }
.ex-conf { margin-left: auto; font-size: 10.5px; font-weight: 500; padding: 1px 6px; border-radius: 10px; text-transform: uppercase; letter-spacing: .04em; }
.ex-conf.high { background: #7fd18b22; color: var(--radar); }
.ex-conf.low { background: #ffd23f22; color: var(--passes); }
.explain-expert { margin-top: 6px; color: var(--muted); font-size: 11px; font-family: var(--mono); line-height: 1.5; }

/* ---- method drawer ---- */
.drawer { position: absolute; top: 0; right: 0; bottom: 0; width: min(520px, 46vw); z-index: 8; background: var(--panel-solid);
  border-left: 1px solid var(--line); display: flex; flex-direction: column; box-shadow: -12px 0 40px #000a; animation: slidein .25s ease-out; }
@keyframes slidein { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { margin: 0; font-size: 18px; }
.drawer-body { overflow-y: auto; padding: 4px 18px 24px; font-size: 14px; line-height: 1.6; }
.drawer-body h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); margin: 22px 0 6px; }
.drawer-body h4 { font-size: 14.5px; margin: 16px 0 4px; }
.drawer-body p, .drawer-body li { color: #cfd8de; }
.m-small { font-size: 12.5px; color: var(--muted) !important; }
.m-table { width: 100%; border-collapse: collapse; font-size: 12.5px; margin: 8px 0; }
.m-table th, .m-table td { text-align: left; padding: 5px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.m-table th { color: var(--muted); font-weight: 600; }
.m-table .sw { margin-right: 6px; vertical-align: -1px; }
.m-table.num td, .m-table.num th { font-family: var(--mono); font-size: 12px; }

/* ---- story + toast ---- */
.story { position: absolute; right: 60px; bottom: 20px; z-index: 6; width: min(380px, calc(100% - 32px)); }
.story-card { background: rgba(10,15,22,.95); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; box-shadow: 0 8px 30px #000a; }
.story-step { font-size: 11.5px; color: var(--accent); letter-spacing: .06em; text-transform: uppercase; }
.story-title { margin: 4px 0 6px; font-size: 17px; color: var(--text); }
.story-text { margin: 0 0 10px; line-height: 1.5; font-size: 14px; }
.story-nav { display: flex; gap: 6px; flex-wrap: wrap; }
.story-nav .btn { margin-top: 0; }
.toast { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 9; background: #2a1712; border: 1px solid #ff5a3666;
  color: #ffd9cf; padding: 8px 14px; border-radius: 8px; font-size: 13px; max-width: 520px; }

/* ---- fires strip row ---- */
.strip-row + .strip-row { border-top: 1px dashed var(--line); margin-top: 6px; padding-top: 6px; }
.fires { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.seg-sm { margin-top: 0; padding: 2px; }
.seg-sm .seg-btn { flex: none; padding: 3px 10px; font-size: 12px; }
.fire-nav { display: flex; gap: 4px; }
.btn.accent { border-color: #ff5a3688; background: #2a1712; }
.chk { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); cursor: pointer; }
.chk input { accent-color: var(--accent); }
.fire-current { font-size: 12.5px; color: #ffcfbf; margin-left: auto; max-width: 420px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.swatch.fire { background: #ff3b1f; border-radius: 50%; box-shadow: 0 0 6px #ff3b1f; }

/* ---- global card ---- */
.gcard { position: absolute; top: 14px; right: 56px; width: 340px; max-height: calc(100% - 28px); overflow-y: auto; z-index: 6;
  background: var(--panel); backdrop-filter: blur(10px); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px;
  font-size: 13.5px; line-height: 1.5; box-shadow: 0 8px 30px #000a; scrollbar-width: thin; }
.gc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.gc-kicker { font-size: 11.5px; color: var(--accent); text-transform: uppercase; letter-spacing: .05em; }
.gc-title { font-family: var(--mono); font-size: 15px; margin-top: 2px; }
.gc-badge { display: inline-block; margin: 6px 0 4px; font-size: 11px; color: var(--passes); background: #ffd23f14; border: 1px solid #ffd23f33; border-radius: 10px; padding: 1px 8px; }
.gc-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0; }
.gc-dates label { display: grid; gap: 3px; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.gc-dates select { background: #0f1720; color: var(--text); border: 1px solid var(--line); border-radius: 6px; padding: 4px; font-family: var(--mono); font-size: 11.5px; }
.gc-imgs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.gc-imgs figure { margin: 0; }
.gc-img { aspect-ratio: 1; background: #0f1720; border: 1px solid var(--line); border-radius: 6px; display: grid; place-items: center; overflow: hidden; position: relative; }
.gc-img canvas { width: 100%; height: 100%; image-rendering: pixelated; }
.gc-img::after { content: ""; position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; margin: -5px; border: 1.5px solid #fff; border-radius: 50%; }
.gc-imgs figcaption { font-family: var(--mono); font-size: 11px; color: var(--muted); text-align: center; margin-top: 3px; }
.gc-result { margin-top: 10px; }
.gc-result p { margin: 4px 0; }
.gc-change { font-weight: 600; }
.gc-change.loss { color: #ff7b6b; } .gc-change.gain { color: #7fb2ff; }
.tag { font-size: 10px; font-weight: 500; text-transform: uppercase; letter-spacing: .05em; color: var(--passes); border: 1px solid #ffd23f55; border-radius: 8px; padding: 0 6px; }
.gcard h4 { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin: 12px 0 4px; }
.gc-fires { list-style: none; padding: 0; margin: 0; display: grid; gap: 3px; font-size: 12.5px; }
.linkish { background: none; border: 0; padding: 0; color: #ffb39f; cursor: pointer; text-align: left; text-decoration: underline dotted; }
.gc-details { margin-top: 10px; font-size: 12px; }
.gc-details summary { cursor: pointer; color: var(--muted); }
.gc-expert { font-family: var(--mono); font-size: 11px; line-height: 1.6; margin-top: 4px; }
.gcard { overflow-x: hidden; }
.gc-dates select { width: 100%; min-width: 0; }
.gc-warn { font-size: 12.5px; color: #ffd9a8; background: #ffb34714; border-left: 3px solid #ffb347; padding: 6px 8px; border-radius: 0 6px 6px 0; margin: 8px 0; }
kbd { font: 600 10px/1 ui-monospace, monospace; padding: 2px 4px; margin-left: 4px; border: 1px solid rgba(255,255,255,.25); border-radius: 3px; opacity: .7; }
.swatch.sat { background: #5ef2ff; opacity: .8; }
.sat-chip { position: absolute; right: 12px; bottom: 52px; z-index: 4; max-width: 520px; font-size: 12px; line-height: 1.4;
  background: rgba(8, 14, 28, .82); border: 1px solid #5ef2ff44; border-radius: 6px; padding: 6px 10px; color: #dff9ff; pointer-events: none; }
.fade { position: absolute; inset: 0; z-index: 6; background: #02040a; opacity: 0; pointer-events: none; transition: opacity .28s ease; }
.fade.on { opacity: 1; }
.scan { position: absolute; inset: 0; z-index: 5; pointer-events: none; opacity: 0;
  background: linear-gradient(to bottom, transparent 0, rgba(94,242,255,.16) 48%, rgba(94,242,255,.35) 50%, transparent 52%) no-repeat;
  background-size: 100% 200%; }
.scan.go { animation: scan .7s ease-out; }
@keyframes scan { from { opacity: 1; background-position: 0 100%; } to { opacity: 0; background-position: 0 0; } }
.satbar { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 7; display: flex; gap: 8px; align-items: center;
  background: rgba(8, 14, 28, .88); border: 1px solid #5ef2ff55; border-radius: 8px; padding: 6px 8px 6px 12px; font-size: 13px; color: #dff9ff; }
@media (prefers-reduced-motion: reduce) { .scan.go { animation: none; } .fade { transition: none; } }
/* ---- cover + loading bar ---- */
.cover { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; color: var(--text);
  background: radial-gradient(ellipse at 50% 120%, #0d2a4a 0%, #050b16 45%, #02040a 100%); transition: opacity .6s ease; }
.cover::before { content: ""; position: absolute; inset: 0; opacity: .5; pointer-events: none;
  background-image: radial-gradient(1px 1px at 20% 30%, #fff, transparent), radial-gradient(1px 1px at 70% 20%, #cfe8ff, transparent),
    radial-gradient(1px 1px at 40% 70%, #fff, transparent), radial-gradient(1.5px 1.5px at 85% 60%, #fff, transparent),
    radial-gradient(1px 1px at 10% 85%, #cfe8ff, transparent), radial-gradient(1px 1px at 55% 45%, #fff, transparent); }
.cover.out { opacity: 0; pointer-events: none; }
.cover-inner { position: relative; width: min(560px, 90vw); text-align: center; }
.cover-team { font: 700 13px/1 var(--mono, monospace); letter-spacing: .35em; text-transform: uppercase; color: #ff7a52; }
.cover-title { font-size: 44px; margin: 14px 0 6px; letter-spacing: -.01em; }
.cover-sub { margin: 0; color: var(--muted); }
.cover-by { margin: 22px 0 30px; font-size: 14px; color: #cfd8e6; }
.cover-bar { height: 6px; border-radius: 3px; background: #ffffff14; overflow: hidden; }
.cover-bar > span { display: block; height: 100%; width: 0; border-radius: 3px; transition: width .3s ease;
  background: linear-gradient(90deg, #5ef2ff, #c8e04a, #ff7a52); }
.cover-pct { margin-top: 8px; font: 600 12px/1 var(--mono, monospace); color: var(--muted); }
.cover-steps { list-style: none; padding: 0; margin: 22px auto 0; text-align: left; font-size: 13px; max-width: 470px; }
.cover-steps li { display: flex; gap: 10px; padding: 4px 0; color: var(--muted); }
.cover-steps li.ok { color: var(--text); }
.cover-steps .cs-mark { width: 14px; color: #5ef2ff; }
.cover-steps li.saved .cs-mark { color: #ffd23f; }
.cover-steps .cs-note { margin-left: auto; font-family: var(--mono, monospace); font-size: 12px; }
.cover-foot { margin-top: 26px; font-size: 11.5px; }
@media (prefers-reduced-motion: reduce) { .cover, .cover-bar > span { transition: none; } }
.swatch.hot { background: #ff2d2d; border-radius: 2px; box-shadow: 0 0 5px #ff2d2d; width: 9px; height: 9px; }
.photo-ctl { position: absolute; right: 56px; top: 52px; z-index: 4; display: flex; gap: 6px; align-items: center; }
#photo-days { display: inline-flex; gap: 4px; align-items: center; background: rgba(8,14,28,.85); border-radius: 6px; padding: 2px 4px; font: 12px var(--mono, monospace); }
#photo-days[hidden] { display: none; }
#photo-btn.on { border-color: #5ef2ff; color: #5ef2ff; }
/* ---- time machine (global card) ---- */
.gc-tm h4 { margin: 14px 0 6px; }
.tm-view { position: relative; aspect-ratio: 1; max-height: 220px; margin: 0 auto; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: #0f1720; }
.tm-view canvas { width: 100%; height: 100%; image-rendering: pixelated; display: block; }
.tm-view::after { content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; margin: -6px; border: 1.5px solid #fff; border-radius: 50%; }
.tm-date { position: absolute; left: 6px; bottom: 6px; font: 11.5px var(--mono, monospace); background: rgba(3,6,11,.75); padding: 2px 6px; border-radius: 4px; }
.tm-after { color: #ff8a5c; }
.tm-ctl { display: flex; gap: 6px; align-items: center; margin-top: 6px; }
.tm-strip { display: flex; gap: 4px; overflow-x: auto; flex: 1; }
.tm-thumb { flex: 0 0 40px; padding: 0; border: 1px solid var(--line); border-radius: 4px; background: #0f1720; cursor: pointer; position: relative; color: var(--muted); }
.tm-thumb canvas { width: 38px; height: 38px; display: block; image-rendering: pixelated; border-radius: 3px; }
.tm-thumb.empty { height: 40px; }
.tm-thumb.on { border-color: #5ef2ff; }
.tm-d { display: block; font: 9.5px var(--mono, monospace); text-align: center; }
.tm-spark { width: 100%; height: 56px; margin-top: 6px; }
.tm-line { fill: none; stroke: #c8e04a; stroke-width: 1.6; }
.tm-spark circle { fill: #c8e04a; }
.tm-spark circle.on { fill: #fff; r: 4; }
.tm-fire { stroke: #ff5a36; stroke-dasharray: 3 3; }
.tm-fire-t { fill: #ff8a5c; font-size: 9px; }
/* ---- legend items toggle their map layers ---- */
.legend-list { display: grid; gap: 2px; margin: 6px 0; }
button.legend { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 8px; width: 100%; padding: 4px 6px; margin: 0 -6px;
  border-radius: 6px; font-size: 13px; color: var(--muted); cursor: pointer; transition: background .15s, opacity .15s; }
button.legend:hover { background: #ffffff0f; color: var(--text); }
button.legend:focus-visible { outline: 2px solid #5ef2ff; outline-offset: 1px; }
button.legend[aria-pressed="false"] { opacity: .42; text-decoration: line-through; text-decoration-color: #ffffff55; }
button.legend[aria-pressed="false"] .swatch { background: transparent !important; box-shadow: none; outline: 1.5px solid currentColor; outline-offset: -1.5px; }
button.legend .swatch { flex: none; }
.swatch.imagery { background: linear-gradient(135deg, #c8e04a 0 50%, #7b5ea7 50% 100%); }
/* ---- collapsible left panel ---- */
.panel { transition: transform .28s ease, opacity .28s ease; }
.panel.collapsed { transform: translateX(calc(-100% - 20px)); opacity: 0; pointer-events: none; }
.panel-tab { position: absolute; z-index: 5; top: 26px; left: 382px; width: 22px; height: 44px; padding: 0;
  border: 1px solid var(--line); border-left: none; border-radius: 0 8px 8px 0; background: var(--panel);
  color: var(--text); font-size: 18px; line-height: 1; cursor: pointer; transition: left .28s ease; backdrop-filter: blur(10px); }
.panel-tab:hover { color: #5ef2ff; }
.panel-tab.collapsed { left: 0; }
@media (prefers-reduced-motion: reduce) { .panel, .panel-tab { transition: none; } }
/* ---- selection toolbar ---- */
.drawbar { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 4; display: flex; gap: 2px; padding: 3px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px; backdrop-filter: blur(10px); }
.drawbar button { all: unset; cursor: pointer; padding: 5px 9px; border-radius: 6px; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.drawbar button:hover { color: var(--text); background: #ffffff0f; }
.drawbar button.on { color: #02040a; background: #5ef2ff; }
.drawbar button:focus-visible { outline: 2px solid #5ef2ff; outline-offset: 1px; }
.draw-hint { position: absolute; top: 52px; left: 50%; transform: translateX(-50%); z-index: 4; font-size: 12.5px;
  background: rgba(8,14,28,.9); border: 1px solid #5ef2ff55; color: #dff9ff; padding: 5px 10px; border-radius: 6px; pointer-events: none; }
/* ---- area card ---- */
.ac-bar { display: flex; height: 14px; border-radius: 4px; overflow: hidden; margin: 6px 0; background: #ffffff10; }
.ac-bar span { display: block; height: 100%; }
.ac-classes { list-style: none; padding: 0; margin: 4px 0; font-size: 12.5px; display: grid; gap: 2px; }
.ac-classes li { display: flex; align-items: center; gap: 6px; }
.ac-num { margin-left: auto; font-family: var(--mono, monospace); font-size: 11.5px; color: var(--muted); }
.ac-change-nums { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 4px 0 6px; }
.ac-change-nums > div { display: grid; gap: 2px; }
.ac-big { font-size: 18px; font-weight: 650; }
.ac-big.loss { color: #ff6b6b; } .ac-big.gain { color: #6fa2ff; }
.ac-imgs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ac-imgs figure { margin: 0; }
.ac-imgs figcaption { font-size: 11px; color: var(--muted); margin-top: 3px; }
.ac-img { aspect-ratio: 1; background: #0f1720; border: 1px solid var(--line); border-radius: 6px; display: grid; place-items: center; overflow: hidden; }
.ac-img canvas, .ac-tm-view canvas { width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; }
.ac-tm-view { display: grid; place-items: center; }
.ac-tm-view canvas { width: 100%; height: 100%; object-fit: contain; }
.tm-thumb canvas { object-fit: contain; }
.lg-dot { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin: 0 2px 0 4px; }
.lg-dot.loss { background: #e63946; } .lg-dot.gain { background: #3c78e6; }
.ac-foot { margin-top: 10px; gap: 8px; }
.ac-tm-view::after { display: none; }
