/* The guided chat on /yarat/ (js/chat.js), styled by the user's chat style pack v1.2 (2026-11-03): one header bar
   with a progress line, borderless bubbles under one avatar per run, a floating answer panel of tonal pills, cards
   whose rows are buttons, bottom sheets. Only the site's tokens (css/tokens.css); the pack's roles map to them:
     --bg -> --c-bg      --surface -> --c-surface   --ink -> --c-ink      --muted -> --c-muted
     --primary -> --c-brand   --on-primary -> --c-on-brand   --primary-tint -> --chat-tint (brand at 7%)
     --hairline -> --c-line   --accent -> --c-gold   --success -> --c-ok (gold; no green, pages pack v1.3)   errors -> --c-error   focus -> --c-focus
     radii 20/22 -> --radius, 24/28 -> --radius-lg, 14/16 -> --radius-control */
.make-page {
  --chat-tint: color-mix(in srgb, var(--c-brand) 7%, transparent);
  --chat-tint-hover: color-mix(in srgb, var(--c-brand) 12%, transparent);
  --chat-soft: 0 1px 2px color-mix(in srgb, var(--c-ink) 6%, transparent), 0 4px 14px color-mix(in srgb, var(--c-ink) 4%, transparent);
  --chat-float: 0 10px 30px color-mix(in srgb, var(--c-ink) 10%, transparent);
  --chat-col: 720px;
}
.ic { display: inline-grid; width: 20px; height: 20px; flex: none; }
.ic svg { width: 100%; height: 100%; }
.icon-btn { display: grid; place-items: center; padding: 0; border: 0; background: none; color: inherit; cursor: pointer; }

/* ---------- the header: one bar (pack §1) ---------- */
.make-top.chat-top {
  gap: 8px; min-height: 64px;
  padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 12px max(12px, env(safe-area-inset-left));
  background: color-mix(in srgb, var(--c-bg) 86%, transparent); border-bottom: 1px solid var(--c-line);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.chat-top .logo { display: none; }
.chat-top .back-btn, .chat-top .lang-btn, .chat-top .chat-restart {
  flex: none; width: 40px; height: 40px; min-width: 40px; min-height: 40px; padding: 0; display: grid; place-items: center;
  border: 1px solid var(--c-line); border-radius: 50%; background: var(--c-surface); color: var(--c-ink); opacity: 1;
}
.chat-top .lang-btn { font-size: 13px; letter-spacing: .04em; }
.chat-top .back-btn .ic, .chat-top .chat-restart .ic { width: 20px; height: 20px; }
.chat-head { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; }
.chat-avatar { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; flex: none; transition: box-shadow .2s ease-out; }
.chat-avatar.typing { box-shadow: 0 0 0 2px var(--c-bg), 0 0 0 4px var(--c-gold); }
.chat-who { min-width: 0; display: grid; line-height: 1.25; }
.chat-who b { font-size: 16px; color: var(--c-ink); }
.chat-who small { overflow: hidden; font-size: 13px; color: var(--c-muted); white-space: nowrap; text-overflow: ellipsis; }
.chat-who small:not(.typing)::first-letter { text-transform: uppercase; }
.chat-who small.typing { color: var(--c-brand); }
.chat-bar { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: color-mix(in srgb, var(--c-brand) 10%, transparent); }
.chat-bar span { display: block; width: 0; height: 100%; background: var(--c-brand); transition: width .4s ease-out; }

/* ---------- the chat fills the screen under the header; only the message list scrolls ---------- */
.make-page:has(.make-chat) { padding-bottom: 0; }
.make-layout.make-chat {
  display: flex; flex-direction: column; gap: 0; max-width: none; padding: 0;
  height: calc(var(--chat-vh, 100dvh) - var(--chat-top, 65px));
}
.chat-panel { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; }
.chat-log {
  flex: 1; min-height: 0; display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain;
  padding: 18px max(16px, calc((100% - var(--chat-col)) / 2)) 40px; scrollbar-width: thin;
}
.chat-log > * { flex-shrink: 0; }      /* a card that clips its corners must not shrink to nothing */
.chat-log > :first-child { margin-top: auto; }      /* a short chat sits at the bottom, by the answers */
.chat-log > * + * { margin-top: 10px; }
.chat-log > .cb-santa + .cb-santa, .chat-log > .cb-me + .cb-me { margin-top: 4px; }
.chat-log > .cb-santa + .cb-card, .chat-log > .cb-santa + .cb-done { margin-top: 6px; }
.chat-new {
  position: relative; z-index: 3; align-self: center; margin: -46px 0 8px; min-height: 36px; padding: 0 14px;
  border: 1px solid var(--c-line); border-radius: var(--radius-pill); background: var(--c-surface); color: var(--c-ink);
  font: 600 14px var(--font-body); box-shadow: var(--chat-float); cursor: pointer;
}

/* ---------- the messages (pack §2) ---------- */
.cb-row { display: flex; align-items: flex-end; gap: 8px; }
.cb-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex: none; visibility: hidden; }
.cb-santa.last .cb-avatar { visibility: visible; }
.cb { margin: 0; max-width: min(85%, 560px); padding: 10px 15px; border-radius: var(--radius); font-size: 16px; line-height: 1.45; white-space: pre-line; overflow-wrap: anywhere; }
.cb-santa .cb { border-bottom-left-radius: 6px; background: var(--c-surface); color: var(--c-ink); box-shadow: var(--chat-soft); }
.cb-name { color: var(--c-brand); font-weight: 700; }
.cb-me { justify-content: flex-end; align-items: center; gap: 4px; }
.cb-me .cb { border-bottom-right-radius: 6px; background: var(--c-brand); color: var(--c-on-brand); font-weight: 500; }
.cb-pen { flex: none; width: 34px; height: 34px; border-radius: 50%; color: color-mix(in srgb, var(--c-muted) 40%, transparent); transition: color .15s, background-color .15s; }
.cb-pen .ic { width: 17px; height: 17px; }
.cb-pen:hover, .cb-pen:focus-visible { color: var(--c-muted); background: color-mix(in srgb, var(--c-ink) 5%, transparent); }
/* a photo or the letter as itself, no bubble round it */
.cb-media { margin: 0; display: grid; justify-items: end; gap: 4px; }
.cb-pics img { display: block; width: 132px; height: 164px; object-fit: cover; border-radius: var(--radius); border-bottom-right-radius: 6px; background: var(--c-surface-2); box-shadow: var(--chat-soft); }
.cb-pics.grid { display: grid; grid-template-columns: repeat(2, 76px); gap: 4px; }
.cb-pics.grid img { width: 76px; height: 76px; border-radius: var(--radius-control); }
.cb-media figcaption { font-size: 12px; color: var(--c-muted); }
.cb-media figcaption::first-letter, .cb-cap::first-letter { text-transform: uppercase; }
.cb-typing { display: inline-flex; gap: 4px; padding: 15px; }
.cb-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--c-muted); opacity: .35; animation: cb-dot 1s infinite; }
.cb-typing span:nth-child(2) { animation-delay: .15s; }
.cb-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes cb-dot { 0%, 60%, 100% { opacity: .3; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }
/* the sample film: a poster card that plays in place */
.cb-video { position: relative; flex: none; width: min(264px, 75%); overflow: hidden; border-radius: var(--radius); background: var(--c-night-2); box-shadow: 0 6px 20px color-mix(in srgb, var(--c-ink) 14%, transparent); }
.cb-video-btn { position: relative; display: block; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; }
.cb-video-btn img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.cb-video-len {
  position: absolute; left: 10px; top: 10px; display: inline-flex; align-items: center; gap: 3px; height: 24px; padding: 0 9px 0 6px;
  border-radius: var(--radius-pill); background: rgba(0, 0, 0, .45); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  color: #fff; font-size: 12px; font-weight: 700;
}
.cb-video-len .ic { width: 13px; height: 13px; }
.cb-video-play { position: absolute; left: 50%; top: 50%; display: grid; place-items: center; width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%; background: rgba(255, 255, 255, .92); color: var(--c-ink); box-shadow: 0 4px 14px rgba(0, 0, 0, .25); }
.cb-video-play .ic { width: 20px; height: 20px; margin-left: 3px; }
.cb-video-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 14px 11px; background: linear-gradient(transparent, rgba(0, 0, 0, .66)); color: #fff; font-size: 14px; font-weight: 700; text-align: left; }
.cb-video video { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: #000; }

/* ---------- the cards: one style, rows that are buttons (pack §7, §8, §10) ---------- */
.cb-card { margin-left: 36px; max-width: 560px; overflow: hidden; border-radius: var(--radius); background: var(--c-surface); box-shadow: var(--chat-soft); }
.cb-cards { display: grid; gap: 10px; }
.cb-cards > .cb-card { margin-left: 36px; }
.cb-srow {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 10px 16px;
  border: 0; border-top: 1px solid var(--c-line); background: none; color: var(--c-ink); font: inherit; text-align: left;
}
button.cb-srow { cursor: pointer; transition: background-color .15s; }
@media (hover: hover) { button.cb-srow:hover { background: color-mix(in srgb, var(--c-brand) 4%, transparent); } }
button.cb-srow:focus-visible { outline-offset: -3px; }
.cb-card > .cb-srow:first-child { border-top: 0; }
.cb-srow-text { flex: 1; min-width: 0; display: grid; gap: 1px; }
.cb-k { font-size: 13px; color: var(--c-muted); }
.cb-v { font-size: 16px; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.cb-q { margin-top: 3px; font-size: 14px; line-height: 1.4; color: var(--c-muted); }
.cb-thumb { flex: none; width: 36px; height: 36px; border-radius: 10px; object-fit: cover; background: var(--c-surface-2); }
.cb-pen-i { display: grid; flex: none; color: var(--c-muted); opacity: .75; }
.cb-pen-i .ic { width: 16px; height: 16px; }
.cb-sum-head { padding-block: 12px; }
.cb-sum-poster { flex: none; width: 52px; height: 52px; border-radius: var(--radius-control); object-fit: cover; }
.cb-title { font-size: 17px; font-weight: 700; }
.cb-sum-kid { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px 2px; border-top: 1px solid var(--c-line); font-size: 15px; }
.cb-sum-kid + .cb-srow { border-top: 0; }
.cb-card > .cb-sum-kid:first-child { border-top: 0; }
.cb-sum-kid .cb-sum-rm { flex: none; min-height: 36px; padding: 4px 12px; font-size: 14px; }
/* Santa's script: the full line, and a small "Dəyiş ›" pill that opens its choices */
.cb-script .cb-v { font-size: 15px; }
.cb-pill { flex: none; display: inline-flex; align-items: center; gap: 2px; height: 30px; padding: 0 8px 0 12px; border-radius: var(--radius-pill); background: var(--chat-tint); color: var(--c-brand); font-size: 12px; font-weight: 700; }
.cb-pill .ic { width: 14px; height: 14px; }
.cb-srow.flash { animation: cb-flash .6s ease-out; }
@keyframes cb-flash { 0%, 35% { background: color-mix(in srgb, var(--c-gold) 14%, transparent); } }
.cb-done { margin-left: 36px; align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px 7px 10px; border-radius: var(--radius-pill); background: var(--c-surface); box-shadow: var(--chat-soft); font-size: 14px; color: var(--c-muted); }
.cb-done .ic { width: 16px; height: 16px; color: var(--c-ok); }

/* ---------- the bottom: no bar, one floating panel, messages scroll under its fade (pack §3) ---------- */
.chat-bottom {
  position: relative; z-index: 2; flex: none; margin-top: -30px;
  padding: 30px max(12px, env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  background: linear-gradient(to bottom, transparent, var(--c-bg) 30px);
}
.chat-bottom > * { max-width: var(--chat-col); margin-inline: auto; }
.chat-composer { display: grid; gap: 6px; }
.chat-composer:empty { display: none; }
.chat-composer > .hint, .chat-composer > .cb-err { margin: 0; padding: 0 14px; font-size: 12px; }
.chat-panel #make-turnstile:empty, .chat-panel #make-turnstile-msg:empty { display: none; }
.cb-panel {
  display: grid; gap: 8px; max-height: 50vh; overflow-y: auto; padding: 8px;
  border: 1px solid var(--c-line); border-radius: var(--radius-lg); background: var(--c-surface); box-shadow: var(--chat-float);
  transition: border-color .15s, box-shadow .15s;
}
.cb-panel.pay { gap: 12px; padding: 14px; }
.cb-panel:has(.cb-input:focus) { border-color: color-mix(in srgb, var(--c-brand) 45%, transparent); box-shadow: var(--chat-float), 0 0 0 4px color-mix(in srgb, var(--c-brand) 10%, transparent); }
.cb-panel:has(.cb-input[aria-invalid="true"]) { border-color: var(--c-error); }

/* the answers: tonal pills sharing rows; the quiet one for the less common answer (pack §4) */
.cb-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.cb-chip {
  flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 8px 18px;
  border: 0; border-radius: var(--radius-pill); background: var(--chat-tint); color: var(--c-brand);
  font: 500 16px/1.25 var(--font-body); text-align: center; cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: background-color .15s, color .15s, transform .1s;
}
.cb-chip .ic { width: 18px; height: 18px; }
.cb-chip:active { transform: scale(.97); }
.cb-chip.quiet { background: transparent; color: var(--c-muted); }
.cb-chip.on, .cb-chip.cb-main { background: var(--c-brand); color: var(--c-on-brand); }
/* the letter written on /letter/ (js/chat.js pendingChip): a small picture of it in the chip */
.cb-chip-letter img { flex: none; width: 26px; height: 36px; margin: -6px 0; object-fit: cover; border-radius: 3px; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
@media (hover: hover) {
  .cb-chip:hover { background: var(--chat-tint-hover); }
  .cb-chip.quiet:hover { background: color-mix(in srgb, var(--c-ink) 5%, transparent); }
  .cb-chip.on:hover, .cb-chip.cb-main:hover { background: var(--c-brand-hover); }
}
.cb-ages { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cb-ages .cb-chip { padding: 0; border-radius: var(--radius-control); font-weight: 700; }
.cb-wide { flex: none; width: 100%; min-height: 50px; font-weight: 600; }
/* the name: a borderless field and the send arrow inside the panel (pack §5) */
.cb-form { display: flex; align-items: center; gap: 8px; }
.cb-input { flex: 1; min-width: 0; height: 48px; padding: 0 12px; border: 0; background: transparent; color: var(--c-ink); font: 400 17px var(--font-body); }
.cb-input::placeholder { color: var(--c-muted); opacity: .85; }
.cb-input:focus, .cb-input:focus-visible { outline: none; }
.cb-send { flex: none; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: var(--c-brand); color: var(--c-on-brand); cursor: pointer; transition: background-color .15s, color .15s; }
.cb-send .ic { width: 22px; height: 22px; }
.cb-send:disabled { background: color-mix(in srgb, var(--c-ink) 7%, transparent); color: color-mix(in srgb, var(--c-ink) 35%, transparent); cursor: default; }
.cb-err { font-size: 14px; }
/* the photos waiting to be sent */
.cb-tray { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px; }
.cb-tray .thumb { width: 64px; height: 64px; border-radius: var(--radius-control); }
.cb-tray .thumb .rm { width: 28px; height: 28px; right: 3px; top: 3px; font-size: 16px; }
.cb-tray .thumb .extra { position: absolute; left: 3px; bottom: 3px; padding: 1px 6px; border-radius: var(--radius-pill); background: var(--c-brand); color: #fff; font-size: 11px; font-weight: 700; }
.cb-slot { position: relative; display: grid; place-items: center; width: 64px; height: 64px; border: 1.5px dashed var(--c-line-strong); border-radius: var(--radius-control); font-size: 28px; color: var(--c-muted); cursor: pointer; }
.cb-slot:focus-within { outline: 2px solid var(--c-focus); outline-offset: 2px; }
/* the last steps' big buttons, one above the other (pack §7, §8) */
.cb-actions { display: grid; gap: 10px; }
.cb-go { gap: 8px; min-height: 54px; border-radius: var(--radius-pill); font-size: 17px; font-weight: 700; box-shadow: 0 8px 22px color-mix(in srgb, var(--c-brand) 26%, transparent); transition: background-color .15s, color .15s, box-shadow .15s; }
.cb-go .ic { width: 16px; height: 16px; }
.cb-go:disabled, .cb-go[aria-disabled="true"] { opacity: 1; background: color-mix(in srgb, var(--c-ink) 8%, transparent); color: color-mix(in srgb, var(--c-ink) 40%, transparent); box-shadow: none; }
/* the consent: one sentence with its links, the box never ticked for the parent (pack §10) */
.cb-panel .make-consent.cb-pay { display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start; padding: 0; border: 0; font-size: 14px; line-height: 1.45; color: var(--c-muted); }
.cb-pay input { width: 22px; height: 22px; margin: 0; accent-color: var(--c-brand); cursor: pointer; }
.cb-pay label { cursor: pointer; }
.cb-pay a { color: var(--c-ink); text-decoration-color: color-mix(in srgb, var(--c-ink) 35%, transparent); text-underline-offset: 3px; }
.chat-composer > #chat-pay-hint { text-align: center; }
.cb-further { display: block; justify-self: center; min-height: 36px; padding: 4px 8px; font-size: 14px; font-weight: 500; color: var(--c-muted); text-decoration: none; }

/* ---------- the bottom sheet (pack §9) ---------- */
.bs-scrim { position: fixed; inset: 0; z-index: 70; display: flex; align-items: flex-end; justify-content: center; background: color-mix(in srgb, var(--c-ink) 32%, transparent); animation: bs-in .2s ease-out; }
.bs {
  display: flex; flex-direction: column; width: 100%; max-width: 560px; max-height: 78%;
  padding: 6px 16px calc(16px + env(safe-area-inset-bottom)); border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: var(--c-surface); box-shadow: 0 -10px 30px color-mix(in srgb, var(--c-ink) 10%, transparent);
  animation: bs-up .2s ease-out; transition: transform .2s ease-out;
}
.bs.drag { transition: none; }
.bs:focus { outline: none; }
.bs-scrim.out { animation: bs-out .2s ease-in forwards; }
.bs-scrim.out .bs { animation: bs-down .2s ease-in forwards; }
@keyframes bs-in { from { opacity: 0; } }
@keyframes bs-out { to { opacity: 0; } }
@keyframes bs-up { from { transform: translateY(100%); } }
@keyframes bs-down { to { transform: translateY(100%); } }
.bs-grip { flex: none; width: 40px; height: 4px; margin: 4px auto 8px; border-radius: 2px; background: var(--c-line); }
.bs-head { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 0 12px; }
.bs-head h2 { margin: 0; font: 700 17px/1.3 var(--font-body); color: var(--c-ink); }
.bs-x { flex: none; width: 36px; height: 36px; border-radius: 50%; background: color-mix(in srgb, var(--c-ink) 6%, transparent); color: var(--c-ink); }
.bs-x .ic { width: 18px; height: 18px; }
.bs-body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.bs-search { display: flex; align-items: center; gap: 10px; height: 48px; margin-bottom: 4px; padding: 0 16px; border-radius: var(--radius-pill); background: color-mix(in srgb, var(--c-ink) 5%, transparent); color: var(--c-muted); }
.bs-search:focus-within { outline: 2px solid var(--c-focus); outline-offset: 2px; }
.bs-find { flex: 1; min-width: 0; height: 100%; border: 0; background: none; color: var(--c-ink); font: 400 16px var(--font-body); }
.bs-find:focus-visible { outline: none; }
.bs-find::placeholder { color: var(--c-muted); }
.bs-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 52px; padding: 0 8px; border: 0; border-bottom: 1px solid var(--c-line); background: none; color: var(--c-ink); font: 400 16px var(--font-body); text-align: left; cursor: pointer; }
.bs-row:focus-visible { outline-offset: -3px; }
.bs-row[aria-current="true"] { font-weight: 700; color: var(--c-brand); }
.bs-row .ic { width: 20px; height: 20px; color: var(--c-brand); }
.bs-empty { margin: 0; padding: 16px 8px; color: var(--c-muted); font-size: 15px; }
.bs-opts { display: grid; gap: 10px; padding: 2px 0 4px; }
.bs-opt { display: flex; align-items: flex-start; gap: 14px; width: 100%; padding: 14px 16px; border: 1px solid var(--c-line); border-radius: var(--radius); background: var(--c-surface); color: var(--c-ink); font: inherit; text-align: left; cursor: pointer; }
.bs-opt:focus-visible { outline-offset: -5px; }
.bs-opt[aria-checked="true"] { padding: 13.5px 15.5px; border: 1.5px solid var(--c-brand); background: color-mix(in srgb, var(--c-brand) 5%, var(--c-surface)); }
.bs-dot { flex: none; width: 22px; height: 22px; margin-top: 1px; border: 1.5px solid var(--c-control-border); border-radius: 50%; }
.bs-opt[aria-checked="true"] .bs-dot { border-color: var(--c-brand); background: radial-gradient(circle, var(--c-brand) 0 5px, transparent 5.5px); }
.bs-opt-text { display: grid; gap: 4px; }
.bs-opt-text b { font-size: 16px; font-weight: 600; line-height: 1.4; }
.bs-opt-text i { font-size: 14px; line-height: 1.4; color: var(--c-muted); }

/* ---------- the rest of /yarat/ in the pack's look: the full-screen sheets (the letter's corners, the letter
   builder), the restart question, the email field ---------- */
.make-page .sheet-bar {
  min-height: 64px; padding: max(12px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 12px max(16px, env(safe-area-inset-left));
}
.make-page .sheet-bar b { font-size: 17px; }
.make-page .sheet-light .sheet-bar { background: color-mix(in srgb, var(--c-bg) 86%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.make-page .sheet-bar .sheet-x { flex: none; width: 40px; height: 40px; min-width: 40px; min-height: 40px; border: 1px solid var(--c-line); border-radius: 50%; background: var(--c-surface); color: var(--c-ink); }
.make-page .sheet:not(.sheet-light) .sheet-bar .sheet-x { border-color: rgba(248, 239, 226, .25); background: rgba(248, 239, 226, .1); color: #F8EFE2; }
.make-page .sheet .crop { border-radius: var(--radius); box-shadow: var(--chat-soft); }
.make-page .sheet .hint { text-align: center; }
.cb-overlay { background: color-mix(in srgb, var(--c-ink) 32%, transparent); }
.cb-dialog { padding: 24px 20px 20px; }
.cb-dialog h2 { margin-bottom: 18px; font-size: 20px; line-height: 1.3; }
.cb-panel .field { display: grid; gap: 6px; }
.cb-panel .field label { font-size: 14px; font-weight: 600; color: var(--c-ink); }
.cb-panel .field .hint { font-size: 12px; }
.cb-panel .input { min-height: 48px; padding: 0 16px; border: 1px solid var(--c-line); border-radius: var(--radius-pill); background: var(--c-surface); font-size: 16px; }
.cb-panel .input:focus-visible { outline: none; border-color: color-mix(in srgb, var(--c-brand) 45%, transparent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c-brand) 10%, transparent); }
.cb-panel .input[aria-invalid="true"] { border-color: var(--c-error); }

/* changing an answer in a sheet: the name field, notes, the letter's choices */
.bs-form { display: grid; gap: 12px; padding: 4px; }   /* room for the field's focus glow */
.bs-input { width: 100%; height: 52px; padding: 0 18px; border: 1px solid var(--c-line); border-radius: var(--radius-pill); background: var(--c-surface); color: var(--c-ink); font: 400 17px var(--font-body); }
.bs-input:focus-visible { outline: none; border-color: color-mix(in srgb, var(--c-brand) 45%, transparent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c-brand) 10%, transparent); }
.bs-note { margin: 4px 2px 10px; font-size: 13px; color: var(--c-muted); }
.bs-body .cb-tray { margin-bottom: 4px; }
.bs-body .cb-actions { margin-top: 4px; }
label.bs-opt { position: relative; }

/* the name in Santa's voice: a voice message (play, the sound as bars, the length) */
.cb-voice-msg { display: grid; gap: 6px; }
.cb-voice { display: flex; align-items: center; gap: 10px; min-width: 210px; }
.cb-play { flex: none; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: var(--c-brand); color: var(--c-on-brand); cursor: pointer; }
.cb-play .ic { width: 18px; height: 18px; }
.cb-play .ic-play { margin-left: 2px; }
.cb-voice-bars { flex: 1; display: flex; align-items: center; gap: 3px; height: 28px; }
.cb-voice-bars i { flex: none; width: 3px; border-radius: 2px; background: color-mix(in srgb, var(--c-ink) 22%, transparent); transition: background-color .1s; }
.cb-voice-bars i.on { background: var(--c-brand); }
.cb-voice-time { min-width: 2.4em; font-size: 13px; color: var(--c-muted); font-variant-numeric: tabular-nums; }
.cb-voice-note { font-size: 12px; color: var(--c-muted); }
.cb-voice-item { display: grid; gap: 4px; }
.cb-voice-item + .cb-voice-item { padding-top: 8px; border-top: 1px solid var(--c-line); }
.cb-voice-label { font-size: 14px; letter-spacing: .02em; color: var(--c-ink); }
.cb-voice-wait { display: inline-flex; align-items: center; gap: 10px; color: var(--c-muted); }
.cb-dots { display: inline-flex; gap: 4px; }
.cb-dots span { width: 6px; height: 6px; border-radius: 50%; background: var(--c-muted); opacity: .35; animation: cb-dot 1s infinite; }
.cb-dots span:nth-child(2) { animation-delay: .15s; }
.cb-dots span:nth-child(3) { animation-delay: .3s; }
.bs-voice { margin-bottom: 14px; }
.bs-voice .cb { max-width: 100%; box-shadow: var(--chat-soft); border-bottom-left-radius: 6px; background: var(--c-surface); }
.bs-voice-q { font-size: 15px; color: var(--c-ink); }

/* ---------- motion (pack §11) ---------- */
.cb-in { animation: cb-in .25s ease-out both; }
@keyframes cb-in { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) {
  .cb-in, .cb-srow.flash, .bs-scrim, .bs, .bs-scrim.out, .bs-scrim.out .bs { animation: none; }
  .chat-bar span, .chat-avatar, .cb-chip, .cb-send, .cb-go, .bs { transition: none; }
  .cb-typing span, .cb-dots span { animation: none; opacity: .6; }
}

@media (min-width: 900px) {
  .chat-top .logo { display: block; margin-right: 10px; }
  .chat-top .logo img { height: 26px; width: auto; }
  .cb { font-size: 17px; }
  .cb-ages { grid-template-columns: repeat(8, minmax(0, 1fr)); }
  /* the sheet in the middle of a wide screen */
  .bs-scrim { align-items: center; padding: 24px; }
  .bs { max-height: 80%; padding-bottom: 20px; border-radius: var(--radius-lg); }
}
