/* ==========================================================================
   SCENES — seven rooms, one Bureau. Mobile-first; larger layouts live in
   responsive.css.
   ========================================================================== */

/* ======================================================================
   01 · THE INSUFFICIENT GREETING
   ====================================================================== */
.s1 { position: absolute; inset: 0; overflow: hidden; background: var(--paper); }
.s1-desk {
  position: absolute; inset: 0;
  background-color: #7A5A40;
  background-image: linear-gradient(90deg, rgba(40, 24, 12, .16) 2px, transparent 2px), var(--noise);
  background-size: 41px 100%, auto;
}
.s1-mat {
  position: absolute; inset: max(14px, 3.5vmin); border-radius: 8px;
  background-color: #74866A;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cg stroke='%23F5EBDD' fill='none'%3E%3Cpath d='M24 0V120M48 0V120M72 0V120M96 0V120M0 24H120M0 48H120M0 72H120M0 96H120' stroke-opacity='.13'/%3E%3Cpath d='M.5 0V120M0 .5H120' stroke-opacity='.32'/%3E%3C/g%3E%3C/svg%3E"), var(--noise);
  background-size: 120px 120px, auto;
  box-shadow: inset 0 0 0 2px rgba(39, 60, 74, .35), inset 0 0 60px rgba(20, 30, 20, .35), 0 14px 30px rgba(0, 0, 0, .35);
}
.s1-ruler {
  position: absolute; right: 7vmin; top: 12%; width: 34px; height: 68%;
  background: var(--ochre) repeating-linear-gradient(transparent 0 9px, var(--ink) 9px 10px) right / 10px 100% no-repeat;
  border: 1.5px solid var(--ink); border-radius: 2px; transform: rotate(5deg);
  box-shadow: 4px 6px 0 rgba(0, 0, 0, .22);
}
.s1-ruler::after { content: ''; position: absolute; right: 0; top: 0; bottom: 0; width: 16px; background: repeating-linear-gradient(transparent 0 49px, var(--ink) 49px 51px); }
.s1-pencil {
  position: absolute; left: 6%; bottom: 9%; width: min(300px, 52vw); height: 16px;
  background: linear-gradient(90deg, var(--terracotta) 0 7%, #B7B7AE 7% 11%, var(--ochre) 11% 86%, #F2D9AE 86% 96%, var(--ink) 96%);
  clip-path: polygon(0 0, 86% 0, 100% 50%, 86% 100%, 0 100%);
  transform: rotate(-24deg); filter: drop-shadow(3px 5px 0 rgba(0, 0, 0, .22));
}
.s1-clips { position: absolute; right: 18%; bottom: 12%; display: flex; gap: 14px; transform: rotate(18deg); }
.s1-clips span { width: 16px; height: 48px; border: 2.5px solid #A9B4B8; border-radius: 9px; position: relative; }
.s1-clips span::after { content: ''; position: absolute; inset: 6px 2px 10px; border: 2.5px solid #A9B4B8; border-radius: 6px; border-bottom: 0; }
.s1-ring { position: absolute; right: 12%; top: 14%; width: 120px; height: 120px; border-radius: 50%; border: 7px solid rgba(90, 55, 30, .2); box-shadow: inset 0 0 0 2px rgba(90, 55, 30, .08); transform: scaleY(.92); }

.s1-greeting {
  position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; padding: 24px;
  background: var(--paper) var(--noise); transform-origin: 50% 50%; outline: none;
}
.s1-greeting.is-note { box-shadow: 10px 14px 0 rgba(20, 12, 6, .28); border: 3px solid rgba(39, 60, 74, .2); }
.s1-greeting__inner { position: relative; display: grid; place-items: center; }
.s1-greeting__text { font: 500 clamp(1.6rem, 7.2vw, 3.2rem)/1.15 var(--f-body); letter-spacing: -.015em; text-align: center; }
.s1-greeting__stamp { position: absolute; left: 50%; top: 50%; width: min(92vw, 600px); translate: -50% -50%; mix-blend-mode: multiply; pointer-events: none; }
.s1-verdict { position: absolute; left: 50%; bottom: 14%; z-index: 4; width: min(560px, 86vw); translate: -50% 0; text-align: center; display: grid; gap: 10px; }
.s1-verdict__text { font: italic 400 clamp(1.15rem, 4.6vw, 1.5rem)/1.4 var(--f-display); }
.s1-verdict__src { font: 600 .64rem var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--terracotta); }
.s1-skip { position: absolute; left: 0; right: 0; bottom: calc(14px + var(--safe-b)); z-index: 5; text-align: center; font: 500 .62rem var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-60); opacity: 0; pointer-events: none; }

.s1-stage { position: absolute; inset: 0; z-index: 4; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: 24px 16px calc(28px + var(--safe-b)); }
.envelope { position: relative; width: min(90vw, 540px); aspect-ratio: 1.42; }
.envelope__back { position: absolute; inset: 0; border-radius: 4px; background: #A67F55 var(--noise); }
.envelope__letter { position: absolute; left: 6%; right: 6%; top: 5%; height: 84%; z-index: 2; border-radius: 1px; }
.peek-lines { position: absolute; left: 10%; right: 10%; top: 9%; height: 26%; background: repeating-linear-gradient(transparent 0 9px, rgba(39, 60, 74, .2) 9px 10px); }
.envelope__front {
  position: absolute; inset: 0; z-index: 3; border-radius: 4px; overflow: hidden;
  background-color: var(--kraft); background-image: var(--fibres), var(--noise);
  box-shadow: 0 22px 40px -16px rgba(30, 20, 10, .7), 0 3px 6px rgba(30, 20, 10, .25), inset 0 0 0 1.5px rgba(39, 60, 74, .28);
}
.envelope__front::before { content: ''; position: absolute; inset: 0; background: #BE996C var(--fibres); clip-path: polygon(0 100%, 50% 50%, 100% 100%); }
.envelope__front::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top right, transparent calc(50% - 1px), rgba(60, 40, 20, .25) 50%, transparent calc(50% + 1px)) left / 50% 100% no-repeat, linear-gradient(to top left, transparent calc(50% - 1px), rgba(60, 40, 20, .25) 50%, transparent calc(50% + 1px)) right / 50% 100% no-repeat; clip-path: polygon(0 46%, 100% 46%, 100% 100%, 0 100%); }
.env-postage { position: absolute; right: 5%; top: 22%; width: 14%; z-index: 2; transform: rotate(4deg); filter: drop-shadow(1px 2px 1px rgba(0, 0, 0, .2)); }
.env-postmark { position: absolute; right: 13%; top: 27%; width: 34%; z-index: 3; transform: rotate(-6deg); }
.env-label {
  position: absolute; left: 4%; bottom: 14%; width: 46%; z-index: 2; padding: 6px 9px 7px;
  background: var(--paper-hi); border: 1.5px solid var(--ink); transform: rotate(-1.5deg);
  box-shadow: 2px 3px 0 rgba(39, 60, 74, .25);
}
.env-label__title { margin: -6px -9px 6px; padding: 4px 9px; background: var(--terracotta); color: var(--paper-hi); font: 600 clamp(.5rem, 1.9vw, .66rem) var(--f-mono); letter-spacing: .18em; text-transform: uppercase; }
.env-label dl { display: grid; gap: 2px; }
.env-label div { display: grid; grid-template-columns: 5.2em 1fr; align-items: baseline; border-bottom: 1px dotted var(--ink-60); }
.env-label dt { font: 600 clamp(.42rem, 1.5vw, .54rem) var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); }
.env-label dd { font: 600 clamp(.56rem, 2.2vw, .8rem)/1.35 var(--f-body); }
.env-meta { position: absolute; right: 5%; bottom: 16%; z-index: 2; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font: 600 clamp(.42rem, 1.6vw, .58rem) var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink); }
.env-meta span:last-child { color: var(--terracotta-deep); }
.env-handling { position: absolute; left: 0; right: 0; bottom: 0; height: 10%; z-index: 2; display: flex; align-items: center; justify-content: center; background: repeating-linear-gradient(-45deg, var(--terracotta) 0 12px, var(--paper-hi) 12px 18px, var(--sage) 18px 30px, var(--paper-hi) 30px 36px); border-top: 1.5px solid var(--ink); }
.env-handling span { padding: 1px 8px; background: var(--paper-hi); border: 1px solid var(--ink); font: 600 clamp(.42rem, 1.5vw, .56rem) var(--f-mono); letter-spacing: .16em; text-transform: uppercase; }
.env-stamp-slot { position: absolute; left: 4%; top: 6%; z-index: 3; }
.envelope__flap { position: absolute; inset: 0; z-index: 4; transform-origin: 50% 0; transform-style: preserve-3d; pointer-events: none; }
.flap__outer, .flap__inner { position: absolute; inset: 0; clip-path: polygon(0 0, 100% 0, 50% 46%); backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 4px 4px 0 0; }
.flap__outer { background-color: #CFAE84; background-image: linear-gradient(rgba(255, 255, 255, .12), rgba(0, 0, 0, .06)), var(--fibres), var(--noise); }
.flap__outer::before { content: ''; position: absolute; inset: 0; background: linear-gradient(to bottom, transparent 80%, rgba(60, 40, 20, .25)); }
.flap__inner { transform: rotateX(180deg); background-color: var(--paper-hi); background-image: repeating-linear-gradient(45deg, rgba(39, 60, 74, .2) 0 1px, transparent 1px 5px), repeating-linear-gradient(-45deg, rgba(216, 107, 69, .16) 0 1px, transparent 1px 7px); }
.envelope__seal { position: absolute; left: 50%; top: 45%; width: 18%; z-index: 5; translate: -50% -50%; filter: drop-shadow(1px 3px 2px rgba(60, 20, 10, .45)); }
.envelope__seal svg { overflow: visible; }
.s1-note { max-width: 30ch; text-align: center; font: italic 400 clamp(1rem, 4vw, 1.2rem)/1.45 var(--f-display); color: var(--paper-hi); text-shadow: 0 1px 2px rgba(20, 30, 20, .5); }

.s1-letter { position: absolute; inset: 0; z-index: 6; overflow-y: auto; display: flex; flex-direction: column; align-items: center; gap: 22px; padding: max(28px, 7vh) 16px calc(28px + var(--safe-b)); }
.fold-letter .fp-3 { padding-bottom: 26px; }
.letter__stamp { position: absolute; right: 18px; bottom: 14px; width: 104px; transform: rotate(-12deg); mix-blend-mode: multiply; opacity: .92; }
.s1-proceed { display: flex; justify-content: center; }

/* ======================================================================
   02 · BUREAU HEADQUARTERS
   ====================================================================== */
.room { position: absolute; inset: 0; overflow: hidden; background: var(--paper); }
.room__wall {
  position: absolute; inset: 0;
  background-color: #EEDFC6;
  background-image: repeating-linear-gradient(90deg, rgba(140, 155, 123, .14) 0 2px, transparent 2px 26px, rgba(216, 107, 69, .05) 26px 27px, transparent 27px 52px), var(--noise);
}
.room__wall::after { /* wainscot + dado rail */
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 40%; z-index: 0;
  background: var(--sage) var(--noise);
  background-image: linear-gradient(90deg, rgba(39, 60, 74, .28) 1.5px, transparent 1.5px), var(--noise);
  background-size: 160px 100%, auto;
  border-top: 7px solid var(--ochre-deep); box-shadow: 0 -2px 0 var(--ink), inset 0 2px 0 var(--ink);
}
.room__floor { position: absolute; left: 0; right: 0; bottom: 0; height: 6%; background: #5B4636; border-top: 2px solid var(--ink); }
.room__wall > * { position: absolute; z-index: 1; }
.wall__window { left: -8%; top: calc(var(--top) + 3%); width: 34vw; max-width: 230px; filter: drop-shadow(4px 5px 0 rgba(39, 60, 74, .2)); }
.wall__insignia { left: 50%; top: calc(var(--top) + 3%); width: 22vw; max-width: 170px; translate: -50% 0; filter: drop-shadow(3px 4px 0 rgba(39, 60, 74, .2)); }
.wall__clock { right: 5%; top: calc(var(--top) + 3.5%); width: 18vw; max-width: 116px; }
.clock-h, .clock-m, .clock-s { transform-box: view-box; transform-origin: 60px 60px; }
.clock-s { animation: clock-tick 60s steps(60) infinite; }
.wall__poster { display: none; }
.wall__notice {
  right: 6%; top: calc(var(--top) + 25%); width: 92px; padding: 14px 10px 12px; text-align: left;
  background: #FFF8E6 var(--noise); border-top: 6px solid var(--terracotta); box-shadow: var(--shadow-paper); transform: rotate(3deg);
  transition: transform var(--t-impact) var(--e-settle);
}
.wall__notice:hover { transform: rotate(0deg) scale(1.05); }
.notice__pin { position: absolute; top: -11px; left: 50%; width: 14px; height: 14px; translate: -50% 0; border-radius: 50%; background: var(--terracotta); border: 2px solid var(--ink); }
.notice__title { display: block; font: 700 .9rem var(--f-display); margin-bottom: 6px; }
.notice__lines { display: grid; gap: 5px; }
.notice__lines i { height: 3px; background: var(--ink-20); }
.notice__lines i:nth-child(2) { width: 80%; } .notice__lines i:nth-child(4) { width: 60%; }
.wall__cabinet { left: 4%; bottom: 22%; width: 25vw; max-width: 150px; z-index: 1; }
.wall__cabinet .drawer { min-height: 44px; }
.cabinet-stamp-slot { position: absolute; right: -8px; top: -30px; }
.cabinet-stamp-slot .hidden-stamp { width: 34px; height: 34px; }

.hq { position: absolute; left: 50%; bottom: 0; z-index: 3; width: 150vw; translate: -50% 0; }
.hq-desk { position: relative; width: 100%; aspect-ratio: 1000 / 380; }
.hq-pigeon { position: absolute; left: 35%; bottom: 17%; width: 30%; z-index: 2; }
.hq-pigeon .pigeon-btn svg { filter: drop-shadow(4px 4px 0 rgba(39, 60, 74, .18)); }
.hq-counter { position: absolute; left: 0; right: 0; bottom: 0; height: 50%; z-index: 3; display: flex; flex-direction: column; }
.counter__top { height: 13%; background: var(--ochre-deep); background-image: repeating-linear-gradient(90deg, rgba(90, 60, 20, .2) 0 2px, transparent 2px 30px); border: 2px solid var(--ink); border-radius: 4px 4px 0 0; box-shadow: inset 0 3px 0 rgba(255, 240, 200, .35); }
.counter__front { flex: 1; display: grid; grid-template-columns: 1fr 1.2fr 1fr; gap: 3%; padding: 3.5% 18% 0; background: var(--ink) var(--noise); border: 2px solid var(--ink); border-top: 0; }
.counter__panel { border: 1.5px solid rgba(231, 187, 104, .55); border-bottom: 0; box-shadow: inset 0 0 0 4px rgba(39, 60, 74, 1), inset 0 0 0 5px rgba(231, 187, 104, .25); }
.counter__panel--plaque { align-self: start; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 4% 6%; background: var(--paper-hi) var(--noise); border: 1.5px solid var(--ochre); box-shadow: 0 2px 0 var(--ochre-deep); }
.counter__panel--plaque b { font: 700 clamp(.66rem, 2.6vw, 1.3rem) var(--f-display); letter-spacing: .02em; }
.counter__panel--plaque i { font: 500 clamp(.32rem, 1vw, .55rem) var(--f-mono); font-style: normal; letter-spacing: .12em; text-transform: uppercase; color: var(--terracotta); text-align: center; }
.obj { position: absolute; bottom: 46.5%; z-index: 4; }
.obj svg { width: 100%; height: auto; overflow: visible; }
.obj--lamp { display: none; left: 2%; width: 11%; }
.obj--phone { left: 17%; width: 14%; transition: transform var(--t-micro); }
.obj--phone:hover { transform: translateY(-2px); }
.obj--phone .phone-handset { transform-box: view-box; transform-origin: 62px 30px; transition: transform .3s var(--e-settle); }
.obj--phone.is-ringing { animation: phone-ring .12s linear 5; }
.obj--phone.is-lifted .phone-handset { transform: translate(-6px, -16px) rotate(-14deg); }
.obj--stack1 { display: none; left: 27%; width: 9%; }
.obj--stack2 { left: 61%; width: 9%; z-index: 3; }
.obj--stack2.is-wobbling .stack-sheets { animation: wobble .5s ease-in-out 3; transform-box: view-box; transform-origin: 60px 120px; }
.obj--nameplate { left: 50%; width: 15%; translate: -50% 0; bottom: 45%; z-index: 5; }
.obj--dispenser { left: 70%; width: 13%; }
.dispenser-tag { position: absolute; right: 0; top: -18%; padding: 3px 7px; white-space: nowrap; background: var(--ochre); border: 1.5px solid var(--ink); font: 600 .56rem var(--f-mono); letter-spacing: .12em; text-transform: uppercase; opacity: 0; transition: opacity .3s; pointer-events: none; }
.obj--dispenser.is-hinted .dispenser-tag { opacity: 1; animation: hint-bob 1.6s ease-in-out infinite; }
.obj--dispenser.is-hinted::after { content: ''; position: absolute; left: 8%; right: 8%; top: 8%; aspect-ratio: 1; border-radius: 50%; border: 2px solid var(--terracotta); animation: hint-ring 1.6s ease-out infinite; pointer-events: none; }
.ticket-out { position: absolute; left: 30%; top: 58%; width: 40%; height: 26%; z-index: -1; overflow: hidden; pointer-events: none; }
.ticket-out b { display: block; height: 100%; background: var(--ochre-soft); border: 1px solid var(--ink); font: 600 .5rem var(--f-mono); text-align: center; padding-top: 30%; transform: translateY(-100%); }
.slip--hq { left: calc(50% - min(150px, 50vw - 16px)); bottom: 110%; width: min(300px, calc(100vw - 32px)); }
.slip--hq::after { left: 50%; margin-left: -7px; }

.ticket-stage { position: absolute; left: 0; right: 0; top: calc(var(--top) + 18%); z-index: 8; display: flex; justify-content: center; padding: 0 16px; pointer-events: none; }
.ticket {
  display: grid; grid-template-columns: 70px 1fr; width: min(360px, 100%);
  background: var(--ochre-soft) var(--noise); color: var(--ink);
  border: 1.5px solid var(--ink); box-shadow: 4px 5px 0 rgba(39, 60, 74, .35);
  -webkit-mask: radial-gradient(circle at 70px 0, #0000 9px, #000 9.5px) top / 100% 51% no-repeat, radial-gradient(circle at 70px 100%, #0000 9px, #000 9.5px) bottom / 100% 51% no-repeat;
          mask: radial-gradient(circle at 70px 0, #0000 9px, #000 9.5px) top / 100% 51% no-repeat, radial-gradient(circle at 70px 100%, #0000 9px, #000 9.5px) bottom / 100% 51% no-repeat;
}
.ticket__stub { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border-right: 2px dashed var(--ink-60); background: var(--terracotta); color: var(--paper-hi); }
.ticket__stub span { font: 600 .62rem var(--f-mono); letter-spacing: .14em; }
.ticket__stub b { font: 800 1.7rem var(--f-display); writing-mode: vertical-rl; transform: rotate(180deg); }
.ticket__body { padding: 12px 14px 10px; }
.ticket__header { font: 600 .58rem var(--f-mono); letter-spacing: .14em; text-transform: uppercase; padding-bottom: 6px; margin-bottom: 8px; border-bottom: 1.5px solid var(--ink); }
.ticket dl { display: grid; gap: 3px; }
.ticket dl div { display: grid; grid-template-columns: 6.4em 1fr; align-items: baseline; }
.ticket dt { font: 600 .56rem var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }
.ticket dd { font: 700 .88rem var(--f-body); }
.ticket dl div:last-child dd { color: var(--terracotta-deep); }
.ticket__footer { margin-top: 8px; font: italic 400 .74rem var(--f-display); color: var(--ink-soft); }

.casefile-stage { position: absolute; inset: 0; z-index: 20; display: grid; place-items: center; padding: calc(var(--top) + 14px) 16px calc(16px + var(--safe-b)); overflow-y: auto; }
.casefile-backdrop { position: fixed; inset: 0; background: rgba(28, 40, 50, .5); }
.casefile { position: relative; width: min(430px, 100%); margin-top: 22px; }
.casefile__tab { position: absolute; left: 0; top: -26px; height: 28px; padding: 5px 18px 0; background: var(--manila); border: 1.5px solid var(--ink); border-bottom: 0; border-radius: 6px 6px 0 0; font: 600 .7rem var(--f-mono); letter-spacing: .14em; }
.casefile__cover {
  position: relative; padding: 26px 22px 22px; display: flex; flex-direction: column; gap: 14px;
  background: var(--manila) var(--noise); border: 1.5px solid var(--ink); border-radius: 0 6px 6px 6px;
  box-shadow: 6px 8px 0 rgba(39, 60, 74, .4), inset 0 0 0 6px rgba(255, 255, 255, .12);
}
.casefile__cover::before { content: ''; position: absolute; left: 10px; right: -7px; bottom: -8px; height: 100%; z-index: -1; background: #D9B978; border: 1.5px solid var(--ink); border-radius: 6px; }
.casefile__kicker { padding-right: 42%; font: 600 .64rem var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--terracotta-deep); }
.casefile__title { font: 800 clamp(1.7rem, 7vw, 2.3rem)/1 var(--f-display); letter-spacing: -.02em; padding-right: 22%; }
.casefile .ledger { padding: 12px 0; border-top: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); }
.casefile__stamp { position: absolute; right: 12px; top: 18px; width: 38%; mix-blend-mode: multiply; pointer-events: none; }
.casefile__clip { position: absolute; left: 52%; top: -16px; width: 20px; height: 52px; border: 3px solid #8A979C; border-radius: 10px; }
.casefile .btn { align-self: stretch; }

/* ======================================================================
   03 · DEPARTMENT OF GOOD THINGS (flat-lay on a sage leather blotter)
   ====================================================================== */
.s3 {
  position: absolute; inset: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain;
  background-color: #5E6D51;
  background-image: radial-gradient(ellipse at 50% 30%, rgba(255, 255, 255, .08), transparent 60%), radial-gradient(circle, rgba(0, 0, 0, .08) 1px, transparent 1.5px), var(--noise);
  background-size: auto, 5px 5px, auto;
  padding-bottom: calc(110px + var(--safe-b));
}
.dept__blotter { display: none; }
.s3-layout { position: relative; display: flex; flex-direction: column; align-items: center; padding: 0 14px; }
.form-b1 { width: min(620px, 100%); padding: 20px 18px 22px; border-top: 8px solid var(--sage-deep); }
.form__head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; padding-bottom: 10px; border-bottom: 2px solid var(--ink); }
.form__code { font: 600 .66rem var(--f-mono); letter-spacing: .2em; color: var(--terracotta); }
.form__title { font: 800 clamp(1.35rem, 6vw, 1.9rem)/1.02 var(--f-display); letter-spacing: -.02em; margin-top: 4px; }
.form__serial { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; font: 500 .54rem var(--f-mono); letter-spacing: .06em; color: var(--ink-soft); }
.barcode { width: 72px; height: 26px; background: repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 3px, var(--ink) 3px 4px, transparent 4px 7px, var(--ink) 7px 10px, transparent 10px 11px, var(--ink) 11px 12px, transparent 12px 15px); }
.form__applicant { display: grid; grid-template-columns: auto 1fr auto auto; gap: 4px 10px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--ink-20); }
.form__applicant span { font: 600 .58rem var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }
.form__applicant b { font: italic 600 1.05rem var(--f-display); color: #2F4A6A; }
.form__intro { margin: 10px 0 4px; font: italic 400 1rem/1.4 var(--f-display); color: var(--ink-soft); }
.form__questions { counter-reset: q; }
.q { padding: 12px 0; border-top: 1px solid var(--ink-20); transition: opacity .3s; }
.q:first-child { border-top: 0; }
.q__head { display: grid; grid-template-columns: 2.6em 1fr; gap: 8px; align-items: baseline; }
.q__num { font: 600 .66rem var(--f-mono); letter-spacing: .1em; color: var(--terracotta); }
.q__text { font: 600 1.02rem/1.35 var(--f-body); }
.q__options { display: grid; gap: 7px; margin-top: 10px; }
.opt {
  display: flex; align-items: center; gap: 12px; min-height: 48px; width: 100%; padding: 8px 12px;
  text-align: left; font: 500 .96rem/1.25 var(--f-body);
  background: rgba(255, 255, 255, .35); border: 1.5px solid var(--ink-20); border-radius: 2px;
  transition: background-color var(--t-micro), border-color var(--t-micro), transform var(--t-micro);
}
.opt:hover:not(:disabled) { background: rgba(231, 187, 104, .22); border-color: var(--ink); }
.opt:active:not(:disabled) { transform: translate(1px, 1px); }
.opt:disabled { cursor: default; }
.opt__box { position: relative; flex: none; width: 22px; height: 22px; border: 1.5px solid var(--ink); background: var(--paper-hi); }
.opt__tick { position: absolute; left: -3px; top: -9px; width: 32px; height: 32px; overflow: visible; }
.opt__tick path { fill: none; stroke: var(--terracotta); stroke-width: 3.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset .38s var(--e-paper); }
.opt.is-checked { border-color: var(--ink); background: rgba(231, 187, 104, .28); }
.opt.is-checked .opt__tick path { stroke-dashoffset: 0; }
.q.is-pending { opacity: .5; }
.q.is-pending .q__options, .q.is-answered .q__options { display: none; }
.q__answer { display: none; margin: 4px 0 0 calc(2.6em + 8px); font: italic 600 1.15rem var(--f-display); color: #2F4A6A; }
.q__answer::before { content: '✓ '; color: var(--terracotta); font-style: normal; }
.q.is-answered .q__answer { display: block; }
.q.is-answered .q__text { font-weight: 500; color: var(--ink-soft); font-size: .92rem; }
.form__processing { display: flex; align-items: center; gap: 4px; padding: 12px 0; font: 600 .7rem var(--f-mono); letter-spacing: .16em; text-transform: uppercase; }
.form__processing i { width: 5px; height: 5px; background: var(--ink); animation: blink .9s steps(2) infinite; }
.form__processing i:nth-child(3) { animation-delay: .3s; } .form__processing i:nth-child(4) { animation-delay: .6s; }
.form__result { margin-top: 12px; padding: 14px 14px 16px; border: 1.5px dashed var(--ink); background: rgba(239, 226, 206, .7); }
.form__result-title { font: 600 .66rem var(--f-mono); letter-spacing: .18em; text-transform: uppercase; margin-bottom: 10px; color: var(--terracotta-deep); }
.ledger--result dd { font: 700 .98rem var(--f-body); }
.form__foot { display: flex; justify-content: space-between; gap: 12px; margin-top: 14px; padding-top: 8px; border-top: 1px solid var(--ink-20); font: 500 .56rem/1.5 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); }
.form__stamp { position: absolute; right: 3%; bottom: 14px; width: min(46%, 230px); mix-blend-mode: multiply; pointer-events: none; }
.s3-proceed { display: flex; justify-content: center; margin-top: 18px; }

.s3-cabinet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  padding: 18px 18px calc(92px + var(--safe-b));
  background: #4D5B43 var(--noise); border-top: 2px solid var(--ink);
  box-shadow: 0 -16px 40px rgba(0, 0, 0, .35);
  transform: translateY(110%); visibility: hidden;
  transition: transform .5s var(--e-paper), visibility 0s linear .5s;
}
.s3-cabinet.is-open { transform: none; visibility: visible; transition: transform .5s var(--e-paper), visibility 0s; }
.s3-cabinet .cabinet { max-width: 360px; margin: 0 auto; }
.s3-cabinet__hint { margin-top: 10px; text-align: center; font: 500 .6rem var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--paper); opacity: .75; }
.s3-desk-items { display: none; }
.s3-dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 31; display: flex; align-items: flex-end; justify-content: space-between; padding: 0 12px calc(10px + var(--safe-b)); pointer-events: none; }
.s3-cabinet-toggle {
  pointer-events: auto; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; text-align: left;
  min-height: 52px; padding: 7px 12px; background: var(--sage); color: var(--ink); border: 1.5px solid var(--ink); box-shadow: 3px 3px 0 var(--ink);
  font: 600 .66rem var(--f-mono); letter-spacing: .12em; text-transform: uppercase;
}
.s3-cabinet-toggle small { grid-column: 2; font: 500 .52rem var(--f-mono); letter-spacing: .1em; opacity: .8; }
.toggle__icon { grid-row: 1 / span 2; display: grid; gap: 3px; width: 22px; }
.toggle__icon i { height: 6px; border: 1.5px solid var(--ink); background: #A3B092; }
.s3-cabinet-toggle[aria-expanded='true'] { background: var(--ochre); }
.s3-pigeon { position: relative; width: 96px; pointer-events: auto; }
.s3-pigeon__art { width: 96px; margin-bottom: -26px; }
.slip--s3 { right: 6px; left: auto; bottom: calc(100% - 10px); }
.slip--s3::after { left: auto; right: 34px; }

/* ======================================================================
   04 · DEPARTMENT OF FUTURE AFFAIRS (navy & brass)
   ====================================================================== */
.s4 {
  position: absolute; inset: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; color: var(--paper);
  background-color: #1F3240;
  background-image:
    radial-gradient(circle at 50% 0%, rgba(231, 187, 104, .18), transparent 55%),
    radial-gradient(circle, rgba(245, 235, 221, .5) .8px, transparent 1.2px), radial-gradient(circle, rgba(245, 235, 221, .3) .6px, transparent 1px),
    var(--noise);
  background-size: auto, 90px 90px, 37px 37px, auto;
  background-position: 0 0, 10px 20px, 0 0, 0 0;
}
.s4-sky { position: absolute; left: 50%; top: 8%; width: 640px; height: 640px; translate: -50% 0; border-radius: 50%; border: 1px dashed rgba(231, 187, 104, .22); box-shadow: 0 0 0 60px rgba(231, 187, 104, .025), inset 0 0 0 110px rgba(231, 187, 104, .02); pointer-events: none; }
.s4-sky::after { content: ''; position: absolute; inset: 140px; border-radius: 50%; border: 1px solid rgba(231, 187, 104, .16); }
.s4-intro { position: relative; max-width: 34ch; margin: 0 auto 6px; padding: 0 16px; text-align: center; font: italic 400 1rem/1.45 var(--f-display); color: rgba(245, 235, 221, .85); }
.s4-layout { position: relative; display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 8px 16px 0; }
.s4-machine { position: relative; display: flex; justify-content: center; width: 100%; }
.printer { position: relative; width: min(300px, 76vw); margin-bottom: 330px; }
.printer-art { width: 100%; height: auto; overflow: visible; filter: drop-shadow(0 10px 0 rgba(0, 0, 0, .18)); }
.printer.is-printing .pr-gear { animation: spin 1.2s linear infinite; transform-box: view-box; }
.printer.is-printing .pr-needle { animation: needle .28s ease-in-out infinite alternate; transform-box: view-box; }
.printer.is-printing .pr-needle-2 { animation-duration: .36s; }
.printer.is-printing .pr-l { animation: blink .5s steps(2) infinite; }
.printer.is-printing .pr-l:nth-child(2) { animation-delay: .12s; } .printer.is-printing .pr-l:nth-child(3) { animation-delay: .24s; } .printer.is-printing .pr-l:nth-child(4) { animation-delay: .36s; }
.printer.is-printing .pr-bulb { fill: var(--ochre); filter: drop-shadow(0 0 6px var(--ochre)); }
.receipt-feed { position: absolute; left: 14%; width: 72%; top: 81.5%; height: 360px; overflow: hidden; pointer-events: none; }
.receipt-feed > * { pointer-events: auto; }
.receipt { width: 100%; padding: 20px 14px 24px; color: var(--ink); filter: drop-shadow(0 4px 4px rgba(0, 0, 0, .3)); }
.receipt__no { margin-top: 2px; }
.scratch { position: relative; display: grid; place-items: center; min-height: 104px; margin: 6px 0; padding: 10px 6px; }
.scratch__text { font: italic 600 1rem/1.35 var(--f-display); text-align: center; color: var(--ink); }
.scratch__foil { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; border-radius: 2px; }
.reveal-btn { display: block; width: 100%; min-height: 44px; margin: 2px 0 6px; font: 600 .66rem var(--f-mono); letter-spacing: .16em; text-transform: uppercase; text-decoration: underline; text-underline-offset: 3px; color: var(--ink); }
.lever { position: absolute; left: calc(50% + min(150px, 38vw) - 12px); top: 40%; width: 46px; z-index: 2; }
.lever svg { width: 100%; height: auto; overflow: visible; }
.lever .lever-arm { transform-box: view-box; transform-origin: 30px 92px; transition: transform .25s var(--e-press); }
.lever:hover .lever-arm { transform: rotate(12deg); }
.lever.is-pulled .lever-arm { transform: rotate(62deg); }
.s4-secret { position: absolute; left: 2%; top: 92%; width: 46px; height: 44px; z-index: 3; }
.s4-secret span { position: absolute; left: 6px; top: 12px; width: 34px; height: 22px; background: #FDFAF3; border: 1px solid var(--ink-60); transform: rotate(-16deg); box-shadow: 2px 2px 0 rgba(0, 0, 0, .25); background-image: repeating-linear-gradient(transparent 0 5px, rgba(39, 60, 74, .35) 5px 6px); background-size: 70% 100%; background-repeat: no-repeat; background-position: 4px 3px; }
.s4-secret:hover span { transform: rotate(-8deg) translateY(-3px); }
.s4-spike { width: min(420px, 100%); padding: 14px 16px; border: 1px dashed rgba(245, 235, 221, .35); background: rgba(245, 235, 221, .04); }
.spike__pin { display: none; }
.spike__title { display: flex; justify-content: space-between; font: 600 .62rem var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--ochre); }
.spike__list { display: grid; gap: 8px; margin-top: 10px; }
.spike__list:empty::after { content: '—'; font: 500 .8rem var(--f-mono); opacity: .5; }
.spike__list li { padding: 8px 10px; background: #FDFAF3; color: var(--ink); font: 500 .7rem/1.45 var(--f-mono); box-shadow: 2px 2px 0 rgba(0, 0, 0, .35); }
.spike__list li:nth-child(odd) { transform: rotate(-.8deg); } .spike__list li:nth-child(even) { transform: rotate(.8deg); }
.spike__list li span { color: var(--terracotta-deep); font-weight: 600; }
.s4-layout.is-complete .printer { margin-bottom: 30px; }
.s4-layout.is-complete .receipt-feed { display: none; }
.s4-final { position: relative; display: flex; justify-content: center; padding: 18px 16px 0; scroll-margin-top: calc(var(--top) + 10px); }
.s4-final__sheet { width: min(560px, 100%); padding: 22px 20px; color: var(--ink); }
.forecast { display: grid; gap: 10px; margin: 6px 0 16px; }
.forecast li { display: grid; grid-template-columns: 4.2em 1fr; gap: 8px; align-items: baseline; padding-bottom: 10px; border-bottom: 1px dashed var(--ink-20); }
.forecast span { font: 600 .64rem var(--f-mono); letter-spacing: .1em; color: var(--terracotta); }
.forecast p { font: italic 500 1.05rem/1.4 var(--f-display); }
.disclaimer { padding: 10px 12px; border-left: 4px solid var(--terracotta); background: rgba(231, 187, 104, .18); font: 500 .8rem/1.5 var(--f-mono); }
.ink-choice { margin-top: 18px; }
.ink-choice legend { font: 600 .98rem/1.4 var(--f-body); margin-bottom: 10px; }
.ink-choice__opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ink { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 12px; border: 1.5px solid var(--ink-20); background: rgba(255, 255, 255, .5); font: 600 .72rem var(--f-mono); letter-spacing: .12em; text-transform: uppercase; transition: border-color var(--t-micro), box-shadow var(--t-micro); }
.ink__blot { width: 28px; height: 26px; flex: none; background-color: var(--swatch); border-radius: 52% 46% 55% 44% / 48% 56% 44% 52%; box-shadow: inset -3px -3px 0 rgba(0, 0, 0, .15); }
.ink[aria-checked='true'] { border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); background: var(--paper-hi); }
.ink-choice__ok { min-height: 1.4em; margin-top: 8px; font: italic 400 .92rem var(--f-display); color: var(--sage-deep); }
.s4-actions { position: sticky; bottom: 0; z-index: 6; display: flex; justify-content: center; padding: 18px 16px calc(16px + var(--safe-b)); margin-top: 10px; background: linear-gradient(transparent, rgba(20, 32, 40, .92) 45%); }

/* ======================================================================
   05 · THE RECOGNITION DEPARTMENT (hall of records)
   ====================================================================== */
.s5 {
  position: absolute; inset: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain;
  background-color: #E7D7BB;
  background-image: radial-gradient(ellipse at 50% -10%, rgba(255, 248, 230, .9), transparent 60%), repeating-linear-gradient(90deg, rgba(120, 80, 40, .05) 0 1px, transparent 1px 120px), var(--noise);
  --cert-ink: var(--terracotta);
}
.s5-wall { position: absolute; inset: 0; pointer-events: none; }
.s5-rail { left: 0; right: 0; bottom: 0; height: 22%; background: #7A4E36 var(--noise); border-top: 8px solid var(--ochre-deep); box-shadow: 0 -2px 0 var(--ink), inset 0 2px 0 var(--ink); position: fixed; }
.s5-layout { position: relative; display: flex; flex-direction: column; align-items: center; gap: 22px; padding: 6px 14px 0; }
.s5-cert-wrap { position: relative; width: min(880px, 100%); padding-top: 10px; }
.certificate { position: relative; width: 100%; aspect-ratio: .7; container-type: inline-size; color: var(--ink); }
.cert__border { position: absolute; inset: 0; pointer-events: none; }
.cert__border svg { width: 100%; height: 100%; }
.cert__inner { position: absolute; inset: 0; padding: 12cqw 12cqw 13cqw; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 1.6cqw; }
.cert__kicker { font: 600 2.4cqw/1.4 var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft); max-width: 90%; }
.cert__pre { font: italic 400 4.2cqw var(--f-display); color: var(--ink-soft); margin-top: 1cqw; }
.cert__title { font: 800 7.6cqw/1.02 var(--f-display); letter-spacing: -.02em; max-width: 96%; }
.cert__presented { margin-top: 1.4cqw; font: 600 2.5cqw var(--f-mono); letter-spacing: .3em; text-transform: uppercase; color: var(--cert-ink); }
.cert__name { font: italic 600 16cqw/1 var(--f-display); letter-spacing: -.02em; padding: 0 6cqw .6cqw; border-bottom: .5cqw solid var(--cert-ink); box-shadow: 0 1cqw 0 -.6cqw var(--ink); }
.cert__citation { margin-top: 1.2cqw; font: italic 400 3.5cqw/1.45 var(--f-display); color: var(--ink-soft); max-width: 92%; }
.cert__meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2cqw; width: 100%; margin-top: 1.8cqw; padding: 1.6cqw 0; border-top: 1px solid var(--ink-60); border-bottom: 1px solid var(--ink-60); }
.cert__meta dt { font: 600 1.9cqw var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--cert-ink); }
.cert__meta dd { font: 600 2.6cqw/1.3 var(--f-body); }
.cert__status { position: relative; }
.status__pending { display: block; text-decoration: none; }
.status__approved { display: none; color: var(--cert-ink); font-family: var(--f-display); font-style: italic; }
.certificate.is-approved .status__pending { text-decoration: line-through; text-decoration-thickness: 2px; opacity: .5; font-size: .85em; }
.certificate.is-approved .status__approved { display: block; animation: ink-in .5s ease-out both; }
.cert__sigs { display: grid; grid-template-columns: 1fr 1fr; gap: 16cqw; width: 100%; margin-top: 2cqw; }
.sig { display: flex; flex-direction: column; align-items: center; gap: .6cqw; }
.sig__hand { font: italic 500 4.2cqw var(--f-display); transform: rotate(-3deg); color: #2F4A6A; }
.sig__line { width: 100%; border-top: 1.5px solid var(--ink); }
.sig__role { font: 500 1.7cqw/1.3 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); }
.cert__ribbon { position: absolute; left: 50%; bottom: 7cqw; width: 11cqw; translate: -50% 0; }
.cert__ribbon svg { width: 100%; height: auto; }
.cert__impression { position: absolute; right: 6cqw; bottom: 25cqw; width: 26cqw; transform: rotate(-12deg); mix-blend-mode: multiply; opacity: 0; visibility: hidden; }
.certificate.is-approved .cert__impression { opacity: .92; visibility: visible; }
.cert__serial { position: absolute; right: 13cqw; bottom: 5.2cqw; text-align: right; font: 500 1.5cqw var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft); }
.cert__stamp-slot { position: absolute; left: 7cqw; top: 7cqw; }
.cert__stamp-slot .hidden-stamp { width: 30px; height: 30px; }
.stamp-rig { position: absolute; right: -2%; top: -4%; width: clamp(74px, 20%, 150px); z-index: 6; filter: drop-shadow(6px 10px 0 rgba(39, 60, 74, .25)); pointer-events: none; }
.stamp-rig svg { width: 100%; height: auto; }
.s5-awards { width: min(880px, 100%); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.s5-awards__title { font: 600 .62rem var(--f-mono); letter-spacing: .2em; text-transform: uppercase; color: var(--ink-soft); }
.s5-awards__list { display: flex; justify-content: center; gap: 16px; }
.award-btn { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 82px; padding: 4px; font: 600 .58rem/1.3 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; transition: transform var(--t-impact) var(--e-settle); }
.award-btn svg { width: 56px; height: auto; filter: drop-shadow(2px 3px 0 rgba(39, 60, 74, .25)); }
.award-btn:hover { transform: translateY(-3px) rotate(-3deg); }
.s5-pigeon { position: fixed; left: 4px; bottom: calc(2px + var(--safe-b)); z-index: 8; width: 68px; pointer-events: none; }
.slip--s5 { left: 6px; bottom: calc(100% + 4px); }
.s5-actions { position: sticky; bottom: 0; z-index: 7; display: flex; justify-content: center; margin-top: 18px; padding: 18px 16px calc(16px + var(--safe-b)); background: linear-gradient(transparent, rgba(122, 78, 54, .0) 10%, rgba(122, 78, 54, .9) 70%); }

/* ======================================================================
   06 · THE CINEMATIC CELEBRATION CHAMBER
   ====================================================================== */
.s6 {
  --glow: .15; --bend: 0deg; --wish: 0;
  position: absolute; inset: 0; overflow: hidden; color: var(--paper);
  display: flex; flex-direction: column; align-items: center;
  padding: calc(var(--top) + 8px) 16px calc(10px + var(--safe-b));
  background: radial-gradient(ellipse 120% 80% at 50% 78%, #3B2A20 0%, #22191A 42%, #11171C 100%);
}
.s6-room { position: absolute; inset: 0; pointer-events: none; }
.s6-glow { position: absolute; inset: 0; opacity: var(--glow); background: radial-gradient(circle at 50% 50%, rgba(255, 200, 120, .62), rgba(255, 170, 80, .22) 28%, rgba(255, 150, 60, .06) 52%, transparent 70%); }
.s6-room::after { content: ''; position: absolute; inset: 0; opacity: 0; transition: opacity 1.6s ease; background: radial-gradient(ellipse at 50% 40%, rgba(231, 187, 104, .38), rgba(216, 107, 69, .14) 45%, transparent 75%); }
.s6.is-celebrating .s6-room::after { opacity: 1; }
.s6-vignette { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 55%, transparent 40%, rgba(5, 8, 10, .55) 100%); opacity: calc(1 - var(--wish) * .6); }
.s6-stamp-slot { position: absolute; left: 10px; bottom: calc(10px + var(--safe-b)); z-index: 4; }
.s6-top { position: relative; z-index: 5; min-height: 64px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.s6-line { max-width: 28ch; font: italic 400 clamp(1.1rem, 4.6vw, 1.5rem)/1.35 var(--f-display); color: rgba(251, 246, 238, .92); outline: none; }
.s6-reveal { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.reveal__kicker { font: 600 .62rem var(--f-mono); letter-spacing: .22em; text-transform: uppercase; color: var(--ochre); }
.reveal__headline { font: 800 clamp(2.5rem, 12vw, 6.2rem)/.92 var(--f-display); letter-spacing: -.03em; color: var(--paper-hi); text-shadow: 0 3px 0 var(--terracotta-deep), 0 0 46px rgba(231, 187, 104, .5); perspective: 600px; }
.reveal__headline .word { display: inline-block; white-space: nowrap; }
.reveal__headline .char { display: inline-block; will-change: transform; }
.reveal__sub { max-width: 34ch; font: italic 400 clamp(.95rem, 3.6vw, 1.15rem)/1.4 var(--f-display); color: rgba(251, 246, 238, .82); }

.popup { position: relative; z-index: 3; flex: 1 1 auto; width: min(720px, 100%); min-height: 260px; perspective: 1000px; perspective-origin: 50% 0%; }
.popup__world { position: absolute; inset: 0; transform-style: preserve-3d; }
.popup__page {
  position: absolute; left: 2%; right: 2%; bottom: 4%; height: 46%;
  transform-origin: 50% 100%; transform: rotateX(80deg);
  background: linear-gradient(90deg, #E9DCC4 0 49.3%, #B9A88C 49.3% 50.7%, #E9DCC4 50.7%), var(--noise);
  border: 2px solid var(--ink); box-shadow: 0 0 60px rgba(255, 190, 110, .25);
}
.pl { position: absolute; left: 50%; bottom: 6%; transform-origin: 50% 100%; transform-style: preserve-3d; translate: none; }
.pl svg { width: 100%; height: auto; display: block; overflow: visible; }
.pl--sunburst { width: 98%; }
.pl--bunting { width: 96%; height: 86%; }
.pl--bunting svg { position: absolute; top: 0; left: 0; }
.pl--bunting::before, .pl--bunting::after { content: ''; position: absolute; top: 4%; bottom: 0; width: 10px; background: var(--paper-hi); border: 2px solid var(--ink); }
.pl--bunting::before { left: 0; } .pl--bunting::after { right: 0; }
.pl--cake { width: min(330px, 60%, 29vh); }
.pl--frill { width: 104%; bottom: 3%; }
.pl--frill svg { height: 44px; width: 100%; }
.cake { position: relative; display: flex; flex-direction: column; align-items: center; transform-style: preserve-3d; }
.tier { position: relative; transform-origin: 50% 100%; }
.tier svg { width: 100%; height: auto; overflow: visible; }
.tier--top { width: 52%; z-index: 3; }
.tier--middle { width: 72%; margin-top: -3.5%; z-index: 2; }
.tier--bottom { width: 92%; margin-top: -3.5%; z-index: 1; }
.tier--stand { width: 104%; margin-top: -2.5%; }
.candles { position: absolute; left: 8%; right: 8%; bottom: 82%; height: 92%; display: flex; justify-content: space-around; align-items: flex-end; z-index: 4; }
.candle { position: relative; width: 13%; height: 100%; min-width: 14px; }
.candle::before { content: ''; position: absolute; inset: -14px -16px -6px; } /* generous touch target */
.candle:disabled { cursor: default; }
.candle__stick { position: absolute; left: 0; right: 0; bottom: 0; height: 74%; border: 1.5px solid var(--ink); border-radius: 2px 2px 0 0; background: repeating-linear-gradient(-35deg, var(--paper-hi) 0 5px, var(--terracotta) 5px 9px); }
.c1 .candle__stick { background: repeating-linear-gradient(-35deg, var(--paper-hi) 0 5px, var(--sage) 5px 9px); height: 80%; }
.c2 .candle__stick { background: repeating-linear-gradient(-35deg, var(--paper-hi) 0 5px, var(--ochre-deep) 5px 9px); height: 70%; }
.wick { position: absolute; left: 50%; bottom: 74%; width: 2px; height: 8px; translate: -50% 0; background: var(--ink); border-radius: 1px; }
.c1 .wick { bottom: 80%; } .c2 .wick { bottom: 70%; }
.flame { position: absolute; left: 50%; bottom: calc(74% + 4px); width: 22px; height: 36px; margin-left: -11px; transform-origin: 50% 100%; transform: scale(0) rotate(var(--bend)); transition: transform .35s var(--e-settle); pointer-events: none; }
.c1 .flame { bottom: calc(80% + 4px); } .c2 .flame { bottom: calc(70% + 4px); }
.candle.is-lit .flame { transform: scale(1) rotate(var(--bend)); }
.candle.is-out .flame { transform: scale(0) rotate(var(--bend)); transition-duration: .2s; }
.flame i { position: absolute; inset: 0; border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%; background: radial-gradient(ellipse at 50% 78%, #FFF7D6 0 18%, #FFD27A 34%, #F39A4A 62%, rgba(216, 107, 69, 0) 74%); animation: flicker 1.6s ease-in-out infinite; transform-origin: 50% 100%; }
.flame b { position: absolute; left: 50%; top: 50%; width: 140px; height: 140px; translate: -50% -50%; border-radius: 50%; background: radial-gradient(circle, rgba(255, 205, 120, calc(.35 + var(--wish) * .35)), transparent 65%); pointer-events: none; }
.smoke { position: absolute; left: 50%; bottom: 74%; width: 30px; height: 90px; margin-left: -15px; overflow: visible; opacity: 0; pointer-events: none; }
.smoke path { fill: none; stroke: rgba(245, 235, 221, .6); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.candle.is-out .smoke { animation: smoke-rise 2.6s ease-out forwards; }
.candle.is-out .smoke path { animation: smoke-draw 2.6s ease-out forwards; }
.c1 .smoke { animation-delay: .12s; } .c2 .smoke { animation-delay: .24s; }

.s6-bottom { position: relative; z-index: 6; width: 100%; display: flex; flex-direction: column; align-items: center; min-height: 150px; justify-content: flex-end; }
.s6-tools { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; }
.matchbox { position: relative; width: min(230px, 58vw); }
.matchbox svg { width: 100%; height: auto; }
.match { position: absolute; left: calc(100% + 14px); bottom: 2px; width: 26px; touch-action: none; cursor: grab; z-index: 5; }
.match::before { content: ''; position: absolute; inset: -12px -14px; }
.match.is-dragging { cursor: grabbing; }
.match svg { width: 100%; height: auto; overflow: visible; filter: drop-shadow(2px 4px 0 rgba(0, 0, 0, .35)); }
.match__flame { bottom: auto; top: -30px; margin-left: -11px; transform: scale(0); }
.match.is-lit .match__flame { transform: scale(1) rotate(calc(var(--bend) * .5)); }
.match.is-lit .match-head { fill: #3B2A22; }
.match__anchor { position: absolute; left: 50%; top: 10px; width: 4px; height: 4px; margin-left: -2px; }
.s6-hint { max-width: 32ch; min-height: 2.6em; text-align: center; font: 500 .7rem/1.45 var(--f-mono); letter-spacing: .06em; color: rgba(245, 235, 221, .78); }
.s6-tools__btns { display: flex; gap: 10px; }
.s6-wish { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.s6-wish__prompt { display: none; }
.hold { position: relative; width: 116px; height: 116px; border-radius: 50%; display: grid; place-items: center; color: var(--paper); background: radial-gradient(circle, rgba(231, 187, 104, calc(.1 + var(--wish) * .35)), rgba(245, 235, 221, .04) 70%); border: 1.5px solid rgba(245, 235, 221, .55); touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; transition: transform .2s var(--e-press); }
.hold.is-holding { transform: scale(.95); }
.hold__ring { position: absolute; inset: -6px; width: calc(100% + 12px); height: calc(100% + 12px); transform: rotate(-90deg); }
.hold__track { fill: none; stroke: rgba(245, 235, 221, .18); stroke-width: 3; }
.hold__prog { fill: none; stroke: var(--ochre); stroke-width: 4.5; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.hold__label { max-width: 82px; text-align: center; font: 600 .62rem/1.35 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; pointer-events: none; }
.s6-wish .linkish { color: rgba(245, 235, 221, .7); }
.s6-actions { padding-bottom: 6px; }
.s6-pigeon { position: absolute; left: 1%; bottom: 30%; z-index: 7; width: clamp(84px, 20vw, 190px); opacity: 0; pointer-events: none; filter: drop-shadow(0 0 24px rgba(231, 187, 104, .35)); }

/* ======================================================================
   07 · THE FINAL CONFIDENTIAL DOCUMENT (quiet, lamp-lit)
   ====================================================================== */
.s7 { position: absolute; inset: 0; overflow: hidden; background: radial-gradient(ellipse 90% 75% at 50% 32%, #F3E6CF 0%, #E3CFAD 38%, #9B8162 78%, #5A4837 100%); }
.s7-room { position: absolute; inset: 0; pointer-events: none; }
.s7-confetti i { position: absolute; left: var(--x); top: var(--y); width: 11px; height: 6px; background: var(--c); rotate: var(--r); opacity: .85; box-shadow: 1px 1px 0 rgba(0, 0, 0, .12); }
.s7-confetti i:nth-child(3n) { width: 4px; height: 14px; }
.s7-stage { position: absolute; inset: 0; z-index: 2; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; align-items: center; gap: 22px; padding: calc(var(--top) + 72px) 16px calc(56px + var(--safe-b)); }
.sleeve-wrap { display: flex; flex-direction: column; align-items: center; gap: 22px; margin: auto 0; }
.sleeve { position: relative; width: min(380px, 84vw); aspect-ratio: .8; margin-top: 30px; }
.sleeve__letter { position: absolute; left: 7%; right: 7%; top: -6%; height: 70%; background-image: repeating-linear-gradient(transparent 0 14px, rgba(39, 60, 74, .1) 14px 15px), var(--noise); background-position: 0 22px, 0 0; }
.sleeve__front {
  position: absolute; left: 0; right: 0; bottom: 0; top: 10%; z-index: 2;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  background-color: var(--kraft); background-image: var(--fibres), var(--noise);
  border-radius: 3px; box-shadow: 0 24px 40px -18px rgba(40, 25, 10, .7), inset 0 0 0 1.5px rgba(39, 60, 74, .3);
  clip-path: polygon(0 4%, 38% 4%, 42% 0, 58% 0, 62% 4%, 100% 4%, 100% 100%, 0 100%);
}
.sleeve__label { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 76%; padding: 18px 14px; text-align: center; background: var(--paper-hi) var(--noise); border: 1.5px solid var(--ink); box-shadow: 3px 3px 0 rgba(39, 60, 74, .3); transform: rotate(-1.5deg); }
.sleeve__kicker { font: 600 .56rem var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft); }
.sleeve__label b { font: 800 clamp(1.4rem, 6vw, 1.8rem)/1.05 var(--f-display); }
.sleeve__sub { padding: 2px 10px; background: var(--terracotta); color: var(--paper-hi); font: 600 .66rem var(--f-mono); letter-spacing: .3em; text-transform: uppercase; }
.sleeve__string { display: flex; flex-direction: column; align-items: center; }
.sleeve__string span { width: 22px; height: 22px; border-radius: 50%; background: var(--ochre); border: 1.5px solid var(--ink); box-shadow: 0 30px 0 -4px var(--ochre), 0 30px 0 -2.5px var(--ink); position: relative; }
.sleeve__string span::after { content: ''; position: absolute; left: 50%; top: 50%; width: 46px; height: 32px; border: 1.5px solid #6B4E3A; border-radius: 50% 50% 40% 40%; translate: -50% -10%; rotate: -12deg; }
.sleeve__closed { position: absolute; left: 50%; top: 50%; width: 88%; translate: -50% -50%; mix-blend-mode: multiply; pointer-events: none; }
.sleeve__stamp-slot { position: absolute; right: 8px; bottom: 8px; }
.sleeve__stamp-slot .hidden-stamp { width: 34px; height: 34px; }
.final-letter { width: min(560px, 100%); }
.final-letter .fold-panel { padding: 20px 24px; }
.final-letter .fp-1 { padding-top: 24px; }
.final-letter .fp-3 { padding-bottom: 120px; }
.letterhead--quiet { border-bottom-color: var(--ink-60); }
.final-letter .letter__salutation { font-size: 1.5rem; margin-bottom: 10px; }
.final-letter .letter__p { font-size: 1.06rem; line-height: 1.68; }
.letter__p--lead { font: italic 600 1.45rem/1.3 var(--f-display) !important; color: var(--terracotta-deep); }
.letter__signature--hand { margin-top: 4px; font: italic 600 2rem/1.2 var(--f-display); color: #2F4A6A; transform: rotate(-2.5deg); transform-origin: left; display: inline-block; }
.final-stamp { position: absolute; right: 14px; bottom: 18px; width: min(54%, 250px); mix-blend-mode: multiply; opacity: 0; pointer-events: none; }
.evidence { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }
.evidence__print { width: 150px; padding: 8px 8px 12px; background: #fff; box-shadow: var(--shadow-paper); transform: rotate(var(--r)); }
.evidence__print img { width: 100%; aspect-ratio: 1; object-fit: cover; filter: sepia(.15) contrast(1.05); }
.evidence__print figcaption { margin-top: 6px; text-align: center; font: 500 .6rem var(--f-mono); letter-spacing: .12em; text-transform: uppercase; }
.s7-actions { display: flex; flex-direction: column; gap: 12px; width: min(560px, 100%); }
.s7-actions__row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.s7-actions .btn { width: 100%; }
.s7-actions__row .btn { font-size: .64rem; padding-left: .7em; padding-right: .7em; }
.s7-closed { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.s7-closed__title { font: 800 2.2rem/1 var(--f-display); }
.s7-closed__line { font: italic 400 1.1rem var(--f-display); color: var(--ink-soft); }
.s7-closed__btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 10px; }
.s7-cord { position: absolute; top: var(--top); right: 10px; z-index: 4; width: 44px; height: 64px; display: flex; flex-direction: column; align-items: center; transition: transform .2s var(--e-press); }
.cord__line { width: 2px; height: 38px; background: linear-gradient(#6B4E3A, #3B2A22); }
.cord__knob { width: 14px; height: 20px; border-radius: 40% 40% 50% 50%; background: var(--ochre); border: 1.5px solid var(--ink); }
.s7-cord:hover { transform: translateY(4px); }
.s7-cord.is-pulled { transform: translateY(18px); transition-duration: .12s; }
.colophon-mark { position: absolute; right: 10px; bottom: calc(6px + var(--safe-b)); z-index: 4; min-height: 44px; padding: 0 8px; font: 500 .6rem var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: rgba(39, 60, 74, .7); }
.after-hours { position: fixed; inset: 0; z-index: 35; display: grid; place-items: center; overflow-y: auto; padding: calc(var(--top) + 12px) 16px calc(16px + var(--safe-b)); color: var(--paper); background: radial-gradient(circle at 72% 18%, #2C3E4C, #121B22 65%); }
.after-hours__window { position: absolute; right: 8%; top: calc(var(--top) + 18px); width: 110px; height: 140px; border: 3px solid #3B4F5E; background: linear-gradient(#0C141A, #1B2833); box-shadow: inset 0 0 0 4px #0C141A; }
.after-hours__window::before, .after-hours__window::after { content: ''; position: absolute; background: #3B4F5E; }
.after-hours__window::before { left: 50%; top: 0; bottom: 0; width: 3px; translate: -50% 0; }
.after-hours__window::after { top: 50%; left: 0; right: 0; height: 3px; }
.moon { position: absolute; right: 16px; top: 16px; width: 26px; height: 26px; border-radius: 50%; box-shadow: -7px 4px 0 0 var(--ochre-soft); }
.after-hours__inner { position: relative; display: flex; flex-direction: column; align-items: center; gap: 16px; width: min(420px, 100%); }
.after-hours__title { font: 600 .7rem var(--f-mono); letter-spacing: .3em; text-transform: uppercase; color: var(--ochre); }
.slip--ah { position: relative; opacity: 1; visibility: visible; max-width: 100%; min-height: 76px; width: 100%; }
.slip--ah::after { left: 50%; margin-left: -7px; }
.after-hours__pigeon { width: 170px; }

.final-letter .letter__salutation:focus { outline: none; }
