/* GETRICH — Warm Sand / Ink. One component system, two tonal palettes. */
html[data-theme="light"]{--bg:#f5f2ec;--paper:#fffdf8;--surface:#eeebe4;--surface-hover:#e9e2d6;--ink:#292722;--muted:#797366;--line:#e3ddd2;--green:#8b7046;--green2:#eee4d3;--accent:#8b7046;--accent-ink:#fffaf0;--primary:#28251f;--primary-ink:#fffaf0;--sidebar:#eeebe4;--glass:#fffdf8d9;--shadow:0 4px 20px #493a2110;--radius:16px;color-scheme:light}
html[data-theme="dark"]{--bg:#181714;--paper:#25231f;--surface:#2e2b25;--surface-hover:#39342b;--ink:#f1e9da;--muted:#b5ab9b;--line:#413b30;--green:#d8bf98;--green2:#453c2e;--accent:#d8bf98;--accent-ink:#241d14;--primary:#dfc49d;--primary-ink:#241d14;--sidebar:#211f1b;--glass:#29251fdd;--shadow:0 4px 24px #0002;--radius:16px;color-scheme:dark}
html[data-theme] body{background:var(--bg);color:var(--ink);font-family:-apple-system,BlinkMacSystemFont,'Segoe UI','PingFang SC','Microsoft YaHei',sans-serif;-webkit-font-smoothing:antialiased;line-height:1.5}
html[data-theme] .app{grid-template-columns:224px minmax(0,1fr)}
html[data-theme] main{max-width:1720px;padding:28px clamp(22px,3vw,48px) 56px;margin:0 auto;align-self:start}
html[data-theme] .sidebar{background:var(--sidebar);border-color:var(--line);padding:32px 18px 22px}
html[data-theme] .brand{padding:0 12px 36px;gap:0}
html[data-theme] .brand-mark{display:none}
html[data-theme] .brand b{font-size:24px;letter-spacing:3px;color:var(--ink);font-weight:750}
html[data-theme] .brand small{font-size:9px;letter-spacing:2px;color:var(--muted);margin-top:7px}
html[data-theme] .nav-label{font-size:10px;letter-spacing:1.5px;color:var(--muted);opacity:.7;padding:18px 14px 8px}
html[data-theme] .nav{gap:7px}
html[data-theme] .nav button{color:var(--muted);font-size:14px;gap:13px;padding:13px 14px;border-radius:11px}
html[data-theme] .nav button.active{background:var(--primary);color:var(--primary-ink);font-weight:650}
html[data-theme="light"] .nav button.active{background:var(--green2);color:var(--accent)}
html[data-theme] .nav button:not(.active):hover{background:var(--surface-hover);color:var(--ink)}
html[data-theme] :is(.icon,.stat-icon) svg{width:21px;height:21px;display:block;stroke:currentColor;fill:none;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round}
html[data-theme] .topbar{align-items:flex-start;gap:20px;margin-bottom:28px}
html[data-theme] .crumb{min-width:128px;padding-top:10px;white-space:nowrap;color:var(--muted)}
html[data-theme] .top-actions{gap:8px;flex:1;flex-wrap:wrap;justify-content:flex-end}
html[data-theme] :is(.btn,.filter,.search,input,textarea,select){background:var(--paper);color:var(--ink);border-color:var(--line);border-radius:10px}
html[data-theme] :is(input,textarea,select){color:var(--ink)!important;background:var(--paper)!important;border-color:var(--line)!important}
html[data-theme] :is(input,textarea)::placeholder{color:var(--muted);opacity:.75}
html[data-theme] .btn{padding:10px 14px;font-size:12px;min-height:40px;box-shadow:none;transition:background .15s ease,border-color .15s ease}
html[data-theme] .btn:hover{transform:none;background:var(--surface-hover);border-color:var(--accent);box-shadow:none}
html[data-theme] .btn.primary{background:var(--primary);border-color:var(--primary);color:var(--primary-ink)}
html[data-theme] .btn.primary:hover{filter:brightness(1.07)}
html[data-theme] :is(.glass,.user-badge){background:var(--glass);border:1px solid var(--line);color:var(--ink);box-shadow:none;backdrop-filter:blur(16px)}
html[data-theme] .user-badge{min-height:40px;padding:8px 12px;font-size:11px}
html[data-theme] :is(.user-badge button,.user-badge i){color:var(--muted)}
html[data-theme] .heading{margin:0 0 24px;align-items:center;min-height:83px}
html[data-theme] .heading h1{font-size:32px;letter-spacing:-1px;margin:4px 0 6px;font-weight:750;line-height:1.25}
html[data-theme] .heading p{font-size:12px;color:var(--muted)}
html[data-theme] .eyebrow{font-size:10px;letter-spacing:1.8px;color:var(--accent)}
html[data-theme] :is(.workspace,.stat,.plan-card,.box,.setting-card,.modal,.auth-card,.home-channel,.home-next-card,.home-recent,.dashboard-project-row,.deliverable-editor-row,.card-action-menu,.archive-summary-body){background:var(--paper);color:var(--ink);border:1px solid var(--line);box-shadow:var(--shadow);border-radius:14px}
html[data-theme] .stats{gap:12px;margin-bottom:25px}
html[data-theme] .stat{padding:19px 18px;text-align:left}
html[data-theme] .stage-stat{min-height:126px}
html[data-theme] .stat-head{font-size:12px;color:var(--ink);flex-direction:row-reverse;justify-content:flex-end;gap:10px;align-items:center}
html[data-theme] .stat-icon{background:transparent;color:var(--accent);width:24px;height:24px;border-radius:0}
html[data-theme] .stat .num{font-size:33px;font-weight:650;letter-spacing:-1px;margin:13px 0 2px;line-height:1}
html[data-theme] .delta{font-size:10px;color:var(--muted);margin-top:8px}
html[data-theme] :is(.stage-stat,.home-channel):hover{transform:none;box-shadow:var(--shadow);border-color:var(--accent)}
html[data-theme] .home-section{background:var(--paper);border:1px solid var(--line);border-radius:15px;padding:21px 24px;margin:0 0 20px;box-shadow:var(--shadow)}
html[data-theme] .home-section-title{padding:0 0 15px;margin-bottom:0;border-color:var(--line);gap:14px}
html[data-theme] .home-section-title h2{font-size:17px;font-weight:650;letter-spacing:-.3px}
html[data-theme] .home-section-title>span{font-size:10px;color:var(--muted)}
html[data-theme] .home-channels{display:grid;grid-template-columns:1fr;gap:0}
html[data-theme] .home-channel{border:0;border-radius:0;box-shadow:none;background:transparent;display:grid;grid-template-columns:minmax(260px,1fr) minmax(120px,1fr) 78px;align-items:center;gap:24px;padding:20px 0;text-align:left}
html[data-theme] .home-channel+.home-channel{border-top:1px solid var(--line)}
html[data-theme] .home-channel-top{gap:20px;align-items:center;flex-direction:row}
html[data-theme] .home-channel-top b{font-size:15px;color:var(--ink);white-space:nowrap}
html[data-theme] .home-channel-top>span{font-size:11px;color:var(--muted);white-space:nowrap}
html[data-theme] .channel-dot{background:var(--accent)!important;width:6px;height:6px;opacity:.8}
html[data-theme] :is(.home-progress-track,.progress-track){height:7px;background:var(--surface-hover);border-radius:10px;margin:0;display:block;overflow:hidden}
html[data-theme] :is(.home-progress-track i,.progress-track i){display:block;height:100%;background:var(--accent);border-radius:10px}
html[data-theme] .home-channel small{font-size:11px;color:var(--accent);text-align:right;white-space:nowrap}
html[data-theme] .home-next-card{border:0;box-shadow:none;border-radius:0;padding:20px 0 0;gap:22px;background:transparent}
html[data-theme] .home-date{background:var(--green2);color:var(--accent);border-radius:10px;min-width:62px;padding:10px}
html[data-theme] .home-next-info b{font-size:15px;font-weight:600}
html[data-theme] :is(.home-next-info small,.home-recent-row small){color:var(--muted);font-size:11px}
html[data-theme] .home-recent{border:0;border-radius:0;background:transparent;box-shadow:none}
html[data-theme] .home-recent-row{background:transparent;color:var(--ink);padding:17px 0;border-color:var(--line)}
html[data-theme] .home-recent-row:hover{background:var(--surface)}
html[data-theme] .home-recent-row b{font-size:13px;font-weight:550}
html[data-theme] .home-empty{padding:26px 8px;color:var(--muted);font-size:12px}
html[data-theme] :is(.status,.channel,.count,.choice-chip,.tag-choice-chip){background:var(--green2);color:var(--accent);border-color:var(--line);border-radius:8px;font-size:11px}
html[data-theme] :is(.status.orange,.status.blue,.status.purple,.channel.blue){background:var(--surface-hover);color:var(--ink)}
html[data-theme] :is(.toolbar,.info-row,.board-mini,.setting-row,.session,.detail-tabs,td,th){border-color:var(--line)}
html[data-theme] :is(.toolbar,.planner-board-tools){padding:17px 20px}
html[data-theme] :is(.tab,.filter,.detail-tabs button){color:var(--muted)}
html[data-theme] :is(.tab.active,.filter.active){background:var(--green2);color:var(--accent);border-color:var(--line)}
html[data-theme] .board{background:var(--bg);padding:18px;gap:15px;mask-image:none;-webkit-mask-image:none}
html[data-theme] .column{background:var(--paper);border:1px solid var(--line);border-radius:14px;padding:13px;min-height:60vh}
html[data-theme] .col-head{font-size:12px;color:var(--ink);padding:5px 3px 16px}
html[data-theme] .col-title .dot{background:var(--accent)!important;opacity:.75}
html[data-theme] .plan-card{background:var(--surface);box-shadow:none;padding:15px;border-radius:11px}
html[data-theme] .plan-card:hover{transform:translateY(-1px);border-color:var(--accent);box-shadow:none}
html[data-theme] :is(.card-meta,.card-foot,.tiny,.kbd,.empty,.muted,.profile small){color:var(--muted)}
html[data-theme] .card-menu-trigger{color:var(--muted)}
html[data-theme] .card-action-menu button:hover{background:var(--surface-hover)}
html[data-theme] :is(.avatar,.close,.session-date,.stat-icon){color:var(--accent)}
html[data-theme] .avatar{background:var(--green2)!important;color:var(--accent)!important}
html[data-theme] .side-card{background:var(--surface);color:var(--muted);border:1px solid var(--line);border-radius:13px;box-shadow:none;font-size:11px}
html[data-theme] :is(.summary-note,.archive-summary-meta){background:var(--surface);color:var(--muted);border-color:var(--line)}
html[data-theme] .modal-back{background:#100f0cc2;backdrop-filter:blur(8px)}
html[data-theme] .modal{background:var(--paper);padding:28px;border-radius:20px}
html[data-theme] .modal-head{background:var(--paper)}
html[data-theme] :is(.detail-title h2,.modal-head h2){color:var(--ink);letter-spacing:-.5px}
html[data-theme] :is(.close,.home-date,.session-date){background:var(--green2);color:var(--accent)}
html[data-theme] :is(th,.cal-weekdays div){background:var(--surface);color:var(--muted);font-size:11px}
html[data-theme] :is(td,.cal-day){background:var(--paper);color:var(--ink);border-color:var(--line)}
html[data-theme] :is(.cal-week,.cal-weekdays){background:var(--line)}
html[data-theme] :is(.cal-event,.cal-event.blue,.cal-event.orange,.cal-period-bar){background:var(--green2);color:var(--accent);border-color:var(--line)}
html[data-theme] :is(.btn.danger,.danger-note,.auth-error){background:transparent;color:#c87864;border-color:#b56d5755}
html[data-theme="light"] :is(.btn.danger,.auth-error){color:#a84c37}
html[data-theme] #authRoot{background:var(--bg)!important}
html[data-theme] .auth-card{padding:34px}
html[data-theme] .auth-card :is(p,small,label){color:var(--muted)}
html[data-theme] .auth-card .brand-mark{display:grid;background:var(--green2);color:var(--accent)}
html[data-theme] .auth-reset-help{color:var(--accent)}
html[data-theme] a{color:var(--accent)}
html[data-theme] :is(button,input,textarea,select,a):focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.theme-controls{display:flex;align-items:center;gap:5px;flex-shrink:0}.theme-controls .btn{white-space:nowrap;padding:9px 10px;font-size:11px}#themeAuto[aria-pressed="true"]{box-shadow:inset 0 0 0 1px var(--accent);color:var(--accent)}
html[data-theme] .mobile-nav{background:var(--glass);border-color:var(--line);backdrop-filter:blur(18px)}
html[data-theme] .mobile-nav button{color:var(--muted)}
html[data-theme] .mobile-nav button.active{color:var(--accent)}
@media(min-width:1450px){html[data-theme] .user-badge{margin-left:6px}}
@media(max-width:1200px){html[data-theme] .app{grid-template-columns:196px minmax(0,1fr)}html[data-theme] .home-channel{grid-template-columns:minmax(220px,1fr) minmax(100px,1fr) 68px;gap:16px}html[data-theme] .brand b{font-size:21px}html[data-theme] .stats{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:720px){html[data-theme] .app{display:block}html[data-theme] main{padding:18px 16px 100px}html[data-theme] .topbar{display:block;margin-bottom:22px}html[data-theme] .crumb{padding:0 0 12px;font-size:10px}html[data-theme] .top-actions{justify-content:flex-start;gap:6px}html[data-theme] .top-actions .btn{min-height:35px;padding:7px 9px;font-size:11px}html[data-theme] .user-badge{min-height:35px;font-size:10px}html[data-theme] .heading{min-height:0;margin:0 0 20px;display:flex;flex-direction:row;align-items:flex-start;gap:12px}html[data-theme] .heading h1{font-size:27px}html[data-theme] .heading p{font-size:11px;max-width:240px}html[data-theme] .heading .btn{width:auto;flex-shrink:0;font-size:10px;padding:9px}html[data-theme] .stats{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-bottom:18px}html[data-theme] .stat{padding:12px 10px}html[data-theme] .stage-stat{min-height:105px}html[data-theme] .stat-head{gap:6px;font-size:10px}html[data-theme] .stat-icon{width:18px;height:18px}html[data-theme] .stat-icon svg{width:17px;height:17px}html[data-theme] .stat .num{font-size:26px}html[data-theme] .delta{font-size:9px}html[data-theme] .home-section{padding:16px;margin-bottom:15px}html[data-theme] .home-section-title h2{font-size:15px}html[data-theme] .home-channel{grid-template-columns:1fr auto;gap:10px;padding:16px 0}html[data-theme] .home-channel-top{grid-column:1/-1;justify-content:space-between;gap:8px}html[data-theme] .home-channel-top b{font-size:13px}html[data-theme] .home-channel-top>span{font-size:10px}html[data-theme] .home-channel small{font-size:10px}html[data-theme] .home-next-info b{font-size:13px}html[data-theme] .home-next-card{gap:13px}html[data-theme] .modal{padding:18px;border-radius:17px}html[data-theme] .board{padding:12px}html[data-theme] .column{min-height:55vh}html[data-theme] .home-recent-row{gap:10px}html[data-theme] .home-recent-row b{font-size:12px}}
@media(prefers-reduced-motion:reduce){html[data-theme] *{transition:none!important;animation:none!important}}
html[data-theme] :is(.home-empty,.empty){background:transparent;border-color:var(--line);color:var(--muted)}
html[data-theme] .home-empty{border-style:dashed;border-radius:10px;margin-top:16px}
html[data-theme] .choice-chip:has(input:checked){background:var(--green2)!important;color:var(--accent)!important;border-color:var(--accent)!important}
html[data-theme] .choice-chip label{color:inherit;background:transparent}
html[data-theme] .tag-remove{background:var(--paper);color:var(--muted);border-color:var(--line)}
html[data-theme] .auth-card h1{font-size:26px;letter-spacing:-.5px}
/* Calendar and secondary-surface audit: all surfaces inherit the same theme. */
html[data-theme] :is(.calendar,.planner-calendar-scroll,.planner-calendar-scroll .calendar){background:var(--paper);min-width:0;width:100%;max-width:100%;box-sizing:border-box}
html[data-theme] .planner-calendar-scroll{overflow-x:clip}
html[data-theme] .calendar{padding:16px}
html[data-theme] .cal-weekdays{border:1px solid var(--line);border-bottom:0;border-radius:10px 10px 0 0;overflow:hidden}
html[data-theme] .cal-week{border-left:1px solid var(--line);border-right:1px solid var(--line);gap:1px;grid-template-rows:minmax(132px,auto);margin:0;border-bottom:1px solid var(--line)}
html[data-theme] .cal-week:last-child{border-radius:0 0 10px 10px;overflow:hidden}
html[data-theme] .cal-day{background:var(--paper)!important;min-height:132px;padding:calc(36px + var(--period-lanes,0)*20px) 6px 8px;min-width:0;overflow:hidden;color:var(--muted)}
html[data-theme] .cal-day b{top:7px;left:8px;font-size:11px;color:var(--ink);width:22px;height:22px;display:grid;place-items:center;line-height:1;border-radius:50%}
html[data-theme] .cal-day.other-month b{color:var(--muted);opacity:.45}
html[data-theme] .cal-day.is-today b{background:var(--primary);color:var(--primary-ink);font-weight:700}
html[data-theme] .cal-weekdays div{background:var(--surface);padding:10px 8px;text-align:center;color:var(--muted)}
html[data-theme] .cal-period-bar{background:var(--green2);color:var(--accent);font-size:10px;box-shadow:inset 0 0 0 1px var(--line);height:18px;line-height:16px}
html[data-theme] .cal-event{background:var(--green2);color:var(--accent);border-left:2px solid var(--accent);border-radius:5px;padding:5px;margin-top:5px;overflow-wrap:anywhere;min-width:0}
html[data-theme="light"] .cal-event.blue{background:#e9edf0;color:#4f6675;border-left-color:#758b99}
html[data-theme="dark"] .cal-event.blue{background:#2b343a;color:#c0cdd5;border-left-color:#93a8b5}
html[data-theme="light"] .cal-event.orange{background:#f5e9df;color:#9b5b3e;border-left-color:#b87955}
html[data-theme="dark"] .cal-event.orange{background:#3c2d25;color:#e0b394;border-left-color:#c5926e}
html[data-theme] .cal-event.review{background:var(--surface);color:var(--ink);border-left-color:var(--muted)}
html[data-theme] :is(.choice-chip span,.choice-chip input:checked+span){background:var(--surface);color:var(--muted);border-color:var(--line)}
html[data-theme] .choice-chip input:checked+span{background:var(--green2);color:var(--accent);border-color:var(--accent)}
html[data-theme] :is(.session-row,.deliverable,.toast){background:var(--surface);color:var(--ink);border-color:var(--line)}
html[data-theme] :is(.field label,.security-form label,.shot-table th,.board-mini,.switch-row){color:var(--muted)}
html[data-theme] :is(.session p,.detail-title p){color:var(--muted)}
html[data-theme] :is(.switch-row,.shot-table td,.card-foot){border-color:var(--line)}
html[data-theme] tr[data-open]:hover td{background:var(--surface)}
html[data-theme] .column.drag-over{background:var(--green2);outline-color:var(--accent)}
html[data-theme] .card-menu-trigger:hover{background:var(--surface-hover);color:var(--ink)}
html[data-theme] .auth-card p,html[data-theme] .auth-card small{color:var(--muted)}
html[data-theme] .user-badge i:before{color:var(--accent)}
html[data-theme] :is(.period-fields,.period-fields label,.custom-choice,.setting-inline,.field){min-width:0}
html[data-theme] :is(input[type=date],input[type=time]){max-width:100%;min-width:0;box-sizing:border-box}
html[data-theme] .period-fields label{width:0}
@media(min-width:721px) and (max-width:1100px){html[data-theme] .calendar{padding:10px}html[data-theme] .cal-day{padding-left:4px;padding-right:4px}html[data-theme] .cal-event{font-size:10px;padding:4px}html[data-theme] .planner-panel>.toolbar{flex-wrap:wrap}html[data-theme] .detail-grid{grid-template-columns:1fr}html[data-theme] .settings-grid{grid-template-columns:1fr}}
@media(max-width:720px){html[data-theme] .calendar{padding:5px}html[data-theme] .cal-week{grid-template-rows:minmax(104px,auto)}html[data-theme] .cal-day{min-height:104px;padding:calc(32px + var(--period-lanes,0)*20px) 2px 5px}html[data-theme] .cal-day b{left:3px;top:5px;font-size:10px;width:20px;height:20px}html[data-theme] .cal-weekdays div{padding:8px 2px;font-size:10px}html[data-theme] .cal-period-bar{font-size:9px;padding:1px 3px}html[data-theme] .cal-event{font-size:9px;line-height:1.35;padding:4px 2px;margin-top:4px;max-height:36px;overflow:hidden}html[data-theme] .cal-event span{display:none}html[data-theme] .planner-panel>.toolbar{padding:12px;flex-direction:row;flex-wrap:wrap;align-items:center;gap:8px}html[data-theme] .planner-panel>.toolbar .right-tools{width:auto;flex-wrap:wrap}html[data-theme] #monthLabel{font-size:15px;white-space:nowrap}html[data-theme] .custom-choice{flex-wrap:wrap}html[data-theme] .custom-choice input{flex-basis:160px}html[data-theme] .detail-actions{flex-wrap:wrap}html[data-theme] .detail-title h2{font-size:23px;overflow-wrap:anywhere}html[data-theme] .modal{max-width:calc(100vw - 24px)}html[data-theme] .modal-back{padding:12px}}
html[data-theme] .cal-event{max-height:52px;overflow:hidden}
@media(min-width:721px) and (max-width:1024px){html[data-theme] .app{grid-template-columns:84px minmax(0,1fr)}html[data-theme] .sidebar{padding:26px 10px 18px}html[data-theme] .brand{padding:0 0 28px;justify-content:center}html[data-theme] .brand b{font-size:0;letter-spacing:0}html[data-theme] .brand b:before{content:'G';font-size:27px;letter-spacing:0;color:var(--accent)}html[data-theme] .brand small,html[data-theme] .nav-label,html[data-theme] .side-card,html[data-theme] .profile>div:not(.avatar),html[data-theme] .profile>.dots{display:none}html[data-theme] .nav{gap:10px;margin-bottom:18px}html[data-theme] .nav button{font-size:0;justify-content:center;padding:16px 0;gap:0}html[data-theme] .nav button .icon{font-size:21px}html[data-theme] .profile{margin:14px 0 0;justify-content:center}html[data-theme] .cal-event{max-height:44px}}
