/* ==========================================================================
   enter.css: the steps a child and a grown-up go through to enter a story (enter.html).
   Phone is the drawn layout (390). Tablet and desktop keep it as a centred 560px column;
   the "write your story" step has its own desktop layout (Comp-2-type, 1440).
   Breakpoints: desktop 1100+, tablet 761-1099, phone 760 and narrower.
   ========================================================================== */

.enter {
  --red: #ec1c24;
  --blue: #0284ca;
  --blue-deep: #01639a;
  --err: #b3121a;
  --green: #2e9e5b;
  --green-soft: #e4f6ea;
  --sq: 40px;
  --focus: var(--blue-deep);
  position: relative;
  display: flex; flex-direction: column;
  min-height: 100vh; min-height: 100svh;
  background: var(--cream);
  color: var(--ink);
  font: 700 var(--body-max)/1.6 var(--font-body);
  overflow-x: clip;
}
.enter [hidden] { display: none !important; }
.enter .ico { fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.enter .nw { white-space: nowrap; }
.enter img.stk { max-width: none; }
.enter__sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

body.enter-page { background: var(--cream); }
.enter.sheet { padding-bottom: 0; }

/* The flow is a focused task: the site bar and phone dock step aside. Close takes you back. */
.enter-page .bar, .enter-page .dock { display: none; }
html:has(.signin[open]) { overflow: hidden; }

.enter .btn { font-size: 16px; --btn-shadow: 5px; }
.enter .btn--outline { background: transparent; border-color: var(--ink); box-shadow: none; }
.enter .btn--outline:active { translate: 0 2px; }
.enter .big { flex: 1 1 0; min-width: 0; height: 60px; padding: 0 12px; }
.enter .btn--sm2 { height: 44px; padding: 0 16px 0 12px; gap: 8px; font-size: 15px; border-width: 2px; --btn-shadow: 3px; }
.enter .linkbtn { min-height: 44px; padding: 0 12px; border: 0; background: none; color: var(--muted); font: 700 14px/1 var(--font-display); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; cursor: pointer; }

/* ---------- Header: logo, steps, close ---------- */
.enter__top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "logo close" "steps steps";
  align-items: center;
  padding: 12px 16px 0;
}
.enter__logo { grid-area: logo; display: block; width: 71px; height: 64px; line-height: 0; display: flex; align-items: center; }
.enter__logo img { width: 71px; height: 40px; object-fit: contain; }
.enter__close {
  grid-area: close; display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--paper); border: 2px solid var(--ink); box-shadow: 0 3px 0 var(--ink); color: var(--ink);
  text-decoration: none; transition: translate .15s ease;
}
.enter__close:hover { translate: 0 -2px; }
.steps { grid-area: steps; list-style: none; margin: 10px 0 16px; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.steps__item { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; }
.steps__item + .steps__item::before {
  content: ""; position: absolute; left: -50%; width: 100%; top: 18px; height: 0;
  border-top: 3px dashed rgba(16, 36, 74, .3);
}
.steps__dot {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--paper); border: 2.5px solid rgba(16, 36, 74, .35); color: var(--muted);
  font: 800 20px/1 var(--font-display);
}
.steps__dot b { font-weight: 800; }
.steps__dot .ico { display: none; stroke-width: 3.4; }
.steps__label {
  display: block; margin-top: 8px; max-width: 96px;
  font: 800 13px/1.15 var(--font-label); letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
}
.steps__item[data-step="2"] .steps__label { max-width: 112px; }
.steps__item.is-current .steps__label { color: var(--ink); }
.steps__item.is-current .steps__dot { border-color: var(--ink); color: #fff; }
.steps__item[data-step="1"].is-current .steps__dot { background: var(--red); box-shadow: 0 0 0 4px rgba(236, 28, 36, .28); }
.steps__item[data-step="2"].is-current .steps__dot { background: var(--blue); box-shadow: 0 0 0 4px rgba(2, 132, 202, .28); }
.steps__item[data-step="3"].is-current .steps__dot { background: var(--gold); box-shadow: 0 0 0 4px rgba(246, 163, 19, .35); color: var(--ink); }
.steps__item.is-done .steps__dot { border-color: var(--ink); color: #fff; }
.steps__item.is-done .steps__dot b { display: none; }
.steps__item.is-done .steps__dot .ico { display: block; }
.steps__item[data-step="1"].is-done .steps__dot { background: var(--red); }
.steps__item[data-step="2"].is-done .steps__dot { background: var(--blue); }

/* ---------- Stage and panes ---------- */
.enter__stage { flex: 1; display: flex; flex-direction: column; }
.pane { flex: 1; display: flex; flex-direction: column; }
.col { width: min(100% - 32px, 560px); margin-inline: auto; padding-bottom: 28px; flex: 1; display: flex; flex-direction: column; }
.pane__title { margin: 0; font: 800 40px/.95 var(--font-display); letter-spacing: -.02em; }
.pane__title:focus { outline: none; }
.pane__title span { display: block; white-space: nowrap; }
.hint { margin: 16px 0 0; font: 700 var(--body-max)/1.6 var(--font-body); color: var(--muted); }
.hint--center { text-align: center; }
.err { margin: 8px 0 0; font: 800 var(--body-max)/1.4 var(--font-body); color: var(--err); }
.note-s { margin: 8px 0 0; font: 700 var(--body-max)/1.5 var(--font-body); color: var(--muted); }
.typing-status:empty { margin: 0; }
/* Waiting for the grown-up to press Confirm in the email (sign-in pop-up and the grown-up step). */
.wait { margin: 12px 0 0; padding: 12px 14px; border-radius: 14px; background: var(--green-soft); border: 2px solid var(--green); }
.wait--signin { margin-top: 18px; }
.wait__text { margin: 0; font: 700 var(--body-max)/1.5 var(--font-body); color: var(--ink); overflow-wrap: anywhere; }
.wait__status { margin: 6px 0 0; font: 800 var(--body-max)/1.4 var(--font-body); color: var(--muted); }
.wait__status:empty { display: none; }
.wait__row { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px -12px -6px; }
.submit:disabled, .signin__go:disabled { opacity: .6; cursor: progress; }
.card__notice { margin: 0 0 18px; }

/* ---------- Choose ---------- */
.pane__title--choose { font-size: 36px; line-height: 1; padding-top: 6px; }
.way {
  position: relative; display: block; margin-top: 26px;
  border-radius: 28px; border: 2.5px solid var(--ink); background: var(--paper); box-shadow: 0 7px 0 var(--ink);
  color: var(--ink); text-decoration: none; transition: translate .2s ease;
}
.pane__title--choose + .way { margin-top: 26px; }
.way:hover { translate: 0 -6px; }
.way__head { position: relative; display: block; height: 132px; border-radius: 25px 25px 0 0; padding: 18px 18px 0; }
.way--type .way__head { background: var(--red); }
.way--say .way__head { background: var(--blue); }
.way__name { display: block; max-width: 150px; font: 800 42px/.95 var(--font-display); letter-spacing: -.02em; color: #fff; }
.way__spark { position: absolute; fill: #fff; stroke: none; }
.way__spark--a { left: 150px; top: 18px; opacity: .7; }
.way__spark--b { left: 178px; top: 62px; opacity: .5; }
.way__friend { position: absolute; right: 14px; top: -48px; width: 190px; height: 190px; }
.way__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 76px; padding: 12px 14px 12px 18px; }
.way__text { max-width: 200px; font: 700 var(--body-max)/1.5 var(--font-body); }
.way__go { display: flex; align-items: center; justify-content: center; flex: 0 0 46px; width: 46px; height: 46px; border-radius: 50%; color: #fff; border: 2px solid var(--ink); }
.way--type .way__go { background: var(--red); }
.way--say .way__go { background: var(--blue); }
.draw {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: auto; padding: 12px 14px 12px 18px; border-radius: 20px; border: 2px dashed rgba(16, 36, 74, .35);
}
.pane--choose .col { padding-bottom: 28px; }
.pane--choose .way--say { margin-bottom: 30px; }
.draw__words { min-width: 0; }
.draw__title { font: 700 16px/1.15 var(--font-display); }
.draw__text { margin-top: 4px; font: 700 var(--body-max)/1.5 var(--font-body); color: var(--muted); }
.draw__btn { flex: 0 0 auto; height: 44px; padding: 0 14px; gap: 6px; font-size: 15px; border-width: 2px; --btn-shadow: 4px; }

/* ---------- Type (the notebook) ---------- */
.type { position: relative; width: min(100% - 32px, 560px); margin-inline: auto; display: flex; flex-direction: column; padding-bottom: 20px; }
.type__main { display: contents; }
.type__friend { position: absolute; right: 0; top: -52px; z-index: 2; width: 160px; height: 160px; pointer-events: none; }
.type__friend img { display: block; width: 100%; height: 100%; }
.type .pane__title { order: 1; min-height: 104px; padding-top: 4px; margin-bottom: 0; }
.note { position: relative; z-index: 1; order: 2; border-radius: 20px; border: 2.5px solid var(--ink); background: var(--paper); box-shadow: 0 6px 0 var(--ink); overflow: hidden; --ml: 40px; --pl: 56px; --lh: 28px; --hole-x: 13px; --hole-y: 70px; --hole-gap: 80px; --hole: 11px; }
.note::before { content: ""; position: absolute; left: var(--ml); top: 0; bottom: 0; width: 1.5px; background: rgba(236, 28, 36, .4); }
.note::after {
  content: ""; position: absolute; left: var(--hole-x); top: var(--hole-y); width: calc(var(--hole) + 2px); height: calc(var(--hole-gap) * 3); pointer-events: none;
  background: radial-gradient(circle at 50% calc(var(--hole) / 2 + 1px), var(--cream) calc(var(--hole) / 2 - .5px), rgba(16, 36, 74, .35) calc(var(--hole) / 2), rgba(16, 36, 74, .35) calc(var(--hole) / 2 + 1px), transparent calc(var(--hole) / 2 + 1.5px)) 0 0 / 100% var(--hole-gap) repeat-y;
}
.note__head { position: relative; padding: 16px 16px 0 var(--pl); }
.note__label { display: block; font: 800 var(--body-max)/1 var(--font-label); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.note__title {
  display: block; width: 100%; min-height: 44px; margin: 6px 0 0; padding: 0 0 8px; border: 0; border-bottom: 2px solid rgba(16, 36, 74, .22); border-radius: 0;
  background: transparent; color: var(--ink); font: 800 24px/1.15 var(--font-display); letter-spacing: -.01em; caret-color: var(--red);
}
.note__title:focus-visible, .note__text:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.note__title--read { margin: 0; padding-top: 2px; font-size: 26px; overflow-wrap: anywhere; }
.note__page {
  position: relative; margin-top: 8px; padding: 0 16px 14px var(--pl);
  background-image: repeating-linear-gradient(to bottom, rgba(255, 253, 247, 0) 0, rgba(255, 253, 247, 0) calc(var(--lh) - 1px), rgba(2, 132, 202, .26) calc(var(--lh) - 1px), rgba(2, 132, 202, .26) var(--lh));
}
.note__text {
  display: block; width: 100%; height: 252px; margin: 0; padding: 0; border: 0; border-radius: 0; resize: none; overflow-y: auto;
  background: transparent; color: var(--ink); font: 700 18px/var(--lh) var(--font-body); caret-color: var(--red);
}
.note__text::placeholder, .note__title::placeholder { color: rgba(59, 77, 117, .55); }
.type__side { order: 3; }
.helpers { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.helper {
  display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px 0 8px; border-radius: 999px;
  border: 2px solid var(--ink); background: var(--paper); box-shadow: 0 3px 0 var(--ink); color: var(--ink);
  font: 700 15px/1 var(--font-display); cursor: pointer; transition: translate .15s ease; text-align: left;
}
.helper:hover { translate: 0 -2px; }
.helper:active { translate: 0 2px; }
.helper[aria-expanded="true"] { background: var(--gold-light); }
.helper__ico { display: flex; align-items: center; justify-content: center; flex: 0 0 28px; width: 28px; height: 28px; border-radius: 50%; background: var(--gold); color: var(--ink); }
.helper__ico .ico { width: 16px; height: 16px; stroke-width: 2.4; }
.helper[data-helper="friend"] .helper__ico .ico { stroke-width: 3; }
.help { margin-top: 14px; padding: 12px 16px; border-radius: 18px; background: var(--paper); border: 2px dashed rgba(16, 36, 74, .35); font: 700 var(--body-max)/1.6 var(--font-body); color: var(--ink); }
.help p + p { margin-top: 6px; }
.help__q { margin: 0; padding-left: 18px; }
.help__q li + li { margin-top: 4px; }
.help__chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.help__chip { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 2px solid var(--ink); background: var(--cream); color: var(--ink); font: 700 15px/1 var(--font-display); cursor: pointer; }
.help__chip:hover { background: var(--gold-light); }
.type .hint { order: 4; }
.count { order: 3; margin: 8px 0 0; font: 700 var(--body-max)/1.4 var(--font-body); color: var(--muted); text-align: center; }
.count.is-over { color: var(--err); font-weight: 800; }
.type__clear { order: 5; display: flex; flex-direction: column; align-items: center; margin-top: 4px; }
.type__clear .linkbtn[hidden] { display: none; }
/* "Clear your story?" with Clear and Keep, asked on the page before anything is wiped. */
.clear-ask { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 4px; }
.clear-ask[hidden] { display: none; }
.clear-ask__q { margin: 0; font: 800 16px/1.2 var(--font-display); color: var(--ink); }
.clear-ask__row { display: flex; gap: 12px; }
.clear-ask__row .btn { min-width: 96px; justify-content: center; }

.bar-bottom {
  position: sticky; bottom: 0; z-index: 5; margin-top: auto;
  padding: 14px 16px 22px; border-radius: 24px 24px 0 0; border-top: 2.5px solid var(--ink); background: var(--paper);
}
.bar-bottom__in { width: min(100%, 560px); margin-inline: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.bar-bottom__err { width: min(100%, 560px); margin: 8px auto 0; text-align: right; font: 800 var(--body-max)/1.4 var(--font-body); color: var(--err); }
.bar-bottom__err:empty { display: none; }
.saved { display: flex; align-items: center; gap: 8px; font: 700 var(--body-max)/1.3 var(--font-body); color: var(--muted); visibility: hidden; }
.saved.is-on { visibility: visible; }
.saved__tick { display: flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: #1f9d55; color: #fff; flex: none; }
.enter .done { height: 56px; padding: 0 24px; }

/* ---------- Say it aloud ---------- */
.say {
  position: relative; flex: 1; width: 100%;
  border-radius: 40px 40px 0 0; border: 3px solid var(--ink); border-bottom: 0;
  background: var(--blue); color: #fff; padding: 22px 16px 26px;
  --focus: #fff;
}
.say__head { position: relative; min-height: 122px; }
.say__head .pane__title { color: #fff; font-size: 38px; }
.say__friend { position: absolute; right: 6px; top: -18px; width: 164px; height: 164px; }
.say__spark { position: absolute; stroke: none; }
.say__spark--a { left: 176px; top: 8px; opacity: .7; fill: var(--cream); }
.say__spark--b { left: 200px; top: 46px; fill: var(--gold); }
.say__tip { display: inline-block; margin: 14px 0 0; padding: 9px 16px; border-radius: 999px; background: var(--paper); border: 2px solid var(--ink); box-shadow: 0 3px 0 var(--ink); font: 700 var(--body-max)/1.4 var(--font-body); color: var(--ink); }
.say__stage { position: relative; display: flex; align-items: center; justify-content: center; height: 252px; margin-top: 8px; }
.say__ring { position: absolute; left: 50%; top: 50%; border-radius: 50%; border: 3px solid rgba(255, 247, 232, .28); }
.say__ring--a { width: 262px; height: 262px; margin: -131px 0 0 -131px; }
.say__ring--b { width: 236px; height: 236px; margin: -118px 0 0 -118px; border-color: rgba(255, 247, 232, .45); }
.say__big {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  width: 190px; height: 190px; padding: 0; border: 0; border-radius: 50%; background: var(--red); color: #fff; cursor: pointer;
  box-shadow: 0 0 0 7px var(--cream), 0 0 0 10px var(--ink), 0 14px 0 10px var(--ink-deep);
  -webkit-tap-highlight-color: transparent;
}
.say__big:focus-visible { outline: 3px solid #fff; outline-offset: 14px; }
.say__big:disabled { background: #1f9d55; cursor: default; }
.say__big-ico { display: flex; align-items: center; justify-content: center; height: 52px; }
.say__big-ico .sq { display: block; width: 50px; height: 50px; border-radius: 12px; background: #fff; }
.say__big-label { font: 800 34px/1 var(--font-display); }
.say__time { margin: 8px 0 0; text-align: center; line-height: 1; }
.say__now { font: 800 34px/1 var(--font-display); }
.say__of { font: 700 18px/1 var(--font-display); opacity: .92; }
.say__bars { display: flex; align-items: center; justify-content: center; gap: 6px; height: 44px; margin-top: 10px; }
.say__bars i { display: block; flex: 0 0 5px; width: 5px; height: 6px; border-radius: 3px; background: var(--cream); opacity: .38; }
.say__row { display: flex; gap: 10px; margin-top: 16px; }
.say__btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; flex: 1 1 0; min-height: 48px; border-radius: 999px;
  border: 2px solid var(--ink); background: var(--paper); box-shadow: 0 3px 0 var(--ink); color: var(--ink);
  font: 700 16px/1 var(--font-display); cursor: pointer; transition: translate .15s ease;
}
.say__btn:hover:not(:disabled) { translate: 0 -2px; }
.say__btn:disabled { border: 2px dashed rgba(255, 247, 232, .5); background: rgba(255, 247, 232, .16); box-shadow: none; color: rgba(255, 247, 232, .72); cursor: default; }
.say__fill { fill: currentColor; stroke: none; }
.say__title { margin-top: 16px; padding: 10px 16px 12px; border-radius: 18px; background: var(--paper); border: 2px solid var(--ink); box-shadow: 0 4px 0 var(--ink); color: var(--ink); }
.say__title:focus-within { outline: 3px solid #fff; outline-offset: 3px; }
.say__title-label { display: block; font: 800 var(--body-max)/1 var(--font-label); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.say__title-input { display: block; width: 100%; margin: 5px 0 0; padding: 0; border: 0; background: transparent; outline: none; color: var(--ink); font: 800 22px/1.1 var(--font-display); letter-spacing: -.01em; caret-color: var(--red); }
.say__title-input::placeholder { color: rgba(59, 77, 117, .55); }
.say__done { display: flex; width: 100%; height: 56px; margin-top: 18px; }
.say__err { margin: 10px 0 0; color: #fff; font: 800 var(--body-max)/1.4 var(--font-body); }
.say__err:empty { display: none; }
.say__unavailable { margin-top: 14px; padding: 18px 16px; border-radius: 22px; background: var(--paper); border: 2px solid var(--ink); box-shadow: 0 4px 0 var(--ink); color: var(--ink); }
.say__unavailable-text { margin: 0 0 14px; font: 700 var(--body-max)/1.6 var(--font-body); }
.say__typeinstead { width: 100%; }

/* ---------- Check it ---------- */
.col--check { padding-bottom: 24px; }
.titlerow { position: relative; min-height: 104px; }
.titlerow .pane__title { padding-top: 4px; font-size: 40px; }
.titlerow__friend { position: absolute; right: 16px; top: -52px; z-index: 2; width: 160px; height: 160px; }
.note--check { order: 0; --lh: 28px; }
.note--check .note__head { padding-top: 18px; }
.note--check .note__page--read { min-height: 150px; margin-top: 8px; padding-bottom: 8px; }
.note__read { margin: 0; max-height: 276px; overflow-y: auto; font: 700 18px/var(--lh) var(--font-body); white-space: pre-wrap; overflow-wrap: anywhere; }
.note__audio { padding: 8px 0 14px; }
.note__audio audio { display: block; width: 100%; height: 48px; }
.note__foot { position: relative; padding: 0 16px 14px var(--pl); }
.two { display: flex; gap: 10px; margin-top: auto; padding-top: 28px; }

/* ---------- A grown-up says yes ---------- */
.col--grown { position: relative; padding-top: 26px; }
.navy { position: relative; min-height: 196px; border-radius: 32px; background: var(--ink); color: var(--cream); padding: 26px 18px 56px; }
.pane__title--grown { font-size: 34px; line-height: .98; color: var(--cream); }
.pane__title--grown .gold { color: var(--gold); }
.navy__text { margin: 12px 0 0; max-width: 178px; font: 700 var(--body-max)/1.6 var(--font-body); color: rgba(255, 247, 232, .88); }
.navy__spark { position: absolute; stroke: none; }
.navy__spark--a { left: 228px; top: 24px; fill: var(--gold); }
.navy__spark--b { left: 326px; top: 30px; fill: var(--cream); opacity: .5; }
.grown__friend { position: absolute; right: -8px; top: -12px; z-index: 3; width: 214px; height: 214px; pointer-events: none; }
.card { position: relative; z-index: 2; margin-top: -38px; border-radius: 26px; background: var(--paper); border: 2.5px solid var(--ink); box-shadow: 0 6px 0 var(--ink); padding: 22px 18px 20px; }
.card .field { margin-top: 24px; }
.card .field:first-child, .card [data-signed-out] > .field:first-child { margin-top: 0; }
.group { margin: 22px 0 0; padding: 0; border: 0; min-width: 0; }
.lbl { display: block; padding: 0; font: 800 var(--body-max)/1 var(--font-label); letter-spacing: .12em; text-transform: uppercase; color: var(--ink); }
.fld {
  display: block; width: 100%; height: 52px; margin-top: 10px; padding: 0 16px; border-radius: 14px; border: 2px solid var(--ink);
  background: var(--cream); color: var(--ink); font: 800 16px/1 var(--font-body); outline: none; -webkit-appearance: none; appearance: none;
}
.fld::placeholder { color: rgba(59, 77, 117, .7); font-weight: 700; }
.fld:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.fld[aria-invalid="true"], .cc[data-invalid="true"] { border-color: var(--err); box-shadow: 0 0 0 3px rgba(179, 18, 26, .16); }
.phone { display: flex; gap: 10px; margin-top: 10px; }
.phone .fld { flex: 1; min-width: 0; margin-top: 0; width: auto; }
.cc { position: relative; flex: 0 0 86px; width: 86px; height: 52px; border-radius: 14px; border: 2px solid var(--ink); background: var(--cream); color: var(--ink); }
.cc__sel { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0 24px 0 16px; border: 0; background: transparent; color: var(--ink); font: 800 16px/1 var(--font-body); -webkit-appearance: none; appearance: none; cursor: pointer; border-radius: 12px; }
.cc__sel:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.cc__chev { position: absolute; right: 10px; top: 50%; translate: 0 -50%; pointer-events: none; }
.confirmed { display: flex; align-items: center; gap: 12px; min-height: 52px; margin: 10px 0 0; padding: 0 14px; border-radius: 14px; background: var(--green-soft); border: 2px solid var(--green); font: 700 17px/1 var(--font-display); color: var(--ink); }
.confirmed__tick, .signed__tick { display: flex; align-items: center; justify-content: center; flex: 0 0 28px; width: 28px; height: 28px; border-radius: 50%; background: var(--green); color: #fff; }
.confirmed__tick .ico, .signed__tick .ico { stroke-width: 3.6; }
.ages { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.age { position: relative; display: block; }
.age input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.age__face {
  display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 8px; border-radius: 16px;
  background: var(--cream); border: 2px solid var(--ink); color: var(--ink); font: 800 20px/1 var(--font-display); white-space: nowrap; pointer-events: none;
}
.age__face .ico { display: none; width: 16px; height: 16px; stroke-width: 3.6; }
.age__dot { display: block; width: 10px; height: 10px; border-radius: 50%; background: var(--red); }
.age:nth-child(3) .age__dot { background: var(--gold); }
.age input:checked + .age__face { background: var(--blue); border: 2.5px solid var(--ink); box-shadow: 0 4px 0 var(--ink); color: #fff; }
.age input:checked + .age__face .ico { display: block; }
.age input:checked + .age__face .age__dot { display: none; }
.age input:focus-visible + .age__face { outline: 3px solid var(--focus); outline-offset: 3px; }
.photo { position: relative; display: flex; align-items: center; gap: 12px; min-height: 56px; margin-top: 22px; padding: 0 14px 0 10px; border-radius: 16px; border: 2px dashed rgba(16, 36, 74, .4); color: var(--ink); cursor: pointer; }
.photo:focus-within { outline: 3px solid var(--focus); outline-offset: 3px; }
.photo__plus { display: flex; align-items: center; justify-content: center; flex: 0 0 36px; width: 36px; height: 36px; border-radius: 50%; background: var(--gold-light); border: 2px solid var(--ink); }
.photo__plus .ico { stroke-width: 2.6; }
.photo__text { flex: 1; min-width: 0; font: 700 15px/1.1 var(--font-display); overflow-wrap: anywhere; }
.photo__opt { font: 800 12px/1 var(--font-label); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
/* The prepared photo: a small oval like the certificate's, the two looks, and a way to remove it. */
.portrait { display: flex; align-items: flex-start; gap: 16px; margin-top: 12px; padding: 12px 14px; border-radius: 16px; background: var(--cream); border: 2px solid rgba(16, 36, 74, .2); }
.portrait[hidden] { display: none; }
.portrait__oval { position: relative; flex: 0 0 80px; width: 80px; height: 104px; border-radius: 50%; overflow: hidden; background: #DCEEFF; border: 3px solid #BC8A2D; box-shadow: 0 0 0 2px var(--paper), 0 0 0 3.5px #BC8A2D; }
.portrait__img { display: block; width: 100%; height: 100%; object-fit: cover; }
.portrait__oval.is-busy::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .7) 50%, transparent 70%) 0 0 / 250% 100%; }
html.motion .portrait__oval.is-busy::after { animation: portrait-shine 1.2s linear infinite; }
@keyframes portrait-shine { from { background-position: 100% 0; } to { background-position: -150% 0; } }
.portrait__side { flex: 1; min-width: 0; }
.portrait__looks { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.portrait__look { position: relative; display: block; }
.portrait__look input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.portrait__look span { display: flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 14px; background: var(--paper); border: 2px solid var(--ink); color: var(--ink); font: 800 15px/1 var(--font-display); white-space: nowrap; pointer-events: none; }
.portrait__look input:checked + span { background: var(--blue); box-shadow: 0 3px 0 var(--ink); color: #fff; }
.portrait__look input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 3px; }
.portrait__status { margin: 8px 0 0; font: 700 var(--body-max)/1.4 var(--font-body); color: var(--muted); }
.portrait__status:empty { display: none; }
.enter .portrait__remove { margin-top: 2px; padding: 0; }
.signed { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 8px 14px 8px 12px; border-radius: 14px; background: var(--green-soft); border: 2px solid var(--green); }
.signed__tick { flex-basis: 30px; width: 30px; height: 30px; }
.signed__title { display: block; font: 700 17px/1.1 var(--font-display); }
.signed__who { display: block; margin-top: 4px; font: 800 var(--body-max)/1.4 var(--font-body); color: var(--muted); overflow-wrap: anywhere; }
[data-signed-in] .group { margin-top: 26px; }
.kids { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.kid { position: relative; flex: 1 1 0; min-width: 0; }
.kid input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.kid__face { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 12px; border-radius: 16px; background: var(--cream); border: 2px dashed rgba(16, 36, 74, .55); color: var(--ink); font: 800 18px/1 var(--font-display); white-space: nowrap; pointer-events: none; }
.kid__face .ico { display: none; width: 16px; height: 16px; stroke-width: 3.6; }
.kid input:checked + .kid__face { background: var(--blue); border: 2.5px solid var(--ink); box-shadow: 0 4px 0 var(--ink); color: #fff; }
.kid input:checked + .kid__face .ico { display: block; }
.kid input:focus-visible + .kid__face { outline: 3px solid var(--focus); outline-offset: 3px; }
.kids__add { flex: 1 1 0; min-width: 0; min-height: 52px; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 0 12px; border-radius: 16px; background: var(--cream); border: 2px dashed rgba(16, 36, 74, .55); color: var(--ink); font: 800 18px/1 var(--font-display); white-space: nowrap; cursor: pointer; }
.kids__add .ico { width: 16px; height: 16px; stroke-width: 3.2; }
.addkid { margin-top: 18px; padding: 16px 14px 18px; border-radius: 18px; background: var(--cream); }
.addkid .field { margin-top: 0; }
.addkid .fld { background: var(--paper); }
.addkid .btn { margin-top: 16px; }
.tick { display: flex; align-items: flex-start; gap: 12px; margin-top: 24px; padding: 14px 14px 14px 12px; border-radius: 18px; background: var(--cream); }
.tick__box {
  -webkit-appearance: none; appearance: none; flex: 0 0 30px; width: 30px; height: 30px; margin: 0; padding: 0; border-radius: 9px;
  border: 2px solid var(--ink); background: var(--paper); cursor: pointer;
}
.tick__box:checked { background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='%23f6a313' stroke-width='3.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 20px 20px no-repeat; }
.tick__box:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.tick__box[aria-invalid="true"] { border-color: var(--err); box-shadow: 0 0 0 3px rgba(179, 18, 26, .2); }
.tick__text { margin: 0; font: 700 var(--body-max)/1.6 var(--font-body); color: var(--muted); cursor: pointer; }
.transcript-box--check { margin: 18px 0 0; }
.transcript-box--check .transcript-status { margin: 0 0 6px; }
.transcript-status:empty { margin: 0; }
.card .transcript { margin-top: 12px; }
.transcript .fld { height: auto; min-height: 124px; padding: 12px 16px; font-weight: 700; line-height: 1.5; resize: vertical; }
.transcript .linkbtn { min-height: 44px; }
.free { display: flex; align-items: flex-start; gap: 10px; margin-top: 18px; }
.free__ico { flex: 0 0 18px; margin-top: 1px; stroke: var(--blue); stroke-width: 2.6; }
.free p { margin: 0; font: 700 var(--body-max)/1.6 var(--font-body); color: var(--muted); }
.card .submit { display: flex; width: 100%; height: 56px; margin-top: 22px; }
.photo-wait { text-align: center; }
/* "Not you? Sign out" under the signed-in box (a 44px target). */
.signed__out { display: flex; justify-content: flex-end; margin: 2px -12px 0 0; }

/* ---------- You are in ---------- */
.in__sheet { position: relative; flex: 1; margin-top: 24px; border-radius: 40px 40px 0 0; background: var(--gold); padding: 30px 0 44px; }
.col--in { position: relative; z-index: 1; padding-bottom: 0; flex: none; }
.in__head { position: relative; min-height: 216px; padding-bottom: 4px; }
.in__title { margin: 0; font: 800 60px/.95 var(--font-display); letter-spacing: -.02em; color: var(--ink); }
.in__title:focus { outline: none; }
.in__title span { display: block; white-space: nowrap; }
.in__text { margin: 14px 0 0; max-width: 196px; font: 700 var(--body-max)/1.6 var(--font-body); color: var(--ink); }
.in__friend { position: absolute; right: -8px; top: -6px; z-index: 3; width: 240px; height: 240px; pointer-events: none; }
.confetti { position: absolute; width: 10px; height: 10px; border-radius: 3px; }
.confetti--1 { left: 84%; top: 34px; background: var(--blue); transform: rotate(-18deg); }
.confetti--2 { left: 38%; top: 14px; background: var(--cream); transform: rotate(40deg); }
.confetti--3 { left: 2%; top: 318px; background: var(--blue); transform: rotate(30deg); }
.confetti--4 { left: 96%; top: 352px; background: var(--red); transform: rotate(-30deg); }
.spk { position: absolute; stroke: none; }
.spk--1 { left: 72%; top: 16px; fill: var(--cream); }
.spk--2 { left: 5%; top: 12px; fill: var(--red); }
.spk--3 { left: 95%; top: 260px; fill: var(--cream); }
.cert-wrap { position: relative; z-index: 2; margin-top: -4px; transform: rotate(-1deg); }
/* The storybook certificate (the same picture as the PDF). Everything on it is placed in percentages of the
   picture, measured from services/creator-api/certificate.mjs (1491 x 1055 there): tops are the PDF's text tops,
   text sizes are the PDF's sizes in cqw (size / 14.91). The right page's text column is 802..1260 of 1491. */
.cert { position: relative; container-type: inline-size; border-radius: 12px; overflow: hidden; border: 3px solid var(--ink); box-shadow: 0 8px 0 var(--ink); background: #f6ecd6; color: #192254; }
.cert__art { display: block; width: 100%; height: auto; }
.cert__oval { position: absolute; left: 18.2%; top: 25.1%; width: 26.4%; height: 48.8%; border-radius: 50%; overflow: hidden; background: #DCEEFF; }
.cert__photo { display: block; width: 100%; height: 100%; object-fit: cover; }
.cert__initial { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding-bottom: 6%; font: 700 16.8cqw/1 var(--font-display); color: #3A5BA0; }
.cert__initial[hidden] { display: none; }
.cert__eyebrow, .cert__of, .cert__present, .cert__name, .cert__date { position: absolute; left: 53.79%; width: 30.72%; margin: 0; text-align: center; color: #192254; white-space: nowrap; }
/* Never below 10px (site rule). Centred on the right page's middle (69.15% across) with its own width, so the
   larger floor spreads evenly instead of running into the frame. */
.cert__eyebrow { top: 26%; left: 69.15%; width: auto; transform: translateX(-50%); font: 600 max(1.21cqw, 10px)/normal var(--font-body); letter-spacing: .32em; word-spacing: .4em; text-transform: uppercase; }
.cert__of { top: 28.6%; font: 700 3.89cqw/1 var(--font-display); }
.cert__of span { display: block; height: 3.76cqw; line-height: normal; } /* the PDF's two lines are 56 of 1491 apart */
.cert__present { top: 41.8%; font: 600 max(1.68cqw, 10px)/normal var(--font-body); }
.cert__name { top: 45%; height: 10%; display: flex; align-items: center; justify-content: center; font: 700 var(--name-size, 7.1cqw)/1 var(--font-display); }
.cert__name > span { min-width: 0; max-width: 100%; }
.cert__name.is-wrap { white-space: normal; overflow-wrap: anywhere; line-height: .98; }
.cert__rule { position: absolute; left: 56.87%; top: 56.4%; width: 24.55%; height: max(1px, .11cqw); background: #BC8A2D; }
.cert__date { top: 75.3%; font: 600 max(1.07cqw, 10px)/normal var(--font-body); }
@container (max-width: 480px) {
  .cert__eyebrow { letter-spacing: .04em; word-spacing: .1em; }
  /* On a phone the 10px floor makes "Proudly presented to" taller than on the PDF; give the name room below it. */
  .cert__present { top: 40.6%; }
  .cert__name { top: 47.6%; height: 8.4%; }
}
.enter .in__dl { position: relative; z-index: 2; display: flex; width: 100%; flex: none; height: 56px; margin-top: 28px; }
.next { position: relative; z-index: 2; margin-top: 32px; border-radius: 26px; background: var(--paper); border: 2.5px solid var(--ink); box-shadow: 0 6px 0 var(--ink); padding: 22px 18px 20px; }
.next__title { margin: 0; font: 800 26px/1 var(--font-display); letter-spacing: -.02em; }
.next__row { display: flex; align-items: center; gap: 14px; margin-top: 16px; padding-top: 16px; border-top: 1.5px dashed rgba(16, 36, 74, .22); }
.next__title + .next__row { margin-top: 18px; padding-top: 0; border-top: 0; }
.next__row p { margin: 0; font: 700 var(--body-max)/1.5 var(--font-body); }
/* "The certificate has also been emailed to the grown-up." under the download button. */
.in__mail { position: relative; z-index: 2; margin: 12px 0 0; text-align: center; font: 700 var(--body-max)/1.5 var(--font-body); color: var(--muted); }
.next__ico { display: flex; align-items: center; justify-content: center; flex: 0 0 44px; width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--ink); color: #fff; }
.next__ico .ico { stroke-width: 2.4; }
.next__ico--red { background: var(--red); } .next__ico--blue { background: var(--blue); } .next__ico--gold { background: var(--gold); color: var(--ink); }
.in__actions { position: relative; z-index: 2; display: flex; flex-direction: column; gap: 12px; margin-top: 28px; }
.in__actions .big { flex: none; width: 100%; height: 56px; }

/* ---------- Sign-in pop-up ---------- */
.signin {
  width: min(520px, 100% - 32px); max-width: none; max-height: calc(100vh - 16px); max-height: calc(100dvh - 16px);
  margin: auto; padding: 0; border: 0; background: transparent; color: var(--ink); overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain;
  --focus: var(--blue-deep);
}
.signin::backdrop { background: rgba(7, 22, 49, .62); }
.signin__in { position: relative; padding-top: 200px; }
.signin__friend { position: absolute; left: 24px; top: 0; z-index: 1; width: 300px; height: 300px; }
.signin__card { position: relative; z-index: 2; border-radius: 36px; background: var(--paper); border: 2.5px solid var(--ink); box-shadow: 0 8px 0 var(--ink-deep); padding: 40px 40px 32px; }
.signin__x { position: absolute; right: 16px; top: 16px; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border-radius: 50%; background: var(--cream); border: 2px solid var(--ink); box-shadow: 0 3px 0 var(--ink); color: var(--ink); cursor: pointer; }
.signin__eyebrow { margin: 0; font: 800 17px/1 var(--font-label); letter-spacing: .14em; text-transform: uppercase; color: var(--blue-deep); }
.signin__title { margin: 12px 0 0; font: 800 40px/.98 var(--font-display); letter-spacing: -.02em; color: var(--ink); }
.signin__title span { white-space: nowrap; }
.signin__text { margin: 12px 0 0; font: 700 var(--body-max)/1.6 var(--font-body); color: var(--muted); text-wrap: balance; }
.signin .field { margin-top: 22px; }
.signin .field + .field { margin-top: 20px; }
.signin__go { display: flex; width: 100%; height: 56px; margin-top: 22px; font-size: 17px; }
.signin__later { display: flex; align-items: center; justify-content: center; width: 100%; height: 48px; margin-top: 6px; padding: 0; border: 0; background: none; color: var(--ink); font: 700 16px/1 var(--font-display); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; cursor: pointer; }
.signin__free { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 4px 0 0; font: 700 var(--body-max)/1.5 var(--font-body); color: var(--muted); text-align: center; }
.signin__free .ico { stroke: var(--blue); stroke-width: 2.6; }

/* ---------- Tablet and desktop: the phone layout as a centred 560 column ---------- */
@media (min-width: 761px) {
  .enter__top { grid-template-columns: minmax(0, 1fr) minmax(0, 560px) minmax(0, 1fr); grid-template-areas: "logo steps close"; column-gap: 40px; padding: 20px 48px 0; }
  .enter__logo { width: 82px; height: 46px; }
  .enter__logo img { width: 82px; height: 46px; }
  .enter__close { width: 52px; height: 52px; justify-self: end; }
  .steps { margin: 0; }
  .steps__item[data-step="2"] .steps__label { max-width: 200px; }
  .enter .btn { font-size: 18px; }
  .enter .btn--sm2 { font-size: 15px; }
  .col { padding-bottom: 40px; }
  .pane__title { font-size: 48px; }
  .pane__title--choose { font-size: 48px; padding-top: 18px; }
  .hint, .tick__text, .free p, .note-s, .signin__text, .say__tip, .signin__free { font-size: var(--body-max); }
  .type .pane__title { min-height: 120px; padding-top: 14px; }
  .type__friend, .titlerow__friend { width: 200px; height: 200px; top: -64px; }
  .titlerow { min-height: 120px; }
  .titlerow .pane__title { padding-top: 14px; font-size: 48px; }
  .bar-bottom { border-radius: 24px 24px 0 0; padding: 16px 48px 24px; }
  .bar-bottom__in .btn { font-size: 18px; }
  .signin { margin: 36px auto auto; }
  .signin__in { padding-top: 200px; }
  .signin__title span { display: inline; }
  .pane__title--grown { font-size: 44px; }
  .navy__text { max-width: 280px; }
  .say__head .pane__title { font-size: 44px; }
  .say__head { min-height: 160px; }
  .say { margin-top: 28px; width: min(100% - 32px, 560px); margin-inline: auto; border: 3px solid var(--ink); border-radius: 40px; margin-bottom: 40px; }
  .in__head { min-height: 250px; }
  .in__title { font-size: 72px; }
  .in__friend { width: 290px; height: 290px; right: -20px; top: -14px; }
  .in__text { max-width: 240px; }
}

@media (min-width: 1100px) {
  .type { display: grid; grid-template-columns: minmax(0, 1fr) 720px minmax(0, 1fr); column-gap: 40px; align-items: start; width: 100%; padding: 28px 48px 24px; }
  .type__main { display: block; grid-column: 2; grid-row: 1; }
  .type__friend { position: relative; grid-column: 1; grid-row: 1; left: auto; right: auto; top: auto; width: auto; height: 620px; }
  .type__friend img { position: absolute; right: -145px; top: 151px; width: min(460px, 32vw); height: auto; aspect-ratio: 1; z-index: 2; }
  .type__side { grid-column: 3; grid-row: 1; padding-top: 98px; }
  .type .pane__title { min-height: 0; padding: 0; text-align: center; font-size: 56px; }
  .type .pane__title span { display: inline; }
  .note { margin-top: 22px; --ml: 62px; --pl: 92px; --lh: 36px; --hole-x: 20px; --hole-y: 84px; --hole-gap: 130px; --hole: 14px; border-width: 3px; border-radius: 26px; box-shadow: 0 8px 0 var(--ink); }
  .type .note__head { padding: 24px 36px 0 var(--pl); }
  .type .note__label { font-size: var(--body-max); }
  .type .note__title { margin-top: 8px; padding-bottom: 10px; border-bottom-width: 2.5px; font-size: 36px; }
  .type .note__page { margin-top: 12px; padding-right: 36px; padding-bottom: 0; }
  .type .note__text { height: 376px; font-size: 24px; }
  .type .hint { margin-top: 26px; text-align: center; }
  .helpers { flex-direction: column; flex-wrap: nowrap; gap: 18px; margin-top: 0; }
  .helper { gap: 14px; min-height: 76px; height: auto; padding: 12px 18px 12px 14px; border-radius: 24px; border-width: 2.5px; box-shadow: 0 5px 0 var(--ink); font-size: 19px; line-height: 1.1; }
  .helper__ico { flex-basis: 46px; width: 46px; height: 46px; }
  .helper__ico .ico { width: 22px; height: 22px; }
  .bar-bottom { padding: 16px 48px; border-radius: 0; }
  .bar-bottom__in, .bar-bottom__err { width: 720px; }
  .help { margin-top: 18px; }
  .signin { margin-top: 36px; }
}

@media (max-width: 760px) {
  .signin { width: 100%; max-width: 100%; margin: auto 0 0; padding: 0 16px; }
  .signin__in { padding-top: 166px; }
  .signin__friend { left: 14px; width: 240px; height: 240px; }
  .signin__card { border-radius: 32px 32px 0 0; border-bottom: 0; box-shadow: none; padding: 30px 20px 22px; }
  .signin__x { right: 12px; top: 12px; }
  .signin__eyebrow { font-size: 15px; }
  .signin__title { font-size: 34px; }
  .signin__title span { display: block; }
  .signin .field { margin-top: 22px; }
}

@media (max-width: 400px) {
  .age__face { font-size: 18px; }
  .kid__face, .kids__add { font-size: 16px; padding: 0 8px; }
}
@media (max-width: 340px) {
  .pane__title { font-size: 34px; }
  .pane__title--choose { font-size: 30px; }
  .way__name { font-size: 36px; }
  .in__title { font-size: 48px; }
  .in__friend { width: 190px; height: 190px; }
  .say__head .pane__title { font-size: 32px; }
  .say__friend { width: 130px; height: 130px; }
  .grown__friend { width: 170px; height: 170px; }
}

/* ---------- Motion (only when the site's motion switch is on) ---------- */
@keyframes enter-pop { from { opacity: 0; translate: 0 28px; scale: .97; } to { opacity: 1; translate: 0 0; scale: 1; } }
@keyframes enter-ring { 0% { transform: scale(.96); opacity: .9; } 100% { transform: scale(1.04); opacity: .4; } }
@keyframes enter-bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -6px; } }
html.motion .signin[open] .signin__in { animation: enter-pop .45s var(--ease-pop) both; }
html.motion .say[data-rec="on"] .say__ring { animation: enter-ring 1.6s ease-in-out infinite alternate; }
html.motion .pane:not([hidden]) .way__friend, html.motion .pane:not([hidden]) .in__friend { animation: enter-bob 3.4s ease-in-out infinite; }
html.calm .enter *, html.calm .signin * { animation: none !important; }

/* ---------- Print: the certificate only ---------- */
@media print {
  body * { visibility: hidden; }
  #certificate, #certificate * { visibility: visible; }
  #certificate { position: fixed; left: 50%; top: 18mm; width: 130mm; transform: translateX(-50%); }
}

/* The film a story is about ("Inspired by ..."), from a Watch link's ?episode=. */
.film { display: flex; align-items: center; gap: 10px; max-width: 34rem; margin: 4px 0 14px; padding: 4px 4px 4px 8px; background: var(--paper, #fff); border: 2px solid var(--ink, #192254); border-radius: 12px; color: var(--ink, #192254); font: 600 var(--body-max, 13px)/1.35 var(--font-body, 'Nunito', sans-serif); }
.film[hidden] { display: none; }
.film__img { flex: none; width: 64px; height: 36px; border-radius: 6px; object-fit: cover; }
.film__img[hidden] { display: none; }
.film__text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.film__remove { flex: none; min-width: 44px; min-height: 44px; padding: 0 10px; border: 0; border-radius: 8px; background: none; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; }
.film__remove:focus-visible { outline: 3px solid var(--ink, #192254); outline-offset: 2px; }
/* In the writing step the pieces are ordered (title 1, note 2): keep the film line just under the title and above Joy. */
.type .film { order: 1; position: relative; z-index: 3; margin-top: 10px; }

/* ---------- Optional AI feedback (grown-up step) and its result (you are in) ---------- */
.aif { margin: 14px 0 0; padding: 12px 14px; border-radius: 16px; border: 2px dashed rgba(16, 36, 74, .3); background: var(--paper); font: 700 var(--body-max)/1.6 var(--font-body); color: var(--muted); }
.aif a { color: var(--ink); font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }

.in__ai { position: relative; z-index: 2; margin: 22px 0 8px; color: var(--ink); text-align: left; }
.in__ai-body > p { margin: 12px 4px 0; font: 700 var(--body-max)/1.5 var(--font-body); color: var(--ink); }
.in__ai-body > p a { font-weight: 800; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.in__again { position: relative; z-index: 2; margin: 6px 0 0; text-align: center; font: 700 var(--body-max)/1.5 var(--font-body); color: var(--ink); }
.in__again .linkbtn { min-height: 44px; color: var(--ink); }
.in__confirm { color: var(--ink); }
.in__again .linkbtn[aria-disabled="true"] { opacity: .6; }

/* ---------- Choose the friends (E02): five big picture cards that toggle ---------- */
.pane__title--friends { font-size: 38px; line-height: 1; padding-top: 6px; }
.pick__lede { margin-top: 10px; font-size: var(--body-max); color: var(--muted); }
.pick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 18px 0 0; padding: 0; list-style: none; }
.pick li:last-child:nth-child(odd) { grid-column: 1 / -1; }
.pick__card {
  position: relative; width: 100%; min-height: 64px;
  display: grid; grid-template-columns: 64px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 12px; align-items: center;
  padding: 10px 12px; border-radius: 20px; text-align: left; cursor: pointer;
  background: var(--paper); color: var(--ink); border: 2.5px solid var(--ink); box-shadow: 0 4px 0 var(--ink);
  transition: background-color .15s, transform .15s;
}
.pick__face { grid-row: 1 / 3; width: 64px; height: 64px; border-radius: 50%; border: 2.5px solid var(--ink); object-fit: cover; background: var(--cream); }
.pick__name { align-self: end; font: 800 22px/1 var(--font-display); }
.pick__line { align-self: start; margin-top: 3px; font: 700 13px/1.2 var(--font-display); color: var(--muted); }
.pick__tick {
  position: absolute; left: 52px; bottom: 6px; width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 2.5px solid var(--ink); background: var(--paper); color: transparent;
}
.pick__card.is-on { background: var(--gold-light); transform: translateY(-2px); }
.pick__card.is-on .pick__tick { background: var(--green); border-color: var(--green); color: #fff; }
.pick__card:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.pick__count { margin-top: 16px; font: 800 18px/1.25 var(--font-display); color: var(--muted); }
.pick__count.is-ready { color: var(--green); }
.enter .pick__next { flex: none; margin-top: 14px; align-self: stretch; }
.pick__err { margin-top: 8px; min-height: 1em; color: var(--err); font-size: var(--body-max); }
@media (prefers-reduced-motion: reduce) { .pick__card { transition: none; } .pick__card.is-on { transform: none; } }
html.calm .pick__card { transition: none; }
html.calm .pick__card.is-on { transform: none; }
@media (min-width: 761px) {
  .pick { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pick li:last-child:nth-child(odd) { grid-column: auto; }
  .pick__card { grid-template-columns: 1fr; grid-template-rows: auto auto auto; justify-items: center; text-align: center; padding: 16px 10px 14px; }
  .pick__face { grid-row: auto; width: 84px; height: 84px; margin-bottom: 8px; }
  .pick__line { margin-top: 4px; }
  .pick__tick { left: auto; bottom: auto; right: 10px; top: 10px; }
}

/* The chosen friends on the Check screen, and the "Add a friend" chips that favour them. */
.stars { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-top: 12px; font: 800 17px/1.25 var(--font-display); }
.stars__faces { display: flex; }
.stars__faces img { width: 36px; height: 36px; margin-right: -8px; border-radius: 50%; border: 2px solid var(--ink); object-fit: cover; background: var(--cream); }
.stars__faces img:last-child { margin-right: 0; }
.stars__change { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.help__chip.is-star { background: var(--gold-light); }
.help__chip.is-star::before { content: "★ "; color: var(--gold-deep); }

/* ---------- How we read your story (E03) ---------- */
.hwr-link { display: inline-flex; align-items: center; min-height: 44px; margin-top: 6px; font: 800 16px/1.2 var(--font-display); color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.hwr-link--say { color: inherit; }
.pane__title--read { font-size: 38px; line-height: 1; padding-top: 6px; }
.hwr__lede { margin-top: 12px; font: 800 20px/1.25 var(--font-display); color: var(--blue-deep); }
.hwr__cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 18px 0 0; padding: 0; list-style: none; }
.hwr__card { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 12px; border-radius: 20px; border: 2.5px solid var(--ink); box-shadow: 0 4px 0 var(--ink); }
.hwr__card--gold { background: var(--gold-light); }
.hwr__card--blue { background: #d7eefa; }
.hwr__card--red { background: #ffd9d6; }
.hwr__card--cream { background: var(--paper); }
.hwr__pic { width: 64px; height: 64px; object-fit: contain; }
.hwr__card--cream .hwr__pic { width: 120px; height: 120px; margin: -26px -28px -6px; }
.hwr__faces { display: flex; height: 64px; align-items: center; }
.hwr__faces img { width: 52px; height: 52px; margin-right: -8px; border-radius: 50%; border: 2px solid var(--ink); object-fit: cover; }
.hwr__h { font: 800 18px/1.1 var(--font-display); }
.hwr__p { font-size: var(--body-max); line-height: 1.45; color: var(--muted); }
.hwr__ex { margin-top: 16px; padding: 14px 16px; border-radius: 18px; background: var(--paper); border: 2.5px dashed var(--ink); }
.hwr__ex--yes { border-style: solid; border-color: var(--green); background: var(--green-soft); }
.hwr__ex-tag { font: 800 13px/1 var(--font-label); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.hwr__ex-text { margin-top: 8px; font: 700 20px/1.4 var(--font-display); }
.hwr__ex-ask { margin-top: 6px; font: 800 18px/1.3 var(--font-display); color: var(--blue-deep); }
.hwr__read { margin-top: 10px; }
.hwr__note { margin-top: 14px; font-size: var(--body-max); line-height: 1.6; }
.enter .hwr__back { flex: none; margin-top: 18px; align-self: stretch; }
@media (min-width: 761px) { .hwr__cards { grid-template-columns: repeat(4, minmax(0, 1fr)); } .col--read { width: min(100% - 32px, 760px); } }

/* ---------- The journey (owner, 25 Nov 2026): welcome, the tools switch, the cast row, the picker over the story ---------- */
.pane__title--welcome { font-size: 36px; line-height: 1; padding-top: 6px; }
.wel { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 16px 0 0; padding: 0; list-style: none; counter-reset: wel; }
.wel__i { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 10px 12px 12px; border-radius: 18px; background: var(--paper); border: 2.5px solid var(--ink); box-shadow: 0 4px 0 var(--ink); counter-increment: wel; }
.wel__i::before { content: counter(wel); position: absolute; right: 10px; top: 8px; width: 26px; height: 26px; border-radius: 50%; background: var(--gold); border: 2px solid var(--ink); font: 800 15px/22px var(--font-display); text-align: center; }
.wel__pic { display: flex; align-items: flex-end; height: 62px; overflow: hidden; }
.wel__pic--faces img { width: 46px; height: 46px; margin-right: -8px; border-radius: 50%; border: 2px solid var(--ink); object-fit: cover; }
.wel__stk { width: 110px; height: 110px; margin: 0 -34px -4px -32px; object-fit: contain; }
.wel__pic--cup { align-items: center; color: var(--gold-deep); }
.wel__h { font: 800 17px/1.1 var(--font-display); }
.wel__p { font-size: var(--body-max); line-height: 1.4; color: var(--muted); }
.wel__look { margin-top: 14px; font-size: var(--body-max); line-height: 1.6; }
.wel__form { margin-top: 16px; padding: 16px; border-radius: 20px; background: var(--paper); border: 2.5px solid var(--ink); display: flex; flex-direction: column; }
.wel__form .lbl { font: 800 18px/1.2 var(--font-display); }
.wel__ages { margin-top: 14px; border: 0; padding: 0; }
.enter .wel__go { flex: none; margin-top: 14px; align-self: stretch; }
@media (min-width: 761px) { .wel { grid-template-columns: repeat(4, minmax(0, 1fr)); } .col--welcome { width: min(100% - 32px, 720px); } }

.know { margin-top: 18px; padding-top: 14px; border-top: 2px dashed rgba(16, 36, 74, .25); }
.know__h { font: 800 17px/1.2 var(--font-display); }
.know__row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }

.tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 12px 0; order: 1; }
.mode { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--paper); border: 2.5px solid var(--ink); }
.mode__opt { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; font: 800 15px/1 var(--font-display); color: var(--ink); text-decoration: none; white-space: nowrap; }
.mode__opt.is-on { background: var(--ink); color: var(--cream); }
.cast { display: inline-flex; align-items: center; gap: 8px; min-height: 52px; padding: 4px 14px 4px 6px; border-radius: 999px; background: var(--gold-light); border: 2.5px solid var(--ink); color: var(--ink); cursor: pointer; font: 800 15px/1.15 var(--font-display); text-align: left; }
.cast__faces { display: flex; flex: none; }
.cast__faces img { width: 36px; height: 36px; margin-right: -8px; border-radius: 50%; border: 2px solid var(--ink); object-fit: cover; background: var(--cream); }
.cast__faces img:last-child { margin-right: 0; }
.cast__change { text-decoration: underline; text-underline-offset: 3px; font-size: 14px; }
.cast--check { margin-top: 12px; align-self: flex-start; }
.pane--say .tools { justify-content: center; }
.pane--say .mode { background: rgba(255, 255, 255, .92); }
.stuck { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font: 800 15px/1.2 var(--font-display); color: inherit; text-decoration: underline; text-underline-offset: 4px; }
.helper--watch { text-decoration: none; }
.in__when { margin-top: 8px; font: 800 17px/1.3 var(--font-display); color: var(--blue-deep); }

.castdlg { width: min(100% - 24px, 520px); max-height: calc(100svh - 24px); padding: 0; border: 3px solid var(--ink); border-radius: 26px; background: var(--cream); color: var(--ink); box-shadow: 0 8px 0 var(--ink); overflow: auto; }
.castdlg::backdrop { background: rgba(7, 22, 49, .6); }
.castdlg__in { display: flex; flex-direction: column; padding: 18px 16px 16px; }
.castdlg__title { font: 800 28px/1 var(--font-display); }
.castdlg__lede { margin-top: 6px; font-size: var(--body-max); color: var(--muted); }
.castdlg .pick { margin-top: 12px; }
.enter .castdlg__done { flex: none; margin-top: 12px; align-self: stretch; }
.castdlg .pick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.castdlg .pick li:last-child:nth-child(odd) { grid-column: 1 / -1; }
.castdlg .pick__card { grid-template-columns: 64px minmax(0, 1fr); grid-template-rows: auto auto; justify-items: start; text-align: left; padding: 10px 12px; }
.castdlg .pick__face { grid-row: 1 / 3; width: 64px; height: 64px; margin-bottom: 0; }
.castdlg .pick__tick { left: 52px; bottom: 6px; right: auto; top: auto; }

.stuck--say { color: #fff; }

.in__when { max-width: 58%; }
@media (min-width: 761px) { .in__when { max-width: 370px; } }

.wel__who { margin-top: 14px; }
.wel__skip { font: 700 var(--body-max)/1.4 var(--font-body); letter-spacing: 0; text-transform: none; color: var(--muted); white-space: nowrap; }
.wel__who .age__face { font-size: 15px; padding-inline: 6px; }

.wel__who .age__face { font-size: 13px; line-height: 1.1; text-align: center; white-space: normal; }

/* The child's optional answer, shown to the grown-up before sending. */
.said { margin-top: 16px; padding: 12px 14px; border-radius: 16px; background: var(--paper); border: 2px dashed rgba(16, 36, 74, .35); }
.said__line { font-size: var(--body-max); line-height: 1.5; }
.said__line strong { font: 800 16px/1 var(--font-display); }
.said__row { display: flex; gap: 18px; }
.said__row .linkbtn { min-height: 44px; }
.said__choices { margin: 6px 0 8px; }
.said__choices .age__face { font-size: 13px; line-height: 1.1; text-align: center; white-space: normal; }

.in__winners a { display: inline-flex; align-items: center; min-height: 44px; font: 800 16px/1 var(--font-display); color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }

/* ---- The mark: three states of one card (owner's design, 25 Nov 2026; js/mark-card.js). No screen says pass or fail. ---- */
.mark { position: relative; padding: 18px 18px 16px; border-radius: 22px; background: var(--paper); border: 2.5px solid var(--ink); box-shadow: 0 6px 0 var(--ink); color: var(--ink); }
.mark__sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: 0; }
.mark__eyebrow { margin: 0 0 12px; font: 800 12px/1.1 var(--font-label); letter-spacing: .12em; text-transform: uppercase; color: #01639a; }
.mark__title { margin: 0; font: 800 20px/1.15 var(--font-display); }
.mark__title--center, .mark__text--center { text-align: center; }
.mark__title--center { font-size: 18px; }
.mark__text { margin: 8px 0 0; font: 600 var(--body-max)/1.55 var(--font-body); color: var(--ink); }
.mark__text--center { max-width: 300px; margin-left: auto; margin-right: auto; }
.mark__wait { display: flex; align-items: center; justify-content: center; gap: 7px; width: 76px; height: 76px; margin: 4px auto 16px; border-radius: 50%; border: 2.5px solid #c9c6bd; outline: 1.5px dashed #c9c6bd; outline-offset: -9px; background: #f6f4ef; }
.mark__wait span { width: 9px; height: 9px; border-radius: 50%; background: var(--blue); }
html.motion .mark__wait span { animation: mark-dot 1.2s ease-in-out infinite; }
html.motion .mark__wait span:nth-child(2) { animation-delay: .15s; }
html.motion .mark__wait span:nth-child(3) { animation-delay: .3s; }
@keyframes mark-dot { 0%, 60%, 100% { transform: translateY(0); opacity: .55; } 30% { transform: translateY(-5px); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .mark__wait span { animation: none !important; } }

.mark__top { display: grid; grid-template-columns: 92px 1fr; gap: 14px; align-items: start; }
.mark__badge { position: relative; width: 88px; height: 100px; }
.mark__disc { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 88px; height: 88px; border-radius: 50%; border: 2.5px solid var(--ink); background: var(--gold); box-shadow: inset 0 0 0 5px var(--gold), inset 0 0 0 6.5px rgba(23, 33, 70, .45); }
.mark__disc::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; border: 1.5px dashed rgba(23, 33, 70, .45); }
.mark__num { font: 800 32px/1 var(--font-display); color: var(--ink); }
.mark__of { margin-top: 2px; font: 800 13px/1 var(--font-display); color: var(--ink); }
.mark__ribbon { position: absolute; bottom: 0; width: 18px; height: 26px; border: 2.5px solid var(--ink); border-radius: 3px 3px 6px 6px; background: #b8860b; }
.mark__ribbon--l { left: 24px; transform: rotate(8deg); }
.mark__ribbon--r { right: 24px; transform: rotate(-8deg); }
.mark--blue .mark__disc { background: var(--blue); box-shadow: inset 0 0 0 5px var(--blue), inset 0 0 0 6.5px rgba(255, 255, 255, .55); }
.mark--blue .mark__disc::before { border-color: rgba(255, 255, 255, .6); }
.mark--blue .mark__num, .mark--blue .mark__of { color: #fff; }
.mark--blue .mark__ribbon { background: #01639a; }

.mark__h { margin: 2px 0 6px; font: 800 16px/1.2 var(--font-display); }
.mark__list { margin: 0; padding: 0; list-style: none; }
.mark__list li { display: flex; gap: 8px; margin: 6px 0 0; font: 600 var(--body-max)/1.5 var(--font-body); }
.mark__bullet { flex: none; width: 14px; height: 14px; margin-top: 3px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.mark__bullet.is-filled { fill: var(--gold); stroke: none; }
.mark__list--try .mark__bullet { color: var(--blue); }
.mark__sec { margin-top: 14px; padding-top: 14px; border-top: 1.5px solid #e4e0d6; }
.mark__box { display: flex; gap: 10px; margin-top: 14px; padding: 12px 14px; border-radius: 14px; border: 1.5px solid #9ccbe8; background: #e4f2fb; }
.mark__box p { margin: 0; font: 700 var(--body-max)/1.5 var(--font-body); }
.mark__box p + p { margin-top: 4px; font-weight: 600; }
.mark__box-ico { flex: none; width: 16px; height: 16px; margin-top: 2px; fill: #01639a; }

.mark__how { margin-top: 14px; border-top: 1.5px solid #e4e0d6; }
.mark__how-sum { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 48px; cursor: pointer; list-style: none; font: 800 16px/1.2 var(--font-display); }
.mark__how-sum::-webkit-details-marker { display: none; }
.mark__how-sum:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 8px; }
.mark__chev { flex: none; width: 20px; height: 20px; fill: none; stroke: var(--ink); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
.mark__how[open] .mark__chev { transform: rotate(180deg); }
@media (prefers-reduced-motion: reduce) { .mark__chev { transition: none; } }
.mark__parts { margin: 0; padding: 0; list-style: none; }
.mark__part { display: grid; grid-template-columns: 1fr auto 34px; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid #ece8de; }
.mark__part:last-child { border-bottom: 0; }
.mark__part-name { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; font: 800 14px/1.25 var(--font-display); }
.mark__grow { padding: 3px 7px; border-radius: 6px; background: var(--gold); border: 1.5px solid var(--ink); font: 800 10px/1 var(--font-label); letter-spacing: .1em; text-transform: uppercase; }
.mark__dots { display: flex; gap: 4px; }
.mark__dots span { width: 11px; height: 11px; border-radius: 50%; border: 1.5px solid var(--blue); }
.mark__dots span.is-on { background: var(--blue); }
.mark__part-n { font: 800 14px/1 var(--font-display); text-align: right; }
.mark__note { margin: 8px 0 4px; font: 600 var(--body-max)/1.5 var(--font-body); color: #b0281f; }
.enter .mark__revise { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 52px; margin-top: 16px; }
.mark__revise-ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.mark__foot { margin: 14px 0 0; font: 600 var(--body-max)/1.5 var(--font-body); color: var(--muted); }
@media (min-width: 761px) { .mark { max-width: 560px; margin: 0 auto; padding: 22px 24px 20px; } .in__ai-body > p { max-width: 560px; margin-left: auto; margin-right: auto; } }
