/* dustyCockpit — tablet panel mock (proposal). Stage is a fixed 1024x768 (iPad mini 2 landscape) scaled to fit.
   NOTE: this mock uses CSS variables + grid for speed of iteration. Every visual effect here (gradients, box-shadow,
   border-radius, 2D transforms, Canvas 2D, TTF webfonts) exists in Safari iOS 9; production themes would be flattened
   into one plain CSS file per theme, like pad/themes/cockpit.css in dustyPad. */

@font-face { font-family: "B612 Mono"; src: url("../assets/fonts/B612Mono-Regular.ttf") format("truetype"); font-weight: 400; }
@font-face { font-family: "B612 Mono"; src: url("../assets/fonts/B612Mono-Bold.ttf") format("truetype"); font-weight: 700; }
@font-face { font-family: "B612"; src: url("../assets/fonts/B612-normal-400.woff2") format("woff2"); font-weight: 400; }
@font-face { font-family: "B612"; src: url("../assets/fonts/B612-normal-700.woff2") format("woff2"); font-weight: 700; }
@font-face { font-family: "DSEG7"; src: url("../assets/fonts/DSEG7Classic-Bold.ttf") format("truetype"); }
@font-face { font-family: "Barlow Condensed"; src: url("../assets/fonts/BarlowCondensed-SemiBold.ttf") format("truetype"); font-weight: 600; }

* { box-sizing: border-box; -webkit-tap-highlight-color: rgba(0,0,0,0); }
html, body { margin: 0; height: 100%; overflow: hidden; background: #000; -webkit-user-select: none; user-select: none; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; border: 0; background: none; padding: 0; margin: 0; cursor: pointer; touch-action: manipulation; }

/* ---------------------------------------------------------------- theme tokens (default = Standard Dark) */
body {
  --bg: #151618;
  --bg-img: repeating-linear-gradient(180deg, rgba(255,255,255,.012) 0, rgba(255,255,255,.012) 1px, rgba(0,0,0,0) 2px, rgba(0,0,0,0) 4px);
  --line: #050506;
  --mod-bg: #1e2023; --mod-bd: 1px solid #08090a; --mod-r: 8px;
  --mod-sh: inset 0 1px 0 rgba(255,255,255,.07), 0 2px 0 #0b0c0d;
  --ink: #f2f1ec; --ink-dim: #8f9399;
  --f-legend: "Barlow Condensed", "Helvetica Neue", sans-serif; --ls: .12em; --fw: 600;
  --key-bg: linear-gradient(180deg, #3a3d42, #292b2f); --key-ink: #f2f1ec; --key-r: 7px;
  --key-sh: inset 0 1px 0 rgba(255,255,255,.14), inset 0 -2px 0 rgba(0,0,0,.35), 0 3px 0 #0a0b0c;
  --key-sh-p: inset 0 3px 6px rgba(0,0,0,.6);
  --lamp-off: #39443b;
  --on: #3df07c; --eng: #3df07c; --grn: #3df07c; --caut: #ffb020; --warn: #ff4a3d; --sel: #59d2ff;
  --disp-bg: #090604; --disp-ink: #ff9d33; --disp-ghost: rgba(255,157,51,.10); --disp-glow: 0 0 10px rgba(255,157,51,.45);
  --f-disp: "DSEG7", monospace; --disp-r: 5px;
  --map-water: #091521; --map-land: #17212a; --map-coast: #32485a; --map-ink: #b9c7d3; --map-rte: #ff4fd8; --map-own: #ffffff; --map-apt: #59d2ff;
}

body.th-liner {
  --bg: #687f94;
  --bg-img: linear-gradient(180deg, rgba(255,255,255,.05), rgba(0,0,0,.06));
  --line: rgba(255,255,255,.55);
  --mod-bg: rgba(20,35,50,.10); --mod-bd: 1.5px solid rgba(255,255,255,.78); --mod-r: 10px; --mod-sh: none;
  --ink: #ffffff; --ink-dim: #dbe6ef;
  --f-legend: "B612 Mono", monospace; --ls: .06em; --fw: 700;
  --key-bg: linear-gradient(180deg, #23282d, #0e1114); --key-ink: #ffffff; --key-r: 4px;
  --key-sh: 0 0 0 2px #46535f, 0 4px 0 #3b4854, inset 0 0 0 1px rgba(255,255,255,.22);
  --key-sh-p: 0 0 0 2px #46535f, inset 0 0 0 1px rgba(255,255,255,.22), inset 0 3px 6px rgba(0,0,0,.7);
  --lamp-off: #1d2a22;
  --on: #58dcff; --eng: #4dff8e; --grn: #4dff8e; --caut: #ffa21f; --warn: #ff4a3d; --sel: #58dcff;
  --disp-bg: #06080a; --disp-ink: #ffe9b0; --disp-ghost: rgba(255,233,176,.07); --disp-glow: 0 0 8px rgba(255,220,150,.3);
}

body.th-heavy {
  --bg: #746b5f;
  --bg-img: repeating-linear-gradient(90deg, rgba(255,255,255,.014) 0, rgba(255,255,255,.014) 1px, rgba(0,0,0,.014) 2px, rgba(0,0,0,0) 3px);
  --line: rgba(0,0,0,.45);
  --mod-bg: rgba(0,0,0,.11); --mod-bd: 1px solid rgba(0,0,0,.4); --mod-r: 5px; --mod-sh: inset 0 1px 0 rgba(255,255,255,.12);
  --ink: #f7f0e1; --ink-dim: #d6cbb6;
  --ls: .1em;
  --key-bg: linear-gradient(180deg, #aaa296, #867e73); --key-ink: #1b1814; --key-r: 4px;
  --key-sh: inset 0 1px 0 rgba(255,255,255,.45), 0 0 0 1px #2a2621, 0 4px 0 #3b362f;
  --key-sh-p: 0 0 0 1px #2a2621, inset 0 3px 6px rgba(0,0,0,.45);
  --lamp-off: #4d5a47;
  --on: #86ff9f; --eng: #86ff9f; --grn: #5dff86; --caut: #ffb020; --warn: #ff4a3d; --sel: #ffd98a;
  --disp-bg: #120a03; --disp-ink: #ffb648; --disp-ghost: rgba(255,182,72,.09); --disp-glow: 0 0 10px rgba(255,170,60,.45);
  --disp-r: 3px;
}

body.th-vintage {
  --bg: #d5c8a6;
  --bg-img: radial-gradient(circle at 1px 1px, rgba(90,70,30,.10) 1px, rgba(0,0,0,0) 1.4px);
  --line: #a59670;
  --mod-bg: #cabc97; --mod-bd: 1px solid #a89974; --mod-r: 16px;
  --mod-sh: inset 0 1px 0 rgba(255,255,255,.55), 0 2px 4px rgba(60,45,20,.35);
  --ink: #2a2319; --ink-dim: #6d6049;
  --ls: .16em;
  --key-bg: linear-gradient(180deg, #2d2a26, #141210); --key-ink: #f2ead7; --key-r: 6px;
  --key-sh: 0 0 0 3px #92845f, 0 5px 6px rgba(50,35,10,.5), inset 0 1px 0 rgba(255,255,255,.2);
  --key-sh-p: 0 0 0 3px #92845f, inset 0 4px 7px rgba(0,0,0,.8);
  --lamp-off: #4b4334;
  --on: #ffd15c; --eng: #ffd15c; --grn: #58e07c; --caut: #ffa51f; --warn: #ff4030; --sel: #b3261a;
  --disp-bg: #170504; --disp-ink: #ff4030; --disp-ghost: rgba(255,64,48,.11); --disp-glow: 0 0 10px rgba(255,50,30,.55);
  --disp-r: 999px;
  --map-apt: #ffcf8a;
}

body.th-fighter {
  --bg: #2b3034;
  --bg-img: repeating-linear-gradient(180deg, rgba(255,255,255,.018) 0, rgba(255,255,255,.018) 1px, rgba(0,0,0,.025) 2px, rgba(0,0,0,0) 3px);
  --line: #0d0f10;
  --mod-bg: #1d2124; --mod-bd: 1px solid #0d0f10; --mod-r: 6px; --mod-sh: inset 0 1px 0 rgba(255,255,255,.08), 0 2px 0 #15181a;
  --ink: #d9dee2; --ink-dim: #89939a;
  --f-legend: "B612 Mono", monospace; --ls: .1em; --fw: 700;
  --key-bg: linear-gradient(180deg, #3d4347, #2b3034); --key-ink: #f2f2f2; --key-r: 5px;
  --key-sh: inset 0 1px 0 rgba(255,255,255,.12), inset 0 -2px 0 rgba(0,0,0,.35), 0 3px 0 #111416;
  --lamp-off: #3d4a3f;
  --on: #3cff7a; --eng: #3cff7a; --grn: #3cff7a; --caut: #ffb000; --warn: #ff3b30; --sel: #ffb000;
  --disp-bg: #030a05; --disp-ink: #3cff7a; --disp-ghost: rgba(0,0,0,0); --disp-glow: 0 0 10px rgba(60,255,122,.45);
  --f-disp: "B612 Mono", monospace; --disp-r: 4px;
  --map-water: #020a05; --map-land: #062313; --map-coast: #1f9e4b; --map-ink: #3cff7a; --map-rte: #ffb000; --map-own: #eafff1; --map-apt: #3cff7a;
}

body.th-bezel {
  --bg: #040506; --bg-img: none; --line: #1a1f29;
  --mod-bg: #0b0d11; --mod-bd: 1px solid #1c212b; --mod-r: 12px; --mod-sh: none;
  --ink: #e9edf3; --ink-dim: #7d8798;
  --f-legend: "B612", "Helvetica Neue", sans-serif; --ls: .08em; --fw: 700;
  --key-bg: linear-gradient(180deg, #161a21, #101318); --key-ink: #e9edf3; --key-r: 8px;
  --key-sh: inset 0 0 0 1px #2a313e;
  --key-sh-p: inset 0 0 0 1px #2a313e, inset 0 3px 8px rgba(0,0,0,.8);
  --lamp-off: #232a35;
  --on: #39e58c; --eng: #39e58c; --grn: #39e58c; --caut: #ffb020; --warn: #ff4a3d; --sel: #ff4fd8;
  --disp-bg: #000000; --disp-ink: #3fe0ff; --disp-ghost: rgba(0,0,0,0); --disp-glow: none;
  --f-disp: "B612 Mono", monospace; --disp-r: 6px;
  --map-water: #020509; --map-land: #0e141c; --map-coast: #26384c;
}

/* ---------------------------------------------------------------- stage, status bar, tabs */
#stage {
  position: absolute; left: 0; top: 0; width: 1024px; height: 768px; overflow: hidden;
  -webkit-transform-origin: 0 0; transform-origin: 0 0;
  background-color: var(--bg); background-image: var(--bg-img);
  color: var(--ink); font-family: var(--f-legend); font-weight: var(--fw); letter-spacing: var(--ls); text-transform: uppercase;
}
body.th-vintage #stage { background-size: 4px 4px; }
body.th-vintage #stage:before { /* indirect red night lighting from the glareshield */
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 150px; pointer-events: none; z-index: 1;
  background: linear-gradient(180deg, rgba(255,70,30,.16), rgba(255,70,30,0));
}

.sb { position: absolute; left: 0; right: 0; top: 0; height: 40px; display: flex; align-items: center; padding: 0 16px; font-size: 14px; z-index: 3; border-bottom: 1px solid var(--line); }
.sb > * { margin-right: 18px; white-space: nowrap; }
.sb .sp { flex: 1; }
.sb .led { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--grn); box-shadow: 0 0 8px var(--grn); margin-right: 8px; vertical-align: 0; }
.sb em { font-style: normal; color: var(--ink-dim); margin-left: 6px; }
.sb .acft { color: var(--ink-dim); }
.sb .acft b { color: var(--ink); font-weight: inherit; }
.sb .trial { display: none; color: var(--caut); }
body.plan-trial .sb .trial { display: block; }
.sb .planchip { font-size: 11px; padding: 2px 7px 1px; border-radius: 3px; border: 1px solid var(--ink-dim); color: var(--ink-dim); }
body.plan-pro .sb .planchip { color: var(--bg); background: var(--ink); border-color: var(--ink); }
.sb .zulu { margin-right: 0; }

.pages { position: absolute; left: 0; right: 0; top: 40px; bottom: 60px; z-index: 2; }
.page { position: absolute; left: 0; right: 0; top: 0; bottom: 0; padding: 12px; display: none; grid-gap: 12px; gap: 12px; }
.page.on { display: grid; }

.tabs { position: absolute; left: 0; right: 0; bottom: 0; height: 60px; display: flex; padding: 0 12px 10px; z-index: 3; }
.tab { flex: 1; margin-right: 8px; position: relative; font-size: 17px; border-radius: var(--key-r); background: var(--key-bg); color: var(--key-ink); box-shadow: var(--key-sh); opacity: .78; }
.tab:last-child { margin-right: 0; }
.tab:before { content: ""; position: absolute; left: 14px; top: 50%; width: 5px; height: 22px; margin-top: -11px; border-radius: 1px; background: var(--lamp-off); }
.tab.on { opacity: 1; }
.tab.on:before { background: var(--eng); box-shadow: 0 0 12px var(--eng); }
.tab .lock { display: none; position: absolute; right: 12px; top: 50%; width: 14px; height: 16px; margin-top: -9px; opacity: .7; }
body.plan-free .tab.pro .lock { display: block; }
body.plan-free .tab.pro { opacity: .5; }
.tab small { font-size: 10px; margin-left: 8px; padding: 1px 5px; border-radius: 2px; background: var(--caut); color: #1a1300; letter-spacing: .1em; display: none; vertical-align: 2px; }
body.plan-free .tab.pro small { display: inline-block; }

/* ---------------------------------------------------------------- generic parts */
.mod { position: relative; background: var(--mod-bg); border: var(--mod-bd); border-radius: var(--mod-r); box-shadow: var(--mod-sh); padding: 34px 14px 14px; min-width: 0; min-height: 0; }
.mod > h3 { position: absolute; left: 14px; top: 9px; margin: 0; font-size: 13px; font-weight: inherit; color: var(--ink-dim); }
.mod > h3 b { color: var(--ink); font-weight: inherit; }
.mod > .tagr { position: absolute; right: 14px; top: 9px; font-size: 11px; color: var(--ink-dim); }
body.th-liner .mod > h3 { top: -9px; left: 16px; background: #687f94; padding: 0 8px; color: #fff; font-size: 12px; }
body.th-liner .mod > .tagr { top: -8px; background: #687f94; padding: 0 8px; }
body.th-liner .mod { padding-top: 22px; }
body.th-liner .page { padding-top: 18px; }
body.th-vintage .mod > h3 { color: var(--ink); text-shadow: 0 1px 0 rgba(255,255,255,.5); }
body.th-fighter .mod:after { /* four screws */
  content: ""; position: absolute; left: 4px; right: 4px; top: 4px; bottom: 4px; pointer-events: none;
  background-image: radial-gradient(circle, #9aa1a6 1.5px, #4a5055 2.6px, transparent 3.4px), radial-gradient(circle, #9aa1a6 1.5px, #4a5055 2.6px, transparent 3.4px), radial-gradient(circle, #9aa1a6 1.5px, #4a5055 2.6px, transparent 3.4px), radial-gradient(circle, #9aa1a6 1.5px, #4a5055 2.6px, transparent 3.4px);
  background-repeat: no-repeat; background-size: 8px 8px; background-position: 0 0, 100% 0, 0 100%, 100% 100%;
}
body.th-fighter .mod > h3 { left: 18px; }

.key { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  background: var(--key-bg); color: var(--key-ink); border-radius: var(--key-r); box-shadow: var(--key-sh);
  font-size: 16px; letter-spacing: var(--ls); text-transform: uppercase; line-height: 1.05; }
.key small { font-size: 11px; opacity: .7; margin-top: 3px; }
.key.pressed, .key:active { -webkit-transform: translateY(2px); transform: translateY(2px); box-shadow: var(--key-sh-p); }
.key .lamp { position: absolute; left: 50%; top: 9px; width: 34px; height: 5px; margin-left: -17px; border-radius: 1px; background: var(--lamp-off); }
.key.on .lamp { background: var(--eng); box-shadow: 0 0 12px var(--eng), 0 0 3px var(--eng); }
.key.lit { padding-top: 10px; }
body.th-ga-dark .key.on.lit, body.th-fighter .key.on.lit, body.th-bezel .key.on.lit { color: var(--eng); text-shadow: 0 0 8px var(--eng); }
body.th-bezel .key .lamp { top: auto; bottom: 8px; height: 3px; width: 44px; margin-left: -22px; border-radius: 2px; }
body.th-bezel .key.lit { padding-top: 0; padding-bottom: 8px; }
.key.amber { background: linear-gradient(180deg, #ffc13d, #e09400); color: #1a1300; }
.key.ghost { background: none; box-shadow: inset 0 0 0 2px var(--ink-dim); color: var(--ink-dim); border-radius: var(--key-r); }
body.th-vintage .key.ghost, body.th-heavy .key.ghost, body.th-liner .key.ghost { box-shadow: inset 0 0 0 2px var(--ink); color: var(--ink); opacity: .7; }

.disp { position: relative; background: var(--disp-bg); border-radius: var(--disp-r); box-shadow: inset 0 0 0 2px rgba(0,0,0,.7), inset 0 3px 10px rgba(0,0,0,.9), 0 1px 0 rgba(255,255,255,.08); display: flex; align-items: center; justify-content: center; }
body.th-vintage .disp { box-shadow: 0 0 0 3px #8f8672, 0 0 0 4px #5d5545, inset 0 3px 10px rgba(0,0,0,.9); }
body.th-bezel .disp { box-shadow: inset 0 0 0 1px #1c212b; }
.seg { position: relative; display: inline-block; font-family: var(--f-disp); font-weight: 700; color: var(--disp-ink); text-shadow: var(--disp-glow); line-height: 1; white-space: nowrap; letter-spacing: 0; }
.seg { min-height: 1em; text-align: right; }
.seg i { display: block; color: var(--disp-ghost); text-shadow: none; font-style: normal; } /* ghost segments give the window its width */
.seg b { position: absolute; right: 0; top: 0; font-weight: inherit; }
.dl { color: var(--disp-ink); opacity: .75; font-size: 11px; letter-spacing: .14em; font-family: var(--f-legend); }

.simflash { -webkit-animation: simflash .9s ease-out; animation: simflash .9s ease-out; }
@keyframes simflash { 0% { outline: 3px solid var(--sel); outline-offset: 3px; } 100% { outline: 3px solid rgba(0,0,0,0); outline-offset: 10px; } }
@-webkit-keyframes simflash { 0% { outline: 3px solid var(--sel); outline-offset: 3px; } 100% { outline: 3px solid rgba(0,0,0,0); outline-offset: 10px; } }

/* ---------------------------------------------------------------- FLIGHT (free "Stick Companion") — converged layout:
   my large touch targets + the realistic controls from the Cursor Fable proposal (toggle bus, guarded parking brake, split gear lamps) */
.pg-flight { grid-template-columns: 196px 292px 196px 1fr; grid-template-rows: 438px 1fr; }
.fl-right { display: grid; grid-template-rows: 124px 1fr; grid-gap: 12px; gap: 12px; min-width: 0; min-height: 0; }
.pg-flight .bus { grid-column: 1 / 4; }

/* flaps: a gated lever. Tap a detent to move the handle; the green pointer is the real surface position */
.read { display: flex; align-items: baseline; justify-content: space-between; height: 40px; }
.read b { font-size: 34px; font-weight: inherit; letter-spacing: .02em; line-height: 1; }
.read span { font-size: 12px; color: var(--ink-dim); }
.read span.tr { color: var(--caut); } .read span.ok { color: var(--grn); }
body.th-vintage .read span.ok, body.th-liner .read span.ok, body.th-heavy .read span.ok,
body.th-vintage .read span.tr, body.th-liner .read span.tr, body.th-heavy .read span.tr { color: var(--ink); }
.gate { position: relative; height: 342px; margin-top: 8px; }
.gate .slot { position: absolute; left: 38px; top: 6px; bottom: 6px; width: 14px; border-radius: 7px; background: #050606; box-shadow: inset 0 2px 5px #000, 0 1px 0 rgba(255,255,255,.1); }
.gate .det { position: absolute; left: 0; right: 0; height: 25%; text-align: left; padding-left: 88px; font-size: 21px; color: var(--ink-dim); font-family: inherit; font-weight: inherit; letter-spacing: var(--ls); text-transform: uppercase; border-radius: 6px; }
.gate .det:before { content: ""; position: absolute; left: 60px; top: 50%; width: 18px; height: 2px; margin-top: -1px; background: currentColor; opacity: .7; }
.gate .det:active { background: rgba(255,255,255,.06); }
.gate .det.cur { color: var(--ink); }
.gate .hdl { position: absolute; left: 16px; width: 58px; height: 36px; margin-top: -18px; border-radius: 6px; pointer-events: none;
  background: linear-gradient(180deg, #ecede9, #a9aba8 48%, #7c7e7c 52%, #b9bbb7); box-shadow: 0 5px 9px rgba(0,0,0,.7), inset 0 1px 0 #fff;
  -webkit-transition: top .2s ease-out; transition: top .2s ease-out; }
.gate .hdl:after { content: ""; position: absolute; left: 9px; right: 9px; top: 16px; height: 4px; border-top: 1px solid rgba(0,0,0,.35); border-bottom: 1px solid rgba(0,0,0,.35); }
.gate .sfc { position: absolute; left: 0; width: 0; height: 0; margin-top: -9px; pointer-events: none; border-top: 9px solid transparent; border-bottom: 9px solid transparent; border-left: 14px solid var(--grn); -webkit-filter: drop-shadow(0 0 5px var(--grn)); filter: drop-shadow(0 0 5px var(--grn)); }
.gate .sfc.tr { border-left-color: var(--caut); -webkit-filter: drop-shadow(0 0 5px var(--caut)); filter: drop-shadow(0 0 5px var(--caut)); }
body.th-vintage .gate .hdl { background: linear-gradient(180deg, #33302b, #171513 48%, #0c0b0a 52%, #24211e); box-shadow: 0 5px 9px rgba(60,40,10,.6), inset 0 1px 0 rgba(255,255,255,.25), 0 0 0 2px #8f8672; }
body.th-liner .gate .slot { background: #0e1114; box-shadow: 0 0 0 2px #46535f; }
body.th-bezel .gate .hdl { background: linear-gradient(180deg, #2a313e, #171b23); box-shadow: 0 0 0 1px #3fe0ff, 0 5px 9px rgba(0,0,0,.7); }

/* gear: split annunciators (UNLK over a green arrow) + lever with a wheel-shaped knob */
.glights { position: absolute; left: 14px; top: 44px; width: 176px; height: 214px; }
.gl { position: absolute; width: 80px; text-align: center; font-size: 11px; color: var(--ink-dim); }
.gl.gn { left: 48px; top: 0; } .gl.gL { left: 0; top: 110px; } .gl.gR { left: 96px; top: 110px; }
.gl .lens { height: 76px; border-radius: 7px; background: #070808; overflow: hidden; margin-bottom: 6px; box-shadow: inset 0 0 0 1px #000, inset 0 2px 6px rgba(0,0,0,.9), 0 1px 0 rgba(255,255,255,.1); }
.gl .u { display: block; height: 29px; line-height: 30px; font-size: 14px; letter-spacing: .12em; color: #2a2118; border-bottom: 1px solid #000; }
.gl .d { display: block; height: 46px; padding-top: 11px; }
.gl .d svg { width: 30px; height: 24px; fill: #15221a; }
.gl.tr .u { color: #1a1000; background: var(--caut); box-shadow: 0 0 18px var(--caut); }
.gl.dn .d { background: rgba(61,240,124,.1); }
.gl.dn .d svg { fill: var(--grn); -webkit-filter: drop-shadow(0 0 7px var(--grn)); filter: drop-shadow(0 0 7px var(--grn)); }
body.th-liner .gl .lens { border-radius: 3px; background: #0e1114; box-shadow: 0 0 0 2px #46535f, inset 0 0 0 1px rgba(255,255,255,.2); }
body.th-liner .gl.tr .u { background: var(--warn); box-shadow: 0 0 18px var(--warn); color: #fff; }
body.th-vintage .gl .lens, body.th-heavy .gl .lens { width: 76px; margin-left: 2px; border-radius: 50%; }
body.th-vintage .gl .lens { box-shadow: 0 0 0 3px #8f8672, 0 0 0 4px #5d5545, inset 0 3px 8px rgba(0,0,0,.8); }
body.th-vintage .gl .u, body.th-heavy .gl .u { font-size: 10px; height: 27px; line-height: 34px; }
body.th-vintage .gl .d, body.th-heavy .gl .d { padding-top: 7px; }
.glever { position: absolute; right: 14px; top: 40px; width: 84px; height: 326px; display: block; border-radius: var(--key-r); color: inherit; font-family: inherit; font-weight: inherit; letter-spacing: var(--ls); }
.glever .slot { position: absolute; left: 50%; top: 34px; bottom: 34px; width: 22px; margin-left: -11px; border-radius: 11px; background: #050506; box-shadow: inset 0 2px 6px rgba(0,0,0,.9), 0 1px 0 rgba(255,255,255,.1); }
.glever .t, .glever .b { position: absolute; left: 0; right: 0; text-align: center; font-size: 17px; }
.glever .t { top: 2px; } .glever .b { bottom: 2px; }
.glever .knob { position: absolute; left: 50%; top: 28px; width: 76px; height: 76px; margin-left: -38px; border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, #d3d5d1 0, #b9bbb7 20%, #2a2b2c 23%, #151616 60%, #3a3b3c 65%, #0c0d0d 70%); box-shadow: 0 7px 13px rgba(0,0,0,.75), inset 0 0 0 2px #000;
  -webkit-transition: -webkit-transform .28s cubic-bezier(.3,1.3,.5,1); transition: transform .28s cubic-bezier(.3,1.3,.5,1); }
.glever.dn .knob { -webkit-transform: translateY(194px); transform: translateY(194px); }
body.th-vintage .glever .knob { box-shadow: 0 0 0 3px #8f8672, 0 8px 12px rgba(60,40,10,.6), inset 0 0 0 2px #000; }
body.th-liner .glever .slot { background: #0e1114; box-shadow: 0 0 0 2px #46535f; }
.gstat { position: absolute; left: 14px; right: 14px; bottom: 14px; height: 44px; font-size: 17px; letter-spacing: .2em; color: var(--disp-ink); opacity: .45; }
.gstat.ok { color: var(--grn); opacity: 1; text-shadow: 0 0 10px var(--grn); } .gstat.tr { color: var(--caut); opacity: 1; text-shadow: 0 0 10px var(--caut); }
body.th-vintage .gstat { border-radius: 22px; }

/* pitch trim: hold paddles around a ribbed wheel that rolls with the trim */
.trim { display: flex; flex-direction: column; }
.trim .tpad { height: 88px; font-size: 15px; flex: none; }
.trim .tpad svg { width: 26px; height: 26px; fill: currentColor; margin-bottom: 6px; }
.twheel { position: relative; flex: 1; margin: 10px 0; }
.twheel .rail { position: absolute; left: 50%; top: 0; bottom: 0; width: 50px; margin-left: -25px; border-radius: 5px; background-color: #050606;
  background-image: linear-gradient(180deg, rgba(0,0,0,.75), rgba(0,0,0,0) 30%, rgba(0,0,0,0) 70%, rgba(0,0,0,.75)), repeating-linear-gradient(180deg, #3b3e42 0, #3b3e42 2px, #17181a 2px, #17181a 9px);
  box-shadow: inset 0 0 0 1px #000, 0 1px 0 rgba(255,255,255,.1); }
.twheel .band { position: absolute; left: 50%; width: 42px; margin-left: -21px; top: 52%; height: 15%; background: rgba(61,240,124,.25); border-top: 1px solid var(--grn); border-bottom: 1px solid var(--grn); }
.twheel .bl { position: absolute; left: 0; top: 56%; font-size: 11px; color: var(--grn); }
body.th-vintage .twheel .bl, body.th-heavy .twheel .bl, body.th-liner .twheel .bl { color: var(--ink); }
.twheel .ptr { position: absolute; left: 50%; width: 86px; margin-left: -43px; height: 0; }
.twheel .ptr:before, .twheel .ptr:after { content: ""; position: absolute; top: -8px; border-top: 8px solid transparent; border-bottom: 8px solid transparent; }
.twheel .ptr:before { left: 4px; border-left: 13px solid var(--ink); } .twheel .ptr:after { right: 4px; border-right: 13px solid var(--ink); }
.twheel b { position: absolute; right: 0; font-size: 19px; font-weight: inherit; margin-top: -32px; letter-spacing: .02em; }
.mod > .tagr.ok { color: var(--grn); }
body.th-vintage .mod > .tagr.ok, body.th-heavy .mod > .tagr.ok, body.th-liner .mod > .tagr.ok { color: var(--ink); }

/* spoilers */
.seg3 { display: flex; height: 100%; }
.seg3 .key { flex: 1; font-size: 15px; }
.seg3 .key + .key { margin-left: 8px; }

/* parking brake: guarded, illuminated */
.pbmod { padding: 34px 14px 14px; }
.pbrk { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; height: 100%; border-radius: var(--key-r); overflow: hidden;
  background: linear-gradient(180deg, #5a1512, #3a0c0a); color: #ffb9b2; font-family: inherit; font-weight: inherit; text-transform: uppercase; font-size: 23px; letter-spacing: .16em; line-height: 1.15;
  box-shadow: inset 0 0 0 1px #000, inset 0 0 0 6px #1a1b1d, inset 0 0 0 8px #7a1a15, 0 4px 0 #0a0b0c; }
.pbrk .hz { position: absolute; left: 8px; right: 8px; top: 8px; height: 12px; opacity: .5; background: repeating-linear-gradient(-45deg, #f2c200 0, #f2c200 7px, #111 7px, #111 14px); }
.pbrk .hz + .hz { top: auto; bottom: 8px; }
.pbrk b { font-weight: inherit; }
.pbrk small { margin-top: 10px; font-size: 14px; letter-spacing: .24em; color: #8a332d; }
.pbrk:active { -webkit-transform: translateY(2px); transform: translateY(2px); }
.pbrk.on { background: linear-gradient(180deg, #ff4a3d, #c8261b); color: #fff; box-shadow: inset 0 0 0 1px #000, inset 0 0 0 6px #1a1b1d, inset 0 0 0 8px #ff8a80, 0 4px 0 #0a0b0c, 0 0 30px rgba(255,59,48,.4); }
.pbrk.on .hz { opacity: 1; } .pbrk.on small { color: #fff; }
body.th-vintage .pbrk { width: 190px; height: 190px; margin: 14px auto 0; border-radius: 50%; font-size: 17px; background: radial-gradient(circle at 40% 32%, #9a2b22, #5c120d 62%, #36080a); box-shadow: 0 0 0 5px #8f8672, 0 0 0 7px #5d5545, 0 10px 14px rgba(60,40,10,.55), inset 0 3px 0 rgba(255,255,255,.18); }
body.th-vintage .pbrk .hz { display: none; }
body.th-vintage .pbrk.on { background: radial-gradient(circle at 40% 32%, #ff7a6a, #e02d1f 60%, #9a150c); box-shadow: 0 0 0 5px #8f8672, 0 0 0 7px #5d5545, 0 4px 6px rgba(60,40,10,.55), 0 0 34px rgba(255,59,48,.5); }
body.th-bezel .pbrk { background: #12151b; box-shadow: inset 0 0 0 1px #5a1d1a; color: #c9d0db; }
body.th-bezel .pbrk .hz { display: none; }
body.th-bezel .pbrk.on { background: #2a0b09; box-shadow: inset 0 0 0 2px var(--warn), 0 0 26px rgba(255,74,61,.3); color: var(--warn); } body.th-bezel .pbrk.on small { color: var(--warn); }
body.th-liner .pbrk { box-shadow: 0 0 0 2px #46535f, 0 4px 0 #3b4854, inset 0 0 0 5px #0e1114, inset 0 0 0 7px #7a1a15; }
body.th-liner .pbrk.on { box-shadow: 0 0 0 2px #46535f, 0 4px 0 #3b4854, inset 0 0 0 5px #0e1114, inset 0 0 0 7px #ff8a80, 0 0 30px rgba(255,59,48,.4); }

/* switch bus: one cell = lamp + switch + caption, the whole cell is the touch target. The switch type follows the cockpit */
.busrow { display: flex; height: 100%; }
.busrow .grp { position: relative; flex: 1; display: flex; padding-top: 16px; min-width: 0; }
.busrow .grp + .grp { margin-left: 12px; padding-left: 12px; border-left: 1px solid rgba(128,128,128,.35); }
.busrow .grp > em { position: absolute; left: 0; right: 0; top: -4px; text-align: center; font-style: normal; font-size: 10px; letter-spacing: .2em; color: var(--ink-dim); }
.swc { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; min-width: 0; color: var(--ink); font-family: inherit; font-weight: inherit; text-transform: uppercase; letter-spacing: var(--ls); border-radius: 6px; }
.swc:active { background: rgba(255,255,255,.05); }
.swc .lamp { flex: none; width: 28px; height: 6px; margin-top: 3px; border-radius: 3px; background: var(--lamp-off); }
.swc.on .lamp { background: var(--on); box-shadow: 0 0 12px var(--on), 0 0 3px var(--on); }
.swc .sw { position: relative; flex: 1; width: 100%; display: block; }
.swc .sw:before { content: ""; position: absolute; left: 50%; top: 50%; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%;
  background: radial-gradient(circle, #0a0a0a 0, #0a0a0a 34%, #8d9092 38%, #585b5d 62%, #2a2c2e 66%); box-shadow: 0 2px 4px rgba(0,0,0,.7); }
.swc .lv { position: absolute; left: 50%; top: 50%; width: 16px; height: 44px; margin: -3px 0 0 -8px; border-radius: 5px 5px 8px 8px;
  background: linear-gradient(90deg, #6e7173, #f1f2ef 45%, #9c9fa0 70%, #56595b); box-shadow: 0 5px 7px rgba(0,0,0,.75); -webkit-transition: margin-top .09s ease-out; transition: margin-top .09s ease-out; }
.swc.on .lv { margin-top: -41px; border-radius: 8px 8px 5px 5px; box-shadow: 0 -3px 7px rgba(0,0,0,.6); }
.swc .fl, .swc .st { display: none; }
.swc .cap { flex: none; width: 100%; height: 30px; padding: 0 1px; display: flex; align-items: center; justify-content: center; text-align: center; font-size: 12.5px; line-height: 1.05; }

/* liner: square pushbutton, caption silk-screened above, FAULT / ON legends inside */
body.th-liner .swc .cap { order: -1; height: 26px; font-size: 9.5px; letter-spacing: 0; }
body.th-liner .swc .lamp, body.th-liner .swc .lv, body.th-liner .swc .sw:before { display: none; }
body.th-liner .swc .sw { flex: none; width: 56px; height: 62px; margin: 8px 0 0; display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--key-bg); border-radius: 4px; box-shadow: var(--key-sh); }
body.th-liner .swc .fl, body.th-liner .swc .st { display: block; width: 44px; text-align: center; font-size: 10px; line-height: 18px; height: 20px; letter-spacing: .04em; }
body.th-liner .swc .fl { color: rgba(255,162,31,.10); margin-bottom: 3px; }
body.th-liner .swc .st { color: rgba(88,220,255,.10); border: 1.5px solid rgba(88,220,255,.10); border-radius: 2px; }
body.th-liner .swc.on .st { color: var(--on); border-color: var(--on); text-shadow: 0 0 8px var(--on); box-shadow: 0 0 10px rgba(88,220,255,.35), inset 0 0 8px rgba(88,220,255,.25); }

/* heavy: bigger bat-handle toggles on a chrome nut, ON silk-screened above, no lamp */
body.th-heavy .swc .lamp { visibility: hidden; height: 0; margin: 0; }
body.th-heavy .swc .sw:before { width: 42px; height: 42px; margin: -17px 0 0 -21px; background: radial-gradient(circle at 40% 35%, #d9d9d6, #8b8d8f 55%, #4b4d4f 78%, #2a2b2c); }
body.th-heavy .swc .sw:after { content: "ON"; position: absolute; left: 0; right: 0; top: 0; font-size: 10px; color: var(--ink-dim); text-align: center; }
body.th-heavy .swc .lv { width: 18px; margin-left: -9px; margin-top: 2px; height: 46px; border-radius: 9px; background: linear-gradient(90deg, #8e9092, #f3f3f1 45%, #a9abad 70%, #6c6e70); }
body.th-heavy .swc.on .lv { margin-top: -38px; }

/* vintage: black rocker under a jewel lamp */
body.th-vintage .swc .lamp { width: 12px; height: 12px; border-radius: 50%; background: #4b3a2a; box-shadow: inset 0 1px 2px rgba(0,0,0,.6), 0 0 0 2px #8f8672; margin-top: 6px; }
body.th-vintage .swc.on .lamp { background: radial-gradient(circle at 40% 35%, #fff3c4, #ffc23a 60%, #c97f0a); box-shadow: 0 0 12px #ffc23a, 0 0 0 2px #8f8672; }
body.th-vintage .swc .lv, body.th-vintage .swc .sw:before { display: none; }
body.th-vintage .swc .sw { flex: none; width: 40px; height: 66px; margin: 10px 0 4px; border-radius: 6px; box-shadow: var(--key-sh); background: linear-gradient(180deg, #3a3631 0, #2a2723 48%, #0f0e0c 52%, #1d1b18 100%); }
body.th-vintage .swc.on .sw { background: linear-gradient(180deg, #0f0e0c 0, #1d1b18 48%, #3a3631 52%, #2a2723 100%); }
body.th-vintage .swc .cap { text-shadow: 0 1px 0 rgba(255,255,255,.5); font-size: 11.5px; }

/* dark glass: flat softkeys */
body.th-bezel .swc .lamp, body.th-bezel .swc .lv, body.th-bezel .swc .sw:before { display: none; }
body.th-bezel .swc .sw { flex: none; width: 56px; height: 62px; margin: 12px 0 2px; border-radius: 8px; background: var(--key-bg); box-shadow: var(--key-sh); display: flex; align-items: center; justify-content: center; }
body.th-bezel .swc .sw:after { content: "OFF"; font-size: 12px; color: var(--ink-dim); padding-bottom: 5px; border-bottom: 3px solid var(--lamp-off); }
body.th-bezel .swc.on .sw:after { content: "ON"; color: var(--on); border-bottom-color: var(--on); }
body.th-bezel .swc .cap { font-size: 11px; letter-spacing: .04em; }

/* fighter: toggles, with a red guard frame on the master */
body.th-fighter .swc .cap { font-size: 10px; letter-spacing: 0; }

/* chrono */
.chrono { display: grid; grid-template-rows: 1fr 44px; grid-gap: 8px; gap: 8px; height: 100%; }
.chrono .disp { flex-direction: column; padding: 2px 12px; min-width: 0; overflow: hidden; }
body.th-vintage .chrono .disp { border-radius: 26px; padding: 2px 20px; }
.chrono .zrow, .chrono .erow { display: flex; align-items: baseline; justify-content: space-between; width: 100%; }
.chrono .zrow .seg { font-size: 34px; } .chrono .erow .seg { font-size: 20px; }
.chrono .erow { margin-top: 6px; }
.chrono .btns { display: grid; grid-template-columns: 1fr 1fr; grid-gap: 8px; gap: 8px; }
.chrono .btns .key { font-size: 14px; flex-direction: row; }
.chrono .btns .key .lamp { position: static; margin: 0 8px 0 0; width: 18px; }

/* status-bar annunciators: the essentials stay visible on every page */
.sb .ann { display: flex; align-items: center; color: var(--ink-dim); font-size: 13px; }
.sb .ann > span { margin-right: 16px; }
.sb .ann b { color: var(--ink); font-weight: inherit; }
.sb .ann .g3 i { display: inline-block; width: 0; height: 0; margin-left: 4px; border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 9px solid var(--lamp-off); vertical-align: -1px; }
.sb .ann .g3 i.tr { border-top-color: var(--caut); } .sb .ann .g3 i.dn { border-top-color: var(--grn); }
.sb .ann .pk { display: none; color: var(--warn); } .sb .ann .pk.on { display: inline; }

/* ---------------------------------------------------------------- AP + RADIOS share the scratchpad column */
.pg-ap, .pg-radios { grid-template-columns: 1fr 304px; }
.ap-left { display: grid; grid-template-rows: 112px 214px 1fr; grid-gap: 12px; gap: 12px; min-width: 0; min-height: 0; }
.modes { display: grid; grid-template-columns: repeat(8, 1fr); grid-gap: 8px; gap: 8px; height: 100%; }
.modes .key { font-size: 17px; }
.modes .key.sync { font-size: 13px; }
.wins { display: grid; grid-template-columns: .82fr .82fr 1.24fr 1.12fr; grid-gap: 10px; gap: 10px; height: 100%; }
.win { position: relative; display: flex; flex-direction: column; align-items: stretch; text-align: left; border-radius: var(--key-r); padding: 8px; background: rgba(0,0,0,.14); box-shadow: inset 0 0 0 1px rgba(0,0,0,.3); color: inherit; letter-spacing: var(--ls); text-transform: uppercase; }
.win .wl { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 7px; }
.win .wl em { font-style: normal; color: var(--ink-dim); font-size: 11px; }
.win .disp { flex: 1; }
.win .seg { font-size: 36px; }
.win .now { display: flex; justify-content: space-between; margin-top: 8px; font-size: 12px; color: var(--ink-dim); }
.win .now b { color: var(--ink); font-weight: inherit; }
.win.sel, .rdisp.sel { box-shadow: 0 0 0 3px var(--sel), 0 0 18px rgba(89,210,255,.25); }
.strip { display: flex; flex-direction: column; }
.strip canvas { display: block; width: 100%; height: 96px; border-radius: var(--disp-r); background: var(--disp-bg); }
body.th-vintage .strip canvas { border-radius: 8px; }
.strip .cells { flex: 1; display: grid; grid-template-columns: repeat(5, 1fr); grid-gap: 8px; gap: 8px; margin-top: 10px; }
.cell { border-radius: 4px; background: rgba(0,0,0,.16); padding: 8px 10px; font-size: 11px; color: var(--ink-dim); display: flex; flex-direction: column; justify-content: center; }
.cell b { display: block; color: var(--ink); font-weight: inherit; font-size: 28px; letter-spacing: .02em; margin-top: 3px; }
.cell b small { font-size: 11px; color: var(--ink-dim); margin-left: 4px; }

/* scratchpad */
.kp { display: flex; flex-direction: column; }
.kp .sp-disp { height: 62px; padding: 0 12px; justify-content: space-between; }
.kp .sp-disp .seg { font-size: 30px; }
.kp .sp-disp.msg .seg { font-family: var(--f-legend); font-size: 17px; color: var(--caut); text-shadow: none; letter-spacing: .1em; }
.kp .sp-disp.msg .seg i { display: none; }
.kp .hint { font-size: 11px; color: var(--ink-dim); margin: 7px 2px 9px; height: 13px; white-space: nowrap; }
.kp .hint b { color: var(--sel); font-weight: inherit; }
body.th-vintage .kp .hint b { color: var(--ink); text-decoration: underline; }
.kp .keys { display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(4, 1fr); grid-gap: 8px; gap: 8px; flex: 1; }
.kp .keys .key { font-size: 30px; letter-spacing: 0; }
.kp .keys .key.fn { font-size: 17px; letter-spacing: var(--ls); }
.kp .stp { display: grid; grid-template-columns: repeat(4, 1fr); grid-gap: 8px; gap: 8px; height: 74px; margin-top: 12px; }
.kp .stp .key { font-size: 17px; letter-spacing: 0; }
.kp .stp-l { font-size: 11px; color: var(--ink-dim); margin: 12px 2px 0; }
.kp .stp-l + .stp { margin-top: 6px; }
.kp .stp-l b { color: var(--ink); font-weight: inherit; }

/* radios */
.rad-left { display: grid; grid-template-rows: repeat(5, 1fr); grid-gap: 10px; gap: 10px; min-width: 0; min-height: 0; }
.rrow { display: grid; grid-template-columns: 74px 1fr 84px 1fr; grid-gap: 10px; gap: 10px; align-items: stretch; padding: 12px 12px 12px 14px; }
.rrow .rn { display: flex; flex-direction: column; justify-content: center; font-size: 24px; line-height: 1; }
.rrow .rn small { font-size: 10px; color: var(--ink-dim); margin-top: 6px; letter-spacing: .1em; }
.rdisp { position: relative; flex-direction: column; border: 0; padding: 0; }
.rdisp .dl { position: absolute; left: 10px; top: 6px; }
.rdisp .seg { font-size: 42px; margin-top: 10px; }
body.th-vintage .rdisp .dl { left: 22px; }
.rrow .swap { font-size: 12px; }
.rrow .swap svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 4px; }
.rrow.xp { grid-template-columns: 74px 1fr 1.25fr 110px; }
.rrow.xp .seg3 .key { font-size: 14px; }
.rrow.xp .ident.on { background: linear-gradient(180deg, #ffc13d, #e09400); color: #1a1300; }
.rdisp .rply { position: absolute; right: 12px; top: 8px; width: 9px; height: 9px; border-radius: 50%; background: var(--disp-ink); opacity: .15; }
.rdisp .rply.on { opacity: 1; box-shadow: 0 0 8px var(--disp-ink); }

/* ---------------------------------------------------------------- MAP */
.pg-map { grid-template-columns: 1fr 300px; }
.mapmod { padding: 8px; overflow: hidden; }
.mapmod canvas { display: block; width: 100%; height: 100%; border-radius: calc(var(--mod-r) - 3px); background: var(--map-water); }
.mapov { position: absolute; font-family: "B612 Mono", monospace; font-size: 12px; letter-spacing: .06em; color: var(--map-ink); }
.mapov.tl { left: 18px; top: 18px; display: flex; }
.mapov.tl .mk, .mapov.zr .mk { background: rgba(0,0,0,.6); color: var(--map-ink); border: 1px solid var(--map-coast); border-radius: 5px; height: 44px; min-width: 44px; padding: 0 12px; font: inherit; letter-spacing: inherit; margin-right: 8px; text-transform: uppercase; }
.mapov.tl .mk.on { color: #000; background: var(--map-ink); }
.mapov.zr { right: 18px; top: 18px; display: flex; flex-direction: column; }
.mapov.zr .mk { margin: 0 0 8px; font-size: 22px; padding: 0; }
.mapov.bt { left: 18px; right: 18px; bottom: 18px; display: flex; background: rgba(0,0,0,.66); border: 1px solid var(--map-coast); border-radius: 5px; }
.mapov.bt div { flex: 1; padding: 7px 10px; border-right: 1px solid var(--map-coast); color: var(--map-ink); opacity: .95; font-size: 10px; }
.mapov.bt div:last-child { border-right: 0; }
.mapov.bt b { display: block; font-size: 17px; color: #fff; margin-top: 2px; }
body.th-fighter .mapov.bt b { color: var(--map-ink); }
.mapov.bt .rte b { color: var(--map-rte); }
.map-right { display: grid; grid-template-rows: 1fr 168px; grid-gap: 12px; gap: 12px; min-height: 0; }
.apt { display: flex; flex-direction: column; }
.apt .id { font-size: 46px; line-height: 1; letter-spacing: .02em; }
.apt .nm { font-size: 14px; margin-top: 4px; }
.apt .meta { font-size: 12px; color: var(--ink-dim); margin-top: 6px; line-height: 1.5; }
.apt .meta b { color: var(--ink); font-weight: inherit; }
.apt .fq { margin-top: 12px; flex: 1; display: flex; flex-direction: column; }
.apt .fq .key { flex-direction: row; justify-content: space-between; padding: 0 12px; height: 54px; margin-bottom: 8px; font-size: 15px; }
.apt .fq .key .f { font-family: var(--f-disp); font-size: 21px; letter-spacing: 0; }
body.th-bezel .apt .fq .key .f, body.th-fighter .apt .fq .key .f { font-size: 19px; }
.apt .fq .key .go { font-size: 11px; opacity: .75; }
.apt .fq .key.tuned { box-shadow: var(--key-sh), inset 0 0 0 2px var(--eng); }
.apt .fq .key.tuned .go { color: var(--eng); opacity: 1; }
body.th-heavy .apt .fq .key.tuned .go { color: #0c5a23; }
.apt .tip { font-size: 11px; color: var(--ink-dim); line-height: 1.4; }
.com1mini { display: grid; grid-template-columns: 1fr 76px; grid-template-rows: 1fr 1fr; grid-gap: 8px; gap: 8px; }
.com1mini .rdisp .seg { font-size: 32px; margin-top: 8px; }
.com1mini .rdisp.s .seg { font-size: 24px; opacity: .85; }
.com1mini .swap { grid-row: 1 / 3; grid-column: 2; font-size: 11px; }
.com1mini .swap svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 4px; }

/* ---------------------------------------------------------------- CAMS */
.pg-cams { grid-template-columns: 1fr 1fr 1fr 1fr; grid-template-rows: 1fr 1fr 1fr; }
.pg-cams .key { font-size: 19px; }
.pg-cams .key svg { width: 44px; height: 44px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 10px; }
.pg-cams .key .v { position: absolute; left: 10px; bottom: 8px; font-family: "B612 Mono", monospace; font-size: 9px; letter-spacing: .04em; opacity: .55; text-transform: none; }
.pg-cams .key .hold { position: absolute; right: 10px; top: 10px; font-size: 10px; opacity: .6; }
.pg-cams .key.ptt.pressed { background: linear-gradient(180deg, #ff6a4d, #d0391f); color: #fff; }
.pg-cams .key.sel-cam { box-shadow: var(--key-sh), inset 0 0 0 3px var(--eng); }
.pg-cams .key.sel-cam .lamp { background: var(--eng); box-shadow: 0 0 12px var(--eng); }

/* ---------------------------------------------------------------- overlays */
.toast { position: absolute; left: 50%; bottom: 76px; z-index: 9; -webkit-transform: translateX(-50%) translateY(20px); transform: translateX(-50%) translateY(20px);
  font-family: "B612 Mono", monospace; font-size: 13px; letter-spacing: .08em; background: #05080a; color: #e9edf3; border: 1px solid #59d2ff; border-radius: 5px; padding: 9px 16px; opacity: 0; pointer-events: none;
  -webkit-transition: opacity .2s, -webkit-transform .2s; transition: opacity .2s, transform .2s; white-space: nowrap; }
.toast.show { opacity: 1; -webkit-transform: translateX(-50%) translateY(0); transform: translateX(-50%) translateY(0); }
.toast b { color: #59d2ff; font-weight: 700; }
.sheet { position: absolute; left: 0; right: 0; top: 0; bottom: 0; z-index: 8; background: rgba(0,0,0,.72); display: none; align-items: center; justify-content: center; }
.sheet.show { display: flex; }
.sheet .box { width: 560px; background: #0d0f12; color: #edebe4; border: 1px solid #2a2f38; border-radius: 14px; padding: 30px 34px; font-family: "B612", "Helvetica Neue", sans-serif; text-transform: none; letter-spacing: 0; font-weight: 400; box-shadow: 0 30px 80px rgba(0,0,0,.7); }
.sheet .eyebrow { font-family: "B612 Mono", monospace; font-size: 11px; letter-spacing: .16em; color: #ffb020; text-transform: uppercase; }
.sheet h2 { font-size: 30px; line-height: 1.12; margin: 10px 0 12px; font-weight: 700; letter-spacing: -.01em; }
.sheet p { font-size: 16px; line-height: 1.5; color: #b7bcc4; margin: 0 0 20px; }
.sheet ul { list-style: none; padding: 0; margin: 0 0 22px; font-family: "B612 Mono", monospace; font-size: 12px; letter-spacing: .06em; color: #edebe4; text-transform: uppercase; display: flex; flex-wrap: wrap; }
.sheet li { width: 50%; padding: 4px 0; }
.sheet li:before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #3df07c; margin-right: 9px; box-shadow: 0 0 8px #3df07c; }
.sheet .row { display: flex; }
.sheet .cta { flex: 1; height: 56px; border-radius: 8px; background: #edebe4; color: #0a0a0a; font-family: "B612 Mono", monospace; font-weight: 700; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; }
.sheet .no { width: 150px; margin-left: 10px; height: 56px; border-radius: 8px; box-shadow: inset 0 0 0 1px #2a2f38; color: #b7bcc4; font-family: "B612 Mono", monospace; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.sheet .fine { font-size: 12px; color: #7d8590; margin: 14px 0 0; }
.swapov { position: absolute; left: 0; right: 0; top: 0; bottom: 0; z-index: 10; background: #000; display: none; flex-direction: column; align-items: center; justify-content: center; font-family: "B612 Mono", monospace; color: #edebe4; letter-spacing: .14em; font-size: 13px; text-transform: uppercase; }
.swapov.show { display: flex; }
.swapov b { font-size: 34px; letter-spacing: .04em; margin: 12px 0; font-weight: 700; }
.swapov em { font-style: normal; color: #3df07c; }
.swapov .bar { width: 260px; height: 3px; background: #1c1f24; margin-top: 22px; overflow: hidden; }
.swapov .bar i { display: block; height: 100%; width: 40%; background: #3df07c; -webkit-animation: load 1s linear infinite; animation: load 1s linear infinite; }
@keyframes load { from { margin-left: -40%; } to { margin-left: 100%; } }
@-webkit-keyframes load { from { margin-left: -40%; } to { margin-left: 100%; } }
.ripple { position: absolute; z-index: 12; width: 70px; height: 70px; margin: -35px 0 0 -35px; border-radius: 50%; background: rgba(255,255,255,.35); border: 2px solid rgba(255,255,255,.8); pointer-events: none; -webkit-animation: rip .55s ease-out forwards; animation: rip .55s ease-out forwards; }
@keyframes rip { from { -webkit-transform: scale(.3); transform: scale(.3); opacity: 1; } to { -webkit-transform: scale(1.25); transform: scale(1.25); opacity: 0; } }
@-webkit-keyframes rip { from { -webkit-transform: scale(.3); opacity: 1; } to { -webkit-transform: scale(1.25); opacity: 0; } }

/* embedded in a landing page: no status chrome needed? keep it — it is part of the product. Phone layout: single pinned page. */
body.kiosk .tabs { display: none; }
body.kiosk .pages { bottom: 0; }
