:root {
  color-scheme: light;
  --brand:#9c2831;
  --brand-hover:#91222c;
  --brand-active:#721b23;
  --brand-soft:#f3e4e6;
  --brand-faint:#faf3f4;
  --canvas:#faf9f7;
  --surface:#fff;
  --surface-subtle:#f6f5f3;
  --surface-strong:#f0eeeb;
  --ink:#171717;
  --muted:#686560;
  --hint:#96918b;
  --line:#e4e0da;
  --line-soft:#efede9;
  --success:#237b66;
  --success-soft:#e8f4f0;
  --warning:#a56518;
  --warning-soft:#fbf2e4;
  --danger:#b43c46;
  --danger-soft:#faebed;
  --focus:rgba(156,40,49,.2);
  --font-ui:"Noto Sans SC","PingFang SC","Microsoft YaHei","Noto Sans CJK SC",system-ui,sans-serif;
  --radius-control:7px;
  --radius-card:11px;
  --radius-panel:16px;
  --shadow-sm:0 1px 2px rgba(23,23,23,.04),0 4px 14px rgba(23,23,23,.035);
  --shadow-md:0 16px 42px rgba(23,23,23,.13);
}

*{box-sizing:border-box}
html{min-width:320px;background:var(--canvas);scroll-behavior:smooth}
body{margin:0;background:var(--canvas);color:var(--ink);font:13px/1.62 var(--font-ui)}
button,input,select,textarea{font:inherit}
b,strong{font-weight:inherit}
button,a{color:inherit}
button{cursor:pointer}
a{text-decoration:none}
[hidden]{display:none!important}
:focus-visible{outline:3px solid var(--focus);outline-offset:2px}
.svg-definitions{position:absolute;width:0;height:0;overflow:hidden}
.icon{width:18px;height:18px;display:block;flex:none;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.skip-link{position:fixed;z-index:500;left:8px;top:8px;padding:9px 12px;border-radius:7px;background:var(--ink);color:#fff;transform:translateY(-150%)}
.skip-link:focus{transform:none}

.app{min-height:100vh;display:grid;background:var(--canvas)}
.sidebar{position:sticky;z-index:60;top:0;height:100vh;border-right:1px solid var(--line);background:#fff}
.stage{min-width:0}
.topbar{position:sticky;z-index:40;top:0;height:62px;padding:0 28px;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:14px;background:rgba(255,255,255,.96);backdrop-filter:blur(14px)}
.menu-btn{display:none;width:40px;height:40px;padding:0;border:1px solid var(--line);border-radius:8px;place-items:center;background:#fff}
.crumb{min-width:0;color:var(--muted);font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.topbar-spacer{flex:1}
.workspace-link{min-height:40px;min-width:112px;padding:0 16px;border:1px solid var(--line);border-radius:7px;display:inline-flex;align-items:center;justify-content:center;background:#fff;font-size:14px;font-weight:600}
.workspace-link:hover{background:var(--surface-subtle);border-color:#cbc6bf}
.main{width:min(1180px,calc(100% - 48px));margin:0 auto;padding:28px 0 48px}
.panel{border:1px solid var(--line);border-radius:var(--radius-panel);background:#fff;box-shadow:var(--shadow-sm)}
.eyebrow{display:block;color:var(--brand);font-size:12px;line-height:1.4;font-weight:400;letter-spacing:.04em}

.loading-state{min-height:420px;display:flex;align-items:center;justify-content:center;gap:15px;color:var(--muted)}
.loading-state h1{margin:0;color:var(--ink);font-size:18px;line-height:1.35;font-weight:600}
.loading-state p{margin:4px 0 0}
.loading-mark{width:18px;height:18px;border:2px solid var(--line);border-top-color:var(--brand);border-radius:50%;animation:spin .75s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
.fatal-state{max-width:620px;margin:90px auto;padding:34px}
.fatal-state h1{margin:8px 0 6px;font-size:24px;line-height:1.3;font-weight:600}
.fatal-state p{margin:0 0 20px;color:var(--muted);font-size:14px}

.page-head{display:flex;align-items:flex-end;justify-content:space-between;gap:24px}
.page-head h1{margin:5px 0 3px;font-size:24px;line-height:1.25;font-weight:600;letter-spacing:-.015em}
.page-head p{max-width:650px;margin:0;color:var(--muted);font-size:13px;line-height:1.55}
.page-period{min-width:190px;padding:12px 14px;border:1px solid var(--line);border-radius:11px;display:flex;align-items:center;gap:10px;background:#fff}
.page-period>.icon{color:var(--brand)}
.page-period span{display:grid;line-height:1.35}
.page-period small{color:var(--hint);font-size:12px}
.page-period strong{font-size:14px;font-weight:400}
.view-tabs{width:max-content;margin:24px 0 16px;padding:3px;border-radius:9px;display:flex;gap:2px;background:var(--surface-strong)}
.view-tabs button{height:40px;padding:0 16px;border:0;border-radius:7px;background:transparent;color:var(--muted);font-size:14px}
.view-tabs button.active{background:#fff;color:var(--ink);box-shadow:var(--shadow-sm);font-weight:600}

.current-plan{overflow:hidden}
.current-plan-head{padding:22px 24px;border-bottom:1px solid var(--line);display:flex;align-items:flex-start;justify-content:space-between;gap:18px}
.current-plan-head h2{margin:6px 0 2px;font-size:20px;line-height:1.35;font-weight:600}
.current-plan-head p{margin:0;color:var(--muted);font-size:13px}
.head-actions{display:flex;align-items:center;gap:8px}
.status-badge{min-height:28px;padding:3px 9px;border-radius:999px;display:inline-flex;align-items:center;gap:5px;background:var(--surface-strong);color:var(--muted);font-size:12px;white-space:nowrap}
.status-badge.submitted{background:var(--success-soft);color:var(--success)}
.status-badge.draft{background:var(--warning-soft);color:var(--warning)}
.current-focus{padding:17px 24px;border-bottom:1px solid var(--line);display:grid;grid-template-columns:86px minmax(0,1fr);gap:12px;background:var(--brand-faint)}
.current-focus span{color:var(--brand);font-size:12px;font-weight:400}
.current-focus strong{font-size:15px;line-height:1.55;font-weight:400}
.plan-groups{padding:2px 24px 8px}
.plan-group{min-height:62px;padding:13px 0;border-bottom:1px solid var(--line-soft);display:grid;grid-template-columns:86px minmax(0,1fr);gap:12px}
.plan-group:last-child{border-bottom:0}
.plan-group>span{padding-top:2px;color:var(--muted);font-size:12px;font-weight:400}
.goal-chip-list{display:flex;flex-wrap:wrap;gap:7px 16px}
.goal-chip{min-width:190px;display:flex;align-items:baseline;gap:7px}
.goal-chip b{min-width:0;font-size:13px;font-weight:400}
.goal-chip strong{margin-left:auto;font-size:14px;font-weight:400;white-space:nowrap}
.goal-chip small{display:block;color:var(--hint);font-size:12px}
.current-plan-foot{min-height:62px;padding:10px 24px;border-top:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:12px;background:var(--surface-subtle)}
.current-plan-foot p{margin:0;color:var(--muted);font-size:12px}
.empty-current{min-height:112px;padding:20px 24px;display:grid;align-items:center;text-align:left}
.empty-current>div{display:grid;grid-template-columns:40px minmax(0,1fr);column-gap:14px;align-items:center}
.empty-current .empty-icon{grid-row:1/3;width:40px;height:40px;border-radius:11px;display:grid;place-items:center;background:var(--brand-soft);color:var(--brand)}
.empty-current h2{margin:0;font-size:16px;line-height:1.4;font-weight:600}
.empty-current p{margin:3px 0 0;color:var(--muted);font-size:13px;line-height:1.55}

.upcoming-section{margin-top:24px}
.upcoming-head{margin-bottom:12px}
.section-actions{display:flex;align-items:center;gap:12px}
.section-actions>span{color:var(--hint);font-size:12px;white-space:nowrap}
.week-card-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.week-plan-card{min-width:0;min-height:188px;padding:15px 16px;border:1px solid var(--line);border-radius:var(--radius-card);display:grid;grid-template-rows:auto minmax(70px,1fr) auto;background:#fff;box-shadow:var(--shadow-sm)}
.week-plan-card:hover{border-color:#cfc9c2}
.week-plan-card.is-selected{border-color:#d9b7ba}
.week-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
.week-card-head h3{margin:0;font-size:15px;line-height:1.4;font-weight:600;white-space:nowrap}
.week-card-body{min-width:0;padding:12px 0}
.week-goal-list{margin:0;padding:0;display:grid;gap:7px;list-style:none}
.week-goal-list li{min-width:0;display:grid;grid-template-columns:34px minmax(0,1fr) auto;gap:7px;align-items:baseline}
.week-goal-list small{color:var(--hint);font-size:12px;line-height:1.4}
.week-goal-list span{min-width:0;overflow:hidden;color:var(--ink);font-size:13px;line-height:1.45;text-overflow:ellipsis;white-space:nowrap}
.week-goal-list strong{font-size:13px;font-weight:400;white-space:nowrap}
.week-more{margin:7px 0 0;color:var(--muted);font-size:12px}
.week-card-foot{padding-top:11px;border-top:1px solid var(--line-soft);display:flex;align-items:center;justify-content:space-between;gap:10px}
.week-card-foot>span{color:var(--muted);font-size:12px}
.week-card-foot .button{min-height:34px}
.week-list-empty{padding:28px;border:1px dashed #d7d2cb;border-radius:11px;background:rgba(255,255,255,.55);color:var(--muted);font-size:13px;text-align:center}

.button{min-height:40px;padding:0 15px;border:1px solid transparent;border-radius:7px;display:inline-flex;align-items:center;justify-content:center;gap:7px;background:#fff;font-size:13px;font-weight:600;transition:.15s ease}
.button:hover{transform:translateY(-1px)}
.button:active{transform:none}
.button:disabled{cursor:not-allowed;opacity:.58;transform:none}
.button.primary{border-color:var(--brand);background:var(--brand);color:#fff;font-size:14px}
.button.primary:hover{border-color:var(--brand-hover);background:var(--brand-hover)}
.button.secondary{border-color:var(--line);background:#fff}
.button.secondary:hover{border-color:#cfcac3;background:var(--surface-subtle)}
.button.small{min-height:34px;padding-inline:11px}
.text-button,.back-button{min-height:40px;padding:0 8px;border:0;border-radius:7px;display:inline-flex;align-items:center;gap:7px;background:transparent;color:var(--brand);font-size:14px;font-weight:600}
.text-button:hover,.back-button:hover{background:var(--brand-faint)}

.history-section,.team-targets,.team-records{margin-top:28px}
.section-head{margin-bottom:12px;display:flex;align-items:flex-end;justify-content:space-between;gap:16px}
.section-head h2{margin:0;font-size:20px;line-height:1.35;font-weight:600}
.section-head p{margin:2px 0 0;color:var(--muted);font-size:13px}
.section-head>span{color:var(--hint);font-size:12px}
.section-head.compact{margin:0;padding:19px 22px;border-bottom:1px solid var(--line);align-items:center}
.section-head.compact .eyebrow{margin-bottom:4px}
.history-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.history-card{min-width:0;padding:17px;border:1px solid var(--line);border-radius:11px;display:grid;gap:13px;background:#fff;text-align:left;box-shadow:var(--shadow-sm)}
.history-card:hover{border-color:#cfc9c2;transform:translateY(-1px)}
.history-card-head{display:flex;justify-content:space-between;gap:10px}
.history-card-head strong{font-size:14px;font-weight:600}
.history-card-focus{min-height:44px;margin:0;color:var(--ink);font-size:14px;line-height:1.55}
.history-card-meta{padding-top:11px;border-top:1px solid var(--line-soft);display:flex;justify-content:space-between;gap:10px;color:var(--muted);font-size:12px}
.load-more{margin:14px auto 0;display:flex}
.empty-history{grid-column:1/-1;padding:34px;border:1px dashed #d7d2cb;border-radius:11px;color:var(--muted);text-align:center;background:rgba(255,255,255,.55)}

.team-current{min-height:112px;padding:18px 20px;display:grid;grid-template-columns:minmax(210px,1fr) auto auto;gap:24px;align-items:center}
.team-current h2{margin:4px 0 0;font-size:18px;line-height:1.35;font-weight:600}
.team-current p{margin:2px 0 0;color:var(--muted);font-size:13px}
.team-current-counts{display:flex;align-items:center;gap:24px}
.team-current-counts>span{display:grid;color:var(--muted);font-size:12px;white-space:nowrap}
.team-current-counts strong{color:var(--ink);font-size:20px;line-height:1.25;font-weight:400}
.team-next-reminder{width:100%;min-height:68px;margin-top:12px;padding:12px 16px;border:1px solid #ddc0c3;border-radius:var(--radius-card);display:grid;grid-template-columns:minmax(230px,1fr) auto auto;gap:20px;align-items:center;background:var(--brand-faint);color:var(--ink);text-align:left}
.team-next-reminder:hover{border-color:#c99499;background:#f7ebed}
.team-next-reminder>span:first-child{display:flex;align-items:center;gap:10px}
.team-next-reminder>span:first-child>.icon{color:var(--brand)}
.team-next-reminder>span:first-child>span{display:grid}
.team-next-reminder small{color:var(--brand);font-size:12px}
.team-next-reminder strong{font-size:14px;font-weight:400}
.team-next-reminder>span:nth-child(2){color:var(--muted);font-size:13px}
.team-next-action{display:flex;align-items:center;gap:4px;color:var(--brand);font-size:13px;font-weight:600}
.team-next-action .icon{width:16px;height:16px}
.team-week-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.team-week-card{min-width:0;min-height:150px;padding:15px 16px;border:1px solid var(--line);border-radius:var(--radius-card);display:grid;grid-template-rows:auto 1fr auto;gap:13px;background:#fff;color:var(--ink);text-align:left;box-shadow:var(--shadow-sm)}
.team-week-card:hover{border-color:#cfc9c2;transform:translateY(-1px)}
.team-week-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.team-week-card-head>span{display:grid;gap:2px}
.team-week-card-head small{color:var(--brand);font-size:12px}
.team-week-card-head strong{font-size:15px;line-height:1.4;font-weight:600}
.team-week-card-head>.icon{width:16px;height:16px;margin-top:3px;color:var(--hint)}
.team-week-card-count{display:flex;align-items:baseline;gap:5px}
.team-week-card-count strong{font-size:24px;line-height:1;font-weight:400}
.team-week-card-count span{color:var(--muted);font-size:12px}
.team-week-card-meta{padding-top:10px;border-top:1px solid var(--line-soft);display:flex;justify-content:space-between;gap:10px;color:var(--muted);font-size:12px}
.team-record-empty{grid-column:1/-1;padding:30px;border:1px dashed #d7d2cb;border-radius:var(--radius-card);background:rgba(255,255,255,.55);color:var(--muted);text-align:center}
.team-detail-view{scroll-margin-top:80px}
.team-detail-head{margin:0 0 16px;display:grid;grid-template-columns:150px minmax(0,1fr);gap:18px;align-items:start}
.team-detail-head .back-button{margin-left:-8px}
.team-detail-head h2{margin:3px 0 2px;font-size:20px;line-height:1.35;font-weight:600}
.team-detail-head p{margin:0;color:var(--muted);font-size:13px}
.team-summary{overflow:hidden}
.status-strip{display:grid;grid-template-columns:repeat(4,minmax(0,1fr))}
.status-item{min-height:84px;padding:17px 20px;border-right:1px solid var(--line);display:flex;align-items:center;gap:11px}
.status-item:last-child{border-right:0}
.status-item strong{font-size:24px;line-height:1;font-weight:400}
.status-item span{color:var(--muted);font-size:12px}
.status-item.submitted strong{color:var(--success)}
.status-item.draft strong{color:var(--warning)}
.status-item.not-started strong{color:var(--hint)}
.aggregate-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.aggregate-panel{border:1px solid var(--line);border-radius:11px;overflow:hidden;background:#fff;box-shadow:var(--shadow-sm)}
.aggregate-panel>header{min-height:58px;padding:12px 16px;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;align-items:center;gap:12px}
.aggregate-panel h3{margin:0;font-size:14px;font-weight:600}
.aggregate-panel header span{color:var(--hint);font-size:12px}
.aggregate-rows{padding:3px 16px 7px}
.aggregate-row{min-height:48px;padding:9px 0;border-bottom:1px solid var(--line-soft);display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:center}
.aggregate-row:last-child{border-bottom:0}
.aggregate-row b{display:block;font-size:13px;font-weight:400}
.aggregate-row small{display:block;color:var(--hint);font-size:12px}
.aggregate-row strong{font-size:14px;font-weight:400;white-space:nowrap}
.aggregate-empty{padding:26px 16px;color:var(--muted);text-align:center}
.member-panel{margin-top:28px;overflow:hidden}
.member-list{display:grid}
.member-row{min-height:64px;padding:11px 20px;border:0;border-bottom:1px solid var(--line-soft);display:grid;grid-template-columns:minmax(160px,1fr) 110px 160px 30px;gap:14px;align-items:center;background:#fff;text-align:left}
.member-row:last-child{border-bottom:0}
.member-row:hover{background:var(--surface-subtle)}
.member-name{display:flex;align-items:center;gap:10px;min-width:0}
.member-avatar{width:34px;height:34px;border-radius:9px;display:grid;place-items:center;background:var(--brand-soft);color:var(--brand);font-size:12px;font-weight:400}
.member-name strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px;font-weight:400}
.member-categories{color:var(--muted);font-size:12px}
.member-row>.icon{color:var(--hint)}
.member-row[disabled]{cursor:default;opacity:.72}

.editor-shell{max-width:920px;margin:0 auto;scroll-margin-top:80px}
.editor-head{margin:2px 0 20px}
.editor-head>.eyebrow{margin-left:131px;margin-bottom:2px}
.editor-title-row{display:grid;grid-template-columns:111px minmax(0,1fr);gap:20px;align-items:start}
.editor-head .back-button{margin-left:-8px}
.editor-head h1{margin:0 0 4px;font-size:24px;line-height:1.3;font-weight:600}
.editor-head p{margin:0;color:var(--muted);font-size:13px;line-height:1.62}
#weeklyPlanForm{display:grid;gap:12px}
.form-section{padding:20px 22px}
.form-section-head{margin-bottom:15px;display:grid;grid-template-columns:24px minmax(0,1fr) auto;gap:8px;align-items:start}
.form-section-head>span{padding-top:2px;color:var(--brand);font-size:12px;font-weight:400}
.form-section-head h2{margin:0;font-size:18px;line-height:1.35;font-weight:600}
.form-section-head p{margin:2px 0 0;color:var(--muted);font-size:13px;line-height:1.55}
.form-section-head>b{padding:3px 8px;border:1px solid var(--line);border-radius:999px;background:var(--surface-subtle);color:var(--muted);font-size:12px;font-weight:400}
.goal-rows{display:grid;gap:7px}
.goal-row{padding:8px;border:1px solid var(--line);border-radius:9px;display:grid;grid-template-columns:minmax(170px,1.25fr) minmax(150px,1fr) 110px 100px 36px;gap:7px;align-items:end;background:var(--surface-subtle)}
.field{min-width:0;display:grid;gap:4px}
.field>span{color:var(--muted);font-size:12px;font-weight:400}
.field input,.field select,.field textarea{width:100%;height:42px;padding:0 10px;border:1px solid var(--line);border-radius:7px;outline:0;background:#fff;color:var(--ink);font-size:14px}
.field textarea{min-height:66px;padding:9px 10px;line-height:1.55;resize:vertical}
.field input:focus,.field select:focus,.field textarea:focus{border-color:var(--brand);box-shadow:0 0 0 3px var(--focus)}
.field small{display:flex;justify-content:space-between;color:var(--hint);font-size:12px;font-style:normal}
.field small i,.field small em{font-style:normal}
.field.full{display:grid}
.remove-btn,.icon-button{width:40px;height:40px;padding:0;border:0;border-radius:7px;display:grid;place-items:center;background:transparent;color:var(--hint)}
.remove-btn:hover,.icon-button:hover{background:var(--danger-soft);color:var(--danger)}
.result-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
.result-row{position:relative;min-height:52px;padding:10px 40px 10px 12px;border:1px solid var(--line);border-radius:9px;background:#fff;cursor:pointer}
.result-row.selected{border-color:#d7a7ac;background:var(--brand-faint);box-shadow:inset 3px 0 0 var(--brand)}
.result-toggle{position:absolute;right:13px;top:15px;width:18px;height:18px;accent-color:var(--brand)}
.result-summary{display:flex;align-items:center;gap:8px;min-width:0}
.result-summary span{min-width:56px;color:var(--hint);font-size:12px}
.result-summary strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px;font-weight:400}
.result-fields{margin-top:9px;display:grid;grid-template-columns:minmax(140px,1fr) 92px 74px;gap:7px}
.result-fields .field>span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
.result-row:not(.selected) .result-fields{display:none}
.result-row.custom .result-fields{grid-template-columns:minmax(140px,1fr) 92px 74px 32px}
.result-remove{width:36px;height:42px}
.business-templates{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
.business-card{position:relative;min-height:70px;padding:11px 36px 11px 12px;border:1px solid var(--line);border-radius:9px;background:#fff;cursor:pointer}
.business-card.selected{border-color:#d7a7ac;background:var(--brand-faint);box-shadow:inset 3px 0 0 var(--brand)}
.business-card>input[type=checkbox]{position:absolute;right:12px;top:13px;width:17px;height:17px;accent-color:var(--brand)}
.business-card b{display:block;font-size:14px;line-height:1.5;font-weight:400}
.business-card small{display:block;margin-top:2px;color:var(--muted);font-size:12px;line-height:1.5}
.business-card .field{margin-top:9px}
.business-card:not(.selected) .field{display:none}
.custom-business-list{margin-top:7px;display:grid;gap:7px}
.custom-business-row{padding:8px;border:1px dashed #cfc9c2;border-radius:9px;display:grid;grid-template-columns:minmax(150px,.8fr) minmax(210px,1.2fr) 36px;gap:7px;align-items:end;background:var(--surface-subtle)}
.focus-section .field{margin-left:32px}
.form-actions{min-height:68px;padding:12px 16px 12px 20px;display:flex;align-items:center;justify-content:space-between;gap:16px}
.form-actions p{margin:0;color:var(--muted);font-size:13px}
.form-actions>div{display:flex;gap:8px}

.week-picker-dialog{width:min(440px,calc(100% - 32px));padding:0;border:1px solid var(--line);border-radius:14px;background:#fff;color:var(--ink);box-shadow:var(--shadow-md)}
.week-picker-dialog::backdrop{background:rgba(23,23,23,.34)}
.week-picker-dialog form{margin:0}
.week-picker-dialog header{min-height:72px;padding:15px 16px 15px 20px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:12px}
.week-picker-dialog h2{margin:0;font-size:18px;line-height:1.35;font-weight:600}
.week-picker-body{padding:20px}
.week-picker-body .field input{width:100%}
.week-picker-preview{min-height:78px;margin-top:16px;padding:13px 14px;border:1px solid var(--line-soft);border-radius:9px;display:grid;align-content:center;background:var(--surface-subtle)}
.week-picker-preview span{color:var(--hint);font-size:12px}
.week-picker-preview strong{margin-top:2px;font-size:15px;line-height:1.45;font-weight:400}
.week-picker-preview small{margin-top:3px;color:var(--muted);font-size:12px}
.week-picker-dialog footer{padding:12px 16px 14px;border-top:1px solid var(--line);display:flex;justify-content:flex-end;gap:8px}

.drawer-layer{position:fixed;z-index:200;inset:0}
.drawer-backdrop{position:absolute;inset:0;width:100%;height:100%;border:0;background:rgba(23,23,23,.32)}
.detail-drawer{position:absolute;inset:0 0 0 auto;width:min(520px,100%);display:grid;grid-template-rows:72px minmax(0,1fr);background:#fff;box-shadow:var(--shadow-md)}
.detail-drawer>header{padding:0 18px 0 22px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:12px}
.detail-drawer h2{margin:4px 0 0;font-size:18px;line-height:1.3;font-weight:600}
.detail-body{padding:4px 22px 28px;overflow:auto}
.detail-focus{margin:18px 0;padding:14px 15px;border-left:3px solid var(--brand);border-radius:0 8px 8px 0;background:var(--brand-faint)}
.detail-focus span{display:block;color:var(--brand);font-size:12px;font-weight:400}
.detail-focus strong{display:block;margin-top:4px;font-size:14px;line-height:1.6;font-weight:400}
.detail-group{padding:17px 0;border-bottom:1px solid var(--line-soft)}
.detail-group h3{margin:0 0 7px;font-size:14px;font-weight:600}
.detail-item{min-height:38px;padding:6px 0;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:start}
.detail-item b{font-size:13px;font-weight:400}
.detail-item p{margin:2px 0 0;color:var(--muted);font-size:12px;line-height:1.55}
.detail-item strong{font-size:14px;font-weight:400;white-space:nowrap}
.toast{position:fixed;z-index:300;left:50%;bottom:24px;min-width:260px;max-width:calc(100vw - 32px);padding:11px 14px;border-radius:7px;background:var(--ink);color:#fff;box-shadow:var(--shadow-md);text-align:center;opacity:0;pointer-events:none;transform:translate(-50%,14px);transition:.18s ease}
.toast.visible{opacity:1;transform:translate(-50%,0)}
.sidebar-fallback{height:100%;padding:20px 14px;display:flex;flex-direction:column;background:#fff}
.fallback-brand{padding:0 8px 20px;display:flex;align-items:center;gap:10px}
.fallback-brand img{width:32px;height:32px}
.fallback-brand span{display:grid}.fallback-brand strong{font-size:15px}.fallback-brand small{color:var(--muted);font-size:12px}
.sidebar-fallback nav{display:grid;gap:5px}.sidebar-fallback nav a{min-height:42px;padding:0 12px;border-radius:8px;display:flex;align-items:center}.sidebar-fallback nav a[aria-current=page]{background:var(--brand-faint);color:var(--brand);box-shadow:inset 3px 0 0 var(--brand);font-weight:600}

/* Visual review demo: quiet surfaces and a single, clear content hierarchy. */
.topbar{height:56px;padding-inline:24px;background:#fff;backdrop-filter:none}
.panel{border-radius:var(--radius-card);box-shadow:none}
.page-period{min-width:0;padding:0;border:0;border-radius:0;background:transparent;gap:8px;color:var(--muted)}
.page-period>.icon{width:16px;height:16px;color:var(--muted)}
.page-period span{display:flex;align-items:center;gap:8px}
.page-period strong{font-size:13px}
.view-tabs{margin:24px 0 20px;padding:0;border-radius:0;gap:24px;background:transparent;border-bottom:1px solid var(--line);width:100%}
.view-tabs button{height:40px;padding:0 0 10px;border-radius:0;border-bottom:2px solid transparent;font-size:13px;font-weight:400}
.view-tabs button.active{background:transparent;color:var(--brand);box-shadow:none;border-bottom-color:var(--brand);font-weight:400}
.team-current{min-height:96px;padding:18px 20px}
.team-next-reminder{min-height:48px;margin-top:4px;padding:10px 4px;border:0;border-radius:0;background:transparent;gap:16px}
.team-next-reminder:hover{background:var(--surface-subtle)}
.team-next-reminder>span:first-child>span{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap}
.team-next-reminder small{color:var(--muted);font-size:13px}
.team-next-reminder strong{font-size:13px}
.team-next-action{font-weight:400}
.team-records,.history-section{margin-top:32px}
.section-head h2{font-size:18px}
.team-week-grid,.week-card-grid,.history-grid{gap:16px}
.team-week-card{min-height:140px;padding:16px;gap:10px;box-shadow:none}
.team-week-card:hover,.history-card:hover{transform:none;border-color:var(--muted)}
.team-week-card-head small{color:var(--muted)}
.team-week-card-count strong{font-size:22px}
.week-plan-card,.history-card,.aggregate-panel{box-shadow:none}
.current-focus{background:var(--surface-subtle)}
.team-summary>.section-head{border-bottom:0;gap:24px}
.team-summary .status-strip{display:flex;gap:24px;flex-wrap:wrap}
.team-summary .status-item{min-height:0;padding:0;border:0;gap:7px}
.team-summary .status-item strong{font-size:20px}
.aggregate-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.aggregate-more{margin:10px 0 0;color:var(--muted);font-size:12px}
@media(max-width:767px){
  .team-summary>.section-head{align-items:flex-start;flex-direction:column}
  .team-summary .status-strip{gap:16px}
  .aggregate-grid{grid-template-columns:1fr}
}

@media(max-width:1023px){
  .sidebar{position:fixed;left:0;top:0;transform:translateX(-104%)}
  .app.nav-open>.sidebar{transform:translateX(0)}
  .menu-btn{display:grid}
  .main{width:min(100% - 40px,920px);padding-top:28px}
  .history-grid,.week-card-grid,.team-week-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .team-current{grid-template-columns:minmax(210px,1fr) auto}.team-current-counts{gap:16px}.team-current>.button{grid-column:2;grid-row:1}
  .business-templates{grid-template-columns:repeat(2,minmax(0,1fr))}
  .goal-row{grid-template-columns:minmax(150px,1fr) minmax(140px,1fr) 100px 36px}
  .goal-row .metric-preset{grid-column:1}.goal-row .metric-title{grid-column:2}.goal-row .metric-value{grid-column:3}.goal-row .metric-unit{grid-column:1/3}.goal-row .remove-btn{grid-column:4;grid-row:1;align-self:end}
}
@media(max-width:767px){
  body{font-size:14px}
  .topbar{height:56px;padding:0 16px}
  .workspace-link{display:none}
  .main{width:calc(100% - 32px);padding:22px 0 40px}
  .page-head{display:block}.page-head h1{font-size:24px}.page-period{width:max-content;min-width:0;margin-top:14px}
  .menu-btn,.view-tabs button,.button,.text-button,.back-button{min-height:44px}.view-tabs{width:100%}.view-tabs button{flex:1}
  .week-card-grid,.team-week-grid{grid-template-columns:1fr}.week-plan-card{min-height:176px}.week-card-foot .button{min-height:44px}
  .upcoming-head{align-items:stretch;flex-direction:column}.section-actions{justify-content:space-between}.section-actions .button{flex:none}
  .current-plan-head{padding:18px 16px;display:block}.head-actions{margin-top:12px}.current-focus{padding:14px 16px;grid-template-columns:1fr}.plan-groups{padding-inline:16px}.plan-group{grid-template-columns:1fr}.current-plan-foot{padding:12px 16px;align-items:stretch;flex-direction:column}.current-plan-foot .button{width:100%}
  .history-grid,.aggregate-grid,.result-list{grid-template-columns:1fr}
  .team-current{padding:16px;grid-template-columns:1fr;gap:14px}.team-current-counts{justify-content:space-between}.team-current>.button{grid-column:auto;grid-row:auto;width:100%}
  .team-next-reminder{min-height:0;padding:14px;grid-template-columns:1fr auto;gap:8px 12px}.team-next-reminder>span:nth-child(2){grid-column:1/3}.team-next-action{grid-column:2;grid-row:1}
  .team-detail-head{grid-template-columns:1fr;gap:8px}.team-detail-head .back-button{width:max-content}
  .section-head.compact{padding:17px 16px;align-items:flex-start;flex-direction:column}
  .status-strip{grid-template-columns:repeat(2,minmax(0,1fr))}.status-item:nth-child(2){border-right:0}.status-item:nth-child(-n+2){border-bottom:1px solid var(--line)}
  .member-row{grid-template-columns:minmax(0,1fr) auto 24px;padding:12px 16px}.member-categories{grid-column:1/3;padding-left:44px}.member-row>.icon{grid-column:3;grid-row:1/3}
  .editor-head>.eyebrow{margin-left:123px}.editor-title-row{grid-template-columns:111px minmax(0,1fr);gap:12px}.editor-head h1{font-size:23px}
  .form-section{padding:18px 14px}.form-section-head{grid-template-columns:22px minmax(0,1fr) auto}
  .goal-row{grid-template-columns:minmax(0,1fr) 84px 36px}.goal-row .metric-preset{grid-column:1/3}.goal-row .metric-title{grid-column:1/3}.goal-row .metric-value{grid-column:1}.goal-row .metric-unit{grid-column:2}.goal-row .remove-btn{grid-column:3;grid-row:1;align-self:end}
  .field input,.field select,.field textarea{font-size:16px}
  .eyebrow,.page-period small,.status-badge,.current-focus span,.plan-group>span,.goal-chip small,.section-head>span,.status-item span,.aggregate-panel header span,.field>span,.field small,.form-section-head>span,.form-section-head>b,.form-section-head p,.business-card small,.result-summary span,.form-actions p,.current-plan-foot p,.history-card-meta,.member-categories,.aggregate-row small,.detail-focus span,.detail-item p{font-size:13px}
  .result-fields,.result-row.custom .result-fields{grid-template-columns:minmax(0,1fr) 88px}.result-fields .result-title{grid-column:1/3}.result-row.custom .result-remove{grid-column:2}
  .business-templates{grid-template-columns:1fr}.custom-business-row{grid-template-columns:minmax(0,1fr) 36px}.custom-business-row .custom-detail{grid-column:1/3}.custom-business-row .remove-btn{grid-column:2;grid-row:1}
  .focus-section .field{margin-left:0}
  .form-actions{padding:12px 16px;align-items:stretch;flex-direction:column}.form-actions>div{display:grid;grid-template-columns:1fr 1fr}.form-actions .button{font-size:14px}
  .week-picker-dialog footer{display:grid;grid-template-columns:1fr 1fr}.week-picker-dialog footer .button{width:100%}
}
@media(min-width:768px) and (max-height:720px){.page-head h1,.editor-head h1{font-size:22px}.main{padding-top:22px}}
@media(max-width:360px){.main{width:calc(100% - 28px)}.topbar{padding-inline:14px}.form-actions>div{grid-template-columns:1fr}.status-strip{grid-template-columns:1fr}.status-item{border-right:0;border-bottom:1px solid var(--line)}.status-item:last-child{border-bottom:0}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation:none!important;transition:none!important}}

.page-period small,.goal-chip small,.section-head>span,.aggregate-panel header span,.aggregate-row small,.field small,.history-card-meta,.member-categories,.detail-item p{color:var(--muted)}

/* Members are a compact supporting list beneath the goals. */
#teamAggregates .aggregate-panel>header h3{color:var(--brand)}
.member-panel{border:0;background:transparent;margin-top:24px}
.member-panel>.section-head{padding:0 0 10px;border-bottom:1px solid var(--line)}
.member-panel>.section-head h2{font-size:16px}
.member-row{min-height:44px;padding:8px 4px;grid-template-columns:minmax(120px,1fr) 72px 80px 18px;gap:16px;background:transparent}
.member-row .status-badge{min-height:0;padding:0;border-radius:0;background:transparent;font-size:12px}
.member-name strong{font-size:13px}
.member-row .member-categories{grid-column:auto;padding-left:0;font-size:12px}
.member-row>.icon{grid-column:auto;grid-row:auto;width:16px;height:16px}
@media(max-width:767px){.member-row{grid-template-columns:minmax(0,1fr) 54px 64px 16px;gap:8px}.member-row .status-badge{font-size:12px}}
