/* Save Garage - Copyright (C) 2026 NotHGM - GNU GPL v3 with the additional terms in NOTICE; see LICENSE. */
/* Save Garage: Vice City at blue hour. Night-indigo surfaces, one warm light (the magenta-to-orange sunset) that means
   "do this" or "this is yours", a cool colour each for Lucia and Jason, road signs for risk, and neon tubes that stay
   visible unlit glass until something is selected, raised or edited. Every value comes from tokens.css (the design
   system, loaded first); this file applies it to the app. The class names are the app's own (the page's scripts and its
   browser checks use them); the components follow the system's .sg-* reference: .btn is .sg-btn, .field is .sg-row,
   .cell is .sg-field, .save is .sg-chip, .job is .sg-stage, .pending is .sg-bar, #passed is .sg-moment. */

*, *::before, *::after { box-sizing: border-box; }
html {
  font-size: clamp(16px, calc(16px + (100vw - 1600px) * .0021), 18px);   /* 16px up to 1600 wide, 18px at 2560 */
  background: var(--sg-bg); color: var(--sg-text-1); color-scheme: dark;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-size-adjust: 100%;
}
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  font: var(--sg-text-weight) var(--sg-text-body)/var(--sg-leading-body) var(--sg-font-text);
  padding-bottom: var(--bar-h, 0px);
}
h1, h2, h3, h4 {
  margin: 0; font-family: var(--sg-font-display); font-weight: var(--sg-display-weight); font-stretch: var(--sg-display-stretch);
  font-style: var(--sg-display-style); letter-spacing: var(--sg-tracking-display); line-height: var(--sg-leading-heading);
  text-wrap: balance; hyphens: auto; overflow-wrap: break-word;
}
h2 { font-size: calc(var(--sg-display-scale) * var(--sg-text-h2)); }
h3 { font-size: calc(var(--sg-display-scale) * var(--sg-text-h3)); }
p { margin: 0; text-wrap: pretty; }
p, li { hyphens: auto; }
img { max-width: 100%; }
a { color: var(--sg-text-accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
button, input, select { font: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--sg-focus); outline-offset: 3px; }
:lang(ko) { word-break: keep-all; }
:lang(ja), :lang(zh) { line-break: strict; }
[hidden] { display: none !important; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 1.25em; height: 1.25em; flex: none; display: inline-block; vertical-align: -0.2em; }
[dir="rtl"] .icon--flip { transform: scaleX(-1); }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: -999px; top: 8px; z-index: var(--sg-z-skip); padding: .55rem 1.1rem; border-radius: var(--sg-radius-pill);
  background: var(--sg-sunset); color: var(--sg-text-on-accent); font-weight: 600; text-decoration: none; }
.skip:focus { inset-inline-start: 8px; }
.cash { color: var(--sg-cash); font-variant-numeric: tabular-nums; }
.fig { font-family: var(--sg-font-display); font-stretch: var(--sg-num-stretch); font-weight: 720; font-variant-numeric: tabular-nums lining-nums; letter-spacing: 0; }   /* display numerals */
.note { color: var(--sg-text-2); font-size: var(--sg-text-small); max-width: var(--sg-measure); }
.row { display: flex; flex-wrap: wrap; gap: var(--sg-space-3); align-items: center; }
.stack { display: grid; gap: var(--sg-space-5); align-content: start; }
.stack > * { margin-block: 0; min-width: 0; }
[data-job]:empty { display: none; }

/* ================================================================ masthead: the step's art, the brand, the horizon */
.mast {
  --sun: 0px; position: relative; isolation: isolate; overflow: hidden; display: grid; align-content: space-between; gap: var(--sg-space-6);
  min-height: 13.5rem; padding: var(--sg-space-5) var(--sg-gutter) 0; background: var(--sg-sky-dusk);
}
.mast-art { position: absolute; inset: -24px; z-index: -2; }   /* overscan: 24px past the band on every side (the band clips it), so no edge shows at any zoom or drift */
.mast-img {
  position: absolute; inset: 0; width: 100%; max-width: none; height: 100%; object-fit: cover; display: block; opacity: 0;
  transform: translate3d(var(--drift, 0px), 0, 0); transition: opacity var(--sg-dur-slow) var(--sg-ease-in-out);
}
.mast-img.is-on { opacity: 1; }
.mast-img.is-day { filter: var(--sg-dim-day); }
.mast::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--sg-scrim-mast); pointer-events: none; }
.mast-row { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: var(--sg-space-3) var(--sg-space-5); min-width: 0; }   /* never wider than the band: the pills wrap */
.brand { display: grid; gap: .3rem; justify-items: start; color: var(--sg-text-1); text-decoration: none; border-radius: var(--sg-radius-sm); }
.brand img { display: block; height: 30px; width: auto; }
.brand-sub { font-size: var(--sg-text-label); color: var(--sg-text-2); text-shadow: 0 1px 6px rgb(10 5 20 / .9); }
.mast-side { display: flex; flex-wrap: wrap; gap: var(--sg-space-2); justify-content: flex-end; align-items: center; }
.status { display: flex; flex-wrap: wrap; gap: var(--sg-space-2); justify-content: flex-end; }
.pill {
  display: inline-flex; align-items: center; gap: .45rem; min-height: 2rem; padding: 0 .8rem; border-radius: var(--sg-radius-pill);
  background: rgb(16 15 39 / .72); border: 1px solid var(--sg-line-2); color: var(--sg-text-2); font-size: var(--sg-text-label); white-space: nowrap;
}
.pill b { color: var(--sg-text-1); font-weight: 600; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--sg-text-3); flex: none; display: inline-block; }
.dot.ok { background: var(--sg-ok); box-shadow: 0 0 6px rgb(53 194 109 / .8); }
.dot.wait { background: var(--sg-wait); box-shadow: 0 0 6px rgb(246 215 50 / .7); }
.dot.bad { background: var(--sg-bad); box-shadow: 0 0 6px rgb(243 65 60 / .8); }
.lang { position: relative; display: inline-flex; align-items: center; gap: .4rem; min-height: 2rem; padding: 0 .3rem 0 .75rem; border-radius: var(--sg-radius-pill);
  background: rgb(16 15 39 / .72); border: 1px solid var(--sg-line-2); color: var(--sg-text-2); }
.lang .icon { width: 1rem; height: 1rem; }
.lang select {
  appearance: none; -webkit-appearance: none; border: 0; background: transparent; color: var(--sg-text-1); font-size: var(--sg-text-label); font-weight: 600;
  padding: .3rem 1.4rem .3rem .1rem; cursor: pointer; border-radius: var(--sg-radius-pill);
  background-image: linear-gradient(45deg, transparent 50%, var(--sg-text-2) 50%), linear-gradient(135deg, var(--sg-text-2) 50%, transparent 50%);
  background-position: calc(100% - 10px) 55%, calc(100% - 5px) 55%; background-size: 5px 5px; background-repeat: no-repeat;
}
.lang select option { background: var(--sg-surface-2); color: var(--sg-text-1); }
[dir="rtl"] .lang { padding: 0 .75rem 0 .3rem; }
[dir="rtl"] .lang select { padding: .3rem .1rem .3rem 1.4rem; background-position: 10px 55%, 5px 55%; }
/* Help and Support, beside the language: pills like it; Help is lit while Help is open (Support opens a dialog) */
.mast-pill {
  position: relative; display: inline-flex; align-items: center; gap: .4rem; min-height: 2rem; padding-block: 0; padding-inline: .65rem .85rem; border-radius: var(--sg-radius-pill);
  background: rgb(16 15 39 / .72); border: 1px solid var(--sg-line-2); color: var(--sg-text-1); font-size: var(--sg-text-label); font-weight: 600; cursor: pointer;
  transition: border-color var(--sg-dur-fast) var(--sg-ease-out), background-color var(--sg-dur-fast) var(--sg-ease-out);
}
.mast-pill::after { content: ""; position: absolute; inset: -6px -3px; }   /* a 44px hit area */
.mast-pill .icon { width: 1rem; height: 1rem; color: var(--sg-text-2); }
@media (hover: hover) and (pointer: fine) { .mast-pill:hover { border-color: rgb(255 255 255 / .36); background: rgb(37 33 66 / .86); } }
.mast-pill[aria-current="page"] { border-color: var(--sg-coral); box-shadow: 0 0 0 1px rgb(253 93 98 / .3), 0 0 14px -3px rgb(250 40 137 / .7); }
.mast-pill[aria-current="page"] .icon { color: var(--sg-text-accent); }

/* the six steps on the horizon: a 2px tube, lit up to the current step, with the sun on it */
.route { position: relative; padding-bottom: 1.35rem; }
.route::before, .route::after { content: ""; position: absolute; inset-inline: 0; bottom: .6rem; height: 2px; border-radius: 2px; }
.route::before { background: var(--sg-tube-off); }
.route::after {
  background: linear-gradient(var(--h-dir, 90deg), rgb(250 40 137 / 0) 0, var(--sg-vice-magenta) 3rem, var(--sg-coral) 62%, var(--sg-tangerine) 100%);
  box-shadow: 0 0 10px rgb(250 40 137 / .55); transform-origin: left center; transform: scaleX(var(--lit, 0));
  transition: transform var(--sg-dur-slow) var(--sg-ease-in-out);
}
[dir="rtl"] .route { --h-dir: 270deg; }
[dir="rtl"] .route::after { transform-origin: right center; }
.sun {
  position: absolute; bottom: calc(.6rem - 6px); left: -7px; width: 14px; height: 14px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, #fff7dc 0 30%, var(--sg-sun-gold) 46%, var(--sg-tangerine) 100%);
  box-shadow: 0 0 0 3px rgb(255 148 60 / .25), 0 0 16px 4px rgb(255 148 60 / .7), 0 0 40px 6px rgb(250 40 137 / .45);
  transform: translateX(var(--sun)); transition: transform var(--sg-dur-slow) var(--sg-ease-in-out), opacity var(--sg-dur-fast);
}
[dir="rtl"] .sun { left: auto; right: -7px; transform: translateX(calc(-1 * var(--sun))); }
.route:not(.is-ready) .sun, .route:not(.is-ready)::after { opacity: 0; }
.steps { display: grid; grid-template-columns: repeat(var(--count, 6), minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; }
.steps li { display: flex; justify-content: center; min-width: 0; }
.step {
  display: inline-flex; align-items: baseline; justify-content: center; gap: .4rem; max-width: 100%; min-height: var(--sg-control-h); padding: .4rem .5rem .7rem;
  border: 0; border-radius: var(--sg-radius-sm); background: none; color: var(--sg-text-3); cursor: pointer;
  font: var(--sg-display-weight) calc(var(--sg-display-scale) * 1.25rem)/1 var(--sg-font-display); font-stretch: var(--sg-display-stretch);
  white-space: nowrap; text-shadow: 0 1px 8px rgb(10 5 20 / .9); transition: color var(--sg-dur-fast);
}
.step .n { font: 600 .75rem/1 var(--sg-font-text); opacity: .85; }
.step.done { color: var(--sg-text-2); }
.step.done .n::after { content: " \2713"; }
.step.current { color: var(--sg-text-1); }
@media (hover: hover) and (pointer: fine) { .step:hover:not(:disabled) { color: var(--sg-text-1); } }
.step:disabled { cursor: default; opacity: .5; }

/* ================================================================ layout */
main { flex: 1; width: min(100% - 2 * var(--sg-gutter), var(--sg-page-max)); margin: 0 auto; padding: var(--sg-space-6) 0 var(--sg-space-8); }
main:focus { outline: none; }
main.is-entering { animation: sg-rise var(--sg-dur-medium) var(--sg-ease-out); }

/* the screen title block */
.title-card { display: grid; gap: .6rem; justify-items: start; margin-bottom: var(--sg-space-6); }
.chip { display: inline-flex; align-items: center; gap: .4rem; font-size: var(--sg-text-label); font-weight: 600; color: var(--sg-text-2); letter-spacing: var(--sg-tracking-label); }
.title-card h1 { font-size: calc(var(--sg-display-scale) * var(--sg-text-h1)); line-height: var(--sg-leading-display); max-width: 18ch; }
.title-card p { max-width: var(--sg-measure); color: var(--sg-text-2); font-size: var(--sg-text-lead); line-height: var(--sg-leading-body); }
.title-card p + p { margin-top: -.2rem; }
.title-card strong { color: var(--sg-text-1); font-weight: 600; font-variant-numeric: tabular-nums; }
.title-card strong.gold { color: var(--sg-text-projected); }

/* ================================================================ buttons: pills, one primary per view */
.btn {
  --_bg: transparent; --_fg: var(--sg-text-1); --_bd: var(--sg-line-control);
  position: relative; isolation: isolate; display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: var(--sg-control-h); padding: .55rem 1.25rem; border-radius: var(--sg-radius-pill); border: 1px solid var(--_bd);
  background: var(--_bg); color: var(--_fg); font: 600 var(--sg-text-body)/1.15 var(--sg-font-text); text-align: center; text-decoration: none; cursor: pointer;
  transition: background-color var(--sg-dur-fast) var(--sg-ease-out), border-color var(--sg-dur-fast) var(--sg-ease-out), color var(--sg-dur-fast) var(--sg-ease-out),
              box-shadow var(--sg-dur-base) var(--sg-ease-out), transform var(--sg-dur-instant) var(--sg-ease-out);
}
.btn .icon { width: 1.25rem; height: 1.25rem; }
.btn:active:not(:disabled) { transform: scale(var(--sg-press)); }
.btn.primary { --_fg: var(--sg-text-on-accent); border-color: transparent; background: var(--sg-sunset); box-shadow: inset 0 1px 0 rgb(255 255 255 / .28), 0 8px 22px -10px rgb(250 40 137 / .8); }
.btn.primary::before { content: ""; position: absolute; inset: -1px; z-index: -1; border-radius: inherit; background: var(--sg-sunset-hi); opacity: 0; transition: opacity var(--sg-dur-fast) var(--sg-ease-out); }
.btn.quiet { --_fg: var(--sg-text-2); --_bd: transparent; padding-inline: .9rem; }
.btn.danger { --_fg: var(--sg-sign-red-text); --_bd: rgb(243 65 60 / .6); }
@media (hover: hover) and (pointer: fine) {
  .btn.primary:hover:not(:disabled)::before { opacity: 1; }
  .btn.primary:hover:not(:disabled) { box-shadow: inset 0 1px 0 rgb(255 255 255 / .3), var(--sg-glow-sunset); }
  .btn:not(.primary):not(.quiet):not(.danger):hover:not(:disabled) { --_bg: rgb(255 255 255 / .06); --_bd: rgb(255 255 255 / .62); }
  .btn.quiet:hover:not(:disabled) { --_fg: var(--sg-text-1); --_bg: rgb(255 255 255 / .07); }
  .btn.danger:hover:not(:disabled) { --_bg: rgb(243 65 60 / .12); --_bd: var(--sg-sign-red); }
}
.btn:disabled { opacity: .42; cursor: not-allowed; box-shadow: none; }
.btn.small { min-height: var(--sg-control-h-sm); padding: .35rem .9rem; font-size: var(--sg-text-small); }
.btn.small::after { content: ""; position: absolute; inset: -4px; }
.btn.small .icon { width: 1.1rem; height: 1.1rem; }
.btn[aria-busy="true"] .icon { animation: sg-spin 900ms linear infinite; }
@keyframes sg-spin { to { transform: rotate(1turn); } }
.link {
  display: inline; padding: 0; border: 0; background: none; color: var(--sg-text-2); font-size: var(--sg-text-small); text-decoration: underline;
  text-decoration-thickness: 1px; text-underline-offset: 3px; cursor: pointer; border-radius: 4px; transition: color var(--sg-dur-fast);
}
@media (hover: hover) and (pointer: fine) { .link:hover:not(:disabled) { color: var(--sg-text-1); } }
.link:disabled { opacity: .5; cursor: default; }

/* ================================================================ inputs: sunken, tabular; edited fields light up */
.cell { display: grid; gap: var(--sg-space-1); align-content: start; }
.cell > label, .cell .lbl { font-size: var(--sg-text-label); color: var(--sg-text-2); letter-spacing: var(--sg-tracking-label); }
.with-unit { display: flex; flex-wrap: wrap; gap: var(--sg-space-2); align-items: center; }
input[type="number"], input[type="search"], input.ip {
  min-height: var(--sg-control-h); padding: 0 .9rem; border-radius: var(--sg-radius-md); border: 1px solid var(--sg-input-border);
  background: var(--sg-input-bg); color: var(--sg-text-1); font: 600 1.0625rem/1 var(--sg-font-text); font-variant-numeric: tabular-nums;
  transition: border-color var(--sg-dur-fast) var(--sg-ease-out), box-shadow var(--sg-dur-base) var(--sg-ease-out), background-color var(--sg-dur-fast);
}
input[type="number"] { width: 9.5rem; -moz-appearance: textfield; appearance: textfield; }
input[type="number"]::-webkit-inner-spin-button, input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input::placeholder { color: var(--sg-text-3); font-weight: 400; opacity: 1; }
@media (hover: hover) and (pointer: fine) { input[type="number"]:hover:not(:disabled), input[type="search"]:hover, input.ip:hover { border-color: var(--sg-input-border-hover); } }
input[type="number"]:focus-visible, input[type="search"]:focus-visible, input.ip:focus-visible { outline: none; border-color: var(--sg-input-border-focus); box-shadow: 0 0 0 3px rgb(255 104 155 / .3); }
input:disabled { opacity: .42; cursor: not-allowed; }
.cell.wide input[type="number"] { width: 12rem; }
.cell.narrow input[type="number"] { width: 7.5rem; }
.cell.money input[type="number"] { color: var(--sg-cash); }
.was { min-height: 1.3em; font-size: var(--sg-text-label); color: var(--sg-text-3); font-variant-numeric: tabular-nums; }
.cell.changed input[type="number"] {
  border-color: rgb(253 93 98 / .55); box-shadow: 0 10px 18px -12px rgb(250 40 137 / .9);
  background: var(--sg-sunset) bottom / 100% 2px no-repeat, var(--sg-input-bg);
}
.cell.changed .was { color: var(--sg-text-accent); }
.cell.auto input { opacity: .6; }
input[aria-invalid="true"], .cell.changed input[aria-invalid="true"] {
  border-color: var(--sg-input-border-invalid); background: rgb(243 65 60 / .1); box-shadow: 0 0 0 1px var(--sg-input-border-invalid);
}

/* on/off options are switches: the track is a neon tube */
.toggle { position: relative; display: inline-flex; align-items: center; gap: .7rem; min-height: var(--sg-control-h); cursor: pointer; color: var(--sg-text-1); }
.toggle input { position: absolute; opacity: 0; width: 2.75rem; height: 1.625rem; margin: 0; inset-inline-start: 0; top: 50%; transform: translateY(-50%); cursor: pointer; }
.track {
  position: relative; flex: none; width: 2.75rem; height: 1.625rem; border-radius: var(--sg-radius-pill); border: 2px solid var(--sg-line-control); background: var(--sg-surface-sunken);
  transition: border-color var(--sg-dur-fast), background-color var(--sg-dur-fast), box-shadow var(--sg-dur-base);
}
.track::after {
  content: ""; position: absolute; top: 2px; inset-inline-start: 2px; width: 1.125rem; height: 1.125rem; border-radius: 50%; background: var(--sg-smoke);
  transition: transform var(--sg-dur-base) var(--sg-ease-out), background-color var(--sg-dur-fast);
}
.toggle input:checked + .track { border-color: transparent; background: var(--sg-sunset) padding-box, var(--sg-sunset) border-box; box-shadow: var(--sg-glow-sunset); }
.toggle input:checked + .track::after { transform: translateX(1.125rem); background: var(--sg-shell); }
[dir="rtl"] .toggle input:checked + .track::after { transform: translateX(-1.125rem); }
.toggle input:focus-visible + .track { outline: 2px solid var(--sg-focus); outline-offset: 3px; }
.toggle input:disabled + .track { opacity: .4; }
.toggle input:checked + .track.is-igniting { animation: sg-ignite var(--sg-dur-ignite) linear; }
.toggle.small { font-size: var(--sg-text-small); color: var(--sg-text-2); }
/* real checkboxes stay checkboxes */
input[type="checkbox"] { accent-color: var(--sg-coral); }
.check { display: flex; gap: .75rem; align-items: center; margin-top: var(--sg-space-3); padding: .8rem 1rem; border-radius: var(--sg-radius-md); background: var(--sg-surface-2);
  border: 1px solid var(--sg-line-2); cursor: pointer; font-weight: 600; transition: border-color var(--sg-dur-fast); }
.check input { width: 1.25rem; height: 1.25rem; margin: 0; flex: none; }
.check:has(input:checked) { border-color: rgb(253 93 98 / .6); }

/* ================================================================ risk: Leonida road signs, always with words */
.risk { display: inline-flex; align-items: center; gap: .45rem; font-size: var(--sg-text-label); font-weight: 600; line-height: 1.2; }
.risk svg { width: 1rem; height: 1rem; flex: none; }
.risk.tested { color: var(--sg-sign-green-text); }
.risk.caution { color: var(--sg-sign-yellow-text); }
.risk.danger { color: var(--sg-sign-red-text); }

/* count tags: a sunset pill that counts edits */
.tag {
  display: inline-grid; place-items: center; min-width: 1.375rem; height: 1.375rem; padding: 0 .35rem; border-radius: var(--sg-radius-pill);
  background: var(--sg-sunset); color: var(--sg-text-on-accent); font: 700 .75rem/1 var(--sg-font-text); font-variant-numeric: tabular-nums; box-shadow: 0 0 0 2px var(--sg-bg);
}
.tag:empty { display: none; }

/* ================================================================ surfaces */
.panel { padding: var(--sg-space-5); border-radius: var(--sg-radius-lg); background: var(--sg-surface-1); border: 1px solid var(--sg-line-2); box-shadow: var(--sg-elev-1); }
.panel > h3 + p, .panel > h3 + .detail, .panel > h2 + p, .panel > h2 + .detail { margin-top: .4rem; }
h2.h3 { font-size: calc(var(--sg-display-scale) * var(--sg-text-h3)); }
.panel .detail { color: var(--sg-text-2); font-size: var(--sg-text-small); max-width: var(--sg-measure); }
.callout {   /* the sign sits in the padding at the start, so the words flow as plain text beside it */
  --sign: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Crect x='3.2' y='3.2' width='9.6' height='9.6' rx='1.3' transform='rotate(45 8 8)' fill='%23f6d732'/%3E%3Crect x='4.75' y='4.75' width='6.5' height='6.5' rx='.7' transform='rotate(45 8 8)' fill='none' stroke='%231f1c3f' stroke-width='1.2'/%3E%3C/svg%3E");
  --tint: rgb(246 215 50 / .06);
  display: block; padding: .85rem 1rem; padding-inline-start: 2.6rem; border-radius: var(--sg-radius-md); border: 1px solid rgb(246 215 50 / .32);
  background: var(--sign) no-repeat left 1rem top 1.1rem / 1rem 1rem, linear-gradient(var(--tint), var(--tint));
  color: var(--sg-text-2); font-size: var(--sg-text-small); line-height: 1.5;
}
[dir="rtl"] .callout { background-position: right 1rem top 1.1rem, 0 0; }
.callout > div + div, .callout > strong + div { margin-top: .35rem; }
.callout strong, .callout b { color: var(--sg-text-1); font-weight: 600; }
.callout.danger {
  --sign: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M5.4 1.2h5.2l3.7 3.7v5.2l-3.7 3.7H5.4l-3.7-3.7V4.9z' fill='%23f3413c'/%3E%3Cpath d='M6.1 3h3.8l2.6 2.6v3.8l-2.6 2.6H6.1L3.5 9.4V5.6z' fill='none' stroke='%23fff' stroke-opacity='.92' stroke-width='1.2'/%3E%3C/svg%3E");
  --tint: rgb(243 65 60 / .08); border-color: rgb(243 65 60 / .4);
}
.callout.info {
  --sign: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2346ded6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 16v-4'/%3E%3Cpath d='M12 8h.01'/%3E%3C/svg%3E");
  --tint: var(--sg-surface-1); border-color: var(--sg-line-2);
}
.callout > .btn, .callout > button { margin-inline-start: .6rem; vertical-align: middle; }
.callout.signin-first { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem var(--sg-space-4); }
.callout.signin-first > span { flex: 1 1 20rem; }
.callout.signin-first .btn { margin-inline-start: auto; }
.callout.skipped { margin: calc(-1 * var(--sg-space-3)) 0 var(--sg-space-5); }
.skipped-list { margin: .5rem 0 0; padding-inline-start: 1.1rem; }
.callout.ipv6 { margin-top: var(--sg-space-3); }
.callout.ipv6 div + div { margin-top: .3rem; }
.empty {
  display: grid; justify-items: center; gap: .75rem; padding: var(--sg-space-6) var(--sg-space-5); text-align: center; border-radius: var(--sg-radius-lg);
  border: 1px dashed var(--sg-line-2); color: var(--sg-text-2);
}
.empty p { max-width: 52ch; }
.porthole {   /* an unlit porthole: the round section button's disc, at rest */
  position: relative; display: grid; place-items: center; width: 3.5rem; height: 3.5rem; border-radius: 50%; border: 2px solid var(--sg-tube-off);
  background: var(--sg-surface-1); color: var(--sg-text-3); flex: none;
}
.porthole .icon { width: 1.5rem; height: 1.5rem; }

/* loading: a line that says what is happening, then the shape of what is coming */
.loading { display: flex; align-items: center; gap: .6rem; color: var(--sg-text-2); font-size: var(--sg-text-small); }
.loading::before { content: ""; width: 1rem; height: 1rem; border-radius: 50%; border: 2px solid var(--sg-tube-off); border-top-color: var(--sg-coral); animation: sg-spin 900ms linear infinite; }
.skel { display: grid; gap: var(--sg-space-3); margin-top: var(--sg-space-5); }
.skel i { display: block; height: 3.25rem; border-radius: var(--sg-radius-md); background: linear-gradient(90deg, var(--sg-surface-1) 0%, var(--sg-surface-2) 50%, var(--sg-surface-1) 100%) 0 0 / 200% 100%;
  animation: sg-shimmer 1.6s linear infinite; }
.skel i:nth-child(2) { width: 86%; } .skel i:nth-child(3) { width: 72%; }
@keyframes sg-shimmer { to { background-position: -200% 0; } }

/* numbered how-to lists: each step in an unlit porthole */
.how { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: var(--sg-space-4); max-width: 46rem; }
.how li { counter-increment: s; display: grid; grid-template-columns: 2.5rem 1fr; gap: .25rem var(--sg-space-4); align-items: start; }
.how li::before {
  content: counter(s); grid-row: 1 / span 3; display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 50%;
  border: 2px solid var(--sg-tube-off); background: var(--sg-surface-1); color: var(--sg-text-1); font: var(--sg-display-weight) 1.15rem/1 var(--sg-font-display);
  font-stretch: var(--sg-num-stretch); font-variant-numeric: tabular-nums;
}
.how li > * { grid-column: 2; }
.how strong { display: block; padding-top: .45rem; font-weight: 600; }
.how .path { display: block; color: var(--sg-text-2); font-size: var(--sg-text-small); }

/* ================================================================ jobs: a stage box with a tube that fills */
.job { display: grid; gap: var(--sg-space-3); padding: var(--sg-space-5); border-radius: var(--sg-radius-lg); background: var(--sg-surface-1); border: 1px solid var(--sg-line-2); box-shadow: var(--sg-elev-1); }
.job .stage {
  display: flex; align-items: center; gap: .7rem; margin: 0; font: var(--sg-display-weight) calc(var(--sg-display-scale) * var(--sg-text-h3))/1.15 var(--sg-font-display);
  font-stretch: var(--sg-display-stretch); text-wrap: balance;
}
.job .stage::before { content: ""; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--sg-wait); box-shadow: 0 0 8px rgb(246 215 50 / .7); }
.job.ok .stage::before { background: var(--sg-ok); box-shadow: 0 0 8px rgb(53 194 109 / .8); }
.job.err { border-color: rgb(243 65 60 / .4); background: linear-gradient(rgb(243 65 60 / .06), rgb(243 65 60 / .06)), var(--sg-surface-1); }
.job.err .stage { align-items: flex-start; font: 600 var(--sg-text-body)/1.5 var(--sg-font-text); }
.job.err .stage::before { margin-top: .5rem; background: var(--sg-bad); box-shadow: 0 0 8px rgb(243 65 60 / .8); }
.job .detail { color: var(--sg-text-2); font-size: var(--sg-text-small); max-width: var(--sg-measure); }
.job .row { margin: 0; }
.bar { position: relative; height: 6px; border-radius: var(--sg-radius-pill); background: var(--sg-surface-sunken); box-shadow: inset 0 0 0 1px var(--sg-line-1); overflow: hidden; }
.bar span {
  position: absolute; inset-block: 0; inset-inline-start: 0; width: 38%; border-radius: inherit; background: var(--sg-sunset); box-shadow: 0 0 10px rgb(250 40 137 / .6);
  animation: sg-scan var(--sg-dur-loop) var(--sg-ease-in-out) infinite;
}
[dir="rtl"] .bar span { animation-name: sg-scan-rtl; }
@keyframes sg-scan-rtl { from { transform: translateX(100%); } to { transform: translateX(-260%); } }
.bar.fixed span { animation: none; transition: width var(--sg-dur-slow) var(--sg-ease-out); }
.stages { display: flex; flex-wrap: wrap; gap: .35rem 1.1rem; margin: 0; padding: 0; list-style: none; font-size: var(--sg-text-label); color: var(--sg-text-3); }
.stages li { display: inline-flex; align-items: center; gap: .4rem; }
.stages li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--sg-tube-off); }
.stages li.done { color: var(--sg-text-2); }
.stages li.done::before { border-color: var(--sg-ok); background: var(--sg-ok); }
.stages li[aria-current] { color: var(--sg-text-1); }
.stages li[aria-current]::before { border-color: var(--sg-coral); background: var(--sg-coral); box-shadow: 0 0 8px var(--sg-coral); }
.power { display: grid; grid-template-columns: auto 1fr; gap: var(--sg-space-4); align-items: center; padding: var(--sg-space-4); border-radius: var(--sg-radius-md);
  background: rgb(246 215 50 / .07); border: 1px solid rgb(246 215 50 / .4); color: var(--sg-text-2); }
.power svg { width: 2.75rem; height: 2.75rem; }
.power svg path, .power svg line { stroke: var(--sg-sign-yellow); stroke-width: 4; fill: none; stroke-linecap: round; }
.power strong { display: block; margin-bottom: .2rem; font: var(--sg-display-weight) calc(var(--sg-display-scale) * var(--sg-text-h3))/1.15 var(--sg-font-display); font-stretch: var(--sg-display-stretch); color: var(--sg-sign-yellow-text); }
.accounts { display: grid; gap: var(--sg-space-3); padding: var(--sg-space-4); border-radius: var(--sg-radius-md); background: var(--sg-surface-2); border: 1px solid var(--sg-line-2); }
.accounts strong { font: var(--sg-display-weight) calc(var(--sg-display-scale) * var(--sg-text-h3))/1.15 var(--sg-font-display); font-stretch: var(--sg-display-stretch); }
details.log summary { cursor: pointer; color: var(--sg-text-2); font-size: var(--sg-text-small); width: fit-content; border-radius: 4px; }
details.log pre { max-height: 14rem; overflow: auto; margin: .5rem 0 0; padding: .75rem; border-radius: var(--sg-radius-md); background: var(--sg-surface-sunken);
  color: var(--sg-text-2); font: .75rem/1.5 var(--sg-font-mono); white-space: pre-wrap; }

/* ================================================================ connect */
.find { display: flex; flex-wrap: wrap; gap: var(--sg-space-4) var(--sg-space-6); align-items: end; }
.find form { display: flex; flex-wrap: wrap; gap: var(--sg-space-2) var(--sg-space-3); align-items: end; }
.find form label { flex-basis: 100%; }
input.ip { width: 11.5rem; font-weight: 600; direction: ltr; }
.caps { margin-top: var(--sg-space-8); padding-top: var(--sg-space-6); border-top: 1px solid var(--sg-line-1); }
.caps .note { margin-top: .4rem; }
.caps dl { margin: var(--sg-space-5) 0 0; display: grid; }
.caps dl > div { display: grid; grid-template-columns: 2.75rem minmax(0, 1fr) auto; column-gap: var(--sg-space-4); row-gap: .3rem; align-items: center; padding: var(--sg-space-4) 0; border-bottom: 1px solid var(--sg-line-1); }
.caps dl > div:first-child { border-top: 1px solid var(--sg-line-1); }
.caps .porthole { width: 2.75rem; height: 2.75rem; border-width: 1.5px; color: var(--sg-text-2); }
.caps .porthole .icon { width: 1.25rem; height: 1.25rem; }
.caps dt {   /* the icon sits in the first column and the name starts where the second does, so the description lines up under it */
  grid-column: 1 / 3; grid-row: 1; display: flex; align-items: center; gap: var(--sg-space-4); min-width: 0;
  font: var(--sg-display-weight) calc(var(--sg-display-scale) * 1.3rem)/1.1 var(--sg-font-display); font-stretch: var(--sg-display-stretch); overflow-wrap: break-word; hyphens: auto;
}
.caps dt .porthole { margin-block: -.3rem; }
.caps dd { margin: 0; grid-column: 2; grid-row: 2; color: var(--sg-text-2); font-size: var(--sg-text-small); max-width: 66ch; }
.caps dd.r { grid-column: 3; grid-row: 1 / span 2; justify-self: end; }

/* sign-in: the code to enter on GarlicSaves (codes and addresses read left to right) */
.signin-code { display: grid; gap: var(--sg-space-3); justify-items: start; }
.signin-code .lbl { color: var(--sg-text-2); font-size: var(--sg-text-small); }
.signin-code .code { font: 600 clamp(2rem, 1.4rem + 2vw, 2.75rem)/1.1 var(--sg-font-mono); letter-spacing: var(--sg-tracking-code); color: var(--sg-sun-gold); user-select: all; direction: ltr; unicode-bidi: isolate; }
.signin-code .addr { font-family: var(--sg-font-mono); color: var(--sg-text-1); overflow-wrap: anywhere; direction: ltr; unicode-bidi: isolate; }

/* ================================================================ edit: the saves, the round section buttons, the overview */
.saves { display: flex; gap: var(--sg-space-2); overflow-x: auto; padding: 4px 4px 8px; margin: -4px -4px var(--sg-space-5); scrollbar-width: thin; scrollbar-color: var(--sg-night-700) transparent; }
.save {
  flex: none; display: grid; align-content: start; gap: 2px; min-width: 10.5rem; max-width: 16rem; padding: .6rem .9rem .7rem; text-align: start; border-radius: var(--sg-radius-sm);
  border: 1px solid var(--sg-line-2); background: var(--sg-surface-1); color: var(--sg-text-1); cursor: pointer;
  transition: border-color var(--sg-dur-fast), background-color var(--sg-dur-fast), box-shadow var(--sg-dur-base);
}
.save .k { font-size: var(--sg-text-label); color: var(--sg-text-3); }
.save .t { font: var(--sg-display-weight) calc(var(--sg-display-scale) * 1.125rem)/1.1 var(--sg-font-display); font-stretch: var(--sg-display-stretch); overflow-wrap: anywhere; }
.save .m { display: inline-flex; align-items: center; gap: .35rem; font-size: var(--sg-text-label); color: var(--sg-text-accent); }
.save .m::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--sg-accent-solid); box-shadow: 0 0 6px var(--sg-coral); }
/* when the PS5 last wrote a save, under its mission title on the save cards, and the newest save's tag. Data, so no
   sunset: that means "act" or "yours". */
.saved { display: flex; flex-wrap: wrap; align-items: center; gap: .2rem .45rem; font: var(--sg-text-weight) var(--sg-text-label)/1.35 var(--sg-font-text); color: var(--sg-text-2); }
.saved time { white-space: nowrap; }
.newest { display: inline-flex; align-items: center; min-height: 1.25rem; padding: 0 .5rem; border-radius: var(--sg-radius-pill); border: 1px solid var(--sg-line-control);
  color: var(--sg-text-1); font-size: .75rem; font-weight: 600; line-height: 1.15; white-space: nowrap; }
@media (hover: hover) and (pointer: fine) { .save:hover { border-color: rgb(255 255 255 / .3); background: var(--sg-surface-2); } }
.save[aria-pressed="true"] { background: var(--sg-surface-2); border-color: transparent; box-shadow: var(--sg-glow-sunset); }

.sections { display: flex; flex-wrap: wrap; gap: var(--sg-space-2) var(--sg-space-3); margin-bottom: var(--sg-space-6); }
.round {
  position: relative; display: grid; justify-items: center; align-content: start; gap: .45rem; width: 6rem; padding: 0 0 .1rem; border: 0; background: none;
  color: var(--sg-text-2); font-size: var(--sg-text-label); cursor: pointer;
}
.round .disc {
  position: relative; display: grid; place-items: center; width: var(--sg-round-btn); height: var(--sg-round-btn); border-radius: 50%; border: 2px solid var(--sg-tube-off);
  background: var(--sg-surface-1); transition: border-color var(--sg-dur-fast), transform var(--sg-dur-medium) var(--sg-ease-out), color var(--sg-dur-fast);
}
.round .disc .icon { width: 1.625rem; height: 1.625rem; }
.round .disc::after { content: ""; position: absolute; inset: -2px; border-radius: 50%; box-shadow: var(--sg-glow-sunset); opacity: 0; pointer-events: none; }
.round .tag { position: absolute; top: -4px; inset-inline-end: -6px; }
.round .lbl { line-height: 1.2; text-align: center; hyphens: auto; overflow-wrap: anywhere; max-width: 100%; transition: color var(--sg-dur-fast); }   /* long German words break rather than run into the next label */
@media (hover: hover) and (pointer: fine) {
  .round:hover .disc { border-color: rgb(255 255 255 / .42); color: var(--sg-text-1); transform: translateY(var(--sg-lift)); }
  .round:hover .lbl { color: var(--sg-text-1); }
}
.round[aria-selected="true"] { color: var(--sg-text-1); }
.round[aria-selected="true"] .disc { border-color: transparent; background: linear-gradient(var(--sg-surface-2), var(--sg-surface-2)) padding-box, var(--sg-sunset) border-box; }
.round[aria-selected="true"] .disc::after { opacity: 1; }
.round.is-igniting .disc::after { animation: sg-ignite var(--sg-dur-ignite) linear; }
.round:focus-visible { outline: none; }
.round:focus-visible .disc { outline: 2px solid var(--sg-focus); outline-offset: 4px; }

.overview { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); gap: var(--sg-space-5); align-items: stretch; }
.overview-note { margin-top: var(--sg-space-5); color: var(--sg-text-3); font-size: var(--sg-text-small); }

/* Lucia's and Jason's portraits (900x1200) in landscape boxes, with the eyes at the same place in each. --eyes-x and
   --eyes-y: the midpoint between the centres of the irises in each file, as fractions of its width and height (measure
   them again if a picture changes). In a landscape box, object-fit: cover scales a portrait to the box's width, so
   object-position can't move it across. So the <img> is made --zoom times taller than the picture's own shape, just
   enough that cover makes the picture wider than the box: object-position then centres the eyes across, and translate
   puts them --eyes-at of the way down the box. The <img> stays as wide as its box, which clips the rest; a hover's
   transform: scale(1.03) adds to the translate, around the eyes. */
img[src$="lucia-portrait-1200.webp"] { --eyes-x: .5833; --eyes-y: .4392; }
img[src$="jason-portrait-1200.webp"] { --eyes-x: .525; --eyes-y: .275; }
.char-art img, .thumbs img.tall {
  --zoom: calc(1.01 * max(1, .5 / (1 - var(--eyes-x)), .5 / var(--eyes-x)));
  height: auto; aspect-ratio: 3 / calc(4 * var(--zoom));
  object-position: calc((var(--eyes-x) * var(--zoom) - .5) / (var(--zoom) - 1) * 100%) 0;
  transform-origin: 50% calc(var(--eyes-y) * 100%);
}

/* character cards: the portrait, three skill rings, the cash */
.char {
  --tube: var(--sg-orchid); position: relative; display: grid; grid-template-rows: auto auto 1fr auto; overflow: hidden; border-radius: var(--sg-radius-xl);
  background: var(--sg-surface-1); border: 1px solid var(--sg-line-2); box-shadow: var(--sg-elev-1);
  transition: transform var(--sg-dur-medium) var(--sg-ease-out), box-shadow var(--sg-dur-medium) var(--sg-ease-out), border-color var(--sg-dur-fast);
}
.char-art { --art-h: 13.5rem; --eyes-at: .44; position: relative; height: var(--art-h); overflow: hidden; background: var(--sg-sky-dusk); }
/* the eyes --eyes-at of the way down at any card width (the picture's height grows with the width): above the gradient */
.char-art img { width: 100%; object-fit: cover; display: block; transition: transform var(--sg-dur-slow) var(--sg-ease-out);
  translate: 0 calc(var(--eyes-at) * var(--art-h) - var(--eyes-y) * 100%); }
/* the gradient, and under it the image outline, drawn on the box: the taller <img> runs past its top and bottom */
.char-art::after {
  --line: linear-gradient(var(--sg-image-outline), var(--sg-image-outline));
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(0deg, var(--sg-surface-1) 0%, rgb(26 23 52 / .82) 22%, rgb(26 23 52 / 0) 58%),
    var(--line) top / 100% 1px no-repeat, var(--line) bottom / 100% 1px no-repeat, var(--line) left / 1px 100% no-repeat, var(--line) right / 1px 100% no-repeat;
}
.char-art::before { content: ""; position: absolute; inset: auto 0 0; z-index: 1; height: 2px; background: linear-gradient(90deg, transparent, var(--tube) 30%, var(--tube) 70%, transparent); opacity: .55; }
.char-name { position: absolute; z-index: 2; inset-inline-start: var(--sg-space-5); bottom: var(--sg-space-3); display: flex; align-items: baseline; gap: .6rem; }
.char-name h2 { font-size: calc(var(--sg-display-scale) * 2.25rem); line-height: 1; }
.char-name .dot { background: var(--tube); box-shadow: 0 0 8px var(--tube); }
.char-rings { display: flex; justify-content: space-around; gap: var(--sg-space-3); padding: var(--sg-space-4) var(--sg-space-4) var(--sg-space-2); }
.char-msg { padding: var(--sg-space-4) var(--sg-space-5) 0; color: var(--sg-text-3); font-size: var(--sg-text-small); }
.char-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--sg-space-3); padding: var(--sg-space-3) var(--sg-space-3) var(--sg-space-3) var(--sg-space-5); border-top: 1px solid var(--sg-line-1); }
[dir="rtl"] .char-foot { padding: var(--sg-space-3) var(--sg-space-5) var(--sg-space-3) var(--sg-space-3); }
.char-stat { display: grid; gap: 1px; }
.char-stat .lbl, .bank-bal .lbl, .bank-tuck .lbl { font-size: var(--sg-text-label); color: var(--sg-text-2); }
.char-stat .fig { font-size: 1.375rem; line-height: 1.1; }
.char-stat .none { color: var(--sg-text-3); }
.char-stat .was, .bank-foot .was { min-height: 0; color: var(--sg-text-accent); font-size: .75rem; }
.go::before { content: ""; position: absolute; inset: 0; }   /* the whole card is the link; "Edit" is its label */
@media (hover: hover) and (pointer: fine) {
  .char:hover, .bank:hover { transform: translateY(var(--sg-lift)); box-shadow: var(--sg-elev-2); border-color: color-mix(in oklab, var(--tube) 45%, transparent); }
  .char:hover .char-art img { transform: scale(1.03); }
  .char:hover .go, .bank:hover .go { --_fg: var(--sg-text-1); }
}
.char:has(.go:focus-visible), .bank:has(.go:focus-visible) { border-color: color-mix(in oklab, var(--tube) 60%, transparent); }

/* skill rings: four tube segments, one per level, lit in the character's colour; the level is always printed */
.ring { --tube-c: var(--tube, var(--sg-orchid)); display: grid; justify-items: center; align-content: start; gap: .35rem; text-align: center; min-width: 4.5rem; }
.ring-dial { position: relative; width: var(--sg-ring-size); height: var(--sg-ring-size); }
.ring-dial svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ring-seg { fill: none; stroke: var(--sg-tube-off); stroke-width: var(--sg-ring-stroke); stroke-linecap: round; transition: stroke var(--sg-dur-fast); }
.ring-seg.is-lit { stroke: var(--tube-c); filter: drop-shadow(0 0 1.5px var(--tube-c)) drop-shadow(0 0 5px color-mix(in oklab, var(--tube-c) 55%, transparent)); }
.ring-core { fill: none; stroke: #fff; stroke-opacity: 0; stroke-width: 1.4; stroke-linecap: round; transition: stroke-opacity var(--sg-dur-fast); }
.ring-core.is-lit { stroke-opacity: .7; }
.ring-seg.is-igniting, .ring-core.is-igniting { animation: sg-ignite var(--sg-dur-ignite) linear; }
.ring-val { position: absolute; inset: 0; display: grid; place-content: center; font-size: 1.625rem; line-height: 1; direction: ltr; }
.ring-val small { font: 600 .75rem/1 var(--sg-font-text); color: var(--sg-text-3); margin-top: 2px; }
.ring-lbl { display: inline-flex; align-items: center; gap: .3rem; font-size: var(--sg-text-label); color: var(--sg-text-2); }
.ring-lbl .icon { width: .95rem; height: .95rem; color: var(--tube-c); }
.ring-was { font-size: .75rem; line-height: 1; color: var(--sg-text-accent); min-height: .75rem; }
.ring.is-changed .ring-dial::after { content: ""; position: absolute; top: 2px; inset-inline-end: 2px; width: 9px; height: 9px; border-radius: 50%; background: var(--sg-accent-solid);
  box-shadow: 0 0 0 2px var(--sg-surface-1), 0 0 8px var(--sg-coral); }
.ring.is-pending .ring-dial { opacity: .55; }
.ring.is-pending .ring-val { color: var(--sg-text-3); }

/* the bank card: BuckMe's face, Family Savings tucked behind it, the limit */
.bank {
  --tube: var(--sg-cash); position: relative; display: grid; grid-template-rows: auto 1fr auto; gap: var(--sg-space-4); padding: var(--sg-space-4); border-radius: var(--sg-radius-xl);
  background: var(--sg-surface-1); border: 1px solid var(--sg-line-2); box-shadow: var(--sg-elev-1);
  transition: transform var(--sg-dur-medium) var(--sg-ease-out), box-shadow var(--sg-dur-medium) var(--sg-ease-out), border-color var(--sg-dur-fast);
}
.bank-stack { display: grid; }
.bank-face {
  --mx: 30%; --my: 0%; position: relative; z-index: 1; aspect-ratio: 1.586; overflow: hidden; display: grid; grid-template-rows: auto 1fr; padding: 1.1rem 1.25rem 1rem;
  border-radius: var(--sg-radius-lg); color: var(--sg-shell);
  background: radial-gradient(120% 90% at var(--mx) var(--my), rgb(255 255 255 / .10), transparent 46%),
              linear-gradient(135deg, rgb(255 255 255 / .04) 0 18%, transparent 18% 36%, rgb(255 255 255 / .03) 36% 42%, transparent 42%),
              linear-gradient(160deg, #2a2654 0%, #1a1738 46%, #0f0d27 100%);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .12), inset 0 0 0 1px rgb(255 255 255 / .06), 0 14px 30px -14px rgb(3 2 14 / .9);
}
.bank-face::after { content: ""; position: absolute; inset: auto 0 0; height: 3px; background: var(--sg-horizon); box-shadow: 0 0 12px rgb(250 40 137 / .6); }
.bank-brand { display: flex; align-items: center; justify-content: space-between; }
.bank-brand b { font: italic 800 1.35rem/1 var(--sg-font-display); font-stretch: 85%; letter-spacing: -.01em; }
:root:lang(ar) .bank-brand b, :root:lang(ja) .bank-brand b, :root:lang(ko) .bank-brand b, :root:lang(zh) .bank-brand b { letter-spacing: 0; }
.bank-chip { position: relative; width: 2.4rem; height: 1.8rem; border-radius: 6px; background: linear-gradient(135deg, #ffe39a, #f2b14d 55%, #d98a2b); box-shadow: inset 0 0 0 1px rgb(80 40 0 / .35); }
.bank-chip::before, .bank-chip::after { content: ""; position: absolute; left: 0; right: 0; top: 33%; height: 1px; background: rgb(90 50 0 / .45); }
.bank-chip::after { top: 66%; }
.bank-bal { align-self: end; display: grid; gap: 2px; }
.bank-bal .fig { font-size: clamp(2rem, 1.4rem + 1.6vw, 2.6rem); line-height: 1; color: var(--sg-shell); direction: ltr; justify-self: start; }
[dir="rtl"] .bank-bal .fig { justify-self: end; }
.bank-tuck {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin: -1.1rem .7rem 0; padding: 1.75rem 1.1rem .8rem; border-radius: 0 0 var(--sg-radius-lg) var(--sg-radius-lg);
  background: linear-gradient(170deg, #2c2a55, #1c1a3c); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .07), 0 10px 22px -12px rgb(3 2 14 / .9); font-size: var(--sg-text-small); color: var(--sg-text-2);
}
.bank-tuck .fig { font-size: 1.375rem; color: var(--sg-cash); direction: ltr; }
.bank-note { align-self: end; padding: 0 .25rem; font-size: var(--sg-text-small); color: var(--sg-text-3); max-width: 36ch; }
.bank-foot { display: flex; justify-content: space-between; align-items: center; gap: var(--sg-space-3); padding-top: var(--sg-space-3); border-top: 1px solid var(--sg-line-1); }
.bank.is-empty .bank-face { opacity: .7; }
.bank.is-empty .bank-bal .fig { color: var(--sg-text-3); }

/* ================================================================ sections and field rows */
.section-head { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: .5rem var(--sg-space-4); margin: 0 0 var(--sg-space-4); }
.section-head > h2, .section-head > h3 { grid-column: 1; }
.section-head > .risk, .section-head > .note, .section-head > .head-actions, .section-head > .btn { grid-column: 2; justify-self: start; }
.section-head > .head-actions, .section-head > .btn { justify-self: end; }
.section-head p { grid-column: 1 / -1; color: var(--sg-text-2); font-size: var(--sg-text-small); max-width: var(--sg-measure); }
.section-head p + p { margin-top: -.1rem; }
.head-actions { display: flex; gap: var(--sg-space-2); flex-wrap: wrap; }
.who { display: inline-flex; align-items: center; gap: .7rem; }
.who img { width: 2.5rem; height: 2.5rem; border-radius: 50%; object-fit: cover; outline: 1px solid var(--sg-image-outline); outline-offset: -1px;
  box-shadow: 0 0 0 2px var(--sg-bg), 0 0 0 3px color-mix(in oklab, var(--tube, var(--sg-orchid)) 70%, transparent); }
.group + .group, .fields + .group, .empty + .group, .callout + .group, .comp-summary + .group, .group.guns { margin-top: var(--sg-space-7); }
.fields { border-top: 1px solid var(--sg-line-1); }
.field { display: grid; grid-template-columns: minmax(12rem, 1.1fr) 1.6fr; gap: .6rem var(--sg-space-5); align-items: center; padding: var(--sg-space-4) 0; border-bottom: 1px solid var(--sg-line-1); }
.field .name { display: block; font-weight: 600; min-width: 0; }
.field .name > .risk { margin-inline-start: .4rem; vertical-align: .05em; }
.field .name .av { width: 1.75rem; height: 1.75rem; margin-inline-end: .55rem; border-radius: 50%; object-fit: cover; vertical-align: -.5rem;
  box-shadow: 0 0 0 2px var(--sg-bg), 0 0 0 3px color-mix(in oklab, var(--tube, var(--sg-orchid)) 70%, transparent); }
.field .help { display: block; margin-top: .2rem; font-weight: 400; font-size: var(--sg-text-small); color: var(--sg-text-2); max-width: var(--sg-measure-narrow); }
.field .help.warn { color: var(--sg-sign-yellow-text); }
.field .name .tier { display: inline-flex; align-items: center; margin-inline-start: .55rem; padding: .05rem .55rem; border-radius: var(--sg-radius-pill); border: 1px solid var(--sg-line-2);
  color: var(--sg-text-2); font-size: .75rem; font-weight: 600; vertical-align: .1em; white-space: nowrap; }
.field .inputs { display: flex; flex-wrap: wrap; gap: .6rem var(--sg-space-4); align-items: flex-end; min-width: 0; }
.field .inputs > .note { align-self: center; }
.stacks-opt { flex-basis: 100%; max-width: 62ch; display: grid; gap: .2rem; }
.stacks-opt .row { gap: .25rem var(--sg-space-4); }
.stacks-opt .help { margin: 0; }
.done-mark { display: inline-flex; align-items: center; gap: .35rem; color: var(--sg-sign-green-text); font-weight: 600; font-size: var(--sg-text-small); }
.done-mark::before { content: ""; width: .8rem; height: .8rem; border-radius: 2px; background: var(--sg-sign-green); box-shadow: inset 0 0 0 1.5px var(--sg-sign-green), inset 0 0 0 2.5px #fff; }

/* Money: the bank's face shows what the balance will be */
.money-top { display: grid; grid-template-columns: minmax(16rem, 22rem) 1fr; gap: var(--sg-space-6); align-items: start; }
.money-top .bank-stack { position: sticky; top: var(--sg-space-4); }
.money-top .bank-face { max-width: 22rem; }

/* Ammo: the guns they carry, as pictures, lit like a display case */
.weapons { display: grid; grid-template-columns: repeat(auto-fill, minmax(8.75rem, 1fr)); gap: var(--sg-space-2); list-style: none; padding: 0; margin: .5rem 0 var(--sg-space-5); }
.weapons li {
  position: relative; display: grid; grid-template-rows: 4.15rem auto auto; align-content: start; gap: .15rem; padding: .4rem .65rem .65rem; border-radius: var(--sg-radius-sm);
  background: var(--sg-surface-1); border: 1px solid var(--sg-line-1); font-size: var(--sg-text-label); color: var(--sg-text-1); min-width: 0;
  transition: border-color var(--sg-dur-fast) var(--sg-ease-out), background-color var(--sg-dur-fast) var(--sg-ease-out), transform var(--sg-dur-fast) var(--sg-ease-out), box-shadow var(--sg-dur-base) var(--sg-ease-out);
}
.weapons .pic { display: grid; place-items: center; width: 100%; height: 4.15rem; margin-bottom: .2rem; border-radius: var(--sg-radius-xs); color: var(--sg-text-3);
  background: radial-gradient(68% 60% at 50% 55%, rgb(255 255 255 / .11), transparent 76%); }
.weapons .pic.is-fallback { background: radial-gradient(56% 52% at 50% 50%, rgb(255 255 255 / .05), transparent 76%); }
.weapons .pic img { width: 100%; max-width: 8.75rem; height: 3.55rem; object-fit: contain; filter: drop-shadow(0 4px 7px rgb(3 2 14 / .78)); transition: transform var(--sg-dur-fast) var(--sg-ease-out); }
.weapons .pic .icon { width: 1.55rem; height: 1.55rem; opacity: .72; }
.weapons .nm { font-weight: 600; line-height: 1.25; overflow-wrap: break-word; }
.weapons .kind { color: var(--sg-text-3); font-size: .75rem; line-height: 1.25; }
.weapons .kind:empty { display: none; }
.weapons li.more { display: flex; align-items: center; justify-content: center; grid-template-rows: none; min-height: 5rem; color: var(--sg-text-3); text-align: center; }
.weapons.guns { margin: 0; width: 100%; grid-template-columns: repeat(auto-fill, minmax(9.75rem, 1fr)); }
.weapons.guns li { padding: 0; display: block; }
.weapons.guns label { position: relative; display: grid; grid-template-rows: 4.15rem auto auto; gap: .15rem; padding: .4rem .65rem .65rem; cursor: pointer; border-radius: inherit; }
.weapons.guns input { position: absolute; top: .55rem; inset-inline-start: .55rem; z-index: 1; width: 1.1rem; height: 1.1rem; margin: 0; }
.pic-zoom {
  position: absolute; top: .4rem; inset-inline-end: .4rem; z-index: 2; display: grid; place-items: center; width: 1.65rem; height: 1.65rem; padding: 0;
  border-radius: var(--sg-radius-xs); border: 1px solid var(--sg-line-2); background: rgb(16 15 39 / .78); color: var(--sg-text-2); cursor: pointer;
  opacity: .55; transition: opacity var(--sg-dur-fast), color var(--sg-dur-fast), border-color var(--sg-dur-fast), background-color var(--sg-dur-fast);
}
.pic-zoom .icon { width: .85rem; height: .85rem; }
.pic-zoom:focus-visible { opacity: 1; outline: 2px solid var(--sg-focus); outline-offset: 2px; color: var(--sg-text-1); }
@media (hover: hover) and (pointer: fine) {
  .pic-zoom { opacity: 0; }
  .weapons.guns li:hover .pic-zoom, .weapons.guns li:focus-within .pic-zoom { opacity: 1; }
  .pic-zoom:hover { color: var(--sg-text-1); border-color: rgb(255 255 255 / .42); background: var(--sg-surface-2); }
  .weapons li:not(.more):hover { border-color: rgb(255 255 255 / .24); background: var(--sg-surface-2); transform: translateY(-1px); }
  .weapons.guns li:hover { border-color: rgb(255 255 255 / .34); background: var(--sg-surface-2); transform: translateY(-2px); box-shadow: var(--sg-elev-1); }
  .weapons li:hover .pic img { transform: scale(1.04); }
}
.weapons.guns li.on { border-color: rgb(253 93 98 / .75); background: rgb(253 93 98 / .11); box-shadow: 0 0 0 1px rgb(253 93 98 / .25), 0 8px 18px -12px rgb(250 40 137 / .65); }
.weapons.guns li:has(input:focus-visible) { outline: 2px solid var(--sg-focus); outline-offset: 2px; }
.field.gunfield { align-items: start; }
.field.gunfield .inputs { flex-direction: column; align-items: stretch; gap: var(--sg-space-3); }
/* the Ammo tab's consumables (issue #44): a card each, how many of the most, then Max (Undo once picked) */
.cons-acts { margin-bottom: var(--sg-space-4); }
.field.consfield { align-items: start; }
.field.consfield .inputs { display: block; }
.cons { display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); gap: var(--sg-space-2); list-style: none; padding: 0; margin: 0; width: 100%; }
.cons li { display: grid; grid-template-rows: auto auto auto 1fr; gap: .15rem; align-content: start; justify-items: start; min-width: 0; padding: .55rem .7rem .7rem;
  border-radius: var(--sg-radius-sm); background: var(--sg-surface-1); border: 1px solid var(--sg-line-1); transition: border-color var(--sg-dur-fast), background-color var(--sg-dur-fast); }
.cons li.on { border-color: rgb(253 93 98 / .7); background: rgb(253 93 98 / .1); }
.cons .nm { font-weight: 600; font-size: var(--sg-text-label); line-height: 1.25; overflow-wrap: anywhere; }
/* .fig's numerals, without its left-to-right in Arabic: "{0} of {1}" holds a word, so it follows the page's direction */
.cons .n { font-family: var(--sg-font-display); font-stretch: var(--sg-num-stretch); font-weight: 720; font-variant-numeric: tabular-nums lining-nums;
  font-size: 1.25rem; line-height: 1.15; }
.cons li.on .n, .cons li.on .was { color: var(--sg-text-accent); }
.cons .btn, .cons .cons-done { align-self: end; margin-top: .3rem; }
.cons .cons-done { display: inline-flex; align-items: center; min-height: var(--sg-control-h-sm); color: var(--sg-text-3); font-size: var(--sg-text-small); }

/* Wardrobe and gear: whose inventory, the categories down the start side, a page of items with their tags */
.wd-who .save { min-width: 0; padding-block: .45rem .5rem; display: inline-flex; align-items: center; gap: .6rem; }
.wd-who .save .who { gap: .55rem; font-weight: 600; }
.wd-who .save .who img { width: 2rem; height: 2rem; }
.wd-who .save .m::before { width: 6px; height: 6px; }
.wd-sum { display: grid; gap: var(--sg-space-3); margin-bottom: var(--sg-space-5); }
.wd-stats { display: flex; flex-wrap: wrap; gap: .5rem var(--sg-space-6); font-size: var(--sg-text-small); color: var(--sg-text-2); }
.wd-stats b { color: var(--sg-text-1); font-size: 1.05rem; font-weight: 720; }
.wd-stats .wd-val { font-family: var(--sg-font-display); font-stretch: var(--sg-num-stretch); font-variant-numeric: tabular-nums lining-nums; }
.wd-stats .lbl { margin-inline-end: .3rem; }
.wd-layout { display: grid; grid-template-columns: minmax(12rem, 15.5rem) minmax(0, 1fr); gap: var(--sg-space-6); align-items: start; }
.wd-cats { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; position: sticky; top: var(--sg-space-4); }
.wd-group { padding: .2rem .75rem .35rem; color: var(--sg-text-3); font-size: var(--sg-text-label); font-weight: 600; }
.wd-cat {
  width: 100%; min-height: 2.75rem; display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .45rem .75rem; text-align: start;
  border: 1px solid transparent; border-radius: var(--sg-radius-sm); background: none; color: var(--sg-text-2); font: inherit; font-size: var(--sg-text-small); cursor: pointer;
  transition: background-color var(--sg-dur-fast), border-color var(--sg-dur-fast), color var(--sg-dur-fast);
}
.wd-cat.sub { padding-inline-start: 1.25rem; }
.wd-cat .n { color: var(--sg-text-3); font-size: .9rem; white-space: nowrap; }
.wd-cat .n b { color: var(--sg-text-accent); font-weight: 720; }
@media (hover: hover) and (pointer: fine) { .wd-cat:hover { background: var(--sg-surface-1); color: var(--sg-text-1); } }
.wd-cat[aria-pressed="true"] { color: var(--sg-text-1); border-color: rgb(253 93 98 / .7); background: rgb(253 93 98 / .1); }
.wd-main { min-width: 0; }
.wd-gun { display: grid; gap: .35rem; max-width: 26rem; margin-bottom: var(--sg-space-4); font-size: var(--sg-text-small); color: var(--sg-text-2); }
.wd-gun select {
  appearance: none; -webkit-appearance: none; min-height: var(--sg-control-h); padding: 0 2.4rem 0 .9rem; border-radius: var(--sg-radius-md); border: 1px solid var(--sg-input-border);
  background-color: var(--sg-input-bg); color: var(--sg-text-1); font-weight: 600; font-size: var(--sg-text-body); cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--sg-text-2) 50%), linear-gradient(135deg, var(--sg-text-2) 50%, transparent 50%);
  background-position: calc(100% - 18px) 52%, calc(100% - 12px) 52%; background-size: 6px 6px; background-repeat: no-repeat;
  transition: border-color var(--sg-dur-fast) var(--sg-ease-out), box-shadow var(--sg-dur-base) var(--sg-ease-out);
}
.wd-gun select option { background: var(--sg-surface-2); color: var(--sg-text-1); }
@media (hover: hover) and (pointer: fine) { .wd-gun select:hover { border-color: var(--sg-input-border-hover); } }
.wd-gun select:focus-visible { outline: none; border-color: var(--sg-input-border-focus); box-shadow: 0 0 0 3px rgb(255 104 155 / .3); }
[dir="rtl"] .wd-gun select { padding: 0 .9rem 0 2.4rem; background-position: 12px 52%, 18px 52%; }
.wd-tools .toggle { flex-basis: 100%; }
.wd-tools { justify-content: space-between; }
.wd-tools .search { flex: 1 1 16rem; }
.wd-main > .note { margin: calc(-1 * var(--sg-space-2)) 0 var(--sg-space-3); }
.wd-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--sg-line-1); }
.wd-list li { border-bottom: 1px solid var(--sg-line-1); transition: background-color var(--sg-dur-fast); }
.wd-list label { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .3rem var(--sg-space-4); min-height: 3rem; padding: .45rem .5rem; cursor: pointer; }
.wd-list.with-pics label { grid-template-columns: auto 4.5rem minmax(0, 1fr) auto; }
.wd-list input { width: 1.15rem; height: 1.15rem; margin: 0; }
.wd-list .pic { display: grid; place-items: center; height: 2.4rem; color: var(--sg-text-3); }
.wd-list .pic img { width: 4.5rem; height: 2.4rem; object-fit: contain; filter: drop-shadow(0 3px 5px rgb(3 2 14 / .7)); }
.wd-list .pic .icon { width: 1.25rem; height: 1.25rem; opacity: .7; }
.wd-list .txt { display: grid; min-width: 0; }
.wd-list .nm { font-weight: 600; overflow-wrap: anywhere; }
.wd-list .sub { color: var(--sg-text-3); font-size: var(--sg-text-label); overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.wd-list .tags { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .3rem; }
@media (hover: hover) and (pointer: fine) { .wd-list li:hover { background: var(--sg-surface-1); } }
.wd-list li.on { background: rgb(253 93 98 / .08); }
.wd-list li:has(input:focus-visible) { outline: 2px solid var(--sg-focus); outline-offset: -2px; border-radius: var(--sg-radius-sm); }
.wd-list li:has(input:disabled) label { cursor: default; }
.wd-tag { display: inline-flex; align-items: center; min-height: 1.5rem; padding: .1rem .55rem; border-radius: var(--sg-radius-pill); border: 1px solid var(--sg-line-2);
  color: var(--sg-text-2); font-size: .75rem; font-weight: 600; line-height: 1.15; white-space: nowrap; }
.wd-tag--edited, .wd-tag--story { color: var(--sg-sign-yellow-text); border-color: rgb(246 215 50 / .4); }
.wd-tag--edition { border-style: dashed; color: var(--sg-text-1); }
.wd-foot { margin-top: var(--sg-space-6); padding-top: var(--sg-space-5); border-top: 1px solid var(--sg-line-1); display: grid; gap: var(--sg-space-2); }
.wd-legend { margin: var(--sg-space-5) 0 0; display: grid; gap: .45rem; font-size: var(--sg-text-small); color: var(--sg-text-2); }
.wd-legend div { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .6rem; }
.wd-legend dd { margin: 0; }
/* Wardrobe and gear's Story hairstyles (Lucia): a list of the styles as radios, the colour as two radios, and the
   salon warning at the top of the Hair, Makeup and Tattoos categories */
.wd-storyhair .section-head { margin: 0; }
.wd-storyhair .sh-now { margin: 0; color: var(--sg-text-2); font-size: var(--sg-text-small); }
.wd-storyhair .sh-now b { color: var(--sg-text-1); font-weight: 600; }
.wd-storyhair .sh-list { margin-top: var(--sg-space-2); max-width: 44rem; }
.sh-colour { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem var(--sg-space-5); margin: var(--sg-space-2) 0 0; padding: 0; border: 0; }
.sh-colour > legend { float: left; margin: 0 var(--sg-space-3) 0 0; padding: 0; font-size: var(--sg-text-small); font-weight: 600; color: var(--sg-text-1); }
.sh-colour-opt { display: inline-flex; align-items: center; gap: .5rem; min-height: 2.25rem; cursor: pointer; }
.sh-colour-opt input { width: 1.1rem; height: 1.1rem; margin: 0; }
.sh-colour-opt:has(input:disabled) { opacity: .5; cursor: default; }
.wd-salon { margin-bottom: var(--sg-space-4); }
.wd-salon .toggle { margin-top: .35rem; }
/* Wardrobe and gear's Saved outfits: the Experimental switch, the empty outfit slots, then a card per outfit with its box,
   its name, where it was found, a short list of its garments and what picking it does */
.of-head { margin-bottom: var(--sg-space-3); }
.of-slots { margin: var(--sg-space-4) 0; }
.of-slots h4 { margin: 0 0 var(--sg-space-1); }
.of-slots .note { margin: 0 0 var(--sg-space-2); }
.of-slot-list { display: grid; gap: var(--sg-space-2); list-style: none; padding: 0; margin: 0; }
.of-slot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem var(--sg-space-4);
  padding: .5rem .75rem; border-radius: var(--sg-radius-sm); background: var(--sg-surface-1); border: 1px solid var(--sg-line-1);
  transition: border-color var(--sg-dur-fast), background-color var(--sg-dur-fast); }
.of-slot.on { border-color: rgb(253 93 98 / .7); background: rgb(253 93 98 / .1); }
.of-slot-held { min-width: 0; overflow-wrap: anywhere; color: var(--sg-text-2); }
.of-slot-ctl { display: inline-flex; min-width: 0; max-width: 100%; }
.of-slot .of-slot-ctl select { max-width: 100%; width: auto; min-width: min(12rem, 100%); }
.of-slot-list > .of-slot { min-width: 0; }
.of-stats { margin: var(--sg-space-5) 0 var(--sg-space-3); }
.of-acts { margin-bottom: var(--sg-space-2); }
.of-note-all { margin: 0 0 var(--sg-space-4); }
.of-limit { margin: calc(-1 * var(--sg-space-2)) 0 var(--sg-space-3); }
.of-over { margin: 0 0 var(--sg-space-3); }
.of-head .note a { color: var(--sg-text-accent); }
.of-ready { margin: var(--sg-space-4) 0; }
.of-ready h4 { margin: 0 0 var(--sg-space-1); }
.of-ready > .note { margin: 0 0 var(--sg-space-2); }
/* Outfit editor: the slot picker (the outfit worn now and the 11 outfit slots), the chosen slot's panel with its name,
   flag and garments (readable name first, the numbers, where it goes and the hash, which copies; how it is worn; Remove),
   the add-a-garment search, the slot's tools, and the bar that checks and undoes the changes. Built from the Wardrobe's
   category buttons, the Garage's .ga-sel selects and .ga-flag pills */
.oe-head .oe-ps5 { color: var(--sg-text-3); }
.oe-pick { margin: var(--sg-space-4) 0 var(--sg-space-5); }
.oe-pick h4, .oe-sub { margin: 0 0 var(--sg-space-2); font-size: var(--sg-text-small); font-weight: 600; color: var(--sg-text-2); }
.oe-chips { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 10.5rem), 1fr)); gap: 6px; }
.oe-chip {
  width: 100%; height: 100%; min-height: 4.1rem; display: grid; align-content: start; gap: .1rem; padding: .45rem .7rem .5rem; text-align: start;
  border: 1px solid var(--sg-line-1); border-radius: var(--sg-radius-sm); background: var(--sg-surface-1); color: var(--sg-text-2); font: inherit; cursor: pointer;
  transition: background-color var(--sg-dur-fast), border-color var(--sg-dur-fast), color var(--sg-dur-fast);
}
.oe-chip-n { font-size: var(--sg-text-label); color: var(--sg-text-3); font-weight: 600; }
.oe-chip-nm { font-weight: 650; color: var(--sg-text-1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oe-chip-m { display: flex; flex-wrap: wrap; align-items: center; gap: .2rem .4rem; font-size: var(--sg-text-label); color: var(--sg-text-3); }
.oe-chip-m .fig { font-size: .85rem; color: var(--sg-text-2); }
.oe-chip.is-edited { border-style: dashed; border-color: rgb(255 196 92 / .5); }
@media (hover: hover) and (pointer: fine) { .oe-chip:hover { background: var(--sg-surface-2); border-color: rgb(255 255 255 / .24); } }
.oe-chip[aria-pressed="true"] { border-color: rgb(253 93 98 / .75); background: rgb(253 93 98 / .11); box-shadow: 0 0 0 1px rgb(253 93 98 / .25); }
.oe-chip:focus-visible { outline: 2px solid var(--sg-focus); outline-offset: 2px; }
.oe-panel { display: grid; gap: var(--sg-space-3); padding: var(--sg-space-4); border-radius: var(--sg-radius-md); background: var(--sg-surface-1);
  border: 1px solid var(--sg-line-1); box-shadow: var(--sg-elev-1); min-width: 0; }
.oe-panel > .note { margin: 0; }
.oe-panel-head { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .6rem; }
.oe-panel-head h4 { margin: 0; font-size: 1.05rem; overflow-wrap: anywhere; }
.oe-meta { display: grid; grid-template-columns: minmax(0, 18rem) 7rem; align-items: end; gap: .4rem var(--sg-space-3); }
.oe-meta .note { grid-column: 1 / -1; margin: 0; font-size: var(--sg-text-label); color: var(--sg-text-3); }
.oe-flag input { width: 100%; min-height: var(--sg-control-h-sm); padding: 0 .6rem; font: 600 var(--sg-text-small)/1.2 var(--sg-font-text); }
.oe-kits, .oe-found { display: grid; gap: 5px; list-style: none; padding: 0; margin: 0; }
.oe-kit, .oe-found li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .45rem var(--sg-space-4); min-width: 0; min-height: 3.1rem;
  padding: .5rem .5rem .5rem .75rem; border-radius: var(--sg-radius-sm); background: var(--sg-surface-sunken); border: 1px solid transparent; }
.oe-found li { background: none; border-color: var(--sg-line-1); }
.oe-kit-txt { display: grid; gap: .15rem; min-width: 0; }
.oe-kit-txt .nm { font-weight: 600; overflow-wrap: anywhere; }
.oe-kit-txt .sub { display: flex; flex-wrap: wrap; align-items: center; gap: .1rem .5rem; color: var(--sg-text-3); font-size: var(--sg-text-label); }
.oe-kit-txt .sub > span:not(:last-child)::after { content: "·"; padding-inline-start: .5rem; color: var(--sg-line-2); }
.oe-kit-txt .ga-flags { margin-top: .1rem; }
.oe-hash { padding: .05rem .4rem; border: 1px solid var(--sg-line-1); border-radius: var(--sg-radius-sm); background: none; color: var(--sg-text-3);
  font-family: var(--sg-font-mono); font-size: .75rem; font-weight: 500; letter-spacing: var(--sg-tracking-code); cursor: copy; direction: ltr; user-select: all; }
@media (hover: hover) and (pointer: fine) { .oe-hash:hover { color: var(--sg-text-1); border-color: var(--sg-line-2); } }
.oe-hash:focus-visible { outline: 2px solid var(--sg-focus); outline-offset: 1px; }
.oe-kit-ctl { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: flex-end; gap: .4rem var(--sg-space-2); }
.oe-state { min-width: 9.5rem; }
.oe-worn { display: inline-flex; align-items: center; gap: .35rem; font-size: var(--sg-text-label); color: var(--sg-text-3); }
.oe-kit .ga-flag.warn, .oe-found .ga-flag.warn { color: var(--sg-sign-yellow-text); border-color: rgb(246 215 50 / .4); }
.oe-panel .empty { margin: 0; padding: var(--sg-space-4); }
.oe-add { display: grid; gap: var(--sg-space-2); padding-top: var(--sg-space-3); border-top: 1px solid var(--sg-line-1); }
.oe-add .finder { margin: 0; }
.oe-add > .note { margin: 0; }
.oe-tools { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .5rem var(--sg-space-2); padding-top: var(--sg-space-3); border-top: 1px solid var(--sg-line-1); }
.oe-tools .ga-sel { min-width: 8rem; }
.oe-acts { margin-top: var(--sg-space-1); }
.oe-bar { display: grid; gap: var(--sg-space-2); margin-top: var(--sg-space-4); padding: var(--sg-space-3) var(--sg-space-4); border-radius: var(--sg-radius-md);
  background: var(--sg-surface-1); border: 1px solid var(--sg-line-2); }
.oe-bar.is-on { border-color: rgb(253 93 98 / .55); background: rgb(253 93 98 / .07); }
.oe-bar .oe-status { margin: 0; font-weight: 600; color: var(--sg-text-1); font-size: var(--sg-text-small); }
.oe-bar:not(.is-on) .oe-status { font-weight: 400; color: var(--sg-text-2); }
.oe-bar .note { margin: 0; }
.oe-ack { font-size: var(--sg-text-small); color: var(--sg-text-2); align-items: flex-start; }
.oe-ack .track { flex: none; margin-top: .1rem; }
.oe-bar + .callout { margin-top: var(--sg-space-3); }
.of-to-editor { margin: 0 0 var(--sg-space-4); }
@media (max-width: 600px) {
  .oe-panel { padding: var(--sg-space-3); }
  .oe-meta { grid-template-columns: minmax(0, 1fr) 6rem; }
  .oe-kit, .oe-found li { grid-template-columns: minmax(0, 1fr); }
  .oe-kit-ctl { justify-content: space-between; }
  .oe-kit-ctl .oe-state { flex: 1 1 10rem; }
  .oe-found li .btn { justify-self: start; }
}
.of-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: var(--sg-space-2); list-style: none; padding: 0; margin: 0; }
.of-card { display: grid; align-content: start; gap: .35rem; min-width: 0; padding: .6rem .75rem .75rem; border-radius: var(--sg-radius-sm);
  background: var(--sg-surface-1); border: 1px solid var(--sg-line-1); transition: border-color var(--sg-dur-fast), background-color var(--sg-dur-fast); }
.of-card label { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: .6rem; cursor: pointer; }
.of-card input { width: 1.15rem; height: 1.15rem; margin: .15rem 0 0; }
.of-card .txt { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .5rem; min-width: 0; }
.of-card .nm { font-weight: 600; overflow-wrap: anywhere; }
.of-card.on { border-color: rgb(253 93 98 / .7); background: rgb(253 93 98 / .1); }
.of-card.off label { cursor: default; }
.of-card.off .nm { color: var(--sg-text-2); }
@media (hover: hover) and (pointer: fine) { .of-card:not(.off):not(.on):hover { border-color: rgb(255 255 255 / .3); background: var(--sg-surface-2); } }
.of-card:has(input:focus-visible) { outline: 2px solid var(--sg-focus); outline-offset: 2px; }
.of-garments { display: flex; flex-wrap: wrap; gap: .1rem 0; list-style: none; margin: 0; padding: 0; padding-inline-start: 1.75rem; color: var(--sg-text-2); font-size: var(--sg-text-small); line-height: 1.4; }
.of-garments li { overflow-wrap: anywhere; }
.of-garments li:not(:last-child)::after { content: "·"; padding-inline: .4rem; color: var(--sg-text-3); }
.of-garments li.add { color: var(--sg-text-1); }
.of-garments li.of-pieces { color: var(--sg-text-3); }
.of-note { margin: 0; padding-inline-start: 1.75rem; color: var(--sg-text-3); font-size: var(--sg-text-label); }
.of-card.on .of-note { color: var(--sg-text-accent); }
.of-tips { margin: 0; padding: 0; padding-inline-start: 1.75rem; list-style: none; color: var(--sg-text-1); font-size: var(--sg-text-small); line-height: 1.4; }
.of-tips li { position: relative; padding-inline-start: .85rem; overflow-wrap: anywhere; }
.of-tips li::before { content: ""; position: absolute; inset-inline-start: 0; top: .55em; width: .35rem; height: .35rem; border-radius: 50%; background: var(--sg-sign-yellow-text); }

/* Garage: live capacity HUD, segmented sub-tabs, visual vehicle showroom cards, add-car catalogue, edition & special, properties. */
.ga-sum { display: grid; gap: var(--sg-space-3); margin-bottom: var(--sg-space-4); }
.ga-hud { display: grid; grid-template-columns: repeat(auto-fit, minmax(11.5rem, 1fr)); gap: var(--sg-space-3); width: 100%; }
.ga-stat {
  display: grid; gap: .42rem; padding: .78rem .95rem; border-radius: var(--sg-radius-md);
  background: linear-gradient(180deg, rgb(255 255 255 / .03), transparent 55%), var(--sg-surface-1);
  border: 1px solid var(--sg-line-1); box-shadow: var(--sg-elev-1); min-width: 0;
}
.ga-stat.is-active { border-color: rgb(251 210 107 / .45); }
.ga-stat.is-over { border-color: rgb(243 65 60 / .65); background: linear-gradient(180deg, rgb(243 65 60 / .1), transparent), var(--sg-surface-1); }
.ga-stat-top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .1rem .5rem; min-width: 0; }
.ga-stat-top .lbl { font-size: var(--sg-text-label); font-weight: 600; color: var(--sg-text-3); }
.ga-stat-top .fig { font: var(--sg-display-weight) 1.08rem/1.1 var(--sg-font-display); font-stretch: var(--sg-num-stretch); color: var(--sg-text-1); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ga-stat.is-active .ga-stat-top .fig { color: var(--sg-text-projected); }
.ga-stat.is-over .ga-stat-top .fig { color: var(--sg-sign-red-text); }
.ga-stat small { font-size: .75rem; color: var(--sg-text-3); line-height: 1.25; }
.ga-bar { display: block; height: 5px; border-radius: 999px; background: var(--sg-surface-sunken); overflow: hidden; box-shadow: inset 0 1px 2px rgb(0 0 0 / .45); }
.ga-bar > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--sg-vice-magenta), var(--sg-coral), var(--sg-tangerine)); transition: width var(--sg-dur-base) var(--sg-ease-out); }
.ga-bar > span.is-cool { background: linear-gradient(90deg, var(--sg-lagoon), var(--sg-orchid)); }
.ga-bar > span.is-gold { background: linear-gradient(90deg, var(--sg-tangerine), var(--sg-sun-gold)); }
.ga-bar > span.is-warn { background: linear-gradient(90deg, var(--sg-tangerine), var(--sg-sun-gold)); }
.ga-bar > span.is-over { background: var(--sg-sign-red); }

/* Segmented Garage sub-tabs */
.ga-tabs {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .35rem; padding: .35rem;
  margin-bottom: var(--sg-space-5); border-radius: var(--sg-radius-md);
  background: var(--sg-surface-sunken); border: 1px solid var(--sg-line-1);
}
.ga-tab {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  min-height: 2.65rem; padding: .45rem .75rem; border-radius: calc(var(--sg-radius-md) - 3px);
  border: 1px solid transparent; background: transparent; color: var(--sg-text-2);
  font: 650 var(--sg-text-small)/1.15 var(--sg-font-text); cursor: pointer;
  transition: background-color var(--sg-dur-fast) var(--sg-ease-out), border-color var(--sg-dur-fast) var(--sg-ease-out), color var(--sg-dur-fast) var(--sg-ease-out), box-shadow var(--sg-dur-base) var(--sg-ease-out);
}
.ga-tab .icon { width: 1rem; height: 1rem; flex: none; opacity: .82; }
.ga-tab-lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ga-tab-n { font-size: .75rem; font-weight: 600; color: var(--sg-text-3); font-variant-numeric: tabular-nums; }
.ga-tab-dot {
  display: inline-grid; place-items: center; min-width: 1.25rem; height: 1.25rem; padding: 0 .35rem;
  border-radius: var(--sg-radius-pill); background: rgb(251 210 107 / .22); border: 1px solid rgb(251 210 107 / .5);
  color: var(--sg-text-projected); font-size: .7rem; font-weight: 750; line-height: 1; font-variant-numeric: tabular-nums;
}
@media (hover: hover) and (pointer: fine) {
  .ga-tab:not(.is-on):hover { color: var(--sg-text-1); background: rgb(255 255 255 / .05); }
}
.ga-tab.is-on {
  color: var(--sg-text-1); border-color: rgb(253 93 98 / .55);
  background: linear-gradient(180deg, rgb(250 40 137 / .16), rgb(253 93 98 / .08)), var(--sg-surface-2);
  box-shadow: 0 2px 12px rgb(250 40 137 / .18), inset 0 1px 0 rgb(255 255 255 / .12);
}
.ga-tab.is-on .icon { color: var(--sg-flamingo); opacity: 1; }
.ga-tab.is-on .ga-tab-n { color: var(--sg-text-2); }
.ga-tab.is-pulse:not(.is-on) { border-color: rgb(70 222 214 / .55); color: var(--sg-lagoon); }
.ga-tab:focus-visible { outline: 2px solid var(--sg-focus); outline-offset: 2px; }
.ga-stage { display: grid; gap: var(--sg-space-5); min-width: 0; }
.ga-stage > .group { margin: 0; }

/* Your garages toolbar: search + location & loose-vehicle filter pills */
.ga-mine-bar { display: grid; gap: var(--sg-space-3); margin-bottom: var(--sg-space-4); }
.ga-mine-search { width: 100%; max-width: 28rem; }
.ga-mine-search input[type="search"] { width: 100%; padding-inline-start: 2.6rem; padding-inline-end: 2.3rem; font-weight: 400; font-size: var(--sg-text-body); }
.ga-loc-pills, .ga-loose-filters, .ga-prop-filters { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.ga-prop-filters { margin-bottom: var(--sg-space-4); }
.ga-pill {
  display: inline-flex; align-items: center; gap: .4rem; min-height: 2.15rem; padding: .25rem .78rem;
  border-radius: var(--sg-radius-pill); border: 1px solid var(--sg-line-2); background: var(--sg-surface-1);
  color: var(--sg-text-2); font: 600 var(--sg-text-small)/1.1 var(--sg-font-text); cursor: pointer;
  transition: border-color var(--sg-dur-fast), background-color var(--sg-dur-fast), color var(--sg-dur-fast);
}
.ga-pill.small { min-height: 1.85rem; padding: .18rem .65rem; font-size: var(--sg-text-label); }
.ga-pill .n { font-size: .75rem; color: var(--sg-text-3); font-variant-numeric: tabular-nums; }
@media (hover: hover) and (pointer: fine) {
  .ga-pill:not(.is-on):hover { border-color: rgb(255 255 255 / .3); color: var(--sg-text-1); background: var(--sg-surface-2); }
}
.ga-pill.is-on { border-color: rgb(253 93 98 / .65); background: rgb(253 93 98 / .16); color: var(--sg-text-1); }
.ga-pill.is-on .n { color: var(--sg-flamingo); }
.ga-pill.is-new { border-style: dashed; border-color: rgb(251 210 107 / .5); }
.ga-pill.is-jason.is-on { border-color: rgb(70 222 214 / .65); background: rgb(70 222 214 / .14); color: var(--sg-lagoon); }
.ga-pill.is-lucia.is-on { border-color: rgb(199 151 253 / .65); background: rgb(199 151 253 / .14); color: var(--sg-orchid); }
.ga-pill.is-modded.is-on { border-color: rgb(255 147 188 / .65); background: rgb(255 147 188 / .14); color: var(--sg-flamingo); }
.ga-pill:focus-visible { outline: 2px solid var(--sg-focus); outline-offset: 2px; }

/* Garage section cards & visual 16:9 vehicle card grid */
#ga-mine-body { display: grid; gap: var(--sg-space-5); min-width: 0; }
.ga-gsec {
  display: grid; gap: var(--sg-space-3); padding: var(--sg-space-4); border-radius: var(--sg-radius-lg, var(--sg-radius-md));
  background: linear-gradient(180deg, rgb(255 255 255 / .025), transparent 28%), var(--sg-surface-1);
  border: 1px solid var(--sg-line-1); box-shadow: var(--sg-elev-1); min-width: 0;
}
.ga-gsec.is-new { border-style: dashed; border-color: rgb(253 93 98 / .55); }
.ga-gsec-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem var(--sg-space-4); }
.ga-gsec-title { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem .65rem; min-width: 0; }
.ga-gsec-title .nm { margin: 0; font: var(--sg-display-weight) calc(var(--sg-display-scale) * 1.18rem)/1.2 var(--sg-font-display); color: var(--sg-text-1); }
.ga-gcap { display: inline-flex; align-items: center; gap: .55rem; min-width: 7.5rem; }
.ga-gcap .ga-bar { flex: 1 1 5rem; height: 6px; }
.ga-gcap small { font-size: .75rem; font-weight: 650; color: var(--sg-text-3); font-variant-numeric: tabular-nums; white-space: nowrap; }

.ga-spot-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(16.25rem, 1fr)); gap: var(--sg-space-3);
}
.ga-vcard {
  display: grid; align-content: start; min-width: 0; border-radius: var(--sg-radius-md); overflow: hidden;
  background: var(--sg-surface-sunken); border: 1px solid var(--sg-line-1); box-shadow: var(--sg-elev-1);
  scroll-margin-block: 6rem;
  transition: border-color var(--sg-dur-fast) var(--sg-ease-out), transform var(--sg-dur-fast) var(--sg-ease-out), box-shadow var(--sg-dur-base) var(--sg-ease-out);
}
.ga-vcard:focus { outline: 2px solid var(--sg-focus); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) {
  .ga-vcard:not(.is-open):not(.is-free):hover { border-color: rgb(255 255 255 / .26); transform: translateY(-2px); box-shadow: var(--sg-elev-2); }
}
.ga-vcard.is-new { border-color: rgb(251 210 107 / .6); box-shadow: 0 0 0 1px rgb(251 210 107 / .18), var(--sg-elev-1); }
.ga-vcard.is-removing { border-color: rgb(253 93 98 / .55); background: linear-gradient(180deg, rgb(253 93 98 / .09), transparent 65%), var(--sg-surface-sunken); }
.ga-vcard.is-target { border-color: var(--sg-lagoon); box-shadow: 0 0 0 1px rgb(70 222 214 / .35), 0 0 18px rgb(70 222 214 / .15); }
.ga-vcard.is-open {
  grid-column: 1 / -1; border-color: rgb(70 222 214 / .6);
  background: color-mix(in oklab, var(--sg-surface-2) 40%, var(--sg-surface-sunken));
  box-shadow: 0 0 0 1px rgb(70 222 214 / .25), var(--sg-elev-2);
}
.ga-vcard-top { display: grid; grid-template-rows: auto 1fr; height: 100%; min-width: 0; }
.ga-vcard.is-open .ga-vcard-top { grid-template-rows: none; grid-template-columns: minmax(12rem, 19rem) minmax(0, 1fr); align-items: stretch; }
.ga-vcard-media { position: relative; aspect-ratio: 16 / 9; background: var(--sg-night-950, #09081b); overflow: hidden; }
.ga-vcard-media::after {
  content: ""; position: absolute; inset: auto 0 0; height: 42%; pointer-events: none;
  background: linear-gradient(to top, rgb(9 8 27 / .72), transparent);
}
.ga-vcard-pic { display: grid; place-items: center; width: 100%; height: 100%; padding: 0; border: 0; background: transparent; color: var(--sg-text-3); }
.ga-vcard-pic.is-fallback { background: radial-gradient(75% 75% at 50% 45%, rgb(255 255 255 / .06), transparent 76%), var(--sg-night-950, #09081b); }
.ga-vcard-pic img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform var(--sg-dur-base) var(--sg-ease-out); }
.ga-vcard-pic .icon { width: 2.3rem; height: 2.3rem; opacity: .5; }
@media (hover: hover) and (pointer: fine) {
  .ga-vcard:hover .ga-vcard-pic img { transform: scale(1.045); }
}
.ga-spot-badge {
  position: absolute; top: .45rem; inset-inline-start: .45rem; z-index: 2;
  display: inline-flex; align-items: center; padding: .14rem .52rem; border-radius: var(--sg-radius-pill);
  background: rgb(16 15 39 / .84); backdrop-filter: blur(6px); border: 1px solid rgb(255 255 255 / .14);
  color: var(--sg-text-1); font-size: .7rem; font-weight: 700; letter-spacing: .02em; pointer-events: none;
}
.ga-vcard-badges {
  position: absolute; top: .45rem; inset-inline-end: .45rem; z-index: 2;
  display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .25rem; max-width: 68%; pointer-events: none;
}
.ga-vcard-badges .ga-flag { background: rgb(16 15 39 / .86); backdrop-filter: blur(6px); pointer-events: auto; }
.ga-vcard-body { display: grid; align-content: space-between; gap: .55rem; padding: .72rem .8rem .78rem; min-width: 0; }
.ga-vcard-title { display: grid; gap: .12rem; min-width: 0; }
.ga-vcard-title .nm { font-size: .96rem; font-weight: 700; line-height: 1.25; color: var(--sg-text-1); overflow-wrap: anywhere; }
.ga-vcard-sub { font-size: .74rem; color: var(--sg-text-3); overflow-wrap: anywhere; }
.ga-repl-banner {
  display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .35rem; padding: .3rem .5rem;
  border-radius: var(--sg-radius-xs); background: rgb(251 210 107 / .1); border: 1px solid rgb(251 210 107 / .35);
  font-size: var(--sg-text-label); color: var(--sg-text-projected);
}
.ga-repl-banner .icon { width: .85rem; height: .85rem; flex: none; }
.ga-repl-banner .nm { font-weight: 700; color: var(--sg-text-1); }
.ga-vcard .ga-car-meta, .ga-vcard .ga-car-acts { grid-column: auto; }
.ga-vcard .ga-car-acts { margin-top: .15rem; padding-top: .45rem; border-top: 1px solid var(--sg-line-1); gap: .35rem; }
.ga-vcard .ga-car-acts .btn { flex: 1 1 auto; justify-content: center; padding-inline: .55rem; }
.ga-vcard.is-open .ga-car-acts .btn { flex: 0 1 auto; }
.ga-vcard.is-open .ga-mod-panel { margin: 0; border-radius: 0; border-inline: 0; border-bottom: 0; border-top: 1px solid var(--sg-line-2); padding: var(--sg-space-4); }
.ga-vcard .ga-loose-warn { margin: 0; }

/* Empty garage spot card */
.ga-vcard.is-free {
  border-style: dashed; border-color: var(--sg-line-2);
  background: linear-gradient(180deg, rgb(255 255 255 / .018), transparent), var(--sg-surface-sunken);
}
.ga-vcard-empty {
  position: relative; display: grid; place-items: center; align-content: center; gap: .55rem;
  min-height: 12.25rem; padding: 2.2rem var(--sg-space-4) var(--sg-space-4); text-align: center;
}
.ga-empty-ic { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 50%; background: rgb(255 255 255 / .04); color: var(--sg-text-3); }
.ga-empty-ic .icon { width: 1.25rem; height: 1.25rem; opacity: .65; }
.ga-vcard.is-target .ga-empty-ic { background: rgb(70 222 214 / .15); color: var(--sg-lagoon); }
.ga-vcard.is-target .ga-free { color: var(--sg-lagoon); font-weight: 650; }
.ga-target-acts { display: inline-flex; flex-wrap: wrap; gap: .4rem; margin-inline-start: auto; }

/* Properties visual card grid */
.ga-prop-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(17.5rem, 1fr)); gap: var(--sg-space-3); }
.ga-prop-card {
  border-radius: var(--sg-radius-md); background: var(--sg-surface-1); border: 1px solid var(--sg-line-1);
  transition: border-color var(--sg-dur-fast), background-color var(--sg-dur-fast), transform var(--sg-dur-fast);
}
.ga-prop-card label { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .35rem .65rem; align-items: start; padding: .8rem .9rem; cursor: pointer; height: 100%; }
.ga-prop-card.owned label { cursor: default; }
.ga-prop-card input[type="checkbox"] { margin-top: .2rem; }
.ga-prop-card .txt { display: grid; gap: .18rem; min-width: 0; }
.ga-prop-card .nm { font-weight: 680; color: var(--sg-text-1); overflow-wrap: anywhere; }
.ga-prop-card .sub { font-size: var(--sg-text-label); color: var(--sg-text-3); }
.ga-prop-card .tags { grid-column: 2; display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .2rem; }
.ga-prop-card.on { border-color: rgb(251 210 107 / .55); background: linear-gradient(180deg, rgb(251 210 107 / .08), transparent), var(--sg-surface-1); }
.ga-prop-card.owned { border-color: rgb(53 194 109 / .3); background: linear-gradient(180deg, rgb(53 194 109 / .05), transparent), var(--sg-surface-1); }
@media (hover: hover) and (pointer: fine) {
  .ga-prop-card:not(.owned):hover { border-color: rgb(255 255 255 / .28); transform: translateY(-1px); }
}

.ga-sub { margin: var(--sg-space-6) 0 var(--sg-space-3); font-size: calc(var(--sg-display-scale) * 1.25rem); }
.ga-up-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem var(--sg-space-4); margin-bottom: var(--sg-space-4);
  padding: .6rem .9rem; border-radius: var(--sg-radius-md); background: var(--sg-surface-1); border: 1px solid var(--sg-line-2); }
.ga-up-bar-txt { display: inline-flex; align-items: center; gap: .5rem; font-size: var(--sg-text-small); color: var(--sg-text-2); }
.ga-up-bar-txt .icon { width: 1.05rem; height: 1.05rem; color: var(--sg-lagoon); flex: none; }
.ga-up-bar-txt b { color: var(--sg-text-1); font-weight: 650; }
.ga-up-bar-acts { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.ga-garages { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr)); gap: var(--sg-space-4); }
.ga-garage { display: grid; align-content: start; gap: var(--sg-space-2); padding: var(--sg-space-3) var(--sg-space-4) var(--sg-space-4); border-radius: var(--sg-radius-md);
  background: var(--sg-surface-1); border: 1px solid var(--sg-line-1); box-shadow: var(--sg-elev-1); min-width: 0; }
.ga-garage.is-new { border-color: rgb(253 93 98 / .55); border-style: dashed; }
.ga-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .3rem .6rem; }
.ga-head .nm, .ga-prop-list .nm, .ga-ed-txt .nm { font-weight: 650; overflow-wrap: anywhere; }
.nm .id { font-family: var(--sg-font-mono); font-size: .8125rem; font-weight: 500; color: var(--sg-text-3); letter-spacing: var(--sg-tracking-code); }
.ga-flags { display: inline-flex; flex-wrap: wrap; gap: .3rem; }
/* a property's parking, in the same card as its garage (1.48.0) */
.ga-park-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .3rem .6rem; margin-top: var(--sg-space-2);
  padding-top: var(--sg-space-2); border-top: 1px solid var(--sg-line-1); }
.ga-park-nm { font-size: .8125rem; font-weight: 650; color: var(--sg-text-2); }
/* the tracker removal switch (1.48.0) */
.ga-tracker { display: grid; gap: var(--sg-space-2); }
.ga-tracker .note { margin: 0; max-width: 46rem; }
.ga-tracker .ga-tracker-state { color: var(--sg-text-3); }
.ga-flag { display: inline-flex; align-items: center; min-height: 1.35rem; padding: .05rem .5rem; border-radius: var(--sg-radius-pill); border: 1px solid var(--sg-line-2);
  color: var(--sg-text-2); font-size: .75rem; font-weight: 600; line-height: 1.15; white-space: nowrap; }
.ga-flag.new { color: var(--sg-text-projected); border-color: rgb(255 196 92 / .45); }
.ga-flag.free { color: var(--sg-lagoon); border-color: rgb(70 222 214 / .38); }
.ga-spots { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.ga-spots li { display: grid; grid-template-columns: 4.25rem minmax(0, 1fr); align-items: center; gap: .4rem .55rem; min-height: 2.75rem; padding: .42rem .6rem;
  border-radius: var(--sg-radius-sm); background: var(--sg-surface-sunken); transition: background-color var(--sg-dur-fast), box-shadow var(--sg-dur-fast); }
@media (hover: hover) and (pointer: fine) { .ga-spots li.is-free:hover { background: color-mix(in oklab, var(--sg-surface-sunken) 70%, var(--sg-surface-2)); } }
.ga-spots li.is-open { background: color-mix(in oklab, var(--sg-surface-2) 55%, var(--sg-surface-sunken)); box-shadow: inset 2px 0 0 var(--sg-lagoon); }
[dir="rtl"] .ga-spots li.is-open { box-shadow: inset -2px 0 0 var(--sg-lagoon); }
.ga-spots li.is-new { background: rgb(255 196 92 / .08); box-shadow: inset 2px 0 0 var(--sg-sun-gold); }
[dir="rtl"] .ga-spots li.is-new { box-shadow: inset -2px 0 0 var(--sg-sun-gold); }
/* the spot picked for the next car ("Add a car here"), a parked car's plate, and a model's "parked here" link (pull
   request #41): the plate in the game's capitals and a fixed-width face, its error under it */
.ga-spots li { scroll-margin-block: 6rem; }
.ga-spots li.is-target { background: rgb(70 222 214 / .08); box-shadow: inset 2px 0 0 var(--sg-lagoon); }
[dir="rtl"] .ga-spots li.is-target { box-shadow: inset -2px 0 0 var(--sg-lagoon); }
.ga-spots li:focus { outline: 2px solid var(--sg-focus); outline-offset: 1px; }
.ga-spots li.is-free .ga-car { flex-wrap: wrap; justify-content: space-between; row-gap: .3rem; }
.ga-car .ga-here { flex: none; min-height: 1.9rem; padding-inline: .6rem .75rem; gap: .35rem; }
/* a plate in two halves either side of the state emblem, as the game lays its plates out (3, the emblem over the 4th
   and 5th positions, 3), and beside them the plate as the game will show it: its 8 positions on a light plate, the
   emblem's two over a character the game would hide. Plates read left to right in every language */
.ga-plate { grid-column: 2; display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .5rem; min-width: 0; }
.ga-plate-lbl { color: var(--sg-text-2); font-size: var(--sg-text-label); }
.ga-plate-row { display: contents; }
.ga-plate-in { display: inline-flex; align-items: center; gap: .25rem; }
.ga-plate-in label { display: inline-flex; }
.ga-plate input { width: 3.3rem; min-height: var(--sg-control-h-sm); padding: 0 .45rem; border-radius: var(--sg-radius-sm);
  border: 1px solid var(--sg-input-border); background: var(--sg-input-bg); color: var(--sg-text-1); font: 650 var(--sg-text-small)/1.2 var(--sg-font-mono);
  letter-spacing: .14em; text-transform: uppercase; text-align: left; transition: border-color var(--sg-dur-fast) var(--sg-ease-out), box-shadow var(--sg-dur-base) var(--sg-ease-out); }
.ga-plate input::placeholder { color: var(--sg-text-3); letter-spacing: .14em; }
@media (hover: hover) and (pointer: fine) { .ga-plate input:hover { border-color: var(--sg-input-border-hover); } }
.ga-plate input:focus-visible { outline: none; border-color: var(--sg-input-border-focus); box-shadow: 0 0 0 3px rgb(255 104 155 / .3); }
.ga-plate input[aria-invalid="true"] { border-color: var(--sg-input-border-invalid); }
/* the state emblem: between the halves, and over the plate's 4th and 5th positions */
.ga-plate-gap, .ga-plate-pv .seal { border-radius: 50%; background: radial-gradient(circle at 38% 34%, #d7f3c6 0 14%, #6fbf8a 38%, #2c7a62 72%, #1d5546);
  box-shadow: inset 0 0 0 1px rgb(12 40 33 / .55); }
.ga-plate-gap { flex: none; width: .85rem; height: .85rem; }
.ga-plate-pv { display: inline-flex; align-items: center; flex: none; height: 1.85rem; padding: 0 .4rem; border-radius: 5px;
  background: linear-gradient(#fbf9f2, #e9e4d6); border: 1px solid #a8a190; box-shadow: inset 0 0 0 2px rgb(255 255 255 / .55), 0 1px 3px rgb(3 2 14 / .6);
  color: #16212e; font: 700 .9375rem/1 var(--sg-font-mono); }
.ga-plate-pv .c { display: inline-block; width: .72rem; height: 1.2rem; line-height: 1.2rem; text-align: center; }
.ga-plate-pv .em { position: relative; display: inline-flex; }
.ga-plate-pv .em .c { color: #6c6658; }
.ga-plate-pv .seal { position: absolute; inset: .04rem .1rem; opacity: .92; }
/* a car to add: Plate above, as the Spot and Record lists have it */
.ga-pplate { display: grid; gap: .2rem; align-items: start; }
.ga-pplate .ga-plate-lbl { line-height: 1.2; }
.ga-pplate .ga-plate-row { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .5rem; }
.ga-plate-err { grid-column: 2; color: var(--sg-sign-red-text); font-size: var(--sg-text-label); }
/* Compact summary strip under a parked car's name: mini Leonida plate + installed/pending upgrade chips */
.ga-car-meta { grid-column: 2; display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .4rem; min-width: 0; }
.ga-mini-plate { display: inline-flex; align-items: center; padding: .1rem .45rem; border-radius: 4px;
  background: linear-gradient(#fbf9f2, #e9e4d6); border: 1px solid #a8a190; color: #16212e;
  font: 700 .72rem/1.25 var(--sg-font-mono); letter-spacing: .08em; white-space: pre; }
.ga-mini-plate.is-edited { border-color: var(--sg-sun-gold); box-shadow: 0 0 0 1.5px rgb(251 210 107 / .55); }
.ga-mod-chip { display: inline-flex; align-items: center; gap: .25rem; min-height: 1.35rem; padding: .05rem .48rem;
  border-radius: var(--sg-radius-pill); border: 1px solid var(--sg-line-2); font-size: .72rem; font-weight: 600; line-height: 1.15; white-space: nowrap; }
.ga-mod-chip .icon { width: .75rem; height: .75rem; flex: none; }
.ga-mod-chip.is-done, .ga-mod-chip.is-have { color: var(--sg-sign-green-text); border-color: rgb(53 194 109 / .4); background: rgb(53 194 109 / .1); }
.ga-mod-chip.is-new { color: var(--sg-text-projected); border-color: rgb(251 210 107 / .5); background: rgb(251 210 107 / .12); }
.ga-mod-chip.is-stock { color: var(--sg-text-3); border-color: var(--sg-line-1); }
.ga-mod-chip.is-part { color: var(--sg-text-2); border-color: var(--sg-line-2); background: var(--sg-surface-1); }
/* the red tag flag on a car (garage.py RED TAG), and the bar that clears it on the cars an editor added */
.ga-mod-chip.is-tag { color: var(--sg-sign-red-text); border-color: rgb(243 65 60 / .6); background: rgb(243 65 60 / .12); }
.ga-tag-bar { margin-bottom: var(--sg-space-4); }
.ga-tag-bar p { margin: 0 0 .5rem; }
/* Customize workshop toggle button + expandable workshop drawer */
.ga-cust-btn { gap: .35rem; }
.ga-cust-btn .icon:last-child { width: .85rem; height: .85rem; transition: transform var(--sg-dur-fast) var(--sg-ease-out); }
.ga-cust-btn.is-open { border-color: rgb(70 222 214 / .55); background: rgb(70 222 214 / .1); color: var(--sg-text-1); }
.ga-cust-btn.is-open .icon:last-child { transform: rotate(180deg); }
.ga-cust-btn.has-edits { border-color: rgb(251 210 107 / .55); color: var(--sg-text-projected); }
.ga-cust-n { display: inline-grid; place-items: center; min-width: 1.15rem; height: 1.15rem; padding: 0 .3rem; border-radius: var(--sg-radius-pill);
  background: rgb(251 210 107 / .22); color: var(--sg-text-projected); font-size: .7rem; font-weight: 700; line-height: 1; }
.ga-mod-panel { grid-column: 1 / -1; margin-top: .25rem; padding: .75rem .8rem; border-radius: var(--sg-radius-sm);
  background: var(--sg-surface-1); border: 1px solid var(--sg-line-2); display: grid; gap: .75rem; }
.ga-mod-sec { display: grid; gap: .45rem; }
.ga-mod-sec + .ga-mod-sec { padding-top: .65rem; border-top: 1px solid var(--sg-line-1); }
.ga-mod-sec-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .35rem .5rem; }
.ga-mod-sec-title { font-size: var(--sg-text-label); font-weight: 700; color: var(--sg-text-1); }
.ga-mod-done { display: inline-flex; align-items: center; gap: .3rem; font-size: .75rem; font-weight: 600; color: var(--sg-sign-green-text); }
.ga-mod-done .icon { width: .85rem; height: .85rem; }
.ga-mod-ro { font-size: .72rem; font-weight: 600; color: var(--sg-text-3); }
.ga-mod-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr)); gap: .45rem; }
.ga-mod-tile { position: relative; display: grid; gap: .2rem; align-content: start; padding: .55rem .65rem; border-radius: var(--sg-radius-sm);
  border: 1px solid var(--sg-line-2); background: var(--sg-surface-sunken); cursor: pointer;
  transition: border-color var(--sg-dur-fast) var(--sg-ease-out), background-color var(--sg-dur-fast) var(--sg-ease-out), box-shadow var(--sg-dur-fast) var(--sg-ease-out); }
.ga-mod-tile input { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }
@media (hover: hover) and (pointer: fine) {
  .ga-mod-tile:not(.is-have):not(.is-blocked):hover { border-color: var(--sg-line-control); background: var(--sg-surface-2); }
}
.ga-mod-tile:has(input:focus-visible) { outline: 2px solid var(--sg-focus); outline-offset: 2px; }
.ga-mod-tile.is-on { border-color: var(--sg-sun-gold); background: rgb(251 210 107 / .12); box-shadow: inset 0 0 0 1px rgb(251 210 107 / .25); }
.ga-mod-tile.is-have { border-color: rgb(53 194 109 / .4); background: rgb(53 194 109 / .08); cursor: default; }
.ga-mod-tile.is-blocked { border-style: dashed; opacity: .62; cursor: not-allowed; }
.ga-mod-tile-top { display: flex; align-items: center; justify-content: space-between; gap: .35rem; }
.ga-mod-name { font-size: var(--sg-text-small); font-weight: 650; color: var(--sg-text-1); }
.ga-mod-st { display: inline-flex; align-items: center; gap: .2rem; font-size: .72rem; font-weight: 650; color: var(--sg-text-3); white-space: nowrap; }
.ga-mod-st .icon { width: .75rem; height: .75rem; }
.ga-mod-tile.is-on .ga-mod-st { color: var(--sg-text-projected); }
.ga-mod-tile.is-have .ga-mod-st { color: var(--sg-sign-green-text); }
.ga-mod-desc { font-size: .75rem; line-height: 1.3; color: var(--sg-text-3); }
.ga-mod-note { margin: 0; font-size: .75rem; line-height: 1.35; color: var(--sg-text-3); }
.ga-mod-panel .ga-plate, .ga-mod-panel .ga-plate-err { grid-column: auto; }
.ga-mod-panel .ga-plate-lbl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.ga-parts-list { display: flex; flex-wrap: wrap; gap: .3rem; }
.ga-part-pill { display: inline-flex; align-items: center; min-height: 1.4rem; padding: .08rem .52rem; border-radius: var(--sg-radius-pill);
  background: var(--sg-surface-sunken); border: 1px solid var(--sg-line-1); color: var(--sg-text-2); font-size: .75rem; font-weight: 500; }
.ga-picks .ga-plate-err { grid-column: 1 / -1; }
.ga-ed .ga-plate-err { flex-basis: 100%; }
/* Remove / Replace a parked car: the buttons flow under the car's name, in the car column */
.ga-car-acts { grid-column: 2; display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .5rem; }
.ga-car-acts .btn { min-height: 1.9rem; }
.ga-danger { color: var(--sg-sign-red-text); }
@media (hover: hover) and (pointer: fine) { .ga-danger:hover { border-color: rgb(253 93 98 / .5); } }
.ga-repl.is-on { border-color: var(--sg-lagoon); color: var(--sg-lagoon); }
.ga-flag.warn { color: var(--sg-sign-red-text); border-color: rgb(253 93 98 / .45); }
.ga-flag.is-active { color: var(--sg-text-projected); border-color: rgb(251 210 107 / .45); }
.ga-flag.is-modded { color: var(--sg-flamingo); border-color: rgb(255 147 188 / .45); }
.ga-flag.is-jason { color: var(--sg-lagoon); border-color: rgb(70 222 214 / .45); }
.ga-flag.is-lucia { color: var(--sg-orchid); border-color: rgb(199 151 253 / .45); }
.ga-repl-to { display: inline-flex; align-items: center; gap: .2rem; color: var(--sg-text-2); font-weight: 600; }
.ga-repl-to .icon { width: .8rem; height: .8rem; flex: none; }
.ga-spots li.is-removing { background: rgb(253 93 98 / .07); box-shadow: inset 2px 0 0 rgb(253 93 98 / .7); }
[dir="rtl"] .ga-spots li.is-removing { box-shadow: inset -2px 0 0 rgb(253 93 98 / .7); }
.ga-target { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .5rem; margin-bottom: var(--sg-space-4); }
.ga-target .ga-where-to { font-weight: 600; }
.ga-target .btn { margin-inline-start: auto; }
.ga-where { display: inline-flex; align-items: center; gap: .3rem; min-height: 1.6rem; padding: .1rem .6rem; border-radius: var(--sg-radius-pill);
  border: 1px solid rgb(70 222 214 / .4); background: none; color: var(--sg-lagoon); font: 600 .75rem/1.15 var(--sg-font-text); cursor: pointer; }
.ga-where .ga-pn { font-weight: 600; }
.ga-where .icon { width: .85rem; height: .85rem; flex: none; }
@media (hover: hover) and (pointer: fine) { .ga-where:hover { background: rgb(70 222 214 / .1); } }
.ga-where:focus-visible { outline: 2px solid var(--sg-focus); outline-offset: 2px; }
.ga-n { color: var(--sg-text-3); font-size: var(--sg-text-label); font-weight: 600; white-space: nowrap; }
.ga-car { display: flex; align-items: center; gap: .5rem; min-width: 0; font-size: var(--sg-text-small); }
.ga-cartxt { display: flex; flex-wrap: wrap; align-items: center; gap: .2rem .45rem; min-width: 0; }
.ga-car .nm { font-weight: 600; overflow-wrap: anywhere; }
.ga-free { color: var(--sg-text-3); }
.ga-thumb { display: inline-grid; place-items: center; flex: none; width: 3.75rem; height: 2.1rem; border-radius: var(--sg-radius-xs); overflow: hidden; color: var(--sg-text-3); background: var(--sg-surface-sunken); }
.ga-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; outline: 1px solid var(--sg-image-outline); outline-offset: -1px; border-radius: inherit; }
.ga-thumb .icon { width: 1.15rem; height: 1.15rem; opacity: .68; }
.ga-loose-note { margin: 0 0 var(--sg-space-3); }
.ga-loose { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--sg-space-2); }
.ga-loose li { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .55rem; padding: .4rem .75rem .4rem .45rem; border-radius: var(--sg-radius-sm);
  border: 1px solid var(--sg-line-1); background: var(--sg-surface-1); font-size: var(--sg-text-small); }
.ga-loose li.is-new { border-color: rgb(255 196 92 / .45); }
.ga-loose li.is-removing { border-color: rgb(253 93 98 / .45); background: rgb(253 93 98 / .07); }
.ga-loose .nm { font-weight: 600; }
.ga-loose .btn { min-height: 1.85rem; }
.ga-loose-warn { flex-basis: 100%; font-size: var(--sg-text-label); color: var(--sg-sign-red-text); }
.ga-picks { list-style: none; margin: 0 0 var(--sg-space-6); padding: 0; border-top: 1px solid var(--sg-line-1); }
.ga-picks li { display: grid; grid-template-columns: auto minmax(9rem, 1fr) auto; align-items: center; gap: .5rem var(--sg-space-4); padding: .6rem .25rem; border-bottom: 1px solid var(--sg-line-1); }
.ga-pick-nm { display: grid; min-width: 0; }
.ga-pick-nm .nm { font-weight: 600; overflow-wrap: anywhere; }
.ga-pick-nm .sub, .ga-list .sub, .ga-prop-list .sub, .ga-ed-txt .sub { color: var(--sg-text-3); font-size: var(--sg-text-label); }
.ga-pick-ctl { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: flex-end; gap: .5rem var(--sg-space-3); }
.ga-sel { display: grid; grid-template-columns: minmax(0, 1fr); gap: .2rem; font-size: var(--sg-text-label); color: var(--sg-text-2); min-width: 0; max-width: 100%; }
.ga-sel select, .of-slot-ctl select {
  appearance: none; -webkit-appearance: none; width: 100%; max-width: 100%; min-height: var(--sg-control-h-sm); padding: 0 2.2rem 0 .75rem; border-radius: var(--sg-radius-sm);
  text-overflow: ellipsis;
  border: 1px solid var(--sg-input-border); background-color: var(--sg-input-bg); color: var(--sg-text-1); font: 600 var(--sg-text-small)/1.2 var(--sg-font-text); cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--sg-text-2) 50%), linear-gradient(135deg, var(--sg-text-2) 50%, transparent 50%);
  background-position: calc(100% - 16px) 52%, calc(100% - 10px) 52%; background-size: 6px 6px; background-repeat: no-repeat;
  transition: border-color var(--sg-dur-fast) var(--sg-ease-out), box-shadow var(--sg-dur-base) var(--sg-ease-out);
}
.ga-sel select option, .ga-sel select optgroup, .of-slot-ctl select option { background: var(--sg-surface-2); color: var(--sg-text-1); }
@media (hover: hover) and (pointer: fine) { .ga-sel select:hover, .of-slot-ctl select:hover { border-color: var(--sg-input-border-hover); } }
.ga-sel select:focus-visible, .of-slot-ctl select:focus-visible { outline: none; border-color: var(--sg-input-border-focus); box-shadow: 0 0 0 3px rgb(255 104 155 / .3); }
[dir="rtl"] .ga-sel select, [dir="rtl"] .of-slot-ctl select { padding: 0 .75rem 0 2.2rem; background-position: 10px 52%, 16px 52%; }
.ga-sel.ga-none .ga-val { min-height: var(--sg-control-h-sm); display: flex; align-items: center; color: var(--sg-text-2); font-size: var(--sg-text-small); }
/* Garage view switcher (Grid / List), result count, and visual vehicle card grid */
.ga-view { display: inline-flex; align-items: center; padding: 3px; border-radius: var(--sg-radius-pill); border: 1px solid var(--sg-line-control); background: var(--sg-input-bg); gap: 2px; flex: none; }
.ga-vbtn {
  display: inline-flex; align-items: center; gap: .35rem; min-height: 2rem; padding: 0 .75rem; border: 1px solid transparent; border-radius: var(--sg-radius-pill);
  background: transparent; color: var(--sg-text-2); font: 600 var(--sg-text-label)/1 var(--sg-font-text); cursor: pointer;
  transition: background-color var(--sg-dur-fast), color var(--sg-dur-fast), border-color var(--sg-dur-fast);
}
.ga-vbtn .icon { width: .95rem; height: .95rem; }
.ga-vbtn[aria-pressed="true"] { background: rgb(253 93 98 / .16); border-color: rgb(253 93 98 / .65); color: var(--sg-text-1); }
.ga-vbtn:focus-visible { outline: 2px solid var(--sg-focus); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) { .ga-vbtn:not([aria-pressed="true"]):hover { color: var(--sg-text-1); background: rgb(255 255 255 / .06); } }
.ga-meta { display: flex; align-items: center; justify-content: space-between; margin: 0 0 var(--sg-space-3); }
.ga-count { font-size: var(--sg-text-label); font-weight: 600; color: var(--sg-text-3); font-variant-numeric: tabular-nums; }
.ga-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(13.5rem, 1fr)); gap: var(--sg-space-3); }
.ga-card {
  display: grid; grid-template-rows: auto 1fr auto; min-width: 0; border-radius: var(--sg-radius-md); overflow: hidden;
  background: var(--sg-surface-1); border: 1px solid var(--sg-line-1); box-shadow: var(--sg-elev-1);
  transition: border-color var(--sg-dur-fast) var(--sg-ease-out), transform var(--sg-dur-fast) var(--sg-ease-out), box-shadow var(--sg-dur-base) var(--sg-ease-out);
}
.ga-card.on { border-color: rgb(255 196 92 / .6); background: linear-gradient(rgb(255 196 92 / .05), rgb(255 196 92 / .05)), var(--sg-surface-1); }
@media (hover: hover) and (pointer: fine) {
  .ga-card:hover { border-color: rgb(255 255 255 / .28); transform: translateY(-2px); box-shadow: var(--sg-elev-2); }
  .ga-card.on:hover { border-color: rgb(255 196 92 / .85); }
}
.ga-card-media { position: relative; aspect-ratio: 16 / 9; background: var(--sg-surface-sunken); overflow: hidden; }
.ga-card-pic { display: grid; place-items: center; width: 100%; height: 100%; color: var(--sg-text-3); }
.ga-card-pic.is-fallback { background: radial-gradient(70% 70% at 50% 50%, rgb(255 255 255 / .05), transparent 76%), var(--sg-surface-sunken); }
.ga-card-pic img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform var(--sg-dur-base) var(--sg-ease-out); }
.ga-card-pic .icon { width: 2.1rem; height: 2.1rem; opacity: .55; }
@media (hover: hover) and (pointer: fine) { .ga-card:hover .ga-card-pic img { transform: scale(1.045); } }
.ga-card-badges { position: absolute; top: .45rem; inset-inline-end: .45rem; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .25rem; pointer-events: none; }
.ga-card-badges .wd-tag { background: rgb(16 15 39 / .86); backdrop-filter: blur(4px); }
.ga-card-body { display: grid; align-content: start; gap: .15rem; padding: .6rem .75rem .45rem; min-width: 0; }
.ga-card-body .nm { font-weight: 650; line-height: 1.25; overflow-wrap: anywhere; }
.ga-card-body .sub { color: var(--sg-text-3); font-size: var(--sg-text-label); }
.ga-card-tags { display: flex; flex-wrap: wrap; gap: .25rem; margin-top: .35rem; }
.ga-card-tags .wd-tag { min-height: 1.3rem; padding: .05rem .45rem; font-size: .7rem; }
.ga-card-foot { display: flex; align-items: center; justify-content: flex-end; padding: .35rem .75rem .65rem; }
.ga-card-foot .btn { width: 100%; justify-content: center; }

.ga-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--sg-line-1); }
.ga-list li { border-bottom: 1px solid var(--sg-line-1); transition: background-color var(--sg-dur-fast); }
.ga-list li.on { background: rgb(253 93 98 / .06); }
@media (hover: hover) and (pointer: fine) { .ga-list li:hover { background: var(--sg-surface-1); } }
.ga-mrow { display: grid; grid-template-columns: 5rem minmax(0, 1fr) auto auto; align-items: center; gap: .3rem var(--sg-space-4); min-height: 3.35rem; padding: .42rem .5rem; }
.ga-mrow .pic { display: grid; place-items: center; width: 5rem; height: 2.8rem; border-radius: var(--sg-radius-xs); overflow: hidden; background: var(--sg-surface-sunken); color: var(--sg-text-3); }
.ga-mrow .pic img { width: 100%; height: 100%; object-fit: cover; display: block; outline: 1px solid var(--sg-image-outline); outline-offset: -1px; border-radius: inherit; }
.ga-mrow .pic .icon { width: 1.25rem; height: 1.25rem; opacity: .62; }
.ga-mrow .txt { display: grid; min-width: 0; }
.ga-mrow .nm { font-weight: 600; overflow-wrap: anywhere; }
.ga-mrow .tags { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .3rem; }
.ga-tag--garage_seen { color: var(--sg-sign-green-text); border-color: rgb(148 231 177 / .4); }
.ga-tag--garage_unseen, .ga-tag--exp { color: var(--sg-sign-yellow-text); border-color: rgb(246 215 50 / .4); }
.ga-tag--edition { border-style: dashed; color: var(--sg-text-1); }
.ga-tag--record { color: var(--sg-lagoon); border-color: rgb(70 222 214 / .4); }
.ga-tag--picked { color: var(--sg-text-projected); border-color: rgb(255 196 92 / .45); }
.ga-tag--owned { color: var(--sg-text-1); background: var(--sg-surface-2); }
.ga-tag--police { color: var(--sg-text-1); border-color: rgb(120 160 255 / .5); }
.ga-tag--tested { color: var(--sg-sign-green-text); border-color: rgb(148 231 177 / .45); font-weight: 650; }
.ga-ed-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr)); gap: var(--sg-space-3); }
.ga-ed { display: grid; grid-template-columns: 6rem minmax(0, 1fr); align-items: center; gap: .6rem var(--sg-space-4); padding: var(--sg-space-3) var(--sg-space-4);
  border-radius: var(--sg-radius-md); background: var(--sg-surface-1); border: 1px solid var(--sg-line-1); box-shadow: var(--sg-elev-1); }
.ga-ed.is-new { border-color: rgb(255 196 92 / .45); }
.ga-ed > .pic { display: grid; place-items: center; width: 6rem; height: 3.375rem; border-radius: var(--sg-radius-xs); overflow: hidden; background: var(--sg-surface-sunken); color: var(--sg-text-3); }
.ga-ed > .pic img { width: 100%; height: 100%; object-fit: cover; display: block; outline: 1px solid var(--sg-image-outline); outline-offset: -1px; border-radius: inherit; }
.ga-ed > .pic .icon { width: 1.45rem; height: 1.45rem; opacity: .62; }
.ga-ed-txt { display: grid; gap: .1rem; min-width: 0; }
.ga-ed-risk { display: flex; margin-top: .3rem; }
.ga-ed.is-tested { border-color: rgb(148 231 177 / .35); }
.ga-ed-act { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.ga-prop-list .nm { display: inline; }
.ga-prop-list li.owned label { cursor: default; }
.ga-prop-list .sub { display: flex; flex-wrap: wrap; gap: 0 .2rem; }
.ga-exp { margin-top: var(--sg-space-5); display: grid; gap: var(--sg-space-3); }
.ga-exp > .note { margin-top: calc(-1 * var(--sg-space-2)); }
.ga-exp-risk { margin-top: var(--sg-space-2); }
@media (max-width: 780px) {
  .ga-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ga-tab-lbl { white-space: normal; overflow: visible; text-align: center; min-width: 0; }
  .ga-vcard.is-open .ga-vcard-top { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 480px) {
  .ga-tab { padding-inline: .5rem; }
  .ga-tab .icon { display: none; }
}
@media (max-width: 600px) {
  .ga-hud { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sg-space-2); }
  .ga-spot-grid, .ga-prop-grid { grid-template-columns: minmax(0, 1fr); }
  .ga-gsec { padding: var(--sg-space-3); }
  .ga-garages, .ga-ed-list { grid-template-columns: minmax(0, 1fr); }
  .ga-spots li { grid-template-columns: minmax(0, 1fr); }
  .ga-car-meta, .ga-car-acts { grid-column: auto; }
  .ga-mod-grid { grid-template-columns: minmax(0, 1fr); }
  .ga-grid { grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr)); gap: var(--sg-space-2); }
  .ga-picks li { grid-template-columns: auto minmax(0, 1fr); }
  .ga-pick-ctl { grid-column: 1 / -1; justify-content: flex-start; }
  .ga-mrow { grid-template-columns: minmax(0, 1fr) auto; }
  .ga-mrow .pic { display: none; }
  .ga-mrow .tags { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; }
  .ga-ed { grid-template-columns: minmax(0, 1fr); }
  .ga-ed > .pic { justify-content: start; }
}

/* World: levels as rings with steppers, the four bars as tubes */
.levels { display: flex; flex-wrap: wrap; gap: var(--sg-space-4) var(--sg-space-5); align-items: flex-start; }
.levels .cell { justify-items: center; gap: .4rem; }
.levels .ring-lbl { font-weight: 600; color: var(--sg-text-1); }
.stepper { display: inline-flex; align-items: center; gap: .1rem; padding: 3px; border-radius: var(--sg-radius-pill); border: 1px solid var(--sg-line-control); background: var(--sg-input-bg); }
.stepper button {
  position: relative; display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 50%; border: 0; background: transparent; color: var(--sg-text-2); cursor: pointer;
  transition: background-color var(--sg-dur-fast), color var(--sg-dur-fast);
}
.stepper button::after { content: ""; position: absolute; inset: -4px; }
.stepper button .icon { width: 1.1rem; height: 1.1rem; }
@media (hover: hover) and (pointer: fine) { .stepper button:hover:not(:disabled) { background: rgb(255 255 255 / .08); color: var(--sg-text-1); } }
.stepper button:disabled { opacity: .35; cursor: not-allowed; }
.stepper input[type="number"] { width: 2.6rem; min-height: 2.25rem; padding: 0; border: 0; background: transparent; text-align: center; font: 720 1.375rem/1 var(--sg-font-display); font-stretch: var(--sg-num-stretch); box-shadow: none; }
.stepper .of { font: 600 .8125rem/1 var(--sg-font-text); color: var(--sg-text-3); margin-inline: -.35rem .2rem; direction: ltr; }
.levels .cell.changed .stepper { border-color: rgb(253 93 98 / .55); box-shadow: 0 10px 18px -12px rgb(250 40 137 / .9); background: var(--sg-sunset) bottom / 100% 2px no-repeat, var(--sg-input-bg); }
.levels .cell.changed .stepper input { background: none; box-shadow: none; }
.stepper:has(input[aria-invalid="true"]) { border-color: var(--sg-input-border-invalid); box-shadow: 0 0 0 1px var(--sg-input-border-invalid); }
.stepper input[aria-invalid="true"] { background: none !important; box-shadow: none !important; }
.stepper:focus-within:has(input:focus-visible) { border-color: var(--sg-input-border-focus); box-shadow: 0 0 0 3px rgb(255 104 155 / .3); }
.stepper input:focus-visible { box-shadow: none; }
.caps-bars { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: var(--sg-space-4); width: 100%; }
.caps-bars .cell { gap: .35rem; }
.caps-bars input[type="number"] { width: 6rem; }
.capbar { position: relative; display: block; height: 6px; border-radius: var(--sg-radius-pill); background: var(--sg-surface-sunken); box-shadow: inset 0 0 0 1px var(--sg-line-1); overflow: hidden; }
.capbar span { position: absolute; inset-block: 0; inset-inline-start: 0; width: var(--p, 0%); border-radius: inherit; background: var(--tube, var(--sg-orchid)); box-shadow: 0 0 8px color-mix(in oklab, var(--tube, var(--sg-orchid)) 60%, transparent); transition: width var(--sg-dur-slow) var(--sg-ease-out); }
.cell.changed .capbar span { background: var(--sg-sunset); box-shadow: 0 0 10px rgb(250 40 137 / .6); }
.world-acts { display: flex; flex-wrap: wrap; gap: var(--sg-space-2); width: 100%; }
/* Teleport (World tab): the spot list is wide enough for an area's longest name; the warning sits under the heading */
.tp-sel { width: min(24rem, 100%); }
.group.tp > .callout { margin-block: 0 var(--sg-space-3); }
.tp-custom { margin-top: var(--sg-space-3); }

/* vehicle compendium: the vehicles still missing, as pictures */
.vlist { overflow-x: auto; margin-top: var(--sg-space-2); padding: 4px 2px 8px; border-radius: var(--sg-radius-sm); scrollbar-width: thin; scrollbar-color: var(--sg-night-700) transparent; }
.vehicles { display: flex; gap: var(--sg-space-2); list-style: none; margin: 0; padding: 0; }
.vehicles li { flex: none; display: grid; gap: .3rem; width: 9.25rem; padding: .4rem .4rem .55rem; border-radius: var(--sg-radius-sm); background: var(--sg-surface-1); border: 1px solid var(--sg-line-1); }
.vehicles .pic-btn { display: block; width: 100%; border-radius: var(--sg-radius-xs); overflow: hidden; }
.vehicles img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; display: block; border-radius: var(--sg-radius-xs); outline: 1px solid var(--sg-image-outline); outline-offset: -1px; }
.vehicles span { font-size: .8125rem; font-weight: 600; line-height: 1.25; padding-inline: .2rem; overflow-wrap: anywhere; }
.field.vfield { align-items: start; }
.field.vfield .vlist { grid-column: 1 / -1; min-width: 0; }

/* ================================================================ tables: All stats, Save data, the 100% checklist */
.finder { display: flex; flex-wrap: wrap; gap: var(--sg-space-2) var(--sg-space-5); align-items: center; margin-bottom: var(--sg-space-4); }
.search { position: relative; display: flex; align-items: center; flex: 1 1 20rem; }
.search .icon { position: absolute; inset-inline-start: .9rem; color: var(--sg-text-3); width: 1.15rem; height: 1.15rem; pointer-events: none; }
.finder input[type="search"] { width: 100%; padding-inline-start: 2.6rem; padding-inline-end: 2.3rem; font-weight: 400; font-size: var(--sg-text-body); }
.search .kbd {
  position: absolute; inset-inline-end: .75rem; display: inline-grid; place-items: center; min-width: 1.35rem; height: 1.35rem; padding: 0 .3rem;
  border-radius: var(--sg-radius-xs); border: 1px solid var(--sg-line-2); background: var(--sg-surface-2); color: var(--sg-text-3);
  font: 600 .75rem/1 var(--sg-font-mono); pointer-events: none; transition: opacity var(--sg-dur-fast);
}
.search:focus-within .kbd, .search:has(input:not(:placeholder-shown)) .kbd { opacity: 0; }
@media (hover: none) and (pointer: coarse) { .search .kbd { display: none; } }
.finder .toggle { font-size: var(--sg-text-small); color: var(--sg-text-2); min-height: 2.5rem; }
.raw { width: 100%; border-collapse: collapse; font-size: var(--sg-text-small); }
.raw th { text-align: start; padding: .55rem .75rem; font-size: .75rem; font-weight: 600; color: var(--sg-text-3); border-bottom: 1px solid var(--sg-line-2); }
.raw td { padding: .55rem .75rem; border-bottom: 1px solid var(--sg-line-1); vertical-align: middle; }
.raw td.key { font-weight: 600; overflow-wrap: anywhere; }
.raw td.key small { display: block; color: var(--sg-text-3); font-weight: 400; }
.raw td.key.described { font-style: italic; font-weight: 500; }
:root:lang(ar) .raw td.key.described, :root:lang(ja) .raw td.key.described, :root:lang(ko) .raw td.key.described, :root:lang(zh) .raw td.key.described { font-style: normal; }
.raw td.key.described small { font-style: normal; }
.raw td small { display: block; color: var(--sg-text-3); font-size: .75rem; }
.raw input[type="number"] { width: 9.5rem; min-height: 2.25rem; font-size: .9375rem; border-radius: var(--sg-radius-sm); }
.raw .toggle { min-height: 2.25rem; font-size: var(--sg-text-small); }
.raw tr.changed td:first-child { box-shadow: inset 2px 0 0 var(--sg-accent-solid); }
[dir="rtl"] .raw tr.changed td:first-child { box-shadow: inset -2px 0 0 var(--sg-accent-solid); }
.raw tr.changed input[type="number"] { border-color: rgb(253 93 98 / .55); background: var(--sg-sunset) bottom / 100% 2px no-repeat, var(--sg-input-bg); }
.raw .lock { color: var(--sg-text-3); font-size: var(--sg-text-label); }
.raw .means, .raw .means-own { color: var(--sg-text-3); }
.raw td small.ia { display: block; width: fit-content; margin: .3rem 0 0; margin-inline-start: auto; padding: .05rem .45rem; border-radius: var(--sg-radius-pill); border: 1px solid var(--sg-line-2); font-weight: 600; white-space: nowrap; }
.raw td small.ia.ok { color: var(--sg-sign-green-text); border-color: rgb(148 231 177 / .35); }
.raw td small.ia.bad { color: var(--sg-sign-yellow-text); border-color: rgb(246 215 50 / .45); }
@media (hover: hover) and (pointer: fine) { .raw tbody tr:hover td { background: rgb(255 255 255 / .03); } }
.more { margin-top: var(--sg-space-4); }
.crumbs { display: flex; flex-wrap: wrap; gap: var(--sg-space-2); margin: 0 0 var(--sg-space-4); }
.crumbs .btn:last-child { border-color: var(--sg-coral); background: rgb(253 93 98 / .1); }

/* Completion: the figure now and after the picks, then the checklist line by line */
.comp-summary { display: grid; gap: var(--sg-space-4); margin: 0 0 var(--sg-space-7); padding: var(--sg-space-5) var(--sg-space-6); border-radius: var(--sg-radius-lg);
  background: var(--sg-surface-1); border: 1px solid var(--sg-line-2); box-shadow: var(--sg-elev-1); }
.comp-summary .nums { display: flex; flex-wrap: wrap; gap: var(--sg-space-3) var(--sg-space-8); }
.comp-summary .lbl { display: block; font-size: var(--sg-text-label); color: var(--sg-text-2); }
.comp-summary .big { display: block; margin-top: .3rem; font: 720 calc(var(--sg-display-scale) * clamp(2.75rem, 2rem + 2.4vw, 4rem))/1 var(--sg-font-display); font-stretch: var(--sg-num-stretch);
  font-variant-numeric: tabular-nums lining-nums; }
.comp-summary .after .big { color: var(--sg-text-projected); }
.comp-summary .after.muted .big { color: var(--sg-text-3); }
.comp-summary .meter { position: relative; height: 8px; border-radius: var(--sg-radius-pill); background: var(--sg-surface-sunken); box-shadow: inset 0 0 0 1px var(--sg-line-1); overflow: hidden; }
.comp-summary .meter span { position: absolute; inset-block: 0; inset-inline-start: 0; transition: width var(--sg-dur-slow) var(--sg-ease-out); }
.comp-summary .meter .now { background: var(--sg-text-2); border-start-start-radius: 4px; border-end-start-radius: 4px; }
.comp-summary .meter .gain { background: var(--sg-sun-gold); box-shadow: 0 0 10px rgb(251 210 107 / .6); }
.comp-summary .note { margin: 0; }
.comp-summary .callout { margin: 0; }
.raw.ck td { padding: .7rem .75rem; }
.raw.ck th.num, .raw.ck td.num { text-align: end; white-space: nowrap; font-variant-numeric: tabular-nums; }
.raw.ck td.key { width: 46%; }
.raw.ck td.act { width: 30%; text-align: end; }
.raw.ck td.act small { display: block; color: var(--sg-sign-yellow-text); margin-top: .3rem; }
.raw.ck td.act small.tested { color: var(--sg-sign-green-text); }
.raw.ck small.after { color: var(--sg-text-projected); font-weight: 600; }
.raw.ck .mini { position: relative; display: block; height: 4px; margin-top: .5rem; max-width: 16rem; border-radius: var(--sg-radius-pill); background: var(--sg-surface-sunken); overflow: hidden; }
.raw.ck .mini span { position: absolute; inset-block: 0; inset-inline-start: 0; background: var(--sg-text-3); border-radius: inherit; }
.raw.ck .mini span.add { background: var(--sg-sun-gold); box-shadow: 0 0 8px rgb(251 210 107 / .6); }
.raw.ck tr.full .mini span { background: var(--sg-sign-green); }
.raw.ck tr.picked td { background: rgb(253 93 98 / .05); }
.raw.ck .why { display: block; color: var(--sg-text-3); font-size: var(--sg-text-label); text-align: start; max-width: 34ch; margin-inline-start: auto; }
.btn.pick.on { border-color: var(--sg-coral); background: rgb(253 93 98 / .12); color: var(--sg-text-1); }
details.more-opts { margin-top: var(--sg-space-6); border-top: 1px solid var(--sg-line-1); }
details.more-opts > summary {
  display: flex; align-items: center; gap: .6rem; padding: var(--sg-space-4) 0; cursor: pointer; list-style: none; border-radius: var(--sg-radius-sm);
  font: var(--sg-display-weight) calc(var(--sg-display-scale) * var(--sg-text-h3))/1.15 var(--sg-font-display); font-stretch: var(--sg-display-stretch);
}
details.more-opts > summary::-webkit-details-marker { display: none; }
details.more-opts > summary::before {
  content: ""; flex: none; width: .6rem; height: .6rem; border-inline-end: 2px solid var(--sg-text-accent); border-bottom: 2px solid var(--sg-text-accent);
  transform: rotate(-45deg); transition: transform var(--sg-dur-base) var(--sg-ease-out);
}
[dir="rtl"] details.more-opts > summary::before { transform: rotate(45deg); }
details.more-opts[open] > summary::before { transform: rotate(45deg); }
[dir="rtl"] details.more-opts[open] > summary::before { transform: rotate(-45deg) scaleX(-1); }
details.more-opts > .note { margin-bottom: var(--sg-space-5); }
details.more-opts > .callout { margin-bottom: var(--sg-space-5); }
/* the shooting-range courses one by one (issue #37): ranges as small cards, each course with its tier and medal */
.field.srfield { align-items: start; }
.field.srfield .sr { grid-column: 1 / -1; min-width: 0; }
details.sr > summary {
  display: inline-flex; align-items: center; gap: .55rem; min-height: 2.5rem; cursor: pointer; list-style: none; border-radius: var(--sg-radius-sm);
  color: var(--sg-text-1); font-weight: 600; font-size: var(--sg-text-small);
}
details.sr > summary::-webkit-details-marker { display: none; }
details.sr > summary::before {
  content: ""; flex: none; width: .5rem; height: .5rem; border-inline-end: 2px solid var(--sg-text-accent); border-bottom: 2px solid var(--sg-text-accent);
  transform: rotate(-45deg); transition: transform var(--sg-dur-base) var(--sg-ease-out);
}
[dir="rtl"] details.sr > summary::before { transform: rotate(45deg); }
details.sr[open] > summary::before { transform: rotate(45deg); }
[dir="rtl"] details.sr[open] > summary::before { transform: rotate(-45deg) scaleX(-1); }
details.sr > summary:focus-visible { outline: 2px solid var(--sg-focus); outline-offset: 2px; }
details.sr > .note { margin: var(--sg-space-2) 0 var(--sg-space-3); }
details.sr h4 { margin: var(--sg-space-5) 0 var(--sg-space-2); font-size: calc(var(--sg-display-scale) * 1.125rem); }
.sr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(12.5rem, 1fr)); gap: var(--sg-space-3); }
.sr-range { padding: var(--sg-space-3); border-radius: var(--sg-radius-md); background: var(--sg-surface-1); border: 1px solid var(--sg-line-1); min-width: 0; }
.sr-range h5 { margin: 0 0 .35rem; font: 650 var(--sg-text-small)/1.3 var(--sg-font-text); color: var(--sg-text-1); }
.sr-range ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.sr-range label { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .55rem; min-height: 2.25rem; padding: .15rem .45rem;
  border-radius: var(--sg-radius-sm); cursor: pointer; font-size: var(--sg-text-small); }
.sr-range li.on label { background: rgb(255 196 92 / .09); }
.sr-range li.gold label { cursor: default; }
@media (hover: hover) and (pointer: fine) { .sr-range li:not(.gold) label:hover { background: var(--sg-surface-2); } }
.sr-range li:has(input:focus-visible) label { outline: 2px solid var(--sg-focus); outline-offset: -2px; }
.sr-range input { width: 1.05rem; height: 1.05rem; margin: 0; }
.sr-range .medal { font-size: .75rem; font-weight: 600; color: var(--sg-text-3); white-space: nowrap; }
.sr-range .medal--gold { color: var(--sg-sun-gold); }
.sr-range .medal--silver { color: #dcdfea; }
.sr-range .medal--bronze { color: #e8ab7c; }
.sr-range .medal--passed { color: var(--sg-text-2); }
/* Cheats: one pick for all of them, the story option, the game's warning, then every cheat as a card whose buttons are
   D-pad presses in key caps (in the order they're pressed; the arrows point where the pad does, never mirrored) */
.cheat-acts { display: grid; gap: var(--sg-space-3); justify-items: start; margin-bottom: var(--sg-space-5); }
.cheat-opt { display: grid; gap: .1rem; max-width: 64ch; }
.cheat-opt .help { padding-inline-start: 3.45rem; font-size: var(--sg-text-small); color: var(--sg-text-2); }   /* under the label, past the switch */
/* an option with its explanation under it, past the switch: Download's "Use an earlier download again" (pull request #33) */
.opt { display: grid; gap: .1rem; max-width: 64ch; }
.opt .help { padding-inline-start: 3.45rem; font-size: var(--sg-text-small); color: var(--sg-text-2); }
.callout.reused { margin: calc(-1 * var(--sg-space-3)) 0 var(--sg-space-5); }
.when { font-variant-numeric: tabular-nums; unicode-bidi: isolate; }
.cheats-part > .callout { margin-bottom: var(--sg-space-4); }
.cheat-how { margin-bottom: var(--sg-space-3); }
.cheat-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr)); gap: var(--sg-space-3); margin: 0; padding: 0; list-style: none; }
.cheat { display: grid; align-content: start; gap: .3rem; min-width: 0; padding: .8rem 1rem .9rem; border-radius: var(--sg-radius-md); background: var(--sg-surface-1); border: 1px solid var(--sg-line-1); }
.cheat-top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .15rem .75rem; }
.cheat .nm { font-weight: 600; overflow-wrap: anywhere; }
.cheat .fx { font-size: var(--sg-text-small); color: var(--sg-text-2); }
.cheat .cond { font-size: var(--sg-text-label); color: var(--sg-text-3); }
.cheat .cond b { font-weight: 600; color: var(--sg-text-2); }
.cheat .done-mark { font-size: var(--sg-text-label); }
.cheat .will { display: inline-flex; align-items: center; gap: .4rem; font-size: var(--sg-text-label); font-weight: 600; color: var(--sg-text-accent); }
.cheat .will::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--sg-accent-solid); box-shadow: 0 0 6px var(--sg-coral); }
.dpad { display: flex; flex-wrap: wrap; gap: 3px; margin: .3rem 0 .15rem; padding: 0; list-style: none; }
.dpad li { display: grid; place-items: center; width: 1.625rem; height: 1.625rem; border-radius: var(--sg-radius-xs); background: var(--sg-surface-2); color: var(--sg-text-1);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .1), inset 0 0 0 1px var(--sg-line-2), 0 2px 0 var(--sg-surface-sunken); }
.dpad .icon { width: .95rem; height: .95rem; }

/* Trophies: what an edit can and can't do, each with its sign */
.facts { display: grid; gap: var(--sg-space-3); }
.fact { display: grid; grid-template-columns: 1.25rem 1fr; gap: var(--sg-space-4); padding: var(--sg-space-5); border-radius: var(--sg-radius-lg); background: var(--sg-surface-1); border: 1px solid var(--sg-line-2); }
.fact .mark { width: 1.25rem; height: 1.25rem; margin-top: .3rem; }
.fact h3 { margin-bottom: .35rem; font-size: calc(var(--sg-display-scale) * 1.375rem); }
.fact p { color: var(--sg-text-2); max-width: 70ch; }

/* Send back */
.review { max-height: 40vh; overflow: auto; flex-basis: 100%; margin: 0; padding: 0; list-style: none; font-size: var(--sg-text-small); }
.review li { display: flex; justify-content: space-between; gap: var(--sg-space-4); padding: .45rem 0; border-bottom: 1px solid var(--sg-line-1); }
.review li:last-child { border-bottom: 0; }
.review li span:last-child { color: var(--sg-text-2); font-variant-numeric: tabular-nums; text-align: end; }
.panel .review { margin-top: var(--sg-space-3); }
.panel .saves { margin: var(--sg-space-3) -4px 0; padding-bottom: 4px; }
.panel .save { min-width: 0; }
.send-lists { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr)); gap: var(--sg-space-5); align-items: start; }

/* ================================================================ the unsaved-changes bar: the horizon is its top edge */
.pending {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--sg-z-bar); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: var(--sg-space-3) var(--sg-space-5); padding: var(--sg-space-4) var(--sg-gutter); background: var(--sg-night-850); box-shadow: var(--sg-elev-bar);   /* solid: at 97% the text under it showed through */
  max-height: 85vh; overflow-y: auto;
}
.pending::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--sg-horizon); box-shadow: 0 0 14px rgb(250 40 137 / .55); }
.pending.is-rising { animation: sg-bar-rise var(--sg-dur-medium) var(--sg-ease-emph); }
.pending.is-leaving { animation: sg-bar-rise calc(var(--sg-dur-medium) * .75) var(--sg-ease-exit) reverse forwards; }
@keyframes sg-bar-rise { from { transform: translateY(100%); } }
.pending .sum { display: grid; gap: .2rem; min-width: 0; font: var(--sg-display-weight) calc(var(--sg-display-scale) * var(--sg-text-h3))/1.05 var(--sg-font-display); font-stretch: var(--sg-display-stretch); }
.pending .sum small { display: block; font: var(--sg-text-weight) var(--sg-text-small)/1.4 var(--sg-font-text); color: var(--sg-text-2); max-width: 60ch; }
.pending > .row { gap: var(--sg-space-2); }
.pending .job-line { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: .4rem var(--sg-space-4); }
.pending .job-line small { color: var(--sg-text-2); }
.pending .job-line > .detail, .pending .job-line > .log { flex-basis: 100%; margin: 0; }
.pending > .autosave-tip { flex-basis: 100%; margin: 0; }
.pending .review { padding: var(--sg-space-2) var(--sg-space-4); border-radius: var(--sg-radius-md); background: var(--sg-surface-2); border: 1px solid var(--sg-line-1); }
.copy-panel { flex-basis: 100%; display: grid; gap: var(--sg-space-3); padding: var(--sg-space-4); border-radius: var(--sg-radius-md); background: var(--sg-surface-2); border: 1px solid var(--sg-line-1); }
.copy-panel p { margin: 0; max-width: 80ch; color: var(--sg-text-2); font-size: var(--sg-text-small); }
.copy-panel p strong { color: var(--sg-text-1); font-weight: 600; }
.copy-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: 2px var(--sg-space-3); max-height: 32vh; overflow: auto; }
.copy-to { display: flex; gap: .7rem; align-items: center; min-height: 2.75rem; padding: .35rem .6rem; border-radius: var(--sg-radius-sm); cursor: pointer; transition: background-color var(--sg-dur-fast); }
@media (hover: hover) and (pointer: fine) { .copy-to:hover { background: var(--sg-surface-3); } }
.copy-to input { width: 1.1rem; height: 1.1rem; margin: 0; flex: none; }
.copy-to .k { flex: none; color: var(--sg-text-3); font-size: var(--sg-text-label); min-width: 8ch; }
.copy-to span[data-no-i18n] { font: var(--sg-display-weight) 1.0625rem/1.15 var(--sg-font-display); font-stretch: var(--sg-display-stretch); }

/* ================================================================ "Edits saved": the one big moment */
.passed { position: fixed; inset: 0; z-index: var(--sg-z-moment); display: grid; place-items: center; background: rgb(9 8 27 / .55); cursor: pointer; animation: sg-fade var(--sg-dur-medium) var(--sg-ease-out); }
.passed .band {
  position: relative; width: 100%; display: grid; justify-items: center; gap: var(--sg-space-3); padding: var(--sg-space-7) var(--sg-space-5); text-align: center;
  background: linear-gradient(90deg, transparent, rgb(9 8 27 / .94) 16% 84%, transparent);
}
.passed .big {
  font: italic var(--sg-display-weight-heavy) calc(var(--sg-display-scale) * clamp(3rem, 2rem + 5vw, 6.5rem))/.95 var(--sg-font-display); font-stretch: 70%; letter-spacing: -.01em; color: #fff4ea;
  text-shadow: 0 0 2px rgb(255 255 255 / .8), 0 0 14px rgb(253 93 98 / .9), 0 0 40px rgb(250 40 137 / .55), 0 0 90px rgb(255 148 60 / .35);
  animation: sg-ignite var(--sg-dur-ignite) linear;
}
:root:lang(ar) .passed .big, :root:lang(ja) .passed .big, :root:lang(ko) .passed .big, :root:lang(zh) .passed .big, :root:lang(ru) .passed .big { font-style: normal; letter-spacing: 0; }
.passed .line { position: relative; width: min(34rem, 80%); height: 2px; background: var(--sg-horizon); box-shadow: 0 0 14px rgb(250 40 137 / .5); animation: sg-draw var(--sg-dur-scene) var(--sg-ease-emph); }
.passed .line::after { content: ""; position: absolute; top: 50%; left: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%;
  background: radial-gradient(circle, #fff7dc 0 30%, var(--sg-sun-gold) 46%, var(--sg-tangerine) 100%); box-shadow: 0 0 0 4px rgb(255 148 60 / .22), 0 0 22px 6px rgb(255 148 60 / .65), 0 0 70px 18px rgb(250 40 137 / .35); }
@keyframes sg-draw { from { transform: scaleX(0); } }
.passed .small { color: var(--sg-text-2); font-size: var(--sg-text-lead); }

/* ================================================================ toasts: bottom end, above the bar */
.toast {
  position: fixed; inset-inline-end: var(--sg-space-5); bottom: calc(var(--bar-h, 0px) + var(--sg-space-4)); z-index: var(--sg-z-toast); display: flex; align-items: center; gap: .75rem;
  max-width: 24rem; padding: .8rem 1rem; border-radius: var(--sg-radius-md); background: var(--sg-surface-2); border: 1px solid var(--sg-line-2); box-shadow: var(--sg-elev-3);
  font-size: .9375rem; line-height: 1.4; color: var(--sg-text-1);
  opacity: 0; transform: translateY(12px); pointer-events: none;
  transition: opacity var(--sg-dur-base) var(--sg-ease-exit), transform var(--sg-dur-base) var(--sg-ease-exit);
}
.toast.show { opacity: 1; transform: none; pointer-events: auto; transition-duration: var(--sg-dur-medium); transition-timing-function: var(--sg-ease-out); }
.toast .icon { width: 1.25rem; height: 1.25rem; color: var(--sg-lagoon); }
.toast.ok .icon { color: var(--sg-cash); }
.toast.error .icon { color: var(--sg-sign-red); }


/* ================================================================ footer */
.foot { width: min(100% - 2 * var(--sg-gutter), var(--sg-page-max)); margin: 0 auto; padding: var(--sg-space-5) 0 var(--sg-space-6); border-top: 1px solid var(--sg-line-1);
  display: grid; gap: var(--sg-space-3); color: var(--sg-text-3); font-size: var(--sg-text-label); }
.foot .credit { max-width: 80ch; }
.foot .credit .link { font-size: inherit; color: var(--sg-text-2); margin-inline-start: .25rem; }
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--sg-space-3) var(--sg-space-5); }
.foot-actions { display: inline-flex; gap: var(--sg-space-4); align-items: center; }
.foot .legal { display: inline-block; margin-top: .35rem; }
.foot .legal a { color: inherit; text-decoration: underline; text-underline-offset: 2px; display: inline-flex; align-items: center; gap: .3rem; }
.foot .legal a .icon { width: .95rem; height: .95rem; }
.foot .link { font-size: var(--sg-text-label); }
.update { flex-basis: 100%; display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: var(--sg-space-2) var(--sg-space-5); }
.upd-status { display: inline-flex; align-items: center; gap: .5rem; color: var(--sg-text-2); }
.upd-status:empty { display: none; }
.upd-status .pct { font-variant-numeric: tabular-nums; color: var(--sg-text-3); }
.upd-actions { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--sg-space-2) var(--sg-space-5); }
.upd-actions .link { font-size: var(--sg-text-label); }
.upd-actions .btn.small { min-height: 2rem; padding: .25rem .9rem; font-size: var(--sg-text-label); }
.upd-actions .toggle { min-height: 2rem; gap: .5rem; font-size: var(--sg-text-label); color: var(--sg-text-2); }
.upd-actions .toggle .track { transform: scale(.8); margin-inline: -.25rem; }
.upd-actions .toggle input { width: 2.2rem; height: 1.3rem; }

/* ================================================================ credits: the projects Save Garage is built on and the people
   who helped (issue #36), then the images, fonts and icons */
.credits { display: grid; gap: var(--sg-space-7); }
/* the projects: a card each, the name linking to its repository */
.made { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); gap: var(--sg-space-3); margin: var(--sg-space-4) 0 0; padding: 0; list-style: none; }
.made li { display: grid; gap: .5rem; align-content: start; min-width: 0; padding: var(--sg-space-4) var(--sg-space-5) var(--sg-space-5);
  border-radius: var(--sg-radius-lg); background: var(--sg-surface-1); border: 1px solid var(--sg-line-2); box-shadow: var(--sg-elev-1); }
.credits .made h3 { margin: 0; font-size: calc(var(--sg-display-scale) * 1.375rem); }
.made h3 a { color: var(--sg-text-1); text-decoration: none; border-radius: var(--sg-radius-xs); transition: color var(--sg-dur-fast) var(--sg-ease-out); }
.made h3 a span { text-decoration: underline; text-decoration-color: var(--sg-text-accent); text-decoration-thickness: 1px; text-underline-offset: 4px; overflow-wrap: anywhere; }
.made h3 a .icon { width: 1rem; height: 1rem; margin-inline-start: .45rem; color: var(--sg-text-3); transition: color var(--sg-dur-fast) var(--sg-ease-out); }
@media (hover: hover) and (pointer: fine) { .made h3 a:hover, .made h3 a:hover .icon { color: var(--sg-text-accent); } }
.made-by { color: var(--sg-text-3); font-size: var(--sg-text-label); }
.made-by .icon { width: .95rem; height: .95rem; vertical-align: -.2em; }
.made li > p:last-child { color: var(--sg-text-2); font-size: var(--sg-text-small); }
/* the people: "Name: what they did", one row each */
.people { margin: var(--sg-space-4) 0 0; padding: 0; list-style: none; max-width: calc(var(--sg-measure) + 2 * var(--sg-space-5));
  border-radius: var(--sg-radius-lg); background: var(--sg-surface-1); border: 1px solid var(--sg-line-2); box-shadow: var(--sg-elev-1); }
.people li { padding: .95rem var(--sg-space-5); color: var(--sg-text-2); overflow-wrap: break-word; }
.people li + li { border-top: 1px solid var(--sg-line-1); }
.people b { color: var(--sg-text-1); font-weight: 600; }
/* the colon is drawn here, in the reader's own punctuation, outside the name: the name reads left to right on its own
   (data-no-i18n), so right to left the colon still sits between the name and what they did */
.people .what::before { content: ": "; }
:lang(fr) .people .what::before { content: "\00a0: "; }
:lang(ja) .people .what::before, :lang(zh) .people .what::before { content: "："; }
.credits .thumbs + .note { margin-top: var(--sg-space-3); }
/* the images, fonts and icons */
.credits section > h2 { margin-bottom: .5rem; }
.credits section > p { color: var(--sg-text-2); max-width: var(--sg-measure); }
.credits h3 { margin: var(--sg-space-5) 0 var(--sg-space-3); font-size: calc(var(--sg-display-scale) * 1.375rem); }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: var(--sg-space-2); margin: var(--sg-space-4) 0 0; padding: 0; list-style: none; }
.thumbs img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; display: block; border-radius: var(--sg-radius-sm); outline: 1px solid var(--sg-image-outline); outline-offset: -1px; }
/* the eyes --eyes-at of the way down a 16:9 thumb, which is 27/64 / --zoom as tall as its portrait's <img> */
.thumbs img.tall { --eyes-at: .44; outline: 0; border-radius: 0; translate: 0 calc((27 * var(--eyes-at) / (64 * var(--zoom)) - var(--eyes-y)) * 100%); }
/* its box keeps the thumbs' 16:9 shape, clips the taller picture and draws the image outline over it */
.thumbs li:has(> img.tall) { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--sg-radius-sm); }
.thumbs li:has(> img.tall)::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px var(--sg-image-outline); pointer-events: none; }
.src-links { display: flex; flex-wrap: wrap; gap: .3rem var(--sg-space-5); margin: var(--sg-space-3) 0 0; padding: 0; list-style: none; font-size: var(--sg-text-small); }
.src-links a { overflow-wrap: anywhere; }
.credit-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: var(--sg-space-2); margin: 0; padding: 0; list-style: none; }
.credit-list li { display: grid; grid-template-columns: 4.5rem 1fr; gap: .1rem .7rem; align-items: center; padding: .45rem .7rem .45rem .45rem; border-radius: var(--sg-radius-sm);
  background: var(--sg-surface-1); border: 1px solid var(--sg-line-1); font-size: var(--sg-text-label); min-width: 0; }
.credit-list img { grid-row: 1 / span 2; width: 4.5rem; height: 2.5rem; object-fit: contain; }
.credit-list a { font-weight: 600; font-size: var(--sg-text-small); overflow-wrap: anywhere; align-self: end; }
.credit-list .by { color: var(--sg-text-3); overflow-wrap: anywhere; align-self: start; }
.credit-list .by em { font-style: normal; color: var(--sg-text-2); }

/* ================================================================ help: answers for each step, built in (issue #31) */
div.help { display: grid; gap: var(--sg-space-6); align-items: start; }   /* the Help view; a p or span .help is an option's explanation */
.help-toc ol { display: flex; flex-wrap: wrap; gap: var(--sg-space-2); margin: 0; padding: 0; list-style: none; }
.help-toc a {
  display: inline-flex; align-items: center; gap: .55rem; min-height: var(--sg-control-h-sm); padding-block: .3rem; padding-inline: .55rem .95rem; border-radius: var(--sg-radius-pill);
  border: 1px solid var(--sg-line-2); background: var(--sg-surface-1); color: var(--sg-text-2); font-size: var(--sg-text-small); font-weight: 600; text-decoration: none;
  transition: color var(--sg-dur-fast) var(--sg-ease-out), border-color var(--sg-dur-fast) var(--sg-ease-out), background-color var(--sg-dur-fast) var(--sg-ease-out);
}
.help-toc a .icon { width: 1.05rem; height: 1.05rem; color: var(--sg-text-3); }
@media (hover: hover) and (pointer: fine) { .help-toc a:hover { color: var(--sg-text-1); border-color: rgb(255 255 255 / .3); background: var(--sg-surface-2); } }
.help-groups { display: grid; gap: var(--sg-space-7); min-width: 0; }
.help-group { display: grid; gap: var(--sg-space-4); scroll-margin-top: var(--sg-space-5); }
.help-group > h2 { display: flex; align-items: center; gap: var(--sg-space-4); font-size: calc(var(--sg-display-scale) * var(--sg-text-h3)); border-radius: var(--sg-radius-sm); }
.help-group > h2:focus { outline: none; }
.help-group > h2:focus-visible { outline: 2px solid var(--sg-focus); outline-offset: 3px; }
.help-group > h2 .porthole { width: 2.75rem; height: 2.75rem; border-width: 1.5px; color: var(--sg-text-2); }
.help-group > h2 .porthole .icon { width: 1.25rem; height: 1.25rem; }
/* each answer is a real <details>: the question, a chevron, and the answer under it */
.qa-list { border-radius: var(--sg-radius-lg); background: var(--sg-surface-1); border: 1px solid var(--sg-line-2); box-shadow: var(--sg-elev-1); }
.qa { scroll-margin-top: var(--sg-space-5); }
.qa + .qa { border-top: 1px solid var(--sg-line-1); }
.qa > summary {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sg-space-4); min-height: 3.25rem; padding: .8rem var(--sg-space-5);
  list-style: none; cursor: pointer; font-weight: 600; line-height: var(--sg-leading-ui); border-radius: var(--sg-radius-lg); overflow-wrap: anywhere;
  transition: background-color var(--sg-dur-fast) var(--sg-ease-out);
}
.qa > summary::-webkit-details-marker { display: none; }
.qa > summary .icon { width: 1.1rem; height: 1.1rem; color: var(--sg-text-3); transition: transform var(--sg-dur-base) var(--sg-ease-out), color var(--sg-dur-fast); }
.qa[open] > summary .icon { transform: rotate(180deg); color: var(--sg-text-accent); }
@media (hover: hover) and (pointer: fine) { .qa > summary:hover { background: rgb(255 255 255 / .035); } .qa > summary:hover .icon { color: var(--sg-text-1); } }
.qa-q { min-width: 0; text-wrap: pretty; hyphens: auto; }
.qa-q q { quotes: auto; }   /* the reader's own quotation marks, from the page's lang */
:lang(ar) .qa-q q { quotes: "«" "»"; }   /* as the Arabic text quotes the app's words */
.qa-a { display: grid; gap: var(--sg-space-3); padding: 0 var(--sg-space-5) var(--sg-space-5); color: var(--sg-text-2); max-width: calc(var(--sg-measure) + 2 * var(--sg-space-5)); }
.qa-a > * { margin: 0; min-width: 0; }
.qa-a strong { color: var(--sg-text-1); }
.qa-a .path { color: var(--sg-text-2); font-size: var(--sg-text-small); }
.qa-a .how { gap: var(--sg-space-4); margin-block: var(--sg-space-1); }
.qa-a .how .path { display: grid; gap: var(--sg-space-2); }
.qa-a .how .path > * { margin: 0; min-width: 0; }
.os-steps { display: grid; gap: .45rem; margin: 0; }
.os-steps > div { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); gap: .15rem var(--sg-space-3); }
.os-steps dt { font-weight: 600; color: var(--sg-text-1); }
.os-steps dd { margin: 0; }
/* a command to copy, left to right in every language */
.codebox { border-radius: var(--sg-radius-md); background: var(--sg-surface-sunken); border: 1px solid var(--sg-line-2); }
.codebox-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sg-space-3); min-height: 2.75rem; padding-block: .2rem; padding-inline: .9rem .35rem;
  border-bottom: 1px solid var(--sg-line-1); color: var(--sg-text-3); font-size: var(--sg-text-label); }
.codebox pre { margin: 0; padding: .75rem .9rem .85rem; color: var(--sg-text-1); font: .8125rem/1.6 var(--sg-font-mono); text-align: left;
  white-space: pre-wrap; word-break: break-all; }   /* long lines wrap at the box's edge, as a terminal shows them, not at the hyphens of a command's options */
.help-more { margin-top: calc(-1 * var(--sg-space-3)); }
.help-more a { overflow-wrap: anywhere; }
/* a Help link: on errors, and "More help" in the send-back callouts */
.help-link { position: relative; display: inline-flex; align-items: center; gap: .4rem; }
.help-link .icon { width: 1rem; height: 1rem; }
.help-link::after { content: ""; position: absolute; inset: -.75rem -.4rem; }   /* a 44px hit area */
.callout .row { margin-top: .55rem; }
/* the upload sits at "PS5 connected": the checklist under the job box. Its slot stays in the page (a live region) and
   takes no room while empty. */
.stall-slot:empty { position: absolute; }
.callout.stall { animation: sg-rise var(--sg-dur-medium) var(--sg-ease-out); }
.callout.stall ol { display: grid; gap: .25rem; margin: .45rem 0 0; padding-inline-start: 1.35rem; }
.callout.stall li { padding-inline-start: .15rem; }
.callout.stall ol + div { margin-top: .5rem; }
.callout.stall li::marker { color: var(--sg-sign-yellow-text); font-weight: 600; font-variant-numeric: tabular-nums; }
@media (min-width: 1100px) {
  div.help { grid-template-columns: 17rem minmax(0, 1fr); gap: var(--sg-space-7); }
  .help-toc { position: sticky; top: var(--sg-space-5); }
  .help-toc ol { flex-direction: column; }
  .help-toc a { display: flex; }
}
@media (max-width: 600px) {
  .qa > summary { padding-inline: var(--sg-space-4); }
  .qa-a { padding-inline: var(--sg-space-4); }
  .os-steps > div { grid-template-columns: minmax(0, 1fr); }
}

/* ================================================================ responsive */
@media (max-width: 1100px) {
  .money-top { grid-template-columns: 1fr; }
  .money-top .bank-stack { position: static; max-width: 24rem; }
}
@media (max-width: 860px) {
  .field { grid-template-columns: 1fr; }
  .caps dl > div { grid-template-columns: 2.75rem minmax(0, 1fr); }
  .caps dd.r { grid-column: 2; grid-row: 3; justify-self: start; margin-top: .2rem; }
  .step:not(.current) { font-size: 0; gap: 0; padding-inline: .2rem; }
  .step:not(.current) .n { font-size: .8125rem; }
  .step.current { position: relative; z-index: 1; white-space: normal; }   /* a long label (ru: Отправить обратно) wraps rather than widen the band */
  .steps { grid-template-columns: none; display: flex; }
  .steps li { flex: 1 1 0; }
  .steps li:has(.current) { flex: 0 1 auto; }
  .raw.ck td.key { width: auto; }
  .raw.ck thead { display: none; }
  .raw.ck tr { display: grid; grid-template-columns: 1fr auto; gap: .3rem var(--sg-space-3); padding: var(--sg-space-3) 0; border-bottom: 1px solid var(--sg-line-1); }
  .raw.ck td { border: 0; padding: 0; }
  .raw.ck td.key { grid-column: 1 / -1; }
  .raw.ck td.act { grid-column: 1 / -1; text-align: start; width: auto; }
  .raw.ck .why { margin-inline-start: 0; }
  .mast { min-height: 0; }
  .comp-summary { padding: var(--sg-space-5); }
}
@media (max-width: 860px) {
  .wd-layout { grid-template-columns: minmax(0, 1fr); gap: var(--sg-space-4); }
  .wd-cats { position: static; display: flex; gap: var(--sg-space-2); overflow-x: auto; padding: 4px 4px 8px; margin: -4px -4px 0; scrollbar-width: thin; scrollbar-color: var(--sg-night-700) transparent; }
  .wd-group { display: none; }
  .wd-cats > li { flex: none; }
  .wd-cat, .wd-cat.sub { width: auto; padding-inline: .8rem; border-color: var(--sg-line-2); border-radius: var(--sg-radius-pill); white-space: nowrap; }
}
@media (max-width: 600px) {
  :root { --sg-round-btn: 3.5rem; --sg-ring-size: 4rem; }
  .wd-list label, .wd-list.with-pics label { grid-template-columns: auto minmax(0, 1fr); }
  .wd-list .pic { display: none; }
  .wd-list .tags { grid-column: 2; justify-content: flex-start; }
  .wd-tools .row { width: 100%; }
  .of-list { grid-template-columns: minmax(0, 1fr); }
  .mast { gap: var(--sg-space-5); padding-top: var(--sg-space-4); }
  .mast-row { flex-direction: column; position: relative; }
  .mast-side { justify-content: flex-start; }
  .mast-pill { position: absolute; top: 0; inset-inline-end: 0; }   /* Help sits in the corner by the wordmark, so the pills keep one row */
  .status { justify-content: flex-start; }
  .status .pill:not(:first-child) { display: none; }
  .sections { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--sg-space-3) var(--sg-space-1); }
  .round { width: auto; }
  .char-rings { padding-inline: var(--sg-space-2); }
  .pending { padding-block: var(--sg-space-3); }
  .pending > .row { width: 100%; }
  .pending > .row .btn.primary { order: -1; flex: 1 1 100%; }
  .pending > .row .btn:not(.primary) { flex: 1 1 auto; }
  .pending .sum small { display: none; }
  .toast { inset-inline: var(--sg-space-3); max-width: none; }
  .title-card h1 { max-width: none; }
  .how li { grid-template-columns: 2.25rem 1fr; }
  .how li::before { width: 2.25rem; height: 2.25rem; }
  .raw:not(.ck) th:nth-child(3), .raw:not(.ck) td:nth-child(3) { display: none; }
  .raw th, .raw td { padding-inline: .4rem; }
  .raw:not(.ck) input[type="number"] { width: 6.75rem; }
  #allrows { overflow-x: auto; }   /* a long stat name or value scrolls inside the table, never the page */
  .weapons { grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); }
  .credit-list { grid-template-columns: 1fr; }
  .made li, .people li { padding-inline: var(--sg-space-4); }
}
@media (max-width: 380px) {
  .sections { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ================================================================ right to left: numbers, money and codes stay left to right */
[dir="rtl"] .cash, [dir="rtl"] .num, [dir="rtl"] .fig, [dir="rtl"] input[type="number"], [dir="rtl"] .title-card strong, [dir="rtl"] .comp-summary .big,
[dir="rtl"] .raw td small.after, [dir="rtl"] .upd-status .pct, [dir="rtl"] .was { unicode-bidi: isolate; }
[dir="rtl"] .cash, [dir="rtl"] .num, [dir="rtl"] .fig, [dir="rtl"] input[type="number"], [dir="rtl"] .title-card strong, [dir="rtl"] .comp-summary .big, [dir="rtl"] .upd-status .pct { direction: ltr; }
[dir="rtl"] [data-no-i18n] { unicode-bidi: plaintext; }
[dir="rtl"] .weapons li .nm, [dir="rtl"] .vehicles span { unicode-bidi: plaintext; }

/* ================================================================ reduced motion: every state arrives, instantly (tokens.css collapses the durations) */
@media (prefers-reduced-motion: reduce) {
  .bar span { width: 100%; animation: sg-breathe var(--sg-dur-loop) ease-in-out infinite; }
  .skel i { animation: none; }
  .mast-img { transform: none; }
  main.is-entering { animation: none; }
  .callout.stall { animation: none; }
  .qa > summary .icon { transition: none; }
}

/* ================================================================ saves on this computer (pull request #34): the downloads
   as dated cards (a porthole, what it is in a label, its date in display type, its tags), then a decrypted file or folder
   from disk behind styled buttons; the file being edited on its own, and an edited file on its way into a save */
.local-picker { display: grid; gap: var(--sg-space-4); min-width: 0; }
.local-picker > * { margin: 0; min-width: 0; }
.lp-head { display: grid; gap: .4rem; }
.local-recent { display: grid; gap: var(--sg-space-3); min-width: 0; }
.dl-list { display: grid; gap: var(--sg-space-2); margin: 0; padding: 0; list-style: none; min-width: 0; }
.dl-list > li { display: grid; gap: var(--sg-space-2); min-width: 0; }
.dl-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--sg-space-2); align-items: stretch; min-width: 0; }
.dl-card {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--sg-space-4); width: 100%; min-height: 4rem;
  padding: .7rem 1rem; text-align: start; border-radius: var(--sg-radius-md); border: 1px solid var(--sg-line-2); background: var(--sg-surface-2);
  color: var(--sg-text-1); font: inherit; cursor: pointer;
  transition: border-color var(--sg-dur-fast) var(--sg-ease-out), background-color var(--sg-dur-fast) var(--sg-ease-out), transform var(--sg-dur-instant) var(--sg-ease-out);
}
.dl-card .porthole { width: 2.75rem; height: 2.75rem; color: var(--sg-text-2); }
.dl-card .porthole .icon { width: 1.25rem; height: 1.25rem; }
.dl-card > .icon { color: var(--sg-text-3); }
.dl-text { display: grid; gap: .15rem; min-width: 0; }
.dl-title { font-size: var(--sg-text-label); color: var(--sg-text-3); }
.dl-text > .when { font: var(--sg-display-weight) calc(var(--sg-display-scale) * 1.125rem)/1.15 var(--sg-font-display); font-stretch: var(--sg-display-stretch); overflow-wrap: anywhere; }
.dl-sub { font-size: var(--sg-text-small); color: var(--sg-text-2); }
.dl-tags { display: flex; flex-wrap: wrap; gap: .2rem .9rem; margin-top: .15rem; }
.dl-tag { display: inline-flex; align-items: center; gap: .4rem; font-size: var(--sg-text-label); color: var(--sg-text-2); }
.dl-tag.sent { color: var(--sg-sign-yellow-text); }
.dl-tag.sent::before, .dl-tag.now::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--sg-wait); }
.dl-tag.now { color: var(--sg-text-accent); }
.dl-tag.now::before { background: var(--sg-accent-solid); box-shadow: 0 0 6px var(--sg-coral); }
@media (hover: hover) and (pointer: fine) { .dl-card:hover:not(:disabled) { border-color: rgb(255 255 255 / .32); background: var(--sg-surface-3); } }
.dl-card:active:not(:disabled) { transform: scale(var(--sg-press)); }
.dl-card:disabled { cursor: default; background: var(--sg-surface-1); }
.dl-del {
  display: inline-flex; align-items: center; justify-content: center; width: 2.75rem; min-height: 4rem; padding: 0;
  border-radius: var(--sg-radius-md); border: 1px solid var(--sg-line-2); background: var(--sg-surface-2);
  color: var(--sg-text-3); cursor: pointer;
  transition: border-color var(--sg-dur-fast) var(--sg-ease-out), background-color var(--sg-dur-fast) var(--sg-ease-out), color var(--sg-dur-fast) var(--sg-ease-out), transform var(--sg-dur-instant) var(--sg-ease-out);
}
.dl-del .icon { width: 1.1rem; height: 1.1rem; }
@media (hover: hover) and (pointer: fine) {
  .dl-del:hover:not(:disabled) { color: var(--sg-sign-red-text); border-color: var(--sg-sign-red); background: rgb(243 65 60 / .14); }
}
.dl-del:active:not(:disabled) { transform: scale(var(--sg-press)); }
.dl-del:disabled { opacity: .4; cursor: not-allowed; }
.dl-slots:empty { display: none; }
.dl-slots { display: grid; gap: var(--sg-space-2); padding-inline-start: calc(2.75rem + var(--sg-space-4) + 1rem); }
.saves.wrap { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; }
.dl-more > summary {
  display: inline-flex; align-items: center; gap: .55rem; min-height: var(--sg-control-h); cursor: pointer; list-style: none; border-radius: var(--sg-radius-sm);
  font-weight: 600; color: var(--sg-text-2);
}
.dl-more > summary::-webkit-details-marker { display: none; }
.dl-more > summary::before {
  content: ""; flex: none; width: .5rem; height: .5rem; margin-inline: .15rem .2rem; border-inline-end: 2px solid var(--sg-text-accent); border-bottom: 2px solid var(--sg-text-accent);
  transform: rotate(-45deg); transition: transform var(--sg-dur-base) var(--sg-ease-out);
}
[dir="rtl"] .dl-more > summary::before { transform: rotate(45deg); }
.dl-more[open] > summary::before { transform: rotate(45deg); }
.dl-more .n, .other-save .n { color: var(--sg-text-3); font-weight: 400; font-variant-numeric: tabular-nums; }
@media (hover: hover) and (pointer: fine) { .dl-more > summary:hover { color: var(--sg-text-1); } }
/* a decrypted file or folder from disk: real file inputs, hidden behind buttons that take their focus ring */
.file-pick {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--sg-space-3) var(--sg-space-4); align-items: center;
  padding: var(--sg-space-4); border-radius: var(--sg-radius-md); border: 1px dashed var(--sg-line-control);
}
.file-pick > .porthole { width: 2.75rem; height: 2.75rem; }
.file-pick > .porthole .icon { width: 1.25rem; height: 1.25rem; }
.fp-text { display: grid; gap: .2rem; min-width: 0; }
.fp-text strong { font-weight: 600; }
.fp-acts, .fp-slots { grid-column: 2; min-width: 0; }
.fp-slots { display: grid; gap: var(--sg-space-2); }
.fp-slots:empty { display: none; }
.file-btn { position: relative; }
.file-btn input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.file-btn:focus-within { outline: 2px solid var(--sg-focus); outline-offset: 3px; }
.file-btn:has(input:disabled) { opacity: .42; cursor: not-allowed; }
/* "Open another save", under the saves: a quiet line that opens the picker */
.other-save { margin: calc(-1 * var(--sg-space-3)) 0 var(--sg-space-5); }
.other-save > summary {
  display: inline-flex; align-items: center; gap: .45rem; min-height: var(--sg-control-h); cursor: pointer; list-style: none; border-radius: var(--sg-radius-sm);
  color: var(--sg-text-2); font-size: var(--sg-text-small); font-weight: 600;
}
.other-save > summary::-webkit-details-marker { display: none; }
.other-save > summary .icon { width: 1rem; height: 1rem; transition: transform var(--sg-dur-base) var(--sg-ease-out); }
.other-save[open] > summary .icon { transform: rotate(180deg); color: var(--sg-text-accent); }
@media (hover: hover) and (pointer: fine) { .other-save > summary:hover { color: var(--sg-text-1); } }
.other-save > .local-picker { margin-top: var(--sg-space-2); }
/* a file being edited on its own, and an edited file on its way into a save of the open download */
.local-file, .return-file { display: grid; gap: var(--sg-space-3); margin: calc(-1 * var(--sg-space-3)) 0 var(--sg-space-5); }
.local-file > *, .return-file > * { margin: 0; min-width: 0; }
.return-file { border-color: rgb(253 93 98 / .45); }
.from-to { display: grid; gap: .35rem; margin: 0; }
.from-to > div { display: grid; grid-template-columns: minmax(6rem, max-content) minmax(0, 1fr); gap: .1rem var(--sg-space-4); }
.from-to dt { color: var(--sg-text-3); font-size: var(--sg-text-small); }
.from-to dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.return-note { display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem var(--sg-space-4); }
.return-note > span { flex: 1 1 20rem; }
.callout.recovered, .callout.snapshot { margin: calc(-1 * var(--sg-space-3)) 0 var(--sg-space-5); }
.stack > .callout.snapshot { margin: 0; }
@media (max-width: 600px) {
  .dl-card { gap: var(--sg-space-3); padding: .65rem .8rem; }
  .file-pick { grid-template-columns: minmax(0, 1fr); }
  .file-pick > .porthole { display: none; }
  .fp-acts, .fp-slots { grid-column: 1; }
  .dl-slots { padding-inline-start: 0; }
  .from-to > div { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .dl-more > summary::before, .other-save > summary .icon { transition: none; }
}

/* ================================================================ saves from other platforms (experimental): Xbox Series,
   VIctory and Whiplash. A platform is a quiet tag with its icon; what a chosen file holds sits under the picker as a
   card; "where is it from" and "where you'll play it" are radio chips (a ring that fills, plus the coral outline, so the
   choice never rests on colour alone); the ways to write a save back are radio rows; the key file and the way from an
   Xbox to a PS5 are disclosure rows under the picker; the steps reuse the numbered portholes */
.plat-tag {
  display: inline-flex; align-items: center; gap: .4rem; min-height: 1.75rem; padding: 0 .7rem; border-radius: var(--sg-radius-pill);
  border: 1px solid var(--sg-line-2); background: var(--sg-surface-2); color: var(--sg-text-1); font-size: var(--sg-text-label); font-weight: 600;
  white-space: nowrap; unicode-bidi: isolate;
}
.plat-tag .icon { width: 1rem; height: 1rem; color: var(--sg-text-2); }
.fp-found:empty { display: none; }
.fp-found > .callout, .fp-found > .loading { margin: 0; }
.found {
  display: grid; gap: var(--sg-space-3); padding: var(--sg-space-4); border-radius: var(--sg-radius-md); border: 1px solid var(--sg-line-2);
  background: var(--sg-surface-2); min-width: 0;
}
.found > * { margin: 0; min-width: 0; }
.found:focus-visible, .keys-ready:focus-visible, .plat-done:focus-visible, .plat-base-file:focus-visible { outline: 2px solid var(--sg-focus); outline-offset: 3px; }
.found-head { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem .75rem; }
.found-kind { font-weight: 600; color: var(--sg-text-1); }
.found-file, .lf-from, .plat-base-file { color: var(--sg-text-2); font-size: var(--sg-text-small); }
.fn { color: var(--sg-text-1); overflow-wrap: anywhere; }
.found-saves { display: grid; gap: var(--sg-space-2); }
.found-saves .saves { gap: var(--sg-space-2); }
.save .pct { font-size: var(--sg-text-label); color: var(--sg-text-2); font-variant-numeric: tabular-nums; }
.found-why { margin: 0; padding-inline-start: 1.1rem; display: grid; gap: .3rem; color: var(--sg-text-2); font-size: var(--sg-text-small); }
.found-why b { color: var(--sg-text-1); font-weight: 600; }
/* radio chips: where a save is from, and where it goes */
.plat-from, .plat-dest, .plat-how { margin: 0; padding: 0; border: 0; min-width: 0; display: grid; gap: var(--sg-space-2); }
.plat-from > legend, .plat-dest > legend, .plat-how > legend { float: left; width: 100%; padding: 0; margin: 0 0 var(--sg-space-2); font-size: var(--sg-text-small); font-weight: 600; color: var(--sg-text-1); }
.plat-from > legend + *, .plat-dest > legend + *, .plat-how > legend + * { clear: both; }
.plat-picks { display: flex; flex-wrap: wrap; gap: var(--sg-space-2); }
.plat-pick {
  position: relative; display: inline-flex; align-items: center; gap: .55rem; min-height: var(--sg-control-h); padding-block: 0; padding-inline: .8rem 1rem;
  border-radius: var(--sg-radius-pill); border: 1px solid var(--sg-line-control); color: var(--sg-text-2); cursor: pointer;
  transition: border-color var(--sg-dur-fast) var(--sg-ease-out), background-color var(--sg-dur-fast) var(--sg-ease-out);
}
.plat-pick input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.plat-pick::before {
  content: ""; flex: none; width: 1rem; height: 1rem; border-radius: 50%; border: 2px solid var(--sg-text-3); background: transparent;
  transition: border-color var(--sg-dur-fast) var(--sg-ease-out), background-color var(--sg-dur-fast) var(--sg-ease-out);
}
.plat-pick .plat-tag { min-height: 0; padding: 0; border: 0; background: none; color: inherit; font-size: var(--sg-text-small); }
.plat-pick:has(input:checked) { border-color: var(--sg-coral); background: rgb(253 93 98 / .1); color: var(--sg-text-1); }
.plat-pick:has(input:checked)::before { border-color: var(--sg-coral); background: radial-gradient(circle, var(--sg-coral) 0 3px, transparent 3.5px); }
.plat-pick:has(input:focus-visible) { outline: 2px solid var(--sg-focus); outline-offset: 3px; }
.plat-pick:has(input:disabled) { opacity: .42; cursor: not-allowed; }
@media (hover: hover) and (pointer: fine) { .plat-pick:hover:not(:has(input:checked)) { border-color: rgb(255 255 255 / .62); color: var(--sg-text-1); } }
/* how a save is written back: radio rows, the title with a line of help under it */
.opt-row {
  display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: .1rem .7rem; padding: .6rem .7rem; border-radius: var(--sg-radius-sm);
  border: 1px solid transparent; cursor: pointer; transition: background-color var(--sg-dur-fast), border-color var(--sg-dur-fast);
}
.opt-row input { width: 1.1rem; height: 1.1rem; margin: .2rem 0 0; accent-color: var(--sg-coral); cursor: pointer; }
.opt-text { display: grid; gap: .1rem; }
.opt-text > span { font-weight: 600; color: var(--sg-text-1); }
.opt-text small { font-size: var(--sg-text-small); color: var(--sg-text-2); }
.opt-row:has(input:checked) { border-color: rgb(253 93 98 / .5); background: rgb(253 93 98 / .07); }
.opt-row:has(input:disabled) { opacity: .42; cursor: not-allowed; }
@media (hover: hover) and (pointer: fine) { .opt-row:hover:not(:has(input:checked)) { background: var(--sg-surface-2); } }
/* Missed events (Completion tab): the "read" / "delivered" value is a pair of opt-rows, stacked full width under the toggle */
.me-modes { flex-basis: 100%; display: grid; gap: var(--sg-space-2); margin: .2rem 0 0; padding: 0; border: 0; }
/* the key file */
.keys-in { display: grid; gap: var(--sg-space-3); }
.keys-body { display: grid; gap: var(--sg-space-3); max-width: var(--sg-measure); }
.keys-body > * { margin: 0; }
.keys-body > p:not(.note) { color: var(--sg-text-2); font-size: var(--sg-text-small); }
.keys-ready { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sg-space-2) var(--sg-space-3); border-radius: var(--sg-radius-sm); }
.keys-why { font-weight: 600; }
/* under the picker: the way from an Xbox to a PS5, and the key file */
.plat-guides { display: grid; gap: var(--sg-space-1); border-top: 1px solid var(--sg-line-1); padding-top: var(--sg-space-3); }
.plat-more > summary {
  display: flex; align-items: center; gap: .6rem; min-height: var(--sg-control-h); padding-block: .3rem; cursor: pointer; list-style: none;
  border-radius: var(--sg-radius-sm); font-weight: 600; color: var(--sg-text-2);
}
.pm-text { flex: 1 1 auto; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .75rem; }
.plat-more > summary::-webkit-details-marker { display: none; }
.plat-more > summary::before {
  content: ""; flex: none; width: .5rem; height: .5rem; margin-inline: .15rem .2rem; border-inline-end: 2px solid var(--sg-text-accent); border-bottom: 2px solid var(--sg-text-accent);
  transform: rotate(-45deg); transition: transform var(--sg-dur-base) var(--sg-ease-out);
}
[dir="rtl"] .plat-more > summary::before { transform: rotate(45deg); }
.plat-more[open] > summary::before { transform: rotate(45deg); }
.plat-more > summary .pill { min-height: 1.75rem; }
@media (hover: hover) and (pointer: fine) { .plat-more > summary:hover { color: var(--sg-text-1); } }
.plat-more-body { display: grid; gap: var(--sg-space-4); padding: var(--sg-space-2) 0 var(--sg-space-4); padding-inline-start: 1.35rem; }
.plat-more-body > * { margin: 0; }
/* the way from another platform to a PS5: done steps carry a check, the one to do now is lit */
.journey li.done::before { content: "✓" / ""; color: var(--sg-sign-green-text); border-color: rgb(53 194 109 / .55); }
.journey li.now::before { border-color: var(--sg-coral); box-shadow: 0 0 0 1px rgb(253 93 98 / .3), 0 0 14px -3px rgb(250 40 137 / .7); color: var(--sg-text-1); }
.journey li.done strong { color: var(--sg-text-2); }
.journey li.done .path, .journey.compact .path { display: none; }   /* a step done keeps its title only, so the one to do now stands out */
.journey.compact { gap: var(--sg-space-2); }
.journey .path + .path { margin-top: .3rem; }
.journey a .icon { width: 1rem; height: 1rem; margin-inline-start: .25rem; }
.plat-journey { margin: calc(-1 * var(--sg-space-2)) 0 var(--sg-space-5); }
/* the Edit step for a save file: where it is from, then where it goes */
.lf-head { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; }
.lf-head > h2 { margin-inline-end: auto; }
.plat-out { display: grid; gap: var(--sg-space-4); min-width: 0; }
.plat-out > * { margin: 0; min-width: 0; }
.plat-out .callout > div + div { margin-top: .35rem; }
.plat-risk { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .6rem; color: var(--sg-text-2); font-size: var(--sg-text-small); }
.plat-base { display: grid; gap: var(--sg-space-3); }
.plat-base > * { margin: 0; }
.plat-base-file { border-radius: var(--sg-radius-sm); }
.plat-slot { display: grid; gap: .3rem; max-width: 26rem; font-size: var(--sg-text-small); font-weight: 600; color: var(--sg-text-1); }
.plat-slot select {
  appearance: none; -webkit-appearance: none; width: 100%; min-height: var(--sg-control-h); padding: 0 2.4rem 0 .9rem; border-radius: var(--sg-radius-md);
  border: 1px solid var(--sg-input-border); background-color: var(--sg-input-bg); color: var(--sg-text-1); font: 600 var(--sg-text-body)/1.2 var(--sg-font-text);
  text-overflow: ellipsis; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--sg-text-2) 50%), linear-gradient(135deg, var(--sg-text-2) 50%, transparent 50%);
  background-position: calc(100% - 18px) 52%, calc(100% - 12px) 52%; background-size: 6px 6px; background-repeat: no-repeat;
  transition: border-color var(--sg-dur-fast) var(--sg-ease-out), box-shadow var(--sg-dur-base) var(--sg-ease-out);
}
.plat-slot select option { background: var(--sg-surface-2); color: var(--sg-text-1); }
@media (hover: hover) and (pointer: fine) { .plat-slot select:hover:not(:disabled) { border-color: var(--sg-input-border-hover); } }
.plat-slot select:focus-visible { outline: none; border-color: var(--sg-input-border-focus); box-shadow: 0 0 0 3px rgb(255 104 155 / .3); }
.plat-slot select:disabled { opacity: .42; cursor: not-allowed; }
[dir="rtl"] .plat-slot select { padding: 0 .9rem 0 2.4rem; background-position: 12px 52%, 18px 52%; }
.plat-steps { gap: var(--sg-space-3); }
.plat-done .link { font-size: inherit; }
/* an encrypted PS5 save (jailbroken PS5 or no Data Transfer): the way in on the picker, then its export on the Edit step */
.enc-pick .fp-text > p, .enc-pick .fp-text > ol { margin: 0; }
.enc-pick .fp-text > ol { margin-block: .4rem .2rem; }
.enc-pick .callout.signin-first { margin-top: .3rem; }
.enc-steps .path { overflow-wrap: anywhere; }
.enc-out { display: grid; gap: var(--sg-space-3); padding: var(--sg-space-4); border-radius: var(--sg-radius-md); border: 1px solid var(--sg-line-control); }
.enc-out > *, .enc-done > * { margin: 0; min-width: 0; }
.enc-out h3 { margin: 0 auto 0 0; font-size: var(--sg-text-body); font-weight: 600; }
[dir="rtl"] .enc-out h3 { margin: 0 0 0 auto; }
.enc-acct { max-width: 20rem; }
.enc-acct input { width: 100%; font-family: var(--sg-font-mono); letter-spacing: .04em; }
.enc-done { display: grid; gap: var(--sg-space-3); }
/* a save of the PS5 download for another platform: under "Open another save", the same panel as a file's */
.other-save + .other-save { margin-top: calc(-1 * var(--sg-space-5)); }
.other-save > .plat-panel { margin: var(--sg-space-2) 0 0; }
@media (max-width: 600px) {
  .found { padding: var(--sg-space-3); }
  .plat-more-body { padding-inline-start: 0; }
  .plat-picks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plat-pick { padding-inline: .7rem .8rem; gap: .5rem; min-width: 0; }
  .plat-pick .plat-tag .icon { display: none; }    /* the ring and the name are enough on a phone */
  .plat-pick .plat-tag { white-space: normal; overflow-wrap: anywhere; }
  .lf-head > h2 { flex-basis: 100%; }
  .plat-slot { max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
  .plat-pick, .plat-pick::before, .opt-row, .plat-more > summary::before { transition: none; }
}

/* ================================================================ Support Save Garage (1.37.0): the heart pill beside Help, the
   Support dialog (a real modal <dialog>: the page under it is inert, Tab goes round its controls, Escape and a click
   outside it close it), the tip choices, the quiet card on the Done screen and the footer link. Nothing here glows: the
   heart is flamingo text colour, the choices are secondary pills, and the only sunset fill is the question's one primary. */
#support-pill .icon, .support-link .icon { color: var(--sg-text-accent); }
.foot .legal .support-link { display: inline-flex; align-items: center; gap: .3rem; margin-inline-start: .6rem; color: inherit; font-size: inherit; text-underline-offset: 2px; }
.foot .legal .support-link .icon { width: .95rem; height: .95rem; }
.dialog {
  width: min(34rem, 100% - 2 * var(--sg-space-4)); max-width: none; max-height: calc(100% - 2 * var(--sg-space-4)); margin: auto; padding: 0; overflow: auto;
  overscroll-behavior: contain; border: 1px solid var(--sg-line-2); border-radius: var(--sg-radius-lg); background: var(--sg-surface-1); color: var(--sg-text-1);
  box-shadow: var(--sg-elev-3);
}
.dialog::backdrop { background: rgb(9 8 27 / .62); }
.dialog[open] { animation: sg-rise var(--sg-dur-medium) var(--sg-ease-out); }
.dialog[open]::backdrop { animation: sg-fade var(--sg-dur-medium) var(--sg-ease-out); }
.dialog-box { display: grid; gap: var(--sg-space-4); padding: var(--sg-space-5); }   /* fills the dialog: a click that lands on the dialog itself is outside the box */
.dialog-box > * { margin: 0; min-width: 0; }
.dialog h2 { font-size: calc(var(--sg-display-scale) * var(--sg-text-h3)); }
.dialog h2:focus { outline: none; }                /* where the keyboard starts in the panel, as main is: no ring on a heading */
.dialog-actions { display: flex; flex-wrap: wrap; gap: var(--sg-space-3); align-items: center; }
.support-head { display: flex; align-items: center; gap: var(--sg-space-4); }
.support-head .porthole { width: 2.75rem; height: 2.75rem; border-width: 1.5px; color: var(--sg-text-accent); }
.support-head .porthole .icon { width: 1.25rem; height: 1.25rem; }
.support-lead { color: var(--sg-text-2); max-width: var(--sg-measure); }
.support-done { display: flex; align-items: center; gap: .5rem; color: var(--sg-text-2); font-size: var(--sg-text-small); font-weight: 600; }
.support-done .icon { width: 1.1rem; height: 1.1rem; color: var(--sg-cash); }
.tip-pick { display: grid; gap: var(--sg-space-2); }
.tip-pick > * { margin: 0; min-width: 0; }
.tip-label { font-size: var(--sg-text-label); font-weight: 600; letter-spacing: var(--sg-tracking-label); color: var(--sg-text-2); }
.tips { display: flex; flex-wrap: wrap; gap: var(--sg-space-2); }
.tip { min-width: 3.5rem; }
.tip [data-no-i18n] { font-variant-numeric: tabular-nums; }
.support-card { display: grid; gap: var(--sg-space-4); }
.support-card .support-head { align-items: flex-start; }
.support-text { display: grid; gap: .3rem; min-width: 0; }
@media (max-width: 600px) {
  #help-pill { inset-inline-end: calc(2rem + var(--sg-space-2)); }   /* Help beside the heart, in the corner by the wordmark */
  #support-pill { width: 2rem; padding: 0; justify-content: center; }   /* the heart alone; its name stays for screen readers */
  #support-pill::after { inset: -6px; }
  #support-pill .mast-pill-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
  .dialog-box { padding: var(--sg-space-4); }
  .dialog-actions > .btn { flex: 1 1 100%; }
  .support-head { gap: var(--sg-space-3); }
}
/* Clickable vehicle/weapon pictures and enlarged art preview lightbox */
.pic-btn {
  padding: 0; border: 0; background: transparent; cursor: zoom-in; text-align: inherit; color: inherit; font: inherit;
}
.pic-btn:focus-visible { outline: 2px solid var(--sg-focus); outline-offset: 2px; }
.pic-btn img { transition: transform var(--sg-dur-fast) var(--sg-ease-out); }
@media (hover: hover) and (pointer: fine) {
  .pic-btn:hover img { transform: scale(1.045); }
}
.lightbox { width: min(38rem, 100% - 2 * var(--sg-space-4)); }
.lightbox-box { gap: var(--sg-space-3); }
.lightbox-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sg-space-3); }
.lightbox-txt { display: grid; gap: .15rem; min-width: 0; }
.lightbox-sub { margin: 0; color: var(--sg-text-2); font-size: var(--sg-text-small); }
.lightbox-stage {
  display: grid; place-items: center; border-radius: var(--sg-radius-md); overflow: hidden;
  border: 1px solid var(--sg-line-2); background: var(--sg-surface-sunken);
}
.lightbox--vehicle .lightbox-stage { aspect-ratio: 16 / 9; }
.lightbox--vehicle .lightbox-stage img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lightbox--weapon .lightbox-stage {
  min-height: 12.5rem; padding: var(--sg-space-6) var(--sg-space-5);
  background: radial-gradient(65% 60% at 50% 52%, rgb(255 255 255 / .12), transparent 76%), var(--sg-surface-sunken);
}
.lightbox--weapon .lightbox-stage img {
  width: min(100%, 24rem); height: auto; max-height: 11rem; object-fit: contain;
  filter: drop-shadow(0 8px 18px rgb(3 2 14 / .85));
}
@media (prefers-reduced-motion: reduce) {
  .dialog[open], .dialog[open]::backdrop { animation: none; }
  .weapons li, .weapons .pic img, .pic-zoom, .ga-card, .ga-card-pic img, .pic-btn img { transition: none; transform: none; }
  .weapons li:not(.more):hover, .weapons.guns li:hover, .ga-card:hover, .weapons li:hover .pic img, .ga-card:hover .ga-card-pic img, .pic-btn:hover img { transform: none; }
}

/* ================================================================ the update prompt (1.49.0): the masthead's version pill
   (lit with a sunset dot while a new version waits) and a modal <dialog> like Support's: the version, its release notes
   in a sunken, scrolling panel, the progress of the download and its checks, and the choices. Only Update and restart
   is a sunset fill; Skip is quiet. */
#update-pill .mast-pill-label { font-variant-numeric: tabular-nums; }
#update-pill.is-new { border-color: rgb(253 93 98 / .7); }
#update-pill.is-new .icon { color: var(--sg-text-accent); }
.upd-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--sg-coral); box-shadow: 0 0 8px var(--sg-vice-magenta); flex: none; }
.upd-dlg { width: min(40rem, 100% - 2 * var(--sg-space-4)); }
.upd-dlg .dialog-box > div[hidden] { display: none; }
.upd-head { display: flex; align-items: center; gap: var(--sg-space-4); }
.upd-head .porthole { width: 2.75rem; height: 2.75rem; border-width: 1.5px; color: var(--sg-text-2); }
.upd-head .porthole .icon { width: 1.25rem; height: 1.25rem; }
.upd-head.is-new .porthole { border-color: var(--sg-coral); color: var(--sg-text-accent); box-shadow: 0 0 0 1px rgb(253 93 98 / .25), 0 0 16px -4px rgb(250 40 137 / .8); }
.upd-head.is-ok .porthole { border-color: var(--sg-ok); color: var(--sg-ok); }
.upd-dlg[data-mode="failed"] .upd-head .porthole, .upd-dlg[data-mode="check_failed"] .upd-head .porthole { border-color: var(--sg-bad); color: var(--sg-sign-red-text); box-shadow: none; }
.upd-title { display: grid; gap: .2rem; min-width: 0; }
.upd-title h2 { overflow-wrap: anywhere; }
.upd-sub { color: var(--sg-text-2); font-size: var(--sg-text-small); }
.upd-body { display: grid; gap: var(--sg-space-3); min-width: 0; }
.upd-body > * { margin: 0; min-width: 0; }
.upd-lead { color: var(--sg-text-1); max-width: var(--sg-measure); overflow-wrap: anywhere; }
.upd-notes {
  max-height: min(42vh, 22rem); overflow: auto; overscroll-behavior: contain; padding: var(--sg-space-3) var(--sg-space-4);
  border: 1px solid var(--sg-line-1); border-radius: var(--sg-radius-md); background: var(--sg-surface-sunken);
  color: var(--sg-text-2); font-size: var(--sg-text-small); line-height: 1.5; overflow-wrap: anywhere;
  scrollbar-width: thin; scrollbar-color: var(--sg-night-700) transparent;
}
.upd-notes:focus-visible { outline: 2px solid var(--sg-focus); outline-offset: 2px; }
.upd-notes > div > :first-child { margin-top: 0; }
.upd-notes > div > :last-child { margin-bottom: 0; }
.upd-notes h3 {
  margin: var(--sg-space-4) 0 var(--sg-space-2); font: 600 var(--sg-text-label)/1.3 var(--sg-font-text); letter-spacing: var(--sg-tracking-label);
  text-transform: uppercase; color: var(--sg-text-1); text-wrap: balance;
}
.upd-notes p { margin: 0 0 var(--sg-space-2); }
.upd-notes ul { margin: 0 0 var(--sg-space-2); padding-inline-start: 1.15rem; display: grid; gap: .35rem; }
.upd-notes ul ul { margin: .35rem 0 0; }
.upd-notes li::marker { color: var(--sg-text-3); }
.upd-notes strong { color: var(--sg-text-1); font-weight: 600; }
.upd-notes code { font-family: var(--sg-font-mono); font-size: .92em; padding: .05rem .3rem; border-radius: var(--sg-radius-xs); background: rgb(255 255 255 / .06); }
.upd-links { display: flex; flex-wrap: wrap; gap: var(--sg-space-2) var(--sg-space-4); font-size: var(--sg-text-small); }
.upd-all { display: inline-flex; align-items: center; gap: .35rem; }
.upd-all .icon { width: .95rem; height: .95rem; }
/* what to do stays in view while the notes scroll past (a short window, a phone) */
.upd-now {
  position: sticky; bottom: 0; z-index: 1; display: grid; gap: var(--sg-space-3);
  margin: calc(-1 * var(--sg-space-3)) calc(-1 * var(--sg-space-5)) 0; padding: var(--sg-space-3) var(--sg-space-5);
  background: linear-gradient(to bottom, rgb(26 23 52 / 0), var(--sg-surface-1) var(--sg-space-3));
}
.upd-now > * { margin: 0; min-width: 0; }
.upd-state:empty { display: none; }
.upd-state > * + * { margin-top: var(--sg-space-2); }
.upd-progress { display: grid; gap: var(--sg-space-2); }
.upd-step { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sg-space-3); color: var(--sg-text-1); font-size: var(--sg-text-small); font-weight: 600; }
.upd-step .pct { font-variant-numeric: tabular-nums; color: var(--sg-text-2); }
.upd-ok { display: flex; align-items: center; gap: .5rem; color: var(--sg-text-1); font-size: var(--sg-text-small); font-weight: 600; }
.upd-ok .icon { width: 1.1rem; height: 1.1rem; color: var(--sg-ok); flex: none; }
.upd-why { color: var(--sg-text-2); max-width: var(--sg-measure); }
.upd-dlg .dialog-actions .upd-skip { margin-inline-start: auto; }
.upd-foot { display: grid; gap: var(--sg-space-2); padding-top: var(--sg-space-3); border-top: 1px solid var(--sg-line-1); }
.upd-foot .toggle { min-height: 2rem; }
.upd-safe { display: flex; align-items: flex-start; gap: .5rem; color: var(--sg-text-3); font-size: var(--sg-text-small); max-width: var(--sg-measure); }
.upd-safe .icon { width: 1rem; height: 1rem; flex: none; margin-top: .15rem; }
[dir="rtl"] .upd-step .pct { direction: ltr; unicode-bidi: isolate; }
@media (max-width: 600px) {
  /* the version pill flows with the language picker; the corner keeps Help and the heart */
  #update-pill { position: relative; top: auto; inset-inline-end: auto; }
  #update-pill:not(.is-new) { width: auto; padding-inline: .6rem .75rem; }
  .upd-head { gap: var(--sg-space-3); }
  .upd-notes { max-height: 30vh; padding: var(--sg-space-3); }
  .upd-now { margin-inline: calc(-1 * var(--sg-space-4)); padding-inline: var(--sg-space-4); }
  .upd-dlg .dialog-actions .upd-skip { margin-inline-start: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .upd-dot { box-shadow: none; }
}
