/* =========================================================
   Dara & Leakhena — a wedding retrospective
   Styled after "a quiet room": dark, atmospheric, starlit.
   The music toggle is a capsule in the corner, not a bar.
   ========================================================= */

:root {
  --bg:        #08080c;
  --bg-soft:   #0e0e15;
  --ink:       #e7e4de;
  --ink-dim:   #a29fb0;
  --ink-faint: #6b6879;
  --glow:      #9db0d8;   /* dusty periwinkle — retinted per track by js */
  --glow-warm: #c9a9c8;   /* faded violet */
  --brand:     #9db0d8;   /* the monogram's colour on this theme */
  --line:      rgba(157, 176, 216, 0.14);

  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --script: "Great Vibes", cursive;

  --measure: 40rem;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

:root { color-scheme: dark; }

@font-face {
  /* self-hosted so the monogram never depends on an external fetch */
  font-family: "Great Vibes";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../media/fonts/great-vibes.woff2") format("woff2");
}

/* ---------------------------------------------------------
   Light theme — the day at daybreak.
   --------------------------------------------------------- */
html[data-theme="light"] {
  color-scheme: light;
  --bg:        #f4f2ed;
  --bg-soft:   #ecd9d90d;
  --ink:       #26242e;
  --ink-dim:   #4d4b59;
  --ink-faint: #8b8899;
  --glow:      #5b6690;
  --glow-warm: #966b95;
  --brand:     #5b6690;
  --line:      rgba(74, 84, 124, 0.18);
}
html[data-theme="light"] body {
  background:
    radial-gradient(ellipse 100% 60% at 50% 100%, #e7e4ef 0%, #efede7 42%, var(--bg) 100%)
      fixed,
    var(--bg);
}
html[data-theme="light"] body::before {
  background:
    radial-gradient(60vw 60vw at 50% -10%, rgba(91, 102, 144, 0.07), transparent 70%),
    radial-gradient(50vw 50vw at 85% 110%, rgba(150, 107, 149, 0.06), transparent 70%);
}
html[data-theme="light"] #ambient { opacity: 0.5; }
html[data-theme="light"] .grain { opacity: 0.03; }
html[data-theme="light"] .vignette {
  background: radial-gradient(130% 110% at 50% 34%, transparent 55%, rgba(88, 92, 128, 0.13) 100%);
}
html[data-theme="light"] .skiper-toggle,
html[data-theme="light"] .site-theme-toggle {
  background: rgba(255, 255, 255, 0.65);
}
html[data-theme="light"] .sk-knob { background: rgba(91, 102, 144, 0.12); }
html[data-theme="light"] .sk-knob[aria-pressed="true"] { background: rgba(91, 102, 144, 0.2); }
html[data-theme="light"] .sk-mini:hover { background: rgba(91, 102, 144, 0.12); }
html[data-theme="light"] .sk-list { background: rgba(255, 255, 255, 0.85); }
html[data-theme="light"] .sk-li:hover { background: rgba(91, 102, 144, 0.1); }

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background:
    radial-gradient(ellipse 100% 60% at 50% 100%, #100f17 0%, #0a0a10 42%, var(--bg) 100%)
      fixed,
    var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.75;
  letter-spacing: 0.01em;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Starfield canvas sits behind everything */
#ambient {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.62;
}

/* A slow radial breath of light behind content */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(60vw 60vw at 50% -10%, rgba(157,176,216,0.08), transparent 70%),
    radial-gradient(50vw 50vw at 85% 110%, rgba(201,169,200,0.06), transparent 70%);
}

/* ---------------------------------------------------------
   Immersion — film grain, vignette
   --------------------------------------------------------- */
.atmosphere {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}
.grain {
  position: absolute;
  inset: -50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.045;
  animation: grain 0.7s steps(3) infinite;
}
@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-6%, 4%); }
  40% { transform: translate(5%, -5%); }
  60% { transform: translate(-4%, -6%); }
  80% { transform: translate(6%, 5%); }
}
.vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(130% 110% at 50% 34%, transparent 52%, rgba(0, 0, 0, 0.55) 100%);
}

/* Day/night toggle — a small circle in the top-right corner */
.site-theme-toggle {
  position: fixed;
  right: 1.35rem;
  top: 1.35rem;
  z-index: 6;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(14, 14, 21, 0.55);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
  color: var(--ink-faint);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: color 0.4s var(--ease), border-color 0.4s var(--ease), transform 0.4s var(--ease);
}
.site-theme-toggle:hover { color: var(--glow); border-color: rgba(157, 176, 216, 0.4); transform: translateY(-2px); }
.site-theme-toggle:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(157, 176, 216, 0.25); }
.st-icon { width: 19px; height: 19px; display: block; grid-area: 1 / 1; opacity: 1; transform: none; transition: opacity 0.4s var(--ease), transform 0.5s var(--ease); }
.st-moon { opacity: 0; transform: rotate(-40deg) scale(0.6); }
html[data-theme="light"] .st-sun { opacity: 0; transform: rotate(50deg) scale(0.6); }
html[data-theme="light"] .st-moon { opacity: 1; transform: none; }

/* ---------------------------------------------------------
   The music toggle — a capsule that springs open
   --------------------------------------------------------- */
.skiper-toggle {
  position: fixed;
  right: 1.35rem;
  bottom: 1.35rem;
  z-index: 6;
  height: 52px;
  width: 52px;
  padding: 6px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(14, 14, 21, 0.55);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
  cursor: pointer;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  transition: width 0.55s cubic-bezier(0.34, 1.42, 0.5, 1),
    border-color 0.4s var(--ease), background 0.4s var(--ease);
}
.skiper-toggle:hover,
.skiper-toggle:focus-within,
.skiper-toggle.is-open {
  width: 248px;
  border-color: rgba(157, 176, 216, 0.4);
}
.skiper-toggle.is-playing { border-color: rgba(157, 176, 216, 0.3); }

.sk-reveal { display: flex; align-items: center; gap: 5px; flex: none; opacity: 0; transform: translateX(10px); pointer-events: none; transition: opacity 0.3s var(--ease), transform 0.45s var(--ease); }
.skiper-toggle:hover .sk-reveal,
.skiper-toggle:focus-within .sk-reveal,
.skiper-toggle.is-open .sk-reveal { opacity: 1; transform: none; pointer-events: auto; transition-delay: 0.15s; }

.sk-mini {
  flex: none;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-faint);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: color 0.3s var(--ease), background 0.3s var(--ease);
}
.sk-mini:hover { color: var(--ink); background: rgba(157, 176, 216, 0.12); }
.sk-mini:focus-visible { outline: none; box-shadow: 0 0 0 2px rgba(157, 176, 216, 0.3); }
.sk-mini svg { width: 13px; height: 13px; display: block; }

.sk-title-wrap {
  width: 88px;
  overflow: hidden;
  white-space: nowrap;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.sk-ticker { display: inline-flex; white-space: nowrap; will-change: transform; }
.sk-ticker.is-scrolling { animation: sk-ticker var(--sk-dur, 10s) linear infinite; }
.sk-title {
  display: inline-block;
  padding: 0 18px 0 8px;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  color: var(--ink-dim);
  white-space: nowrap;
}
@keyframes sk-ticker {
  from { transform: translateX(0); }
  to { transform: translateX(var(--sk-loop, -100px)); }
}

.sk-knob { flex: none; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: rgba(157, 176, 216, 0.12); display: grid; place-items: center; color: var(--ink-faint); cursor: pointer; transition: color 0.4s var(--ease), background 0.4s var(--ease); }
.skiper-toggle:hover .sk-knob { color: var(--ink); }
.sk-knob:focus-visible { outline: none; box-shadow: 0 0 0 2px rgba(157, 176, 216, 0.3); }
.sk-knob[aria-pressed="true"] { color: var(--glow); background: rgba(157, 176, 216, 0.2); }
.sk-play { width: 14px; height: 14px; fill: currentColor; }
.sk-knob[aria-pressed="true"] .sk-play { display: none; }
.sk-eq { display: none; align-items: center; gap: 2.5px; height: 14px; }
.sk-knob[aria-pressed="true"] .sk-eq { display: flex; }
.sk-eq i { width: 2.5px; height: 5px; border-radius: 2px; background: currentColor; animation: sk-eq 1.05s ease-in-out infinite; }
.sk-eq i:nth-child(2) { animation-delay: 0.18s; }
.sk-eq i:nth-child(3) { animation-delay: 0.36s; }
@keyframes sk-eq { 0%, 100% { height: 5px; } 50% { height: 13px; } }

/* the soundtrack list — a small glass panel beside the capsule */
.sk-list {
  position: fixed;
  right: calc(1.35rem + 52px + 0.75rem);
  bottom: 1.35rem;
  z-index: 7;
  width: min(15rem, calc(100vw - 1.35rem - 52px - 2rem));
  max-height: 17rem;
  overflow-y: auto;
  padding: 0.4rem;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(14, 14, 21, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.35s var(--ease), transform 0.45s var(--ease);
}
.sk-list.is-open { opacity: 1; transform: none; pointer-events: auto; }
.sk-li {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  padding: 0.5rem 0.65rem;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--ink-dim);
  font-family: inherit;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-align: left;
  cursor: pointer;
  transition: color 0.3s var(--ease), background 0.3s var(--ease);
}
.sk-li:hover { color: var(--ink); background: rgba(157, 176, 216, 0.1); }
.sk-li:focus-visible { outline: none; box-shadow: 0 0 0 2px rgba(157, 176, 216, 0.3); }
.sk-li.is-current { color: var(--glow); }
.sk-li-mark { flex: none; width: 16px; font-size: 0.62rem; letter-spacing: 0.1em; color: var(--ink-faint); display: grid; place-items: center; }
.sk-li.is-current .sk-li-mark { color: var(--glow); }
.sk-li-dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.sk-li-title { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------------------------------------------------------
   Layout
   --------------------------------------------------------- */
.wrap {
  position: relative;
  z-index: 1;
  max-width: var(--measure);
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 5rem) clamp(1.5rem, 5vw, 2rem);
}
.wrap--wide { max-width: 56rem; }

/* ---------------------------------------------------------
   Header / navigation
   --------------------------------------------------------- */
.site-head {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  max-width: 56rem;
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 2.5rem) clamp(1.5rem, 5vw, 2rem) 0;
  flex-wrap: wrap;
}
@media (max-width: 1080px) {
  .site-head { padding-right: calc(52px + 2.1rem); }
}
.site-head a { text-decoration: none; }

.mark {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--serif);
  font-size: 1.25rem;
  letter-spacing: 0.04em;
  color: var(--ink);
  transition: color 0.4s var(--ease);
}
.mark:hover { color: var(--glow); }
.mark .logo-mark { flex: none; }

.nav {
  display: flex;
  gap: clamp(1rem, 3vw, 1.75rem);
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: lowercase;
}
.nav a {
  color: var(--ink-faint);
  position: relative;
  padding-bottom: 0.2rem;
  transition: color 0.4s var(--ease);
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--glow);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s var(--ease);
}
.nav a:hover,
.nav a.is-active { color: var(--ink); }
.nav a:hover::after,
.nav a.is-active::after { transform: scaleX(1); }

/* ---------------------------------------------------------
   Logo mark (inline SVG; swap js/ui/logo.js for the real file)
   --------------------------------------------------------- */
.logo-mark { color: var(--brand); overflow: visible; }
.home-logo {
  display: block;
  margin: 0 auto 1.8rem;
  filter: drop-shadow(0 0 26px rgba(157, 176, 216, 0.3));
}

/* ---------------------------------------------------------
   Typography
   --------------------------------------------------------- */
h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: 0.005em;
}
.title {
  font-size: clamp(2.6rem, 8vw, 4.75rem);
  font-weight: 300;
  letter-spacing: 0.02em;
  color: var(--ink);
}
.title .amp { font-family: var(--script); font-size: 0.55em; color: var(--glow); padding: 0 0.12em; }
.subtitle {
  font-family: var(--sans);
  font-size: 0.8rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-top: 1.25rem;
}
.lede {
  font-family: var(--serif);
  font-size: clamp(1.35rem, 3.5vw, 1.75rem);
  line-height: 1.5;
  color: var(--ink-dim);
  font-style: italic;
}
.eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--glow);
  opacity: 0.8;
}
p { color: var(--ink-dim); }
p + p { margin-top: 1.25rem; }
a { color: var(--glow); }

/* ---------------------------------------------------------
   Home / portal — the whole screen is the door
   --------------------------------------------------------- */
.portal {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
}
.splash { text-decoration: none; color: inherit; cursor: pointer; background: none; border: 0; font: inherit; }
.splash .subtitle { margin-top: 1.5rem; }
.splash-epigraph {
  margin-top: 2rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--ink-dim);
  max-width: 34ch;
  margin-inline: auto;
}
.splash-enter {
  margin-top: 3.5rem;
  font-size: 0.72rem;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--ink-faint);
  transition: color 0.6s var(--ease), letter-spacing 0.6s var(--ease);
}
.splash-enter::after {
  content: "";
  display: block;
  width: 1px;
  height: 2.5rem;
  margin: 1.25rem auto 0;
  background: linear-gradient(var(--ink-faint), transparent);
  opacity: 0.5;
}
.splash:hover .splash-enter { color: var(--glow); letter-spacing: 0.5em; }

/* ---------------------------------------------------------
   The retrospective — chapters of the day
   --------------------------------------------------------- */
.story { position: relative; z-index: 1; max-width: 68rem; margin: 0 auto; padding: 3rem clamp(1.5rem, 5vw, 2rem) 6rem; }
.story-head { text-align: center; margin: 3rem 0 6rem; }
.story-head h2 { font-size: clamp(2.2rem, 5.5vw, 3.4rem); font-weight: 300; color: var(--ink); }
.story-lede { font-family: var(--serif); font-style: italic; color: var(--ink-dim); margin-top: 1rem; font-size: 1.05rem; }

.story-rail {
  position: fixed; right: 1.35rem; top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  display: flex; flex-direction: column; gap: 0.9rem;
}
.rail-dot {
  width: 26px; height: 26px;
  display: grid; place-items: center;
  font-size: 0.55rem; letter-spacing: 0.08em;
  color: var(--ink-faint);
  border: 1px solid var(--line);
  border-radius: 50%;
  text-decoration: none;
  transition: all 0.4s var(--ease);
}
.rail-dot:hover { color: var(--ink); }
.rail-dot.is-active { border-color: var(--glow); color: var(--glow); box-shadow: 0 0 14px rgba(157, 176, 216, 0.35); }

.chapter {
  display: grid;
  grid-template-columns: minmax(260px, 5fr) 7fr;
  gap: 3.5rem;
  align-items: start;
  padding: 5rem 0;
  border-top: 1px solid var(--line);
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 1.1s var(--ease), transform 1.1s var(--ease);
}
.chapter.is-in { opacity: 1; transform: none; }
.chapter:nth-child(even) .ch-text { order: 2; }

.ch-index { font-size: 0.68rem; letter-spacing: 0.28em; text-transform: uppercase; color: var(--glow); opacity: 0.85; }
.ch-title { font-size: clamp(1.8rem, 3.6vw, 2.5rem); color: var(--ink); margin: 0.7rem 0 1rem; }
.ch-line { font-family: var(--serif); font-style: italic; font-size: 1.15rem; color: var(--ink-dim); margin-bottom: 1rem; }
.ch-body { font-size: 0.95rem; color: var(--ink-faint); max-width: 44ch; }

.ch-photos {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: 150px;
  grid-auto-flow: dense;
  gap: 0.9rem;
}
.cell {
  position: relative;
  overflow: hidden;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  transition: transform 0.45s var(--ease), border-color 0.45s var(--ease), box-shadow 0.45s var(--ease);
  will-change: transform;
}
.cell:hover {
  border-color: rgba(157, 176, 216, 0.45);
  box-shadow: 0 18px 50px -18px rgba(0, 0, 0, 0.8);
}
.cell-tall { grid-row: span 2; }
.cell-wide { grid-column: span 2; }
.cell img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.85) contrast(1.05); }
.cell-empty {
  height: 100%;
  display: grid; place-items: center;
  color: var(--ink-faint);
  opacity: 0.5;
  font-size: 1.4rem;
}
.cell figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 1.6rem 0.8rem 0.6rem;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--ink-dim);
  background: linear-gradient(to top, rgba(8, 8, 12, 0.92), transparent);
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}
.cell:hover figcaption { opacity: 1; }

.story-end {
  text-align: center;
  padding: 6rem 0 2rem;
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink-faint);
  font-size: 1.1rem;
}

/* ---------------------------------------------------------
   The office — the couple's back room, not on the nav
   --------------------------------------------------------- */
.office { position: relative; z-index: 1; max-width: 56rem; margin: 0 auto; padding: 3rem clamp(1.5rem, 5vw, 2rem) 6rem; }
.office-head { text-align: center; margin: 2.5rem 0 3.5rem; }
.office-head h2 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 300; color: var(--ink); }

.gate {
  max-width: 22rem;
  margin: 18vh auto 0;
  text-align: center;
}
.gate input {
  width: 100%;
  margin-top: 1.5rem;
  padding: 0.85rem 1.1rem;
  font: inherit;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  color: var(--ink);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  text-align: center;
}
.gate input:focus { outline: none; border-color: var(--glow); }
.gate .gate-err { margin-top: 0.8rem; font-size: 0.75rem; color: var(--glow-warm); opacity: 0; transition: opacity 0.3s; }
.gate .gate-err.is-on { opacity: 1; }

.desk {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(157,176,216,0.03), transparent);
  overflow: hidden;
}
.studio-vis { width: 100%; height: 300px; display: block; }
.desk-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: end;
  padding: 1.6rem;
  border-top: 1px solid var(--line);
}
.faders { display: flex; gap: 1.8rem; flex-wrap: wrap; }
.fader { display: flex; flex-direction: column; align-items: center; gap: 0.7rem; width: 64px; }
.fader-meter {
  width: 3px; height: 80px;
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
  display: flex; align-items: flex-end;
}
.fader-meter i { display: block; width: 100%; height: 0%; background: var(--glow); transition: height 0.18s var(--ease); }
.fader input[type="range"] {
  writing-mode: vertical-lr;
  direction: rtl;
  width: 22px; height: 100px;
  accent-color: var(--glow);
  cursor: grab;
}
.fader-name { font-size: 0.6rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-faint); }
.desk-side { display: flex; flex-direction: column; gap: 0.7rem; max-width: 220px; }
.desk-tip { font-size: 0.72rem; line-height: 1.6; color: var(--ink-faint); }

.btn {
  font: inherit;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: lowercase;
  color: var(--ink-dim);
  background: transparent;
  padding: 0.6rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: 100px;
  cursor: pointer;
  transition: color 0.4s var(--ease), border-color 0.4s var(--ease), transform 0.4s var(--ease);
}
.btn:hover { color: var(--ink); border-color: rgba(157, 176, 216, 0.4); transform: translateY(-2px); }
.btn-primary { color: var(--glow); border-color: rgba(157, 176, 216, 0.35); }

.office-wall { margin-top: 4rem; }
.office-wall h3 { font-size: 1.7rem; color: var(--ink); }
.wall-lede { font-family: var(--serif); font-style: italic; color: var(--ink-dim); margin: 0.4rem 0 1.4rem; }
.wall-notes { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; }
.note {
  position: relative;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem 1.1rem;
}
.note p { font-family: var(--serif); font-size: 1rem; line-height: 1.5; color: var(--ink-dim); }
.note span { display: block; margin-top: 0.6rem; font-size: 0.66rem; letter-spacing: 0.14em; color: var(--ink-faint); }
.note .note-del {
  position: absolute; top: 0.4rem; right: 0.4rem;
  width: 24px; height: 24px;
  border: 0; border-radius: 50%;
  background: transparent;
  color: var(--ink-faint);
  font-size: 0.85rem;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.3s, color 0.3s;
}
.note:hover .note-del { opacity: 1; }
.note .note-del:hover { color: var(--glow-warm); }
.wall-empty { color: var(--ink-faint); font-style: italic; font-family: var(--serif); }
.wall-form { display: grid; gap: 0.8rem; max-width: 480px; margin-bottom: 2rem; }
.wall-form input, .wall-form textarea {
  font: inherit; font-size: 0.85rem;
  color: var(--ink);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.8rem 1rem;
  resize: vertical;
}
.wall-form textarea { min-height: 90px; }
.wall-form input:focus, .wall-form textarea:focus { outline: none; border-color: var(--glow); }
.wall-form button { justify-self: start; }

/* ---------------------------------------------------------
   View shell, reveal, misc
   --------------------------------------------------------- */
.view { opacity: 0; transition: opacity 0.55s var(--ease); }
.view.view-in { opacity: 1; }

.back {
  display: inline-block;
  margin-top: 3rem;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: lowercase;
  color: var(--ink-faint);
  text-decoration: none;
  transition: color 0.4s var(--ease);
}
.back:hover { color: var(--glow); }
.back::before { content: "← "; }

::selection { background: var(--glow); color: var(--bg); }
img { max-width: 100%; display: block; }

@media (max-width: 820px) {
  .chapter { grid-template-columns: 1fr; gap: 2rem; padding: 4rem 0; }
  .chapter:nth-child(even) .ch-text { order: 0; }
  .story-rail { display: none; }
  .desk-panel { grid-template-columns: 1fr; }
  .studio-vis { height: 220px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .chapter, .view { opacity: 1; transform: none; }
}
