/* Ember & Shadow: the shared look (homepage, timer; shop.html and thanks.html link it too).
   Palette from the films (scripts/toon.py). Type (the owner's pick, 24 Oct): Shantell Sans for
   headings, nav, buttons and labels, Nunito for reading; both self-hosted in /fonts/fonts.css.
   Comic Sans stays in the films and thumbnails only. Light = her room by day, dark = her room
   at night. data-theme on <html> overrides the system setting. */

:root {
  --paper: #F0E2CC;
  --card: #F7EDDC;
  --ink: #3B2A22;
  --soft: #6E5A4C;
  --line: #3B2A22;
  --honey: #E8C48C;
  --rose: #C45C52;
  --rose-ink: #FFF6EA;
  --night: #2C2436;
  --glow: 255, 184, 92;
  --font-head: "Shantell Sans", "Nunito", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, sans-serif;
  --wobble: 16px 20px 14px 22px / 20px 14px 22px 16px;   /* a hand-drawn corner */
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1120px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #2C2436; --card: #372E44; --ink: #F0E2CC; --soft: #C9B8A6;
    --line: #E8C48C; --rose: #D46A5F; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #2C2436; --card: #372E44; --ink: #F0E2CC; --soft: #C9B8A6;
  --line: #E8C48C; --rose: #D46A5F; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.55;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; margin: 0 0 .4em; font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: clamp(28px, 4vw, 40px); }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px dashed var(--rose); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------------------------------------------------------------- the top bar */

/* No bar of its own: it sits on the page (and, on the homepage, on her wall) with no line under
   it. Once you scroll, a little paper slides in behind it so the links stay readable. */
.site-top {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 4px;
  height: 64px; padding: 0 var(--gutter);
  background: transparent;
  transition: background-color .3s, box-shadow .3s, opacity .6s;
}
.site-top.scrolled {
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px rgba(30, 20, 10, .06);
}
.home .site-top { position: fixed; inset: 0 0 auto; }
.site-name { font-family: var(--font-head); font-weight: 700; font-size: 22px; line-height: 1.15; text-decoration: none; white-space: nowrap; margin-right: auto; }
/* the homepage's big title, flown up into the bar by site.js as you scroll */
.fly .site-top .site-name { position: absolute; left: 0; top: 0; transform-origin: 0 0; letter-spacing: -.01em; }
.fly .site-nav { margin-left: auto; }
.site-nav { display: flex; gap: 2px; }
.site-nav a {
  font-family: var(--font-head); font-size: 17px; color: inherit; text-decoration: none;
  padding: 7px 14px; border-radius: 999px; transition: background-color .15s;
}
.site-nav a:hover { background: rgba(59, 42, 34, .08); }
:root[data-night] .site-nav a:hover { background: rgba(240, 226, 204, .1); }
.site-nav a[aria-current="page"] { background: var(--honey); color: #3B2A22; }
.icon-btn {
  display: inline-grid; place-items: center; width: 42px; height: 42px; flex: none;
  padding: 0; border: 0; border-radius: 50%; background: none; color: inherit; cursor: pointer;
  transition: background-color .15s;
}
.icon-btn:hover { background: rgba(59, 42, 34, .08); }
:root[data-night] .icon-btn:hover { background: rgba(240, 226, 204, .1); }
.icon-btn svg { width: 20px; height: 20px; }
.site-nav + .icon-btn { margin-left: 8px; }
.sound-switch .wave { display: none; }
.sound-switch[aria-pressed="true"] .mute { display: none; }
.sound-switch[aria-pressed="true"] .wave { display: inline; }
.sound-switch[aria-pressed="true"] { background: var(--honey); color: #3B2A22; }
/* pause the wiggle: two bars while it boils, a play arrow once it's held still */
.wiggle-switch .go { display: none; }
.wiggle-switch[aria-pressed="true"] .bars { display: none; }
.wiggle-switch[aria-pressed="true"] .go { display: inline; }
.wiggle-switch svg { width: 18px; height: 18px; }
@media (prefers-reduced-motion: reduce) { .wiggle-switch { display: none; } }
.menu-switch { display: none; }
@media (max-width: 720px) {
  .site-top { height: 56px; padding: 0 8px 0 16px; }
  .site-name { font-size: 20px; }
  .menu-switch { display: inline-grid; }
  .site-nav + .icon-btn { margin-left: auto; }
  .fly .site-nav + .icon-btn { margin-left: auto; }
  /* the links fold into a menu under the bar */
  .site-nav {
    position: absolute; top: calc(100% + 4px); right: 12px; z-index: 1;
    flex-direction: column; gap: 2px; min-width: 200px; padding: 8px;
    background: var(--card); border-radius: 18px; box-shadow: 0 18px 40px rgba(30, 20, 10, .18);
    opacity: 0; transform: translateY(-6px); visibility: hidden; transition: opacity .15s, transform .15s, visibility .15s;
  }
  .site-top.menu-open .site-nav { opacity: 1; transform: none; visibility: visible; }
  .site-nav a { padding: 12px 16px; font-size: 19px; color: var(--ink); }
}
/* small phones: the name and four buttons on one line */
@media (max-width: 400px) {
  .site-top { padding: 0 4px 0 16px; }
  .site-name { font-size: 18px; }
  .icon-btn { width: 38px; height: 38px; }
}

/* ---------------------------------------------------------------- buttons and cards */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 10px 24px;
  font: inherit; font-weight: 700; font-size: 18px; text-decoration: none; cursor: pointer;
  color: #FFF6EA; background: #B44C43;
  border: 0; border-radius: 999px;
  box-shadow: 0 6px 18px rgba(180, 76, 67, .26);
  transition: transform .15s, box-shadow .15s, background-color .15s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(180, 76, 67, .32); }
.btn:active { transform: translateY(1px); box-shadow: 0 3px 10px rgba(180, 76, 67, .24); }
.btn.quiet { background: var(--card); color: var(--ink); box-shadow: 0 4px 14px rgba(30, 20, 10, .07), inset 0 0 0 1.5px rgba(59, 42, 34, .14); }
:root[data-night] .btn.quiet { box-shadow: 0 4px 14px rgba(0, 0, 0, .2), inset 0 0 0 1.5px rgba(240, 226, 204, .16); }
.btn[disabled] { opacity: .5; cursor: default; transform: none; }

/* paper cards: no outlines, a soft shadow */
.card { background: var(--card); border-radius: 22px; box-shadow: 0 10px 30px rgba(30, 20, 10, .07); }
:root[data-night] .card { box-shadow: 0 12px 30px rgba(0, 0, 0, .22); }

.section { scroll-margin-top: 100px; max-width: var(--max); margin: 0 auto; padding: clamp(48px, 8vw, 96px) var(--gutter) 0; }
.section > .lede { color: var(--soft); max-width: 640px; }

/* ---------------------------------------------------------------- her room (the homepage top) */

.skip-link { position: absolute; left: 12px; top: -60px; z-index: 50; padding: 8px 14px; background: var(--card); border: 2px solid var(--line); border-radius: 12px; }
.skip-link:focus { top: 72px; }

.room {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;                                        /* wall to wall, under the top bar */
  overflow: hidden;
  container-type: inline-size;
  background: #E2CEB4;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  --k: 1;
}
:root[data-night] .room { background: #5E5352; }
.room-wrap { background: var(--paper); }
.room.square { aspect-ratio: 1 / 1; width: 100%; --k: .6; }

/* everything in the picture moves together (a slow push in as you scroll down) */
.stage {
  position: absolute; inset: 0;
  transform-origin: 66% 42%;
  transform: translateY(calc(var(--scroll, 0) * 7%)) scale(calc(1 + var(--scroll, 0) * .07));
}
.stage .boil { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; visibility: hidden; }
.stage .boil.on { visibility: visible; }
.stage .boil-fade { position: absolute; inset: 0; width: 100%; height: 100%; transition: opacity .9s ease; pointer-events: none; }

/* the window: clouds by day, stars by night, a bird or a wish when you click it */
.sky, .sky .pane, .sky .world { position: absolute; }
.sky { inset: 0; pointer-events: none; }
.sky .pane { overflow: hidden; }
.sky .world { top: 0; bottom: 0; }
.cloud { position: absolute; left: -40%; animation: drift var(--dur, 90s) linear var(--delay, 0s) infinite; }
.cloud img { position: absolute; inset: 0; width: 100%; height: auto; visibility: hidden; }
.room[data-ph="0"] .cloud img:nth-child(1), .room[data-ph="1"] .cloud img:nth-child(2),
.room[data-ph="2"] .cloud img:nth-child(3), .room:not([data-ph]) .cloud img:nth-child(1) { visibility: visible; }
@keyframes drift { from { left: -40%; } to { left: 104%; } }
.star {
  position: absolute; width: calc(5px * var(--k) + 1px); aspect-ratio: 1; border-radius: 50%;
  background: #FFF6E2; box-shadow: 0 0 6px 1px rgba(255, 236, 190, .8);
  animation: twinkle var(--tw, 3s) ease-in-out var(--delay, 0s) infinite;
}
@keyframes twinkle { 0%, 100% { opacity: .25; transform: scale(.7); } 50% { opacity: 1; transform: scale(1); } }
:root[data-night] .cloud, :root:not([data-night]) .star { display: none; }
.shoot {
  position: absolute; width: 32%; height: calc(3px * var(--k) + 2px); border-radius: 4px;
  background: linear-gradient(90deg, rgba(255, 246, 226, 0), rgba(255, 246, 226, .85) 80%, #FFFFFF);
  filter: drop-shadow(0 0 4px rgba(255, 220, 160, .95));
  transform-origin: 100% 50%;
  animation: shoot 1.2s cubic-bezier(.2, .6, .4, 1) forwards;
}
.shoot::after { content: ""; position: absolute; right: -3px; top: 50%; width: 9px; height: 9px; translate: 0 -50%; border-radius: 50%; background: #FFF; box-shadow: 0 0 10px 3px rgba(255, 220, 160, .9); }
@keyframes shoot {
  from { transform: rotate(-28deg) translateX(0) scaleX(.2); opacity: 0; }
  15% { opacity: 1; }
  70% { opacity: 1; }
  to { transform: rotate(-28deg) translateX(-150%) scaleX(1); opacity: 0; }
}
.bird { position: absolute; width: 7%; aspect-ratio: 2.2; animation: fly var(--fly, 5s) linear forwards; }
.bird svg { width: 100%; height: 100%; overflow: visible; animation: flap .32s ease-in-out infinite alternate; transform-origin: 50% 70%; }
.bird path { fill: none; stroke: #3B2A22; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
@keyframes fly { from { left: -10%; transform: translateY(0); } 50% { transform: translateY(-30%); } to { left: 108%; transform: translateY(10%); } }
@keyframes flap { from { transform: scaleY(1); } to { transform: scaleY(-.35); } }

/* the clock's hands, at your own time */
.hands { position: absolute; translate: -50% -50%; overflow: visible; pointer-events: none; }
.hands line { stroke: #3B2A22; stroke-linecap: round; }
.hands .hour { stroke-width: 13; }
.hands .minute { stroke-width: 9; }
.hands .second { stroke: #C45C52; stroke-width: 3.5; }
.hands circle { fill: #3B2A22; }
.room[data-ph="1"] .hands { transform: translate(.6px, -.4px) rotate(.4deg); }
.room[data-ph="2"] .hands { transform: translate(-.4px, .5px) rotate(-.3deg); }

/* the words on the empty wall above her bed (wide layout only) */
.room-words {
  position: absolute; left: 5.6%; top: 12%; width: 38%;
  color: var(--ink);
}
/* the words under the title fade before the title floats up past them */
.room-words p { opacity: calc(1 - var(--scroll, 0) * 9); }
.room-words h1 { font-size: clamp(28px, 4.5cqi, 80px); white-space: nowrap; margin: 0 0 .25em; letter-spacing: -.01em; }
/* with site.js running, the title you see is the top bar's, flown in over this spot */
.fly .title-slot { opacity: 0; }
.room-words p { font-size: clamp(15px, 1.55cqi, 24px); margin: 0 0 .55em; }
.room-words .hint { color: var(--soft); font-size: clamp(13px, 1.2cqi, 19px); }
.room.square .room-words { display: none; }
.intro-words { display: none; padding: 22px 16px 0; }
.intro-words h1 { font-size: 34px; margin-bottom: .2em; }
.intro-words .hint { color: var(--soft); font-size: 15px; }
.room-wrap.is-square .intro-words { display: block; }

/* the Shadow's eyes, drawn here so they can look at you */
.eye {
  position: absolute;
  width: calc(var(--eye-w) * var(--u));
  height: calc(var(--eye-h) * var(--u));
  min-width: 4px; min-height: 5px;
  margin: 0;
  translate: -50% -50%;
  border-radius: 50%;
  background: #FFF6E2;
  box-shadow: 0 0 calc(5px * var(--k)) calc(2px * var(--k)) rgba(var(--glow), .85),
              0 0 calc(14px * var(--k)) calc(4px * var(--k)) rgba(var(--glow), .4);
  transform: translate(var(--lx, 0px), var(--ly, 0px)) scaleY(var(--sleepy, 1));
  transition: transform .09s ease-out, border-radius .15s, background .15s;
  pointer-events: none;
}
.eye.shut { transform: scaleY(.12) !important; }
:root[data-night] .eye { --sleepy: .72; }
/* content: two little arcs, like ^ ^ */
.eyes.happy .eye {
  width: calc(var(--eye-w) * 1.9 * var(--u));
  height: calc(var(--eye-w) * 1.25 * var(--u));
  min-width: 7px; min-height: 4px;
  background: transparent;
  border: calc(2.2 * var(--u) + .7px) solid #FFF6E2;
  border-bottom: 0;
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  transform: translate(0, -10%) !important;
  box-shadow: none;
  filter: drop-shadow(0 0 calc(3px * var(--k) + 1px) rgba(var(--glow), .95));
}

/* what her mind says, floating up and away (words in the world, never over her face) */
.whispers { position: absolute; inset: 0; pointer-events: none; }
.whisper {
  position: absolute; translate: 0 -100%; margin: 0;
  width: max-content; max-width: 34%;
  font-family: var(--font-head); font-weight: 500;
  font-size: clamp(15px, 1.7cqi, 26px); line-height: 1.2;
  color: #3B2A22;
  text-shadow: 0 0 10px rgba(255, 246, 226, .95), 0 0 2px rgba(255, 246, 226, .9);
  animation: whisper 3.6s ease-out forwards;
}
:root[data-night] .whisper { color: #FFF1DC; text-shadow: 0 0 12px rgba(var(--glow), .8), 0 0 2px rgba(0, 0, 0, .6); }
.whisper.centre { translate: -50% -100%; text-align: center; }
.room.square .whisper { max-width: 52%; }
.room.talking [data-spot="mind"] .tag { opacity: 0; }
@keyframes whisper {
  0% { opacity: 0; transform: translateY(12px); filter: blur(2px); }
  14% { opacity: 1; transform: translateY(0); filter: blur(0); }
  72% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-34px); filter: blur(1px); }
}

/* the things you can click in her room */
.spot {
  position: absolute; display: block; translate: -50% -50%;
  border-radius: 14px;
  cursor: pointer;
  background: none; border: 0; padding: 0; font: inherit; color: inherit;
}
.spot::after {          /* the soft glow when you point at it */
  content: ""; position: absolute; inset: -4px; border-radius: inherit;
  border: 3px dashed rgba(var(--glow), 0); transition: border-color .15s;
}
.spot:hover::after, .spot:focus-visible::after { border-color: rgba(var(--glow), .95); }
.spot[data-spot="window"]::after, .spot[data-spot="bed"]::after { inset: 6px; }
.spot:focus-visible { outline: none; }
.spot.traced::after { display: none; }
.spot .outline { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.spot .outline path {
  fill: none; stroke: rgba(var(--glow), 0); stroke-width: 3; stroke-dasharray: 9 7;
  stroke-linejoin: round; vector-effect: non-scaling-stroke; transition: stroke .15s;
}
.spot:hover .outline path, .spot:focus-visible .outline path, .spot.pressed .outline path { stroke: rgba(var(--glow), .95); }
.spot[hidden] { display: none; }
.room.square .spot { min-width: 40px; min-height: 44px; }
.tag {
  position: absolute; left: 50%; bottom: calc(100% + 8px);
  translate: -50% 0;
  padding: 5px 14px; white-space: nowrap;
  font-size: clamp(14px, 1.35cqi, 20px); font-weight: 700; line-height: 1.3;
  color: #3B2A22; background: #FFF6EA;
  border-radius: 999px; box-shadow: 0 6px 18px rgba(30, 20, 10, .2);
  opacity: 0; transform: translateY(4px); transition: opacity .15s, transform .15s;
  pointer-events: none;
}
.spot[data-tag="below"] .tag { bottom: auto; top: calc(100% + 8px); }
.spot[data-spot="window"] .tag, .spot[data-spot="bed"] .tag { bottom: auto; top: 18%; }
.spot[data-side="end"] .tag { left: auto; right: -4px; translate: 0 0; }     /* near the right edge */
.spot[data-side="start"] .tag { left: -4px; translate: 0 0; }
.spot:hover .tag, .spot:focus-visible .tag, .spot.peek .tag { opacity: 1; transform: none; }
.spot.nudge::after { border-color: rgba(var(--glow), .95); animation: nudge 1s ease-in-out 3; }
@keyframes nudge { 50% { transform: scale(1.12); } }
@media (hover: none) {
  .spot::after { border-color: rgba(var(--glow), .45); border-width: 2px; }
  .spot[data-spot="mind"]::after, .spot[data-spot="window"]::after { border-color: transparent; }
  .spot.pressed::after { border-color: rgba(var(--glow), 1); }
}

/* arriving: her mind's eyes in the dark, then the light comes on */
@property --reveal { syntax: "<percentage>"; inherits: false; initial-value: 0%; }
.arrive { display: none; position: absolute; inset: 0; background: #100C14; }
.room.arriving .arrive {
  display: block;
  -webkit-mask-image: radial-gradient(circle at var(--ox, 90%) var(--oy, 40%), transparent var(--reveal), #000 calc(var(--reveal) + 22%));
  mask-image: radial-gradient(circle at var(--ox, 90%) var(--oy, 40%), transparent var(--reveal), #000 calc(var(--reveal) + 22%));
}
.room.arriving.lit .arrive { animation: reveal 1.4s cubic-bezier(.5, 0, .3, 1) forwards; }
@keyframes reveal { 0% { --reveal: 0%; } 85% { opacity: 1; } 100% { --reveal: 150%; opacity: 0; } }
.room.arriving .room-words, .room.arriving .spot, .room.arriving .come-in { visibility: hidden; }
.room.arriving.lit .room-words { visibility: visible; opacity: 0; }
.room.arrived .room-words { animation: words-in 1s ease-out both; }
@keyframes words-in { from { opacity: 0; transform: translateY(12px); } }
.arrive-skip {
  display: none; position: absolute; right: 16px; top: 14px; z-index: 3;
  font: inherit; font-family: var(--font-head); font-size: 15px; color: #F0E2CC; cursor: pointer;
  padding: 6px 14px; background: rgba(240, 226, 204, .1); border: 2px solid rgba(240, 226, 204, .5); border-radius: 999px;
}
.room.arriving .arrive-skip { display: block; }
:root.arriving .site-top { opacity: 0; pointer-events: none; }

/* a little nudge to come further in */
.come-in {
  position: absolute; left: 50%; bottom: 3.5%; translate: -50% 0; z-index: 2;
  display: inline-flex; align-items: center; gap: 4px; padding: 6px 14px 6px 16px;
  font-family: var(--font-head); font-size: clamp(13px, 1.1cqi, 17px); font-weight: 700;
  color: #3B2A22; text-decoration: none;
  background: rgba(255, 246, 234, .78); border-radius: 999px; box-shadow: 0 4px 14px rgba(30, 20, 10, .12);
  animation: bob 2.4s ease-in-out infinite;
  opacity: calc(1 - var(--scroll, 0) * 3);
}
.come-in svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
@keyframes bob { 50% { transform: translateY(4px); } }

/* on phones: a row of the same places under the room, big enough for thumbs */
.room-chips { display: none; gap: 8px; flex-wrap: wrap; padding: 14px 16px 0; margin: 0; list-style: none; }
.room-wrap.is-square .room-chips { display: flex; }
.room-chips a, .room-chips button {
  display: inline-flex; align-items: center; min-height: 44px; padding: 6px 16px;
  font: inherit; font-size: 16px; font-weight: 700; color: var(--ink); text-decoration: none;
  background: var(--card); border: 0; border-radius: 999px; cursor: pointer;
  box-shadow: 0 4px 12px rgba(30, 20, 10, .07), inset 0 0 0 1.5px rgba(59, 42, 34, .12);
}

@media (prefers-reduced-motion: reduce) {
  .stage { transform: none; }
  .cloud { animation: none; left: var(--rest, 30%); }
  .star, .come-in, .bird svg { animation: none; }
  .whisper { animation-duration: 4s; animation-name: whisper-still; }
  @keyframes whisper-still { 0%, 100% { opacity: 0; } 12%, 80% { opacity: 1; } }
}

/* ---------------------------------------------------------------- her phone (a dialog) */

dialog.phone { padding: 0; border: 0; background: transparent; overflow: visible; max-width: 100vw; max-height: 100vh; color: #3B2A22; }
dialog.phone::backdrop { background: rgba(16, 12, 20, .62); backdrop-filter: blur(3px); }
dialog.phone[open] { display: flex; flex-direction: column; align-items: center; gap: 16px; }
dialog.phone[open] .phone-body { animation: pick-up .45s cubic-bezier(.2, .9, .3, 1.15) both; }
@keyframes pick-up { from { transform: translateY(40px) rotate(-6deg) scale(.9); opacity: 0; } }
.phone-body {
  position: relative; height: min(700px, calc(100vh - 110px)); aspect-ratio: 9 / 19.5;
  border: 11px solid #2B2530; border-radius: 48px; overflow: hidden;
  outline: 3px solid #3B2A22; box-shadow: 0 30px 70px rgba(0, 0, 0, .45);
  background: #000;
}
.phone-screen {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center;
  padding: 10px 14px 18px; overflow: hidden;
  background: #E8C48C url(/art/phone-screen-day.webp) center / cover;
  color: #3B2A22;
}
:root[data-night] .phone-screen { background-image: url(/art/phone-screen-night.webp); background-color: #2C2436; color: #FFF1DC; }
.phone-status { align-self: stretch; display: flex; justify-content: space-between; align-items: center; padding: 2px 10px; font-family: var(--font-body); font-weight: 700; font-size: 14px; }
.phone-bars { display: inline-flex; gap: 2px; align-items: flex-end; }
.phone-bars i { width: 4px; background: currentColor; border-radius: 1px; }
.phone-bars i:nth-child(1) { height: 5px; } .phone-bars i:nth-child(2) { height: 8px; } .phone-bars i:nth-child(3) { height: 11px; }
.lock-date { margin: 14px 0 0; font-family: var(--font-body); font-weight: 700; font-size: 15px; opacity: .85; }
.lock-time { margin: 0 0 8px; font-family: var(--font-head); font-weight: 700; font-size: clamp(52px, 9vh, 72px); line-height: 1; letter-spacing: -.02em; }
.notif {
  align-self: stretch;
  display: grid; grid-template-columns: 34px 1fr auto; gap: 2px 10px; align-items: center;
  padding: 9px 12px; text-decoration: none; color: #2B2530; font-family: var(--font-body); font-size: 13.5px; line-height: 1.3;
  background: rgba(255, 250, 242, .8); backdrop-filter: blur(10px); border-radius: 18px;
  animation: notif-in .5s cubic-bezier(.2, .9, .3, 1.1) both;
}
.notif:hover { background: rgba(255, 250, 242, .95); }
.notif .app { grid-row: span 2; width: 34px; height: 34px; border-radius: 9px; background:
  radial-gradient(circle at 38% 48%, #FFF6E2 0 2.6px, transparent 3.6px),
  radial-gradient(circle at 62% 48%, #FFF6E2 0 2.6px, transparent 3.6px), #2C2436;
  box-shadow: inset 0 0 0 2px rgba(255, 184, 92, .35); }
.notif b { font-weight: 800; }
.notif time { font-size: 12px; opacity: .6; }
.notif span { grid-column: 2 / 4; font-weight: 700; font-size: 14.5px; }
.notif { animation-delay: .3s; }
dialog.phone:focus { outline: none; }
@keyframes notif-in { from { opacity: 0; transform: translateY(-14px) scale(.96); } }
.phone-cta {
  margin-top: auto; padding: 10px 18px; border-radius: 999px; text-decoration: none;
  font-family: var(--font-head); font-weight: 700; font-size: 15px; color: #FFF6EA;
  background: rgba(196, 92, 82, .92); border: 2px solid #3B2A22;
}
.phone-close { min-height: 44px; }

/* ---------------------------------------------------------------- the sections under the room */

/* a page from her journal */
.story { max-width: 920px; }
/* her handwriting (Caveat, in pen-blue ink) on the page's ruled lines: every line of text is one
   rule tall and sits on its rule (text and rule scale together: the baseline lands 27/36 of the
   way down a line, the rule at 28/36) */
.journal-page {
  --rule: 31px; --pt: 46px; --margin: clamp(56px, 7vw, 80px);
  position: relative; color: #2B3A67;
  padding: var(--pt) clamp(22px, 4vw, 44px) var(--rule) var(--margin);
  font-family: "Caveat", var(--font-head); font-weight: 500; font-size: calc(var(--rule) * .7778); line-height: var(--rule);
  background-color: #FBF6EC;
  background-image:
    linear-gradient(90deg, transparent calc(var(--margin) - 20px), rgba(196, 92, 82, .5) calc(var(--margin) - 20px), rgba(196, 92, 82, .5) calc(var(--margin) - 18px), transparent 0),
    linear-gradient(transparent calc(var(--rule) * .7778), rgba(120, 150, 190, .4) calc(var(--rule) * .7778), rgba(120, 150, 190, .4) calc(var(--rule) * .7778 + 1.5px), transparent calc(var(--rule) * .7778 + 1.5px));
  background-size: 100% 100%, 100% var(--rule);
  background-repeat: no-repeat, repeat;
  background-position: 0 0, 0 var(--pt);
  border-radius: 4px 6px 5px 3px;
  box-shadow: 0 14px 30px rgba(30, 20, 10, .16), 0 2px 0 rgba(30, 20, 10, .06);
  transform: rotate(-.6deg);
}
.journal-page h2 { position: relative; top: calc(var(--rule) * .24); margin: 0; font-family: inherit; font-weight: 700; font-size: calc(var(--rule) * 1.39); line-height: calc(2 * var(--rule)); letter-spacing: 0; color: #223061; }
.journal-page p { margin: 0 0 var(--rule); font-size: inherit; }
.journal-page .sign { margin: 0; font-weight: 700; color: #B44C43; }
.tape { position: absolute; width: 96px; height: 28px; background: rgba(232, 196, 140, .78); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.tape.tl { left: -22px; top: 10px; transform: rotate(-38deg); }
.tape.tr { right: -22px; top: 10px; transform: rotate(36deg); }

.see-all {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 30px; padding: 8px 0;
  font-family: var(--font-head); font-weight: 700; font-size: 19px; color: var(--ink); text-decoration: none;
}
.see-all svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
.see-all:hover svg { transform: translateX(4px); }
/* things on her desk, standing on its edge: a picture and a name each, nothing else */
.desk-shelf h2 { margin-top: 0; }
.shelf { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; margin: 24px 8px 0; padding: 0; list-style: none; align-items: start; }
.shelf a { display: block; text-decoration: none; color: var(--ink); transition: transform .2s cubic-bezier(.2, .9, .3, 1.3); transform-origin: 50% 100%; }
.shelf img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 16px; box-shadow: 0 8px 20px rgba(30, 20, 10, .12); }
.shelf span { display: block; min-height: calc(2.6em + 22px); padding: 10px 2px 12px; font-family: var(--font-head); font-weight: 700; font-size: 16px; line-height: 1.3; }
.shelf a:hover, .shelf a:focus-visible { transform: translateY(-8px) rotate(-1.5deg); }
.shelf li:nth-child(even) a:hover, .shelf li:nth-child(even) a:focus-visible { transform: translateY(-8px) rotate(1.5deg); }
.desk-edge {
  height: 18px; margin: -2px 0 28px; border-radius: 6px;
  background: linear-gradient(#C08B67, #A87454); box-shadow: 0 12px 20px -8px rgba(59, 42, 34, .35);
}

.free { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(24px, 5vw, 56px); align-items: center; }
.free > img { border-radius: 22px; box-shadow: 0 14px 34px rgba(30, 20, 10, .12); }
.phone-fan { position: relative; display: flex; justify-content: center; margin: 0; padding: 40px 0 24px; list-style: none; }
.phone-fan li {
  --i: 0; position: relative; flex: none; width: clamp(108px, 13vw, 160px); margin: 0 -14px;
  aspect-ratio: 400 / 867; border: 4px solid #2B2530; border-radius: 18px; overflow: hidden;
  background: #2B2530; box-shadow: 0 10px 22px rgba(30, 20, 10, .22);
  transform: rotate(calc(var(--i) * 8deg)) translateY(calc(var(--i) * var(--i) * 14px));
  transition: transform .3s cubic-bezier(.2, .9, .3, 1.3), box-shadow .3s; cursor: pointer; outline: none;
}
.phone-fan li:nth-child(1) { --i: -1; } .phone-fan li:nth-child(2) { --i: 0; z-index: 1; } .phone-fan li:nth-child(3) { --i: 1; }
.phone-fan li:hover, .phone-fan li:focus-visible, .phone-fan li:focus {
  z-index: 2; transform: translateY(-22px) scale(1.25); box-shadow: 0 24px 40px rgba(30, 20, 10, .32);
}
.phone-fan:has(li:hover) li:not(:hover) { filter: saturate(.8) brightness(.94); }
.phone-fan img { width: 100%; height: 100%; object-fit: cover; }
.phone-fan .lock {
  position: absolute; left: 0; right: 0; top: 9%; text-align: center; color: #FFF6EA;
  text-shadow: 0 1px 6px rgba(0, 0, 0, .25); pointer-events: none;
}
.phone-fan li:not(:nth-child(2)) .lock { color: #3B2A22; text-shadow: 0 1px 6px rgba(255, 246, 234, .5); }
.phone-fan .lock small { display: block; font-family: var(--font-body); font-weight: 700; font-size: 8px; opacity: .85; }
.phone-fan .lock b { display: block; font-family: var(--font-head); font-weight: 700; font-size: 27px; line-height: 1.05; }
@media (prefers-reduced-motion: reduce) { .phone-fan li { transition: none; } }
.downloads { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 0; margin: 18px 0 0; list-style: none; }
/* an email first, then the files */
.signup { margin-top: 22px; }
.signup label { display: block; margin-bottom: 10px; font-family: var(--font-head); font-weight: 600; font-size: 17px; }
.signup-row { display: flex; flex-wrap: wrap; gap: 10px; }
.signup input[type="email"] {
  flex: 1 1 220px; min-width: 0; min-height: 52px; padding: 0 20px;
  font: inherit; font-size: 17px; color: var(--ink); background: var(--card);
  border: 0; border-radius: 999px; box-shadow: inset 0 0 0 1.5px rgba(59, 42, 34, .2);
}
:root[data-night] .signup input[type="email"] { box-shadow: inset 0 0 0 1.5px rgba(240, 226, 204, .25); }
.signup input[type="email"]::placeholder { color: var(--soft); opacity: .7; }
.signup input[type="email"]:focus { outline: none; box-shadow: inset 0 0 0 2.5px #B44C43; }
.signup .btn { min-height: 52px; }
.signup .fine { margin: 10px 0 0; font-size: 14.5px; color: var(--soft); }
.signup-status { margin: 6px 0 0; min-height: 1.4em; font-size: 15px; font-weight: 700; color: #B44C43; }
:root[data-night] .signup-status { color: #F09088; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.unlocked .thanks { margin: 18px 0 0; font-family: var(--font-head); font-weight: 700; font-size: 20px; }
.free h1 { font-size: clamp(32px, 4.4vw, 46px); }
:root.confirmed [data-if-not], :root:not(.confirmed) [data-if-confirmed] { display: none; }
.free .after { margin: 22px 0 0; }
.check-inbox { margin: 6px 0 0; padding: 12px 16px; background: var(--card); border-radius: 14px; color: var(--ink); font-size: 16px; }
.shop-free .check-inbox { margin: 12px 0; }
.downloads a { width: 100%; }
/* the wallpaper picker (site.js builds it from /free/wallpapers.json): the zip, then six little phones */
[data-wallpapers].wp-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px 12px; padding: 0; margin: 18px 0 0; list-style: none; }
.wp-grid .wp-all, .wp-grid .wp-hint { grid-column: 1 / -1; }
.wp-grid .wp-all .btn { width: 100%; }
[data-wallpapers].wp-grid a.wp-pick { display: block; padding: 0; min-height: 0; text-align: center; text-decoration: none; color: var(--ink); background: none; box-shadow: none; }
[data-wallpapers].wp-grid a.wp-pick:hover { background: none; }
.wp-pick img { width: 100%; aspect-ratio: 1179 / 2556; object-fit: cover; border-radius: 12px; box-shadow: 0 6px 16px rgba(30, 20, 10, .16); transition: transform .2s; }
.wp-pick:hover img, .wp-pick:focus-visible img { transform: translateY(-4px) rotate(-1.5deg); }
.wp-pick .q { display: block; margin-top: 6px; font-family: var(--font-head); font-weight: 600; font-size: 13px; line-height: 1.25; }
.wp-grid .wp-hint { margin-top: -2px; font-size: 14px; color: var(--soft); }
@media (max-width: 720px) { [data-wallpapers].wp-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.tip-section { max-width: 860px; padding-bottom: 8px; }
#tip-jar { scroll-margin-top: 100px; }      /* Stripe's cancel comes back to /#tip-jar */
.tip-soon { display: none; }
#tip-jar:empty + .tip-soon { display: grid; }
.tip-soon, .tip-jar {
  grid-template-columns: minmax(0, 150px) minmax(0, 1fr); gap: clamp(16px, 3vw, 28px); align-items: center;
  padding: clamp(14px, 2.4vw, 22px);
}
.tip-soon h2 { font-size: clamp(22px, 2.8vw, 28px); margin-bottom: .2em; }
.tip-soon p:last-child { margin: 0; color: var(--soft); }
/* the picture: her mind with a hot chocolate, and the same with its eyes shut in a smile, ^ ^ */
.tip-art { position: relative; display: block; border-radius: 16px; overflow: hidden; cursor: pointer; }
.tip-art img { width: 100%; transition: transform .25s cubic-bezier(.2, .9, .3, 1.4); }
.tip-art .happy { position: absolute; inset: 0; opacity: 0; transition: opacity .12s, transform .25s cubic-bezier(.2, .9, .3, 1.4); }
.tip-art:hover .happy, .tip-art.happy-now .happy, :is(.tip-jar, .tip-soon):has(.tip-buy:hover, .tip-buy:focus-visible) .tip-art .happy { opacity: 1; }
.tip-art:hover img, .tip-art.happy-now img { transform: scale(1.04) rotate(-1deg); }

/* goodbye: she waves, holding her mind's hand */
.bye { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(20px, 5vw, 64px); align-items: center; max-width: 860px; }
.bye-art { position: relative; isolation: isolate; width: clamp(150px, 20vw, 230px); aspect-ratio: 528 / 903; }
.bye-art::before {        /* a pool of warm light around them, so her mind shows on the night page */
  content: ""; position: absolute; inset: 18% -45% -4% -35%; z-index: -1;
  background: radial-gradient(closest-side, rgba(232, 196, 140, .5), rgba(232, 196, 140, 0));
}
.bye-art img { position: absolute; inset: 0; width: 100%; height: 100%; visibility: hidden; }
.bye-art img.on { visibility: visible; }
.bye h2 { font-size: clamp(30px, 4.4vw, 46px); }
.bye p { color: var(--soft); max-width: 460px; }

.site-foot {
  max-width: var(--max); margin: clamp(48px, 7vw, 80px) auto 0; padding: 28px var(--gutter) 40px;
  display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: baseline; color: var(--soft); font-size: 16px;
}
.site-foot nav { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.site-foot .made { margin: 0 0 0 auto; }

@media (max-width: 960px) {
  .shelf { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 16px; }
}
@media (max-width: 860px) {
  .free { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .section { padding-left: 16px; padding-right: 16px; }
  /* on phones the shelf scrolls sideways, like a real shelf seen up close */
  .shelf { display: flex; gap: 14px; margin: 20px -16px 0; padding: 4px 16px 0; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .shelf::-webkit-scrollbar { display: none; }
  .shelf li { flex: 0 0 42%; scroll-snap-align: start; }
  .journal-page { --rule: 32px; --margin: 50px; padding-right: 16px; }
  .tape.tl { left: -10px; }
  .tape.tr { right: -10px; }          /* inside the 16px gutter, so the page never scrolls sideways */
  .downloads { grid-template-columns: 1fr; }
  .tip-soon, .tip-jar { grid-template-columns: 88px minmax(0, 1fr); align-items: start; }
  .bye { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .site-foot { padding: 24px 16px 32px; }
  .site-foot .made { margin: 0; }
}

/* small phones: her story's heading on one line (after the 720px rules, so it wins) */
@media (max-width: 400px) {
  .journal-page h2 { font-size: 36px; }
  .phone-fan li { width: 100px; margin: 0 -10px; }
}

/* the hand-lettered face for everything that isn't reading text (last, so `font: inherit` above
   doesn't undo it) */
.site-name, .site-nav a, .theme-switch, .sound-switch, .btn, .tag, .room-chips a, .room-chips button,
.room-words .hint, .intro-words .hint { font-family: var(--font-head); }
