/* ============================================================
   sheet.css: a mentor's note. Ivory paper floating over the dimmed
   globe (C4: it must never blend into the ground), with a small dark
   stage for the person, and his reflection beside it.
   ============================================================ */

html.sheet-open, html.sheet-open body { overflow: hidden; }

.sheet { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 300; }
.sheet__scrim {
  position: fixed; top: 0; right: 0; bottom: 0; left: 0;
  background: radial-gradient(120% 100% at 50% 40%, rgba(27, 7, 10, 0.5), rgba(18, 4, 5, 0.78));
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity 800ms var(--ease-grace);
}
.sheet__scroller {
  position: fixed; top: 0; right: 0; bottom: 0; left: 0;
  overflow-y: auto; overscroll-behavior: contain;
  display: flex;
  padding: clamp(16px, 4.5vh, 56px) var(--gutter);
}
.sheet__paper {
  position: relative; margin: auto;
  width: min(1080px, 100%);
  display: grid; grid-template-columns: minmax(0, 0.94fr) minmax(0, 1.06fr);
  background: var(--ivory);
  color: var(--ink);
  border-radius: var(--r-sheet);
  box-shadow: var(--shadow-sheet), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  overflow: hidden;
  opacity: 0; transform: translateY(38px) scale(0.985);
  transition: opacity var(--dur-open) var(--ease-grace), transform var(--dur-open) var(--ease-grace);
}
.sheet__paper:focus { outline: none; }
.sheet__paper::after {             /* a thread of gold along the top edge: the paper catches the lamp */
  content: ""; position: absolute; left: 12%; right: 12%; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.7; pointer-events: none;
}
.sheet.is-open .sheet__scrim { opacity: 1; }
.sheet.is-open .sheet__paper { opacity: 1; transform: none; }
.sheet.is-closing .sheet__scrim { opacity: 0; transition-duration: 760ms; }
.sheet.is-closing .sheet__paper { opacity: 0; transform: translateY(26px) scale(0.99); transition-duration: 700ms; }
.sheet.is-reset .sheet__paper, .sheet.is-reset .sheet__scrim { transition: none !important; }
.sheet.is-measure .sheet__paper { transform: none !important; }

.sheet__close {
  position: absolute; top: 16px; right: 16px; z-index: 6;
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  color: var(--ink);
  background: rgba(252, 248, 243, 0.92);
  box-shadow: 0 8px 20px -10px rgba(53, 25, 30, 0.45), inset 0 0 0 1px var(--line-light);
  transition: transform var(--dur-hover) var(--ease-ui), background-color var(--dur-hover) var(--ease-ui);
}
.sheet__close svg { width: 20px; height: 20px; }
@media (hover: hover) and (pointer: fine) { .sheet__close:hover { transform: rotate(90deg); background: #fff; } }

/* ---- the small dark stage for the person ---- */
.sheet__media { position: sticky; top: 0; align-self: start; padding: 14px; display: grid; grid-template-rows: auto auto; gap: 16px; align-content: start; }
.sheet__stage {
  position: relative; isolation: isolate;
  height: min(64vh, 560px);
  border-radius: 16px; overflow: hidden;
  display: grid; place-items: end center;
  perspective: 1200px;
  background:
    radial-gradient(70% 55% at 50% 22%, rgba(var(--lamp), 0.2), rgba(var(--lamp), 0) 70%),
    radial-gradient(130% 100% at 50% 0%, #4d242a 0%, var(--velvet) 52%, var(--velvet-900) 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06), inset 0 -40px 60px -30px rgba(12, 3, 5, 0.7);
}
.sheet__halo {
  position: absolute; top: -70px; right: -50px; bottom: -70px; left: -50px; z-index: 0;
  background: radial-gradient(50% 50% at 50% 42%, rgba(212, 168, 83, 0.22), transparent 70%);
  filter: blur(22px);
  transform: translate3d(0, 0, -40px);
  transition: transform 0.6s var(--ease-ui);
  pointer-events: none;
}
.sheet__cutout {
  position: relative; z-index: 2;
  width: auto; height: auto;
  max-width: 86%; max-height: calc(100% - 26px);
  object-fit: contain;
  filter: drop-shadow(0 30px 28px rgba(10, 2, 4, 0.6));
  transform: perspective(1200px) rotateX(0) rotateY(0) translateZ(0);
  transition: transform 0.6s var(--ease-ui), opacity 700ms var(--ease-grace);
  will-change: transform;
  user-select: none;
}
.sheet__floor {
  position: absolute; left: 8%; right: 8%; bottom: -8%; height: 26%; z-index: 1;
  background: radial-gradient(closest-side, rgba(var(--lamp), 0.2), rgba(var(--lamp), 0));
  pointer-events: none;
}
.sheet__stage.is-playing .sheet__cutout { opacity: 0; }
.sheet__stage.is-playing .sheet__halo, .sheet__stage.is-playing .sheet__floor { opacity: 0.35; }

.screen {
  position: absolute; top: 14px; right: 14px; bottom: 14px; left: 14px; z-index: 4;
  display: grid; place-items: center;
}
.screen iframe {
  width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0;
  border-radius: 12px; background: #0c0204;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.8);
}
.screen__wait {
  font: italic 400 1.15rem/1.3 var(--font-text); color: var(--warm-muted);
  animation: wait-breathe 2.4s ease-in-out infinite;
}
@keyframes wait-breathe { 0%, 100% { opacity: 0.45; } 50% { opacity: 1; } }
.screen__blocked { max-width: 34ch; text-align: center; display: grid; justify-items: center; gap: 12px; color: var(--warm); padding: 18px; }
.screen__msg { font: 400 clamp(1.3rem, 1.1rem + 0.6vw, 1.6rem)/1.25 var(--font-display); }
.screen__sub { font: italic 400 1.05rem/1.4 var(--font-text); color: var(--warm-muted); }
.screen__actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 6px; }
/* the screen is a dark stage even when it sits on ivory paper */
.on-light .screen .btn { color: var(--sky); border-color: var(--sky-line); background: var(--sky-wash); }
@media (hover: hover) and (pointer: fine) {
  .on-light .screen .btn:hover { border-color: var(--gold-line); background: rgba(247, 239, 228, 0.14); }
}
.screen__manual { font: 400 0.9rem/1.3 var(--font-ui); color: var(--warm-muted); display: grid; gap: 6px; width: 100%; }
.screen__manual input {
  width: 100%; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--line-dark); background: rgba(0, 0, 0, 0.25); color: var(--warm);
  font: 400 0.9rem/1 var(--font-ui);
}

/* video controls under the stage, on the paper */
.sheet__vctl { display: grid; gap: 10px; padding: 0 6px 6px; }
.vctl { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.vctl__title { flex: 1 1 200px; min-width: 0; font: italic 400 1.02rem/1.35 var(--font-text); color: var(--ink-soft); }
.vctl__out { white-space: nowrap; margin-left: 4px; }
.vctl--more .btn { min-height: 40px; }

/* a person's videos (3 October 2026): Play and a glass Playlist button on the card; the titles in a glass panel
   beside it (sheet.js places it). The glass follows the site's reading switch (rooms.css .readmode) and the
   apple-design-feel skill: frosted, a bright rim, light inside, a soft shadow, a springing selection. */
.plbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.plbtn {
  display: inline-flex; align-items: center; gap: 9px; min-height: 46px; padding: 0 8px 0 16px; border-radius: var(--r-pill);
  font: 700 var(--t-ui)/1 var(--font-ui); letter-spacing: 0.02em; color: var(--sky-ink);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.9), rgba(214, 231, 246, 0.62));
  box-shadow: 0 10px 22px -14px rgba(43, 94, 138, 0.6), 0 1px 3px rgba(43, 94, 138, 0.14),
              inset 0 0 0 1px rgba(43, 94, 138, 0.22), inset 0 1px 1px #fff, inset 0 -1px 1px rgba(43, 94, 138, 0.08);
  transition: transform 450ms cubic-bezier(0.34, 1.36, 0.5, 1), box-shadow var(--dur-hover) var(--ease-ui), background var(--dur-hover) var(--ease-ui);
}
.plbtn svg { width: 18px; height: 18px; flex: none; }
.plbtn__n { display: inline-grid; place-items: center; min-width: 28px; height: 28px; padding: 0 8px; border-radius: var(--r-pill);
  font-size: 0.8rem; color: #fff; background: linear-gradient(170deg, #4E86B8, var(--sky-ink)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35); }
@media (hover: hover) and (pointer: fine) { .plbtn:hover { transform: translateY(-2px); box-shadow: 0 14px 26px -14px rgba(43, 94, 138, 0.7), 0 1px 3px rgba(43, 94, 138, 0.14), inset 0 0 0 1px rgba(43, 94, 138, 0.32), inset 0 1px 1px #fff; } }
.plbtn:active { transform: scale(0.97); }
.plbtn[aria-expanded="true"] { background: linear-gradient(160deg, rgba(214, 231, 246, 0.95), rgba(156, 199, 236, 0.6)); }
.plbtn:focus-visible { outline: 2px solid var(--sky-ink); outline-offset: 3px; }

.plpanel {
  position: fixed; z-index: 8; display: flex; flex-direction: column; overflow: hidden;
  border-radius: 24px; color: var(--ink);
  background: linear-gradient(160deg, rgba(252, 248, 243, 0.9), rgba(244, 236, 227, 0.76));
  -webkit-backdrop-filter: blur(22px) saturate(1.7); backdrop-filter: blur(22px) saturate(1.7);
  box-shadow: 0 40px 80px -36px rgba(10, 2, 4, 0.8), 0 8px 20px -10px rgba(10, 2, 4, 0.45),
              inset 0 0 0 1px rgba(255, 255, 255, 0.6), inset 0 1px 1px #fff, inset 0 0 22px rgba(255, 255, 255, 0.35);
  opacity: 0; transform: translate3d(18px, 0, 0) scale(0.985);
  transition: opacity 360ms var(--ease-ui), transform 560ms cubic-bezier(0.34, 1.26, 0.5, 1);
}
.plpanel.is-open { opacity: 1; transform: none; }
.plpanel[data-mode="rise"] { border-radius: 24px 24px 0 0; transform: translate3d(0, 40px, 0); padding-bottom: env(safe-area-inset-bottom); }
.plpanel[data-mode="rise"].is-open { transform: none; }
.plpanel__head { position: relative; padding: 20px 64px 14px 22px; border-bottom: 1px solid var(--line-light); }
.plpanel__kicker { font: 600 0.7rem/1 var(--font-ui); letter-spacing: 0.18em; text-transform: uppercase; color: var(--sky-ink); }
.plpanel__name { margin-top: 8px; font: 400 1.45rem/1.1 var(--font-display); color: var(--ink); text-wrap: balance; }
.plpanel__count { margin-top: 6px; font: italic 400 1rem/1.2 var(--font-text); color: var(--ink-faint); }
.plpanel__close {
  position: absolute; top: 14px; right: 14px; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: var(--ink);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.6));
  box-shadow: 0 4px 10px -6px rgba(53, 25, 30, 0.4), inset 0 0 0 1px rgba(53, 25, 30, 0.1), inset 0 1px 0 #fff;
  transition: transform var(--dur-hover) var(--ease-ui);
}
.plpanel__close svg { width: 16px; height: 16px; }
@media (hover: hover) and (pointer: fine) { .plpanel__close:hover { transform: rotate(90deg); } }
.plpanel__close:focus-visible { outline: 2px solid var(--sky-ink); outline-offset: 2px; }
.plpanel__body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 8px; scrollbar-width: thin; scrollbar-color: rgba(53, 25, 30, 0.25) transparent; }
.pllist { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.pllist__row { display: flex; align-items: center; gap: 2px; }
.pllist__item {
  flex: 1; min-width: 0; min-height: 52px; display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 14px;
  text-align: left; font: italic 400 1.05rem/1.28 var(--font-text); color: var(--ink-soft);
  transition: background 300ms var(--ease-ui), color 300ms var(--ease-ui), box-shadow 300ms var(--ease-ui), transform 450ms cubic-bezier(0.34, 1.36, 0.5, 1);
}
.pllist__item > svg { width: 15px; height: 15px; flex: none; opacity: 0.6; }
.pllist__title { min-width: 0; text-wrap: pretty; }
.pllist__mark { position: relative; flex: none; width: 26px; height: 26px; display: grid; place-items: center; }
.pllist__i { font: 600 0.82rem/1 var(--font-ui); color: var(--ink-faint); transition: opacity 250ms var(--ease-ui); }
.pllist__eq { position: absolute; display: flex; align-items: flex-end; gap: 2px; height: 14px; opacity: 0; color: var(--gold-deep); transition: opacity 250ms var(--ease-ui); }
.pllist__eq i { display: block; width: 3px; height: 100%; border-radius: 1px; background: currentColor; transform-origin: 50% 100%; animation: pleq 0.9s var(--ease-inout) infinite alternate; }
.pllist__eq i:nth-child(2) { animation-delay: -0.35s; animation-duration: 0.7s; }
.pllist__eq i:nth-child(3) { animation-delay: -0.6s; animation-duration: 1.05s; }
@keyframes pleq { from { transform: scaleY(0.3); } to { transform: scaleY(1); } }
/* the one playing: a drop of glass behind it, as the reading switch's slider sits behind its choice */
.pllist__row.is-playing .pllist__item {
  color: var(--ink);
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.78));
  box-shadow: 0 3px 10px rgba(53, 25, 30, 0.12), 0 1px 1px rgba(53, 25, 30, 0.06), inset 0 1px 0 #fff;
}
.pllist__row.is-playing .pllist__i { opacity: 0; }
.pllist__row.is-playing .pllist__eq { opacity: 1; }
@media (hover: hover) and (pointer: fine) { .pllist__row:not(.is-playing) .pllist__item:hover { background: rgba(255, 255, 255, 0.5); color: var(--ink); } }
.pllist__item:active { transform: scale(0.98); }
.pllist__out { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-faint); transition: color var(--dur-hover) var(--ease-ui), background var(--dur-hover) var(--ease-ui); }
.pllist__out svg { width: 16px; height: 16px; }
@media (hover: hover) and (pointer: fine) { .pllist__out:hover { color: var(--sky-ink); background: rgba(156, 199, 236, 0.22); } }
.pllist__item:focus-visible, .pllist__out:focus-visible { outline: 2px solid var(--sky-ink); outline-offset: -2px; }
.sheet__paper { transition: opacity var(--dur-open) var(--ease-grace), transform var(--dur-open) var(--ease-grace), translate 620ms var(--ease-grace), scale 620ms var(--ease-grace); }
@media (prefers-reduced-motion: reduce) {
  .pllist__eq i { animation: none; height: 70%; }
  .plpanel, .plpanel[data-mode="rise"] { transform: none; transition: opacity 200ms linear; }
}

/* ---- his words ---- */
.sheet__body {
  display: flex; flex-direction: column; min-width: 0;
  padding: clamp(30px, 4.2vw, 60px) clamp(24px, 4vw, 58px) clamp(22px, 3vw, 36px) clamp(18px, 2.4vw, 34px);
}
.sheet__kicker { font: italic 400 1.28rem/1.2 var(--font-text); color: var(--gold-deep); margin-bottom: 10px; }
.sheet__name {
  font: 400 clamp(2rem, 1.35rem + 1.6vw, 2.75rem)/1.04 var(--font-display);
  color: var(--ink); letter-spacing: -0.005em;
  margin-bottom: 24px; padding-right: 48px;
  text-wrap: balance;
}
.prose { font-size: clamp(1.06rem, 1rem + 0.25vw, 1.16rem); line-height: 1.6; color: var(--ink); }
.prose p { margin: 0 0 0.95em; }
.prose .lead { font-size: clamp(1.2rem, 1.1rem + 0.35vw, 1.36rem); line-height: 1.45; }
.prose .quote {
  position: relative;
  margin: 1.1em 0 1.15em; padding-left: 1.05em;
  font: italic 400 clamp(1.3rem, 1.12rem + 0.6vw, 1.55rem)/1.38 var(--font-text);
  color: var(--ink);
  text-wrap: pretty;
}
.prose .quote::before {
  content: "“"; position: absolute; left: -0.12em; top: -0.16em;
  font: 400 2.5em/1 var(--font-display); color: var(--gold-deep); opacity: 0.55;
}
.prose .src { font: italic 400 1.02rem/1.45 var(--font-text); color: var(--ink-faint); }
.sheet__tags { margin-top: 4px; font: italic 400 1rem/1.4 var(--font-text); color: var(--ink-faint); }

.sheet__nav {
  display: flex; justify-content: space-between; gap: 12px;
  margin-top: auto; padding-top: 30px;
}
.sheet__nav::before { content: none; }
.sheet__step {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 46px; padding: 0 4px;
  font: 400 1.12rem/1.1 var(--font-display); color: var(--ink-soft);
  border-top: 1px solid var(--line-light);
  padding-top: 14px;
  flex: 1 1 0;
  transition: color var(--dur-hover) var(--ease-ui);
}
.sheet__step--next { justify-content: flex-end; text-align: right; }
.sheet__step svg { width: 18px; height: 18px; flex: none; transition: transform var(--dur-hover) var(--ease-ui); }
@media (hover: hover) and (pointer: fine) {
  .sheet__step:hover { color: var(--gold-deep); }
  .sheet__step--prev:hover svg { transform: translateX(-3px); }
  .sheet__step--next:hover svg { transform: translateX(3px); }
}

/* previous / next: the paper stays, the words change */
.sheet__media, .sheet__body { transition: opacity 700ms var(--ease-grace), filter 700ms var(--ease-grace); }
.sheet__paper.is-swapping .sheet__media, .sheet__paper.is-swapping .sheet__body { opacity: 0; filter: blur(6px); transition-duration: 300ms; }

/* the person in flight between the globe and the paper */
.flier {
  position: fixed; z-index: 330;
  transform-origin: 0 0; pointer-events: none;
  object-fit: contain;
  will-change: transform, filter;
}

/* ---------------- phone: a sheet that rises from the bottom ---------------- */
@media (max-width: 899px) {
  .sheet__scroller { padding: 7svh 0 0; }
  .sheet__media { position: relative; }
  .sheet__paper {
    grid-template-columns: 1fr;
    margin: auto 0 0; width: 100%;
    min-height: 93svh;
    font-size: 0.97em;
    border-radius: 22px 22px 0 0;
    transform: translateY(70px);
  }
  .sheet.is-closing .sheet__paper { transform: translateY(60px); }
  .sheet__paper::after { left: 20%; right: 20%; }
  .sheet__media { padding: 10px 10px 0; gap: 12px; }
  .sheet__stage { height: min(47svh, 430px); border-radius: 16px; }
  .sheet__close { top: 18px; right: 18px; }
  .sheet__vctl { padding: 2px 6px 0; }
  .sheet__body { padding: 22px 22px max(22px, calc(env(safe-area-inset-bottom) + 14px)); }
  .sheet__name { padding-right: 0; margin-bottom: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .sheet__paper { transform: none !important; transition: opacity 300ms linear; }
  .sheet__scrim { transition: opacity 300ms linear; }
  .screen__wait { animation: none; }
  .sheet__cutout { transform: none !important; }
}
