/* TB99 — archive of pocket toys. Tokens and rules: DESIGN_DECISIONS.md */
:root {
  color-scheme: light;
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  --sar: env(safe-area-inset-right, 0px);
  --paper: #efe9dd;
  --paper-2: #e5ddcd;
  --paper-3: #f7f3ea;
  --ink: #151d1c;
  --ink-2: #4b5452;
  --ink-3: #6d7470;
  --rule: #cbc1ae;
  --stamp: #c4432c;
  --glacier: #2d8c9a;
  --toy: var(--glacier);
  --display: "TB99 Display", "Arial Narrow", Arial, sans-serif;
  --text: "TB99 Text", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "TB99 Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --gutter: clamp(16px, 4.2vw, 64px);
  --ease-out: cubic-bezier(.2, .7, .2, 1);
  /* legacy aliases used by older rules */
  --petrol: var(--glacier);
  --coral: #d9583c;
  --line: var(--rule);
  --muted: var(--ink-3);
  font-family: var(--text);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--paper); }
body { margin: 0; min-width: 320px; background: var(--paper); color: var(--ink); font: 400 16px/1.55 var(--text); }
button, select, input { font: inherit; }
button { color: inherit; }
img { max-width: 100%; }
button:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible { outline: 3px solid var(--toy); outline-offset: 3px; }
h1, h2, h3, p, figure, dl, dd, ol { margin: 0; }

.kicker { margin: 0 0 14px; color: var(--ink-2); font: 500 12px/1.3 var(--mono); font-stretch: 92%; letter-spacing: .02em; }

/* ---------- Header ---------- */
.catalogue-shell { min-height: 100svh; padding: 0 var(--gutter); overflow-x: clip; background: linear-gradient(180deg, var(--paper-3) 0, var(--paper) 520px); }
.site-header { height: 78px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 24px; border-bottom: 1px solid var(--rule); }
.wordmark { display: block; width: 104px; color: var(--ink); --wm-accent: var(--ink); transition: color .2s ease; }
.wordmark:hover { --wm-accent: var(--toy); }
.wordmark-svg { display: block; width: 100%; height: auto; }
.header-note { color: var(--ink-2); font: 500 12px/1.3 var(--mono); font-stretch: 90%; }
.text-button { min-height: 44px; padding: 0 16px; border: 1px solid var(--ink); border-radius: 999px; background: transparent; cursor: pointer; font: 650 14px/1 var(--display); font-stretch: 112%; }
.text-button:hover { background: var(--ink); color: var(--paper); }

/* Offline state is an inspection stamp: it certifies something real. */
.offline-pill { position: relative; display: inline-flex; align-items: center; gap: 9px; margin: 16px 0 0; padding: 7px 12px 7px 10px; border: 1.5px solid currentColor; border-radius: 4px; color: var(--ink-2); background: transparent; font: 600 11px/1.2 var(--mono); font-stretch: 88%; letter-spacing: .04em; overflow: hidden; transform: rotate(-1.2deg); }
.offline-pill[hidden] { display: none; }
.offline-pill[data-status="ready"] { color: #2e6e4a; }
.offline-pill[data-status="incomplete"], .offline-pill[data-status="unsupported"], .offline-pill[data-status="blocked"] { color: var(--stamp); }
.offline-pill[data-status="update"] { color: var(--glacier); }
.offline-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.offline-bar { position: absolute; left: 0; bottom: 0; height: 2px; width: calc(var(--progress, 0) * 100%); background: currentColor; transition: width .3s ease; }
.offline-pill[data-status="ready"] .offline-bar, .offline-pill[data-status="update"] .offline-bar, .offline-pill[data-status="blocked"] .offline-bar, .offline-pill[data-status="unsupported"] .offline-bar { display: none; }

/* ---------- Hero: one object, photographed ---------- */
.hero { position: relative; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center; gap: clamp(20px, 3vw, 48px); padding: clamp(28px, 4vw, 56px) 0 clamp(24px, 3vw, 40px); }
.hero-copy { position: relative; z-index: 2; }
.hero h1 { max-width: 11ch; font: 820 clamp(44px, 6.4vw, 96px)/.96 var(--display); font-stretch: 118%; letter-spacing: -.035em; text-wrap: balance; }
.hero-description { max-width: 34ch; margin: 22px 0 26px; color: var(--ink-2); font-size: clamp(16px, 1.25vw, 18px); line-height: 1.55; }
.primary-button { min-height: 52px; display: inline-flex; align-items: center; justify-content: space-between; gap: 22px; padding: 0 20px 0 22px; border: 0; border-radius: 999px; background: var(--ink); color: var(--paper-3); cursor: pointer; font: 700 16px/1 var(--display); font-stretch: 112%; box-shadow: 0 2px 0 rgba(0,0,0,.25), inset 0 1px 0 rgba(255,255,255,.12); transition: background .18s ease, transform .08s ease, box-shadow .08s ease; }
.primary-button:hover { background: var(--toy); }
.primary-button:active { transform: translateY(2px); box-shadow: 0 0 0 rgba(0,0,0,.25); }
.button-arrow { font-family: var(--text); font-size: 20px; }
.serial-plate { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 430px; margin-top: 30px; border: 1px solid var(--ink); border-radius: 6px; background: var(--paper-3); font: 500 12px/1.3 var(--mono); font-stretch: 88%; box-shadow: 0 1px 0 rgba(255,255,255,.7) inset; }
.serial-plate div { padding: 9px 12px; border-top: 1px solid var(--rule); }
.serial-plate div:nth-child(-n+2) { border-top: 0; }
.serial-plate div:nth-child(odd) { border-right: 1px solid var(--rule); }
.serial-plate div:last-child { grid-column: 1 / -1; border-right: 0; }
.serial-plate dt { color: var(--ink-3); font-size: 11px; }
.serial-plate dd { color: var(--ink); font-weight: 650; }
.hero-figure { position: relative; margin-right: calc(var(--gutter) * -1); }
.hero-render { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 1300; object-fit: cover; border-radius: 18px 0 0 18px; background: #ddd2c1; }
.figure-note { position: absolute; left: 18px; bottom: 16px; padding: 5px 9px; border-radius: 4px; background: rgba(247,243,234,.82); color: var(--ink-2); font: 500 11px/1.3 var(--mono); font-stretch: 85%; }

/* ---------- Details: close-ups with material notes ---------- */
.details { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule); }
.detail { padding: 18px 18px 22px 0; }
.detail + .detail { padding-left: 18px; border-left: 1px solid var(--rule); }
.detail img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; background: #d9cfbe; }
.detail figcaption { margin-top: 12px; color: var(--ink-2); font-size: 15px; line-height: 1.45; }
.detail figcaption b { color: var(--ink); font: 760 15px/1 var(--display); font-stretch: 112%; }

/* ---------- Collection: an editorial grid with visible rules ---------- */
.collection-section { padding: clamp(40px, 5vw, 72px) 0 clamp(40px, 5vw, 64px); }
.section-heading { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); grid-template-rows: auto auto; column-gap: 48px; align-items: end; margin-bottom: 28px; }
.section-heading .kicker { grid-column: 1 / -1; }
.section-heading h2 { font: 800 clamp(32px, 4vw, 58px)/.95 var(--display); font-stretch: 116%; letter-spacing: -.03em; text-wrap: balance; }
.section-note { color: var(--ink-2); font-size: 16px; }
.toy-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); border-top: 1px solid var(--ink); border-left: 1px solid var(--rule); }
.toy { position: relative; min-width: 0; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); background: transparent; transition: background .2s ease; }
.toy::before { content: ""; position: absolute; left: 0; top: -1px; width: 56px; height: 3px; background: var(--toy); }
.toy-main { width: 100%; height: 100%; display: grid; gap: 18px; padding: 20px; border: 0; background: none; text-align: left; cursor: pointer; color: inherit; }
.toy-photo { position: relative; display: block; overflow: hidden; border-radius: 12px; background: #dcd2c1; }
.toy-photo img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 52%; transition: transform .45s var(--ease-out); }
.toy-body { position: relative; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.toy-number { position: absolute; top: -6px; right: 0; color: var(--toy); font: 800 44px/1 var(--display); font-stretch: 125%; opacity: .9; }
.toy-model { color: var(--ink-3); font: 500 12px/1.3 var(--mono); font-stretch: 88%; }
.toy-name { padding-right: 70px; font: 800 clamp(24px, 2.2vw, 34px)/1 var(--display); font-stretch: 116%; letter-spacing: -.02em; }
.toy-line { max-width: 40ch; color: var(--ink-2); font-size: 15px; line-height: 1.45; }
.toy-spec { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 6px; color: var(--ink); font: 500 12px/1.4 var(--mono); font-stretch: 88%; }
.toy-spec i { display: block; color: var(--ink-3); font-style: normal; font-size: 11px; }
.toy-power { align-self: flex-start; margin-top: 10px; display: inline-flex; gap: 10px; align-items: center; padding: 9px 14px; border: 1px solid var(--ink); border-radius: 999px; font: 700 14px/1 var(--display); font-stretch: 112%; transition: background .15s ease, color .15s ease, transform .08s ease; }
.toy-main:hover .toy-power { background: var(--ink); color: var(--paper-3); }
.toy-main:active .toy-power, .toy-main:active .toy-photo img { transform: translateY(2px); }
@media (hover: hover) and (pointer: fine) {
  .toy-main:hover .toy-photo img { transform: translateY(-4px) scale(1.02); }
}
.favorite-button { position: absolute; top: 26px; right: 26px; z-index: 2; width: 44px; height: 44px; border: 1px solid rgba(21,29,28,.2); border-radius: 50%; background: rgba(247,243,234,.85); color: var(--ink-2); cursor: pointer; font-size: 18px; }
.favorite-button.is-favorite { color: var(--stamp); border-color: currentColor; }
.card-wear { display: block; }
.wear-meter, .service-meter { position: relative; display: inline-block; width: 34px; height: 5px; margin-right: 6px; vertical-align: middle; overflow: hidden; border-radius: 4px; background: rgba(21,29,28,.12); }
.wear-meter::after, .service-meter::after { content: ""; position: absolute; inset: 0 auto 0 0; width: calc(max(.06, var(--wear)) * 100%); border-radius: inherit; background: linear-gradient(90deg, #4f9a6a, #d2a64a 55%, var(--stamp)); }

/* Five different compositions on one 12-column grid. */
.toy-feature { grid-column: span 7; grid-row: span 2; }
.toy-feature .toy-photo { aspect-ratio: 4 / 3; }
.toy-feature .toy-name { font-size: clamp(30px, 3.2vw, 48px); }
.toy-feature .toy-number { font-size: 72px; }
.toy-tall { grid-column: span 5; grid-row: span 2; }
.toy-tall .toy-photo { aspect-ratio: 5 / 4; }
.toy-wide { grid-column: span 8; }
.toy-wide .toy-main, .toy-strip .toy-main { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; }
.toy-wide .toy-photo { aspect-ratio: 4 / 3; }
.toy-compact { grid-column: span 4; }
.toy-compact .toy-photo { aspect-ratio: 3 / 2; }
.toy-strip { grid-column: span 12; }
.toy-strip .toy-main { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.toy-strip .toy-photo { order: 2; aspect-ratio: 16 / 9; }
.toy-strip .toy-photo img { object-position: 50% 38%; }

/* ---------- Instructions sheet ---------- */
.help-section { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(24px, 4vw, 64px); align-items: start; padding: clamp(40px, 5vw, 64px) 0; border-top: 1px solid var(--ink); }
.family img { display: block; width: 100%; height: auto; border-radius: 12px; background: #ddd2c1; }
.help-sheet h2 { margin-bottom: 22px; font: 800 clamp(30px, 3.4vw, 50px)/.95 var(--display); font-stretch: 116%; letter-spacing: -.03em; }
.help-list { list-style: none; padding: 0; counter-reset: step; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--rule); }
.help-list li { counter-increment: step; position: relative; padding: 18px 20px 20px 46px; border-bottom: 1px dashed var(--rule); color: var(--ink-2); font-size: 15px; line-height: 1.5; }
.help-list li:nth-child(odd) { border-right: 1px dashed var(--rule); }
.help-list li::before { content: counter(step, decimal-leading-zero); position: absolute; left: 0; top: 19px; color: var(--toy); font: 700 13px/1 var(--mono); }
.help-list b { color: var(--ink); font: 760 16px/1.2 var(--display); font-stretch: 110%; }
.help-list i { font-style: normal; font-family: var(--mono); font-size: 13px; color: var(--ink); }

/* ---------- Footer ---------- */
.site-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding: 22px 0 calc(28px + var(--sab)); border-top: 1px solid var(--ink); }
.credit { color: var(--ink); font-size: 16px; }
.credit a, .footer-plate a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.credit a:hover, .footer-plate a:hover { color: var(--toy); }
.footer-plate { color: var(--ink-2); font: 500 12px/1.4 var(--mono); font-stretch: 88%; }

/* Catalogue -> toy transition */
.lift-ghost { position: fixed; z-index: 80; pointer-events: none; border-radius: 12px; will-change: transform, opacity; }

/* ---------- Dialogs (settings, service) ---------- */
.settings-dialog { width: min(460px, calc(100vw - 28px)); max-width: none; border: 1px solid var(--ink); border-radius: 10px; padding: 0; background: var(--paper-3); color: var(--ink); box-shadow: 0 24px 70px rgba(21,29,28,.22); }
.settings-dialog::backdrop { background: rgba(21,29,28,.32); }
.settings-panel { padding: 24px; }
.settings-heading { display: flex; justify-content: space-between; align-items: start; margin-bottom: 14px; }
.settings-heading .eyebrow { margin: 0 0 8px; color: var(--ink-3); font: 500 12px/1.3 var(--mono); }
.settings-heading h2 { margin: 0 0 6px; font: 800 30px/1 var(--display); font-stretch: 114%; letter-spacing: -.02em; }
.close-button { width: 44px; height: 44px; flex: none; border: 1px solid var(--ink); border-radius: 50%; background: transparent; font-size: 22px; cursor: pointer; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 13px 0; border-top: 1px solid var(--rule); }
.setting-row b { display: block; font: 700 15px/1.2 var(--display); font-stretch: 108%; }
.setting-row small { display: block; margin-top: 3px; color: var(--ink-3); font-size: 13px; line-height: 1.35; }
.setting-row input[type="checkbox"] { width: 22px; height: 22px; accent-color: var(--glacier); }
.setting-select select { max-width: 140px; min-height: 40px; border: 1px solid var(--ink); border-radius: 6px; background: #fffdf8; padding: 6px 8px; font: 500 13px var(--mono); }
.setting-range input { width: 140px; accent-color: var(--glacier); }
.settings-save { width: 100%; margin-top: 16px; }
.setting-data { padding: 14px 0 6px; border-top: 1px solid var(--rule); }
.setting-data .eyebrow { margin: 0 0 6px; color: var(--ink-3); font: 500 12px/1.3 var(--mono); }
.setting-note { margin: 0 0 10px; color: var(--ink-2); font-size: 14px; line-height: 1.5; }
.setting-data-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.secondary-button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 0 16px; border: 1px solid var(--ink); border-radius: 999px; background: transparent; color: var(--ink); cursor: pointer; font: 650 14px/1.1 var(--display); font-stretch: 108%; }
.secondary-button:hover:not(:disabled) { background: var(--ink); color: var(--paper-3); }
.secondary-button:disabled { opacity: .4; cursor: default; }
.secondary-button.danger { border-color: var(--stamp); color: var(--stamp); }
.secondary-button.danger:hover:not(:disabled) { background: var(--stamp); color: #fff; }
.file-button { position: relative; }
.service-list { list-style: none; margin: 0 0 12px; padding: 0; }
.service-row { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--rule); }
.service-row .secondary-button { grid-column: 1 / -1; justify-self: start; text-align: left; }
.service-name b { display: block; font: 700 15px/1.2 var(--display); }
.service-name small { color: var(--ink-3); font-size: 13px; }
.service-meter { width: 70px; height: 5px; }

/* ---------- Play stage ---------- */
.is-playing { overflow: hidden; overscroll-behavior: none; background: var(--paper); }
.play-stage { position: fixed; z-index: 50; inset: 0; width: 100%; height: 100vh; height: 100dvh; overflow: hidden; isolation: isolate; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; background: radial-gradient(ellipse 120% 70% at 50% 0%, #fbf8f1 0%, #ece6da 58%, #ddd5c6 100%); animation: stage-in .42s var(--ease-out) both; }
@keyframes stage-in { from { opacity: 0; } to { opacity: 1; } }
.play-stage[data-plastic="smoke"] { background: radial-gradient(ellipse 120% 70% at 50% 0%, #f1ede5 0%, #e1dbcf 58%, #cfc7b8 100%); }
.stage-floor { position: absolute; z-index: 0; left: 50%; top: calc(var(--shell-bottom, 80vh) - 18px); width: calc(var(--shell-scale, 140) * 3.6px); height: calc(var(--shell-scale, 140) * .55px); transform: translateX(-50%); border-radius: 50%; background: radial-gradient(ellipse at 50% 40%, rgba(54,58,52,.28), rgba(54,58,52,.1) 45%, transparent 70%); filter: blur(6px); pointer-events: none; }
.play-stage[data-game="aqua-rings"] .stage-floor::after { content: ""; position: absolute; inset: 10% -20% -40%; border-radius: 50%; background: repeating-conic-gradient(from 200deg at 50% 0%, transparent 0deg 6deg, rgba(255,214,170,.5) 7deg, rgba(180,225,240,.45) 8deg, transparent 10deg 14deg); mask-image: radial-gradient(ellipse at 50% 10%, #000 20%, transparent 65%); -webkit-mask-image: radial-gradient(ellipse at 50% 10%, #000 20%, transparent 65%); opacity: .8; }
.device-canvas { position: absolute; z-index: 1; inset: 0; width: 100%; height: 100%; display: block; }
.screen-hit-area { position: absolute; z-index: 2; touch-action: none; border-radius: 6px; cursor: crosshair; }
.play-stage[data-game="aqua-rings"] .screen-hit-area { cursor: ew-resize; }
.play-stage[data-game="pocket-pinball"] .screen-hit-area { pointer-events: none; }
.hit-layer { position: absolute; z-index: 3; inset: 0; pointer-events: none; }
.hit-button { position: absolute; left: 0; top: 0; padding: 0; border: 0; border-radius: 50%; background: transparent; pointer-events: auto; touch-action: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.hit-button.hit-dpad { border-radius: 30%; }
.hit-button:focus-visible { outline: 3px solid rgba(45,140,154,.8); outline-offset: 2px; }
.play-topbar { position: absolute; z-index: 5; top: max(12px, var(--sat)); left: max(12px, var(--sal)); right: max(12px, var(--sar)); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; pointer-events: none; }
.play-topbar button { pointer-events: auto; }
.play-nav-button, .play-icon-button { min-height: 44px; border: 1px solid rgba(21,29,28,.35); border-radius: 999px; background: rgba(247,243,234,.88); cursor: pointer; }
.play-nav-button { justify-self: start; display: inline-flex; align-items: center; gap: 8px; padding: 0 14px 0 12px; font: 700 13px/1 var(--display); font-stretch: 108%; }
.play-nav-button span:first-child { font: 18px/1 var(--text); }
.play-title { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; }
.play-title-kicker { color: var(--ink-3); font: 500 11px/1.2 var(--mono); font-stretch: 85%; }
.play-title b { font: 800 19px/1 var(--display); font-stretch: 114%; letter-spacing: -.01em; }
.play-icon-button { justify-self: end; width: 44px; font: 700 15px/1 var(--display); }
.play-status { position: absolute; z-index: 4; top: calc(max(12px, var(--sat)) + 52px); left: 50%; display: flex; align-items: center; gap: 8px; transform: translateX(-50%); color: var(--ink-2); font: 500 11px/1.2 var(--mono); font-stretch: 85%; white-space: nowrap; pointer-events: none; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #4f9a6a; }
.tilt-button { pointer-events: auto; min-height: 36px; padding: 0 12px; border: 1px solid var(--glacier); border-radius: 999px; background: rgba(247,243,234,.9); color: var(--glacier); font: 600 12px/1 var(--mono); font-stretch: 85%; cursor: pointer; }
.tilt-button[hidden] { display: none; }
.play-hint { position: absolute; z-index: 2; bottom: max(12px, calc(var(--sab) + 6px)); left: 50%; margin: 0; transform: translateX(-50%); color: var(--ink-2); font: 500 12px/1.3 var(--mono); font-stretch: 88%; white-space: nowrap; }
.play-error { position: absolute; z-index: 6; left: 50%; top: 50%; width: min(320px, 86vw); transform: translate(-50%, -50%); padding: 18px; border: 1px solid var(--ink); border-radius: 8px; background: var(--paper-3); font-size: 15px; line-height: 1.5; }
.play-error[hidden] { display: none; }
.pause-layer { position: absolute; z-index: 10; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(229,221,205,.72); }
.pause-layer[hidden] { display: none; }
.pause-card { width: min(340px, 100%); display: grid; gap: 9px; padding: 26px 24px; border: 1px solid var(--ink); border-radius: 10px; background: var(--paper-3); box-shadow: 0 24px 60px rgba(21,29,28,.16); }
.pause-card .eyebrow { margin: 0 0 4px; color: var(--ink-3); font: 500 12px/1.3 var(--mono); }
.pause-card h2 { margin: 0 0 12px; font: 820 36px/1 var(--display); font-stretch: 116%; letter-spacing: -.03em; }

/* ---------- Responsive ---------- */
@media (min-width: 1440px) {
  .catalogue-shell { padding-inline: max(64px, calc((100vw - 1360px) / 2)); }
  .hero-figure { margin-right: 0; }
  .hero-render { border-radius: 18px; }
}
@media (max-width: 1080px) {
  .toy-feature { grid-column: span 12; grid-row: auto; }
  .toy-feature .toy-main { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: center; }
  .toy-tall, .toy-compact { grid-column: span 6; grid-row: auto; }
  .toy-wide { grid-column: span 12; }
  .help-list { grid-template-columns: 1fr; }
  .help-list li:nth-child(odd) { border-right: 0; }
}
@media (max-width: 760px) {
  .site-header { height: 64px; gap: 12px; }
  .header-note span { display: none; }
  .header-note { font-size: 11px; }
  .wordmark { width: 86px; }
  .hero { grid-template-columns: 1fr; gap: 18px; padding-top: 22px; }
  .hero-figure { order: -1; margin: 0 calc(var(--gutter) * -1); }
  .hero-render { border-radius: 0; aspect-ratio: 6 / 5; object-position: 50% 42%; }
  .hero h1 { font-size: clamp(40px, 12.4vw, 60px); font-stretch: 108%; }
  .hero-description { margin: 16px 0 22px; }
  .serial-plate { margin-top: 24px; }
  .details { grid-template-columns: repeat(3, minmax(64%, 1fr)); overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter); scroll-padding-inline: var(--gutter); gap: 14px; border-bottom: 0; }
  .figure-note { display: none; }
  .detail, .detail + .detail { padding: 18px 0 10px; border-left: 0; scroll-snap-align: start; }
  .section-heading { grid-template-columns: 1fr; row-gap: 12px; }
  .toy-grid { grid-template-columns: 1fr; border-left: 0; }
  .toy, .toy-feature, .toy-tall, .toy-wide, .toy-compact, .toy-strip { grid-column: auto; border-right: 0; }
  .toy-main, .toy-feature .toy-main, .toy-wide .toy-main, .toy-strip .toy-main { grid-template-columns: 1fr; padding: 18px 0 22px; }
  .toy-strip .toy-photo { order: 0; }
  .toy-tall .toy-main, .toy-compact .toy-main { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: start; }
  .toy-tall .toy-photo, .toy-compact .toy-photo { aspect-ratio: 3 / 4; }
  .toy-tall .toy-line, .toy-compact .toy-line { font-size: 14px; }
  .toy-tall .toy-name, .toy-compact .toy-name { padding-right: 0; font-size: 24px; }
  .toy-tall .toy-number, .toy-compact .toy-number { position: static; font-size: 30px; }
  .toy-feature .toy-number { font-size: 56px; }
  .toy-photo img { object-position: 50% 50%; }
  .favorite-button { top: 28px; right: 10px; }
  .help-section { grid-template-columns: 1fr; }
  .family { order: 2; }
  .site-footer { flex-direction: column; align-items: flex-start; }
  .play-topbar { top: max(8px, var(--sat)); left: max(8px, var(--sal)); right: max(8px, var(--sar)); }
  .play-nav-button { min-height: 44px; padding: 0 10px 0 9px; gap: 6px; font-size: 12px; }
  .play-title b { font-size: 15px; }
  .play-status { top: calc(max(8px, var(--sat)) + 48px); }
  .play-hint { display: none; }
}
@media (max-width: 380px) {
  .header-note { display: none; }
  .hero h1 { font-size: 38px; }
  .toy-tall .toy-main, .toy-compact .toy-main { grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); gap: 14px; }
  .serial-plate { font-size: 11px; }
}
@media (orientation: landscape) and (max-height: 520px) {
  .play-topbar { grid-template-columns: auto 1fr auto; }
  .play-title { display: none; }
  .play-status { left: max(12px, var(--sal)); top: calc(max(12px, var(--sat)) + 52px); transform: none; flex-direction: column; align-items: flex-start; }
  .play-hint { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
:root.reduce-motion *, :root.reduce-motion *::before, :root.reduce-motion *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
