:root{color-scheme:dark;--bg:#030304;--panel:#121215;--line:#39383e;--text:#f5f4f8;--muted:#b9b6c1;--gradient:linear-gradient(145deg,#b844ff,#8300ef);--safe-top:0px;--safe-bottom:0px;--safe-left:0px;--safe-right:0px;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
.goals svg{width:30px;height:30px;fill:none;stroke:currentColor;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}.weekly-row{flex-direction:row;justify-content:space-between}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);padding:max(env(safe-area-inset-top),var(--safe-top)) max(env(safe-area-inset-right),var(--safe-right)) max(env(safe-area-inset-bottom),var(--safe-bottom)) max(env(safe-area-inset-left),var(--safe-left));min-height:var(--app-height,100dvh)}[hidden]{display:none!important}header,main{max-width:720px;margin:auto;padding:12px}header{text-align:center;padding-top:18px;padding-bottom:8px}header h1{font-size:25px;margin:0 0 4px}header p{font-size:16px;margin:0;color:#ddd}body.telegram header{display:none}h2{font-size:18px;line-height:1.25;margin:23px 0 14px}button,input,select{font:inherit;color:var(--text);border:1px solid var(--line);border-radius:12px;background:linear-gradient(130deg,#202024,#101012);min-height:44px;max-width:100%}button{padding:9px 10px;cursor:pointer}button:disabled{opacity:.38;cursor:default}input,select{padding:10px;font-size:16px;min-width:0;width:100%}input[type=number]{appearance:textfield}input::-webkit-inner-spin-button{appearance:none}button:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible{outline:2px solid #e7a2ff;outline-offset:2px}label{display:flex;flex-direction:column;gap:8px;font-size:14px}summary{cursor:pointer;list-style:none;min-height:44px;padding:12px}summary::-webkit-details-marker{display:none}summary::after{content:'⌄';float:right;color:#ddd}details[open]>summary::after{content:'⌃'}p{line-height:1.45}.wide{width:100%;margin-top:16px}.primary,.segments button.active,#week-tabs button.active{background:var(--gradient);border-color:#bd6cff;font-weight:600;box-shadow:inset 0 1px 1px #ffffff30}.primary{font-size:20px;min-height:54px}.outline{border-color:#d576ff;color:#eca4ff;background:#100b14;font-size:18px}.danger{color:#ff686c}
.steps{display:flex;justify-content:space-between;list-style:none;margin:0;padding:8px 10px 14px;background:linear-gradient(120deg,#17171b,#0a0a0c);border-radius:14px;position:relative}.steps:before{content:'';position:absolute;top:26px;left:15%;right:15%;height:2px;background:#45414d}.steps li{position:relative;text-align:center;display:grid;justify-items:center;gap:8px;font-size:14px;width:33%}.steps b{border:1px solid #5a5662;background:linear-gradient(#53505b,#27252d);border-radius:50%;width:34px;height:34px;display:grid;place-items:center;font-size:20px}.steps .active b{background:var(--gradient);border-color:#c87aff}.steps .active span{font-weight:700}.goals{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.goals button{min-height:116px;padding:10px 3px;font-size:13px;line-height:1.25;position:relative}.goals button>span{display:block;font-size:28px;color:#bbb7c9;margin-bottom:8px}.goals button.active{border:2px solid #d878ff;background:linear-gradient(145deg,#33203c,#150c1c)}.goals button.active:after{content:'✓';position:absolute;right:4px;top:5px;border-radius:50%;background:#ae30f5;color:white;width:21px;height:21px;font-size:16px}.segments{display:flex;gap:0;border:1px solid var(--line);border-radius:13px;background:linear-gradient(#1c1c20,#101012);padding:0;min-width:0}.segments button{border:0;background:none;flex:1;min-width:0;font-size:14px;padding:10px 6px}.levels button{font-size:13px;letter-spacing:-.25px}.sources{border:1px solid var(--line);border-radius:13px;background:linear-gradient(120deg,#1b1820,#101012);padding:0 9px}.sources label{flex-direction:row;align-items:center;gap:12px;min-height:48px;border-bottom:1px solid #343138;font-size:15px}.sources label:last-child{border:0}.sources label:has(input:checked){background:#9e42d422;box-shadow:0 0 0 1px #b658ed;border-radius:11px;margin:0 -9px;padding:0 9px}.sources input{width:23px;height:23px;min-height:23px;accent-color:#bf5bff;margin:0}.sources span{font-size:27px;width:24px}.parameter-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px 12px;align-items:start}.parameter-grid label{font-size:13px}.panel{border:1px solid #29272f;background:linear-gradient(#18171b,#101013);border-radius:13px;padding:8px;font-size:13px}.counter{display:flex;align-items:center;justify-content:space-between;gap:5px;background:#222126;border:1px solid var(--line);border-radius:12px;margin-top:7px}.counter button{border:0;border-radius:50%;width:34px;min-height:34px;padding:0;font-size:26px;margin:3px;background:linear-gradient(#494750,#26252d)}.counter output{font-size:21px;font-weight:600}.day-picker summary{padding:0;font-size:13px}.day-picker summary span{display:block;margin-top:8px;border:1px solid var(--line);border-radius:10px;padding:10px 5px;font-size:15px}.day-picker summary:after{display:none}#wizard-days{display:flex;flex-wrap:wrap;gap:5px;padding-top:8px}#wizard-days button{font-size:12px;min-height:34px;padding:5px 7px}#wizard-days button.active{background:var(--gradient)}#wizard-source select{margin-bottom:6px}#source-help{color:var(--muted);font-size:14px}.saved-panel,.additional{font-size:13px;color:var(--muted);margin-top:12px}.saved-panel select{margin-bottom:8px}
#status{font-size:12px;color:var(--muted);min-height:0}#status:empty{display:none}#status.error{color:#ff9ba9;padding:10px;background:#32121b;border-radius:10px;margin-bottom:10px}#status:not(.error){position:fixed;bottom:max(7px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);background:#22212bed;padding:5px 12px;border-radius:20px;z-index:20;max-width:90%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;pointer-events:none}.editor-tabs{gap:8px;border:0;background:none;margin-bottom:16px}.editor-tabs button{border:1px solid var(--line);background:linear-gradient(#242328,#121215);padding:10px 7px;font-size:14px;white-space:nowrap}.program-heading{background:linear-gradient(110deg,#161619,#080809);padding:10px 8px 12px;border-radius:12px}.name-row{flex-direction:row;align-items:center;gap:7px}.name-row input{border:0;background:none;font-size:20px;font-weight:700;padding:0;min-height:30px;border-radius:0}.name-row span{font-size:23px}.program-heading p{color:#c9c6d0;font-size:13px;margin:5px 0 0}.week-bar{display:flex;gap:7px;align-items:center;margin:12px 0}.week-bar>button{flex:0 0 32px;font-size:29px;min-height:40px;padding:0;border-radius:10px}#week-tabs{display:flex;gap:7px;overflow:auto;min-width:0;scrollbar-width:none;flex:1}#week-tabs button{font-size:13px;white-space:nowrap;min-height:40px;padding:8px 10px;flex-shrink:0}.day-tabs{display:flex;gap:8px;overflow:auto;margin:0 0 15px;scrollbar-width:thin}.day-tabs button{flex:1 0 95px;min-width:0;min-height:58px;font-weight:600;padding:7px;line-height:1.2}.day-tabs small{display:block;font-size:12px;font-weight:400;white-space:normal;overflow-wrap:anywhere;margin-top:4px}.day-tabs .active{border:1px solid #dc91ff;background:linear-gradient(130deg,#9331d3,#41166c);box-shadow:inset 0 0 0 1px #be5dff}
.table-wrap{overflow:auto;border:1px solid #302d36;border-radius:13px;isolation:isolate;max-height:55dvh;overscroll-behavior-x:contain}table{border-spacing:0;border-collapse:separate;width:max-content;table-layout:fixed;font-size:14px}th,td{background:#0e0e11;border-bottom:1px solid #343039;padding:5px;vertical-align:middle}th{position:sticky;top:0;background:#222126;color:#ddd9e5;font-size:11px;font-weight:500;text-align:center;height:47px;z-index:3;white-space:normal;width:80px;max-width:80px;border-right:1px solid #302c34}td input,td select{width:69px;min-height:39px;padding:6px;font-size:16px;border-radius:9px}td:nth-child(1),th:nth-child(1){position:sticky;left:0;width:86px;min-width:86px;max-width:86px;z-index:2}td:nth-child(2),th:nth-child(2){position:sticky;left:86px;width:126px;min-width:126px;max-width:126px;z-index:2;border-right:1px solid #76518a}th:nth-child(1),th:nth-child(2){z-index:4}td:nth-child(1) input,td:nth-child(1) select{width:75px;font-size:14px;padding:5px}td:nth-child(2) input,td:nth-child(2) select{width:114px;font-size:14px;padding:5px}td details{margin:0;font-size:12px;overflow-wrap:anywhere}td details summary{font-size:11px;min-height:26px;padding:4px;color:#d3b7df}td details button{min-height:34px;padding:5px;font-size:12px;margin:3px 0}td details select{width:100%;min-height:36px;font-size:13px}td details p{max-width:105px}td .row-options{display:flex;flex-wrap:wrap;gap:3px}td .row-options button{flex:1}.weekly-panel{margin:16px 0;border:1px solid #45404e;border-radius:12px;background:linear-gradient(#1b191f,#0d0c10);font-size:14px}.weekly-panel summary{padding:13px}.weekly-row{display:flex;gap:10px;align-items:center;padding:8px 12px;border-top:1px solid #332c3a}.weekly-row input{max-width:95px}.bottom-actions{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:20px 0 8px}.bottom-actions button{font-size:13px;min-height:45px;padding:7px}.save-button{margin-top:18px;margin-bottom:24px;font-size:19px}.settings-panel{border:1px solid var(--line);border-radius:12px;padding:10px;margin-bottom:12px}.settings-panel h2{margin-top:3px}.settings-panel label{margin-bottom:10px}.toolbar{display:flex;flex-wrap:wrap;gap:6px;margin:10px 0}.toolbar select{flex:1;width:0}.toolbar button{font-size:13px}#program-tools{padding:8px}#program-tools button{margin:5px}#template-status{color:#d3b7df}#wizard-next{margin-top:32px;margin-bottom:14px}#weekly-percentages p{padding:8px 12px;font-size:13px}@media(min-width:650px){main{padding:20px}.goals button{font-size:16px}.levels button{font-size:16px}header h1{font-size:28px}}@media(max-width:375px){header,main{padding-left:10px;padding-right:10px}.levels button{font-size:12px}.sources label{font-size:14px;gap:9px}.goals{gap:6px}.parameter-grid{gap:14px 9px}.editor-tabs{gap:6px}}