:root{
  color-scheme: light;
  --bg:#f4f1ec; --surface:#ffffff; --surface-raised:#faf8f5; --border:#eae4da;
  --text:#211d19; --text-muted:#6a635b;
  --accent:#e8683a; --accent-contrast:#ffffff; --accent-tint:#fdece0; --accent-soft-ink:#b2481f;
  --teal:#2a78d6; --teal-tint:#eaf1fb;
  --good:#0ca30c; --good-tint:#e8f6e3;
  --warn:#c98100; --warn-tint:#fdf1dc;
  --critical:#c33636; --critical-tint:#fbe6e2;
  --gold:#f0a04b; --gold-tint:#fdecdc;
  --sidebar-bg:#ffffff; --sidebar-text:#211d19; --sidebar-text-muted:#8f867b; --sidebar-border:#eae4da;
  --font-display:'Noto Sans TC', -apple-system, sans-serif;
  --font-body:'Noto Sans TC', 'PingFang TC', sans-serif;
  --font-mono:'Noto Sans TC', ui-monospace, monospace;
}
*{box-sizing:border-box;}
html,body{ background:var(--bg); }
body{ margin:0; color:var(--text); font-family:var(--font-body); }
[hidden]{ display:none !important; }
.num{ font-variant-numeric:tabular-nums; }
.shell{ max-width:none; margin:0; }

/* ---------- Login (no sidebar) ---------- */
.login-screen{ min-height:100vh; display:flex; align-items:center; justify-content:center; padding:24px; }
.login-card{ width:100%; max-width:380px; background:var(--surface); border:1px solid var(--border); border-radius:20px; padding:34px 28px; text-align:center; box-shadow:0 1px 2px rgba(33,29,25,.04), 0 18px 40px -20px rgba(33,29,25,.16); }
.login-card h1{ font-family:var(--font-display); font-weight:900; font-size:22px; margin:14px 0 2px; }
.login-sub{ font-size:12.5px; color:var(--text-muted); margin:0 0 22px; }
.login-form{ display:flex; flex-direction:column; gap:14px; text-align:left; }
.login-form label{ display:block; font-size:12px; font-weight:600; color:var(--text-muted); }
.login-form input{ width:100%; margin-top:6px; font:inherit; font-size:14px; color:var(--text); background:var(--surface-raised); border:1px solid var(--border); border-radius:10px; padding:10px 12px; }
.login-form input:focus{ outline:2px solid var(--accent); outline-offset:1px; border-color:var(--accent); }
.login-error{ margin:0; font-size:12px; color:var(--critical); font-weight:700; }
.login-submit{ appearance:none; cursor:pointer; font:inherit; font-weight:700; font-size:14px; color:var(--accent-contrast); background:var(--accent); border:none; border-radius:10px; padding:12px; box-shadow:0 6px 16px -8px rgba(232,104,58,.55); }
.login-submit:hover{ background:#cf5327; }

/* ---------- App shell: sidebar + content ---------- */
.app-layout{ display:flex; min-height:100vh; }
.sidebar{
  flex:none; width:230px;
  background:var(--sidebar-bg); color:var(--sidebar-text);
  border-right:1px solid var(--sidebar-border);
  display:flex; flex-direction:column; gap:26px;
  padding:26px 20px; position:sticky; top:0; height:100vh;
}
.sidebar .brand{ display:flex; align-items:center; gap:12px; }
.sidebar .brand h1{ font-family:var(--font-display); font-weight:700; font-size:17px; margin:0; color:var(--sidebar-text); }
.sidebar .brand p{ margin:2px 0 0; color:var(--sidebar-text-muted); font-size:11.5px; }
.brand-mark{ width:42px; height:42px; border-radius:12px; flex:none; background:linear-gradient(155deg, var(--gold), var(--accent)); display:flex; align-items:center; justify-content:center; color:#fff; font-family:var(--font-display); font-weight:900; font-size:17px; box-shadow:0 6px 16px -8px rgba(232,104,58,.5); }

.side-nav{ display:flex; flex-direction:column; gap:6px; }
.side-nav a{
  display:flex; align-items:center; gap:10px; text-decoration:none; color:var(--text-muted);
  font-size:13.5px; font-weight:600; padding:10px 12px; border-radius:10px;
  border:1px solid transparent;
}
.side-nav a:hover{ background:var(--surface-raised); color:var(--text); border-color:var(--border); }
.side-nav a.active{ background:var(--accent-tint); color:var(--accent-soft-ink); font-weight:700; }
.nav-ic{ width:16px; height:16px; flex:none; }

.frame-view{ width:100%; height:calc(100vh - 56px); min-height:520px; border:none; border-radius:14px; background:var(--surface); display:block; }
@media (max-width:860px){ .frame-view{ height:calc(100vh - 140px); } }

.sidebar-foot{ margin-top:auto; display:flex; flex-direction:column; gap:10px; padding-top:16px; border-top:1px solid var(--sidebar-border); }
.sidebar-foot #sessionLabel{ font-size:12px; color:var(--sidebar-text-muted); }
.logout-btn{ appearance:none; cursor:pointer; font:inherit; font-size:12.5px; font-weight:600; color:var(--text); background:var(--surface-raised); border:1px solid var(--border); border-radius:999px; padding:8px 15px; width:100%; }
.logout-btn:hover{ background:var(--accent-tint); border-color:var(--accent); color:var(--accent-soft-ink); }

.main-content{ flex:1; min-width:0; padding:28px clamp(16px,4vw,40px) 48px; }

#sidebarToggle{ display:none; }
#sidebarBackdrop{ display:none; }

@media (max-width:860px){
  #sidebarToggle{
    display:flex; align-items:center; justify-content:center;
    position:fixed; top:14px; left:14px; z-index:220;
    width:42px; height:42px; border-radius:12px; border:1px solid var(--border); cursor:pointer;
    background:var(--surface); color:var(--text); font-size:19px;
    box-shadow:0 8px 20px -8px rgba(33,29,25,.25);
  }
  .app-layout{ display:block; }
  .main-content{ padding-top:74px; }

  .sidebar{
    position:fixed; top:0; left:0; z-index:210;
    width:250px; max-width:82vw; height:100vh;
    transform:translateX(-100%);
    transition:transform .22s ease;
    box-shadow:0 0 0 rgba(0,0,0,0);
  }
  .sidebar.open{ transform:translateX(0); box-shadow:16px 0 40px -20px rgba(0,0,0,.25); }

  #sidebarBackdrop.open{
    display:block; position:fixed; inset:0; z-index:205;
    background:rgba(33,29,25,.35);
  }
}

.card{ background:var(--surface); border:1px solid var(--border); border-radius:18px; padding:20px 22px; box-shadow:0 1px 2px rgba(33,29,25,.03), 0 8px 24px -14px rgba(33,29,25,.10); }
.card + .card{ margin-block-start:18px; }
.card-head{ display:flex; align-items:baseline; justify-content:space-between; gap:12px; margin-block-end:16px; }
.card-head h3{ font-family:var(--font-display); font-weight:700; font-size:17px; margin:0; }
.card-head .hint{ font-size:12px; color:var(--text-muted); }

.layout{ display:grid; grid-template-columns:320px 1fr; gap:22px; align-items:start; }
@media (max-width:860px){ .layout{ grid-template-columns:1fr; } }

.roster{ display:flex; flex-direction:column; gap:8px; }
.roster-row{ display:flex; flex-direction:column; gap:6px; padding:11px 12px; border-radius:12px; border:1px solid transparent; cursor:pointer; background:var(--surface-raised); text-align:left; width:100%; font:inherit; color:inherit; }
.roster-row:hover{ border-color:var(--border); }
.roster-row.active{ border-color:var(--accent); background:var(--accent-tint); }
.roster-top{ display:flex; justify-content:space-between; gap:10px; align-items:center; }
.roster-row b{ display:block; font-size:14px; }
.roster-row .muted{ font-size:12px; color:var(--text-muted); }
.badge{ display:inline-flex; align-items:center; gap:4px; font-size:11px; font-weight:600; padding:3px 9px; border-radius:999px; background:var(--surface-raised); color:var(--text-muted); border:1px solid var(--border); }
.badge.low{ background:var(--warn-tint); color:var(--warn); border-color:transparent; }
.badge.plan{ background:var(--teal-tint); color:var(--teal); border-color:transparent; }

.field{ margin-block-end:14px; }
.field:last-child{ margin-block-end:0; }
.field label{ display:block; font-size:12px; color:var(--text-muted); margin-block-end:5px; font-weight:600; }
.field input, .field textarea{ width:100%; font:inherit; font-size:14px; color:var(--text); background:var(--surface-raised); border:1px solid var(--border); border-radius:10px; padding:9px 11px; resize:vertical; }
.field input:focus, .field textarea:focus{ outline:2px solid var(--accent); outline-offset:1px; border-color:var(--accent); }
.field-list{ display:flex; flex-direction:column; gap:7px; }
.save-btn{ appearance:none; cursor:pointer; font:inherit; font-weight:700; font-size:13.5px; color:var(--accent-contrast); background:var(--accent); border:none; border-radius:10px; padding:10px 18px; }
.save-btn:hover{ background:#cf5327; }
.save-status{ font-size:12px; color:var(--good); margin-left:10px; }

.journal-add{ display:flex; flex-direction:column; gap:8px; margin-block-end:16px; padding-block-end:16px; border-bottom:1px dashed var(--border); }
.journal-add input[type="date"]{ font:inherit; font-size:13px; color:var(--text); background:var(--surface-raised); border:1px solid var(--border); border-radius:8px; padding:7px 10px; width:fit-content; }
.journal-add textarea{ width:100%; font:inherit; font-size:13.5px; color:var(--text); background:var(--surface-raised); border:1px solid var(--border); border-radius:10px; padding:9px 11px; resize:vertical; }
.journal-list{ display:flex; flex-direction:column; gap:10px; }
.journal-entry{ padding:10px 12px; border-radius:10px; background:var(--surface-raised); border:1px solid var(--border); }
.journal-entry .date{ font-family:var(--font-mono); font-size:11px; color:var(--text-muted); display:flex; justify-content:space-between; }
.journal-entry .text{ font-size:13.5px; margin-top:4px; }
.journal-del{ appearance:none; border:none; background:none; cursor:pointer; color:var(--text-muted); font-size:11px; }
.journal-del:hover{ color:var(--critical); }

.mission-numbers{ display:flex; gap:28px; flex-wrap:wrap; margin-block-end:14px; }
.mission-numbers .k{ font-size:12px; color:var(--text-muted); }
.mission-numbers .v{ font-family:var(--font-display); font-weight:700; font-size:clamp(22px,3vw,30px); }
.progress-track{ height:10px; border-radius:999px; background:var(--surface-raised); border:1px solid var(--border); overflow:hidden; }
.progress-fill{ height:100%; border-radius:999px; background:linear-gradient(90deg, var(--gold), var(--accent)); }
.judgment-item{ display:flex; gap:10px; margin-block-end:10px; }
.judgment-item .k{ flex:none; width:76px; font-size:12px; color:var(--text-muted); font-weight:600; }
.button-row{ display:flex; align-items:center; gap:10px; margin-block-start:14px; }
.demo-note{ font-size:11.5px; color:var(--text-muted); margin-block-start:16px; }

/* ---------- Home dashboard (real data) ---------- */
.dash-grid{ display:grid; grid-template-columns:repeat(6,1fr); gap:14px; margin-block-end:20px; }
@media (max-width:1080px){ .dash-grid{ grid-template-columns:repeat(3,1fr); } }
@media (max-width:560px){ .dash-grid{ grid-template-columns:repeat(2,1fr); } }
.dash-grid.cols-4{ grid-template-columns:repeat(4,1fr); }
.dash-grid.cols-3{ grid-template-columns:repeat(3,1fr); }
.dash-grid.cols-2{ grid-template-columns:repeat(2,1fr); }
@media (max-width:760px){ .dash-grid.cols-4,.dash-grid.cols-3{ grid-template-columns:repeat(2,1fr); } }
@media (max-width:480px){ .dash-grid.cols-4,.dash-grid.cols-3,.dash-grid.cols-2{ grid-template-columns:1fr; } }
.dash-tile{ min-width:0; }
.dash-tile .k{ font-size:11.5px; color:var(--text-muted); font-weight:600; }
.dash-tile .v{ font-family:var(--font-display); font-weight:900; font-size:20px; margin-top:6px; letter-spacing:-.01em; }
.dash-tile .d{ font-size:11px; margin-top:4px; font-weight:700; }
.dash-tile .d.up{ color:var(--good); }
.dash-tile .d.down{ color:var(--critical); }

.dash-row{ display:grid; grid-template-columns:1.4fr 1fr; gap:22px; }
@media (max-width:860px){ .dash-row{ grid-template-columns:1fr; gap:20px; } }

.dfunnel-row{ display:flex; align-items:center; gap:10px; margin-block-end:9px; }
.dfunnel-label{ width:78px; flex:none; font-size:12px; color:var(--text-muted); font-weight:600; }
.dfunnel-track{ flex:1; background:var(--surface-raised); border-radius:8px; height:26px; }
.dfunnel-fill{ height:100%; border-radius:8px; display:flex; align-items:center; padding-inline-start:10px; color:#fff; font-weight:700; font-size:12.5px; }
.dfunnel-rate{ width:52px; flex:none; text-align:right; font-size:11.5px; color:var(--text-muted); font-weight:600; }

.ddonut-wrap{ display:flex; align-items:center; gap:16px; flex-wrap:wrap; }
.ddonut-legend{ display:flex; flex-direction:column; gap:8px; flex:1; min-width:110px; }
.ddonut-legend-row{ display:flex; align-items:center; gap:8px; font-size:12.5px; }
.ddonut-dot{ width:9px; height:9px; border-radius:3px; flex:none; }

.decision-card{ background:var(--surface); border:1px solid var(--border); border-radius:18px; padding:20px 22px; position:relative; overflow:hidden; box-shadow:0 1px 2px rgba(33,29,25,.03), 0 8px 24px -14px rgba(33,29,25,.10); }
.decision-card::before{ content:""; position:absolute; left:0; top:0; bottom:0; width:5px; background:var(--accent); }
.decision-row{ display:flex; justify-content:space-between; gap:14px; align-items:baseline; padding:8px 0; border-bottom:1px dashed var(--border); font-size:13px; }
.decision-row:last-child{ border-bottom:none; }
.decision-row .k{ color:var(--text-muted); font-weight:600; flex:none; }
.decision-row .v{ font-weight:700; text-align:right; }

/* ---------- Execution home ---------- */
.command-head{
  display:flex; align-items:flex-end; justify-content:space-between; gap:24px;
  margin:2px 0 20px; padding:0 2px;
}
.command-head h2{ font-family:var(--font-display); font-size:clamp(24px,3vw,34px); line-height:1.2; margin:3px 0 8px; letter-spacing:-.025em; }
.command-head p:not(.command-eyebrow){ margin:0; color:var(--text-muted); font-size:14px; }
.command-eyebrow,.section-kicker{ margin:0; color:var(--accent-soft-ink); font:700 11px/1.2 var(--font-mono); letter-spacing:.12em; text-transform:uppercase; }
.cycle-badge{ flex:none; padding:10px 14px; border:1px solid var(--border); border-radius:999px; background:var(--surface); color:var(--text-muted); font:600 12.5px/1.2 var(--font-mono); }

.execution-grid{ display:grid; grid-template-columns:minmax(0,1.35fr) minmax(320px,.65fr); gap:18px; align-items:stretch; margin-bottom:18px; }
.execution-grid-secondary{ grid-template-columns:minmax(0,1.1fr) minmax(320px,.9fr); }
.execution-grid .card{ margin:0; }
.execution-grid .card-head > div h3{ margin:4px 0 0; }
.text-link{ color:var(--accent-soft-ink); text-decoration:none; font-size:12.5px; font-weight:700; }
.text-link:hover{ color:var(--accent); }

.goal-card{ background:linear-gradient(145deg,#fff 0%,#fffaf6 100%); }
.goal-stack{ display:flex; flex-direction:column; gap:1px; }
.goal-row{ display:grid; grid-template-columns:38px 1fr; gap:12px; padding:14px 2px; border-top:1px solid var(--border); }
.goal-row:first-child{ border-top:0; padding-top:4px; }
.goal-no{ display:flex; align-items:center; justify-content:center; width:34px; height:34px; border-radius:11px; background:var(--accent-tint); color:var(--accent-soft-ink); font:700 11px/1 var(--font-mono); }
.goal-row b{ display:block; font-size:15px; line-height:1.4; }
.goal-row p{ margin:4px 0 0; color:var(--text-muted); font-size:13px; line-height:1.55; }

.today-card{ background:#211d19; border-color:#211d19; color:#fff; box-shadow:0 16px 32px -22px rgba(33,29,25,.65); }
.today-card .section-kicker{ color:#ffb594; }
.today-card .hint{ color:rgba(255,255,255,.55); }
.today-list{ display:flex; flex-direction:column; gap:10px; }
.today-task{ display:grid; grid-template-columns:22px 1fr; gap:10px; align-items:center; min-height:44px; padding:8px 10px; border:1px solid rgba(255,255,255,.14); border-radius:12px; background:rgba(255,255,255,.06); cursor:pointer; }
.today-task > input[type="checkbox"]{ position:absolute; opacity:0; pointer-events:none; }
.today-check{ width:20px; height:20px; border:1.5px solid rgba(255,255,255,.55); border-radius:7px; display:flex; align-items:center; justify-content:center; }
.today-task > input[type="checkbox"]:checked + .today-check{ background:var(--accent); border-color:var(--accent); }
.today-task > input[type="checkbox"]:checked + .today-check::after{ content:"✓"; color:#fff; font-size:13px; font-weight:900; }
.today-task:has(> input[type="checkbox"]:checked) .today-input{ text-decoration:line-through; color:rgba(255,255,255,.45); }
.today-input{ width:100%; min-width:0; padding:3px 0; border:0; border-bottom:1px solid transparent; outline:0; background:transparent; color:#fff; font:600 14px/1.45 var(--font-body); }
.today-input::placeholder{ color:rgba(255,255,255,.38); }
.today-input:focus{ border-bottom-color:rgba(255,255,255,.42); }
.focus-rule{ margin:14px 0 0; padding-top:13px; border-top:1px dashed rgba(255,255,255,.2); color:rgba(255,255,255,.62); font-size:12.5px; }
.focus-rule b{ color:#fff; }

.weekly-card .card-head{ align-items:center; }
.score-number{ color:var(--accent-soft-ink); font:800 25px/1 var(--font-display); }
.score-track{ height:8px; border-radius:999px; background:var(--surface-raised); overflow:hidden; margin-bottom:14px; }
.score-fill{ width:0; height:100%; border-radius:inherit; background:var(--critical); transition:width .25s ease,background .25s ease; }
.commitment-list{ display:grid; grid-template-columns:1fr 1fr; gap:8px 12px; }
.commitment-list label{ display:grid; grid-template-columns:18px 1fr; gap:8px; align-items:flex-start; padding:9px 10px; border:1px solid var(--border); border-radius:10px; background:var(--surface-raised); cursor:pointer; color:var(--text-muted); font-size:13px; line-height:1.45; }
.commitment-list input{ width:16px; height:16px; margin:1px 0 0; accent-color:var(--accent); }
.commitment-list label:has(input:checked){ color:var(--text); background:var(--good-tint); border-color:rgba(12,163,12,.18); }
.score-note{ margin:12px 0 0; color:var(--text-muted); font-size:12px; }

.guardrail-card{ position:relative; overflow:hidden; }
.guardrail-card::before{ content:""; position:absolute; inset:0 auto 0 0; width:5px; background:var(--accent); }
.local-save{ color:var(--good); font-size:12px; }
.guardrail-fields{ display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.guardrail-fields label{ display:flex; flex-direction:column; gap:5px; }
.guardrail-fields label:first-child,.guardrail-fields label:nth-child(2){ grid-column:1 / -1; }
.guardrail-fields span{ color:var(--text-muted); font-size:11.5px; font-weight:700; }
.guardrail-fields input{ width:100%; padding:10px 11px; border:1px solid var(--border); border-radius:10px; background:var(--surface-raised); color:var(--text); font:500 14px/1.35 var(--font-body); }
.guardrail-fields input:focus{ outline:2px solid var(--accent); outline-offset:1px; }

.resource-section{ margin:26px 0 22px; }
.resource-head{ display:flex; align-items:flex-end; justify-content:space-between; gap:20px; margin-bottom:12px; padding:0 2px; }
.resource-head h3{ margin:4px 0 0; font:800 19px/1.3 var(--font-display); }
.resource-head p{ max-width:600px; margin:0; color:var(--text-muted); font-size:13px; text-align:right; }
.resource-grid{ display:grid; grid-template-columns:repeat(4,1fr); gap:12px; }
.resource-card{ min-width:0; display:grid; grid-template-columns:38px 1fr; gap:10px; align-items:center; padding:15px; border:1px solid var(--border); border-radius:14px; background:var(--surface); color:inherit; text-decoration:none; box-shadow:0 8px 20px -18px rgba(33,29,25,.25); transition:transform .16s ease,border-color .16s ease; }
.resource-card:hover{ transform:translateY(-2px); border-color:var(--accent); }
.resource-icon{ width:38px; height:38px; display:flex; align-items:center; justify-content:center; border-radius:11px; background:var(--accent-tint); color:var(--accent-soft-ink); }
.resource-icon.blue{ background:var(--teal-tint); color:var(--teal); }
.resource-icon.gold{ background:var(--gold-tint); color:#b66b15; }
.resource-icon.green{ background:var(--good-tint); color:var(--good); }
.resource-icon svg{ width:18px; height:18px; }
.resource-card span:nth-child(2){ min-width:0; }
.resource-card b{ display:block; font-size:13.5px; }
.resource-card small{ display:block; margin-top:3px; overflow:hidden; color:var(--text-muted); font-size:11.5px; line-height:1.35; text-overflow:ellipsis; white-space:nowrap; }
.resource-card strong{ grid-column:1 / -1; color:var(--text); font:800 15px/1.2 var(--font-display); }

.operations-panel{ margin:8px 0 24px; border:1px solid var(--border); border-radius:16px; background:var(--surface); overflow:hidden; }
.operations-panel > summary{ display:flex; align-items:center; justify-content:space-between; gap:20px; padding:15px 18px; cursor:pointer; list-style:none; }
.operations-panel > summary::-webkit-details-marker{ display:none; }
.operations-panel > summary span:first-child{ display:flex; align-items:baseline; gap:10px; }
.operations-panel > summary b{ font-size:14px; }
.operations-panel > summary small,.operations-panel > summary span:last-child{ color:var(--text-muted); font-size:12px; }
.operations-panel[open] > summary{ border-bottom:1px solid var(--border); }
.operations-body{ padding:18px; background:var(--surface-raised); }
.operations-body > .card{ margin:0; }
.compact-head{ margin-block-end:10px; }
.compact-head h3{ font-size:14px; }
.section-divider{ display:flex; align-items:center; gap:12px; margin:30px 0 16px; color:var(--text-muted); font-size:12px; font-weight:700; letter-spacing:.08em; }
.section-divider::before,.section-divider::after{ content:""; height:1px; background:var(--border); flex:1; }

@media (max-width:1120px){
  .resource-grid{ grid-template-columns:repeat(2,1fr); }
}
@media (max-width:900px){
  .command-head{ align-items:flex-start; flex-direction:column; gap:12px; }
  .execution-grid,.execution-grid-secondary{ grid-template-columns:1fr; }
  .resource-head{ align-items:flex-start; flex-direction:column; gap:6px; }
  .resource-head p{ text-align:left; }
}
@media (max-width:620px){
  .main-content{ padding-inline:14px; }
  .command-head h2{ font-size:25px; }
  .card{ padding:17px 16px; }
  .commitment-list{ grid-template-columns:1fr; }
  .guardrail-fields{ grid-template-columns:1fr; }
  .guardrail-fields label{ grid-column:auto !important; }
  .resource-grid{ grid-template-columns:1fr; }
  .operations-panel > summary span:first-child{ align-items:flex-start; flex-direction:column; gap:2px; }
  .operations-panel > summary span:last-child{ display:none; }
  .operations-body{ padding:10px; }
}

/* ---------- AI assistant widget ---------- */
#assistantWidget{ position:fixed; right:20px; bottom:20px; z-index:200; }
#assistantToggle{
  width:52px; height:52px; border-radius:50%; border:none; cursor:pointer;
  background:var(--accent); color:#fff; font-size:22px; box-shadow:0 10px 24px -8px rgba(232,104,58,.45);
}
#assistantToggle:hover{ background:#cf5327; }
#assistantPanel{
  position:absolute; right:0; bottom:64px; width:340px; max-width:calc(100vw - 40px);
  background:var(--surface); border:1px solid var(--border); border-radius:16px;
  box-shadow:0 20px 48px -16px rgba(33,29,25,.28); display:flex; flex-direction:column; overflow:hidden;
}
.assistant-head{
  display:flex; justify-content:space-between; align-items:center; padding:12px 14px;
  background:var(--accent); color:#fff; font-family:var(--font-display); font-weight:700; font-size:14px;
}
.assistant-head button{ appearance:none; border:none; background:none; color:inherit; font-size:18px; cursor:pointer; line-height:1; }
.assistant-log{ padding:12px 14px; display:flex; flex-direction:column; gap:10px; max-height:360px; min-height:160px; overflow-y:auto; }
.assistant-msg{ font-size:13px; line-height:1.5; padding:9px 12px; border-radius:12px; max-width:88%; white-space:pre-wrap; }
.assistant-msg.assistant-bot{ background:var(--surface-raised); align-self:flex-start; }
.assistant-msg.assistant-user{ background:var(--accent-tint); align-self:flex-end; }
.assistant-msg.assistant-error{ background:var(--critical-tint); color:var(--critical); align-self:flex-start; }
.assistant-actions{ font-size:11px; color:var(--text-muted); margin-top:4px; }
.assistant-input-row{ display:flex; gap:8px; padding:10px 12px; border-top:1px solid var(--border); }
.assistant-input-row input{
  flex:1; font:inherit; font-size:13px; padding:9px 11px; border:1px solid var(--border); border-radius:10px; background:var(--surface-raised); color:var(--text);
}
.assistant-input-row input:focus{ outline:2px solid var(--accent); outline-offset:1px; border-color:var(--accent); }
.assistant-input-row button{
  appearance:none; cursor:pointer; font:inherit; font-weight:700; font-size:12.5px;
  color:#fff; background:var(--accent); border:none; border-radius:10px; padding:0 14px;
}
.assistant-input-row button:disabled{ opacity:.5; cursor:not-allowed; }

/* 執行首頁：直接點下去就能改的欄位（資料存在伺服器） */
.edit-line{ outline:none; border-radius:6px; padding:1px 4px; margin:0 -4px; transition:background .12s; }
.edit-line:hover{ background:var(--surface-raised); }
.edit-line:focus{ background:var(--accent-tint); box-shadow:inset 0 -1px 0 var(--accent); }
.edit-line:empty::before{ content:attr(data-placeholder); color:var(--text-muted); }

.commitment-list label{ display:flex; align-items:center; gap:8px; }
.commitment-list .commit-text{ flex:1; min-width:0; font:inherit; font-size:13px; color:var(--text);
  background:none; border:none; border-bottom:1px solid transparent; padding:3px 2px; }
.commitment-list .commit-text:hover{ border-bottom-color:var(--border); }
.commitment-list .commit-text:focus{ outline:none; border-bottom-color:var(--accent); }
.commitment-list .commit-goal{ flex:none; font:inherit; font-size:11px; color:var(--text-muted);
  background:var(--surface-raised); border:1px solid var(--border); border-radius:999px; padding:2px 6px; }
.commitment-list .commit-del{ flex:none; appearance:none; border:none; background:none; cursor:pointer;
  color:var(--text-muted); font-size:15px; line-height:1; padding:0 2px; }
.commitment-list .commit-del:hover{ color:var(--critical); }
.commit-add{ appearance:none; cursor:pointer; font:inherit; font-size:12.5px; font-weight:600;
  color:var(--text-muted); background:none; border:1px dashed var(--border); border-radius:9px;
  padding:7px 12px; margin-block-start:6px; width:100%; }
.commit-add:hover{ color:var(--text); border-color:var(--text-muted); }
