@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');
:root{--ink:#20253e;--muted:#72758a;--purple:#7058bd;--lav:#eae4fa;--bg:#f6f5fa;--line:#e9e7f0}*{box-sizing:border-box}body{margin:0;background:var(--bg);font:16px 'Manrope',system-ui,sans-serif;color:var(--ink)}button,input,select{font:inherit}button,a,input,select{outline-offset:4px}button{cursor:pointer}button{border:0}button:disabled{opacity:.5;cursor:default}h1,h2,h3,p{margin:0}h1{font-size:36px;line-height:1.18;letter-spacing:-1.3px}h2{font-size:23px;letter-spacing:-.5px}h3{font-size:18px}p{line-height:1.65}.shell{max-width:1160px;margin:auto;display:grid;grid-template-columns:230px 1fr;min-height:100vh}.side{padding:38px 25px;border-right:1px solid var(--line);display:flex;flex-direction:column;position:sticky;top:0;height:100vh}.brand{font-size:29px;letter-spacing:-1px;font-weight:800;display:flex;align-items:center;gap:10px}.tag{font-size:12px;letter-spacing:2px;color:var(--muted);margin:9px 0 45px}.nav{display:grid;gap:10px}.nav button{background:none;text-align:left;padding:15px;border-radius:15px;color:var(--muted);display:flex;gap:13px;align-items:center}.nav button.active{background:var(--lav);color:#5b479e;font-weight:700}.nav svg{width:22px;height:22px}.side-footer{margin-top:auto;color:var(--muted);font-size:13px;line-height:1.6}.main{padding:35px 44px 65px;min-width:0}.top{display:flex;justify-content:space-between;align-items:center;margin-bottom:30px;font-size:14px;color:var(--muted)}.badge{padding:7px 12px;border-radius:20px;background:white;color:#66568f;font-size:12px}.intro{margin-bottom:25px}.intro p{color:var(--muted);margin-top:10px}.hero{background:#1c2340;border-radius:26px;padding:31px;color:#fff;position:relative;overflow:hidden;min-height:218px;display:flex;align-items:center;margin-bottom:25px}.hero-content{max-width:65%;position:relative;z-index:1}.hero h2{font-size:29px;line-height:1.3;margin-bottom:11px}.hero p{color:#c6c7dc;font-size:14px;margin-bottom:22px}.moon{position:absolute;right:35px;top:40px;width:132px;height:132px;border-radius:50%;background:radial-gradient(circle at 30% 30%,#fff8dc,#d4c6f4);box-shadow:0 0 65px #bba4ee44}.moon:after{content:'';position:absolute;width:145px;height:145px;background:#1c2340;border-radius:50%;left:40px;top:-33px}.stars{position:absolute;inset:0;background-image:radial-gradient(circle at 80% 80%,#d1c7ed 1px,transparent 2px),radial-gradient(circle at 91% 20%,#d1c7ed 1px,transparent 2px),radial-gradient(circle at 65% 22%,#d1c7ed 1px,transparent 2px),radial-gradient(circle at 94% 65%,#d1c7ed 1px,transparent 2px)}.btn{padding:13px 20px;border-radius:12px;background:var(--purple);color:white;font-weight:700;display:inline-flex;align-items:center;justify-content:center;gap:8px}.btn.light{background:#dcd0fa;color:#30264f}.btn.secondary{background:var(--lav);color:#5b479e}.btn.ghost{background:transparent;color:var(--purple);padding:10px 0}.grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}.card{background:#fff;border:1px solid var(--line);border-radius:22px;padding:24px;margin-bottom:20px}.grid .card{margin-bottom:0}.eyebrow{font-size:12px;letter-spacing:1.6px;text-transform:uppercase;color:var(--muted);margin-bottom:13px}.number{font-size:34px;font-weight:700;letter-spacing:-1px;margin:9px 0}.small{font-size:14px;color:var(--muted);line-height:1.6}.section-head{display:flex;align-items:center;justify-content:space-between;margin:29px 0 17px}.task{display:flex;gap:15px;align-items:center;margin:20px 0}.task-icon{width:48px;height:48px;flex-shrink:0;background:#edf3ed;border-radius:15px;display:grid;place-items:center;color:#64836b;font-size:24px}.task p{font-size:14px;color:var(--muted)}.full{width:100%}.notice{padding:12px 16px;background:#eee8fb;color:#5f4a91;border-radius:12px;font-size:14px;margin-bottom:20px;display:flex;justify-content:space-between;gap:10px;align-items:center}.notice button{background:transparent;color:inherit;text-decoration:underline}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px}label{display:block;font-size:14px;font-weight:600;margin-bottom:8px}input,select{width:100%;padding:13px;border:1px solid #dedbe8;border-radius:11px;background:#fcfbfe;color:var(--ink);min-width:0}input[type=range]{padding:8px 0;accent-color:var(--purple)}.field{margin-bottom:20px}.mood{display:flex;gap:8px}.mood button{flex:1;background:#f4f1fa;padding:12px 5px;border:2px solid transparent;border-radius:12px;font-size:21px}.mood button.selected{border-color:var(--purple);background:#eae2fa}.row{display:flex;justify-content:space-between;align-items:center;gap:14px}.entry{padding:18px 0;border-bottom:1px solid var(--line)}.entry:last-child{border:0}.entry strong{display:block;margin-bottom:4px}.delete{background:none;color:#8b6874;font-size:13px;padding:8px}.empty{text-align:center;padding:30px 10px}.empty h3{margin:15px 0 10px}.chart{display:flex;gap:10px;height:190px;align-items:end;padding-top:25px}.bar-col{flex:1;height:100%;display:flex;flex-direction:column;justify-content:end;align-items:center;gap:9px}.bar{background:linear-gradient(#c6b5ed,#8c73ca);width:100%;max-width:44px;border-radius:8px 8px 3px 3px;min-height:3px}.bar-label{font-size:12px;color:var(--muted)}.bar-value{font-size:12px;color:#6b588e}.options{display:grid;gap:12px;margin:25px 0}.option{border:1px solid var(--line);background:#fff;padding:20px;border-radius:15px;text-align:left;color:var(--ink)}.option.selected{border-color:var(--purple);background:#f0ebfa}.option span{display:block;font-size:14px;color:var(--muted);margin-top:5px}.progress-track{height:5px;background:#e7e1f3;border-radius:5px;margin:22px 0}.progress-track div{height:100%;background:var(--purple);border-radius:5px}.step{margin-top:20px}.check-row{display:flex;gap:12px;padding:15px 0;line-height:1.5;align-items:flex-start}.check-row input{width:20px;height:20px;flex-shrink:0;accent-color:var(--purple)}.lesson p{margin:15px 0;color:#62657c}.lesson ul{padding-left:22px;line-height:1.8;color:#62657c}.footer-note{font-size:12px;color:var(--muted);line-height:1.7;margin-top:25px}.welcome{max-width:650px;margin:35px auto}.welcome .hero{min-height:270px}.welcome h1{font-size:39px}.welcome .hero-content{max-width:68%}.actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:22px}#toast{position:fixed;bottom:100px;left:50%;transform:translateX(-50%);background:#252b45;color:white;padding:13px 22px;border-radius:13px;z-index:10;display:none;max-width:90%;white-space:normal}details{margin-top:18px}summary{cursor:pointer;font-weight:600;font-size:14px}.danger{color:#a04c65}.done{color:#517b61;background:#eef5ef;padding:8px 12px;border-radius:10px;font-size:14px}.mobile-brand{display:none}@media(max-width:760px){.shell{display:block}.side{position:fixed;bottom:0;top:auto;width:100%;height:auto;padding:9px 10px calc(10px + env(safe-area-inset-bottom));background:#ffffffed;backdrop-filter:blur(12px);z-index:5;border-top:1px solid var(--line);border-right:0}.side .brand,.side .tag,.side-footer{display:none}.nav{display:flex;justify-content:space-around;gap:0}.nav button{flex:1;padding:7px 3px;font-size:11px;display:flex;flex-direction:column;gap:5px;border-radius:11px}.nav svg{width:21px;height:21px}.main{padding:24px 20px 110px}.top{margin-bottom:25px}.mobile-brand{display:block;font-size:23px;font-weight:800;color:var(--ink);letter-spacing:-1px}.date{display:none}h1{font-size:29px}.hero{padding:25px;min-height:225px}.hero h2{font-size:25px}.hero-content{max-width:73%}.moon{right:-7px;top:45px;width:110px;height:110px}.moon:after{width:120px;height:120px;left:35px;top:-28px}.grid{gap:12px}.card{padding:20px;border-radius:19px}.grid .card{padding:18px}.number{font-size:28px}.small{font-size:13px}.form-grid{gap:14px}.welcome{margin:0}.welcome h1{font-size:33px}.welcome .hero{min-height:260px}.welcome .hero-content{max-width:76%}.welcome .moon{right:-25px}.section-head h2{font-size:21px}.badge{font-size:11px}.notice{font-size:13px}.chart{gap:7px}.eyebrow{font-size:11px}}
/* Somli visual edition */
body{background:radial-gradient(ellipse at 90% 0,#ebe4fb,transparent 55%),#f7f6fb}.side{background:#fcfbff80}.hero{background:#14163b url('dream.png') center/cover;min-height:285px;box-shadow:0 16px 40px #33245217}.hero .moon,.hero .stars{display:none}.hero:before{content:'';position:absolute;inset:0;background:linear-gradient(90deg,#121536bb,transparent 85%)}.hero-content{max-width:57%}.hero h2{font-size:32px}.hero p{color:#e0ddf2}.card{box-shadow:0 8px 24px #32235905}.btn{transition:transform .15s,box-shadow .15s}.btn:hover{transform:translateY(-2px);box-shadow:0 8px 20px #7058bd25}.nav button.active{box-shadow:inset 3px 0 #8064c9}.ritual{background:linear-gradient(125deg,#e8e1f8,#f3eefb);position:relative;overflow:hidden}.ritual:after{content:'✧';position:absolute;right:20px;top:0;font-size:110px;color:#c2b0e650}.ritual h3,.ritual p,.ritual button{position:relative;z-index:1}.ritual p{max-width:80%;margin:10px 0 16px}.welcome .hero{min-height:330px}@media(max-width:760px){.hero{min-height:285px;background-position:62% center}.hero-content{max-width:72%}.hero h2{font-size:27px}.hero:before{background:linear-gradient(90deg,#121536dd,#12153633)}.welcome .hero{min-height:335px}.number{font-size:25px}}
.scene{width:210px;height:210px;background-image:url('practices.png');background-size:300% 100%;border-radius:26px;margin:0 auto 25px;box-shadow:0 12px 35px #7157bb12}.scene-diary{background-position:left center}.scene-progress{background-position:center}.scene-evening{background-position:right center}.ritual-picture{float:right;width:120px;height:120px;border-radius:20px;background:url('practices.png') right center/300% 100%;margin:0 0 15px 20px}.ritual:after{display:none}@media(min-width:761px){.scene{float:right;margin:-12px 0 20px 24px;width:170px;height:170px}.scene + .card,.scene + .grid{clear:both}}@media(max-width:760px){.scene{width:160px;height:160px}.ritual-picture{width:92px;height:92px}.ritual p{max-width:100%}}

/* Somli night theme */
:root {
  color-scheme: dark;
  --ink:#f3f4fb;
  --muted:#d0bfdc;
  --line:#59466c;
  --lav:#3a2c4a;
  --purple:#ddbcff;
}
body { background:#20172f; color:var(--ink); }
.shell { background:radial-gradient(ellipse at 90% 0,#714c8d94,transparent 55%); }
.shell[data-view="home"] { background:radial-gradient(ellipse at 84% 0,#63487f85,transparent 55%); }
.side { background:#21172ee6; }
.brand,.mobile-brand { color:var(--ink); font-weight:800; }
.brand-mark {
  position:relative;
  display:inline-block;
  width:30px;
  height:26px;
  flex:none;
  border-radius:9px;
  background:#263651;
}
.brand-mark::before,.brand-mark::after {
  content:'';
  position:absolute;
  left:6px;
  right:6px;
  height:6px;
  border-top:2px solid #bccaff;
  border-radius:50%;
}
.brand-mark::before { top:8px; }
.brand-mark::after { top:14px; border-color:#8bc5cc; }
h1,h2,.number { font-weight:800; }
:focus-visible { outline:2px solid var(--purple); }
.card,.option,.ritual { background:#342642; border-color:var(--line); }
.badge,.notice,.task-icon,.done { background:#423250; color:#f0e2f8; }
.nav button.active { background:#48345f; color:#f1e4ff; }
.btn,.btn.light { background:#ddbcff; color:#291a37; }
.btn.secondary { background:#463456; color:#f0e4ff; }
.btn.ghost,.danger,.delete { color:#f0b9cc; }
input,select,.mood button { background:#18233a; color:var(--ink); border-color:#415273; }
.option.selected,.mood button.selected { background:#2f4166; border-color:#b6c4ff; }
.lesson p,.lesson ul,.bar-value { color:var(--muted); }
.progress-track { background:#2b3852; }
.bar { background:linear-gradient(#b6c4ff,#617bb7); }
.hero { background:#10182a url('moon-lake.webp') center/cover; }
.hero:before { background:linear-gradient(90deg,#10182aed,#10182a30); }
.night-summary {
  position:relative;
  overflow:hidden;
  border:1px solid #60467b;
  border-radius:28px;
  margin:0 0 24px;
  background:
    linear-gradient(180deg,#20162c82,transparent 50%,#20162ce8 95%),
    linear-gradient(90deg,#20162c9c,transparent 74%),
    #231934 url('today-dawn-wide.webp') 60% 50%/cover;
}
.night-body {
  display:flex;
  flex-direction:column;
  min-height:clamp(410px,66vw,520px);
  padding:clamp(20px,5vw,40px);
}
.night-body h1 { font-size:clamp(28px,4vw,40px); }
.night-duration { margin:24px 0 70px; }
.night-duration .small { color:#f3e2ff; }
.night-duration strong { display:block; font-size:clamp(36px,9vw,68px); line-height:1.12; letter-spacing:-.04em; }
.night-timeline { margin-top:auto; max-width:560px; width:100%; font-variant-numeric:tabular-nums; }
.night-timeline-labels { display:flex; flex-wrap:wrap; justify-content:space-between; gap:6px 10px; font-size:.875rem; }
.night-timeline-labels strong { white-space:nowrap; }
.night-line {
  position:relative;
  height:8px;
  margin:12px 1px 23px;
  border-radius:8px;
  background:linear-gradient(90deg,#ab9bff,#d2a6ff 52%,#ffc98c);
}
.night-line::after {
  content:'';
  position:absolute;
  inset:-3px 0;
  background:repeating-linear-gradient(90deg,#fff9 0 1px,transparent 1px 12.5%);
  border-right:1px solid #fff9;
}
.night-body .night-record { width:100%; max-width:560px; min-height:48px; margin-top:4px; background:#ffd191; color:#2b1933; }
.night-body .night-duration + .night-record { margin-top:auto; }
@media(max-width:760px) {
  .mobile-brand { display:inline-flex; align-items:center; gap:8px; }
  .side { background:#241831f5; }
  .night-summary {
    border-radius:22px;
    background:
      linear-gradient(180deg,#20162ca3,transparent 49%,#20162cf0 96%),
      #231934 url('today-dawn-mobile.webp') center/cover;
  }
  .night-body { min-height:clamp(380px,112vw,470px); }
}

.route-header { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:20px; }
.week-count { color:var(--muted); font-size:.875rem; }
.card.route { padding:clamp(12px,3vw,22px); border-radius:20px; }
.week-picker { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; padding:4px; border:1px solid var(--line); border-radius:14px; background:#30223e; }
.week-button { min-height:44px; border:0; border-radius:10px; color:var(--muted); background:transparent; font:inherit; font-size:.85rem; cursor:pointer; }
.week-button[aria-pressed="true"] { background:#ddbcff; color:#291a37; font-weight:700; }
.week-summary { margin:16px 0 10px; }
.week-summary h2 { margin-bottom:12px; }
.week-summary label { font-size:.9rem; color:var(--muted); }
.week-summary progress { width:100%; height:9px; margin-top:5px; accent-color:#ddbcff; }
.route-list { display:grid; gap:8px; list-style:none; padding:0; margin:0 0 10px; }
.route-item {
  display:flex;
  width:100%;
  align-items:center;
  gap:12px;
  min-height:53px;
  padding:9px 12px;
  border:1px solid transparent;
  border-radius:12px;
  background:#40314f;
  text-align:left;
  color:var(--ink);
}
.route-item small { display:block; color:var(--muted); margin-top:4px; }
.route-item.route-next {
  min-height:86px;
  border-color:#d8abf5;
  background:linear-gradient(125deg,#63467f,#7b5090);
}
.route-next strong { font-size:clamp(1rem,3vw,1.25rem); }
.route-next .route-next-label { margin:0 0 3px; color:#f2dafc; }
.route-next .route-mark { border-color:#e0bdf4; }
.route-mark { display:grid; place-items:center; flex:0 0 auto; width:24px; height:24px; border:1px solid #ad91c3; border-radius:8px; }
.route-mark.is-done { color:#123d36; background:#8bdcca; border-color:#8bdcca; }
.plan-practices { margin:24px 0 18px; }
.plan-practices h2 { margin-bottom:12px; }
.practice-feature {
  display:block;
  width:100%;
  padding:0;
  overflow:hidden;
  text-align:left;
  color:var(--ink);
  border:1px solid var(--line);
  border-radius:20px;
  background:#1c263d;
}
.practice-feature-caption {
  display:flex;
  flex-wrap:wrap;
  justify-content:space-between;
  align-items:baseline;
  gap:4px 12px;
  padding:13px 16px;
}
.practice-feature-caption span { color:var(--muted); font-size:.875rem; }
.practice-feature:hover { border-color:#8598d1; }
.practice-heading { display:flex; align-items:baseline; justify-content:space-between; gap:12px; margin-bottom:12px; }
.practice-heading h1 { font-size:clamp(1.45rem,5.7vw,2.25rem); margin:0; }
.practice-heading .btn { flex-shrink:0; min-height:44px; padding:6px 0 6px 4px; color:#ced8f7; }
.practice-strip {
  position:relative;
  display:flex;
  gap:10px;
  overflow-x:auto;
  overscroll-behavior-inline:contain;
  scroll-snap-type:inline proximity;
  scroll-padding-inline:4px;
  scrollbar-width:thin;
  scrollbar-color:#64769c #172138;
  padding:4px 4px 9px;
}
.practice-choice {
  display:grid;
  flex:0 0 clamp(103px, 27%, 157px);
  align-content:start;
  gap:6px;
  padding:5px 5px 8px;
  color:var(--ink);
  background:#1c263d;
  border:1px solid var(--line);
  border-radius:13px;
  text-align:left;
  scroll-snap-align:start;
}
.practice-choice[aria-pressed="true"] { background:#293957; border-color:#b6c4ff; }
.practice-choice:focus-visible { outline-offset:2px; }
.practice-choice img { width:100%; height:auto; aspect-ratio:16/9; border-radius:8px; }
.practice-choice span { padding-inline:3px; font-size:.875rem; line-height:1.2; overflow-wrap:anywhere; }
#plan-practice-feature + .practice-strip { margin-top:8px; }
.practice-session > .practice-strip { margin-inline:clamp(12px,4vw,26px); }
.project-specialist {
  margin:14px 0;
  padding:12px 14px;
  background:#202d46;
  border:1px solid var(--line);
  border-radius:14px;
}
.project-specialist h3, .project-specialist p { margin:0 0 4px; }
.practice-session { border:1px solid var(--line); border-radius:22px; background:#18233a; overflow:hidden; }
.practice-artwork { display:block; aspect-ratio:16/9; width:100%; background:#222e47; overflow:hidden; }
.practice-art { display:block; width:100%; height:100%; object-fit:cover; }
.session-copy { max-width:600px; margin:0 auto; padding:14px clamp(16px,4vw,32px) 26px; }
.session-title { display:flex; align-items:baseline; justify-content:space-between; gap:8px 14px; flex-wrap:wrap; padding:14px clamp(16px,4vw,26px) 8px; }
.session-title h2 { margin:0; font-size:clamp(1.5rem,6vw,2.1rem); }
.session-title span,.session-copy p { color:var(--muted); }
.session-copy ol { padding-left:24px; margin:18px 0 0; line-height:1.55; }
.session-copy li+li { margin-top:8px; }
.session-player { margin:18px 0; padding:12px; background:#222e47; border:1px solid var(--line); border-radius:16px; }
.session-player p { margin:0; color:var(--ink); }
.session-player audio { width:100%; display:block; margin:8px 0; }
.session-loop { display:flex; align-items:center; gap:8px; min-height:36px; margin:0; font-size:.9rem; }
.session-loop input { width:auto; accent-color:#b6c4ff; }
.quality-caption { margin-top:8px; }
.mood { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:6px; }
.mood button { display:grid; justify-items:center; gap:5px; min-height:58px; padding:8px 0; font-size:.8rem; }
.quality-moon {
  position:relative;
  display:block;
  width:clamp(23px,7vw,34px);
  aspect-ratio:1;
  border-radius:50%;
  background:radial-gradient(circle at 35% 30%,#fff0cb,#e5bc80 72%);
  box-shadow:inset -4px -2px #9d72a970,0 0 10px #edc78338;
  color:#4a3047;
}
.moon-eyes {
  position:absolute;
  top:40%;
  left:25%;
  width:11%;
  aspect-ratio:1;
  background:currentColor;
  border-radius:50%;
  box-shadow:.3em 0 currentColor;
  font-size:clamp(23px,7vw,34px);
}
.moon-mouth {
  position:absolute;
  left:34%;
  top:59%;
  width:29%;
  height:19%;
  border:2px solid currentColor;
  border-top:0;
  border-radius:0 0 70% 70%;
}
.quality-moon-1,.quality-moon-2 {
  background:radial-gradient(circle at 36% 30%,#e6d8ff,#ba9ad8 75%);
}
.quality-moon-1 .moon-mouth,.quality-moon-2 .moon-mouth { top:61%; transform:rotate(180deg); }
.quality-moon-2 .moon-mouth { height:12%; }
.quality-moon-3 .moon-mouth { top:65%; height:0; border:0; border-bottom:2px solid currentColor; border-radius:2px; }
.quality-moon-4 .moon-mouth { height:13%; }
.quality-moon-5 .moon-mouth { background:currentColor; }
.quality-moon-5::after {
  content:'';
  position:absolute;
  width:13%;
  aspect-ratio:1;
  right:-5%;
  top:0;
  background:#ffe4a8;
  clip-path:polygon(50% 0%,62% 38%,100% 50%,62% 62%,50% 100%,38% 62%,0% 50%,38% 38%);
}
.diary-progress { margin:0 0 20px; }
.week-chart,.week-average {
  padding:clamp(12px,3.5vw,24px);
  border:1px solid #ead4f8;
  border-radius:20px;
  background:#e6d2f1;
  color:#301e41;
}
.week-chart > p { margin-top:4px; color:#534264; font-size:.875rem; }
.week-chart .week-chart-empty { margin-top:20px; }
.sleep-bars {
  display:grid;
  grid-template-columns:repeat(7,minmax(0,1fr));
  gap:clamp(3px,1.25vw,14px);
  max-width:720px;
  margin:14px 0 0;
  padding:0;
  list-style:none;
}
.sleep-bar-day { min-width:0; text-align:center; }
.sleep-bar-plot { height:clamp(98px,26vw,162px); display:flex; flex-direction:column; justify-content:end; gap:4px; }
.sleep-bar { height:var(--bar-height); min-height:3px; border-radius:8px 8px 3px 3px; background:#56b3a0; }
.sleep-bar.missing { background:#ad9abf; }
.sleep-bar-value,.sleep-bar-label { color:#453553; font-size:clamp(.72rem,2.8vw,.875rem); font-variant-numeric:tabular-nums; }
.sleep-bar-label { display:block; margin-top:6px; }
.sleep-bar-day.current .sleep-bar:not(.missing) { background:#007460; }
.sleep-bar-day.current :is(.sleep-bar-value,.sleep-bar-label) { color:#005c4d; font-weight:800; }
.week-average { display:grid; gap:6px; margin:8px 0 0; padding-block:13px; }
.week-average div { display:flex; flex-wrap:wrap; justify-content:space-between; gap:4px 12px; }
.week-average dd { margin:0; font-weight:800; white-space:nowrap; }
.task-icon svg { width:23px; height:23px; }
.welcome .hero,
.onboard-heading {
  background:#17192d url('onboard-lake.webp') right center/cover;
}
.welcome .hero:before {
  background:linear-gradient(90deg,#121426ed,#12142680 58%,transparent);
}
.onboard-heading {
  display:flex;
  align-items:center;
  min-height:180px;
  padding:clamp(20px,4vw,30px);
  border:1px solid var(--line);
  border-radius:22px;
  background:
    linear-gradient(90deg,#121426f2,#1214268c 62%,#12142608),
    #17192d url('onboard-lake.webp') right 18%/cover;
}
.onboard-heading .intro { max-width:29rem; margin:0; }
.onboard-heading .intro p { color:#eee4fa; }
@media(max-width:520px) {
  .welcome .hero:before {
    background:linear-gradient(90deg,#121426f2,#121426a3 60%,#12142625);
  }
  .onboard-heading h1 { font-size:clamp(26px,7.5vw,33px); }
}
.review-nights { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; margin-top:16px; padding-top:16px; border-top:1px solid var(--line); }
.review-nights span,.review-nights strong { display:block; }
.review-nights span { color:var(--muted); font-size:.9rem; margin-bottom:4px; }
@media(max-width:460px) {
  .practice-heading { align-items:center; }
  .main { padding-bottom:calc(108px + env(safe-area-inset-bottom)); }
  .nav button { min-width:0; min-height:52px; font-size:12px; }
}

/* Sleep diary and night editor */
.diary-heading { margin-bottom:18px; }
.diary-heading h1 { width:fit-content; }
.diary-actions { display:flex; flex-wrap:wrap; gap:9px; margin-top:18px; }
.diary-actions .btn { min-height:44px; }
.diary-entry-label small { display:block; font-size:.875rem; }
.diary-history {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
  padding:0;
  margin:0;
  list-style:none;
}
.diary-entry {
  width:100%;
  min-height:66px;
  display:flex;
  align-items:center;
  gap:12px;
  padding:11px 14px;
  color:#301e41;
  text-align:left;
  background:#e6d2f1;
  border:1px solid #ead4f8;
  border-radius:16px;
}
.diary-entry:hover { background:#dac0e8; border-color:#ddbcff; }
.diary-entry .quality-moon { flex:none; width:28px; }
.diary-entry .moon-eyes { font-size:28px; }
.diary-entry-label { flex:1; }
.diary-entry-label small { margin-top:2px; color:#584468; }
.diary-entry-duration { white-space:nowrap; font-size:.875rem; font-variant-numeric:tabular-nums; }

body:has(.night-editor[open]) { overflow:hidden; }
.night-editor {
  width:min(31rem,calc(100% - 28px));
  height:min(34rem,calc(100% - 28px));
  max-width:none;
  max-height:none;
  padding:0;
  color:var(--ink);
  border:1px solid #465875;
  border-radius:24px;
  background:#202b44;
  box-shadow:0 20px 80px #090615b3;
}
.night-editor::backdrop { background:#101020bf; }
.night-editor-form {
  height:100%;
  display:grid;
  grid-template-rows:auto minmax(0,1fr) auto;
}
.night-editor-head,.night-editor-body,.night-editor-actions {
  padding-inline:clamp(16px,5vw,28px);
}
.night-editor-head { display:flex; align-items:center; justify-content:space-between; gap:12px; padding-top:16px; }
.night-step { width:min(180px,70%); color:#dfcef5; font-size:.875rem; }
.night-step-bars { display:flex; gap:4px; margin-top:5px; }
.night-step-bars i { flex:1; height:3px; border-radius:4px; background:#4b3b5e; }
.night-step-bars .filled { background:#c9a9ee; }
.night-close {
  width:44px;
  height:44px;
  border-radius:14px;
  color:var(--ink);
  background:#2a3855;
  font-size:1.5rem;
  line-height:1;
}
.night-editor-body {
  display:flex;
  flex-direction:column;
  gap:16px;
  overflow:auto;
  padding-top:18px;
  padding-bottom:18px;
}
.night-editor-body h2 { font-size:clamp(1.5rem,6vw,2rem); line-height:1.2; }
.night-editor-body h2:focus,.diary-heading h1:focus { outline:none; }
.night-editor-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.night-field { min-width:0; display:flex; flex-direction:column; }
.night-field label,.night-question { flex:1; font-size:.875rem; line-height:1.45; margin:0 0 8px; }
.night-field input {
  appearance:none;
  -webkit-appearance:none;
  box-sizing:border-box;
  display:block;
  width:100%;
  min-width:0;
  min-height:52px;
  max-width:100%;
  padding:10px;
  font-size:1.125rem;
  text-align:center;
  font-variant-numeric:tabular-nums;
}
.night-field input::-webkit-date-and-time-value { min-height:1.2em; margin:0; text-align:center; }
.night-date input { font-size:1rem; }
.night-editor input[type="range"] { min-height:44px; margin:0; }
.night-editor-actions {
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1.45fr);
  gap:10px;
  padding-top:14px;
  padding-bottom:calc(14px + env(safe-area-inset-bottom));
  border-top:1px solid var(--line);
}
.night-editor-actions .btn { min-height:48px; padding-inline:10px; font-size:.875rem; }
.night-delete { align-self:flex-start; min-height:44px; padding:4px 0; background:none; color:#f0b9cc; font-size:.875rem; }
.night-editor-error { color:#ffc2ce; font-size:.875rem; line-height:1.45; }
@media(max-width:760px) {
  .diary-history { grid-template-columns:minmax(0,1fr); }
  .night-editor {
    width:100%;
    height:min(34rem,calc(100% - 12px));
    margin:auto 0 0;
    border-width:1px 0 0;
    border-radius:24px 24px 0 0;
  }
}

.consultation-entry, .consultation-metrics, .consultation-question {
  display:grid;
  justify-items:start;
  gap:12px;
  margin-block:18px;
}
.consultation-report .intro { margin-top:14px; }
.consultation-report [aria-pressed="true"] { border-color:#c1aaff; background:#393259; }
.consultation-metrics dl {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(min(100%,185px),1fr));
  gap:14px;
  width:100%;
  margin:0;
}
.consultation-metrics dl div { padding:12px; border:1px solid var(--line); border-radius:12px; }
.consultation-metrics dt { font-size:.875rem; }
.consultation-metrics dd { margin:4px 0 0; font-size:1.125rem; font-weight:650; }
.consultation-question textarea {
  box-sizing:border-box;
  width:100%;
  padding:12px;
  font:inherit;
  color:inherit;
  background:#17182b;
  border:1px solid var(--line);
  border-radius:12px;
  resize:vertical;
}
.consultation-print-note { display:none; }
@media print {
  @page { margin:16mm; }
  body:has(.consultation-report), body:has(.consultation-report) .main {
    background:#fff; color:#111;
    margin:0; padding:0; width:auto; max-width:none;
  }
  body:has(.consultation-report) .shell { display:block; }
  body:has(.consultation-report) :is(.side,.top,.notice,.footer-note,.consultation-controls,#toast) { display:none !important; }
  .consultation-report :is(.card,.intro,div,dt,dd,p,h1,h2) { color:#111 !important; }
  .consultation-report .card { background:#fff; border-color:#bbb; box-shadow:none; break-inside:avoid; }
  .consultation-metrics dl div { border-color:#bbb; }
  .consultation-print-note { display:block; white-space:pre-wrap; overflow-wrap:anywhere; }
}

.practice-reading {
  display:grid;
  gap:1em;
  max-width:60ch;
  margin-top:1rem;
  padding-top:1rem;
  border-top:1px solid var(--line);
}
.practice-reading p { margin:0; line-height:1.7; }
