/* Ask what to watch — the chat panel (media/ask.js). The house style:
   walnut panel, brass hairlines, plates and a plaque, Fredoka words.
   Shared by the desktop page and the phone (/m), which both declare the
   --hearth-* tokens; the fallbacks keep it whole on a page that does not. */

.ask-dialog {
  --ak-ink: var(--hearth-ink, #0b0806);
  --ak-cream: var(--hearth-cream, #fff3de);
  --ak-amber: var(--hearth-amber, #f6b544);
  --ak-brass: var(--hearth-brass, #c9973f);
  --ak-brass-hi: var(--hearth-brass-hi, #f0c46a);
  --ak-edge: var(--hearth-brass-edge, rgba(216, 168, 74, .36));
  --ak-line: var(--hearth-line, rgba(255, 201, 148, .13));
  --ak-well: var(--hearth-well, rgba(0, 0, 0, .28));
  --ak-grain: var(--hearth-grain, repeating-linear-gradient(176deg, rgba(255, 255, 255, .02) 0 2px, transparent 2px 7px));
  --ak-plate: var(--hearth-plate, linear-gradient(180deg, #2c2016 0%, #1e150e 62%, #18110b 100%));
  --ak-plate-hi: var(--hearth-plate-hi, linear-gradient(180deg, #38291c 0%, #241910 100%));
  --ak-plaque: var(--hearth-plaque, linear-gradient(180deg, #3d2717 0%, #2a1a0f 58%, #20140c 100%));
  --ak-plaque-hi: var(--hearth-plaque-hi, linear-gradient(180deg, #47301c 0%, #2f1d11 58%, #22150c 100%));
  --ak-panel: var(--hearth-panel, linear-gradient(180deg, #1b140e 0%, #14100b 100%));
  --ak-font: var(--hearth-font, 'Fredoka', ui-rounded, system-ui, sans-serif);
  --ak-pop: var(--hearth-pop, cubic-bezier(.34, 1.56, .64, 1));
  --ak-ease: var(--hearth-ease, cubic-bezier(.16, 1, .3, 1));
  --ak-muted: rgba(255, 236, 210, .62);
  --ak-gutter: 22px;

  position: fixed;
  inset: 0 0 0 auto;
  width: min(580px, 100vw);
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ak-cream);
  font-family: var(--ak-font);
  overflow: visible;
}
.ask-dialog::backdrop {
  background: radial-gradient(900px 600px at 100% 50%, rgba(10, 6, 3, .45), rgba(10, 6, 3, .62));
  backdrop-filter: blur(2px);
}
.ask-dialog[open] { display: block; }

.ask-sheet {
  height: 100%;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto auto auto;
  background: var(--ak-grain), var(--ak-panel);
  border-left: 1px solid var(--ak-edge);
  box-shadow: -1.5px 0 0 var(--ak-ink), -24px 0 60px rgba(0, 0, 0, .55);
}

/* Each part owns its row, so hiding the model control or the composer (history,
   settings) never slides the body into an auto-height row. */
.ask-head { grid-row: 1; }
.ask-models { grid-row: 2; }
.ask-body { grid-row: 3; }
.ask-next { grid-row: 4; }
.ask-compose { grid-row: 5; }
.ask-foot { grid-row: 6; }
.ask-foot[hidden] { display: none; }

.ask-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── head ─────────────────────────────────────────────────────────────── */
.ask-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 18px var(--ak-gutter) 14px;
  border-bottom: 1px solid var(--ak-line);
}
.ask-mark { width: 44px; height: 44px; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .5)); }
.ask-heading { min-width: 0; }
.ask-heading h2 {
  margin: 0;
  font: 600 20px/1.2 var(--ak-font);
  letter-spacing: .01em;
  color: var(--ak-cream);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ask-sub { margin: 3px 0 0; font-size: 12.5px; line-height: 1.3; color: var(--ak-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ask-tools { display: flex; gap: 8px; }
.ask-plate {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  padding: 0;
  background: var(--ak-grain), var(--ak-plate);
  border: 1px solid var(--ak-edge);
  border-radius: 10px;
  box-shadow: inset 0 1px 0 rgba(255, 226, 170, .16), 0 0 0 1.5px var(--ak-ink), 0 2px 0 1.5px var(--ak-ink);
  color: var(--ak-brass-hi);
  font: 400 24px/1 var(--ak-font);
  cursor: pointer;
  transition: transform .18s var(--ak-pop), border-color .14s, background .14s;
}
.ask-plate img { width: 22px; height: 22px; }
.ask-plate:hover { background: var(--ak-grain), var(--ak-plate-hi); border-color: var(--ak-brass-hi); transform: translateY(-1px); }
.ask-plate:active { transform: translateY(2px); box-shadow: inset 0 1px 0 rgba(255, 226, 170, .12), 0 0 0 1.5px var(--ak-ink); }
.ask-plate[aria-pressed="true"] { border-color: var(--ak-brass); background: radial-gradient(80% 120% at 50% 0, rgba(255, 170, 80, .22), transparent 72%), var(--ak-grain), var(--ak-plaque); }
.ask-plate[hidden] { display: none; }

/* ── model picker: one segmented control ─────────────────────────────── */
.ask-models {
  display: grid;
  grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr));
  margin: 14px var(--ak-gutter) 4px;
  padding: 3px;
  background: var(--ak-well);
  border: 1px solid var(--ak-line);
  border-radius: 12px;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, .35);
}
.ask-models[hidden] { display: none; }
.ask-model {
  min-width: 0;
  display: grid; gap: 1px; justify-items: center;
  padding: 7px 6px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--ak-muted);
  font-family: var(--ak-font);
  cursor: pointer;
  transition: color .14s, background .2s, border-color .2s;
}
.ask-model-name { font: 600 14px/1.2 var(--ak-font); white-space: nowrap; }
.ask-model-blurb { font-size: 11.5px; line-height: 1.2; opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.ask-model:hover { color: var(--ak-cream); }
.ask-model[aria-checked="true"] {
  color: var(--ak-cream);
  background: radial-gradient(70% 120% at 50% 0, rgba(255, 170, 80, .2), transparent 72%), var(--ak-grain), var(--ak-plaque);
  border-color: var(--ak-brass);
  box-shadow: inset 0 1px 0 rgba(255, 226, 170, .28), 0 1px 0 var(--ak-ink);
}
.ask-model[aria-checked="true"] .ask-model-name { color: var(--ak-brass-hi); }
.ask-model:focus-visible { outline: 2px solid var(--ak-brass-hi); outline-offset: 1px; }

/* ── the scrolling body ──────────────────────────────────────────────── */
.ask-body {
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;   /* /m's rule: a vertical scroller names it, or iOS pans the column sideways (docs/claude/ui.md) */
  overscroll-behavior: contain;
  padding: 16px var(--ak-gutter) 22px;
  scrollbar-gutter: stable;
}
.ask-body > [hidden] { display: none; }

/* empty: the ticket, a line, and four ways to start */
.ask-empty {
  min-height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px;
  text-align: center;
  padding: 8px 0 4px;
}
.ask-empty-art {
  width: clamp(88px, 22vh, 132px); height: auto; aspect-ratio: 1;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .55)) drop-shadow(0 0 28px rgba(246, 181, 68, .14));
  animation: ask-float 6s ease-in-out infinite;
}
@keyframes ask-float { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-6px) rotate(1.5deg); } }
.ask-empty h3 { margin: 6px 0 0; font: 600 23px/1.2 var(--ak-font); color: var(--ak-cream); text-wrap: balance; }
.ask-empty p { margin: 0; max-width: 44ch; font-size: 14.5px; line-height: 1.55; color: var(--ak-muted); text-wrap: pretty; }
.ask-starters {
  list-style: none; margin: 14px 0 0; padding: 0;
  width: 100%;
  display: grid; gap: 10px;
}
.ask-starter {
  width: 100%; min-height: 56px;
  display: grid; gap: 2px; justify-items: start; align-content: center;
  padding: 10px 16px;
  background: var(--ak-grain), var(--ak-plate);
  border: 1px solid var(--ak-edge);
  border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 226, 170, .12), 0 0 0 1.5px var(--ak-ink), 0 2px 0 1.5px var(--ak-ink);
  color: var(--ak-cream);
  font-family: var(--ak-font);
  text-align: left;
  cursor: pointer;
  transition: transform .2s var(--ak-pop), border-color .14s, background .14s;
}
.ask-starter-text { font: 550 15px/1.3 var(--ak-font); }
.ask-starter-note { font-size: 12.5px; color: var(--ak-muted); }
.ask-starter:hover { background: var(--ak-grain), var(--ak-plate-hi); border-color: var(--ak-brass-hi); transform: translateX(3px); }
.ask-starter:active { transform: translateY(2px); }
.ask-starter:focus-visible, .ask-pick-art:focus-visible, .ask-pick-go:focus-visible, .ask-thread-open:focus-visible { outline: 2px solid var(--ak-brass-hi); outline-offset: 3px; }
.ask-empty.is-blocked h3 { color: var(--ak-brass-hi); }

/* messages */
.ask-chat { display: grid; gap: 18px; align-content: start; min-height: 100%; }
.ask-msg { min-width: 0; }
.ask-me { display: flex; justify-content: flex-end; }
.ask-bubble {
  max-width: 84%;
  padding: 10px 14px;
  background: radial-gradient(90% 140% at 100% 0, rgba(246, 181, 68, .16), transparent 70%), rgba(60, 40, 22, .72);
  border: 1px solid var(--ak-edge);
  border-radius: 16px 16px 4px 16px;
  font-size: 15px; line-height: 1.5;
  color: var(--ak-cream);
  overflow-wrap: anywhere;
}
.ask-prose { font-size: 15px; line-height: 1.6; color: rgba(255, 243, 222, .92); max-width: 62ch; }
.ask-prose p { margin: 0 0 .7em; text-wrap: pretty; }
.ask-prose p:last-child { margin-bottom: 0; }
.ask-prose ul { margin: 0 0 .7em; padding-left: 1.2em; }
/* "Keeping to …": the chat's standing requests, an engraved line under the
   newest answer. One line that truncates; the whole list is in its title. */
.ask-keeping { display: flex; align-items: baseline; gap: 10px; min-width: 0; max-width: 62ch; margin: 10px 0 0; padding: 7px 12px; border: 1px solid var(--ak-edge); border-radius: 10px; background: var(--ak-grain), var(--ak-well); font-size: 13px; line-height: 1.35; }
.ask-keeping-k { flex: none; color: var(--ak-brass-hi); font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.ask-keeping-v { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ak-cream); }
.ask-prose li { margin: .2em 0; }
.ask-prose li::marker { color: var(--ak-brass); }
.ask-prose strong { color: var(--ak-cream); font-weight: 600; }
.ask-prose em { color: var(--ak-brass-hi); font-style: normal; }
.ask-error-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; margin-top: 8px; }
.ask-error-row .ask-error { margin: 0; }
.ask-again {
  min-height: 36px; padding: 0 14px;
  background: var(--ak-grain), var(--ak-plate);
  border: 1px solid var(--ak-edge); border-radius: 10px;
  box-shadow: inset 0 1px 0 rgba(255, 226, 170, .14), 0 0 0 1.5px var(--ak-ink), 0 2px 0 1.5px var(--ak-ink);
  color: var(--ak-cream); font: 600 13px/1 var(--ak-font); white-space: nowrap; cursor: pointer;
  transition: border-color .14s, transform .18s var(--ak-pop);
}
.ask-again:hover { border-color: var(--ak-brass-hi); transform: translateY(-1px); }
.ask-again:focus-visible { outline: 2px solid var(--ak-brass-hi); outline-offset: 3px; }
@media (pointer: coarse) { .ask-again { min-height: 44px; } }
.ask-error { margin: 8px 0 0; font-size: 13.5px; line-height: 1.45; color: #f2a08f; }
.ask-error.is-stopped { color: var(--ak-muted); }

.ask-working { margin: 6px 0 0; font-size: 13.5px; }
.ask-working[hidden] { display: none; }
.ask-shimmer {
  background: linear-gradient(90deg, rgba(240, 196, 106, .45) 0%, var(--ak-brass-hi) 45%, var(--ak-cream) 50%, var(--ak-brass-hi) 55%, rgba(240, 196, 106, .45) 100%);
  background-size: 260% 100%;
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  animation: ask-shimmer 2.2s linear infinite;
}
@keyframes ask-shimmer { from { background-position: 100% 0; } to { background-position: -160% 0; } }

/* While Claude works: a ledger of what it has done, the line it is on
   shimmering beside a turning brass ring, and the painted ticket rocking
   gently. It folds to one quiet line once the answer is being written. */
.ask-ledger { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 4px 14px; align-items: start; margin: 4px 0 14px; }
.ask-ledger:empty { display: none; }
.ask-ledger-mark { width: 40px; height: 40px; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .55)); animation: ask-rock 2.6s var(--ak-ease) infinite; transform-origin: 50% 80%; }
@keyframes ask-rock { 0%, 100% { transform: rotate(-5deg) translateY(0); } 50% { transform: rotate(4deg) translateY(-3px); } }
.ask-ledger-steps { list-style: none; margin: 0; padding: 2px 0 0; display: grid; gap: 7px; min-width: 0; }
.ask-ledger-steps li { display: flex; align-items: center; gap: 10px; font-size: 13.5px; line-height: 1.35; min-width: 0; }
.ask-ledger-steps li.is-done { color: var(--ak-muted); }
.ask-ledger-steps li.is-now { color: var(--ak-brass-hi); font-weight: 600; animation: ask-step-in .32s var(--ak-ease) both; }
@keyframes ask-step-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.ask-tick { flex: none; width: 14px; height: 14px; position: relative; }
.ask-tick::after { content: ''; position: absolute; left: 4px; top: 1px; width: 5px; height: 9px; border: solid var(--ak-brass); border-width: 0 2px 2px 0; transform: rotate(42deg); }
.ask-reel { flex: none; width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(240, 196, 106, .22); border-top-color: var(--ak-brass-hi); animation: ask-turn .9s linear infinite; }
@keyframes ask-turn { to { transform: rotate(360deg); } }
.ask-ledger-fold { grid-column: 1 / -1; margin: 0; font-size: 12px; color: var(--ak-muted); letter-spacing: .01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Ghost cards: the shape of the picks to come. */
.ask-picks.is-ghost { pointer-events: none; }
.ask-ghost { padding-bottom: 14px; gap: 10px; border-color: var(--ak-line); animation: ask-ghost-in .5s var(--ak-ease) calc(var(--i, 0) * 90ms) both; }
@keyframes ask-ghost-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.ask-ghost-art { display: block; aspect-ratio: 2 / 3; border-bottom: 1px solid var(--ak-line); }
.ask-ghost-line { display: block; height: 10px; margin: 0 12px; border-radius: 6px; }
.ask-ghost-line.is-short { width: 52%; }
.ask-ghost-art, .ask-ghost-line {
  background: linear-gradient(100deg, rgba(255, 220, 170, .045) 20%, rgba(255, 220, 170, .11) 40%, rgba(255, 220, 170, .045) 60%) 0 0 / 300% 100%;
  animation: ask-sheen 1.8s linear infinite;
}
@keyframes ask-sheen { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* What to ask next: one row of brass-edged chips that scrolls, never wraps. */
.ask-next { display: flex; gap: 8px; margin: 0; padding: 12px var(--ak-gutter) 2px; overflow-x: auto; scrollbar-width: none; scroll-padding-inline: var(--ak-gutter); border-top: 1px solid var(--ak-line); background: linear-gradient(180deg, rgba(0, 0, 0, .18), transparent); }
.ask-next[hidden] { display: none; }
.ask-next::-webkit-scrollbar { display: none; }
.ask-next-chip {
  flex: none; min-height: 38px; padding: 8px 15px;
  background: var(--ak-grain), var(--ak-plate);
  border: 1px solid var(--ak-edge); border-radius: 999px;
  color: var(--ak-cream); font: 500 13.5px/1.2 var(--ak-font); white-space: nowrap;
  cursor: pointer; box-shadow: 0 0 0 1.5px var(--ak-ink), 0 3px 8px rgba(0, 0, 0, .35);
  transition: transform .18s var(--ak-pop), border-color .14s, background .14s;
}
.ask-next-chip:hover { border-color: var(--ak-brass-hi); background: var(--ak-grain), var(--ak-plate-hi); transform: translateY(-1px); }
.ask-next-chip:active { transform: translateY(1px); }
.ask-next-chip:focus-visible { outline: 2px solid var(--ak-brass-hi); outline-offset: 3px; }
@media (pointer: coarse) { .ask-next-chip { min-height: 44px; } }

/* picks: one row of equal cards that scrolls sideways, never wraps */
.ask-picks {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 172px;
  gap: 14px;
  margin: 14px calc(-1 * var(--ak-gutter)) 0;
  padding: 4px var(--ak-gutter) 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--ak-gutter);
  overscroll-behavior-x: contain;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 var(--ak-gutter), #000 calc(100% - 28px), transparent);
          mask-image: linear-gradient(90deg, transparent 0, #000 var(--ak-gutter), #000 calc(100% - 28px), transparent);
  scrollbar-width: thin;
  scrollbar-color: rgba(201, 151, 63, .5) transparent;
}
.ask-picks:empty { display: none; }
.ask-pick {
  scroll-snap-align: start;
  min-width: 0;
  display: flex; flex-direction: column;
  background: var(--ak-grain), var(--ak-plate);
  border: 1px solid var(--ak-edge);
  border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 226, 170, .12), 0 0 0 1.5px var(--ak-ink), 0 4px 0 1.5px var(--ak-ink);
  overflow: hidden;
}
.ask-pick-art {
  display: block;
  aspect-ratio: 2 / 3;
  width: 100%;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--ak-edge);
  background: linear-gradient(180deg, #2a1d13, #160f0a);
  cursor: pointer;
  overflow: hidden;
  position: relative;
}
.ask-pick-art img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s var(--ak-ease), filter .3s; }
.ask-pick-art:hover img { transform: scale(1.045); filter: saturate(1.08) brightness(1.04); }
.ask-pick-noart {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  padding: 14px;
  font: 600 15px/1.25 var(--ak-font);
  color: var(--ak-brass-hi);
  text-align: center;
  text-wrap: balance;
}
.ask-pick-copy { flex: 1; display: flex; flex-direction: column; gap: 5px; padding: 11px 12px 12px; min-width: 0; }
.ask-pick-copy h4 {
  margin: 0;
  font: 600 14.5px/1.25 var(--ak-font);
  color: var(--ak-cream);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 2.5em;
}
.ask-pick-meta { margin: 0; font-size: 12px; color: var(--ak-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ask-tag {
  align-self: flex-start;
  max-width: 100%;
  padding: 2px 8px;
  border: 1px solid var(--ak-line);
  border-radius: 999px;
  font-size: 11px; line-height: 1.4;
  color: var(--ak-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ask-pick-tags { display: flex; align-items: center; gap: 6px; min-width: 0; }
.ask-pick-tags .ask-tag { min-width: 0; }
/* The TMDB score in a brass frame, as Cinema's title pages show it. */
.ask-score {
  flex: none;
  padding: 1px 6px;
  border: 1px solid rgba(201, 151, 63, .55);
  border-radius: 6px;
  font: 700 11px/1.4 var(--ak-font);
  font-variant-numeric: tabular-nums;
  color: var(--ak-brass-hi);
}
.ask-tag-own { border-color: var(--ak-brass); color: var(--ak-brass-hi); background: rgba(201, 151, 63, .12); }
.ask-pick-why {
  margin: 2px 0 0;
  font-size: 12.5px; line-height: 1.45;
  color: rgba(255, 243, 222, .8);
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.ask-pick-go {
  margin-top: auto;
  min-height: 36px;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 7px 10px;
  background: var(--ak-grain), var(--ak-plate-hi);
  border: 1px solid var(--ak-edge);
  border-radius: 9px;
  color: var(--ak-cream);
  font: 600 13px/1 var(--ak-font);
  cursor: pointer;
  transition: transform .18s var(--ak-pop), border-color .14s;
}
.ask-pick-why + .ask-pick-go { margin-top: auto; }
.ask-pick-go:hover { border-color: var(--ak-brass-hi); transform: translateY(-1px); }
.ask-pick-go.is-play {
  background: radial-gradient(70% 120% at 50% 0, rgba(255, 170, 80, .22), transparent 72%), var(--ak-grain), var(--ak-plaque);
  border: 1.5px solid var(--ak-brass);
  box-shadow: inset 0 1px 0 rgba(255, 226, 170, .3), 0 0 0 1.5px var(--ak-ink), 0 2px 0 1.5px var(--ak-ink);
}
.ask-pick-go-text { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ask-play { flex: none; width: 0; height: 0; border-style: solid; border-width: 5px 0 5px 8px; border-color: transparent transparent transparent var(--ak-brass-hi); }

/* ── composer ────────────────────────────────────────────────────────── */
.ask-compose {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
  padding: 12px var(--ak-gutter) 6px;
  border-top: 1px solid var(--ak-line);
  background: linear-gradient(180deg, rgba(0, 0, 0, .12), transparent);
}
.ask-compose[hidden] { display: none; }
.ask-field { min-width: 0; display: block; }
.ask-field textarea {
  display: block;
  width: 100%;
  min-height: 48px; max-height: 160px;
  resize: none;
  padding: 13px 15px;
  background: var(--ak-well);
  border: 1px solid var(--ak-edge);
  border-radius: 13px;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, .4);
  color: var(--ak-cream);
  font: 400 16px/1.4 var(--ak-font);
  transition: border-color .14s, box-shadow .14s;
}
.ask-field textarea::placeholder { color: rgba(255, 236, 210, .42); }
.ask-field textarea:focus { outline: none; border-color: var(--ak-brass-hi); box-shadow: inset 0 2px 6px rgba(0, 0, 0, .4), 0 0 0 3px rgba(240, 196, 106, .16); }
.ask-send, .ask-stop, .ask-plaque {
  min-width: 48px; height: 48px;
  display: inline-grid; place-items: center;
  padding: 0 14px;
  background: radial-gradient(70% 120% at 50% 0, rgba(255, 170, 80, .22), transparent 72%), var(--ak-grain), var(--ak-plaque);
  border: 1.5px solid var(--ak-brass);
  border-radius: 13px;
  box-shadow: inset 0 1px 0 rgba(255, 226, 170, .32), inset 0 -2px 0 rgba(0, 0, 0, .35), 0 0 0 1.5px var(--ak-ink), 0 3px 0 1.5px var(--ak-ink);
  color: var(--ak-brass-hi);
  font: 600 14.5px/1 var(--ak-font);
  cursor: pointer;
  transition: transform .18s var(--ak-pop), border-color .14s, background .14s, box-shadow .14s;
}
.ask-send:hover, .ask-stop:hover, .ask-plaque:hover {
  background: radial-gradient(70% 130% at 50% 0, rgba(255, 170, 80, .36), transparent 74%), var(--ak-grain), var(--ak-plaque-hi);
  border-color: var(--ak-brass-hi);
  transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255, 226, 170, .42), inset 0 -2px 0 rgba(0, 0, 0, .35), 0 0 0 1.5px var(--ak-ink), 0 4px 0 1.5px var(--ak-ink), 0 10px 22px rgba(255, 120, 40, .16);
}
.ask-send:active, .ask-stop:active, .ask-plaque:active { transform: translateY(2px); box-shadow: inset 0 1px 0 rgba(255, 226, 170, .3), 0 0 0 1.5px var(--ak-ink), 0 1px 0 1.5px var(--ak-ink); }
.ask-send:focus-visible, .ask-stop:focus-visible, .ask-plaque:focus-visible, .ask-plate:focus-visible { outline: 2px solid var(--ak-brass-hi); outline-offset: 3px; }
.ask-send[hidden], .ask-stop[hidden] { display: none; }
.ask-send:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.ask-field textarea:disabled { opacity: .7; cursor: not-allowed; }
.ask-stop { color: var(--ak-cream); }
.ask-plaque { height: 44px; padding: 0 22px; color: var(--ak-cream); }
.ask-foot {
  min-height: 1.4em;
  margin: 0;
  padding: 2px var(--ak-gutter) max(12px, env(safe-area-inset-bottom));
  font-size: 12px; line-height: 1.4;
  color: rgba(255, 236, 210, .45);
  text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ── history & settings ──────────────────────────────────────────────── */
.ask-pane-head { display: grid; gap: 10px; margin-bottom: 14px; }
.ask-pane-head h3 { margin: 0; font: 600 18px/1.2 var(--ak-font); color: var(--ak-amber); }
.ask-quiet { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--ak-muted); }
.ask-filter input, .ask-form input[type="password"], .ask-form input[type="number"] {
  width: 100%;
  min-height: 44px;
  padding: 10px 13px;
  background: var(--ak-well);
  border: 1px solid var(--ak-edge);
  border-radius: 11px;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, .35);
  color: var(--ak-cream);
  font: 400 16px/1.3 var(--ak-font);
}
.ask-filter input:focus, .ask-form input:focus { outline: none; border-color: var(--ak-brass-hi); }
.ask-threads { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ask-thread {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: stretch;
  background: var(--ak-grain), var(--ak-plate);
  border: 1px solid var(--ak-edge);
  border-radius: 11px;
  overflow: hidden;
}
.ask-thread.is-open { border-color: var(--ak-brass); }
.ask-thread-open {
  min-width: 0; min-height: 52px;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px;
  padding: 10px 14px;
  background: transparent; border: 0;
  color: var(--ak-cream);
  font-family: var(--ak-font);
  text-align: left;
  cursor: pointer;
}
.ask-thread-open:hover { background: rgba(255, 210, 150, .05); }
.ask-thread-title { font: 550 14.5px/1.3 var(--ak-font); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ask-thread-when { font-size: 12px; color: var(--ak-muted); white-space: nowrap; }
.ask-thread-del {
  width: 48px;
  display: grid; place-items: center;
  background: transparent; border: 0; border-left: 1px solid var(--ak-line);
  cursor: pointer; opacity: .7;
  transition: opacity .14s, background .14s;
}
.ask-thread-del:hover { opacity: 1; background: rgba(239, 68, 68, .12); }
/* Armed: the second tap deletes. */
.ask-thread-del.is-armed {
  width: auto; padding: 0 14px; opacity: 1;
  background: rgba(239, 68, 68, .16);
  color: #f6a493; font: 650 13px/1 var(--ak-font); white-space: nowrap;
}
.ask-thread-del:focus-visible { outline: 2px solid var(--ak-brass-hi); outline-offset: -3px; opacity: 1; }

.ask-form { display: grid; gap: 18px; }
.ask-row { display: grid; grid-template-columns: 116px minmax(0, 1fr); gap: 14px; align-items: start; }
.ask-label { padding-top: 11px; font: 600 13px/1.3 var(--ak-font); color: var(--ak-amber); }
.ask-control { min-width: 0; display: grid; gap: 8px; }
.ask-hint { margin: 0; font-size: 12.5px; line-height: 1.45; color: var(--ak-muted); }
.ask-seg {
  display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr));
  padding: 3px; gap: 0;
  background: var(--ak-well); border: 1px solid var(--ak-line); border-radius: 11px;
}
.ask-seg label { position: relative; }
.ask-seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.ask-seg span { display: block; padding: 10px 6px; border: 1px solid transparent; border-radius: 8px; text-align: center; font: 600 13.5px/1.2 var(--ak-font); color: var(--ak-muted); white-space: nowrap; }
.ask-seg input:checked + span { color: var(--ak-brass-hi); border-color: var(--ak-brass); background: var(--ak-grain), var(--ak-plaque); }
.ask-seg input:focus-visible + span { outline: 2px solid var(--ak-brass-hi); outline-offset: 1px; }
.ask-check { display: flex; align-items: center; gap: 10px; min-height: 40px; font-size: 14px; line-height: 1.35; color: var(--ak-cream); cursor: pointer; }
.ask-check input { width: 20px; height: 20px; accent-color: var(--ak-brass); flex: none; }
.ask-number { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; color: var(--ak-cream); }
.ask-number input { width: 92px !important; }
.ask-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; padding-top: 4px; border-top: 1px solid var(--ak-line); padding-top: 16px; }
.ask-plate-btn {
  min-height: 44px; padding: 0 16px;
  background: var(--ak-grain), var(--ak-plate);
  border: 1px solid var(--ak-edge); border-radius: 11px;
  box-shadow: inset 0 1px 0 rgba(255, 226, 170, .14), 0 0 0 1.5px var(--ak-ink), 0 2px 0 1.5px var(--ak-ink);
  color: var(--ak-cream); font: 550 13.5px/1 var(--ak-font); cursor: pointer;
}
.ask-plate-btn:hover { border-color: var(--ak-brass-hi); }
.ask-plate-btn.is-danger { color: #f2937f; }
.ask-result { margin: 0; min-height: 1.4em; font-size: 13.5px; color: var(--ak-muted); text-align: right; }
.ask-result.is-good { color: #b8d98c; }
.ask-result.is-bad { color: #f2a08f; }

/* ── Cinema's door: the band under the hero ──────────────────────────── */
.cinema-ask {
  --ak-edge: var(--hearth-brass-edge, rgba(216, 168, 74, .36));
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas: "art copy" "art field";
  align-items: center;
  column-gap: 18px; row-gap: 10px;
  margin: 6px 0 26px;
  padding: 16px 20px;
  background:
    radial-gradient(520px 160px at 0 50%, rgba(246, 181, 68, .11), transparent 70%),
    var(--hearth-grain, none),
    var(--hearth-plate, linear-gradient(180deg, #2c2016, #18110b));
  border: 1px solid var(--ak-edge);
  border-radius: 16px;
  box-shadow: inset 0 1px 0 rgba(255, 226, 170, .12), 0 0 0 1.5px var(--hearth-ink, #0b0806), 0 4px 0 1.5px var(--hearth-ink, #0b0806);
}
.cinema-ask-art { grid-area: art; width: 72px; height: 72px; filter: drop-shadow(0 6px 12px rgba(0, 0, 0, .5)); transition: transform .4s var(--hearth-pop, ease); }
.cinema-ask:hover .cinema-ask-art { transform: rotate(-4deg) scale(1.04); }
.cinema-ask-copy { grid-area: copy; min-width: 0; }
.cinema-ask-copy h3 { margin: 0; font: 600 18px/1.25 var(--hearth-font, system-ui); color: var(--hearth-cream, #fff3de); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cinema-ask-copy p { margin: 2px 0 0; font-size: 13.5px; line-height: 1.4; color: rgba(255, 236, 210, .62); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cinema-ask-field { grid-area: field; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; min-width: 0; }
.cinema-ask-field input {
  min-width: 0; min-height: 46px;
  padding: 11px 15px;
  background: var(--hearth-well, rgba(0, 0, 0, .28));
  border: 1px solid var(--ak-edge);
  border-radius: 12px;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, .4);
  color: var(--hearth-cream, #fff3de);
  font: 400 16px/1.3 var(--hearth-font, system-ui);
}
.cinema-ask-field input::placeholder { color: rgba(255, 236, 210, .45); }
.cinema-ask-field input:focus { outline: none; border-color: var(--hearth-brass-hi, #f0c46a); box-shadow: inset 0 2px 6px rgba(0, 0, 0, .4), 0 0 0 3px rgba(240, 196, 106, .16); }
.cinema-ask-go {
  min-height: 46px; padding: 0 20px;
  background: radial-gradient(70% 120% at 50% 0, rgba(255, 170, 80, .22), transparent 72%), var(--hearth-grain, none), var(--hearth-plaque, linear-gradient(180deg, #3d2717, #20140c));
  border: 1.5px solid var(--hearth-brass, #c9973f);
  border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 226, 170, .32), inset 0 -2px 0 rgba(0, 0, 0, .35), 0 0 0 1.5px var(--hearth-ink, #0b0806), 0 3px 0 1.5px var(--hearth-ink, #0b0806);
  color: var(--hearth-cream, #fff3de);
  font: 600 14.5px/1 var(--hearth-font, system-ui);
  white-space: nowrap;
  cursor: pointer;
  transition: transform .18s var(--hearth-pop, ease), border-color .14s;
}
.cinema-ask-go:hover { border-color: var(--hearth-brass-hi, #f0c46a); transform: translateY(-1px); }
.cinema-ask-go:active { transform: translateY(2px); }
.cinema-ask-go:focus-visible { outline: 2px solid var(--hearth-brass-hi, #f0c46a); outline-offset: 3px; }

@media (min-width: 900px) {
  .cinema-ask { grid-template-columns: auto minmax(0, 1fr) minmax(320px, 1.1fr); grid-template-areas: "art copy field"; }
}

/* ── phone ───────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .ask-dialog { --ak-gutter: 16px; width: 100vw; inset: 0; }
  .ask-sheet { border-left: 0; box-shadow: none; padding-top: env(safe-area-inset-top); }
  /* Four 44px plates leave ~160px: the title gets all of it, so the mark
     and the subtitle step aside (the Cinema band already carries the art). */
  .ask-head { gap: 10px; padding: 12px var(--ak-gutter) 10px; }
  .ask-mark, .ask-sub { display: none; }
  .ask-heading h2 { font-size: 17px; white-space: nowrap; }
  .ask-tools { gap: 4px; }
  .ask-plate { width: 44px; height: 44px; }
  .ask-model-blurb { display: none; }
  .ask-model { min-height: 40px; align-content: center; }
  .ask-picks { grid-auto-columns: 128px; }
  /* A narrow card gives the year, kind and length two lines, not an ellipsis. */
  .ask-pick-meta { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .ask-row { grid-template-columns: 1fr; gap: 6px; }
  .ask-label { padding-top: 0; }
  .ask-bubble { max-width: 90%; }
  .cinema-ask { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "art copy" "field field"; padding: 14px 16px; column-gap: 14px; }
  .cinema-ask-art { width: 56px; height: 56px; }
  .cinema-ask-copy h3 { font-size: 16.5px; }
}
@media (max-width: 380px) {
  .ask-sub { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .ask-empty-art, .ask-shimmer, .ask-ledger-mark, .ask-reel, .ask-ghost, .ask-ghost-art, .ask-ghost-line, .ask-ledger-steps li { animation: none; }
  .ask-reel { border-color: var(--ak-brass-hi); }
  .ask-shimmer { color: var(--ak-brass-hi); background: none; }
  .ask-plate, .ask-starter, .ask-pick-go, .ask-again, .ask-send, .ask-stop, .ask-plaque, .cinema-ask-go, .cinema-ask-art, .ask-pick-art img { transition: none; }
}
