/* 步数工作台：暖纸色、炭黑与鼠尾草绿，移动优先。 */
:root {
  color-scheme: light;
  --p-paper: oklch(0.955 0.014 88);
  --p-surface: oklch(0.985 0.008 88);
  --p-surface-raised: oklch(1 0 0);
  --p-ink: oklch(0.225 0.015 85);
  --p-ink-soft: oklch(0.44 0.015 85);
  --p-line: oklch(0.865 0.018 88);
  --p-sage: oklch(0.885 0.052 132);
  --p-sage-soft: oklch(0.93 0.034 132);
  --p-sage-ink: oklch(0.39 0.065 139);
  --p-terracotta: oklch(0.59 0.13 39);
  --p-error: oklch(0.5 0.16 29);
  --p-error-soft: oklch(0.94 0.035 29);
  --p-focus: oklch(0.56 0.12 42);

  --bg: var(--p-paper);
  --surface: var(--p-surface);
  --surface-raised: var(--p-surface-raised);
  --text: var(--p-ink);
  --text-muted: var(--p-ink-soft);
  --line: var(--p-line);
  --accent: var(--p-sage);
  --accent-soft: var(--p-sage-soft);
  --accent-ink: var(--p-sage-ink);
  --danger: var(--p-error);
  --danger-soft: var(--p-error-soft);
  --focus: var(--p-focus);
  --button-bg: var(--p-ink);
  --button-text: var(--p-paper);
  --glass: color-mix(in oklch, var(--p-paper) 86%, transparent);
  --radius-sm: 14px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --shadow-dialog: 0 8px 32px color-mix(in oklch, var(--p-ink) 10%, transparent);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { min-width: 0; scroll-behavior: smooth; scroll-padding-top: 6rem; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  min-height: 100dvh;
  padding-inline: env(safe-area-inset-left, 0px) env(safe-area-inset-right, 0px);
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input, select { font: inherit; }
button, a, input, select, summary { -webkit-tap-highlight-color: transparent; }
button, summary, select { cursor: pointer; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
img { max-width: 100%; }
svg { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
h1, h2, h3 { line-height: 1.16; text-wrap: balance; }
p { text-wrap: pretty; }
:is(h1, h2, h3, p, dd, small, label, summary, .button) { overflow-wrap: anywhere; }
:is(input, button, summary)[id] { scroll-margin-top: 6rem; }
.workspace-grid > *, .action-column, .panel, .auth-shell > *, .page-heading > div, .guide-panel, .topbar-actions { min-width: 0; }
[hidden] { display: none !important; }
::selection { background: var(--accent); color: var(--text); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* 顶部导航 */
.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  border-bottom: 1px solid color-mix(in oklch, var(--line) 70%, transparent);
  background: var(--glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.topbar-inner {
  width: min(1120px, calc(100% - 32px));
  min-height: 68px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; max-width: 100%; font-weight: 750; letter-spacing: -.02em; }
.brand img { flex-shrink: 0; }
.brand img { width: 36px; height: 36px; border-radius: 11px; }
.topbar-note { color: var(--text-muted); font-size: 14px; }
.topbar-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.icon-text-button, .text-link {
  min-height: 44px;
  border: 0;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 10px;
  border-radius: 12px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  transition: background-color 160ms ease-out, color 160ms ease-out, transform 160ms ease-out;
}
.icon-text-button:hover, .text-link:hover { background: var(--surface); color: var(--text); }
.icon-text-button:active, .text-link:active { transform: scale(.97); }
.logout-form { display: flex; }

/* 页面标题与通用布局 */
.page-shell { width: min(1120px, calc(100% - 32px)); margin-inline: auto; padding: 40px 0 64px; }
.page-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 28px; }
.page-heading h1 { max-width: 18ch; font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 750; letter-spacing: -.055em; }
.page-heading > div > p:last-child { margin-top: 12px; color: var(--text-muted); }
.section-label { margin-bottom: 9px; color: var(--accent-ink); font-size: 12px; font-weight: 800; letter-spacing: .12em; line-height: 1.4; }
.goal-display { flex: 0 0 auto; padding-left: 24px; border-left: 1px solid var(--line); text-align: right; }
.goal-display > span { display: block; color: var(--text-muted); font-size: 13px; }
.goal-display strong { display: flex; align-items: baseline; justify-content: flex-end; gap: 7px; font-size: clamp(2rem, 5vw, 3rem); line-height: 1.1; letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
.goal-display small { font-size: 14px; font-weight: 600; letter-spacing: 0; }
.panel { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); padding: 24px; }
.panel-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 24px; }
.panel h2 { font-size: 1.45rem; letter-spacing: -.035em; }
.soft-badge { flex: 0 0 auto; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); padding: 5px 10px; font-size: 12px; font-weight: 700; }

/* 三步引导 */
.guide-panel { margin-bottom: 20px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.guide-panel > summary { min-height: 76px; padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; list-style: none; border-radius: var(--radius-md); }
.guide-panel > summary::-webkit-details-marker { display: none; }
.guide-panel > summary strong, .guide-panel > summary small { display: block; }
.guide-panel > summary strong { font-size: 15px; }
.guide-panel > summary small { margin-top: 2px; color: var(--text-muted); font-size: 12px; font-weight: 400; }
.guide-panel > summary > svg { flex: 0 0 auto; transition: transform 180ms ease-out; }
.guide-panel[open] > summary > svg { transform: rotate(180deg); }
.guide-steps { list-style: none; display: grid; gap: 16px; padding: 4px 20px 22px; border-top: 1px solid var(--line); }
.guide-steps li { display: flex; align-items: flex-start; gap: 12px; padding-top: 16px; }
.guide-number { flex: 0 0 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; }
.guide-steps strong { font-size: 14px; }
.guide-steps p { margin-top: 2px; color: var(--text-muted); font-size: 13px; }

/* 站内首次使用说明，按步骤展开阅读。 */
.onboarding-content { padding: 4px 20px 24px; border-top: 1px solid var(--line); }
.guide-intro { margin: 18px 0; color: var(--text-muted); font-size: 14px; }
.onboarding-list { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.onboarding-list > li { min-width: 0; }
.onboarding-list h3 { display: flex; align-items: center; gap: 10px; font-size: 16px; line-height: 1.5; }
.guide-step > summary { min-height: 52px; display: flex; align-items: center; gap: 8px; list-style: none; }
.guide-step > summary::-webkit-details-marker { display: none; }
.guide-step > summary::after { content: '+'; margin-left: auto; color: var(--accent-ink); font-size: 22px; }
.guide-step[open] > summary::after { content: '−'; }
.compact-guide { padding-top: 18px; gap: 20px; }
.compact-guide .guide-downloads { margin: 2px 0 0; }
.compact-guide .guide-downloads .text-link { padding-left: 0; }
.binding-help > summary { min-height: 44px; padding: 10px 0; color: var(--accent-ink); font-size: 13px; }
.guide-body { min-width: 0; margin-top: 10px; font-size: 14px; }
.guide-body p + p { margin-top: 12px; }
.guide-downloads { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.guide-downloads .button { min-height: 44px; font-size: 13px; }
.guide-callout { padding: 12px 14px; border-left: 3px solid var(--accent-ink); border-radius: 0 10px 10px 0; background: var(--accent-soft); }
.guide-figure { margin: 16px 0; }
.guide-figure img { width: 100%; height: auto; border: 1px solid var(--line); border-radius: 12px; }
.guide-figure figcaption, .guide-sources { margin-top: 8px; color: var(--text-muted); font-size: 12px; }
.guide-screenshots { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 16px; align-items: start; }
.guide-screenshots .guide-figure { min-width: 0; margin: 12px 0 0; }
.guide-screenshots .guide-figure a { display: block; }
.guide-screenshots .guide-figure img { width: 100%; max-width: 420px; margin-inline: auto; }
.copy-account { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; max-width: 100%; min-height: 44px; padding: 4px 8px; border: 1px solid var(--accent); border-radius: 10px; background: var(--accent-soft); color: var(--accent-ink); vertical-align: middle; }
.copy-account strong { overflow-wrap: anywhere; user-select: text; }
.copy-account span { font-size: 12px; }
.guide-copy-feedback { color: var(--text-muted); font-size: 13px; }
.device-setup { min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 14px; }
.device-opt-in { display: flex; align-items: flex-start; gap: 10px; min-height: 44px; font-size: 14px; font-weight: 650; }
.device-opt-in input { flex: 0 0 20px; width: 20px; height: 20px; margin-top: 3px; accent-color: var(--accent-ink); }
.device-opt-in > span { min-width: 0; }
.device-opt-in .field-help { display: block; font-weight: 400; }
.guide-sources a { text-decoration: underline; text-underline-offset: 3px; }
.guide-faq { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 12px; }
.guide-faq summary, .wechat-instructions summary { display: list-item; min-height: 44px; padding: 10px 0; font-size: 14px; font-weight: 700; }
.guide-faq dt { margin-top: 12px; font-size: 14px; font-weight: 700; }
.guide-faq dd { margin: 4px 0 14px; color: var(--text-muted); font-size: 13px; }
.schedule-saved { margin-top: 12px; color: var(--accent-ink); font-size: 13px; font-weight: 650; }
.schedule-unsaved { margin-top: 12px; color: var(--danger); font-size: 13px; font-weight: 650; }
.wechat-instructions { margin: 12px 0; }
.wechat-instructions p { margin: 8px 0; color: var(--text-muted); font-size: 13px; }
@media (max-width: 540px) {
  .guide-figure img { width: min(100%, 320px); margin-inline: auto; }
}

/* 工作区 */
.workspace-grid { display: grid; gap: 20px; align-items: start; }
.settings-panel form { display: grid; gap: 20px; }
.field { min-width: 0; }
.field label, .field legend { display: block; margin-bottom: 7px; font-size: 14px; font-weight: 700; }
.field input, .field select, .step-input-wrap input {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg);
  color: var(--text);
  padding: 12px 14px;
  outline: none;
  transition: border-color 160ms ease-out, box-shadow 160ms ease-out, background-color 160ms ease-out;
}
.field input:hover, .field select:hover { border-color: var(--text-muted); }
.field input:focus, .field select:focus { border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in oklch, var(--focus) 20%, transparent); }
.field input::placeholder { color: var(--text-muted); opacity: .8; }
.field input[aria-invalid="true"] { border-color: var(--danger); background: var(--danger-soft); }
.label-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.saved-label { color: var(--accent-ink); font-size: 12px; font-weight: 700; }
.password-field { position: relative; }
.password-field input { padding-right: 52px; }
.password-toggle { position: absolute; top: 4px; right: 4px; width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 11px; background: transparent; color: var(--text-muted); transition: background-color 160ms ease-out, color 160ms ease-out; }
.password-toggle:hover { background: var(--surface); color: var(--text); }
.field-help, .field-error { margin-top: 6px; font-size: 12px; line-height: 1.5; }
.field-help { color: var(--text-muted); }
.field-error { min-height: 0; color: var(--danger); font-weight: 600; }
.field-error:empty { display: none; }
.steps-field { border: 0; min-inline-size: 0; }
.step-input-wrap { position: relative; }
.step-input-wrap input { padding-right: 52px; font-size: 1.25rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.step-input-wrap > span { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 14px; pointer-events: none; }
.quick-steps { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.quick-steps button { min-width: 58px; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--text-muted); font-size: 13px; font-weight: 650; font-variant-numeric: tabular-nums; transition: background-color 160ms ease-out, border-color 160ms ease-out, color 160ms ease-out, transform 160ms ease-out; }
.quick-steps button:hover { border-color: var(--accent-ink); color: var(--text); }
.quick-steps button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent); color: var(--text); }
.quick-steps button:active { transform: scale(.96); }
.schedule-block { padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.schedule-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.schedule-heading label { margin: 0; }
.schedule-heading p { margin-top: 3px; color: var(--text-muted); font-size: 12px; }
.switch { position: relative; flex: 0 0 auto; width: 52px; height: 44px; display: grid; place-items: center; margin: 0 !important; }
.switch input { position: absolute; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.switch-track { pointer-events: none; width: 48px; height: 28px; padding: 3px; border-radius: 999px; background: var(--line); transition: background-color 180ms ease-out; }
.switch-track > span { display: block; width: 22px; height: 22px; border-radius: 50%; background: var(--surface-raised); box-shadow: 0 1px 3px color-mix(in oklch, var(--text) 18%, transparent); transition: transform 180ms ease-out; }
.switch input:checked + .switch-track { background: var(--accent-ink); }
.switch input:checked + .switch-track > span { transform: translateX(20px); }
.switch input:focus-visible + .switch-track { outline: 3px solid var(--focus); outline-offset: 3px; }
.time-row { display: grid; gap: 8px; margin-top: 16px; transition: opacity 180ms ease-out; }
.time-row.is-paused { opacity: .55; }
.time-row label { display: flex; align-items: center; gap: 6px; margin: 0; }
.time-row label > span { color: var(--text-muted); font-size: 12px; font-weight: 500; }
.time-row select { width: auto; min-width: 68px; min-height: 44px; padding: 8px 28px 8px 10px; font-variant-numeric: tabular-nums; }
.time-colon { font-weight: 800; }
.time-row > p { flex: 1 1 100%; color: var(--text-muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.time-trigger { width: 100%; min-height: 70px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg); color: var(--text); text-align: left; }
.time-trigger:hover { border-color: var(--accent-ink); background: var(--accent-soft); }
.time-trigger > svg { color: var(--accent-ink); flex: 0 0 auto; }
.time-trigger strong { font-size: 28px; line-height: 1.2; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.time-trigger > span { color: var(--text-muted); font-size: 12px; }
.time-trigger .time-edit { margin-left: auto; color: var(--accent-ink); font-weight: 700; }
.time-picker-grid { display: grid; grid-template-columns: minmax(0, 1fr) 20px minmax(0, 1fr); align-items: center; gap: 14px; margin: 24px 0 16px; }
.time-picker-grid > div > p { margin-bottom: 10px; text-align: center; color: var(--text-muted); font-size: 13px; }
.time-options { height: clamp(88px, 30dvh, 240px); overflow-y: auto; overscroll-behavior: contain; border: 1px solid var(--line); border-radius: 18px; padding: 6px; background: var(--bg); scrollbar-width: thin; scrollbar-color: var(--accent) transparent; }
.time-options button { display: block; width: 100%; min-height: 46px; margin: 2px 0; border: 1px solid transparent; border-radius: 12px; background: transparent; color: var(--text-muted); font-size: 22px; font-variant-numeric: tabular-nums; }
.time-options button:hover { background: var(--surface); }
.time-options button[aria-selected="true"] { background: var(--accent); color: var(--text); font-weight: 800; }
.picker-colon { font-size: 30px; text-align: center; }
.time-picker-actions { display: grid; grid-template-columns: 1fr 1.5fr; gap: 10px; margin-top: 18px; }

/* 按钮与表单反馈 */
.button { min-height: 52px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; border: 1px solid transparent; border-radius: 999px; padding: 12px 20px; font-weight: 750; line-height: 1.3; transition: background-color 160ms ease-out, color 160ms ease-out, border-color 160ms ease-out, transform 160ms ease-out, opacity 160ms ease-out; }
.button-full { width: 100%; }
.button-primary { background: var(--button-bg); color: var(--button-text); }
.button-primary:hover { background: var(--accent-ink); color: var(--p-paper); }
.button-secondary { border-color: var(--line); background: var(--surface); color: var(--text); }
.button-secondary:hover { border-color: var(--text-muted); background: var(--bg); }
.button:active { transform: scale(.98); }
.button:disabled { cursor: not-allowed; opacity: .55; transform: none; }
.button-spinner { display: none; width: 18px; height: 18px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin 700ms linear infinite; }
.is-loading .button-spinner { display: block; }
.is-loading .button-label { opacity: .82; }
.form-message { margin-bottom: 16px; padding: 12px 14px; display: flex; align-items: flex-start; gap: 9px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-ink); font-size: 14px; font-weight: 600; }
.form-message.is-error { background: var(--danger-soft); color: var(--danger); }
.form-message svg { flex: 0 0 auto; margin-top: 2px; }

/* 提交与状态 */
.action-column { display: grid; gap: 20px; }
.run-panel { border-color: var(--p-ink); background: var(--p-ink); color: var(--p-paper); }
.run-panel .section-label { color: var(--p-sage); }
.run-panel h2 { max-width: 16ch; font-size: clamp(1.65rem, 4vw, 2.15rem); }
.run-panel > p:not(.section-label):not(.offline-note) { margin: 14px 0 24px; color: var(--p-line); font-size: 14px; }
.button-run { background: var(--p-sage); color: var(--p-ink); }
.button-run:hover { background: var(--p-surface); }
.button-run > svg { margin-left: auto; }
.button-run .button-label { margin-right: auto; }
.button-run.is-loading > svg { display: none; }
.offline-note { margin-top: 12px; color: var(--p-paper); font-size: 13px; font-weight: 600; }
.status-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.status-heading h2 { font-size: 1.1rem; }
.status-badge { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 5px 9px; background: var(--accent-soft); color: var(--accent-ink); font-size: 12px; font-weight: 750; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status-badge.is-running { background: color-mix(in oklch, var(--accent) 60%, var(--surface)); }
.status-badge.is-running .status-dot { animation: pulse 1.5s ease-in-out infinite; }
.status-badge.is-failed { background: var(--danger-soft); color: var(--danger); }
.status-badge.is-cancelled { background: var(--bg); color: var(--text-muted); }
.status-result { min-height: 52px; margin: 18px 0; color: var(--text); font-size: 15px; }
.status-meta { display: grid; gap: 10px; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.status-meta > div { display: flex; justify-content: space-between; gap: 16px; font-size: 12px; }
.status-meta dt { color: var(--text-muted); }
.status-meta dd { text-align: right; font-weight: 650; font-variant-numeric: tabular-nums; }
.verify-note { display: flex; align-items: flex-start; gap: 8px; margin-top: 16px; color: var(--text-muted); }
.verify-note svg { flex: 0 0 auto; margin-top: 3px; color: var(--accent-ink); }
.verify-note p { font-size: 12px; }
.install-strip { width: 100%; min-height: 76px; display: flex; align-items: center; gap: 12px; padding: 14px 18px; border: 1px solid var(--line); border-radius: var(--radius-md); background: transparent; text-align: left; transition: background-color 160ms ease-out, border-color 160ms ease-out, transform 160ms ease-out; }
.install-strip:hover { background: var(--surface); border-color: var(--text-muted); }
.install-strip:active { transform: scale(.99); }
.install-strip > svg { flex: 0 0 auto; color: var(--accent-ink); }
.install-strip > svg:last-child { margin-left: auto; color: var(--text-muted); }
.install-strip span { display: grid; }
.install-strip strong { font-size: 14px; }
.install-strip small { color: var(--text-muted); font-size: 12px; }

/* 安装说明弹窗 */
.install-dialog { width: 100%; max-width: 100%; max-height: min(calc(100dvh - 16px), 760px); margin: auto 0 0; padding: 24px max(20px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left)); overflow-y: auto; border: 1px solid var(--line); border-bottom: 0; border-radius: 28px 28px 0 0; background: var(--surface); color: var(--text); box-shadow: var(--shadow-dialog); }
.time-picker-dialog[open] { display: flex; flex-direction: column; overflow: hidden; }
.time-picker-dialog .dialog-header, .time-picker-actions { flex-shrink: 0; }
.time-picker-body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.dialog-header > div { min-width: 0; }
.install-dialog::backdrop { background: color-mix(in oklch, var(--p-ink) 45%, transparent); backdrop-filter: blur(4px); }
.install-dialog[open] { animation: sheet-in 220ms ease-out; }
.dialog-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.dialog-header h2 { font-size: 1.65rem; letter-spacing: -.035em; }
.dialog-close { flex: 0 0 44px; width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: transparent; transition: background-color 160ms ease-out, transform 160ms ease-out; }
.dialog-close:hover { background: var(--bg); }
.dialog-close:active { transform: scale(.94); }
.dialog-intro { margin: 10px 0 18px; color: var(--text-muted); font-size: 14px; }
.inapp-tip { display: flex; align-items: flex-start; gap: 9px; margin-bottom: 18px; padding: 12px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-ink); }
.inapp-tip svg { flex: 0 0 auto; margin-top: 2px; }
.inapp-tip p { font-size: 13px; font-weight: 600; }
#native-install { margin-bottom: 16px; }
.install-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 14px; background: var(--bg); }
.install-tabs button { min-height: 44px; border: 0; border-radius: 11px; background: transparent; color: var(--text-muted); font-size: 14px; font-weight: 700; transition: background-color 160ms ease-out, color 160ms ease-out; }
.install-tabs button[aria-selected="true"] { background: var(--surface-raised); color: var(--text); box-shadow: 0 1px 4px color-mix(in oklch, var(--text) 10%, transparent); }
.install-panel { padding-top: 20px; }
.install-panel ol { list-style: none; display: grid; gap: 16px; }
.install-panel li { display: flex; align-items: flex-start; gap: 12px; }
.install-panel li > span { flex: 0 0 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); font-size: 12px; font-weight: 800; }
.install-panel p { padding-top: 2px; font-size: 14px; }

/* 登录与注册 */
.auth-shell { width: min(1040px, calc(100% - 32px)); min-height: calc(100dvh - 68px); margin-inline: auto; padding: 40px 0 56px; display: grid; align-items: center; gap: 32px; }
.auth-intro h1 { max-width: 12ch; font-size: clamp(2.6rem, 7vw, 4.8rem); font-weight: 750; letter-spacing: -.06em; }
.auth-intro > p:not(.section-label) { max-width: 52ch; margin-top: 20px; color: var(--text-muted); }
.auth-steps { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 24px; color: var(--accent-ink); font-size: 13px; font-weight: 700; }
.auth-steps span[aria-hidden="true"] { color: var(--text-muted); }
.auth-panel { padding: 26px 22px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.auth-panel-heading { margin-bottom: 24px; }
.auth-panel-heading h2 { font-size: 1.8rem; letter-spacing: -.04em; }
.auth-panel-heading > p:last-child { margin-top: 8px; color: var(--text-muted); font-size: 14px; }
#auth-form { display: grid; gap: 17px; }
.auth-switch { margin-top: 20px; text-align: center; color: var(--text-muted); font-size: 14px; }
.auth-switch a { display: inline-flex; min-height: 44px; align-items: center; margin-left: 4px; color: var(--accent-ink); font-weight: 750; text-decoration: underline; text-underline-offset: 4px; }

/* 管理后台 */
.admin-heading { align-items: center; }
.admin-heading .button { flex: 0 0 auto; }
.metrics-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.metric { min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.metric:last-child { grid-column: 1 / -1; }
.metric p { color: var(--text-muted); font-size: 13px; font-weight: 650; }
.metric strong { display: block; margin: 10px 0 8px; overflow-wrap: anywhere; font-size: clamp(2rem, 8vw, 3.4rem); line-height: 1; letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.metric > span { color: var(--text-muted); font-size: 12px; }
.metric-featured { background: var(--p-ink); color: var(--p-paper); border-color: var(--p-ink); }
.metric-featured p, .metric-featured > span { color: var(--p-line); }
.metric-success { background: var(--accent-soft); border-color: var(--accent); }
.admin-note { display: flex; align-items: flex-start; gap: 14px; margin-top: 24px; padding: 20px 0; border-top: 1px solid var(--line); }
.admin-note > svg { flex: 0 0 auto; margin-top: 3px; color: var(--accent-ink); }
.admin-note h2 { font-size: 1rem; }
.admin-note p { max-width: 72ch; margin-top: 6px; color: var(--text-muted); font-size: 14px; }

/* 离线页 */
.offline-shell { width: min(620px, calc(100% - 32px)); min-height: 100dvh; margin-inline: auto; padding: 48px 0; display: grid; align-content: center; }
.offline-mark { width: 72px; height: 72px; margin-bottom: 24px; border-radius: 22px; }
.offline-shell h1 { margin-top: 6px; font-size: clamp(2.25rem, 9vw, 4rem); letter-spacing: -.055em; }
.offline-shell > p:not(.section-label) { max-width: 52ch; margin: 18px 0 26px; color: var(--text-muted); }
.offline-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.offline-hint { margin-top: 20px !important; font-size: 13px; }

/* 仅静态预览使用的页面切换条 */
.preview-bar { position: relative; z-index: 30; padding: 10px 16px; background: var(--p-ink); color: var(--p-paper); }
.preview-bar-inner { width: min(1120px, 100%); margin-inline: auto; display: flex; align-items: center; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.preview-bar-inner::-webkit-scrollbar { display: none; }
.preview-bar strong { flex: 0 0 auto; margin-right: 6px; color: var(--p-sage); font-size: 12px; }
.preview-bar a { flex: 0 0 auto; min-height: 36px; display: inline-flex; align-items: center; padding: 6px 10px; border-radius: 999px; color: var(--p-paper); font-size: 12px; }
.preview-bar a:hover, .preview-bar a[aria-current="page"] { background: color-mix(in oklch, var(--p-paper) 14%, transparent); }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { opacity: .35; transform: scale(.75); } }
@keyframes sheet-in { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }

@media (min-width: 560px) {
  .page-shell, .auth-shell { padding-top: 52px; }
  .panel { padding: 28px; }
  .guide-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
  .install-dialog { width: min(520px, calc(100% - 32px)); max-height: min(86dvh, 760px); margin: auto; padding: 28px; border-bottom: 1px solid var(--line); border-radius: 28px; }
  .auth-panel { padding: 32px; }
}

@media (min-width: 820px) {
  .page-shell { padding: 56px 0 80px; }
  .home-heading { margin-bottom: 36px; }
  .workspace-grid { grid-template-columns: minmax(0, 1.35fr) minmax(300px, .85fr); gap: 24px; }
  .guide-panel { margin-bottom: 24px; }
  .auth-shell { grid-template-columns: minmax(0, 1.15fr) minmax(340px, .85fr); gap: 64px; padding-block: 56px; }
  .metrics-grid { grid-template-columns: 1.25fr repeat(2, 1fr); gap: 16px; }
  .metric { min-height: 174px; padding: 24px; }
  .metric:last-child { grid-column: auto; }
  .metric-featured { grid-row: span 2; min-height: 364px; display: flex; flex-direction: column; justify-content: flex-end; }
  .metric-featured strong { font-size: clamp(4rem, 8vw, 6rem); }
  .metric-success { grid-column: span 2; }
}

@media (max-width: 559px) {
  .topbar-inner { width: min(100% - 24px, 1120px); min-height: 62px; }
  .brand { font-size: 15px; }
  .brand img { width: 32px; height: 32px; }
  .topbar-note { display: none; }
  .icon-text-button { width: 44px; padding: 8px; }
  .icon-text-button > span { display: none; }
  .admin-link { display: none; }
  .page-shell { width: min(100% - 24px, 1120px); padding-top: 28px; }
  .page-heading { align-items: flex-start; gap: 16px; }
  .page-heading h1 { font-size: clamp(1.65rem, 7.3vw, 2.25rem); }
  .page-heading > div > p:last-child { font-size: 14px; }
  .home-heading { display: block; }
  .goal-display { margin-top: 22px; padding: 14px 0 0; border-top: 1px solid var(--line); border-left: 0; display: flex; align-items: baseline; justify-content: space-between; text-align: left; }
  .goal-display strong { font-size: 2rem; }
  .guide-panel summary { padding-inline: 16px; }
  .guide-panel summary small { max-width: 32ch; }
  .guide-steps { padding-inline: 16px; }
  .panel { padding: 22px 18px; border-radius: 22px; }
  .field input, .admin-controls input { font-size: max(16px, 1rem); }
  .panel-heading { margin-bottom: 22px; }
  .action-column { gap: 16px; }
  .run-panel { padding: 26px 22px; }
  .status-meta > div { align-items: flex-start; }
  .status-meta dd { max-width: 65%; }
  .admin-heading { align-items: flex-end; }
  .admin-heading .button { width: 48px; min-height: 48px; padding: 10px; font-size: 0; }
  .admin-heading .button svg { width: 20px; height: 20px; }
  .metric { padding: 18px 16px; }
  .metric strong { font-size: 2.35rem; }
  .auth-shell { width: min(100% - 24px, 1040px); min-height: auto; padding-top: 32px; gap: 26px; }
  .auth-intro h1 { font-size: 2.65rem; }
  .auth-intro > p:not(.section-label) { margin-top: 14px; font-size: 14px; }
  .auth-steps { margin-top: 16px; font-size: 12px; }
  .auth-panel { padding: 24px 18px; border-radius: 22px; }
}

@media (max-height: 500px) {
  .install-dialog { padding-top: 16px; padding-bottom: max(16px, env(safe-area-inset-bottom)); max-height: calc(100dvh - 16px); }
  .dialog-header h2 { font-size: 1.3rem; }
  .time-picker-grid { margin-block: 12px; gap: 8px; }
  .time-picker-actions { margin-top: 10px; }
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --p-paper: oklch(0.21 0.012 85);
    --p-surface: oklch(0.255 0.013 85);
    --p-surface-raised: oklch(0.31 0.014 85);
    --p-ink: oklch(0.94 0.014 88);
    --p-ink-soft: oklch(0.75 0.016 88);
    --p-line: oklch(0.39 0.016 85);
    --p-sage: oklch(0.78 0.075 132);
    --p-sage-soft: oklch(0.33 0.038 132);
    --p-sage-ink: oklch(0.82 0.075 132);
    --p-error: oklch(0.75 0.12 29);
    --p-error-soft: oklch(0.32 0.055 29);
    --p-focus: oklch(0.78 0.11 55);
    --button-bg: var(--p-sage);
    --button-text: oklch(0.22 0.02 132);
    --glass: color-mix(in oklch, var(--p-paper) 86%, transparent);
  }
  .button-primary:hover { background: var(--p-surface-raised); color: var(--text); }
  .run-panel { border-color: var(--p-line); background: var(--p-surface); }
  .run-panel h2 { color: #fff; }
  .button-run { color: var(--button-text); }
  .run-panel > p:not(.section-label):not(.offline-note) { color: var(--text-muted); }
  .offline-note { color: var(--text); }
  .metric-featured { background: var(--p-surface-raised); border-color: var(--p-line); }
  .preview-bar { background: var(--p-surface-raised); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}


/* 微信核对入口，沿用第一版卡片与按钮样式。 */
.schedules-shell { max-width: 960px; }
.schedules-shell > .page-heading { margin-bottom: 24px; }
.schedule-overview { margin-block: 16px 8px; }
#admin-schedule-overview > .button { margin-top: 18px; }
.schedule-list { display: grid; gap: 18px; }
.schedule-card { min-width: 0; }
.schedule-card-heading { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.schedule-card-heading > div { min-width: 0; flex: 1 1 180px; }
.schedule-card-heading h2 { font-size: clamp(1.2rem, 4vw, 1.65rem); overflow-wrap: anywhere; }
.schedule-target { margin: 18px 0; font-size: 2rem; font-weight: 750; font-variant-numeric: tabular-nums; }
.schedule-target small { font-size: .85rem; font-weight: 500; color: var(--text-muted); }
.schedule-meta { display: grid; gap: 10px; }
.schedule-meta > div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.schedule-meta dt { color: var(--text-muted); }
.schedule-meta dd { min-width: 0; }
.schedule-card > .field-help { margin-top: 14px; }
.schedule-latest { margin-block: 20px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); }
.schedule-latest p { margin-top: 8px; font-size: 14px; }
.schedule-latest p:first-child { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 0; }
.schedule-result-label { color: var(--accent-ink); font-weight: 650; }
.schedule-result-label.is-failed { color: var(--danger); }
.schedule-result-label.is-cancelled { color: var(--text-muted); }
.schedule-empty-history { margin-block: 18px; color: var(--text-muted); font-size: 14px; }
.schedule-card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-block: 18px; }
.schedule-edit { border-top: 1px solid var(--line); }
.schedule-edit summary { min-height: 48px; padding-block: 14px; font-weight: 650; }
.schedule-edit-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 10px; }
.schedule-edit-form .field { min-width: 0; }
.schedule-edit-form > .button { align-self: end; }
.schedule-edit-form input, .schedule-edit-form select, .schedule-filters input, .schedule-filters select { width: 100%; min-width: 0; max-width: 100%; min-height: 48px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-raised); color: var(--text); font: inherit; font-size: max(16px, 1rem); }
.schedule-filters { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto; gap: 16px; margin-bottom: 24px; align-items: end; }
.schedule-filters .field { min-width: 0; }
.schedule-filters > p { grid-column: 1 / -1; }
.schedule-pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px; margin-block: 24px; }
.schedule-rules { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.schedule-rules h2 { font-size: 1.1rem; }
.schedule-rules p { margin-top: 12px; color: var(--text-muted); font-size: 14px; }
@media (max-width: 559px) {
  .schedule-edit-form, .schedule-filters { grid-template-columns: minmax(0, 1fr); }
  .schedule-edit-form input[type="time"] { appearance: none; -webkit-appearance: none; }
  .schedules-shell .page-heading { flex-wrap: wrap; }
}

/* Compact administrator table; personal schedules keep their card layout. */
.admin-schedules-shell { width: min(1440px, calc(100% - 40px)); max-width: 1440px; padding-top: 24px; }
.admin-schedules-shell .page-heading { margin-bottom: 18px; gap: 12px; }
.admin-schedules-shell .page-heading h1 { max-width: none; font-size: clamp(1.35rem, 2.2vw, 1.8rem); letter-spacing: -.03em; }
.admin-schedules-shell .section-label { margin-bottom: 6px; font-size: 11px; }
.admin-schedules-shell .page-heading > div > p:last-child { margin-top: 6px; font-size: 13px; }
.admin-schedules-shell .page-heading > .button { min-height: 40px; padding: 8px 16px; font-size: 14px; }
.admin-schedules-shell .schedule-filters { grid-template-columns: minmax(180px, 1fr) 170px auto auto; gap: 12px; align-items: center; padding: 14px 16px; margin-bottom: 14px; border-radius: 14px; }
.admin-schedules-shell .schedule-filters .field { margin: 0; }
.admin-schedules-shell .schedule-filters :is(input, select) { min-height: 40px; padding: 8px 12px; border-radius: 9px; }
.admin-schedules-shell .schedule-filters .button { min-height: 40px; padding: 8px 18px; font-size: 14px; }
.admin-schedules-shell .schedule-filters > .schedule-count { grid-column: auto; margin: 0; font-size: 13px; white-space: nowrap; }
.schedule-scroll-hint { display: none; margin-bottom: 8px; font-size: 12px; color: var(--text-muted); }
.schedule-table-scroll { overflow: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-raised); }
.schedule-table { width: 100%; min-width: 1040px; border-collapse: collapse; table-layout: fixed; font-size: 14px; text-align: left; white-space: normal; }
.schedule-table thead { background: var(--surface); color: var(--text-muted); }
.schedule-table th, .schedule-table td { padding: 12px 16px; vertical-align: middle; overflow-wrap: anywhere; border-bottom: 0; }
.schedule-table thead th { font-size: 12px; font-weight: 650; padding-block: 11px; }
.schedule-table thead th:nth-child(1) { width: 26%; }
.schedule-table thead th:nth-child(2) { width: 10%; }
.schedule-table thead th:nth-child(3) { width: 9%; }
.schedule-table thead th:nth-child(4) { width: 9%; }
.schedule-table thead th:nth-child(5) { width: 14%; }
.schedule-table thead th:nth-child(6) { width: 12%; }
.schedule-table thead th:nth-child(7) { width: 20%; }
.schedule-table tbody { border-top: 1px solid color-mix(in oklch, var(--line) 55%, transparent); }
.schedule-row:hover { background: color-mix(in oklch, var(--accent-soft) 30%, var(--surface-raised)); }
.schedule-user { font-weight: 600; }
.schedule-email { display: block; overflow-wrap: anywhere; }
.schedule-table small { display: block; margin-top: 2px; color: var(--text-muted); font-size: 11px; font-weight: 400; }
.schedule-number, .schedule-clock, .schedule-next { font-variant-numeric: tabular-nums; }
.schedule-number strong { font-weight: 650; }
.schedule-state { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; white-space: nowrap; }
.schedule-state::before { content: ''; width: 6px; height: 6px; flex-shrink: 0; border-radius: 50%; background: currentColor; }
.schedule-state.is-enabled { color: var(--accent-ink); }
.schedule-state.is-paused, .schedule-muted { color: var(--text-muted); }
.schedule-recent .schedule-result-label { font-size: 13px; }
.schedule-actions > div { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.schedule-action { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 6px 9px; border: 0; border-radius: 7px; background: transparent; color: var(--text-muted); font-size: 13px; font-weight: 600; cursor: pointer; }
.schedule-action:hover { color: var(--text); background: var(--accent-soft); }
.schedule-action.is-resume { color: var(--accent-ink); }
.schedule-action:disabled { opacity: .45; cursor: not-allowed; }
.schedule-expanded > td { padding: 0 20px 18px; background: var(--surface); }
.schedule-expanded summary { padding-block: 12px; min-height: 44px; color: var(--accent-ink); font-size: 13px; font-weight: 600; }
.schedule-expanded-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; padding-block: 8px; }
.schedule-expanded-grid > section { min-width: 0; }
.schedule-expanded h3 { font-size: 14px; margin-bottom: 10px; }
.schedule-record p { margin-top: 6px; font-size: 13px; overflow-wrap: anywhere; }
.schedule-record-time { color: var(--accent-ink); font-variant-numeric: tabular-nums; }
.schedule-expanded .schedule-edit-form { gap: 10px 14px; margin: 0; }
.schedule-expanded .field label { font-size: 12px; margin-bottom: 4px; }
.schedule-expanded .schedule-edit-form :is(input, select) { min-height: 40px; padding: 7px 10px; border-radius: 8px; }
.schedule-expanded .schedule-edit-form .button { min-height: 40px; padding: 8px 16px; font-size: 14px; }
.admin-schedules-shell .schedule-pagination { margin-block: 18px; font-size: 13px; }
.admin-schedules-shell .schedule-rules { margin-top: 20px; padding-top: 14px; font-size: 13px; }
.admin-schedules-shell .schedule-rules summary { min-height: 40px; padding-block: 8px; color: var(--text-muted); }
@media (min-width: 681px) and (max-width: 1080px) { .schedule-scroll-hint { display: block; } }
@media (max-width: 680px) {
  .admin-schedules-shell { width: calc(100% - 24px); padding-top: 20px; }
  .admin-schedules-shell .schedule-filters { grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 12px; }
  .admin-schedules-shell .schedule-filters .field:first-child { grid-column: 1 / -1; }
  .admin-schedules-shell .schedule-filters > .schedule-count { grid-column: 1 / -1; }
  .schedule-table-scroll { overflow: visible; }
  .schedule-table { display: block; min-width: 0; }
  .schedule-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .schedule-table tbody { display: block; }
  .schedule-table tbody:first-of-type { border-top: 0; }
  .schedule-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(90px, .7fr); grid-template-areas: 'user status' 'steps clock' 'next recent' 'actions actions'; column-gap: 16px; row-gap: 10px; padding: 14px; }
  .schedule-row > :is(th, td) { display: block; min-width: 0; padding: 0; font-size: 13px; }
  .schedule-user { grid-area: user; }
  .schedule-status { grid-area: status; justify-self: end; }
  .schedule-number { grid-area: steps; }
  .schedule-clock { grid-area: clock; }
  .schedule-next { grid-area: next; }
  .schedule-recent { grid-area: recent; }
  .schedule-actions { grid-area: actions; }
  .schedule-row [data-label]::before { content: attr(data-label); display: block; margin-bottom: 2px; font-size: 11px; color: var(--text-muted); font-weight: 400; }
  .schedule-actions > div { gap: 6px; }
  .schedule-action { min-width: 48px; min-height: 44px; padding-inline: 12px; background: var(--surface); }
  .schedule-expanded, .schedule-expanded > td { display: block; }
  .schedule-expanded > td { padding: 0 14px 14px; }
  .schedule-expanded-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
}

.wechat-link { margin-top: 18px; border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); }
.wechat-link:hover { border-color: var(--accent-ink); background: var(--accent); color: var(--text); }
.wechat-hint { margin-top: 9px; color: var(--text-muted); font-size: 12px; text-align: center; }

.share-fallback { margin-block: 12px; color: var(--text-muted); font-size: 13px; }
.share-fallback p { overflow-wrap: anywhere; padding: 10px; user-select: all; }
.admin-controls { margin-block: 24px; padding: 24px; }
.admin-controls form { display: grid; gap: 12px; margin-top: 20px; }
.admin-controls input { width: 100%; min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; }
th, td { padding: 12px; text-align: left; border-bottom: 1px solid var(--line); }
@media (max-width: 559px) {
  .admin-link { display: inline-flex; }
  .topbar-actions { gap: 2px; }
  .workspace-grid, .action-column, .settings-panel { min-width: 0; }
}
/* Diagnostics extend the existing panels and inherit their mobile/dark theme. */
.device-diagnostics, .task-diagnostics { margin-top: 1.2rem; border-top: 1px solid var(--border, #d8d3c8); padding-top: 1rem; min-width: 0; }
.device-diagnostics summary, .task-diagnostics summary { cursor: pointer; font-weight: 650; }
.device-diagnostics p, .diagnostic-grid dd { overflow-wrap: anywhere; }
.diagnostic-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin: 1rem 0; }
.diagnostic-grid div { min-width: 0; }
.diagnostic-grid dt { font-size: .8rem; opacity: .8; }
.diagnostic-grid dd { margin: .3rem 0 0; font-size: .9rem; }
.confirmation-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.confirmation-actions .button { white-space: normal; max-width: 100%; }
.device-admin { margin-bottom: 1.5rem; }
.status-badge.is-uncertain { background: #f6e4b6; color: #5a3600; }
@media (max-width: 359px) { .diagnostic-grid { grid-template-columns: minmax(0, 1fr); } }
/* 走点：日常操作集中到一张卡片，详细信息保留在次级页面。 */
.simple-topbar .topbar-inner { width: min(660px, calc(100% - 32px)); min-height: 64px; flex-wrap: nowrap; }
.simple-topbar .brand { font-size: 18px; }
.simple-topbar .brand img { width: 32px; height: 32px; }
.simple-topbar .topbar-actions { flex-wrap: nowrap; gap: 4px; }
.more-menu { position: relative; }
.more-menu > summary { display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 10px; list-style: none; font-size: 14px; color: var(--text-muted); }
.more-menu > summary::-webkit-details-marker { display: none; }
.more-menu-items { position: absolute; right: 0; z-index: 30; width: 174px; padding: 8px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-raised); box-shadow: 0 12px 32px #0001; }
.more-menu-items :is(a,button) { display: block; width: 100%; padding: 10px 12px; min-height: 44px; border: 0; border-radius: 8px; background: none; text-align: left; font-size: 14px; }
.more-menu-items :is(a,button):hover { background: var(--surface); }
.simple-shell { width: min(480px, calc(100% - 24px)); margin: 0 auto; padding: 30px 0 30px; }
.simple-heading { margin: 0 4px 22px; }
.simple-heading h1 { font-size: 26px; letter-spacing: -.04em; }
.simple-heading p { margin-top: 8px; font-size: 14px; color: var(--text-muted); }
.simple-card { padding: 24px; border-radius: 20px; background: var(--surface-raised); box-shadow: 0 4px 20px #00000004; }
.simple-card .field { margin-bottom: 17px; }
.simple-card :is(label,legend) { font-size: 14px; }
.simple-card .field input:not([type=range]) { min-height: 48px; background: var(--surface); border-radius: 11px; }
.simple-card .field-error:empty { display: none; }
.simple-card .steps-field { margin-bottom: 20px; }
.field-hint { margin-left: 8px; font-size: 12px; font-weight: 400; color: var(--text-muted); }
.simple-card #steps { font-size: 24px; font-weight: 650; font-variant-numeric: tabular-nums; }
.simple-card .steps-slider { display: block; appearance: auto; width: 100%; height: 32px; min-height: 32px; padding: 0; border: 0; margin: 7px 0 0; background: transparent; accent-color: var(--accent-ink); }
.simple-card .quick-steps { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 6px; margin: 2px 0 0; }
.simple-card .quick-steps button { min-width: 0; min-height: 36px; padding: 6px 0; border-radius: 9px; font-size: 12px; }
.simple-submit { min-height: 52px; border-radius: 12px; color: #fff; font-size: 17px; gap: 12px; }
.simple-card .form-message { margin: 12px 0 0; font-size: 13px; }
.compact-status { margin-top: 14px; padding: 12px; border-radius: 12px; background: var(--surface); }
.compact-status .status-heading { gap: 8px; margin-bottom: 3px; }
.compact-status :is(p,.text-link) { font-size: 13px; }
.compact-status .text-link { padding: 4px 0; }
.compact-status .status-badge { font-size: 11px; }
.simple-schedule { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.simple-schedule .schedule-heading p { font-size: 11px; }
.simple-schedule .field-help { margin-top: 8px; font-size: 12px; }
.simple-schedule .time-row { margin-top: 10px; }
.simple-schedule .time-trigger { min-height: 52px; padding: 10px 12px; }
.simple-schedule .time-trigger strong { font-size: 22px; }
.schedule-save-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; font-size: 12px; color: var(--text-muted); }
.schedule-save-row .button { min-height: 40px; padding: 8px 12px; font-size: 13px; }
.simple-footer { display: flex; justify-content: center; align-items: center; margin-top: 12px; gap: 4px; color: var(--text-muted); }
.simple-footer .text-link { font-size: 12px; font-weight: 400; }
.guide-dialog { width: min(640px,calc(100% - 24px)); margin-inline: auto; }
.guide-dialog .guide-panel { margin: 16px 0 0; border: 0; box-shadow: none; }
.guide-dialog .guide-panel > summary { display: none; }
.guide-dialog .onboarding-content { padding: 0; }
.detail-shell { max-width: 760px; }
.detail-shell > .panel { margin-bottom: 20px; }
.detail-shell .page-heading h1 { font-size: 27px; }
.detail-shell .page-heading p { margin-top: 8px; font-size: 14px; }
@media (max-width: 360px) {
  .simple-card { padding: 18px 16px; }
  .simple-shell { padding-top: 22px; }
  .simple-heading h1 { font-size: 24px; }
  .simple-topbar .topbar-inner { width: calc(100% - 24px); gap: 4px; }
  .simple-topbar .brand { gap: 6px; }
  .simple-topbar .text-link, .more-menu > summary { padding-inline: 6px; font-size: 12px; }
  .simple-schedule .schedule-heading { gap: 8px; }
}

/* Admin account tests share the existing mobile palette and controls. */
.feedback-shell { max-width: 760px; }
.feedback-shell .panel, .feedback-admin .panel { margin-bottom: 20px; }
.feedback-shell .field { margin-bottom: 18px; }
.feedback-shell textarea, .feedback-update textarea { width: 100%; min-width: 0; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px; resize: vertical; }
.feedback-consent { display: flex; align-items: flex-start; gap: 10px; margin: 12px 0 18px; font-size: 14px; font-weight: 400; }
.feedback-consent input, .feedback-table input[type="checkbox"] { width: 18px; height: 18px; min-width: 18px; flex: 0 0 18px; margin-top: 3px; }
.feedback-record { padding-block: 18px; border-bottom: 1px solid var(--line); }
.feedback-record-title { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; }
.feedback-copy, .feedback-reply { white-space: pre-wrap; overflow-wrap: anywhere; }
.feedback-record-title strong, .feedback-secret { overflow-wrap: anywhere; }
.feedback-reply { margin-top: 10px; padding: 12px; background: var(--accent-soft); border-radius: 12px; }
.feedback-state { white-space: nowrap; color: var(--accent-ink); font-weight: 700; }
.feedback-current p { margin-top: 8px; }
.feedback-admin { max-width: 1450px; }
.feedback-filters, .feedback-buttons { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; }
.feedback-filters .field { flex: 1; min-width: 150px; }
.feedback-export { margin-bottom: 18px; }
.feedback-export .field-help { margin-top: 10px; }
.feedback-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 13px; }
.feedback-table th, .feedback-table td { padding: 12px 8px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.feedback-table th { color: var(--text-muted); background: var(--accent-soft); }
.feedback-table th:first-child { width: 40px; }
.feedback-table th:nth-child(2) { width: 23%; }
.feedback-table th:nth-child(3) { width: 29%; }
.feedback-table small { display: block; color: var(--text-muted); margin-top: 5px; }
.feedback-table summary { color: var(--accent-ink); }
.feedback-secret { display: block; white-space: pre-wrap; font-family: monospace; margin-top: 8px; user-select: text; }
.feedback-update { margin-top: 10px; }
.feedback-update select, .feedback-update textarea { margin-bottom: 10px; }
.feedback-update .button { padding-inline: 10px; white-space: normal; }
.support-detail { max-width: 760px; }
.support-detail .panel > p { margin-block: 12px; overflow-wrap: anywhere; }
.support-test-form { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin-block: 18px; }
.support-test-form .field { flex: 1; min-width: 150px; margin: 0; }
.schedule-bulk-actions { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; margin-block: 16px; }
.schedule-selection { display: flex; gap: 8px; align-items: flex-start; min-width: 0; }
.schedule-selection input[type="checkbox"] { width: 18px; height: 18px; min-width: 18px; flex: 0 0 18px; margin-top: 2px; }
@media (min-width: 681px) {
  .schedule-bulk-actions { margin-block: 10px; }
  .schedule-bulk-actions .button { min-height: 36px; padding: 6px 12px; font-size: 13px; }
  .schedule-row > th, .schedule-row > td { padding-block: 10px; }
}
.failure-table th:first-child { width: 22%; }
.failure-table th:nth-child(2) { width: 20%; }
.failure-table th:nth-child(3) { width: 34%; }
.feedback-pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; margin-top: 16px; font-size: 14px; }
.simple-footer { flex-wrap: wrap; }
@media (max-width: 760px) {
  .feedback-table, .feedback-table tbody, .feedback-table tr, .feedback-table td { display: block; width: 100%; }
  .feedback-table thead { display: none; }
  .feedback-table tr { padding-block: 12px; border-bottom: 1px solid var(--line); }
  .feedback-table td { padding: 6px 0; border: 0; }
  .feedback-table td[data-label]::before { content: attr(data-label); display: block; font-size: 12px; font-weight: 700; color: var(--text-muted); margin-bottom: 3px; }
  .feedback-buttons .button { flex: 1; min-width: 170px; white-space: normal; }
  .feedback-filters .field { min-width: 100%; }
}
.connection-status { display: block; margin-block: 12px; overflow-wrap: anywhere; }
#connection-cancel { margin-top: 6px; }
.admin-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.admin-tabs a { padding: 10px 16px; border-radius: 999px; color: var(--text-muted); text-decoration: none; }
.admin-tabs a[aria-current="page"] { background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; }
.admin-test-shell { max-width: 880px; }
.admin-test-shell .panel { margin-bottom: 20px; min-width: 0; }
.test-account-picker { display: flex; align-items: end; gap: 12px; margin-bottom: 20px; }
.test-account-picker .field { flex: 1; min-width: 0; margin: 0; }
.test-account-picker select { width: 100%; min-width: 0; text-overflow: ellipsis; }
.test-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 16px 0; }
.test-actions > button { flex: 1; min-width: 0; white-space: normal; }
.test-history article { padding: 12px 0; border-bottom: 1px solid var(--line); }
.test-history p, #test-request, #test-stage, #test-result { overflow-wrap: anywhere; }
#test-clear-form { margin-top: 18px; }
#test-clear-form button { white-space: normal; text-align: left; }
@media (max-width: 380px) {
  .test-account-picker { align-items: stretch; flex-direction: column; }
  .test-actions { flex-direction: column; }
  .admin-tabs a { padding: 9px 10px; }
}
.admin-plan-row{display:flex;gap:16px;align-items:center;justify-content:space-between;padding:12px 0;border-bottom:1px solid var(--border,#dedbd3)}
.admin-plan-row>div:first-child{min-width:0;overflow-wrap:anywhere}
.admin-plan-row .test-actions{flex-shrink:0;gap:12px}
@media(max-width:480px){.admin-plan-row{align-items:flex-start;flex-direction:column;gap:4px}}

.membership-notice { display: block; line-height: 1.7; }
.membership-notice a { display: inline-block; margin-top: 4px; text-decoration: underline; }

/* Daily UI: one main action, with diagnostics kept behind native disclosure. */
.topbar { background: var(--bg); backdrop-filter: none; -webkit-backdrop-filter: none; }
.page-heading h1, .simple-heading h1, .detail-shell .page-heading h1 { font-size: clamp(28px, 5vw, 32px); font-weight: 680; letter-spacing: -.035em; }
.panel { border-color: color-mix(in oklch, var(--line) 65%, var(--surface)); box-shadow: none; }
.panel h2, .dialog-header h2 { font-size: 20px; font-weight: 650; }
.button { border-radius: var(--radius-md); }
.button-primary { min-height: 52px; }
.more-menu-items { width: 216px; max-width: calc(100vw - 24px); max-height: calc(100dvh - 92px); overflow-y: auto; overscroll-behavior: contain; box-shadow: 0 4px 16px #00000008; }
.menu-group-label { padding: 8px 12px 2px; color: var(--text-muted); font-size: 12px; }
.menu-group { margin-top: 4px; border-top: 1px solid var(--line); }
.more-menu-items :is(a,button) { padding-block: 8px; font-weight: 450; }
.more-menu-items form { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 4px; }
.simple-shell { padding-top: var(--space-6); padding-bottom: max(var(--space-8), env(safe-area-inset-bottom)); }
.simple-heading { margin-bottom: var(--space-5); }
.simple-card { padding: var(--space-6); background: var(--surface); box-shadow: none; }
.account-editor { margin-bottom: var(--space-6); }
.account-editor > summary { list-style: none; }
.account-editor > summary::-webkit-details-marker { display: none; }
.account-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); min-height: 60px; }
.account-row > span:first-child { min-width: 0; }
.account-row strong { display: block; font-size: 16px; font-weight: 600; }
.account-row small { display: block; margin-top: var(--space-1); font-size: 13px; color: var(--text-muted); overflow-wrap: anywhere; }
#account-connection { color: var(--accent-ink); }
.row-action { flex-shrink: 0; font-size: 13px; color: var(--text-muted); }
.account-fields { padding-top: var(--space-4); }
.account-fields > .field-help { font-size: 13px; }
.account-diagnostics, .reconnect-options, .plan-diagnostics { margin-top: var(--space-3); }
.account-diagnostics > summary, .reconnect-options > summary, .plan-diagnostics > summary { min-height: 44px; display: flex; align-items: center; gap: 8px; color: var(--text-muted); font-size: 13px; }
.simple-card .field input:not([type=range]) { border-radius: var(--radius-sm); }
.simple-card .steps-field { margin-bottom: var(--space-5); }
.simple-card #steps { height: 72px; font-size: 36px; font-weight: 650; letter-spacing: -.025em; background: var(--surface-raised); }
.simple-card .quick-steps { margin-top: var(--space-3); gap: var(--space-2); }
.simple-card .quick-steps button { min-height: 44px; font-size: 13px; border-radius: var(--radius-sm); }
.quick-steps button[aria-pressed="true"] { color: var(--accent-ink); background: var(--accent-soft); border-color: var(--accent-ink); }
.simple-submit { border-radius: var(--radius-md); font-size: 16px; }
.simple-card .field-help { font-size: 13px; }
.simple-card .offline-note { color: var(--danger); }
.simple-schedule { margin-top: var(--space-5); padding-top: var(--space-4); }
.simple-schedule .schedule-heading p { font-size: 13px; }
.simple-schedule .schedule-heading label { font-size: 16px; font-weight: 550; }
.schedule-brief { display: flex; justify-content: space-between; align-items: center; gap: var(--space-2); font-size: 14px; color: var(--text-muted); }
.schedule-brief strong { font-weight: 500; font-variant-numeric: tabular-nums; }
.schedule-brief > span { min-width: 0; }
.schedule-save-row { flex-wrap: wrap; margin-top: var(--space-2); }
.schedule-save-row .button { min-height: 44px; border-radius: var(--radius-sm); }
.task-summary { margin-bottom: var(--space-5); }
.task-summary .status-heading { align-items: baseline; flex-wrap: wrap; gap: var(--space-2); }
.task-summary .status-heading h2 { font-size: 20px; letter-spacing: -.02em; }
.task-summary .status-badge { background: transparent; border-radius: 0; padding: 0; font-size: 13px; font-weight: 450; }
.task-summary .status-badge.is-failed { color: var(--danger); }
.task-summary .status-badge.is-uncertain { color: #72521b; }
.task-summary .field-help { font-size: 14px; }
.task-summary .field-help:empty { display: none; }
.task-time { font-size: 13px; color: var(--text-muted); margin-top: var(--space-2); font-variant-numeric: tabular-nums; }
.task-summary .wechat-link { margin-top: var(--space-4); }
.task-summary .wechat-link.button-primary { background: var(--button-bg); border-color: var(--button-bg); color: var(--button-text); }
.task-summary .wechat-link.button-primary:hover { background: var(--accent-ink); }
.task-summary .wechat-link.button-secondary { background: var(--surface); border-color: var(--line); color: var(--text); }
.home-result { padding: var(--space-4); margin-top: var(--space-5); margin-bottom: 0; background: var(--surface-raised); border-radius: var(--radius-md); }
.home-result .status-heading h2 { font-size: 18px; }
.task-summary :is(.task-diagnostics, .wechat-instructions, .share-fallback) { margin-top: var(--space-2); }
.task-summary summary { min-height: 44px; padding-block: 10px; font-size: 14px; font-weight: 450; color: var(--text-muted); }
.task-summary .task-diagnostics { padding-top: 0; }
.task-summary details > p { margin-block: var(--space-2); font-size: 14px; }
.diagnostic-result { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; }
.task-summary .confirmation-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: 0; }
#task-confirm-form { margin-top: var(--space-4); }
.copy-share-action { justify-content: flex-start; padding-inline: 0; }
.compact-page-heading { align-items: center; justify-content: flex-start; gap: var(--space-2); margin-bottom: var(--space-6); }
.back-link { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 44px; min-height: 44px; border-radius: var(--radius-sm); color: var(--text-muted); font-size: 24px; }
.back-link:hover { background: var(--surface); }
.detail-shell, .feedback-shell, .user-schedules .schedules-shell { max-width: 640px; padding-top: var(--space-6); padding-bottom: max(var(--space-8), env(safe-area-inset-bottom)); }
.settings-section { margin-top: var(--space-6); }
.group-heading { margin: 0 4px var(--space-2); font-size: 13px; font-weight: 500; color: var(--text-muted); }
.settings-list { padding: 0 var(--space-4); }
.settings-item { min-width: 0; border-bottom: 1px solid color-mix(in oklch, var(--line) 55%, transparent); }
.settings-item:last-child { border-bottom: 0; }
.settings-item > summary, .settings-link { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); min-height: 56px; padding: var(--space-3) 0; font-size: 16px; list-style: none; text-align: left; }
.settings-item > summary::-webkit-details-marker { display: none; }
button.settings-link { width: 100%; border: 0; border-radius: 0; background: transparent; font-family: inherit; }
.settings-item > summary > span:first-child, .settings-link > span:first-child { flex-shrink: 0; }
.row-value { min-width: 0; color: var(--text-muted); text-align: right; font-size: 13px; overflow-wrap: anywhere; }
.settings-item-body { padding: 0 0 var(--space-4); }
.settings-item-body > :is(p,form,details) + :is(p,form,details) { margin-top: var(--space-3); }
.settings-item-body .field-help, .settings-inline-error { font-size: 13px; }
.settings-item-body > details > summary { min-height: 44px; padding-block: var(--space-2); color: var(--text-muted); font-size: 14px; }
.settings-item-body .button { min-height: 44px; font-size: 14px; }
.settings-inline-error { padding-bottom: var(--space-3); color: var(--danger); }
.history-row { padding-block: var(--space-3); }
.history-row + .history-row { border-top: 1px solid var(--line); }
.history-row > p { font-size: 14px; }
.history-row > details > summary { min-height: 44px; display: flex; align-items: center; color: var(--text-muted); font-size: 13px; }
.user-schedules .schedule-card-heading > div { flex-basis: 150px; }
.user-schedules .schedule-card-heading .section-label { display: none; }
.user-schedules .schedule-card-heading h2 { font-size: 20px; }
.user-schedules .schedule-card .soft-badge { background: transparent; padding: 0; font-size: 13px; font-weight: 450; }
.user-schedules .schedule-target { font-size: 32px; margin-block: var(--space-4); font-weight: 650; }
.user-schedules .schedule-meta { font-size: 14px; }
.user-schedules .schedule-card-actions { margin-block: var(--space-4) var(--space-2); }
.user-schedules .schedule-edit > summary { font-weight: 500; font-size: 14px; }
.recent-schedule-row { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-1); min-width: 0; min-height: 56px; }
.recent-schedule-row strong, .recent-schedule-row small { display: block; }
.recent-schedule-row strong { font-size: 14px; font-weight: 500; }
.recent-schedule-row small { margin-top: var(--space-1); color: var(--text-muted); font-size: 13px; }
.schedule-rules { margin-top: var(--space-5); padding-top: var(--space-3); }
.schedule-rules > summary { display: flex; align-items: center; min-height: 44px; font-size: 14px; color: var(--text-muted); }
.feedback-account { margin: -12px 4px var(--space-5); overflow-wrap: anywhere; }
.feedback-shell .field-help { font-size: 13px; }
.feedback-account-editor { margin-bottom: var(--space-4); }
.feedback-account-editor > summary { min-height: 44px; padding-block: var(--space-2); color: var(--text-muted); font-size: 14px; overflow-wrap: anywhere; }
.feedback-shell textarea { border-radius: var(--radius-sm); min-height: 128px; }
#feedback-form > .button { margin-top: var(--space-4); }
.install-dialog { border-radius: 20px 20px 0 0; overscroll-behavior: contain; }
.install-dialog::backdrop { backdrop-filter: none; }
.install-dialog[open] { animation-duration: 180ms; }
.dialog-header { align-items: center; gap: var(--space-4); margin-bottom: var(--space-4); }
.dialog-close { border-radius: var(--radius-sm); }
.install-dialog .inapp-tip { margin-block: 0 var(--space-4); }
.install-tabs button[aria-selected="true"] { box-shadow: none; }
.install-panel { padding-top: var(--space-5); }
.install-panel ol { gap: var(--space-4); }
.install-panel p { font-size: 14px; }
.install-dialog .section-label { font-size: 12px; font-weight: 500; letter-spacing: 0; }
@media (min-width: 560px) { .install-dialog { border-radius: var(--radius-lg); } }
@media (max-width: 360px) {
  .simple-card { padding: var(--space-4); }
  .simple-card .quick-steps { gap: var(--space-1); }
  .simple-card .quick-steps button { font-size: 12px; }
  .account-row { gap: var(--space-2); }
  .row-action { font-size: 12px; }
  .task-summary .status-heading h2 { font-size: 18px; }
}
.payment-acceptance-notice{max-width:940px;margin:16px auto;padding:12px 16px}
