/* Image-overlay CYOA viewer. Nothing here is specific to one CYOA. Every colour, font, corner and frame below is a
   token: these are neutral defaults, and each conversion's data/meta.js `theme` overrides what it needs (tools/build.js
   writes it into index.html; ENGINE.md lists the tokens). The rest of this file only uses the tokens. */
:root {
  /* palette */
  --bg: #101214; --bg-glow: #1b2026; --bg-image: none; --bg-image-size: auto;
  --panel: rgba(18, 21, 24, 0.97); --panel-2: #1c2126; --line: #303840; --line-strong: #6b7780;
  --ink: #e8e8e6; --muted: #a2aab2; --heading: var(--ink);
  --accent: #7cc4ff; --accent-ink: #061019; --accent-soft: rgba(124, 196, 255, 0.35); --accent-2: var(--accent);
  --taken: var(--accent); --taken-ink: var(--accent-ink); --locked: rgba(4, 7, 7, 0.58);
  --bad: #ff6b6b; --bad-ink: #1a0505; --warn: #f0b24a; --focus: #ffd84d;
  --warn-bg: color-mix(in srgb, var(--warn) 13%, var(--panel-2)); --bad-bg: color-mix(in srgb, var(--bad) 14%, var(--panel-2));
  --hover: color-mix(in srgb, var(--ink) 8%, transparent); --subtle: color-mix(in srgb, var(--ink) 4%, transparent);
  --field: color-mix(in srgb, var(--bg) 70%, transparent); --page-bg: var(--panel-2); --shadow-color: #000c;
  /* shape */
  --radius: 8px; --radius-lg: calc(var(--radius) * 1.25); --radius-sm: calc(var(--radius) * 0.75); --border-w: 1px;
  --frame-image: none; --frame-slice: 30; --frame-width: 0px; --frame-repeat: round;
  /* type */
  --font-body: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: var(--font-body);
  --font-accent: var(--font-display);   /* a third slot (theme.accentFont) for printed rule lines or logo lettering: rules.js html and CSS hooks */
  --fs: 1;                 /* text size, from Settings */
  --zoom: 1;               /* page width, from the Contents slider */
  --rail-w: 0px;           /* the section rail's width, when it is shown */
  --dock-h: 0px;           /* the phone section bar's height, when it is shown */
  --hud-h: calc(52px * var(--fs));
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: calc(var(--hud-h) + 8px); scroll-padding-bottom: var(--dock-h); scrollbar-color: var(--line-strong) var(--bg); }
* { scrollbar-color: var(--line-strong) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 6px; border: 2px solid transparent; background-clip: padding-box; }
::selection { background: color-mix(in srgb, var(--accent) 40%, transparent); }
/* drawers, dialogs, menus, tooltips, the tabs panel and list sections can wear a decorative frame image (theme.frame):
   tools/build.js writes that rule into the theme block, after this file, so the border shorthands below don't reset it */
body {
  margin: 0; background: var(--bg-image) center top / var(--bg-image-size) repeat, radial-gradient(ellipse at 50% 0, var(--bg-glow) 0, var(--bg) 70%) var(--bg) fixed;
  color: var(--ink); font: calc(17px * var(--fs))/1.4 var(--font-body);
  -webkit-text-size-adjust: 100%;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
.noscript { padding: 80px 20px; text-align: center; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: fixed; z-index: 100; left: 8px; top: -60px; padding: 10px 16px; background: var(--accent); color: var(--accent-ink); font-weight: 600; border-radius: 0 0 8px 8px; text-decoration: none; }
.skip:focus { top: 0; }
/* a clear focus ring on every engine control for keyboard users */
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
#main:focus, .lsec:focus, .tabpane:focus, .lopt:focus { outline: none; }
.kbd .lsec:focus-visible, .kbd .lopt:focus-visible { outline: 3px dashed var(--focus); outline-offset: 4px; }

/* ---- HUD ------------------------------------------------------------------------------------------- */
#hud {
  position: fixed; inset: 0 0 auto 0; height: var(--hud-h); z-index: 30;
  display: flex; align-items: center; gap: 10px; padding: 0 12px;
  background: linear-gradient(color-mix(in srgb, var(--bg) 93%, transparent), color-mix(in srgb, var(--bg) 85%, transparent));
  border-bottom: var(--border-w) solid var(--line); box-shadow: 0 2px 18px var(--shadow-color); backdrop-filter: blur(6px);
}
.hud-title { font-family: var(--font-display); font-size: calc(24px * var(--fs)); color: var(--heading); text-shadow: 0 0 10px var(--accent-soft); white-space: nowrap; margin-right: auto; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.hud-btn {
  display: inline-flex; align-items: center; gap: 6px; height: calc(36px * var(--fs)); min-width: calc(36px * var(--fs)); padding: 0 12px; justify-content: center;
  background: var(--panel-2); border: var(--border-w) solid var(--line); border-radius: var(--radius); flex: none;
}
.hud-btn:hover { border-color: var(--accent); box-shadow: 0 0 10px var(--accent-soft); }
.hud-btn[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
.hud-btn svg, .rail-btn svg, .dock-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
#btn-build svg { fill: currentColor; stroke: none; }
.hud-points { display: flex; gap: 6px; min-width: 0; }
.pt { display: inline-flex; align-items: center; gap: 4px; min-width: 64px; height: calc(36px * var(--fs)); padding: 0 9px 0 5px;
  background: var(--panel-2); border: var(--border-w) solid var(--line); border-radius: var(--radius); font-variant-numeric: tabular-nums; font-weight: 600; font-size: calc(18px * var(--fs)); }
.pt img { width: calc(26px * var(--fs)); height: calc(26px * var(--fs)); object-fit: contain; }
.cur-dot { display: inline-grid; place-items: center; min-width: 1.5em; height: 1.5em; padding: 0 .25em; border-radius: .75em; font-size: .7em; font-weight: 700; color: #111; background: var(--c, var(--accent)); }
.pt.neg .v { color: var(--bad); }
.pt.bump { animation: bump .35s ease; }
@keyframes bump { 40% { transform: scale(1.12); box-shadow: 0 0 12px var(--accent-soft); } }
.hud-chips { display: flex; gap: 6px; }
.hud-chip { display: inline-flex; align-items: center; gap: 5px; height: calc(36px * var(--fs)); padding: 0 10px; background: var(--panel-2);
  border: var(--border-w) solid var(--line); border-radius: var(--radius); font-size: calc(15px * var(--fs)); white-space: nowrap; }
.hud-chip img { width: 22px; height: 22px; object-fit: contain; }
.hud-chip .n { font-weight: 600; font-variant-numeric: tabular-nums; }
.hud-chip:empty { display: none; }
.hud-chip .off, .hud-chip.off { color: var(--warn); }
.badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); font-size: 13px; font-weight: 700; line-height: 20px; text-align: center; }
.badge.bad { background: var(--bad); color: var(--bad-ink); }

/* ---- pages ------------------------------------------------------------------------------------------ */
#main { display: block; padding: calc(var(--hud-h) + 12px) 0 calc(60px + var(--dock-h)) var(--rail-w); }
.page {
  position: relative; width: min(calc(var(--w) * var(--zoom) * 1px), calc(100vw - var(--rail-w) - var(--gutter, 0px))); margin: 0 auto 14px;
  background: var(--page-bg) center / 100% 100% no-repeat; box-shadow: 0 0 30px var(--shadow-color); overflow: hidden;
}
.rail-on { --gutter: 24px; }
.page.slice { margin-bottom: 0; box-shadow: 0 0 30px var(--shadow-color); }
.page.slice + .page.slice { margin-top: 0; }
.page img.tile { position: absolute; left: 0; width: 100%; display: block; user-select: none; -webkit-user-drag: none; }
.page svg.hot { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.secg { outline: none; }

/* hotspots */
.opt { cursor: pointer; outline: none; }
.opt .hit { fill: transparent; }
.opt .ring { fill: none; stroke: transparent; stroke-width: 3; vector-effect: non-scaling-stroke; transition: stroke .15s, fill .15s; }
.opt .veil { fill: transparent; pointer-events: none; transition: fill .15s; vector-effect: non-scaling-stroke; }
.opt .fring, .opt .fhalo { fill: none; stroke: transparent; pointer-events: none; vector-effect: non-scaling-stroke; }
.opt:hover .ring { stroke: color-mix(in srgb, var(--ink) 75%, transparent); stroke-width: 2; }
.kbd .opt:focus .fhalo { stroke: #000; stroke-width: 7; }
.kbd .opt:focus .fring { stroke: var(--focus); stroke-width: 3; stroke-dasharray: 9 5; }
.opt.sel .ring { stroke: var(--taken); stroke-width: 4; fill: color-mix(in srgb, var(--taken) 9%, transparent); filter: url(#glow); }
.opt.sel:hover .ring { stroke-width: 5; }
.opt.lock { cursor: not-allowed; }
.opt.lock .veil { fill: var(--locked); }
.opt.lock:hover .veil { fill: color-mix(in srgb, var(--locked) 78%, transparent); }
.opt.bad .ring { stroke: var(--bad); stroke-width: 4; stroke-dasharray: 14 6; fill: color-mix(in srgb, var(--bad) 8%, transparent); filter: url(#glowbad); }
.opt.flash .ring { animation: flash 1.4s ease 1; }
.opt.found .fring { stroke: var(--focus); stroke-width: 4; }
.opt.found .fhalo { stroke: #000; stroke-width: 8; }
@keyframes flash { 0%, 100% { stroke: transparent; } 20%, 60% { stroke: var(--focus); stroke-width: 6; } 40%, 80% { stroke: var(--taken); stroke-width: 6; } }
.var { cursor: pointer; }
.var .vhit { fill: transparent; }
.var:hover .vring { stroke: color-mix(in srgb, var(--ink) 80%, transparent); }
.var .vring { fill: none; stroke: transparent; stroke-width: 2; vector-effect: non-scaling-stroke; }
.var.vlock .vhit { fill: var(--locked); }
.var.vlock { cursor: not-allowed; }
.var.on .vring { stroke: var(--taken); stroke-width: 3; fill: color-mix(in srgb, var(--taken) 14%, transparent); }
.mark { pointer-events: none; }
.mark circle { fill: var(--taken); stroke: var(--taken-ink); stroke-width: 3; }
.mark text { fill: var(--taken-ink); font: 700 30px/1 var(--font-body); text-anchor: middle; dominant-baseline: central; }
.mark.bad circle { fill: var(--bad); stroke: var(--bad-ink); }
.mark.bad text { fill: var(--bad-ink); }
.mark .pill { fill: var(--taken); stroke: var(--taken-ink); stroke-width: 3; }
.mark .pilltxt { font-size: 24px; letter-spacing: 1px; }
.opt.free .ring { stroke: color-mix(in srgb, var(--taken) 55%, transparent); stroke-width: 2; stroke-dasharray: 10 6; }
.mark.freemark .pill { fill: var(--panel-2); stroke: var(--taken); }
.mark.freemark .pilltxt { fill: var(--taken); }
.mark.lockmark circle { fill: var(--panel-2); stroke: var(--line-strong); }
.mark.lockmark path { fill: none; stroke: var(--muted); stroke-width: 4; }
.minus { cursor: pointer; }
.minus circle { fill: var(--panel-2); stroke: var(--taken); stroke-width: 3; }
.minus:hover circle { fill: color-mix(in srgb, var(--taken) 25%, var(--panel-2)); }
.minus path { stroke: var(--taken); stroke-width: 5; stroke-linecap: round; }
.pagebtn { position: absolute; transform: translate(-50%, -50%); z-index: 2; padding: .35em 1em;
  font: 600 clamp(11px, 1.1vw, 17px) var(--font-body); color: var(--accent-ink); background: var(--accent); border: 0; border-radius: 999px;
  box-shadow: 0 0 14px var(--accent-soft); min-height: 24px; }
.pagebtn:hover { filter: brightness(1.1); }
.pagebtn.wrap { padding: .45em .3em; line-height: 1.15; white-space: normal; }
@media (max-width: 600px) { .pagebtn.wrap { font-size: 10px; padding: .3em .2em; } }

/* high-contrast outlines (Settings): every card outlined; taken, locked and broken told apart by more than colour */
.hc .opt .veil { stroke: #000; stroke-width: 4; }
.hc .opt .ring { stroke: rgba(255, 255, 255, .8); stroke-width: 1.5; }
.hc .opt.sel .ring { stroke: #fff; stroke-width: 5; filter: none; }
.hc .opt.sel .veil { stroke: #000; stroke-width: 10; }
.hc .opt.lock .veil { fill: url(#hatch); stroke: #000; }
.hc .opt.lock .ring { stroke: rgba(255, 255, 255, .45); stroke-dasharray: 3 5; }
.hc .opt.bad .ring { stroke: var(--bad); stroke-width: 6; stroke-dasharray: 16 7; filter: none; }
.hc .opt.bad .veil { fill: url(#hatchbad); stroke: #000; stroke-width: 10; }
.hc .mark circle, .hc .mark .pill { stroke: #000; stroke-width: 5; }

/* reduced motion (Settings; defaults to the system setting) */
.rm *, .rm *::before, .rm *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }

/* ---- section rail (wide screens) --------------------------------------------------------------------- */
.rail { position: fixed; z-index: 25; left: 0; top: var(--hud-h); bottom: 0; width: var(--rail-w); display: flex; flex-direction: column;
  background: var(--panel); border-right: var(--border-w) solid var(--line); font-size: calc(14px * var(--fs)); }
.rail-head { display: flex; align-items: center; gap: 6px; padding: 6px 6px 6px 4px; border-bottom: 1px solid var(--line); }
.rail-title { font-size: calc(12px * var(--fs)); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); flex: 1; }
.rail-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0; background: none; border: 1px solid transparent; border-radius: 8px; color: var(--muted); flex: none; }
.rail-btn:hover { color: var(--ink); border-color: var(--line); }
.rail-todo { padding: 4px 8px; background: var(--warn-bg); color: var(--warn); border: 1px solid color-mix(in srgb, var(--warn) 40%, transparent); border-radius: 999px; font-size: calc(12px * var(--fs)); white-space: nowrap; }
.rail-todo.bad { background: var(--bad-bg); color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, transparent); }
.rail-list { flex: 1; overflow: auto; padding: 4px 4px 12px; scrollbar-width: thin; }
.rail-foot { display: flex; justify-content: space-around; padding: 4px; border-top: 1px solid var(--line); }
.rail-mini .rail-title, .rail-mini .rail-list, .rail-mini .rail-todo { display: none !important; }
.rail-mini .rail-head, .rail-mini .rail-foot { flex-direction: column; border: 0; }
.rail-mini #rail-toggle svg { transform: scaleX(-1); }
.rail-mini .rail { justify-content: flex-start; }

/* rows shared by the rail, the Contents drawer and the dock */
.nav-group { display: flex; align-items: center; width: 100%; margin-top: 8px; padding: 4px 8px; background: none; border: 0; border-radius: 6px; text-align: left;
  font-size: calc(12px * var(--fs)); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.nav-group:hover { color: var(--ink); background: var(--hover); }
.nav-group .cnt { margin-left: auto; letter-spacing: 0; text-transform: none; }
.nav-group.closed { opacity: .75; }
.nav-sec { display: flex; align-items: baseline; gap: 6px; width: 100%; padding: 4px 8px 4px 10px; background: none; border: 0; border-left: 3px solid transparent; border-radius: 0 6px 6px 0; text-align: left; line-height: 1.25; }
.nav-sec:hover { background: var(--hover); }
.nav-sec .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-sec.here { border-left-color: var(--accent); color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.nav-sec.closed .nm { color: var(--muted); }
.cnt { font-size: .92em; font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; }
.cnt.done { color: var(--accent); }
.cnt.todo { color: var(--warn); }
.cnt.bad { color: var(--bad); font-weight: 700; }

/* ---- dock: the phone's section bar --------------------------------------------------------------------- */
.dock { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; height: var(--dock-h); display: flex; align-items: center; gap: 4px;
  padding: 4px 6px calc(4px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--bg) 94%, transparent); border-top: 1px solid var(--line); backdrop-filter: blur(6px); }
.dock-btn { display: inline-grid; place-items: center; width: 48px; height: 48px; padding: 0; background: var(--panel-2); border: var(--border-w) solid var(--line); border-radius: var(--radius-lg); flex: none; }
.dock-here { flex: 1; min-width: 0; height: 48px; display: flex; align-items: center; gap: 8px; padding: 0 12px; background: var(--panel-2); border: var(--border-w) solid var(--line); border-radius: var(--radius-lg); font-size: calc(15px * var(--fs)); }
.dock-here .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }

/* ---- tooltip, menu, toast ----------------------------------------------------------------------------- */
.tip { position: fixed; z-index: 80; max-width: calc(340px * var(--fs)); padding: 10px 12px; pointer-events: none;
  background: var(--panel); border: var(--border-w) solid var(--line); border-radius: var(--radius-lg); box-shadow: 0 6px 24px var(--shadow-color); font-size: calc(15px * var(--fs)); }
.tip h4 { margin: 0 0 4px; font-size: calc(17px * var(--fs)); color: var(--heading); font-family: var(--font-display); font-weight: 400; }
.tip .sub { color: var(--muted); font-size: calc(13px * var(--fs)); margin-top: -2px; margin-bottom: 4px; }
.tip p { margin: 4px 0 0; }
.tip .why::before, .lens-info .why::before, .lo-why li::before { content: '🔒 '; }
.tip .why, .lens-info .why { color: var(--bad); }
.tip .good, .lens-info .good { color: var(--accent); }
.tip .hint { color: var(--muted); font-size: calc(13px * var(--fs)); }
.price { display: inline-flex; flex-wrap: wrap; gap: 2px 8px; align-items: center; font-weight: 600; font-variant-numeric: tabular-nums; }
.price span { display: inline-flex; align-items: center; gap: 2px; }
.price img { width: 18px; height: 18px; object-fit: contain; vertical-align: -3px; }
.price s { color: var(--muted); font-weight: 400; }
.menu { position: fixed; z-index: 85; min-width: 220px; max-width: calc(320px * var(--fs)); max-height: calc(100vh - 16px); overflow: auto; padding: 6px; background: var(--panel);
  border: var(--border-w) solid var(--accent); border-radius: var(--radius-lg); box-shadow: 0 8px 30px var(--shadow-color), 0 0 14px var(--accent-soft); font-size: calc(15px * var(--fs)); }
.menu h4 { margin: 4px 8px 6px; font-size: calc(16px * var(--fs)); }
.menu .menu-sub { margin: -2px 8px 8px; color: var(--muted); font-size: calc(14px * var(--fs)); }
.pathgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 2px; width: min(520px, calc(100vw - 40px)); }
.menu .pathgrid button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; text-align: center; font-size: calc(13px * var(--fs)); }
.pathgrid img { width: 40px; height: 40px; }
.xrow { display: flex; align-items: center; gap: 8px; padding: 4px 8px; }
.xrow img { width: 26px; height: 26px; }
.xrow .xname { flex: 1; }
.xrow .xn { min-width: 28px; text-align: center; font-variant-numeric: tabular-nums; }
.menu .xbtn, .adj button { width: 32px; height: 32px; padding: 0; text-align: center; border: var(--border-w) solid var(--line); border-radius: var(--radius-sm); background: var(--panel-2); font-size: 18px; line-height: 1; }
.adjust { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.adj { display: flex; align-items: center; gap: 6px; padding: 4px 8px; background: var(--subtle); border-radius: var(--radius-sm); }
.adj img { width: 22px; height: 22px; }
.adj b { min-width: 30px; text-align: center; font-variant-numeric: tabular-nums; }
.hint-line { margin: -2px 0 6px; color: var(--muted); font-size: calc(14px * var(--fs)); }
.amount-in { width: 100%; padding: 8px 10px; background: var(--field); color: var(--ink); border: var(--border-w) solid var(--line-strong); border-radius: var(--radius); font-size: calc(16px * var(--fs)); }
#btn-who .who { max-width: 18ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#btn-who { border-color: var(--accent); }
.list-who { margin: 4px 0 0; padding: 8px 12px; border: var(--border-w) solid var(--accent); border-radius: var(--radius); color: var(--accent); }
.picks .whohead { border-top: 2px solid var(--accent); margin-top: 8px; color: var(--accent); display: flex !important; justify-content: space-between; text-transform: none; letter-spacing: 0; font-size: calc(16px * var(--fs)); }
.picks .whohead button.go { color: var(--accent); font-weight: 600; }
.menu:has(.pathgrid) { max-width: none; }
.picks .change { grid-column: 1 / -1; justify-self: start; background: none; border: 0; padding: 0; color: var(--accent); font-size: calc(13px * var(--fs)); text-decoration: underline; }
.menu button { display: block; width: 100%; min-height: 36px; padding: 8px 10px; text-align: left; background: none; border: 0; border-radius: var(--radius-sm); font-size: calc(15px * var(--fs)); }
.menu button:hover, .menu button:focus-visible { background: var(--hover); }
.menu button.on { color: var(--accent); }
.menu button[disabled] { opacity: .5; cursor: not-allowed; }
.menu button small { display: block; color: var(--muted); font-size: calc(13px * var(--fs)); line-height: 1.3; }
.toast { position: fixed; z-index: 90; left: 50%; bottom: calc(22px + var(--dock-h)); transform: translateX(-50%); max-width: min(560px, calc(100vw - 32px));
  padding: 10px 16px; background: var(--panel); border: var(--border-w) solid var(--line); border-radius: var(--radius-lg); box-shadow: 0 6px 24px var(--shadow-color); font-size: calc(15px * var(--fs)); }
.toast.bad { border-color: var(--bad); }
.toast.bad::before { content: '⚠ '; color: var(--bad); }
.lens-open .toast, .drawer-open .toast { bottom: calc(96px + env(safe-area-inset-bottom)); }   /* above the zoom view's and drawers' buttons */
.toast { pointer-events: none; }              /* taps go through the message to what's under it... */
.toast button { pointer-events: auto; }        /* ...except on its Undo / Read buttons */
.toast button { margin-left: 10px; padding: 4px 2px; background: none; border: 0; color: var(--accent); text-decoration: underline; }

/* ---- zoom view ("lens") for reading a card on a small screen, and the picture viewer ------------------- */
.lens { position: fixed; inset: 0; z-index: 70; display: flex; flex-direction: column; background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(4px); font-size: calc(15px * var(--fs)); }
.lens-head { display: flex; align-items: flex-start; gap: 10px; padding: 10px 14px 4px; }
.lens-head h2 { margin: 0; font: 400 calc(22px * var(--fs)) var(--font-display); color: var(--heading); }
.lens-head .sub { color: var(--muted); font-size: calc(14px * var(--fs)); }
.lens .close, .dialog .close { margin-left: auto; width: 44px; height: 44px; font-size: 30px; line-height: 1; background: none; border: 0; color: var(--muted); flex: none; }
.lens-info { padding: 0 14px 6px; }
.lens-info p { margin: 3px 0; }
.lens-view { flex: 1; overflow: auto; padding: 8px; touch-action: pan-x pan-y pinch-zoom; }
.lens-img { position: relative; margin: 0 auto; overflow: hidden; border-radius: var(--radius-sm); box-shadow: 0 0 0 1px var(--line); }
.lens-img img { position: absolute; display: block; max-width: none; }
.lens-page { position: absolute; inset: 0; }
.viewer .lens-view { text-align: center; }
.viewer img { width: min(1600px, 100%); height: auto; border-radius: var(--radius-sm); box-shadow: 0 0 0 1px var(--line); }
.lens-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); border-top: var(--border-w) solid var(--line); }
.lens-actions button { flex: 1; min-width: 90px; min-height: 44px; padding: 10px; font-size: calc(16px * var(--fs)); background: var(--panel-2); border: var(--border-w) solid var(--line); border-radius: var(--radius); }
.lens-actions button.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.lens-actions button[disabled], .lens-actions button[aria-disabled="true"] { opacity: .5; }

/* ---- drawers ---------------------------------------------------------------------------------------- */
.scrim { position: fixed; inset: 0; z-index: 35; background: #0007; }
.drawer { position: fixed; top: 0; bottom: 0; z-index: 40; width: min(calc(400px * var(--fs)), 100vw); display: flex; flex-direction: column;
  background: var(--panel); border: var(--border-w) solid var(--line); box-shadow: 0 0 40px var(--shadow-color); font-size: calc(16px * var(--fs)); }
.drawer.left { left: 0; border-left: 0; }
.drawer.right { right: 0; border-right: 0; width: min(calc(460px * var(--fs)), 100vw); }
.drawer-head { display: flex; align-items: center; padding: 10px 14px; border-bottom: var(--border-w) solid var(--line); }
.drawer-head h2 { margin: 0; font: 400 calc(28px * var(--fs)) var(--font-display); color: var(--heading); text-shadow: 0 0 10px var(--accent-soft); }
.drawer .close { margin-left: auto; width: 40px; height: 40px; font-size: 26px; line-height: 1; background: none; border: 0; color: var(--muted); }
.drawer .close:hover, .dialog .close:hover { color: var(--ink); }
.drawer-foot { padding: 10px 14px; border-top: var(--border-w) solid var(--line); }
.drawer-foot.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.drawer-foot.actions button, .foot-btn { min-height: 36px; padding: 6px 12px; background: var(--panel-2); border: var(--border-w) solid var(--line); border-radius: var(--radius); font-size: calc(15px * var(--fs)); }
.drawer-foot.actions button:hover, .foot-btn:hover { border-color: var(--accent); }
.foot-btn[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
.foot-row { display: flex; gap: 8px; margin-top: 8px; }
.drawer-foot.actions .danger:hover { border-color: var(--bad); color: var(--bad); }
.free-mode { font-size: calc(14px * var(--fs)); color: var(--muted); display: inline-flex; gap: 6px; align-items: center; margin-left: auto; }
.search-box { margin: 12px 14px 4px; display: flex; }
#search { flex: 1; padding: 8px 10px; background: var(--field); color: var(--ink); border: var(--border-w) solid var(--line-strong); border-radius: var(--radius); font-size: calc(16px * var(--fs)); }
#search:focus { border-color: var(--accent); }
.search-results { list-style: none; margin: 0; padding: 0 8px; max-height: 45vh; overflow: auto; }
.search-results li button, #toc .nav-sec { display: block; width: 100%; text-align: left; padding: 5px 8px; background: none; border: 0; border-radius: var(--radius-sm); font-size: calc(16px * var(--fs)); }
#toc .nav-sec { display: flex; }
.search-results li button:hover, #toc .nav-sec:hover { background: var(--hover); }
.search-results small, #toc small { color: var(--muted); font-size: calc(13px * var(--fs)); }
.search-results .snip { display: block; color: var(--muted); font-size: calc(13px * var(--fs)); font-style: italic; }
.search-results mark { background: color-mix(in srgb, var(--accent) 30%, transparent); color: inherit; border-radius: 2px; }
.search-results .empty { padding: 6px 8px; }
.search-results .group { padding: 8px 8px 2px; font-size: calc(12px * var(--fs)); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
#toc { flex: 1; overflow: auto; padding: 6px 8px 12px; }
#toc .nav-sec.here { color: var(--accent); }
.zoom { display: flex; gap: 10px; align-items: center; font-size: calc(14px * var(--fs)); color: var(--muted); }
.zoom input { flex: 1; accent-color: var(--accent); }

#build-body { flex: 1; overflow: auto; padding: 4px 14px 16px; }
#build-body h3 { margin: 16px 0 6px; font: 400 calc(21px * var(--fs)) var(--font-display); color: var(--heading); }
#build-body h4 { margin: 10px 0 4px; font-size: calc(14px * var(--fs)); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.totals { display: grid; grid-template-columns: repeat(auto-fit, minmax(70px, 1fr)); gap: 6px; }
.totals .pt { min-width: 0; justify-content: center; }
.bens { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 4px; }
.ben { display: flex; align-items: center; gap: 5px; padding: 3px 8px 3px 4px; border-radius: var(--radius-sm); background: var(--subtle); font-size: calc(14px * var(--fs)); color: var(--muted); white-space: nowrap; }
.ben b { margin-left: auto; }
.ben img { width: 24px; height: 24px; object-fit: contain; }
.ben.on { color: var(--ink); background: var(--hover); }
.ben.on b { color: var(--accent); }
.ben.neg b { color: var(--bad); }
.ben.chosen { outline: 1px solid var(--accent); }
.warns { list-style: none; margin: 0; padding: 0; }
.warns li { margin: 4px 0; padding: 6px 10px; border-left: 3px solid var(--warn); background: var(--warn-bg); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-size: calc(15px * var(--fs)); }
.warns li::before { content: '○ '; color: var(--warn); }
.warns li.bad { border-color: var(--bad); background: var(--bad-bg); }
.warns li.bad::before { content: '⚠ '; color: var(--bad); }
.warns li.note { border-color: var(--line-strong); background: var(--subtle); }
.warns li.note::before { content: '• '; color: var(--muted); }
.warns li button { background: none; border: 0; padding: 0; color: inherit; text-align: left; font: inherit; }
.warns li button:hover { text-decoration: underline; }
.picks { list-style: none; margin: 0; padding: 0; }
.picks li { display: grid; grid-template-columns: 1fr auto; column-gap: 8px; align-items: baseline; padding: 5px 0; border-bottom: 1px solid var(--hover); font-size: calc(16px * var(--fs)); }
.picks li button.go { grid-column: 1; text-align: left; background: none; border: 0; padding: 0; }
.picks li .rm { grid-column: 2; grid-row: 1; }
.picks li .price { grid-column: 1 / -1; }
.picks li button.go:hover { color: var(--accent); }
.picks li.bad button.go { color: var(--bad); }
.picks li.bad button.go::before { content: '⚠ '; }
.picks .vlabel, .picks .tgt { color: var(--accent); font-size: calc(14px * var(--fs)); }
.picks .price { font-size: calc(14px * var(--fs)); font-weight: 400; }
.picks .rm { background: none; border: 0; color: var(--muted); font-size: 18px; line-height: 1; padding: 0 4px; min-width: 28px; min-height: 28px; }
.picks .rm:hover { color: var(--bad); }
.picks .sechead { display: block !important; border: 0; padding: 10px 0 2px; font-size: calc(13px * var(--fs)); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.empty { color: var(--muted); font-style: italic; }
.counters { display: flex; flex-wrap: wrap; gap: 6px; }
.counter { padding: 4px 10px; border-radius: var(--radius-sm); background: var(--subtle); font-size: calc(15px * var(--fs)); }
.counter b { font-variant-numeric: tabular-nums; }
.counter.off { background: var(--warn-bg); color: var(--warn); }
.counter.off::before { content: '○ '; }

/* ---- settings dialog --------------------------------------------------------------------------------- */
.dialog { position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; padding: 16px; background: #000a; }
.dialog-box { width: min(calc(560px * var(--fs)), 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; background: var(--panel); border: var(--border-w) solid var(--line); border-radius: var(--radius-lg); box-shadow: 0 10px 40px var(--shadow-color); font-size: calc(16px * var(--fs)); }
.dialog-body { overflow: auto; padding: 10px 16px 16px; }
.dialog h3 { margin: 16px 0 6px; font: 400 calc(20px * var(--fs)) var(--font-display); color: var(--heading); }
.set { border: var(--border-w) solid var(--line); border-radius: var(--radius); padding: 8px 12px; display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 10px; }
.set legend { padding: 0 4px; color: var(--muted); font-size: calc(14px * var(--fs)); }
.set label, .set-row { display: flex; align-items: center; gap: 8px; min-height: 36px; }
.set-row { margin: 4px 0; align-items: flex-start; }
.set-row input, .set input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--accent); flex: none; }
.keys { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 0; font-size: calc(15px * var(--fs)); }
.keys dt { font-weight: 600; white-space: nowrap; }
.keys dd { margin: 0; color: var(--muted); }

/* ---- list view: every option as text ------------------------------------------------------------------ */
.list { width: min(860px, calc(100vw - var(--rail-w) - 24px)); margin: 0 auto; font-size: calc(17px * var(--fs)); }
.list h2 { margin: 26px 0 8px; font: 400 calc(28px * var(--fs)) var(--font-display); color: var(--heading); }
.lsec { margin: 0 0 18px; padding: 12px 16px 14px; background: var(--panel); border: var(--border-w) solid var(--line); border-radius: var(--radius-lg); scroll-margin-top: calc(var(--hud-h) + 8px); }
.lsec h3 { display: flex; align-items: baseline; gap: 10px; margin: 0 0 6px; font: 400 calc(24px * var(--fs)) var(--font-display); color: var(--heading); }
.lsec h3 .cnt { margin-left: auto; font-size: calc(15px * var(--fs)); }
.lrule { margin: 4px 0 10px; color: var(--muted); font-size: calc(15px * var(--fs)); }
.lrule p { margin: 4px 0; }
.lopts { list-style: none; margin: 0; padding: 0; }
.lopt { padding: 10px 0 12px; border-top: 1px solid var(--hover); scroll-margin-top: calc(var(--hud-h) + 12px); }
.lopt.part { margin-left: 22px; border-top-style: dashed; }
.lo-top { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.lo-title { margin: 0; font-size: calc(18px * var(--fs)); font-weight: 600; }
.lo-state { font-size: calc(14px * var(--fs)); padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.lopt.taken .lo-state { color: var(--taken-ink); background: var(--taken); border-color: var(--taken); font-weight: 600; }
.lopt.bad .lo-state { color: var(--bad-ink); background: var(--bad); border-color: var(--bad); font-weight: 600; }
.lopt.free .lo-state { color: var(--accent-2); border-color: var(--accent-2); }
.lopt.locked .lo-title { color: var(--muted); }
.lopt.taken { box-shadow: inset 4px 0 0 var(--taken); padding-left: 12px; }
.lopt.bad { box-shadow: inset 4px 0 0 var(--bad); padding-left: 12px; }
.lo-price { margin: 4px 0; }
.lo-notes { margin: 4px 0; padding-left: 20px; font-size: calc(15px * var(--fs)); }
.lo-notes li { margin: 2px 0; }
.lo-text { margin: 4px 0; font-size: calc(15px * var(--fs)); }
.lo-why, .lo-good { list-style: none; margin: 4px 0; padding: 0; font-size: calc(15px * var(--fs)); }
.lo-why { color: var(--bad); }
.lo-good { color: var(--accent); }
.lo-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.lo-acts button { min-height: 40px; padding: 6px 14px; background: var(--panel-2); border: var(--border-w) solid var(--line-strong); border-radius: var(--radius); font-size: calc(15px * var(--fs)); }
.lo-acts button:hover { border-color: var(--accent); }
.lo-acts button.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.lo-acts button[aria-pressed="true"] { background: var(--taken); color: var(--taken-ink); border-color: var(--taken); font-weight: 600; }
.lo-acts button[aria-pressed="true"]::before { content: '✓ '; }
.lo-acts button[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.lo-acts .sub { align-self: center; color: var(--muted); font-size: calc(14px * var(--fs)); }
.lopt.found { animation: found 2s ease 1; }
@keyframes found { 0%, 60% { background: color-mix(in srgb, var(--focus) 18%, transparent); } }

/* ---- tabs: an ICC-style contents page (meta.tabs) ------------------------------------------------------ */
.tabs-panel { width: min(calc(1600px * var(--zoom)), calc(100vw - var(--rail-w) - var(--gutter, 0px))); margin: 0 auto 14px; padding: 14px; background: var(--panel); border: var(--border-w) solid var(--line); border-radius: var(--radius-lg); scroll-margin-top: calc(var(--hud-h) + 8px); }
.tabs-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.tabs-head h2 { margin: 0; flex: 1; font: 400 calc(26px * var(--fs)) var(--font-display); color: var(--heading); }
.tabs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(calc(180px * var(--fs)), 1fr)); gap: 8px; }
.tabs-grid > li { display: flex; }
.tabs-grid .tab { flex: 1; width: 100%; }
.tab-foot { margin-top: auto; }
.tab { position: relative; display: flex; flex-direction: column; align-items: stretch; gap: 6px; min-height: 64px; padding: 8px; text-align: left; background: var(--panel-2); border: var(--border-w) solid var(--line); border-radius: var(--radius-lg); }
.tab:hover { border-color: var(--accent); }
.tab[aria-expanded="true"] { border-color: var(--accent-2); box-shadow: inset 0 0 0 1px var(--accent-2); }
.tab-icon { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius-sm); background: var(--field); overflow: hidden; position: relative; }
.tab-label { font: 400 calc(18px * var(--fs)) var(--font-display); color: var(--heading); }
.tab-foot { display: flex; align-items: center; gap: 8px; }
.tab-state { margin-left: auto; font-size: calc(13px * var(--fs)); color: var(--muted); }
.tab[aria-expanded="true"] .tab-state { color: var(--accent-2); }
.tabpane { scroll-margin-top: calc(var(--hud-h) + 4px); margin-bottom: 18px; }
.tabpane-head { position: relative; display: flex; align-items: center; gap: 8px; width: min(calc(1600px * var(--zoom)), calc(100vw - var(--rail-w) - var(--gutter, 0px))); margin: 0 auto; padding: 8px 10px; background: var(--panel); border: var(--border-w) solid var(--line); border-bottom: 0; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.tabpane-head h2 { margin: 0; flex: 1; font: 400 calc(22px * var(--fs)) var(--font-display); color: var(--heading); }
.tabpane .page.slice:last-child { margin-bottom: 0; }
.ltab > h2 { margin: 26px 0 8px; }
.ltab-btn { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 12px; background: var(--panel-2); border: var(--border-w) solid var(--line); border-radius: var(--radius-lg); font: inherit; color: var(--heading); text-align: left; }
.ltab-btn[aria-expanded="true"] { border-color: var(--accent); }
.ltab-btn .cnt { margin-left: auto; font-family: var(--font-body); font-size: calc(15px * var(--fs)); }

/* ---- small screens ------------------------------------------------------------------------------------ */
@media (max-width: 900px) {
  #hud { gap: 6px; padding: 0 8px; }
  .hud-title { display: none; }
  .hud-points { margin-right: auto; gap: 4px; overflow-x: auto; scrollbar-width: none; }
  .pt { min-width: 0; padding: 0 6px 0 3px; font-size: calc(15px * var(--fs)); height: calc(32px * var(--fs)); flex: none; }
  .pt img { width: 20px; height: 20px; }
  .hud-btn { padding: 0 8px; }
  .hud-btn .lbl { display: none; }
  .hud-chip:not(.phone), .wide-only { display: none !important; }
}
@media (max-width: 420px) { .pt { gap: 2px; font-size: calc(14px * var(--fs)); } .hud-points { gap: 3px; } }
/* touch targets of at least 44px on phones and touch screens */
@media (max-width: 900px), (pointer: coarse) {
  .hud-btn { height: 44px; min-width: 44px; }
  .drawer .close, .lens .close, .dialog .close { width: 44px; height: 44px; }
  .picks .rm { min-width: 44px; min-height: 44px; }
  .menu .xbtn, .adj button { width: 44px; height: 44px; }
  .menu button { min-height: 44px; }
  .toast button { min-height: 44px; padding: 0 8px; }
  .search-results li button, #toc .nav-sec, .nav-group { min-height: 44px; }
  .warns li button { min-height: 44px; display: block; width: 100%; }
  .picks li button.go, .picks .change { min-height: 44px; }
  .drawer-foot.actions button, .foot-btn { min-height: 44px; }
  .free-mode { min-height: 44px; }
  .lo-acts button { min-height: 44px; }
  .pagebtn { min-height: 44px; }
  .tab { min-height: 64px; }
  .ltab-btn { min-height: 48px; }
  .set label, .set-row { min-height: 44px; }
  .rail-btn { width: 44px; height: 44px; }
}
@media (max-width: 600px) {
  .tabs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lsec { padding: 10px 12px; border-radius: 0; border-left: 0; border-right: 0; }
  .list { width: 100vw; }
}

/* ---- animated pages (one animated image instead of tiles) ------------------------------------------------- */
.page img.anim { top: 0; height: 100%; }
.animbtn { position: absolute; z-index: 3; top: 10px; right: 10px; min-width: 44px; min-height: 44px; padding: 6px 14px; background: var(--panel); color: var(--ink);
  border: var(--border-w) solid var(--line-strong); border-radius: 999px; font-size: calc(15px * var(--fs)); box-shadow: 0 2px 10px var(--shadow-color); }
.animbtn:hover { border-color: var(--accent); }

/* ---- a page's own palette, followed smoothly by the interface; page-scoped currencies; gated pages --------------- */
.nav-sec, .nav-group, .hud-btn, .pt, .hud-chip, .tab, .badge, .lo-acts button, .rail-todo, .foot-btn, .drawer-head h2 { transition: color .5s, background-color .5s, border-color .5s, box-shadow .5s; }
.pt.scoped { border-style: dashed; border-color: var(--accent); }
.pt.scoped + .pt:not(.scoped), .pt:not(.scoped) + .pt.scoped { margin-left: 6px; }
.gate-banner { position: absolute; z-index: 3; top: 10px; left: 10px; max-width: calc(100% - 20px); padding: 8px 14px; background: var(--panel); color: var(--ink);
  border: var(--border-w) solid var(--bad); border-radius: var(--radius); font-size: calc(15px * var(--fs)); box-shadow: 0 2px 10px var(--shadow-color); }

/* ---- chapters of tabs (tab.chapter): headings in the tab grid, the rail and the Contents drawer ------------------------- */
.tabs-chapter { margin: 16px 2px 8px; font: 400 calc(21px * var(--fs)) var(--font-display); color: var(--heading); }
.tabs-head + .hint-line + .tabs-chapter, .tabs-head + .tabs-chapter { margin-top: 4px; }
.nav-chapter { margin: 14px 8px 2px; font: 400 calc(15px * var(--fs)) var(--font-display); color: var(--heading); }
#toc .nav-chapter { font-size: calc(17px * var(--fs)); }

/* ---- journey mode (meta.journey): the bar chip, travel buttons on the printed bars, page pills, the log ------------ */
#hud-journey .jw { font-weight: 600; max-width: 18ch; overflow: hidden; text-overflow: ellipsis; }
#hud-journey .jd { color: var(--muted); font-variant-numeric: tabular-nums; }
#hud-journey.off { border-color: var(--warn); }
#hud-journey.off .jd { color: var(--warn); }
#hud-weight { font-variant-numeric: tabular-nums; }
.travelbtn { position: absolute; transform: translate(-50%, -50%); z-index: 2; display: inline-flex; align-items: center; gap: .45em; padding: .3em 1.1em; min-height: 28px;
  font: 600 clamp(11px, 1.05vw, 16px)/1.2 var(--font-body); color: var(--ink); background: var(--panel-2); border: 2px solid var(--accent); border-radius: 999px;
  box-shadow: 0 0 12px var(--accent-soft), 0 2px 8px var(--shadow-color); white-space: nowrap; }
.travelbtn .tb-arrow { color: var(--accent); }
.travelbtn .tb-cost { font-weight: 400; color: var(--muted); }
.travelbtn .tb-cost::before { content: '· '; }
.travelbtn:hover { background: color-mix(in srgb, var(--accent) 14%, var(--panel-2)); }
.travelbtn.away { border-style: dashed; border-color: var(--line-strong); box-shadow: 0 2px 8px var(--shadow-color); }
.travelbtn.away .tb-arrow { color: var(--muted); }
.travelbtn.blocked { border-color: var(--bad); border-style: dashed; }
.jpill { position: absolute; z-index: 2; top: 10px; left: 10px; padding: 4px 12px; border-radius: 999px; background: var(--panel); color: var(--muted);
  border: var(--border-w) solid var(--line-strong); font-size: calc(14px * var(--fs)); white-space: nowrap; pointer-events: none; box-shadow: 0 2px 8px var(--shadow-color); }
.jpill.here { color: var(--ink); border-color: var(--accent); box-shadow: 0 0 10px var(--accent-soft); }
.page:focus { outline: none; }
.nav-group .jmark { flex: none; width: 1.4em; letter-spacing: 0; }
.nav-group.j-here { color: var(--accent); }
.nav-group.j-ahead .jmark { opacity: .75; }
#build-body .jstat, .ljourney .jstat { margin: 2px 0 8px; }
.jend { color: var(--warn); font-weight: 600; }
.jacts { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.jacts [aria-disabled="true"] { border-style: dashed; color: var(--muted); }
.jlim { display: inline-flex; }
.jlines { margin-top: 4px; }
.jlog { list-style: none; margin: 0; padding: 0; }
.jlog li { display: grid; grid-template-columns: 1fr auto; column-gap: 8px; align-items: baseline; padding: 4px 0; border-bottom: 1px solid var(--hover); font-size: calc(15px * var(--fs)); }
.jlog li.jtrip { display: block; padding: 10px 0 2px; border: 0; color: var(--heading); font-weight: 600; }
.jlog .jtrip small { color: var(--muted); font-weight: 400; }
.jlog .j-go .jt { color: var(--accent); }
.jlog .jwhen, .jlog .price { grid-column: 1 / -1; color: var(--muted); font-size: calc(13px * var(--fs)); }
.jlog .price { font-weight: 400; color: var(--ink); }
.jback { grid-column: 2; grid-row: 1; background: none; border: 0; padding: 0 4px; color: var(--accent); font-size: calc(13px * var(--fs)); text-decoration: underline; }
#build-body h4 .jback { float: right; text-transform: none; letter-spacing: 0; font-weight: 400; }
.warns li.jwarn { border-color: var(--warn); background: var(--warn-bg); }
.warns li.jwarn::before { content: '⚠ '; color: var(--warn); }
@media (max-width: 600px) { .jpill { display: none; } .travelbtn { font-size: 11px; padding: .25em .7em; } }
@media (max-width: 900px), (pointer: coarse) { .travelbtn, .jback, .jacts button { min-height: 44px; } }
