@font-face {
  font-family: "Alibaba PuHuiTi";
  src: url("/fonts/Alibaba-PuHuiTi-Regular.woff") format("woff");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

/* Shared structure uses the existing theme tokens in light, dark and system. */
.step-evidence { margin: 20px 0; min-width: 0; }
.step-evidence > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.step-evidence h3 { margin: 0; font-size: 16px; font-weight: 700; color: var(--text); }
.step-evidence h3 span { margin-left: 6px; color: var(--text-soft); font-size: 14px; font-weight: 400; }
.step-evidence-empty, .step-evidence-status { color: var(--text-soft); font-size: 14px; line-height: 1.6; }
.step-evidence-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.step-evidence-thumb { min-width: 0; padding: 0 0 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); text-align: left; overflow: hidden; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.step-evidence-thumb:hover { border-color: var(--primary); box-shadow: var(--shadow-soft); background: var(--surface); }
.step-evidence-thumb:active { border-color: var(--primary); box-shadow: none; }
.step-evidence-preview { display: grid; place-items: center; aspect-ratio: 16 / 9; background: var(--surface-soft); color: var(--text-soft); font-size: 14px; }
.step-evidence-preview img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; user-select: none; }
.step-evidence-thumb-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; justify-content: space-between; margin: 10px 12px 6px; }
.step-evidence-thumb-meta strong { font-size: 13px; font-weight: 700; }
.step-evidence-thumb-meta time { color: var(--text-soft); font-size: 13px; }
.step-evidence-caption { display: -webkit-box; margin: 0 12px; font-size: 14px; line-height: 1.6; overflow: hidden; overflow-wrap: anywhere; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.step-evidence .evidence-tool, .step-evidence-viewer .evidence-tool { flex-shrink: 0; min-width: 36px; min-height: 36px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: transparent; color: var(--text); cursor: pointer; font: inherit; font-size: 14px; }
.task-event .evidence-tool { display: inline-flex; align-items: center; margin-top: 8px; min-height: 32px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 8px; background: transparent; color: var(--primary); font: inherit; font-size: 14px; cursor: pointer; }
.task-event .evidence-tool:hover { background: var(--primary-soft); }
.task-event .evidence-tool:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.step-evidence .evidence-tool:hover:not(:disabled), .step-evidence-viewer .evidence-tool:hover:not(:disabled) { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }
.step-evidence .evidence-tool:active:not(:disabled), .step-evidence-viewer .evidence-tool:active:not(:disabled) { box-shadow: inset 0 0 0 1px var(--line-strong); }
.step-evidence-viewer .evidence-tool:disabled { cursor: default; opacity: .4; }
.step-evidence-thumb:focus-visible, .step-evidence .evidence-tool:focus-visible, .step-evidence-viewer .evidence-tool:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.step-evidence-viewer { width: min(1280px, calc(100vw - 48px)); max-width: none; max-height: calc(100dvh - 48px); margin: auto; padding: 0; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--text); box-shadow: var(--shadow); overflow: hidden; }
.step-evidence-viewer[open] { display: flex; flex-direction: column; }
.step-evidence-viewer::backdrop { background: rgba(12, 21, 34, .48); backdrop-filter: blur(7px); }
.step-evidence-viewer > header { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; padding: 14px 18px; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.step-evidence-viewer h2 { font-size: 16px; margin: 0; font-weight: 700; }
.step-evidence-viewer [data-evidence-counter] { font-size: 14px; color: var(--text-soft); }
.step-evidence-viewer time { margin-left: auto; color: var(--text-soft); font-size: 14px; }
.step-evidence-viewer .evidence-close { border-color: transparent; font-size: 24px; line-height: 1; }
.step-evidence-stage { position: relative; display: grid; align-items: center; justify-items: center; min-height: 160px; height: min(66dvh, 760px); margin: 16px; background: var(--surface-soft); border-radius: 8px; overflow: auto; }
.step-evidence-stage img { display: block; width: 100%; height: 100%; min-width: 0; min-height: 0; max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; }
.step-evidence-viewer.is-zoomed .step-evidence-stage { display: block; }
.step-evidence-viewer.is-zoomed .step-evidence-stage img { max-width: none; max-height: none; width: auto; height: auto; }
.step-evidence-loading, .step-evidence-load-error { position: absolute; padding: 16px; color: var(--text-soft); font-size: 15px; background: var(--surface); border-radius: 8px; }
.step-evidence-viewer:not([data-image-state="loading"]) .step-evidence-loading { display: none; }
.step-evidence-viewer:not([data-image-state="ready"]) .step-evidence-stage img { visibility: hidden; }
.step-evidence-load-error[hidden] { display: none; }
.step-evidence-load-error button { margin-left: 12px; }
.step-evidence-viewer > footer { display: flex; align-items: center; gap: 16px; padding: 0 18px 18px; flex-shrink: 0; }
.step-evidence-description { min-width: 0; flex: 1; }
.step-evidence-description strong { font-size: 13px; color: var(--text-soft); }
.step-evidence-description p { max-height: 5em; overflow-y: auto; margin: 4px 0 0; font-size: 15px; line-height: 1.6; overflow-wrap: anywhere; user-select: text; }
.step-evidence-viewer nav { display: flex; gap: 8px; }
@media (max-width: 600px) {
  .step-evidence-viewer { width: calc(100vw - 24px); max-height: calc(100dvh - 24px); border-radius: 12px; }
  .step-evidence-viewer > header { padding: 10px 12px; gap: 6px 10px; }
  .step-evidence-viewer time { order: 4; width: 100%; margin: 0; }
  .step-evidence-viewer .evidence-close { margin-left: auto; }
  .step-evidence-stage { margin: 10px; height: 48dvh; }
  .step-evidence-viewer > footer { flex-wrap: wrap; padding: 0 12px 12px; gap: 12px; }
  .step-evidence-description { flex-basis: 100%; }
  .step-evidence-viewer nav { margin-left: auto; }
}
@media (max-width: 420px) { .step-evidence-grid { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) { .step-evidence-thumb { transition: none; } }
@font-face {
  font-family: "Alibaba PuHuiTi";
  src: url("/fonts/Alibaba-PuHuiTi-Bold.woff") format("woff");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --canvas: #f2f5f9;
  --surface: #ffffff;
  --surface-soft: #f7f9fc;
  --surface-raised: rgba(255, 255, 255, .92);
  --text: #171b25;
  --text-soft: #657083;
  --text-faint: #8b95a5;
  --line: #dfe5ed;
  --line-strong: #cbd5e2;
  --primary: #4054d9;
  --primary-hover: #3446c1;
  --primary-soft: #edf0ff;
  --cyan-soft: #eaf8fb;
  --success: #138a63;
  --success-soft: #e8f7f1;
  --warning: #a86f14;
  --warning-soft: #fff6df;
  --danger: #c6404e;
  --danger-soft: #fff0f2;
  --shadow: 0 22px 60px rgba(30, 45, 74, .10);
  --shadow-soft: 0 10px 30px rgba(30, 45, 74, .07);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 11px;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #0f131b;
  --surface: #171c26;
  --surface-soft: #1d2430;
  --surface-raised: rgba(23, 28, 38, .94);
  --text: #f2f5fb;
  --text-soft: #aeb8c9;
  --text-faint: #7f8a9c;
  --line: #2c3544;
  --line-strong: #3b4658;
  --primary: #8191ff;
  --primary-hover: #91a0ff;
  --primary-soft: #252d54;
  --cyan-soft: #163238;
  --success: #62d6a8;
  --success-soft: #17372e;
  --warning: #efbd64;
  --warning-soft: #3b301c;
  --danger: #ff8994;
  --danger-soft: #412229;
  --shadow: 0 24px 68px rgba(0, 0, 0, .32);
  --shadow-soft: 0 12px 32px rgba(0, 0, 0, .22);
}

@media (prefers-color-scheme: dark) {
  html[data-theme="system"] {
    color-scheme: dark;
    --canvas: #0f131b;
    --surface: #171c26;
    --surface-soft: #1d2430;
    --surface-raised: rgba(23, 28, 38, .94);
    --text: #f2f5fb;
    --text-soft: #aeb8c9;
    --text-faint: #7f8a9c;
    --line: #2c3544;
    --line-strong: #3b4658;
    --primary: #8191ff;
    --primary-hover: #91a0ff;
    --primary-soft: #252d54;
    --cyan-soft: #163238;
    --success: #62d6a8;
    --success-soft: #17372e;
    --warning: #efbd64;
    --warning-soft: #3b301c;
    --danger: #ff8994;
    --danger-soft: #412229;
    --shadow: 0 24px 68px rgba(0, 0, 0, .32);
    --shadow-soft: 0 12px 32px rgba(0, 0, 0, .22);
  }
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
html { background: var(--canvas); }
body {
  margin: 0;
  color: var(--text);
  background: var(--canvas);
  font-family: "Alibaba PuHuiTi", "PingFang SC", "Microsoft YaHei UI", system-ui, sans-serif;
  line-height: 1.5;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body, button, a, img, svg { user-select: none; -webkit-user-drag: none; }
input, textarea, select, .task-event-detail, .task-result { user-select: text; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.brand { display: inline-flex; align-items: center; gap: 9px; width: max-content; font-size: 19px; font-weight: 700; }
.brand img { display: block; }
.brand b { margin-left: 3px; padding-left: 12px; border-left: 1px solid var(--line); color: var(--text-soft); font-size: 12px; font-weight: 400; }
.overline { margin: 0; color: var(--primary); font-size: 11px; font-weight: 700; letter-spacing: .08em; }

.auth-view { min-height: 100vh; min-height: 100dvh; }
.auth-panel { min-height: 100vh; min-height: 100dvh; padding: clamp(24px, 5vw, 64px); display: grid; place-items: center; background: var(--canvas); }
.auth-card { width: min(100%, 480px); padding: clamp(28px, 4vw, 46px); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface-raised); box-shadow: var(--shadow); backdrop-filter: blur(18px); }
.auth-card h2 { margin: 34px 0 30px; font-size: 34px; line-height: 1.2; letter-spacing: -.025em; }
.field-stack { display: grid; gap: 18px; }
.field { display: grid; gap: 8px; }
.field > span:first-child, .device-picker-label { color: var(--text-soft); font-size: 12px; font-weight: 700; }
input, textarea, select { width: 100%; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); outline: 0; color: var(--text); background: var(--surface); transition: border-color .18s ease, box-shadow .18s ease, background .18s ease; }
input, select { min-height: 52px; padding: 0 14px; }
textarea { padding: 14px; resize: vertical; line-height: 1.65; }
input::placeholder, textarea::placeholder { color: var(--text-faint); }
input:hover, textarea:hover, select:hover { border-color: color-mix(in srgb, var(--primary) 45%, var(--line-strong)); }
input:focus, textarea:focus, select:focus { border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 14%, transparent); }
.code-field { display: grid; grid-template-columns: 1fr auto; gap: 9px; }
.button { min-height: 44px; padding: 0 17px; border: 1px solid transparent; border-radius: 10px; cursor: pointer; font-size: 13px; font-weight: 700; transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease, opacity .18s ease; }
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:focus-visible, .icon-button:focus-visible, .sidebar-nav button:focus-visible, .portrait-section-tabs button:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary) 35%, transparent); outline-offset: 2px; }
.button:disabled { cursor: not-allowed; opacity: .5; }
.button.primary { color: #fff; background: #4054d9; box-shadow: 0 12px 24px rgba(64,84,217,.22); }
.button.primary:hover:not(:disabled) { background: #3446c1; }
.button.secondary { border-color: var(--line); background: var(--surface-soft); }
.button.secondary:hover:not(:disabled) { border-color: var(--line-strong); background: var(--surface); }
.button.soft { color: var(--primary); background: var(--primary-soft); }
.button.block { width: 100%; min-height: 52px; }
.inline-message, .global-message { padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; font-size: 12px; }
.inline-message { margin-bottom: 18px; }
.inline-message.error, .global-message.error { border-color: color-mix(in srgb, var(--danger) 25%, var(--line)); color: var(--danger); background: var(--danger-soft); }

.workspace { height: 100vh; height: 100dvh; overflow: hidden; }
.app-header { height: 68px; border-bottom: 1px solid var(--line); background: var(--surface-raised); backdrop-filter: blur(18px); }
.app-header-main { height: 100%; padding: 0 22px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
.header-context { display: grid; justify-items: center; line-height: 1.2; }
.header-context span { color: var(--text-faint); font-size: 10px; }
.header-context strong { margin-top: 4px; font-size: 14px; }
.account-actions { justify-self: end; display: flex; align-items: center; gap: 9px; }
.membership-chip { min-height: 40px; padding: 5px 12px; display: grid; justify-items: start; border: 1px solid color-mix(in srgb, var(--warning) 24%, var(--line)); border-radius: 10px; color: var(--warning); background: var(--warning-soft); cursor: pointer; }
.membership-chip span { font-size: 11px; font-weight: 700; }
.membership-chip small { color: var(--text-soft); font-size: 9px; }
.icon-button { width: 40px; height: 40px; padding: 0; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; }
.portrait-section-tabs { display: none; }
.app-frame { height: calc(100dvh - 68px); min-height: 0; display: grid; grid-template-columns: 232px minmax(0, 1fr); }
.app-sidebar { min-height: 0; padding: 20px 14px 16px; display: flex; flex-direction: column; justify-content: space-between; border-right: 1px solid var(--line); background: var(--surface); }
.sidebar-nav { display: grid; gap: 7px; }
.sidebar-nav button { min-height: 46px; padding: 0 12px; display: grid; grid-template-columns: 24px 1fr auto; align-items: center; gap: 10px; border: 0; border-radius: 11px; color: var(--text-soft); background: transparent; cursor: pointer; text-align: left; }
.sidebar-nav button:hover { color: var(--text); background: var(--surface-soft); }
.sidebar-nav button.active { color: var(--primary); background: var(--primary-soft); font-weight: 700; }
.sidebar-nav em { min-width: 20px; height: 20px; padding: 0 6px; display: grid; place-items: center; border-radius: 10px; color: var(--text-soft); background: var(--surface-soft); font-size: 9px; font-style: normal; }
.sidebar-nav button.active em { color: var(--primary); background: var(--surface); }
.sidebar-bottom { display: grid; gap: 10px; }
.sidebar-control-link, .sidebar-account { width: 100%; padding: 11px; display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); text-align: left; }
.sidebar-control-link:hover, .sidebar-account:hover { border-color: color-mix(in srgb, var(--primary) 35%, var(--line)); }
.sidebar-control-link span, .sidebar-account > span:nth-child(2) { min-width: 0; display: grid; }
.sidebar-control-link strong, .sidebar-account strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-control-link small, .sidebar-account small { margin-top: 2px; overflow: hidden; color: var(--text-faint); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-account { border-color: transparent; cursor: pointer; }
.avatar { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--primary); font-size: 10px; font-weight: 700; }
.app-content { min-width: 0; min-height: 0; overflow: auto; padding: 28px clamp(24px, 3.2vw, 52px) 52px; scrollbar-gutter: stable; }
.global-message { max-width: 1180px; margin: 0 auto 16px; }
.page { width: min(1180px, 100%); margin: 0 auto; }
.page-heading { margin-bottom: 22px; display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.page-heading h1, .task-composer-card h1 { margin: 7px 0 0; font-size: clamp(26px, 3vw, 38px); line-height: 1.18; letter-spacing: -.025em; }
.page-heading > div > p:last-child { margin: 9px 0 0; color: var(--text-soft); font-size: 13px; }
.overview-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(290px, .75fr); gap: 20px; }
.overview-primary, .overview-secondary { display: grid; align-content: start; gap: 20px; }
.task-composer-card, .section-card, .pricing-panel, .benefit-panel, .task-list-pane, .task-detail { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-soft); }
.task-composer-card { padding: clamp(22px, 3vw, 34px); }
.task-composer-card > header { display: flex; align-items: start; justify-content: space-between; gap: 16px; }
.task-composer-card form { margin-top: 26px; display: grid; gap: 12px; }
.task-composer-card select { max-width: 360px; }
.prompt-field textarea { min-height: 148px; }
.composer-actions { display: flex; align-items: center; justify-content: flex-end; gap: 16px; }
.composer-actions .button { min-width: 128px; }
.status-pill { min-height: 28px; padding: 5px 10px; display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 14px; font-size: 10px; font-weight: 700; }
.status-pill.neutral { color: var(--text-soft); background: var(--surface-soft); }
.status-pill.online { border-color: color-mix(in srgb, var(--success) 22%, var(--line)); color: var(--success); background: var(--success-soft); }
.status-pill.attention { border-color: color-mix(in srgb, var(--warning) 24%, var(--line)); color: var(--warning); background: var(--warning-soft); }
.status-pill.working { border-color: color-mix(in srgb, var(--primary) 22%, var(--line)); color: var(--primary); background: var(--primary-soft); }
.status-pill.danger { border-color: color-mix(in srgb, var(--danger) 22%, var(--line)); color: var(--danger); background: var(--danger-soft); }
.section-card { padding: 22px; }
.section-card-header { margin-bottom: 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.section-card-header h2 { margin: 5px 0 0; font-size: 18px; }
.text-button { padding: 7px 0; border: 0; color: var(--primary); background: transparent; cursor: pointer; font-size: 11px; font-weight: 700; }
.compact-task-list, .quick-device-list { display: grid; gap: 9px; }
.compact-task-item, .quick-device-item { width: 100%; min-height: 50px; padding: 10px 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 0; border-bottom: 1px solid var(--line); background: transparent; cursor: pointer; text-align: left; }
.compact-task-item:last-child, .quick-device-item:last-child { border-bottom: 0; }
.compact-task-item:hover:not(:disabled), .quick-device-item:hover:not(:disabled) { color: var(--primary); }
.compact-task-item > span, .quick-device-item > span { min-width: 0; display: grid; }
.compact-task-item strong, .quick-device-item strong { overflow: hidden; color: var(--text); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.compact-task-item small, .quick-device-item small { margin-top: 3px; color: var(--text-faint); font-size: 9px; }
.compact-task-item em, .quick-device-item em { flex: 0 0 auto; font-style: normal; }
.quick-device-item em { color: var(--text-faint); font-size: 10px; }
.quick-device-item em.online { color: var(--success); }
.quick-device-item:disabled { cursor: default; opacity: .65; }
.membership-summary-card { padding: 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border: 1px solid color-mix(in srgb, var(--primary) 16%, var(--line)); border-radius: var(--radius-md); background: linear-gradient(135deg, var(--primary-soft), var(--cyan-soft)); }
.membership-summary-card > div { display: grid; }
.membership-summary-card strong { margin-top: 5px; font-size: 16px; }
.membership-summary-card span { margin-top: 3px; color: var(--text-soft); font-size: 10px; }
.device-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.device-card { min-height: 180px; padding: 20px; display: flex; flex-direction: column; justify-content: space-between; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-soft); }
.device-card header, .device-card footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.device-card h2 { margin: 16px 0 0; font-size: 17px; }
.device-card p { margin: 4px 0 0; color: var(--text-soft); font-size: 11px; }
.device-card footer { margin-top: 18px; }
.device-card footer .button { flex: 1; }
.disabled-link { pointer-events: none; opacity: .45; }
.tasks-heading { margin-bottom: 16px; }
.tasks-heading-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.task-split { min-height: calc(100dvh - 180px); display: grid; grid-template-columns: minmax(300px, .78fr) minmax(0, 1.45fr); gap: 16px; }
.task-list-pane { min-height: 0; overflow: hidden; }
.task-filters { padding: 14px; display: flex; gap: 6px; border-bottom: 1px solid var(--line); }
.task-filters button { min-height: 34px; padding: 0 12px; border: 0; border-radius: 9px; color: var(--text-soft); background: transparent; cursor: pointer; font-size: 11px; }
.task-filters button.active { color: var(--primary); background: var(--primary-soft); font-weight: 700; }
.task-list { max-height: calc(100dvh - 250px); padding: 10px; display: grid; align-content: start; gap: 7px; overflow: auto; }
.task-list-item { padding: 14px; display: grid; gap: 8px; border: 1px solid transparent; border-radius: 12px; background: transparent; cursor: pointer; text-align: left; }
.task-list-item:hover { background: var(--surface-soft); }
.task-list-item.active { border-color: color-mix(in srgb, var(--primary) 22%, var(--line)); background: var(--primary-soft); }
.task-list-item header { display: flex; justify-content: space-between; gap: 10px; }
.task-list-item strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.task-list-item p { margin: 0; display: -webkit-box; overflow: hidden; color: var(--text-soft); font-size: 11px; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.task-list-item small { color: var(--text-faint); font-size: 9px; }
.task-detail { min-width: 0; padding: clamp(20px, 3vw, 30px); overflow: auto; }
.task-detail.empty-detail { display: grid; place-items: center; }
.task-detail-header { display: flex; align-items: start; justify-content: space-between; gap: 18px; }
.task-detail-header h2 { margin: 6px 0 0; font-size: clamp(22px, 3vw, 30px); line-height: 1.25; }
.task-original-prompt { margin: 18px 0 0; padding: 15px 16px; border-radius: 12px; color: var(--text-soft); background: var(--surface-soft); font-size: 12px; line-height: 1.75; white-space: pre-wrap; user-select: text; }
.approval-card { margin-top: 18px; padding: 18px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border: 1px solid color-mix(in srgb, var(--warning) 25%, var(--line)); border-radius: 14px; background: var(--warning-soft); }
.approval-card h3 { margin: 5px 0 0; font-size: 16px; }
.approval-card p:last-child { margin: 7px 0 0; color: var(--text-soft); font-size: 11px; }
.approval-card > div:last-child { flex: 0 0 auto; display: flex; gap: 8px; }
.task-timeline { margin-top: 24px; }
.task-timeline > h3 { margin: 0 0 14px; font-size: 14px; }
.task-event { position: relative; padding: 0 0 18px 22px; display: grid; grid-template-columns: 1fr; }
.task-event::before { position: absolute; top: 10px; bottom: -2px; left: 5px; width: 1px; background: var(--line); content: ""; }
.task-event:last-child::before { display: none; }
.event-marker { position: absolute; top: 7px; left: 1px; width: 9px; height: 9px; border: 2px solid var(--surface); border-radius: 50%; background: var(--line-strong); box-shadow: 0 0 0 1px var(--line); }
.task-event.attention .event-marker { background: var(--warning); }
.task-event header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.task-event header strong { font-size: 12px; }
.task-event time { flex: 0 0 auto; color: var(--text-faint); font-size: 9px; }
.task-event-detail { margin-top: 5px; color: var(--text-soft); font-size: 11px; line-height: 1.72; white-space: pre-wrap; }
.event-progress { height: 4px; margin-top: 9px; overflow: hidden; border-radius: 2px; background: var(--surface-soft); }
.event-progress i { height: 100%; display: block; border-radius: inherit; background: var(--primary); }
.task-followup-form { margin-top: 10px; padding-top: 18px; display: grid; gap: 8px; border-top: 1px solid var(--line); }
.task-followup-form label { color: var(--text-soft); font-size: 10px; font-weight: 700; }
.task-followup-form > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: end; }
.task-followup-form textarea { min-height: 70px; resize: vertical; }
.task-followup-form .button { min-height: 46px; }
.text-danger-button { margin-top: 12px; padding: 8px 0; border: 0; color: var(--danger); background: transparent; cursor: pointer; font-size: 10px; }
.empty-state { max-width: 300px; display: grid; justify-items: center; gap: 6px; color: var(--text-soft); text-align: center; }
.empty-state strong { color: var(--text); font-size: 16px; }
.empty-state span { font-size: 12px; }
.mobile-back-button { display: none; }
.membership-heading { align-items: center; }
.membership-state-badge { padding: 8px 12px; border: 1px solid color-mix(in srgb, var(--warning) 28%, var(--line)); border-radius: 14px; color: var(--warning); background: var(--warning-soft); font-size: 11px; font-weight: 700; }
.payment-status { margin-bottom: 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-size: 12px; }
.payment-status.qr-payment { display: grid; justify-items: center; gap: 12px; color: var(--text); text-align: center; }
.payment-status.qr-payment > strong { font-size: 16px; }
.payment-qr-frame { width: min(244px, 72vw); aspect-ratio: 1; padding: 10px; display: grid; place-items: center; overflow: hidden; border: 1px solid color-mix(in srgb, var(--primary) 20%, var(--line)); border-radius: 12px; background: #fff; box-shadow: 0 10px 28px rgba(20, 25, 38, .12); }
.payment-qr-image { width: 100%; height: 100%; display: block; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.payment-status-copy { color: var(--text-soft); line-height: 1.6; }
.membership-layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr); gap: 18px; }
.membership-orders-panel { margin-top: 18px; }
.membership-orders-panel > header { margin-bottom: 10px; padding: 0 2px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.membership-orders-panel h2 { margin: 0; font-size: 16px; }
.membership-orders-panel > header button { min-height: 32px; padding: 0 4px; border: 0; color: var(--primary); background: transparent; cursor: pointer; font-size: 12px; font-weight: 700; }
.membership-orders-panel > header button:hover { color: var(--text); }
.membership-orders-panel > header button:focus-visible { outline: 2px solid color-mix(in srgb, var(--primary) 48%, transparent); outline-offset: 3px; }
.membership-order-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.membership-order-list.expanded { max-height: 360px; padding-right: 4px; overflow: auto; }
.membership-order-item { min-width: 0; padding: 14px 15px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 14px; align-items: start; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: 0 6px 18px rgba(17, 25, 39, .045); }
.membership-order-main, .membership-order-result { min-width: 0; display: grid; gap: 5px; }
.membership-order-result { justify-items: end; }
.membership-order-item > small { grid-column: 1 / -1; color: var(--text-soft); font-size: 12px; }
.membership-order-item span { color: var(--text-soft); font-size: 13px; white-space: normal; overflow-wrap: anywhere; }
.membership-order-result > strong { font-size: 15px; }
.membership-refund-entry { grid-column: 1 / -1; min-height: 32px; padding: 7px 10px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid color-mix(in srgb, var(--primary) 24%, var(--line)); border-radius: 9px; color: var(--primary); background: var(--primary-soft); cursor: pointer; font: inherit; font-size: 11px; font-weight: 700; }
.membership-refund-entry span { color: var(--text-soft); font-size: 10px; font-weight: 500; }
.membership-refund-entry:hover { border-color: color-mix(in srgb, var(--primary) 48%, var(--line)); background: color-mix(in srgb, var(--primary-soft) 74%, var(--surface)); }
.membership-refund-entry:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary) 26%, transparent); outline-offset: 2px; }
.membership-refund-note { grid-column: 1 / -1; padding-top: 7px; border-top: 1px solid var(--line); color: var(--text-soft); font-size: 10px; white-space: normal; }
.membership-refund-confirm { grid-column: 1 / -1; padding: 10px; display: grid; gap: 9px; border: 1px solid color-mix(in srgb, var(--danger) 24%, var(--line)); border-radius: 9px; background: var(--danger-soft); }
.membership-refund-confirm > span { color: var(--text); font-size: 11px; line-height: 1.55; white-space: normal; }
.membership-refund-confirm > div { display: flex; justify-content: flex-end; gap: 7px; }
.membership-refund-confirm button { min-height: 30px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--text); background: var(--surface); cursor: pointer; font: inherit; font-size: 10px; font-weight: 700; }
.membership-refund-confirm button.danger { border-color: var(--danger); color: #fff; background: var(--danger); }
.membership-refund-confirm button:hover:not(:disabled) { border-color: var(--line-strong); }
.membership-refund-confirm button.danger:hover:not(:disabled) { filter: brightness(.94); }
.membership-refund-confirm button:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary) 26%, transparent); outline-offset: 2px; }
.membership-refund-confirm button:disabled { cursor: wait; opacity: .6; }
.pricing-panel, .benefit-panel { padding: clamp(22px, 3vw, 30px); }
.price-options { margin-bottom: 20px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.price-option { min-height: 146px; padding: 20px; display: grid; align-content: space-between; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-soft); cursor: pointer; }
.price-option:hover { border-color: var(--line-strong); }
.price-option.selected { border-color: var(--primary); background: var(--primary-soft); box-shadow: inset 0 0 0 1px var(--primary); }
.price-option strong { font-size: 24px; }
.price-option strong small { color: var(--text-soft); font-size: 10px; font-weight: 400; }
.price-option span { color: var(--text-soft); font-size: 11px; }
.benefit-panel h2 { margin: 0; font-size: 20px; }
.benefit-panel ul { margin: 18px 0; padding: 0; display: grid; gap: 0; list-style: none; }
.benefit-panel li { padding: 13px 0; display: flex; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); }
.benefit-panel li span { color: var(--text-soft); font-size: 11px; }
.benefit-panel li strong { font-size: 11px; text-align: right; }
.benefit-panel details { padding: 13px 0; color: var(--text-soft); font-size: 11px; }
.benefit-panel summary { color: var(--text); cursor: pointer; font-weight: 700; }
.benefit-panel a { color: var(--primary); font-size: 11px; font-weight: 700; }
.account-popover { position: fixed; top: 60px; right: max(14px, env(safe-area-inset-right)); z-index: 50; width: 210px; padding: 14px; display: grid; gap: 9px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-raised); box-shadow: var(--shadow); backdrop-filter: blur(18px); }
.payment-status.working { border-color: color-mix(in srgb, var(--primary) 22%, var(--line)); color: var(--primary); background: var(--primary-soft); }
.payment-status.success { border-color: color-mix(in srgb, var(--success) 22%, var(--line)); color: var(--success); background: var(--success-soft); }
.payment-status.error { border-color: color-mix(in srgb, var(--danger) 22%, var(--line)); color: var(--danger); background: var(--danger-soft); }
.passport-modal-layer { position: fixed; inset: 0; z-index: 120; padding: max(24px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left)); display: grid; place-items: center; overflow: auto; background: color-mix(in srgb, #131827 52%, transparent); backdrop-filter: blur(14px) saturate(.8); }
.passport-dialog { width: min(720px, 100%); max-height: min(820px, calc(100dvh - 48px)); overflow: auto; border: 1px solid var(--line); border-radius: 20px; outline: 0; background: var(--surface); box-shadow: 0 28px 80px rgba(11, 18, 34, .28); }
.passport-dialog-header { padding: 26px 28px 20px; border-bottom: 1px solid var(--line); }
.passport-dialog-header > span { color: var(--primary); font-size: 12px; font-weight: 700; }
.passport-dialog-header h2 { margin: 7px 0 0; font-size: 26px; line-height: 1.25; }
.passport-summary { padding: 8px 28px; display: grid; }
.passport-summary-row { padding: 16px 0; display: grid; grid-template-columns: 118px minmax(0, 1fr); gap: 18px; border-bottom: 1px solid var(--line); }
.passport-summary-row > span { color: var(--text-soft); font-size: 13px; }
.passport-summary-row > strong { display: flex; flex-wrap: wrap; gap: 7px; color: var(--text); font-size: 14px; font-weight: 400; }
.passport-summary-row > strong > span { width: 100%; font-weight: 700; }
.passport-summary-row > strong > small { width: 100%; color: var(--text-soft); font-size: 12px; font-weight: 400; }
.passport-summary-row i { padding: 5px 9px; border-radius: 8px; color: var(--text); background: var(--surface-soft); font-size: 12px; font-style: normal; font-weight: 600; }
.passport-takeover-option { margin: 10px 28px 18px; padding: 14px 16px; display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; background: var(--surface-soft); }
.passport-takeover-option > input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.passport-checkbox { width: 20px; height: 20px; flex: 0 0 20px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 5px; background: var(--surface); }
.passport-checkbox i { width: 10px; height: 6px; display: none; border-bottom: 2px solid #fff; border-left: 2px solid #fff; transform: rotate(-45deg) translateY(-1px); }
.passport-takeover-option > input:checked + .passport-checkbox { border-color: var(--primary); background: var(--primary); }
.passport-takeover-option > input:checked + .passport-checkbox i { display: block; }
.passport-takeover-option > input:focus-visible + .passport-checkbox { outline: 3px solid color-mix(in srgb, var(--primary) 28%, transparent); outline-offset: 2px; }
.passport-takeover-option > span:last-child { display: grid; }
.passport-takeover-option strong { font-size: 14px; }
.passport-takeover-option small { margin-top: 2px; color: var(--text-soft); font-size: 12px; }
.passport-error { margin: 0 28px 18px; padding: 12px 14px; border-radius: 10px; color: var(--danger); background: var(--danger-soft); font-size: 13px; }
.passport-dialog-actions { position: sticky; bottom: 0; padding: 18px 28px; display: flex; justify-content: flex-end; gap: 10px; border-top: 1px solid var(--line); background: var(--surface-raised); backdrop-filter: blur(12px); }
.action-approval-dialog { width: min(580px, 100%); }
.action-approval-body { padding: 24px 28px 26px; display: grid; gap: 14px; }
.action-approval-body .status-pill { width: fit-content; }
.action-approval-body p { margin: 0; color: var(--text); font-size: 15px; line-height: 1.7; }
.task-authorization-dialog { width: min(520px, 100%); }
.task-authorization-body { padding: 22px 28px 24px; display: grid; gap: 12px; }
.task-authorization-body > p { margin: 0; color: var(--text-soft); font-size: 13px; line-height: 1.65; }
.task-authorization-body > label { margin-top: 4px; color: var(--text); font-size: 13px; font-weight: 600; }
.task-authorization-body .passport-error { margin: 2px 0 0; }
.task-authorization-target { padding: 13px 15px; display: grid; gap: 3px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); }
.task-authorization-target span { color: var(--text-soft); font-size: 11px; }
.task-authorization-target strong { overflow: hidden; color: var(--text); font-size: 14px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.task-authorization-frame-host { position: fixed; width: 1px; height: 1px; left: -10000px; top: -10000px; overflow: hidden; pointer-events: none; }
.task-authorization-frame-host iframe { width: 1px; height: 1px; border: 0; }
.passport-resume-card { margin-top: 18px; padding: 16px 18px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border: 1px solid color-mix(in srgb, var(--warning) 26%, var(--line)); border-radius: 13px; background: var(--warning-soft); }
.passport-resume-card > div { display: grid; }
.passport-resume-card span { color: var(--warning); font-size: 11px; font-weight: 700; }
.passport-resume-card strong { margin-top: 3px; font-size: 14px; }
body.modal-open { overflow: hidden; }
.account-popover label { color: var(--text-soft); font-size: 10px; }
.account-popover select { min-height: 40px; }
.account-popover button { min-height: 40px; border: 0; border-radius: 9px; color: var(--danger); background: var(--danger-soft); cursor: pointer; }
.toast-region { position: fixed; right: max(18px, env(safe-area-inset-right)); bottom: max(18px, env(safe-area-inset-bottom)); z-index: 80; width: min(360px, calc(100vw - 32px)); display: grid; gap: 8px; pointer-events: none; }
.toast { padding: 12px 14px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-raised); box-shadow: var(--shadow); font-size: 12px; }
.loading-state { min-height: 60px; }
.skeleton-line, .skeleton-card { display: block; border-radius: 9px; background: linear-gradient(90deg, var(--surface-soft), color-mix(in srgb, var(--line) 55%, var(--surface)), var(--surface-soft)); background-size: 220% 100%; animation: skeleton 1.4s ease infinite; }
.skeleton-line { width: 100%; height: 16px; }
.skeleton-line.short { width: 62%; }
.skeleton-card { min-height: 150px; }
@keyframes skeleton { to { background-position: -220% 0; } }

@media (orientation: landscape) and (max-width: 959px) {
  .app-frame { grid-template-columns: 78px minmax(0, 1fr); }
  .app-sidebar { padding-inline: 10px; }
  .sidebar-nav button { grid-template-columns: 1fr; justify-items: center; padding: 8px 4px; gap: 3px; font-size: 9px; }
  .sidebar-nav em, .sidebar-control-link span, .sidebar-account > span:nth-child(2), .sidebar-account > svg { display: none; }
  .sidebar-control-link, .sidebar-account { grid-template-columns: 1fr; justify-items: center; padding: 10px 5px; }
  .overview-layout { grid-template-columns: minmax(0, 1.4fr) minmax(240px, .7fr); }
  .device-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (orientation: landscape) and (max-height: 520px) {
  .auth-panel { padding: 14px; align-items: start; }
  .auth-card { max-width: 620px; padding: 18px 28px; border-radius: 18px; }
  .auth-card .brand img { width: 30px; height: 30px; }
  .auth-card h2 { margin: 16px 0; font-size: 27px; }
  .field-stack { grid-template-columns: 1fr 1.15fr; gap: 10px 14px; align-items: end; }
  .field-stack > .button { grid-column: 1 / -1; min-height: 46px; }
  input, select { min-height: 46px; }
}

@media (orientation: portrait), (max-width: 719px) {
  .membership-order-list { grid-template-columns: 1fr; }
  .auth-panel { padding: max(20px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom)); }
  .auth-card { padding: 24px 20px; border-radius: 18px; box-shadow: var(--shadow-soft); }
  .auth-card h2 { font-size: 28px; }
  .code-field { grid-template-columns: minmax(0, 1fr) auto; }
  .code-field .button { padding-inline: 12px; }
  .workspace { overflow: hidden; }
  .app-header { height: auto; position: relative; z-index: 20; padding-top: env(safe-area-inset-top); }
  .app-header-main { height: 60px; padding: 0 14px; grid-template-columns: 1fr auto; }
  .app-header-main .brand b, .header-context { display: none; }
  .membership-chip { display: none; }
  .portrait-section-tabs { height: 46px; padding: 0 12px; display: flex; gap: 4px; overflow-x: auto; border-top: 1px solid var(--line); scrollbar-width: none; }
  .portrait-section-tabs::-webkit-scrollbar { display: none; }
  .portrait-section-tabs button { flex: 1 0 auto; min-width: 72px; padding: 0 12px; border: 0; border-bottom: 2px solid transparent; color: var(--text-soft); background: transparent; cursor: pointer; font-size: 11px; }
  .portrait-section-tabs button.active { border-bottom-color: var(--primary); color: var(--primary); font-weight: 700; }
  .app-frame { height: calc(100dvh - 106px - env(safe-area-inset-top)); display: block; }
  .app-sidebar { display: none; }
  .app-content { height: 100%; padding: 16px 14px calc(30px + env(safe-area-inset-bottom)); overflow-y: auto; }
  .page-heading { margin-bottom: 16px; align-items: start; }
  .page-heading h1, .task-composer-card h1 { font-size: clamp(24px, 7vw, 32px); }
  .page-heading > div > p:last-child { line-height: 1.65; }
  .overview-layout, .membership-layout { display: block; }
  .overview-primary, .overview-secondary { gap: 14px; }
  .overview-secondary { margin-top: 14px; }
  .task-composer-card, .section-card, .pricing-panel, .benefit-panel, .task-list-pane, .task-detail { border-radius: 17px; box-shadow: none; }
  .task-composer-card { padding: 20px 16px; }
  .task-composer-card > header { display: grid; }
  .task-composer-card form { margin-top: 20px; }
  .task-composer-card select { max-width: none; }
  .prompt-field textarea { min-height: 126px; }
  .composer-actions { align-items: stretch; flex-direction: column; }
  .composer-actions .button { min-height: 50px; }
  .membership-summary-card { margin-top: 14px; }
  .device-grid { grid-template-columns: 1fr; gap: 10px; }
  .device-card { min-height: 156px; padding: 17px; }
  .task-split { min-height: calc(100dvh - 190px); display: block; }
  .task-list-pane { min-height: calc(100dvh - 190px); }
  .task-list { max-height: none; overflow: visible; }
  .task-detail { min-height: calc(100dvh - 190px); padding: 16px; }
  .task-split .task-detail { display: none; }
  .task-split.is-detail-open .task-list-pane { display: none; }
  .task-split.is-detail-open .task-detail { display: block; }
  .mobile-back-button { min-height: 40px; margin: -5px 0 12px; padding: 0; display: inline-flex; align-items: center; gap: 4px; border: 0; color: var(--primary); background: transparent; cursor: pointer; font-size: 11px; font-weight: 700; }
  .mobile-back-button svg { width: 17px; height: 17px; }
  .approval-card { align-items: stretch; flex-direction: column; }
  .approval-card > div:last-child { display: grid; grid-template-columns: 1fr 1.3fr; }
  .task-followup-form > div { grid-template-columns: 1fr; }
  .task-followup-form .button { min-height: 46px; }
  .membership-heading { align-items: start; }
  .membership-state-badge { flex: 0 0 auto; }
  .pricing-panel, .benefit-panel { padding: 18px 16px; }
  .benefit-panel { margin-top: 12px; }
  .price-options { grid-template-columns: 1fr; }
  .price-option { min-height: 116px; }
  .account-popover { top: calc(56px + env(safe-area-inset-top)); }
  .passport-modal-layer { padding-inline: 10px; align-items: end; }
  .passport-dialog { max-height: calc(100dvh - max(14px, env(safe-area-inset-top))); border-radius: 20px 20px 0 0; }
  .passport-dialog-header { padding: 22px 20px 17px; }
  .passport-summary { padding-inline: 20px; }
  .passport-summary-row { grid-template-columns: 1fr; gap: 6px; }
  .passport-takeover-option { margin-inline: 20px; }
  .passport-dialog-actions { padding: 15px 20px max(15px, env(safe-area-inset-bottom)); }
  .passport-dialog-actions .button.primary { flex: 1; }
  .passport-resume-card { align-items: stretch; flex-direction: column; }
  .toast-region { right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); }
}

@media (max-width: 380px) {
  .auth-panel { padding-inline: 12px; }
  .app-content { padding-inline: 10px; }
  .portrait-section-tabs { padding-inline: 8px; }
  .portrait-section-tabs button { min-width: 66px; padding-inline: 8px; }
  .membership-summary-card { align-items: stretch; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Workspace refinement: one restrained visual system across tasks, control and billing. */
.app-sidebar { gap: 18px; }
.sidebar-nav { flex: 0 0 auto; }
.sidebar-bottom { min-height: 0; margin-top: auto; display: grid; gap: 18px; }
.desktop-promo {
  padding: 14px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  border: 1px solid var(--colorNeutralStroke2);
  border-radius: var(--borderRadiusLarge);
  color: var(--colorNeutralForeground1);
  background: var(--colorNeutralBackground2);
  transition: border-color var(--durationFast) var(--curveEasyEase), background-color var(--durationFast) var(--curveEasyEase), transform var(--durationNormal) var(--curveDecelerateMid);
}
.desktop-promo:hover { border-color: var(--colorBrandStroke2); background: var(--colorBrandBackground2); transform: translateY(-1px); }
.desktop-promo img { width: 42px; height: 42px; object-fit: contain; }
.desktop-promo > span { min-width: 0; display: grid; }
.desktop-promo strong { font-size: var(--fontSizeBase300); line-height: var(--lineHeightBase300); }
.desktop-promo small { margin-top: 4px; color: var(--colorNeutralForeground3); font-size: var(--fontSizeBase100); line-height: 1.5; }
.desktop-promo em { margin-top: 10px; color: var(--colorBrandForegroundLink); font-size: var(--fontSizeBase100); font-style: normal; font-weight: var(--fontWeightSemibold); }
.sidebar-filing { padding: 0 4px 5px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; color: var(--colorNeutralForeground4); font-size: 10px; white-space: nowrap; }
.sidebar-filing:hover { color: var(--colorBrandForegroundLink); }
.sidebar-filing img { width: 15px; height: 15px; object-fit: contain; }
.mobile-workspace-filing { display: none; }

.xiaolan-heading { display: flex; align-items: center; gap: 13px; }
.xiaolan-heading img, .xiaolan-page-title img { object-fit: contain; filter: drop-shadow(0 5px 13px color-mix(in srgb, var(--colorBrandBackground) 20%, transparent)); }
.xiaolan-heading > div, .xiaolan-page-title > div { min-width: 0; display: grid; }
.xiaolan-heading p, .xiaolan-page-title p { margin: 0 0 2px; color: var(--colorBrandForeground1); font-size: var(--fontSizeBase200); font-weight: var(--fontWeightSemibold); }
.xiaolan-page-title { display: flex; align-items: center; gap: 10px; }

.account-summary-button { grid-template-columns: auto minmax(84px, auto) 16px; padding-left: 8px; }
.account-tier-mark, .account-popover-tier {
  min-width: 42px;
  height: 26px;
  padding: 0 8px;
  display: inline-grid;
  place-items: center;
  border-radius: var(--borderRadiusCircular);
  color: var(--colorNeutralForeground2);
  background: var(--colorNeutralBackground4);
  font-size: 10px;
  font-weight: var(--fontWeightBold);
  letter-spacing: .045em;
}
.account-tier-mark[data-tier="vip"], .account-popover-tier[data-tier="vip"] { color: var(--colorBrandForeground1); background: var(--colorBrandBackground2); }
.account-tier-mark[data-tier="admin"], .account-popover-tier[data-tier="admin"] { color: var(--colorPaletteDarkOrangeForeground2); background: var(--colorPaletteDarkOrangeBackground2); }
.account-popover-tier { min-width: 52px; height: 32px; }
.account-expiry-row { margin: 0 4px 5px; padding: 9px 10px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-radius: var(--borderRadiusMedium); background: var(--colorNeutralBackground2); }
.account-expiry-row span { color: var(--colorNeutralForeground3); font-size: var(--fontSizeBase100); }
.account-expiry-row strong { color: var(--colorNeutralForeground1); font-size: var(--fontSizeBase200); font-variant-numeric: tabular-nums; white-space: nowrap; }

.task-filters {
  min-height: 56px;
  padding: 8px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  border-bottom: 1px solid var(--colorNeutralStroke2);
}
.task-filters button {
  min-width: 0;
  min-height: 40px;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 0;
  border-radius: var(--borderRadiusMedium);
  color: var(--colorNeutralForeground2);
  background: transparent;
  cursor: pointer;
  font-size: var(--fontSizeBase200);
}
.task-filters button:hover { color: var(--colorNeutralForeground1); background: var(--colorSubtleBackgroundHover); }
.task-filters button.active { color: var(--colorBrandForeground1); background: var(--colorBrandBackground2); font-weight: var(--fontWeightSemibold); }
.filter-count {
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  display: inline-grid;
  place-items: center;
  border-radius: var(--borderRadiusCircular);
  color: var(--colorNeutralForeground3);
  background: var(--colorNeutralBackground4);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.task-filters button.active .filter-count { color: var(--colorNeutralForegroundOnBrand); background: var(--colorBrandBackground); }

.task-result-card { margin-top: 20px; padding: 18px 20px; border: 1px solid var(--colorStatusSuccessBorder1); border-radius: var(--borderRadiusLarge); background: var(--colorStatusSuccessBackground1); }
.task-result-card > span { color: var(--colorStatusSuccessForeground1); font-size: var(--fontSizeBase100); font-weight: var(--fontWeightSemibold); }
.task-result-card > .markdown-content { margin-top: 8px; color: var(--colorNeutralForeground1); }
.task-steps { margin-top: 22px; border-top: 1px solid var(--colorNeutralStroke2); }
.task-steps > summary { min-height: 54px; display: grid; grid-template-columns: auto 1fr 18px; align-items: center; gap: 9px; color: var(--colorNeutralForeground1); cursor: pointer; list-style: none; font-size: var(--fontSizeBase300); font-weight: var(--fontWeightSemibold); }
.task-steps > summary::-webkit-details-marker { display: none; }
.task-steps > summary em { justify-self: start; padding: 2px 7px; border-radius: var(--borderRadiusCircular); color: var(--colorNeutralForeground3); background: var(--colorNeutralBackground3); font-size: var(--fontSizeBase100); font-style: normal; font-weight: var(--fontWeightRegular); }
.task-steps > summary svg { width: 18px; height: 18px; fill: none; stroke: var(--colorNeutralForeground3); stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.6; transition: transform var(--durationNormal) var(--curveDecelerateMid); }
.task-steps[open] > summary svg { transform: rotate(180deg); }
.task-steps .task-timeline { margin-top: 6px; max-height: min(640px, 60vh); overflow: auto; padding-right: 8px; }
.markdown-content { overflow-wrap: anywhere; color: var(--colorNeutralForeground2); font-size: var(--fontSizeBase300); line-height: 1.68; user-select: text; }
.markdown-content > :first-child { margin-top: 0; }
.markdown-content > :last-child { margin-bottom: 0; }
.markdown-content p { margin: .45em 0; }
.markdown-content h3, .markdown-content h4, .markdown-content h5 { margin: 1em 0 .45em; color: var(--colorNeutralForeground1); line-height: 1.35; }
.markdown-content h3 { font-size: var(--fontSizeBase400); }
.markdown-content h4, .markdown-content h5 { font-size: var(--fontSizeBase300); }
.markdown-content ul, .markdown-content ol { margin: .5em 0; padding-left: 1.45em; }
.markdown-content li + li { margin-top: .28em; }
.markdown-content a { color: var(--colorBrandForegroundLink); text-decoration: underline; text-underline-offset: 3px; }
.markdown-content code { padding: .12em .35em; border-radius: var(--borderRadiusSmall); color: var(--colorPaletteBerryForeground2); background: var(--colorNeutralBackground3); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .9em; }
.markdown-content pre { max-width: 100%; padding: 13px 15px; overflow: auto; border: 1px solid var(--colorNeutralStroke2); border-radius: var(--borderRadiusMedium); background: var(--colorNeutralBackground3); }
.markdown-content pre code { padding: 0; color: inherit; background: transparent; }
.markdown-content table { width: 100%; margin: .75em 0; border-spacing: 0; border-collapse: collapse; overflow: hidden; border: 1px solid var(--colorNeutralStroke2); border-radius: var(--borderRadiusMedium); font-size: .94em; }
.markdown-content :is(th, td) { padding: 8px 10px; border-right: 1px solid var(--colorNeutralStroke2); border-bottom: 1px solid var(--colorNeutralStroke2); text-align: left; vertical-align: top; }
.markdown-content :is(th, td):last-child { border-right: 0; }
.markdown-content tr:last-child td { border-bottom: 0; }
.markdown-content th { color: var(--colorNeutralForeground1); background: var(--colorNeutralBackground3); font-weight: var(--fontWeightSemibold); }
.markdown-content tbody tr:nth-child(even) { background: color-mix(in srgb, var(--colorNeutralBackground2) 72%, transparent); }
.task-event-detail { white-space: normal; }

.remote-control-page { height: 100%; min-height: 0; }
.remote-control-heading { margin-bottom: 12px; }
.remote-control-heading > .remote-heading-copy { display: grid; }
.remote-control-heading > span { color: var(--colorNeutralForeground3); font-size: var(--fontSizeBase200); }
.remote-control-host { height: calc(100dvh - 146px); min-height: 560px; overflow: hidden; border: 1px solid var(--colorNeutralStroke2); border-radius: var(--borderRadiusLarge); background: var(--colorNeutralBackground2); box-shadow: var(--shadow4); }
.remote-control-host iframe { width: 100%; height: 100%; display: block; border: 0; background: var(--colorNeutralBackground2); }

.membership-experience { width: min(1180px, 100%); margin-inline: auto; gap: 14px; }
.membership-purchase-panel, .benefit-comparison-panel { padding: 24px; border: 1px solid var(--colorNeutralStroke2); border-radius: var(--borderRadiusLarge); background: var(--colorNeutralBackground1); box-shadow: none; }
.membership-purchase-panel { overflow: visible; }
.membership-section-heading > svg { display: none; }
.membership-section-heading h2 { font-size: var(--fontSizeBase600); }
.membership-purchase-panel .price-options { margin-top: 20px; gap: 12px; }
.membership-purchase-panel .price-option {
  min-height: 330px;
  padding: 24px;
  display: grid;
  grid-template-rows: auto auto auto auto 1fr auto;
  align-content: stretch;
  text-align: left;
  border: 1px solid var(--colorNeutralStroke2);
  border-radius: var(--borderRadiusLarge);
  color: var(--colorNeutralForeground1);
  background: var(--colorNeutralBackground1);
  box-shadow: none;
  transform: none;
}
.membership-purchase-panel .price-option:hover { border-color: var(--colorBrandStroke2); background: var(--colorNeutralBackground1Hover); box-shadow: var(--shadow4); transform: translateY(-2px); }
.membership-purchase-panel .price-option.selected { border-color: var(--colorBrandStroke1); background: linear-gradient(145deg, var(--colorBrandBackground2), var(--colorNeutralBackground1) 72%); box-shadow: 0 0 0 1px var(--colorBrandStroke1), var(--shadow8); transform: none; }
.price-plan { display: flex; align-items: center; justify-content: space-between; color: var(--colorNeutralForeground2); font-size: var(--fontSizeBase300); font-weight: var(--fontWeightSemibold); }
.price-plan > span { display: grid; gap: 4px; }
.price-plan > span > small { color: var(--colorNeutralForeground3); font-size: var(--fontSizeBase100); font-weight: var(--fontWeightRegular); }
.price-plan em { padding: 3px 8px; border-radius: var(--borderRadiusCircular); color: var(--colorBrandForeground1); background: var(--colorBrandBackground2); font-size: var(--fontSizeBase100); font-style: normal; }
.price-discount { margin-top: 18px; display: flex; align-items: center; gap: 9px; }
.price-discount em { padding: 4px 8px; border-radius: var(--borderRadiusCircular); color: var(--colorPaletteRedForeground1); background: var(--colorPaletteRedBackground1); font-size: var(--fontSizeBase100); font-style: normal; font-weight: var(--fontWeightSemibold); }
.price-discount del { color: var(--colorNeutralForeground3); font-size: var(--fontSizeBase200); }
.price-value { margin-top: 12px; display: flex; align-items: end; justify-content: space-between; gap: 12px; }
.price-value > strong { align-self: start; color: var(--colorNeutralForeground1); font-size: clamp(38px, 3.2vw, 54px); line-height: 1; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.price-value > strong i { margin-right: 4px; color: var(--colorNeutralForeground3); font-size: .48em; font-style: normal; font-weight: var(--fontWeightRegular); vertical-align: top; }
.price-value > strong small { margin-left: 4px; color: var(--colorNeutralForeground3); font-size: var(--fontSizeBase200); letter-spacing: 0; }
.price-value > b { margin-bottom: 5px; color: var(--colorPaletteRedForeground1); font-size: var(--fontSizeBase200); font-weight: var(--fontWeightSemibold); white-space: nowrap; }
.price-detail { margin-top: 14px; display: grid; align-self: start; gap: 4px; color: var(--colorNeutralForeground2); font-size: var(--fontSizeBase300); font-weight: var(--fontWeightSemibold); }
.price-detail small { color: var(--colorNeutralForeground3); font-size: var(--fontSizeBase100); font-weight: var(--fontWeightRegular); }
.price-benefits { margin-top: 16px; display: grid; align-content: start; gap: 7px; color: var(--colorNeutralForeground2); font-size: var(--fontSizeBase200); }
.price-benefits i { position: relative; padding-left: 16px; font-style: normal; }
.price-benefits i::before { position: absolute; left: 1px; color: var(--colorPaletteGreenForeground1); content: "✓"; font-weight: var(--fontWeightBold); }
.price-choice { min-height: 42px; margin-top: 22px; display: grid; place-items: center; border: 1px solid var(--colorNeutralStroke1); border-radius: var(--borderRadiusMedium); color: var(--colorNeutralForeground1); font-size: var(--fontSizeBase300); font-weight: var(--fontWeightSemibold); }
.price-option.selected .price-choice { border-color: var(--colorBrandBackground); color: var(--colorNeutralForegroundOnBrand); background: var(--colorBrandBackground); }
.membership-purchase-actions { margin-top: 12px; padding: 14px 0 0; border-top: 1px solid var(--colorNeutralStroke2); border-radius: 0; background: transparent; backdrop-filter: none; }
.benefit-comparison { margin-top: 18px; border: 1px solid var(--colorNeutralStroke2); border-radius: var(--borderRadiusLarge); background: transparent; }
.comparison-row { min-height: 50px; border-bottom-color: var(--colorNeutralStroke2); }
.comparison-row:not(.comparison-header):hover { background: var(--colorNeutralBackground2Hover); transform: none; }
.comparison-header { background: var(--colorNeutralBackground2); }
.comparison-group { background: var(--colorNeutralBackground3); letter-spacing: 0; }
.comparison-row > span:first-child, .comparison-row[data-tone] > span:first-child { color: var(--colorNeutralForeground1); }
.comparison-row > span:first-child svg { color: var(--colorNeutralForeground3); }
.compare-yes, .compare-no { width: auto; height: auto; background: transparent; }
.compare-no { color: var(--colorNeutralForeground4); }
.vip-column-title { background: transparent; }
.page.active .membership-purchase-panel, .page.active .benefit-comparison-panel, .page.active .comparison-row { animation: none; }

@media (max-width: 1100px) {
  .desktop-promo { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .desktop-promo small { display: none; }
  .sidebar-filing span { display: none; }
}

@media (orientation: portrait), (max-width: 719px) {
  .account-summary-button { min-height: 38px; padding: 3px 5px; grid-template-columns: auto 14px; }
  .account-tier-mark { min-width: 40px; height: 28px; }
  .account-summary-copy { display: none; }
  .app-content { padding-inline: 12px; }
  .mobile-workspace-filing { display: flex; }
  .xiaolan-heading img { width: 42px; height: 42px; }
  .xiaolan-page-title img { width: 34px; height: 34px; }
  .remote-control-heading > span { display: none; }
  .remote-control-host { height: calc(100dvh - 202px - env(safe-area-inset-top)); min-height: 480px; margin-inline: -4px; border-radius: var(--borderRadiusMedium); }
  .task-filters { min-height: 54px; padding: 7px; }
  .task-filters button { min-height: 38px; padding-inline: 6px; gap: 5px; font-size: 12px; }
  .filter-count { min-width: 20px; height: 20px; padding-inline: 5px; font-size: 10px; }
  .task-result-card { padding: 15px; }
  .membership-purchase-panel, .benefit-comparison-panel { padding: 18px 14px; }
  .price-options { grid-template-columns: 1fr; }
  .membership-purchase-panel .price-option { min-height: 196px; }
  .comparison-row { padding-inline: 10px; grid-template-columns: minmax(0, 1fr) 58px 66px; }
}

@media (max-width: 390px) {
  .portrait-section-tabs button { min-width: 74px; }
  .theme-icon-button[data-theme-choice="system"] { display: none; }
  .task-filters button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .comparison-row > span:first-child svg { display: none; }
}

/* Fluent 2 workspace layer: one type ramp, semantic surfaces and shared states. */
:root {
  --canvas: #f3f5f8;
  --surface: #ffffff;
  --surface-soft: #f7f8fb;
  --surface-raised: rgba(255, 255, 255, .94);
  --text: #1f1f1f;
  --text-soft: #5f5f5f;
  --text-faint: #767676;
  --line: #e0e0e0;
  --line-strong: #bdbdbd;
  --primary: #4f5fe7;
  --primary-hover: #3f4fd1;
  --primary-soft: #eef0ff;
  --cyan-soft: #edf8fb;
  --success: #107c41;
  --success-soft: #e9f5ee;
  --warning: #8a5d00;
  --warning-soft: #fff4ce;
  --danger: #c50f1f;
  --danger-soft: #fde7e9;
  --shadow: 0 14px 36px rgba(0, 0, 0, .12);
  --shadow-soft: 0 4px 14px rgba(0, 0, 0, .07);
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
}

html[data-theme="dark"] {
  --canvas: #111318;
  --surface: #1b1d23;
  --surface-soft: #23262d;
  --surface-raised: rgba(27, 29, 35, .95);
  --text: #ffffff;
  --text-soft: #d1d1d1;
  --text-faint: #adadad;
  --line: #3d3f45;
  --line-strong: #666970;
  --primary: #9aa5ff;
  --primary-hover: #b0b8ff;
  --primary-soft: #2a3159;
  --cyan-soft: #17343a;
  --success: #54b77d;
  --success-soft: #173528;
  --warning: #f2c75c;
  --warning-soft: #3a3018;
  --danger: #ff99a4;
  --danger-soft: #422126;
  --shadow: 0 18px 48px rgba(0, 0, 0, .34);
  --shadow-soft: 0 6px 18px rgba(0, 0, 0, .24);
}

@media (prefers-color-scheme: dark) {
  html[data-theme="system"] {
    --canvas: #111318;
    --surface: #1b1d23;
    --surface-soft: #23262d;
    --surface-raised: rgba(27, 29, 35, .95);
    --text: #ffffff;
    --text-soft: #d1d1d1;
    --text-faint: #adadad;
    --line: #3d3f45;
    --line-strong: #666970;
    --primary: #9aa5ff;
    --primary-hover: #b0b8ff;
    --primary-soft: #2a3159;
    --cyan-soft: #17343a;
    --success: #54b77d;
    --success-soft: #173528;
    --warning: #f2c75c;
    --warning-soft: #3a3018;
    --danger: #ff99a4;
    --danger-soft: #422126;
    --shadow: 0 18px 48px rgba(0, 0, 0, .34);
    --shadow-soft: 0 6px 18px rgba(0, 0, 0, .24);
  }
}

body {
  font-family: "Segoe UI Variable Text", "Segoe UI", "Alibaba PuHuiTi", "PingFang SC", "Microsoft YaHei UI", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

.app-header { height: 72px; border-bottom-color: color-mix(in srgb, var(--line) 76%, transparent); }
.app-header-main { height: 72px; padding: 0 28px; grid-template-columns: 1fr auto; }
.brand { gap: 10px; font-size: 20px; }
.brand b { font-size: 13px; }
.account-actions { grid-column: 2; }
.membership-chip { min-height: 44px; padding: 6px 14px; border-radius: 10px; }
.membership-chip span { font-size: 12px; }
.membership-chip small { margin-top: 1px; font-size: 12px; }
.icon-button { width: 42px; height: 42px; border-radius: 10px; }

.app-frame { height: calc(100dvh - 72px); grid-template-columns: 248px minmax(0, 1fr); }
.app-sidebar { padding: 24px 14px 16px; }
.sidebar-nav { gap: 5px; }
.sidebar-nav button { min-height: 48px; padding: 0 14px; grid-template-columns: 24px 1fr auto; gap: 12px; border-radius: 10px; font-size: 14px; }
.sidebar-nav button:hover { background: color-mix(in srgb, var(--primary-soft) 55%, var(--surface)); }
.sidebar-nav button.active { color: var(--primary); background: var(--primary-soft); box-shadow: inset 3px 0 0 var(--primary); }
.sidebar-nav em { min-width: 22px; height: 22px; font-size: 12px; }
.sidebar-control-link, .sidebar-account { min-height: 56px; padding: 12px 13px; border-radius: 11px; }
.sidebar-control-link strong, .sidebar-account strong { font-size: 13px; }
.sidebar-control-link small, .sidebar-account small { font-size: 12px; }
.avatar { width: 30px; height: 30px; font-size: 12px; }

.app-content {
  padding: 38px clamp(32px, 4vw, 72px) 64px;
  background:
    radial-gradient(900px 360px at 50% -120px, color-mix(in srgb, var(--primary) 7%, transparent), transparent 72%),
    var(--canvas);
}
.page, .global-message { width: min(1420px, 100%); }
.page-heading { margin-bottom: 24px; align-items: center; }
.page-heading h1, .task-composer-card h1 { margin: 0; font-size: clamp(30px, 2.4vw, 40px); line-height: 1.2; letter-spacing: -.025em; }
.page-heading > div > p:last-child { font-size: 14px; }
.overview-layout { grid-template-columns: minmax(0, 1.7fr) minmax(340px, .78fr); gap: 24px; }
.overview-primary, .overview-secondary { gap: 20px; }

.task-composer-card, .section-card, .pricing-panel, .benefit-panel, .task-list-pane, .task-detail {
  border-color: color-mix(in srgb, var(--line) 86%, transparent);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}
.task-composer-card { padding: 30px 32px 28px; }
.task-composer-card form { margin-top: 24px; gap: 14px; }
.device-picker-label, .field > span:first-child { font-size: 13px; }
.prompt-field textarea { min-height: 150px; padding: 16px 17px; border-radius: 10px; font-size: 15px; line-height: 1.6; }
.composer-actions .button { min-width: 132px; min-height: 46px; }
.button { min-height: 40px; padding-inline: 16px; border-radius: 8px; font-size: 14px; }
.button.primary { background: #4f5fe7; box-shadow: 0 4px 12px rgba(79, 95, 231, .24); }
.button.primary:hover:not(:disabled) { background: #3f4fd1; }
.button.primary:active:not(:disabled) { background: #313fae; transform: none; box-shadow: none; }
.button.secondary { border-color: var(--line); background: var(--surface); }
.button.secondary:hover:not(:disabled) { border-color: var(--line-strong); background: var(--surface-soft); }
.button.soft { color: var(--primary); background: var(--primary-soft); }
.button.soft:hover:not(:disabled) { background: color-mix(in srgb, var(--primary-soft) 72%, var(--primary)); }

.device-select { position: relative; width: min(520px, 100%); }
.device-select-trigger { width: 100%; min-height: 62px; padding: 9px 13px 9px 16px; display: grid; grid-template-columns: minmax(0, 1fr) auto 22px; align-items: center; gap: 12px; border: 1px solid var(--line-strong); border-radius: 10px; color: var(--text); background: var(--surface); cursor: pointer; text-align: left; }
.device-select-trigger:hover { border-color: color-mix(in srgb, var(--primary) 55%, var(--line-strong)); background: var(--surface-soft); }
.device-select-trigger:focus-visible, .device-select.open .device-select-trigger { border-color: var(--primary); outline: 3px solid color-mix(in srgb, var(--primary) 20%, transparent); outline-offset: 1px; }
.device-select-copy { min-width: 0; display: grid; }
.device-select-copy strong { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.device-select-copy small { margin-top: 2px; color: var(--text-soft); font-size: 12px; }
.device-select-state { padding: 4px 8px; border-radius: 10px; color: var(--text-soft); background: var(--surface-soft); font-size: 12px; }
.device-select-state.online { color: var(--success); background: var(--success-soft); }
.device-select-trigger > svg { width: 18px; height: 18px; transition: transform .16s ease; }
.device-select.open .device-select-trigger > svg { transform: rotate(180deg); }
.device-select-menu { position: absolute; top: calc(100% + 6px); left: 0; z-index: 70; width: min(560px, calc(100vw - 32px)); max-height: min(320px, calc(100dvh - 180px)); padding: 6px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-raised); box-shadow: var(--shadow); backdrop-filter: blur(18px); }
.device-select-option { width: 100%; min-height: 58px; padding: 9px 11px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border: 1px solid transparent; border-radius: 8px; color: var(--text); background: transparent; cursor: pointer; text-align: left; }
.device-select-option:hover { background: var(--surface-soft); }
.device-select-option.selected { border-color: color-mix(in srgb, var(--primary) 24%, var(--line)); color: var(--primary); background: var(--primary-soft); }
.device-select-option > span { min-width: 0; display: grid; }
.device-select-option strong { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.device-select-option small { margin-top: 2px; color: var(--text-soft); font-size: 12px; }
.device-select-option em { color: var(--success); font-size: 12px; font-style: normal; }

.section-card { padding: 24px; }
.section-card-header { margin-bottom: 16px; }
.section-card-header h2 { margin: 0; font-size: 20px; }
.text-button { min-height: 36px; padding: 0 4px; font-size: 13px; }
.compact-task-list, .quick-device-list { gap: 8px; }
.compact-task-item, .quick-device-item { min-height: 66px; padding: 12px 13px; border: 1px solid transparent; border-bottom: 0; border-radius: 10px; background: var(--surface-soft); }
.compact-task-item:hover:not(:disabled), .quick-device-item:hover:not(:disabled) { border-color: color-mix(in srgb, var(--primary) 20%, var(--line)); background: color-mix(in srgb, var(--primary-soft) 50%, var(--surface)); }
.compact-task-item strong, .quick-device-item strong { font-size: 14px; }
.compact-task-item small, .quick-device-item small { margin-top: 3px; font-size: 12px; }
.quick-device-item em { font-size: 12px; }
.status-pill { min-height: 26px; padding: 4px 9px; border-radius: 13px; font-size: 12px; }
.status-pill { flex: 0 0 auto; white-space: nowrap; }
.task-detail-header > div { min-width: 0; }
.membership-summary-card { min-height: 112px; padding: 22px; border-radius: 14px; }
.membership-summary-card strong { margin-top: 6px; font-size: 19px; letter-spacing: -.01em; }
.membership-summary-card span { margin-top: 4px; font-size: 12px; }

.toast { padding: 13px 16px; font-size: 14px; }

@media (orientation: landscape) and (max-width: 1100px) {
  .app-frame { grid-template-columns: 86px minmax(0, 1fr); }
  .app-sidebar { padding-inline: 10px; }
  .sidebar-nav button { grid-template-columns: 1fr; justify-items: center; padding: 7px 4px; gap: 3px; font-size: 12px; }
  .sidebar-nav em, .sidebar-control-link span, .sidebar-account > span:nth-child(2), .sidebar-account > svg { display: none; }
  .sidebar-control-link, .sidebar-account { grid-template-columns: 1fr; justify-items: center; padding: 10px 5px; }
  .overview-layout { grid-template-columns: minmax(0, 1.45fr) minmax(280px, .7fr); }
}

@media (orientation: portrait), (max-width: 719px) {
  .app-header-main { height: 62px; padding: 0 16px; }
  .portrait-section-tabs { height: 50px; padding-inline: 10px; }
  .portrait-section-tabs button { min-width: 78px; font-size: 13px; }
  .app-frame { height: calc(100dvh - 112px - env(safe-area-inset-top)); }
  .app-content { padding: 20px 14px calc(34px + env(safe-area-inset-bottom)); background: var(--canvas); }
  .page-heading h1, .task-composer-card h1 { font-size: 28px; }
  .overview-primary, .overview-secondary { gap: 12px; }
  .overview-secondary { margin-top: 12px; }
  .task-composer-card, .section-card, .pricing-panel, .benefit-panel, .task-list-pane, .task-detail { border-radius: 14px; }
  .task-composer-card { padding: 20px 18px; }
  .task-composer-card form { margin-top: 18px; }
  .device-select { width: 100%; }
  .device-select-trigger { min-height: 60px; }
  .device-select-menu { position: fixed; right: 10px; bottom: max(10px, env(safe-area-inset-bottom)); left: 10px; top: auto; width: auto; max-height: min(420px, 60dvh); border-radius: 14px; }
  .prompt-field textarea { min-height: 132px; font-size: 16px; }
  .composer-actions .button { width: 100%; min-height: 48px; }
  .section-card { padding: 18px; }
  .compact-task-item, .quick-device-item { min-height: 64px; }
  .membership-summary-card { min-height: auto; }
}

.device-grid { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.device-card { min-height: 210px; padding: 22px; border-radius: 14px; }
.device-card header > small { color: var(--text-soft); font-size: 12px; }
.device-card h2 { margin-top: 20px; font-size: 20px; line-height: 1.3; }
.device-card p { margin-top: 5px; font-size: 13px; }
.device-card footer { margin-top: 22px; gap: 10px; }
.device-card footer .button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }

.task-split { min-height: calc(100dvh - 190px); grid-template-columns: minmax(340px, .82fr) minmax(0, 1.65fr); gap: 18px; }
.task-list-pane, .task-detail { border-radius: 16px; }
.task-filters { padding: 14px; gap: 8px; }
.task-filters button { min-height: 36px; padding-inline: 13px; font-size: 13px; }
.task-list { max-height: calc(100dvh - 250px); padding: 10px; gap: 6px; }
.task-list-item { min-height: 84px; padding: 14px 15px; gap: 7px; border-radius: 10px; }
.task-list-item:hover { background: var(--surface-soft); }
.task-list-item.active { border-color: color-mix(in srgb, var(--primary) 34%, var(--line)); background: var(--primary-soft); box-shadow: inset 3px 0 0 var(--primary); }
.task-list-item strong { font-size: 14px; line-height: 1.4; }
.task-list-item p { font-size: 13px; line-height: 1.5; }
.task-list-item small { font-size: 12px; }
.task-detail { padding: 30px 32px; }
.task-detail-header h2 { margin-top: 8px; font-size: clamp(26px, 2.6vw, 34px); line-height: 1.25; }
.task-original-prompt { padding: 14px 16px; font-size: 14px; line-height: 1.65; }
.approval-card { padding: 18px 20px; }
.approval-card h3 { font-size: 18px; }
.approval-card p:last-child { font-size: 13px; }
.task-timeline { margin-top: 28px; }
.task-timeline > h3 { margin-bottom: 18px; font-size: 16px; }
.task-event { padding: 0 0 20px 24px; }
.task-event header strong { font-size: 14px; }
.task-event time { font-size: 12px; }
.task-event-detail { margin-top: 6px; font-size: 13px; line-height: 1.65; }
.task-followup-form { margin-top: 14px; padding-top: 20px; }
.task-followup-form label { font-size: 13px; }
.task-followup-form textarea { min-height: 84px; font-size: 14px; }
.text-danger-button { min-height: 36px; margin-top: 10px; font-size: 12px; }
.passport-resume-card span { font-size: 12px; }
.passport-resume-card strong { font-size: 15px; }

.membership-layout { grid-template-columns: minmax(0, 1.3fr) minmax(340px, .78fr); gap: 20px; }
.pricing-panel, .benefit-panel { padding: 28px; border-radius: 16px; }
.price-options { gap: 14px; }
.price-option { min-height: 160px; padding: 22px; border-radius: 12px; }
.price-option strong { font-size: 30px; }
.price-option strong small { font-size: 12px; }
.price-option span { font-size: 13px; }
.benefit-panel h2 { font-size: 24px; }
.benefit-panel li { padding: 15px 0; }
.benefit-panel li span, .benefit-panel li strong { font-size: 13px; }
.benefit-panel details, .benefit-panel a { font-size: 13px; }
.membership-state-badge { font-size: 13px; }
.payment-status { font-size: 14px; }

.account-popover { width: 230px; padding: 14px; gap: 10px; }
.account-popover-label { color: var(--text-soft); font-size: 12px; font-weight: 600; }
.theme-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 3px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-soft); }
.theme-options button { min-height: 34px; padding: 0 8px; border: 0; border-radius: 7px; color: var(--text-soft); background: transparent; cursor: pointer; font-size: 12px; }
.theme-options button:hover { color: var(--text); background: var(--surface); }
.theme-options button.active { color: var(--primary); background: var(--surface); box-shadow: 0 1px 4px rgba(0, 0, 0, .09); font-weight: 700; }
.account-popover > #logoutButton { min-height: 40px; font-size: 13px; }

@media (orientation: portrait), (max-width: 719px) {
  .device-grid { gap: 12px; }
  .device-card { min-height: 184px; padding: 19px; }
  .task-list-item { min-height: 78px; }
  .task-detail { padding: 18px; }
  .task-detail-header h2 { font-size: 25px; }
  .pricing-panel, .benefit-panel { padding: 20px 18px; }
}

/* Fluent UI Web Components 3.1.3 owns controls and semantic tokens. */
:root,
html[data-theme="light"],
html[data-theme="dark"],
html[data-theme="system"] {
  --canvas: var(--colorNeutralBackground2);
  --surface: var(--colorNeutralBackground1);
  --surface-soft: var(--colorNeutralBackground3);
  --surface-raised: var(--colorNeutralBackground1);
  --text: var(--colorNeutralForeground1);
  --text-soft: var(--colorNeutralForeground2);
  --text-faint: var(--colorNeutralForeground3);
  --line: var(--colorNeutralStroke2);
  --line-strong: var(--colorNeutralStroke1);
  --primary: var(--colorBrandForeground1);
  --primary-hover: var(--colorBrandForeground2Hover);
  --primary-soft: var(--colorBrandBackground2);
  --success: var(--colorStatusSuccessForeground1);
  --success-soft: var(--colorStatusSuccessBackground1);
  --warning: var(--colorStatusWarningForeground1);
  --warning-soft: var(--colorStatusWarningBackground1);
  --danger: var(--colorStatusDangerForeground1);
  --danger-soft: var(--colorStatusDangerBackground1);
  --shadow: var(--shadow28);
  --shadow-soft: var(--shadow2);
  color-scheme: light dark;
}

body {
  color: var(--colorNeutralForeground1);
  background: var(--colorNeutralBackground2);
  font-family: var(--fontFamilyBase), "Segoe UI Variable Text", "Microsoft YaHei UI", sans-serif;
}

.app-header {
  height: 56px;
  border-bottom: 1px solid var(--colorNeutralStroke2);
  background: var(--colorNeutralBackground1);
}

.app-header-main { height: 56px; padding: 0 20px; }
.brand { font-size: var(--fontSizeBase400); }
.brand b { color: var(--colorNeutralForeground3); font-size: var(--fontSizeBase200); font-weight: var(--fontWeightRegular); }
.membership-chip { min-height: 36px; border-color: var(--colorNeutralStroke2); border-radius: var(--borderRadiusMedium); background: var(--colorNeutralBackground1); }
.icon-button { width: 36px; height: 36px; border-radius: var(--borderRadiusMedium); }

.app-frame { height: calc(100dvh - 56px); grid-template-columns: 232px minmax(0, 1fr); }
.app-sidebar { padding: 14px 10px 12px; border-right-color: var(--colorNeutralStroke2); background: var(--colorNeutralBackground1); }
.sidebar-nav { gap: 2px; }
.sidebar-nav button { min-height: 40px; padding: 0 10px; border-radius: var(--borderRadiusMedium); font-size: var(--fontSizeBase300); font-weight: var(--fontWeightRegular); }
.sidebar-nav button:hover { background: var(--colorSubtleBackgroundHover); }
.sidebar-nav button.active { color: var(--colorBrandForeground1); background: var(--colorBrandBackground2); box-shadow: none; font-weight: var(--fontWeightSemibold); }
.sidebar-control-link, .sidebar-account { min-height: 48px; padding: 8px 10px; border-radius: var(--borderRadiusMedium); background: transparent; }
.sidebar-control-link:hover, .sidebar-account:hover { background: var(--colorSubtleBackgroundHover); }

.app-content {
  padding: 28px 32px 40px;
  display: flex;
  flex-direction: column;
  background: var(--colorNeutralBackground2);
}

.page,
.global-message { width: 100%; max-width: none; }
.workspace-filing {
  width: 100%;
  margin-top: auto;
  padding: 18px 12px calc(4px + env(safe-area-inset-bottom));
  display: flex;
  justify-content: center;
}
.workspace-filing a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: var(--colorNeutralForeground3);
  font-size: var(--fontSizeBase200);
  transition: color var(--durationFast) var(--curveEasyEase);
}
.workspace-filing a:hover { color: var(--colorBrandForeground1); }
.workspace-filing a:focus-visible { border-radius: var(--borderRadiusSmall); outline: 2px solid var(--colorStrokeFocus2); outline-offset: 4px; }
.workspace-filing img { width: 18px; height: 18px; flex: 0 0 18px; object-fit: contain; }
.page-heading { margin-bottom: 18px; }
.page-heading h1,
.task-composer-card h1 { font-size: var(--fontSizeBase600); line-height: var(--lineHeightBase600); letter-spacing: 0; }
.overview-layout { grid-template-columns: minmax(0, 1.7fr) minmax(320px, .72fr); gap: 16px; }
.overview-primary, .overview-secondary { gap: 12px; }

.task-composer-card,
.section-card,
.pricing-panel,
.benefit-panel,
.task-list-pane,
.task-detail,
.device-card {
  border: 1px solid var(--colorNeutralStroke2);
  border-radius: var(--borderRadiusLarge);
  background: var(--colorNeutralBackground1);
  box-shadow: var(--shadow2);
}

.task-composer-card { padding: 24px; }
.task-composer-card form { margin-top: 20px; }
.section-card { padding: 18px; }
.section-card-header h2 { font-size: var(--fontSizeBase400); line-height: var(--lineHeightBase400); }
.membership-summary-card { border-color: var(--colorNeutralStroke2); border-radius: var(--borderRadiusLarge); background: var(--colorNeutralBackground1); box-shadow: var(--shadow2); }

fluent-text-input,
fluent-textarea { width: 100%; min-width: 0; }
.device-select-shell { position: relative; width: min(520px, 100%); }
fluent-dropdown.device-select { width: 100%; }
.target-device-display { position: absolute; inset: 1px 42px 1px 1px; z-index: 2; padding: 0 14px; display: flex; align-items: center; overflow: hidden; border-radius: var(--borderRadiusMedium) 0 0 var(--borderRadiusMedium); color: var(--colorNeutralForeground1); background: var(--colorNeutralBackground1); pointer-events: none; text-overflow: ellipsis; white-space: nowrap; }
.target-device-chevron { position: absolute; top: 50%; right: 14px; z-index: 3; width: 18px; height: 18px; fill: none; stroke: var(--colorNeutralForeground3); stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.5; pointer-events: none; transform: translateY(-50%); }
.device-select-shell:focus-within .target-device-display { background: var(--colorNeutralBackground1); }
.field fluent-text-input { margin-top: 7px; }
.code-field { grid-template-columns: minmax(0, 1fr) auto; align-items: stretch; }
.prompt-field fluent-textarea { display: block; }
.prompt-field fluent-textarea::part(control) { min-height: 132px; font-size: var(--fontSizeBase300); line-height: var(--lineHeightBase400); }

fluent-button.fluent-action,
fluent-anchor-button.fluent-action { vertical-align: middle; }
fluent-button.fluent-action.block { display: block; width: 100%; }
fluent-button.fluent-action.block::part(content) { justify-content: center; }
.composer-actions fluent-button { min-width: 120px; }

.task-split { min-height: calc(100dvh - 146px); grid-template-columns: minmax(360px, 420px) minmax(0, 1fr); gap: 12px; }
.task-list-pane, .task-detail { border-radius: var(--borderRadiusLarge); box-shadow: none; }
fluent-tablist.task-filters { display: flex; min-height: 48px; padding: 6px 10px 0; border-bottom: 1px solid var(--colorNeutralStroke2); }
.task-list { max-height: calc(100dvh - 202px); padding: 6px; overflow-x: hidden; gap: 2px; }
.task-list-item { min-height: 76px; padding: 12px; border: 1px solid transparent; border-radius: var(--borderRadiusMedium); background: transparent; }
.task-list-item:hover { background: var(--colorSubtleBackgroundHover); }
.task-list-item.active { border-color: var(--colorBrandStroke2); background: var(--colorBrandBackground2); box-shadow: none; }
.task-detail { padding: 24px 28px; }
.task-detail-header h2 { font-size: var(--fontSizeBase600); line-height: var(--lineHeightBase600); }
.task-original-prompt { border-color: transparent; border-radius: var(--borderRadiusMedium); background: var(--colorNeutralBackground3); }
.approval-card { border-color: var(--colorStatusWarningBorder2); border-radius: var(--borderRadiusMedium); background: var(--colorStatusWarningBackground1); }
.task-timeline { width: min(1040px, 100%); }
.task-event { padding: 0 0 2px 24px; }
.task-event::before { top: 11px; bottom: -8px; left: 5px; background: var(--colorNeutralStroke2); }
.task-event > div { min-width: 0; padding: 0 0 16px; border-bottom: 1px solid var(--colorNeutralStroke2); }
.task-event:last-child > div { border-bottom: 0; }
.task-event .event-marker { border-color: var(--colorNeutralBackground1); background: var(--colorNeutralStrokeAccessible); box-shadow: 0 0 0 1px var(--colorNeutralStroke2); }
.task-event.completed .event-marker { background: var(--colorStatusSuccessForeground1); }
.task-event.current .event-marker { background: var(--colorBrandBackground); box-shadow: 0 0 0 3px var(--colorBrandBackground2); }
.task-event.current header strong { color: var(--colorBrandForeground1); }
.task-event header { min-height: 22px; }
.task-event time { color: var(--colorNeutralForeground4); font-variant-numeric: tabular-nums; }
fluent-progress-bar.event-progress { width: min(240px, 50%); height: auto; margin-top: 10px; overflow: visible; border-radius: 0; background: transparent; }
.task-followup-form fluent-textarea { min-height: 72px; }
.task-followup-form fluent-textarea::part(control) { min-height: 72px; }

.device-grid { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 12px; }
.device-card { min-height: 188px; padding: 20px; }
.device-card footer { margin-top: 18px; }

.pricing-panel, .benefit-panel { padding: 22px; border-radius: var(--borderRadiusLarge); }
.price-option { min-height: 144px; border-radius: var(--borderRadiusMedium); }
.price-option.selected { border-color: var(--colorBrandStroke1); background: var(--colorBrandBackground2); box-shadow: none; }

.passport-dialog { border-radius: var(--borderRadiusXLarge); background: var(--colorNeutralBackground1); box-shadow: var(--shadow64); }
.passport-takeover-option { align-items: flex-start; cursor: default; }
.passport-takeover-option > label { display: grid; cursor: pointer; }
.passport-takeover-option > label small { margin-top: 2px; color: var(--colorNeutralForeground2); font-size: var(--fontSizeBase200); }
.passport-checkbox { display: none; }

.theme-options { border-color: var(--colorNeutralStroke2); border-radius: var(--borderRadiusMedium); background: var(--colorNeutralBackground2); }
.theme-options fluent-button { min-width: 0; }
.theme-options fluent-button.active { color: var(--colorBrandForeground1); }
.account-popover { border-color: var(--colorNeutralStroke2); border-radius: var(--borderRadiusLarge); background: var(--colorNeutralBackground1); box-shadow: var(--shadow16); }

@media (orientation: landscape) and (max-width: 1100px) {
  .app-frame { grid-template-columns: 72px minmax(0, 1fr); }
}

@media (orientation: portrait), (max-width: 719px) {
  .app-header-main { height: 56px; }
  .portrait-section-tabs { height: 48px; border-top-color: var(--colorNeutralStroke2); background: var(--colorNeutralBackground1); }
  .app-frame { height: calc(100dvh - 104px - env(safe-area-inset-top)); }
  .app-content { padding: 16px 12px calc(28px + env(safe-area-inset-bottom)); }
  .workspace-filing { padding-top: 28px; padding-bottom: calc(6px + env(safe-area-inset-bottom)); }
  .page-heading h1, .task-composer-card h1 { font-size: var(--fontSizeBase500); line-height: var(--lineHeightBase500); }
  .task-composer-card, .section-card, .pricing-panel, .benefit-panel, .task-list-pane, .task-detail, .device-card { border-radius: var(--borderRadiusLarge); }
  .task-composer-card { padding: 18px 16px; }
  .task-detail { padding: 16px; }
  .task-authorization-body { padding: 20px 18px 22px; }
}

/* Workspace polish: layered surfaces, restrained motion, no boxed dashboard chrome. */
.membership-chip {
  border-color: transparent;
  background: var(--colorNeutralBackground2);
  transition: background-color var(--durationFast) var(--curveEasyEase);
}
.membership-chip:hover { background: var(--colorNeutralBackground2Hover); }

.sidebar-nav button,
.sidebar-control-link,
.sidebar-account {
  transition:
    color var(--durationFast) var(--curveEasyEase),
    background-color var(--durationFast) var(--curveEasyEase),
    transform var(--durationFast) var(--curveDecelerateMid);
}
.sidebar-nav button:active,
.sidebar-control-link:active,
.sidebar-account:active { transform: scale(.985); }
.sidebar-control-link,
.sidebar-account { border-color: transparent; box-shadow: none; }

.task-composer-card,
.section-card,
.pricing-panel,
.benefit-panel,
.task-list-pane,
.task-detail,
.device-card,
.membership-summary-card {
  border-color: transparent;
  box-shadow: var(--shadow4);
}

.task-composer-card,
.section-card,
.pricing-panel,
.benefit-panel,
.device-card,
.membership-summary-card {
  transition:
    box-shadow var(--durationNormal) var(--curveEasyEase),
    transform var(--durationNormal) var(--curveDecelerateMid);
}

.compact-task-item,
.quick-device-item {
  border-color: transparent;
  background: var(--colorNeutralBackground2);
  transition:
    color var(--durationFast) var(--curveEasyEase),
    background-color var(--durationFast) var(--curveEasyEase),
    transform var(--durationFast) var(--curveDecelerateMid);
}
.compact-task-item:hover:not(:disabled),
.quick-device-item:hover:not(:disabled) {
  border-color: transparent;
  background: var(--colorNeutralBackground2Hover);
  transform: translateY(-1px);
}
.quick-device-item em { display: inline-flex; align-items: center; gap: 6px; }
.quick-device-item em::before { width: 6px; height: 6px; border-radius: 50%; background: var(--colorNeutralForegroundDisabled); content: ""; }
.quick-device-item em.online::before { background: var(--colorStatusSuccessForeground1); box-shadow: 0 0 0 3px var(--colorStatusSuccessBackground1); }

.task-list-pane {
  height: calc(100dvh - 146px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}
.task-detail { height: calc(100dvh - 146px); overflow: auto; }
.task-list { height: 100%; min-height: 0; max-height: none; overscroll-behavior: contain; }
.task-filters { align-items: center; }
.filter-count {
  min-width: 20px;
  height: 20px;
  margin-inline-start: 5px;
  padding: 0 6px;
  display: inline-grid;
  place-items: center;
  border-radius: var(--borderRadiusCircular);
  color: var(--colorNeutralForeground3);
  background: var(--colorNeutralBackground3);
  font-size: var(--fontSizeBase100);
  font-variant-numeric: tabular-nums;
}
fluent-tab[aria-selected="true"] .filter-count,
fluent-tab.active .filter-count {
  color: var(--colorBrandForeground1);
  background: var(--colorBrandBackground2);
}

.task-list-item {
  border-color: transparent;
  transition:
    background-color var(--durationFast) var(--curveEasyEase),
    box-shadow var(--durationFast) var(--curveEasyEase),
    transform var(--durationFast) var(--curveDecelerateMid);
}
.task-list-item:hover {
  background: var(--colorNeutralBackground2Hover);
  transform: translateY(-1px);
}
.task-list-item.active {
  border-color: transparent;
  background: var(--colorBrandBackground2);
  box-shadow: var(--shadow2);
}
.task-list-item header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}
.task-live-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--colorBrandForeground1);
  font-size: var(--fontSizeBase200);
  font-weight: var(--fontWeightSemibold);
  white-space: nowrap;
}
.task-live-status fluent-spinner { width: 16px; height: 16px; flex: 0 0 16px; }
.task-detail-header > .task-live-status { margin-top: 1px; }

.page.active { animation: workspace-page-in var(--durationNormal) var(--curveDecelerateMid) both; }
.task-detail:not(.loading-detail) { animation: workspace-detail-in var(--durationNormal) var(--curveDecelerateMid) both; }
.task-event { animation: workspace-event-in var(--durationNormal) var(--curveDecelerateMid) both; }
.account-popover:not([hidden]) { animation: workspace-popover-in var(--durationFast) var(--curveDecelerateMid) both; }
.passport-modal-layer:not([hidden]) { animation: workspace-overlay-in var(--durationFast) var(--curveEasyEase) both; }
.passport-modal-layer:not([hidden]) .passport-dialog { animation: workspace-dialog-in var(--durationNormal) var(--curveDecelerateMid) both; }
.toast { animation: workspace-toast-in var(--durationNormal) var(--curveDecelerateMid) both; }

@keyframes workspace-page-in {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes workspace-detail-in {
  from { opacity: .55; transform: translateX(7px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes workspace-event-in {
  from { opacity: 0; transform: translateY(3px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes workspace-popover-in {
  from { opacity: 0; transform: translateY(-5px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes workspace-overlay-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes workspace-dialog-in {
  from { opacity: 0; transform: translateY(12px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes workspace-toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (orientation: portrait), (max-width: 719px) {
  .task-list-pane,
  .task-detail { height: calc(100dvh - 128px - env(safe-area-inset-top)); }
}

@media (prefers-reduced-motion: reduce) {
  .page.active,
  .task-detail:not(.loading-detail),
  .task-event,
  .account-popover:not([hidden]),
  .passport-modal-layer:not([hidden]),
  .passport-modal-layer:not([hidden]) .passport-dialog,
  .toast { animation: none; }
  .sidebar-nav button,
  .sidebar-control-link,
  .sidebar-account,
  .compact-task-item,
  .quick-device-item,
  .task-list-item,
  .task-composer-card,
  .section-card,
  .pricing-panel,
  .benefit-panel,
  .device-card,
  .membership-summary-card { transition: none; transform: none; }
}

/* Rich workspace composition: account, quota and membership. */
.account-actions { gap: 10px; }
.theme-quick-actions { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: var(--borderRadiusCircular); background: var(--colorNeutralBackground2); }
.theme-icon-button { position: relative; width: 34px; height: 34px; padding: 0; display: grid; place-items: center; border: 0; border-radius: 50%; color: var(--colorNeutralForeground3); background: transparent; cursor: pointer; transition: color var(--durationFast) var(--curveEasyEase), background-color var(--durationFast) var(--curveEasyEase), transform var(--durationNormal) var(--curveDecelerateMid); }
.theme-icon-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.6; }
.theme-icon-button:hover { color: var(--colorNeutralForeground1); background: var(--colorNeutralBackground1Hover); transform: translateY(-1px); }
.theme-icon-button:active { transform: scale(.9); }
.theme-icon-button.active { color: var(--colorBrandForeground1); background: var(--colorBrandBackground2); box-shadow: var(--shadow2); }
.theme-icon-button[data-theme-choice="light"].active svg { animation: theme-sun-in var(--durationSlow) var(--curveDecelerateMax); }
.theme-icon-button[data-theme-choice="dark"].active svg { animation: theme-moon-in var(--durationSlow) var(--curveDecelerateMax); }

.account-summary-button { min-height: 44px; padding: 5px 10px 5px 6px; display: grid; grid-template-columns: 32px minmax(84px, auto) auto 16px; align-items: center; gap: 8px; border: 1px solid transparent; border-radius: var(--borderRadiusLarge); color: var(--colorNeutralForeground1); background: var(--colorNeutralBackground2); cursor: pointer; box-shadow: none; text-align: left; transition: border-color var(--durationFast) var(--curveEasyEase), background-color var(--durationFast) var(--curveEasyEase), box-shadow var(--durationNormal) var(--curveEasyEase), transform var(--durationNormal) var(--curveDecelerateMid); }
.account-summary-button:hover { border-color: var(--colorNeutralStroke2); background: var(--colorNeutralBackground2Hover); box-shadow: var(--shadow4); transform: translateY(-1px); }
.account-summary-button:active { transform: translateY(0) scale(.99); }
.account-summary-button[aria-expanded="true"] { border-color: var(--colorBrandStroke2); background: var(--colorBrandBackground2); box-shadow: var(--shadow4); }
.header-avatar { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; color: var(--colorNeutralForegroundOnBrand); background: linear-gradient(135deg, var(--colorBrandBackground), var(--colorPalettePurpleForeground2)); font-size: var(--fontSizeBase200); font-weight: var(--fontWeightBold); box-shadow: var(--shadow4Brand); }
.account-summary-copy { min-width: 0; display: grid; }
.account-summary-copy strong { font-size: var(--fontSizeBase200); line-height: var(--lineHeightBase200); }
.account-summary-copy small { margin-top: 1px; color: var(--colorNeutralForeground3); font-size: var(--fontSizeBase100); font-variant-numeric: tabular-nums; }
.account-tier-badge { padding: 3px 7px; border-radius: var(--borderRadiusCircular); color: var(--colorPaletteDarkOrangeForeground2); background: var(--colorPaletteDarkOrangeBackground2); font-size: var(--fontSizeBase100); font-weight: var(--fontWeightSemibold); white-space: nowrap; }
.account-chevron { width: 16px; height: 16px; fill: none; stroke: var(--colorNeutralForeground3); stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.6; transition: transform var(--durationNormal) var(--curveDecelerateMid); }
.account-summary-button[aria-expanded="true"] .account-chevron { transform: rotate(180deg); }

.account-popover { width: 268px; padding: 8px; gap: 4px; border: 1px solid var(--colorNeutralStroke2); background: color-mix(in srgb, var(--colorNeutralBackground1) 96%, transparent); box-shadow: var(--shadow28); backdrop-filter: blur(22px) saturate(1.12); }
.account-popover-profile { margin-bottom: 4px; padding: 11px; display: flex; align-items: center; gap: 10px; border: 1px solid color-mix(in srgb, var(--colorBrandStroke2) 45%, transparent); border-radius: var(--borderRadiusLarge); background: color-mix(in srgb, var(--colorBrandBackground2) 52%, var(--colorNeutralBackground1)); }
.account-popover-avatar { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; color: var(--colorNeutralForegroundOnBrand); background: linear-gradient(135deg, var(--colorBrandBackground), var(--colorPalettePurpleForeground2)); font-weight: var(--fontWeightBold); }
.account-popover-profile > div { display: grid; }
.account-popover-profile strong { font-size: var(--fontSizeBase300); }
.account-popover-profile span:last-child { margin-top: 2px; color: var(--colorNeutralForeground2); font-size: var(--fontSizeBase200); }
.account-popover-action { width: 100%; border-radius: var(--borderRadiusMedium); }
.account-popover-action svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.6; }
.account-popover-action.danger { color: var(--colorStatusDangerForeground1); }
.account-popover .account-popover-action { border: 0; color: var(--colorNeutralForeground1); background: transparent; box-shadow: none; }
.account-popover .account-popover-action:hover { color: var(--colorNeutralForeground1); background: var(--colorNeutralBackground2Hover); }
.account-popover .account-popover-action:active { background: var(--colorNeutralBackground2Pressed); }
.account-popover .account-popover-action.membership { margin-block: 3px; color: var(--colorNeutralForegroundOnBrand); background: var(--colorBrandBackground); font-weight: var(--fontWeightSemibold); }
.account-popover .account-popover-action.membership:hover { color: var(--colorNeutralForegroundOnBrand); background: var(--colorBrandBackgroundHover); }
.account-popover .account-popover-action.membership:active { background: var(--colorBrandBackgroundPressed); }
.account-popover .account-popover-action.membership svg { color: currentColor; }
.account-popover .account-popover-action.membership.is-vip { color: var(--colorBrandForeground1); background: var(--colorBrandBackground2); }
.account-popover .account-popover-action.membership.is-vip:hover { background: var(--colorBrandBackground2Hover); }
.account-popover .account-popover-action.danger { margin-top: 3px; border-top: 1px solid var(--colorNeutralStroke2); border-radius: 0 0 var(--borderRadiusMedium) var(--borderRadiusMedium); color: var(--colorStatusDangerForeground1); background: transparent; }
.account-popover .account-popover-action.danger:hover { color: var(--colorStatusDangerForeground1); background: var(--colorStatusDangerBackground1); }

.task-composer-card { background: var(--colorNeutralBackground1); box-shadow: var(--shadow8); }
.task-composer-card form { gap: 0; }
.composer-workbench { padding: 10px; display: grid; gap: 0; border: 1px solid var(--colorNeutralStroke2); border-radius: var(--borderRadiusXLarge); background: var(--colorNeutralBackground2); box-shadow: inset 0 1px 0 color-mix(in srgb, var(--colorNeutralForegroundOnBrand) 56%, transparent); transition: border-color var(--durationNormal) var(--curveEasyEase), box-shadow var(--durationNormal) var(--curveEasyEase), background-color var(--durationNormal) var(--curveEasyEase); }
.composer-workbench:hover { border-color: var(--colorNeutralStroke1Hover); }
.composer-workbench:focus-within { border-color: var(--colorBrandStroke1); background: var(--colorNeutralBackground1); box-shadow: 0 0 0 3px color-mix(in srgb, var(--colorBrandStroke2) 30%, transparent), var(--shadow4); }
.composer-device-row { width: min(520px, 100%); padding: 4px 6px 10px; display: grid; gap: 6px; }
.device-select-shell { width: 100%; }
.target-device-display { background: var(--colorNeutralBackground1); transition: background-color var(--durationFast) var(--curveEasyEase); }
.device-select-shell:has(fluent-listbox:popover-open) .target-device-chevron { transform: translateY(-50%) rotate(180deg); }
.target-device-chevron { transition: transform var(--durationNormal) var(--curveDecelerateMid); }
.prompt-field { padding-top: 8px; display: block; border-top: 1px solid var(--colorNeutralStroke2); }
.prompt-field fluent-textarea { --background-color: transparent; --border-color: transparent; --border-block-end-color: transparent; --box-shadow: none; }
.prompt-field fluent-textarea::part(root) { min-height: 124px; border: 0; border-radius: var(--borderRadiusLarge); background: transparent; box-shadow: none; resize: vertical; }
.prompt-field fluent-textarea::part(root)::after { display: none; }
.prompt-field fluent-textarea::part(control) { padding: 4px 2px; }
.composer-actions { padding: 8px 4px 2px; }
.composer-actions fluent-button { min-width: 132px; }
.continuation-card,
.device-quick-card { position: relative; overflow: hidden; background: var(--colorNeutralBackground1); }
.device-quick-card::after { position: absolute; right: -56px; bottom: -84px; width: 180px; height: 180px; border-radius: 50%; background: color-mix(in srgb, var(--colorPaletteGreenBackground2) 46%, transparent); content: ""; pointer-events: none; filter: blur(2px); }
.device-quick-card > * { position: relative; z-index: 1; }

.quota-summary-card { padding: 18px; display: grid; gap: 14px; overflow: hidden; border-color: transparent; background: var(--colorNeutralBackground1); box-shadow: var(--shadow4); }
.quota-card-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.quota-membership-action { min-height: 36px; padding: 0 13px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid transparent; border-radius: var(--borderRadiusMedium); color: var(--colorNeutralForegroundOnBrand); background: var(--colorBrandBackground); box-shadow: var(--shadow4Brand); cursor: pointer; font: inherit; font-size: var(--fontSizeBase200); font-weight: var(--fontWeightSemibold); white-space: nowrap; transition: background-color var(--durationFast) var(--curveEasyEase), box-shadow var(--durationFast) var(--curveEasyEase), transform var(--durationFast) var(--curveDecelerateMid); }
.quota-membership-action svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.6; }
.quota-membership-action:hover { background: var(--colorBrandBackgroundHover); box-shadow: var(--shadow8Brand); transform: translateY(-1px); }
.quota-membership-action:active { background: var(--colorBrandBackgroundPressed); box-shadow: var(--shadow2); transform: translateY(0); }
.quota-membership-action:focus-visible { outline: 3px solid color-mix(in srgb, var(--colorBrandStroke1) 34%, transparent); outline-offset: 2px; }
.quota-membership-action.is-vip { border-color: var(--colorBrandStroke2); color: var(--colorBrandForeground1); background: var(--colorBrandBackground2); box-shadow: none; }
.quota-membership-action.is-vip:hover { background: var(--colorBrandBackground2Hover); box-shadow: var(--shadow4); }
.quota-title { min-width: 0; display: flex; align-items: center; gap: 10px; }
.quota-title > svg { width: 24px; height: 24px; flex: 0 0 24px; fill: none; stroke: var(--colorBrandForeground1); stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.quota-title > div { min-width: 0; display: grid; }
.quota-title strong { margin-top: 2px; font-size: var(--fontSizeBase400); }
.quota-meter { display: grid; gap: 7px; }
.quota-meter > div { display: flex; justify-content: space-between; gap: 10px; color: var(--colorNeutralForeground2); font-size: var(--fontSizeBase200); }
.quota-meter > div strong { color: var(--colorNeutralForeground1); font-variant-numeric: tabular-nums; }
.quota-meter fluent-progress-bar { width: 100%; }
.quota-meter-input fluent-progress-bar { --colorCompoundBrandBackground: var(--colorPaletteBlueForeground2); }
.quota-meter-output fluent-progress-bar { --colorCompoundBrandBackground: var(--colorPaletteTealForeground2); }
.quota-summary-card > footer { color: var(--colorNeutralForeground3); font-size: var(--fontSizeBase100); }

.device-card footer fluent-button,
.device-card footer fluent-anchor-button { flex: 1 1 0; }
.device-card footer .device-task-action { min-width: 0; }

.membership-experience { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.membership-purchase-panel { position: relative; padding: 26px; overflow: hidden; border: 0; background: radial-gradient(680px 240px at 88% -25%, color-mix(in srgb, var(--colorPalettePurpleBackground2) 88%, transparent), transparent 68%), linear-gradient(145deg, var(--colorNeutralBackground1), var(--colorBrandBackground2)); box-shadow: var(--shadow16); }
.membership-section-heading { display: flex; align-items: center; gap: 12px; }
.membership-section-heading > svg { width: 28px; height: 28px; flex: 0 0 28px; fill: none; stroke: var(--colorBrandForeground1); stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.membership-section-heading > div { display: grid; }
.membership-section-heading h2 { margin: 0; font-size: var(--fontSizeBase500); line-height: var(--lineHeightBase500); }
.membership-section-heading span { margin-top: 3px; color: var(--colorNeutralForeground2); font-size: var(--fontSizeBase200); }
.membership-purchase-panel .price-options { margin-top: 22px; }
.membership-purchase-panel .price-option { border-color: transparent; background: color-mix(in srgb, var(--colorNeutralBackground1) 82%, transparent); box-shadow: var(--shadow4); transition: background-color var(--durationNormal) var(--curveEasyEase), box-shadow var(--durationNormal) var(--curveEasyEase), transform var(--durationNormal) var(--curveDecelerateMid); }
.membership-purchase-panel .price-option:hover { transform: translateY(-3px); box-shadow: var(--shadow16); }
.membership-purchase-panel .price-option.selected { border-color: transparent; background: linear-gradient(145deg, var(--colorBrandBackground2), var(--colorPalettePurpleBackground2)); box-shadow: 0 0 0 2px var(--colorBrandStroke1), var(--shadow16Brand); transform: translateY(-2px); }
.membership-purchase-actions { margin-top: 18px; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-radius: var(--borderRadiusLarge); background: color-mix(in srgb, var(--colorNeutralBackground1) 80%, transparent); backdrop-filter: blur(12px); }
.membership-purchase-actions > div { display: grid; }
.membership-purchase-actions span { color: var(--colorNeutralForeground3); font-size: var(--fontSizeBase100); }
.membership-purchase-actions strong { margin-top: 2px; font-size: var(--fontSizeBase300); }
.membership-purchase-actions #checkoutButton { min-width: 170px; }

.benefit-comparison-panel { padding: 26px; border-radius: var(--borderRadiusXLarge); background: var(--colorNeutralBackground1); box-shadow: var(--shadow16); }
.comparison-heading > svg { color: var(--colorPaletteBlueForeground2); }
.benefit-comparison { margin-top: 22px; overflow: hidden; border-radius: var(--borderRadiusLarge); background: var(--colorNeutralBackground2); }
.comparison-row { min-height: 54px; padding: 0 18px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(110px, .22fr) minmax(130px, .25fr); align-items: center; gap: 14px; border-bottom: 1px solid var(--colorNeutralStroke2); transition: background-color var(--durationFast) var(--curveEasyEase), transform var(--durationFast) var(--curveDecelerateMid); }
.comparison-row:not(.comparison-header):hover { position: relative; z-index: 1; background: var(--colorNeutralBackground2Hover); transform: translateX(3px); }
.comparison-row:last-child { border-bottom: 0; }
.comparison-header { min-height: 58px; color: var(--colorNeutralForeground2); background: linear-gradient(90deg, var(--colorNeutralBackground3), var(--colorBrandBackground2)); }
.comparison-row > :nth-child(2), .comparison-row > :nth-child(3) { justify-self: center; text-align: center; }
.comparison-row > span:first-child { display: inline-flex; align-items: center; gap: 10px; font-weight: var(--fontWeightSemibold); }
.comparison-row > span:first-child svg { width: 20px; height: 20px; flex: 0 0 20px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.55; }
.comparison-row[data-tone="blue"] > span:first-child { color: var(--colorPaletteBlueForeground2); }
.comparison-row[data-tone="purple"] > span:first-child { color: var(--colorPalettePurpleForeground2); }
.comparison-row[data-tone="cyan"] > span:first-child { color: var(--colorPaletteLightTealForeground2); }
.comparison-row[data-tone="orange"] > span:first-child { color: var(--colorPaletteDarkOrangeForeground2); }
.comparison-row[data-tone="green"] > span:first-child { color: var(--colorPaletteGreenForeground2); }
.comparison-row[data-tone="teal"] > span:first-child { color: var(--colorPaletteTealForeground2); }
.comparison-row[data-tone="red"] > span:first-child { color: var(--colorPaletteRedForeground2); }
.vip-column-title { min-height: 36px; padding: 0 14px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: var(--borderRadiusCircular); color: var(--colorBrandForeground1); background: var(--colorBrandBackground2); }
.vip-column-title svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.5; }
.comparison-group { min-height: 34px; padding: 0 18px; display: flex; align-items: center; color: var(--colorNeutralForeground3); background: var(--colorNeutralBackground3); font-size: var(--fontSizeBase100); font-weight: var(--fontWeightSemibold); letter-spacing: .04em; }
.compare-yes, .compare-no { width: 28px; height: 28px; display: inline-grid; place-items: center; border-radius: 50%; font-size: var(--fontSizeBase300); font-weight: var(--fontWeightBold); }
.compare-yes { color: var(--colorStatusSuccessForeground1); background: var(--colorStatusSuccessBackground1); }
.compare-no { color: var(--colorStatusDangerForeground1); background: var(--colorStatusDangerBackground1); }
.membership-support-row { margin-top: 18px; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.membership-support-row details { max-width: 760px; color: var(--colorNeutralForeground2); }
.membership-support-row summary { color: var(--colorNeutralForeground1); cursor: pointer; font-weight: var(--fontWeightSemibold); }
.membership-support-row p { line-height: 1.65; }
.membership-support-row a { color: var(--colorBrandForegroundLink); font-weight: var(--fontWeightSemibold); white-space: nowrap; }

.page.active .membership-purchase-panel { animation: membership-panel-in var(--durationSlow) var(--curveDecelerateMax) both; }
.page.active .benefit-comparison-panel { animation: membership-panel-in var(--durationSlow) var(--curveDecelerateMax) .06s both; }
.page.active .comparison-row { animation: comparison-row-in var(--durationNormal) var(--curveDecelerateMid) both; }
.page.active .comparison-row:nth-child(3n + 1) { animation-delay: .03s; }
.page.active .comparison-row:nth-child(3n + 2) { animation-delay: .06s; }
.page.active .comparison-row:nth-child(3n) { animation-delay: .09s; }

@keyframes theme-sun-in { from { opacity: .35; transform: rotate(-35deg) scale(.7); } to { opacity: 1; transform: rotate(0) scale(1); } }
@keyframes theme-moon-in { from { opacity: .35; transform: translate(3px, -2px) rotate(18deg); } to { opacity: 1; transform: translate(0) rotate(0); } }
@keyframes membership-panel-in { from { opacity: 0; transform: translateY(12px) scale(.99); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes comparison-row-in { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: translateX(0); } }

@media (max-width: 960px) {
  .account-summary-copy { display: none; }
  .account-summary-button { grid-template-columns: 32px auto 16px; }
  .comparison-row { grid-template-columns: minmax(0, 1fr) 92px 104px; }
}

@media (orientation: portrait), (max-width: 719px) {
  .app-header { height: calc(104px + env(safe-area-inset-top)); }
  .theme-quick-actions { gap: 0; }
  .theme-icon-button { width: 32px; height: 32px; }
  .account-summary-button { min-height: 38px; padding: 3px 6px; grid-template-columns: 30px 14px; gap: 4px; background: transparent; box-shadow: none; }
  .header-avatar { width: 30px; height: 30px; }
  .account-tier-badge, .account-summary-copy { display: none; }
  .account-popover { right: 10px; width: min(260px, calc(100vw - 20px)); }
  .quota-summary-card { padding: 16px; }
  .membership-purchase-panel, .benefit-comparison-panel { padding: 18px 14px; }
  .membership-purchase-actions { align-items: stretch; flex-direction: column; }
  .membership-purchase-actions #checkoutButton { width: 100%; }
  .comparison-row { min-height: 58px; padding: 0 10px; grid-template-columns: minmax(0, 1fr) 58px 66px; gap: 6px; }
  .comparison-row > span:first-child { gap: 7px; font-size: var(--fontSizeBase200); }
  .comparison-row > span:first-child svg { width: 18px; height: 18px; flex-basis: 18px; }
  .comparison-header { font-size: var(--fontSizeBase200); }
  .vip-column-title { min-height: 30px; padding: 0 8px; }
  .membership-support-row { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  .theme-icon-button[data-theme-choice="light"].active svg,
  .theme-icon-button[data-theme-choice="dark"].active svg,
  .page.active .membership-purchase-panel,
  .page.active .benefit-comparison-panel,
  .page.active .comparison-row { animation: none; }
}

/* Final web/mobile composition overrides. Keep structure separate from the desktop client. */
.app-sidebar { gap: 18px; }
.mobile-workspace-filing { display: none; }
.account-summary-button { padding-left: 8px; grid-template-columns: auto minmax(84px, auto) 16px; }
.membership-experience { width: min(1180px, 100%); margin-inline: auto; gap: 14px; }
.membership-purchase-panel,
.benefit-comparison-panel { padding: 24px; border: 1px solid var(--colorNeutralStroke2); border-radius: var(--borderRadiusLarge); background: var(--colorNeutralBackground1); box-shadow: none; }
.membership-purchase-panel { overflow: visible; }
.membership-section-heading > svg { display: none; }
.membership-purchase-panel .price-options { margin-top: 20px; gap: 12px; }
.membership-purchase-panel .price-option { min-height: 232px; padding: 22px; grid-template-rows: auto auto 1fr auto; align-content: stretch; border: 1px solid var(--colorNeutralStroke2); border-radius: var(--borderRadiusLarge); color: var(--colorNeutralForeground1); background: var(--colorNeutralBackground1); box-shadow: none; text-align: left; transform: none; }
.membership-purchase-panel .price-option:hover { border-color: var(--colorNeutralStroke1Hover); background: var(--colorNeutralBackground1Hover); box-shadow: none; transform: none; }
.membership-purchase-panel .price-option.selected { border-color: var(--colorBrandStroke1); background: var(--colorBrandBackground2); box-shadow: 0 0 0 1px var(--colorBrandStroke1); transform: none; }
.price-option strong { margin-top: 22px; align-self: start; font-size: clamp(34px, 3vw, 48px); line-height: 1; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.price-option strong small { margin-left: 4px; color: var(--colorNeutralForeground3); font-size: var(--fontSizeBase200); letter-spacing: 0; }
.membership-purchase-actions { margin-top: 12px; padding: 14px 0 0; border-top: 1px solid var(--colorNeutralStroke2); border-radius: 0; background: transparent; backdrop-filter: none; }
.benefit-comparison-panel { padding: 24px; }
.benefit-comparison { margin-top: 18px; border: 1px solid var(--colorNeutralStroke2); border-radius: var(--borderRadiusLarge); background: transparent; }
.comparison-row { min-height: 50px; border-bottom-color: var(--colorNeutralStroke2); }
.comparison-row:not(.comparison-header):hover { background: var(--colorNeutralBackground2Hover); transform: none; }
.comparison-header { background: var(--colorNeutralBackground2); }
.comparison-group { background: var(--colorNeutralBackground3); letter-spacing: 0; }
.comparison-row > span:first-child,
.comparison-row[data-tone] > span:first-child { color: var(--colorNeutralForeground1); }
.comparison-row > span:first-child svg { color: var(--colorNeutralForeground3); }
.compare-yes,
.compare-no { width: auto; height: auto; background: transparent; }
.compare-no { color: var(--colorNeutralForeground4); }
.vip-column-title { background: transparent; }
.page.active .membership-purchase-panel,
.page.active .benefit-comparison-panel,
.page.active .comparison-row { animation: none; }

@media (max-width: 960px) {
  .account-summary-button { grid-template-columns: auto 16px; }
}

@media (orientation: portrait), (max-width: 719px) {
  .mobile-workspace-filing { display: flex; }
  .account-summary-button { min-height: 38px; padding: 3px 5px; grid-template-columns: auto 14px; gap: 4px; background: transparent; box-shadow: none; }
  .account-tier-mark { min-width: 40px; height: 28px; }
  .membership-purchase-panel,
  .benefit-comparison-panel { padding: 18px 14px; }
  .membership-purchase-panel .price-option { min-height: 196px; }
}

/* LanBridge Web visual language. Fluent components remain implementation details only. */
:root {
  --web-canvas: #f3f7fb;
  --web-panel: #ffffff;
  --web-panel-muted: #eef4f8;
  --web-panel-hover: #e5eff6;
  --web-text: #0d2c46;
  --web-muted: #62778a;
  --web-faint: #93a2af;
  --web-line: #d8e3ec;
  --web-accent: #175c9f;
  --web-accent-hover: #104b87;
  --web-accent-soft: #e8f2fb;
  --web-teal: #16aaa5;
  --web-teal-soft: #e7f8f6;
  --web-success: #218463;
  --web-success-soft: #eaf7f2;
  --web-warning: #a56816;
  --web-danger: #ba3e4a;
  --web-radius: 12px;
  --web-shadow: 0 8px 26px rgba(31, 30, 27, .055);
  --primary: var(--web-accent);
  --primary-hover: var(--web-accent-hover);
  --primary-soft: var(--web-accent-soft);
  --cyan-soft: var(--web-teal-soft);
}
html[data-theme="dark"] {
  --web-canvas: #091725;
  --web-panel: #102438;
  --web-panel-muted: #153149;
  --web-panel-hover: #1b3d57;
  --web-text: #edf6fc;
  --web-muted: #a6bdce;
  --web-faint: #718b9f;
  --web-line: #294a62;
  --web-accent: #69adf0;
  --web-accent-hover: #83bdf5;
  --web-accent-soft: #193b5d;
  --web-teal: #45d1c7;
  --web-teal-soft: #173e43;
  --web-success: #70d2a9;
  --web-success-soft: #173e35;
  --web-warning: #e7ad61;
  --web-danger: #f0808b;
  --web-shadow: 0 12px 34px rgba(0, 0, 0, .22);
}
@media (prefers-color-scheme: dark) {
  html[data-theme="system"] {
    --web-canvas: #091725;
    --web-panel: #102438;
    --web-panel-muted: #153149;
    --web-panel-hover: #1b3d57;
    --web-text: #edf6fc;
    --web-muted: #a6bdce;
    --web-faint: #718b9f;
    --web-line: #294a62;
    --web-accent: #69adf0;
    --web-accent-hover: #83bdf5;
    --web-accent-soft: #193b5d;
    --web-teal: #45d1c7;
    --web-teal-soft: #173e43;
    --web-success: #70d2a9;
    --web-success-soft: #173e35;
    --web-warning: #e7ad61;
    --web-danger: #f0808b;
    --web-shadow: 0 12px 34px rgba(0, 0, 0, .22);
  }
}
body { color: var(--web-text); background: var(--web-canvas); }
.app-header { border-bottom: 1px solid var(--web-line); background: color-mix(in srgb, var(--web-panel) 94%, transparent); box-shadow: none; }
.app-sidebar { border-right-color: var(--web-line); background: var(--web-panel); }
.app-content { background: var(--web-canvas); }
.sidebar-nav button { color: var(--web-muted); border-radius: 9px; }
.sidebar-nav button:hover { color: var(--web-text); background: var(--web-panel-muted); }
.sidebar-nav button.active { color: var(--web-accent); background: var(--web-accent-soft); box-shadow: none; }
.sidebar-nav em { color: var(--web-muted); background: var(--web-panel-muted); }
.sidebar-nav button.active em { color: var(--web-accent); background: var(--web-panel); }
.desktop-promo { grid-template-columns: 1fr; border-color: #ddd7ff; color: var(--web-text); background: #f2f0ff; box-shadow: none; }
.desktop-promo:hover { border-color: #c9c0ff; background: #ece9ff; }
html[data-theme="dark"] .desktop-promo { border-color: #45406f; background: #272440; }
.desktop-promo small, .sidebar-filing { color: var(--web-muted); }
.desktop-promo em, .sidebar-filing:hover { color: var(--web-accent); }
.theme-quick-actions, .account-summary-button { background: var(--web-panel-muted); }
.theme-icon-button { color: var(--web-muted); }
.theme-icon-button:hover { color: var(--web-text); background: var(--web-panel-hover); }
.theme-icon-button.active { color: var(--web-accent); background: var(--web-panel); box-shadow: none; }
.account-summary-button { color: var(--web-text); border-color: transparent; box-shadow: none; }
.account-summary-button:hover, .account-summary-button[aria-expanded="true"] { border-color: var(--web-line); background: var(--web-panel); box-shadow: var(--web-shadow); }
.account-summary-copy small { color: var(--web-muted); }
.account-tier-mark, .account-popover-tier { color: var(--web-muted); background: var(--web-panel-hover); }
.account-tier-mark[data-tier="vip"], .account-popover-tier[data-tier="vip"] { color: var(--web-teal); background: var(--web-teal-soft); }
.account-tier-mark[data-tier="admin"], .account-popover-tier[data-tier="admin"] { color: var(--web-accent); background: var(--web-accent-soft); }
.account-popover { border-color: var(--web-line); background: var(--web-panel); box-shadow: var(--web-shadow); }
.account-summary-button {
  min-height: 40px;
  padding: 4px 8px;
  grid-template-columns: auto minmax(0, auto) 16px;
  gap: 7px;
  border-color: transparent;
  border-radius: 12px;
  background: transparent;
  box-shadow: none;
}

/* Final subscription-card contract. Kept last because the workspace carries
   compatibility layers for earlier commerce layouts. */
.membership-purchase-panel .price-option { min-height: 338px; padding: 24px; grid-template-rows: auto auto auto auto 1fr auto; border-color: var(--web-line); background: var(--web-panel); box-shadow: none; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease; }
.membership-purchase-panel .price-option:hover { border-color: color-mix(in srgb, var(--web-accent) 48%, var(--web-line)); background: var(--web-panel); box-shadow: 0 14px 32px color-mix(in srgb, var(--web-accent) 11%, transparent); transform: translateY(-2px); }
.membership-purchase-panel .price-option.selected { border-color: var(--web-accent); background: linear-gradient(145deg, var(--web-accent-soft), var(--web-panel) 72%); box-shadow: 0 0 0 1px var(--web-accent), 0 16px 36px color-mix(in srgb, var(--web-accent) 14%, transparent); }

@media (orientation: portrait), (max-width: 719px) {
  html, body, .workspace { max-width: 100%; overflow-x: hidden; }
  .app-header, .app-frame, .app-content, .page, .membership-layout,
  .membership-purchase-panel, .price-options, .price-option {
    min-width: 0;
    max-width: 100%;
  }
  .app-content { width: 100%; scrollbar-gutter: auto; }
  .membership-purchase-panel .price-option { width: 100%; }
}
.membership-purchase-panel .price-plan > span { display: grid; gap: 4px; color: var(--web-text); }
.membership-purchase-panel .price-plan > span > small { color: var(--web-muted); font-size: 11px; font-weight: 400; }
.membership-purchase-panel .price-discount { margin-top: 18px; display: flex; align-items: center; gap: 9px; }
.membership-purchase-panel .price-discount em { padding: 4px 8px; border-radius: 999px; color: #b42318; background: #fff0ed; font-size: 11px; font-style: normal; font-weight: 700; }
.membership-purchase-panel .price-discount del { color: var(--web-muted); font-size: 12px; }
.membership-purchase-panel .price-value { margin-top: 12px; display: flex; align-items: end; justify-content: space-between; gap: 12px; }
.membership-purchase-panel .price-value > strong { margin: 0; align-self: auto; color: var(--web-text); font-size: clamp(40px, 3.2vw, 56px); line-height: 1; letter-spacing: -.04em; }
.membership-purchase-panel .price-value > strong i { margin-right: 4px; color: var(--web-muted); font-size: .48em; font-style: normal; font-weight: 400; vertical-align: top; }
.membership-purchase-panel .price-value > strong small { margin-left: 4px; color: var(--web-muted); font-size: 12px; letter-spacing: 0; }
.membership-purchase-panel .price-value > b { margin-bottom: 5px; color: #b42318; font-size: 12px; white-space: nowrap; }
.membership-purchase-panel .price-detail { margin-top: 14px; display: grid; gap: 4px; color: var(--web-text); font-size: 13px; font-weight: 650; }
.membership-purchase-panel .price-detail small { color: var(--web-muted); font-size: 11px; font-weight: 400; }
.membership-purchase-panel .price-benefits { margin-top: 16px; display: grid; align-content: start; gap: 7px; color: var(--web-text); font-size: 12px; }
.membership-purchase-panel .price-benefits i { position: relative; padding-left: 17px; font-style: normal; }
.membership-purchase-panel .price-benefits i::before { position: absolute; left: 1px; color: var(--web-success); content: "✓"; font-weight: 800; }
.membership-purchase-panel .price-choice { margin-top: 20px; }

@media (orientation: portrait), (max-width: 719px) {
  .membership-purchase-panel .price-option { min-height: 324px; padding: 20px 18px; }
  .membership-purchase-panel .price-value { align-items: start; flex-direction: column; gap: 6px; }
  .membership-purchase-panel .price-value > b { margin-bottom: 0; }
}
.account-summary-button:hover,
.account-summary-button[aria-expanded="true"] { border-color: transparent; background: transparent; box-shadow: none; transform: none; }
.account-summary-copy { display: block; }
.account-summary-copy strong { color: var(--web-text); font-size: 13px; font-weight: 600; line-height: 1; white-space: nowrap; }
.account-popover {
  width: 252px;
  padding: 12px;
  gap: 6px;
  border-radius: 16px;
}
.account-popover-header { padding: 5px 6px 8px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.account-popover-header > div { min-width: 0; display: grid; gap: 3px; }
.account-popover-header > div > span { color: var(--web-muted); font-size: 11px; }
.account-popover-header strong { overflow: hidden; color: var(--web-text); font-size: 17px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.account-popover-tier { min-width: auto; height: 26px; padding-inline: 9px; }
.account-popover-membership { min-height: 34px; padding: 5px 6px 8px; display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--web-muted); }
.account-popover-membership > strong { color: var(--web-text); font-size: 12px; font-weight: 550; }
.account-popover-membership > span { display: inline-flex; align-items: center; gap: 5px; font-size: 10px; white-space: nowrap; }
.account-popover-membership time { color: var(--web-text); font-size: 10px; font-weight: 600; font-variant-numeric: tabular-nums; }
.account-popover-actions { display: grid; gap: 2px; }
.account-popover-action {
  width: 100%;
  min-height: 42px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 10px;
  color: var(--web-text);
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  text-align: left;
}
.account-popover-action:hover { background: var(--web-panel-muted); }
.account-popover-action:active { background: var(--web-panel-hover); }
.account-popover-action svg { width: 18px; height: 18px; flex: 0 0 18px; color: var(--web-muted); }
.account-popover-action.danger { color: var(--web-danger); }
.account-popover-action.danger:hover { background: color-mix(in srgb, var(--web-danger) 10%, transparent); }

@media (orientation: portrait), (max-width: 719px) {
  .account-summary-button { grid-template-columns: auto minmax(0, auto) 14px; padding-inline: 5px; }
  .account-summary-copy { display: block; }
  .account-summary-copy strong { font-size: 11px; }
  .account-tier-mark { min-width: 36px; height: 26px; padding-inline: 6px; }
}
.account-expiry-row { background: transparent; border-top: 1px solid var(--web-line); border-radius: 0; }
.account-expiry-row span { color: var(--web-muted); }
.account-expiry-row strong { color: var(--web-text); }
.task-composer-card, .section-card, .task-list-pane, .task-detail, .device-card, .membership-summary-card { border-color: var(--web-line); background: var(--web-panel); box-shadow: none; }
.task-composer-card, .section-card, .device-card, .membership-summary-card { box-shadow: var(--web-shadow); }
.composer-workbench { border-color: var(--web-line); background: var(--web-panel); box-shadow: none; }
.composer-workbench:focus-within { border-color: var(--web-accent); background: var(--web-panel); box-shadow: 0 0 0 3px color-mix(in srgb, var(--web-accent) 15%, transparent); }
.task-filters { border-bottom-color: var(--web-line); }
.task-filters button { color: var(--web-muted); }
.task-filters button:hover { color: var(--web-text); background: var(--web-panel-muted); }
.task-filters button.active { color: var(--web-accent); background: var(--web-accent-soft); }
.filter-count { color: var(--web-muted); background: var(--web-panel-muted); }
.task-filters button.active .filter-count { color: #fff; background: var(--web-accent); }
.task-list-item:hover { background: var(--web-panel-muted); }
.task-list-item.active { border-color: color-mix(in srgb, var(--web-accent) 36%, var(--web-line)); background: var(--web-accent-soft); }
.task-original-prompt, .markdown-content pre, .markdown-content code { background: var(--web-panel-muted); }
.task-result-card { border-color: color-mix(in srgb, var(--web-success) 28%, var(--web-line)); background: var(--web-success-soft); }
.task-result-card > span { color: var(--web-success); }
.task-steps, .task-event > div { border-color: var(--web-line); }
.task-steps > summary, .markdown-content h3, .markdown-content h4, .markdown-content h5 { color: var(--web-text); }
.task-steps > summary em { color: var(--web-muted); background: var(--web-panel-muted); }
.markdown-content { color: var(--web-muted); }
.markdown-content a, .xiaolan-heading p, .xiaolan-page-title p { color: var(--web-accent); }
.remote-control-host { border-color: var(--web-line); background: var(--web-panel-muted); box-shadow: none; }
.membership-purchase-panel, .benefit-comparison-panel { border-color: var(--web-line); background: var(--web-panel); }
.membership-purchase-panel .price-option { border-color: var(--web-line); color: var(--web-text); background: var(--web-panel); }
.membership-purchase-panel .price-option:hover { border-color: color-mix(in srgb, var(--web-accent) 35%, var(--web-line)); background: var(--web-panel-muted); }
.membership-purchase-panel .price-option.selected { border-color: var(--web-accent); background: var(--web-accent-soft); box-shadow: 0 0 0 1px var(--web-accent); }
.price-plan, .price-detail, .price-option strong small, .price-option strong i { color: var(--web-muted); }
.price-plan em { color: var(--web-accent); background: var(--web-panel); }
.price-choice { border-color: var(--web-line); color: var(--web-text); }
.price-option.selected .price-choice { border-color: var(--web-accent); color: #fff; background: var(--web-accent); }
.membership-purchase-actions, .benefit-comparison, .comparison-row { border-color: var(--web-line); }
.comparison-header, .comparison-group { background: var(--web-panel-muted); }
.comparison-row:not(.comparison-header):hover { background: var(--web-panel-muted); }
.comparison-row > span:first-child, .comparison-row[data-tone] > span:first-child { color: var(--web-text); }
.compare-yes { color: var(--web-success); }
.compare-no { color: var(--web-faint); }
.vip-column-title { color: var(--web-accent); }
fluent-button.fluent-action::part(control), fluent-anchor-button.fluent-action::part(control) { border-radius: 9px; box-shadow: none; }
fluent-button.fluent-action[appearance="primary"]::part(control) { background: var(--web-accent); }
fluent-button.fluent-action[appearance="primary"]::part(control):hover { background: var(--web-accent-hover); }
fluent-text-input::part(root),
fluent-textarea::part(root),
fluent-dropdown::part(control) { border-color: var(--web-line); border-radius: 9px; color: var(--web-text); background: var(--web-panel); box-shadow: none; }
fluent-text-input:focus-within::part(root),
fluent-textarea:focus-within::part(root),
fluent-dropdown:focus-within::part(control) { border-color: var(--web-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--web-accent) 14%, transparent); }

/* Page finish and interaction polish. */
.device-quick-card::after { display: none; }
.target-device-display { color: var(--web-text); background: var(--web-panel); }
.target-device-chevron { stroke: var(--web-accent); }
fluent-dropdown.device-select fluent-listbox { padding: 6px; border: 1px solid var(--web-line); border-radius: 10px; color: var(--web-text); background: var(--web-panel); box-shadow: var(--web-shadow); }
fluent-dropdown.device-select fluent-option { border-radius: 7px; color: var(--web-text); }
fluent-dropdown.device-select fluent-option:hover { background: var(--web-accent-soft); }
fluent-dropdown.device-select[disabled] { opacity: .72; }

.app-content:has(.remote-control-page.active) { overflow: hidden; padding-bottom: 10px; }
.app-content:has(.remote-control-page.active) .mobile-workspace-filing { flex: 0 0 auto; padding-top: 8px; }
.remote-control-page.active { height: auto; min-height: 0; flex: 1 1 auto; display: flex; flex-direction: column; }
.remote-control-heading { flex: 0 0 auto; }
.remote-control-host { min-height: 0; height: auto; flex: 1 1 auto; }
.remote-heading-actions { min-width: 0; display: flex; flex-flow: row nowrap; align-items: center; justify-content: flex-end; gap: 8px; }
.remote-heading-actions > * { flex: 0 0 auto; }
.remote-viewer-fps { min-width: 62px; color: var(--web-muted); font: 12px/1.2 ui-monospace, SFMono-Regular, Consolas, monospace; text-align: right; font-variant-numeric: tabular-nums; }
.remote-shortcut-menu { position: relative; }
.remote-shortcut-menu summary { min-height: 38px; padding: 0 12px; display: inline-flex; align-items: center; border: 1px solid var(--web-line); border-radius: 9px; color: var(--web-text); background: var(--web-panel); cursor: pointer; list-style: none; font-size: 13px; }
.remote-shortcut-menu summary::-webkit-details-marker { display: none; }
.remote-shortcut-menu[data-connected="false"] { opacity: .5; }
.remote-shortcut-menu[data-connected="false"] summary { cursor: not-allowed; }
.remote-shortcut-menu > div { position: absolute; top: calc(100% + 7px); right: 0; z-index: 80; width: 168px; padding: 6px; display: grid; gap: 2px; border: 1px solid var(--web-line); border-radius: 10px; background: var(--web-panel); box-shadow: var(--web-shadow); }
.remote-shortcut-menu button { min-height: 36px; padding: 0 10px; border: 0; border-radius: 7px; color: var(--web-text); background: transparent; cursor: pointer; text-align: left; }
.remote-shortcut-menu button:hover { background: var(--web-accent-soft); }
.remote-fullscreen-button svg { width: 17px; height: 17px; }
.remote-disconnect-button:not([disabled]) { color: var(--web-danger); }

.task-detail { padding: clamp(22px, 3vw, 38px); }
.task-detail > * { width: min(1080px, 100%); margin-inline: auto; }
.task-detail-header { padding-bottom: 22px; border-bottom: 1px solid var(--web-line); }
.task-detail-header .overline { color: var(--web-accent); font-variant-numeric: tabular-nums; letter-spacing: .05em; }
.task-detail-header h2 { margin-top: 8px; color: var(--web-text); font-size: clamp(26px, 2.4vw, 36px); letter-spacing: -.025em; }
.task-steps { overflow: hidden; border: 1px solid var(--web-line); border-radius: var(--web-radius); background: var(--web-panel); }
.task-steps > summary { padding: 0 18px; background: linear-gradient(90deg, var(--web-accent-soft), var(--web-teal-soft)); }
.task-steps > summary em { color: var(--web-accent); background: var(--web-panel); }
.task-steps .task-timeline { margin: 0; padding: 18px 18px 4px; }
.task-followup-form { margin-top: 18px; padding: 20px; display: grid; gap: 14px; border: 1px solid var(--web-line); border-radius: var(--web-radius); background: var(--web-panel-muted); }
.task-followup-form.needs-input { border-color: color-mix(in srgb, var(--web-teal) 38%, var(--web-line)); background: linear-gradient(135deg, var(--web-teal-soft), var(--web-panel)); }
.task-followup-form > header > div { display: grid; gap: 3px; }
.task-followup-form > header span { color: var(--web-accent); font-size: 12px; font-weight: 700; }
.task-followup-form > header strong { color: var(--web-text); font-size: 16px; }
.task-followup-form fluent-textarea::part(root) { min-height: 106px; background: var(--web-panel); }
.task-followup-form > footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.task-followup-form > footer small { color: var(--web-muted); font-size: 12px; }
.task-followup-form > footer fluent-button { min-width: 128px; }
.task-danger-zone { margin-top: 14px; display: flex; justify-content: flex-start; }
.text-danger-button { padding: 8px 0; color: var(--web-danger); font-size: 13px; }

@media (orientation: portrait), (max-width: 719px) {
  .app-content:has(.remote-control-page.active) { overflow: hidden; padding-bottom: calc(8px + env(safe-area-inset-bottom)); }
  .remote-control-page.active { min-height: 0; }
  .remote-control-host { min-height: 0; }
  .task-detail { padding: 18px 16px; }
  .task-detail-header { align-items: flex-start; gap: 12px; }
  .task-detail-header h2 { font-size: 28px; }
  .task-followup-form { padding: 16px; }
  .task-followup-form > footer { align-items: stretch; flex-direction: column; }
  .task-followup-form > footer fluent-button { width: 100%; }
  .remote-viewer-fps { display: none; }
  .remote-control-heading { align-items: stretch; flex-direction: column; gap: 10px; }
  .remote-heading-actions { justify-content: flex-start; gap: 6px; overflow-x: auto; scrollbar-width: none; }
  .remote-heading-actions::-webkit-scrollbar { display: none; }
  .remote-shortcut-menu summary { padding-inline: 9px; font-size: 12px; }
}

@supports (-webkit-touch-callout: none) {
  @media (orientation: portrait), (max-width: 719px) {
    .app-content:has(.remote-control-page.active) {
      overflow: hidden;
      overscroll-behavior: none;
    }
    .remote-control-page.active { min-height: 0; }
    .remote-control-host { height: auto; min-height: 0; overflow: hidden; }
  }
}

html.remote-touch-landscape,
html.remote-touch-landscape body,
html.remote-touch-landscape #workspaceView {
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background: #000;
}
html.remote-touch-landscape .app-header,
html.remote-touch-landscape .app-sidebar,
html.remote-touch-landscape .remote-control-heading {
  display: none !important;
}
html.remote-touch-landscape .app-frame,
html.remote-touch-landscape .app-content,
html.remote-touch-landscape .remote-control-page.active,
html.remote-touch-landscape .remote-control-host {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  min-height: 0;
  margin: 0;
  padding: 0;
  display: block;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #000;
}
html.remote-touch-landscape .remote-control-host iframe {
  width: 100%;
  height: 100%;
}

/* Authentication uses native controls and a Xiaolan pose; no Fluent input
   underline, partial internal fill, or decorative accent bars. */
.auth-panel {
  position: relative;
  overflow: hidden;
  padding: clamp(20px, 5vw, 56px);
  grid-template-columns: minmax(360px, 438px) minmax(390px, 580px);
  align-items: center;
  justify-content: center;
  gap: clamp(42px, 7vw, 108px);
  background:
    radial-gradient(620px 420px at 12% 16%, rgba(72, 118, 242, .075), transparent 72%),
    radial-gradient(720px 560px at 84% 68%, rgba(100, 76, 232, .12), transparent 74%),
    var(--web-canvas);
}
.auth-ambient {
  position: relative;
  z-index: 1;
  width: min(100%, 560px);
  aspect-ratio: 1;
  display: grid;
  grid-column: 2;
  grid-row: 1;
  place-items: center;
  overflow: visible;
  pointer-events: none;
}
.auth-xiaolan-aura {
  position: absolute;
  inset: 13%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 42% 38%, color-mix(in srgb, var(--web-teal) 19%, transparent), transparent 48%),
    radial-gradient(circle at 62% 64%, color-mix(in srgb, var(--web-accent) 22%, transparent), transparent 66%);
  filter: blur(26px);
}
.auth-xiaolan-ring {
  position: absolute;
  border: 1px solid color-mix(in srgb, var(--web-accent) 18%, transparent);
  border-radius: 48% 52% 50% 46%;
}
.auth-xiaolan-ring.ring-outer {
  inset: 4% 7% 9%;
  transform: rotate(-12deg);
}
.auth-xiaolan-ring.ring-inner {
  inset: 13% 16% 18%;
  border-color: color-mix(in srgb, var(--web-teal) 20%, transparent);
  transform: rotate(18deg);
}
.auth-ambient > img {
  position: relative;
  z-index: 2;
  width: min(82%, 430px);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 28px 34px rgba(45, 65, 156, .18));
  animation: web-auth-xiaolan-float 5.4s cubic-bezier(.42, 0, .4, 1) infinite;
}
.auth-xiaolan-node {
  position: absolute;
  z-index: 3;
  width: 7px;
  height: 7px;
  border: 1px solid color-mix(in srgb, var(--web-panel) 75%, transparent);
  border-radius: 50%;
  background: var(--web-accent);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--web-accent) 10%, transparent);
}
.auth-xiaolan-node.node-one { top: 14%; left: 15%; }
.auth-xiaolan-node.node-two { top: 24%; right: 8%; background: var(--web-teal); box-shadow: 0 0 0 6px color-mix(in srgb, var(--web-teal) 10%, transparent); }
.auth-xiaolan-node.node-three { right: 19%; bottom: 13%; width: 5px; height: 5px; opacity: .72; }
@keyframes web-auth-xiaolan-float {
  0%, 100% { transform: translateY(3px) rotate(-.5deg); }
  50% { transform: translateY(-8px) rotate(.6deg); }
}
.auth-card {
  position: relative;
  z-index: 1;
  grid-column: 1;
  grid-row: 1;
  width: min(100%, 438px);
  padding: 34px 36px 36px;
  overflow: hidden;
  border: 1px solid var(--web-line);
  border-radius: 18px;
  background: color-mix(in srgb, var(--web-panel) 96%, transparent);
  box-shadow: 0 18px 48px rgba(13, 44, 70, .11);
  backdrop-filter: blur(20px) saturate(1.08);
}
.auth-card .brand { color: var(--web-text); font-size: 17px; }
.auth-card .brand img { width: 32px; height: 32px; }
.auth-card .brand b { border-left-color: var(--web-line); color: var(--web-muted); font-size: 11px; }
.auth-card h2 {
  margin: 30px 0 24px;
  color: var(--web-text);
  font-size: 30px;
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -.025em;
}
.auth-card .field-stack { gap: 17px; }
.auth-card .field { gap: 7px; }
.auth-card .field > span:first-child { color: var(--web-muted); font-size: 13px; font-weight: 600; }
.auth-card .code-field {
  grid-template-columns: minmax(0, 1fr) 122px;
  height: 50px;
  min-height: 50px;
  align-items: stretch;
  gap: 9px;
}
.auth-card .auth-input,
.auth-card .auth-code-button,
.auth-card .auth-submit-button {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  margin: 0;
  box-sizing: border-box;
  outline: 0;
  font: inherit;
}
.auth-card .auth-input {
  display: block;
  height: 50px;
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid var(--web-line);
  border-radius: 10px;
  color: var(--web-text);
  background: var(--web-panel);
  box-shadow: none;
  font-size: 15px;
  transition: border-color var(--durationFast) var(--curveEasyEase), box-shadow var(--durationFast) var(--curveEasyEase), background-color var(--durationFast) var(--curveEasyEase);
}
.auth-card .auth-input::placeholder { color: var(--web-muted); opacity: .8; }
.auth-card .auth-input:hover { border-color: color-mix(in srgb, var(--web-accent) 38%, var(--web-line)); background: var(--web-panel); }
.auth-card .auth-input:focus,
.auth-card .auth-input:focus-visible {
  border-color: var(--web-accent);
  background: var(--web-panel);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--web-accent) 15%, transparent);
}
.auth-card .auth-input:-webkit-autofill,
.auth-card .auth-input:-webkit-autofill:hover,
.auth-card .auth-input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--web-text);
  -webkit-box-shadow: 0 0 0 1000px var(--web-panel) inset !important;
  border-color: var(--web-line);
  caret-color: var(--web-text);
}
.auth-card .auth-code-button,
.auth-card .auth-submit-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-weight: 600;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color var(--durationFast) var(--curveEasyEase), background-color var(--durationFast) var(--curveEasyEase), box-shadow var(--durationFast) var(--curveEasyEase), transform var(--durationFast) var(--curveEasyEase);
}
.auth-card .auth-code-button {
  height: 50px;
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid color-mix(in srgb, var(--web-accent) 38%, var(--web-line));
  color: var(--web-accent);
  background: var(--web-accent-soft);
  box-shadow: none;
  font-size: 13px;
}
.auth-card .auth-code-button:hover:not(:disabled) { border-color: var(--web-accent); background: color-mix(in srgb, var(--web-accent-soft) 72%, var(--web-panel)); }
.auth-card .auth-submit-button {
  height: 52px;
  min-height: 52px;
  margin-top: 2px;
  padding: 0 18px;
  border: 1px solid transparent;
  color: #fff;
  background: var(--web-accent);
  box-shadow: 0 10px 22px color-mix(in srgb, var(--web-accent) 20%, transparent);
  font-size: 15px;
  font-weight: 650;
}
.auth-card .auth-submit-button:hover:not(:disabled) { background: var(--web-accent-hover); box-shadow: 0 12px 26px color-mix(in srgb, var(--web-accent) 24%, transparent); }
.auth-card :is(.auth-code-button, .auth-submit-button):active:not(:disabled) { transform: translateY(1px); }
.auth-card :is(.auth-input, .auth-code-button, .auth-submit-button):focus-visible { outline: 3px solid color-mix(in srgb, var(--web-accent) 28%, transparent); outline-offset: 2px; }
.auth-card :is(.auth-code-button, .auth-submit-button):disabled { cursor: not-allowed; opacity: .5; }
.auth-card .inline-message { margin-bottom: 16px; border-radius: 10px; }

html[data-theme="dark"] .auth-card { box-shadow: 0 22px 56px rgba(0, 0, 0, .34); }

@media (orientation: portrait), (max-width: 719px) {
  .auth-panel { grid-template-columns: minmax(0, 438px); align-items: center; padding: max(18px, env(safe-area-inset-top)) 14px max(20px, env(safe-area-inset-bottom)); }
  .auth-card { padding: 28px 20px 24px; border-radius: 15px; }
  .auth-card h2 { margin: 24px 0 22px; font-size: 27px; }
  .auth-card .code-field { grid-template-columns: minmax(0, 1fr) 116px; gap: 8px; }
  .auth-card .auth-code-button { padding-inline: 9px; font-size: 12px; }
  .auth-ambient { display: none; }
}

@media (min-width: 720px) and (max-width: 980px) {
  .auth-panel { grid-template-columns: minmax(340px, 438px) minmax(260px, 360px); gap: 28px; padding-inline: 28px; }
  .auth-ambient > img { width: 92%; }
}

@media (prefers-reduced-motion: reduce) {
  .auth-ambient > img { animation: none; }
}

@media (max-width: 360px) {
  .auth-card .code-field { grid-template-columns: 1fr; }
  .auth-card #sendCodeButton { width: 100%; }
}

/* Responsive web workspace composition. Shared geometry is theme-neutral. */
.page[data-page="overview"],
.page[data-page="devices"] { width: min(1320px, 100%); }

.overview-layout {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 340px);
  gap: 16px;
}
.overview-primary,
.overview-secondary { gap: 16px; }
.task-composer-card,
.section-card,
.quota-summary-card { border-radius: 14px; }

.task-composer-card { padding: clamp(20px, 2.2vw, 28px); }
.task-composer-card > .xiaolan-heading {
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
}
.xiaolan-heading img { width: 42px; height: 42px; }
.task-composer-card h1 { font-size: clamp(24px, 2.1vw, 32px); }
.task-composer-card form { margin-top: 18px; }
.composer-workbench { padding: 12px; border-radius: 12px; }
.composer-device-row {
  width: 100%;
  padding: 0 2px 12px;
  grid-template-columns: 92px minmax(220px, 380px);
  align-items: center;
  gap: 12px;
}
.device-picker-label { color: var(--web-muted); font-weight: 600; }
.device-select-shell { position: relative; min-width: 0; width: 100%; }
.target-device-input {
  width: 100%;
  height: 48px;
  min-height: 48px;
  padding: 0 48px 0 14px;
  border: 1px solid var(--web-line);
  border-radius: 11px;
  outline: 0;
  color: var(--web-text);
  background: var(--web-panel);
  box-shadow: none;
  font: inherit;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.target-device-input:hover { border-color: color-mix(in srgb, var(--web-accent) 38%, var(--web-line)); }
.target-device-input:focus { border-color: var(--web-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--web-accent) 14%, transparent); }
.target-device-trigger { position: absolute; z-index: 2; top: 1px; right: 1px; width: 46px; height: 46px; padding: 0; display: grid; place-items: center; border: 0; border-radius: 0 10px 10px 0; color: var(--web-accent); background: transparent; cursor: pointer; }
.target-device-trigger:hover { background: var(--web-accent-soft); }
.target-device-trigger .target-device-chevron { position: static; width: 18px; height: 18px; transform: none; pointer-events: none; transition: transform var(--durationFast) var(--curveEasyEase); }
.target-device-trigger[aria-expanded="true"] .target-device-chevron { transform: rotate(180deg); }
.target-device-menu { position: absolute; z-index: 90; top: calc(100% + 7px); left: 0; width: min(520px, calc(100vw - 32px)); max-height: min(390px, calc(100dvh - 170px)); padding: 7px; overflow: auto; border: 1px solid var(--web-line); border-radius: 13px; color: var(--web-text); background: color-mix(in srgb, var(--web-panel) 97%, transparent); box-shadow: var(--web-shadow); backdrop-filter: blur(18px); }
.target-device-menu[hidden] { display: none; }
.target-device-menu-empty { padding: 18px 14px; color: var(--web-muted); font-size: 12px; text-align: center; }
.target-device-menu-group { display: grid; gap: 3px; }
.target-device-menu-group + .target-device-menu-group { margin-top: 7px; }
.target-device-menu-group > span { padding: 7px 9px 4px; color: var(--web-muted); font-size: 10px; font-weight: 650; }
.target-device-menu-group > button { width: 100%; min-height: 58px; padding: 8px 10px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid transparent; border-radius: 9px; color: var(--web-text); background: transparent; cursor: pointer; text-align: left; }
.target-device-menu-group > button:hover { background: var(--web-panel-muted); }
.target-device-menu-group > button.selected { border-color: color-mix(in srgb, var(--web-accent) 32%, var(--web-line)); color: var(--web-accent); background: var(--web-accent-soft); }
.target-device-menu-group > button > span { min-width: 0; display: flex; align-items: center; gap: 10px; }
.target-device-menu-group .device-card-icon { width: 22px; height: 22px; flex: 0 0 22px; }
.target-device-menu-group i { min-width: 0; display: grid; gap: 2px; font-style: normal; }
.target-device-menu-group strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.target-device-menu-group small { color: var(--web-muted); font-size: 10px; font-variant-numeric: tabular-nums; }
.target-device-menu-group em { flex: 0 0 auto; color: var(--web-muted); font-size: 10px; font-style: normal; }
.target-device-menu-group em.online { color: var(--web-teal); }
.target-device-menu-group em.trusted { color: var(--web-accent); }
.model-profile-select {
  width: 100%;
  min-height: 42px;
  padding: 0 34px 0 12px;
  border: 1px solid var(--colorNeutralStroke1);
  border-radius: var(--borderRadiusMedium);
  outline: 0;
  background: var(--colorNeutralBackground1);
  color: var(--colorNeutralForeground1);
  font: inherit;
}
.model-profile-select:hover { border-color: var(--colorBrandStroke2); }
.model-profile-select:focus,
.model-profile-select:focus-visible {
  border-color: var(--colorBrandStroke1);
  outline: 0;
  box-shadow: 0 0 0 2px var(--colorBrandBackground2);
}
.target-device-display { font-size: 14px; }
.prompt-field { padding-top: 10px; }
.prompt-field fluent-textarea::part(root) { min-height: 108px; }
.composer-actions { padding: 10px 2px 0; }
.composer-actions fluent-button { min-width: 120px; }

.section-card { padding: 18px; }
.section-card-header { margin-bottom: 12px; }
.section-card-header h2 { font-size: 17px; }
.continuation-card .empty-state,
.device-quick-card .empty-state {
  max-width: none;
  min-height: 74px;
  padding: 16px;
  justify-items: start;
  align-content: center;
  border: 1px dashed var(--web-line);
  border-radius: 10px;
  color: var(--web-muted);
  background: var(--web-panel-muted);
  text-align: left;
}
.continuation-card .empty-state strong,
.device-quick-card .empty-state strong { font-size: 14px; }
.continuation-card .empty-state span,
.device-quick-card .empty-state span { line-height: 1.5; }

.quota-summary-card { padding: 18px; gap: 13px; }
.quota-title > svg { width: 21px; height: 21px; flex-basis: 21px; }
.quota-title strong { font-size: 16px; }
.quota-meters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.quota-meter { min-width: 0; padding: 11px; border-radius: 9px; background: var(--web-panel-muted); }
.quota-meter > div { align-items: baseline; flex-wrap: wrap; }
.quota-meter > div strong { font-size: 12px; }
.quota-summary-card > footer { padding-top: 1px; }

.page[data-page="devices"] .page-heading { margin-bottom: 14px; }
.page[data-page="devices"] .page-heading h1 { font-size: clamp(25px, 2vw, 31px); }
.device-grid {
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
}
.device-group { display: grid; gap: 10px; }
.device-group > header { min-height: 30px; display: flex; align-items: center; gap: 8px; }
.device-group > header h2 { margin: 0; color: var(--web-text); font-size: 15px; font-weight: 650; }
.device-group > header span { min-width: 22px; height: 22px; padding: 0 6px; display: inline-flex; align-items: center; justify-content: center; border-radius: 11px; color: var(--web-muted); background: var(--web-panel-muted); font-size: 10px; }
.device-group > div { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 390px)); align-items: stretch; justify-content: start; gap: 14px; }
.status-pill.trusted { color: var(--web-accent); background: var(--web-accent-soft); }
.device-grid > .empty-state {
  grid-column: 1 / -1;
  max-width: none;
  min-height: 180px;
  padding: 28px;
  place-content: center;
  border: 1px dashed var(--web-line);
  border-radius: 14px;
  background: var(--web-panel);
}
.device-card {
  min-height: 172px;
  padding: 18px;
  justify-content: flex-start;
  gap: 18px;
  border-radius: 12px;
}
.device-card header { min-height: 24px; }
.device-card header > small { color: var(--web-muted); font-size: 12px; }
.device-card-body { min-width: 0; display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: start; gap: 11px; }
.device-card-icon {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: var(--web-accent);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.55;
}
.device-card h2 { margin: 0; overflow-wrap: anywhere; font-size: 17px; line-height: 1.35; }
.device-card p { margin-top: 4px; color: var(--web-muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.device-card footer { margin-top: auto; padding-top: 2px; gap: 8px; }
.device-card footer fluent-button,
.device-card footer fluent-anchor-button { min-width: 0; }

@media (max-width: 1120px) {
  .overview-layout { grid-template-columns: minmax(0, 1fr); }
  .overview-secondary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quota-meters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  /* Safari treats fixed descendants of a transformed page as page-local.
     Remove the retained entry transform so the device sheet uses the visual
     viewport instead of being positioned below the scrolled composer. */
  .page.active { animation: none; transform: none; }
  .overview-secondary { grid-template-columns: minmax(0, 1fr); }
  .composer-device-row { grid-template-columns: minmax(0, 1fr); gap: 7px; }
  .composer-actions fluent-button { width: 100%; }
  .quota-meters { grid-template-columns: minmax(0, 1fr); gap: 9px; }
  .page[data-page="devices"] .page-heading { align-items: center; }
  .device-grid { grid-template-columns: minmax(0, 1fr); }
  .device-card { min-height: 160px; }
  .target-device-menu {
    position: fixed;
    right: 10px;
    bottom: var(--target-device-menu-bottom, max(10px, env(safe-area-inset-bottom)));
    left: 10px;
    top: auto;
    z-index: 1000;
    width: auto;
    max-height: var(--target-device-menu-max-height, min(430px, 62dvh));
    background: var(--web-panel);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
  html.device-menu-open .app-content { overflow: hidden; }
  .device-group > div { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 420px) {
  .task-composer-card,
  .section-card,
  .quota-summary-card,
  .device-card { border-radius: 12px; }
  .task-composer-card { padding: 18px 15px; }
  .xiaolan-heading img { width: 38px; height: 38px; }
  .composer-workbench { padding: 10px; }
  .device-card footer { align-items: stretch; flex-direction: column; }
  .device-card footer fluent-button,
  .device-card footer fluent-anchor-button { width: 100%; }
}

/* Usage center: source and period controls share the server's accounting
   dimensions. Official model identities are intentionally never rendered. */
.usage-page { display: grid; gap: 16px; }
.usage-page-heading { margin-bottom: 2px; }
.usage-official-panel,
.usage-custom-panel,
.usage-cost-panel,
.usage-detail-panel { overflow: hidden; border: 1px solid var(--colorNeutralStroke2); border-radius: var(--borderRadiusLarge); background: var(--colorNeutralBackground1); box-shadow: var(--shadow2); }
.usage-official-panel > header,
.usage-custom-panel > header,
.usage-cost-panel > header,
.usage-detail-panel > header { display: flex; min-height: 58px; padding: 13px 20px; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--colorNeutralStroke2); }
.usage-official-panel h2,
.usage-custom-panel h2,
.usage-cost-panel h2,
.usage-detail-panel h2 { margin: 0; color: var(--colorNeutralForeground1); font-size: var(--fontSizeBase500); }
.usage-cost-list { display: flex; padding: 16px 20px 20px; gap: 12px; flex-wrap: wrap; }
.usage-cost-list > span { display: grid; min-width: 230px; padding: 14px 16px; gap: 6px; overflow: hidden; border: 1px solid var(--colorNeutralStroke2); border-radius: var(--borderRadiusMedium); background: linear-gradient(145deg, var(--colorNeutralBackground2), color-mix(in srgb, var(--colorBrandBackground2) 42%, var(--colorNeutralBackground1))); box-shadow: inset 0 1px color-mix(in srgb, var(--colorNeutralForeground1) 5%, transparent); }
.usage-cost-list small { color: var(--colorNeutralForeground3); font-size: var(--fontSizeBase200); font-weight: 520; }
.usage-cost-list strong { color: var(--colorNeutralForeground1); font-size: var(--fontSizeBase400); }
.usage-cost-panel > header > span { color: var(--colorNeutralForeground3); font-size: var(--fontSizeBase200); }
.usage-cost-placeholder { display: grid; width: 100%; min-height: 96px; padding: 20px; align-content: center; justify-items: center; gap: 5px; border: 1px dashed var(--colorNeutralStroke2); border-radius: var(--borderRadiusMedium); background: var(--colorNeutralBackground2); text-align: center; }
.usage-cost-placeholder strong { color: var(--colorNeutralForeground1); font-size: var(--fontSizeBase300); }
.usage-cost-placeholder span { max-width: 680px; color: var(--colorNeutralForeground3); font-size: var(--fontSizeBase200); line-height: 1.55; }
.usage-cost-placeholder.compact { min-height: 72px; }
.usage-official-panel header span,
.usage-custom-panel header span { display: block; margin-top: 4px; color: var(--colorNeutralForeground3); font-size: var(--fontSizeBase200); }
.usage-custom-panel header em { padding: 4px 8px; border-radius: var(--borderRadiusCircular); background: var(--colorBrandBackground2); color: var(--colorBrandForeground1); font-size: var(--fontSizeBase200); font-style: normal; font-weight: var(--fontWeightSemibold); }
.usage-ring-grid { display: grid; padding: 20px; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.usage-ring-item { display: grid; min-width: 0; padding: 20px; grid-template-columns: 124px minmax(0, 1fr); align-items: center; gap: 22px; border: 1px solid var(--colorNeutralStroke2); border-radius: var(--borderRadiusLarge); background: linear-gradient(145deg, color-mix(in srgb, var(--colorBrandBackground2) 48%, var(--colorNeutralBackground2)), var(--colorNeutralBackground1)); }
.usage-ring-item.output { background: linear-gradient(145deg, color-mix(in srgb, #16899a 8%, var(--colorNeutralBackground2)), var(--colorNeutralBackground1)); }
.usage-ring { --usage-color: var(--colorBrandBackground); position: relative; display: grid; width: 116px; height: 116px; place-items: center; border-radius: 50%; background: conic-gradient(var(--usage-color) calc(var(--usage-percent) * 1%), var(--colorNeutralBackground5) 0); }
.usage-ring-item.output .usage-ring { --usage-color: #16899a; }
.usage-ring::after { position: absolute; inset: 10px; border-radius: inherit; background: var(--colorNeutralBackground1); content: ""; }
.usage-ring > span { position: relative; z-index: 1; display: grid; justify-items: center; gap: 2px; }
.usage-ring strong { color: var(--colorNeutralForeground1); font-size: var(--fontSizeBase600); }
.usage-ring small { color: var(--colorNeutralForeground3); font-size: var(--fontSizeBase200); }
.usage-ring-item > div:last-child { display: grid; gap: 10px; }
.usage-ring-item h3 { margin: 0; color: var(--colorNeutralForeground1); font-size: var(--fontSizeBase400); }
.usage-primary-value { display: grid; margin: 0; gap: 2px; }
.usage-primary-value span { color: var(--colorNeutralForeground3); font-size: var(--fontSizeBase200); }
.usage-primary-value strong { overflow: hidden; color: var(--colorNeutralForeground1); font-size: var(--fontSizeBase700); letter-spacing: -.025em; text-overflow: ellipsis; }
.usage-secondary-values { display: flex; gap: 20px; }
.usage-secondary-values > span { display: grid; gap: 3px; }
.usage-secondary-values small { color: var(--colorNeutralForeground3); font-size: var(--fontSizeBase200); }
.usage-secondary-values strong { color: var(--colorNeutralForeground2); font-size: var(--fontSizeBase200); }
.usage-custom-grid { display: grid; padding: 16px 20px 20px; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.usage-custom-grid > span { display: grid; min-height: 72px; padding: 13px 15px; align-content: center; gap: 5px; border: 1px solid var(--colorNeutralStroke2); border-radius: var(--borderRadiusMedium); background: var(--colorNeutralBackground2); }
.usage-custom-grid small { color: var(--colorNeutralForeground3); font-size: var(--fontSizeBase100); }
.usage-custom-grid strong { color: var(--colorNeutralForeground1); font-size: var(--fontSizeBase500); }
.usage-toolbar { display: flex; padding: 12px 16px; align-items: end; gap: 10px; border-bottom: 1px solid var(--colorNeutralStroke2); flex-wrap: wrap; }
.usage-segmented { display: inline-flex; padding: 3px; gap: 2px; border: 1px solid var(--colorNeutralStroke2); border-radius: var(--borderRadiusMedium); background: var(--colorNeutralBackground2); }
.usage-segmented button { min-height: 34px; padding: 0 13px; border: 0; border-radius: var(--borderRadiusSmall); background: transparent; color: var(--colorNeutralForeground3); cursor: pointer; font: inherit; font-size: var(--fontSizeBase300); font-weight: 520; }
.usage-segmented button:hover { background: var(--colorNeutralBackground2Hover); color: var(--colorNeutralForeground2Hover); }
.usage-segmented button.active { background: var(--colorBrandBackground2); color: var(--colorBrandForeground1); box-shadow: inset 0 0 0 1px var(--colorBrandStroke2); font-weight: 650; }
.usage-current-source { display: inline-flex; min-height: 38px; padding: 0 12px; align-items: center; border: 1px solid var(--colorBrandStroke2); border-radius: var(--borderRadiusMedium); background: var(--colorBrandBackground2); color: var(--colorBrandForeground1); font-size: var(--fontSizeBase200); font-weight: var(--fontWeightSemibold); }
.usage-model-filter { display: grid; min-width: 220px; margin-left: auto; gap: 4px; }
.usage-model-filter > span { color: var(--colorNeutralForeground3); font-size: var(--fontSizeBase200); font-weight: 520; }
.usage-model-filter .web-picker-trigger { min-height: 40px; grid-template-columns: minmax(0, 1fr) 15px; }
.usage-model-menu { right: 0; left: auto; width: min(330px, calc(100vw - 32px)); }
.usage-task-list { min-height: 160px; }
.usage-task-row { display: grid; min-height: 68px; padding: 11px 16px; grid-template-columns: minmax(260px, 1.5fr) minmax(150px, .75fr) minmax(92px, .5fr) minmax(92px, .5fr) minmax(70px, .35fr); align-items: center; gap: 14px; border-bottom: 1px solid var(--colorNeutralStroke2); color: var(--colorNeutralForeground2); font-size: var(--fontSizeBase300); }
.usage-task-row:not(.usage-task-header):hover { background: var(--colorNeutralBackground1Hover); }
.usage-task-header { min-height: 42px; background: linear-gradient(90deg, var(--colorNeutralBackground2), var(--colorNeutralBackground1)); color: var(--colorNeutralForeground3); font-size: var(--fontSizeBase200); font-weight: 620; }
.usage-task-identity { display: grid; min-width: 0; gap: 4px; }
.usage-task-identity strong { overflow: hidden; color: var(--colorNeutralForeground1); font-weight: 620; text-overflow: ellipsis; white-space: nowrap; }
.usage-task-identity small { color: var(--colorNeutralForeground3); font-size: var(--fontSizeBase200); }
.usage-model-name { display: inline-flex; width: fit-content; max-width: 100%; min-height: 26px; padding: 4px 9px; align-items: center; overflow: hidden; border: 1px solid var(--colorBrandStroke2); border-radius: var(--borderRadiusCircular); background: color-mix(in srgb, var(--colorBrandBackground2) 68%, transparent); color: var(--colorBrandForeground1); font-size: var(--fontSizeBase200); font-weight: 580; text-overflow: ellipsis; white-space: nowrap; }
.usage-source { display: inline-flex; width: fit-content; padding: 4px 8px; border-radius: var(--borderRadiusCircular); background: var(--colorBrandBackground2); color: var(--colorBrandForeground1); font-size: var(--fontSizeBase100); font-style: normal; font-weight: var(--fontWeightSemibold); }
.usage-source.custom { background: var(--colorPaletteTealBackground2); color: var(--colorPaletteTealForeground2); }
.usage-pagination { display: flex; min-height: 54px; padding: 10px 16px; align-items: center; justify-content: space-between; gap: 14px; color: var(--colorNeutralForeground3); font-size: var(--fontSizeBase200); }
.usage-pagination > div { display: flex; align-items: center; gap: 8px; }
.usage-pagination button { min-height: 32px; padding: 0 11px; border: 1px solid var(--colorNeutralStroke2); border-radius: var(--borderRadiusMedium); background: var(--colorNeutralBackground1); color: var(--colorNeutralForeground2); cursor: pointer; }
.usage-pagination button:hover:not(:disabled) { background: var(--colorNeutralBackground1Hover); }
.usage-pagination button:disabled { cursor: default; opacity: .38; }
.task-usage-card { display: grid; margin: 14px 0; padding: 14px 16px; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 16px; border: 1px solid var(--colorNeutralStroke2); border-radius: var(--borderRadiusMedium); background: var(--colorNeutralBackground2); }
.task-usage-card > span { color: var(--colorNeutralForeground3); font-size: var(--fontSizeBase100); }
.task-usage-card > strong { grid-row: 1 / span 2; grid-column: 2; color: var(--colorNeutralForeground1); font-size: var(--fontSizeBase400); }
.task-usage-card > small { color: var(--colorNeutralForeground2); font-size: var(--fontSizeBase200); }

.communication-page { width: min(1180px, 100%); margin-inline: auto; padding-block: 4px 24px; display: grid; align-content: start; gap: 16px; }
.communication-heading { margin-bottom: 0; }
.communication-heading > div { display: grid; gap: 3px; }
.communication-list { display: grid; overflow: hidden; border: 1px solid var(--web-line); border-radius: var(--web-radius); background: var(--web-panel); box-shadow: var(--web-shadow); }
.notification-item { display: grid; min-height: 92px; padding: 18px 20px; grid-template-columns: 8px minmax(0, 1fr); gap: 14px; border-bottom: 1px solid var(--web-line); background: transparent; cursor: pointer; }
.notification-item:last-child { border-bottom: 0; }
.notification-item:hover { background: var(--web-panel-muted); }
.notification-item > i { width: 7px; height: 7px; margin-top: 7px; border-radius: 50%; background: var(--web-line-strong); }
.notification-item.unread > i { background: var(--web-accent); box-shadow: 0 0 0 4px var(--web-accent-soft); }
.notification-item.urgent > i { background: var(--web-danger); }
.notification-item > div { min-width: 0; display: grid; gap: 6px; }
.notification-item header { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; }
.notification-item header strong { color: var(--web-text); font-size: 15px; font-weight: 640; }
.notification-item time { color: var(--web-muted); font-size: 11px; white-space: nowrap; }
.notification-item p,.notification-item div > div { margin: 0; color: var(--web-muted); font-size: 13px; line-height: 1.6; }
.notification-item.read { opacity: .78; }
.feedback-create-panel { padding: 20px; display: grid; gap: 15px; border: 1px solid var(--web-line); border-radius: var(--web-radius); background: var(--web-panel); box-shadow: var(--web-shadow); }
.feedback-create-panel[hidden] { display: none; }
.feedback-create-panel label { display: grid; gap: 7px; color: var(--web-muted); font-size: 12px; }
.feedback-create-panel input,.feedback-create-panel textarea,.feedback-reply-form textarea { width: 100%; padding: 11px 12px; border: 1px solid var(--web-line); border-radius: 10px; outline: 0; background: var(--web-canvas); color: var(--web-text); font: inherit; font-size: 14px; resize: vertical; }
.feedback-create-panel :is(input,textarea):focus,.feedback-reply-form textarea:focus { border-color: var(--web-accent); box-shadow: 0 0 0 3px var(--web-accent-soft); }
.feedback-create-panel footer { display: flex; justify-content: flex-end; gap: 9px; }
.feedback-create-panel footer button,.feedback-reply-form button { min-height: 38px; padding: 0 15px; border: 1px solid var(--web-line); border-radius: 9px; background: var(--web-panel); color: var(--web-text); cursor: pointer; }
.feedback-create-panel footer button.primary,.feedback-reply-form button.primary { border-color: transparent; background: var(--web-accent); color: #fff; }
.feedback-web-layout { height: min(640px, calc(100dvh - 210px)); min-height: 420px; display: grid; grid-template-columns: minmax(260px, 320px) minmax(0, 1fr); gap: 16px; }
.feedback-web-layout.is-empty { width: min(680px, 100%); height: auto; min-height: 0; margin: 20px auto 0; display: block; }
.feedback-thread-list,.feedback-thread-detail { min-width: 0; overflow: hidden; border: 1px solid var(--web-line); border-radius: var(--web-radius); background: var(--web-panel); box-shadow: var(--web-shadow); }
.feedback-thread-list { display: grid; align-content: start; overflow-y: auto; }
.feedback-web-layout.is-empty .feedback-thread-list { min-height: 260px; place-items: center; overflow: visible; border-color: color-mix(in srgb, var(--web-line) 76%, transparent); box-shadow: 0 12px 30px color-mix(in srgb, var(--web-text) 7%, transparent); }
.feedback-empty-state { max-width: 360px; padding: 42px 28px; display: grid; justify-items: center; gap: 10px; color: var(--web-muted); text-align: center; }
.feedback-empty-state svg { width: 34px; height: 34px; margin-bottom: 4px; fill: none; stroke: var(--web-accent); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.feedback-empty-state strong { color: var(--web-text); font-size: 16px; font-weight: 620; }
.feedback-empty-state span { font-size: 13px; line-height: 1.65; }
.feedback-thread-item { position: relative; min-height: 72px; padding: 13px 14px; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 10px; border: 0; border-bottom: 1px solid var(--web-line); background: transparent; color: var(--web-text); cursor: pointer; text-align: left; }
.feedback-thread-item:hover,.feedback-thread-item.active { background: var(--web-accent-soft); }
.feedback-thread-item > span { min-width: 0; display: grid; gap: 5px; }
.feedback-thread-item strong { overflow: hidden; font-size: 13px; font-weight: 620; text-overflow: ellipsis; white-space: nowrap; }
.feedback-thread-item small,.feedback-thread-item em { color: var(--web-muted); font-size: 11px; font-style: normal; font-weight: 500; }
.feedback-thread-item > i { position: absolute; top: 8px; right: 8px; min-width: 17px; height: 17px; padding: 0 4px; display: grid; place-items: center; border-radius: 999px; background: var(--web-accent); color: #fff; font-size: 9px; font-style: normal; }
.feedback-thread-detail { display: flex; min-height: 0; flex-direction: column; }
.feedback-thread-detail[hidden] { display: none; }
.feedback-thread-detail > header { padding: 18px 20px; border-bottom: 1px solid var(--web-line); }
.feedback-thread-detail > header span { color: var(--web-accent); font-size: 11px; }
.feedback-thread-detail h2 { margin: 5px 0 0; color: var(--web-text); font-size: 19px; font-weight: 650; }
.feedback-message-list { min-height: 260px; max-height: 520px; padding: 18px 20px; display: grid; align-content: start; gap: 12px; overflow-y: auto; }
.feedback-message { max-width: min(680px, 88%); padding: 13px 15px; border: 1px solid var(--web-line); border-radius: 13px; background: var(--web-panel-muted); }
.feedback-message.user { justify-self: end; background: var(--web-accent-soft); }
.feedback-message header { display: flex; justify-content: space-between; gap: 12px; }
.feedback-message header strong { font-size: 12px; font-weight: 600; }
.feedback-message time { color: var(--web-muted); font-size: 10px; }
.feedback-message p { margin: 7px 0 0; color: var(--web-text); font-size: 13px; line-height: 1.65; white-space: pre-wrap; }
.feedback-reply-form { margin-top: auto; padding: 14px 18px; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: end; gap: 10px; border-top: 1px solid var(--web-line); }
.feedback-closed-note { margin: 0; padding: 16px 20px; color: var(--web-muted); border-top: 1px solid var(--web-line); }

@media (max-width: 850px) {
  .usage-ring-grid { grid-template-columns: 1fr; }
  .usage-custom-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .usage-task-header { display: none; }
  .usage-task-row { padding: 14px; grid-template-columns: minmax(0, 1fr) auto auto; gap: 9px 12px; }
  .usage-task-row .usage-task-identity,
  .usage-task-row .usage-model-name { grid-column: 1 / -1; }
  .usage-task-row > span[data-label]::before { margin-right: 4px; color: var(--colorNeutralForeground3); content: attr(data-label) " "; font-size: var(--fontSizeBase100); }
  .feedback-web-layout { height: auto; min-height: 0; grid-template-columns: 1fr; gap: 12px; }
  .feedback-thread-list { max-height: 300px; overflow-y: auto; }
  .feedback-web-layout.is-empty { margin-top: 4px; }
  .feedback-web-layout.is-empty .feedback-thread-list { min-height: 230px; }
}

@media (max-width: 560px) {
  .communication-page { padding-block: 0 18px; }
  .feedback-empty-state { padding: 34px 22px; }
  .usage-ring-grid { padding: 14px; }
  .usage-ring-item { grid-template-columns: 1fr; justify-items: center; }
  .usage-ring-item > div:last-child { width: 100%; }
  .usage-custom-grid { grid-template-columns: 1fr 1fr; padding: 14px; }
  .usage-toolbar { align-items: stretch; flex-direction: column; }
  .usage-segmented { width: 100%; }
  .usage-segmented button { flex: 1; }
  .usage-model-filter { width: 100%; margin-left: 0; }
  .usage-pagination { align-items: stretch; flex-direction: column; }
  .usage-pagination > div { justify-content: space-between; }
  .task-usage-card { grid-template-columns: 1fr; }
  .task-usage-card > strong { grid-row: auto; grid-column: auto; }
  .notification-item { padding: 15px 14px; }
  .notification-item header { align-items: flex-start; flex-direction: column; gap: 4px; }
  .feedback-reply-form { grid-template-columns: 1fr; }
  .feedback-reply-form button { width: 100%; }
}

/* Task creation mirrors the desktop client's compact controls while keeping
   touch targets and portrait boundaries explicit. */
.composer-tool-row {
  position: relative;
  z-index: 6;
  display: flex;
  min-width: 0;
  padding: 10px 2px 2px;
  align-items: center;
  gap: 8px;
  border-top: 1px solid var(--web-line);
}
.web-picker { position: relative; min-width: 0; }
.model-web-picker { flex: 0 1 220px; width: 220px; }
.approval-web-picker { flex: 0 0 150px; width: 150px; }
.web-picker-trigger {
  display: grid;
  width: 100%;
  min-height: 44px;
  padding: 0 11px;
  grid-template-columns: 20px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 8px;
  border: 1px solid color-mix(in srgb, var(--web-accent) 25%, var(--web-line));
  border-radius: 11px;
  outline: 0;
  background: var(--web-panel-muted);
  color: var(--web-text);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  text-align: left;
}
.web-picker-trigger:hover,
.web-picker-trigger[aria-expanded="true"] { border-color: color-mix(in srgb, var(--web-accent) 55%, var(--web-line)); background: var(--web-accent-soft); }
.web-picker-trigger:focus-visible { box-shadow: 0 0 0 3px color-mix(in srgb, var(--web-accent) 16%, transparent); }
.web-picker-trigger > svg { width: 19px; height: 19px; fill: none; stroke: var(--web-accent); stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.55; }
.web-picker-trigger > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; writing-mode: horizontal-tb; }
.web-picker-trigger .web-picker-chevron { width: 15px; height: 15px; stroke: var(--web-muted); transition: transform .16s ease; }
.model-profile-trigger-icon { display: grid; width: 21px; height: 21px; flex: 0 0 21px; place-items: center; overflow: visible !important; }
.model-provider-icon { width: 21px; height: 21px; overflow: visible; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.model-provider-icon.provider-deepseek { color: #536dfe; }
.model-provider-icon.provider-zhipu { color: #596273; }
.model-provider-icon.provider-qwen { color: #7066f3; }
.model-provider-icon.provider-kimi { color: #242b36; }
.model-provider-icon.provider-volcengine { color: #5e68ed; }
.model-provider-icon.provider-openai { color: #3e8f7d; }
.model-provider-icon.provider-gemini { color: #6b8ef3; }
.model-provider-icon.provider-grok { color: #242b36; }
.model-provider-icon.provider-deepseek path:first-child,
.model-provider-icon.provider-volcengine path,
.model-provider-icon.provider-gemini path { fill: currentColor; stroke: none; }
html[data-theme="dark"] .model-provider-icon:is(.provider-zhipu, .provider-kimi, .provider-grok) { color: #b9c3d2; }
.model-profile-option-main { display: flex; min-width: 0; align-items: center; gap: 11px; }
.web-picker-menu > button.model-profile-option { min-height: 44px; }
.web-picker-menu > button.model-profile-option strong { font-size: 13px; font-weight: 540; }
.web-picker-menu > button.model-profile-option.selected strong { font-weight: 650; }
.web-picker-menu > button.model-profile-option.unavailable {
  border-color: color-mix(in srgb, var(--warning) 28%, var(--web-line));
  color: var(--warning);
  background: var(--warning-soft);
  cursor: not-allowed;
  opacity: 1;
}
.web-picker-trigger[aria-expanded="true"] .web-picker-chevron { transform: rotate(180deg); }
.web-picker-menu {
  position: absolute;
  z-index: 90;
  right: auto;
  bottom: calc(100% + 7px);
  left: 0;
  display: grid;
  width: min(360px, calc(100vw - 28px));
  max-height: min(300px, 52dvh);
  padding: 6px;
  overflow-y: auto;
  gap: 3px;
  border: 1px solid var(--web-line);
  border-radius: 13px;
  background: color-mix(in srgb, var(--web-panel) 97%, transparent);
  box-shadow: 0 20px 52px rgba(13, 44, 70, .2);
  backdrop-filter: blur(20px);
}
.web-picker-menu[hidden] { display: none; }
.web-picker-menu > button {
  display: grid;
  width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-content: center;
  gap: 3px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--web-muted);
  cursor: pointer;
  font: inherit;
  text-align: left;
}
.web-picker-menu > button:hover,
.web-picker-menu > button.selected { background: var(--web-accent-soft); color: var(--web-text); }
.web-picker-menu strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.web-picker-menu small { grid-column: 1; color: var(--web-muted); font-size: 11px; line-height: 1.4; }
.web-picker-menu i { grid-column: 2; grid-row: 1 / 3; align-self: center; width: 7px; height: 7px; border-radius: 50%; background: transparent; }
.web-picker-menu > button.selected i { background: var(--web-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--web-accent) 14%, transparent); }
.approval-menu { width: min(390px, calc(100vw - 28px)); }
.approval-menu > button { min-height: 56px; padding: 9px 12px; }
.approval-menu > button.selected {
  background: var(--web-accent-soft);
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--web-accent) 48%, transparent),
    0 0 0 3px color-mix(in srgb, var(--web-accent) 12%, transparent);
  color: var(--web-text);
}
.approval-menu > button.selected strong { font-weight: 650; }
.approval-menu i { width: 9px; height: 9px; }
.approval-menu > button.selected i {
  background: var(--web-accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--web-accent) 18%, transparent);
}
/* The shared picker menu opens upward because the composer is bottom-anchored.
   This control sits at the top of the task detail pane, so it must flip down or
   the viewport clips it. */
.task-access-mode { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 14px 0 0; }
.task-access-mode > span { color: var(--web-muted); font-size: 12px; }
.task-access-mode .web-picker-trigger { width: auto; min-height: 34px; padding: 0 10px; grid-template-columns: 17px minmax(0, 1fr) 14px; gap: 7px; font-size: 12px; }
.task-access-mode .web-picker-trigger > svg { width: 17px; height: 17px; }
.task-access-mode .web-picker-trigger .web-picker-chevron { width: 14px; height: 14px; }
.task-access-mode .web-picker-menu { top: calc(100% + 7px); bottom: auto; max-width: 100%; }
.composer-material-button {
  position: relative;
  display: grid;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  padding: 0;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--web-accent) 25%, var(--web-line));
  border-radius: 11px;
  background: var(--web-panel-muted);
  color: var(--web-accent);
  cursor: pointer;
}
.composer-material-button:hover { border-color: color-mix(in srgb, var(--web-accent) 55%, var(--web-line)); background: var(--web-accent-soft); }
.composer-material-button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-width: 1.8; }
.composer-material-button i { position: absolute; top: -5px; right: -5px; display: grid; min-width: 18px; height: 18px; padding: 0 4px; place-items: center; border: 2px solid var(--web-panel); border-radius: 999px; background: var(--web-accent); color: #fff; font-size: 9px; font-style: normal; font-weight: 750; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.composer-material-list { display: flex; padding: 8px 2px 0; flex-wrap: wrap; gap: 6px; }
.composer-material-list[hidden] { display: none; }
.composer-material-list > span { display: inline-grid; max-width: 260px; min-height: 34px; padding: 4px 4px 4px 10px; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0 8px; border: 1px solid var(--web-line); border-radius: 9px; background: var(--web-panel-muted); }
.composer-material-list strong { overflow: hidden; color: var(--web-text); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.composer-material-list small { color: var(--web-muted); font-size: 9px; }
.composer-material-list button { grid-column: 2; grid-row: 1 / 3; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 7px; background: transparent; color: var(--web-muted); cursor: pointer; }
.composer-option-grid { display: grid; padding: 10px 2px 2px; grid-template-columns: minmax(0, 420px); gap: 8px; }
.web-check-option { display: grid; min-width: 0; min-height: 56px; padding: 9px 10px; grid-template-columns: 22px minmax(0, 1fr); align-items: center; gap: 9px; border: 1px solid var(--web-line); border-radius: 10px; background: var(--web-panel-muted); cursor: pointer; }
.web-check-option > input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.web-check-box { display: grid; width: 21px; height: 21px; place-items: center; border: 1px solid color-mix(in srgb, var(--web-muted) 55%, var(--web-line)); border-radius: 6px; background: var(--web-panel); }
.web-check-box svg { width: 14px; height: 14px; fill: none; stroke: transparent; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }
.web-check-option:has(input:checked) { border-color: color-mix(in srgb, var(--web-accent) 35%, var(--web-line)); background: var(--web-accent-soft); }
.web-check-option input:checked + .web-check-box { border-color: var(--web-accent); background: var(--web-accent); }
.web-check-option input:checked + .web-check-box svg { stroke: #fff; }
.web-check-option:has(input:focus-visible) { box-shadow: 0 0 0 3px color-mix(in srgb, var(--web-accent) 15%, transparent); }
.web-check-option:has(input:disabled) { cursor: not-allowed; opacity: .48; }
.web-check-option > span:last-child { display: grid; min-width: 0; gap: 2px; }
.web-check-option strong { color: var(--web-text); font-size: 12px; }
.web-check-option small { color: var(--web-muted); font-size: 10px; line-height: 1.4; }
.web-check-option em { padding: 1px 5px; border-radius: 999px; background: var(--web-panel); color: var(--web-accent); font-size: 8px; font-style: normal; }

@media (orientation: portrait), (max-width: 719px) {
  .composer-tool-row { overflow: visible; }
  .model-web-picker { flex: 1 1 128px; width: auto; }
  .approval-web-picker { flex: 0 0 126px; width: 126px; }
  .web-picker-trigger { min-height: 46px; }
  .composer-material-button { flex-basis: 46px; width: 46px; height: 46px; }
  .composer-option-grid { grid-template-columns: minmax(0, 1fr); }
  .web-check-option { min-height: 58px; }
}

@media (max-width: 390px) {
  .composer-tool-row { gap: 6px; }
  .approval-web-picker { flex-basis: 108px; width: 108px; }
  .approval-web-picker .web-picker-trigger { grid-template-columns: minmax(0, 1fr) 14px; }
  .approval-web-picker .web-picker-trigger > svg:first-child { display: none; }
  .web-picker-trigger { padding-inline: 9px; gap: 6px; }
}

.membership-purchase-panel .price-option:hover { border-color: color-mix(in srgb, var(--web-accent) 48%, var(--web-line)); background: var(--web-panel); box-shadow: 0 14px 32px color-mix(in srgb, var(--web-accent) 11%, transparent); transform: translateY(-2px); }
.membership-purchase-panel .price-option.selected { border-color: var(--web-accent); background: linear-gradient(145deg, var(--web-accent-soft), var(--web-panel) 72%); box-shadow: 0 0 0 1px var(--web-accent), 0 16px 36px color-mix(in srgb, var(--web-accent) 14%, transparent); }

/* Final collapsed-account contract; keep after every compatibility layer. */
.account-summary-button { min-width: 58px; min-height: 42px; padding: 4px 7px; grid-template-columns: 27px auto 14px; gap: 6px; border-color: transparent; background: transparent; box-shadow: none; }
.account-summary-button:hover,
.account-summary-button[aria-expanded="true"] { border-color: var(--web-line); background: var(--web-panel-muted); box-shadow: none; transform: none; }
.account-user-icon { display: grid; width: 27px; height: 27px; place-items: center; color: var(--web-muted); }
.account-user-icon svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.65; }
.account-summary-button:has(.account-tier-mark[data-tier="vip"]) .account-user-icon { color: #ad7b1e; }
.account-tier-mark { min-width: 34px; height: 22px; padding: 0 7px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--web-line); border-radius: 999px; font-size: 9px; font-weight: 800; letter-spacing: .08em; }
.account-tier-mark[data-tier="vip"] { border-color: #ddc683; color: #765515; background: linear-gradient(135deg, #fff7df, #f3dfad); box-shadow: 0 4px 13px rgba(145, 98, 18, .1); }
html[data-theme="dark"] .account-summary-button:has(.account-tier-mark[data-tier="vip"]) .account-user-icon { color: #e3c474; }
html[data-theme="dark"] .account-tier-mark[data-tier="vip"] { border-color: rgba(240, 204, 125, .28); color: #f2cf83; background: linear-gradient(135deg, rgba(255, 225, 153, .16), rgba(172, 109, 31, .17)); box-shadow: inset 0 1px rgba(255, 245, 215, .14), 0 5px 16px rgba(198, 137, 43, .1); }
.account-tier-mark[data-tier="admin"] { border-color: color-mix(in srgb, var(--web-accent) 30%, var(--web-line)); }

@media (orientation: portrait), (max-width: 719px) {
  .account-summary-button { grid-template-columns: 27px auto 14px; padding-inline: 5px; }
  .account-tier-mark { min-width: 32px; height: 21px; padding-inline: 6px; }
}

/* Final VIP and approval actions use explicit contrast instead of relying on
   Fluent token inheritance through native button elements. */
.quota-card-header > .quota-membership-action {
  min-height: 40px;
  padding-inline: 15px;
  border: 1px solid #dfc47b;
  background: #fff8e7;
  box-shadow: 0 5px 14px rgba(132, 92, 20, .1);
  color: #6b4a0f !important;
  font-size: 13px;
  font-weight: 750;
}
.quota-card-header > .quota-membership-action > span {
  margin: 0;
  color: #6b4a0f !important;
  font-size: 12px;
  font-weight: 750;
}
.quota-card-header > .quota-membership-action svg { color: #9a6b16; }
.quota-card-header > .quota-membership-action:hover {
  border-color: #cbaa54;
  background: #f7e8bc;
  box-shadow: 0 7px 17px rgba(132, 92, 20, .14);
  color: #563a09 !important;
}
.quota-card-header > .quota-membership-action:hover > span { color: #563a09 !important; }
.quota-card-header > .quota-membership-action:active {
  border-color: #bd9a43;
  background: #eedba1;
  box-shadow: none;
  color: #4d3307 !important;
}
.quota-card-header > .quota-membership-action:active > span { color: #4d3307 !important; }
.quota-card-header > .quota-membership-action:focus-visible {
  outline: 3px solid rgba(175, 126, 30, .2);
}
.quota-card-header > .quota-membership-action.is-vip {
  border-color: #d6bd78;
  background: #fff7df;
  box-shadow: none;
  color: #765515 !important;
}
.quota-card-header > .quota-membership-action.is-vip svg { color: currentColor; }
.quota-card-header > .quota-membership-action.is-vip:hover {
  border-color: #c9ac5e;
  background: #f7e9bd;
  color: #60430e !important;
}

.approval-card {
  border-color: color-mix(in srgb, #b77a14 44%, var(--web-line));
  background:
    radial-gradient(circle at 100% 0, rgba(212, 151, 42, .11), transparent 48%),
    linear-gradient(145deg, #fff8e9, var(--web-panel) 72%);
  box-shadow: 0 14px 34px rgba(89, 64, 19, .1);
}
.approval-card .overline { color: #8b5c0d; }
.approval-card h3 { color: var(--web-text); }
.approval-context {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.approval-context[hidden] { display: none; }
.approval-context > span {
  display: grid;
  min-width: 0;
  padding: 10px 12px;
  gap: 3px;
  border: 1px solid color-mix(in srgb, #b98a35 23%, var(--web-line));
  border-radius: 10px;
  background: color-mix(in srgb, var(--web-panel) 82%, transparent);
}
.approval-context small { color: var(--web-muted); font-size: 10px; font-weight: 650; }
.approval-context strong { color: var(--web-text); font-size: 12px; font-weight: 560; line-height: 1.5; overflow-wrap: anywhere; user-select: text; }

.action-approval-dialog {
  overflow: hidden;
  border-color: color-mix(in srgb, #b77a14 42%, var(--web-line));
  background:
    radial-gradient(circle at 100% 0, rgba(213, 151, 39, .12), transparent 43%),
    var(--web-panel);
  box-shadow: 0 28px 72px rgba(57, 42, 17, .22);
}
.action-approval-dialog .passport-dialog-header > span { color: #8b5c0d; }
.action-approval-body > .approval-context { margin-top: 0; }

html[data-theme="dark"] .quota-card-header > .quota-membership-action {
  border-color: rgba(230, 193, 107, .38);
  background: rgba(167, 116, 27, .13);
  box-shadow: none;
  color: #f1cf82 !important;
}
html[data-theme="dark"] .quota-card-header > .quota-membership-action > span { color: #f1cf82 !important; }
html[data-theme="dark"] .approval-card,
html[data-theme="dark"] .action-approval-dialog {
  border-color: rgba(225, 171, 73, .35);
  background:
    radial-gradient(circle at 100% 0, rgba(228, 173, 70, .15), transparent 46%),
    linear-gradient(145deg, #282126, var(--web-panel) 72%);
}
html[data-theme="dark"] .approval-card .overline,
html[data-theme="dark"] .action-approval-dialog .passport-dialog-header > span { color: #efc16e; }

@media (prefers-color-scheme: dark) {
  html[data-theme="system"] .quota-card-header > .quota-membership-action {
    border-color: rgba(230, 193, 107, .38);
    background: rgba(167, 116, 27, .13);
    box-shadow: none;
    color: #f1cf82 !important;
  }
  html[data-theme="system"] .quota-card-header > .quota-membership-action > span { color: #f1cf82 !important; }
  html[data-theme="system"] .approval-card,
  html[data-theme="system"] .action-approval-dialog {
    border-color: rgba(225, 171, 73, .35);
    background:
      radial-gradient(circle at 100% 0, rgba(228, 173, 70, .15), transparent 46%),
      linear-gradient(145deg, #282126, var(--web-panel) 72%);
  }
  html[data-theme="system"] .approval-card .overline,
  html[data-theme="system"] .action-approval-dialog .passport-dialog-header > span { color: #efc16e; }
}

@media (orientation: portrait), (max-width: 719px) {
  .quota-card-header { align-items: flex-start; }
  .quota-card-header > .quota-membership-action { min-height: 38px; padding-inline: 11px; }
  .approval-context { grid-template-columns: minmax(0, 1fr); }
}
/* Long prompts, paths and capability labels must shrink inside mobile modals. */
.passport-modal-layer { grid-template-columns: minmax(0, 1fr); }
.passport-dialog { min-width: 0; max-width: 100%; box-sizing: border-box; }
.passport-summary, .passport-summary-row, .passport-summary-row > strong,
.passport-summary-row > strong > span, .passport-summary-row > strong > small {
  min-width: 0; max-width: 100%; overflow-wrap: anywhere;
}
.passport-summary-row i { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.passport-actions { flex-wrap: wrap; }
.passport-actions > fluent-button { min-width: 0; max-width: 100%; }
@media (max-width: 600px) {
  .passport-actions > fluent-button { flex: 1 1 130px; }
}
