/* ericai · v7
   Toss-like clarity (grey canvas, white rounded cards, bold type, one blue)
   with a Chinese super-app layer (service grid, dense useful cards, red for urgency). */
:root {
  color-scheme: light;
  --bg: #f6f6f3;
  --surface: #ffffff;
  --surface-2: #f1f1ed;
  --surface-3: #e7e7e2;
  --hairline: #ecece7;
  --hairline-2: #e2e2dc;
  --ink: #111418;
  --ink-2: #5b6370;
  --ink-3: #8d939c;
  --accent: #0e4a84;
  --agent: #2f5bff;
  --agent-tint: #eef2ff;
  --accent-ink: #0e4a84;
  --accent-soft: #e6eef7;
  --red: #f0522a;
  --red-soft: #fdeee8;
  --green: #03b26c;
  --green-soft: #e5f8ef;
  --orange: #fe9800;
  --orange-soft: #fff4e0;
  --purple: #8b45d6;
  --purple-soft: #f4ecfd;
  --teal: #0fa5a5;
  --teal-soft: #e4f7f7;
  --yellow: #e8a500;
  --yellow-soft: #fff8e1;
  --blue: var(--accent);
  --blue-soft: var(--accent-soft);
  --cta-bg: #111418;
  --cta-fg: #fff;
  --float: rgb(255 255 255 / 94%);
  --float-solid: #fff;
  --float-edge: rgb(0 27 55 / 6%);
  --float-shadow: 0 8px 24px rgb(0 27 55 / 10%);
  --scrim: rgb(0 0 0 / 40%);
  --seg-thumb: #fff;
  --blur: blur(18px) saturate(160%);
  --radius: 20px;
  --shadow: 0 1px 2px rgb(0 27 55 / 4%);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.3, 1.3, .5, 1);
  font-family: "Pretendard Variable", Pretendard, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Malgun Gothic", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-synthesis: none;
  letter-spacing: -.02em;
  -webkit-tap-highlight-color: transparent;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e0f11;
  --surface: #17191c;
  --surface-2: #202328;
  --surface-3: #2b2f35;
  --hairline: #24272c;
  --hairline-2: #2f333a;
  --ink: #f2f3f5;
  --ink-2: #9aa3af;
  --ink-3: #85858f;
  --accent: #8fb6e6;
  --agent: #7c9bff;
  --agent-tint: #1a2140;
  --accent-ink: #8fb6e6;
  --accent-soft: #1b2633;
  --red: #ff7a55;
  --red-soft: #3a2025;
  --green: #1cc183;
  --green-soft: #183327;
  --orange: #ffa826;
  --orange-soft: #3a2c16;
  --purple: #b47ef0;
  --purple-soft: #2d2140;
  --teal: #2cc1c1;
  --teal-soft: #163334;
  --yellow: #ffc42e;
  --yellow-soft: #3a3116;
  --cta-bg: #f2f3f5;
  --cta-fg: #0e0f11;
  --float: rgb(23 25 28 / 94%);
  --float-solid: #202027;
  --float-edge: rgb(255 255 255 / 7%);
  --float-shadow: 0 8px 24px rgb(0 0 0 / 40%);
  --scrim: rgb(0 0 0 / 60%);
  --seg-thumb: #3c3c47;
  --shadow: none;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100dvh; background: var(--bg); line-height: 1.5; overflow-x: hidden; }
body.locked { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
img { display: block; max-width: 100%; }
h1, h2, h3, h4, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 10px; }
::selection { background: color-mix(in srgb, var(--accent) 25%, transparent); }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.num { font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; } }

/* Pastel icon badges (Toss / Alipay style) */
.ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); flex: 0 0 auto; }
.ic .icon { width: 21px; height: 21px; stroke-width: 2; }
.ic.sq { border-radius: 14px; }
.ic.sm { width: 32px; height: 32px; }
.ic.sm .icon { width: 17px; height: 17px; }
.ic.blue { background: var(--accent-soft); color: var(--accent); }
.ic.red { background: var(--red-soft); color: var(--red); }
.ic.green { background: var(--green-soft); color: var(--green); }
.ic.orange { background: var(--orange-soft); color: var(--orange); }
.ic.purple { background: var(--purple-soft); color: var(--purple); }
.ic.teal { background: var(--teal-soft); color: var(--teal); }
.ic.yellow { background: var(--yellow-soft); color: var(--yellow); }
.ic.grey { background: var(--surface-2); color: var(--ink-2); }

/* Surfaces */
.card { position: relative; background: var(--surface); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.glass, .glass-strong { background: var(--float); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border: 1px solid var(--float-edge); box-shadow: var(--float-shadow); }
.pressable { transition: transform .2s var(--ease), background .15s; }
.pressable:active { transform: scale(.98); }

/* Frame */
.app { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100dvh; }
.rail { position: sticky; top: 0; z-index: 20; display: flex; flex-direction: column; gap: 26px; height: 100dvh; padding: 28px 14px 18px; background: var(--surface); }
.rail-brand { display: flex; align-items: center; gap: 10px; padding: 0 10px; font-size: 21px; font-weight: 800; letter-spacing: -.05em; }
.rail-brand img { width: 30px; height: 30px; border-radius: 9px; }
.rail-brand small { display: block; color: var(--ink-3); font-size: 12px; font-weight: 600; letter-spacing: 0; }
.rail-tabs { display: grid; gap: 4px; }
.rail-tabs a { position: relative; display: flex; align-items: center; gap: 12px; height: 46px; padding: 0 14px; border-radius: 14px; color: var(--ink-2); font-size: 16px; font-weight: 600; transition: background .15s, color .15s; }
.rail-tabs a:hover { background: var(--surface-2); }
.rail-tabs a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); font-weight: 700; }
.tab-badge { margin-left: auto; min-width: 18px; padding: 0 5px; border-radius: 99px; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; font-variant-numeric: tabular-nums; letter-spacing: 0; }
.tab-badge:empty { display: none; }
.rail-foot { margin-top: auto; display: grid; gap: 10px; }
.profile-chip { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px; text-align: left; transition: background .15s; }
.profile-chip:hover { background: var(--surface-2); }
.profile-chip b { display: block; font-size: 15px; font-weight: 700; }
.profile-chip small { display: block; color: var(--ink-3); font-size: 12.5px; }
.avatar-dot { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 14px; font-weight: 700; flex: 0 0 auto; }
.avatar-dot:empty { background: var(--surface-3); }
.rail-tools, .top-tools { display: flex; align-items: center; gap: 6px; }
.lang-switch { display: inline-grid; grid-template-columns: 1fr 1fr; padding: 3px; border-radius: 10px; background: var(--surface-3); }
:root[data-theme="light"] .mobile-top .lang-switch { background: #e5e8eb; }
.lang-switch button { height: 28px; min-width: 34px; border-radius: 8px; color: var(--ink-3); font-size: 13px; font-weight: 700; transition: background .15s, color .15s; }
.lang-switch button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgb(0 0 0 / 10%); }

.main { min-width: 0; padding: 36px 48px 72px; }
.view { display: none; max-width: 640px; margin: 0 auto; }
.view.active { display: block; animation: viewIn .3s var(--ease); }
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.view-map { max-width: none; }
.mobile-top { display: none; align-items: center; justify-content: space-between; height: 48px; margin-bottom: 8px; }
.mobile-top .brand { display: flex; align-items: center; gap: 8px; font-size: 21px; font-weight: 800; letter-spacing: -.05em; }
.mobile-top .brand img { display: block; width: 26px; height: 26px; border-radius: 8px; }

/* Type */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 6px 4px 22px; }
.page-head .kick { color: var(--ink-3); font-size: 15px; font-weight: 600; }
.page-head h1 { margin-top: 4px; font-size: 26px; line-height: 1.35; font-weight: 700; letter-spacing: -.035em; }
.page-head .sub { margin-top: 6px; color: var(--ink-2); font-size: 15px; line-height: 1.6; }
.section-title, .group-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 12px; }
.section-title h2, .group-head h2 { font-size: 19px; font-weight: 700; letter-spacing: -.03em; }
.section-title a, .group-head a, .group-head .more { display: inline-flex; align-items: center; gap: 2px; color: var(--ink-3); font-size: 14px; font-weight: 600; }
.section-title .icon, .group-head .icon { width: 16px; height: 16px; }
.eyebrow { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font-size: 13.5px; font-weight: 700; }
.eyebrow .icon { width: 16px; height: 16px; }
.empty-note { padding: 14px 0; color: var(--ink-3); font-size: 15px; }
.stack { display: grid; gap: 12px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 48px; padding: 0 20px; border-radius: 14px; font-size: 16px; font-weight: 700; white-space: nowrap; transition: transform .2s var(--ease), filter .15s, background .15s; }
.btn:active { transform: scale(.97); }
.btn .icon { width: 18px; height: 18px; }
.btn.primary, .btn.white { background: var(--cta-bg); color: var(--cta-fg); }
.btn.primary:hover { filter: brightness(.95); }
.btn.ghost, .btn.soft { background: var(--accent-soft); color: var(--accent-ink); }
.btn.grey { background: var(--surface-2); color: var(--ink-2); }
.btn.text { height: auto; padding: 4px 0; color: var(--accent); font-weight: 600; font-size: 15px; }
.btn.small { height: 36px; padding: 0 14px; border-radius: 10px; font-size: 14px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .45; cursor: default; }
.round-btn { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; color: var(--ink-2); transition: background .15s; flex: 0 0 auto; }
.round-btn:hover { background: var(--surface-2); }
.round-btn .icon { width: 20px; height: 20px; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 8px; background: var(--surface-2); color: var(--ink-2); font-size: 13px; font-weight: 600; white-space: nowrap; }
.chip .icon { width: 13px; height: 13px; }
.chip.blue { background: var(--accent-soft); color: var(--accent-ink); }
.chip.red { background: var(--red-soft); color: var(--red); }
.chip.green { background: var(--green-soft); color: var(--green); }
.chip.orange { background: var(--orange-soft); color: var(--orange); }
button.chip:hover { filter: brightness(.97); }
.tag { color: var(--ink-3); font-size: 13px; }

.segmented { position: relative; display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 4px; border-radius: 14px; background: var(--surface-3); margin-bottom: 16px; }
:root[data-theme="light"] .segmented { background: #e5e8eb; }
.segmented button { position: relative; z-index: 1; height: 36px; padding: 0 14px; border-radius: 10px; color: var(--ink-3); font-size: 15px; font-weight: 700; white-space: nowrap; transition: color .15s; }
.segmented button[aria-selected="true"] { color: var(--ink); }
.seg-thumb { position: absolute; top: 4px; bottom: 4px; border-radius: 10px; background: var(--surface); box-shadow: 0 1px 4px rgb(0 0 0 / 8%); transition: left .35s var(--spring), width .35s var(--spring); }
.seg-count { margin-left: 5px; color: var(--accent); font-weight: 700; font-variant-numeric: tabular-nums; }
.segmented button[aria-selected="false"] .seg-count { color: var(--ink-3); }

/* Lists */
.list { background: var(--surface); border-radius: var(--radius); padding: 6px 20px; box-shadow: var(--shadow); }
.rows { display: grid; }
.row { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 64px; padding: 12px 0; text-align: left; }
.row .lead { display: grid; place-items: center; flex: 0 0 auto; }
.row .txt { flex: 1; min-width: 0; }
.row .txt b { display: block; font-size: 16.5px; font-weight: 600; line-height: 1.4; }
.row .txt small { display: block; margin-top: 2px; color: var(--ink-3); font-size: 14px; line-height: 1.45; }
.row .txt .clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row > .icon { color: var(--surface-3); width: 18px; height: 18px; }
:root[data-theme="dark"] .row > .icon { color: var(--ink-3); }
.row .trail { flex: 0 0 auto; text-align: right; color: var(--ink-3); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.row .trail b { display: block; color: var(--ink); font-size: 17px; font-weight: 700; }
a.row:active, button.row:active { opacity: .7; }
.dday { flex: 0 0 auto; padding: 4px 8px; border-radius: 8px; background: var(--surface-2); color: var(--ink-2); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: 0; }
.dday.hot { background: var(--red-soft); color: var(--red); }
.dday.warm { background: var(--orange-soft); color: var(--orange); }
.dday.done { background: var(--green-soft); color: var(--green); }
.emo { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); flex: 0 0 auto; }

/* Home: greeting + context */
.home-head { margin: 4px 4px 18px; }
.home-head .kick { color: var(--ink-3); font-size: 15px; font-weight: 600; }
.home-head h1 { margin-top: 4px; font-size: 26px; line-height: 1.35; font-weight: 700; letter-spacing: -.035em; }
.home-head h1 em { font-style: normal; color: var(--accent); }
.where { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; padding: 7px 12px 7px 10px; border-radius: 99px; background: var(--surface); color: var(--ink-2); font-size: 14px; font-weight: 600; box-shadow: var(--shadow); }
.where .icon { width: 16px; height: 16px; color: var(--accent); }
.where.off .icon { color: var(--ink-3); }

/* Assistant bar */
.ask-bar { display: flex; align-items: center; gap: 10px; width: 100%; height: 56px; padding: 0 8px 0 18px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); color: var(--ink-3); font-size: 16px; text-align: left; transition: box-shadow .15s; }
.ask-bar:focus-within { box-shadow: 0 0 0 2px var(--accent); }
.ask-bar input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 16px; }
.ask-bar input::placeholder { color: var(--ink-3); }
.ask-bar .send { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--accent); color: #fff; }
.ask-bar .send .icon { width: 19px; height: 19px; stroke-width: 2.2; }
.ask-bar > .icon { color: var(--accent); }
.hints { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; scrollbar-width: none; }
.hints::-webkit-scrollbar { display: none; }
.hints button { flex: 0 0 auto; height: 34px; padding: 0 13px; border-radius: 10px; background: var(--surface); color: var(--ink-2); font-size: 14px; font-weight: 600; box-shadow: var(--shadow); }
.hints button:active { transform: scale(.96); }
.assistant-reply { margin-top: 12px; padding: 18px 20px; border-radius: var(--radius); background: var(--surface); font-size: 16px; line-height: 1.6; box-shadow: var(--shadow); animation: rise .3s var(--ease); }
.assistant-reply .who { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; color: var(--accent); font-size: 13.5px; font-weight: 700; }
.assistant-reply .who .ic { width: 24px; height: 24px; }
.assistant-reply .who .ic .icon { width: 14px; height: 14px; }
.assistant-reply p + p, .assistant-reply p + .rows, .assistant-reply .rows + p { margin-top: 8px; }
.assistant-reply .rows .row { min-height: 0; padding: 10px 0; }
.assistant-reply .rows .row + .row { border-top: 1px solid var(--hairline); }
.assistant-reply .actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* Smart cards */
.smart { display: grid; gap: 12px; margin-top: 16px; }
.scard { position: relative; padding: 20px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); animation: rise .35s var(--ease) both; }
.scard:nth-child(2) { animation-delay: .04s; } .scard:nth-child(3) { animation-delay: .08s; } .scard:nth-child(4) { animation-delay: .12s; } .scard:nth-child(n+5) { animation-delay: .16s; }
.scard-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.scard-head .ic { width: 28px; height: 28px; }
.scard-head .ic .icon { width: 16px; height: 16px; }
.scard-head b { font-size: 15px; font-weight: 700; color: var(--ink-2); }
.scard-head .more { margin-left: auto; display: inline-flex; align-items: center; color: var(--ink-3); font-size: 14px; font-weight: 600; }
.scard-head .more .icon { width: 16px; height: 16px; }
.scard h3 { font-size: 22px; line-height: 1.4; font-weight: 700; letter-spacing: -.035em; }
.scard h3 em { font-style: normal; color: var(--accent); }
.scard h3 .red { color: var(--red); }
.scard .lede { margin-top: 6px; color: var(--ink-2); font-size: 15.5px; line-height: 1.6; }
.scard .foot { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.scard .foot .btn { flex: 1; }
.scard.hero { padding: 22px 20px; }
.scard.hero h3 { font-size: 24px; }

/* Meal windows inside a card */
.windows { display: grid; gap: 10px; margin-top: 16px; }
.window { display: flex; gap: 14px; align-items: center; padding: 12px; border-radius: 16px; background: var(--surface-2); }
.window .ph { position: relative; flex: 0 0 72px; height: 72px; border-radius: 12px; overflow: hidden; background: var(--surface-3); display: grid; place-items: center; color: var(--ink-3); }
.window .ph img { width: 100%; height: 100%; object-fit: cover; }
.window .ph .icon { width: 24px; height: 24px; }
.window .corner { display: inline-block; margin-bottom: 3px; padding: 1px 7px; border-radius: 6px; background: var(--surface); color: var(--ink-2); font-size: 12px; font-weight: 700; }
.window b { display: block; font-size: 16px; font-weight: 700; line-height: 1.38; }
.window small { display: block; margin-top: 2px; color: var(--ink-3); font-size: 13px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.window .price { margin-left: auto; padding-left: 8px; text-align: right; font-size: 17px; font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }
.window .price small { color: var(--orange); font-size: 12px; font-weight: 700; display: block; }
.window.sold { opacity: .5; }
.window > div { min-width: 0; flex: 1; }

/* Departures inside a card */
.departs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }
.depart { padding: 12px; border-radius: 14px; background: var(--surface-2); }
.depart:first-child { background: var(--accent-soft); }
.depart b { display: block; font-size: 22px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.depart:first-child b { color: var(--accent-ink); }
.depart small { display: block; margin-top: 2px; color: var(--ink-3); font-size: 12.5px; font-weight: 600; }

/* Service grid (宫格) */
.grid-svc { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px 4px; padding: 20px 8px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); margin-top: 12px; }
.svc { display: grid; justify-items: center; gap: 8px; color: var(--ink-2); font-size: 13px; font-weight: 600; text-align: center; }
.svc .ic { width: 46px; height: 46px; border-radius: 16px; }
.svc .ic .icon { width: 23px; height: 23px; }
.svc:active .ic { transform: scale(.92); }
.svc .ic { transition: transform .2s var(--ease); }

/* Today's dishes */
.home-food-card { margin-top: 12px; padding: 20px 0; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.home-food-card .group-head { padding: 0 20px; }
.food-scroller { display: flex; gap: 10px; padding: 0 20px 2px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; }
.food-scroller::-webkit-scrollbar { display: none; }
.food-tile { flex: 0 0 136px; display: grid; align-content: start; scroll-snap-align: start; }
.food-photo { position: relative; display: grid; place-items: center; aspect-ratio: 1; border-radius: 16px; overflow: hidden; background: var(--surface-2); color: var(--ink-3); }
.food-photo img { width: 100%; height: 100%; object-fit: cover; }
.food-photo .icon { width: 26px; height: 26px; opacity: .6; }
.food-photo b { display: none; }
.food-tile strong { margin-top: 8px; font-size: 14.5px; font-weight: 700; line-height: 1.38; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.food-tile small { margin-top: 2px; color: var(--ink-3); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.food-tile.sold { opacity: .5; }
.food-empty { display: inline-flex; align-items: center; gap: 6px; padding: 14px 0; color: var(--accent); font-weight: 700; }

/* Tasks */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.stat { padding: 16px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); text-align: left; }
.stat b { display: block; font-size: 26px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat small { display: block; margin-top: 2px; color: var(--ink-3); font-size: 13.5px; font-weight: 600; }
.stat.red b { color: var(--red); }
.stat.blue b { color: var(--accent); }
.sources-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 2px 4px 14px; color: var(--ink-3); font-size: 13.5px; }
.notice-list { display: grid; }
.notice-card { display: flex; gap: 14px; width: 100%; padding: 16px 0; text-align: left; }
.notice-card + .notice-card { border-top: 1px solid var(--hairline); }
.notice-card .nc-body { flex: 1; min-width: 0; display: grid; gap: 4px; }
.nc-top { display: flex; align-items: center; gap: 6px; color: var(--ink-3); font-size: 13px; }
.nc-top .src { font-weight: 600; color: var(--ink-2); }
.src-dot { display: none; }
.nc-title { font-size: 16.5px; line-height: 1.45; font-weight: 700; letter-spacing: -.025em; }
.nc-ko { color: var(--ink-3); font-size: 13px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.nc-sum { color: var(--ink-2); font-size: 14.5px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nc-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 4px; }
.nc-foot .reason { color: var(--ink-3); font-size: 13px; }
.new-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); flex: 0 0 auto; }
.notice-card.unread .nc-title::after { content: ""; display: inline-block; width: 7px; height: 7px; margin-left: 6px; vertical-align: .25em; border-radius: 50%; background: var(--red); }
.notice-card.skip .nc-title { color: var(--ink-2); font-weight: 600; }
.todo-group { margin-top: 18px; }
.todo-group h3 { display: flex; align-items: center; gap: 8px; margin: 0 4px 10px; font-size: 17px; font-weight: 700; }
.todo-group h3 span { color: var(--ink-3); font-size: 15px; font-weight: 600; }
.todo-group h3 i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.todo-group.overdue h3 i, .todo-group.today h3 i { background: var(--red); }
.todo-group.tomorrow h3 i { background: var(--orange); }
.todo-group.none h3 i, .todo-group.done h3 i { background: var(--ink-3); }
.todo-group .list { padding: 2px 18px; }
details.todo-group > summary { list-style: none; cursor: pointer; }
details.todo-group > summary::-webkit-details-marker { display: none; }
.todo-item { display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 12px 0; }
.todo-item + .todo-item { border-top: 1px solid var(--hairline); }
.tick { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--surface-3); color: transparent; flex: 0 0 auto; transition: background .2s, border-color .2s, transform .3s var(--spring); }
.tick:active { transform: scale(.85); }
.tick .icon { width: 14px; height: 14px; stroke-width: 3; }
.tick[aria-checked="true"] { border-color: var(--accent); background: var(--accent); color: #fff; }
.todo-item .txt { flex: 1; min-width: 0; }
.todo-item .txt b { display: block; font-size: 16.5px; font-weight: 600; line-height: 1.4; }
.todo-item .txt small { display: block; margin-top: 2px; color: var(--ink-3); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.todo-item .txt small a { color: var(--accent); }
.todo-item.is-done .txt b { color: var(--ink-3); text-decoration: line-through; }
.todo-item .rm { width: 32px; height: 32px; color: var(--ink-3); opacity: 0; }
.todo-item:hover .rm, .todo-item .rm:focus-visible { opacity: 1; }
.todo-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin: 14px 4px 0; }
.add-todo { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; margin-top: 16px; padding: 12px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.add-todo input, .field { min-width: 0; height: 48px; padding: 0 14px; border: 0; border-radius: 12px; background: var(--surface-2); font-size: 16px; outline: 0; }
.add-todo input:focus, .field:focus { box-shadow: 0 0 0 2px var(--accent); }
.add-todo input[type="date"] { width: 150px; color: var(--ink-2); }
.add-todo input::placeholder, .field::placeholder { color: var(--ink-3); }
.add-todo .btn { height: 48px; }

/* Detail sheet content */
.d-head { padding-right: 46px; }
.d-title { margin-top: 8px; font-size: 22px; line-height: 1.4; font-weight: 700; letter-spacing: -.035em; }
.d-ko { margin-top: 4px; color: var(--ink-3); font-size: 13.5px; line-height: 1.5; }
.ai-box { margin-top: 18px; padding: 16px 18px; border-radius: 16px; background: var(--surface-2); font-size: 16px; line-height: 1.7; }
.ai-box .eyebrow { margin-bottom: 4px; }
.d-sub { margin: 26px 0 10px; color: var(--ink); font-size: 17px; font-weight: 700; }
.reasons { display: grid; gap: 8px; }
.reason { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; line-height: 1.55; color: var(--ink-2); }
.reason i { display: grid; place-items: center; width: 22px; height: 22px; margin-top: 1px; border-radius: 50%; flex: 0 0 auto; }
.reason i .icon { width: 13px; height: 13px; stroke-width: 2.8; }
.reason.ok i { background: var(--green-soft); color: var(--green); }
.reason.no i { background: var(--red-soft); color: var(--red); }
.reason.warn i { background: var(--orange-soft); color: var(--orange); }
.reason.info i { background: var(--surface-2); color: var(--ink-3); }
.fact-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.fact { padding: 12px 14px; border-radius: 14px; background: var(--surface-2); }
.fact dt { color: var(--ink-3); font-size: 13px; }
.fact dd { margin-top: 2px; font-size: 15px; font-weight: 700; line-height: 1.45; word-break: break-word; }
.todo-suggest { display: grid; gap: 8px; }
.ts { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 16px; border-radius: 14px; background: var(--surface-2); }
.ts .txt { flex: 1; }
.ts .txt b { display: block; font-size: 15.5px; font-weight: 700; }
.ts .txt small { color: var(--ink-3); font-size: 13px; }
.body-list { display: grid; gap: 8px; }
.body-list li { position: relative; padding-left: 14px; color: var(--ink-2); font-size: 15.5px; line-height: 1.7; }
.body-list li::before { content: ""; position: absolute; left: 1px; top: .78em; width: 4px; height: 4px; border-radius: 50%; background: var(--ink-3); }
.original { padding: 16px; border-radius: 14px; background: var(--surface-2); color: var(--ink-2); font-size: 15px; line-height: 1.9; }
.term { padding: 0 2px; border-radius: 4px; color: var(--accent-ink); font-weight: 700; background: var(--accent-soft); }
.term[aria-expanded="true"] { background: var(--accent); color: #fff; }
.term-pop { margin-top: 10px; padding: 14px 16px; border-radius: 14px; background: var(--surface-2); animation: rise .2s var(--ease); }
.term-pop b { font-size: 18px; }
.term-pop .roman { margin-left: 8px; color: var(--ink-3); font-size: 13px; }
.term-pop p { margin-top: 3px; color: var(--ink-2); font-size: 15px; }
.link-out { display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: 100%; height: 52px; margin-top: 24px; border-radius: 14px; background: var(--accent-soft); color: var(--accent-ink); font-size: 16px; font-weight: 700; }
.link-out .icon { width: 16px; height: 16px; }
.g-steps { display: grid; gap: 8px; counter-reset: s; }
.g-steps li { position: relative; padding: 14px 14px 14px 50px; border-radius: 14px; background: var(--surface-2); font-size: 15.5px; line-height: 1.65; counter-increment: s; }
.g-steps li::before { content: counter(s); position: absolute; left: 14px; top: 14px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 12.5px; font-weight: 800; }
.g-tip { margin-top: 12px; padding: 14px 16px; border-radius: 14px; background: var(--orange-soft); color: var(--ink-2); font-size: 15px; line-height: 1.6; }
.g-tip strong { color: var(--orange); }
.src-links { display: flex; flex-wrap: wrap; gap: 8px; }
.src-links a { display: inline-flex; align-items: center; gap: 5px; padding: 9px 13px; border-radius: 10px; background: var(--surface-2); font-size: 14px; font-weight: 600; }
.src-links .icon { width: 14px; height: 14px; color: var(--ink-3); }

.notice-images { display: grid; gap: 8px; }
.notice-images img { width: 100%; border-radius: 12px; background: var(--surface-2); }

.mail-address { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 14px 16px; border-radius: 14px; background: var(--surface-2); font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; word-break: break-all; text-align: left; }
.mail-address span { flex: 0 0 auto; padding: 6px 10px; border-radius: 8px; background: var(--accent); color: #fff; font-size: 13px; }
.mail-confirm { display: grid; gap: 8px; margin-top: 12px; padding: 14px 16px; border-radius: 14px; background: var(--green-soft); }
.mail-confirm b { color: var(--green); }
.mail-confirm small { color: var(--ink-3); font-size: 12.5px; }
.mail-code { justify-self: start; padding: 8px 14px; border-radius: 10px; background: var(--surface); font-size: 22px; font-weight: 800; letter-spacing: .08em; font-variant-numeric: tabular-nums; }

.import-form { display: grid; gap: 8px; }
.import-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.import-help { margin-top: 8px; color: var(--ink-3); font-size: 13px; line-height: 1.55; }
.import-status { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); font-size: 14px; font-weight: 600; }
.import-status.ok { background: var(--green-soft); color: var(--green); }
.import-status.bad { background: var(--red-soft); color: var(--red); }

/* Guide */
.ask-search { display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 16px; border-radius: 18px; background: var(--surface); color: var(--ink-3); box-shadow: var(--shadow); }
.ask-search:focus-within { box-shadow: 0 0 0 2px var(--accent); }
.ask-search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 16px; }
.ask-search input::placeholder { color: var(--ink-3); }
.ask-search .btn { display: none; }
.answer { margin-top: 12px; animation: rise .25s var(--ease); }
.answer h3 { margin-top: 6px; font-size: 20px; font-weight: 700; }
.answer p:not(.eyebrow) { margin-top: 4px; color: var(--ink-2); font-size: 15.5px; line-height: 1.65; }
.answer .fact-grid { margin-top: 14px; }
.answer .related { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 16px; }
.scene-chips { display: flex; gap: 8px; margin-bottom: 12px; overflow-x: auto; scrollbar-width: none; }
.scene-chips::-webkit-scrollbar { display: none; }
.scene-chips button { flex: 0 0 auto; height: 36px; padding: 0 14px; border-radius: 99px; background: var(--surface); color: var(--ink-2); font-size: 14.5px; font-weight: 600; box-shadow: var(--shadow); }
.scene-chips button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.qa-list { padding: 2px 20px; }
.qa + .qa { border-top: 1px solid var(--hairline); }
.qa summary { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 14px 0; cursor: pointer; list-style: none; font-size: 16.5px; font-weight: 600; line-height: 1.45; }
.qa summary::-webkit-details-marker { display: none; }
.qa .rank { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 8px; background: var(--surface-2); color: var(--ink-3); font-size: 13px; font-weight: 800; flex: 0 0 auto; font-variant-numeric: tabular-nums; }
.qa .rank.top { background: var(--red-soft); color: var(--red); }
.qa summary span:nth-child(2) { flex: 1; }
.qa summary .icon { width: 16px; height: 16px; color: var(--ink-3); transition: transform .25s var(--ease); }
.qa[open] summary .icon { transform: rotate(90deg); }
.qa .qa-a { padding: 0 0 16px 36px; color: var(--ink-2); font-size: 15.5px; line-height: 1.7; }
.qa .qa-a button { display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; color: var(--accent); font-size: 14.5px; font-weight: 700; }
.qa .qa-a .icon { width: 14px; height: 14px; }
.term-grid, .phrase-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.term-card, .phrase-card { display: grid; align-content: start; gap: 2px; padding: 18px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.term-card .ko, .phrase-card .ko { font-size: 19px; font-weight: 700; }
.term-card .roman, .phrase-card .roman { color: var(--ink-3); font-size: 13px; }
.term-card .zh, .phrase-card .zh { margin-top: 6px; font-size: 15px; color: var(--ink-2); font-weight: 600; }
.term-card .note { color: var(--ink-3); font-size: 13.5px; line-height: 1.55; }
.card-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.mini-btn { display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 11px; border-radius: 9px; background: var(--accent-soft); color: var(--accent-ink); font-size: 13px; font-weight: 700; }
.mini-btn:active { transform: scale(.95); }
.mini-btn .icon { width: 14px; height: 14px; }
.help-grid { display: grid; gap: 10px; }
.help-card { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.help-card .emo { background: var(--accent-soft); color: var(--accent); }
.help-card.red .emo { background: var(--red-soft); color: var(--red); }
.help-card.green .emo { background: var(--green-soft); color: var(--green); }
.help-card b { display: block; font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.help-card small { display: block; color: var(--ink-3); font-size: 13.5px; line-height: 1.45; }
.help-card small strong { color: var(--ink-2); font-weight: 700; }

/* Campus switcher */
.campus-switch { display: inline-flex; gap: 4px; margin: 4px 4px 18px; padding: 4px; border-radius: 14px; background: #e5e8eb; }
:root[data-theme="dark"] .campus-switch { background: var(--surface-3); }
.campus-switch a { padding: 7px 18px; border-radius: 10px; color: var(--ink-3); font-size: 15px; font-weight: 700; }
.campus-switch a[aria-current="page"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 4px rgb(0 0 0 / 8%); }

/* Sheet */
.sheet-layer { position: fixed; inset: 0; z-index: 60; display: grid; align-items: stretch; justify-items: end; padding: 12px; }
.sheet-scrim { position: absolute; inset: 0; background: var(--scrim); animation: fade .25s; }
.sheet { position: relative; width: min(520px, 100%); padding: 24px 24px 36px; overflow-y: auto; overscroll-behavior: contain; background: var(--surface); border-radius: 24px; animation: sheetSide .35s var(--ease); }
.sheet.glass { -webkit-backdrop-filter: none; backdrop-filter: none; border: 0; box-shadow: 0 20px 60px rgb(0 0 0 / 20%); }
@keyframes sheetSide { from { transform: translateX(32px); opacity: 0; } }
@keyframes sheetUp { from { transform: translateY(60px); } }
.sheet-grip { display: none; }
.sheet-close { position: sticky; top: 0; float: right; z-index: 3; background: var(--surface-2); }
.show-dialog { width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 40px 24px; border: 0; background: var(--surface); color: var(--ink); text-align: center; }
.show-dialog[open] { display: grid; place-content: center; gap: 20px; }
.show-dialog .round-btn { position: absolute; top: 18px; right: 18px; }
#show-ko { font-size: clamp(40px, 9vw, 96px); font-weight: 800; line-height: 1.25; letter-spacing: -.04em; word-break: keep-all; }
#show-zh { color: var(--ink-2); font-size: clamp(18px, 3vw, 26px); }
.toast { position: fixed; z-index: 95; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translateX(-50%); max-width: calc(100% - 32px); padding: 12px 18px; border-radius: 14px; background: #333d4b; color: #fff; font-size: 15px; font-weight: 600; border: 0; box-shadow: 0 8px 24px rgb(0 0 0 / 20%); -webkit-backdrop-filter: none; backdrop-filter: none; animation: pop .25s var(--ease); }

/* Responsive */
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .rail { position: fixed; z-index: 40; inset: auto 0 0 0; height: auto; padding: 6px 10px max(8px, env(safe-area-inset-bottom)); gap: 0; border-radius: 20px 20px 0 0; background: var(--float); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: 0 -1px 0 var(--hairline), 0 -6px 20px rgb(0 27 55 / 5%); }
  .rail-brand, .rail-foot { display: none; }
  .rail-tabs { grid-template-columns: repeat(4, minmax(0, 1fr)); width: 100%; gap: 0; }
  .rail-tabs a { flex-direction: column; justify-content: center; gap: 3px; height: 54px; padding: 0; border-radius: 0; font-size: 11.5px; font-weight: 600; color: var(--ink-3); }
  .rail-tabs a:hover { background: none; }
  .rail-tabs a[aria-current="page"] { background: none; color: var(--ink); font-weight: 700; }
  .rail-tabs a[aria-current="page"] .icon { color: var(--ink); stroke-width: 2.2; }
  .rail-tabs a .icon { width: 24px; height: 24px; }
  .tab-badge { position: absolute; top: 4px; left: calc(50% + 6px); min-width: 17px; padding: 0 4px; font-size: 10.5px; line-height: 17px; }
  .main { padding: max(6px, env(safe-area-inset-top)) 16px calc(96px + env(safe-area-inset-bottom)); }
  .mobile-top { display: flex; }
  .page-head .head-actions { display: none; }
  .sheet-layer { padding: 0; align-items: end; justify-items: stretch; }
  .sheet { width: 100%; max-height: 92dvh; padding: 10px 20px calc(30px + env(safe-area-inset-bottom)); border-radius: 24px 24px 0 0; animation: sheetUp .35s var(--ease); }
  .sheet-grip { display: block; width: 40px; height: 5px; margin: 0 auto 10px; border-radius: 99px; background: var(--surface-3); }
  .todo-item .rm { opacity: 1; }
}
@media (max-width: 600px) {
  .term-grid, .phrase-grid { grid-template-columns: 1fr; }
  .segmented { display: grid; width: 100%; }
  .segmented button { padding: 0 6px; }
  .add-todo { grid-template-columns: 1fr auto; }
  .add-todo input[type="text"] { grid-column: 1 / -1; }
  .add-todo input[type="date"] { width: 100%; }
}
@media (max-width: 370px) {
  .main { padding-left: 12px; padding-right: 12px; }
  .grid-svc { grid-template-columns: repeat(4, 1fr); padding: 16px 2px; }
  .departs b { font-size: 19px; }
}


/* ═════════════ ERICAI Agent ═════════════ */
.agent-mark { position: relative; display: inline-grid; place-items: center; width: var(--s); height: var(--s); flex: 0 0 auto; color: var(--agent); }
.agent-mark svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.agent-mark rect { fill: var(--agent-tint); stroke: currentColor; }
.agent-mark .dot { fill: currentColor; stroke: none; transform-origin: 23.2px 16px; }
.agent-mark.working .dot { animation: agentPulse 1.6s ease-in-out infinite; }
.agent-mark.new::after { content: ""; position: absolute; top: -1px; right: -1px; width: 28%; height: 28%; border-radius: 50%; background: var(--red); border: 2px solid var(--bg); }
.agent-mark.error .dot { fill: var(--red); }
@keyframes agentPulse { 50% { transform: scale(1.55); opacity: .45; } }

/* Home */
.agent-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 4px 0 14px; }
.agent-id { display: flex; align-items: center; gap: 10px; min-width: 0; }
.agent-id b { display: block; font-size: 18px; font-weight: 800; letter-spacing: -.03em; }
.agent-id b em { font-style: normal; color: var(--agent); }
.agent-id small { display: block; color: var(--ink-3); font-size: 13px; font-weight: 500; }
.brief { padding: 18px 18px 12px; border-radius: 20px; background: var(--agent-tint); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--agent) 18%, transparent); }
.brief-text { min-height: 54px; font-size: 17px; line-height: 1.6; font-weight: 500; letter-spacing: -.02em; }
.brief-text.streaming::after { content: ""; display: inline-block; width: 2px; height: 1em; margin-left: 2px; vertical-align: -.15em; background: var(--agent); animation: blink .8s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.brief-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; }
.brief-foot .btn.text { color: var(--agent); font-size: 13px; }
.brief-foot .btn.primary { background: var(--agent); color: #fff; }
.home-where { margin: 12px 0 0; }
.home-where .where { margin: 0; }
.now-strip { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.now-block { display: grid; gap: 2px; padding: 14px 16px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); min-width: 0; }
.now-block small { display: flex; align-items: center; gap: 5px; color: var(--ink-3); font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.now-block small .icon { width: 14px; height: 14px; }
.now-block b { font-size: 30px; line-height: 1.2; font-weight: 800; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.now-block span { color: var(--ink-2); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pending-row { display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 12px; padding: 14px 16px; border-radius: 16px; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--agent); text-align: left; font-size: 15px; font-weight: 700; }
.pending-row span { flex: 1; }
.pending-row b { display: inline-flex; align-items: center; color: var(--agent); font-size: 14px; }
.pending-row b .icon { width: 16px; height: 16px; }
.home-section { margin-top: 22px; }
.home-section .group-head { margin-bottom: 8px; }
.mini-head { margin: 12px 4px 6px; color: var(--ink-3); font-size: 13px; font-weight: 700; }
.mini-head span { font-weight: 500; }
.skipped-row small { color: var(--ink-3); }
.footprint { display: flex; align-items: center; gap: 6px; margin: 16px 4px 0; color: var(--ink-3); font-size: 12.5px; }
.src-badge { display: inline-block; margin-left: 4px; padding: 1px 6px; border-radius: 6px; background: var(--surface-2); color: var(--ink-2); font-size: 11.5px; font-weight: 600; vertical-align: 1px; }
.warn { display: inline-block; margin-left: 4px; color: var(--red); font-size: 12px; font-weight: 600; }
.agent-summary { margin-top: 4px; color: var(--ink-2); font-size: 13.5px; line-height: 1.55; }

/* Docked input above the tab bar */
.ask-dock { position: sticky; bottom: 12px; z-index: 30; margin-top: 18px; display: grid; gap: 8px; }
.dock-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.dock-chips::-webkit-scrollbar { display: none; }
.dock-chips button { flex: 0 0 auto; height: 30px; padding: 0 11px; border-radius: 99px; background: var(--surface); color: var(--ink-2); font-size: 13px; font-weight: 600; box-shadow: 0 0 0 1px var(--hairline-2); }
.dock-input { display: flex; align-items: center; gap: 8px; height: 52px; padding: 0 6px 0 12px; border-radius: 26px; background: var(--surface); box-shadow: 0 0 0 1px var(--hairline-2), 0 8px 24px rgb(17 20 24 / 8%); }
.dock-input:focus-within { box-shadow: 0 0 0 2px var(--agent), 0 8px 24px rgb(17 20 24 / 8%); }
.dock-input input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font-size: 16px; }
.dock-input input::placeholder { color: var(--ink-3); }
.dock-input .send { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: var(--bg); }
.dock-input .send .icon { width: 18px; height: 18px; stroke-width: 2.2; }
#view-today #assistant-reply .assistant-reply { margin-top: 18px; }
#view-today .assistant-reply .who .ic { background: var(--agent-tint); color: var(--agent); }

/* Onboarding */
.ob { position: fixed; inset: 0; z-index: 80; overflow-y: auto; background: var(--bg); animation: fade .2s var(--ease); }
.ob-top { position: sticky; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: max(14px, env(safe-area-inset-top)) 20px 10px; background: var(--bg); }
.ob-progress { display: flex; gap: 4px; }
.ob-progress i { width: 28px; height: 4px; border-radius: 99px; background: var(--surface-3); }
.ob-progress i.on { background: var(--ink); }
.ob-skip { color: var(--ink-3); font-size: 15px; font-weight: 600; }
.ob-body { width: min(560px, 100%); margin: 0 auto; padding: 18px 20px 120px; animation: rise .3s var(--ease); }
.ob-body h1 { font-size: 26px; line-height: 1.35; font-weight: 800; letter-spacing: -.035em; }
.ob-sub { margin-top: 8px; color: var(--ink-2); font-size: 15.5px; line-height: 1.6; }
.ob-sub.agent-voice { color: var(--ink); }
.ob-options { display: grid; gap: 10px; margin-top: 24px; }
.ob-options.grid { grid-template-columns: 1fr 1fr; }
.ob-opt { display: grid; gap: 2px; padding: 18px; border-radius: 18px; background: var(--surface); text-align: left; font-size: 17px; font-weight: 700; box-shadow: 0 0 0 1px var(--hairline-2); transition: transform .12s var(--ease), box-shadow .15s; }
.ob-opt small { color: var(--ink-3); font-size: 13px; font-weight: 500; }
.ob-opt:active { transform: scale(.97); }
.ob-opt.on { box-shadow: 0 0 0 2px var(--ink); }
.ob-search { width: 100%; height: 52px; margin-top: 20px; padding: 0 16px; border: 0; border-radius: 14px; background: var(--surface); box-shadow: 0 0 0 1px var(--hairline-2); font-size: 16px; outline: 0; }
.ob-search:focus { box-shadow: 0 0 0 2px var(--ink); }
.ob-gate { display: grid; grid-template-rows: 1fr auto; min-height: 100dvh; padding: 0 24px max(28px, env(safe-area-inset-bottom)); width: min(460px, 100%); margin: 0 auto; }
.ob-brand { display: grid; place-items: center; align-content: center; gap: 16px; }
.ob-brand .agent-mark { animation: breathe .6s var(--ease) 1; }
@keyframes breathe { 50% { transform: scale(1.08); } }
.ob-brand b { font-size: 30px; font-weight: 800; letter-spacing: -.04em; }
.ob-brand b span { color: var(--agent); }
.ob-actions { display: grid; gap: 8px; justify-items: center; }
.ob-actions .btn.primary { height: 54px; font-size: 17px; }
.ob-actions .btn.text { color: var(--ink-2); padding: 12px; }
.ob-agentline { margin-bottom: 14px; }
.ob-work h1 { margin-bottom: 24px; }
.ob-steps { display: grid; gap: 4px; }
.ob-steps li { display: flex; align-items: center; gap: 12px; padding: 12px 0; color: var(--ink-3); font-size: 16px; font-weight: 600; transition: color .2s; }
.ob-steps li i { position: relative; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--surface-3); flex: 0 0 auto; }
.ob-steps li.active { color: var(--ink); }
.ob-steps li.active i { border-color: var(--agent); border-top-color: transparent; animation: spin .8s linear infinite; }
.ob-steps li.done { color: var(--ink); }
.ob-steps li.done i { border-color: var(--agent); background: var(--agent); animation: none; }
.ob-steps li.done i::after { content: ""; position: absolute; left: 6px; top: 2px; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.ob-steps li b { margin-left: auto; color: var(--ink-2); font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
@keyframes spin { to { transform: rotate(360deg); } }
.ob-group { display: flex; gap: 6px; margin: 24px 4px 8px; font-size: 16px; font-weight: 800; }
.ob-group span { color: var(--ink-3); font-weight: 600; }
.ob-item { display: flex; align-items: center; gap: 10px; padding: 12px 0; }
.ob-item + .ob-item { border-top: 1px solid var(--hairline); }
.ob-item .txt { flex: 1; min-width: 0; }
.ob-item .txt b { display: block; font-size: 16px; font-weight: 600; line-height: 1.4; }
.ob-item .txt small { display: block; margin-top: 2px; color: var(--ink-3); font-size: 13px; }
.ob-item-actions { display: flex; align-items: center; gap: 4px; }
.ob-cta { position: fixed; left: 0; right: 0; bottom: 0; padding: 12px 20px max(16px, env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--bg) 70%, transparent); }
.ob-cta .btn { width: min(520px, 100%); margin: 0 auto; display: flex; height: 54px; font-size: 17px; }
.ob .scard .scard-head .ic { background: var(--agent-tint); color: var(--agent); }

/* Lean login dialog */
.login-mark { margin-bottom: 10px; }
.account-content h1, .account-progress ~ h1 { font-size: 26px; font-weight: 800; }
.account-form input { height: 52px; padding: 0 14px; border: 0; border-radius: 14px; background: var(--surface-2); font-size: 17px; outline: 0; }
.account-form input:focus { box-shadow: 0 0 0 2px var(--ink); }
.account-form .account-btn.primary { height: 52px; font-size: 16px; }

@media (max-width: 860px) {
  .ask-dock { bottom: calc(76px + env(safe-area-inset-bottom)); }
  .rail-tabs a[aria-current="page"][data-tab="today"] .icon { color: var(--agent); }
}
