/* Just Something Simple (public/templates/paid-by-the-hour.html; the film is drawn by hour.js on one canvas).
   The brief's colours: midnight plum #21142F, raspberry pink #FF4F91, buttercream gold #FFD166, warm cream #FFF3DF, mint frosting #62E6C1.
   Lettering from the font library, each for its job: Leckerli One (the bakery's own sign and chalkboard, and the title), Libre Bodoni (the invitation's headline, like
   the lettering on a cake box), Yesteryear (the piped line "Come celebrate with us!"), Gantari (what is said, in the bubbles, the details and the buttons).
   Only transform and opacity ever move; nothing that moves carries a filter. */
:root { --plum: #21142F; --plum-2: #3A2350; --rasp: #FF4F91; --rasp-d: #D93F7E; --gold: #FFD166; --gold-d: #B98A2E; --cream: #FFF3DF; --mint: #62E6C1; --ink: #21142F; --soft: #5A4A66; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #0B0812; color: var(--ink); overflow: hidden; -webkit-tap-highlight-color: transparent; }
body { font-family: Gantari, system-ui, sans-serif; }
#film { position: fixed; inset: 0; display: block; z-index: 1; }
.veil { position: fixed; inset: 0; pointer-events: none; opacity: 0; z-index: 30; background: #07050B; }

/* the scene's number and name, top left, as it begins */
#stamp { position: fixed; left: max(16px, env(safe-area-inset-left)); top: max(16px, env(safe-area-inset-top)); z-index: 40; margin: 0; padding: 6px 12px 7px 7px; border-radius: 999px; background: rgba(33, 20, 47, .7);
  color: var(--cream); opacity: 0; pointer-events: none; display: none; align-items: center; gap: 8px; will-change: opacity; white-space: nowrap; }
.playing #stamp { display: flex; }
#stamp b { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--rasp); color: #FFFFFF; font: 800 13px/1 Gantari, sans-serif; }
#stamp span { font: 700 13px/1.1 Gantari, sans-serif; letter-spacing: .05em; text-transform: uppercase; }

/* a speech bubble at whoever is talking: the baker's in cream, the customer's (heard through the phone) in mint, at the phone */
.bubble { position: fixed; left: 0; top: 0; z-index: 45; max-width: min(300px, 76vw); padding: 10px 14px 11px; border-radius: 16px; background: var(--cream); color: var(--ink); font: 700 clamp(15px, 3.9vw, 19px)/1.3 Gantari, sans-serif;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .35); opacity: 0; pointer-events: none; will-change: transform, opacity; text-wrap: balance; }
.bubble i { position: absolute; left: 0; bottom: -7px; width: 14px; height: 14px; background: inherit; border-radius: 2px; }
.bubble.customer { background: #E4FBF4; box-shadow: 0 6px 18px rgba(0, 0, 0, .35), inset 0 0 0 2px var(--mint); }
.bubble.customer::before { content: 'On the phone'; display: block; margin-bottom: 2px; font: 800 10.5px/1.2 Gantari, sans-serif; letter-spacing: .08em; text-transform: uppercase; color: #1E7E66; }
.nowords .bubble { display: none; }

/* the opening: the cake, the title, the line under it, Play */
#intro { position: fixed; inset: 0; z-index: 60; display: none; place-items: center; padding: 24px 16px; background: radial-gradient(120% 90% at 50% 26%, #3A2350 0%, #21142F 58%, #120A1A 100%); color: var(--cream); text-align: center; overflow-y: auto; }
.intro #intro { display: grid; }
.i-box { width: min(440px, 100%); }
#i-pic { width: min(190px, 46vw); height: auto; display: block; margin: 0 auto 8px; }
.i-for { margin: 0 0 6px; font: 800 13px/1.3 Gantari, sans-serif; letter-spacing: .1em; text-transform: uppercase; color: var(--mint); }
#intro h1 { margin: 0; font: 400 clamp(28px, 8.4vw, 42px)/1.05 'Leckerli One', cursive; color: var(--cream); text-wrap: balance; }
#intro h1 b { display: block; margin-top: 2px; color: var(--gold); font-weight: 400; }
.i-tag { margin: 12px auto 22px; max-width: 340px; font: 500 clamp(15px, 4vw, 17px)/1.45 Gantari, sans-serif; color: #E8D9EE; text-wrap: balance; }
.btn { appearance: none; border: 0; border-radius: 999px; padding: 15px 26px; min-height: 48px; font: 800 17px/1 Gantari, sans-serif; letter-spacing: .02em; cursor: pointer; background: var(--rasp); color: #FFFFFF; }
.btn:hover { background: #FF66A0; }
.btn.ghost { background: transparent; color: inherit; box-shadow: inset 0 0 0 2px currentColor; }
.btn.ghost:hover { background: rgba(33, 20, 47, .05); }
#b-play.wait::after { content: ' ·'; }
.i-quiet { display: block; margin: 12px auto 0; background: none; border: 0; color: #CDBBD6; font: 600 14px/1.2 Gantari, sans-serif; text-decoration: underline; cursor: pointer; padding: 8px; }

/* during the film: Pause, Words, Skip, quiet, low on the left (the speaker is at the top right, from speaker.js) */
#ctl { position: fixed; left: 12px; bottom: max(14px, env(safe-area-inset-bottom)); z-index: 50; display: none; gap: 8px; flex-wrap: wrap; max-width: calc(100vw - 24px); }
.playing #ctl { display: flex; }
.cardon #ctl, .editing #ctl { display: none; }
.pill { appearance: none; border: 0; border-radius: 999px; padding: 9px 14px; min-height: 38px; background: rgba(33, 20, 47, .7); color: var(--cream); font: 700 13px/1 Gantari, sans-serif; cursor: pointer; white-space: nowrap; }
.pill:hover { background: rgba(33, 20, 47, .88); }
#vnote { position: fixed; right: 12px; bottom: max(64px, env(safe-area-inset-bottom)); z-index: 50; margin: 0; padding: 7px 12px; border-radius: 999px; background: rgba(33, 20, 47, .74); color: var(--cream); font: 500 12px/1.2 Gantari, sans-serif; pointer-events: none; }
.cardon #vnote { display: none; }

/* the invitation: it rises out of the top of the cake and opens; then it stays. A cake-box label: warm cream, a raspberry scalloped edge, a gold rule. */
#cardwrap { position: fixed; inset: 0; z-index: 20; display: grid; justify-items: center; align-items: start; padding: 64px 16px 72px; opacity: 0; visibility: hidden; pointer-events: none; overflow: hidden; }
.cardon #cardwrap { opacity: 1; visibility: visible; pointer-events: auto; overflow-y: auto; background: rgba(12, 7, 18, .55); }
#card { position: relative; width: min(440px, 100%); margin: auto 0; will-change: transform; transform-origin: 50% 0; }
#c-in { position: relative; padding: 40px 24px 24px; border-radius: 10px; background: var(--cream); box-shadow: 0 0 0 3px var(--gold), 0 0 0 4px var(--gold-d), 0 22px 50px rgba(0, 0, 0, .5); text-align: center; opacity: 0; }
.cardon #c-in { opacity: 1; }
#c-in::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 16px; border-radius: 10px 10px 0 0; background: radial-gradient(circle at 10px 0, var(--rasp) 9px, transparent 9.5px) 0 0 / 20px 16px repeat-x; }
.cd-kick { display: inline-block; margin: 0 0 10px; padding: 5px 14px; border-radius: 999px; background: var(--plum); color: var(--gold); font: 800 13px/1.2 Gantari, sans-serif; letter-spacing: .14em; }
.cd-for { margin: 0 0 6px; font: 800 13px/1.2 Gantari, sans-serif; letter-spacing: .08em; text-transform: uppercase; color: var(--rasp-d); }
#t-head { margin: 0; font: 700 clamp(30px, 8.6vw, 42px)/1.05 'Libre Bodoni', Georgia, serif; color: var(--plum); text-wrap: balance; }
#t-head #t-name { color: var(--rasp-d); font-style: italic; }
.cd-facts { margin: 18px auto 4px; padding: 14px 12px; max-width: 340px; border-top: 1.5px solid #EBD9BC; border-bottom: 1.5px solid #EBD9BC; }
.cd-facts p { margin: 0; }
.cd-when { font: 800 18px/1.3 Gantari, sans-serif; }
.cd-time { margin-top: 2px !important; font: 600 16px/1.3 Gantari, sans-serif; color: var(--soft); }
.cd-where { margin-top: 10px !important; font: 800 17px/1.3 Gantari, sans-serif; }
.cd-addr { font: 500 15px/1.35 Gantari, sans-serif; color: var(--soft); }
.cd-msg { margin: 14px auto 0; max-width: 340px; font: italic 400 17px/1.45 'Libre Bodoni', Georgia, serif; color: var(--plum); white-space: pre-line; text-wrap: balance; }
.cd-msg:empty { display: none; }
.editing .cd-msg:empty { display: block; min-height: 1.4em; }
.cd-more { margin: 12px auto 0; max-width: 340px; text-align: left; }
.cd-more div { display: grid; grid-template-columns: 7.5em 1fr; gap: 8px; padding: 6px 0; border-bottom: 1px solid #EFE0C8; }
.cd-more dt { font: 800 12px/1.5 Gantari, sans-serif; letter-spacing: .05em; text-transform: uppercase; color: #7A6A84; }
.cd-more dd { margin: 0; font: 500 15px/1.45 Gantari, sans-serif; white-space: pre-line; }
.cd-cta { margin: 18px 0 4px; font: 400 clamp(26px, 7.4vw, 32px)/1.1 Yesteryear, cursive; color: var(--rasp-d); text-wrap: balance; }
.cd-rsvp { margin: 10px auto 0; max-width: 360px; }
.cd-by { margin: 0 0 8px; font: 600 14px/1.4 Gantari, sans-serif; color: var(--soft); }
.ans { display: grid; gap: 8px; margin-top: 6px; }
.ans[hidden] { display: none; }
.ans button, .dir { appearance: none; border: 0; border-radius: 12px; min-height: 52px; padding: 12px 16px; background: #FFFFFF; color: var(--plum); font: 800 16px/1.2 Gantari, sans-serif; letter-spacing: .04em; cursor: pointer; box-shadow: inset 0 0 0 2px var(--plum); width: 100%; }
.ans button.yes { background: var(--rasp); color: #FFFFFF; box-shadow: 0 4px 0 var(--rasp-d); }
.ans button.yes:hover { background: #FF66A0; }
.ans button[hidden] { display: none; }
.dir { margin-top: 8px; background: var(--plum); color: var(--gold); box-shadow: none; }
.dir[hidden] { display: none; }
#done p { margin: 6px 0; }
#done-t { font: 800 18px/1.3 Gantari, sans-serif; outline: none; }
#done-p { font: 500 15px/1.45 Gantari, sans-serif; color: var(--soft); }
#r-closed { font: 600 15px/1.45 Gantari, sans-serif; color: var(--soft); }
.cd-acts { display: flex; justify-content: center; flex-wrap: wrap; gap: 0 18px; margin: 12px 0 0; }
.linkish { appearance: none; background: none; border: 0; padding: 8px 4px; min-height: 40px; color: var(--rasp-d); font: 700 15px/1.2 Gantari, sans-serif; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.linkish[hidden] { display: none; }
.cd-tag { margin: 14px 0 0; font: italic 400 14px/1.4 'Libre Bodoni', Georgia, serif; color: #7A6A84; text-wrap: balance; }

/* the reply and the food, in sheets over the invitation */
.sheet { position: fixed; inset: 0; z-index: 80; display: grid; align-items: end; justify-items: center; background: rgba(12, 7, 18, .6); overflow-y: auto; }
.sheet[hidden] { display: none; }
.sh-in { width: min(480px, 100%); max-height: 92vh; overflow-y: auto; padding: 22px 20px calc(20px + env(safe-area-inset-bottom)); border-radius: 18px 18px 0 0; background: var(--cream); color: var(--ink); box-shadow: 0 -10px 40px rgba(0, 0, 0, .35); }
@media (min-width: 700px) { .sheet { align-items: center; } .sh-in { border-radius: 14px; } }
.sh-in h3 { margin: 0 0 12px; font: 700 26px/1.1 'Libre Bodoni', Georgia, serif; color: var(--plum); }
.choice { display: grid; gap: 8px; margin: 0 0 14px; padding: 0; border: 0; }
.choice legend { margin: 0 0 6px; padding: 0; font: 700 14px/1.3 Gantari, sans-serif; color: var(--soft); }
.choice.row { grid-template-columns: 1fr 1fr; }
.choice label { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 10px 14px; border-radius: 10px; background: #FBE6D2; font: 700 16px/1.2 Gantari, sans-serif; cursor: pointer; }
.choice label[hidden] { display: none; }
.choice input { width: 20px; height: 20px; accent-color: var(--rasp-d); }
.f { display: grid; gap: 6px; margin: 0 0 14px; font: 700 14px/1.3 Gantari, sans-serif; color: var(--soft); }
.f[hidden] { display: none; }
.f input, .f textarea { width: 100%; min-height: 48px; padding: 12px 14px; border: 1.5px solid #E2CDB0; border-radius: 10px; background: #FFFFFF; color: var(--ink); font: 500 16px/1.3 Gantari, sans-serif; }
.f textarea { min-height: 76px; resize: vertical; }
.step { display: flex; align-items: center; gap: 12px; }
.step button { width: 48px; height: 48px; border-radius: 50%; border: 0; background: #FBE6D2; font: 800 22px/1 Gantari, sans-serif; cursor: pointer; color: var(--ink); }
.step output { min-width: 2ch; text-align: center; font: 800 20px/1 Gantari, sans-serif; }
#dish-q[hidden], #dish-what[hidden] { display: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.chip { appearance: none; border: 0; border-radius: 999px; min-height: 42px; padding: 10px 14px; background: #FFFFFF; color: var(--plum); font: 700 14.5px/1.1 Gantari, sans-serif; cursor: pointer; box-shadow: inset 0 0 0 1.5px #E2CDB0; }
.chip[aria-pressed="true"] { background: var(--plum); color: var(--gold); box-shadow: none; }
.chip:disabled { opacity: .45; cursor: default; }
#dish-left { margin: -6px 0 14px; font: 500 13.5px/1.4 Gantari, sans-serif; color: var(--soft); }
#err { min-height: 1.2em; margin: 0 0 10px; font: 600 14px/1.4 Gantari, sans-serif; color: var(--soft); }
#err.err { color: #C0245E; }
.sh-acts { display: flex; flex-wrap: wrap; gap: 10px; }
.sh-acts .btn { flex: 1 1 auto; }
.sh-acts .btn.ghost { color: var(--ink); }
#ok { text-align: center; padding: 8px 0 4px; }
#ok[hidden] { display: none; }
#ok-t { margin: 0 0 8px; font: 700 clamp(26px, 7.6vw, 32px)/1.1 'Libre Bodoni', Georgia, serif; color: var(--rasp-d); outline: none; }
#ok-p { margin: 0 auto 8px; max-width: 320px; font: 600 17px/1.45 Gantari, sans-serif; color: var(--plum); text-wrap: balance; }
#ok-d { margin: 0 0 16px; font: 500 14.5px/1.45 Gantari, sans-serif; color: var(--soft); }
#ok-d:empty { display: none; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* the host's guided editor: the invitation at rest, nothing playing behind it */
.editing #intro { display: none !important; }
/* less motion: the stills change with a fade, nothing slides */
.rm .bubble, .rm #stamp { transition: opacity .3s; }
@media (max-width: 420px) { #c-in { padding: 36px 18px 22px; } }
