:root {
  --bg: #FAF8F7;
  --card: #fff;
  --cream: #F5EFE4;
  --cream-line: #EAE0D0;
  --line: #E4DFDB;
  --pink-line: #EEC3CC;
  --ink: #292522;
  --text: #3F3835;
  --muted: #6B625C;
  --faint: #9A918B;
  --rose: #B55F71;
  --rose-deep: #954B5D;
  --danger: #C97077;
  --shadow: 0 2px 10px rgba(90, 70, 60, .08);
  --shadow-soft: 0 8px 24px rgba(183, 121, 135, .12);
  --serif: "Noto Serif SC", "Songti SC", "STSong", "PMingLiU", serif;
  --sans: "Inter", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --ease: cubic-bezier(.22, .61, .36, 1);
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
}
.shell {
  height: 100dvh;
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}
.thread {
  flex: 1;
  overflow-y: auto;
  padding: 28px 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.thread > .bubble:first-child { margin-top: auto; }
.bubble {
  max-width: min(92%, 460px);
  padding: 16px 18px;
  box-shadow: var(--shadow);
}
.bubble.healer {
  align-self: flex-start;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 6px 22px 22px 22px;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 18px;
  line-height: 1.75;
  color: var(--text);
}
.bubble.user {
  align-self: flex-end;
  background: var(--cream);
  border: 1px solid var(--cream-line);
  border-radius: 22px 6px 22px 22px;
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
}
.bubble.note {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--muted);
}
.bubble.in {
  animation: rise 180ms var(--ease);
}
@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
.dock {
  flex: none;
  padding: 12px 20px calc(16px + env(safe-area-inset-bottom));
  border-top: 1px solid transparent;
  background: rgba(250, 248, 247, .86);
  backdrop-filter: blur(14px);
}
.dock.on {
  border-top-color: var(--line);
  background: rgba(255, 255, 255, .78);
}
.choices, .stack { display: grid; gap: 12px; }
.choices.two { grid-template-columns: 1fr 1fr; }
.choice, .go, .date {
  width: 100%;
  min-height: 72px;
  border-radius: 16px;
  font-family: var(--sans);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0;
}
.choice {
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 180ms var(--ease), box-shadow 180ms var(--ease), border-color 180ms var(--ease), background 180ms var(--ease);
}
.choice:hover {
  transform: translateY(-2px);
  border-color: var(--pink-line);
  box-shadow: var(--shadow-soft);
}
.choice:active { transform: scale(.98); }
.choice:focus-visible, .go:focus-visible, .date:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px #F6DDE2;
}
.go {
  border: none;
  background: var(--rose);
  color: #fff;
  cursor: pointer;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: transform 180ms var(--ease), background 180ms var(--ease);
}
.go small {
  font-size: 14px;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  opacity: .92;
}
.go:hover { background: var(--rose-deep); transform: translateY(-2px); }
.go:active { transform: scale(.98); }
.go:disabled, .choice:disabled { cursor: progress; opacity: .7; transform: none; }
.date {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 0 16px;
}
.date:focus { border-color: #E7AAB6; }
.hint {
  margin: 8px 2px 0;
  color: var(--danger);
  font-size: 13px;
}
@media (max-width: 420px) {
  .choices.two { grid-template-columns: 1fr; }
  .bubble.healer { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  .bubble.in, .choice, .go { animation: none; transition: none; }
}
