/* The public pharmacy: authored HTML over baked room stills and separate object layers.
   `css/ride-objects.css` (generated) supplies each object's height and surface projection. */
@font-face { font-family: 'Pharmacy Gothic'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('/fonts/zen-kaku-gothic-new-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Pharmacy Mincho'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('/fonts/shippori-mincho-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Pharmacy Serif'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('/fonts/eb-garamond-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Pharmacy Serif'; font-style: italic; font-weight: 100 900; font-display: swap; src: url('/fonts/eb-garamond-400-italic.woff2') format('woff2'); }

:root {
  --ride-ui-unit: clamp(1px, min(0.0520833333vw, 0.0925925926vh), 2px);
  --ride-ground: oklch(14% 0.015 310);
  --ride-ink: oklch(93% 0.025 75);
  --ride-secondary: oklch(78% 0.026 70);
  --ride-muted: oklch(66% 0.025 285);
  --ride-cyan: oklch(83% 0.07 210);
  --ride-line: oklch(65% 0.035 70 / .32);
  --ride-panel: oklch(16% 0.015 300 / .96);
  --scene-shade: oklch(12% 0.018 300 / .82);
  --scene-clear: oklch(12% 0.018 300 / 0);
  --scene-header-height: 76px;
  --ride-nav-hover: oklch(26% 0.02 300);
  --ride-nav-current: oklch(28% 0.045 210);
  /* Live typography on the projected paper surfaces. */
  --paper-ink: oklch(24% .03 50);
  --paper-secondary: oklch(34% .035 50);
  --paper-accent: oklch(34% .08 15);
  --paper-rule: oklch(40% .04 50 / .35);
  --paper-wash: oklch(83% .065 80 / .65);
  /* The timber shelf the bottles stand on. */
  --shelf-timber: oklch(27% .04 45);
  --shelf-edge: oklch(40% .045 55);
  --bottle-shadow: oklch(5% .015 285 / .8);
  --bottle-label: oklch(83% .045 80);
}

/* ---- Page frame ---------------------------------------------------------- */
html[data-ride-mode="baked"] {
  --f-display: 'IM Fell English', 'Pharmacy Mincho', serif;
  --f-head: 'Pharmacy Gothic', system-ui, sans-serif;
  --f-body: 'Pharmacy Gothic', system-ui, sans-serif;
  --f-frag: 'Pharmacy Serif', 'Pharmacy Gothic', serif;
  --f-frag-ja: 'Pharmacy Mincho', 'Pharmacy Gothic', serif;
  scroll-behavior: auto;
}
html[data-ride-mode="baked"] .slip-def,
html[data-ride-mode="baked"] .slip-sig { font-family: var(--f-frag); }
html[data-ride-mode="baked"] body { background: var(--ride-ground); }
html[data-ride-mode="baked"] body::before,
html[data-ride-mode="baked"] body::after { display: none; }
html[data-ride-mode="baked"].remembered-pending body::before {
  content: "opening the window…"; position: fixed; inset: 0; z-index: 40;
  display: grid; place-items: center; color: var(--ride-ink);
  font: 18px var(--f-frag); background: var(--ride-ground);
}
html[data-ride-mode="baked"] #content { overflow: clip; }

/* Once the Ride owns the viewport the stills, their objects and the 3D offer step aside; the header stays. */
html[data-ride-mode="3d"] .scene-backdrop,
html[data-ride-mode="3d"] .object-art,
html[data-ride-mode="3d"] .scene-view,
html[data-ride-mode="3d"] .journal-room { display: none; }

/* ---- Header and section menu -------------------------------------------- */
.scene-header {
  position: fixed; inset: 0 0 auto; z-index: 30;
  min-height: var(--scene-header-height); padding: 12px clamp(20px, 3vw, 60px);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  background: var(--ride-ground); border-bottom: 1px solid var(--ride-line);
}
.scene-brand {
  display: flex; align-items: baseline; gap: 12px; flex: 1 1 0; min-width: max-content;
  color: var(--ride-ink); text-decoration: none;
}
/* Equal left and right flanks keep the centered menu still when the right control changes width. */
.scene-actions { flex: 1 1 0; display: flex; align-items: center; justify-content: flex-end; gap: 16px; min-width: max-content; }
.scene-brand span:first-child { font: 23px var(--f-display); letter-spacing: .13em; }
.scene-brand span:last-child { font: 10px var(--f-mono); color: var(--ride-secondary); letter-spacing: .08em; }
.scene-nav { display: flex; flex: 0 1 auto; align-items: center; justify-content: center; }
.scene-nav-list { display: flex; flex-wrap: wrap; gap: 3px; align-items: center; justify-content: center; }
/* The collapsed control is a mobile-only affordance; the full row stands on the desktop header. */
.nav-open-state, .nav-toggle { display: none; }
.scene-nav a {
  display: block; padding: 11px 13px; border: 1px solid transparent; border-radius: 4px;
  color: var(--ride-ink); font: 13px var(--f-digital); text-decoration: none;
}
.scene-nav a:hover, .scene-nav a[aria-current] { color: var(--ride-cyan); border-color: var(--ride-line); background: var(--raise); }
.scene-nav a:focus-visible, .scene-brand:focus-visible, .scene-view:focus-visible { outline: 2px solid var(--ride-cyan); outline-offset: 2px; }
.scene-view {
  flex-shrink: 0; padding: 8px 14px; border: 1px solid var(--ride-line); border-radius: 999px;
  color: var(--ride-cyan); font: 12px var(--f-digital); text-decoration: none; white-space: nowrap;
}
.scene-view:hover { background: var(--raise); }
.scene-view[hidden] { display: none; }
/* The Ride's controls sit in the same slot: the graphics choice and the way back to 2D. */
.ride-settings { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }
.ride-graphics { color: var(--ride-secondary); font: 12px var(--f-digital); white-space: nowrap; }
.ride-graphics select {
  margin-left: 6px; padding: 5px 6px; border: 1px solid var(--ride-line); border-radius: 4px;
  color: var(--ride-ink); background: var(--ride-panel); font: inherit;
}
.ride-hdr { display: inline-flex; align-items: center; gap: 5px; color: var(--ride-secondary); font: 12px var(--f-digital); white-space: nowrap; cursor: pointer; }
.ride-hdr input { accent-color: var(--ride-cyan); cursor: pointer; }
.ride-flat {
  padding: 8px 14px; border: 1px solid var(--ride-line); border-radius: 999px;
  color: var(--ride-cyan); font: 12px var(--f-digital); text-decoration: none; white-space: nowrap;
}
.ride-flat:hover { background: var(--raise); }
.ride-flat:focus-visible, .ride-graphics select:focus-visible { outline: 2px solid var(--ride-cyan); outline-offset: 2px; }
.ticker { z-index: 31; }
.ticker.is-pinned { top: var(--scene-header-height); }

/* ---- Rooms and their stills --------------------------------------------- */
html[data-ride-mode="baked"] .scene-room {
  position: relative; isolation: isolate; z-index: 1; width: 100%; max-width: none;
  min-height: max(740px, 100svh); margin: 0; padding: 140px 0 64px; overflow: clip;
  scroll-margin-top: var(--scene-header-height);
}
.scene-backdrop {
  display: block; position: absolute; inset: 0; z-index: -2; overflow: hidden;
  pointer-events: none; background: var(--ride-ground);
}
html[data-ride-mode="baked"] .scene-room > .scene-backdrop {
  inset: -40px 0; transform: translateY(var(--room-parallax, 0px)) scale(1.04);
}
.scene-backdrop img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
html[data-ride-mode="baked"] .window-life { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; }
html[data-ride-mode="baked"] .scene-room::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(var(--ride-ground), var(--scene-clear) 18%, var(--scene-clear) 80%, var(--ride-ground));
  border: 0; transform: none;
}
html[data-ride-mode="baked"] .scene-room .shelf-head,
html[data-ride-mode="baked"] .scene-room .latest-head {
  position: relative; z-index: 2; max-width: 1120px; margin: 0 auto 20px; padding: 0 40px; text-align: left;
}
html[data-ride-mode="baked"] .shelf-title { justify-content: flex-start; gap: 16px; text-shadow: 0 2px 8px var(--ride-ground); }
html[data-ride-mode="baked"] .shelf-sub a,
html[data-ride-mode="baked"] .latest-all { color: var(--ride-cyan); text-underline-offset: 3px; }
html[data-ride-mode="baked"] .shelf-sub { max-width: 54ch; margin: 12px 0 0; color: var(--ride-secondary); font-size: 17px; }
html[data-ride-mode="baked"] .sh-jp,
html[data-ride-mode="baked"] .lt-jp { font-size: clamp(28px, 3vw, 42px); }
html[data-ride-mode="baked"] .sh-en,
html[data-ride-mode="baked"] .lt-en { font: 17px var(--f-digital); text-transform: none; }
html[data-ride-mode="baked"] .hours-note { position: absolute; z-index: 2; width: 100%; padding: 18px 28px; background: var(--ride-ground); }
/* The song left playing: the same small framed thumbnail the Ride shows. */
html[data-ride-mode="baked"] .ambient-video { opacity: .75; z-index: 2; }

/* ---- Shelves and cards --------------------------------------------------- */
html[data-ride-mode="baked"] .hscroll {
  gap: 24px; padding: 20px max(28px, calc((100vw - 1040px) / 2)) 28px;
  scroll-snap-type: x proximity; scroll-padding-inline: 28px;
}
/* The shelf title sits over the still so the bottles can stand on the first screen. */
html[data-ride-mode="baked"] #dispensary-shelf { padding-top: 0; }
html[data-ride-mode="baked"] #dispensary-shelf .shelf-head { position: absolute; top: calc(var(--scene-header-height) + 44px); left: 0; right: 0; }
/* The films hang on a light-box baked into the still (object-fit: cover, centered). Centering the
   shelf and floating the heading keeps the cards on the screen as the window resizes, instead of
   the top-anchored flow letting the centered screen drift up past them. */
html[data-ride-mode="baked"] #latest { padding-top: 0; padding-bottom: 0; display: flex; flex-direction: column; justify-content: center; }
html[data-ride-mode="baked"] #latest .latest-head { position: absolute; top: calc(var(--scene-header-height) + 44px); left: 0; right: 0; }
html[data-ride-mode="baked"] .apps-scroll {
  align-items: flex-end; gap: 0; padding: calc(var(--scene-header-height) + 150px) max(28px, calc((100vw - 1040px) / 2)) 76px;
  scroll-padding-inline: 28px;
  background: linear-gradient(to top, var(--ride-ground) 38px, var(--shelf-timber) 38px 65px, var(--shelf-edge) 66px, var(--shelf-timber) 68px 105px, transparent 106px);
}
html[data-ride-mode="baked"] .apps-scroll::after { content: ""; flex: 0 0 24px; }
html[data-ride-mode="baked"] .case-card,
html[data-ride-mode="baked"] .app-card,
html[data-ride-mode="baked"] .post-card { scroll-snap-align: start; scroll-margin-top: calc(var(--scene-header-height) + 42px); }
html[data-ride-mode="baked"] .slip,
html[data-ride-mode="baked"] .post-card { background: var(--ride-panel); }
html[data-ride-mode="baked"] .slip-sig,
html[data-ride-mode="baked"] .post-blurb { color: var(--ride-ink); font-size: 17px; }
html[data-ride-mode="baked"] .slip-def { color: var(--ride-secondary); }
html[data-ride-mode="baked"] .apps-nav { top: auto; bottom: 20px; transform: none; }
html[data-ride-mode="baked"] .apps-nav--prev { left: max(28px, calc((100vw - 1040px) / 2)); }
html[data-ride-mode="baked"] .apps-nav--next { right: max(28px, calc((100vw - 1040px) / 2)); }

/* ---- Hero ---------------------------------------------------------------- */
html[data-ride-mode] .hero {
  min-height: 100svh; padding: 150px 24px 64px; display: flex;
  flex-direction: column; align-items: center; justify-content: flex-end;
}
html[data-ride-mode] .hero-sign,
html[data-ride-mode] .hero-sub {
  position: relative; inset: auto; width: auto; height: auto; clip-path: none;
  white-space: normal; overflow: visible;
}
html[data-ride-mode] .hero-sign { margin: auto 0 40px; text-align: center; }
html[data-ride-mode] .hero-sub { margin: 0 auto auto; max-width: 38ch; }
/* The sign is the animated heat-haze AVIF, the same in both windows. */
html[data-ride-mode] .hero .hero-kanji { margin: 0; animation: none; }
html[data-ride-mode] .hero .hero-kanji img { width: clamp(260px, 40vw, 600px); }
html[data-ride-mode] .hero-open { position: static; display: block; margin-top: 24px; }
html[data-ride-mode] .hero > .sticker--bow,
html[data-ride-mode] .hero-rail,
html[data-ride-mode] .hero-links-sep,
html[data-ride-mode] .scroll-indicator { display: none; }
html[data-ride-mode] .hero > .sticker--text { top: 24%; }
html[data-ride-mode] .hero-links { flex-wrap: wrap; justify-content: center; margin: 40px 0 20px; gap: 20px; }
html[data-ride-mode] .hero-links a { font-size: 15px; color: var(--ride-ink); }
html[data-ride-mode] .enter-cta { margin: 0; }

/* ---- Fragments and the overheard exchange -------------------------------- */
html[data-ride-mode="baked"] .fragments--intro { padding: 24vh 12vw 80px; justify-content: center; gap: 30px; }
html[data-ride-mode="baked"] .fragments--intro .fragment { max-width: 36ch; font-size: clamp(18px, 2.2vw, 28px); color: var(--ride-ink); }
html[data-ride-mode="baked"] .overheard { position: relative; z-index: 2; margin: -180px 10vw 0 auto; padding: 24px; max-width: 440px; background: var(--ride-panel); }
html[data-ride-mode="baked"] .fragments--deep { padding: 160px 6vw 100px; }
html[data-ride-mode="baked"] .fragments-title { margin: 0 auto 24px; }
html[data-ride-mode="baked"] .fragments--deep .shelf-sub { margin: 0 auto 40px; text-align: center; }
/* One fragment per panel of the folding screen, two rows deep. */
html[data-ride-mode="baked"] .frag-field {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px 28px; align-items: start;
  margin-inline: auto; max-width: 1060px;
}
html[data-ride-mode="baked"] .frag-field .fragment {
  grid-column: auto; grid-row: auto; justify-self: stretch; align-self: start;
  margin: 0; padding: 30px 24px; max-height: none; text-align: left;
  color: var(--ride-ink); font-size: 23px; line-height: 1.6;
  transform: perspective(900px) rotateY(-7deg);
}
html[data-ride-mode="baked"] .frag-field .fragment:nth-child(even) { margin-top: 44px; transform: perspective(900px) rotateY(7deg); }
html[data-ride-mode="baked"] .frag-field .fragment--ja { justify-self: center; max-height: 480px; line-height: 2; }

/* ---- Sora's tank --------------------------------------------------------- */
html[data-ride-mode="baked"] .journal-room { padding-top: 160px; }
html[data-ride-mode="baked"] .journal-writing { max-width: 700px; margin: 100px auto 0; padding: 24px; }
html[data-ride-mode="baked"] .journal-writing > p {
  max-width: 32ch; margin-inline: auto; margin-bottom: 24px; text-align: center; color: var(--ride-ink); font: 23px/1.6 var(--f-frag);
}
html[data-ride-mode="baked"] .journal-writing > .pill { display: table; margin: auto; }
html[data-ride-mode="baked"] .journal-entries { display: flex; gap: 48px; justify-content: center; margin-top: 26px; }
html[data-ride-mode="baked"] .journal-entries a {
  display: block; flex: 1; max-width: 250px; text-align: center;
  color: var(--ride-ink); text-decoration: none; font: 18px var(--f-digital);
}
html[data-ride-mode="baked"] .journal-entries span {
  display: block; margin-top: 6px; padding: 8px; color: var(--ride-secondary);
  font: 17px/1.5 var(--f-frag); background: var(--scene-shade);
}
.journal-creature { display: block; width: 160px; height: 192px; margin: 0 auto 18px; image-rendering: pixelated; transition: transform .3s; }
.journal-entries a:hover .journal-creature, .journal-entries a:focus-visible .journal-creature { transform: translateY(-12px) rotate(4deg); }

/* ---- Webring: the noticeboard layer with the neighbors' live badges under its tacks ---- */
html[data-ride-mode="baked"] .corkboard {
  display: flex; flex-direction: column; align-items: center; padding: 150px 28px 120px;
  background: var(--ride-ground); box-shadow: none; border: 0; border-radius: 0;
}
html[data-ride-mode="baked"] .corkboard-title { color: var(--ride-ink); font-size: 22px; margin-bottom: 24px; }
html[data-ride-mode="baked"] .corkboard [data-object="board"] { --object-scale: .82; scroll-snap-align: none; }
html[data-ride-mode="baked"] .corkboard [data-object="board"] .object-surface { display: block; padding: 0; line-height: 0; }
html[data-ride-mode="baked"] .corkboard [data-object="board"] .pin::before { display: none; }
html[data-ride-mode="baked"] .corkboard [data-object="board"] .pin img { width: 100%; height: 100%; }
html[data-ride-mode="baked"] .corkboard [data-object="board"] .pin:hover,
html[data-ride-mode="baked"] .corkboard [data-object="board"] .pin:focus-visible { filter: drop-shadow(0 0 7px var(--ride-cyan)); }
.corkboard-ours { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 20px; max-width: 720px; margin: 20px auto 0; }
.corkboard-ours .pin img { width: 176px; height: 62px; }
html[data-ride-mode="baked"] .corkboard-embed { flex: 1 1 340px; margin: 0; }
html[data-ride-mode="baked"] .corkboard-note { width: 100%; margin-top: 4px; }

/* ---- The last transmission: the doorway layer, its leaves swinging open over the night sky ---- */
html[data-ride-mode="baked"] .transmission {
  display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 140px 24px 12vh;
}
html[data-ride-mode="baked"] .transmission .exit-door {
  --object-scale: .56; position: absolute; left: 50%; top: 50%; z-index: 0;
  transform: translate(-50%, -50%) translateY(var(--object-parallax, 0px));
}
html[data-ride-mode="baked"] .transmission .exit-door .object-stage { perspective: 3000px; transform-style: preserve-3d; cursor: pointer; }
/* The night sky is baked into the room still; a cover holds it dark so the closed room shows
   only the doors, and lifts as they open to reveal it. */
html[data-ride-mode="baked"] .transmission::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: var(--ride-ground); opacity: calc(1 - var(--door-open, 0)); transition: opacity .4s ease-out;
}
/* The overlaid words let a hover fall through to the doors beneath them. */
html[data-ride-mode="baked"] .transmission-body,
html[data-ride-mode="baked"] .transmission-mark { pointer-events: none; }
/* The leaves rest closed and swing open only when the visitor reaches for the doors — a hover
   over the door itself, or (with no hover, i.e. touch) a tap that holds them open. Setting the
   variable on the room, not the door, lets the cover above lift with the same reach. */
html[data-ride-mode="baked"] .transmission:has(.exit-door:hover),
html[data-ride-mode="baked"] .transmission.is-open { --door-open: 1; }
html[data-ride-mode="baked"] .transmission .door-sky { display: block; padding: 0; background: var(--ride-ground); }
html[data-ride-mode="baked"] .transmission .door-sky img { display: block; width: 100%; height: 100%; object-fit: cover; }
html[data-ride-mode="baked"] .transmission .door-leaf {
  position: absolute; width: 1000px; height: var(--object-height); transform-origin: 0 0;
  transform: scale(var(--leaf-scale)) rotateY(calc(-62deg * var(--door-open, 0)));
  transition: transform .4s ease-out; transform-style: preserve-3d;
}
html[data-ride-mode="baked"] .transmission [data-leaf="door-right"] {
  transform-origin: 100% 0; transform: scale(var(--leaf-scale)) rotateY(calc(62deg * var(--door-open, 0)));
}
html[data-ride-mode="baked"] .transmission .door-words {
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 28px; padding: 0;
  color: oklch(74% .025 80); font: 44px/1.3 var(--f-frag-ja); text-align: center; letter-spacing: .08em;
}
html[data-ride-mode="baked"] .transmission .door-words span { font: 34px/1.2 var(--f-frag); letter-spacing: .02em; }
html[data-ride-mode="baked"] .transmission-mark, html[data-ride-mode="baked"] .transmission-body, html[data-ride-mode="baked"] .forget-btn { position: relative; z-index: 1; }
html[data-ride-mode="baked"] .transmission-mark { margin-bottom: 24px; }
/* The words sit in a pool of shade on the door, with the timber showing at the edges. */
html[data-ride-mode="baked"] .transmission-body {
  position: relative; isolation: isolate; max-width: 36ch; padding: 24px 32px;
  font-size: clamp(19px, 2.1vw, 29px); line-height: 1.75;
}
html[data-ride-mode="baked"] .transmission-body::before {
  content: ""; position: absolute; inset: -56px -80px; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse at center, var(--scene-shade) 34%, var(--scene-clear) 70%);
}
html[data-ride-mode="baked"] .forget-btn { margin-top: 32px; }
html[data-ride-mode="baked"] .site-footer { max-width: none; margin: 0; padding: 50px 28px; background: var(--ride-ground); }
html[data-ride-mode="baked"] #remembered-ending::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(var(--scene-shade), var(--scene-clear) 50%, var(--scene-shade));
}

/* ---- Loading status and resident pages ----------------------------------- */
.scene-loading {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 40;
  display: flex; align-items: center; gap: 12px; padding: 10px 16px;
  border: 1px solid var(--ride-line); border-radius: 24px; background: var(--ride-panel);
  color: var(--ride-ink); font: 13px var(--f-digital); pointer-events: none;
}
.scene-loading[hidden] { display: none; }
.scene-loading a { pointer-events: auto; color: var(--ride-cyan); text-underline-offset: 3px; }
.scene-loading::before { content: ""; width: 13px; height: 13px; border: 1px solid var(--ride-line); border-top-color: var(--ride-cyan); border-radius: 50%; animation: scene-image-loading 1s linear infinite; }
@keyframes scene-image-loading { to { transform: rotate(1turn); } }
html.site-page-open { overflow: hidden; }
html.site-page-open body > :not(#site-pages) { visibility: hidden; }
#site-pages { position: fixed; inset: 0; z-index: 1000; background: var(--ride-ground); }
#site-pages[hidden], .site-page[hidden] { display: none; }
.site-page { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: var(--ride-ground); }

/* ---- Objects: exported art with live surfaces ---------------------------- */
html[data-ride-mode="baked"] .scene-object {
  --object-scale: .40;
  position: relative; flex: 0 0 auto; width: calc(1000px * var(--object-scale));
  height: calc(var(--object-height) * var(--object-scale));
  border: 0; background: none; box-shadow: none; scroll-snap-align: center;
  transform: translateY(var(--object-parallax, 0px));
}
html[data-ride-mode="baked"] .object-stage {
  position: relative; flex: 0 0 1000px; width: 1000px; height: var(--object-height);
  transform: scale(var(--object-scale)); transform-origin: top left;
}
.object-art { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
html[data-ride-mode="baked"] .object-surface {
  position: absolute; inset: 0 auto auto 0; transform-origin: top left;
  display: flex; flex-direction: column; margin: 0; padding: 32px;
  color: var(--paper-ink); background: none; border: 0; border-radius: 0;
  box-shadow: none; text-shadow: none; overflow: visible;
}
html[data-ride-mode="baked"] .object-art-unavailable .object-surface { background: var(--paper-wash); }
html[data-ride-mode="baked"] .object-surface .slip {
  display: flex; flex-direction: column; padding: 20px;
  width: 100%; height: 100%; background: none; box-shadow: none; border: 0;
}
html[data-ride-mode="baked"] .object-surface::before,
html[data-ride-mode="baked"] .object-surface::after,
html[data-ride-mode="baked"] .object-surface .slip::before,
html[data-ride-mode="baked"] .object-surface .slip::after,
html[data-ride-mode="baked"] .object-surface .slip-perf,
html[data-ride-mode="baked"] .object-surface .slip-rx,
html[data-ride-mode="baked"] .object-surface .slip-code { display: none; }
html[data-ride-mode="baked"] .object-surface .drug-name {
  color: var(--paper-ink); background: none; -webkit-text-fill-color: currentColor;
  font: 38px/1.05 var(--f-display); overflow-wrap: anywhere;
}
html[data-ride-mode="baked"] .object-surface .slip-head { display: block; margin-bottom: 16px; }
html[data-ride-mode="baked"] .object-surface .slip-no { display: block; color: var(--paper-secondary); font-size: 18px; margin-top: 12px; }
html[data-ride-mode="baked"] .object-surface .slip-pron { color: var(--paper-secondary); font-size: 16px; margin-bottom: 12px; }
html[data-ride-mode="baked"] .object-surface .slip-rule { border-color: var(--paper-rule); margin: 8px 0 14px; }
html[data-ride-mode="baked"] .object-surface .slip-def,
html[data-ride-mode="baked"] .object-surface .slip-sig { color: var(--paper-ink); font: 28px/1.22 var(--f-frag); margin: 0 0 16px; }
html[data-ride-mode="baked"] .object-surface .slip-def { font-size: 24px; }
html[data-ride-mode="baked"] .object-surface .slip-label,
html[data-ride-mode="baked"] .object-surface .slip-jp,
html[data-ride-mode="baked"] .object-surface .slip-disp { color: var(--paper-secondary); font-size: 17px; }
html[data-ride-mode="baked"] .object-surface .slip-foot { margin-top: auto; gap: 10px; padding-top: 10px; flex-wrap: wrap; }
html[data-ride-mode="baked"] .object-surface .pill {
  color: var(--paper-accent); border: 1px solid var(--paper-rule); font-size: 23px;
  background: none; box-shadow: none; padding: 9px 14px;
}
html[data-ride-mode="baked"] .object-surface a { color: var(--paper-accent); }
html[data-ride-mode="baked"] .object-surface:focus-visible,
html[data-ride-mode="baked"] .object-surface a:focus-visible { outline: 3px solid var(--paper-accent); outline-offset: 5px; }

/* The open ledger: two research slips on its leaves. */
html[data-ride-mode="baked"] [data-object="ledger"] { --object-scale: 1.1; scroll-snap-align: start; }
html[data-ride-mode="baked"] .ledger-scroller { justify-content: center; padding-inline: 28px; }
html[data-ride-mode="baked"] [data-object="ledger"] .object-surface { background: var(--paper-wash); border-radius: 2% 4% 3% 1%; }
html[data-ride-mode="baked"] [data-object="ledger"] .object-surface .slip { padding: 0; overflow: visible; }
html[data-ride-mode="baked"] [data-object="ledger"] .object-surface .drug-name { font-size: 34px; }
html[data-ride-mode="baked"] [data-object="ledger"] .object-surface .slip-sig,
html[data-ride-mode="baked"] [data-object="ledger"] .object-surface .slip-def { font-size: 22px; line-height: 1.18; margin-bottom: 12px; }
/* The remembered ending's records dialog reads the same slips as plain paper. */
html[data-ride-mode="baked"] .memory-records .scene-object { width: auto; height: auto; transform: none; }
html[data-ride-mode="baked"] .memory-records .object-stage { width: auto; height: auto; transform: none; }
html[data-ride-mode="baked"] .memory-records .object-art { display: none; }
html[data-ride-mode="baked"] .memory-records [data-object="ledger"] .object-surface { position: relative; transform: none; width: 100%; height: auto; margin-bottom: 20px; }

/* Radiographs on the viewer: one blog post each. */
html[data-ride-mode="baked"] [data-object^="film"] { --object-scale: .38; }
html[data-ride-mode="baked"] [data-object^="film"] .object-surface {
  color: var(--ride-ink); padding: 24px 26px; text-decoration: none;
  background: linear-gradient(var(--scene-clear) 40%, var(--scene-shade));
}
html[data-ride-mode="baked"] [data-object^="film"] .post-title { color: var(--ride-ink); font: 32px/1.18 var(--f-display); margin: 24px 0; }
html[data-ride-mode="baked"] [data-object^="film"] .post-meta { color: var(--ride-secondary); display: flex; flex-wrap: wrap; gap: 8px; font-size: 15px; }
html[data-ride-mode="baked"] [data-object^="film"] .post-blurb { color: var(--ride-ink); margin-top: auto; font: 24px/1.3 var(--f-frag); }
html[data-ride-mode="baked"] [data-object^="film"] .post-seal { color: var(--ride-cyan); font-size: 22px; margin-top: 20px; }

/* Paper stands: the web tools. */
html[data-ride-mode="baked"] [data-object^="stand"] { --object-scale: .43; }
html[data-ride-mode="baked"] [data-object^="stand"] .object-surface { background: var(--paper-wash); padding: 24px; }
html[data-ride-mode="baked"] [data-object^="stand"] .object-surface .drug-name { font-size: 32px; }
html[data-ride-mode="baked"] [data-object^="stand"] .object-surface .slip-sig,
html[data-ride-mode="baked"] [data-object^="stand"] .object-surface .slip-def { font-size: 22px; line-height: 1.18; margin-bottom: 12px; }
html[data-ride-mode="baked"] [data-object="stand-2"] .object-surface { padding-block: 16px; }
html[data-ride-mode="baked"] [data-object="stand-2"] .object-surface .slip-sig { font-size: 19px; }

/* Bottles: three image slices, so the glass body grows with its label. */
html[data-ride-mode="baked"] #dispensary-shelf > .scene-backdrop { transform: none; }
/* Each bottle is sized by its own aspect so the tallest still fits the window. */
html[data-ride-mode="baked"] [data-object^="bottle"] {
  container-type: inline-size; display: block;
  width: min(460px, 100vw, calc(72svh / var(--object-aspect))); height: auto; transform: none;
}
html[data-ride-mode="baked"] [data-object^="bottle"] .object-stage {
  width: 100%; height: auto; padding-block: calc(var(--b-top) * .55) calc(var(--b-base) * .6);
  transform: perspective(1400px) rotateY(-3deg); transform-origin: 50% 100%;
  transition: transform .25s ease;
}
html[data-ride-mode="baked"] [data-object^="bottle"] .object-stage::after {
  content: ""; position: absolute; left: 20%; right: 10%; bottom: 3.5cqw;
  height: 5cqw; border-radius: 50%; z-index: -1;
  background: radial-gradient(ellipse, var(--bottle-shadow), transparent 70%);
}
.bottle-shoulder, .bottle-wall, .bottle-base { position: absolute; left: 0; right: 0; overflow: hidden; pointer-events: none; }
.bottle-shoulder { top: 0; height: calc(var(--b-top) * .55); }
.bottle-base { bottom: 0; height: calc(var(--b-base) * .6); }
.bottle-wall { top: calc(var(--b-top) * .55); bottom: calc(var(--b-base) * .6); }
.bottle-shoulder .object-art { height: calc(var(--b-image-height) * .55); }
.bottle-base .object-art { top: auto; bottom: 0; height: calc(var(--b-image-height) * .6); }
.bottle-wall .object-art { top: var(--b-wall-offset); height: var(--b-wall-height); }
html[data-ride-mode="baked"] [data-object^="bottle"] .object-surface {
  position: relative; inset: auto; width: auto; height: auto; transform: none;
  margin: 0 calc(var(--b-label-right) - 1%) 0 calc(var(--b-label-left) - 1%); padding: 12px 8px;
  background: var(--bottle-label); border-radius: 4% / 1%;
  box-shadow: inset 12px 0 18px -16px var(--paper-ink), inset -12px 0 18px -16px var(--paper-ink);
}
html[data-ride-mode="baked"] [data-object^="bottle"] .object-surface .slip { padding: 12px; }
html[data-ride-mode="baked"] [data-object^="bottle"] .drug-name { font-size: 22px; }
html[data-ride-mode="baked"] [data-object^="bottle"] .slip-head { padding: 0; margin-bottom: 8px; }
html[data-ride-mode="baked"] [data-object^="bottle"] .slip-no { margin-top: 6px; }
html[data-ride-mode="baked"] [data-object^="bottle"] .slip-no,
html[data-ride-mode="baked"] [data-object^="bottle"] .slip-pron,
html[data-ride-mode="baked"] [data-object^="bottle"] .slip-label,
html[data-ride-mode="baked"] [data-object^="bottle"] .slip-jp,
html[data-ride-mode="baked"] [data-object^="bottle"] .slip-disp { font-size: 11px; }
html[data-ride-mode="baked"] [data-object^="bottle"] .slip-pron { margin-bottom: 6px; }
html[data-ride-mode="baked"] [data-object^="bottle"] .slip-rule { margin: 6px 0 10px; }
html[data-ride-mode="baked"] [data-object^="bottle"] .slip-def,
html[data-ride-mode="baked"] [data-object^="bottle"] .slip-sig { font-size: 16px; line-height: 1.3; margin-bottom: 10px; }
html[data-ride-mode="baked"] [data-object^="bottle"] .slip-foot { gap: 8px; padding-top: 6px; }
html[data-ride-mode="baked"] [data-object^="bottle"] .pill { font-size: 12px; padding: 9px 8px; }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  html[data-ride-mode="baked"] [data-object^="bottle"]:hover .object-stage,
  html[data-ride-mode="baked"] [data-object^="bottle"]:focus-within .object-stage { transform: perspective(1400px) rotateY(2deg); }
}

/* ---- Narrower viewports -------------------------------------------------- */
@media (max-width: 1100px) {
  :root { --scene-header-height: 112px; }
  .scene-header { flex-direction: column; gap: 4px; padding: 10px 20px; }
  .scene-brand { flex: none; }
  .scene-nav { flex: none; justify-content: center; }
  .scene-nav a { padding: 8px 12px; }
  .scene-actions { position: absolute; top: 14px; right: 16px; flex: none; }
  html[data-ride-mode="baked"] [data-object="ledger"] { --object-scale: .9; }
  html[data-ride-mode="baked"] .ledger-scroller { justify-content: flex-start; }
}
@media (max-width: 700px) {
  /* Three thin fixed strips replace the tall stacked header: the mark, the ticker, the menu. */
  :root { --brand-h: 42px; --ticker-h: 28px; --nav-h: 42px; --scene-header-height: calc(var(--brand-h) + var(--ticker-h) + var(--nav-h)); }
  .scene-header { height: var(--brand-h); min-height: 0; padding: 0 14px; gap: 12px; }
  .scene-brand { flex: 0 0 auto; }
  .scene-brand span:first-child { font-size: 19px; }
  .scene-brand span:last-child { display: none; }
  .scene-actions { flex: 0 0 auto; }
  /* The ticker sits between the mark and the menu, always present (no scroll-reveal on a phone). */
  .ticker, .ticker.is-pinned {
    position: fixed; top: var(--brand-h); left: 0; right: 0; height: var(--ticker-h); z-index: 29;
    display: flex; align-items: center; padding: 0; background: var(--ride-ground);
    transform: none; opacity: 1;
  }
  /* The menu collapses to the current section behind an expand control. A checkbox drives it so
     it opens without scripts; the visible label toggles the hidden checkbox. */
  .scene-nav {
    position: fixed; top: calc(var(--brand-h) + var(--ticker-h)); left: 0; right: 0; height: var(--nav-h);
    z-index: 30; display: block; background: var(--ride-ground); border-bottom: 1px solid var(--ride-line);
  }
  .nav-open-state { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; clip: rect(0 0 0 0); overflow: hidden; }
  .nav-toggle {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    width: 100%; height: var(--nav-h); padding: 0 16px;
    color: var(--ride-cyan); font: 13px var(--f-digital); cursor: pointer;
  }
  .nav-open-state:focus-visible + .nav-toggle { outline: 2px solid var(--ride-cyan); outline-offset: -2px; }
  .nav-current { color: var(--ride-ink); }
  .nav-chevron { flex: 0 0 auto; width: 8px; height: 8px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform .2s ease; }
  .nav-open-state:checked + .nav-toggle .nav-chevron { transform: translateY(1px) rotate(-135deg); }
  .scene-nav-list {
    position: absolute; top: 100%; left: 0; right: 0; display: none; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--ride-ground); border-bottom: 1px solid var(--ride-line); max-height: 70svh; overflow-y: auto;
  }
  .nav-open-state:checked ~ .scene-nav-list { display: flex; }
  .scene-nav-list a { border: 0; border-top: 1px solid var(--ride-line); border-radius: 0; padding: 13px 16px; font-size: 14px; text-align: center; }
  html[data-ride-mode="baked"] .scene-room { min-height: 100svh; padding: calc(var(--scene-header-height) + 14px) 0 50px; }
  html[data-ride-mode] .hero { padding: 170px 16px 36px; }
  html[data-ride-mode] .hero .hero-kanji img { width: min(86vw, 360px); }
  html[data-ride-mode] .hero > .sticker--text { display: none; }
  html[data-ride-mode] .hero-links { gap: 12px 18px; max-width: 320px; }
  html[data-ride-mode] .hero-links a { font-size: 13px; }
  html[data-ride-mode="baked"] .scene-room .shelf-head,
  html[data-ride-mode="baked"] .scene-room .latest-head { padding: 0 24px; }
  html[data-ride-mode="baked"] .shelf-sub { font-size: 16px; }
  html[data-ride-mode="baked"] .shelf-title { gap: 10px; }
  html[data-ride-mode="baked"] .sh-jp, html[data-ride-mode="baked"] .lt-jp { font-size: 28px; }
  html[data-ride-mode="baked"] .latest-head { align-items: flex-start; gap: 18px; }
  html[data-ride-mode="baked"] .latest-all { font-size: 12px; }
  html[data-ride-mode="baked"] .hscroll, html[data-ride-mode="baked"] .apps-scroll { padding-inline: 24px; gap: 16px; }
  html[data-ride-mode="baked"] .apps-scroll { gap: 0; }
  html[data-ride-mode="baked"] .slip { padding: 22px; }
  html[data-ride-mode="baked"] .scene-object { --object-scale: .40; }
  /* The first leaf fits the screen; the second peeks in from the right. */
  html[data-ride-mode="baked"] [data-object="ledger"] { --object-scale: .68; }
  html[data-ride-mode="baked"] .ledger-scroller { padding-inline: 10px; scroll-padding-inline: 10px; }
  html[data-ride-mode="baked"] [data-object^="film"] { --object-scale: .34; }
  html[data-ride-mode="baked"] [data-object^="stand"] { --object-scale: .36; }
  html[data-ride-mode="baked"] .fragments--intro { padding: 100px 12vw 80px; }
  html[data-ride-mode="baked"] .overheard { margin: -140px 24px 0; }
  html[data-ride-mode="baked"] .fragments--deep { padding: 100px 6vw; }
  html[data-ride-mode="baked"] .frag-field { display: block; }
  html[data-ride-mode="baked"] .frag-field .fragment,
  html[data-ride-mode="baked"] .frag-field .fragment:nth-child(even) { margin: 0 0 32px; font-size: 21px; line-height: 1.85; }
  html[data-ride-mode="baked"] .frag-field .fragment--ja { line-height: 1.95; }
  html[data-ride-mode="baked"] .journal-writing { margin: 80px 12px 0; }
  html[data-ride-mode="baked"] .journal-entries { gap: 16px; }
  .journal-creature { width: 120px; height: 144px; }
  html[data-ride-mode="baked"] .corkboard { padding: 120px 16px 100px; }
  html[data-ride-mode="baked"] .corkboard-title { font-size: 17px; letter-spacing: .12em; }
  /* On a phone the board is a backdrop and the badges sit in a plain row over it. */
  html[data-ride-mode="baked"] .corkboard [data-object="board"] { width: 100%; height: auto; }
  html[data-ride-mode="baked"] .corkboard [data-object="board"] .object-stage { width: 100%; height: auto; padding: 16% 8%; transform: none; }
  html[data-ride-mode="baked"] .corkboard .corkboard-row { position: relative; display: flex; flex-wrap: wrap; justify-content: center; gap: 18px 14px; }
  html[data-ride-mode="baked"] .corkboard [data-object="board"] .object-surface { position: static; width: 132px; height: 47px; transform: none; }
  .corkboard-ours .pin img { width: 132px; height: 47px; }
  html[data-ride-mode="baked"] .transmission .exit-door { --object-scale: .36; }
  html[data-ride-mode="baked"] .transmission { padding: 100px 20px 80px; }
  html[data-ride-mode="baked"] .transmission-body { padding: 20px; }
  .scene-loading { max-width: calc(100vw - 32px); white-space: nowrap; }
}
@media (prefers-reduced-motion: reduce) {
  .scene-loading::before { animation: none; }
  .journal-creature { transition: none; }
  .journal-entries a:hover .journal-creature, .journal-entries a:focus-visible .journal-creature { transform: none; }
  html[data-ride-mode="baked"] [data-object^="bottle"] .object-stage { transition: none; transform: none; }
}
