/* ============================================================
   知食 · 会对话的营养师
   暖色编辑式版面：左栏档案 / 右栏对话
   ============================================================ */

:root {
  --bg: #f3eee4;
  --card: #fffdf8;
  --card-2: #fbf7ef;
  --ink: #26251f;
  --ink-2: #4a473d;
  --muted: #6f6a5c;
  --line: #e8e0d1;
  --line-strong: #d8cebb;
  --track: #ece5d7;
  --accent: #2f5d3f;
  --accent-dark: #24482f;
  --accent-soft: #e6eee3;
  --orange: #c4633b;
  --orange-soft: #f8e7dc;
  --sand: #f2e7d4;
  --blue-soft: #e4eef1;
  --radius: 22px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(60, 50, 30, .04), 0 10px 30px rgba(60, 50, 30, .06);
  --focus: #2f5d3f;
  --font: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Source Han Sans SC",
          system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Songti SC", "STSong", "SimSun", "Source Han Serif SC", Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  padding: 0 clamp(16px, 3vw, 40px) 40px;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; font-weight: 700; line-height: 1.3; }
p { margin: 0; }
ul, ol, dl, dd { margin: 0; padding: 0; }
li { list-style: none; }
fieldset { margin: 0; padding: 0; border: 0; }
.muted { color: var(--muted); font-size: .84rem; }

/* ---------- 无障碍 ---------- */
.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip-link {
  position: absolute; left: 16px; top: -64px; z-index: 200;
  padding: 12px 18px; border-radius: 999px;
  background: var(--accent); color: #fff; font-weight: 700; text-decoration: none;
  transition: top .15s ease;
}
.skip-link:focus { top: 16px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 8px; }

/* ---------- 顶栏 ---------- */
.topbar {
  max-width: 1440px; margin: 0 auto;
  padding: 22px 0 18px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand__mark {
  width: 44px; height: 44px; flex: none;
  display: grid; place-items: center;
  background: var(--accent); color: #fff; border-radius: 14px;
}
.brand__mark svg { width: 26px; height: 26px; }
.brand__text h1 { font-size: 1.4rem; letter-spacing: .02em; }
.brand__text p { font-size: .78rem; color: var(--muted); }
.online {
  display: inline-flex; align-items: center; gap: 6px;
  margin-left: 6px; padding: 5px 12px;
  border-radius: 999px; background: var(--accent-soft); color: var(--accent-dark);
  font-size: .78rem; font-weight: 600;
}
.online i { width: 7px; height: 7px; border-radius: 50%; background: #3d8b5c; }

.topnav { display: flex; gap: 8px; flex-wrap: wrap; }
.pill {
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 42px; padding: 8px 16px;
  border: 1px solid var(--line); border-radius: 999px;
  background: transparent; color: var(--ink-2);
  font: inherit; font-size: .86rem; cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
}
.pill svg { width: 17px; height: 17px; }
.pill:hover { background: #fff; border-color: var(--line-strong); color: var(--ink); }
.pill--primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.pill--primary svg { width: 16px; height: 16px; }
.pill--primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }

/* ---------- 布局 ---------- */
.layout {
  max-width: 1440px; margin: 0 auto;
  display: grid; grid-template-columns: 336px minmax(0, 1fr);
  gap: 16px; align-items: stretch;
}

/* ---------- 左栏卡片 ---------- */
.sidebar { display: flex; flex-direction: column; gap: 16px; }
.sidebar .sport {
  margin-top: 10px; padding: 7px 10px; border-radius: 10px;
  background: var(--accent-soft); color: var(--accent-dark);
  font-size: .78rem; font-weight: 600;
  display: flex; align-items: center; gap: 6px;
}
.sport::before { content: "🏃"; font-size: .8rem; }

.foot-note { margin-top: auto; }
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px 18px 16px;
}
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.card__head h2 { font-size: .82rem; font-weight: 700; color: var(--ink-2); letter-spacing: .04em; }
.card__hint { font-size: .74rem; color: var(--muted); }

.icon-btn {
  width: 34px; height: 34px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 10px;
  background: transparent; color: var(--ink-2); cursor: pointer;
}
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn:hover { background: var(--card-2); border-color: var(--line-strong); }

.profile { display: flex; align-items: center; gap: 12px; }
.avatar {
  width: 52px; height: 52px; flex: none;
  display: grid; place-items: center;
  border-radius: 50%; background: var(--sand); color: var(--accent-dark);
  font-size: 1.1rem; font-weight: 700;
}
.avatar--sm { width: 38px; height: 38px; font-size: .9rem; background: var(--accent-soft); }
.profile__name { font-size: 1.06rem; font-weight: 700; }
.profile__meta { font-size: .82rem; color: var(--muted); margin-top: 2px; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.tags li {
  padding: 4px 10px; border-radius: 999px;
  background: var(--card-2); color: var(--ink-2); font-size: .76rem;
  border: 1px solid var(--line);
}
.tags li.is-accent { background: var(--accent-soft); border-color: #cfe0cc; color: var(--accent-dark); }

/* BMI */
.bmi { display: flex; align-items: center; gap: 16px; }
.ring { position: relative; display: grid; place-items: center; }
.ring--bmi { width: 104px; height: 104px; }
.ring--sm { width: 68px; height: 68px; }
.ring > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.ring__center { position: relative; display: grid; justify-items: center; line-height: 1.1; }
.ring__center strong { font-size: 1.34rem; font-variant-numeric: tabular-nums; }
.ring__center small { font-size: .68rem; color: var(--muted); }
.ring__center--sm strong { font-size: .96rem; }

.bmi__tag {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  background: var(--orange-soft); color: #95401f;
  font-size: .78rem; font-weight: 700;
}
.bmi__tag[data-tone="good"] { background: var(--accent-soft); color: var(--accent-dark); }
.bmi__info .muted { margin-top: 6px; display: block; }

.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.pair dt { font-size: .76rem; color: var(--muted); }
.pair dd { font-size: 1.16rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.pair dd small { font-size: .7rem; font-weight: 500; color: var(--muted); margin-left: 3px; }

/* 每日目标 */
.kcal { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.kcal__num { font-size: 1.9rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kcal__num small { font-size: .74rem; font-weight: 500; color: var(--muted); margin-left: 4px; }

.bars { display: grid; gap: 10px; margin-top: 14px; }
.bar__top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 5px; }
.bar__name { font-size: .82rem; color: var(--ink-2); }
.bar__value { font-size: .82rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.bar__track { height: 6px; border-radius: 999px; background: var(--track); overflow: hidden; }
.bar__fill { height: 100%; border-radius: 999px; width: 0; transition: width .4s ease; }
.bar__fill[data-kind="protein"] { background: #3f6b4a; }
.bar__fill[data-kind="carb"] { background: #d8a648; }
.bar__fill[data-kind="fat"] { background: #c9704a; }
.bar__fill[data-over="true"] { background: var(--orange); }
.bar__hint { display: none; }

.mini {
  display: flex; justify-content: space-between; gap: 10px;
  margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line);
  font-size: .84rem;
}
.mini .muted { margin-right: 4px; }

.sport {
  margin-top: 10px; padding: 7px 10px; border-radius: 10px;
  background: var(--accent-soft); color: var(--accent-dark);
  font-size: .78rem; font-weight: 600;
  display: flex; align-items: center; gap: 6px;
}
.sport::before { content: "🏃"; font-size: .8rem; }

.foot-note {
  display: flex; gap: 7px; align-items: flex-start;
  font-size: .72rem; color: var(--muted); padding: 0 6px; line-height: 1.5;
}
.foot-note svg { width: 14px; height: 14px; flex: none; margin-top: 2px; }

/* ---------- 右栏 ---------- */
.stage {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: clamp(20px, 2.2vw, 28px);
  display: flex; flex-direction: column; min-height: 660px;
}
.stage__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.who { display: flex; align-items: center; gap: 10px; }
.who__name { display: flex; align-items: center; gap: 8px; font-size: .95rem; }
.badge {
  padding: 2px 8px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-dark);
  font-size: .7rem; font-weight: 700;
}
.who__status { font-size: .78rem; }
.link-btn {
  border: 0; background: transparent; color: var(--muted);
  font: inherit; font-size: .82rem; cursor: pointer;
  min-height: 36px; padding: 4px 8px; border-radius: 8px;
}
.link-btn:hover { color: var(--ink); background: var(--card-2); }

/* Hero */
.welcome { flex: 1 1 auto; display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: clamp(12px, 2vw, 32px); align-items: start; margin-top: 18px; }
.welcome[hidden] { display: none; }
.eyebrow { font-size: .8rem; color: var(--muted); letter-spacing: .06em; margin-bottom: 10px; }
.hero__title {
  font-family: var(--serif); font-weight: 700;
  font-size: clamp(2rem, 3.1vw, 2.9rem); line-height: 1.18; letter-spacing: .01em;
}
.hero__title em { font-style: normal; color: var(--orange); display: inline-block; }
.hero__sub { margin-top: 16px; max-width: 34em; color: var(--ink-2); font-size: .95rem; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 16px; padding: 7px 13px;
  background: var(--card-2); border: 1px solid var(--line);
  border-radius: 10px; font-size: .8rem; color: var(--ink-2);
}
.chip::before { content: "✦"; color: var(--accent); font-size: .8rem; }

.hero__actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 18px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 10px 20px;
  border-radius: 999px; border: 1.5px solid transparent;
  font: inherit; font-weight: 700; font-size: .92rem; cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn--primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn--primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }

.features { display: flex; gap: 14px; flex-wrap: wrap; font-size: .76rem; color: var(--muted); }
.features li { display: inline-flex; align-items: center; gap: 5px; }
.features li::before { content: "✓"; color: var(--accent); }

/* 餐盘 */
.plate { position: relative; margin: 0; justify-self: center; width: 100%; max-width: 300px; }
.plate svg { width: 100%; height: auto; display: block; }
.plate__center {
  position: absolute; inset: 0; display: grid; place-content: center; justify-items: center;
  pointer-events: none; line-height: 1.1;
}
.plate__center strong { font-size: 2.1rem; font-family: var(--serif); }
.plate__center span { font-size: .78rem; color: var(--muted); }
.plate__tag {
  position: absolute; padding: 5px 10px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--line);
  font-size: .72rem; color: var(--ink-2); white-space: nowrap;
  box-shadow: 0 4px 12px rgba(60, 50, 30, .07);
}
.plate__tag--veg { top: 6%; right: -6%; }
.plate__tag--pro { bottom: 20%; left: -8%; }
.plate__tag--carb { bottom: 6%; right: -4%; }
.plate__note {
  margin-top: 14px; text-align: center; font-size: .74rem; color: var(--muted);
  background: var(--card-2); border-radius: 8px; padding: 6px 8px;
}

/* 提问卡片 */
.prompts__title { margin-top: 26px; font-size: .82rem; color: var(--muted); letter-spacing: .05em; }
.prompts {
  grid-column: 1 / -1;
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px;
}
.prompt {
  display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 12px;
  padding: 12px 14px; text-align: left;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  font: inherit; color: var(--ink); cursor: pointer;
  transition: border-color .15s, background-color .15s;
}
.prompt:hover { border-color: var(--line-strong); background: #fffdf7; }
.prompt__icon {
  width: 40px; height: 40px; display: grid; place-items: center;
  border-radius: 12px;
}
.prompt__icon svg { width: 21px; height: 21px; }
.prompt__icon--green { background: var(--accent-soft); color: #35603f; }
.prompt__icon--orange { background: var(--orange-soft); color: #a8512c; }
.prompt__icon--sand { background: var(--sand); color: #8a6420; }
.prompt__icon--blue { background: var(--blue-soft); color: #3c6776; }
.prompt__body { display: grid; gap: 1px; min-width: 0; }
.prompt__body strong { font-size: .88rem; }
.prompt__body small { font-size: .76rem; color: var(--muted); }
.prompt__arrow { color: var(--muted); font-size: .95rem; }

/* ---------- 对话 ---------- */
.chatlog {
  flex: 1 1 auto; overflow-y: auto; padding: 8px 4px 8px 2px;
  display: flex; flex-direction: column; gap: 14px;
  min-height: 260px; max-height: 46vh; margin-top: 18px;
  scroll-behavior: smooth;
}
.chatlog[hidden] { display: none; }
.chatlog:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }

.msg { display: flex; gap: 10px; }
.msg__avatar {
  width: 32px; height: 32px; flex: none; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-dark);
  font-size: .78rem; font-weight: 700;
}
.msg--user .msg__avatar { background: var(--sand); color: #7a5a1c; }
.msg__body { min-width: 0; max-width: 92%; }
.msg__who { font-size: .74rem; color: var(--muted); margin-bottom: 4px; }
.msg__bubble {
  background: var(--card-2); border: 1px solid var(--line);
  border-radius: 4px 14px 14px 14px; padding: 10px 14px; font-size: .92rem;
}
.msg__bubble p + p { margin-top: 8px; }
.msg__bubble ul { margin: 8px 0 0; display: grid; gap: 4px; }
.msg__bubble li { font-size: .88rem; padding-left: 12px; position: relative; }
.msg__bubble li::before { content: "·"; position: absolute; left: 2px; color: var(--accent); }
.msg__time { display: block; font-size: .7rem; color: var(--muted); margin-top: 5px; }

.msg--user { flex-direction: row-reverse; }
.msg--user .msg__who { text-align: right; }
.msg--user .msg__bubble {
  background: var(--accent); color: #fff; border-color: var(--accent);
  border-radius: 14px 4px 14px 14px;
}
.msg--user .msg__bubble li::before { color: #cfe0cc; }

/* ---------- 输入区 ---------- */
.composer {
  margin-top: 14px; display: grid; grid-template-columns: 1fr auto; gap: 10px;
  padding: 8px 8px 8px 16px; align-items: center;
  border: 1px solid var(--line-strong); border-radius: 18px; background: var(--card);
  box-shadow: 0 6px 18px rgba(60, 50, 30, .05);
}
.composer:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(47, 93, 63, .12); }
.composer__input {
  border: 0; background: transparent; min-height: 44px;
  font: inherit; font-size: .95rem; color: var(--ink); width: 100%;
}
.composer__input::placeholder { color: #9a9384; }
.composer__input:focus { outline: none; }
.send {
  width: 46px; height: 46px; flex: none; display: grid; place-items: center;
  border: 0; border-radius: 14px; background: var(--accent); color: #fff; cursor: pointer;
}
.send svg { width: 20px; height: 20px; }
.send:hover { background: var(--accent-dark); }
.send:disabled { background: #a9b8ac; cursor: not-allowed; }

.composer__hint {
  display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  margin-top: 8px; font-size: .72rem; color: var(--muted);
}
.form-error { color: #9a2d1b; font-size: .84rem; min-height: 1.1em; }
.status { color: var(--muted); font-size: .78rem; min-height: 1.1em; }

/* ---------- 抽屉 ---------- */
.drawers { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; align-items: start; }
.drawers .drawer { margin-top: 0; }
.drawers .drawer[open] { grid-column: 1 / -1; }
.drawer {
  margin-top: 10px; border: 1px solid var(--line); border-radius: 14px;
  background: var(--card-2); padding: 0 14px;
}
.drawer[open] { padding-bottom: 12px; }
.drawer summary {
  cursor: pointer; font-size: .84rem; font-weight: 700; color: var(--ink-2);
  padding: 11px 2px; border-radius: 8px;
}
.drawer summary:hover { color: var(--ink); }
.drawer__tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 6px 0 8px; }
.drawer__input {
  flex: 1 1 200px; min-height: 40px; padding: 8px 12px;
  border: 1px solid var(--line-strong); border-radius: 10px;
  background: #fff; font: inherit; font-size: .88rem; color: var(--ink);
}
.drawer__input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgba(47, 93, 63, .12); }

.today { display: grid; gap: 6px; margin-top: 8px; }
.today__item {
  display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center;
  padding: 7px 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff;
  font-size: .82rem;
}
.today__kcal { color: var(--muted); font-variant-numeric: tabular-nums; }
.today__del {
  border: 1px solid var(--line-strong); background: #fff; color: var(--ink-2);
  border-radius: 8px; min-width: 32px; min-height: 32px; padding: 0 8px;
  font: inherit; font-size: .74rem; cursor: pointer;
}
.today__del:hover { border-color: #a63a20; color: #a63a20; }
.today__empty { color: var(--muted); font-size: .82rem; padding: 6px 0; }

.plan { display: grid; gap: 8px; margin-top: 8px; }
.plan__meal { border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 10px 12px; }
.plan__head { display: flex; justify-content: space-between; gap: 8px; }
.plan__name { font-size: .86rem; font-weight: 700; }
.plan__kcal { font-size: .78rem; color: var(--muted); }
.plan__items { font-size: .8rem; color: var(--ink-2); margin-top: 3px; }

.guide { display: grid; gap: 7px; margin-top: 6px; font-size: .84rem; color: var(--ink-2); }
.guide li { padding-left: 14px; position: relative; }
.guide li::before { content: "·"; position: absolute; left: 3px; color: var(--accent); }

/* ---------- 营养表 ---------- */
.table-wrap {
  overflow: auto; max-height: 340px; border: 1px solid var(--line);
  border-radius: 10px; background: #fff;
}
.table-wrap:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.lib { width: 100%; border-collapse: collapse; font-size: .78rem; }
.lib th, .lib td { padding: 7px 9px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
.lib thead th {
  background: var(--card-2); color: var(--ink-2); font-weight: 700; vertical-align: bottom;
  position: sticky; top: 0; z-index: 1;
}
.lib th:first-child, .lib td:first-child {
  text-align: left; position: sticky; left: 0; background: #fff; z-index: 2;
}
.lib thead th:first-child { background: var(--card-2); z-index: 3; }
.lib th small { display: block; font-weight: 400; color: var(--muted); font-size: .66rem; }
.lib tbody tr:hover { background: #fbfaf4; }

/* ---------- 页脚 ---------- */
.page-foot {
  max-width: 1440px; margin: 20px auto 0;
  font-size: .72rem; color: var(--muted); text-align: center;
}

/* ---------- 弹窗 ---------- */
.dialog {
  width: min(560px, calc(100vw - 32px));
  border: 1px solid var(--line); border-radius: 22px;
  background: var(--card); color: var(--ink);
  padding: 0; box-shadow: 0 24px 60px rgba(40, 34, 20, .22);
}
.dialog::backdrop { background: rgba(38, 37, 31, .38); }
.dialog__form { padding: 22px; }
.dialog__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.dialog__head h2 { font-size: 1.05rem; }
.fieldset { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: grid; gap: 5px; }
.field--wide { grid-column: span 2; }
.field__label { font-size: .82rem; font-weight: 700; color: var(--ink-2); }
.unit { font-weight: 400; color: var(--muted); margin-left: 3px; font-size: .76rem; }
.field__input {
  min-height: 44px; padding: 9px 12px; width: 100%;
  border: 1.5px solid var(--line-strong); border-radius: 10px;
  background: #fff; color: var(--ink); font: inherit; font-size: .92rem;
}
.field__input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 4px rgba(47, 93, 63, .12); }
.field__input[aria-invalid="true"] { border-color: #a63a20; }
.dialog__actions { display: flex; justify-content: flex-end; margin-top: 16px; }

/* ---------- 响应式 ---------- */
@media (max-width: 1180px) {
  .welcome { grid-template-columns: minmax(0, 1fr); }
  .plate { max-width: 240px; margin-top: 8px; }
  .plate__tag--veg { right: 0; }
  .plate__tag--carb { right: 0; }
  .plate__tag--pro { left: 0; }
}
@media (max-width: 980px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .sidebar { display: grid; grid-template-columns: 1fr 1fr; }
  .sidebar .sport {
  margin-top: 10px; padding: 7px 10px; border-radius: 10px;
  background: var(--accent-soft); color: var(--accent-dark);
  font-size: .78rem; font-weight: 600;
  display: flex; align-items: center; gap: 6px;
}
.sport::before { content: "🏃"; font-size: .8rem; }

.foot-note { grid-column: 1 / -1; margin-top: 0; }
}
@media (max-width: 860px) {
  .drawers { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .sidebar { grid-template-columns: minmax(0, 1fr); }
  .prompts { grid-template-columns: minmax(0, 1fr); }
  .topnav { width: 100%; }
  .pill { flex: 1 1 auto; justify-content: center; }
  .fieldset { grid-template-columns: 1fr 1fr; }
  .chatlog { max-height: 42vh; }
  .hero__title { font-size: 1.9rem; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .chatlog { scroll-behavior: auto; }
}
@media (forced-colors: active) {
  .card, .pill, .prompt, .composer, .dialog, .bar__track, .drawer { border: 1px solid ButtonBorder; }
  .bar__fill { background: Highlight; }
  .msg--user .msg__bubble { background: Highlight; color: HighlightText; }
}
@media print {
  body { background: #fff; }
  .topnav, .composer, .composer__hint, .page-foot, .skip-link, .chatlog { display: none; }
  .card, .stage { box-shadow: none; }
}
