@font-face { font-family: Inter; font-weight: 400; src: url(fonts/inter-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: Inter; font-weight: 500; src: url(fonts/inter-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: Inter; font-weight: 600; src: url(fonts/inter-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: Inter; font-weight: 700; src: url(fonts/inter-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: Inter; font-weight: 800; src: url(fonts/inter-latin-800-normal.woff2) format('woff2'); }
:root {
  color-scheme: dark;
  --bg: #070b17; --bg2: #0a1022; --panel: #0d1428; --card: #111a33; --card2: #172244; --line: #1f2b4f; --line2: #2a3963;
  --text: #eaf0ff; --text2: #aeb9d6; --muted: #6f7ca0; --accent: #3d8bff; --accent2: #4fc3ff; --accent-soft: rgba(61,139,255,.14);
  --good: #3ddc97; --warn: #ffb648; --bad: #ff6b7a; --gold: #f2c14e;
  --bar: #3987e5; --bar-hover: #6da7ec;
  --r: 14px; --r2: 10px;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font: 14px/1.45 Inter, "Segoe UI Variable", "Segoe UI", system-ui, sans-serif; -webkit-font-smoothing: antialiased; overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: rgba(61,139,255,.35); }
::-webkit-scrollbar { width: 10px; height: 10px; } ::-webkit-scrollbar-thumb { background: #1d2850; border-radius: 10px; border: 2px solid var(--bg); } ::-webkit-scrollbar-track { background: transparent; }
.muted { color: var(--muted); } .t2 { color: var(--text2); }
a { color: var(--accent2); text-decoration: none; }

/* title bar (frameless window; native controls overlay on the right) */
#titlebar { height: 38px; display: flex; align-items: center; gap: 18px; padding: 0 150px 0 14px; background: var(--bg); border-bottom: 1px solid #111a33; -webkit-app-region: drag; user-select: none; }
.tb-brand { display: flex; align-items: center; gap: 8px; font-weight: 700; letter-spacing: .2px; width: 190px; }
.tb-logo { width: 20px; height: 20px; } .tb-sub { color: var(--muted); font-weight: 500; font-size: 12px; }
.tb-search { flex: 1; display: flex; justify-content: center; }
.tb-search input { -webkit-app-region: no-drag; width: min(520px, 100%); height: 26px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg2); padding: 0 12px; font-size: 12.5px; outline: none; }
.tb-search input:focus { border-color: var(--accent); }

#app { display: flex; height: calc(100% - 38px); }
#nav { width: 86px; flex: none; background: var(--bg); border-right: 1px solid #111a33; display: flex; flex-direction: column; align-items: center; padding: 10px 0; gap: 4px; }
.nav-item, .nav-add { position: relative; width: 70px; padding: 9px 0 7px; border: 0; background: none; border-radius: 12px; display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--muted); cursor: pointer; font-size: 11px; font-weight: 600; }
.nav-item svg, .nav-add svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nav-item:hover { color: var(--text); background: #0f1730; }
.nav-item.active { color: #fff; background: var(--accent-soft); }
.nav-item.active svg { stroke: var(--accent2); }
.nav-add { color: #fff; background: linear-gradient(160deg, #3d8bff, #2a5fe0); margin: 6px 0; box-shadow: 0 6px 18px rgba(61,139,255,.35); }
.nav-add:hover { filter: brightness(1.1); }
.nav-spacer { flex: 1; }
.nav-badge { position: absolute; top: 4px; right: 12px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--warn); color: #1b1300; font-size: 10px; font-style: normal; line-height: 16px; font-weight: 800; }

#view { flex: 1; min-width: 0; position: relative; overflow: auto; }
.page { padding: 26px 32px 60px; max-width: 1320px; margin: 0 auto; }
.page-h { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-h h1 { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -.3px; }
.page-h .sub { color: var(--text2); margin-top: 3px; }
h2 { font-size: 15px; margin: 28px 0 12px; font-weight: 700; color: var(--text); letter-spacing: .1px; }
h2 .muted { font-weight: 500; }

/* controls */
.btn { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line2); background: var(--card); color: var(--text); cursor: pointer; font-weight: 600; font-size: 13px; white-space: nowrap; }
.btn:hover { border-color: #3a4c80; background: var(--card2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text2); }
.btn.ghost:hover { background: var(--card); color: var(--text); }
.btn.danger { color: var(--bad); }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12px; border-radius: 8px; }
.btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { height: 30px; padding: 0 12px; border-radius: 15px; border: 1px solid var(--line2); background: rgba(13,20,40,.8); color: var(--text2); cursor: pointer; font-weight: 600; font-size: 12.5px; backdrop-filter: blur(6px); }
.chip:hover { color: var(--text); border-color: #3a4c80; }
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.seg { display: inline-flex; background: rgba(13,20,40,.85); border: 1px solid var(--line2); border-radius: 10px; padding: 2px; backdrop-filter: blur(6px); }
.seg button { border: 0; background: none; height: 28px; padding: 0 12px; border-radius: 8px; color: var(--text2); cursor: pointer; font-weight: 600; font-size: 12.5px; }
.seg button.on { background: var(--card2); color: #fff; }
input.inp, select.inp, textarea.inp { width: 100%; height: 38px; border-radius: 10px; border: 1px solid var(--line2); background: var(--bg2); padding: 0 12px; outline: none; }
textarea.inp { height: auto; min-height: 90px; padding: 10px 12px; resize: vertical; font-family: Consolas, "Cascadia Mono", monospace; font-size: 12.5px; }
.inp:focus { border-color: var(--accent); }
label.fld { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--text2); font-weight: 600; position: relative; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; } .grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; } .grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; }
.tag { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 6px; font-size: 11px; font-weight: 700; background: #1a2550; color: var(--text2); white-space: nowrap; }
.tag.est { background: rgba(255,182,72,.12); color: var(--warn); }
.tag.rev { background: rgba(255,182,72,.18); color: var(--warn); }
.tag.up { background: rgba(61,220,151,.13); color: var(--good); }
.tag.biz { background: rgba(242,193,78,.14); color: var(--gold); }

/* ---------- map view ---------- */
.mapview { position: absolute; inset: 0; overflow: hidden; background: var(--bg); }
.mapview .mapwrap { position: absolute; inset: 0; }
.worldmap { display: block; cursor: grab; } .worldmap:active { cursor: grabbing; }
.map-top { position: absolute; left: 22px; right: 22px; top: 16px; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; pointer-events: none; }
.map-top > * { pointer-events: auto; }
.map-title h1 { margin: 0; font-size: 24px; font-weight: 800; letter-spacing: -.3px; text-shadow: 0 2px 12px #000; }
.map-title .sub { color: var(--text2); font-size: 13px; text-shadow: 0 1px 8px #000; }
.map-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.map-years { position: absolute; left: 22px; top: 78px; max-width: 70%; }
.map-bottom { position: absolute; left: 22px; right: 22px; bottom: 18px; display: flex; gap: 14px; align-items: flex-end; pointer-events: none; }
.map-bottom > * { pointer-events: auto; }
.statstrip { display: flex; background: rgba(10,16,34,.82); border: 1px solid var(--line); border-radius: 16px; backdrop-filter: blur(10px); box-shadow: var(--shadow); overflow: hidden; }
.statstrip .st { padding: 12px 20px; border-right: 1px solid var(--line); min-width: 108px; cursor: pointer; }
.statstrip .st:last-child { border-right: 0; }
.statstrip .st:hover { background: rgba(61,139,255,.08); }
.st .v { font-size: 22px; font-weight: 800; letter-spacing: -.4px; font-variant-numeric: tabular-nums; }
.st .v small { font-size: 12px; font-weight: 600; color: var(--text2); margin-left: 2px; }
.st .l { font-size: 11px; text-transform: uppercase; letter-spacing: .7px; color: var(--muted); font-weight: 700; }
.map-side { position: absolute; right: 22px; top: 120px; width: 300px; display: flex; flex-direction: column; gap: 12px; }
.glass { background: rgba(10,16,34,.84); border: 1px solid var(--line); border-radius: 16px; backdrop-filter: blur(10px); box-shadow: var(--shadow); padding: 14px 16px; }
.glass h3 { margin: 0 0 8px; font-size: 11px; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); }
.mini-flight { cursor: pointer; }
.mini-flight .rt { display: flex; align-items: center; justify-content: space-between; font-size: 22px; font-weight: 800; letter-spacing: .5px; }
.mini-flight .rt .ln { flex: 1; margin: 0 10px; height: 1px; background: linear-gradient(90deg, var(--line2), var(--accent2), var(--line2)); position: relative; }
.mini-flight .meta { display: flex; justify-content: space-between; color: var(--text2); font-size: 12px; margin-top: 2px; }
.countdown { font-size: 13px; color: var(--good); font-weight: 700; margin-top: 8px; }
.trophy-mini { display: flex; gap: 8px; align-items: center; padding: 6px 0; cursor: pointer; }
.trophy-mini .med { width: 34px; height: 34px; font-size: 16px; margin: 0 4px 0 2px; flex: none; box-shadow: 0 0 0 2px var(--ring, #2a3963); }
.replay-hud { position: absolute; left: 50%; top: 18px; transform: translateX(-50%); text-align: center; pointer-events: none; }
.replay-hud .d { font-size: 30px; font-weight: 800; letter-spacing: -.5px; text-shadow: 0 2px 16px #000; }
.replay-hud .s { color: var(--text2); font-size: 13px; text-shadow: 0 1px 8px #000; }
.maptip, #vtip { position: absolute; z-index: 30; pointer-events: none; background: rgba(8,13,28,.96); border: 1px solid var(--line2); border-radius: 10px; padding: 9px 11px; font-size: 12.5px; box-shadow: var(--shadow); max-width: 280px; }
#vtip { position: fixed; }
.maptip b, #vtip b { font-size: 13.5px; }

/* ---------- flights list ---------- */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.toolbar .inp { width: 260px; height: 34px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 6px 0 4px; }
.tabs button { border: 0; background: none; padding: 10px 14px; color: var(--text2); font-weight: 700; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button.on { color: #fff; border-bottom-color: var(--accent); }
.tabs button .n { color: var(--muted); font-weight: 600; margin-left: 4px; }
.yearhead { display: flex; align-items: baseline; gap: 12px; margin: 26px 0 10px; position: sticky; top: 0; background: linear-gradient(var(--bg) 70%, rgba(7,11,23,0)); padding: 10px 0 8px; z-index: 2; }
.yearhead .y { font-size: 22px; font-weight: 800; }
.journey { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 10px; overflow: hidden; }
.journey .jh { display: flex; justify-content: space-between; padding: 10px 16px 0; color: var(--muted); font-size: 12px; font-weight: 600; }
.leg { display: grid; grid-template-columns: 44px 1fr 150px; align-items: center; gap: 14px; padding: 12px 16px; cursor: pointer; }
.leg + .leg { border-top: 1px dashed var(--line); }
.leg:hover { background: #142046; }
.albadge { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; font-size: 13px; color: #fff; letter-spacing: .3px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.legmain { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; min-width: 0; }
.ap .c { font-size: 21px; font-weight: 800; letter-spacing: .6px; }
.ap .t { font-size: 12.5px; color: var(--text2); font-variant-numeric: tabular-nums; }
.ap.r { text-align: right; }
.path { position: relative; height: 34px; display: flex; flex-direction: column; justify-content: center; align-items: center; min-width: 80px; }
.path .ln { position: absolute; left: 0; right: 0; top: 50%; border-top: 1px dashed var(--line2); }
.path .pl { position: relative; background: var(--card); padding: 0 6px; color: var(--accent2); font-size: 13px; }
.leg:hover .path .pl { background: #142046; }
.path .du { position: absolute; top: 24px; font-size: 11px; color: var(--muted); white-space: nowrap; }
.path .ci { position: absolute; top: -2px; font-size: 11px; color: var(--muted); white-space: nowrap; }
.legside { text-align: right; font-size: 12px; color: var(--text2); line-height: 1.5; }
.legside .fn { font-weight: 700; color: var(--text); font-size: 13px; }
.layover { padding: 2px 16px 2px 74px; color: var(--muted); font-size: 11.5px; }
.empty { padding: 60px 20px; text-align: center; color: var(--muted); }
.review-banner { display: flex; gap: 14px; align-items: center; justify-content: space-between; background: rgba(255,182,72,.08); border: 1px solid rgba(255,182,72,.3); color: #ffd9a1; border-radius: var(--r); padding: 12px 16px; margin: 14px 0; }

/* ---------- drawer ---------- */
#scrim { position: fixed; inset: 38px 0 0 0; background: rgba(2,4,10,.45); opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 40; }
#scrim.on { opacity: 1; pointer-events: auto; }
#drawer { position: fixed; top: 38px; right: 0; bottom: 0; width: min(560px, 92vw); background: var(--panel); border-left: 1px solid var(--line); transform: translateX(102%); transition: transform .25s ease; z-index: 50; box-shadow: -20px 0 50px rgba(0,0,0,.4); }
#drawer.on { transform: none; }
.drawer-inner { height: 100%; overflow: auto; }
.fd-head { padding: 18px 22px 0; display: flex; align-items: center; gap: 12px; }
.fd-head .al { font-weight: 700; } .fd-head .sub { color: var(--text2); font-size: 12.5px; }
.fd-close { margin-left: auto; }
.fd-route { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; padding: 18px 22px 8px; }
.fd-route .ap .c { font-size: 40px; letter-spacing: 1px; line-height: 1; }
.fd-route .ap .city { color: var(--text2); font-size: 13px; margin-top: 4px; }
.fd-route .ap .tm { font-size: 22px; font-weight: 700; margin-top: 10px; font-variant-numeric: tabular-nums; }
.fd-route .ap .dt { color: var(--muted); font-size: 12px; }
.fd-route .mid { text-align: center; color: var(--text2); font-size: 12px; }
.fd-route .mid .pl { font-size: 22px; color: var(--accent2); }
.fd-map { height: 210px; margin: 8px 22px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); }
.fd-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin: 14px 22px; }
.fd-grid > div { background: var(--card); padding: 10px 12px; min-height: 58px; }
.fd-grid .k { font-size: 10.5px; text-transform: uppercase; letter-spacing: .7px; color: var(--muted); font-weight: 700; }
.fd-grid .v { font-weight: 700; margin-top: 3px; font-size: 13.5px; }
.fd-sec { margin: 16px 22px; }
.fd-sec h4 { margin: 0 0 8px; font-size: 11px; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); }
.fd-actions { display: flex; gap: 8px; flex-wrap: wrap; padding: 6px 22px 26px; }
.live { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.live .row { display: flex; justify-content: space-between; padding: 4px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.live .row:last-child { border-bottom: 0; }
.note { background: rgba(255,182,72,.07); border: 1px solid rgba(255,182,72,.25); color: #ffd9a1; border-radius: 12px; padding: 10px 12px; font-size: 12.5px; }

/* ---------- stats ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; }
.tile .v { font-size: 26px; font-weight: 800; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.tile .v small { font-size: 13px; color: var(--text2); font-weight: 600; margin-left: 3px; }
.tile .l { font-size: 11px; text-transform: uppercase; letter-spacing: .7px; color: var(--muted); font-weight: 700; }
.tile .x { font-size: 12px; color: var(--text2); margin-top: 2px; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.fact { background: linear-gradient(150deg, #13204a, #0f1830); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: flex; gap: 14px; align-items: center; }
.fact .ic { font-size: 28px; width: 46px; height: 46px; display: grid; place-items: center; background: rgba(255,255,255,.05); border-radius: 12px; flex: none; }
.fact .v { font-size: 20px; font-weight: 800; }
.fact .l { font-size: 12.5px; color: var(--text2); }
.chartcard { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px 10px; }
.chartcard .ch { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.chartcard .ch h3 { margin: 0; font-size: 14px; }
.chartcard svg text { fill: var(--text2); font-size: 11px; }
.chartcard .grid line { stroke: #1c274a; }
.cols2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; } .cols3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.toplist .row { display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; align-items: center; padding: 7px 0; border-bottom: 1px solid #162045; font-size: 13px; cursor: default; }
.toplist .row:last-child { border-bottom: 0; }
.toplist .rk { color: var(--muted); font-weight: 700; font-size: 12px; }
.toplist .nm { min-width: 0; }
.toplist .nm .a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.toplist .bar { height: 4px; border-radius: 2px; background: var(--bar); margin-top: 5px; }
.toplist .cnt { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text); }
.records { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.rec { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; cursor: pointer; }
.rec:hover { border-color: var(--line2); }
.rec .k { font-size: 11px; text-transform: uppercase; letter-spacing: .7px; color: var(--muted); font-weight: 700; }
.rec .v { font-size: 18px; font-weight: 800; margin: 4px 0 2px; }
.rec .x { color: var(--text2); font-size: 12.5px; }

/* ---------- trophies ---------- */
.trophy-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 12px; }
.trophy { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px 14px 14px; text-align: center; cursor: pointer; transition: transform .12s, border-color .12s; }
.trophy:hover { transform: translateY(-2px); border-color: var(--line2); }
.trophy.locked .med { filter: grayscale(1) brightness(.55); }
.trophy.locked .nm { color: var(--text2); }
.med { width: 74px; height: 74px; margin: 0 auto 10px; border-radius: 50%; display: grid; place-items: center; font-size: 32px; position: relative;
  background: radial-gradient(circle at 35% 30%, #22305e, #0d1530 70%); box-shadow: 0 0 0 3px var(--ring, #2a3963), 0 0 0 6px rgba(0,0,0,.25), 0 10px 22px rgba(0,0,0,.35); }
.med[data-tier="1"] { --ring: #cd8a4a; } .med[data-tier="2"] { --ring: #c7d0dc; } .med[data-tier="3"] { --ring: #f2c14e; } .med[data-tier="4"] { --ring: #8fe3ff; } .med[data-tier="5"] { --ring: #c39bff; }
.med.once[data-tier="1"] { --ring: #4fc3ff; }
.med .lv { position: absolute; bottom: -6px; right: -4px; background: var(--ring); color: #0b1020; font-size: 10px; font-weight: 800; border-radius: 9px; padding: 1px 6px; }
.trophy .nm { font-weight: 800; font-size: 14px; }
.trophy .tn { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .7px; margin-top: 2px; }
.trophy .ds { font-size: 12px; color: var(--text2); margin-top: 6px; min-height: 34px; }
.prog { height: 5px; border-radius: 3px; background: #1a2550; margin-top: 10px; overflow: hidden; }
.prog > i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent2)); border-radius: 3px; }
.prog-l { font-size: 11px; color: var(--muted); margin-top: 5px; font-variant-numeric: tabular-nums; }
.tierlist .tr { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line); }

/* ---------- collections ---------- */
.stamps { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.stamp { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: flex; gap: 12px; align-items: center; }
.stamp .fi { font-size: 30px; border-radius: 4px; }
.stamp .n { font-weight: 700; line-height: 1.2; } .stamp .x { font-size: 11.5px; color: var(--muted); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); cursor: pointer; user-select: none; white-space: nowrap; }
.tbl td { padding: 9px 10px; border-bottom: 1px solid #141d3d; }
.tbl tr:hover td { background: #10193a; }
.tbl td.n, .tbl th.n { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- year in review ---------- */
.yr-hero { background: radial-gradient(1200px 400px at 20% -40%, #2852c8 0%, rgba(40,82,200,0) 60%), linear-gradient(160deg, #101a3d, #0b1129); border: 1px solid var(--line); border-radius: 20px; padding: 26px 28px; position: relative; overflow: hidden; }
.yr-hero .big { font-size: 46px; font-weight: 800; letter-spacing: -1px; line-height: 1; }
.yr-hero .yrmap { height: 300px; margin-top: 16px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); position: relative; }
.delta { font-size: 12px; font-weight: 700; margin-left: 6px; } .delta.up { color: var(--good); } .delta.down { color: var(--bad); }

/* ---------- modal ---------- */
#modal { position: fixed; inset: 0; z-index: 60; background: rgba(2,4,10,.6); display: grid; place-items: center; padding: 40px 20px; }
#modal[hidden] { display: none; }
.modal-card { width: min(760px, 100%); max-height: calc(100vh - 80px); overflow: auto; background: var(--panel); border: 1px solid var(--line2); border-radius: 18px; box-shadow: var(--shadow); }
.mh { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px 0; }
.mh h3 { margin: 0; font-size: 18px; }
.mb { padding: 14px 22px 22px; }
.mf { display: flex; justify-content: flex-end; gap: 8px; padding: 0 22px 20px; }
.ac-list { position: absolute; top: 100%; left: 0; right: 0; z-index: 5; background: #0c1430; border: 1px solid var(--line2); border-radius: 10px; margin-top: 4px; max-height: 260px; overflow: auto; box-shadow: var(--shadow); }
.ac-list div { padding: 8px 12px; cursor: pointer; font-size: 13px; color: var(--text); font-weight: 500; }
.ac-list div:hover, .ac-list div.on { background: var(--accent-soft); }
.ac-list b { display: inline-block; width: 38px; }
.hint { font-size: 12px; color: var(--muted); margin-top: 10px; }
.hint.ok { color: var(--good); }
.detect .row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.drop { border: 1.5px dashed var(--line2); border-radius: 14px; padding: 22px; text-align: center; color: var(--text2); cursor: pointer; }
.drop:hover, .drop.over { border-color: var(--accent); color: var(--text); background: var(--accent-soft); }
#toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 80; background: #142047; border: 1px solid var(--line2); padding: 10px 16px; border-radius: 12px; box-shadow: var(--shadow); font-weight: 600; }
.settings-sec { margin-bottom: 18px; }
.settings-sec .card { display: grid; gap: 14px; }
.kv { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.kv .d { color: var(--muted); font-size: 12px; }
.switch { width: 40px; height: 22px; border-radius: 11px; background: #23305c; position: relative; cursor: pointer; border: 0; flex: none; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .15s; }
.switch.on { background: var(--accent); } .switch.on::after { left: 21px; }
@media (max-width: 1100px) { .cols3 { grid-template-columns: 1fr 1fr; } .map-side { display: none; } }
@media (max-width: 860px) { .cols2, .cols3, .grid3, .grid4 { grid-template-columns: 1fr; } }

.ap { min-width: 0; } .ap .t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#drawer .leg { grid-template-columns: 36px 1fr 118px; gap: 10px; padding: 10px 12px; }
#drawer .albadge { width: 34px; height: 34px; font-size: 11.5px; border-radius: 10px; }
#drawer .ap .c { font-size: 17px; } #drawer .legmain { gap: 8px; } #drawer .path { min-width: 60px; } #drawer .path .du { font-size: 10px; }
#drawer .legside { font-size: 11.5px; }
