/* ПРИР v0.2 — мягкая, мобильная, доступная тема без внешних зависимостей */
:root,[data-theme="soft"]{
 color-scheme:light;--bg:#f8f5ef;--surface:#fffcf8;--surface2:#f1eee7;--input:#fffefa;--stroke:#e7e0d6;--text:#292d2b;--muted:#6a746f;--accent:#608b78;--accent-ink:#fff;--accent-soft:#e3efe8;--accent-soft-text:#356551;--base-line:#5e9979;--hobby-line:#dba77d;--hobby-soft:#f9e9d8;--hobby-text:#8e603e;--danger:#af555c;--wash1:#e1ece2;--wash2:#f3e4dc;--shadow:0 12px 38px rgba(66,62,53,.045);--dock:rgba(255,252,248,.96);--chart-grid:#e3e4df;--chart-label:#7b8580;
}
[data-theme="watercolor"]{
 color-scheme:light;--bg:#f9f7fc;--surface:#fffefe;--surface2:#f1ebfa;--input:#fefcff;--stroke:#e7e1ef;--text:#343346;--muted:#746f82;--accent:#8772ab;--accent-ink:#fff;--accent-soft:#e9e1fa;--accent-soft-text:#65518f;--base-line:#7b9eac;--hobby-line:#d59cac;--hobby-soft:#f9e7ef;--hobby-text:#985f76;--danger:#ab556d;--wash1:#e4dfff;--wash2:#fee5e8;--shadow:0 12px 38px rgba(100,76,132,.055);--dock:rgba(255,253,255,.96);--chart-grid:#e9e3ec;--chart-label:#817b8b;
}
[data-theme="linen"]{
 color-scheme:light;--bg:#f6f0e8;--surface:#fffaf3;--surface2:#f0e6d9;--input:#fffcf7;--stroke:#e6d9ca;--text:#42392e;--muted:#837568;--accent:#a57755;--accent-ink:#fff;--accent-soft:#f1e2d2;--accent-soft-text:#875937;--base-line:#83987c;--hobby-line:#c58c58;--hobby-soft:#f6e8d8;--hobby-text:#925b2f;--danger:#b55c59;--wash1:#ece1cc;--wash2:#f6e5df;--shadow:0 12px 38px rgba(101,72,45,.05);--dock:rgba(255,250,243,.97);--chart-grid:#e6dccf;--chart-label:#857668;
}
[data-theme="lavender"]{
 color-scheme:light;--bg:#f3f2fa;--surface:#fdfcff;--surface2:#ebe8f6;--input:#fffeff;--stroke:#e2ddec;--text:#343246;--muted:#777188;--accent:#7974b6;--accent-ink:#fff;--accent-soft:#e5e2f8;--accent-soft-text:#625b9b;--base-line:#7b9da9;--hobby-line:#d4a2b8;--hobby-soft:#fae9f1;--hobby-text:#91617d;--danger:#b05d76;--wash1:#e2e1f9;--wash2:#efdfeb;--shadow:0 12px 38px rgba(83,72,124,.055);--dock:rgba(253,252,255,.96);--chart-grid:#e6e2ef;--chart-label:#88829a;
}
[data-theme="peach"]{
 color-scheme:light;--bg:#fdf4ef;--surface:#fffdfb;--surface2:#fbe9df;--input:#fffaf7;--stroke:#f0ddd1;--text:#48372e;--muted:#8a7469;--accent:#bf806b;--accent-ink:#fff;--accent-soft:#fbe5dc;--accent-soft-text:#9b5a48;--base-line:#8ba98e;--hobby-line:#dc9c7a;--hobby-soft:#fceadf;--hobby-text:#9b6048;--danger:#af5e5d;--wash1:#fbe0d2;--wash2:#f5e8d5;--shadow:0 12px 38px rgba(116,80,61,.05);--dock:rgba(255,253,251,.96);--chart-grid:#f0e1d9;--chart-label:#937a6c;
}
[data-theme="sage"]{
 color-scheme:light;--bg:#eff3ee;--surface:#fbfdfa;--surface2:#e7eee4;--input:#fcfffb;--stroke:#dce5d9;--text:#2d3b32;--muted:#718075;--accent:#668b6c;--accent-ink:#fff;--accent-soft:#e1efdf;--accent-soft-text:#446e4a;--base-line:#619a81;--hobby-line:#bc9e74;--hobby-soft:#f3eadb;--hobby-text:#8e6d43;--danger:#a65d5d;--wash1:#d9e5d5;--wash2:#e6e8d9;--shadow:0 12px 38px rgba(61,95,66,.045);--dock:rgba(251,253,250,.97);--chart-grid:#dfe8df;--chart-label:#7a8b7c;
}
[data-theme="mist"]{
 color-scheme:light;--bg:#f0f5f7;--surface:#fcfeff;--surface2:#e6f0f4;--input:#fcfeff;--stroke:#dbe7eb;--text:#2b3b44;--muted:#6c7f88;--accent:#628fa2;--accent-ink:#fff;--accent-soft:#dfeff5;--accent-soft-text:#477b8e;--base-line:#6a9c96;--hobby-line:#cfaaa7;--hobby-soft:#f7eae8;--hobby-text:#9b6a69;--danger:#ad5b66;--wash1:#dbeaf0;--wash2:#e0eeeb;--shadow:0 12px 38px rgba(59,96,119,.045);--dock:rgba(252,254,255,.97);--chart-grid:#dde8ec;--chart-label:#74858c;
}
[data-theme="night"]{
 color-scheme:dark;--bg:#151d22;--surface:#1e2a2f;--surface2:#28363b;--input:#192329;--stroke:#35454a;--text:#eaf0ed;--muted:#a8b7b5;--accent:#a0d9bf;--accent-ink:#15362c;--accent-soft:#2b4c43;--accent-soft-text:#bee8d6;--base-line:#96d7ba;--hobby-line:#edc499;--hobby-soft:#504236;--hobby-text:#f6d3af;--danger:#f3a2a2;--wash1:#233d3c;--wash2:#242e3b;--shadow:0 12px 38px rgba(0,0,0,.18);--dock:rgba(30,42,47,.97);--chart-grid:#3b4b4f;--chart-label:#aab6b4;
}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;min-height:100vh;background:radial-gradient(ellipse at 100% -15%,var(--wash1),transparent 54%),radial-gradient(ellipse at 0% 100%,var(--wash2),transparent 60%),var(--bg);color:var(--text);font:15px/1.48 system-ui,-apple-system,'Segoe UI',Arial,sans-serif}button,input,textarea,select{font:inherit}button{cursor:pointer;touch-action:manipulation}button:disabled{opacity:.48;cursor:default}button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:3px solid var(--accent);outline-offset:3px}h1,h2,h3,p{margin:0}h1{font-size:clamp(26px,4vw,34px);font-weight:760;letter-spacing:-.045em}h2{font-size:18px;letter-spacing:-.025em}h3{font-size:15px}p{line-height:1.65}[hidden]{display:none!important}.muted{color:var(--muted)}.small{font-size:12px}.overline{font-size:10px;letter-spacing:.14em;text-transform:uppercase;font-weight:750;color:var(--accent)}
.shell{max-width:960px;padding:0 21px;margin:auto}.topbar{display:flex;justify-content:space-between;align-items:center;height:75px;border-bottom:1px solid var(--stroke)}.brand{display:flex;align-items:center;gap:11px}.brand strong{display:block;font-size:19px;line-height:1.1}.brand small{display:block;color:var(--muted);font-size:10px;margin-top:3px}.logo{width:40px;height:40px;background:var(--accent-soft);color:var(--accent-soft-text);border-radius:13px;display:grid;place-items:center;font-weight:800;font-size:21px}.top-actions{display:flex;align-items:center;gap:7px}.local-badge{font-size:11px;color:var(--muted);padding-right:4px}.local-badge:first-letter{color:var(--accent)}.iconbtn{width:40px;height:40px;border:1px solid var(--stroke);background:var(--surface);color:var(--text);border-radius:13px;font-size:20px;display:grid;place-items:center}.iconbtn:hover{background:var(--surface2)}.page-title{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:27px 0 21px}.page-title h1{margin-top:4px}.page-title .btn{flex-shrink:0}.btn{display:inline-flex;align-items:center;justify-content:center;gap:5px;min-height:41px;padding:10px 16px;font-size:13px;font-weight:700;border-radius:12px;border:1px solid var(--stroke);background:var(--surface);color:var(--text)}.btn.primary{background:var(--accent);color:var(--accent-ink);border-color:var(--accent)}.btn.subtle{background:var(--accent-soft);color:var(--accent-soft-text);border-color:transparent}.btn.danger{color:var(--danger);background:transparent;border-color:var(--stroke);margin-right:auto}.btn.compact{padding:9px 12px;font-size:12px}.btn.full{width:100%;margin-top:15px}.textbtn{border:0;background:transparent;color:var(--accent);font-size:12px;padding:7px}.date-panel{display:flex;align-items:center;background:var(--surface);border:1px solid var(--stroke);border-radius:19px;box-shadow:var(--shadow);padding:11px;position:relative}.date-arrow{width:44px;height:52px;background:var(--surface2);border:none;border-radius:13px;font-size:26px;color:var(--text)}.date-display{flex:1;min-width:0;border:0;background:none;color:var(--text);display:flex;flex-direction:column;align-items:center;gap:3px;padding:4px}.date-display strong{font-size:18px;letter-spacing:-.02em}.date-display small{color:var(--muted);font-size:11px}.date-native{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none;left:50%;top:65px}.map-toolbar{display:flex;align-items:center;justify-content:space-between;gap:7px;margin:18px 0 13px}.toggle{display:inline-flex;background:var(--surface2);padding:4px;border-radius:13px;gap:3px}.toggle button{border:0;color:var(--muted);background:transparent;border-radius:10px;font-size:12px;font-weight:650;padding:9px 11px}.toggle button.active{background:var(--surface);box-shadow:0 2px 8px #0000000b;color:var(--text)}.daily-summary{font-size:12px;color:var(--muted);min-height:18px;margin-bottom:10px}.board{display:grid;gap:15px}.segment{background:var(--surface);border:1px solid var(--stroke);border-radius:20px;padding:16px;box-shadow:var(--shadow)}.segment-head{display:flex;gap:9px;align-items:center;padding-bottom:10px}.segdot{width:11px;height:11px;border-radius:50%;background:var(--segcolor);flex:none}.seg-title{font-size:15px;font-weight:750;flex:1;min-width:0;overflow-wrap:anywhere}.segment-tools{display:flex;align-items:center;gap:6px}.mini{font-size:11px;color:var(--muted);background:transparent;border:0;border-radius:8px;padding:7px 5px}.mini:hover{background:var(--surface2)}.handle{border:0;background:var(--surface2);color:var(--muted);padding:7px 9px;min-width:36px;min-height:35px;border-radius:10px;touch-action:none;user-select:none;cursor:grab;font-size:16px;letter-spacing:-3px;line-height:1}.goal-stack{display:grid;gap:8px}.goal-card{position:relative;background:var(--surface2);border:1px solid transparent;border-radius:13px;padding:12px;display:flex;align-items:center;gap:10px;min-height:59px}.goal-card.has-entries{background:var(--surface2)}.goal-main{flex:1;min-width:0;text-align:left;border:0;background:transparent;color:var(--text);padding:3px 0}.goal-main strong{display:block;font-size:13px;font-weight:690;overflow-wrap:anywhere;line-height:1.45}.goal-main small{display:block;color:var(--muted);font-size:11px;margin-top:3px}.goal-rank{font-size:11px;color:var(--muted);width:16px;flex:none;text-align:center}.check{border:2px solid var(--muted);border-radius:7px;width:31px;height:31px;flex:none;background:transparent;color:var(--accent-ink);display:grid;place-items:center;font-size:19px;font-weight:900;touch-action:pan-y;user-select:none}.check[data-status="done"]{background:var(--accent);border-color:var(--accent)}.check[data-status="partial"]{border-color:#bb986c;color:#bb986c;background:color-mix(in srgb,#bb986c 12%,transparent)}.check[data-status="partial"]:after{content:"";display:block;width:9px;height:9px;background:#bb986c;border-radius:100%}.check.future{opacity:.36}.check-note{font-size:12px;color:var(--accent);padding:6px 2px;border:0;background:transparent}.extra-add{font-size:11px;color:var(--accent);font-weight:650;white-space:nowrap;border:0;padding:7px;background:transparent}.rule-stack{display:grid;gap:6px;flex:1}.rule-row{display:flex;align-items:center;gap:9px;min-width:0}.rule-title{font-size:11px;color:var(--muted);flex:1;min-width:0}.rule-title small{font-size:10px}.segment-empty{font-size:12px;color:var(--muted);padding:12px 3px}.add-goal{color:var(--accent);border:0;background:none;font-size:12px;font-weight:700;padding:12px 2px 3px;text-align:left}.board-bottom{text-align:center;margin-top:21px}.add-segment{border:1px dashed var(--stroke);color:var(--muted);background:var(--surface);border-radius:15px;padding:14px;width:100%;font-weight:650}.foot-hint{font-size:11px;color:var(--muted);margin:11px 0 0}.empty-board{padding:50px 22px;border:1px dashed var(--stroke);border-radius:19px;text-align:center;background:var(--surface)}.empty-board .big{font-size:34px;display:block;color:var(--accent)}.empty-board h2{margin:12px 0 4px}.empty-board p{font-size:12px;color:var(--muted);margin-bottom:19px}.drag-origin{border:1px dashed var(--accent)!important;opacity:1!important}.drag-in-progress,.drag-in-progress *{user-select:none!important;-webkit-user-select:none!important}.drag-preview{position:fixed;z-index:9999;pointer-events:none;width:min(292px,78vw);box-sizing:border-box;border-radius:14px;border:2px solid var(--accent);background:var(--surface);color:var(--text);box-shadow:0 18px 35px #0003;padding:11px 14px;display:grid;gap:3px;transform:rotate(-1deg)}.drag-preview small{font-size:9px;letter-spacing:.1em;color:var(--accent);font-weight:800}.drag-preview strong{font-size:13px;line-height:1.25;overflow-wrap:anywhere}.drop-insertion-line{position:fixed;z-index:9998;height:4px;border-radius:100px;background:var(--accent);pointer-events:none;box-shadow:0 0 0 3px var(--surface),0 0 10px color-mix(in srgb,var(--accent) 30%,transparent)}.drop-insertion-line:before{content:"";position:absolute;top:-4px;left:-3px;width:12px;height:12px;border-radius:50%;background:var(--accent)}.drop-insertion-line:after{content:"Сюда";position:absolute;right:0;bottom:8px;padding:2px 7px;border-radius:6px;background:var(--accent);color:var(--accent-ink);font-size:10px;font-weight:800;white-space:nowrap}.ghost{display:none}.section-sub{font-size:13px;color:var(--muted);margin:-7px 0 20px}.stack{display:grid;gap:13px}.panel{background:var(--surface);border:1px solid var(--stroke);border-radius:18px;padding:20px;margin-bottom:15px;box-shadow:var(--shadow)}.panel-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:6px}.help-icon{color:var(--muted);font-size:15px}.filters{display:flex;justify-content:space-between;gap:10px;align-items:center;margin:-6px 0 17px}.filters select{max-width:200px;font-size:12px;padding:10px}.stat-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:15px}.stat{background:var(--surface);border:1px solid var(--stroke);border-radius:15px;padding:13px}.stat strong{display:block;font-size:25px;line-height:1.35;letter-spacing:-.045em}.stat small{display:block;font-size:11px;color:var(--muted);margin-top:4px}.chart-area{min-height:165px;margin-top:12px;overflow:hidden}.chart-area svg{display:block;width:100%;height:auto}.legend{display:flex;justify-content:space-between;flex-wrap:wrap;gap:6px;margin-top:6px;font-size:11px;color:var(--muted)}.compare-list{display:grid;gap:10px}.compare-list p{font-size:13px;color:var(--muted)}.factor-line{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:13px;border-bottom:1px solid var(--stroke);padding:9px 0}.factor-line small{color:var(--muted)}.journal-card{background:var(--surface);border:1px solid var(--stroke);border-radius:16px;padding:17px;box-shadow:var(--shadow)}.journal-head{display:flex;align-items:center;justify-content:space-between;gap:10px;color:var(--muted);font-size:11px}.journal-card h3{margin:8px 0 4px;overflow-wrap:anywhere}.journal-card .reason{color:var(--muted);font-size:13px;white-space:pre-wrap;overflow-wrap:anywhere}.tags{display:flex;gap:5px;flex-wrap:wrap;margin-top:11px}.tag{background:var(--surface2);color:var(--muted);padding:3px 8px;border-radius:6px;font-size:10px}.journal-footer{border-top:1px solid var(--stroke);margin-top:11px;padding-top:10px;font-size:12px;color:var(--muted)}.empty-state{font-size:12px;padding:20px;border:1px dashed var(--stroke);border-radius:14px;color:var(--muted);background:var(--surface)}.setting-item{display:flex;align-items:center;justify-content:space-between;gap:13px}.setting-item h2{margin-bottom:5px}.space-top{margin-top:9px}.button-row{display:flex;gap:8px;flex-wrap:wrap}.bottomnav{display:flex;gap:5px;margin-top:24px;padding:8px;border-top:1px solid var(--stroke)}.bottomnav button{flex:1;display:flex;align-items:center;justify-content:center;gap:8px;border:0;background:transparent;padding:12px 8px;border-radius:13px;color:var(--muted);font-size:13px;font-weight:700}.bottomnav button.active{background:var(--accent-soft);color:var(--accent-soft-text)}.nav-symbol{font-size:21px;line-height:1}footer{text-align:center;color:var(--muted);font-size:10px;padding:21px 0 60px}
.dialog{border:1px solid var(--stroke);border-radius:23px;padding:0;background:var(--surface);color:var(--text);width:min(560px,calc(100vw - 25px));max-height:87dvh;box-shadow:0 26px 90px #0004}.dialog::backdrop{background:#1a2024a6;backdrop-filter:blur(4px)}.dialog-body{padding:22px;max-height:87dvh;overflow:auto}.modalhead{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:19px}.modalhead h2{font-size:23px;margin-top:4px}.modal-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;margin-top:20px}.stack label{display:grid;gap:6px;font-size:12px;font-weight:650}.stack input:not([type=checkbox]),.stack select,.stack textarea,input[type=date],.filters select{background:var(--input);border:1px solid var(--stroke);border-radius:11px;min-width:0;width:100%;color:var(--text);padding:11px 12px;outline:none;font-weight:400}.stack textarea{min-height:74px;resize:vertical}.row-fields{display:grid;grid-template-columns:1fr 1fr;gap:10px}.rule-editor{border:1px solid var(--stroke);background:var(--surface2);border-radius:13px;padding:13px;display:grid;gap:9px}.rule-editor-head{display:flex;align-items:center;justify-content:space-between}.rule-editor-head strong{font-size:12px}.days{display:flex;justify-content:space-between;gap:4px}.days label{display:flex;align-items:center;justify-content:center;flex:1;background:var(--surface);padding:8px 4px;border-radius:9px;font-size:11px}.days label:has(input:checked){background:var(--accent-soft);color:var(--accent-soft-text)}.days input{width:13px;height:13px;accent-color:var(--accent)}.rule-add{border:1px dashed var(--stroke);background:none;color:var(--accent);border-radius:11px;padding:11px;font-size:12px;font-weight:700}.choice-chips{display:flex;flex-wrap:wrap;gap:7px}.chip{border:1px solid var(--stroke);border-radius:999px;background:var(--surface2);color:var(--muted);padding:8px 11px;font-size:12px}.chip.selected{background:var(--accent-soft);color:var(--accent-soft-text);border-color:var(--accent)}.hint{font-size:11px;color:var(--muted)}.profile-metrics{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:12px 0}.profile-metrics>div{padding:14px;background:var(--surface2);border-radius:12px}.profile-metrics strong{font-size:23px;display:block}.profile-metrics small{font-size:11px;color:var(--muted)}.profile-actions{display:flex;flex-wrap:wrap;gap:7px;margin:12px 0}.divider{border-top:1px solid var(--stroke);margin:15px 0}.timeline{display:flex;gap:5px;align-items:end;margin-top:12px}.timeline-day{flex:1;text-align:center;font-size:10px;color:var(--muted)}.timeline-bar{height:37px;border-radius:5px;background:var(--surface2);margin-bottom:4px;display:flex;align-items:end;overflow:hidden}.timeline-bar i{display:block;width:100%;background:var(--accent);min-height:0}.theme-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.theme-choice{background:var(--surface);color:var(--text);border:1px solid var(--stroke);border-radius:13px;display:flex;align-items:center;text-align:left;gap:9px;padding:9px;min-width:0}.theme-choice.active{border:2px solid var(--accent);padding:8px;background:var(--accent-soft)}.swatch{width:45px;height:45px;border:1px solid #0000000a;flex:none;border-radius:10px;background:var(--c-bg);position:relative;overflow:hidden}.swatch:before{content:"";position:absolute;left:7px;top:9px;width:30px;height:10px;border-radius:5px;background:var(--c-accent)}.swatch:after{content:"";position:absolute;left:7px;top:25px;width:25px;height:12px;border-radius:5px;background:var(--c-second)}.theme-choice strong{font-size:12px;display:block}.theme-choice small{font-size:10px;color:var(--muted)}.auto-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:15px;background:var(--surface2);border-radius:12px;margin:16px 0}.auto-row span{display:grid;gap:4px}.auto-row strong{font-size:12px}.auto-row small{font-size:11px;color:var(--muted)}.auto-row input{width:20px;height:20px;accent-color:var(--accent);flex:none}.toast{position:fixed;z-index:99;bottom:28px;left:50%;transform:translate(-50%,12px);background:var(--text);color:var(--surface);border-radius:12px;padding:12px 17px;box-shadow:0 10px 30px #0002;max-width:calc(100vw - 30px);font-size:12px;opacity:0;pointer-events:none;transition:.2s}.toast.show{opacity:1;transform:translate(-50%,0)}
@media(max-width:650px){.shell{padding:0 14px}.topbar{height:67px}.brand small{display:none}.logo{width:36px;height:36px}.iconbtn{width:37px;height:37px}.page-title{padding:25px 0 16px}.page-title h1{font-size:27px}.date-display strong{font-size:16px}.date-panel{padding:8px}.date-arrow{width:39px}.segment{padding:13px}.goal-card{padding:10px}.stat{padding:11px}.stat strong{font-size:22px}.panel{padding:16px}.bottomnav{position:fixed;z-index:22;bottom:calc(9px + env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);width:min(480px,calc(100vw - 20px));margin:0;background:var(--dock);border:1px solid var(--stroke);border-radius:19px;padding:5px;box-shadow:0 10px 35px #0002;backdrop-filter:blur(13px)}.bottomnav button{flex-direction:column;gap:1px;padding:7px 3px;font-size:10px;min-width:0}.nav-symbol{font-size:22px}.dialog-body{padding:18px}.dialog{max-height:86dvh}.dialog-body{max-height:86dvh}footer{padding-bottom:118px}.toast{bottom:105px}}@media(max-width:350px){.local-badge{display:none}.row-fields{grid-template-columns:1fr}.theme-grid{grid-template-columns:1fr}.filters{flex-wrap:wrap}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*:before,*:after{animation:none!important;transition:none!important}}

.date-panel .date-native{position:absolute;left:50%;top:50%;width:1px;height:1px;padding:0;border:0;opacity:0;pointer-events:none;min-width:0;max-width:1px;overflow:hidden}

/* v0.3.1: отметки по расписанию в обоих режимах без сжатия названий */
.goal-card.is-due{display:grid;grid-template-columns:16px minmax(0,1fr) auto;column-gap:10px;row-gap:6px;align-items:center}
.goal-card.is-due .goal-rank{grid-column:1;grid-row:1}
.goal-card.is-due .goal-main{grid-column:2;grid-row:1}
.goal-card.is-due .handle{grid-column:3;grid-row:1}
.goal-card.is-due .rule-stack{grid-column:2 / -1;grid-row:2}
.goal-card.is-due .rule-title{font-size:11px;line-height:1.4}
.goal-card.is-due .check{width:32px;height:32px}
.schedule-preview{font-size:12px;line-height:1.5;padding:12px;background:var(--surface);border:1px solid var(--stroke);border-radius:11px;color:var(--text)}
.schedule-preview strong{font-weight:750}
.schedule-preview small{display:block;margin-top:4px;color:var(--muted);font-size:11px}

/* v0.4 · Два уровня: цель → задачи. Компактная карточка, чекбоксы справа. */
.goal-card.single-goal,.goal-card.single-goal.is-due{
  display:grid;grid-template-columns:16px minmax(0,1fr) auto auto;
  align-items:center;column-gap:9px;row-gap:0;padding:12px;
}
.goal-card.single-goal .goal-rank{grid-column:1;grid-row:auto}
.goal-card.single-goal .goal-label-wrap{grid-column:2;grid-row:auto;min-width:0}
.goal-card.single-goal .goal-controls{grid-column:3;grid-row:auto}
.goal-card.single-goal .handle{grid-column:4;grid-row:auto}
.goal-card.compound-goal,.goal-card.compound-goal.is-due{display:block;padding:12px;min-width:0}
.goal-parent{display:grid;grid-template-columns:16px minmax(0,1fr) auto auto;align-items:center;gap:9px;min-height:40px}
.goal-label-wrap{min-width:0}
.goal-label-wrap .goal-main{width:100%}
.goal-label-wrap .goal-main strong{line-height:1.4}
.single-schedule,.parent-progress{font-size:10.5px;color:var(--muted);display:block;margin-top:3px;overflow-wrap:anywhere}
.goal-controls{display:flex;align-items:center;gap:7px;justify-content:end;min-width:0}
.goal-controls .check{width:32px;height:32px}
.group-count{font-size:10px;color:var(--muted);white-space:nowrap}
.expand-goal{width:30px;height:32px;flex:none;border:1px solid var(--stroke);border-radius:11px;background:var(--surface);color:var(--text);font-size:23px;line-height:1;display:grid;place-items:center;cursor:pointer}
.expand-goal[aria-expanded="false"]{font-weight:900;font-size:24px;padding-bottom:8px}
.expand-goal[aria-expanded="true"]{font-size:22px}
.goal-children{border-top:1px solid var(--stroke);margin:11px 0 0 25px;padding:4px 0 0;display:grid;gap:0}
.task-row{display:flex;align-items:center;gap:9px;padding:12px 0;min-width:0;border-bottom:1px solid var(--stroke)}
.task-row:last-of-type{border-bottom:0}
.task-info{flex:1;min-width:0;display:grid;gap:4px}
.task-name{font-size:12px;font-weight:690;line-height:1.3;overflow-wrap:anywhere}
.task-info small{font-size:10.5px;color:var(--muted);line-height:1.35}
.task-control{flex:none;display:flex;align-items:center;justify-content:end;gap:5px}
.task-control .check{width:31px;height:31px}
.task-next{font-size:10px;color:var(--muted);text-align:right;max-width:104px;line-height:1.3}
.unscheduled-label{font-size:10px;color:var(--muted);line-height:1.4;max-width:116px;text-align:right}
.unscheduled-label .extra-add{display:block;font-size:11px;margin-top:4px;white-space:normal;text-align:right}
.add-task{background:transparent;color:var(--accent);border:0;text-align:left;font-size:11px;font-weight:740;padding:10px 0}
.goal-card.compound-goal .handle{grid-column:4}
@media(max-width:400px){
 .goal-card.single-goal,.goal-card.single-goal.is-due,.goal-parent{gap:5px}
 .group-count{font-size:9px}
 .expand-goal{width:26px}
 .unscheduled-label{max-width:88px}
 .goal-card .handle{padding:6px 7px;min-width:30px}
 .goal-children{margin-left:21px}
}

/* ПРИР v0.4.1: мягкие чекбоксы, фиолетовые свободные занятия */
.check {
  border:1.7px solid color-mix(in srgb,var(--muted) 78%,var(--surface));
  border-radius:10px;background:color-mix(in srgb,var(--surface) 76%,transparent);
  box-shadow:inset 0 1px 1px #ffffff18,0 1px 2px #00000008;
  transition:background .18s ease,border-color .18s ease,box-shadow .18s ease,transform .15s ease;
}
.check:active,.voluntary-check:active{transform:scale(.94)}
.check[data-status="done"]{
  background:var(--accent);border:1px solid color-mix(in srgb,var(--accent) 87%,#ffffff);
  box-shadow:0 2px 8px color-mix(in srgb,var(--accent) 22%,transparent),inset 0 1px 0 #ffffff29;
}
.check-mark{width:20px;height:20px;fill:none;stroke:var(--accent-ink);stroke-width:2.8;stroke-linecap:round;stroke-linejoin:round;display:block}
.check[data-status="partial"]{border-width:1.7px;border-color:#c49c6e;background:color-mix(in srgb,#c49c6e 9%,var(--surface))}
.check[data-status="partial"]:after{width:8px;height:8px;background:#c49c6e;box-shadow:0 0 0 3px color-mix(in srgb,#c49c6e 12%,transparent)}
.voluntary-control{display:flex;align-items:center;justify-content:flex-end;gap:7px;max-width:150px;min-width:0}
.voluntary-control .task-next{max-width:88px}
.voluntary-check{
  flex:0 0 32px;width:32px;height:32px;border:1.7px solid #9c85cc;
  border-radius:10px;display:grid;place-items:center;padding:0;
  color:#7957bb;background:color-mix(in srgb,#a98cd8 11%,var(--surface));
  box-shadow:0 1px 2px #00000008;touch-action:pan-y;
  transition:background .17s ease,border-color .17s ease,box-shadow .17s ease,transform .15s ease;
}
.voluntary-check .plus-mark{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
.voluntary-check[data-active="true"]{
  background:#825bc5;border-color:#7650bb;color:#fff;
  box-shadow:0 2px 9px #7957bb31,inset 0 1px 0 #ffffff27;
}
.voluntary-check .check-mark{stroke:#fff}
.voluntary-check:disabled{opacity:.38}
.voluntary-check:focus-visible,.check:focus-visible{outline:3px solid color-mix(in srgb,#8a66cc 40%,transparent);outline-offset:3px}
.task-control .task-next{max-width:93px}
.journal-buttons{display:flex;gap:5px;align-items:center}
@media(max-width:400px){.voluntary-control{max-width:112px}.voluntary-control .task-next{max-width:73px}.voluntary-check{width:30px;height:30px;flex-basis:30px}}

/* ПРИР v0.4.2 — независимые цветовые переменные отметок. */
.check{border-color:var(--mark-empty, color-mix(in srgb,var(--muted) 78%,var(--surface)))}
.check[data-status="done"]{
  background:var(--mark-done,var(--accent));
  border-color:var(--mark-done,var(--accent));
  box-shadow:0 2px 8px color-mix(in srgb,var(--mark-done,var(--accent)) 23%,transparent),inset 0 1px 0 #ffffff29;
}
.check[data-status="done"] .check-mark{stroke:var(--mark-done-ink,var(--accent-ink))}
.check[data-status="partial"]{
  border-color:var(--mark-partial,#c49c6e);
  background:color-mix(in srgb,var(--mark-partial,#c49c6e) 10%,var(--surface));
}
.check[data-status="partial"]:after{
  background:var(--mark-partial,#c49c6e);
  box-shadow:0 0 0 3px color-mix(in srgb,var(--mark-partial,#c49c6e) 12%,transparent);
}
.voluntary-check{
  color:var(--mark-initiative,#7957bb);
  border-color:var(--mark-initiative,#9c85cc);
  background:color-mix(in srgb,var(--mark-initiative,#a98cd8) 10%,var(--surface));
}
.voluntary-check[data-active="true"]{
  background:var(--mark-initiative,#825bc5);
  border-color:var(--mark-initiative,#825bc5);
  color:var(--mark-initiative-ink,#ffffff);
  box-shadow:0 2px 9px color-mix(in srgb,var(--mark-initiative,#825bc5) 22%,transparent),inset 0 1px 0 #ffffff27;
}
.voluntary-check[data-active="true"] .check-mark{stroke:var(--mark-initiative-ink,#ffffff)}
.voluntary-check:focus-visible,.check:focus-visible{outline:3px solid color-mix(in srgb,var(--mark-initiative,#8a66cc) 35%,transparent);outline-offset:3px}
.marks-section-title{font-size:13px;margin:20px 0 10px}
.mark-palette-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.mark-palette-choice{min-width:0;display:flex;align-items:flex-start;flex-direction:column;gap:4px;padding:12px 10px;text-align:left;background:var(--surface2);color:var(--text);border:1.5px solid var(--stroke);border-radius:14px}
.mark-palette-choice.active{border-color:var(--accent);background:var(--accent-soft)}
.mark-palette-choice strong{font-size:12px}
.mark-palette-choice small{font-size:10px;color:var(--muted)}
.mark-palette-dots{display:flex;gap:5px;padding-bottom:3px}
.mini-mark-chip{width:19px;height:19px;border-radius:7px;border:1px solid #00000016;box-shadow:inset 0 1px 0 #ffffff3b}
.mark-individual{display:grid;gap:7px}
.mark-color-row{display:flex;align-items:center;gap:10px;padding:9px 11px;border:1px solid var(--stroke);border-radius:13px;background:var(--surface2)}
.mark-color-row label{display:grid;gap:2px;flex:1;min-width:0}
.mark-color-row label strong{font-size:12px}
.mark-color-row label small{font-size:10px;color:var(--muted)}
.mark-color-row input[type=color]{width:44px;height:37px;padding:3px;border:1px solid var(--stroke);border-radius:11px;background:var(--surface);flex-shrink:0;cursor:pointer}
.mark-reset-one{background:var(--surface);border:1px solid var(--stroke);color:var(--muted);border-radius:11px;width:35px;height:37px;font-size:23px;flex-shrink:0}
.marks-live-preview{padding:13px;border-radius:14px;border:1px solid var(--stroke);background:var(--surface2);margin-top:16px}
.marks-preview-top{display:flex;justify-content:space-between;align-items:center;gap:8px}
.marks-preview-top strong{font-size:12px}
.marks-preview-top span{font-size:10px;max-width:52%;text-align:right;color:var(--muted)}
.marks-preview-items{display:flex;justify-content:space-between;flex-wrap:wrap;gap:7px;margin-top:12px}
.marks-preview-items>div{display:grid;justify-items:center;gap:7px;min-width:45px}
.marks-preview-items small{font-size:9px;color:var(--muted)}
.sample-check{width:30px;height:30px;border-radius:9px;display:grid;place-items:center}
.sample-empty{border:2px solid var(--sample);background:var(--surface)}
.sample-filled{background:var(--sample);border:1px solid var(--sample)}
.sample-filled svg{width:22px;height:22px;fill:none;stroke:var(--sample-ink);stroke-width:2.8;stroke-linecap:round;stroke-linejoin:round}
.sample-partial{border:2px solid var(--sample);background:color-mix(in srgb,var(--sample) 9%,var(--surface))}
.sample-partial i{background:var(--sample);width:9px;height:9px;border-radius:50%}
.sample-plus{border:2px solid var(--sample);color:var(--sample);font-size:24px;line-height:1;background:color-mix(in srgb,var(--sample) 9%,var(--surface))}
.marks-footer{display:flex;justify-content:space-between;gap:10px;margin-top:17px}
@media(max-width:370px){.mark-palette-grid{gap:6px}.mark-palette-choice{padding:10px 8px}.mark-color-row{padding:9px 8px}.marks-preview-items{gap:5px}}

/* v0.5 · чат задач + журнал-лента */
.chat-dialog{padding:0;overflow:hidden;width:min(580px,calc(100vw - 18px));max-height:90dvh}
.chat-shell{height:min(720px,87dvh);display:flex;flex-direction:column;min-height:370px}
.chat-head{display:flex;justify-content:space-between;gap:12px;padding:17px 17px 13px;border-bottom:1px solid var(--stroke);flex:none}
.chat-heading{min-width:0}.chat-heading h2{font-size:20px;line-height:1.25;margin:4px 0}.chat-heading small{display:block;color:var(--muted);font-size:11px}
.chat-messages{padding:18px 14px 22px;overflow:auto;flex:1;min-height:0;display:flex;flex-direction:column;gap:11px;overscroll-behavior:contain}
.chat-empty{text-align:center;color:var(--muted);font-size:13px;margin:auto;line-height:1.6;padding:28px 10px}
.chat-message-line{display:flex;align-items:flex-start;gap:9px;position:relative;flex-shrink:0}
.chat-message-line:after{content:'';position:absolute;top:32px;left:15px;height:calc(100% - 18px);width:2px;background:var(--stroke);z-index:0;pointer-events:none}
.chat-message-line:last-child:after{display:none}
.chat-state-icon{width:31px;height:31px;flex:none;border-radius:9px;display:grid;place-items:center;font-size:18px;font-weight:700;z-index:1}
.chat-bubble{flex:1;min-width:0;display:flex;flex-direction:column;gap:9px;border:0;border-radius:14px;padding:13px 14px;text-align:left;font:inherit;white-space:normal;overflow-wrap:anywhere;line-height:1.5}
.chat-bubble-top{display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:12px}.chat-bubble-top time{font-size:11px;opacity:.75}.chat-bubble-text{font-size:13px;white-space:pre-wrap}.chat-bubble small{font-size:10px;opacity:.7}
.chat-state-icon.empty,.chat-bubble.empty,.journal-event-detail.empty{background:#E6E6E8;color:#53585D}
.chat-state-icon.partial,.chat-bubble.partial,.journal-event-detail.partial{background:#FFF0C8;color:#88661E}
.chat-state-icon.done,.chat-bubble.done,.journal-event-detail.done{background:#DEEFE4;color:#28694B}
.chat-state-icon.initiative,.chat-bubble.initiative,.journal-event-detail.initiative{background:#EDE3F7;color:#7153A0}
.chat-message-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:7px}.chat-message-actions button{border:1px solid var(--stroke);border-radius:10px;padding:7px 10px;background:var(--surface2);color:var(--text);font-size:12px}
.chat-composer{padding:11px 13px calc(14px + env(safe-area-inset-bottom)*.2);border-top:1px solid var(--stroke);background:var(--surface);flex:none}
.chat-edit-hint{display:flex;justify-content:space-between;align-items:center;font-size:11px;color:var(--muted);padding:0 2px 6px}.chat-edit-hint[hidden]{display:none}.chat-edit-hint button{background:transparent;border:0;color:var(--muted);font-size:15px}
.chat-input-row{display:flex;align-items:end;gap:8px}
#chatText{flex:1;min-width:0;border:1px solid var(--stroke);border-radius:13px;background:var(--input);color:var(--text);padding:11px 12px;resize:none;min-height:67px;max-height:125px;font:inherit;font-size:13px;outline:none}
.chat-actions{display:flex;flex-direction:column;gap:7px;align-items:center}
.chat-status,.chat-send{border-radius:11px;width:34px;height:34px;display:grid;place-items:center;font-weight:750;font-size:19px;border:1px solid var(--stroke)}
.chat-status.empty{background:#E6E6E8;color:#53585D}.chat-status.done{background:#DEEFE4;color:#28694B}.chat-status.partial{background:#FFF0C8;color:#88661E}.chat-status.initiative{background:#EDE3F7;color:#7153A0}
.chat-send{background:var(--accent);color:var(--accent-ink);border-color:transparent}.chat-send:disabled{opacity:.37}
.chat-status-caption{font-size:10px;color:var(--muted);display:block;margin-top:6px;text-align:right}
.journal-date{font-size:15px;margin:19px 0 10px;color:var(--muted)}.journal-event{border:1px solid var(--stroke);border-radius:16px;background:var(--surface);padding:14px;margin-bottom:10px;display:grid;gap:10px}
.journal-event-top{display:flex;justify-content:space-between;align-items:flex-start;gap:8px}.journal-event-top strong{font-size:13px;line-height:1.4;overflow-wrap:anywhere}.journal-event-top time{font-size:11px;white-space:nowrap;color:var(--muted)}
.journal-event-detail{padding:12px 13px;border-radius:12px;font-size:12px;background:var(--surface2)}.journal-event-detail b{font-size:11px}.journal-event-detail p{white-space:pre-wrap;margin:5px 0 0;font-size:13px;line-height:1.5}.journal-event-detail.status-event{background:var(--surface2);color:var(--text);border-left:3px solid var(--accent)}
.journal-event-detail.legacy{background:var(--surface2);color:var(--text)}.journal-open-chat{background:transparent;color:var(--accent);padding:2px 0;text-align:left;border:0;font-size:11px;font-weight:700;justify-self:start}
.goal-card,.task-row{touch-action:pan-y}
@media(max-width:650px){.chat-dialog{width:calc(100vw - 12px);max-height:90dvh}.chat-shell{height:min(680px,88dvh)}.chat-head{padding:14px}.chat-composer{padding:9px 11px 14px}}

.chat-legacy{margin-bottom:12px;border:1px dashed var(--stroke);border-radius:12px;padding:10px;color:var(--muted);font-size:12px}.chat-legacy small{font-size:10px}.chat-legacy p{white-space:pre-wrap;margin:6px 0 0}.profile-history-list{display:grid;gap:7px;margin:10px 0}.profile-history-list>button{border:1px solid var(--stroke);color:var(--text);border-radius:10px;background:var(--surface2);padding:10px;text-align:left;display:grid;gap:4px}.profile-history-list small{font-size:10px;color:var(--muted)}.profile-history-list span{margin:0;font-size:12px;white-space:pre-wrap}

/* v0.5.1 — подвижные вкладки, отклик на жесты и визуальная подсказка свайпа задачи */
.swipe-viewport{position:relative;width:100%;overflow:hidden;overscroll-behavior-x:contain;min-height:calc(100dvh - 200px);transition:height .22s ease}
.swipe-track{display:flex;align-items:flex-start;width:100%;will-change:transform;transform:translate3d(0,0,0);transition:transform .30s cubic-bezier(.22,.82,.24,1);}
.swipe-track.dragging{transition:none!important;}
.swipe-track>.screen{flex:0 0 100%;min-width:0;max-width:100%;min-height:calc(100dvh - 200px);touch-action:pan-y;}
.swipe-track>.screen[inert]{pointer-events:none;}
.goal-stack,.goal-children{overflow:hidden;}
.goal-card,.task-row{transition:transform .25s cubic-bezier(.2,.85,.25,1);will-change:transform;isolation:isolate;}
.goal-card.is-swiping,.task-row.is-swiping{transition:none;z-index:3;}
.goal-card.swipe-release,.task-row.swipe-release{transition:transform .19s cubic-bezier(.18,.82,.23,1);}
.goal-card.is-swiping:after,.task-row.is-swiping:after,.goal-card.swipe-release:after,.task-row.swipe-release:after{content:'✎  Запись';position:absolute;right:-88px;top:0;width:80px;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;border-radius:12px;color:var(--accent-soft-text);background:var(--accent-soft);font-size:11px;font-weight:800;white-space:nowrap;pointer-events:none;box-shadow:inset 0 0 0 1px var(--stroke);}
.task-row{position:relative;background:var(--surface2);}
.goal-card.swipe-ready:after,.task-row.swipe-ready:after{background:var(--accent);color:var(--accent-ink)}
.swipe-track.dragging>.screen{user-select:none;-webkit-user-select:none;}
@media(prefers-reduced-motion:reduce){.swipe-track,.swipe-viewport,.goal-card,.task-row{transition:none!important}}

/* ПРИР v0.5.2 — tactile status picker */
.check-mode-choices{border:0;margin:15px 0 0;padding:0;display:grid;gap:8px}
.check-mode-choices label{display:flex;align-items:center;gap:12px;cursor:pointer;padding:12px;border:1.5px solid var(--stroke);background:var(--surface2);border-radius:13px;min-height:65px}
.check-mode-choices label:has(input:checked){border-color:var(--accent);background:var(--accent-soft)}
.check-mode-choices input{flex:none;width:19px;height:19px;accent-color:var(--accent)}
.check-mode-choices span{display:flex;flex-direction:column;gap:3px;min-width:0}
.check-mode-choices strong{font-size:13px;font-weight:730}
.check-mode-choices small{font-size:11px;color:var(--muted);line-height:1.4}
.check{touch-action:none;-webkit-tap-highlight-color:transparent;overflow:visible;transform-origin:center;}
.chat-status{touch-action:none;-webkit-tap-highlight-color:transparent}
.check-mark path{stroke-dasharray:32;stroke-dashoffset:0}
.check.check-celebrate .check-mark path{animation:check-draw .31s cubic-bezier(.2,.8,.25,1) both}
.check.check-celebrate[data-status="partial"]:after{animation:partial-pop .25s cubic-bezier(.14,1.6,.3,1) both}
.check.check-celebrate{animation:check-bounce .36s cubic-bezier(.18,1.35,.3,1) both}
.check.check-celebrate[data-status="done"]{animation:done-fill .32s ease-out both,check-bounce .36s cubic-bezier(.18,1.35,.3,1) both}
@keyframes done-fill{from{background-color:color-mix(in srgb,var(--mark-done,var(--accent)) 18%,var(--surface))}to{background-color:var(--mark-done,var(--accent))}}
@keyframes check-draw{from{stroke-dashoffset:32;opacity:.4}to{stroke-dashoffset:0;opacity:1}}
@keyframes partial-pop{from{transform:scale(0);opacity:0}to{transform:scale(1);opacity:1}}
@keyframes check-bounce{0%{transform:scale(.92)}48%{transform:scale(1.16)}74%{transform:scale(.97)}100%{transform:scale(1)}}
.status-capsule{position:fixed;z-index:2147483000;width:171px;height:49px;background:#202228;color:#fff;border-radius:26px;box-shadow:0 11px 32px #0005,0 1px 0 #fff2 inset;display:flex;align-items:center;justify-content:space-around;gap:5px;padding:5px 9px;opacity:0;transform:translateY(6px) scale(.82);transition:transform .2s cubic-bezier(.18,1.35,.36,1),opacity .15s ease;touch-action:none;user-select:none;-webkit-user-select:none}
.status-capsule.visible{opacity:1;transform:translateY(0) scale(1)}
.capsule-choice{border:1px solid #fff4;border-radius:100%;padding:0;flex:none;width:38px;height:38px;display:grid;place-items:center;transition:transform .14s cubic-bezier(.18,1.6,.34,1),border-color .12s,box-shadow .12s;touch-action:none}
.capsule-choice span{width:28px;height:28px;border-radius:50%;display:grid;place-items:center;font-size:17px;font-weight:850;line-height:1;color:#fff}
.capsule-choice.empty{background:#555d65}.capsule-choice.empty span{background:var(--mark-empty,#8e9699)}
.capsule-choice.partial{background:#695631}.capsule-choice.partial span{background:var(--mark-partial,#d5a33d)}
.capsule-choice.done{background:#315444}.capsule-choice.done span{background:var(--mark-done,#6da883)}
.capsule-choice.selected{border-color:#fff9}.capsule-choice.hovered,.capsule-choice:focus-visible{transform:scale(1.25);border-color:#fff;box-shadow:0 0 0 3px #ffffff1c;outline:none}
@media(prefers-reduced-motion:reduce){.check-mark path,.check[data-status="partial"]:after,.check.check-celebrate{animation:none!important}.status-capsule,.capsule-choice{transition:none!important}}

/* ПРИР v0.5.3 — быстрые жесты удаления и настраиваемая отмена */
.goal-card.swipe-delete.is-swiping:after,.task-row.swipe-delete.is-swiping:after,
.goal-card.swipe-delete.swipe-release:after,.task-row.swipe-delete.swipe-release:after{
 content:"🗑";left:-88px;right:auto;width:84px;background:#b8424b;color:#fff;
 font-size:25px;border:0;box-shadow:none;
}
.goal-card.swipe-delete.swipe-ready:after,.task-row.swipe-delete.swipe-ready:after{background:#a92336}
.delete-setting-choices{border:0;margin:16px 0 0;padding:0;display:grid;gap:9px}
.delete-setting-choices legend{font-size:12px;font-weight:750;color:var(--text);margin-bottom:6px}
.delete-setting-choices label{display:flex;align-items:center;gap:11px;min-height:45px;border:1px solid var(--stroke);border-radius:12px;background:var(--surface2);padding:10px 12px;font-size:13px;cursor:pointer}
.delete-setting-choices label:has(input:checked){border-color:var(--accent);background:var(--accent-soft)}
.delete-setting-choices input,.delete-remember input{width:18px;height:18px;accent-color:var(--accent);flex:none}
.delete-undo-options{margin-top:17px;padding-top:14px;border-top:1px solid var(--stroke);display:grid;gap:10px}
.delete-duration-header{display:flex;align-items:center;justify-content:space-between;font-size:13px}
.delete-duration-header output{font-size:14px;font-weight:750;font-variant-numeric:tabular-nums}
#deleteDuration{width:100%;accent-color:var(--accent);cursor:pointer;margin:7px 0 0}
.delete-duration-labels{display:flex;justify-content:space-between;font-size:11px;color:var(--muted);padding:0 3px;font-variant-numeric:tabular-nums}
.delete-preview{margin-top:8px;padding:13px;background:var(--surface2);border-radius:12px;display:grid;gap:9px;font-size:12px}
.delete-preview-line{display:flex;align-items:center;gap:12px}
.delete-preview-line span:first-child{flex:1}.delete-preview-line strong{color:var(--accent)}
.delete-preview-bar{width:100%;height:4px;overflow:hidden;background:var(--stroke);border-radius:10px}
.delete-preview-bar>div{height:100%;width:100%;background:var(--accent);border-radius:10px}
.delete-confirm-name{font-size:16px;font-weight:750;overflow-wrap:anywhere;margin-bottom:7px}
.delete-remember{display:flex;align-items:flex-start;gap:11px;cursor:pointer;margin-top:20px;padding:12px;background:var(--surface2);border-radius:12px;font-size:13px;font-weight:700}
.delete-remember small{display:block;margin-top:4px;font-size:11px;color:var(--muted);font-weight:400}
.btn.delete-apply{background:#b8424b;border-color:#b8424b;color:#fff}
.undo-notice{position:fixed;z-index:150;left:50%;bottom:calc(93px + env(safe-area-inset-bottom));width:min(430px,calc(100vw - 28px));border-radius:14px;background:var(--text);color:var(--surface);box-shadow:0 15px 40px #0004;opacity:0;transform:translate3d(-50%,18px,0);transition:opacity .18s ease,transform .18s cubic-bezier(.2,.8,.2,1);touch-action:pan-y;user-select:none;-webkit-user-select:none;overflow:hidden}
.undo-notice.visible{opacity:1;transform:translate3d(-50%,0,0)}
.undo-notice.dragging{transition:none}
.undo-content{min-height:54px;padding:11px 13px;display:flex;align-items:center;gap:10px}
.undo-content strong{font-size:12px;flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.undo-trash{font-size:17px;opacity:.8}.undo-seconds{font-size:12px;font-variant-numeric:tabular-nums;opacity:.8;white-space:nowrap}
.undo-button{color:#d2f1dc;background:transparent;border:0;padding:8px 4px;font-size:12px;font-weight:800;cursor:pointer;white-space:nowrap}
.undo-bar-track{height:4px;background:#ffffff22;width:100%}.undo-bar-fill{width:100%;height:100%;background:#b9dec9;transition:width .05s linear}
@media(min-width:651px){.undo-notice{bottom:34px}}
@media(prefers-reduced-motion:reduce){.undo-notice,.undo-bar-fill{transition:none!important}}

/* ПРИР v0.5.4 — выпуклый переключатель даты; обе ориентации используют одни и те же деления. */
.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.date-panel{overflow:visible;min-height:119px;padding:9px 11px;gap:10px}
.date-wheel{flex:1;min-width:0;display:flex;flex-direction:column;align-items:center;gap:0}
.wheel-housing{position:relative;width:min(100%,330px);height:84px;border-radius:22px;overflow:hidden;isolation:isolate;perspective:420px;touch-action:none;user-select:none;-webkit-user-select:none;cursor:grab;background:linear-gradient(180deg,color-mix(in srgb,var(--surface2) 91%,var(--accent) 9%) 0%,var(--surface) 43%,var(--surface) 58%,color-mix(in srgb,var(--surface2) 85%,var(--accent) 15%) 100%);box-shadow:inset 0 4px 9px #00000010,inset 0 -5px 11px #00000011,0 2px 7px #00000008;border:1px solid color-mix(in srgb,var(--stroke) 80%,var(--accent) 20%)}
.wheel-housing:active{cursor:grabbing}
.wheel-housing:before,.wheel-housing:after{content:"";position:absolute;left:8%;right:8%;height:1px;background:color-mix(in srgb,var(--accent) 16%,transparent);z-index:4;pointer-events:none}
.wheel-housing:before{top:21px}.wheel-housing:after{bottom:21px}
.wheel-cylinder{position:absolute;inset:0;transform-style:preserve-3d;pointer-events:none;z-index:2}
.wheel-face{position:absolute;top:50%;left:50%;width:100%;min-height:48px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;backface-visibility:hidden;white-space:nowrap;will-change:transform,opacity;color:var(--text);text-align:center;line-height:1.3}
.wheel-face strong{font-size:clamp(12px,3.8vw,17px);font-weight:750;letter-spacing:-.025em}
.wheel-face small{font-size:10px;color:var(--muted);font-weight:520}
.wheel-face:not(.is-center) strong{font-size:12px;font-weight:570}
.wheel-face:not(.is-center) small{font-size:9px}
.wheel-center-tick{position:absolute;left:2px;right:2px;top:50%;height:30px;transform:translateY(-50%);pointer-events:none;z-index:3;border-left:3px solid color-mix(in srgb,var(--accent) 55%,transparent);border-right:3px solid color-mix(in srgb,var(--accent) 55%,transparent);border-radius:2px}
.wheel-housing:focus-visible{outline:3px solid var(--accent);outline-offset:3px}
.date-open-hint{font-size:10px;line-height:1.2;color:var(--muted);background:none;border:0;padding:5px 12px 0;touch-action:manipulation}
.date-arrow{flex:none;height:62px;width:42px;font-size:27px}
.date-wheel[data-orientation="horizontal"] .wheel-housing{perspective:580px;background:linear-gradient(90deg,var(--surface2) 0%,var(--surface) 35%,var(--surface) 65%,var(--surface2) 100%)}
.date-wheel[data-orientation="horizontal"] .wheel-housing:before,.date-wheel[data-orientation="horizontal"] .wheel-housing:after{top:12%;bottom:12%;width:1px;height:auto;left:auto;right:auto}
.date-wheel[data-orientation="horizontal"] .wheel-housing:before{left:20%}
.date-wheel[data-orientation="horizontal"] .wheel-housing:after{right:20%}
.date-setting-choices{border:0;margin:13px 0 0;padding:0;display:grid;gap:9px}
.date-setting-choices legend{font-size:12px;font-weight:750;margin-bottom:8px}
.date-setting-choices label{display:flex;gap:11px;align-items:center;border-radius:12px;padding:11px;border:1px solid var(--stroke);background:var(--surface2);cursor:pointer}
.date-setting-choices label:has(input:checked){background:var(--accent-soft);border-color:var(--accent)}
.date-setting-choices input,.wheel-shake-setting input{width:18px;height:18px;flex:none;accent-color:var(--accent)}
.date-setting-choices strong,.wheel-shake-setting strong{display:block;font-size:13px}
.date-setting-choices small,.wheel-shake-setting small{display:block;color:var(--muted);font-size:11px;margin-top:3px}
.wheel-shake-setting{display:flex;justify-content:space-between;gap:12px;align-items:center;padding:15px 0 6px;cursor:pointer}
@media(max-width:650px){.date-panel{padding:8px;gap:7px;min-height:115px}.date-arrow{width:38px;height:58px}.wheel-housing{height:84px}.wheel-face strong{font-size:15px}.date-wheel[data-orientation="horizontal"] .wheel-face strong{font-size:13px}}
@media(prefers-reduced-motion:reduce){.wheel-face{will-change:auto}}

.wheel-housing{clip-path:inset(0 round 22px);contain:paint}
.wheel-face.is-center strong{font-size:clamp(12px,3.6vw,16px)}

.wheel-cylinder{transform-style:flat;overflow:hidden;clip-path:inset(0 round 22px)}
/* v0.5.9: центр — часть цельного цилиндра, не самостоятельная карточка.
   Одинаковая геометрия всех делений исключает видимый «шов» при settle/idle. */
.wheel-face.is-center{z-index:auto;width:100%;border-radius:0;background:transparent;border:0;box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none}
.wheel-face.is-center::before,.wheel-face.is-center::after{content:none}

.wheel-shake-preview{margin-top:8px;min-height:38px;font-size:12px}

/* v0.5.6 — быстрое вращение, кинематографическое размытие чисел и трещотка. */
.wheel-housing.is-shake-spinning .wheel-cylinder{will-change:filter;}
.wheel-housing.is-shake-spinning .wheel-face.is-center{background:transparent}
.wheel-housing.is-shake-spinning .wheel-cylinder:after{content:"";position:absolute;inset:9px 18px;pointer-events:none;opacity:var(--spin-opacity,.3);background:repeating-linear-gradient(180deg,transparent 0px,transparent 5px,color-mix(in srgb,var(--text) 8%,transparent) 7px,transparent 12px);mix-blend-mode:multiply;}
.date-wheel[data-orientation="horizontal"] .wheel-housing.is-shake-spinning .wheel-cylinder:after{background:repeating-linear-gradient(90deg,transparent 0px,transparent 8px,color-mix(in srgb,var(--text) 9%,transparent) 10px,transparent 16px)}
.wheel-haptic-test{margin:8px 0 0 8px;min-height:38px;font-size:12px}

/* ПРИР v0.5.13: создание непосредственно на Карте целей */
.prir-welcome{min-height:265px;display:flex;align-items:center;justify-content:center;padding:24px}
.start-planning{border:0;border-radius:16px;padding:17px 21px;background:var(--accent);color:var(--accent-ink);font-size:14px;font-weight:750;box-shadow:0 8px 24px color-mix(in srgb,var(--accent) 18%,transparent)}
.board-bottom{display:flex;align-items:center;justify-content:center;padding:9px 0}
.board-bottom .add-segment{width:100%;height:46px;border:1px dashed var(--stroke);border-radius:15px;background:transparent;color:var(--muted);font-size:23px;font-weight:650;line-height:1}
.segment-priority{font-size:12px;font-weight:750;color:var(--muted);white-space:nowrap}
.segment-draft{border-color:var(--accent);box-shadow:0 4px 25px color-mix(in srgb,var(--accent) 11%,transparent)}
.inline-segment-header{display:flex;gap:9px;align-items:center}
.inline-segment-header .segdot{width:12px;height:12px}
.inline-segment-header input{border:0;border-bottom:1px solid var(--stroke);border-radius:0;min-width:0;padding:9px 3px;background:transparent;color:var(--text);outline:none}
.inline-segment-header input:focus{border-bottom-color:var(--accent)}
#segmentDraftName{flex:1;font-size:15px;font-weight:720}
.inline-priority{display:flex;gap:4px;align-items:center;color:#caa64c;font-weight:800;flex:none}
.inline-priority input{width:39px;text-align:center;font-size:15px}
.seg-color-palette{display:flex;align-items:center;flex-wrap:wrap;gap:10px;padding:16px 2px 12px}
.color-choice{width:26px;height:26px;border-radius:50%;background:var(--swatch);border:2px solid transparent;box-shadow:0 1px 3px #0001;flex:none}
.color-choice.chosen{outline:2px solid var(--text);outline-offset:2px}
#segmentDraftColor{width:29px;height:30px;flex:none;border:1px solid var(--stroke);padding:0;border-radius:50%;background:transparent}
.notebook-line{display:block;height:33px;cursor:text;width:calc(100% - 34px);margin:0 17px;border:0;border-bottom:1px solid color-mix(in srgb,var(--stroke) 84%,var(--muted));background:none;position:relative}
.notebook-line:active{border-color:var(--accent)}
.inline-entry{display:flex;gap:5px;align-items:center;background:var(--surface2);border-radius:13px;padding:7px 9px;margin-top:5px}
.inline-entry input{flex:1;min-width:0;border:0;background:none;color:var(--text);font-size:13px;font-weight:600;outline:none;padding:9px 5px}
.inline-entry button{border:0;border-radius:8px;width:31px;height:32px;background:var(--surface);color:var(--text)}
.inline-entry button[data-task-save],.inline-entry button[data-goal-save]{color:var(--accent)}
.inline-task{margin-left:22px;margin-top:6px;margin-bottom:7px;background:var(--surface)}
.goal-stack{overflow:visible}
.goal-card:has(.goal-actions){z-index:12}
.goal-label-wrap{position:relative}
.goal-actions{position:absolute;top:calc(100% + 4px);left:0;display:flex;align-items:center;gap:4px;z-index:15;background:var(--surface);border:1px solid var(--stroke);border-radius:12px;padding:5px;white-space:nowrap;box-shadow:0 7px 22px #0000001e}
.goal-actions button{background:transparent;border:0;border-radius:8px;font-size:11px;color:var(--text);font-weight:700;padding:7px 8px}
.goal-actions button:active{background:var(--surface2)}
.single-task-sub{display:block;margin-top:3px;color:var(--muted);font-size:10.5px}
/* Point/dash is visually bare, but the touch target remains finger-sized. */
.expand-goal,.expand-goal[aria-expanded="false"],.expand-goal[aria-expanded="true"]{border:0;box-shadow:none;background:transparent;color:var(--muted);width:30px;min-width:30px;height:34px;padding:0;font-weight:850;font-size:24px;line-height:1;flex:none}
.expand-goal[aria-expanded="false"]{font-size:27px;padding-bottom:8px}
.expand-goal:focus-visible{border-radius:9px}
.status-capsule[data-kind="gesture"] .capsule-choice.selected{transform:scale(1.06)}
@media(max-width:380px){.goal-actions button{padding:7px 5px;font-size:10px}.inline-priority input{width:32px}}
.inline-task{margin:6px 0 7px 18px;border-radius:12px;background:var(--surface);padding:5px 6px}
.inline-task .inline-entry{margin:0;padding:4px 6px}
.quick-schedule{padding:5px 8px 7px}
.quick-schedule summary{font-size:11px;color:var(--muted);cursor:pointer;list-style:none;user-select:none}
.quick-schedule summary::before{content:'＋ ';color:var(--accent);font-weight:800}
.quick-schedule[open] summary::before{content:'− '}
.quick-schedule-inputs{display:flex;gap:7px;align-items:end;flex-wrap:wrap;margin-top:10px}
.quick-schedule-inputs label{display:grid;gap:3px;font-size:10px;color:var(--muted);flex:1;min-width:85px}
.quick-schedule-inputs select,.quick-schedule-inputs input{width:100%;font-size:12px;min-width:0;padding:8px 5px;color:var(--text);border-radius:8px;border:1px solid var(--stroke);background:var(--surface)}

.inline-priority-caption{max-width:62px;line-height:1.15;font-size:10px;font-weight:600;color:var(--muted);text-align:right}

/* v0.5.14: явное удаление существующего сегмента в режиме редактирования */
.segment-draft-delete-row{display:flex;justify-content:flex-end;padding-top:12px;margin-top:6px;border-top:1px solid var(--stroke)}
.segment-draft-delete{appearance:none;background:transparent;border:0;border-radius:10px;padding:9px 11px;min-height:42px;font:inherit;font-size:13px;font-weight:650;color:#b45359;cursor:pointer}
.segment-draft-delete:focus-visible{outline:2px solid currentColor;outline-offset:2px}
.segment-draft-delete:active{background:rgba(180,83,89,.10)}
