@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@500;600&family=Nunito:wght@400;500;600;700&display=swap');
:root{color-scheme:dark;--bg:#0b111e;--surface:#101928;--ink:#e1e4eb;--muted:#9aabc0;--sand:#d7c4a6;--line:#263348;--blue:#91a8c3;font-family:ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-synthesis:none}
*{box-sizing:border-box}body{margin:0;background:radial-gradient(ellipse at 25% 38%,#17263a 0,transparent 54%),var(--bg);color:var(--ink);min-height:100vh;line-height:1.5}button,input,select{font:inherit}button{cursor:pointer}button:disabled{cursor:wait;opacity:.55}button,input,select{touch-action:manipulation}button:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible{outline:2px solid var(--sand);outline-offset:4px}button{transition:background .2s,color .2s,border-color .2s}button:hover{filter:brightness(1.1)}[hidden]{display:none!important}.topbar{max-width:1200px;padding:32px 40px 0;margin:auto;display:flex;align-items:center;justify-content:space-between}.brand{display:flex;gap:12px;align-items:center;text-decoration:none;color:var(--ink);font-family:Georgia,serif;font-size:24px;letter-spacing:-.6px}.brand img{height:34px;width:34px}.icon-button{background:#141e2d;border:1px solid var(--line);color:var(--muted);width:42px;height:42px;border-radius:50%;font-size:22px;display:grid;place-items:center}.sky{position:absolute;inset:0 0 auto;height:580px;z-index:-1;overflow:hidden;pointer-events:none}.sky span{position:absolute;width:2px;height:2px;background:#9dabc1;opacity:.35;border-radius:50%}.sky span:nth-child(1){top:110px;left:12%}.sky span:nth-child(2){top:90px;left:76%}.sky span:nth-child(3){top:280px;left:90%}.sky span:nth-child(4){top:340px;left:5%}.sky span:nth-child(5){top:180px;left:47%}main{max-width:1200px;margin:auto;padding:50px 40px 0}.welcome{margin-bottom:37px}.eyebrow{font-size:12px;font-weight:600;letter-spacing:2.4px;color:var(--sand);margin:0 0 12px}.welcome h1{font-size:clamp(30px,4vw,45px);font-family:Georgia,serif;font-weight:400;line-height:1.16;letter-spacing:-1.5px;margin:0 0 12px}.intro-copy{color:var(--muted);font-size:16px;margin:0}.layout{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:26px;align-items:start}.breathing-panel{min-height:480px;display:flex;flex-direction:column;position:relative;background:linear-gradient(140deg,#14203399,#111a2ab3);border:1px solid #2a3a5066;border-radius:25px;padding:30px;overflow:hidden}.session-top{display:flex;justify-content:space-between;align-items:center;color:var(--muted);font-size:14px;gap:16px}.session-top #remaining{font-size:18px;color:#b2c2d4;font-variant-numeric:tabular-nums;letter-spacing:1px}.orb-area{height:270px;display:grid;place-items:center;position:relative;flex:1;min-height:230px}.orb{width:240px;height:240px;border-radius:50%;background:radial-gradient(circle at 34% 25%,#abc4d346,#728ead24 42%,#394d7040 70%,#24334c33);border:1px solid #879eb94a;box-shadow:0 0 80px #728aab15,inset 0 0 45px #96acc224;transform:scale(.83);will-change:transform;position:absolute}.orb-light{position:absolute;inset:12px;border-radius:50%;border:1px solid #a5bdca12;background:radial-gradient(circle at 40% 40%,#ced5e41a,transparent 65%)}.orbit{position:absolute;width:310px;height:310px;border-radius:50%;border:1px solid #768cac14}.orbit-two{width:380px;height:380px;border-color:#768cac0b}.orb-copy{text-align:center;position:relative;z-index:1;pointer-events:none;max-width:270px}.orb-copy #phase-kicker{font-size:11px;letter-spacing:2px;color:#b1c2d5}.orb-copy h2{font-family:Georgia,serif;font-size:30px;line-height:1.15;font-weight:400;letter-spacing:-.5px;margin:14px 0 10px}.orb-copy p{font-size:14px;color:#a4b5ca;max-width:195px;margin:auto;min-height:36px}.session-bottom{text-align:center}#session-hint{font-size:13px;color:var(--muted);margin:0 0 20px}.progress-track{background:#27374d66;height:2px;border-radius:3px;overflow:hidden;max-width:280px;margin:0 auto 26px}#progress{height:100%;width:0;background:#b6c9d4;transition:width .3s linear}.primary-button{background:var(--sand);color:#202333;border:1px solid transparent;border-radius:12px;min-height:50px;padding:13px 20px;display:inline-flex;align-items:center;justify-content:center;gap:32px;font-size:15px;font-weight:600}.session-actions{display:flex;gap:12px;justify-content:center;flex-wrap:wrap}.session-actions .primary-button{min-width:245px}.secondary-button{background:#1b2738;color:var(--ink);border:1px solid #35435a;border-radius:10px;min-height:44px;padding:10px 18px;font-size:14px}.text-button{border:0;background:none;color:var(--muted);font-size:14px;padding:8px 4px;min-height:36px;text-decoration:none}.running-options{display:flex;flex-direction:column;align-items:center;margin-top:10px}.running-options span{font-size:12px;color:#76889f}.settings-panel{background:#111a2880;border:1px solid #29344980;border-radius:25px;overflow:hidden}.setting-block{padding:24px 25px;border-bottom:1px solid #26334880}.setting-block:last-child{border:0}.section-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px}.section-heading h2{font-weight:500;font-size:15px;margin:0;color:#d4dce6}.section-heading>span{color:#63758e;font-size:12px}.duration-options{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.duration-options button{border:1px solid #2b394f;background:#152032;color:#a3b5cb;border-radius:10px;min-height:45px;font-size:19px}.duration-options small{font-size:12px;margin-left:2px}.duration-options button.selected{background:#d7c4a612;color:var(--sand);border-color:#d7c4a67a}.custom-duration{display:flex;align-items:center;justify-content:space-between;font-size:13px;color:#8497b0;margin-top:14px}.custom-duration input{width:45px;background:none;color:#bdc9d8;border:0;border-bottom:1px solid #39475b;border-radius:0;text-align:center;-moz-appearance:textfield}.custom-duration input::-webkit-inner-spin-button{appearance:none}.toggle-row{display:flex;align-items:center;gap:12px;cursor:pointer;position:relative;margin-bottom:15px}.toggle-row>span:first-child{flex:1}.toggle-row strong{font-size:14px;font-weight:400;display:block}.toggle-row small,.select-row small{font-size:12px;color:#8396af;display:block;margin-top:3px}.toggle-row input{position:absolute;opacity:0;width:36px;height:24px;right:0}.switch{width:34px;height:20px;border-radius:20px;background:#354258;border:1px solid #47546b;position:relative;flex-shrink:0;pointer-events:none}.switch:after{content:"";width:12px;height:12px;background:#a6b4c8;border-radius:50%;position:absolute;left:3px;top:3px;transition:transform .2s}.toggle-row input:checked+.switch{background:#9db2c3;border-color:#9db2c3}.toggle-row input:checked+.switch:after{transform:translateX(13px);background:#172338}.toggle-row input:focus-visible+.switch{outline:2px solid var(--sand);outline-offset:4px}.range-row{display:grid;grid-template-columns:1fr auto;gap:10px;font-size:12px;color:#889cb6}.range-row input{grid-column:1/-1;width:100%;margin:3px 0;accent-color:#a6b9c9;height:16px;cursor:pointer}.range-row output{color:#bac8d8;font-variant-numeric:tabular-nums}.setup-link{display:flex;justify-content:space-between;align-items:center;width:100%;padding:10px 0 8px;border:0;background:transparent;color:var(--sand);font-size:13px}.setup-link.configured{color:#95adbc}.select-row{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-top:9px;font-size:13px;color:#b4c1d3}.select-row select{font-size:12px;background:#1a2638;color:#bbc8d8;border:1px solid #2b3a50;border-radius:7px;padding:7px;max-width:140px}.sound-options{display:flex;flex-wrap:wrap;gap:7px;margin:0 0 15px}.sound-options button{min-height:38px;border:1px solid #2b394f;border-radius:9px;color:#9aadc5;background:#152032;font-size:12px;padding:7px 11px;display:flex;align-items:center;gap:7px}.sound-options button.selected{background:#8dabc219;border-color:#7791ac;color:#ccd8e5}.sound-icon{font-size:17px;color:#9bb3cb;line-height:1}.preview-sound{font-size:12px;min-height:28px;margin-top:3px;padding:5px 0}.last-block{padding-top:20px;padding-bottom:8px}.gentle-note{text-align:center;color:#8092aa;font-size:13px;margin:26px 0 0}.status-message{font-size:14px;text-align:center;color:var(--sand);min-height:20px;max-width:700px;margin:12px auto 0}footer{max-width:1200px;margin:12px auto 0;padding:10px 40px 24px;color:#62768f;display:flex;justify-content:space-between;font-size:12px;align-items:center}.dark-screen{position:fixed;inset:0;background:#000;z-index:100;cursor:pointer;display:grid;place-items:end center;padding-bottom:30px}.dark-screen span{font-size:13px;color:#262626}.is-running .welcome{opacity:.5}.is-running .breathing-panel{background:linear-gradient(140deg,#111d3099,#0d1523cc)}.is-running .settings-panel{opacity:.85}.is-running .duration-block{opacity:.5}.complete .orb{opacity:.3}.complete #phase{color:var(--sand)}dialog{background:#141f30;color:var(--ink);width:min(620px,calc(100% - 30px));border:1px solid #3b4960;border-radius:22px;padding:28px;box-shadow:0 30px 100px #0008;max-height:90dvh;overflow:auto}dialog::backdrop{background:#050912dd;backdrop-filter:blur(10px)}.dialog-head{display:flex;justify-content:space-between;align-items:center}.dialog-head .eyebrow{margin:0}.dialog-head .icon-button{font-size:28px}dialog h2{font:400 31px/1.2 Georgia,serif;letter-spacing:-.8px;margin:20px 0 14px}dialog p{font-size:14px;color:#a0b1c8;line-height:1.7}audio{width:100%;margin:16px 0 20px;min-height:50px}.loop-fields{display:grid;grid-template-columns:1fr 1fr;gap:18px}.loop-fields label{display:flex;flex-direction:column;gap:10px;font-size:14px;color:#bac8d9}.loop-fields label>span{font-size:13px;color:#8498b3}.loop-fields input{width:92px;max-width:100%;padding:9px;background:#0b1423;color:var(--ink);border:1px solid #40516a;border-radius:8px;font-variant-numeric:tabular-nums}.loop-fields button{font-size:12px;padding:8px;min-height:38px}.loop-explanation{background:#23304570;border-radius:10px;padding:13px;margin:20px 0 0}.dialog-error{color:#e2b3a3;min-height:20px;margin:8px 0;font-size:13px}.dialog-actions{display:flex;gap:12px;justify-content:space-between}.dialog-actions .primary-button{min-height:44px;gap:20px}.dialog-footnote{font-size:12px;margin:17px 0 0;color:#7a8da9}
@media(max-width:800px){.topbar{padding:22px 22px 0}main{padding:32px 22px 0}.welcome{margin-bottom:25px}.layout{grid-template-columns:1fr;gap:18px}.breathing-panel{min-height:500px;padding:22px}.orb-area{min-height:290px;height:300px;flex:none}.orb{width:215px;height:215px}.orbit-one{width:280px;height:280px}.orbit-two{width:340px;height:340px}.orb-copy h2{font-size:28px}.settings-panel{display:grid;grid-template-columns:1fr 1fr}.setting-block{padding:22px}.setting-block:nth-child(odd){border-right:1px solid #26334880}.last-block{padding-bottom:5px}footer{padding:10px 22px 24px}.welcome h1{font-size:36px}.is-running .welcome{display:none}.is-running main{padding-top:20px}}
@media(max-width:520px){.brand{font-size:22px}.brand img{width:31px;height:31px}.topbar{padding:19px 20px 0}main{padding:28px 16px 0}.welcome{padding:0 5px}.welcome h1{font-size:32px}.intro-copy{font-size:14px;max-width:280px}.eyebrow{font-size:11px}.breathing-panel{min-height:420px;padding:20px 18px;border-radius:20px}.orb-area{height:260px;min-height:260px}.orb{width:192px;height:192px}.orbit-one{width:250px;height:250px}.orbit-two{width:310px;height:310px}.orb-copy h2{font-size:26px}.orb-copy p{font-size:13px;max-width:170px}.orb-copy #phase-kicker{font-size:10px}.session-top{font-size:12px}.session-top #remaining{font-size:16px}#session-hint{font-size:12px;margin-bottom:15px}.progress-track{margin-bottom:20px}.primary-button{min-height:48px}.settings-panel{display:block;border-radius:20px}.setting-block{padding:22px}.setting-block:nth-child(odd){border-right:0}.sound-options button{font-size:13px}.select-row select{font-size:13px}.last-block{padding-bottom:10px}.running-options{margin-top:5px}.is-running .breathing-panel{min-height:460px}.is-running .orb-area{height:285px}.loop-fields{gap:12px}.loop-fields input{width:76px}.dialog-actions{flex-wrap:wrap;gap:9px}.dialog-actions>button{flex:1}dialog{padding:22px}dialog h2{font-size:29px}.custom-duration,.toggle-row strong,.section-heading h2{font-size:14px}.range-row,.toggle-row small,.select-row small{font-size:13px}.setup-link{font-size:13px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;transition:none!important}.orb{will-change:auto}}

.waveform-track{height:70px;position:relative;border:1px solid #344259;border-radius:10px;overflow:hidden;background:#0e1726}.waveform-track img{width:100%;height:100%;display:block}.waveform-track #loop-band{position:absolute;inset:0 auto 0 0;background:#d7c4a626;border-left:1px solid #d7c4a6aa;border-right:1px solid #d7c4a6aa;pointer-events:none}.waveform-track #preview-head{position:absolute;inset:0 auto 0 0;width:1px;background:#dde5ee;pointer-events:none}.recording-scrub{display:grid;grid-template-columns:1fr auto;gap:6px;margin:12px 0 20px;font-size:13px;color:#a0b1c8}.recording-scrub input{grid-column:1/-1;width:100%;accent-color:#d7c4a6;height:18px}.recording-scrub output{font-variant-numeric:tabular-nums}.join-toggle{margin:20px 0 0}.running-options>div{display:flex;gap:24px}.dark-screen{animation:darken .8s ease-out}@keyframes darken{from{opacity:0}to{opacity:1}}.dialog-actions{flex-wrap:wrap}.dialog-actions>button{flex:1;white-space:nowrap}.is-running .layout{display:block;max-width:650px;margin:auto}.is-running .settings-panel{margin-top:20px}.is-running .breathing-panel{min-height:min(580px,calc(100dvh - 150px))}@media(min-width:801px){.settings-panel{max-height:600px;overflow-y:auto;scrollbar-width:thin;scrollbar-color:#394b63 transparent}main{padding-top:34px}.welcome{margin-bottom:28px}}@media(prefers-reduced-motion:reduce){.dark-screen{animation:none}}

.brand small{display:block;font-size:14px;letter-spacing:.1px;line-height:1.4}.brand span{line-height:1.2}.brand{flex-shrink:1}.icon-button{flex-shrink:0}

/* A quiet sheep meadow behind the controls. */
body{position:relative;isolation:isolate;background:#0b111e}
body::before{content:"";position:fixed;inset:0;z-index:-1;pointer-events:none;background:url("assets/sleepy-sheep.webp") center bottom/cover no-repeat;opacity:.85}
.topbar,.welcome{position:relative}
.breathing-panel{background:linear-gradient(140deg,#142033b8,#111a2aad)}
.is-running .breathing-panel{background:linear-gradient(140deg,#111d30b8,#0d1523ad)}
.settings-panel{background:#111a28ed}
.volume-help{font-size:13px;line-height:1.55;color:var(--muted);margin:7px 0 4px}
footer{padding-bottom:160px;color:#a5b5c8}
@media(max-width:800px){body::before{background-size:auto 100dvh;background-position:center bottom}footer{padding-bottom:145px}}

.exercise-description{margin-bottom:16px}.exercise-description strong{display:block;font-size:14px;font-weight:400}.exercise-description small{display:block;font-size:12px;color:var(--muted);margin-top:3px}

/* Soft, rounded bedtime typography. */
:root{font-family:"Nunito",ui-rounded,system-ui,sans-serif;font-size:17px}
.brand,.welcome h1,.orb-copy h2,dialog h2{font-family:"Baloo 2","Nunito",ui-rounded,sans-serif;font-weight:500;letter-spacing:0}
.brand{font-size:28px}.brand small{font-family:"Nunito",sans-serif;font-size:16px;font-weight:600}
.welcome h1{font-size:clamp(36px,4vw,48px);line-height:1.2}
.intro-copy{font-size:18px}
.orb-copy h2{font-size:33px;line-height:1.15}
.orb-copy p{font-size:16px;max-width:220px}
.session-top{font-size:16px}.session-top #remaining{font-size:20px}
.section-heading h2{font-size:18px;font-weight:700}
.primary-button,.secondary-button,.text-button{font-size:16px}
.exercise-description strong,.toggle-row strong{font-size:16px;font-weight:600}
.exercise-description small,.toggle-row small,.volume-help,.custom-duration,.range-row,.sound-options button,.preview-sound,#session-hint,.gentle-note{font-size:15px}
.duration-options button{font-size:22px}.duration-options small{font-size:14px}
.running-options span,footer{font-size:14px}
.orb-copy #phase-kicker{font-size:12px;letter-spacing:1.5px}
dialog h2{font-size:34px}dialog p{font-size:16px}
@media(max-width:520px){
.brand{font-size:25px}.brand small{font-size:15px}
.welcome h1{font-size:36px}.intro-copy{font-size:17px;max-width:340px}
.orb-copy h2{font-size:29px}.orb-copy p{font-size:15px;max-width:190px}
.session-top{font-size:14px}.session-top #remaining{font-size:18px}
.section-heading h2{font-size:17px}.sound-options button{font-size:14px}
.orb-copy #phase-kicker{font-size:11px}
}

/* Personal, handwritten bedtime headings with gentle italic accents. */
.brand,.welcome h1,.orb-copy h2,dialog h2{
  font-family:"Kalam","Comic Sans MS",cursive;
  font-weight:400;letter-spacing:0;
}
.brand{font-size:30px;line-height:1.15}
.brand small{font-family:"Kalam","Comic Sans MS",cursive;font-size:18px;line-height:1.35}
.welcome h1{font-size:clamp(40px,4.4vw,52px);line-height:1.25}
.intro-copy{font-style:italic;font-weight:500;font-size:19px;line-height:1.6}
.orb-copy h2{font-size:35px;line-height:1.2}
.orb-copy p{font-style:italic;font-size:16px}
.section-heading h2{font-family:"Kalam","Comic Sans MS",cursive;font-size:23px;font-weight:700;line-height:1.25}
.exercise-description strong{font-family:"Kalam","Comic Sans MS",cursive;font-size:21px;font-weight:400}
#session-hint,.gentle-note{font-style:italic}
.primary-button{font-style:italic;font-weight:700;font-size:17px}
@media(max-width:520px){
  .brand{font-size:27px}.brand small{font-size:17px}
  .welcome h1{font-size:39px}
  .intro-copy{font-size:18px}
  .orb-copy h2{font-size:31px}
  .orb-copy p{font-size:15px}
  .section-heading h2{font-size:22px}
  .exercise-description strong{font-size:20px}
}

/* Reserve handwriting for the welcome and breathing prompt. */
.brand,.brand small,.section-heading h2,.exercise-description strong,dialog h2{
  font-family:"Nunito",ui-rounded,system-ui,sans-serif;
  font-style:normal;
}
.brand{font-size:28px;font-weight:700}
.brand small{font-size:16px;font-weight:600}
.section-heading h2{font-size:18px;font-weight:700}
.exercise-description strong{font-size:16px;font-weight:600}
dialog h2{font-size:32px;font-weight:600}
@media(max-width:520px){
  .brand{font-size:25px}.brand small{font-size:15px}
  .section-heading h2{font-size:17px}
  .exercise-description strong{font-size:16px}
  dialog h2{font-size:29px}
}

/* Clear heading hierarchy: project title, welcome, breathing, settings. */
.brand{font-size:clamp(44px,4.5vw,58px);font-weight:700;letter-spacing:-1px;line-height:1.08;gap:16px}
.brand small{font-size:20px;font-weight:600;line-height:1.5;letter-spacing:0}
.brand img{width:48px;height:48px}
.welcome h1{font-size:clamp(34px,3.3vw,42px);line-height:1.25}
.orb-copy h2{font-size:32px;line-height:1.2}
.section-heading h2{font-size:21px;line-height:1.3}
dialog h2{font-size:28px;line-height:1.25}
@media(max-width:520px){
  .brand{font-size:38px;letter-spacing:-.7px;gap:10px}
  .brand small{font-size:17px}
  .brand img{width:35px;height:35px}
  .welcome h1{font-size:31px}
  .orb-copy h2{font-size:28px}
  .section-heading h2{font-size:20px}
  dialog h2{font-size:26px}
}
@media(max-width:360px){
  .brand{font-size:34px}
  .brand small{font-size:16px}
  .welcome h1{font-size:29px}
  .orb-copy h2{font-size:26px}
}
