/* ============================================================
   rooms.css: More About Me (the light room), Watch Me Win (the
   cinema), Say Hi (the quiet corner and the monument), and the
   empty stage (404).
   ============================================================ */

/* ============ shared: prose on either field ============ */
.room .prose p { margin: 0 0 0.95em; }
.win .prose, .win .prose .quote { color: var(--warm); }
.win .prose .quote::before { color: var(--gold); }
.win .prose .src { color: var(--warm-faint); }
.onward .btn { min-height: 48px; }

/* ================= MORE ABOUT ME: the house lights are up ================= */
.about { padding: 0; color: var(--ink); }
/* the story keeps the page's old margins; the blue quote and the footer run edge to edge */
.story {
  max-width: calc(1180px + 2 * var(--gutter)); margin: 0 auto;
  padding: calc(max(14px, env(safe-area-inset-top)) + 118px) var(--gutter) clamp(40px, 8vh, 90px);
}
.story__text .src { font: italic 400 1.05rem/1.5 var(--font-text); color: var(--ink-faint); margin-top: 1.6em; }
.story__head { max-width: 920px; margin: 0 0 clamp(44px, 8vh, 96px); }
.story__kicker { margin-bottom: 14px; }
.story__title {
  font: 400 var(--t-h1)/1.02 var(--font-display);
  color: var(--ink); letter-spacing: -0.012em;
  text-wrap: balance;
}
/* what he has done, moved here from the home page (2 October 2026): three facts in small tracked capitals */
.story__proof { list-style: none; margin: 22px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 26px;
  font: 500 var(--t-micro)/1.5 var(--font-ui); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); }
.story__proof li { display: flex; align-items: baseline; gap: 10px; white-space: nowrap; }
.story__proof li::before { content: ""; flex: none; width: 5px; height: 5px; transform: translateY(-2px) rotate(45deg); background: var(--gold-deep); }
@media (max-width: 760px) { .story__proof { display: grid; } .story__proof li { white-space: normal; } }

/* his Chinese name (moved here from the home page's act 2, 2 October 2026): the three lacquered tiles of the
   folding screen, the pinyin under each, and where each character was taken from, his characters lit in gold */
.namecard {
  max-width: calc(1180px + 2 * var(--gutter)); margin: 0 auto;
  min-height: 100vh; min-height: 100svh; align-content: center;
  padding: clamp(60px, 12vh, 130px) var(--gutter) clamp(40px, 8vh, 90px);
  display: grid; justify-items: center; text-align: center;
}
.namecard__tiles { display: flex; gap: clamp(10px, 1.6vw, 22px); margin-top: clamp(22px, 4vh, 40px); }
.namecard__tile { margin: 0; display: grid; justify-items: center; gap: 14px; }
.namecard__char {
  position: relative; display: grid; place-items: center;
  width: clamp(84px, 10vw, 160px); aspect-ratio: 5 / 6; border-radius: 12px;
  background:
    radial-gradient(90% 60% at 50% 0%, rgba(var(--lamp), 0.2), rgba(var(--lamp), 0) 70%),
    linear-gradient(180deg, #4C2328 0%, #331318 55%, #230b0f 100%);
  box-shadow: inset 0 0 0 1px rgba(212, 168, 83, 0.36), inset 0 1px 0 rgba(255, 228, 180, 0.28), var(--shadow-print);
}
.namecard__char::before {                 /* the lacquer's inner frame */
  content: ""; position: absolute; top: 8px; right: 8px; bottom: 8px; left: 8px;
  border: 1px solid rgba(212, 168, 83, 0.22); border-radius: 7px;
}
.namecard__glyph {
  position: relative; font: 900 clamp(54px, 7.2vw, 118px)/1 var(--font-zh); color: transparent;
  background: var(--grad-gold); -webkit-background-clip: text; background-clip: text;
  filter: drop-shadow(0 0 16px rgba(234, 203, 134, 0.22));
}
.namecard__py { font: 400 clamp(0.95rem, 0.85rem + 0.35vw, 1.2rem)/1 var(--font-ui); letter-spacing: 0.1em; }
/* him under the tiles: a lamp from above, his portrait fading into the floor, the sources of his name at his feet */
.namecard__stage { position: relative; width: min(900px, 100%); margin-top: clamp(4px, 1.5vh, 16px); display: grid; justify-items: center; }
.namecard__lamp {
  position: absolute; left: 50%; top: -6%; width: min(760px, 100%); height: 100%; transform: translateX(-50%); pointer-events: none;
  background: radial-gradient(38% 46% at 50% 34%, rgba(var(--lamp), 0.26), rgba(var(--lamp), 0.07) 55%, rgba(var(--lamp), 0) 75%);
}
.namecard__portrait {
  position: relative; display: block; width: auto; height: clamp(280px, 47vh, 520px); max-width: 100%;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 58%, transparent 96%);
          mask-image: linear-gradient(180deg, #000 0%, #000 58%, transparent 96%);
}
.namecard__sources {
  position: absolute; left: 0; right: 0; bottom: 2%;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 14px clamp(40px, 7vw, 110px);
}
.namecard__source { text-shadow: 0 2px 18px rgba(18, 4, 5, 0.9); }
@media (max-width: 760px) {
  .namecard__portrait { height: clamp(260px, 46vh, 420px); }
  .namecard__sources { position: relative; bottom: auto; margin-top: -18%; gap: 14px 28px; }
}
.namecard__source { display: grid; justify-items: center; gap: 6px; }
.namecard__zh { font: 700 clamp(1.9rem, 1.4rem + 1.4vw, 2.8rem)/1.1 var(--font-zh); letter-spacing: 0.1em; margin-right: -0.1em; color: rgba(247, 239, 228, 0.28); }
.namecard__zh .is-his { color: var(--gold); }
.namecard__gloss { font: italic 400 clamp(1.1rem, 0.95rem + 0.45vw, 1.4rem)/1.3 var(--font-text); color: var(--warm); }
.namecard .namecard__py { color: var(--gold); }
.namecard .eyebrow { color: var(--gold); }
/* the house lights go down for his name (about.js), and the story's tail, if still in view, reads warm */
html[data-field="dark"] .story__text, html[data-field="dark"] .story__text .src { color: var(--warm-muted); }
.story__text { transition: color var(--dur-lights) var(--ease-grace); }   /* its revealing lines fade colour inside .rv */

.story__grid {
  display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: clamp(36px, 6.5vw, 104px); align-items: start;
}
.story__photo { position: sticky; top: 112px; margin: 0; }
.story__window {
  position: relative; overflow: hidden;
  aspect-ratio: 776 / 950; border-radius: var(--r-photo);
  background: var(--ivory-2);
  box-shadow: var(--shadow-print);
}
.story__window img {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.16);
  will-change: transform;
}
.story__text { max-width: 36em; padding-top: 6px; font-size: var(--t-body); color: var(--ink); }
.story__text .lead { font-size: var(--t-lead); line-height: 1.45; }

.story__turn {
  min-height: 78vh; display: grid; place-items: center;
  padding: 14vh 0 12vh;
}
.magic {
  max-width: 17em; text-align: center;
  font: italic 400 clamp(2.05rem, 1.1rem + 3.6vw, 4.5rem)/1.16 var(--font-text);
  color: var(--ink); text-wrap: balance;
}
.magic__word { position: relative; display: inline-block; }
.magic__ghost { position: absolute; left: 0; top: 0; opacity: 0.2; }   /* Magic Text: the ghost at 20 % */
.magic__lit { position: relative; opacity: 0; }

.story__coda { max-width: 36em; margin: 0 auto; font-size: var(--t-body); }
.story__coda .src { font: italic 400 1.05rem/1.5 var(--font-text); color: var(--ink-faint); margin-top: 1.6em; }
.story__onward { max-width: 36em; margin: clamp(56px, 9vh, 96px) auto 0; }

@media (max-width: 860px) {
  .about { padding-top: calc(max(14px, env(safe-area-inset-top)) + 92px); }
  .story__grid { grid-template-columns: 1fr; gap: 36px; }
  .story__photo { position: relative; top: auto; }
  .story__window { aspect-ratio: 4 / 4.4; }
  .story__turn { min-height: 64vh; padding: 10vh 0 8vh; }
}

/* ================= WATCH ME WIN: the cinema ================= */
/* no padding under the footer: the room once ended in the game and needed air; now the footer is its floor,
   and the old 90 to 150 px ran the page on past his name (his note, 2 October 2026) */
.win { padding-bottom: 0; }

.portal { position: relative; isolation: isolate; --gp-height: 100vh; --gp-length: 2; }
.portal__probe {
  position: absolute; top: 0; left: 0; width: 0;
  height: 100vh; height: 100svh;
  visibility: hidden; pointer-events: none;
}
.portal__pin { position: relative; height: var(--gp-height); overflow: hidden; overflow: clip; isolation: isolate; }
.portal[data-gp-motion="on"] .portal__pin { position: -webkit-sticky; position: sticky; top: 0; }
.portal__field { position: absolute; top: 0; right: 0; bottom: 0; left: 0; opacity: 0; pointer-events: none;
  /* the stage's floor falls away into the dark of the room (his note, 3 October 2026): the red and its floor glow
     ended in a hard line where the report begins; now they fade into the same velvet the report stands on */
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 74%, transparent 100%);
          mask-image: linear-gradient(180deg, #000 0%, #000 74%, transparent 100%); }
.portal[data-gp-ready] .portal__field { opacity: 1; }
/* the Chinese Bridge stage: red light and a gold lamp, seen through the character */
.portal__fieldart {
  position: absolute; top: 0; right: 0; bottom: 0; left: 0;
  transform: scale(var(--gp-field-scale, 1));
  background: linear-gradient(180deg, #A51F28 0%, #841820 42%, #520A11 100%);
}
/* the lamp and the floor light come up as you land on the stage (--gp-lamp, 0 to 1) */
.portal__lamp {
  position: absolute; left: 50%; top: 0; width: 110%; height: 90%;
  background: radial-gradient(42% 40% at 50% 40%, rgba(255, 210, 150, 0.78), rgba(255, 190, 120, 0.22) 45%, rgba(255, 190, 120, 0) 72%);
  opacity: calc(0.18 + 0.82 * var(--gp-lamp, 0));
  transform: translate(-50%, calc((1 - var(--gp-lamp, 0)) * -22%)) scale(calc(0.72 + 0.4 * var(--gp-lamp, 0)));
}
.portal__floor {
  position: absolute; left: 50%; bottom: -18%; width: 130%; height: 60%;
  background: radial-gradient(50% 50% at 50% 50%, rgba(234, 190, 110, 0.5), rgba(234, 190, 110, 0) 70%);
  opacity: calc(0.1 + 0.9 * var(--gp-lamp, 0));
  transform: translate(-50%, calc((1 - var(--gp-lamp, 0)) * 30%));
}
.portal__art { position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.portal__glyph { font-family: "LK Song", "Songti SC", "STSong", serif; font-weight: 900; font-size: 100px; font-kerning: none; letter-spacing: 0; }

.portal__front { position: absolute; top: 0; right: 0; bottom: 0; left: 0; opacity: var(--gp-caption, 1); pointer-events: none; }
.portal__title {
  position: absolute; left: 24px; right: 24px;
  bottom: calc(100% - var(--gp-word-top, 30%) + 30px);
  text-align: center;
  font: 400 clamp(2.2rem, 1.5rem + 2.6vw, 4rem)/1.04 var(--font-display);
  color: var(--warm);
}
.portal__caption {
  position: absolute; left: 24px; right: 24px;
  top: calc(var(--gp-word-bottom, 62%) + 38px);
  display: flex; justify-content: center;
  opacity: var(--gp-caption, 1); pointer-events: var(--gp-caption-hit, auto);
}
.portal__caption:focus-within { opacity: 1; pointer-events: auto; }
.portal__enter {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 46px; padding: 0 20px; border-radius: var(--r-pill);
  border: 1px solid var(--line-dark);
  font: italic 400 1.1rem/1 var(--font-text); color: var(--warm-muted);
  transition: border-color var(--dur-hover) var(--ease-ui), color var(--dur-hover) var(--ease-ui);
}
.portal__enter svg { width: 18px; height: 18px; animation: enter-nudge 2.4s var(--ease-inout) infinite; }
@keyframes enter-nudge { 0%, 55%, 100% { transform: translateY(0); } 75% { transform: translateY(4px); } }
@media (prefers-reduced-motion: reduce) { .portal__enter svg { animation: none; } }
@media (hover: hover) and (pointer: fine) { .portal__enter:hover { border-color: var(--gold-line); color: var(--gold-bright); } }

.portal__content {
  position: relative; z-index: 1;
  min-height: var(--gp-height);
  display: grid; place-items: center;
  padding: calc(max(14px, env(safe-area-inset-top)) + 84px) var(--gutter) 48px;
  background: linear-gradient(180deg, #901A22 0%, #5B0C13 70%, var(--velvet-900) 100%);
}
.portal__content:focus { outline: none; }
.portal[data-gp-motion="on"] .portal__content {
  margin-top: calc((var(--gp-length) - 1) * var(--gp-height));
  background: transparent;
  opacity: var(--gp-reveal, 0); pointer-events: none;
}
.portal[data-gp-motion="on"][data-gp-entered="true"] .portal__content,
.portal[data-gp-motion="on"] .portal__content:focus-within { opacity: 1; pointer-events: auto; }

/* the screen */
.bigscreen { width: min(1080px, 100%); margin: 0; }
.bigscreen__frame {
  position: relative; aspect-ratio: 16 / 9; border-radius: 18px; overflow: hidden;
  background: var(--velvet-900);
  box-shadow: 0 60px 120px -40px rgba(20, 0, 3, 0.85), 0 0 0 1px rgba(255, 230, 190, 0.1);
}
.bigscreen__poster {
  position: absolute; top: 0; right: 0; bottom: 0; left: 0;
  display: grid; grid-template-rows: auto 1fr auto;
  padding: clamp(18px, 3vw, 38px);
  background:
    radial-gradient(60% 55% at 50% 42%, rgba(154, 28, 36, 0.55), rgba(154, 28, 36, 0) 72%),
    radial-gradient(40% 40% at 50% 20%, rgba(var(--lamp), 0.16), rgba(var(--lamp), 0) 70%),
    linear-gradient(180deg, #2A0B10 0%, var(--velvet-900) 100%);
}
.bigscreen__credit { font: italic 400 clamp(0.98rem, 0.9rem + 0.3vw, 1.15rem)/1.2 var(--font-text); color: var(--warm-muted); }
.bigscreen__play {
  justify-self: center; align-self: center;
  width: clamp(72px, 8.5vw, 104px); aspect-ratio: 1; border-radius: 50%;
  display: grid; place-items: center;
  color: #2A1206; background: var(--grad-gold);
  box-shadow: 0 22px 44px -18px rgba(212, 168, 83, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  transition: transform var(--dur-hover) var(--ease-ui), box-shadow var(--dur-hover) var(--ease-ui);
}
.bigscreen__play svg { width: 38%; height: 38%; margin-left: 7%; }
.bigscreen__play:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) {
  .bigscreen__play:hover { transform: scale(1.05); box-shadow: 0 28px 54px -18px rgba(212, 168, 83, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.5); }
}
.bigscreen__headline {
  max-width: 22ch;
  font: 400 clamp(1.25rem, 0.95rem + 1.3vw, 2.3rem)/1.12 var(--font-display);
  color: var(--warm); text-wrap: balance;
}
.bigscreen .screen { top: 0; right: 0; bottom: 0; left: 0; }
.bigscreen .screen iframe { border-radius: 0; height: 100%; }
.bigscreen__cap { margin-top: 16px; text-align: center; font: italic 400 1.08rem/1.3 var(--font-text); color: var(--warm-muted); }

.win__words { max-width: 38em; margin: clamp(90px, 15vh, 170px) auto 0; padding: 0 var(--gutter); font-size: var(--t-body); }
.win__title { font: 400 var(--t-h2)/1.05 var(--font-display); color: var(--warm); margin: 10px 0 28px; }
.win__onward { max-width: 38em; margin: clamp(56px, 9vh, 96px) auto 0; padding: 0 var(--gutter); }

@media (max-width: 760px) {
  .portal__content { padding-top: calc(max(14px, env(safe-area-inset-top)) + 72px); }
  .bigscreen__frame { border-radius: 14px; }
  .bigscreen__poster { padding: 14px 16px; }
}

/* ================= SAY HI: the quiet corner ================= */
.hi { min-height: 100vh; min-height: 100svh; display: grid; grid-template-rows: 1fr auto; overflow: hidden; }
.hi__stage {
  display: grid; justify-items: center; align-content: center; gap: 30px;
  padding: calc(max(14px, env(safe-area-inset-top)) + 96px) var(--gutter) 36px;
}
.note {
  position: relative;
  width: min(640px, 100%);
  padding: clamp(28px, 5vw, 56px);
  border-radius: var(--r-sheet);
  background: var(--ivory); color: var(--ink);
  box-shadow: var(--shadow-sheet), inset 0 1px 0 #fff;
}
.note::after {
  content: ""; position: absolute; left: 14%; right: 14%; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent); opacity: 0.7;
}
.note__kicker { font: 700 1.5rem/1 var(--font-zh); color: var(--gold-deep); letter-spacing: 0.06em; }
.note__title { font: 400 clamp(2.1rem, 1.45rem + 2.2vw, 3.3rem)/1.04 var(--font-display); color: var(--ink); margin: 14px 0 20px; text-wrap: balance; }
.note__body { font-size: clamp(1.1rem, 1.02rem + 0.3vw, 1.22rem); color: var(--ink); }
/* the three doors: who each is for, and where to go */
.note__intro { font: italic 400 var(--t-lead)/1.35 var(--font-text); color: var(--ink-soft); margin-bottom: 22px; }
.doors-list { list-style: none; margin: 0 0 24px; padding: 0; counter-reset: door; }
.door-item {
  counter-increment: door; position: relative;
  padding: 18px 0 18px 44px; border-top: 1px solid var(--line-light);
  font-size: clamp(1.06rem, 1rem + 0.25vw, 1.16rem); line-height: 1.55; color: var(--ink);
}
.door-item:last-child { border-bottom: 1px solid var(--line-light); }
.door-item::before {
  content: counter(door, decimal-leading-zero); position: absolute; left: 0; top: 21px;
  font: 500 var(--t-micro)/1 var(--font-ui); letter-spacing: 0.12em; color: var(--gold-deep);
}
.door-item__title { font: 400 clamp(1.35rem, 1.15rem + 0.6vw, 1.6rem)/1.1 var(--font-display); color: var(--ink); margin-bottom: 6px; }
.note__links { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.note__link svg { width: 18px; height: 18px; }
.hi__onward { justify-content: center; }

/* exit like a monument (L5): his name, gold at the top, sinking into the floor */
.monument { position: relative; text-align: center; padding-top: 12px; pointer-events: none; }
.monument__creed { font: italic 400 1.02rem/1.3 var(--font-text); color: var(--warm-faint); margin-bottom: 10px; padding: 0 var(--gutter); }
.monument__name {
  font: 400 clamp(2.7rem, 12.2vw, 13.5rem)/0.82 var(--font-display);
  letter-spacing: -0.02em; white-space: nowrap;
  color: transparent;
  background: linear-gradient(180deg, rgba(240, 214, 156, 0.62) 0%, rgba(214, 170, 90, 0.4) 34%, rgba(185, 138, 62, 0.12) 64%, rgba(185, 138, 62, 0) 86%);
  -webkit-background-clip: text; background-clip: text;
  margin-bottom: -0.16em;
}

/* ================= 404: the empty stage ================= */
.lost { height: 100vh; height: 100svh; min-height: 560px; overflow: hidden; display: grid; place-items: center; text-align: center; }
.lost__stage { position: absolute; top: 0; right: 0; bottom: 0; left: 0; pointer-events: none; }
.lost__glyph {
  position: absolute; left: 50%; top: 46%;
  font: 900 min(88vh, 92vw)/1 var(--font-zh); color: transparent;
  background: linear-gradient(to bottom, rgba(234, 203, 134, 0.14), rgba(234, 203, 134, 0.02) 85%);
  -webkit-background-clip: text; background-clip: text;
  transform: translate(-50%, -50%); opacity: 0;
  transition: opacity 2200ms var(--ease-grace);
}
.lost.is-lit .beam, .lost.is-lit .pool, .lost.is-lit .lost__glyph { opacity: 1; }
.lost__words { position: relative; z-index: 2; max-width: 760px; padding: 0 var(--gutter); }
.lost__title { font: 400 var(--t-h1)/1.04 var(--font-display); color: var(--warm); text-wrap: balance; }
.lost__body { margin: 16px 0 30px; font: italic 400 var(--t-lead)/1.35 var(--font-text); color: var(--warm-muted); }
.lost__onward { justify-content: center; }

@media (prefers-reduced-motion: reduce) {
  .portal__pin { position: relative !important; }
  .portal .portal__content { margin-top: 0 !important; opacity: 1 !important; pointer-events: auto !important; background: linear-gradient(180deg, #901A22 0%, #5B0C13 70%, var(--velvet-900) 100%) !important; }
  .magic__lit { opacity: 1 !important; }
  .story__window img { transform: scale(1.02) !important; }
}

/* ================= WATCH ME WIN: the island, then the report (2 October 2026) ================= */
.report { display: grid; place-items: center; padding: clamp(90px, 14vh, 160px) var(--gutter) 0; }
.bigscreen__cap .btn svg { width: 16px; height: 16px; }

/* where the game stood, the island invites you in (the panel itself is .isle, in shared.css) */
.win .isle { width: min(1040px, 100%); aspect-ratio: 16 / 9; }
@media (max-width: 760px) { .win .isle { aspect-ratio: 4 / 4.6; } }

/* ================= NOTES: his writing, a light room ================= */
.notes { padding: calc(max(14px, env(safe-area-inset-top)) + 118px) var(--gutter) clamp(90px, 14vh, 150px); color: var(--ink); }
.notes-index, .note-page { max-width: 940px; margin: 0 auto; }
.notes-index__title { font: 400 var(--t-h1)/1.02 var(--font-display); color: var(--ink); margin-top: 12px; text-wrap: balance; }
.notes-index__intro { font: italic 400 var(--t-lead)/1.4 var(--font-text); color: var(--ink-soft); max-width: 34em; margin: 18px 0 clamp(40px, 7vh, 72px); }
/* the list: Project Showcase (harvest/project-showcase), ported to the site's type and light field */
.showcase { list-style: none; }
.showcase > li { border-top: 1px solid var(--line-light); }
.showcase > li:last-child { border-bottom: 1px solid var(--line-light); }
.sc-row {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "main date";
  gap: 16px; align-items: start; padding: 26px 0; color: var(--ink); outline: none;
}
.sc-row__plate {
  position: absolute; top: 0; bottom: 0; left: -16px; right: -16px; border-radius: 8px; z-index: 0;
  background: rgba(156, 199, 236, 0.16); opacity: 0; transform: scale(0.95);
  transition: opacity 300ms ease-out, transform 300ms ease-out;
}
.sc-row__main, .sc-row__date, .sc-row__cover { position: relative; z-index: 1; }
.sc-row__main { grid-area: main; min-width: 0; }
.sc-row__head { display: inline-flex; align-items: center; gap: 10px; }
.sc-row__title { position: relative; font: 400 clamp(1.5rem, 1.15rem + 1vw, 2.2rem)/1.15 var(--font-display); color: var(--ink); }
.sc-row__title::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 1px; width: 0; background: currentColor;
  transition: width 300ms ease-out;
}
.sc-row__arrow {
  flex: none; width: 20px; height: 20px; color: var(--sky-ink); opacity: 0; transform: translate(-8px, 8px);
  transition: opacity 300ms ease-out, transform 300ms ease-out;
}
.sc-row__summary { display: block; margin-top: 6px; font: 400 1.1rem/1.55 var(--font-text); color: var(--ink-soft); max-width: 36em; transition: color 300ms ease-out; }
.sc-row__date { grid-area: date; padding-top: 0.55em; font: italic 400 1.02rem/1.3 var(--font-text); color: var(--ink-faint); white-space: nowrap; transition: color 300ms ease-out; }
.sc-row__cover { display: none; grid-area: cover; }
.sc-row.is-hover .sc-row__plate, .sc-row:focus-visible .sc-row__plate { opacity: 1; transform: scale(1); }
.sc-row.is-hover .sc-row__title::after, .sc-row:focus-visible .sc-row__title::after { width: 100%; }
.sc-row.is-hover .sc-row__arrow, .sc-row:focus-visible .sc-row__arrow { opacity: 1; transform: translate(0, 0); }
.sc-row.is-hover .sc-row__summary, .sc-row:focus-visible .sc-row__summary { color: var(--ink); }
.sc-row.is-hover .sc-row__date, .sc-row:focus-visible .sc-row__date { color: var(--ink-soft); }
.sc-row:focus-visible .sc-row__plate { box-shadow: 0 0 0 2px var(--sky-ink); }

/* the picture that follows the pointer (lives on <body>, so no room transform can move it) */
.sc-float {
  position: fixed; top: 0; left: 0; z-index: 40; pointer-events: none;
  width: 280px; height: 180px; border-radius: 12px; overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(53, 25, 30, 0.35);
  opacity: 0; scale: 0.8;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), scale 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.sc-float.is-on { opacity: 1; scale: 1; }
.sc-float__frame { position: relative; width: 100%; height: 100%; background: var(--ivory-2); }
.sc-float__frame img, .sc-float__blank {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; scale: 1.1; filter: blur(10px);
  transition: opacity 500ms ease-out, scale 500ms ease-out, filter 500ms ease-out;
}
.sc-float__frame .is-on { opacity: 1; scale: 1; filter: none; }
.sc-float__shade { position: absolute; top: 0; right: 0; bottom: 0; left: 0; background: linear-gradient(to top, rgba(252, 248, 243, 0.2), transparent); }
html:not([data-room="notes"]) .sc-float { display: none; }

/* touch screens have no hover: the picture sits just above its title, and the arrow always shows */
@media (hover: none), (pointer: coarse) {
  .sc-row { grid-template-columns: minmax(0, 1fr); grid-template-areas: "cover" "date" "main"; gap: 10px; }
  .sc-row__cover { display: block; aspect-ratio: 16 / 10; border-radius: 12px; overflow: hidden; margin-bottom: 8px; box-shadow: var(--shadow-print); }
  .sc-row__cover img { width: 100%; height: 100%; object-fit: cover; }
  .sc-row__date { padding-top: 0; }
  .sc-row__arrow { opacity: 1; transform: none; }
  .sc-row__plate { left: -10px; right: -10px; }
}
@media (prefers-reduced-motion: reduce) {
  .sc-float, .sc-float__frame img, .sc-float__blank { transition: opacity 150ms linear; scale: 1; filter: none; }
}
.note-page__back { margin-bottom: 30px; font: italic 400 1.08rem/1 var(--font-text); }
.note-page__meta { font: italic 400 1.05rem/1.3 var(--font-text); color: var(--ink-faint); }
.note-page__title { font: 400 var(--t-h1)/1.04 var(--font-display); color: var(--ink); margin: 12px 0 0; text-wrap: balance; }
.note-page__summary { font: italic 400 var(--t-lead)/1.45 var(--font-text); color: var(--ink-soft); margin-top: 18px; max-width: 34em; }
.note-page__body { max-width: 36em; margin-top: clamp(36px, 6vh, 56px); font-size: var(--t-body); color: var(--ink); }
.note-page__body h2, .note-page__body h3, .note-page__body h4 { font: 400 clamp(1.5rem, 1.2rem + 1vw, 2.1rem)/1.15 var(--font-display); margin: 1.6em 0 0.5em; }
.note-page__body img { border-radius: var(--r-photo); margin: 1.4em 0; box-shadow: var(--shadow-print); }
.note-page__body ul, .note-page__body ol { padding-left: 1.3em; margin: 0 0 1em; }
.note-page__body li { margin: 0.3em 0; }
.note-page__body hr { border: 0; height: 1px; background: var(--line-light); margin: 2.2em 0; }
.note-page__onward { margin-top: clamp(56px, 9vh, 96px); }
@media (max-width: 760px) {
  .notes { padding-top: calc(max(14px, env(safe-area-inset-top)) + 92px); }
}

/* ---- the reading switch (his asks, 2 October 2026): fixed in the right-hand margin beside the article, so it
        stays with the reader all the way down; a rectangle, not too big; his two little pages (ivory, maroon) as
        the choices, as the iPhone shows Light and Dark; Apple's liquid glass for the tile and the slider (after
        liquid-glass-js, MIT, rebuilt light: see tools/glass_map.py). Where the margin is too narrow (notes.js
        decides) it folds into a small pill at the bottom right. ---- */
.readmode {
  position: fixed; z-index: 45; top: 50%;
  right: max(24px, calc((100vw - var(--col, 780px)) / 4 - 112px));      /* the middle of the right-hand margin */
  width: 224px; padding: 12px 10px 10px; border-radius: 22px;
  display: grid; gap: 9px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.46));
  -webkit-backdrop-filter: blur(14px) saturate(1.8); backdrop-filter: blur(14px) saturate(1.8);
  box-shadow: 0 16px 36px -18px rgba(53, 25, 30, 0.38), 0 2px 5px -2px rgba(53, 25, 30, 0.14),
              inset 0 0 0 1px rgba(255, 255, 255, 0.55), inset 0 1px 1px rgba(255, 255, 255, 0.95),
              inset 0 -1px 1px rgba(53, 25, 30, 0.06), inset 0 0 18px rgba(255, 255, 255, 0.35);
  opacity: 0; transform: translate3d(14px, -50%, 0);
  transition: opacity 500ms var(--ease-ui), transform 700ms var(--ease-grace),
              background 900ms var(--ease-grace), box-shadow 900ms var(--ease-grace);
}
/* the bend at the rim, where the browser can do it (notes.js adds .is-refract in Chrome and Edge) */
.readmode.is-refract { -webkit-backdrop-filter: url(#lk-glass) blur(10px) saturate(1.8); backdrop-filter: url(#lk-glass) blur(10px) saturate(1.8); }
.readmode.is-on { opacity: 1; transform: translate3d(0, -50%, 0); }
html:not([data-room="notes"]) .readmode { display: none; }
.readmode__label { padding: 0 6px; font: 600 0.68rem/1 var(--font-ui); letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-faint); }
.readmode__opts {
  position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 16px;
  background: rgba(118, 118, 128, 0.12);                              /* the iOS track */
}
/* the slider: a drop of glass that glides to the page in use */
.readmode__thumb {
  position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 6px); border-radius: 12px;
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.8));
  box-shadow: 0 3px 8px rgba(53, 25, 30, 0.14), 0 1px 1px rgba(53, 25, 30, 0.06),
              inset 0 1px 0 #fff, inset 0 -1px 2px rgba(53, 25, 30, 0.05);
  transition: transform 520ms cubic-bezier(0.34, 1.36, 0.5, 1), background 900ms var(--ease-grace), box-shadow 900ms var(--ease-grace);
}
.readmode[data-on="maroon"] .readmode__thumb { transform: translateX(calc(100% + 4px)); }
.readmode__opt {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 9px; padding: 6px 8px; min-height: 48px; border-radius: 12px;
  font: 600 0.84rem/1 var(--font-ui); color: var(--ink-soft);
  transition: color 300ms var(--ease-ui);
}
.readmode__opt[aria-pressed="true"] { color: var(--ink); }
@media (hover: hover) and (pointer: fine) { .readmode__opt[aria-pressed="false"]:hover { color: var(--ink); } }
.readmode__opt:focus-visible { outline: 2px solid var(--sky-ink); outline-offset: -1px; }
.readmode__page { display: block; flex: none; width: 27px; height: 36px; border-radius: 6px;
  box-shadow: 0 3px 8px -4px rgba(53, 25, 30, 0.5); transition: transform 450ms cubic-bezier(0.3, 1.5, 0.5, 1); }
.readmode__opt[aria-pressed="true"] .readmode__page { transform: scale(1.06); }
.readmode__page svg { width: 100%; height: 100%; }
.rm-aa { font: 400 11px/1 "Gloock", Georgia, serif; }
.readmode__opt--ivory .rm-page { fill: #FCF8F3; stroke: rgba(53, 25, 30, 0.18); }
.readmode__opt--ivory .rm-aa { fill: #35191E; }
.readmode__opt--ivory .rm-line { fill: rgba(53, 25, 30, 0.24); }
.readmode__opt--maroon .rm-page { fill: #3A1A1F; stroke: rgba(247, 239, 228, 0.16); }
.readmode__opt--maroon .rm-aa { fill: #F7EFE4; }
.readmode__opt--maroon .rm-line { fill: rgba(247, 239, 228, 0.32); }
/* on maroon: smoked glass */
html[data-reading="maroon"] .readmode {
  background: linear-gradient(160deg, rgba(74, 34, 40, 0.62), rgba(42, 16, 21, 0.5));
  box-shadow: 0 16px 36px -18px rgba(0, 0, 0, 0.65), inset 0 0 0 1px rgba(247, 239, 228, 0.12),
              inset 0 1px 1px rgba(255, 255, 255, 0.14), inset 0 0 18px rgba(255, 220, 190, 0.05);
  --ink: var(--warm); --ink-soft: var(--warm-muted); --ink-faint: var(--warm-faint); --sky-ink: var(--sky);
}
html[data-reading="maroon"] .readmode__opts { background: rgba(0, 0, 0, 0.22); }
html[data-reading="maroon"] .readmode__thumb {
  background: linear-gradient(170deg, rgba(247, 239, 228, 0.24), rgba(247, 239, 228, 0.12));
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.28), inset 0 0 0 1px rgba(247, 239, 228, 0.1);
}
/* the small pill: the two pages only */
.readmode.is-pill {
  top: auto; bottom: max(16px, calc(env(safe-area-inset-bottom) + 10px)); right: max(14px, env(safe-area-inset-right));
  width: auto; padding: 5px; border-radius: 20px; transform: translate3d(0, 12px, 0);
}
.readmode.is-pill.is-on { transform: none; }
.readmode.is-pill .readmode__label, .readmode.is-pill .readmode__word { display: none; }
.readmode.is-pill .readmode__opts { padding: 3px; gap: 3px; border-radius: 16px; }
.readmode.is-pill .readmode__thumb { top: 3px; bottom: 3px; left: 3px; width: calc(50% - 4.5px); border-radius: 13px; }
.readmode.is-pill[data-on="maroon"] .readmode__thumb { transform: translateX(calc(100% + 3px)); }
.readmode.is-pill .readmode__opt { min-height: 0; padding: 6px 9px; justify-content: center; }
.readmode.is-pill .readmode__page { width: 22px; height: 29px; }
@media (prefers-reduced-motion: reduce) { .readmode, .readmode__thumb, .readmode__page { transition: opacity 200ms linear; } }

/* the article as one centred column (his note, 2 October 2026): title, picture and text share the same edges,
   in the middle of the page; the switch sits in the margin to its right */
.note-page { max-width: 780px; }
.note-page__body { max-width: none; }
.note-page__title { font-size: clamp(2.3rem, 1.3rem + 3vw, 4.1rem); }
.note-page__summary { max-width: none; }

/* on maroon: the backdrop behind the people's photographs (sheet.css, .sheet__stage), lit from above, held still
   behind the page; and the room's own words re-pointed at the warm ink, so every part of a note follows */
.atmos::before {
  content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; opacity: 0;
  background:
    radial-gradient(70% 50% at 50% 0%, rgba(var(--lamp), 0.13), rgba(var(--lamp), 0) 70%),
    radial-gradient(130% 100% at 50% 0%, #4d242a 0%, var(--velvet) 52%, var(--velvet-900) 100%);
  transition: opacity var(--dur-lights) var(--ease-grace);
}
html[data-reading="maroon"] .atmos::before { opacity: 1; }
html[data-reading="maroon"] .notes {
  --ink: var(--warm); --ink-soft: var(--warm-muted); --ink-faint: var(--warm-faint);
  --line-light: var(--line-dark); --gold-deep: var(--gold); --sky-ink: var(--sky);
  --shadow-print: var(--shadow-float);
}
html[data-reading="maroon"] .note-page__body { color: rgba(247, 239, 228, 0.9); }
html[data-reading="maroon"] .readmode__opt[aria-pressed="true"] { background: var(--sky-wash); }
html[data-reading="maroon"] .readmode__swatch { box-shadow: inset 0 0 0 1px rgba(247, 239, 228, 0.35); }
@media (hover: hover) and (pointer: fine) { html[data-reading="maroon"] .readmode__opt[aria-pressed="false"]:hover { background: rgba(247, 239, 228, 0.06); } }
html[data-reading="maroon"] .sc-row__plate { background: rgba(156, 199, 236, 0.08); }

/* SAY HI's letter by airmail lives in css/letter.css (2 October 2026): hi.js loads it with the room, and the
   island game's Say Hi card loads the same file, so the letter is one thing in two places. */
