/* Jasper themes. Tokens and skins come from theme-gallery.html (PLAN.md §7); app additions at the end. */
:root, :root[data-skin="bridge"] {
  --bg: #000; --panel: #000; --panel-2: #0d0a08; --fg: #f6e3c4; --muted: #b39a7a;
  --a1: #ff9966; --a2: #cc99cc; --a3: #9999ff; --a4: #ffcc66;
  --ok: #8fd18b; --warn: #ffcc66; --bad: #ff5f4a; --line: #3a2c22; --on-accent: #000;
  --font-d: "Antonio", "Arial Narrow", sans-serif; --font-b: "Antonio", "Arial Narrow", sans-serif; --font-m: "Antonio", "Arial Narrow", sans-serif;
  --radius: 0px; --pill: 999px; --case: uppercase; --track: .06em; --base: 15px;
  color-scheme: dark;
}
:root[data-skin="tactical"] {
  --bg: #0b0806; --panel: #110c08; --panel-2: #1a120b; --fg: #ffb347; --muted: #a8763a;
  --a1: #ff5a36; --a2: #ffd27a; --a3: #ffb347; --a4: #ff8a3d;
  --ok: #ffd27a; --warn: #ff8a3d; --bad: #ff3b2a; --line: #5a3a1c; --on-accent: #0b0806;
  --font-d: "Share Tech Mono", ui-monospace, monospace; --font-b: "Share Tech Mono", ui-monospace, monospace; --font-m: "Share Tech Mono", ui-monospace, monospace;
  --radius: 0px; --pill: 0px; --case: uppercase; --track: .12em; --base: 14px;
  color-scheme: dark;
}
:root[data-skin="phosphor"] {
  --bg: #010803; --panel: #021006; --panel-2: #03170a; --fg: #66ff8f; --muted: #2f9a4f;
  --a1: #66ff8f; --a2: #b6ffc8; --a3: #3fd46a; --a4: #b6ffc8;
  --ok: #66ff8f; --warn: #d8ff6a; --bad: #ff7a5a; --line: #145c28; --on-accent: #010803;
  --font-d: "VT323", ui-monospace, monospace; --font-b: "VT323", ui-monospace, monospace; --font-m: "VT323", ui-monospace, monospace;
  --radius: 0px; --pill: 0px; --case: uppercase; --track: .04em; --base: 19px;
  color-scheme: dark;
}
:root[data-skin="taxi"] {
  --bg: #dfe5e8; --panel: #ffffff; --panel-2: #eef2f4; --fg: #16191d; --muted: #5b6670;
  --a1: #ff6a00; --a2: #00a3a6; --a3: #ffd000; --a4: #16191d;
  --ok: #0f9d58; --warn: #e89400; --bad: #e0281b; --line: #16191d; --on-accent: #16191d;
  --font-d: "Big Shoulders Display", "Impact", sans-serif; --font-b: "Barlow", "Segoe UI", sans-serif; --font-m: "Barlow", "Segoe UI", sans-serif;
  --radius: 14px; --pill: 999px; --case: none; --track: .02em; --base: 15px;
  color-scheme: light;
}
:root[data-skin="hud"] {
  --bg: #050f18; --panel: rgba(18, 52, 72, .38); --panel-2: rgba(30, 80, 105, .30); --fg: #d4f1ff; --muted: #7fa9bd;
  --a1: #3fd0ff; --a2: #ff4f8b; --a3: #8ef0d0; --a4: #ffc857;
  --ok: #57e6a8; --warn: #ffc857; --bad: #ff4f6d; --line: rgba(63, 208, 255, .35); --on-accent: #050f18;
  --font-d: "Rajdhani", "Segoe UI", sans-serif; --font-b: "Rajdhani", "Segoe UI", sans-serif; --font-m: "IBM Plex Mono", ui-monospace, monospace;
  --radius: 0px; --pill: 0px; --case: uppercase; --track: .08em; --base: 15px;
  color-scheme: dark;
}
:root[data-skin="forge"] {
  --bg: #070b12; --panel: rgba(12, 22, 34, .8); --panel-2: rgba(127, 216, 255, .08); --fg: #dff6ff; --muted: #86a6b8;
  --a1: #f2b134; --a2: #d7263d; --a3: #7fd8ff; --a4: #f2b134;
  --ok: #5ee0a0; --warn: #f2b134; --bad: #ff4d5e; --line: rgba(127, 216, 255, .28); --on-accent: #070b12;
  --font-d: "Oxanium", "Segoe UI", sans-serif; --font-b: "Exo 2", "Segoe UI", sans-serif; --font-m: "Share Tech Mono", ui-monospace, monospace;
  --radius: 4px; --pill: 3px; --case: uppercase; --track: .1em; --base: 15px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
body {
  background: var(--bg); color: var(--fg);
  font-family: var(--font-b); font-size: var(--base); line-height: 1.4;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 16px 32px;
  transition: background-color .3s;
}
:root[data-skin="hud"] body {
  background: radial-gradient(1200px 600px at 70% -10%, #0e3a52 0%, transparent 60%), radial-gradient(900px 500px at -10% 110%, #2a0f2a 0%, transparent 55%), var(--bg);
  background-attachment: fixed;
}
button, select, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--a1); outline-offset: 2px; }

/* ---------- frame ---------- */
.cc {
  max-width: 1280px; margin: 0 auto;
  display: grid; grid-template-columns: 168px minmax(0, 1fr); grid-template-rows: auto 1fr;
  grid-template-areas: "corner top" "side main"; gap: 0 16px;
}
.corner { grid-area: corner; }
.top {
  grid-area: top; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px;
  padding: 10px 14px; min-width: 0;
}
.brand { font-family: var(--font-d); font-size: 1.9em; font-weight: 700; text-transform: var(--case); letter-spacing: var(--track); line-height: 1; margin: 0; }
.brand small { display: block; font-size: .42em; font-weight: 400; color: var(--muted); letter-spacing: .12em; margin-top: 4px; }
.top-stats { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-left: auto; font-family: var(--font-m); font-size: .85em; font-variant-numeric: tabular-nums; }
.top-stats .k { color: var(--muted); margin-right: 4px; }
.clock { font-family: var(--font-d); font-size: 1.6em; font-variant-numeric: tabular-nums; letter-spacing: .04em; }

.side { grid-area: side; display: flex; flex-direction: column; gap: 6px; padding-top: 16px; }
.nav-btn {
  text-align: left; padding: 10px 12px; cursor: pointer; border: 0; background: var(--panel-2);
  font-family: var(--font-d); text-transform: var(--case); letter-spacing: var(--track); font-size: 1em;
  border-radius: var(--radius); color: var(--fg);
}
.nav-btn .n { float: right; font-family: var(--font-m); font-size: .85em; opacity: .75; }
.nav-btn[aria-current="page"] { background: var(--a1); color: var(--on-accent); }

.grid { grid-area: main; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; padding-top: 16px; min-width: 0; }
.panel { grid-column: span 4; min-width: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; }
.panel.w8 { grid-column: span 8; } .panel.w6 { grid-column: span 6; }
.ph { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.ph h2 { margin: 0; font-family: var(--font-d); font-size: 1.15em; font-weight: 700; text-transform: var(--case); letter-spacing: var(--track); }
.ph .tag { margin-left: auto; font-family: var(--font-m); font-size: .75em; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.pb { padding: 12px; display: flex; flex-direction: column; gap: 10px; min-width: 0; flex: 1; }

/* brief */
.brief-text { margin: 0; font-size: 1.05em; max-width: 68ch; }
.brief-text em { font-style: normal; color: var(--a1); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-family: var(--font-m); font-size: .8em; padding: 3px 10px; border: 1px solid var(--line); border-radius: var(--pill); font-variant-numeric: tabular-nums; }
.chip b { color: var(--a1); font-weight: 600; margin-right: 4px; }

/* calendar */
.events { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.events li { display: grid; grid-template-columns: 4.6em 1fr; gap: 10px; align-items: baseline; }
.events time { font-family: var(--font-m); color: var(--a2); font-variant-numeric: tabular-nums; }
.events .in { font-size: .8em; color: var(--muted); display: block; }

/* messages */
.tabs { display: flex; flex-wrap: wrap; gap: 4px; }
.tab {
  cursor: pointer; padding: 4px 10px; border: 1px solid var(--line); background: transparent; border-radius: var(--pill);
  font-family: var(--font-d); text-transform: var(--case); letter-spacing: var(--track); font-size: .85em;
}
.tab .u { font-family: var(--font-m); margin-left: 6px; color: var(--a1); }
.tab[aria-selected="true"] { background: var(--a2); border-color: var(--a2); color: var(--on-accent); }
.tab[aria-selected="true"] .u { color: var(--on-accent); }
.msgs { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-height: 260px; overflow-y: auto; }
.msg { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; padding-bottom: 8px; border-bottom: 1px dashed var(--line); }
.msg:last-child { border-bottom: 0; }
.msg .t { font-family: var(--font-m); font-size: .8em; color: var(--muted); font-variant-numeric: tabular-nums; grid-row: span 2; padding-top: 2px; }
.msg .who { font-weight: 600; color: var(--a3); }
.msg .via { font-family: var(--font-m); font-size: .75em; color: var(--muted); margin-left: 6px; }
.msg .txt { overflow-wrap: anywhere; }
.msg.mine .who { color: var(--a1); }
.compose { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 6px; align-items: center; }
.compose select, .compose input {
  background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 7px 8px; min-width: 0;
}
.compose select { max-width: 10.5em; }
.send {
  cursor: pointer; border: 0; padding: 7px 14px; background: var(--a1); color: var(--on-accent); border-radius: var(--pill);
  font-family: var(--font-d); text-transform: var(--case); letter-spacing: var(--track); font-weight: 700;
}
.send:disabled { opacity: .4; cursor: not-allowed; }
.meter { grid-column: 1 / -1; font-family: var(--font-m); font-size: .78em; color: var(--muted); display: flex; justify-content: space-between; gap: 8px; font-variant-numeric: tabular-nums; }
.meter.over .bytes { color: var(--bad); }

/* notifications */
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: .9em; }
.switch { cursor: pointer; border: 1px solid var(--line); background: var(--panel-2); border-radius: var(--pill); padding: 3px 10px; font-family: var(--font-m); font-size: .8em; }
.switch[aria-checked="true"] { background: var(--warn); color: var(--on-accent); border-color: var(--warn); }
.notes { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.notes li { display: grid; grid-template-columns: 3.6em 1fr auto; gap: 8px; align-items: baseline; font-size: .92em; }
.notes .ntag { font-family: var(--font-m); color: var(--a4); }
.state { font-family: var(--font-m); font-size: .72em; padding: 1px 7px; border-radius: var(--pill); border: 1px solid currentColor; text-transform: uppercase; }
.state.sent { color: var(--ok); } .state.queued { color: var(--warn); } .state.held { color: var(--muted); }

/* to-do */
.todo-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.gm-status { font-family: var(--font-m); font-size: .78em; color: var(--muted); }
.todo-list { list-style: none; margin: 0; padding: 0; display: grid; }
.todo { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 2px 10px; align-items: start; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.todo:last-child { border-bottom: 0; }
.todo input[type="checkbox"] { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--a1); cursor: pointer; }
.todo .nm { overflow-wrap: anywhere; }
.todo .nm a { color: var(--a3); text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 3px; }
.todo .why { display: block; font-size: .8em; color: var(--muted); }
.todo .meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: flex-end; }
.due { font-family: var(--font-m); font-size: .75em; padding: 1px 7px; border: 1px solid var(--line); border-radius: var(--pill); white-space: nowrap; font-variant-numeric: tabular-nums; }
.due.over { color: var(--bad); border-color: var(--bad); }
.due.today { color: var(--warn); border-color: var(--warn); }
.src { font-family: var(--font-m); font-size: .7em; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; }
.src.gmail { color: var(--a2); }
.mini { background: none; border: 0; padding: 0 2px; cursor: pointer; color: var(--muted); font-family: var(--font-m); font-size: .72em; text-decoration: underline; text-underline-offset: 2px; }
.mini:hover { color: var(--fg); }
.todo.done .nm, .todo.done .nm a { text-decoration: line-through; color: var(--muted); }
.todo.done .due { opacity: .5; }
.todo-empty { color: var(--muted); font-size: .9em; padding: 6px 0; }
.todo-add { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1.4fr) auto auto; gap: 6px; align-items: center; }
.todo-add input { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 7px 8px; min-width: 0; }
.todo-add .meter.err span:first-child { color: var(--bad); }
:root[data-skin="bridge"] .todo-add input { background: #1a120c; border: 0; border-radius: 999px; padding-inline: 14px; }
:root[data-skin="taxi"] .todo-add input { border: 2px solid var(--line); border-radius: 8px; }
:root[data-skin="taxi"] .src.gmail, :root[data-skin="taxi"] .todo .nm a { color: #007f82; }
:root[data-skin="taxi"] .due.today { color: #a86200; border-color: #a86200; }

/* fantasy */
.panel.w12 { grid-column: 1 / -1; }
.ff { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
.ff-col { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ff-h { margin: 0; display: flex; justify-content: space-between; gap: 8px; align-items: baseline; font-family: var(--font-d); font-size: .95em; text-transform: var(--case); letter-spacing: var(--track); color: var(--a3); }
.ff-h span { font-family: var(--font-m); font-size: .78em; color: var(--muted); text-transform: none; letter-spacing: 0; }
.tl { border-left: 4px solid var(--team); padding: 2px 0 2px 10px; }
.tl b { font-family: var(--font-d); text-transform: var(--case); letter-spacing: var(--track); font-size: .85em; }
.tl ol { margin: 4px 0 0; padding-left: 1.2em; display: grid; gap: 4px; font-size: .92em; }
.dl { display: inline-block; margin-left: 6px; font-family: var(--font-m); font-size: .78em; color: var(--warn); white-space: nowrap; }
.ff-links { display: flex; flex-wrap: wrap; gap: 14px; font-size: .85em; }
.ff-links a { color: var(--a3); }
.alert { border: 1px solid var(--bad); color: var(--bad); padding: 6px 8px; font-size: .85em; border-radius: var(--radius); }
.alert b { font-family: var(--font-m); letter-spacing: .06em; margin-right: 6px; }
.ff-mu { display: grid; gap: 8px; }
.mu { border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 10px; display: grid; gap: 4px; }
.mu-row { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.sw { width: 10px; height: 10px; border-radius: 2px; }
.tm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc { font-family: var(--font-d); font-size: 1.4em; font-variant-numeric: tabular-nums; }
.mu-row.lead .sc { color: var(--a1); }
.mu-sub { font-family: var(--font-m); font-size: .75em; color: var(--muted); font-variant-numeric: tabular-nums; }
.wp { height: 6px; background: var(--panel-2); border-radius: var(--pill); overflow: hidden; }
.wp span { display: block; height: 100%; background: var(--ok); transition: width .6s; }
.ff-others { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; font-family: var(--font-m); font-size: .78em; color: var(--muted); font-variant-numeric: tabular-nums; }
.feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 290px; overflow-y: auto; align-content: start; }
.feed li { display: grid; grid-template-columns: 3.6em minmax(0, 1fr) auto; gap: 8px; font-size: .88em; align-items: baseline; padding: 2px 4px; }
.feed .ft { font-family: var(--font-m); color: var(--muted); font-size: .85em; font-variant-numeric: tabular-nums; }
.feed .fw { overflow-wrap: anywhere; }
.feed .fw i { font-style: normal; color: var(--muted); }
.feed .fp { font-family: var(--font-m); color: var(--ok); font-variant-numeric: tabular-nums; }
.feed .fp.neg { color: var(--bad); }
.feed li.new { animation: flash 1.4s ease-out; }
@keyframes flash { from { background: var(--panel-2); } to { background: transparent; } }
:root[data-skin="taxi"] .ff-h { color: var(--fg); }
:root[data-skin="taxi"] .ff-links a { color: #007f82; }
:root[data-skin="taxi"] .dl { color: #a86200; }
:root[data-skin="taxi"] .mu-row.lead .sc { color: #c24f00; }
:root[data-skin="taxi"] .mu { border: 2px solid var(--line); }

/* home */
.home { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 16px; }
.mode-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.mode { font-family: var(--font-d); font-size: 1.3em; font-weight: 700; text-transform: var(--case); letter-spacing: var(--track); padding: 2px 12px; border: 2px solid var(--ok); color: var(--ok); border-radius: var(--pill); }
.snaps { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.snap { margin: 0; display: grid; gap: 4px; }
.shot { aspect-ratio: 16 / 9; max-width: 100%; border: 1px solid var(--line); border-radius: var(--radius); display: grid; place-items: end start; padding: 6px;
  background: linear-gradient(160deg, var(--panel-2) 0%, var(--bg) 70%), var(--bg); }
.shot span { font-family: var(--font-m); font-size: .72em; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.snap figcaption { font-size: .85em; font-family: var(--font-m); color: var(--muted); }
.snap figcaption b { color: var(--fg); font-family: var(--font-b); font-weight: 600; margin-right: 4px; }
:root[data-skin="taxi"] .shot { border: 2px solid var(--line); }
@media (max-width: 720px) { .home { grid-template-columns: minmax(0, 1fr); } }

/* radios + system */
.rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.row { display: grid; grid-template-columns: 10px 1fr auto; gap: 8px; align-items: center; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.dot.warn { background: var(--warn); box-shadow: 0 0 8px var(--warn); }
.row .sub { display: block; font-size: .78em; color: var(--muted); font-family: var(--font-m); }
.row .val { font-family: var(--font-m); font-size: .85em; font-variant-numeric: tabular-nums; text-align: right; }
.bars { display: grid; gap: 5px; }
.bar { display: grid; grid-template-columns: 9.5em 1fr 3.4em; gap: 8px; align-items: center; font-family: var(--font-m); font-size: .8em; font-variant-numeric: tabular-nums; }
.bar .track { height: 8px; background: var(--panel-2); border-radius: var(--pill); overflow: hidden; }
.bar .fill { height: 100%; background: var(--a3); border-radius: var(--pill); }
.bar.plan .fill { background: transparent; border: 1px dashed var(--a1); }
.bar .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar .mb { text-align: right; }

/* ============ SKIN: bridge (rounded elbow frame, colored blocks) ============ */
:root[data-skin="bridge"] .corner { background: var(--a1); border-top-left-radius: 48px; position: relative; min-height: 72px; }
:root[data-skin="bridge"] .corner::after { content: ""; position: absolute; right: 0; bottom: 0; width: 40px; height: 24px; background: var(--bg); border-top-left-radius: 24px; }
:root[data-skin="bridge"] .top { padding: 0; align-items: stretch; }
:root[data-skin="bridge"] .top::before { content: ""; order: 2; flex: 1; min-width: 40px; background: var(--a1); height: 24px; align-self: flex-start; }
:root[data-skin="bridge"] .brand { order: 1; color: var(--a4); padding-top: 2px; font-size: 2.3em; }
:root[data-skin="bridge"] .top-stats { order: 3; margin-left: 0; align-self: flex-end; color: var(--a2); }
:root[data-skin="bridge"] .clock { order: 4; color: var(--a1); align-self: flex-start; line-height: 24px; height: 24px; }
:root[data-skin="bridge"] .side { padding-top: 6px; gap: 4px; }
:root[data-skin="bridge"] .nav-btn { color: var(--on-accent); padding: 18px 10px 4px; text-align: right; font-size: 1.05em; }
:root[data-skin="bridge"] .nav-btn .n { float: left; }
:root[data-skin="bridge"] .nav-btn:nth-child(6n+1) { background: var(--a2); }
:root[data-skin="bridge"] .nav-btn:nth-child(6n+2) { background: var(--a3); }
:root[data-skin="bridge"] .nav-btn:nth-child(6n+3) { background: var(--a4); }
:root[data-skin="bridge"] .nav-btn:nth-child(6n+4) { background: var(--a1); }
:root[data-skin="bridge"] .nav-btn:nth-child(6n+5) { background: var(--a2); }
:root[data-skin="bridge"] .nav-btn:nth-child(6n+6) { background: var(--a3); }
:root[data-skin="bridge"] .nav-btn[aria-current="page"] { background: var(--fg); }
:root[data-skin="bridge"] .side::after { content: ""; flex: 1; min-height: 40px; background: var(--a1); border-bottom-left-radius: 48px; }
:root[data-skin="bridge"] .panel { border: 0; }
:root[data-skin="bridge"] .ph { border: 0; padding: 0; gap: 8px; }
:root[data-skin="bridge"] .ph::before { content: ""; width: 22px; height: 26px; background: var(--a3); border-radius: 13px 0 0 13px; }
:root[data-skin="bridge"] .ph h2 { background: transparent; color: var(--a4); font-size: 1.3em; }
:root[data-skin="bridge"] .ph::after { content: ""; flex: 1; height: 8px; background: var(--a2); border-radius: 0 4px 4px 0; order: 3; }
:root[data-skin="bridge"] .ph .tag { order: 4; margin-left: 0; color: var(--a2); }
:root[data-skin="bridge"] .pb { padding: 10px 0 0 30px; }
:root[data-skin="bridge"] .msg { border-bottom-color: #2a2016; }
:root[data-skin="bridge"] .compose select, :root[data-skin="bridge"] .compose input { background: #1a120c; border: 0; border-radius: 999px; padding-inline: 14px; }
:root[data-skin="bridge"] .bar .fill { background: var(--a3); }

/* ============ SKIN: tactical (amber vector lines, corner brackets, scanlines) ============ */
:root[data-skin="tactical"] .cc { position: relative; }
:root[data-skin="tactical"] .cc::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 5;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,.22) 0 1px, transparent 1px 3px);
}
:root[data-skin="tactical"] .top { border: 1px solid var(--line); border-left: 4px solid var(--a1); }
:root[data-skin="tactical"] .brand { color: var(--a2); text-shadow: 0 0 10px rgba(255,179,71,.45); }
:root[data-skin="tactical"] .corner { border: 1px solid var(--line); background: repeating-linear-gradient(45deg, transparent 0 6px, rgba(255,90,54,.25) 6px 8px); }
:root[data-skin="tactical"] .nav-btn { background: transparent; border: 1px solid var(--line); }
:root[data-skin="tactical"] .nav-btn::before { content: "> "; color: var(--a1); }
:root[data-skin="tactical"] .panel {
  background:
    linear-gradient(var(--a3), var(--a3)) top left / 14px 2px no-repeat,
    linear-gradient(var(--a3), var(--a3)) top left / 2px 14px no-repeat,
    linear-gradient(var(--a3), var(--a3)) bottom right / 14px 2px no-repeat,
    linear-gradient(var(--a3), var(--a3)) bottom right / 2px 14px no-repeat,
    var(--panel);
  border-color: var(--line);
}
:root[data-skin="tactical"] .ph h2::before { content: "▲ "; color: var(--a1); font-size: .7em; vertical-align: 2px; }
:root[data-skin="tactical"] .ph { border-bottom-style: dashed; }
:root[data-skin="tactical"] .brief { position: relative; overflow: hidden; }
:root[data-skin="tactical"] .brief::after {
  content: ""; position: absolute; right: -40px; top: -40px; width: 180px; height: 180px; border-radius: 50%; pointer-events: none;
  border: 1px solid var(--line); box-shadow: 0 0 0 22px transparent, inset 0 0 0 22px rgba(255,90,54,.06);
  background: conic-gradient(from 0deg, rgba(255,179,71,.18), transparent 25%);
  animation: sweep 6s linear infinite;
}
@keyframes sweep { to { transform: rotate(360deg); } }

/* ============ SKIN: phosphor (green CRT terminal) ============ */
:root[data-skin="phosphor"] body { text-shadow: 0 0 6px rgba(102,255,143,.45); }
:root[data-skin="phosphor"] .cc::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 5;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,.28) 0 2px, transparent 2px 4px), radial-gradient(ellipse at center, transparent 60%, rgba(0,0,0,.55) 100%);
}
:root[data-skin="phosphor"] .top { border: 3px double var(--line); }
:root[data-skin="phosphor"] .corner { border: 3px double var(--line); display: grid; place-items: center; }
:root[data-skin="phosphor"] .corner::before { content: "INTERFACE 2037"; font-size: .8em; color: var(--muted); }
:root[data-skin="phosphor"] .panel { border: 3px double var(--line); }
:root[data-skin="phosphor"] .ph h2::before { content: "■ "; }
:root[data-skin="phosphor"] .nav-btn { background: transparent; border: 1px solid var(--line); }
:root[data-skin="phosphor"] .nav-btn[aria-current="page"] { text-shadow: none; }
:root[data-skin="phosphor"] .send, :root[data-skin="phosphor"] .tab[aria-selected="true"], :root[data-skin="phosphor"] .skin-btn[aria-pressed="true"] { text-shadow: none; }
:root[data-skin="phosphor"] .brief-text::after { content: "█"; margin-left: 4px; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
:root[data-skin="phosphor"] .dot { border-radius: 0; }

/* ============ SKIN: taxi (bright 90s industrial futurism) ============ */
:root[data-skin="taxi"] .top { background: var(--a3); border: 3px solid var(--line); border-radius: var(--radius); }
:root[data-skin="taxi"] .brand { font-weight: 900; font-size: 2.2em; letter-spacing: .01em; text-transform: uppercase; }
:root[data-skin="taxi"] .brand small { color: var(--fg); opacity: .7; }
:root[data-skin="taxi"] .corner { border-radius: var(--radius); border: 3px solid var(--line); background: repeating-linear-gradient(-45deg, var(--fg) 0 12px, var(--a3) 12px 24px); }
:root[data-skin="taxi"] .nav-btn { background: var(--panel); border: 3px solid var(--line); font-weight: 800; font-size: 1.15em; text-transform: uppercase; }
:root[data-skin="taxi"] .nav-btn[aria-current="page"] { background: var(--a1); color: var(--fg); }
:root[data-skin="taxi"] .panel { border: 3px solid var(--line); box-shadow: 6px 6px 0 var(--line); }
:root[data-skin="taxi"] .ph { background: var(--fg); color: var(--panel); border-radius: 10px 10px 0 0; }
:root[data-skin="taxi"] .ph h2 { font-weight: 800; font-size: 1.35em; text-transform: uppercase; }
:root[data-skin="taxi"] .ph .tag { color: var(--a3); }
:root[data-skin="taxi"] .panel:nth-child(3n+1) .ph { background: var(--a2); color: var(--fg); }
:root[data-skin="taxi"] .panel:nth-child(3n+1) .ph .tag { color: var(--fg); }
:root[data-skin="taxi"] .panel:nth-child(3n+2) .ph { background: var(--a1); color: var(--fg); }
:root[data-skin="taxi"] .panel:nth-child(3n+2) .ph .tag { color: var(--fg); }
:root[data-skin="taxi"] .tab { font-weight: 800; text-transform: uppercase; border-width: 2px; border-color: var(--line); }
:root[data-skin="taxi"] .tab[aria-selected="true"] { background: var(--a3); border-color: var(--line); color: var(--fg); }
:root[data-skin="taxi"] .send { background: var(--a1); color: var(--fg); border: 2px solid var(--line); text-transform: uppercase; font-size: 1.05em; }
:root[data-skin="taxi"] .msg .who { color: #007f82; }
:root[data-skin="taxi"] .msg.mine .who { color: #c24f00; }
:root[data-skin="taxi"] .events time { color: #007f82; font-weight: 600; }
:root[data-skin="taxi"] .brief-text em { color: #c24f00; font-weight: 600; }
:root[data-skin="taxi"] .chip b, :root[data-skin="taxi"] .tab .u { color: #c24f00; }
:root[data-skin="taxi"] .notes .ntag { color: #c24f00; font-weight: 600; }
:root[data-skin="taxi"] .bar .fill { background: var(--a2); }
:root[data-skin="taxi"] .dot { box-shadow: none; border: 2px solid var(--line); width: 12px; height: 12px; }
:root[data-skin="taxi"] .compose select, :root[data-skin="taxi"] .compose input { border: 2px solid var(--line); border-radius: 8px; }
:root[data-skin="taxi"] .skin-btn { border: 2px solid var(--line); background: var(--panel); }
:root[data-skin="taxi"] .skin-btn[aria-pressed="true"] { background: var(--a3); color: var(--fg); border-color: var(--line); }
:root[data-skin="taxi"] .skin-btn[aria-pressed="true"] span { color: var(--fg); }

/* ============ SKIN: hud (glass panels, clipped corners, cyan/magenta) ============ */
:root[data-skin="hud"] .panel, :root[data-skin="hud"] .top {
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
  background: var(--panel);
}
:root[data-skin="hud"] .top { border: 1px solid var(--line); }
:root[data-skin="hud"] .brand { font-weight: 700; color: var(--a1); }
:root[data-skin="hud"] .corner { border-left: 2px solid var(--a1); border-top: 2px solid var(--a1); margin: 6px; }
:root[data-skin="hud"] .nav-btn { background: transparent; border-left: 2px solid var(--line); font-weight: 600; }
:root[data-skin="hud"] .nav-btn[aria-current="page"] { background: linear-gradient(90deg, rgba(63,208,255,.35), transparent); color: var(--fg); border-left-color: var(--a1); }
:root[data-skin="hud"] .ph { border-bottom: 1px solid var(--line); }
:root[data-skin="hud"] .ph h2 { font-weight: 700; color: var(--a1); }
:root[data-skin="hud"] .ph h2::after { content: ""; display: inline-block; width: 6px; height: 6px; background: var(--a2); margin-left: 8px; vertical-align: 3px; }
:root[data-skin="hud"] .tab[aria-selected="true"] { background: rgba(255,79,139,.85); border-color: var(--a2); color: #fff; }
:root[data-skin="hud"] .tab[aria-selected="true"] .u { color: #fff; }
:root[data-skin="hud"] .bar .fill { background: linear-gradient(90deg, var(--a1), var(--a3)); }
:root[data-skin="hud"] .send { clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%); padding-inline: 18px; }

/* ============ SKIN: forge (workshop hologram, arc reactor, red + gold) ============ */
:root[data-skin="forge"] body {
  background:
    linear-gradient(rgba(127,216,255,.045) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(90deg, rgba(127,216,255,.045) 1px, transparent 1px) 0 0 / 40px 40px,
    radial-gradient(1000px 520px at 50% -12%, #12324a 0%, transparent 65%),
    var(--bg);
  background-attachment: fixed;
}
:root[data-skin="forge"] .corner { position: relative; display: grid; place-items: center; min-height: 96px; }
:root[data-skin="forge"] .corner::before {
  content: ""; width: 58px; height: 58px; border-radius: 50%;
  background: radial-gradient(circle, #f4fdff 0 16%, #7fd8ff 17% 26%, rgba(127,216,255,.15) 27% 40%, rgba(127,216,255,.75) 41% 45%, transparent 46%);
  border: 2px solid rgba(127,216,255,.7);
  box-shadow: 0 0 22px rgba(127,216,255,.8), inset 0 0 14px rgba(127,216,255,.6);
  animation: reactor 3.2s ease-in-out infinite;
}
:root[data-skin="forge"] .corner::after {
  content: ""; position: absolute; width: 84px; height: 84px; border-radius: 50%;
  border: 2px dashed rgba(242,177,52,.7); animation: spin 18s linear infinite;
}
@keyframes reactor { 50% { box-shadow: 0 0 34px rgba(127,216,255,1), inset 0 0 20px rgba(127,216,255,.9); } }
@keyframes spin { to { transform: rotate(360deg); } }
:root[data-skin="forge"] .top { border-bottom: 1px solid var(--line); }
:root[data-skin="forge"] .brand { color: var(--a3); letter-spacing: .32em; text-shadow: 0 0 14px rgba(127,216,255,.7); font-size: 2.2em; }
:root[data-skin="forge"] .brand small { color: var(--a1); letter-spacing: .18em; text-shadow: none; }
:root[data-skin="forge"] .clock { color: var(--a1); }
:root[data-skin="forge"] .nav-btn { background: transparent; border: 1px solid var(--line); font-weight: 500; }
:root[data-skin="forge"] .nav-btn[aria-current="page"] { background: linear-gradient(90deg, var(--a2), #8e1424); color: #fff; border-color: var(--a2); }
:root[data-skin="forge"] .panel {
  border-top: 2px solid var(--a1);
  box-shadow: inset 0 0 28px rgba(127,216,255,.06), 0 0 0 1px rgba(0,0,0,.4);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  position: relative;
}
:root[data-skin="forge"] .panel::after {
  content: ""; position: absolute; right: 10px; top: 10px; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid var(--line); border-top-color: var(--a3); pointer-events: none;
}
:root[data-skin="forge"] .ph h2 { color: var(--a1); font-weight: 700; }
:root[data-skin="forge"] .ph .tag { margin-right: 28px; color: var(--a3); }
:root[data-skin="forge"] .ph::after { content: ""; position: absolute; left: 12px; top: 38px; width: 36px; height: 2px; background: var(--a2); }
:root[data-skin="forge"] .brief-text::before { content: "Good morning, Mike. "; color: var(--a3); }
:root[data-skin="forge"] .tab[aria-selected="true"] { background: var(--a2); border-color: var(--a2); color: #fff; }
:root[data-skin="forge"] .tab[aria-selected="true"] .u { color: #fff; }
:root[data-skin="forge"] .send { background: var(--a1); color: var(--on-accent); }
:root[data-skin="forge"] .bar .fill { background: var(--a3); box-shadow: 0 0 8px rgba(127,216,255,.7); }
:root[data-skin="forge"] .bar.plan .fill { box-shadow: none; }
:root[data-skin="forge"] .skin-btn[aria-pressed="true"] { background: var(--a2); border-color: var(--a2); color: #fff; }
:root[data-skin="forge"] .skin-btn[aria-pressed="true"] span { color: #fff; }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .panel, .panel.w6, .panel.w8 { grid-column: span 6; }
  .panel.brief { grid-column: span 12; }
}
@media (max-width: 720px) {
  .cc { grid-template-columns: minmax(0, 1fr); grid-template-areas: "top" "side" "main"; }
  .corner { display: none; }
  .side { flex-direction: row; flex-wrap: wrap; padding-top: 12px; }
  .side::after { display: none; }
  .nav-btn { flex: 1 1 auto; padding: 8px 10px !important; text-align: center !important; }
  .nav-btn .n { float: none !important; margin-left: 6px; }
  .grid { grid-template-columns: minmax(0, 1fr); }
  .panel, .panel.w6, .panel.w8, .panel.brief { grid-column: 1 / -1; }
  :root[data-skin="bridge"] .pb { padding-left: 0; }
  :root[data-skin="bridge"] .top::before { display: none; }
  .top-stats { margin-left: 0; }
  .compose { grid-template-columns: minmax(0, 1fr) auto; }
  .compose select { grid-column: 1 / -1; max-width: none; }
  .todo-add { grid-template-columns: minmax(0, 1fr) auto; }
  .todo-add #todo-name, .todo-add #todo-link { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ================= Jasper app additions (use theme tokens only) ================= */
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; }
a { color: var(--a3); }
:root[data-skin="taxi"] a { color: #007f82; }

/* header controls */
.theme-pick { display: flex; align-items: center; gap: 6px; font-family: var(--font-m); font-size: .8em; color: var(--muted); }
.theme-pick select, .field input, .field select, .codebox {
  background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 7px 9px; min-width: 0; color: var(--fg);
}
.theme-pick select { padding: 4px 6px; }
:root[data-skin="taxi"] .theme-pick select, :root[data-skin="taxi"] .field input { border: 2px solid var(--line); border-radius: 8px; }
:root[data-skin="taxi"] .theme-pick { color: var(--fg); }
.side .nav-foot { margin-top: auto; }

/* buttons */
.btn {
  cursor: pointer; border: 1px solid var(--line); background: var(--panel-2); color: var(--fg); padding: 6px 12px; border-radius: var(--pill);
  font-family: var(--font-d); text-transform: var(--case); letter-spacing: var(--track); font-size: .85em;
}
.btn:hover { border-color: var(--a1); }
.btn.primary { background: var(--a1); border-color: var(--a1); color: var(--on-accent); font-weight: 700; }
.btn.danger { border-color: var(--bad); color: var(--bad); background: transparent; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
:root[data-skin="taxi"] .btn { border: 2px solid var(--line); }
:root[data-skin="taxi"] .btn.primary { color: var(--fg); }
:root[data-skin="taxi"] .btn.danger { color: #b31d12; border-color: #b31d12; }
.btns { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* forms */
.form { display: grid; gap: 10px; max-width: 460px; }
.field { display: grid; gap: 4px; }
.field label { font-family: var(--font-m); font-size: .78em; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
:root[data-skin="taxi"] .field label { color: var(--fg); }
.field .hint { font-size: .78em; color: var(--muted); }
.codebox { font-family: var(--font-m); font-size: 1.3em; letter-spacing: .3em; max-width: 9em; text-align: center; }
.msgline { font-size: .9em; min-height: 1.3em; }
.msgline.err { color: var(--bad); }
.msgline.ok { color: var(--ok); }
:root[data-skin="taxi"] .msgline.ok { color: #0b7a44; }
.note { font-size: .88em; color: var(--muted); max-width: 70ch; }
.note b { color: var(--fg); }

/* sign-in / setup card */
.auth { min-height: calc(100vh - 48px); display: grid; place-items: center; }
.auth .panel { width: min(520px, 100%); }
.auth .brand { margin-bottom: 4px; }
.qr { background: #fff; padding: 8px; width: max-content; max-width: 100%; border-radius: 4px; }
.qr svg { display: block; max-width: 100%; height: auto; }
.secret { font-family: var(--font-m); letter-spacing: .08em; overflow-wrap: anywhere; user-select: all; }
.codes { display: grid; grid-template-columns: repeat(2, max-content); gap: 6px 24px; font-family: var(--font-m); font-size: 1.1em; user-select: all; }

/* mesh widgets */
.msgs.tall { max-height: 62vh; }
.msg .via .radio { color: var(--a2); }
:root[data-skin="taxi"] .msg .via .radio { color: #8a5a00; }
.msg .date { display: block; font-size: .85em; }
.readonly { font-family: var(--font-m); font-size: .78em; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 8px; }
.empty { color: var(--muted); font-size: .9em; padding: 6px 0; }
.banner { border: 1px solid var(--warn); color: var(--warn); padding: 8px 10px; border-radius: var(--radius); font-size: .9em; }
.banner.bad { border-color: var(--bad); color: var(--bad); }
:root[data-skin="taxi"] .banner { color: #8a5a00; border-color: #8a5a00; }
:root[data-skin="taxi"] .banner.bad { color: #b31d12; border-color: #b31d12; }
.dot.bad { background: var(--bad); box-shadow: 0 0 8px var(--bad); }
.dot.unknown { background: var(--muted); box-shadow: none; }
.row a { text-decoration: none; color: inherit; }
.row a:hover b, .row a:focus-visible b { text-decoration: underline; }

/* system page */
.conn { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.conn:last-child { border-bottom: 0; }
.conn h3 { margin: 0; font-family: var(--font-d); font-size: 1em; text-transform: var(--case); letter-spacing: var(--track); }
.conn .status { font-family: var(--font-m); font-size: .8em; white-space: nowrap; align-self: start; }
.conn .status.set { color: var(--ok); } .conn .status.unset { color: var(--warn); } .conn .status.later { color: var(--muted); }
:root[data-skin="taxi"] .conn .status.set { color: #0b7a44; } :root[data-skin="taxi"] .conn .status.unset { color: #8a5a00; }
.conn .note, .conn .btns, .conn .form, .conn .msgline { grid-column: 1 / -1; }
.conn .form { max-width: 560px; background: var(--panel-2); padding: 10px; border-radius: var(--radius); }
table.log { width: 100%; border-collapse: collapse; font-size: .85em; font-variant-numeric: tabular-nums; }
table.log th { text-align: left; font-family: var(--font-m); font-weight: 400; color: var(--muted); font-size: .85em; text-transform: uppercase; letter-spacing: .06em; padding: 4px 8px 4px 0; border-bottom: 1px solid var(--line); }
table.log td { padding: 5px 8px 5px 0; border-bottom: 1px dashed var(--line); vertical-align: top; overflow-wrap: anywhere; }
table.log td.ok { color: var(--ok); } table.log td.bad { color: var(--bad); }
:root[data-skin="taxi"] table.log td.ok { color: #0b7a44; }
.scroll { overflow-x: auto; max-height: 420px; overflow-y: auto; }
@media (max-width: 720px) {
  .theme-pick { width: 100%; }
  .conn { grid-template-columns: minmax(0, 1fr); }
  table.log .wide { display: none; }
}

/* fantasy additions */
.sw.inline { display: inline-block; vertical-align: middle; margin-right: 6px; }
.alert.warn { border-color: var(--warn); color: var(--warn); }
:root[data-skin="taxi"] .alert.warn { border-color: #8a5a00; color: #8a5a00; }
table.log tr.line td { border-bottom: 2px solid var(--a1); }
table.log tr.mine td { font-weight: 600; }
.lineups { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
table.lineup td.pts { font-family: var(--font-m); text-align: right; }
table.lineup tr.st-in td { background: var(--panel-2); }
table.lineup tr.st-in td.pts { color: var(--a1); }
table.lineup tr.bench td { opacity: .75; }
table.lineup tr.sep td { font-family: var(--font-m); font-size: .75em; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; padding-top: 10px; }
.inj { font-family: var(--font-m); font-size: .72em; color: var(--warn); font-weight: 600; }
.inj-out, .inj-injury_reserve, .inj-suspension, .inj-doubtful { color: var(--bad); }
:root[data-skin="taxi"] .inj { color: #8a5a00; }
:root[data-skin="taxi"] .inj-out, :root[data-skin="taxi"] .inj-injury_reserve, :root[data-skin="taxi"] .inj-doubtful { color: #b31d12; }
.scroll.tallish { max-height: none; }
