:root { color-scheme: light; --ink:#24231f; --muted:#716f67; --paper:#fbfaf6; --panel:#fff; --line:#ddd9cf; --accent:#405d45; --accent-soft:#e8efe8; --warn:#9b6424; --danger:#a13c35; --shadow:0 8px 28px rgba(45,43,34,.07); }
* { box-sizing:border-box; }
body { margin:0; background:var(--paper); color:var(--ink); font:15px/1.5 ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; }
button,input,textarea { font:inherit; }
button { cursor:pointer; }
.app-header { position:sticky; top:0; z-index:20; display:grid; grid-template-columns:1fr auto auto auto; gap:18px; align-items:center; padding:14px max(20px,calc((100vw - 1120px)/2)); background:rgba(251,250,246,.95); border-bottom:1px solid var(--line); backdrop-filter:blur(12px); }
.brand { font:700 20px/1.1 ui-serif,Georgia,serif; letter-spacing:-.02em; }
.segmented { display:flex; border:1px solid var(--line); border-radius:10px; overflow:hidden; background:#fff; }
.segmented button { padding:7px 11px; border:0; border-right:1px solid var(--line); background:transparent; color:var(--muted); }
.segmented button:last-child { border-right:0; }
.segmented button.active { background:var(--accent); color:#fff; }
.mode-nav { display:flex; align-items:stretch; gap:8px; min-width:238px; }
.mode-review-group { flex:1; }
.mode-review-group button { flex:1; }
.execute-mode-button { padding:7px 11px; border:1px solid var(--line); border-radius:10px; background:#fff; color:var(--muted); }
.execute-mode-button.active { background:var(--accent); border-color:var(--accent); color:#fff; }
.period-nav { width:326px; }
.period-bar { display:flex; justify-content:center; align-items:center; gap:10px; min-height:64px; padding:10px 20px; border-bottom:1px solid var(--line); }
.period-bar .label { min-width:280px; text-align:center; font:600 18px ui-serif,Georgia,serif; }
.icon-btn,.secondary,.primary,.danger { border:1px solid var(--line); border-radius:8px; padding:8px 12px; background:#fff; color:var(--ink); }
.primary { background:var(--accent); color:#fff; border-color:var(--accent); font-weight:600; }
.danger { color:var(--danger); }
main { max-width:1000px; margin:0 auto; padding:28px 20px 80px; }
.workspace-title { margin:0 0 6px; font:700 28px/1.15 ui-serif,Georgia,serif; }
.eyebrow { margin:0 0 18px; color:var(--muted); text-transform:uppercase; letter-spacing:.1em; font-size:12px; font-weight:700; }
.panel { margin:0 0 20px; padding:20px; border:1px solid var(--line); border-radius:14px; background:var(--panel); box-shadow:var(--shadow); }
.panel h2,.panel h3 { margin:0; font:650 18px ui-serif,Georgia,serif; }
.panel-head { display:flex; justify-content:space-between; gap:12px; align-items:flex-start; margin-bottom:14px; }
.meta { color:var(--muted); font-size:13px; }
label { display:block; margin:0 0 6px; font-weight:650; }
input { padding:9px 10px; border:1px solid var(--line); border-radius:8px; background:#fff; color:var(--ink); }
.custom-grid { display:grid; grid-template-columns:2fr 1fr 1fr; gap:12px; margin-top:16px; }
.custom-grid input { display:block; width:100%; margin-top:5px; }
textarea { display:block; width:100%; min-height:330px; resize:vertical; padding:14px; border:1px solid #c9c5ba; border-radius:9px; background:#fffefa; color:var(--ink); font:14px/1.55 ui-monospace,SFMono-Regular,Menlo,monospace; }
textarea.short { min-height:170px; }
textarea:focus,input:focus,button:focus-visible { outline:3px solid rgba(64,93,69,.2); outline-offset:2px; border-color:var(--accent); }
.actions { display:flex; flex-wrap:wrap; gap:9px; align-items:center; margin-top:12px; }
.actions input { flex:1; min-width:180px; padding:8px 10px; border:1px solid var(--line); border-radius:8px; }
.save-state { margin-left:auto; color:var(--muted); font-size:13px; }
.empty { padding:22px; color:var(--muted); text-align:center; border:1px dashed var(--line); border-radius:10px; }
.cards { display:grid; gap:12px; }
.plan-card,.log-card { border:1px solid var(--line); border-radius:11px; background:#fff; overflow:hidden; }
.card-toggle { width:100%; display:flex; justify-content:space-between; align-items:center; gap:10px; border:0; padding:14px 16px; background:#f8f7f2; text-align:left; color:var(--ink); }
.card-title { font-weight:700; }
.card-body { padding:14px 16px; border-top:1px solid var(--line); }
.context-plan-lines { padding:11px 16px 13px; border-top:1px solid var(--line); background:#f7f6f1; font:13px/1.5 ui-monospace,SFMono-Regular,Menlo,monospace; }
.context-plan-version + .context-plan-version { margin-top:12px; padding-top:10px; border-top:1px solid var(--line); }
.context-plan-version > .meta { margin-bottom:4px; font-family:Inter,ui-sans-serif,system-ui,sans-serif; }
.collapsed-lines { background:var(--accent-soft); }
.context-plan-line { display:grid; grid-template-columns:1.25em minmax(0,1fr); gap:.45em; min-height:1.5em; border-radius:5px; cursor:pointer; white-space:pre-wrap; overflow-wrap:anywhere; }
.context-plan-line:hover { background:rgba(64,93,69,.08); }
.context-plan-line:focus-visible { outline:3px solid rgba(64,93,69,.2); outline-offset:1px; }
.context-plan-line.is-pending { opacity:.55; cursor:wait; pointer-events:none; }
.context-plan-line.older-selection { margin-left:-5px; padding-left:2px; border-left:3px solid #9a8260; background:rgba(154,130,96,.10); }
.context-plan-line.blank-line { cursor:default; }
.context-plan-line.blank-line:hover { background:transparent; }
.selection-mark { color:var(--accent); font-family:ui-sans-serif,system-ui,sans-serif; font-weight:800; text-align:center; user-select:none; }
.context-plan-text { min-width:0; }
.revision { padding:10px 0; border-top:1px solid var(--line); }
.revision-body,.readonly-text { white-space:pre-wrap; overflow-wrap:anywhere; padding:12px; border-radius:8px; background:#f7f6f1; font:13px/1.5 ui-monospace,SFMono-Regular,Menlo,monospace; }
.selectable-plan { -webkit-user-select:text; user-select:text; cursor:text; }
.selectable-plan .plan-display-line { -webkit-touch-callout:none; }
.plan-display-line { min-height:1.5em; white-space:pre-wrap; }
.plan-strike { text-decoration:line-through; color:var(--muted); }
.plan-dropped { color:#c56518; text-decoration-line:line-through; text-decoration-style:double; text-decoration-thickness:1px; }
.plan-deprioritized { color:#baedff; }
.plan-red { color:#b12525; font-weight:750; }
.plan-hourglass { display:inline-block; margin-left:.4em; color:initial; font-weight:400; text-decoration:none; }
.annotation-menu { position:fixed; z-index:100; display:flex; gap:5px; padding:6px; border:1px solid var(--line); border-radius:9px; background:#fff; box-shadow:0 10px 30px rgba(30,28,22,.2); }
.annotation-menu button { border:0; border-radius:6px; padding:7px 10px; background:#f1efe8; color:var(--ink); }
.annotation-menu button:hover { background:var(--accent-soft); }
.annotation-menu button span { display:inline-block; min-width:18px; font-weight:750; text-align:center; }
.strike-icon { text-decoration:line-through; }
.red-icon { color:#b12525; }
.hourglass-icon { font-weight:400!important; }
.dropped-icon { color:#c56518; text-decoration-line:line-through; text-decoration-style:double; }
.deprioritized-icon { color:#baedff; font-weight:500!important; }
.normal-icon { color:var(--ink); font-weight:500!important; }
.two-col { display:grid; grid-template-columns:1fr 1fr; gap:18px; }
.included { margin-top:28px; border-top:2px solid var(--line); padding-top:22px; }
.included > p { color:var(--muted); }
.boundary { color:var(--warn); font-size:12px; font-weight:650; }
.execution-rendered { margin-top:10px; border:1px solid #ece9df; border-radius:8px; overflow:hidden; font-size:13px; }
.parsed-row { display:grid; grid-template-columns:170px 1fr; gap:10px; padding:5px 8px; border-bottom:1px solid #ece9df; }
.parsed-row:last-child { border-bottom:0; }
.execution-time { color:var(--accent); font-weight:650; }
.execution-freeform { min-height:1.5em; padding:5px 8px; white-space:pre-wrap; font-family:ui-monospace,SFMono-Regular,Menlo,monospace; border-bottom:1px solid #ece9df; }
.editor-style-toggle { flex:none; align-self:flex-start; }
.execution-sheet { overflow-x:auto; border:1px solid #c9c5ba; border-radius:9px; background:#fffefa; }
.execution-sheet-head,.execution-sheet-row { display:grid; grid-template-columns:minmax(110px,1fr) minmax(220px,3fr) 42px; align-items:stretch; }
.execution-sheet-head { color:var(--muted); background:#f1efe8; font-size:12px; font-weight:700; }
.execution-sheet-head span { padding:7px 10px; border-right:1px solid var(--line); }
.execution-sheet-row { border-top:1px solid var(--line); }
.execution-sheet-row input { min-width:0; border:0; border-right:1px solid var(--line); border-radius:0; background:transparent; font:14px/1.55 ui-monospace,SFMono-Regular,Menlo,monospace; }
.execution-sheet-row input:focus { position:relative; z-index:1; outline:3px solid rgba(64,93,69,.2); outline-offset:-3px; }
.sheet-remove { border:0; border-radius:0; background:transparent; color:var(--muted); font-size:20px; }
.sheet-add { margin:10px; }
#toast { position:fixed; right:20px; bottom:20px; max-width:360px; padding:10px 14px; border-radius:9px; background:#262822; color:white; opacity:0; transform:translateY(8px); transition:.2s; pointer-events:none; }
#toast.show { opacity:1; transform:none; }
#toast.error { background:var(--danger); }
.loading { padding:70px; text-align:center; color:var(--muted); }
.auth-shell { max-width:440px; margin:55px auto; }
.auth-shell .panel { padding:28px; }
.auth-shell input { display:block; width:100%; margin:5px 0 15px; }
.auth-switch { margin-top:18px; color:var(--muted); }
.link-button { padding:0; border:0; background:none; color:var(--accent); text-decoration:underline; }
.account-name { color:var(--muted); font-size:13px; margin-right:8px; }
.review-warning { margin:12px 0; padding:10px 12px; border-left:3px solid var(--warn); border-radius:6px; background:#fff5e6; color:#6f471d; font-size:13px; }
.review-daily-logs { display:grid; gap:14px; margin-top:14px; }
.review-daily-log { padding:14px; border:1px solid var(--line); border-radius:10px; background:#fbfaf6; }
.review-daily-log h3 { margin-bottom:2px; }
@media(max-width:760px){ .app-header{grid-template-columns:1fr;gap:9px;padding:12px}.mode-nav{width:100%;min-width:0}.mode-review-group{width:auto}.execute-mode-button{flex:1}.segmented{width:100%;overflow:auto}.segmented button{flex:1}.period-nav{width:100%}.period-bar{gap:6px;flex-wrap:wrap}.period-bar .label{order:-1;width:100%;min-width:0}.two-col,.custom-grid{grid-template-columns:1fr}main{padding:20px 12px 70px}.panel{padding:15px}.panel-head{align-items:flex-start;flex-direction:column}.editor-style-toggle{width:100%}.parsed-row{grid-template-columns:1fr}.save-state{width:100%;margin:0}#plan-body.mobile-auto-grow{min-height:180px;overflow-y:hidden;resize:none}.annotation-menu{left:50%!important;right:auto!important;top:auto!important;bottom:max(18px,env(safe-area-inset-bottom));transform:translateX(-50%);padding:8px}.annotation-menu button{min-width:46px;min-height:44px} }
@media(max-width:760px), (hover:none) and (pointer:coarse){.selectable-plan,.selectable-plan .plan-display-line{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;cursor:default}}
