/* 쑥쑥이 · 하얀 바탕 위의 초록 쑥쑥이 */
:root {
  --bg: #FFFFFF;
  --surface: #FFFFFF;
  --ink: #1D2024;
  --ink-2: #4A4F56;
  --ink-3: #8A9098;
  --ink-4: #BBC0C6;
  --line: #ECEEF1;
  --line-2: #E1E4E8;
  --mist: #F3F4F6;
  --night: #1D2024;
  --ok: #86B98A;
  --warn: #DDAA5C;
  --risk: #D3826F;
  --info: #93AEC2;
  --radius: 26px;
  --ease: cubic-bezier(.22, .8, .2, 1);
  --shadow-card: 0 1px 2px rgba(16, 24, 40, .04), 0 18px 44px -24px rgba(16, 24, 40, .18);
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Segoe UI", sans-serif;
  --dock-h: 150px;
  --dock-pad: 26px;
  --dock-gap: 14px;
  --thread-top: 92px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font);
  font-size: 15.5px;
  line-height: 1.7;
  letter-spacing: -0.006em;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- 상단 ---------- */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 30;
  height: 68px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 max(22px, env(safe-area-inset-left)) 0 max(22px, env(safe-area-inset-left));
  background: linear-gradient(180deg, rgba(255, 255, 255, .98) 0%, rgba(255, 255, 255, .94) 64%, rgba(255, 255, 255, 0) 100%);
}
.brand { display: flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; white-space: nowrap; }
.brand-mark {
  width: 22px; height: 22px;
  background: url("/favicon.svg?v=6") center / contain no-repeat;
  filter: drop-shadow(0 2px 4px rgba(67, 160, 110, .22));
  transition: opacity .25s var(--ease);
}
/* 쑥쑥이가 로고 자리에 앉아 있는 동안은 살아 있는 쑥쑥이가 로고가 된다 */
body.agent-home .brand-mark { opacity: 0; transition: none; }
.brand-name { font-weight: 650; font-size: 16px; letter-spacing: -0.02em; }
.brand-sub { font-size: 13px; color: var(--ink-3); padding-left: 10px; border-left: 1px solid var(--line-2); line-height: 1; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  border: 0; background: transparent; color: var(--ink-2);
  transition: background .25s var(--ease), color .25s var(--ease), opacity .4s var(--ease);
}
.icon-btn:hover { background: rgba(16, 24, 40, .05); color: var(--ink); }
.icon-btn svg { width: 18px; height: 18px; }
body.is-idle #newChat { opacity: 0; pointer-events: none; }

/* ---------- 에이전트 (자리와 비행은 app.js가 그린다) ---------- */
.agent-stage {
  position: fixed; left: 0; top: 0; z-index: 35;
  width: 300px; height: 300px;
  pointer-events: none;
  transform-origin: 0 0;
}
.agent { position: absolute; inset: 0; }
.agent svg { display: block; width: 100%; height: 100%; overflow: visible; stroke: none; }
.agent-aura {
  position: absolute; inset: 24% 22% 18%;
  border-radius: 42%;
  background: radial-gradient(circle, rgba(170, 226, 150, .42) 0%, rgba(176, 228, 176, .16) 50%, rgba(176, 228, 176, 0) 72%);
  filter: blur(22px);
  opacity: .92;
  animation: breathe 6s ease-in-out infinite;
  transition: opacity .6s var(--ease);
}
.agent-stage.docked .agent-aura { opacity: .35; }
@keyframes breathe { 0%, 100% { transform: scale(.96); } 50% { transform: scale(1.06); } }
/* 고정 배치의 원점. 쑥쑥이 자리를 잴 때 기준으로 쓴다 */
.fixed-origin { position: fixed; left: 0; top: 0; width: 0; height: 0; visibility: hidden; pointer-events: none; }

/* 쑥쑥이가 가운데서 일하는 동안: 지난 말은 쑥쑥이 발밑에서 부드럽게 사라진다. 로고 자리로 가면 걷힌다 */
.veil {
  position: fixed; inset: 0 0 auto 0; z-index: 2;
  height: var(--veil-h, 96px);
  pointer-events: none;
  background: var(--bg);
  -webkit-mask-image: linear-gradient(#000 calc(100% - 44px), transparent);
  mask-image: linear-gradient(#000 calc(100% - 44px), transparent);
  opacity: 0; visibility: hidden;
  transition: opacity .5s var(--ease), visibility .5s;
}
body.is-chatting:not(.agent-docked) .veil { opacity: 1; visibility: visible; }

/* ---------- 본문 ---------- */
.stage { position: relative; z-index: 1; width: min(760px, 100% - 32px); margin: 0 auto; }
.hero {
  min-height: 100dvh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  padding: 84px 0 calc(var(--hero-dock, var(--dock-h)) + 24px);
  transition: opacity .55s var(--ease), filter .55s var(--ease), visibility .55s;
}
.agent-slot { width: 300px; height: 300px; max-width: 72vw; max-height: 72vw; margin: -40px 0 -26px; flex: none; }
.hero-title {
  margin: 0 0 10px;
  font-size: clamp(22px, 3.2vw, 27px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.35;
}
.hero-sub { margin: 0; color: var(--ink-2); font-size: 15.5px; line-height: 1.75; max-width: 30em; }
.suggestions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 26px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 15px 9px 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #FFFFFF;
  color: var(--ink-2);
  font-size: 13.5px;
  transition: transform .3s var(--ease), background .3s var(--ease), border-color .3s var(--ease), color .3s var(--ease);
}
.chip:hover { transform: translateY(-1px); background: #F8F9FA; border-color: var(--line-2); color: var(--ink); }
.suggestions { transition: opacity .4s var(--ease); }
body.has-files .suggestions { opacity: 0; pointer-events: none; }
.chip-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--dot); box-shadow: 0 0 0 3px color-mix(in srgb, var(--dot) 28%, transparent); }

/* 대화 중에도 에이전트가 처음 자리에 머물도록, 첫 화면 배치를 보이지 않게 고정해 두고 자리를 잰다 */
body.is-chatting .hero {
  position: fixed; inset: 0 0 auto 0; width: min(760px, 100% - 32px); margin: 0 auto;
  opacity: 0; filter: blur(6px); visibility: hidden; pointer-events: none;
}

/* 접속 코드 */
body.is-locked .suggestions, body.is-locked .dock { display: none; }
.gate { display: flex; gap: 8px; align-items: center; margin-top: 26px; position: relative; }
.gate[hidden] { display: none; }
.gate input {
  width: 220px; height: 46px; padding: 0 18px;
  border-radius: 999px; border: 1px solid var(--line);
  background: #FFFFFF;
  outline: none; letter-spacing: .12em;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.gate input:focus { border-color: var(--line-2); box-shadow: 0 0 0 4px rgba(16, 24, 40, .05); }
.gate-msg { position: absolute; top: 54px; left: 0; right: 0; margin: 0; font-size: 13px; color: var(--risk); }

/* ---------- 대화 ---------- */
/* 말풍선은 언제나 입력창 바로 위(--dock-gap)부터 쌓이고, 쑥쑥이가 로고 자리로 가면 헤더 바로 아래까지 채운다 */
.thread { min-height: 100dvh; padding: var(--thread-top) 0 calc(var(--dock-h) - var(--dock-pad) + var(--dock-gap)); display: flex; flex-direction: column; justify-content: flex-end; gap: 26px; }
.thread:empty { display: none; }
.msg { animation: rise .55s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.msg-user { align-self: flex-end; max-width: min(82%, 560px); display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.bubble {
  background: var(--mist);
  border: 1px solid rgba(16, 24, 40, .03);
  padding: 11px 17px;
  border-radius: 22px 22px 8px 22px;
  white-space: pre-wrap;
}
.msg-note { font-size: 12px; color: var(--ink-3); display: inline-flex; gap: 5px; align-items: center; }
.msg-note svg { width: 13px; height: 13px; }
.file-row { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }

.msg-ai { align-self: stretch; display: flex; flex-direction: column; gap: 14px; }
/* 내 말과 바로 이어지는 쑥쑥이의 답(생각 중 줄)은 한 덩어리로 붙인다 */
.msg-user + .msg-ai { margin-top: -12px; }
.prose { color: var(--ink); }
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }
.prose p { margin: 0 0 .75em; }
.prose h1, .prose h2, .prose h3, .prose h4 { font-size: 16px; font-weight: 650; letter-spacing: -0.02em; margin: 1.2em 0 .45em; }
.prose ul, .prose ol { margin: .2em 0 .8em; padding-left: 1.25em; }
.prose li { margin: .22em 0; }
.prose li::marker { color: var(--ink-4); }
.prose strong { font-weight: 650; }
.prose a { color: #4E7A55; text-underline-offset: 3px; }
.prose code { font-size: .9em; background: var(--mist); padding: .1em .4em; border-radius: 6px; }
.prose blockquote { margin: .6em 0; padding: .2em 0 .2em 14px; border-left: 2px solid var(--line-2); color: var(--ink-2); }
.prose table { width: 100%; border-collapse: collapse; font-size: 14px; margin: .6em 0 1em; }
.prose th, .prose td { border-bottom: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.prose th { font-weight: 600; color: var(--ink-2); background: #F7F8F9; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 1.2em 0; }
.prose.streaming > :last-child::after {
  content: ""; display: inline-block; width: 8px; height: 8px; margin-left: 6px; vertical-align: middle;
  border-radius: 50%; background: radial-gradient(circle at 35% 35%, #F5FADA, #CDEBA5 60%, #A8D6AE);
  animation: blink 1.1s ease-in-out infinite;
}
@keyframes blink { 50% { opacity: .25; transform: scale(.8); } }

.tool-line { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--ink-3); }
.tool-line .spark { width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #FBFDEB, #D8F0A0 55%, #A9D7B0); animation: pulse 1.4s ease-in-out infinite; flex: none; }
.tool-line.done .spark { animation: none; background: var(--ok); opacity: .8; }
.tool-line.failed .spark { animation: none; background: var(--risk); }
.tool-line .shimmer {
  background: linear-gradient(90deg, var(--ink-3) 0%, var(--ink-3) 35%, #D5D8DD 50%, var(--ink-3) 65%, var(--ink-3) 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: sweep 2.2s linear infinite;
}
.tool-line.done .shimmer { animation: none; color: var(--ink-3); background: none; }
@keyframes pulse { 50% { transform: scale(.72); opacity: .6; } }
@keyframes sweep { from { background-position: 120% 0; } to { background-position: -120% 0; } }

/* 답변 상태 한 줄: "생각 중 12s · 하는 일" */
.turn-status { font-size: 13.5px; color: var(--ink-3); }
.ts-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ts-row svg { width: 14px; height: 14px; flex: none; stroke-width: 1.8; }
.ts-spin { animation: turn 2.4s linear infinite; }
.ts-label {
  flex: none; font-weight: 500;
  background: linear-gradient(90deg, var(--ink-2) 0%, var(--ink-2) 35%, #D5D8DD 50%, var(--ink-2) 65%, var(--ink-2) 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: sweep 2.2s linear infinite;
}
.ts-sep { flex: none; color: var(--ink-4); }
.ts-detail { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ts-time { flex: none; font-variant-numeric: tabular-nums; }
.turn-status.done { font-size: 12.5px; }
.turn-status.done .ts-label { animation: none; background: none; color: var(--ink-3); font-weight: 400; }
.turn-status.done svg { width: 13px; height: 13px; }
@keyframes turn { to { transform: rotate(360deg); } }
.error-line { font-size: 14px; color: #A35A49; background: #FBEFEA; border: 1px solid #F1DCD3; padding: 10px 14px; border-radius: 14px; }

/* ---------- 카드 ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
  animation: rise .6s var(--ease) both;
}
.card-head { padding: 18px 22px 14px; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 14px; }
.card-title { margin: 0; font-size: 16px; font-weight: 650; letter-spacing: -0.02em; }
.card-meta { font-size: 12.5px; color: var(--ink-3); }
.pills { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 22px 14px; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; padding: 4px 10px 4px 9px; border-radius: 999px; background: var(--mist); color: var(--ink-2); }
.pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.checks { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.check { border-bottom: 1px solid var(--line); }
.check:last-child { border-bottom: 0; }
.check summary, .check .row { list-style: none; display: grid; grid-template-columns: 10px 1fr auto; gap: 12px; align-items: baseline; padding: 13px 22px; cursor: default; }
.check summary::-webkit-details-marker { display: none; }
.check details[open] summary, .check summary:hover { background: #F9FAFB; }
.check details summary { cursor: pointer; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); transform: translateY(-1px); }
.check-title { font-weight: 600; font-size: 14.5px; }
.check-sum { display: block; font-size: 13.5px; color: var(--ink-2); line-height: 1.6; margin-top: 2px; }
.chev { color: var(--ink-4); transition: transform .3s var(--ease); }
.chev svg { width: 16px; height: 16px; }
.check details[open] .chev { transform: rotate(180deg); }
.check-body { padding: 0 22px 16px 44px; font-size: 13px; color: var(--ink-2); }
.samples { width: 100%; border-collapse: collapse; margin: 2px 0 8px; }
.samples td { padding: 6px 8px 6px 0; border-bottom: 1px dashed var(--line); vertical-align: top; }
.samples tr:last-child td { border-bottom: 0; }
.basis { color: var(--ink-3); font-size: 12px; margin: 6px 0 0; }
.hint { color: #6C7C5C; font-size: 12.5px; margin: 6px 0 0; }
.card-foot { padding: 12px 22px 16px; font-size: 12px; color: var(--ink-3); border-top: 1px solid var(--line); background: #FAFAFB; }
.report + .report { margin-top: 12px; }

/* 기록지 카드 */
.rec-grid { padding: 0 22px 6px; }
.rec-people { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13.5px; color: var(--ink-2); padding: 0 22px 14px; }
.rec-people b { font-weight: 600; color: var(--ink); }
.blocks { border-top: 1px solid var(--line); }
.block { display: grid; grid-template-columns: 92px 1fr; gap: 14px; padding: 14px 22px; border-bottom: 1px solid var(--line); }
.block-time { font-size: 12.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; padding-top: 2px; }
.block-title { font-weight: 600; font-size: 14.5px; }
.block-goal { font-size: 13.5px; color: var(--ink-2); margin: 3px 0 6px; }
.block-steps { margin: 0; padding-left: 1.15em; font-size: 13.5px; color: #33373D; }
.block-steps li { margin: .12em 0; }
.block-tools { font-size: 12.5px; color: var(--ink-3); margin-top: 6px; }
.block.meal { padding-top: 9px; padding-bottom: 9px; }
.block.meal .block-title { font-weight: 500; color: var(--ink-3); }
.obs { padding: 6px 22px 8px; }
.obs-row { padding: 12px 0; border-bottom: 1px dashed var(--line); display: grid; grid-template-columns: 92px 1fr; gap: 14px; }
.obs-row:last-child { border-bottom: 0; }
.obs-name { font-weight: 600; font-size: 14px; padding-top: 1px; }
.obs-fields { display: grid; gap: 6px; font-size: 13.5px; }
.obs-fields span { color: var(--ink-3); font-size: 12px; margin-right: 8px; }
.empty-field { display: inline-block; border: 1px dashed #D9C79A; color: #9A8450; background: #FFFCF2; padding: 1px 8px; border-radius: 8px; font-size: 12.5px; }
.rec-actions { display: flex; gap: 8px; padding: 12px 22px 16px; border-top: 1px solid var(--line); background: #FAFAFB; align-items: center; }
.ghost-btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-2); background: #fff; border-radius: 999px; padding: 6px 13px; font-size: 13px; color: var(--ink-2); transition: background .25s var(--ease), color .25s var(--ease); }
.ghost-btn:hover { background: var(--mist); color: var(--ink); }
.ghost-btn svg { width: 15px; height: 15px; }
.ghost-btn.confirmed { background: #EEF6EA; border-color: #CFE3C7; color: #3F6B45; }
.rec-actions .note { margin-left: auto; font-size: 12px; color: var(--ink-3); }
.rec-voucher { margin: 0 22px 14px; padding: 10px 14px; border-radius: 14px; background: #F8F9FA; border: 1px solid var(--line); display: grid; gap: 6px; }
.rv-row { display: grid; grid-template-columns: 10px 1fr; gap: 10px; align-items: baseline; font-size: 13.5px; color: var(--ink-2); }
.rv-row b { font-weight: 600; color: var(--ink); }
.rv-detail { display: block; font-size: 12.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* ---------- 입력창 ---------- */
/* 입력창 바로 위만 짧게 흐려져서, 대화 끝줄이 입력창에 바짝 붙어도 또렷하게 보인다 */
.dock {
  position: fixed; inset: auto 0 0 0; z-index: 40;
  padding: var(--dock-pad) 16px max(20px, env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) calc(var(--dock-pad) - 12px), #FFFFFF var(--dock-pad));
}
.composer {
  width: min(760px, 100%);
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid #E5E7EB;
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 10px 32px -14px rgba(16, 24, 40, .16);
  transition: box-shadow .35s var(--ease), border-color .35s var(--ease);
}
.composer:focus-within { border-color: #D6D9DE; box-shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 12px 36px -14px rgba(16, 24, 40, .22); }
.composer textarea {
  display: block; width: 100%;
  border: 0; outline: none; resize: none; background: transparent;
  padding: 18px 22px 4px; min-height: 58px; max-height: 200px;
  font-size: 16px; line-height: 1.6;
}
.composer textarea::placeholder { color: #A3A9B0; }
.composer-row { display: flex; align-items: center; gap: 8px; padding: 8px 12px 12px; }
.spacer { flex: 1; }
.round-btn {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  border: 0; background: #F3F4F6; color: var(--ink-2);
  transition: background .25s var(--ease), color .25s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease);
}
.round-btn:hover { background: #E9EBEE; color: var(--ink); }
.round-btn:active { transform: scale(.96); }
.round-btn.listening { background: #E6F4CC; color: #3C6A3F; box-shadow: 0 0 0 0 rgba(198, 232, 150, .7); animation: ring 1.6s ease-out infinite; }
@keyframes ring { to { box-shadow: 0 0 0 12px rgba(198, 232, 150, 0); } }
.privacy-chip {
  display: inline-flex; align-items: center; gap: 6px;
  border: 0; background: transparent; color: var(--ink-3);
  font-size: 13.5px; padding: 8px 8px; border-radius: 999px;
  transition: color .25s var(--ease), background .25s var(--ease);
}
.privacy-chip svg { width: 18px; height: 18px; }
.privacy-chip:hover, .privacy-chip[aria-expanded="true"] { color: var(--ink-2); background: var(--mist); }
.send-btn {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  border: 0; background: var(--night); color: #fff;
  transition: background .3s var(--ease), transform .25s var(--ease), opacity .3s var(--ease);
}
.send-btn svg { width: 19px; height: 19px; stroke-width: 2; }
.send-btn:hover:not(:disabled) { background: #363A40; }
.send-btn:active:not(:disabled) { transform: scale(.95); }
.send-btn:disabled { background: #D5D8DC; cursor: default; }
.send-btn .i-stop { display: none; }
body.is-busy .send-btn { background: var(--night); }
body.is-busy .send-btn .i-send { display: none; }
body.is-busy .send-btn .i-stop { display: block; fill: #fff; stroke: none; }

.attachments { display: flex; flex-wrap: wrap; gap: 6px; padding: 14px 16px 0; }
.attachments:empty { display: none; }
.file-chip {
  display: inline-flex; align-items: center; gap: 8px; max-width: 100%;
  padding: 5px 6px 5px 6px; border-radius: 12px;
  background: var(--mist); border: 1px solid var(--line);
  font-size: 12.5px; color: var(--ink-2);
}
.file-chip .ficon { width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; background: #E5EFDB; color: #4F7A52; flex: none; }
.file-chip .ficon svg { width: 15px; height: 15px; }
.file-chip .fname { font-weight: 550; color: var(--ink); max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-chip .flabel { color: var(--ink-3); white-space: nowrap; }
.file-chip.loading .ficon { animation: pulse 1.2s ease-in-out infinite; }
.file-chip.error { background: #FBF0EC; border-color: #F0DAD1; }
.file-chip.error .ficon { background: #F6DDD3; color: #A35A49; }
.file-chip .x { border: 0; background: transparent; color: var(--ink-3); width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; }
.file-chip .x:hover { background: rgba(16, 24, 40, .06); color: var(--ink); }
.file-chip .x svg { width: 13px; height: 13px; }
.file-row .file-chip { background: #FFFFFF; }

.privacy-tip {
  width: min(760px, 100%); margin: 10px auto 0;
  font-size: 13px; color: var(--ink-2); line-height: 1.65;
  background: #FFFFFF; border: 1px solid var(--line); border-radius: 16px;
  padding: 11px 15px;
  animation: rise .35s var(--ease) both;
}
.privacy-tip b { font-weight: 600; color: #4E7A55; }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--dock-h) + 8px); z-index: 60;
  transform: translateX(-50%);
  background: rgba(29, 32, 36, .92); color: #F5F6F7;
  padding: 10px 16px; border-radius: 999px; font-size: 13.5px;
  box-shadow: 0 12px 30px -12px rgba(0, 0, 0, .35);
  animation: rise .35s var(--ease) both;
}

@media (max-width: 640px) {
  :root { --thread-top: 78px; --dock-pad: 18px; --dock-gap: 12px; }
  body { font-size: 15px; }
  .topbar { height: 58px; padding: 0 16px; }
  .brand { gap: 8px; }
  .brand-name { font-size: 15.5px; }
  .brand-sub { font-size: 12.5px; padding-left: 9px; }
  .stage { width: calc(100% - 28px); }
  .agent-slot { width: 250px; height: 250px; }
  .hero-sub { font-size: 14.5px; }
  .dock { padding: var(--dock-pad) 10px max(14px, env(safe-area-inset-bottom)); }
  .composer textarea { padding: 16px 18px 2px; }
  .block, .obs-row { grid-template-columns: 1fr; gap: 4px; }
  .check-body { padding-left: 22px; }
  .card-head, .pills, .rec-people, .obs, .rec-actions { padding-left: 18px; padding-right: 18px; }
  .block, .check summary, .check .row { padding-left: 18px; padding-right: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
