:root{--bg:#f2f0e9;--surface:#e9e6dc;--surface-2:#dfdcd0;--text:#222621;--muted:#73766d;--line:#d5d1c4;--accent:#446b5b;--accent-soft:#dce8df;--white:#fff;--shadow:0 18px 50px rgba(43,49,42,.08)}
*{box-sizing:border-box}
html{color-scheme:light}
body{margin:0;background:var(--bg);color:var(--text);font-family:"DM Sans",sans-serif;min-height:100vh;transition:background .3s,color .3s}
button,input{font:inherit}
button{color:inherit}
button:focus-visible,input:focus-visible{outline:3px solid color-mix(in srgb,var(--accent) 35%,transparent);outline-offset:3px}
.app-shell{width:min(1160px,calc(100% - 48px));margin:auto;min-height:100vh;display:flex;flex-direction:column}
header{height:92px;display:flex;align-items:center;justify-content:space-between}
.brand{display:flex;align-items:center;gap:11px;color:inherit;text-decoration:none;font:600 19px Manrope}
.brand-mark{width:25px;height:25px;border:1.5px solid var(--text);border-radius:50%;display:grid;place-items:center}.brand-mark span{width:7px;height:7px;border-radius:50%;background:var(--accent)}
.header-actions{display:flex;gap:8px}.icon-button,.secondary-control{border:1px solid var(--line);background:transparent;display:grid;place-items:center;cursor:pointer;transition:.2s}
.icon-button{width:42px;height:42px;border-radius:50%}.icon-button svg,.secondary-control svg{width:19px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
main{display:grid;grid-template-columns:minmax(430px,1.15fr) minmax(420px,.85fr);gap:80px;align-items:center;flex:1;padding:30px 0 54px}
.timer-section{text-align:center;display:flex;flex-direction:column;align-items:center}
.session-label{display:flex;align-items:center;gap:9px;color:var(--accent);text-transform:uppercase;font-size:12px;font-weight:600;letter-spacing:1.4px}.status-dot{width:7px;height:7px;border-radius:50%;background:currentColor;box-shadow:0 0 0 5px var(--accent-soft)}
.timer-wrap{position:relative;width:min(390px,80vw);aspect-ratio:1;margin:24px 0 20px;display:grid;place-items:center}
.progress-ring{position:absolute;inset:0;width:100%;height:100%;transform:rotate(-90deg);overflow:visible}.ring-track,.ring-progress{fill:none;stroke-width:2}.ring-track{stroke:var(--line)}.ring-progress{stroke:var(--accent);stroke-width:5;stroke-linecap:round;stroke-dasharray:992.74;stroke-dashoffset:0;transition:stroke-dashoffset .5s linear}
.timer-content{position:relative}.time{font:500 clamp(72px,8vw,108px)/1 Manrope;font-variant-numeric:tabular-nums;letter-spacing:0}.timer-note{color:var(--muted);font-size:14px;margin-top:13px}
.timer-controls{display:flex;align-items:center;gap:13px}.secondary-control{width:48px;height:48px;border-radius:50%}.secondary-control:hover,.icon-button:hover{background:var(--surface)}
.primary-control{height:52px;min-width:164px;border:0;border-radius:26px;background:var(--text);color:var(--bg);display:flex;align-items:center;justify-content:center;gap:10px;padding:0 25px;font-weight:600;cursor:pointer;transition:transform .2s,opacity .2s}.primary-control:hover{transform:translateY(-2px)}.primary-control svg{width:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.primary-control .play-icon{fill:currentColor;stroke:none}.pause-icon{display:none}.running .play-icon{display:none}.running .pause-icon{display:block}
.cycle-area{margin-top:27px;color:var(--muted);font-size:12px}.cycle-area strong{color:var(--text);font-weight:500}.cycle-dots{display:flex;justify-content:center;gap:8px;margin-top:11px}.cycle-dot{width:23px;height:3px;border-radius:2px;background:var(--line)}.cycle-dot.done,.cycle-dot.current{background:var(--accent)}.cycle-dot.current{animation:pulse 2s infinite}
.sound-section{border-left:1px solid var(--line);padding-left:64px}.section-heading{display:flex;justify-content:space-between;align-items:end;margin-bottom:24px}.eyebrow{text-transform:uppercase;letter-spacing:1.3px;font-size:10px;font-weight:600;color:var(--accent);margin:0 0 7px}.section-heading h2,.dialog-heading h2{font:500 25px/1.2 Manrope;margin:0}
.volume-control{display:flex;align-items:center;gap:8px;color:var(--muted);font-size:11px}.volume-control svg{width:17px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.volume-control input{width:72px;accent-color:var(--accent)}
.sound-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}.sound-card{border:1px solid var(--line);background:transparent;border-radius:7px;min-height:82px;padding:12px;display:grid;grid-template-columns:48px 1fr;grid-template-rows:1fr 1fr;text-align:left;column-gap:13px;cursor:pointer;transition:.2s}.sound-card:hover{background:var(--surface)}.sound-card.active{border-color:var(--accent);background:var(--accent-soft)}.sound-card:last-child{grid-column:1/-1}
.sound-art{grid-row:1/3;width:48px;height:48px;border-radius:50%;display:block;position:relative;overflow:hidden;background:#899eaa}.sound-art i,.sound-art:before,.sound-art:after{content:"";position:absolute;display:block}
.rain{background:#788f98}.rain:before{width:1px;height:25px;background:#d9e4e3;left:15px;top:5px;transform:rotate(18deg);box-shadow:10px 6px #d9e4e3,20px -2px #d9e4e3}.rain:after{width:38px;height:18px;border-radius:50%;background:#647d86;bottom:-8px;left:5px}
.forest{background:#66806c}.forest:before{border-left:12px solid transparent;border-right:12px solid transparent;border-bottom:25px solid #d5dfcf;left:12px;top:5px}.forest:after{width:3px;height:14px;background:#374e3e;left:23px;bottom:5px}
.waves{background:#8faeb4}.waves:before,.waves:after{width:42px;height:18px;border:2px solid #e6efed;border-color:#e6efed transparent transparent transparent;border-radius:50%;left:3px;top:20px}.waves:after{left:18px;top:29px}
.cafe{background:#9b7a65}.cafe:before{width:22px;height:18px;border:2px solid #f1e5d5;border-radius:2px 2px 8px 8px;left:10px;top:18px}.cafe:after{width:8px;height:10px;border:2px solid #f1e5d5;border-left:0;border-radius:0 6px 6px 0;left:33px;top:22px}.cafe i{width:2px;height:8px;background:#f1e5d5;left:20px;top:6px;box-shadow:7px 3px #f1e5d5}
.white{background:#a5a3a0}.white:before{inset:0;background-image:radial-gradient(#eee 1px,transparent 1px);background-size:6px 6px;opacity:.7}
.sound-name{font-size:14px;font-weight:600;align-self:end}.sound-state{font-size:11px;color:var(--muted);align-self:start;margin-top:3px}.active .sound-state{color:var(--accent)}
.sound-toggle{margin-top:12px;width:100%;height:44px;border:0;border-radius:6px;background:var(--text);color:var(--bg);cursor:pointer;display:flex;align-items:center;justify-content:center;gap:10px;font-size:12px;font-weight:600}.equalizer{height:14px;display:flex;gap:2px;align-items:center}.equalizer i{display:block;width:2px;height:6px;background:currentColor}.audio-playing .equalizer i{animation:eq .8s ease-in-out infinite alternate}.audio-playing .equalizer i:nth-child(2){animation-delay:.2s}.audio-playing .equalizer i:nth-child(3){animation-delay:.4s}
footer{height:54px;border-top:1px solid var(--line);display:flex;justify-content:space-between;align-items:center;color:var(--muted);font-size:11px}
dialog{border:0;padding:0;background:transparent;color:var(--text);width:min(560px,calc(100% - 28px))}dialog::backdrop{background:rgba(23,28,24,.45);backdrop-filter:blur(5px)}.settings-panel{background:var(--bg);border-radius:8px;padding:28px;box-shadow:var(--shadow)}.dialog-heading{display:flex;justify-content:space-between;align-items:start;margin-bottom:28px}.close-button{margin-top:-5px}.settings-group{padding:19px 0;border-top:1px solid var(--line)}.settings-group h3{font-size:12px;text-transform:uppercase;letter-spacing:1px;margin:0 0 15px;color:var(--muted)}.duration-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.duration-grid label{position:relative;font-size:11px;color:var(--muted)}.duration-grid input{width:100%;margin-top:6px;height:44px;background:var(--surface);border:1px solid transparent;border-radius:5px;padding:0 35px 0 12px;color:var(--text)}.duration-grid label span{position:absolute;right:10px;bottom:14px;font-size:10px}.setting-row{display:flex;align-items:center;justify-content:space-between;padding:9px 0}.setting-row span{display:flex;flex-direction:column}.setting-row strong{font-size:13px}.setting-row small{font-size:11px;color:var(--muted);margin-top:3px}.setting-row input[type=number]{width:60px;height:36px;background:var(--surface);color:var(--text);border:0;border-radius:4px;padding:0 8px}.switch{appearance:none;width:38px;height:22px;border-radius:12px;background:var(--line);position:relative;cursor:pointer;transition:.2s}.switch:after{content:"";position:absolute;width:16px;height:16px;background:var(--white);border-radius:50%;top:3px;left:3px;transition:.2s}.switch:checked{background:var(--accent)}.switch:checked:after{transform:translateX(16px)}.save-button{width:100%;height:46px;border:0;border-radius:5px;background:var(--text);color:var(--bg);font-weight:600;cursor:pointer;margin-top:8px}.toast{position:fixed;bottom:24px;left:50%;transform:translate(-50%,20px);background:var(--text);color:var(--bg);padding:10px 16px;border-radius:5px;font-size:12px;opacity:0;pointer-events:none;transition:.25s}.toast.show{opacity:1;transform:translate(-50%,0)}
body.dark{--bg:#1e2421;--surface:#282f2b;--surface-2:#333b36;--text:#ecede7;--muted:#9ba39d;--line:#39423d;--accent:#94c3aa;--accent-soft:#2d4037;--white:#f5f5f0;--shadow:0 18px 50px rgba(0,0,0,.3);color-scheme:dark}
@keyframes eq{to{height:14px}}@keyframes pulse{50%{opacity:.35}}
@media(max-width:900px){.app-shell{width:min(680px,calc(100% - 32px))}main{grid-template-columns:1fr;gap:50px;padding-top:20px}.sound-section{border-left:0;border-top:1px solid var(--line);padding:42px 0}.timer-wrap{width:min(370px,82vw)}}
@media(max-width:520px){.app-shell{width:calc(100% - 28px)}header{height:72px}.brand{font-size:17px}.icon-button{width:38px;height:38px}main{padding-top:12px;gap:36px}.timer-wrap{margin:18px 0 15px}.time{font-size:68px}.section-heading{align-items:start}.section-heading h2{font-size:21px;max-width:210px}.volume-control{margin-top:21px}.sound-grid{grid-template-columns:1fr}.sound-card:last-child{grid-column:auto}.sound-card{min-height:74px}.duration-grid{grid-template-columns:1fr}.settings-panel{padding:22px}.timer-controls{gap:9px}.primary-control{min-width:150px}.secondary-control{width:44px;height:44px}footer{height:50px}.cycle-area{margin-top:22px}}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
