@font-face { font-family: "Amalfi"; src: url("../assets/room/amalfi.otf"); font-display: block; }
@font-face { font-family: "Instrument Sans"; src: url("../assets/fonts/instrument-sans.ttf") format("truetype"); font-display: block; } /* the intro's lines (SIL Open Font License, alongside it) */
:root {
  --sans: "Helvetica Neue", "Segoe UI", Arial, sans-serif;
  --ink: #26231f;
  --ink-soft: #5d574d;
  --ease: cubic-bezier(.65, 0, .35, 1);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #7f9fe6; color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
button { font: inherit; border: 0; padding: 0; background: none; color: inherit; cursor: pointer; }

/* ---------- the room ---------- */
#viewport { position: fixed; inset: 0; overflow: hidden; }
#frame { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; transform-origin: 0 0; background: #7f9fe6; }
#frame img, #frame .abs { position: absolute; display: block; }
.shadow { filter: drop-shadow(0 6px 6px rgba(40, 30, 10, .28)); }
.soft { filter: drop-shadow(0 3px 3px rgba(40, 30, 10, .25)); }
.hill { position: absolute; left: -40px; width: 2000px; background-size: 900px auto; filter: drop-shadow(0 -3px 4px rgba(20, 40, 10, .35)); }
/* wind: every so often a soft gust of light brushes across the meadow, back hill first, front hill last.
   (Hills are 6200 px wide; the part on screen is roughly x 2000–4000 of each.) */
.hill::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(100deg, rgba(255, 255, 225, 0) 0%, rgba(240, 255, 200, .10) 40%, rgba(240, 255, 200, .17) 50%, rgba(240, 255, 200, .10) 60%, rgba(255, 255, 225, 0) 100%) no-repeat;
  background-size: 1100px 100%; background-position: 900px 0; mix-blend-mode: screen;
  animation: gust 17s cubic-bezier(.45, 0, .55, 1) infinite; }
.hill:nth-of-type(2)::after { animation-delay: .5s; }
.hill.front::after { animation-delay: 1.1s; }
@keyframes gust { 0% { background-position: 900px 0; } 45%, 100% { background-position: 4200px 0; } }
/* the intro's welcome gust: switching to an identical animation restarts the wind, so a gust runs right away (js/intro.js) */
#frame.gust-a .hill::after { animation-name: gust-a; }
#frame.gust-b .hill::after { animation-name: gust-b; }
@keyframes gust-a { 0% { background-position: 900px 0; } 45%, 100% { background-position: 4200px 0; } }
@keyframes gust-b { 0% { background-position: 900px 0; } 45%, 100% { background-position: 4200px 0; } }
@media (prefers-reduced-motion: reduce) { .hill::after { animation: none; display: none; } }

.ground-shadow { position: absolute; border-radius: 50%; background: radial-gradient(closest-side, rgba(25, 40, 10, .45), rgba(25, 40, 10, 0)); }
.cloud { -webkit-mask-image: radial-gradient(closest-side, #000 55%, transparent); mask-image: radial-gradient(closest-side, #000 55%, transparent); }

#board { position: absolute; }
#board .cork { position: absolute; background: url("../assets/room/cork.webp") center / 420px auto; box-shadow: inset 0 0 18px rgba(60, 30, 0, .45); overflow: hidden; }
.pin { position: absolute; width: 9px; height: 9px; border-radius: 50%; box-shadow: 0 2px 2px rgba(0,0,0,.4), inset -2px -2px 3px rgba(0,0,0,.25); z-index: 5; }
#frame .print { position: absolute; box-shadow: 0 3px 6px rgba(0,0,0,.35); }
#frame .cutout { position: absolute; filter: drop-shadow(0 3px 3px rgba(0,0,0,.35)); }
.polaroid { position: absolute; background: #fbf8f1; padding: 4px 4px 12px; box-shadow: 0 2px 5px rgba(0,0,0,.35); }
#frame .polaroid img { position: static; width: 100%; aspect-ratio: 1; object-fit: cover; }
.blurstrip { position: absolute; backdrop-filter: blur(2.5px); }

#screen { position: absolute; z-index: 2; overflow: hidden; }
#screen .blank { position: absolute; inset: 0; background: linear-gradient(115deg, rgba(255,255,255,0) 38%, rgba(255,255,255,.07) 46%, rgba(255,255,255,0) 58%), radial-gradient(130% 110% at 30% 20%, #3a3d42 0%, #232528 55%, #18191b 100%); }

/* hovering the computer turns the blank screen into the sites browser */
#screen .browser { position: absolute; inset: 0; background: #fff; opacity: 0; transition: opacity .35s var(--ease); }
#screen.sites .browser { opacity: 1; }
#screen .bar { height: 15px; background: #e8e3d8; display: flex; align-items: flex-end; padding-left: 22px; gap: 2px; position: relative; }
#screen .bar::before { content: ""; position: absolute; left: 5px; top: 5px; width: 4px; height: 4px; border-radius: 50%; background: #e0675a; box-shadow: 6px 0 #e8b83a, 12px 0 #6cbf6a; }
#screen .tab { font-size: 7px; color: #5b564c; padding: 2px 6px; border-radius: 3px 3px 0 0; background: #d9d3c6; white-space: nowrap; }
#screen .tab.on { background: #fff; color: #222; }
#screen .url { height: 11px; background: #fff; border-bottom: 1px solid #e2ddd2; font-size: 6.5px; color: #7a7468; padding-left: 8px; line-height: 11px; }
#frame #screen .browser img { left: 0; top: 26px; width: 100%; }

/* objects lift a touch on hover, as if picked up for a glance. Uses the separate translate/scale
   properties so it stacks on top of any tilt an object already has (posters, Polaroids, the magazine) */
.liftable { transform-origin: 50% 100%; transition: translate .4s var(--ease), scale .4s var(--ease), filter .4s var(--ease); }
.liftable.lift { translate: 0 -6px; scale: 1.05; filter: drop-shadow(0 7px 6px rgba(40, 30, 10, .3)); }
#board .liftable.lift { translate: 0 -3px; scale: 1.06; filter: drop-shadow(0 6px 5px rgba(40, 20, 0, .4)); }

/* tape reels on the recorder */
.tape-reel { position: absolute; }
.tape-reel .spin, .tape-reel svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.tape-reel svg { overflow: visible; }

/* the Muybridge strip: on hover every frame advances one pose, so the cat runs in each one */
#filmPlay { position: absolute; left: 2.94px; top: 2.1px; width: 204.96px; height: 21.63px; background: url("../assets/room/film-frames.webp") 0 0 / 204.96px 100% repeat-x; }
#filmPlay.on { animation: film-run .6s steps(6) infinite; }
@keyframes film-run { to { background-position-x: -204.96px; } }

/* globe: the turning map fades in over the engraving's sphere on hover */
.globe-spin { position: absolute; border-radius: 50%; opacity: 0; transition: opacity .45s var(--ease); pointer-events: none; }
#globeWrap.spin .globe-spin { opacity: 1; }

/* mailbox: the flag swings up on hover (pivots on its bracket bolt) */
#mailbox { aspect-ratio: 1000 / 784; }
#mailbox .flag-arm { transform-origin: 43.75% 54.2%; transition: transform .6s var(--ease); }
#mailbox.flag .flag-arm { transform: rotate(-90deg); }

/* hover hit areas: invisible, above the scene (the lamp's is #lampHit) */
.spot { position: absolute; z-index: 9; cursor: pointer; border-radius: 12px; }
.spot.still { cursor: default; }
.spot:focus-visible { outline: 2px solid rgba(255, 255, 255, .9); outline-offset: 3px; }

#mag { position: absolute; z-index: 1; }
#mag .cover { position: absolute; inset: 0; background: url("../assets/room/mag-cover-photo.webp") center / cover; box-shadow: 2px 3px 6px rgba(0,0,0,.35), inset 0 0 0 1px rgba(0,0,0,.08); overflow: hidden; }
#mag .cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.28), rgba(0,0,0,0) 30%, rgba(0,0,0,0) 70%, rgba(0,0,0,.3)); }
#mag .mast { position: absolute; top: 6px; left: 0; right: 0; text-align: center; font-family: "Amalfi", serif; font-size: 17px; line-height: 1; white-space: nowrap; color: #fffaf0; z-index: 1; }
#mag .issue { position: absolute; top: 25px; left: 0; right: 0; text-align: center; font-size: 5.5px; letter-spacing: 1.2px; color: #fffaf0; z-index: 1; }
#mag .line { position: absolute; left: 7px; bottom: 9px; font-size: 6.5px; font-weight: 700; letter-spacing: .4px; line-height: 1.25; color: #fffaf0; z-index: 1; }
#mag .line b { color: #f0a83a; }
#mag .code { position: absolute; right: 5px; bottom: 6px; width: 14px; height: 9px; background: repeating-linear-gradient(90deg, #111 0 1px, #fff 1px 2px, #111 2px 3px, #fff 3px 5px); outline: 2px solid #fff; z-index: 1; }
#mag .pages { position: absolute; right: -3px; top: 2px; bottom: 1px; width: 3px; background: repeating-linear-gradient(90deg, #f3eee4 0 1px, #d9d2c4 1px 2px); }
.stand-ledge { position: absolute; height: 8px; border-radius: 2px; background: linear-gradient(180deg, #9a6d42, #6e4a2a); box-shadow: 0 3px 3px rgba(0,0,0,.3); z-index: 2; }
.stand-leg { position: absolute; width: 5px; background: linear-gradient(90deg, #6e4a2a, #8a5e37); transform-origin: top center; z-index: 0; }
.handle { position: absolute; border: 7px solid #f2f2f0; border-left: none; border-radius: 0 40% 40% 0; box-shadow: 2px 2px 3px rgba(0,0,0,.25); }
.post { position: absolute; background: linear-gradient(90deg, #6b4a2c, #8a6440 40%, #5c3f25); box-shadow: 2px 4px 5px rgba(0,0,0,.3); }

/* the lamp in the room */
.glow { position: absolute; width: 300px; height: 300px; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 200, 110, .55), rgba(255, 200, 110, 0)); pointer-events: none; opacity: 0; transition: opacity .45s var(--ease); }
.lit .glow { opacity: 1; }
.spot-shadow { position: absolute; border-radius: 50%; background: radial-gradient(closest-side, rgba(60, 35, 10, .35), rgba(60, 35, 10, 0)); opacity: 0; pointer-events: none; }
#lampHit { position: absolute; z-index: 9; cursor: pointer; border-radius: 40px; }
#lampHit:focus-visible { outline: 2px solid rgba(255, 255, 255, .9); outline-offset: 4px; }

/* ---------- frosted UI ---------- */
.frost { background: rgba(255, 255, 255, .5); -webkit-backdrop-filter: blur(16px) saturate(1.2); backdrop-filter: blur(16px) saturate(1.2); border: 1px solid rgba(255, 255, 255, .75); box-shadow: 0 8px 28px rgba(30, 30, 60, .14); }
#wordmark { position: fixed; left: 46px; top: 30px; z-index: 20; font-family: "Amalfi", serif; font-size: 46px; line-height: .74; color: #fffaf0; text-shadow: 0 1px 6px rgba(40, 50, 90, .35); pointer-events: none; }
.corner { position: fixed; right: 32px; top: 28px; z-index: 20; display: flex; gap: 14px; }
.icon { width: 50px; height: 50px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.icon svg { width: 22px; height: 22px; stroke: #2b2a28; fill: none; stroke-width: 1.6; }
/* the corner buttons' mixed media: bits of paper tucked behind each button come out on hover */
.corner-btn { position: relative; display: block; }
.corner-btn > .icon { position: relative; z-index: 1; cursor: pointer; transition: scale .4s var(--ease), box-shadow .4s var(--ease); }
.corner-btn > .icon svg { transition: rotate .45s var(--ease), translate .45s var(--ease); }
.mm { position: absolute; display: block; pointer-events: none; opacity: 0; user-select: none; transition: opacity .3s var(--ease), translate .5s var(--ease), rotate .5s var(--ease), scale .4s var(--ease); }
.mm-stamp { width: 26px; left: 12px; top: 12px; rotate: -4deg; box-shadow: 0 3px 8px rgba(30, 22, 8, .28); }
.mm-seal { z-index: 2; width: 21px; right: -5px; bottom: -5px; scale: 1.7; rotate: 18deg; filter: drop-shadow(0 2px 3px rgba(60, 10, 0, .35)); }
.mm-print { width: 24px; left: 13px; top: 13px; background: #fbfaf6; padding: 2px; box-shadow: 0 3px 8px rgba(30, 22, 8, .26); }
.mm-tag { z-index: 2; top: calc(100% + 46px); left: 50%; translate: -50% -4px; padding: 4px 10px 5px; border-radius: 9px; white-space: nowrap; font-size: 11px; letter-spacing: .02em; color: #4a453d; }
.mm-tag b { font-family: "Amalfi", serif; font-weight: 400; font-size: 15px; color: var(--ink); }
.mm-folio .mm-tag { left: auto; right: 0; translate: 0 -4px; }
@media (hover: hover) {
  .corner-btn:hover .mm-tag, .corner-btn:focus-within .mm-tag { translate: -50% 0; transition-delay: .15s; }
  .mm-folio:hover .mm-tag, .mm-folio:focus-within .mm-tag { translate: 0 0; }
  .corner-btn:hover > .icon, .corner-btn:focus-within > .icon { scale: 1.06; box-shadow: 0 12px 30px rgba(30, 30, 60, .2); }
  .mm-contact:hover svg, .mm-contact:focus-within svg { rotate: -6deg; translate: 0 -1px; }
  .mm-folio:hover svg, .mm-folio:focus-within svg { rotate: 5deg; }
  .corner-btn:hover .mm, .corner-btn:focus-within .mm { opacity: 1; }
  .mm-contact:hover .mm-stamp, .mm-contact:focus-within .mm-stamp { translate: -20px 22px; rotate: -15deg; }
  .mm-contact:hover .mm-seal, .mm-contact:focus-within .mm-seal { scale: 1; rotate: -8deg; transition-delay: .12s; }
  .mm-folio:hover .mm-print.a, .mm-folio:focus-within .mm-print.a { translate: -16px 26px; rotate: -14deg; }
  .mm-folio:hover .mm-print.b, .mm-folio:focus-within .mm-print.b { translate: 10px 28px; rotate: 9deg; transition-delay: .06s; }
}
@media (prefers-reduced-motion: reduce) { .mm, .corner-btn > .icon, .corner-btn > .icon svg { transition: opacity .2s; } }
.label { position: fixed; z-index: 21; border-radius: 14px; padding: 9px 16px 10px; white-space: nowrap; pointer-events: none; opacity: 0; transform: translateY(6px); transition: opacity .35s var(--ease), transform .35s var(--ease); }
.label.on { opacity: 1; transform: none; }
.label .name { font-family: "Amalfi", serif; font-size: 24px; color: var(--ink); }
.label .type { font-size: 14px; letter-spacing: .3px; color: #4a453d; margin-left: 6px; }
/* blurb card: personal objects get a few lines instead of a name label */
.blurb { position: fixed; z-index: 21; width: 340px; border-radius: 16px; padding: 16px 20px 17px; pointer-events: none; opacity: 0; transform: translateY(6px); transition: opacity .35s var(--ease), transform .35s var(--ease); }
.blurb.on { opacity: 1; transform: none; }
.blurb h3 { margin: 0 0 6px; font: 400 22px/1.15 "Amalfi", serif; color: var(--ink); }
.blurb .sub { margin: -2px 0 8px; font-size: 13px; font-style: italic; color: var(--ink-soft); }
.blurb p { margin: 0; font-size: 14px; line-height: 1.5; color: #35312b; }
.blurb .hint { margin-top: 10px; font-size: 12px; letter-spacing: .3px; color: var(--ink-soft); }
.blurb .hint a { color: inherit; }

/* ---------- the index (opened from the butterfly by the desk) ---------- */
#index { position: fixed; left: 50%; top: 24px; margin-left: calc(min(900px, 100vw - 540px) / -2); width: min(900px, 100vw - 540px); z-index: 22;
  border-radius: 18px; padding: 18px 24px 16px; visibility: hidden; opacity: 0; }
#index .perch { position: absolute; left: -30px; top: -22px; width: 58px; height: 40px; pointer-events: none; }
#index header { display: flex; align-items: baseline; gap: 14px; margin: 0 0 10px; padding-right: 30px; }
#index h2 { margin: 0; font: 400 28px/1 "Amalfi", serif; color: var(--ink); }
#index .intro { margin: 0; font-size: 13px; color: var(--ink-soft); }
#index ol, #index ul { list-style: none; margin: 0; padding: 0; }
#index ol { display: grid; grid-template-columns: repeat(6, auto); gap: 0 18px; justify-content: space-between; }
#index.compact { padding: 15px 20px 13px; }
#index.compact header { margin-bottom: 8px; }
#index.compact h2 { font-size: 24px; }
#index.compact ol { gap: 0 12px; }
#index.compact .cat { font-size: 9.5px; letter-spacing: 1.1px; }
#index.compact .proj { font-size: 12.5px; line-height: 1.45; }
#index.rows ol { grid-template-columns: repeat(3, auto); gap: 8px 22px; }
#index li[data-cat] { padding-top: 9px; border-top: 1px solid rgba(38, 35, 31, .12); }
#index .cat { display: block; text-align: left; font-size: 10.5px; font-weight: 600; letter-spacing: 1.4px; text-transform: uppercase; color: var(--ink-soft); padding: 0 0 5px; white-space: nowrap; transition: color .25s var(--ease); }
#index .cat:hover, #index .cat:focus-visible { color: var(--ink); outline: none; }
#index .proj { display: block; text-align: left; font-size: 14px; line-height: 1.5; color: #35312b; white-space: nowrap; transition: color .25s var(--ease), transform .25s var(--ease); }
#index .proj:hover, #index .proj:focus-visible { color: var(--ink); transform: translateX(3px); outline: none; }
#index .proj.soon::after { content: " · soon"; font-size: 11px; color: var(--ink-soft); }
#index .x { position: absolute; top: 12px; right: 12px; width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
#index .x svg { width: 16px; height: 16px; stroke: #2b2a28; fill: none; stroke-width: 1.6; }
#index .x:hover { background: rgba(255, 255, 255, .5); }.index-flyer { z-index: 23; }
/* while the index is open, the room is just a picture to point at */
body.index-open .spot, body.index-open #lampHit { pointer-events: none; }

/* the room fades back and the category's objects come forward (above the veil, still behind the front grass) */
#indexVeil { position: absolute; left: -2100px; top: -300px; width: 6200px; height: 1500px; z-index: 5; pointer-events: none;
  background: rgba(247, 244, 238, .38); -webkit-backdrop-filter: saturate(.45); backdrop-filter: saturate(.45); opacity: 0; transition: opacity .45s var(--ease); }
#frame.indexing #indexVeil { opacity: 1; }
/* the index butterfly's specimen tag (js/index.js): a paper label on a thread, hanging from the butterfly */
#frame .specimen-tag { width: 0; height: 0; pointer-events: none; transform-origin: 0 0; }
#frame .specimen-tag .thread { position: absolute; left: -.5px; top: 0; width: 1px; height: 22px; background: rgba(55, 45, 35, .6); }
#frame .specimen-tag .tag-label { position: absolute; left: 0; top: 21px; translate: -50% 0; padding: 3px 7px 4px; background: #f5f0e3; border: 1px solid rgba(80, 65, 45, .22); border-radius: 1.5px; box-shadow: 0 1px 3px rgba(30, 25, 15, .3); font: 15px/1 "Amalfi", serif; letter-spacing: .02em; color: #3a3128; white-space: nowrap; rotate: -3deg; }
#frame .specimen-tag .tag-label::before { content: ""; position: absolute; left: 50%; top: 2px; width: 3px; height: 3px; margin-left: -1.5px; border-radius: 50%; background: rgba(55, 45, 35, .45); }
.index-obj { transition: translate .45s var(--ease), scale .45s var(--ease), filter .45s var(--ease); }
#frame .index-lit { z-index: 6 !important; translate: 0 -6px; scale: 1.05; filter: drop-shadow(0 0 7px rgba(255, 255, 250, .95)) drop-shadow(0 7px 6px rgba(40, 30, 10, .28)); }
.index-tag { position: fixed; z-index: 21; border-radius: 10px; padding: 5px 10px 6px; font-size: 12px; letter-spacing: .3px; color: var(--ink); white-space: nowrap; pointer-events: none; opacity: 0; transform: translateY(4px); transition: opacity .3s var(--ease), transform .3s var(--ease); }
.index-tag.on { opacity: 1; transform: none; }

/* ---------- the open piece ---------- */
.piece { position: fixed; inset: 0; z-index: 30; overflow-y: auto; overflow-x: hidden; visibility: hidden; scrollbar-width: none; overscroll-behavior: contain; }
.piece::-webkit-scrollbar { display: none; }
/* barely-there veil: just enough to set the room back a step */
.piece .veil { position: fixed; inset: 0; background: rgba(247, 244, 238, .16); -webkit-backdrop-filter: blur(1.5px); backdrop-filter: blur(1.5px); opacity: 0; }

.stage { position: fixed; left: 0; top: 0; width: 60vw; height: 100vh; pointer-events: none; }
.set { position: absolute; inset: 6vh 3vw 6vh 5vw; visibility: hidden; }
.set > img, .set .sheet { position: absolute; left: var(--x); top: var(--y); width: var(--w); rotate: var(--r); }
.set .paper { background: #fff; padding: 0; box-shadow: 0 10px 30px rgba(40, 30, 10, .16), 0 1px 3px rgba(40, 30, 10, .12); }
.set .print { box-shadow: 0 10px 28px rgba(20, 15, 5, .28); border: 5px solid #fbfaf7; }
.set .sheet { box-shadow: 0 10px 30px rgba(40, 30, 10, .16), 0 1px 3px rgba(40, 30, 10, .12); }

.slot { position: absolute; height: 74vh; width: calc(74vh * 467 / 900); left: calc(28% - 74vh * 467 / 900 / 2); top: 7vh; }
.slot img { width: 100%; height: 100%; display: block; }
.lamp-glow { position: absolute; width: 70vh; height: 70vh; left: calc(28% - 35vh); top: 9vh; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 196, 110, .6), rgba(255, 196, 110, 0)); }

.explode { position: absolute; height: 80vh; width: calc(80vh * 630 / 813); left: calc(50% - 80vh * 630 / 813 / 2); top: 3vh; }
.explode img { width: 100%; height: 100%; display: block; }
.tag { position: absolute; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink); padding: 5px 9px; border-radius: 999px; background: rgba(255,255,255,.7); box-shadow: 0 2px 10px rgba(30,30,60,.1); white-space: nowrap; opacity: 0; }

.set .phone { position: absolute; height: 80vh; width: auto; left: 50%; top: 4vh; translate: -50% 0; filter: drop-shadow(0 24px 40px rgba(20, 15, 5, .3)); }
.set .photo { border-radius: 6px; box-shadow: 0 18px 44px rgba(20, 15, 5, .32), 0 2px 6px rgba(20, 15, 5, .2); }

.article { position: relative; margin-left: 61vw; width: min(450px, 33vw); padding: 24vh 0 0; }
.card { border-radius: 22px; padding: 34px 38px 36px; margin-bottom: 52vh; opacity: .35; transition: opacity .6s var(--ease); background: rgba(255, 255, 255, .62); }
.card.active { opacity: 1; }
/* "how it's built" holds still while the scroll pulls the lamp apart */
.hold { height: 190vh; margin-bottom: 30vh; }
.card.tall { position: sticky; top: 22vh; margin-bottom: 0; }
.article > section:has(+ .end) { margin-bottom: 0; } /* only the very last card sits right on the ending */
.end { height: 40vh; display: flex; align-items: center; justify-content: center; }
.return { margin: 0; padding: 8px 14px; border-radius: 999px; background: rgba(255, 255, 255, .55); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: #4f493f; }

/* type: one clear hierarchy (kicker, Amalfi title, lead, body, details) */
.kicker { display: flex; align-items: center; gap: 12px; font-size: 11px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: #7d7568; margin-bottom: 18px; }
.kicker span { font-variant-numeric: tabular-nums; color: var(--ink); }
.kicker span::after { content: ""; display: inline-block; width: 22px; height: 1px; background: currentColor; opacity: .35; vertical-align: middle; margin-left: 12px; }
.card h1, .card h2 { font-family: "Amalfi", serif; font-weight: 400; color: var(--ink); line-height: 1; letter-spacing: -.005em; }
.card h1 { font-size: clamp(30px, 3.2vw, 46px); margin: 0 0 18px; }
.card h2 { font-size: 36px; margin: 0 0 16px; }
.card p { font-size: 15.5px; line-height: 1.5; margin: 0 0 14px; color: #2e2a25; text-wrap: pretty; }
.card p:last-child { margin-bottom: 0; }
.card .lead { font-size: 18px; line-height: 1.42; color: var(--ink); letter-spacing: -.005em; margin-bottom: 22px; }
.card .pull { font-family: "Amalfi", serif; font-size: 26px; line-height: 1.15; color: var(--ink); margin-top: 18px; }
.card .pull.long { font-size: 20px; line-height: 1.3; }
/* Amalfi's closing quote faces the wrong way: turn the opening mark around instead */
.card .pull .cq { display: inline-block; position: relative; top: -.62em; line-height: 1; vertical-align: top; transform: rotate(180deg); }
/* a small source or credit under the copy: a footnote, not a button */
.card .credit-line { font-size: 11px; letter-spacing: .02em; color: #8a8276; margin: 12px 0 0; }
.card .credit-line a { color: inherit; text-decoration: underline; text-decoration-color: rgba(138, 130, 118, .4); text-underline-offset: 2px; }
.card .materials { margin-top: 18px; padding-top: 14px; border-top: 1px solid rgba(38, 35, 31, .14); font-size: 12px; line-height: 1.6; letter-spacing: .04em; color: var(--ink-soft); }
.specs { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 22px; border-top: 1px solid rgba(38, 35, 31, .14); }
.specs > div { padding: 11px 0 10px; border-bottom: 1px solid rgba(38, 35, 31, .14); }
.specs dt { font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: #7d7568; margin-bottom: 3px; }
.specs dd { margin: 0; font-size: 13.5px; line-height: 1.35; color: var(--ink); }
.parts { list-style: none; margin: 18px 0 0; padding: 12px 0 0; border-top: 1px solid rgba(38, 35, 31, .14); font-size: 14px; line-height: 1.75; color: var(--ink); }

.piece-close { position: fixed; top: 28px; right: 32px; z-index: 40; opacity: 0; }
.piece-close svg { width: 18px; height: 18px; }

.set > .item { position: absolute; left: var(--x); top: var(--y); width: var(--w); rotate: var(--r); }
.card .next-link { display: inline-flex; gap: 8px; align-items: center; margin-top: 20px; padding: 10px 16px; border-radius: 999px; background: var(--ink); color: #fbfaf7; font-size: 13px; letter-spacing: .02em; text-decoration: none; transition: background .3s var(--ease); }
.card .next-link:hover { background: #4a453e; }

/* ---------- BIT ---------- */
.bit-slot { position: absolute; height: min(54vh, 29vw); aspect-ratio: 820 / 847; left: calc(27% - min(54vh, 29vw) * 820 / 847 / 2); top: 17vh; }
.bit-slot img { width: 100%; height: 100%; display: block; filter: drop-shadow(0 22px 30px rgba(60, 10, 10, .22)); }
.paper-card { background: #fbfaf7; padding: 4%; box-shadow: 0 10px 30px rgba(40, 30, 10, .16), 0 1px 3px rgba(40, 30, 10, .12); border-radius: 3px; }
.paper-card img { width: 100%; display: block; }

/* 3 · the build: the old mark, then the new emblem layer by layer, then the wordmark */
.bit-build { position: absolute; inset: 0; }
/* proportions from the brand guide's lockup (p. 13): the emblem is ~1.08× the wordmark's height, with a gap of ~0.16× the emblem */
.bit-build .lockup { position: absolute; left: 50%; top: 46%; translate: -50% -50%; display: flex; align-items: center; gap: min(4.8vh, 2.7vw); }
.bit-build .emblem { position: relative; height: min(30vh, 17vw); aspect-ratio: 1600 / 1648; flex: none; }
.bit-build .emblem img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.bit-build .emblem .old { inset: 3%; width: 94%; height: 94%; }
.bit-build .wordmark { height: min(27.8vh, 15.75vw); width: auto; flex: none; }
.bit-build .tag { opacity: 1; }

/* 4 · the system: paint chips (colour above, label below) and stitched fabric swatches */
.chip { --w: 12.5%; aspect-ratio: 5 / 8.6; background: #fbfaf7; border-radius: 4px; padding: 0 0 10px; box-shadow: 0 10px 26px rgba(40, 30, 10, .18), 0 1px 3px rgba(40, 30, 10, .12); display: flex; flex-direction: column; font-size: 10.5px; line-height: 1.35; color: #4f493f; }
.chip::before { content: ""; flex: 1 1 auto; background: var(--c); border-radius: 4px 4px 0 0; margin-bottom: 9px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); }
.chip b, .chip small, .chip code { padding: 0 10px; }
.chip b { font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 2px; }
.chip small { font-size: 9.5px; letter-spacing: .04em; text-transform: uppercase; }
.chip code { font-family: inherit; font-size: 10.5px; margin-top: 3px; letter-spacing: .04em; }
.chip.honey { scale: 1.1; z-index: 2; box-shadow: 0 0 0 1px rgba(255, 200, 68, .5), 0 0 40px rgba(255, 200, 68, .55), 0 14px 30px rgba(40, 30, 10, .2); }
.chip.honey i { position: absolute; top: -12px; left: 50%; translate: -50% 0; font-style: normal; font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; padding: 4px 8px; border-radius: 999px; background: #ffc844; color: #3a2a00; }
.swatch { --w: 12%; aspect-ratio: 1; background-color: var(--c); border-radius: 3px; padding: 9% 10%; color: rgba(255,255,255,.92); display: flex; flex-direction: column; justify-content: flex-end; font-size: 9.5px; letter-spacing: .06em; text-transform: uppercase;
  background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.06) 0 1px, transparent 1px 4px), repeating-linear-gradient(-45deg, rgba(0,0,0,.08) 0 1px, transparent 1px 4px);
  box-shadow: inset 0 0 0 5px var(--c), inset 0 0 0 6px rgba(255,255,255,.5), 0 10px 24px rgba(40, 30, 10, .2); outline: 1.5px dashed rgba(255,255,255,.6); outline-offset: -9px; }
.swatch small { white-space: nowrap; font-size: 8.5px; }
.swatch b { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: none; }
.swatch-note { --w: 50%; margin: 0; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #4f493f; }
.type-card { border-radius: 10px; box-shadow: 0 16px 40px rgba(60, 10, 10, .28); }
.icon-card { padding: 5%; }

/* 5 · in use */
.set > .device { position: absolute; left: var(--x); top: var(--y); height: var(--h); width: auto; rotate: var(--r); filter: drop-shadow(0 24px 40px rgba(20, 15, 5, .3)); }

/* 6 · the guide as a booklet */
.guide-book { position: absolute; left: -2%; right: -2%; top: 16%; pointer-events: auto; }
.booklet .book { position: relative; width: 100%; aspect-ratio: calc(2 * var(--ratio)); perspective: 2600px; }
.booklet .spine { position: absolute; left: 50%; top: 0; bottom: 0; width: 0; }
.booklet .leaf { position: absolute; left: 50%; top: 0; width: 50%; height: 100%; transform-origin: 0 50%; transform-style: preserve-3d; cursor: pointer; }
.booklet .face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; background: #fbfaf7; overflow: hidden; box-shadow: 0 14px 34px rgba(20, 15, 5, .22), 0 1px 3px rgba(20, 15, 5, .14); }
.booklet .face img { width: 100%; height: 100%; display: block; object-fit: cover; user-select: none; }
.booklet .face.back { transform: rotateY(180deg); }
.booklet .face:empty { visibility: hidden; }
/* a soft fold at the spine */
.booklet .face::after { content: ""; position: absolute; inset: 0; pointer-events: none; }
.booklet .front::after { background: linear-gradient(90deg, rgba(0,0,0,.16), rgba(0,0,0,0) 7%); }
.booklet .back::after { background: linear-gradient(270deg, rgba(0,0,0,.16), rgba(0,0,0,0) 7%); }
.book-nav { display: flex; align-items: center; gap: 6px; width: max-content; margin: 26px auto 0; padding: 5px; border-radius: 999px; }
.book-nav button { width: 34px; height: 34px; border-radius: 50%; border: 0; background: transparent; display: grid; place-items: center; cursor: pointer; color: var(--ink); transition: background .25s var(--ease), opacity .25s var(--ease); }
.book-nav button:hover { background: rgba(255,255,255,.7); }
.book-nav button:disabled { opacity: .3; cursor: default; background: transparent; }
.book-nav svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.book-nav .count { min-width: 76px; text-align: center; font-size: 11.5px; letter-spacing: .1em; color: #4f493f; font-variant-numeric: tabular-nums; }

/* ---------- Recycling Bayou ---------- */
.eden-slot { position: absolute; height: min(76vh, 50vw); aspect-ratio: 338 / 634; left: calc(30% - min(76vh, 50vw) * 338 / 634 / 2); top: 4vh; }
.eden-slot svg { width: 100%; height: 100%; display: block; overflow: visible; filter: drop-shadow(0 26px 34px rgba(20, 30, 10, .22)); }
.set .cutout { filter: drop-shadow(0 16px 28px rgba(20, 40, 10, .3)); }
.moodboard { overflow: hidden; border: 6px solid #fbfaf7; box-shadow: 0 18px 44px rgba(20, 15, 5, .32); aspect-ratio: 1800 / 1125; }
.moodboard img { width: 100%; height: 100%; display: block; object-fit: cover; }
.lockup-float { filter: drop-shadow(0 8px 18px rgba(255, 255, 255, .7)); }
.chip.spot { scale: 1.1; z-index: 2; box-shadow: 0 0 0 1px rgba(var(--glow), .5), 0 0 40px rgba(var(--glow), .55), 0 14px 30px rgba(40, 30, 10, .2); }
.chip.spot i { position: absolute; top: -12px; left: 50%; translate: -50% 0; font-style: normal; font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; padding: 4px 8px; border-radius: 999px; background: var(--c); color: #fff; }

/* 6 · the tri-fold: three panels on two hinges; the left one folds over last, so it's the cover */
.trifold { position: absolute; left: 50%; top: 6%; height: min(70vh, 30vw * 612 / 264); aspect-ratio: 264 / 612; translate: -50% 0; perspective: 2200px; transform-style: preserve-3d; }
.trifold .panel { position: absolute; inset: 0; transform-style: preserve-3d; }
.trifold .panel.left { transform-origin: 100% 50%; left: -100%; right: 100%; }
.trifold .panel.right { transform-origin: 0 50%; left: 100%; right: -100%; }
.trifold .face { position: absolute; inset: 0; width: 100%; height: 100%; display: block; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.trifold .face.back { transform: rotateY(180deg); }
.trifold .mid .face { box-shadow: 0 18px 40px rgba(20, 15, 5, .25); }
.campaign { position: absolute; inset: 0; }
.campaign .c-item { position: absolute; left: var(--x); top: var(--y); width: var(--w); rotate: var(--r); opacity: 0; visibility: hidden; }
.campaign img.c-item:not(.print) { filter: drop-shadow(0 18px 30px rgba(20, 15, 5, .3)); }
.campaign .photo-wrap img { width: 100%; display: block; border-radius: 6px; box-shadow: 0 18px 44px rgba(20, 15, 5, .32); }
.campaign .tag.mock { left: 12px; top: 12px; opacity: 1; }

/* ---------- Amalfi ---------- */
/* 1 · the "a": stacked layers of the glyph in 3D (js/amalfi.js) */
.a-slot { position: absolute; left: 0; width: 56%; top: 4vh; height: 78vh; display: grid; place-items: center; perspective: 1800px; filter: drop-shadow(0 26px 30px rgba(60, 35, 5, .22)); }
.a-spin { position: relative; transform-style: preserve-3d; font-family: "Amalfi", serif; font-size: min(60vh, 36vw); line-height: 1; }
.a-spin span { position: absolute; left: 0; top: 0; display: block; backface-visibility: visible; }
.a-spin span.front { position: relative; }
/* 2 · the process pile */
.pile { aspect-ratio: 1400 / 906; }
.sheet-p { position: absolute; inset: 0; background: #fff; box-shadow: 0 10px 30px rgba(40, 30, 10, .18), 0 1px 3px rgba(40, 30, 10, .12); }
.sheet-p img { width: 100%; height: 100%; display: block; object-fit: cover; }
.sheet-p .tag { left: 14px; top: 14px; opacity: 1; }
.sheet-p .fills { position: absolute; inset: 0; background: #fff; }
/* 4 · the animated posts */
/* Amalfi's Instagram carousel: one square slide shows at a time, the strip slides sideways as you scroll (js/amalfi.js) */
.set > .carousel .window { aspect-ratio: 1; overflow: hidden; border-radius: 4px; box-shadow: 0 14px 34px rgba(20, 15, 5, .28), 0 2px 6px rgba(20, 15, 5, .16); background: #ecebe6; }
.set > .carousel .strip { display: flex; width: 400%; height: 100%; will-change: transform; }
.set > .carousel video.post { position: static; width: 25%; height: 100%; display: block; object-fit: cover; background: none; box-shadow: none; }
.set > .carousel .dots { display: flex; width: max-content; gap: 7px; margin: 12px auto 0; padding: 6px 10px; border-radius: 99px; background: rgba(251, 249, 244, .85); box-shadow: 0 2px 8px rgba(0, 0, 0, .12); }
.set > .carousel .dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(38, 35, 31, .25); transition: background .3s; }
.set > .carousel .dots i.on { background: #3b8fd9; }
.set > video.post { aspect-ratio: 1; display: block; border-radius: 4px; box-shadow: 0 14px 34px rgba(20, 15, 5, .28), 0 2px 6px rgba(20, 15, 5, .16); background: #ecebe6; }
.set > .clipboard { filter: drop-shadow(0 24px 34px rgba(40, 30, 10, .28)) drop-shadow(0 2px 4px rgba(40, 30, 10, .16)); }
/* 5 · the glyph set and the tester */
.specimen { position: relative; box-sizing: border-box; height: 74vh; padding: 9vh 5% 5%; background: #fbfaf7; border-radius: 3px; box-shadow: 0 14px 40px rgba(40, 30, 10, .2), 0 1px 3px rgba(40, 30, 10, .12); overflow: hidden; }
.specimen .tag { left: 5%; top: 3.4vh; opacity: 1; box-shadow: none; background: none; padding: 0; color: var(--ink-soft); }
.glyphs { display: flex; flex-wrap: wrap; align-content: flex-start; gap: .12em .3em; font-family: "Amalfi", serif; font-size: clamp(28px, 2.9vw, 50px); line-height: 1.15; color: var(--ink); }
.glyphs span { display: inline-block; min-width: .72em; text-align: center; }
.tester { position: absolute; inset: 9vh 5% 5%; font-family: "Amalfi", serif; line-height: 1.04; color: var(--ink); overflow-wrap: anywhere; overflow: hidden; opacity: 0; visibility: hidden; }
.card .type-field, .card .type-size { display: block; margin-top: 18px; }
.card .type-field span, .card .type-size span { display: block; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 8px; }
.card .type-field input { width: 100%; box-sizing: border-box; padding: 12px 14px; border-radius: 12px; border: 1px solid rgba(38, 35, 31, .16); background: rgba(255, 255, 255, .6); font-family: "Amalfi", serif; font-size: 22px; color: var(--ink); outline: none; transition: border-color .3s var(--ease), background .3s var(--ease); }
.card .type-field input:focus { border-color: rgba(38, 35, 31, .45); background: rgba(255, 255, 255, .85); }
.card .type-size input { width: 100%; accent-color: var(--ink); }
/* the font download: a plain line, then the card's usual link button */
.card .get-font { margin: 24px 0 0; }
.card .get-font + .next-link { margin-top: 10px; }

/* ---------- Savor ---------- */
.sue-slot { position: absolute; height: min(70vh, 42vw); aspect-ratio: 542 / 1000; left: calc(30% - min(70vh, 42vw) * 542 / 1000 / 2); top: 6vh; }
.sue-slot svg { width: 100%; height: 100%; display: block; overflow: visible; filter: drop-shadow(0 24px 30px rgba(40, 30, 60, .22)); }
/* 2 · the film */
.film video { width: 100%; display: block; aspect-ratio: 16 / 9; border-radius: 14px; background: #f2f5e5; box-shadow: 0 24px 60px rgba(20, 15, 5, .32), 0 2px 8px rgba(20, 15, 5, .18); }
.film-ui { position: absolute; left: 14px; right: 14px; bottom: 14px; display: flex; align-items: center; gap: 10px; pointer-events: auto; }
.film-bar { padding: 8px 0; background-clip: content-box; } /* a taller hit area for clicking to a point */
.film-ui button { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 999px; font-size: 13px; color: var(--ink); }
.film-ui button.film-play { width: 38px; padding: 0; justify-content: center; }
.film-ui svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.film-sound .wave { display: none; } .film-sound[aria-pressed="true"] .wave { display: inline; } .film-sound[aria-pressed="true"] .mute { display: none; }
.film-play .i-play { display: none; fill: currentColor; } .film-play.paused .i-play { display: inline; } .film-play.paused .i-pause { display: none; }
.film-bar { flex: 1; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .45); cursor: pointer; overflow: hidden; box-shadow: 0 1px 4px rgba(0, 0, 0, .15); }
.film-bar i { display: block; height: 100%; width: 0; background: #fff; }
/* 3 · the chat */
/* the phone scales as one piece: every size is a share of its own width (cqw), capped at the size it has on a desktop
   (designed at 300 px wide and up), so on a small screen it shrinks like a picture instead of squeezing its contents */
.chat-phone { container-type: inline-size; aspect-ratio: 600 / 1234; box-sizing: border-box; padding: 0; border-radius: 15.3% / 7.45%; background: #1d1d1f; box-shadow: 0 26px 60px rgba(20, 15, 5, .32); }
.cp-screen { --b: min(10px, 3.33cqw); margin: var(--b); height: calc(100% - 2 * var(--b)); display: flex; flex-direction: column; border-radius: min(37px, 12.33cqw); overflow: hidden; background: #f2f3e5; }
.cp-head { padding: min(40px, 13.33cqw) min(20px, 6.67cqw) min(10px, 3.33cqw); font-size: min(22px, 7.33cqw); font-weight: 600; color: #1d1d1f; }
.cp-msgs { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: none; padding: min(4px, 1.33cqw) min(12px, 4cqw) min(8px, 2.67cqw); display: flex; flex-direction: column; gap: min(8px, 2.67cqw); scroll-behavior: smooth; }
.cp-msgs p { margin: 0; max-width: 80%; padding: min(8px, 2.67cqw) min(11px, 3.67cqw); border-radius: min(13px, 4.33cqw); font-size: min(11.5px, 3.83cqw); line-height: 1.38; color: #2a2a2a; }
.cp-msgs .me { align-self: flex-end; background: #d8d0e6; border-bottom-right-radius: min(4px, 1.33cqw); }
.cp-msgs .sue { align-self: flex-start; background: #e2e3d4; border-bottom-left-radius: min(4px, 1.33cqw); }
.cp-msgs .photo { padding: min(5px, 1.67cqw); }
.cp-msgs .photo img { width: 100%; display: block; border-radius: min(9px, 3cqw); }
.cp-msgs .photo small { display: block; padding: min(5px, 1.67cqw) min(5px, 1.67cqw) min(2px, .67cqw); font-size: min(10px, 3.33cqw); color: #666; }
.cp-msgs .dots { display: flex; gap: min(4px, 1.33cqw); padding: min(11px, 3.67cqw) min(13px, 4.33cqw); }
.cp-msgs .dots i { width: min(6px, 2cqw); height: min(6px, 2cqw); border-radius: 50%; background: #8a8a80; animation: dot 1s infinite ease-in-out; }
.cp-msgs .dots i:nth-child(2) { animation-delay: .15s; } .cp-msgs .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 60%, 100% { opacity: .35; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }
.cp-input { margin: min(6px, 2cqw) min(12px, 4cqw); padding: min(10px, 3.33cqw) min(14px, 4.67cqw); border-radius: 999px; background: #fff; font-size: min(11.5px, 3.83cqw); color: #999; white-space: nowrap; overflow: hidden; }
.cp-tabs { display: flex; justify-content: space-around; gap: min(4px, 1.33cqw); padding: min(8px, 2.67cqw) min(6px, 2cqw) min(18px, 6cqw); font-size: min(9.5px, 3.17cqw); color: #777; font-style: normal; white-space: nowrap; }
.cp-tabs i { font-style: normal; } .cp-tabs .on { color: #1d1d1f; font-weight: 600; }
/* 1 · the app icon beside Sue */
.set > .app-icon { filter: drop-shadow(0 18px 26px rgba(120, 40, 20, .3)) drop-shadow(0 2px 4px rgba(120, 40, 20, .2)); }

/* ---------- Inter_ ---------- */
.mug-slot { position: absolute; height: min(50vh, 30vw); aspect-ratio: 401 / 436; left: calc(34% - min(50vh, 30vw) * 401 / 436 / 2); top: 18vh; }
.mug-slot img { width: 100%; height: 100%; display: block; filter: drop-shadow(0 26px 30px rgba(30, 25, 50, .25)); animation: mugfloat 7s ease-in-out infinite; }
@keyframes mugfloat { 0%, 100% { translate: 0 0; rotate: 0deg; } 50% { translate: 0 -12px; rotate: -1.2deg; } }
@media (prefers-reduced-motion: reduce) { .mug-slot img { animation: none; } }
/* 2 · the space: prints with a halo in their own neon */
.set > .glow-print { border-radius: 4px; box-shadow: 0 0 46px rgba(var(--glow), .55), 0 16px 34px rgba(10, 5, 25, .35); }
.set > .credit { font-size: 11px; letter-spacing: .06em; color: var(--ink); padding: 5px 10px; border-radius: 999px; background: rgba(255, 255, 255, .72); white-space: nowrap; width: auto; }
/* a Polaroid inside a piece (same paper and hand as js/polaroids.js) */
.set > .pol-snap { box-sizing: border-box; padding: 12px 12px 40px; background: #fbf8f1; border-radius: 2px; box-shadow: 0 10px 24px rgba(20, 15, 5, .26), 0 1px 3px rgba(20, 15, 5, .2); }
.set > .pol-snap img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; background: #d9d3c6; }
.set > .credit.wrap { white-space: normal; max-width: 30%; border-radius: 12px; line-height: 1.35; }
/* 3 · my role: snapshots */
.set > .snap { box-sizing: border-box; border: 7px solid #fbfaf7; border-bottom-width: 22px; border-radius: 2px; box-shadow: 0 14px 30px rgba(20, 15, 5, .3), 0 1px 3px rgba(20, 15, 5, .2); }
/* 4 · the guide map */
.guide-map { aspect-ratio: 2400 / 1855; }
.guide-map > img { width: 100%; height: 100%; display: block; border-radius: 6px; box-shadow: 0 22px 50px rgba(30, 10, 60, .28), 0 2px 6px rgba(30, 10, 60, .16); }
.set > .phone-shot { box-sizing: border-box; border: 7px solid #1d1d1f; border-radius: 30px; box-shadow: 0 24px 50px rgba(20, 15, 5, .32); }

/* ---------- AHHA ---------- */
/* 1 · the bottle (111 × 324, base included) with code-drawn water clipped to its shape */
.bottle-slot { position: absolute; height: min(62vh, 46vw); aspect-ratio: 111 / 324; left: 9%; top: 12vh; transform-origin: 50% 92%; }
.bottle-slot > img { width: 100%; height: 100%; display: block; filter: drop-shadow(0 26px 26px rgba(20, 40, 20, .28)); }
.bottle-slot .water { position: absolute; inset: 0; pointer-events: none; }
/* the mask waits for the piece's preload (.loaded, js/piece.js) so the bottle doesn't download with the room */
.loaded .bottle-slot .water {
  -webkit-mask: url(../assets/ahha/bottle.webp) center / 100% 100% no-repeat; mask: url(../assets/ahha/bottle.webp) center / 100% 100% no-repeat; }
/* the water body: much wider than the bottle so it can tilt freely; its top edge is the surface */
.bottle-slot .level { position: absolute; left: -150%; width: 400%; top: 27%; height: 140%; transform-origin: 50% 0;
  background: linear-gradient(rgba(140, 205, 240, .42), rgba(70, 155, 220, .3) 25%, rgba(40, 125, 200, .34));
  border-top: 2px solid rgba(255, 255, 255, .9);
  box-shadow: 0 -1px 0 rgba(60, 120, 170, .35), inset 0 6px 6px -3px rgba(255, 255, 255, .5); }
.ahha .set > .print { border-width: 6px; }

/* 2 · the sites (prints) and the community (snapshots), swapped halfway through the held card */
.ahha .group { height: 100%; }
.ahha .group > img { position: absolute; left: var(--x); top: var(--y); width: var(--w); rotate: var(--r); }
.ahha .group > .print { box-shadow: 0 10px 28px rgba(20, 15, 5, .28); border: 6px solid #fbfaf7; }
.ahha .group > .snap { box-sizing: border-box; border: 7px solid #fbfaf7; border-bottom-width: 22px; border-radius: 2px; box-shadow: 0 14px 30px rgba(20, 15, 5, .3), 0 1px 3px rgba(20, 15, 5, .2); }

/* 3 · the roll-up banner: the sheet rises out of the base cassette (--up: 0 → 1) */
.rollup { height: 100%; --bw: min(100%, 70vh * 1.2853); }
.rollup-frame { position: absolute; left: 50%; translate: -50% 0; bottom: calc(14% + 22px); width: var(--bw); aspect-ratio: 2400 / 1867; overflow: hidden; }
.rollup .pole { position: absolute; left: 50%; bottom: 0; width: 5px; margin-left: -2.5px; height: 100%; transform-origin: 50% 100%; scale: 1 var(--up, 0); background: linear-gradient(90deg, #9aa0a4, #e3e6e8, #8d9397); border-radius: 3px; }
.banner-sheet { position: absolute; inset: 0; translate: 0 calc((1 - var(--up, 0)) * 100%); box-shadow: 0 18px 40px rgba(10, 30, 20, .25); }
.banner-sheet img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; transition: opacity .6s var(--ease); }
.banner-sheet img.kh, .rollup .scale .kh { opacity: 0; }
.rollup.kh .banner-sheet img.kh, .rollup.kh .scale .kh { opacity: 1; }
.rollup.kh .banner-sheet img.en, .rollup.kh .scale .en { opacity: 0; }
.rollup .top-bar { position: absolute; left: -.6%; right: -.6%; top: 0; height: 10px; z-index: 2; border-radius: 3px; background: linear-gradient(#e6e8ea, #a9aeb2); box-shadow: 0 2px 4px rgba(0, 0, 0, .25); }
.rollup .base { position: absolute; left: 50%; translate: -50% 0; bottom: 14%; width: calc(var(--bw) * 1.04); height: 22px; border-radius: 11px 11px 6px 6px; background: linear-gradient(#f1f2f3, #b8bdc1 70%, #9da3a7); box-shadow: 0 12px 20px rgba(20, 30, 20, .3); }
.rollup .scale { position: absolute; left: 50%; translate: -50% 0; bottom: calc(14% - 34px); width: var(--bw); height: 18px; font-size: 11px; letter-spacing: .1em; color: var(--ink); text-align: center; }
.rollup .scale i { position: absolute; left: 0; right: 0; top: 4px; height: 7px; border: 1px solid rgba(38, 35, 31, .5); border-top: 0; }
.rollup .scale span { position: absolute; left: 50%; top: -3px; translate: -50% 0; padding: 0 8px; background: rgba(247, 244, 238, .92); border-radius: 6px; transition: opacity .6s var(--ease); }
.rollup .lang { position: absolute; right: calc(50% - var(--bw) / 2); bottom: calc(14% - 52px); display: flex; gap: 2px; padding: 4px; border-radius: 999px; pointer-events: auto; }
.rollup .lang button { border: 0; background: transparent; padding: 6px 13px; border-radius: 999px; font: inherit; font-size: 12px; letter-spacing: .06em; color: var(--ink-soft); cursor: pointer; transition: background .3s var(--ease), color .3s var(--ease); }
.rollup .lang button.on { background: var(--ink); color: #fbfaf7; }

/* ---------- Mr. Whiskers' Spiral Emporium ---------- */
/* 1 · the 3D model: framed like the room's bookcase picture (square), so the flying copy lands on it */
.bc-slot { position: absolute; height: min(88vh, 60vw); aspect-ratio: 1; left: calc(22% - min(88vh, 60vw) / 2); top: 0; }
.bc-slot canvas { width: 100%; height: 100%; display: block; filter: drop-shadow(0 24px 22px rgba(60, 40, 10, .22)); }
.bookcase .set > .print { border-width: 6px; }
.bookcase .tag { opacity: 1; }

.bookcase .hold.long { height: 300vh; }
/* 2 · iterations, standing on one baseline */
/* the line drawings sit on a sheet of paper so the room doesn't show through them */
.bookcase .iters, .bookcase .build { height: 94%; top: 3%; background: #fbfaf6; border-radius: 4px; box-shadow: 0 16px 40px rgba(20, 15, 5, .2), 0 1px 3px rgba(20, 15, 5, .12); }
.bookcase .build .beat.explode, .bookcase .build .beat.slide { height: 92%; top: 4%; }
.bookcase .build .base-detail { right: 3%; bottom: 4%; box-shadow: none; background: transparent; }
.iters > img { position: absolute; left: var(--x); width: var(--w); bottom: 12%; clip-path: inset(100% 0 0 0); }

/* 3 · construction: three beats in the same place */
.build .beat { position: absolute; inset: 0; opacity: 0; }
.build .beat.explode, .build .beat.slide { inset: auto; width: auto; height: 96%; top: 2%; left: 50%; translate: -50% 0; }
.build .beat.explode { aspect-ratio: 820 / 1342; }
.build .beat.slide { aspect-ratio: 686 / 1034; }
.build .beat > img:first-child { width: 100%; height: 100%; display: block; }
.build .beat > .part { position: absolute; left: var(--x); top: var(--y); width: var(--w); height: auto; }
.build .beat.cut { display: flex; align-items: center; justify-content: center; }
.build .beat.cut svg { width: 100%; overflow: visible; }
.build .beat.cut .tag { left: 50%; translate: -50% 0; bottom: 14%; }
.cut .sheet-bg { fill: #f8f2dc; stroke: rgba(38, 35, 31, .35); stroke-dasharray: 6 5; }
.cut .disc path, .cut .disc rect { fill: #fbf8ee; stroke: #26231f; stroke-width: 1.6; }
.cut .disc { filter: drop-shadow(0 0 0 rgba(60, 40, 10, 0)); }
.build .base-detail { position: absolute; right: 0; bottom: 6%; width: 15%; padding: 12px; background: rgba(255, 255, 255, .7); border-radius: 10px; box-shadow: 0 10px 24px rgba(20, 15, 5, .14); opacity: 0; }

/* 4 · drafting paper, and a shelf that flips from pine to sisal */
.drafting { aspect-ratio: 1.32; background-color: #f7f6f0; border-radius: 3px;
  background-image: linear-gradient(rgba(70, 120, 170, .12) 1px, transparent 1px), linear-gradient(90deg, rgba(70, 120, 170, .12) 1px, transparent 1px),
    linear-gradient(rgba(70, 120, 170, .06) 1px, transparent 1px), linear-gradient(90deg, rgba(70, 120, 170, .06) 1px, transparent 1px);
  background-size: 60px 60px, 60px 60px, 12px 12px, 12px 12px; box-shadow: 0 14px 36px rgba(20, 15, 5, .2), 0 1px 3px rgba(20, 15, 5, .12); }
.drafting .plan { position: absolute; left: 5%; top: 7%; width: 54%; }
.drafting .elev { position: absolute; right: 6%; top: 5%; height: 90%; }
.flip-wrap { perspective: 900px; }
.flip { position: relative; width: 100%; aspect-ratio: 1; transform-style: preserve-3d; rotate: x 62deg; }
.flip .face { position: absolute; inset: 0; backface-visibility: hidden; border-radius: 50%;
  -webkit-mask: var(--disc) center / 100% 100% no-repeat; mask: var(--disc) center / 100% 100% no-repeat; filter: drop-shadow(0 8px 10px rgba(60, 40, 10, .25)); }
.flip .pine { background: repeating-linear-gradient(97deg, rgba(150, 105, 55, .0) 0 9px, rgba(150, 105, 55, .16) 9px 11px, rgba(150, 105, 55, 0) 11px 23px, rgba(150, 105, 55, .1) 23px 24px), linear-gradient(120deg, #e8d3a6, #d9bb86); }
.flip .sisal { transform: rotateX(180deg); background: repeating-linear-gradient(45deg, rgba(110, 80, 40, .28) 0 2px, transparent 2px 5px), repeating-linear-gradient(-45deg, rgba(110, 80, 40, .22) 0 2px, transparent 2px 5px), linear-gradient(#cdb487, #b99c6c); }
.flip-wrap .tag { left: 50%; translate: -50% 0; bottom: -6%; }

/* 5 · its new home: the photo, and the portfolio page floating smaller beside it. Both are sized to the set
   (a size container) so they stay side by side within it and never reach the card. --h is the photo's height:
   the photo (1000:3200) + gap + page (2:3, at .72 of the photo's height) come to about 0.79 × --h + 6cqw wide. */
.bookcase .set[data-set="4"] { container-type: size; }
.bookcase .new-home, .bookcase .layout-page { --h: min(84cqh, 108cqw); --x0: max(1cqw, (94cqw - var(--h) * .7925) / 2); position: absolute; width: auto; translate: none; }
.bookcase .new-home { height: var(--h); left: var(--x0); top: 2cqh; rotate: -1deg; }
.bookcase .layout-page { height: calc(var(--h) * .72); left: calc(var(--x0) + var(--h) * .3125 + 6cqw); top: calc(2cqh + var(--h) * .16); rotate: var(--r); border-radius: 3px; box-shadow: 0 18px 40px rgba(20, 15, 5, .28), 0 2px 6px rgba(20, 15, 5, .16); }

/* ---------- Learning Ally ---------- */
/* 1 · the headphones, in front of the covers, with thin sound waves pulsing out past each ear cup */
.phones-slot { position: absolute; height: min(40vh, 30vw); aspect-ratio: 453 / 407; left: 50%; translate: -50% 0; bottom: 2vh; }
.phones-slot > img { position: relative; width: 100%; height: 100%; display: block; filter: drop-shadow(0 24px 26px rgba(40, 30, 0, .3)); }
.phones-slot .wave { position: absolute; top: 40%; width: 46%; aspect-ratio: 1; border-radius: 50%; border: 5px solid transparent; filter: drop-shadow(0 0 4px rgba(10, 50, 120, .45)); opacity: 0; pointer-events: none;
  animation: ally-wave 2.4s cubic-bezier(.2, .6, .3, 1) infinite; }
.phones-slot .wave.l { right: 76%; border-left-color: #fff; }
.phones-slot .wave.r { left: 76%; border-right-color: #fff; }
.phones-slot .wave:nth-child(3n+2) { animation-delay: .8s; }
.phones-slot .wave:nth-child(3n) { animation-delay: 1.6s; }
@keyframes ally-wave { 0% { opacity: 0; scale: .6; } 20% { opacity: 1; } 100% { opacity: 0; scale: 1.3; } }
.ally .set > .paper { border-radius: 2px; }
/* 2 · the stat and the quote, lifted off their pages */
.ally .rises { height: 100%; pointer-events: none; }
.ally .rise { position: absolute; left: var(--x); top: var(--y); width: var(--w); background: #fff; border-radius: 10px; box-shadow: 0 22px 50px rgba(10, 30, 80, .26), 0 2px 6px rgba(10, 30, 80, .14); opacity: 0; }
.ally .rise.stat { padding: 1.2% 1.4%; box-sizing: border-box; }
.ally .rise.quote { padding: 2.2% 3%; box-sizing: border-box; } /* even white all round: the image is cropped to the text */
@media (prefers-reduced-motion: reduce) { .phones-slot .wave { animation: none; } .ally .rise { opacity: 1; } }

/* ---------- the tape recorder's song (js/music.js) ---------- */
.music-player { position: fixed; left: -400px; top: 0; width: 200px; height: 200px; opacity: 0; pointer-events: none; }
.now-playing { position: fixed; z-index: 60; display: flex; align-items: center; gap: 9px; padding: 6px 6px 6px 14px; border-radius: 999px; font-size: 12.5px; color: var(--ink);
  white-space: nowrap; opacity: 0; translate: 0 6px; pointer-events: none; transition: opacity .35s var(--ease), translate .35s var(--ease); }
.now-playing { max-width: calc(100vw - 24px); }
.now-playing .what { white-space: normal; line-height: 1.3; min-width: 0; } /* long names ("… (Live at …)") wrap on narrow screens */
.now-playing .note, .now-playing button { flex: none; }
.now-playing.on { opacity: 1; translate: 0 0; pointer-events: auto; }
.now-playing .note { font-size: 14px; animation: np-bob 1.6s ease-in-out infinite; }
@keyframes np-bob { 50% { translate: 0 -2px; } }
.now-playing .stop, .now-playing .pause { width: 28px; height: 28px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .6); display: grid; place-items: center; cursor: pointer; }
.now-playing .pause { margin-right: -5px; } /* the two buttons sit as a pair */
.now-playing .stop svg, .now-playing .pause svg { width: 12px; height: 12px; fill: var(--ink); }
.now-playing .pause .tri, .now-playing.paused .pause .bars { display: none; }
.now-playing.paused .pause .tri { display: inline; }
.now-playing.paused .note { animation-play-state: paused; opacity: .5; }
body.piece-open .now-playing, body.piece-open .stub { visibility: hidden; }

/* ---------- the movie stub (js/tickets.js) ---------- */
.stub { position: fixed; z-index: 60; display: flex; width: 300px; filter: drop-shadow(0 18px 30px rgba(40, 20, 0, .3)) drop-shadow(0 2px 4px rgba(40, 20, 0, .2)); color: #6b1f16; }
.stub-main, .stub-tear { background: #f3e6c8 linear-gradient(180deg, rgba(255, 255, 255, .25), rgba(160, 120, 60, .08)); }
.stub-main { flex: 1; padding: 14px 16px 12px; border-radius: 6px 0 0 6px; border-right: 2px dashed rgba(107, 31, 22, .35); }
.stub-top { display: flex; justify-content: space-between; font-size: 9.5px; letter-spacing: .2em; text-transform: uppercase; padding-bottom: 7px; border-bottom: 1px solid rgba(107, 31, 22, .3); }
.stub-title { margin: 10px 0 2px; font-family: var(--serif, Georgia, serif); font-size: 22px; line-height: 1.1; color: #2a1a12; }
.stub-year { font-size: 13px; letter-spacing: .14em; }
.stub-foot { margin-top: 10px; font-size: 9.5px; letter-spacing: .18em; text-transform: uppercase; opacity: .75; }
.stub-tear { width: 54px; border-radius: 0 6px 6px 0; display: grid; place-items: center;
  -webkit-mask: radial-gradient(circle at 0 8px, transparent 4px, #000 4.5px) 0 -4px / 100% 16px; mask: radial-gradient(circle at 0 8px, transparent 4px, #000 4.5px) 0 -4px / 100% 16px; }
.stub-tear span { rotate: 90deg; font-size: 9.5px; letter-spacing: .2em; text-transform: uppercase; text-align: center; white-space: nowrap; }
.stub-again { position: absolute; left: 50%; top: calc(100% + 10px); translate: -50% 0; border: 0; border-radius: 999px; padding: 6px 14px; font-size: 11px; letter-spacing: .08em; color: var(--ink); cursor: pointer; }

/* ---------- Metropolitan ---------- */
/* 1 · the magazine, closed */
.mag-slot { position: absolute; height: min(76vh, 54vw); aspect-ratio: 1233 / 1490; left: 50%; translate: -50% 0; top: 3vh; rotate: -2deg; }
.mag-slot > img { width: 100%; height: 100%; display: block; border-radius: 2px; box-shadow: 0 26px 50px rgba(10, 10, 10, .34), 0 2px 6px rgba(10, 10, 10, .2); }
/* 2 · the open magazine (js/booklet.js, no nav: scrolling turns the page) */
.metro .mag-open { top: 50%; translate: 0 -50%; }
.metro .mag-book .book-nav { display: none; }
.metro .mag-book .leaf { cursor: default; }
.metro .hold { margin-bottom: 0; } /* the last card holds, so the "return to the room" pill follows right under it */
.metro .credit-line { font-size: 12px; letter-spacing: .04em; color: #7d7568; margin-top: 14px; }

/* ---------- the computer: web work (js/computer.js). One centered scene; positions are set in JS ---------- */
.web .stage { width: 100vw; }
.web .set { inset: 0; }
.web-mon, .web-screen, .web-phone, .web-blurb { position: absolute; }
.web-mon { z-index: 2; pointer-events: none; filter: drop-shadow(0 28px 44px rgba(20, 15, 5, .3)) drop-shadow(0 2px 4px rgba(20, 15, 5, .2)); }
.web-screen { z-index: 1; pointer-events: auto; display: flex; flex-direction: column; overflow: hidden; background: #fff; container-type: inline-size; }
/* browser chrome, in the same colors as the room's little hover browser */
.web-bar { flex: none; position: relative; display: flex; align-items: flex-end; gap: .35cqw; height: max(28px, 3.3cqw); padding: 0 1cqw 0 max(52px, 6cqw); background: #e8e3d8; }
.web-bar::before { content: ""; position: absolute; left: max(12px, 1.4cqw); top: 50%; width: max(9px, .95cqw); height: max(9px, .95cqw); translate: 0 -50%; border-radius: 50%; background: #e0675a; box-shadow: max(13px, 1.45cqw) 0 #e8b83a, max(26px, 2.9cqw) 0 #6cbf6a; }
.web-tab { flex: 0 1 15.5cqw; min-width: 0; height: 80%; display: flex; align-items: center; gap: max(6px, .6cqw); padding: 0 max(9px, 1cqw); border-radius: max(7px, .7cqw) max(7px, .7cqw) 0 0; background: #d9d3c6; color: #5b564c; font-size: max(11px, 1.12cqw); line-height: 1; transition: background .2s var(--ease); }
.web-tab:hover:not([aria-selected="true"]) { background: #e1dbcf; }
.web-tab[aria-selected="true"] { background: #fff; color: #222; }
.web-tab img, .web-tab svg { flex: none; width: max(13px, 1.3cqw); height: max(13px, 1.3cqw); object-fit: contain; }
.web-tab svg, .web-url svg, .web-none svg { fill: none; stroke: currentColor; stroke-width: 1.8; }
.web-tab span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.web-tab:focus-visible { outline: 2px solid #3a6fd8; outline-offset: -2px; }
.web-url { flex: none; display: flex; align-items: center; height: max(26px, 2.9cqw); padding: 0 max(10px, 1.1cqw); border-bottom: 1px solid #e2ddd2; }
.web-url .pill { flex: 1; display: flex; align-items: center; gap: max(6px, .6cqw); height: 74%; padding: 0 max(10px, 1cqw); border-radius: 999px; background: #f1eee8; color: #6f695e; font-size: max(10.5px, 1.05cqw); }
.web-url svg { width: max(11px, 1.05cqw); height: max(11px, 1.05cqw); flex: none; }
.web-view { position: relative; flex: 1; min-height: 0; overflow: hidden; background: #fff; }
.web-pane { position: absolute; inset: 0; visibility: hidden; opacity: 0; transition: opacity .3s var(--ease), visibility 0s linear .3s; }
.web-pane.on { visibility: inherit; opacity: 1; transition: opacity .3s var(--ease); }
.web-pane .ph { position: absolute; left: 0; top: 0; width: 100%; }
.web-pane iframe { position: absolute; left: 0; top: 0; border: 0; transform-origin: 0 0; background: #fff; opacity: 0; transition: opacity .45s var(--ease); }
.web-pane.ready iframe { opacity: 1; }
.web-pane.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
/* the stills say so, at the end of the address bar */
.web-url .still-tag { display: none; margin-left: auto; padding: max(2px, .25cqw) max(8px, .8cqw); border-radius: 999px; background: #e2dccf; color: #5b564c; font-style: normal; font-size: max(9.5px, .95cqw); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.web-screen.still .still-tag { display: inline-block; }
.web-none { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: #faf8f4; color: #7d7568; text-align: center; }
.web-none svg { width: 34px; height: 34px; opacity: .55; }
.web-none b { font-family: "Amalfi", serif; font-weight: 400; font-size: 34px; color: var(--ink); }
.web-none a { font-size: 14px; color: var(--ink); text-decoration: none; padding: 9px 16px; border-radius: 999px; background: #ece7dd; }
.web-none a:hover { background: #e2dcd0; }
/* the phone beside it, built in code */
.web-phone { z-index: 3; pointer-events: auto; border-radius: 15% / 7%; background: #1d1d1f; box-shadow: 0 30px 56px rgba(20, 15, 5, .34), 0 2px 5px rgba(20, 15, 5, .2), inset 0 0 0 1.5px #3c3c3f; }
.web-phone .web-view { height: 100%; border-radius: 11.5% / 5.4%; }
/* the blurb: just the basics, then out to the live site */
.web-blurb { z-index: 3; pointer-events: auto; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; align-content: center; gap: 26px; padding: 16px 18px 16px 26px; border-radius: 20px; background: rgba(255, 255, 255, .62); }
.wb-name h2 { margin: 0; font-family: "Amalfi", serif; font-weight: 400; font-size: 32px; line-height: 1; color: var(--ink); white-space: nowrap; }
.wb-name span { display: block; margin-top: 7px; font-size: 12px; letter-spacing: .03em; color: #7d7568; }
.web-blurb .specs { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) max-content minmax(0, 1.7fr); gap: 0 24px; border-top: 0; }
.web-blurb .specs > div { padding: 0; border-bottom: 0; }
.web-blurb .specs dd { font-size: 13px; text-wrap: pretty; }
.wb-links { display: flex; flex-direction: column; gap: 8px; }
.wb-link { display: inline-flex; justify-content: center; gap: 8px; align-items: center; padding: 10px 16px; border-radius: 999px; background: var(--ink); color: #fbfaf7; font-size: 13px; letter-spacing: .02em; text-decoration: none; white-space: nowrap; transition: background .3s var(--ease); }
.wb-link:hover { background: #4a453e; }
.wb-text { align-self: center; font-size: 12px; letter-spacing: .02em; color: var(--ink-soft); line-height: 1; padding: 2px 0; border-bottom: 1px solid rgba(38, 35, 31, .25); transition: color .2s var(--ease), border-color .2s var(--ease); }
.wb-text:hover { color: var(--ink); border-color: var(--ink); }
.wb-more { display: none; }
/* a narrower blurb (smaller windows): the name and links on top, the four details in one row beneath */
.web-blurb.compact { grid-template-columns: minmax(0, 1fr) auto; gap: 12px 18px; padding: 14px 16px 16px 22px; }
.web-blurb.compact .wb-name h2 { font-size: 26px; }
.web-blurb.compact .specs { grid-column: 1 / -1; grid-row: 2; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) max-content minmax(0, 1.7fr); gap: 0 16px; padding-top: 10px; border-top: 1px solid rgba(38, 35, 31, .14); }
.web-blurb.compact .specs dd { font-size: 12px; }
.web-blurb.compact .wb-links { flex-direction: row-reverse; align-items: center; gap: 14px; }
.web-blurb.compact .wb-link { padding: 9px 14px; font-size: 12.5px; }
.flyer.fit-top { object-fit: cover; object-position: top; background: #fff; }
/* narrow windows: the screen fills the view (the sites show their phone layouts); the blurb sits along the bottom */
.web.narrow .web-mon, .web.narrow .web-phone { display: none; }
.web.narrow .web-pane.desk-only { background: #f3f0ea; } /* no phone still yet: the whole desktop still, fitted to the width */
.web.narrow .web-pane.desk-only img { object-fit: contain; object-position: center; box-shadow: none; }
.web.narrow .web-bar { height: 46px; padding: 0 64px 0 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; gap: 4px; }
.web.narrow .web-bar::-webkit-scrollbar { display: none; }
.web.narrow .web-bar::before { display: none; }
.web.narrow .web-tab { flex: none; width: 44vw; height: 36px; font-size: 13px; scroll-snap-align: start; }
.web.narrow .web-url { height: 38px; }
.web.narrow .web-url .pill { font-size: 13px; }
.web.narrow .web-blurb { grid-template-columns: minmax(0, 1fr) auto; gap: 10px 14px; padding: 12px 14px 14px 18px; border-radius: 18px 18px 0 0; }
.web.narrow .wb-name h2 { font-size: 24px; }
.web.narrow .web-blurb .specs { display: none; grid-column: 1 / -1; grid-row: 2; grid-template-columns: 1fr 1fr; gap: 8px 16px; }
.web.narrow .web-blurb.open .specs { display: grid; }
.web.narrow .wb-links { flex-direction: row; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.web.narrow .wb-link { padding: 9px 13px; font-size: 12.5px; }
.web.narrow .wb-text { display: none; }
.web.narrow .web-blurb.open .wb-text { display: inline-block; }
.web.narrow .wb-links { align-items: center; }
.web.narrow .web-blurb.open .wb-links { grid-column: 1 / -1; grid-row: 3; justify-content: flex-start; }
.web.narrow .wb-more { display: inline-block; padding: 9px 12px; border-radius: 999px; font-size: 12.5px; background: rgba(38, 35, 31, .08); }
.web.narrow .piece-close { top: 5px; right: 6px; }
@media (prefers-reduced-motion: reduce) { .web-pane, .web-pane.on, .web-pane iframe { transition: none; } }

/* ---------- the globe piece (js/globepiece.js) ---------- */
.globe-piece { --gh: min(74vh, 70vw); }
.globe-stage { position: absolute; inset: 0; }
.globe-big { position: absolute; left: 50%; top: 6vh; height: var(--gh); aspect-ratio: 603 / 860; translate: -50% 0; transition: opacity .6s var(--ease), translate .7s var(--ease); }
.globe-eng { display: block; width: 100%; height: 100%; filter: drop-shadow(0 26px 34px rgba(30, 40, 20, .3)); }
.globe-gl, .globe-pins { position: absolute; border-radius: 50%; }
.globe-pins { pointer-events: none; }
.pin { position: absolute; left: 0; top: 0; width: 24px; height: 24px; margin: -12px 0 0 -12px; pointer-events: auto; }
.pin i { position: absolute; inset: 7.5px; border-radius: 50%; background: #c8452f; box-shadow: 0 0 0 2px #fffaf0, 0 1px 4px rgba(20, 15, 5, .45); transition: scale .35s var(--ease), background .35s var(--ease); }
.pin:hover i, .pin:focus-visible i { scale: 1.35; }
.pin.on i { scale: 1.6; background: #a82f1d; }
.pin.on::before { content: ""; position: absolute; inset: 3px; border-radius: 50%; border: 1.5px solid #a82f1d; opacity: .5; }
.pin.now i { background: #2b6fd6; }
.pin.now::after { content: ""; position: absolute; inset: 7.5px; border-radius: 50%; background: #2b6fd6; animation: now-pulse 2.2s ease-out infinite; }
@keyframes now-pulse { from { opacity: .55; scale: 1; } to { opacity: 0; scale: 3.4; } }
.pin-tip { position: absolute; left: 0; top: 0; width: 230px; padding: 11px 14px 12px; border-radius: 14px; transform: translate(-50%, calc(-100% - 18px)); opacity: 0; transition: opacity .3s var(--ease); pointer-events: none; font-size: 12.5px; line-height: 1.4; color: #2e2a25; z-index: 10; } /* above the pins, which share the room's .pin z-index: 5 */
.pin-tip.on { opacity: 1; }
.pin-tip b { display: block; font-family: "Amalfi", serif; font-weight: 400; font-size: 18px; line-height: 1.05; color: var(--ink); margin-bottom: 4px; }
.trip { position: absolute; left: 50%; top: 4vh; height: min(82vh, 100vw); aspect-ratio: 9 / 16; translate: -50% 0; opacity: 0; visibility: hidden; transition: opacity .6s var(--ease), visibility 0s .6s; pointer-events: auto; }
.trip video { display: block; width: 100%; height: 100%; border-radius: 16px; background: #1a1a18; box-shadow: 0 24px 60px rgba(20, 15, 5, .32), 0 2px 8px rgba(20, 15, 5, .18); cursor: pointer; }
.trip-back { position: absolute; left: 50%; top: calc(100% + 12px); translate: -50% 0; height: 36px; padding: 0 16px; border-radius: 999px; font-size: 12.5px; color: var(--ink); white-space: nowrap; }
.globe-stage.watching .globe-big { opacity: 0; translate: -95% 0; pointer-events: none; }
.globe-stage.watching .trip { opacity: 1; visibility: visible; transition: opacity .6s var(--ease) .15s, visibility 0s; }
.card .role { font-size: 13px; line-height: 1.45; letter-spacing: .01em; color: #7d7568; margin: -6px 0 16px; }
.card button.next-link { cursor: pointer; }
/* globe cards: quiet outline links to the hosts (the ink pill stays for the one main action) */
.card .visits { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.card .next-link + .visits { margin-top: 12px; }
.card .visits a { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 999px; border: 1px solid rgba(38, 35, 31, .2); color: var(--ink); font-size: 12.5px; letter-spacing: .01em; text-decoration: none; transition: background .3s var(--ease), border-color .3s var(--ease); }
.card .visits a:hover { background: rgba(255, 255, 255, .7); border-color: rgba(38, 35, 31, .38); }
.card .visits a span { font-size: 11px; opacity: .65; }
.globe-piece .credit-line { font-size: 11px; letter-spacing: .02em; color: #8a8276; margin: 14px 0 0; }
.globe-piece .credit-line a { color: inherit; text-decoration: underline; text-decoration-color: rgba(138, 130, 118, .4); text-underline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .pin.now::after { animation: none; } .globe-big, .trip { transition: none; } }

/* globe piece: each stop's pile of photos and its object (js/globe-photos.js). On a stop the globe slides left. */
.globe-big { transition: opacity .6s var(--ease), translate .9s var(--ease), scale .9s var(--ease); }
.globe-stage.at-stop .globe-big { translate: calc(-50% - 15vw) 0; scale: .88; transform-origin: 50% 40%; }
.stop-layer { position: absolute; inset: 0; pointer-events: none; transition: opacity .5s var(--ease); }
.globe-stage.watching .stop-layer { opacity: 0; }
.keep { position: absolute; margin: 0; translate: -50% -50%; visibility: hidden; will-change: transform; pointer-events: auto; transition: scale .35s var(--ease), box-shadow .35s var(--ease); user-select: none; }
.keep img, .keep video { display: block; width: 100%; }
.k-p, .k-v { background: #fbfaf6; padding: calc(var(--w) * .055) calc(var(--w) * .055) calc(var(--w) * .2); box-shadow: 0 12px 30px rgba(30, 22, 8, .24), 0 2px 5px rgba(30, 22, 8, .16); }
.k-p img, .k-v img, .k-v video { aspect-ratio: 1 / 1.04; object-fit: cover; }
.k-w, .k-pc { background: #fbfaf6; padding: calc(var(--w) * .035); box-shadow: 0 12px 30px rgba(30, 22, 8, .24), 0 2px 5px rgba(30, 22, 8, .16); }
.keep:not(.k-o):hover { scale: 1.07; box-shadow: 0 22px 46px rgba(30, 22, 8, .3), 0 3px 8px rgba(30, 22, 8, .16); }
.k-pc .postmark { position: absolute; right: 5%; bottom: 4%; width: 46%; color: rgba(40, 52, 90, .62); font-family: "Instrument Sans", sans-serif; mix-blend-mode: multiply; rotate: -8deg; pointer-events: none; }
.k-pc .postmark text { fill: currentColor; }
.k-o { z-index: 1000; pointer-events: none; }
.k-o img { height: 100%; object-fit: contain; filter: drop-shadow(0 18px 22px rgba(30, 22, 8, .28)); }
@media (prefers-reduced-motion: reduce) { .globe-big, .keep { transition: none; } }
/* while a piece is open, the room's own UI steps back */
#wordmark, .corner { transition: opacity .5s var(--ease); }
body.piece-open #wordmark, body.piece-open .corner { opacity: 0; pointer-events: none; }

/* the flying lamp (lives above everything while it travels) */
.flyer { position: fixed; z-index: 35; pointer-events: none; display: block; }

@media (prefers-reduced-motion: reduce) {
  .card, .label, .blurb, .glow, #screen .browser { transition: none; }
}

/* ---------- the intro (js/intro.js) ---------- */
/* #intro is an empty scroller over everything: its scroll drives the beats. #introCam is the "camera" layer:
   the paper (the monitor's screen) and the large monitor, moved with the same transform as the room. */
#intro { position: fixed; inset: 0; z-index: 32; overflow-x: hidden; overflow-y: auto; scrollbar-width: none; overscroll-behavior: none; outline: none; }
#intro::-webkit-scrollbar { display: none; }
#intro.locked { overflow-y: hidden; }
#intro.boot { background: #fbf9f4; } /* paper, for the moment before the title's font is measured */
#intro .i-spacer { height: 550vh; }
#introCam { position: fixed; left: 0; top: 0; width: 0; height: 0; z-index: 30; transform-origin: 0 0; pointer-events: none; }
#introCam .i-paper { position: absolute; overflow: hidden; background: #fbf9f4; }
#introCam .i-sheet { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
#introCam .i-sheet::before { content: ""; position: absolute; inset: 0; background: url(../assets/intro/paper-3.png); opacity: var(--grain, .55); }
#introCam .i-sheet.grain-1::before { background-image: url(../assets/intro/paper-1.png); opacity: var(--grain, 1); }
#introCam .i-content { position: absolute; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
#introCam .i-title { margin: 0; font: 400 var(--fs, 120px)/1 "Amalfi", serif; color: var(--ink); letter-spacing: .005em; white-space: nowrap; }
#introCam .i-lines { position: absolute; left: 50%; width: min(31em, 86%); translate: -50% 0; font-family: "Instrument Sans", var(--sans); font-size: clamp(13px, .9vw + 5px, 17px); line-height: 1.55; color: var(--ink-soft); }
#introCam .i-lines p { margin: 0 0 .25em; text-wrap: balance; }
#introCam .i-lines .i-invite { margin-top: 1.1em; color: var(--ink); }
/* the wildflower sprigs that write the lines in (js/intro.js moves them and reveals the letters behind them) */
#introCam .i-lines .i-ch { opacity: 0; }
#introCam .i-sprig { position: absolute; display: block; opacity: 0; pointer-events: none; transform-origin: 50% 100%; }
#introCam .i-cue { position: absolute; left: 50%; bottom: 30px; translate: -50% 0; display: flex; flex-direction: column; align-items: center; gap: 10px; font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--ink-soft); opacity: 0; }
#introCam .i-cue-line { width: 1px; height: 34px; background: linear-gradient(var(--ink-soft), transparent); transform-origin: top; animation: i-cue 2.4s var(--ease) infinite; }
@keyframes i-cue { 0% { scale: 1 0; } 50% { scale: 1 1; transform-origin: top; } 51% { transform-origin: bottom; } 100% { scale: 1 0; transform-origin: bottom; } }
#introCam .i-sleep { position: absolute; inset: 0; opacity: 0; background: linear-gradient(115deg, rgba(255,255,255,0) 38%, rgba(255,255,255,.07) 46%, rgba(255,255,255,0) 58%), radial-gradient(130% 110% at 30% 20%, #3a3d42 0%, #232528 55%, #18191b 100%); }
#introCam .i-mon { position: absolute; display: block; }
/* the glass over the screen: a faint sky reflection in two soft bands (slid across by js/intro.js), and a cool rim at the edges */
#introCam .i-glass { position: absolute; inset: 0; opacity: 0; pointer-events: none;
  background:
    linear-gradient(112deg, rgba(150, 178, 235, 0) 18%, rgba(150, 178, 235, .17) 30%, rgba(170, 195, 240, .07) 38%, rgba(150, 178, 235, 0) 45%, rgba(150, 178, 235, 0) 53%, rgba(150, 178, 235, .11) 58%, rgba(150, 178, 235, 0) 66%),
    radial-gradient(120% 120% at 50% 50%, rgba(40, 55, 90, 0) 62%, rgba(40, 55, 90, .10) 100%);
  background-size: 260% 100%, 100% 100%; background-repeat: no-repeat;
  box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .55); }
#introFly { position: fixed; left: 0; top: 0; z-index: 31; pointer-events: none; transform-origin: 50% 50%; opacity: 0; }
#introHint { position: fixed; left: 50%; bottom: 34px; z-index: 21; translate: -50% 0; padding: 11px 20px; border-radius: 999px; font-size: 13px; color: var(--ink); white-space: nowrap; opacity: 0; visibility: hidden; pointer-events: none; }
/* while the intro is on, the room waits: its UI is hidden and nothing in it can be reached */
body.intro #wordmark, body.intro .corner { opacity: 0; pointer-events: none; }
body.intro-done #intro, body.intro-done #introCam, body.intro-done #introFly { visibility: hidden; pointer-events: none; }
.no-intro #intro, .no-intro #introCam, .no-intro #introFly { display: none; }
@media (prefers-reduced-motion: reduce) { #introCam .i-cue-line { animation: none; } }

/* ---------- the Polaroids (js/polaroids.js): field notes tossed across the view ---------- */
.pol-piece { position: fixed; inset: 0; z-index: 30; visibility: hidden; overflow: hidden; --pw: 200px; }
.pol-piece .veil { position: absolute; inset: 0; background: rgba(36, 32, 28, .34); -webkit-backdrop-filter: blur(7px) saturate(.9); backdrop-filter: blur(7px) saturate(.9); opacity: 0; }
.pol-table { position: absolute; inset: 0; }
.pol { position: absolute; left: 0; top: 0; width: var(--pw); height: calc(var(--pw) * 1.2); box-sizing: border-box; padding: calc(var(--pw) * .06) calc(var(--pw) * .06) 0; background: #fbf8f1; border-radius: 2px;
  box-shadow: 0 6px 16px rgba(20, 15, 5, .28), 0 1px 3px rgba(20, 15, 5, .22); cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; will-change: transform; transition: box-shadow .25s var(--ease); outline: none; }
.pol img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; background: #d9d3c6; pointer-events: none; }
.pol .cap { display: flex; align-items: center; justify-content: center; height: calc(var(--pw) * .26); padding: 0 6%; text-align: center; font-family: "Ink Free", "Segoe Print", "Bradley Hand", "Comic Sans MS", cursive; font-size: calc(var(--pw) * .068); line-height: 1.12; color: #3a342c; }
.pol:hover { box-shadow: 0 10px 24px rgba(20, 15, 5, .32), 0 2px 4px rgba(20, 15, 5, .22); }
.pol.held { cursor: grabbing; box-shadow: 0 26px 48px rgba(20, 15, 5, .38), 0 4px 10px rgba(20, 15, 5, .25); }
.pol.up { cursor: zoom-out; box-shadow: 0 40px 90px rgba(10, 8, 4, .45), 0 6px 16px rgba(10, 8, 4, .3); }
.pol:focus-visible { box-shadow: 0 0 0 3px #fffaf0, 0 0 0 5px #2b2a28, 0 10px 24px rgba(20, 15, 5, .32); }
.pol-piece.has-up .pol:not(.up) { filter: brightness(.7); transition: filter .4s var(--ease), box-shadow .25s var(--ease); }
.pol-piece .pol { transition: filter .4s var(--ease), box-shadow .25s var(--ease); }
.pol-gather { position: absolute; left: 50%; bottom: 26px; translate: -50% 0; z-index: 20000; padding: 11px 22px; border-radius: 999px; font: 500 12px var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--ink); cursor: pointer; opacity: 0; }
.pol-gather:hover { background: rgba(255, 255, 255, .72); }
.pol-piece .piece-close { z-index: 20000; }

/* ---------- the mailbox (js/mailbox.js): write me a postcard ---------- */
#mailbox.sent .flag-arm { transform: rotate(-90deg); }
.mail-piece { position: fixed; inset: 0; z-index: 30; visibility: hidden; overflow: hidden; --tw: "Courier New", Courier, "Nimbus Mono PS", monospace; --red: #c2412f; --ink-tw: #27221c; }
.mail-piece .veil { position: absolute; inset: 0; background: rgba(36, 32, 28, .38); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); opacity: 0; }
.mail-stage { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 20px; pointer-events: none; }
.mail-stage > * { pointer-events: auto; }

.postcard { --cw: min(860px, 92vw, 66vh * 1.5); position: relative; width: var(--cw); aspect-ratio: 3 / 2; box-sizing: border-box; padding: calc(var(--cw) * .045) calc(var(--cw) * .05);
  display: grid; grid-template-columns: 1fr 1px .82fr; grid-template-rows: auto 1fr; column-gap: calc(var(--cw) * .04);
  background: #f3e8cf center / cover; border-radius: 3px; color: var(--ink-tw); box-shadow: 0 30px 70px rgba(10, 8, 4, .42), 0 4px 12px rgba(10, 8, 4, .25); }
.mail-piece.loaded .postcard { background-image: linear-gradient(rgba(255, 250, 236, .3), rgba(255, 250, 236, .3)), url(../assets/mail/paper.webp); }
.pc-head { grid-column: 1 / -1; text-align: center; padding-bottom: calc(var(--cw) * .022); margin-bottom: calc(var(--cw) * .03); border-bottom: 3px double rgba(194, 65, 47, .7); }
.pc-head span { font: 600 calc(var(--cw) * .036) var(--sans); letter-spacing: .42em; margin-right: -.42em; text-transform: uppercase; color: var(--red); opacity: .9; mix-blend-mode: multiply; }
.pc-label { display: block; font: 600 10px var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--red); opacity: .85; margin-bottom: 4px; }
.pc-left { display: flex; flex-direction: column; min-height: 0; }
.pc-rule { background: rgba(194, 65, 47, .45); }
.pc-right { display: flex; flex-direction: column; min-height: 0; }
.pc-stampbox { position: relative; align-self: flex-end; width: 26%; aspect-ratio: .84; border: 1.5px dashed rgba(39, 34, 28, .35); display: flex; align-items: center; justify-content: center; text-align: center; margin-bottom: auto; }
.pc-stampbox span { font: 600 8.5px/1.5 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: rgba(39, 34, 28, .45); }
.pc-stampbox.stamped { border-color: transparent; }
.pc-stampbox.stamped span { visibility: hidden; }
.pc-stamp { position: absolute; inset: 4%; width: 92%; height: 92%; object-fit: contain; filter: drop-shadow(0 1px 1.5px rgba(30, 20, 10, .35)); }
.pc-to { margin: 12px 0 10px; }
.pc-to b { display: block; font: 400 24px/30px "Amalfi", serif; letter-spacing: -.005em; border-bottom: 1px solid rgba(39, 34, 28, .3); color: var(--ink-tw); opacity: .9; }
.pc-line { display: block; margin-top: 10px; cursor: text; }

/* typewriter ink: the real field is see-through, its letters struck onto .tw-ink beneath, each a little uneven */
.tw { position: relative; display: block; overflow: hidden; border-bottom: 1px solid rgba(39, 34, 28, .3); }
.tw textarea, .tw input { position: relative; z-index: 1; display: block; width: 100%; box-sizing: border-box; margin: 0; padding: 0; border: 0; outline: 0; background: transparent; resize: none;
  font: 400 15px/26px var(--tw); letter-spacing: .02em; color: transparent; -webkit-text-fill-color: transparent; caret-color: var(--ink-tw); }
.tw-ink { position: absolute; left: 0; top: 0; right: 0; pointer-events: none; font: 400 15px/26px var(--tw); letter-spacing: .02em; color: var(--ink-tw); white-space: pre; text-shadow: 0 0 .5px rgba(39, 34, 28, .55); }
.tw-ink span { position: relative; top: var(--y); opacity: var(--o); }
.tw-ink span.strike { animation: strike .16s ease-out; }
@keyframes strike { from { opacity: 1; color: #000; text-shadow: 0 0 1.5px #000; } }
.tw-area { flex: 1; min-height: 0; border-bottom: 0; background: repeating-linear-gradient(transparent 0 25px, rgba(39, 34, 28, .16) 25px 26px); }
.tw-area textarea { height: 100%; overflow-y: auto; scrollbar-width: none; overflow-wrap: anywhere; }
.tw-area textarea::-webkit-scrollbar { display: none; }
.tw-area .tw-ink { white-space: pre-wrap; overflow-wrap: anywhere; }
.tw input::selection, .tw textarea::selection { background: rgba(194, 65, 47, .2); }
.tw:focus-within { border-bottom-color: rgba(39, 34, 28, .6); }
.tw input::placeholder { font: 400 13px var(--sans); letter-spacing: .01em; color: rgba(39, 34, 28, .38); -webkit-text-fill-color: rgba(39, 34, 28, .38); }
.pc-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.mail-bar { display: flex; align-items: center; gap: 26px; }
.mail-stamps { display: flex; gap: 14px; align-items: flex-end; }
.mail-stamps button { width: 58px; padding: 0; border: 0; background: none; cursor: pointer; transition: transform .25s var(--ease), opacity .25s var(--ease); }
.mail-stamps button img { display: block; width: 100%; filter: drop-shadow(0 4px 8px rgba(10, 8, 4, .35)); }
.mail-stamps button:nth-child(3) { width: 66px; }
.mail-stamps button:hover, .mail-stamps button:focus-visible { transform: translateY(-4px) rotate(-3deg); outline: none; }
.mail-stamps button:focus-visible img { filter: drop-shadow(0 0 0 #fffaf0) drop-shadow(0 0 3px #fffaf0); }
.mail-stamps button[aria-checked="true"] { opacity: .35; transform: none; }
/* the send button: an airmail label (red and blue stripes round a paper tag), a little crooked; it straightens up on hover */
.mail-send { --air-red: #c2412f; --air-blue: #2f4f8f; position: relative; padding: 6px; border: 0; border-radius: 3px; cursor: pointer; rotate: -2.5deg;
  background: repeating-linear-gradient(-45deg, var(--air-red) 0 12px, #fbf6ea 12px 18px, var(--air-blue) 18px 30px, #fbf6ea 30px 36px);
  box-shadow: 0 10px 24px rgba(10, 8, 4, .32), 0 2px 4px rgba(10, 8, 4, .2); transition: rotate .35s var(--ease), translate .35s var(--ease), box-shadow .35s var(--ease); }
.mail-send .ms-label { display: block; padding: 7px 18px 9px; background: #fbf6ea center / cover; color: var(--ink); font: 400 24px/1 "Amalfi", serif; white-space: nowrap; }
.mail-piece.loaded .mail-send .ms-label { background-image: url(../assets/mail/paper.webp); }
.mail-send small { display: block; margin-bottom: 5px; font: 600 8.5px var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--air-blue); }
.mail-send:hover, .mail-send:focus-visible { rotate: 0deg; translate: 0 -3px; box-shadow: 0 16px 32px rgba(10, 8, 4, .36), 0 3px 6px rgba(10, 8, 4, .2); outline: none; }
.mail-send:hover .ms-label, .mail-send:focus-visible .ms-label { animation: tag-wiggle .5s var(--ease); }
.mail-send:focus-visible { box-shadow: 0 0 0 3px #fbf6ea, 0 16px 32px rgba(10, 8, 4, .36); }
.mail-send:active { translate: 0 0; scale: .96; }
@keyframes tag-wiggle { 30% { rotate: 1.5deg; } 65% { rotate: -1deg; } }
@media (prefers-reduced-motion: reduce) { .mail-send:hover .ms-label { animation: none; } }.mail-note { margin: 0; min-height: 1.2em; font: 400 14px var(--tw); color: #fffaf0; text-align: center; opacity: 0; }
.mail-note.bad { color: #ffe1d6; }
.mail-alt { margin: -6px 0 0; font-size: 12px; color: rgba(255, 250, 240, .78); }
.mail-alt a { color: inherit; text-underline-offset: 3px; }
.mail-alt a:hover { color: #fff; }
.mail-piece .piece-close { z-index: 5; }

/* the envelope: under (back + flap) sits behind the card, over (pocket + seal) in front of it */
.envelope { position: absolute; inset: 0; margin: auto; width: min(520px, 74vw); height: calc(min(520px, 74vw) / 1.6); visibility: hidden; pointer-events: none; }
.envelope.under { z-index: 1; perspective: 1100px; }
.envelope.over { z-index: 3; }
.env-back, .env-front, .env-flap { position: absolute; background: #e9dbbb center / cover; }
.mail-piece.loaded .env-back, .mail-piece.loaded .env-front, .mail-piece.loaded .env-flap { background-image: url(../assets/mail/paper.webp); }
.env-back { inset: 0; border-radius: 3px; box-shadow: 0 26px 60px rgba(10, 8, 4, .4), 0 3px 10px rgba(10, 8, 4, .25); filter: brightness(.86); }
.env-front { inset: 0; border-radius: 3px; clip-path: polygon(0 0, 50% 52%, 100% 0, 100% 100%, 0 100%); box-shadow: inset 0 -30px 50px rgba(120, 90, 50, .12); }
.env-front::before { content: ""; position: absolute; inset: 0; background: linear-gradient(to top right, transparent calc(50% - 1px), rgba(90, 70, 40, .22) 50%, transparent calc(50% + 1px)) left / 50% 100% no-repeat, linear-gradient(to top left, transparent calc(50% - 1px), rgba(90, 70, 40, .22) 50%, transparent calc(50% + 1px)) right / 50% 100% no-repeat; }
.env-flap { left: 0; top: 0; width: 100%; height: 52%; transform-origin: 50% 0; clip-path: polygon(0 0, 100% 0, 50% 100%); filter: brightness(.95) drop-shadow(0 2px 2px rgba(0, 0, 0, .2)); }
.env-seal { position: absolute; left: 50%; top: 50%; width: 15%; translate: -50% -50%; filter: drop-shadow(0 2px 3px rgba(40, 10, 5, .45)); }

.mail-sent { position: fixed; z-index: 25; margin: 0; translate: -50% -100%; padding: 7px 12px; border-radius: 8px; background: rgba(255, 250, 240, .9); box-shadow: 0 6px 18px rgba(30, 30, 60, .18); font: 400 13px "Courier New", Courier, monospace; color: #27221c; white-space: nowrap; pointer-events: none; opacity: 0; visibility: hidden; }

@media (max-width: 700px) and (orientation: portrait) {
  .postcard { --cw: 92vw; aspect-ratio: auto; height: min(68vh, 560px); grid-template-columns: 1fr; grid-template-rows: auto 1fr auto; padding: 18px 18px 16px; }
  .pc-rule { display: none; }
  .pc-head span { font-size: 15px; }
  .pc-right { margin-top: 10px; }
  .pc-stampbox { position: absolute; right: 16px; top: 54px; width: 54px; }
  .tw-area textarea, .tw-area .tw-ink { padding-right: 62px; } /* the message wraps clear of the stamp box */
  .pc-to b { font-size: 20px; }
  .mail-bar { gap: 10px; width: 92vw; justify-content: space-between; box-sizing: border-box; padding: 0 4px; }
  .mail-stamps { gap: 6px; }
  .mail-stamps button { width: 40px; } .mail-stamps button:nth-child(3) { width: 46px; }
  .mail-send { zoom: .86; }
}
/* ---------- phones (js/room.js "phone"): the room swipes between three stops ---------- */
body.phone #viewport { touch-action: pan-y; }
/* the index butterfly perches just above the lamp, inside the desk stop (its own spot fell between the board and desk stops) */
body.phone #bfly1 { left: 700px !important; top: 402px !important; }
#roomDots { display: none; }
body.phone #roomDots { position: fixed; left: 50%; bottom: 18px; translate: -50% 0; z-index: 20; display: flex; gap: 4px; padding: 6px 8px; border-radius: 999px; background: rgba(255, 255, 255, .45); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); transition: opacity .5s var(--ease); }
#roomDots button { width: 22px; height: 22px; padding: 0; border: 0; background: none; cursor: pointer; display: grid; place-items: center; }
#roomDots button::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: rgba(38, 35, 31, .35); transition: background .3s var(--ease), width .3s var(--ease); }
#roomDots button[aria-current="true"]::before { width: 18px; border-radius: 4px; background: var(--ink); }
body.intro #roomDots, body.piece-open #roomDots, body.index-open #roomDots { opacity: 0; pointer-events: none; }
/* cards slide up from the bottom, above the dots */
body.phone .label, body.phone .blurb { left: 50% !important; top: auto !important; bottom: 66px; translate: -50% 0; transform: translateY(18px); max-width: calc(100vw - 28px); box-sizing: border-box; }
body.phone .label.on, body.phone .blurb.on { transform: none; }
body.phone .label { width: max-content; white-space: normal; text-align: center; }
body.phone .label .type { display: block; margin: 2px 0 0; }
body.phone .blurb { width: calc(100vw - 28px); }
.label .tap { display: none; }
body.phone .label .tap { display: block; margin-top: 2px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }
body.phone, body.phone #frame, body.sky-strip, body.sky-strip #frame { background: #8a73f8; } /* the sky's top colour, for the strip above the room */

/* ---------- phones: every scrolling piece (js/piece.js) stacks; its objects in the top half, the write-up scrolling up from below ---------- */
body.phone .stage { width: 100vw; height: 50vh; }
/* the top 52px stay clear for the close button; --sh is the height left for a set's objects */
body.phone { --sh: calc(49vh - 52px); }
body.phone .set { inset: 52px 4vw 1vh; }
body.phone .metro .mag-open { left: 50%; right: auto; width: min(104%, calc(var(--sh) * 2 * .7035 * .92)); translate: -50% -50%; } /* the open spread fits the stage's height too, clear of the close button on wide upright screens */
body.phone .article { margin: 0 auto; width: calc(100vw - 24px); padding-top: 54vh; }
body.phone .card { padding: 22px 22px 24px; margin-bottom: 58vh; border-radius: 18px; background: rgba(255, 255, 255, .8); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
body.phone .card:not(.active) { opacity: .2; } /* the card before has scrolled up over the objects: let it fade back */
body.phone .card h1 { font-size: 34px; }
body.phone .card h2 { font-size: 28px; }
body.phone .piece-close { top: 12px; right: 12px; width: 42px; height: 42px; }
body.phone .hold { height: 150vh; margin-bottom: 20vh; }
body.phone .card.tall { top: 50vh; margin-bottom: 0; } /* a held card's spacing comes from its .hold (js/piece.js sizes it) */
/* globe on phones: smaller; at a stop it tucks into the top-left corner so the pile has the top half */
body.phone .globe-piece { --gh: min(40vh, 66vw); }
body.phone .globe-stage.at-stop .globe-big { translate: calc(-50% - 31vw) -4vh; scale: .44; transform-origin: 50% 0; }
body.phone .pin-tip { width: 190px; }
/* phones: the openings that are sized to the window (each piece's first set) */
body.phone .slot { height: var(--sh); width: calc(var(--sh) * 467 / 900); left: calc(30% - var(--sh) * 467 / 900 / 2); top: 0; }
body.phone .lamp-glow { width: calc(var(--sh) * .95); height: calc(var(--sh) * .95); left: calc(30% - var(--sh) * .475); top: 0; }
body.phone .bit-slot { height: min(var(--sh) * .7, 46vw); left: calc(25% - min(var(--sh) * .7, 46vw) * 820 / 847 / 2); top: calc(var(--sh) * .15); }
body.phone .eden-slot { height: var(--sh); left: calc(50% - var(--sh) * 338 / 634 / 2); top: 0; }
body.phone .a-slot { width: 100%; top: 0; height: var(--sh); }
body.phone .a-spin { font-size: min(var(--sh) * .85, 72vw); }
/* ---------- phones: the full check (2026-12-04) ---------- */
/* the corner: a smaller name and icons so they never meet on a narrow phone */
body.phone #wordmark { left: 18px; top: 20px; font-size: 34px; }
body.phone .corner { right: 14px; top: 16px; gap: 8px; }
body.phone .corner .icon { width: 42px; height: 42px; }
/* the room's dots: a bigger tap target, same little dot */
body.phone #roomDots { gap: 0; padding: 2px 6px; }
body.phone #roomDots button { width: 34px; height: 34px; }
/* "keep scrolling to return to the room" stays on one line */
body.phone .return { white-space: nowrap; font-size: 9.5px; letter-spacing: .1em; background: rgba(255, 255, 255, .8); }
/* things sized for the desktop's full-height stage: half, since a phone's stage is half the screen */
body.phone .set .phone { height: var(--sh); top: 0; }
body.phone .explode { height: var(--sh); width: calc(var(--sh) * 630 / 813); left: calc(50% - var(--sh) * 630 / 813 / 2); top: 0; }
body.phone .set > .device { height: calc(var(--h) * .5); }
body.phone .specimen { height: var(--sh); padding-top: 5vh; }
body.phone .specimen .tag { top: 2vh; }
body.phone .tester { inset: 5vh 5% 5%; }
body.phone .trip { height: min(var(--sh), 100vw); top: 52px; }
/* the postcard on the narrowest phones: the airmail label and stamps still fit across */
@media (max-width: 359px) {
  body .mail-stamps button { width: 34px; } body .mail-stamps button:nth-child(3) { width: 40px; }
  body .mail-send { zoom: .7; }
}
/* ---------- short screens held sideways (phones in landscape): the room fits whole, so keep its corners small ---------- */
@media (max-height: 520px) and (orientation: landscape) {
  #wordmark { left: 20px; top: 12px; font-size: 26px; }
  .corner { right: 16px; top: 12px; gap: 8px; }
  .corner .icon, .piece-close { width: 40px; height: 40px; }
  .piece-close { top: 12px; right: 16px; }
  .article { margin-left: 57vw; width: 40vw; padding-top: 14vh; }
  .card { padding: 22px 24px 24px; margin-bottom: 44vh; }
  .card h1 { font-size: 30px; margin-bottom: 12px; }
  .card h2 { font-size: 26px; margin-bottom: 12px; }
  .card p { font-size: 14.5px; }
  .card .lead { font-size: 16px; margin-bottom: 14px; }
  .card.tall { top: 10vh; }
  .stage { width: 56vw; }
}/* the postcard on short sideways screens: the card on the left, stamps and the airmail label in a column beside it */
@media (max-height: 520px) and (orientation: landscape) {
  .mail-stage { display: grid; grid-template-columns: auto auto; grid-template-rows: 1fr auto auto auto 1fr; column-gap: 22px; row-gap: 12px; align-items: center; justify-content: center; padding: 12px; }
  .postcard { --cw: min(88vh * 1.5, 63vw); grid-column: 1; grid-row: 1 / 6; }
  .pc-to { margin: 6px 0 2px; }
  .pc-to b { font-size: 19px; line-height: 24px; white-space: nowrap; }
  .pc-line { margin-top: 5px; }
  .pc-label { font-size: 9px; letter-spacing: .16em; margin-bottom: 2px; }
  .pc-stampbox { width: 22%; }
  .mail-bar { grid-column: 2; grid-row: 2; flex-direction: column; gap: 16px; }
  .mail-stamps { gap: 10px; }
  .mail-stamps button { width: 46px; } .mail-stamps button:nth-child(3) { width: 52px; }
  .mail-send { zoom: .8; }
  .mail-note { grid-column: 2; grid-row: 3; max-width: 30vw; font-size: 13px; }
  .mail-alt { grid-column: 2; grid-row: 4; margin: 0; text-align: center; }
}/* tablets held upright use the same swipe-and-stack layout; keep the write-ups to a readable width */
@media (min-width: 600px) {
  body.phone .article { width: min(calc(100vw - 24px), 580px); }
  body.phone .label, body.phone .blurb { max-width: 460px; }
  body.phone .card { padding: 30px 34px 32px; }
}/* upright tablets: the two objects tall enough to run under the write-up */
body.phone .trifold { height: min(var(--sh), 30vw * 612 / 264); }
@media (min-width: 600px) { body.phone .set > .clipboard { --w: 34% !important; --x: 31% !important; } }/* where the sky's top colour fills a strip above the room, the sky picture fades into it instead of a hard line */
body.phone #bg, body.sky-strip #bg { -webkit-mask-image: linear-gradient(transparent, #000 120px); mask-image: linear-gradient(transparent, #000 120px); }/* squarer screens held sideways (4:3 tablets): the stage is narrower, so the device mockups come down a little */
@media (orientation: landscape) and (max-aspect-ratio: 3/2) { .set > .device { height: calc(var(--h) * .78); } }/* ---------- touch screens ---------- */
/* iPhones zoom the page into any field under 16px and stay zoomed: the postcard types at 16px on touch screens
   (the field and its ink together, so the letters still land where the caret is) */
@media (pointer: coarse) { .tw textarea, .tw input, .tw-ink { font-size: 16px; } }
/* no grey tap flash on the room's objects; no double-tap zoom or pull-to-refresh fighting the swipes */
html { -webkit-tap-highlight-color: transparent; }
html, body { overscroll-behavior: none; }
a, button, input, textarea, label, .spot { touch-action: manipulation; } /* not the Polaroids: they drag (touch-action: none) *//* the index on phones (js/index.js lays it out full width under the name) */
body.phone #index.rows ol { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; }
body.phone #index .proj { white-space: normal; padding: 3px 0; font-size: 14px; }
body.phone #index .cat { padding: 2px 0 6px; }
body.phone #index header { flex-wrap: wrap; row-gap: 4px; }
body.phone #index .x { width: 40px; height: 40px; top: 8px; right: 8px; }
/* Savor's chat on phones and upright tablets: as tall as the top half, centred (the set there is 47vh tall) */
body.phone .set > .chat-phone { top: 0; height: 100%; width: calc(var(--sh) * 600 / 1234); left: calc(50% - var(--sh) * 600 / 1234 / 2); }