  /* ===== Family theme tokens (shared with Mellow / Workout Log / Meal Log) ===== */
  :root{
    --canvas:#f0efec; --surface:#fcfcfb; --surface-quiet:#f6f5f2;
    --ink:#0b0b0b; --ink-muted:#52514e;
    --edge:rgba(11,11,11,0.10); --edge-strong:#c3c2b7;
    --danger:#d03b3b;
    --accent:#c43f0b; --accent-text:#b83c08; --accent-hi:#ca4c0b; --accent-lo:#c43f0b;
    --accent-ink:#ffffff; --accent-wash:rgba(196,63,11,0.10);
    --icon-hi:#c43f0b; --icon-lo:#892c08; --icon-mark:#faf5ec;
    --shadow-card:0 1px 3px rgba(11,11,11,.06), 0 1px 2px rgba(11,11,11,.04);
    --font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  }
  @media (prefers-color-scheme: dark){
    :root:not([data-theme="light"]){
      --canvas:#0d0d0d; --surface:#1a1a19; --surface-quiet:#242422;
      --ink:#ffffff; --ink-muted:#c3c2b7;
      --edge:rgba(255,255,255,0.10); --edge-strong:#383835;
      --danger:#e66767;
      --accent:#f97b22; --accent-text:var(--accent); --accent-hi:#fb8a2e; --accent-lo:#ef5a11;
      --accent-ink:#241105; --accent-wash:rgba(249,123,34,0.15);
      --shadow-card:0 1px 3px rgba(0,0,0,.35), 0 1px 2px rgba(0,0,0,.25);
    }
  }
  :root[data-theme="dark"]{
    --canvas:#0d0d0d; --surface:#1a1a19; --surface-quiet:#242422;
    --ink:#ffffff; --ink-muted:#c3c2b7;
    --edge:rgba(255,255,255,0.10); --edge-strong:#383835;
    --danger:#e66767;
    --accent:#f97b22; --accent-text:var(--accent); --accent-hi:#fb8a2e; --accent-lo:#ef5a11;
    --accent-ink:#241105; --accent-wash:rgba(249,123,34,0.15);
    --shadow-card:0 1px 3px rgba(0,0,0,.35), 0 1px 2px rgba(0,0,0,.25);
  }

  /* ===== Accent alternates (verbatim family values, contrast-locked) ===== */
  html[data-accent="ocean"] {
    --accent: #0b6ea8; --accent-text: #0a5a8a; --accent-hi: #107cb9;
    --accent-lo: #0b6ea8; --accent-ink: #ffffff; --accent-wash: rgba(11,110,168,0.10);
    --icon-hi: #0b6ea8; --icon-lo: #084d76;
  }
  html[data-accent="forest"] {
    --accent: #2a7a3f; --accent-text: #226634; --accent-hi: #2f8545;
    --accent-lo: #2a7a3f; --accent-ink: #ffffff; --accent-wash: rgba(42,122,63,0.10);
    --icon-hi: #2a7a3f; --icon-lo: #1d552c;
  }
  html[data-accent="plum"] {
    --accent: #8a3d8f; --accent-text: #733378; --accent-hi: #a049a5;
    --accent-lo: #8a3d8f; --accent-ink: #ffffff; --accent-wash: rgba(138,61,143,0.10);
    --icon-hi: #8a3d8f; --icon-lo: #612b64;
  }
  html[data-accent="crimson"] {
    --accent: #c02b3f; --accent-text: #a32334; --accent-hi: #d63a4e;
    --accent-lo: #c02b3f; --accent-ink: #ffffff; --accent-wash: rgba(192,43,63,0.10);
    --icon-hi: #c02b3f; --icon-lo: #861e2c;
  }
  html[data-accent="slate"] {
    --accent: #4a5b70; --accent-text: #3c4a5c; --accent-hi: #5a6d85;
    --accent-lo: #4a5b70; --accent-ink: #ffffff; --accent-wash: rgba(74,91,112,0.10);
    --icon-hi: #4a5b70; --icon-lo: #34404e;
  }
  html[data-accent="gold"] {
    --accent: #8a6410; --accent-text: #75540c; --accent-hi: #986e18;
    --accent-lo: #8a6410; --accent-ink: #ffffff; --accent-wash: rgba(138,100,16,0.10);
    --icon-hi: #8a6410; --icon-lo: #61460b;
  }
  html[data-accent="teal"] {
    --accent: #0f7a75; --accent-text: #0c6560; --accent-hi: #12847d;
    --accent-lo: #0f7a75; --accent-ink: #ffffff; --accent-wash: rgba(15,122,117,0.10);
    --icon-hi: #0f7a75; --icon-lo: #0b5552;
  }
  html[data-accent="pink"] {
    --accent: #c3245f; --accent-text: #a51e50; --accent-hi: #d33973;
    --accent-lo: #c3245f; --accent-ink: #ffffff; --accent-wash: rgba(195,36,95,0.10);
    --icon-hi: #c3245f; --icon-lo: #891943;
  }
  html[data-accent="black"] {
    --accent: #111111; --accent-text: #000000; --accent-hi: #2b2b2b;
    --accent-lo: #111111; --accent-ink: #ffffff; --accent-wash: rgba(0,0,0,0.07);
    --icon-hi: #111111; --icon-lo: #0c0c0c;
  }
  @media (prefers-color-scheme: dark){
    html[data-accent="ocean"]:where(:not([data-theme="light"])) {
      --accent: #3f6b91; --accent-text: #8fb6d6; --accent-hi: #4a789f;
      --accent-lo: #365f83; --accent-ink: #eaf2f9; --accent-wash: rgba(63,107,145,0.18);
    }
    html[data-accent="forest"]:where(:not([data-theme="light"])) {
      --accent: #4c7a5c; --accent-text: #9cc4a6; --accent-hi: #56876a;
      --accent-lo: #43704f; --accent-ink: #f4ecd8; --accent-wash: rgba(76,122,92,0.18);
    }
    html[data-accent="plum"]:where(:not([data-theme="light"])) {
      --accent: #c176c6; --accent-text: #d29ad6; --accent-hi: #cd88d1;
      --accent-lo: #ac63b1; --accent-ink: #1d0b1c; --accent-wash: rgba(193,118,198,0.14);
    }
    html[data-accent="crimson"]:where(:not([data-theme="light"])) {
      --accent: #ef6274; --accent-text: var(--accent); --accent-hi: #f57383;
      --accent-lo: #e04f62; --accent-ink: #2e0810; --accent-wash: rgba(239,98,116,0.14);
    }
    html[data-accent="slate"]:where(:not([data-theme="light"])) {
      --accent: #8ea4bf; --accent-text: var(--accent); --accent-hi: #9db1c9;
      --accent-lo: #7d94b1; --accent-ink: #111820; --accent-wash: rgba(142,164,191,0.14);
    }
    html[data-accent="gold"]:where(:not([data-theme="light"])) {
      --accent: #d9a63c; --accent-text: var(--accent); --accent-hi: #e3b451;
      --accent-lo: #c8952f; --accent-ink: #241a04; --accent-wash: rgba(217,166,60,0.14);
    }
    html[data-accent="teal"]:where(:not([data-theme="light"])) {
      --accent: #3fbdb4; --accent-text: var(--accent); --accent-hi: #52c9c0;
      --accent-lo: #33a9a1; --accent-ink: #04231f; --accent-wash: rgba(63,189,180,0.14);
    }
    html[data-accent="pink"]:where(:not([data-theme="light"])) {
      --accent: #f07aa6; --accent-text: var(--accent); --accent-hi: #f58cb4;
      --accent-lo: #dd6894; --accent-ink: #2e0a1a; --accent-wash: rgba(240,122,166,0.14);
    }
    html[data-accent="black"]:where(:not([data-theme="light"])) {
      --accent: #f2f2ef; --accent-text: var(--accent); --accent-hi: #ffffff;
      --accent-lo: #e2e2de; --accent-ink: #141413; --accent-wash: rgba(242,242,239,0.14);
    }
  }
  html[data-theme="dark"][data-accent="ocean"] {
    --accent: #3f6b91; --accent-text: #8fb6d6; --accent-hi: #4a789f;
    --accent-lo: #365f83; --accent-ink: #eaf2f9; --accent-wash: rgba(63,107,145,0.18);
  }
  html[data-theme="dark"][data-accent="forest"] {
    --accent: #4c7a5c; --accent-text: #9cc4a6; --accent-hi: #56876a;
    --accent-lo: #43704f; --accent-ink: #f4ecd8; --accent-wash: rgba(76,122,92,0.18);
  }
  html[data-theme="dark"][data-accent="plum"] {
    --accent: #c176c6; --accent-text: #d29ad6; --accent-hi: #cd88d1;
    --accent-lo: #ac63b1; --accent-ink: #1d0b1c; --accent-wash: rgba(193,118,198,0.14);
  }
  html[data-theme="dark"][data-accent="crimson"] {
    --accent: #ef6274; --accent-text: var(--accent); --accent-hi: #f57383;
    --accent-lo: #e04f62; --accent-ink: #2e0810; --accent-wash: rgba(239,98,116,0.14);
  }
  html[data-theme="dark"][data-accent="slate"] {
    --accent: #8ea4bf; --accent-text: var(--accent); --accent-hi: #9db1c9;
    --accent-lo: #7d94b1; --accent-ink: #111820; --accent-wash: rgba(142,164,191,0.14);
  }
  html[data-theme="dark"][data-accent="gold"] {
    --accent: #d9a63c; --accent-text: var(--accent); --accent-hi: #e3b451;
    --accent-lo: #c8952f; --accent-ink: #241a04; --accent-wash: rgba(217,166,60,0.14);
  }
  html[data-theme="dark"][data-accent="teal"] {
    --accent: #3fbdb4; --accent-text: var(--accent); --accent-hi: #52c9c0;
    --accent-lo: #33a9a1; --accent-ink: #04231f; --accent-wash: rgba(63,189,180,0.14);
  }
  html[data-theme="dark"][data-accent="pink"] {
    --accent: #f07aa6; --accent-text: var(--accent); --accent-hi: #f58cb4;
    --accent-lo: #dd6894; --accent-ink: #2e0a1a; --accent-wash: rgba(240,122,166,0.14);
  }
  html[data-theme="dark"][data-accent="black"] {
    --accent: #f2f2ef; --accent-text: var(--accent); --accent-hi: #ffffff;
    --accent-lo: #e2e2de; --accent-ink: #141413; --accent-wash: rgba(242,242,239,0.14);
  }

  *{box-sizing:border-box;}
  html,body{margin:0;padding:0;background:var(--canvas);color:var(--ink);font-family:var(--font-ui);
    -webkit-tap-highlight-color:transparent;}
  body{min-height:calc(100vh / var(--tz, 1)); overflow-x:hidden;}
  #shell{max-width:480px;margin:0 auto;min-height:calc(100vh / var(--tz, 1));display:flex;flex-direction:column;
    padding-bottom:env(safe-area-inset-bottom);}

  .screen{display:none;flex:1;flex-direction:column;padding:20px 20px 32px;}
  .screen.active{display:flex;animation:screen-in .3s cubic-bezier(.22,1,.36,1);}
  @keyframes screen-in{ from{opacity:0;transform:translateY(10px);} to{opacity:1;transform:none;} }

  h1,h2,h3{margin:0;font-weight:700;letter-spacing:-.02em;}
  p{margin:0;}

  .topbar{display:flex;align-items:center;justify-content:space-between;margin-bottom:18px;min-height:32px;}
  .iconbtn{background:none;border:none;color:var(--ink-muted);font-size:20px;line-height:1;padding:6px;
    cursor:pointer;border-radius:10px;}
  .iconbtn:hover{background:var(--surface-quiet);}

  .card{background:var(--surface);border:1px solid var(--edge);border-radius:16px;padding:16px;
    box-shadow:var(--shadow-card);}
  .card + .card{margin-top:10px;}

  .btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;
    border:none;border-radius:14px;padding:14px 18px;font-size:16px;font-weight:600;
    cursor:pointer;width:100%;font-family:inherit;
    transition:transform .12s ease, box-shadow .12s ease, opacity .12s ease;}
  .btn:active{transform:scale(.97);}
  .btn-primary{background:linear-gradient(180deg,var(--accent-hi),var(--accent-lo));color:var(--accent-ink);
    box-shadow:0 2px 8px var(--accent-wash);}
  .btn-quiet{background:var(--surface-quiet);color:var(--ink);border:1px solid var(--edge);}
  .btn-ghost{background:none;color:var(--accent-text);padding:10px;}
  .btn-row{display:flex;gap:10px;}
  .btn-row .btn{flex:1;}

  .tag{display:inline-block;font-size:12px;font-weight:600;color:var(--accent-text);
    background:var(--accent-wash);border-radius:100px;padding:3px 10px;}
  .muted{color:var(--ink-muted);font-size:14px;}
  .stat{flex:1;text-align:center;}
  .stat .num{font-size:22px;font-weight:700;}
  .stat .lbl{font-size:12px;color:var(--ink-muted);}
  .statrow{display:flex;gap:8px;margin:16px 0;}

  .chiprow{display:flex;flex-wrap:wrap;gap:8px;}
  .chip{border:1px solid var(--edge-strong);background:var(--surface);border-radius:100px;
    padding:10px 16px;font-size:15px;font-weight:600;cursor:pointer;color:var(--ink);font-family:inherit;
    transition:transform .12s ease, background .15s ease, border-color .15s ease;}
  .chip:active{transform:scale(.95);}
  .chip.selected{background:var(--accent);border-color:var(--accent);color:var(--accent-ink);}

  .techrow{display:flex;align-items:center;gap:12px;padding:14px 4px;border-bottom:1px solid var(--edge);
    cursor:pointer;background:none;border-left:none;border-right:none;border-top:none;width:100%;
    text-align:left;font-family:inherit;color:var(--ink);transition:opacity .12s ease;}
  .techrow:active{opacity:.6;}
  .techrow:last-child{border-bottom:none;}
  .techdot{width:10px;height:10px;border-radius:50%;flex:0 0 auto;background:var(--accent);}
  .techdot.meditation{background:var(--ink-muted);}
  .techrow .name{font-weight:600;font-size:15px;}
  .techrow .tagline{font-size:13px;color:var(--ink-muted);margin-top:2px;}
  .sectionlbl{font-size:13px;font-weight:700;text-transform:uppercase;letter-spacing:.04em;
    color:var(--ink-muted);margin:18px 0 6px;}

  .breathwrap{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:28px;}
  .ring-outer{position:relative;width:240px;height:240px;display:flex;align-items:center;justify-content:center;}
  .ring-outer svg{position:absolute;inset:0;transform:rotate(-90deg);}
  .ring-track{fill:none;stroke:var(--edge);stroke-width:6;}
  .ring-progress{fill:none;stroke:var(--accent);stroke-width:6;stroke-linecap:round;
    transition:stroke-dashoffset .3s linear;
    filter:drop-shadow(0 0 5px var(--accent-wash));}
  .orb-halo{position:absolute;inset:0;margin:auto;width:214px;height:214px;border-radius:50%;
    background:radial-gradient(circle, var(--accent-wash), transparent 70%);
    filter:blur(10px);animation:halo-pulse 4.5s ease-in-out infinite;pointer-events:none;}
  @keyframes halo-pulse{0%,100%{opacity:.55;transform:scale(1);}50%{opacity:1;transform:scale(1.1);}}
  .breath-circle{width:150px;height:150px;border-radius:50%;
    background:
      radial-gradient(circle at 32% 26%, rgba(255,255,255,.4), transparent 42%),
      radial-gradient(circle at 35% 30%, var(--accent-hi), var(--accent-lo));
    transform:scale(.55);transition:transform 4s ease-in-out;
    box-shadow:
      0 0 34px 4px var(--accent-wash),
      0 10px 26px rgba(0,0,0,.16),
      inset 0 -10px 22px rgba(0,0,0,.14),
      inset 0 8px 14px rgba(255,255,255,.22);}
  .phase-label{font-size:22px;font-weight:700;text-align:center;}
  .phase-seconds{font-size:15px;color:var(--ink-muted);text-align:center;margin-top:4px;}

  .meditate-wrap{position:relative;width:190px;height:190px;display:flex;align-items:center;justify-content:center;}
  .meditate-ripple{position:absolute;inset:0;border-radius:50%;border:1.5px solid var(--accent);
    opacity:0;animation:med-ripple 4.5s ease-out infinite;pointer-events:none;}
  .meditate-ripple.r2{animation-delay:1.5s;}
  .meditate-ripple.r3{animation-delay:3s;}
  @keyframes med-ripple{0%{transform:scale(.82);opacity:.45;}100%{transform:scale(1.4);opacity:0;}}
  .meditate-circle{width:190px;height:190px;border-radius:50%;
    background:
      radial-gradient(circle at 32% 26%, rgba(255,255,255,.3), transparent 45%),
      radial-gradient(circle at 35% 30%, var(--surface-quiet), var(--surface));
    display:flex;align-items:center;justify-content:center;text-align:center;padding:24px;
    box-shadow:
      0 0 26px 2px var(--accent-wash),
      0 8px 20px rgba(0,0,0,.12),
      inset 0 -8px 18px rgba(0,0,0,.08),
      inset 0 6px 12px rgba(255,255,255,.18);
    animation:med-pulse 6s ease-in-out infinite;}
  @keyframes med-pulse{0%,100%{transform:scale(1);}50%{transform:scale(1.04);}}
  .meditate-text{font-size:16px;line-height:1.4;font-weight:600;}

  #screen-session{position:relative;overflow:hidden;}
  #screen-session::before{
    content:'';position:absolute;inset:-20%;z-index:-1;
    background:
      radial-gradient(circle at 28% 22%, var(--accent-wash), transparent 55%),
      radial-gradient(circle at 72% 78%, var(--accent-wash), transparent 55%);
    filter:blur(50px);
    animation:bg-drift 20s ease-in-out infinite alternate;}
  @keyframes bg-drift{ from{transform:translate(-4%,-3%) scale(1);} to{transform:translate(4%,3%) scale(1.1);} }

  .session-top{display:flex;align-items:center;justify-content:space-between;}
  .progressbar{height:4px;background:var(--edge);border-radius:100px;overflow:hidden;margin:14px 0 0;}
  .progressbar-fill{height:100%;background:var(--accent);width:0%;transition:width .3s linear;}
  .session-controls{display:flex;justify-content:center;gap:22px;margin-top:8px;}
  .togglebtn{background:var(--surface-quiet);border:1px solid var(--edge);border-radius:100px;
    padding:10px 16px;font-size:14px;font-weight:600;color:var(--ink);cursor:pointer;font-family:inherit;
    transition:transform .12s ease, color .15s ease;}
  .togglebtn:active{transform:scale(.95);}
  .togglebtn.off{color:var(--ink-muted);border-style:dashed;opacity:.75;}

  .complete-wrap{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;
    text-align:center;gap:14px;}
  .checkcircle{width:76px;height:76px;border-radius:50%;background:var(--accent-wash);
    display:flex;align-items:center;justify-content:center;font-size:34px;color:var(--accent-text);
    animation:check-pop .4s cubic-bezier(.34,1.56,.64,1) both;}
  @keyframes check-pop{ from{opacity:0;transform:scale(.5);} to{opacity:1;transform:scale(1);} }
  .moodrow{display:flex;gap:10px;justify-content:center;margin-top:6px;}
  .moodbtn{font-size:30px;background:none;border:1px solid var(--edge);border-radius:14px;
    padding:10px 14px;cursor:pointer;transition:transform .12s ease, border-color .15s ease;}
  .moodbtn:active{transform:scale(.92);}
  .moodbtn.selected{border-color:var(--accent);background:var(--accent-wash);}

  .safetynote{font-size:14px;color:var(--ink);background:var(--surface-quiet);
    border-radius:12px;padding:10px 12px;margin-top:12px;}
  /* The crisis line on a line of its own, apart from the general words after it (decision 0134). */
  .safetynote [data-care-line]{display:block;margin:6px 0;font-weight:600;}

  .history-item{display:flex;justify-content:space-between;padding:10px 0;border-bottom:1px solid var(--edge);}
  .history-item:last-child{border-bottom:none;}
  .history-item .hname{font-weight:600;font-size:14px;}
  .history-item .hdate{font-size:12px;color:var(--ink-muted);}

  /* ===== Splash ===== */
  #splash{
    position:fixed;inset:0;z-index:200;
    display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;
    background:linear-gradient(145deg, var(--icon-hi), var(--icon-lo));
    animation:splash-out 0.35s ease 3s forwards;
  }
  html.no-splash #splash{display:none;}
  @keyframes splash-out{ to{ opacity:0; visibility:hidden; pointer-events:none; } }
  .splash-mark{width:88px;height:88px;}
  .splash-ring{fill:none;stroke:var(--icon-mark);opacity:0;transform-origin:44px 44px;}
  .splash-ring-1{stroke-width:5;animation:splash-ring .9s cubic-bezier(.22,1,.36,1) .15s forwards;}
  .splash-ring-2{stroke-width:4.5;animation:splash-ring .9s cubic-bezier(.22,1,.36,1) .40s forwards;}
  @keyframes splash-ring{ from{opacity:0;transform:scale(.5);} to{opacity:.8;transform:scale(1);} }
  .splash-core{fill:var(--icon-mark);opacity:0;animation:splash-core .4s cubic-bezier(.34,1.56,.64,1) .05s forwards;}
  @keyframes splash-core{ from{opacity:0;transform:scale(.4);} to{opacity:1;transform:scale(1);} }
  .splash-name{margin:14px 0 0;font:700 27px/1.35 var(--font-ui);letter-spacing:-.02em;
    color:var(--icon-mark);animation:splash-rise .45s cubic-bezier(.22,1,.36,1) 1.2s both;}
  /* Full cream, not a dimmed one - the Workout Log contrast finding: at 14.5px
     this is body text for the contrast rules, and cream at 88% over the accent
     sits under the 4.5 line. Size and weight already say it is secondary. */
  .splash-tag{margin:0;font-size:14.5px;color:var(--icon-mark);}
  /* One word per beat, on the same clock as Workout Log, Mellow, Meal Log and
     Sleep Log, so the five cards keep time with each other. */
  .splash-tag i{display:inline-block;font-style:normal;
    animation:splash-rise .4s cubic-bezier(.22,1,.36,1) both;}
  .splash-tag i:nth-child(1){animation-delay:1.6s;}
  .splash-tag i:nth-child(2){animation-delay:1.95s;}
  .splash-tag i:nth-child(3){animation-delay:2.3s;}
  @keyframes splash-rise{ from{opacity:0;transform:translateY(6px);} to{opacity:1;transform:none;} }
  @media (prefers-reduced-motion: reduce){
    #splash *{animation:none !important;opacity:1 !important;transform:none !important;}
    .orb-halo, .meditate-ripple, #screen-session::before, .screen.active, .checkcircle{
      animation:none !important;}
  }

  /* ===== Settings sheet ===== */
  .sheet-overlay{position:fixed;inset:0;background:rgba(0,0,0,.35);z-index:90;
    display:none;align-items:flex-end;justify-content:center;}
  .sheet-overlay.open{display:flex;}
  .sheet{background:var(--surface);width:100%;max-width:480px;border-radius:20px 20px 0 0;
    padding:18px 20px calc(20px + env(safe-area-inset-bottom));max-height:calc(80vh / var(--tz, 1));overflow-y:auto;}
  .sheet-handle{width:36px;height:4px;background:var(--edge-strong);border-radius:100px;margin:0 auto 14px;}
  .sheet h3{font-size:16px;margin-bottom:10px;}
  .swatchrow{display:flex;flex-wrap:wrap;gap:10px;margin-bottom:20px;}
  .swatch{width:36px;height:36px;border-radius:50%;border:2px solid transparent;cursor:pointer;
    padding:0;position:relative;}
  .swatch[aria-pressed="true"]{border-color:var(--ink);}
  .swatch[aria-pressed="true"]::after{content:'\2713';position:absolute;inset:0;display:flex;
    align-items:center;justify-content:center;color:#fff;font-size:14px;font-weight:700;
    text-shadow:0 1px 2px rgba(0,0,0,.4);}
  .segmented{display:flex;background:var(--surface-quiet);border-radius:12px;padding:3px;margin-bottom:8px;}
  .segmented button{flex:1;border:none;background:none;padding:8px;border-radius:9px;font-size:14px;
    font-weight:600;color:var(--ink-muted);cursor:pointer;font-family:inherit;}
  .segmented button.active{background:var(--surface);color:var(--ink);
    box-shadow:0 1px 2px var(--edge);}
  .voice-select{width:100%;padding:12px 14px;border-radius:12px;border:1px solid var(--edge-strong);
    background:var(--surface-quiet);color:var(--ink);font-size:14.5px;font-family:inherit;}
  .voice-hint{font-size:12.5px;line-height:1.5;color:var(--ink-muted);margin-top:10px;}
  .voice-hint b{color:var(--ink);font-weight:600;}

  /* The breathing ring in Stillness's own calm teal, as its tile is, not the app's orange
     (first five minutes, round 2, Ana: "like a red record button, not calming"). Mono keeps
     its greys. */
  html:not([data-sky='slate']):not([data-sky='mono']) #still-session{
    --accent:#1f9a8d; --accent-hi:#5ccabd; --accent-lo:#0b6f68; --accent-wash:rgba(37,179,165,.30);}

  /* ===================== The session, full screen, in the theme (decision 0143) =====================
     Craig, 2026-11-16: "choose a better looking, more beautiful theme for the breathing session -
     match the theme they've chose - and instead of putting the timer, breath bubble etc all at
     the top, use the entire screen", and "match the breathing bubble to each theme".
     The page is the theme's own sky at this time of day (copied from Home by js/still.js as
     --sess-sky), with the living glows over it and a soft shade so white type always reads. The
     bubble and its ring take the theme's --orb colours (css/sky.css). */
  #still-session.active{position:fixed;inset:0;z-index:60;display:flex;flex-direction:column;
    padding:calc(env(safe-area-inset-top, 0px) + 14px) 22px calc(env(safe-area-inset-bottom, 0px) + 22px);
    color:#fff;overflow:hidden;
    background:var(--sess-sky, linear-gradient(180deg, #3b3f56, #12141f));}
  #still-session.active::after{content:'';position:absolute;inset:0;pointer-events:none;z-index:0;
    background:linear-gradient(180deg, rgba(10,8,24,.22), rgba(10,8,24,.38));}
  :root[data-theme='dark'] #still-session.active::after{
    background:linear-gradient(180deg, rgba(8,7,20,.48), rgba(8,7,20,.6));}
  @media (prefers-color-scheme: dark){
    :root:not([data-theme='light']) #still-session.active::after{
      background:linear-gradient(180deg, rgba(8,7,20,.48), rgba(8,7,20,.6));}
  }
  #still-session.active > :not(.living){position:relative;z-index:1;}
  #still-session .session-top .iconbtn{color:#fff;}
  #still-session #session-time{color:rgba(255,255,255,.85);font-variant-numeric:tabular-nums;}
  #still-session .progressbar{background:rgba(255,255,255,.18);}
  #still-session .progressbar-fill{background:var(--orb-hi);}

  #still-session .breathwrap{gap:clamp(18px, 4vh, 40px);}
  #still-session .ring-outer{width:min(80vw, 46vh, 420px);height:min(80vw, 46vh, 420px);}
  #still-session .ring-track{stroke:rgba(255,255,255,.16);stroke-width:3;}
  /* No drop-shadow here: on a rotated SVG it drew a faint square around the ring. */
  #still-session .ring-progress{stroke:var(--orb-hi);stroke-width:3.5;filter:none;}
  #still-session .orb-halo{width:92%;height:92%;filter:blur(18px);
    background:radial-gradient(circle, var(--orb-wash), transparent 70%);}
  #still-session .breath-circle{width:64%;height:64%;
    background:
      radial-gradient(circle at 32% 26%, rgba(255,255,255,.55), transparent 42%),
      radial-gradient(circle at 38% 34%, var(--orb-hi), var(--orb-lo) 78%);
    box-shadow:
      0 0 60px 12px var(--orb-wash),
      inset 0 -14px 30px rgba(0,0,0,.16),
      inset 0 10px 20px rgba(255,255,255,.3);}
  #still-session .phase-label{font-size:clamp(26px, 7.5vw, 36px);font-weight:700;letter-spacing:-.01em;
    text-shadow:0 1px 14px rgba(0,0,0,.25);}
  #still-session .phase-seconds{color:rgba(255,255,255,.78);font-size:16px;margin-top:6px;}

  #still-session .meditate-wrap{width:min(62vw, 34vh, 320px);height:min(62vw, 34vh, 320px);}
  #still-session .meditate-ripple{border-color:rgba(255,255,255,.4);}
  #still-session .meditate-circle{width:100%;height:100%;padding:0;
    background:
      radial-gradient(circle at 34% 28%, rgba(255,255,255,.5), transparent 46%),
      radial-gradient(circle at 40% 36%, var(--orb-hi), var(--orb-lo) 82%);
    box-shadow:0 0 70px 16px var(--orb-wash), inset 0 -12px 26px rgba(0,0,0,.14);
    animation:med-breathe 10s ease-in-out infinite;}
  /* About six breaths a minute, the pace a calm body settles to. */
  @keyframes med-breathe{0%,100%{transform:scale(.9);}50%{transform:scale(1.04);}}
  #still-session .meditate-text{color:#fff;font-size:clamp(20px, 5.6vw, 26px);line-height:1.45;
    font-weight:600;text-align:center;max-width:22ch;min-height:4.4em;margin:0 auto;
    text-shadow:0 1px 16px rgba(0,0,0,.3);}
  #still-session .session-controls{margin-top:auto;padding-top:12px;gap:14px;}
  #still-session .togglebtn{color:#fff;background:rgba(255,255,255,.14);border-color:rgba(255,255,255,.24);
    -webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);}
  #still-session .togglebtn.off{color:rgba(255,255,255,.7);}
  @media (prefers-reduced-motion: reduce){
    #still-session .meditate-circle{animation:none;}
  }

  /* The library's selector (decision 0147): one group at a time. */
  .lib-tabs{display:flex;gap:6px;background:var(--surface-quiet);border-radius:14px;padding:4px;margin:6px 0 10px;
    position:sticky;top:0;z-index:2;}
  .lib-tabs button{flex:1;border:0;background:none;border-radius:10px;padding:10px 6px;font:inherit;font-size:14px;
    font-weight:600;color:var(--ink-muted);cursor:pointer;}
  .lib-tabs button[aria-selected="true"]{background:var(--surface);color:var(--ink);box-shadow:0 1px 3px var(--edge);}
  .lib-off{display:none !important;}

  /* Levels (decision 0148): a small, quiet label. */
  .techlvl{display:inline-block;margin-top:5px;font-size:11.5px;font-weight:700;letter-spacing:.02em;
    padding:2px 8px;border-radius:100px;background:var(--surface-quiet);color:var(--ink-muted);border:1px solid var(--edge);}
  .techlvl.lvl-beginner{color:var(--accent-text, var(--accent));}
  .techlvl.lvl-advanced{border-style:dashed;}
  #detail-level{margin-left:8px;vertical-align:middle;}
