:root {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #ffffff;
  --sidebar-bg: #f7f8fa;
  --ink: #1f2329;
  --muted: #646a73;
  --subtle: #8f959e;
  --disabled: #bbbfc4;
  --line: #dee0e3;
  --line-soft: #eff0f1;
  --hover: #f5f6f7;
  --blue: #1456f0;
  --blue-hover: #0c43bd;
  --blue-soft: #e8efff;
  --blue-tint: #f4f7ff;
  --green: #1456f0;
  --green-soft: #e8efff;
  --green-tint: #f4f7ff;
  --success: #1d864a;
  --success-soft: #e8f7ef;
  --amber: #a86400;
  --amber-soft: #fff4df;
  --red: #d83931;
  --red-soft: #fff0ef;
  --radius: 8px;
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-size: 14px; line-height: 22px; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button { color: inherit; cursor: pointer; touch-action: manipulation; }
button:disabled { color: var(--disabled); cursor: not-allowed; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-hover); }
svg { width: 20px; height: 20px; flex-shrink: 0; vertical-align: middle; }
input, textarea, select { min-width: 0; }
input::placeholder, textarea::placeholder { color: var(--subtle); opacity: 1; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--blue); width: 16px; height: 16px; flex: 0 0 auto; }
::selection { background: #dce7ff; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
[hidden], .sessions-row [hidden], [data-sessions-warning][hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 16px; top: 8px; z-index: 100; transform: translateY(-160%); padding: 8px 16px; border: 1px solid var(--line); border-radius: 4px; background: #fff; }
.skip-link:focus { transform: none; }

.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 20; width: 208px; padding: 20px 12px 16px; display: flex; flex-direction: column; border-right: 1px solid var(--line); background: var(--sidebar-bg); }
.brand { display: flex; align-items: center; gap: 10px; min-height: 32px; padding: 0 8px; color: var(--ink); font-size: 16px; font-weight: 600; line-height: 24px; }
.brand-mark, .brand > svg { display: grid; place-items: center; flex: 0 0 28px; width: 28px; height: 28px; padding: 5px; border-radius: 6px; background: var(--blue); color: #fff; }
.brand-mark svg { width: 18px; height: 18px; }
.brand small, .brand-subtitle { display: block; color: var(--subtle); font-size: 11px; font-weight: 400; line-height: 18px; }
.sidebar-section-label { margin: 28px 12px 8px; color: var(--subtle); font-size: 12px; }
.main-nav { display: grid; gap: 4px; margin-top: 16px; }
.sidebar-section-label + .main-nav { margin-top: 0; }
.nav-link { display: flex; align-items: center; gap: 10px; min-height: 40px; width: 100%; padding: 8px 12px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-size: 14px; font-weight: 400; line-height: 22px; text-align: left; }
.nav-link svg { width: 18px; height: 18px; }
.nav-link:hover { background: #eceef1; color: var(--ink); }
.nav-link.active, .nav-link.is-active, .nav-link[aria-current="page"] { background: var(--blue-soft); color: var(--blue); font-weight: 500; }
.nav-caption, .nav-description { display: block; color: var(--subtle); font-size: 12px; font-weight: 400; }
.nav-count { margin-left: auto; min-width: 20px; padding: 0 6px; border-radius: 4px; background: #e4e6e9; color: var(--muted); font-size: 12px; text-align: center; }
.nav-link[aria-current="page"] .nav-count { background: #d9e4ff; color: var(--blue); }
.sidebar-note { margin: 24px 12px 0; color: var(--subtle); font-size: 12px; }
.sidebar-note p { margin: 0; }
.sidebar-footer { margin-top: auto; padding-top: 24px; color: var(--muted); font-size: 12px; }
.prototype-note { padding: 8px; color: var(--muted); font-size: 12px; }
.profile-mini { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 16px 8px 0; border-top: 1px solid var(--line); font-size: 13px; }
.profile-mini small { display: block; color: var(--subtle); font-size: 11px; line-height: 18px; }
.profile-avatar, .avatar { display: grid; place-items: center; flex: 0 0 28px; width: 28px; height: 28px; border-radius: 50%; background: #e8efff; color: var(--blue); font-size: 13px; }
.main-shell { margin-left: 208px; padding: 0 32px 24px; min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; border-bottom: 1px solid var(--line-soft); }
.topbar-left, .topbar-right, .topbar-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.topbar-label { color: var(--muted); font-size: 13px; }
.search-trigger { display: flex; align-items: center; gap: 8px; min-width: 0; min-height: 32px; padding: 4px 10px; border: 1px solid transparent; border-radius: 4px; background: var(--hover); color: var(--subtle); font-size: 13px; text-align: left; }
.search-trigger:hover { border-color: var(--line); }
.search-trigger > span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.search-trigger svg { width: 16px; height: 16px; }
.search-trigger kbd { margin-left: 16px; padding: 0 4px; border: 1px solid var(--line); border-radius: 3px; color: var(--subtle); background: #fff; font: inherit; font-size: 11px; line-height: 18px; white-space: nowrap; }
.demo-badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: 4px; color: var(--muted); background: var(--hover); font-size: 12px; white-space: nowrap; }
.demo-badge::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--subtle); }
#cloud-account-slot { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-width: 0; }
.cloud-account-button { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cloud-account-message { color: var(--muted); font-size: 12px; line-height: 20px; overflow-wrap: anywhere; }
.cloud-account-dialog { max-width: min(600px, calc(100vw - 32px)); }
.cloud-device-list { display: grid; gap: 0; }
.cloud-device { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line-soft); }
.cloud-device > div { display: grid; gap: 4px; min-width: 0; overflow-wrap: anywhere; }
.cloud-device strong { font-size: 14px; font-weight: 500; }
.cloud-device span { color: var(--subtle); font-size: 12px; }
.cloud-device > .button { flex-shrink: 0; }
.codex-source-nodes { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; margin: 12px 0; }
.codex-source-node { display: grid; gap: 4px; min-width: 0; padding: 10px; border: 1px solid var(--line-soft); border-radius: 4px; overflow-wrap: anywhere; font-size: 12px; line-height: 18px; }
.codex-source-node > strong { color: var(--ink); font-weight: 500; }
.codex-source-node > span { color: var(--success); }
.codex-source-node.is-offline > span { color: var(--amber); }
.codex-source-node small, .codex-source-time { display: block; color: var(--subtle); font-size: 11px; line-height: 18px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 24px 0; }
.page-title { margin: 0 0 8px; color: var(--ink); font: 600 24px/32px -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif; }
.page-intro { margin: 0; color: var(--muted); font-size: 13px; line-height: 22px; }
.page-date, .date-chip { display: grid; gap: 2px; color: var(--subtle); font-size: 12px; line-height: 20px; text-align: right; white-space: nowrap; }
.page-date strong, .date-chip strong { color: var(--muted); font-size: 13px; font-weight: 400; }
.eyebrow, .section-kicker { color: var(--subtle); font-size: 12px; line-height: 20px; font-weight: 400; }
.page-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line-soft); color: var(--subtle); font-size: 12px; line-height: 20px; }
.page-footer .mobile-reset { display: none; }

.button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 32px; max-width: 100%; padding: 5px 12px; border: 1px solid transparent; border-radius: 4px; background: transparent; font-size: 14px; font-weight: 400; line-height: 20px; text-decoration: none; transition: background-color .15s, border-color .15s, color .15s; }
.button svg { width: 16px; height: 16px; }
.button-primary { background: var(--blue); color: #fff; }
.button-primary:hover { background: var(--blue-hover); color: #fff; }
.button-primary:disabled { background: #f1f2f3; color: var(--disabled); }
.button-secondary { border-color: var(--line); background: #fff; color: var(--ink); }
.button-secondary:hover { background: var(--hover); }
.button-secondary:disabled { background: var(--hover); border-color: var(--line-soft); }
.button-quiet { color: var(--muted); }
.button-quiet:hover { background: #eceef1; color: var(--ink); }
.icon-button { display: inline-grid; place-items: center; flex: 0 0 auto; width: 32px; min-height: 32px; padding: 4px; border: 0; border-radius: 4px; background: transparent; color: var(--muted); }
.icon-button:hover { background: var(--hover); color: var(--ink); }
.text-link { display: inline-flex; align-items: center; gap: 4px; padding: 4px 0; border: 0; background: transparent; color: var(--blue); font-size: 13px; line-height: 20px; text-align: left; }
.text-link:hover, .support-link:hover { color: var(--blue-hover); text-decoration: underline; text-underline-offset: 3px; }
.text-link svg { width: 14px; height: 14px; }
.muted { color: var(--muted); }
.tiny { font-size: 12px; }
.status-dot { display: inline-block; width: 6px; height: 6px; margin-right: 4px; border-radius: 50%; background: currentColor; }
.status-pill { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; padding: 1px 6px; border-radius: 4px; background: #f0f1f2; color: var(--muted); font-size: 12px; line-height: 20px; font-weight: 400; white-space: nowrap; }
.status-pill.waiting, .status-pill.warning, .status-pill.pending { background: var(--amber-soft); color: var(--amber); }
.status-pill.pass, .status-pill.checked, .status-pill.success { background: var(--success-soft); color: var(--success); }
.status-pill.issue, .status-pill.problem { background: var(--red-soft); color: var(--red); }
.status-pill.neutral, .status-pill.muted, .status-pill.unknown { background: #f0f1f2; color: var(--muted); }
.count-badge, .panel-count { min-width: 20px; padding: 1px 6px; border-radius: 4px; color: var(--blue); background: var(--blue-soft); font-size: 12px; line-height: 20px; font-weight: 400; text-align: center; }
.count-badge.neutral { color: var(--muted); background: #f0f1f2; }

.direction-card { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 20px; padding: 20px; border: 1px solid #dce5fa; border-radius: var(--radius); background: var(--blue-tint); }
.direction-content { min-width: 0; }
.direction-eyebrow { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; color: var(--muted); font-size: 12px; line-height: 20px; }
.direction-eyebrow svg { width: 16px; height: 16px; color: var(--blue); }
.direction-title { margin: 0 0 8px; color: var(--ink); font: 500 18px/28px -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif; }
.direction-content > p { margin: 0 0 12px; color: var(--muted); font-size: 14px; line-height: 22px; }
.direction-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; color: var(--muted); font-size: 12px; line-height: 20px; }
.direction-badge { padding: 0 6px; border: 1px solid #dce5fa; border-radius: 4px; background: #fff; color: var(--muted); font-size: 12px; }
.direction-card > .button { flex-shrink: 0; border-color: var(--line); background: #fff; white-space: nowrap; }
.workspace-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.primary-stack, .secondary-stack { display: grid; gap: 20px; min-width: 0; }
.panel { min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.panel-title { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0; color: var(--ink); font-size: 16px; line-height: 24px; font-weight: 600; }
.panel-title > svg { width: 18px; height: 18px; color: var(--muted); }
.panel-head .section-kicker { margin-bottom: 4px; }
.panel-caption, .panel-description { color: var(--subtle); font-size: 12px; line-height: 20px; }
.panel-caption { white-space: nowrap; }
.panel-description { margin: 4px 0 0; }
.panel-footnote, .task-footer, .panel-footer { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: 12px; line-height: 20px; }
.task-footer, .panel-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

.task-list { display: grid; }
.task-row { display: flex; align-items: flex-start; gap: 12px; min-width: 0; width: 100%; padding: 12px 0; border-top: 1px solid var(--line-soft); }
.task-row:first-child { padding-top: 0; border-top: 0; }
.task-row:last-child { padding-bottom: 0; }
.task-open { display: flex; align-items: flex-start; gap: 12px; width: 100%; min-width: 0; padding: 6px; border: 0; border-radius: 4px; background: transparent; text-align: left; }
.task-open:hover { background: var(--hover); }
.task-avatar { display: grid; place-items: center; flex: 0 0 32px; width: 32px; height: 32px; border-radius: 6px; background: var(--blue-soft); color: var(--blue); font-size: 13px; line-height: 20px; }
.task-avatar svg { width: 18px; height: 18px; }
.task-avatar.research, .task-avatar.amber { background: var(--amber-soft); color: var(--amber); }
.task-avatar.archive, .task-avatar.blue { background: #e8f3ff; color: #2867a9; }
.task-copy { display: block; flex: 1; min-width: 0; }
.task-title, .task-summary, .task-request { display: block; overflow-wrap: anywhere; }
.task-title, .task-copy h3 { margin: 4px 0 0; color: var(--ink); font-size: 14px; line-height: 22px; font-weight: 500; }
.task-open:hover .task-title { color: var(--blue); }
.task-summary, .task-copy p { margin: 4px 0 0; color: var(--muted); font-size: 13px; line-height: 22px; }
.task-request { margin-top: 6px; color: var(--blue); font-size: 13px; line-height: 22px; }
.task-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; color: var(--subtle); font-size: 12px; line-height: 20px; }
.task-row > .text-link { flex-shrink: 0; }
.row-arrow { flex-shrink: 0; margin-left: auto; color: var(--subtle); }
.row-arrow svg { width: 16px; height: 16px; }
.task-open > .row-arrow { margin-top: 24px; }
.empty-state { padding: 24px 8px; color: var(--muted); font-size: 13px; line-height: 22px; text-align: center; }
.empty-state h3 { margin: 0 0 8px; color: var(--ink); font-size: 14px; font-weight: 500; }
.empty-state p { margin: 0; }
.empty-state svg { display: block; width: 24px; height: 24px; margin: 0 auto 8px; color: var(--subtle); }
.empty-state.compact { padding: 16px 8px; }

.category-tabs { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; margin: 0 0 12px; }
.filter-tab { min-height: 32px; padding: 4px 10px; border: 1px solid transparent; border-radius: 4px; background: var(--hover); color: var(--muted); font-size: 13px; line-height: 22px; }
.filter-tab:hover { background: #eceef1; color: var(--ink); }
.filter-tab.active, .filter-tab.is-active, .filter-tab[aria-selected="true"], .filter-tab[aria-pressed="true"] { border-color: #c7d7fe; background: var(--blue-soft); color: var(--blue); }
.filter-tab > span, .filter-tab .tab-count { margin-left: 6px; color: inherit; font-size: 12px; opacity: .8; }
.fragment-list { display: grid; }
.fragment-row { display: flex; align-items: center; gap: 10px; width: 100%; min-width: 0; padding: 12px 4px; border: 0; border-top: 1px solid var(--line-soft); background: transparent; text-align: left; }
.fragment-row:hover { background: var(--hover); }
.fragment-marker { flex: 0 0 6px; width: 6px; height: 6px; margin: 0 4px; border-radius: 2px; background: #c7cbd1; }
.fragment-copy { flex: 1; min-width: 0; }
.fragment-title { display: block; font-size: 14px; line-height: 22px; font-weight: 400; }
.fragment-source, .fragment-meta, .fragment-copy small { display: block; margin-top: 4px; color: var(--subtle); font-size: 12px; line-height: 20px; }
.fragment-row > .icon, .fragment-row > svg:last-child { width: 16px; height: 16px; color: var(--subtle); }
.processed-section { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.processed-section summary { color: var(--muted); font-size: 13px; cursor: pointer; }
.processed-item { display: flex; align-items: center; gap: 8px; width: 100%; margin-top: 8px; padding: 8px 12px; border: 0; border-radius: 4px; background: var(--hover); font-size: 13px; text-align: left; }
.processed-item:hover { background: #eceef1; }
.processed-item span { flex: 1; }
.processed-item svg { width: 16px; height: 16px; color: var(--success); }

.timeline { margin-top: 4px; }
.timeline-item { position: relative; display: grid; grid-template-columns: 48px 8px minmax(0, 1fr); gap: 12px; min-height: 72px; }
.timeline-item::after { content: ''; position: absolute; left: 64px; top: 12px; bottom: 0; width: 1px; background: var(--line); }
.timeline-item:last-child { min-height: 40px; }
.timeline-item:last-child::after { display: none; }
.time-label { color: var(--muted); font-size: 12px; line-height: 20px; font-variant-numeric: tabular-nums; }
.time-label small { display: block; color: var(--subtle); font-size: 11px; line-height: 18px; }
.timeline-dot { position: relative; z-index: 1; width: 8px; height: 8px; margin-top: 6px; border: 1px solid #8baaf5; border-radius: 50%; background: var(--blue); }
.timeline-item.plan .timeline-dot { background: #fff; }
.time-content { min-width: 0; padding-bottom: 16px; }
.time-content h3, .time-content strong { display: block; margin: 0; color: var(--ink); font-size: 14px; line-height: 22px; font-weight: 400; }
.time-content p, .time-content small, .time-detail { display: block; margin: 4px 0 0; color: var(--subtle); font-size: 12px; line-height: 20px; }
.timeline-item.free { min-height: 64px; }
.timeline-item.free::after { width: 0; background: transparent; border-left: 1px dashed var(--line); }
.timeline-item.free .timeline-dot { border-color: var(--disabled); background: #fff; }
.timeline-item.free .time-content { margin: -2px 0 12px; padding: 8px 12px; border-radius: 4px; background: var(--hover); }
.timeline-item.free .time-content h3 { color: var(--muted); font-size: 13px; }
.free-label { display: none; }
.timeline-legend { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--line-soft); color: var(--subtle); font-size: 12px; }
.legend-dot { display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: var(--blue); }
.legend-dot.plan { border: 1px solid #8baaf5; background: #fff; }
.legend-dot.free { border: 1px solid var(--disabled); background: #fff; }
.habit-progress { margin: 0; color: var(--muted); font-size: 13px; line-height: 24px; }
.habit-progress strong { color: var(--blue); font-size: 16px; font-weight: 500; }
.habit-progress-track { height: 3px; margin: 0 0 12px; overflow: hidden; border-radius: 2px; background: var(--line-soft); }
.habit-progress-track > span { display: block; height: 100%; background: var(--blue); transition: width .2s; }
.habit-list { display: grid; }
.habit-row { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 0; border-top: 1px solid var(--line-soft); cursor: pointer; }
.habit-row:first-child { border-top: 0; }
.habit-row input { margin: 0; }
.habit-checkbox { display: none; }
.habit-row > span:last-child { display: flex; align-items: center; justify-content: space-between; flex: 1; flex-wrap: wrap; gap: 2px 8px; min-width: 0; }
.habit-row strong { font-size: 14px; line-height: 22px; font-weight: 400; }
.habit-row small { color: var(--subtle); font-size: 12px; line-height: 20px; }
.habit-row.is-complete strong, .habit-row.done .habit-title { color: var(--subtle); text-decoration: line-through; text-decoration-color: var(--disabled); }

.stats-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { position: relative; min-width: 0; padding: 16px 20px; border: 1px solid var(--line); border-radius: 6px; background: #fff; text-align: left; }
.stat-label { color: var(--muted); font-size: 13px; line-height: 22px; }
.stat-value { display: block; margin: 4px 0; color: var(--ink); font-size: 28px; line-height: 36px; font-weight: 600; font-variant-numeric: tabular-nums; }
.stat-value small { margin-left: 6px; color: var(--subtle); font-size: 12px; font-weight: 400; }
.stat-note, .stat-card > p { margin: 0; color: var(--muted); font-size: 12px; line-height: 20px; }
.stat-card > p svg { width: 14px; height: 14px; margin-left: 4px; }
.stat-card > svg, .stat-icon { position: absolute; top: 20px; right: 20px; color: var(--subtle); }
.stat-filter:hover { background: var(--hover); }
.stat-filter.is-selected { border-color: #8baaf5; background: var(--blue-tint); }
.asset-scope-note, .asset-note, .asset-filter-label { color: var(--muted); font-size: 12px; line-height: 20px; }
.asset-scope-note { white-space: nowrap; }
.asset-toolbar { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 8px; }
.asset-toolbar .category-tabs { margin-bottom: 0; }
.asset-toolbar .form-field { margin: 0; }
.asset-search { display: flex; align-items: center; gap: 8px; width: 200px; max-width: 100%; min-height: 32px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 4px; background: #fff; }
.asset-search:focus-within { border-color: var(--blue); }
.asset-search svg { width: 16px; height: 16px; color: var(--subtle); }
.asset-search input { width: 100%; padding: 0; border: 0; background: transparent; color: var(--ink); font-size: 13px; line-height: 22px; }
.asset-search input:focus-visible { outline: none; }
.asset-list { margin-top: 0; }
.asset-table-head, .asset-list-header, .asset-row { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .9fr) minmax(0, 1fr) 40px; gap: 16px; }
.asset-table-head, .asset-list-header { padding: 10px 8px; border-bottom: 1px solid var(--line); background: var(--hover); color: var(--muted); font-size: 12px; line-height: 20px; }
.asset-row { align-items: center; min-width: 0; padding: 16px 8px; border-bottom: 1px solid var(--line-soft); }
.asset-row:last-child { border-bottom: 0; }
.asset-row:hover { background: #fafbfc; }
.asset-name-cell, .asset-identity { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
.asset-name-cell > div { min-width: 0; }
.asset-icon { display: grid; place-items: center; flex: 0 0 32px; width: 32px; height: 32px; border-radius: 6px; background: var(--blue-soft); color: var(--blue); font-size: 13px; }
.asset-icon svg { width: 18px; height: 18px; }
.asset-icon.agent { color: #6c4cc0; background: #f0ebff; }
.asset-icon.material { color: #2867a9; background: #e8f3ff; }
.asset-icon.method { color: #1d864a; background: var(--success-soft); }
.asset-icon.physical { color: var(--amber); background: var(--amber-soft); }
.asset-name { display: block; min-width: 0; padding: 0; border: 0; background: transparent; color: var(--ink); font-size: 14px; line-height: 22px; font-weight: 500; text-align: left; }
.asset-name:hover { color: var(--blue); }
.asset-name h3, .asset-name strong { display: block; margin: 0; font-size: 14px; font-weight: 500; }
.asset-name-cell p, .asset-name small { margin: 4px 0; color: var(--muted); font-size: 13px; line-height: 22px; overflow-wrap: anywhere; }
.asset-category, .asset-state small { display: block; margin-top: 4px; color: var(--subtle); font-size: 12px; line-height: 20px; }
.support-links { display: grid; gap: 4px; min-width: 0; }
.support-link { padding: 0; border: 0; background: transparent; color: var(--blue); font-size: 13px; line-height: 22px; text-align: left; overflow-wrap: anywhere; }
.support-more { color: var(--subtle); font-size: 12px; line-height: 20px; }
.asset-row-action { display: flex; justify-content: flex-end; }
.active-filter { padding: 4px 0 12px; color: var(--muted); font-size: 13px; }
.asset-note { margin: 16px 0 0; }
.asset-note svg { width: 16px; height: 16px; margin-right: 4px; }

dialog { width: min(600px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); margin: auto; padding: 0; overflow: auto; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); box-shadow: 0 8px 32px #1f232924; }
dialog::backdrop { background: #1f232966; }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px 24px 16px; border-bottom: 1px solid var(--line-soft); }
.modal-header h2 { margin: 0; color: var(--ink); font: 600 18px/28px -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif; }
.modal-header .section-kicker { margin-bottom: 4px; }
.modal-header .icon-button { margin-top: -2px; }
.modal-body { padding: 20px 24px; }
.modal-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; padding: 16px 24px 20px; border-top: 1px solid var(--line-soft); }
.modal-actions .modal-note { flex: 1; color: var(--muted); font-size: 12px; }
.modal-intro, .detail-description { margin: 0 0 16px; color: var(--muted); font-size: 14px; line-height: 22px; }
.detail-section { margin-bottom: 20px; font-size: 14px; line-height: 24px; }
.detail-section:last-child { margin-bottom: 0; }
.detail-section h3 { margin: 0 0 8px; color: var(--ink); font-size: 14px; line-height: 22px; font-weight: 500; }
.detail-section p { margin: 0 0 8px; }
.detail-section blockquote, .source-excerpt { margin: 0 0 20px; padding: 12px 16px; border-left: 3px solid #c7cbd1; border-radius: 0 4px 4px 0; background: var(--hover); color: var(--muted); font-size: 14px; line-height: 24px; }
.detail-summary, .detail-callout { margin-bottom: 20px; padding: 12px 16px; border-radius: 6px; background: var(--blue-tint); color: var(--ink); }
.detail-summary > span { color: var(--muted); font-size: 12px; line-height: 20px; }
.detail-summary p { margin: 4px 0 0; color: var(--ink); font-size: 14px; line-height: 24px; }
.detail-meta, .inspection-summary { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; margin: 8px 0 16px; color: var(--muted); font-size: 13px; line-height: 22px; }
.detail-back { max-width: calc(100% - 48px); margin: 12px 24px 0; font-size: 13px; }
.related-list { display: grid; gap: 8px; }
.related-list button { display: flex; align-items: center; gap: 12px; width: 100%; min-width: 0; padding: 10px 12px; border: 1px solid var(--line-soft); border-radius: 4px; background: #fff; color: var(--ink); text-align: left; }
.related-list button:hover { background: var(--hover); }
.related-list button > span { flex: 1; min-width: 0; }
.related-list svg { width: 16px; height: 16px; color: var(--subtle); }
.related-item strong { display: block; font-size: 14px; line-height: 22px; font-weight: 500; }
.related-item small { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; line-height: 20px; }
.related-list button > .asset-icon { flex: 0 0 32px; }
.related-list button > .related-action-dot { flex: 0 0 6px; width: 6px; height: 6px; border-radius: 50%; background: var(--blue); }
.form-field { display: grid; gap: 6px; margin-bottom: 16px; color: var(--ink); font-size: 14px; line-height: 22px; }
.form-field input, .form-field textarea, .form-field select, .search-input { width: 100%; min-height: 32px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 4px; background: #fff; color: var(--ink); font-size: 14px; line-height: 20px; }
.form-field input:hover, .form-field textarea:hover, .form-field select:hover { border-color: #8f959e; }
.form-field input:focus, .form-field textarea:focus, .form-field select:focus { border-color: var(--blue); }
.form-field textarea { min-height: 96px; resize: vertical; line-height: 22px; }
.form-field input:disabled, .form-field textarea:disabled, .form-field select:disabled { border-color: var(--line-soft); background: var(--hover); color: var(--disabled); }
.form-field small, .field-help { margin: 4px 0 0; color: var(--muted); font-size: 12px; line-height: 20px; }
.form-options, .choice-list { display: grid; gap: 8px; }
.choice-option, .radio-option { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 4px; background: #fff; font-size: 14px; line-height: 22px; cursor: pointer; }
.choice-option input, .radio-option input { margin: 3px 0 0; }
.choice-option:has(input:checked), .radio-option:has(input:checked) { border-color: #8baaf5; background: var(--blue-tint); }
.form-error { color: var(--red); font-size: 13px; line-height: 22px; }
.search-dialog { width: min(640px, calc(100vw - 32px)); }
.search-field { display: flex; align-items: center; gap: 8px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 4px; background: #fff; }
.search-field:focus-within { border-color: var(--blue); }
.search-field > svg { color: var(--subtle); }
.search-field input { width: 100%; min-height: 24px; padding: 0; border: 0; background: transparent; color: var(--ink); font-size: 14px; line-height: 24px; }
.search-field input:focus-visible { outline: none; }
.search-results { display: grid; gap: 0; margin-top: 12px; }
.search-result { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 8px; border: 0; border-bottom: 1px solid var(--line-soft); background: #fff; color: var(--ink); text-align: left; }
.search-result:hover { background: var(--hover); }
.search-result > span { flex: 1; min-width: 0; }
.search-result strong { display: block; margin-top: 2px; font-size: 14px; line-height: 22px; font-weight: 400; }
.search-result small, .search-result-count { color: var(--subtle); font-size: 12px; line-height: 20px; }
.search-hint { padding: 24px 8px; color: var(--subtle); font-size: 14px; text-align: center; }
.toast { position: fixed; bottom: 24px; left: calc(50% + 104px); z-index: 80; width: max-content; max-width: min(560px, calc(100vw - 32px)); padding: 10px 16px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink); box-shadow: 0 4px 16px #1f23291f; font-size: 14px; line-height: 22px; opacity: 0; pointer-events: none; transform: translate(-50%, 12px); transition: opacity .15s, transform .15s; }
.toast.is-visible, .toast.visible, .toast.show { opacity: 1; transform: translate(-50%, 0); }

.codex-source-head, .codex-source-head > div, .codex-transcript-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.codex-source-head > div { justify-content: flex-start; flex-wrap: wrap; gap: 4px 12px; }
.codex-source-head strong { color: var(--ink); font-size: 14px; line-height: 22px; font-weight: 500; }
.codex-source-head .button, .codex-transcript-head .button { font-size: 13px; }
.codex-connection { color: var(--muted); font-size: 12px; line-height: 20px; }
.codex-connection.connected { color: var(--success); }
.codex-connection.disconnected { color: var(--amber); }
.codex-source-note { margin: 6px 0 12px; color: var(--muted); font-size: 13px; line-height: 22px; overflow-wrap: anywhere; }
.codex-connection-warning { margin: 12px 0; padding: 10px 12px; border: 1px solid #f8d8a1; border-radius: 4px; background: var(--amber-soft); color: var(--amber); font-size: 13px; line-height: 22px; overflow-wrap: anywhere; }
.codex-empty { padding: 12px 0 16px; color: var(--muted); font-size: 14px; line-height: 22px; }
.codex-empty p { margin: 0 0 4px; }
.codex-empty > span { color: var(--subtle); font-size: 12px; line-height: 20px; }
.codex-avatar { background: var(--blue-soft); color: var(--blue); font-family: inherit; }
.codex-stale-label { color: var(--amber); }
.codex-other-sessions, .codex-demo-section { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.codex-other-sessions > summary, .codex-demo-section > summary, .codex-pair-section > summary { width: fit-content; color: var(--muted); font-size: 13px; line-height: 22px; cursor: pointer; }
.codex-other-sessions > summary span, .codex-demo-section > summary span { margin-left: 4px; color: var(--subtle); }
.codex-demo-section { margin-top: 16px; }
.codex-demo-section > .field-help { margin: 8px 0; }
.codex-session-dialog { width: min(760px, calc(100vw - 32px)); }
.codex-session-dialog .modal-header h2 { font-size: 18px; }
.codex-session-dialog .modal-body { padding-top: 16px; }
.codex-request-summary { color: var(--ink); font-size: 14px; line-height: 24px; white-space: pre-wrap; overflow-wrap: anywhere; }
.codex-transcript-head h3 { margin: 0; }
.codex-transcript { max-height: 360px; overflow-y: auto; overscroll-behavior: contain; padding: 12px 0; scrollbar-width: thin; }
.codex-message { margin: 0 0 12px; padding: 12px 16px; border: 1px solid var(--line-soft); border-radius: 6px; background: var(--hover); }
.codex-message.user { margin-left: 24px; border-color: #dce5fa; background: var(--blue-tint); }
.codex-message > span { color: var(--subtle); font-size: 12px; line-height: 20px; }
.codex-message > p { margin: 4px 0 0; color: var(--ink); font-size: 14px; line-height: 24px; white-space: pre-wrap; overflow-wrap: anywhere; }
.codex-question { min-width: 0; margin: 16px 0 20px; padding: 0; border: 0; }
.codex-question > legend { margin-bottom: 8px; color: var(--ink); font-size: 14px; line-height: 22px; overflow-wrap: anywhere; }
.codex-question .choice-option { margin-top: 8px; }
.codex-question .choice-option small { display: block; color: var(--muted); font-size: 12px; }
.codex-question .form-field { margin-top: 12px; }
.codex-reply-actions { display: flex; justify-content: flex-end; gap: 8px; }
.codex-delivery, .codex-pair-message { margin: 12px 0 0; color: var(--muted); font-size: 13px; line-height: 22px; overflow-wrap: anywhere; }
.codex-delivery.unknown, .codex-pair-message { color: var(--amber); }
.codex-pair-section { margin: 16px 0; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.codex-pair-section .form-field { margin-top: 12px; }
#codex-delivery-status > .button { margin-top: 8px; font-size: 13px; }

.session-page-intro { max-width: 720px; }
.sessions-page-badge { flex-shrink: 0; padding: 1px 8px; border: 1px solid var(--line); border-radius: 4px; background: #fff; color: var(--muted); font-size: 12px; line-height: 20px; white-space: nowrap; }
.sessions-panel { max-width: none; padding: 0; border: 0; border-radius: 0; }
.sessions-panel .codex-source-head strong { font-size: 16px; line-height: 24px; font-weight: 500; }
.sessions-panel .codex-source-note { margin-bottom: 12px; }
.sessions-stats { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 32px; margin-bottom: 20px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.sessions-stat { display: flex; align-items: baseline; gap: 8px; color: var(--muted); font-size: 13px; line-height: 22px; }
.sessions-stat strong { color: var(--ink); font-size: 24px; line-height: 32px; font-weight: 600; font-variant-numeric: tabular-nums; }
.sessions-toolbar { display: flex; align-items: end; flex-wrap: wrap; gap: 12px 16px; margin-bottom: 12px; }
.sessions-search { display: grid; flex: 1 1 240px; gap: 4px; color: var(--muted); font-size: 12px; line-height: 20px; }
.sessions-search input { width: 100%; min-height: 32px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 4px; background: #fff; color: var(--ink); font-size: 14px; line-height: 20px; }
.sessions-search input:hover, .sessions-filters select:hover { border-color: var(--subtle); }
.sessions-search input:focus, .sessions-filters select:focus { border-color: var(--blue); }
.sessions-filters { display: grid; gap: 4px; color: var(--muted); font-size: 12px; line-height: 20px; }
.sessions-filters label { display: grid; gap: 4px; }
.sessions-filters select { width: 100%; min-width: 144px; min-height: 32px; padding: 5px 28px 5px 10px; border: 1px solid var(--line); border-radius: 4px; background: #fff; color: var(--ink); font-size: 14px; line-height: 20px; }
.sessions-candidates { display: flex; align-items: center; gap: 8px; min-height: 32px; color: var(--muted); font-size: 13px; line-height: 22px; }
.sessions-summary { margin: 0; padding: 0 0 12px; color: var(--subtle); font-size: 12px; line-height: 20px; overflow-wrap: anywhere; }
.sessions-list { border-top: 1px solid var(--line); }
.sessions-row { padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.sessions-row .task-open { padding: 8px; }
.sessions-row .task-open > .row-arrow { align-self: center; margin-top: 0; }
.sessions-row .task-title { margin: 0; font-size: 14px; line-height: 22px; font-weight: 500; }
.sessions-row .task-summary { display: -webkit-box; margin-top: 4px; overflow: hidden; color: var(--muted); font-size: 13px; line-height: 22px; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.sessions-row-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.sessions-row-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; margin-top: 4px; color: var(--subtle); font-size: 12px; line-height: 20px; }
.sessions-row-time { color: var(--subtle); font-size: 12px; line-height: 20px; font-weight: 400; white-space: nowrap; }
.sessions-diagnostics { margin: 4px 8px 0 52px; color: var(--subtle); font-size: 12px; line-height: 20px; }
.sessions-diagnostics summary { width: fit-content; padding: 2px 0; cursor: pointer; }
.sessions-diagnostics dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 24px; margin: 8px 0 0; padding: 12px 16px; border-radius: 4px; background: var(--hover); }
.sessions-diagnostics dl > div { display: grid; grid-template-columns: 80px minmax(0, 1fr); gap: 8px; }
.sessions-diagnostics dl > div:first-child { grid-column: 1 / -1; }
.sessions-diagnostics dt { color: var(--subtle); }
.sessions-diagnostics dd { margin: 0; color: var(--muted); overflow-wrap: anywhere; }
.sessions-diagnostics code { color: var(--muted); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; overflow-wrap: anywhere; }
.sessions-empty { padding: 40px 16px; color: var(--muted); font-size: 14px; line-height: 22px; text-align: center; }
.sessions-empty p { margin: 0 0 12px; }
.calendar-toolbar, .calendar-date-controls { display: flex; align-items: center; gap: 4px; min-width: 0; }
.calendar-toolbar { justify-content: space-between; flex-wrap: wrap; margin-bottom: 8px; }
.calendar-date-controls { flex-wrap: wrap; }
.calendar-date-field { flex: 0 1 144px; min-width: 0; }
.calendar-date-field input, .calendar-select-label select { width: 100%; min-height: 32px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 4px; background: #fff; color: var(--ink); }
.calendar-select-label { display: block; max-width: 100%; }
.calendar-select-label select { overflow: hidden; text-overflow: ellipsis; }
.calendar-sync-status { min-height: 20px; margin: 8px 0; color: var(--subtle); font-size: 12px; line-height: 20px; overflow-wrap: anywhere; }
.calendar-sync-status.is-warning, .calendar-form-message { color: var(--amber); }
.calendar-events { border-top: 1px solid var(--line-soft); min-height: 100px; }
.calendar-event { display: flex; align-items: center; gap: 12px; width: 100%; min-width: 0; padding: 12px 4px; border: 0; border-bottom: 1px solid var(--line-soft); background: transparent; text-align: left; }
.calendar-event:hover { background: var(--hover); }
.calendar-event-time { flex: 0 0 88px; min-width: 0; color: var(--blue); font-size: 12px; line-height: 20px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.calendar-event-time small { display: block; color: var(--subtle); font-size: 11px; }
.calendar-event.is-past .calendar-event-time { color: var(--muted); }
.calendar-event-copy { display: grid; flex: 1; min-width: 0; gap: 2px; overflow-wrap: anywhere; }
.calendar-event-copy strong { color: var(--ink); font-size: 14px; line-height: 22px; font-weight: 500; }
.calendar-event-copy > span { color: var(--subtle); font-size: 12px; line-height: 20px; }
.calendar-event-arrow { flex-shrink: 0; color: var(--subtle); font-size: 20px; }
.calendar-empty { padding: 24px 8px; color: var(--muted); text-align: center; }
.calendar-empty p { margin: 0 0 6px; font-size: 13px; }
.calendar-empty > span { color: var(--subtle); font-size: 12px; }
.calendar-empty .button { margin-top: 8px; }
.calendar-panel-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; }
.calendar-panel-actions > span { color: var(--subtle); font-size: 11px; }
.calendar-dialog { max-width: min(580px, calc(100vw - 32px)); }
.calendar-all-day { display: flex; align-items: center; gap: 8px; margin-top: 16px; }
.calendar-form-times { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.calendar-form-times .form-field { min-width: 0; }
.calendar-form-times input { width: 100%; max-width: 100%; }
.calendar-form-message { margin: 12px 0 0; font-size: 13px; line-height: 22px; overflow-wrap: anywhere; }
.calendar-form-message:empty { display: none; }
.calendar-detail { display: grid; gap: 16px; margin: 0; }
.calendar-detail > div { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; }
.calendar-detail dt { color: var(--subtle); }
.calendar-detail dd { margin: 0; overflow-wrap: anywhere; }
.calendar-description { white-space: pre-wrap; }
.calendar-danger { color: var(--red); border-color: #f3c3c1; background: #fff; }
.calendar-danger:hover { color: var(--red); background: var(--red-soft); }
.calendar-uncertain-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.fragment-title, .source-excerpt, .direction-title, .direction-content p, .direction-meta, .detail-section, .detail-summary, .modal-header h2, .related-item strong, .related-item small { overflow-wrap: anywhere; }

@media (min-width: 1600px) {
  .main-shell { padding-right: 40px; padding-left: 40px; }
}
@media (max-width: 1220px) {
  .main-shell { padding-right: 24px; padding-left: 24px; }
  .workspace-grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px; }
  .primary-stack, .secondary-stack { gap: 16px; }
  .panel { padding: 16px; }
  .sessions-panel { padding: 0; }
  .asset-table-head, .asset-list-header, .asset-row { gap: 12px; }
}
@media (max-width: 1000px) {
  .sidebar { width: 72px; align-items: center; padding-right: 8px; padding-left: 8px; }
  .brand { padding: 0; }
  .brand > span:not(.brand-mark), .brand small, .sidebar-section-label, .sidebar-note, .profile-mini, .prototype-note { display: none; }
  .main-nav { width: 100%; margin-top: 24px; }
  .nav-link { flex-direction: column; justify-content: center; gap: 2px; min-height: 60px; padding: 8px 4px; font-size: 12px; line-height: 20px; }
  .nav-link > span { font-size: 12px; }
  .nav-count { margin: 0; min-width: 16px; padding: 0 4px; font-size: 11px; line-height: 16px; }
  .sidebar-footer .button { flex-direction: column; gap: 2px; padding: 8px 4px; font-size: 11px; }
  .main-shell { margin-left: 72px; }
  .toast { left: calc(50% + 36px); }
  .asset-table-head, .asset-list-header, .asset-row { grid-template-columns: minmax(0, 1.2fr) minmax(0, .85fr) minmax(0, 1fr) 32px; }
}
@media (max-width: 840px) {
  .workspace-grid { grid-template-columns: minmax(0, 1fr); }
  .secondary-stack { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .direction-card { gap: 16px; }
}
@media (max-width: 760px) {
  .sidebar { position: sticky; top: 0; z-index: 30; width: 100%; height: auto; min-height: 56px; padding: 8px 16px; flex-direction: row; justify-content: space-between; gap: 12px; border-right: 0; border-bottom: 1px solid var(--line); background: #f7f8fa; }
  .brand { gap: 8px; font-size: 14px; line-height: 22px; }
  .brand > span:not(.brand-mark) { display: block; }
  .brand small { display: none; }
  .main-nav { display: flex; flex-shrink: 0; gap: 4px; width: auto; margin: 0; }
  .nav-link { flex-direction: row; gap: 6px; min-height: 36px; width: auto; padding: 7px 10px; font-size: 13px; line-height: 22px; }
  .nav-link > span { font-size: 13px; }
  .nav-link svg { width: 16px; height: 16px; }
  .nav-count, .sidebar-footer { display: none; }
  .main-shell { margin-left: 0; padding: 0 16px 24px; }
  .topbar { gap: 8px; min-height: 56px; }
  .topbar-actions { gap: 8px; }
  .search-trigger { flex: 1; font-size: 13px; }
  .search-trigger kbd { display: none; }
  .demo-badge { padding: 0; background: transparent; font-size: 12px; }
  .page-head { align-items: flex-start; gap: 12px; margin: 20px 0; }
  .page-title { font-size: 22px; line-height: 30px; }
  .page-date, .date-chip { max-width: 96px; font-size: 12px; white-space: normal; }
  .direction-card { padding: 16px; }
  .direction-title { font-size: 18px; line-height: 28px; }
  .panel-head { gap: 12px; }
  .task-open { gap: 10px; padding-right: 4px; padding-left: 4px; }
  .stats-row { gap: 8px; margin-bottom: 20px; }
  .stat-card { padding: 12px; }
  .stat-label { font-size: 12px; }
  .stat-value { font-size: 24px; line-height: 32px; }
  .stat-card > svg, .stat-icon { display: none; }
  .asset-table-head, .asset-list-header { display: none; }
  .asset-row { grid-template-columns: minmax(0, 1fr) 112px; gap: 12px; padding: 16px 0; }
  .asset-state { text-align: right; }
  .asset-row .support-links { grid-column: 1; }
  .asset-row-action { justify-self: end; }
  .asset-toolbar { gap: 8px; }
  .asset-search { width: 100%; }
  .asset-scope-note { max-width: 112px; white-space: normal; text-align: right; }
  .toast { left: 50%; }
  .page-footer .mobile-reset { display: inline-flex; }
  .sessions-stats { gap: 12px 24px; padding: 12px 0; margin-bottom: 16px; }
  .sessions-stat { gap: 6px; font-size: 12px; }
  .sessions-stat strong { font-size: 22px; line-height: 30px; }
  .sessions-toolbar { gap: 12px; }
  .sessions-search { flex-basis: 100%; }
  .sessions-filters { flex: 1 1 136px; }
  .sessions-filters select { min-width: 0; }
  .sessions-row-head { flex-wrap: wrap; gap: 4px 8px; }
  .sessions-diagnostics { margin-left: 44px; margin-right: 4px; }
  .sessions-diagnostics dl { grid-template-columns: minmax(0, 1fr); padding: 12px; }
  .sessions-diagnostics dl > div { grid-template-columns: 72px minmax(0, 1fr); }
}
@media (max-width: 480px) {
  .cloud-account-button { max-width: 168px; }
  .cloud-device { align-items: stretch; flex-direction: column; gap: 10px; }
  .cloud-device > .button { align-self: flex-start; }
  .codex-source-nodes { grid-template-columns: minmax(0, 1fr); }
  .calendar-form-times { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .calendar-event { gap: 8px; }
  .calendar-event-time { flex-basis: 76px; }
  .sidebar { padding-right: 12px; padding-left: 12px; gap: 8px; }
  .brand > span:not(.brand-mark) { display: none; }
  .main-nav { gap: 2px; }
  .nav-link { padding-right: 10px; padding-left: 10px; }
  .main-shell { padding-right: 16px; padding-left: 16px; }
  .topbar { flex-wrap: wrap; gap: 8px; padding: 8px 0; }
  .search-trigger { flex-basis: 100%; order: 2; }
  .topbar-actions { justify-content: space-between; width: 100%; }
  .page-intro { font-size: 13px; }
  .page-head { gap: 8px; }
  .direction-card { display: block; }
  .direction-card > .button { margin-top: 12px; }
  .direction-meta { gap: 4px 12px; }
  .secondary-stack { grid-template-columns: minmax(0, 1fr); }
  .task-row > .text-link { font-size: 12px; }
  .task-avatar { flex-basis: 28px; width: 28px; height: 28px; }
  .category-tabs { gap: 4px; }
  .filter-tab { padding-right: 8px; padding-left: 8px; }
  .habit-row > span:last-child { display: block; }
  .habit-row small { display: block; margin-top: 2px; }
  .stat-card { padding: 12px 10px; }
  .stat-value { font-size: 22px; }
  .stat-card > p { font-size: 12px; }
  .asset-row { grid-template-columns: minmax(0, 1fr) 88px; gap: 8px; }
  .asset-name-cell { gap: 8px; }
  .asset-icon { flex-basis: 28px; width: 28px; height: 28px; }
  .asset-state .status-pill { white-space: normal; }
  .modal-header, .modal-body { padding: 16px; }
  .modal-actions { padding: 12px 16px 16px; }
  .modal-actions > .button { flex: 1; }
  .modal-actions .modal-note { flex-basis: 100%; }
  .modal-header h2, .codex-session-dialog .modal-header h2 { font-size: 18px; }
  .detail-back { max-width: calc(100% - 32px); margin-left: 16px; margin-right: 16px; }
  .sessions-candidates { width: 100%; }
  .sessions-diagnostics { margin-left: 4px; }
  .sessions-page-badge { padding-right: 6px; padding-left: 6px; }
  .codex-source-head { gap: 8px; }
  .codex-transcript { max-height: 300px; }
  .codex-message.user { margin-left: 12px; }
  .codex-reply-actions > .button { width: 100%; }
}
@media (pointer: coarse), (max-width: 760px) {
  .calendar-date-field input, .calendar-select-label select { min-height: 40px; font-size: 16px; }
  .form-field input, .form-field textarea, .form-field select, .search-field input, .asset-search input, .sessions-search input, .sessions-filters select { min-height: 40px; font-size: 16px; }
  .button, .icon-button, .filter-tab { min-height: 40px; }
  .choice-option, .radio-option { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
