/* Adely, the working version. Same look as the prototype's card template (adely-test/build/cards.py). */
:root {
  --ink: #111315; --ink-2: #2A2E33; --muted: #4D535A; --soft: #5E646B; --line: rgba(17,19,21,0.1);
  --bg: linear-gradient(180deg, #F6F7F7 0%, #ECEEEF 100%); --card: #FFFFFF; --accent: #C2310E;
  --bead: radial-gradient(circle at 34% 30%, #FFC2A0 0%, #F2541F 38%, #C2310E 72%, #8E1B0A 100%);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { font-family: Archivo, system-ui, sans-serif; color: var(--ink); background: #ECEEEF; -webkit-font-smoothing: antialiased; }
#app { max-width: 480px; min-height: 100dvh; margin: 0 auto; background: var(--bg); display: flex; flex-direction: column;
  padding: max(20px, env(safe-area-inset-top)) 24px max(20px, env(safe-area-inset-bottom)); }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.top { display: flex; justify-content: space-between; align-items: center; min-height: 40px; }
.lbl { margin: 0; font-size: 11px; line-height: 14px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--soft); }
.brand { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: .28em; }
.rule { height: 1px; background: rgba(17,19,21,.14); margin: 12px 0 0; }
.round { width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(17,19,21,.28); background: transparent; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; }
h1 { margin: 22px 0 0; font-size: 32px; line-height: 37px; font-weight: 450; font-stretch: 108%; letter-spacing: -.03em; text-wrap: balance; }
h1.big { font-size: 40px; line-height: 44px; }
.sub { margin: 10px 0 0; font-size: 15px; line-height: 22px; color: var(--muted); text-wrap: pretty; }
.source { margin: 14px 0 0; display: flex; align-items: center; gap: 8px; font-size: 13px; line-height: 18px; color: var(--soft); }
.bead { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--bead); }
.card { margin: 18px -8px 0; padding: 18px 20px 20px; border-radius: 28px; background: var(--card); box-shadow: 0 1px 2px rgba(17,19,21,.04), 0 12px 32px rgba(17,19,21,.07); }
.card + .card { margin-top: 12px; }
.card .lbl + * { margin-top: 6px; }
.card p { margin: 0; }
.block + .block { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.text { font-size: 16px; line-height: 22px; color: var(--ink-2); text-wrap: pretty; }
.offer { margin-top: 10px; display: flex; align-items: center; gap: 12px; }
.offer .t { flex: 1; }
.offer .t b { display: block; font-weight: 400; font-size: 16px; line-height: 21px; }
.offer .t span { display: block; margin-top: 2px; font-size: 13px; color: var(--soft); }
.chip { flex: none; height: 34px; padding: 0 14px; border-radius: 17px; border: 1px solid rgba(17,19,21,.24); background: transparent; font-size: 13px; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.row { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0; font-size: 15px; line-height: 21px; width: 100%; text-align: left; border: 0; background: none; color: var(--muted); }
.row + .row { border-top: 1px solid var(--line); }
.row.done { color: var(--ink); }
.dot { flex: none; width: 18px; height: 18px; margin-top: 1px; border-radius: 50%; border: 1px solid rgba(17,19,21,.4); display: inline-flex; align-items: center; justify-content: center; }
.row.done .dot { background: var(--ink); border-color: var(--ink); }
.spacer { flex: 1; min-height: 24px; }
.actions { display: flex; flex-direction: column; align-items: flex-end; gap: 14px; margin-top: 18px; }
.primary { position: relative; display: inline-flex; align-items: center; gap: 12px; height: 48px; padding: 0 6px 0 22px; border-radius: 24px; border: 0; background: var(--ink); color: #fff; font-size: 15px; font-weight: 500; }
.primary::after { content: "→"; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: #fff; color: var(--ink); font-size: 15px; }
.primary.wide { width: 100%; justify-content: center; padding: 0 22px; }
.primary.wide::after { display: none; }
.primary:disabled { opacity: .5; }
.trail { position: relative; width: 100%; display: flex; justify-content: flex-end; }
.trail::before { content: ""; position: absolute; left: -24px; right: 120px; top: 50%; height: 2px; margin-top: -1px; background: linear-gradient(90deg, transparent, rgba(242,84,31,.85)); filter: blur(.4px); box-shadow: 0 0 10px rgba(242,84,31,.45); }
.links { display: flex; gap: 20px; justify-content: flex-end; flex-wrap: wrap; }
.link { border: 0; background: none; padding: 0; font-size: 14px; line-height: 20px; font-weight: 500; color: var(--muted); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.danger { color: var(--accent); }
.field { width: 100%; margin-top: 18px; height: 52px; padding: 0 16px; border-radius: 16px; border: 1px solid rgba(17,19,21,.18); background: #fff; font-size: 17px; }
.field.code { letter-spacing: .4em; font-size: 22px; text-align: center; }
.small { font-size: 12px; line-height: 17px; color: var(--soft); }
.small a { color: inherit; }
.tabs { display: flex; justify-content: center; gap: 48px; margin-top: 18px; }
.tab { border: 0; background: none; font-size: 13px; font-weight: 500; color: var(--soft); padding: 6px 0; }
.tab[aria-current="page"] { color: var(--ink); text-decoration: underline; text-underline-offset: 6px; }

/* talk */
.thread { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; padding: 18px 4px 12px; }
.say-a { overflow-wrap: anywhere; margin: 0; max-width: 92%; font-size: 16px; line-height: 24px; color: var(--ink-2); white-space: pre-wrap; }
.say-u { overflow-wrap: anywhere; margin: 0 0 0 auto; max-width: 80%; padding: 12px 16px; border-radius: 20px 20px 6px 20px; background: #fff; box-shadow: 0 1px 2px rgba(17,19,21,.04), 0 6px 18px rgba(17,19,21,.06); font-size: 15px; line-height: 22px; white-space: pre-wrap; }
.state { min-height: 18px; margin: 0 4px 8px; font-size: 13px; color: var(--soft); }
.compose { display: flex; align-items: flex-end; gap: 8px; padding: 6px 6px 6px 16px; border-radius: 28px; background: #fff; box-shadow: 0 1px 2px rgba(17,19,21,.05), 0 10px 26px rgba(17,19,21,.08); }
.compose textarea { flex: 1; min-height: 44px; max-height: 140px; border: 0; outline: 0; resize: none; padding: 11px 0; font-size: 16px; line-height: 22px; background: transparent; }
.send { flex: none; height: 44px; padding: 0 16px; border-radius: 22px; border: 0; background: var(--ink); color: #fff; font-size: 14px; font-weight: 500; }
.end { height: 32px; padding: 0 14px; border-radius: 16px; border: 1px solid rgba(17,19,21,.28); background: transparent; font-size: 13px; font-weight: 500; }

#toast { position: fixed; left: 50%; top: max(16px, env(safe-area-inset-top)); transform: translateX(-50%); max-width: 420px; width: calc(100% - 32px); padding: 14px 18px; border-radius: 16px; background: var(--ink); color: #fff; font-size: 14px; line-height: 20px; z-index: 10; }
#app.fixed { height: 100dvh; min-height: 0; }
#app.fixed .thread { min-height: 0; }
h1:focus { outline: none; }
