/* 途灵 AI: a calm page with an AI feel (the 35B mockup's gradients and glow, 2026-11-15), readable in light and dark */
:root {
  --bg: #f7f8fa; --bg2: #ffffff; --fg: #1a1d23; --muted: #6b7280; --line: #e8ebf0;
  --pri: #4f6ef7; --pri2: #06b6d4; --pri-l: #eef0fe; --ok: #16a34a; --ok-l: #f0fdf4; --warn: #ea580c; --warn-l: #fff7ed;
  --bad: #dc2626; --gray-l: #f3f4f6; --tag: #374151; --sub: #f9fafb;
  --shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04); --glow: 0 4px 16px rgba(0,0,0,.08); --r: 12px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0f1117; --bg2: #1a1d28; --fg: #e5e7eb; --muted: #9ca3af; --line: #2a2d3a;
          --pri: #6b8aff; --pri-l: #1e2444; --ok: #34d399; --ok-l: #052e16; --warn: #fb923c; --warn-l: #431407;
          --gray-l: #1f2937; --tag: #d1d5db; --sub: #151822;
          --shadow: 0 1px 3px rgba(0,0,0,.2); --glow: 0 4px 16px rgba(0,0,0,.3); color-scheme: dark; }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 15px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
       -webkit-font-smoothing: antialiased; }
a { color: var(--pri); text-decoration: none; }
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px; padding: 10px 16px;
       padding-top: calc(10px + env(safe-area-inset-top, 0px)); background: color-mix(in srgb, var(--bg2) 88%, transparent);
       backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 8px; color: var(--fg); }
.logo { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; color: #fff; font-weight: 800; font-size: 13px;
        background: var(--pri); }
nav { display: flex; gap: 4px; margin-left: auto; }
nav a { padding: 6px 12px; border-radius: 999px; color: var(--muted); }
nav a.on { background: color-mix(in srgb, var(--pri) 14%, transparent); color: var(--pri); font-weight: 600; }
#enter { margin-left: auto; }
main { max-width: 760px; margin: 0 auto; padding: 16px 16px 40px; }
.page { display: none; }
.page.on { display: block; }
h1 { font-size: 30px; line-height: 1.3; margin: 8px 0 12px; }
h2 { font-size: 18px; margin: 0 0 12px; }
.grad { background: linear-gradient(90deg, var(--pri), var(--pri2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero { position: relative; text-align: center; padding: 40px 8px 24px; overflow: hidden; }
.orb { position: absolute; inset: -40% 20% auto; height: 260px; border-radius: 50%; filter: blur(60px); opacity: .35; z-index: -1;
       background: radial-gradient(circle, var(--pri), transparent 60%), radial-gradient(circle at 70% 40%, var(--pri2), transparent 55%); }
.lead { color: var(--muted); max-width: 520px; margin: 0 auto 20px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 10px; cursor: pointer;
       padding: 9px 16px; font: inherit; font-weight: 600; color: #fff; background: var(--pri); box-shadow: none; }
.btn:disabled { opacity: .5; cursor: default; }
.btn.big { padding: 13px 34px; font-size: 17px; }
.btn.small { padding: 6px 12px; font-size: 13px; }
.btn.full { width: 100%; margin-top: 8px; }
.btn.ghost { background: transparent; color: var(--pri); border: 1px solid var(--line); box-shadow: none; }
.btn.danger { background: transparent; color: var(--bad); border: 1px solid var(--line); box-shadow: none; }
.features { display: grid; gap: 10px; margin: 8px 0 24px; }
.feat { display: flex; gap: 14px; padding: 14px 16px; background: var(--bg2); border: 1px solid var(--line); border-radius: var(--r); }
.feat p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.fi { font-size: 24px; }
.example { display: grid; gap: 8px; }
.note, .muted { color: var(--muted); }
.small { font-size: 13px; }
.note { font-size: 13px; text-align: center; margin-top: 24px; }
.panel { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; margin-bottom: 14px; }
.narrow { max-width: 420px; margin: 24px auto; }
.tabs { display: flex; gap: 4px; margin-bottom: 14px; }
.tabs button { flex: 1; padding: 8px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font: inherit; cursor: pointer; }
.tabs button.on { background: color-mix(in srgb, var(--pri) 14%, transparent); color: var(--pri); font-weight: 600; }
label { display: block; margin-bottom: 10px; font-size: 13px; color: var(--muted); }
input, textarea { display: block; width: 100%; margin-top: 4px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
                  background: var(--bg); color: var(--fg); font: inherit; font-size: 16px; }
input:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--pri) 50%, transparent); border-color: transparent; }
.row { display: flex; gap: 8px; align-items: flex-end; }
.row .grow { flex: 1; }
.row .btn { margin-bottom: 10px; white-space: nowrap; }
.err { color: var(--bad); font-size: 13px; min-height: 1em; margin: 8px 0 0; }
/* the conversation: 35B's draft (docs/04-chat-ui.35b-*), adapted: a column, the AI's words without a bubble, the customer's
   in one, times under each, a line between days, the box at the bottom */
body.chatting main { padding-bottom: 150px; }
body.chatting .foot { display: none; }
.chat { display: flex; flex-direction: column; }
.date-divider { text-align: center; margin: 24px 0 16px; position: relative; }
.date-divider::before { content: ''; position: absolute; top: 50%; left: 0; right: 0; height: 1px; background: var(--line); }
.date-divider span { position: relative; display: inline-block; background: var(--bg); padding: 0 14px; font-size: 12px; color: var(--muted); }
.msg { margin-bottom: 18px; animation: fadeIn .25s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.ai-message { display: flex; gap: 12px; align-items: flex-start; }
.ai-avatar { width: 30px; height: 30px; min-width: 30px; border-radius: 50%; background: var(--pri); color: #fff; display: grid; place-items: center;
             font-size: 13px; font-weight: 700; margin-top: 2px; }
.ai-content { flex: 1; min-width: 0; }
.ai-text { line-height: 1.7; white-space: pre-wrap; word-break: break-word; }
.ai-text.wait { color: var(--muted); }
.user-message { display: flex; flex-direction: column; align-items: flex-end; }
.user-bubble { max-width: 80%; background: var(--pri-l); padding: 9px 15px; border-radius: 18px 18px 4px 18px; white-space: pre-wrap; word-break: break-word; }
.msg-time { font-size: 12px; color: var(--muted); margin-top: 4px; }
.dots::after { content: ''; animation: dots 1.5s steps(4, end) infinite; }
@keyframes dots { 0% { content: ''; } 25% { content: '.'; } 50% { content: '..'; } 75% { content: '...'; } }
/* a card of conditions */
.condition-card { margin-top: 10px; background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; box-shadow: var(--shadow); }
.condition-header { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.condition-icon { width: 28px; height: 28px; border-radius: 8px; background: var(--pri-l); display: grid; place-items: center; font-size: 14px; flex: none; }
.condition-name { font-size: 14px; font-weight: 600; }
.condition-summary { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.condition-card pre.res { margin-bottom: 8px; }
.link-btn { font: inherit; font-size: 12px; color: var(--pri); background: var(--pri-l); border: 1px solid transparent; padding: 4px 12px; border-radius: 6px; cursor: pointer; }
.link-btn:hover { border-color: var(--pri); }
.link-btn:disabled { opacity: .5; cursor: default; }
/* 「正在查」: turning while it runs */
.checking { margin-top: 10px; display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--bg2); border: 1px solid var(--line);
            border-radius: 12px; box-shadow: var(--shadow); font-size: 13px; color: var(--muted); }
.checking b { color: var(--fg); font-weight: 600; }
.checking .el { color: var(--pri); font-weight: 500; white-space: nowrap; margin-left: auto; font-variant-numeric: tabular-nums; }
.spin { width: 18px; height: 18px; border: 2px solid var(--line); border-top-color: var(--pri); border-radius: 50%; animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.checking.done { background: transparent; box-shadow: none; border-color: transparent; padding: 2px 0; }
.checking.done .tick { color: var(--ok); font-weight: 700; }
.checking.failed .tick { color: var(--warn); }
/* a result: a day a line, opened the ways as a time line */
.result-card { margin-top: 10px; background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--glow); overflow: hidden; }
.result-card.notify { border-color: var(--pri); }
.result-card.notify .result-header { background: var(--pri-l); }
.result-header { padding: 14px 16px 10px; border-bottom: 1px solid var(--line); }
.result-title { font-size: 16px; font-weight: 700; }
.result-subtitle { font-size: 13px; color: var(--muted); }
.result-day { border-bottom: 1px solid var(--line); }
.result-day:last-of-type { border-bottom: none; }
.result-day summary { padding: 11px 16px; cursor: pointer; display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; font-size: 14px;
                      list-style: none; user-select: none; }
.result-day summary::-webkit-details-marker { display: none; }
.result-day summary::before { content: '▸'; font-size: 10px; color: var(--muted); transition: transform .2s; }
.result-day[open] summary::before { transform: rotate(90deg); }
.result-day summary:hover { background: var(--sub); }
.day-date { font-weight: 600; white-space: nowrap; }
.day-status { font-size: 12px; padding: 1px 8px; border-radius: 4px; font-weight: 500; flex: none; }
.day-status.ok { color: var(--ok); background: var(--ok-l); }
.day-status.no { color: var(--muted); background: var(--gray-l); }
.day-info { font-size: 13px; color: var(--muted); margin-left: auto; }
.result-day.none summary .day-date { color: var(--muted); font-weight: 500; }
.day-details { padding: 0 16px 14px; }
.route-option { margin-top: 10px; padding: 12px 14px; background: var(--sub); border-radius: 10px; border: 1px solid var(--line); }
.route-option.shut { opacity: .7; }
.route-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.route-tag { font-size: 11px; padding: 2px 8px; border-radius: 4px; background: var(--pri-l); color: var(--pri); font-weight: 500; }
.route-tag.alt { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1px currentColor; font-weight: 400; }
.route-meta { display: flex; gap: 4px 12px; font-size: 13px; color: var(--muted); margin-bottom: 10px; flex-wrap: wrap; }
.route-meta .price { color: var(--warn); font-weight: 600; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 16px; position: relative; }
.timeline::before { content: ''; position: absolute; left: 4px; top: 7px; bottom: 7px; width: 2px; background: var(--line); border-radius: 1px; }
.timeline-item { position: relative; padding-bottom: 10px; font-size: 13px; line-height: 1.6; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before { content: ''; position: absolute; left: -15px; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--pri);
                         border: 2px solid var(--sub); }
.train-number { font-weight: 700; margin-right: 6px; }
.timeline-item .time { font-variant-numeric: tabular-nums; }
.seat-info { display: inline-block; font-size: 12px; padding: 0 6px; border-radius: 4px; margin-left: 2px; white-space: nowrap; }
.seat-info.ok { color: var(--ok); background: var(--ok-l); }
.seat-info.few { color: var(--warn); background: var(--warn-l); }
.seat-info.no { color: var(--muted); background: var(--gray-l); }
.transfer-info { font-size: 12px; color: var(--muted); padding: 5px 10px; background: var(--pri-l); border-radius: 6px; margin: 0 0 10px;
                 border-left: 3px solid var(--pri); list-style: none; }
.result-footer { padding: 10px 16px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between;
                 flex-wrap: wrap; gap: 8px; }
.result-footer-note { font-size: 12px; color: var(--muted); }
.result-footer .acts { display: flex; gap: 8px; }
.result-text { padding: 12px 16px; white-space: pre-wrap; font-size: 14px; }
/* empty, the box at the bottom */
.empty-state { display: flex; flex-direction: column; align-items: center; padding: 48px 8px 20px; text-align: center; }
.empty-greeting { font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.empty-sub { font-size: 14px; color: var(--muted); margin-bottom: 24px; }
.suggestions { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 420px; }
.suggestion { padding: 12px 16px; background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; font: inherit; font-size: 14px;
              color: var(--fg); cursor: pointer; text-align: left; box-shadow: var(--shadow); }
.suggestion:hover { border-color: var(--pri); background: var(--pri-l); color: var(--pri); }
.composer { position: fixed; bottom: 0; left: 0; right: 0; padding: 10px 16px calc(14px + env(safe-area-inset-bottom, 0px));
            background: linear-gradient(to top, var(--bg) 70%, transparent); z-index: 4; }
.composer-inner { max-width: 760px; margin: 0 auto; }
.input-hint { font-size: 11px; color: var(--muted); text-align: center; margin-bottom: 6px; }
.input-box { display: flex; align-items: flex-end; background: var(--bg2); border: 1.5px solid var(--line); border-radius: 16px; padding: 4px;
             box-shadow: var(--glow); }
.input-box:focus-within { border-color: var(--pri); }
.input-box textarea { flex: 1; border: 0; outline: none; background: transparent; margin: 0; padding: 9px 12px; resize: none; max-height: 160px;
                      line-height: 1.5; font-size: 16px; }
.input-box textarea:focus { outline: none; }
.btn-send { width: 38px; height: 38px; min-width: 38px; border-radius: 50%; border: 0; background: var(--pri); color: #fff; cursor: pointer;
            display: grid; place-items: center; margin: 2px; }
.btn-send:disabled { opacity: .4; cursor: default; }
.btn-send svg { width: 18px; height: 18px; }
@media (max-width: 600px) {
  .user-bubble { max-width: 88%; }
  .result-day summary { padding: 10px 12px; }
  .day-info { margin-left: 18px; width: 100%; }
  .day-details { padding: 0 12px 12px; }
}
/* plans */
.head-row { display: flex; justify-content: space-between; align-items: center; }
.list { display: grid; gap: 10px; }
.list > * { min-width: 0; }
.item { display: flex; gap: 12px; align-items: center; padding: 14px 16px; background: var(--bg2); border: 1px solid var(--line);
        border-radius: var(--r); color: var(--fg); }
.item .ki { font-size: 24px; }
.item .grow { flex: 1; min-width: 0; overflow: hidden; }
.item .chip { flex: none; }
.item .t { font-weight: 600; }
.item .s { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip { font-size: 12px; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.chip.watching { background: color-mix(in srgb, var(--pri) 14%, transparent); color: var(--pri); }
.chip.found { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.chip.paused { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); }
.chip.expired { background: var(--line); color: var(--muted); }
.back { display: inline-block; margin-bottom: 10px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
pre.res { white-space: pre-wrap; word-break: break-word; font: 13px/1.6 ui-monospace, Menlo, monospace; background: var(--bg); padding: 10px; border-radius: 10px; margin: 0; }
.spark { width: 100%; height: 80px; }
.runs { font-size: 13px; color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.stat { padding: 12px; background: var(--bg); border-radius: 10px; }
.stat b { display: block; font-size: 22px; }
.sw-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--fg); font-size: 15px; padding: 8px 0; }
.sw-row small { display: block; color: var(--muted); font-size: 12px; }
.sw-row input { width: 22px; height: 22px; margin: 0; flex: none; }
.empty { text-align: center; color: var(--muted); padding: 30px 0; }
.toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); padding: 10px 16px; border-radius: 10px; color: #fff;
         background: #1f2437; box-shadow: var(--glow); z-index: 9; max-width: 90vw; }
@media (min-width: 640px) { .features { grid-template-columns: repeat(3, 1fr); } .feat { flex-direction: column; gap: 6px; } }
/* passkeys, the admins' pages */
body.wide main { max-width: 1100px; }
.subnav { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 14px; }
.subnav a { padding: 6px 12px; border-radius: 999px; color: var(--muted); border: 1px solid var(--line); background: var(--bg2); }
.subnav a.on { color: var(--pri); border-color: color-mix(in srgb, var(--pri) 40%, transparent); font-weight: 600; }
.filters { display: flex; gap: 6px; margin-bottom: 10px; }
.filters a { font-size: 13px; padding: 3px 10px; border-radius: 999px; color: var(--muted); }
.filters a.on { background: color-mix(in srgb, var(--pri) 14%, transparent); color: var(--pri); }
.tbl { overflow-x: auto; margin: 0 -4px; }
.tbl table { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-weight: 600; color: var(--muted); font-size: 12px; padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl td.acts { white-space: nowrap; }
.tbl td.acts .btn + .btn { margin-left: 6px; }
.tbl details summary { cursor: pointer; }
.stat.bad b, b.bad { color: var(--bad); }
.acts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
select { padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--fg); font: inherit; margin-top: 4px; display: block; }
.row.wrap { flex-wrap: wrap; gap: 16px; align-items: center; }
label.check { display: flex; align-items: center; gap: 6px; color: var(--fg); font-size: 14px; margin: 0; }
label.check input { width: auto; margin: 0; }
.newlink { margin-top: 14px; padding: 12px; border-radius: 10px; background: color-mix(in srgb, var(--ok) 10%, transparent); }
.newlink input { margin: 0; font-size: 13px; }
.newlink .row .btn { margin-bottom: 0; }
.chat.mini { min-height: 0; padding-bottom: 0; }
#pkLogin { margin: 6px 0 10px; }
.err:empty { display: none; }
#setForm, #invForm { max-width: 520px; }

/* ---------------------------------------------------------------- the shell (docs/05-shell, 2026-11-16: 35B's layout,
   merged): signed in, a side menu (fixed on a wide screen, a drawer on a phone), a slim bar, the page in the middle */
:root { --side-w: 264px; --side-bg: #f3f4f7; }
@media (prefers-color-scheme: dark) { :root { --side-bg: #13151d; } }
.side, .bar, .scrim { display: none; }
body.app .top { display: none; }
body.app .side { display: flex; flex-direction: column; position: fixed; z-index: 30; top: 0; bottom: 0; left: 0; width: var(--side-w);
  background: var(--side-bg); border-right: 1px solid var(--line); padding: calc(10px + env(safe-area-inset-top, 0px)) 10px 0; }
body.app .bar { display: flex; align-items: center; gap: 6px; position: sticky; top: 0; z-index: 10; height: calc(52px + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) 10px 0; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(10px); }
.bar-title { flex: 1; min-width: 0; font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; }
.icon-btn { display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 10px; background: transparent;
  color: var(--fg); cursor: pointer; flex: none; }
.icon-btn:hover { background: color-mix(in srgb, var(--fg) 8%, transparent); }
.icon-btn svg, .side-menu svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.side-head { display: flex; align-items: center; justify-content: space-between; padding: 0 4px 8px 6px; }
.side-menu { display: grid; gap: 2px; padding-bottom: 6px; margin-left: 0; }
.side-menu a, .hist a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; color: var(--fg); font-size: 14px; }
.side-menu a:hover, .hist:hover a { background: color-mix(in srgb, var(--fg) 6%, transparent); }
.side-menu a.on, .hist.on a { background: color-mix(in srgb, var(--pri) 12%, transparent); color: var(--pri); font-weight: 600; }
.badge { margin-left: auto; min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--pri); color: #fff; font-size: 11px;
  line-height: 20px; text-align: center; font-weight: 600; }
.side-title { padding: 10px 10px 2px; font-size: 12px; color: var(--muted); font-weight: 600; border-top: 1px solid var(--line); margin-top: 4px; }
.history { flex: 1; overflow-y: auto; margin: 0 -4px; padding: 0 4px 10px; -webkit-overflow-scrolling: touch; }
.side-label { padding: 12px 10px 4px; font-size: 11.5px; color: var(--muted); }
.side-empty { padding: 8px 10px; font-size: 13px; color: var(--muted); }
.hist { position: relative; }
.hist a { padding-right: 34px; }
.hist-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hist-k { flex: none; font-size: 12px; letter-spacing: 1px; opacity: .8; }
.hist-del { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--muted);
  font-size: 12px; padding: 4px 6px; border-radius: 6px; cursor: pointer; opacity: 0; }
.hist:hover .hist-del, .hist.on .hist-del, .hist-del.sure { opacity: 1; }
.hist-del.sure { background: var(--bad); color: #fff; }
.hist:hover .hist-k, .hist.on .hist-k { visibility: hidden; }
@media (hover: none) { .hist-del { opacity: .55; } .hist-k { display: none; } }
.side-foot { position: relative; border-top: 1px solid var(--line); padding: 8px 0 calc(10px + env(safe-area-inset-bottom, 0px)); }
.account { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; border: 0; border-radius: 10px; background: transparent;
  color: var(--fg); font: inherit; cursor: pointer; text-align: left; }
.account:hover { background: color-mix(in srgb, var(--fg) 6%, transparent); }
.avatar { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--pri); color: #fff; font-weight: 700; flex: none; }
.acc-who { flex: 1; min-width: 0; display: grid; line-height: 1.3; }
.acc-who b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-who small { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-more { color: var(--muted); }
.account-menu { position: absolute; left: 0; right: 0; bottom: calc(100% + 4px); background: var(--bg2); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--glow); padding: 6px; display: grid; }
.account-menu a, .account-menu button { display: block; padding: 9px 12px; border-radius: 8px; color: var(--fg); font: inherit; font-size: 14px;
  background: transparent; border: 0; text-align: left; cursor: pointer; }
.account-menu a:hover, .account-menu button:hover { background: color-mix(in srgb, var(--fg) 6%, transparent); }
/* wide: the side stays; it can be hidden (the bar's button) */
@media (min-width: 900px) {
  body.app:not(.side-hidden) { padding-left: var(--side-w); }
  body.app:not(.side-hidden) #menuBtn { visibility: hidden; }
  body.app.side-hidden .side { display: none; }
  body.app:not(.side-hidden) .composer { left: var(--side-w); }
}
/* a phone: the side a drawer */
@media (max-width: 899px) {
  body.app .side { width: min(84vw, 300px); transform: translateX(-102%); transition: transform .22s ease; box-shadow: none; }
  body.side-open .side { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.25); }
  body.app .scrim { display: block; position: fixed; inset: 0; z-index: 25; background: rgba(0,0,0,.35); opacity: 0; pointer-events: none; transition: opacity .22s; }
  body.side-open .scrim { opacity: 1; pointer-events: auto; }
  body.side-open { overflow: hidden; }
  #sideHide { display: none; }
}
body.app main { padding-top: 4px; }

/* a new conversation: hello, the four ways in, a few sentences */
.hello { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 6vh 0 12px; }
.hello-hi { font-size: 24px; margin: 0 0 6px; }
.hello-sub { margin: 0 0 22px; color: var(--muted); font-size: 14px; }
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; width: 100%; }
@media (min-width: 640px) { .tiles { grid-template-columns: repeat(4, 1fr); } .hello { padding-top: 12vh; } .hello-hi { font-size: 28px; } }
.tile { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 14px; border: 1px solid var(--line); border-radius: 14px;
  background: var(--bg2); color: var(--fg); font: inherit; text-align: left; cursor: pointer; box-shadow: var(--shadow); transition: border-color .15s, transform .15s; }
.tile:hover { border-color: var(--pri); transform: translateY(-1px); }
.tile-icon { font-size: 24px; margin-bottom: 6px; }
.tile b { font-size: 15px; }
.tile small { color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 18px; }
.chip-say { padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--muted); font: inherit;
  font-size: 13px; cursor: pointer; }
.chip-say:hover { color: var(--pri); border-color: var(--pri); }

/* a whole trip: its parts on a line, each part's state; a tap goes to its result */
.trip-card { margin-top: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg2); box-shadow: var(--shadow); overflow: hidden; }
.trip-title { padding: 12px 16px; font-weight: 700; border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, color-mix(in srgb, var(--pri) 10%, transparent), transparent); }
.trip-line { list-style: none; margin: 0; padding: 8px 16px; position: relative; }
.trip-item { position: relative; display: flex; align-items: center; gap: 10px; padding: 9px 0; cursor: pointer; }
.trip-item:not(:last-child)::after { content: ''; position: absolute; left: 15px; top: 40px; bottom: -8px; width: 2px; background: var(--line); }
.trip-dot { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--pri-l); flex: none; font-size: 15px; z-index: 1; }
.trip-what { flex: 1; min-width: 0; font-size: 13.5px; line-height: 1.4; color: var(--muted); }
.trip-what b { color: var(--fg); margin-right: 4px; }
.trip-state { flex: none; display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); max-width: 40%; text-align: right; }
.trip-item.done .trip-state { color: var(--ok); }
.trip-item.failed .trip-state { color: var(--bad); }
.spin.small { width: 13px; height: 13px; border-width: 2px; }
.trip-foot { padding: 10px 16px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 8px; }
@media (max-width: 600px) { .trip-item { flex-wrap: wrap; row-gap: 2px; } .trip-what { flex-basis: calc(100% - 42px); } .trip-state { margin-left: 42px; max-width: none; text-align: left; } .trip-item:not(:last-child)::after { top: 36px; } }
.part { display: inline-block; margin-right: 6px; padding: 0 6px; border-radius: 4px; font-size: 11px; background: var(--pri-l); color: var(--pri); vertical-align: 1px; }
.bar-pad { width: 38px; flex: none; }
.page-sub { margin: -6px 0 14px; }
/* 我的行程 */
.trip-kept { align-items: flex-start; }
.trip-kept .s { white-space: normal; }
.trip-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.trip-foot .acts { display: flex; gap: 6px; }
.condition-card .acts { display: flex; gap: 6px; }

/* the conversation: the page as high as the screen (what is seen: --app-h, the keyboard up), the messages scroll in their
   own box, the input box the last line, never moving (2026-11-16, the user: 「对话框能否固定在下面，不随滚动条滚动」) */
body.app.chatting { height: var(--app-h, 100dvh); overflow: hidden; display: flex; flex-direction: column; }
body.app.chatting main { flex: 1; min-height: 0; width: 100%; max-width: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
body.app.chatting #page-chat.on { flex: 1; min-height: 0; display: flex; flex-direction: column; }
body.app.chatting #chatLog { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  padding: 8px max(16px, calc((100% - 760px) / 2)) 12px; }
body.app.chatting .composer { position: static; flex: none; padding: 6px 16px calc(10px + env(safe-area-inset-bottom, 0px)); background: var(--bg); }
body.app.chatting .bar { flex: none; }
/* 「正在查」: what on the first line, how long on the second (2026-11-16) */
.checking-what { display: grid; gap: 1px; min-width: 0; line-height: 1.45; }
.checking-what small { font-size: 12.5px; color: var(--muted); }
.checking .checking-what .el { margin-left: 0; }
/* a day's table of every way (2026-11-16) */
.day-table { margin-top: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg2); }
.day-table > summary { padding: 9px 12px; font-size: 13px; color: var(--pri); cursor: pointer; list-style: none; }
.day-table > summary::-webkit-details-marker { display: none; }
.day-table > summary::before { content: '▸ '; }
.day-table[open] > summary::before { content: '▾ '; }
.day-table > p { padding: 0 12px 10px; margin: 6px 0 0; }
.t-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.t-wrap table { border-collapse: collapse; width: 100%; font-size: 12.5px; white-space: nowrap; }
.t-wrap th { text-align: left; font-weight: 600; color: var(--muted); padding: 6px 10px; border-bottom: 1px solid var(--line); background: var(--sub); position: sticky; top: 0; }
.t-wrap td { padding: 6px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.t-wrap tr.rec td { background: color-mix(in srgb, var(--pri) 7%, transparent); }
.t-wrap tr.t-day td { font-weight: 600; color: var(--fg, inherit); background: var(--sub); padding-top: 8px; }
.result-card > .day-table { margin: 12px 14px 0; }
.t-time { font-variant-numeric: tabular-nums; }
.t-num { text-align: right; font-variant-numeric: tabular-nums; }
.t-rec { font-size: 11px; color: var(--pri); }
.t-sl { font-size: 10.5px; padding: 0 4px; border-radius: 3px; background: var(--pri-l); color: var(--pri); }
.t-seat { font-size: 11.5px; padding: 1px 6px; border-radius: 4px; }
.t-seat.ok { background: var(--ok-l); color: var(--ok); }
.t-seat.no { background: var(--gray-l); color: var(--muted); }
.t-seat.un { color: var(--muted); }
/* the PDF (pdf.js): drawn off the screen, light, everything open */
.pdf-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; font-size: 14px; }
.pdf-head span, .pdf-foot { color: #666; font-size: 12px; }
.pdf-box .t-wrap { overflow: visible; }
.pdf-box .t-wrap th { position: static; }
/* the PDF always light (the light tokens again), and no color-mix() (html2canvas cannot read it) */
.pdf-box { --bg: #f7f8fa; --bg2: #ffffff; --fg: #1a1d23; --muted: #6b7280; --line: #e8ebf0;
  --pri: #4f6ef7; --pri-l: #eef0fe; --ok: #16a34a; --ok-l: #f0fdf4; --warn: #ea580c; --warn-l: #fff7ed;
  --gray-l: #f3f4f6; --tag: #374151; --sub: #f9fafb; --shadow: none; --glow: none; }
.pdf-box .t-wrap tr.rec td { background: #eef1fe; }
.pdf-box .trip-title { background: #eef1fe; }
/* the result cards' buttons: icons in one line (their words: title, aria-label) */
.result-footer .acts { flex-wrap: nowrap; margin-left: auto; }
.act-icon { display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--line); background: var(--bg2); color: var(--pri); text-decoration: none; flex: none; }
.act-icon:hover { background: var(--pri-l); }
.act-icon.main { background: var(--pri); border-color: var(--pri); color: #fff; }
.act-icon.on { background: var(--pri-l); border-color: transparent; }
.act-icon:disabled { opacity: .6; cursor: default; }
.act-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.act-icon .spin { width: 16px; height: 16px; }
/* the table's rides: a line each, wrapping on a phone */
.t-wrap td.t-legs { white-space: normal; min-width: 190px; }
.t-leg { line-height: 1.45; }
.t-leg b { margin-right: 4px; }
.t-leg .t-sl { margin-right: 4px; }
.t-st { white-space: nowrap; }
.t-wrap td.t-num div { margin-top: 4px; font-variant-numeric: tabular-nums; }
.t-wrap td.t-legs { min-width: 0; }
.t-dur { margin-left: 6px; font-size: 12px; color: var(--muted); }
.t-way { color: var(--fg); }
.t-change { margin: 3px 0; padding: 2px 8px; font-size: 12px; color: var(--muted); background: var(--pri-l); border-left: 3px solid var(--pri); border-radius: 4px; width: fit-content; }
.pdf-box .t-change { background: #eef0fe; }
.t-way { white-space: nowrap; font-size: 12px; }
.day-table .t-wrap td, .day-table .t-wrap th { padding-left: 6px; padding-right: 6px; }
.day-table .t-wrap td:first-child, .day-table .t-wrap th:first-child { padding-left: 10px; }
.t-head { margin-bottom: 4px; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.t-head + .t-leg { padding-top: 4px; border-top: 1px dashed var(--line); }
/* the PDF's compact table (R.pdfTable: a way on two lines at most, its head on every page) and tighter cards */
.p-cap { font-weight: 600; font-size: 13px; margin: 2px 0 6px; }
.p-table { width: 100%; border-collapse: collapse; font-size: 11px; color: #1a1d23; }
.p-table th { text-align: left; font-weight: 600; color: #374151; background: #f3f4f6; padding: 4px 6px; border-bottom: 1px solid #d1d5db; white-space: nowrap; }
.p-table td { padding: 3px 6px; border-bottom: 1px solid #e8ebf0; vertical-align: top; line-height: 1.4; }
.p-table tr.rec td { background: #eef1fe; }
.p-t, .p-n { white-space: nowrap; font-variant-numeric: tabular-nums; }
.p-l div { white-space: nowrap; }
.p-l i { font-style: normal; color: #6b7280; margin-left: 5px; }
.p-sl { font-size: 10px; color: #4f6ef7; background: #eef0fe; border-radius: 3px; padding: 0 3px; margin-left: 2px; }
.p-c { color: #4f6ef7; }
.p-rec { color: #4f6ef7; font-weight: 600; }
.p-s.ok { color: #16a34a; } .p-s.no, .p-s.un { color: #6b7280; }
.pdf-box .result-card { box-shadow: none; }
.pdf-box .result-header { padding: 8px 12px; }
.pdf-box .result-day summary { padding: 6px 12px; }
.pdf-box .day-details { padding: 0 12px 6px; }
.pdf-box .route-option { padding: 6px 10px; margin-bottom: 6px; }
.pdf-box .timeline-item { padding-bottom: 2px; }
.pdf-box .transfer-info { margin: 0 0 4px; padding: 2px 8px; }
.pdf-box .result-footer { padding: 6px 12px; }
/* the PDF table's columns (a ride a line; a way a tbody, a line between ways) */
.p-table td { border-bottom: 0; padding: 2px 6px; }
.p-table tbody { border-top: 1px solid #d9dde4; }
.p-table tbody.rec td { background: #eef1fe; }
.p-table td.p-c { color: #4f6ef7; font-size: 10.5px; }
.p-table td.p-m { color: #6b7280; }
.p-table td.p-rec { padding-top: 0; font-size: 10.5px; }
.p-table { table-layout: fixed; }
.p-table td, .p-table th { overflow: hidden; text-overflow: clip; }
/* a way's own cells (spanning its rides): in the middle; its rides' cells too */
.p-table td { vertical-align: middle; }
.p-table td.p-note { white-space: normal; font-size: 10.5px; color: #4b5563; overflow: visible; }
.p-table td.p-note .p-rec { color: #4f6ef7; }
.p-table td, .p-table th { padding-left: 4px; padding-right: 4px; }
.p-table { font-size: 10.5px; }
.p-s.few { color: #ea580c; }
.p-table { font-size: 11.5px; }
.t-seatfare { margin-left: 6px; font-size: 12px; color: var(--muted); }
/* the web table (2026-11-16, the user: 「每笔之间分割不是很清晰，另外出发到达时间很重要突出一些，车次等可以缩进一些」): a way a
   block with a clear line above it; its departure and arrival large; its rides indented under a line of their own */
.day-table .t-wrap tbody tr td { border-bottom: 0; border-top: 2px solid var(--line); padding-top: 10px; padding-bottom: 10px; }
.day-table .t-wrap tbody tr:first-child td { border-top: 0; }
.t-head { margin-bottom: 2px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.t-when { font-size: 17px; font-weight: 700; letter-spacing: .2px; font-variant-numeric: tabular-nums; color: var(--fg); }
.t-arrow { margin: 0 6px; color: var(--muted); font-weight: 400; }
.t-head .t-dur { margin-left: 0; }
.t-head + .t-leg, .t-rides .t-leg { border-top: 0; padding-top: 0; }
.t-rides { margin: 6px 0 0 4px; padding-left: 10px; border-left: 2px solid var(--line); }
.t-rides .t-leg + .t-leg, .t-rides .t-change + .t-leg { margin-top: 2px; }
.t-rides .t-leg b { font-size: 13px; }
.t-rec { margin-top: 2px; }
.day-table .t-wrap td.t-num { font-size: 13px; }
.day-table .t-wrap td.t-num div { font-size: 14px; font-weight: 700; color: var(--fg); }
/* flights and hotels (listView): the recommended blocks, the list */
.list-best { padding-top: 10px; }
.fl-way { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; margin-top: 4px; }
.fl-label { font-size: 12px; color: var(--muted); min-width: 52px; }
.t-when.small { font-size: 15px; }
.list-link { display: inline-block; margin-top: 6px; font-size: 13px; color: var(--pri); text-decoration: none; }
.t-num .list-link { margin-top: 2px; font-size: 12px; }
.t-legline { display: grid; grid-template-columns: 50px 22px 56px 1fr; align-items: baseline; }
.t-legline .t-dur, .t-legline .t-seatfare { margin-left: 0; }
.t-legline .t-sl { margin: 0; }
.t-legline { grid-template-columns: 46px 20px 50px 1fr auto; column-gap: 2px; }
.t-legline .t-seatfare { font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-legfare { font-size: 12px; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; padding-left: 4px; }
