/* Sophrosyne Mood Garden
   An iOS app shell (translucent bars, large titles, inset grouped lists) dressed in
   the Sophrosyne brand kit: Literata only, Tint ground with paper grain, three greens
   and ink, the five-disc rosette, small-caps labels. */

/* ---------- Literata, self-hosted so the app keeps its face offline ----------
   SIL Open Font License 1.1, see assets/fonts/OFL.txt. One variable file per
   subset covers every weight the app uses. */
@font-face{font-family:Literata;font-style:normal;font-weight:200 900;font-display:swap;
  src:url(../fonts/literata-latin.woff2) format("woff2");
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:Literata;font-style:normal;font-weight:200 900;font-display:swap;
  src:url(../fonts/literata-latin-ext.woff2) format("woff2");
  unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C4,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:Literata;font-style:normal;font-weight:200 900;font-display:swap;
  src:url(../fonts/literata-greek.woff2) format("woff2");
  unicode-range:U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF}
@font-face{font-family:Literata;font-style:italic;font-weight:200 900;font-display:swap;
  src:url(../fonts/literata-italic-latin.woff2) format("woff2");
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:Literata;font-style:italic;font-weight:200 900;font-display:swap;
  src:url(../fonts/literata-italic-latin-ext.woff2) format("woff2");
  unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C4,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:Literata;font-style:italic;font-weight:200 900;font-display:swap;
  src:url(../fonts/literata-italic-greek.woff2) format("woff2");
  unicode-range:U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF}

/* ---------- brand tokens ---------- */
:root{
  --ground:#EAF3F2; --group:#FFFFFF; --label:#1A2839; --label2:#56636F; --label3:#3E4B5866;
  --sep:#D3E3E1; --fill:#16434314; --accent:#295B61; --moss:#3D6557; --mist:#B2D5D3;
  --btn:#164343; --btn-ink:#FFFFFF; --ico-bg:#DCEBE9; --ico-ink:#164343;
  --bar:rgba(234,243,242,.86); --crisis:#164343; --crisis-edge:transparent; --danger:#A8432F;
  --grain:.05; --rosette:#164343;
  --ui:"Literata", Georgia, "Times New Roman", serif;
  color-scheme:light;
}
@media (prefers-color-scheme:dark){:root:not([data-theme=light]){
  --ground:#0C1A1C; --group:#142628; --label:#EAF3F2; --label2:#A9C3C1; --label3:#B2D5D355;
  --sep:#243B3D; --fill:#B2D5D31F; --accent:#B2D5D3; --moss:#8DB5A6; --mist:#B2D5D3;
  --btn:#B2D5D3; --btn-ink:#0C1A1C; --ico-bg:#21393B; --ico-ink:#B2D5D3;
  --bar:rgba(12,26,28,.84); --crisis:#164343; --crisis-edge:#B2D5D366; --danger:#E08A76;
  --grain:.07; --rosette:#EAF3F2; color-scheme:dark}}
:root[data-theme=dark]{
  --ground:#0C1A1C; --group:#142628; --label:#EAF3F2; --label2:#A9C3C1; --label3:#B2D5D355;
  --sep:#243B3D; --fill:#B2D5D31F; --accent:#B2D5D3; --moss:#8DB5A6; --mist:#B2D5D3;
  --btn:#B2D5D3; --btn-ink:#0C1A1C; --ico-bg:#21393B; --ico-ink:#B2D5D3;
  --bar:rgba(12,26,28,.84); --crisis:#164343; --crisis-edge:#B2D5D366; --danger:#E08A76;
  --grain:.07; --rosette:#EAF3F2; color-scheme:dark}

*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
[hidden]{display:none!important}
html,body{height:100%}
html{scroll-padding-top:env(safe-area-inset-top,0px)}
body{margin:0;background:var(--ground);color:var(--label);font-family:var(--ui);font-size:17px;line-height:1.4;
  -webkit-font-smoothing:antialiased;font-variant-numeric:lining-nums;overflow-wrap:break-word}
/* Paper grain over the whole app, the way the brand prints. */
body::after{content:"";position:fixed;inset:0;pointer-events:none;z-index:30;opacity:var(--grain);
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E")}
/* Opaque strip behind the status bar when installed. */
body::before{content:"";position:fixed;inset:0 0 auto;height:env(safe-area-inset-top,0px);z-index:10;background:var(--ground)}
body.sheet-open{overflow:hidden}
img{max-width:100%}
button{font:inherit;color:inherit;cursor:pointer;background:none;border:none;padding:0}
a{color:var(--accent)}
:focus-visible{outline:3px solid var(--accent);outline-offset:2px;border-radius:10px}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}

.app{max-width:440px;margin:0 auto;min-height:100%;padding-bottom:calc(92px + env(safe-area-inset-bottom,0px))}
.gut{padding-left:max(16px,env(safe-area-inset-left,0px));padding-right:max(16px,env(safe-area-inset-right,0px))}

/* ---------- brand bits ---------- */
.rosette{display:inline-block;flex:none}
.rosette-ink{color:var(--rosette);display:inline-flex}
.brand{display:inline-flex;align-items:center;gap:7px;font-weight:500;font-size:17px;color:var(--label);justify-self:start}
.brand .rosette{width:22px;height:22px}
.swash{position:relative;isolation:isolate;font-style:italic;color:var(--accent);white-space:nowrap}
.swash::after{content:"";position:absolute;left:-3%;right:-5%;bottom:.04em;height:.42em;background:var(--mist);opacity:.75;z-index:-1;
  border-radius:45% 60% 50% 40%/60% 45% 55% 50%;transform:rotate(-1.4deg)}
:root[data-theme=dark] .swash::after{opacity:.28}
@media (prefers-color-scheme:dark){:root:not([data-theme=light]) .swash::after{opacity:.28}}
.brandfoot{margin-top:6px;border-top:1px solid var(--label);padding-top:12px;display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap}
.brandfoot .brand{font-size:14px}
.brandfoot .brand .rosette{width:16px;height:16px}
.foot-help{font-size:13px;color:var(--label2);text-align:left}
.foot-help b{color:var(--label);font-weight:600}

/* ---------- top bar ---------- */
.topbar{position:sticky;top:env(safe-area-inset-top,0px);z-index:8;height:50px;display:grid;
  grid-template-columns:1fr auto 1fr;align-items:center;gap:8px;transition:background .2s,box-shadow .2s}
.topbar.scrolled{background:var(--bar);-webkit-backdrop-filter:saturate(160%) blur(20px);backdrop-filter:saturate(160%) blur(20px);box-shadow:0 .5px 0 var(--sep)}
.topbar .mini{font-weight:600;font-size:16px;opacity:0;transition:opacity .2s;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:46vw}
.topbar.scrolled .mini{opacity:1}
.back{justify-self:start;color:var(--accent);font-size:17px;display:flex;align-items:center;gap:3px}
.back svg{width:11px;height:19px}
.help{justify-self:end;background:var(--crisis);color:#fff;font-size:15px;font-weight:600;border-radius:999px;
  padding:6px 13px 6px 10px;display:flex;align-items:center;gap:6px;box-shadow:0 0 0 1px var(--crisis-edge)}
.help svg{width:16px;height:16px}

/* ---------- titles and views ---------- */
.large{font-size:34px;font-weight:500;letter-spacing:-.012em;line-height:1.12;margin:2px 0 0;text-wrap:balance}
.sub{color:var(--label2);font-size:15px;margin-top:5px}
.dateline{margin:0 0 4px;text-transform:uppercase;font-size:12px;letter-spacing:.16em;color:var(--accent)}
.view{display:flex;flex-direction:column;gap:28px;padding-block:4px 24px}
@keyframes push{from{transform:translateX(24px);opacity:0}to{transform:none;opacity:1}}
.push{animation:push .28s cubic-bezier(.2,.8,.2,1)}

/* ---------- grouped lists ---------- */
.section{display:flex;flex-direction:column;gap:8px}
.sec-h{font-size:12px;color:var(--accent);text-transform:uppercase;letter-spacing:.16em;padding-inline:16px}
.sec-f{font-size:13px;color:var(--label2);padding-inline:16px;line-height:1.45}
.group{background:var(--group);border-radius:14px;overflow:hidden;box-shadow:0 0 0 .5px var(--sep)}
.cell{display:flex;align-items:center;gap:12px;min-height:46px;padding:11px 16px;width:100%;text-align:left;position:relative;color:var(--label);text-decoration:none}
.cell+.cell::before{content:"";position:absolute;top:0;right:0;left:var(--inset,16px);height:.5px;background:var(--sep)}
.cell.icon-row{--inset:60px}
.cell.entry{--inset:62px}
.cell .grow{flex:1;min-width:0}
.cell .t{font-size:17px}
.cell .s{font-size:13.5px;color:var(--label2);margin-top:1px}
.cell .s.larger{font-size:15px}
.cell .val{color:var(--label2);font-size:15px}
.cell .t.strong{font-weight:600}
.cell .t.tinted{color:var(--accent)}
.chev{width:8px;height:14px;flex:none;color:var(--label3)}
.ico{width:32px;height:32px;border-radius:50%;display:grid;place-items:center;flex:none;background:var(--ico-bg);color:var(--ico-ink)}
.ico svg{width:17px;height:17px}
.cell.danger .t{color:var(--danger)}
button.cell:active,a.cell:active{background:var(--fill)}

/* ---------- today ---------- */
.rose-card{background:var(--group);border-radius:16px;padding:18px 18px 16px;display:flex;flex-direction:column;gap:8px;box-shadow:0 0 0 .5px var(--sep)}
.rose-card .cap{font-size:12px;color:var(--accent);display:flex;align-items:center;gap:7px;text-transform:uppercase;letter-spacing:.16em}
.rose-card .cap .rosette{width:14px;height:14px}
.rose-card q{font-style:italic;font-size:19px;line-height:1.45;quotes:none;color:var(--label)}
.rose-card.centered{align-items:center;text-align:center}
.mood-card{background:var(--group);border-radius:18px;padding:22px 18px 18px;display:flex;flex-direction:column;align-items:center;gap:6px;box-shadow:0 0 0 .5px var(--sep)}
.mood-card .q{font-size:21px;font-weight:500;text-align:center;line-height:1.3}
#bigFlower{width:200px;height:200px;max-width:100%}
.mood-name{font-size:28px;font-weight:500;min-height:36px}
.slider-wrap{width:100%;display:flex;flex-direction:column;gap:6px;margin-top:6px}
.ends{display:flex;justify-content:space-between;font-size:13px;color:var(--label2);font-style:italic}
input[type=range]{-webkit-appearance:none;appearance:none;width:100%;height:28px;background:transparent}
input[type=range]::-webkit-slider-runnable-track{height:6px;border-radius:3px;background:var(--mist)}
input[type=range]::-moz-range-track{height:6px;border-radius:3px;background:var(--mist)}
input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;width:28px;height:28px;border-radius:50%;background:#fff;margin-top:-11px;
  box-shadow:0 .5px 4px rgba(0,0,0,.14),0 6px 13px rgba(22,67,67,.18),0 0 0 .5px rgba(0,0,0,.05)}
input[type=range]::-moz-range-thumb{width:28px;height:28px;border-radius:50%;background:#fff;border:none;box-shadow:0 .5px 4px rgba(0,0,0,.14),0 6px 13px rgba(22,67,67,.18)}
.chips{display:flex;flex-wrap:wrap;gap:8px;padding:14px 16px}
.chips.flush{padding:0}
.chip{background:var(--fill);border-radius:999px;padding:7px 14px;font-size:15px;transition:background .15s,color .15s}
.chip[aria-pressed=true]{background:var(--btn);color:var(--btn-ink);font-weight:500}
textarea{display:block;width:100%;min-height:96px;border:none;padding:12px 16px;font:inherit;font-size:17px;background:var(--group);color:var(--label);resize:none}
textarea::placeholder{color:var(--label3);font-style:italic}
textarea:focus{outline:none}
.primary{width:100%;height:52px;border-radius:14px;background:var(--btn);color:var(--btn-ink);font-size:17px;font-weight:600;transition:transform .1s}
.primary:active{transform:scale(.98)}
.primary.plain{background:var(--group);color:var(--accent);box-shadow:0 0 0 .5px var(--sep)}
.primary.small{width:auto;height:40px;padding-inline:18px;font-size:15px;border-radius:12px}
.linkbtn{color:var(--accent);font-size:15px;padding:8px 4px}
.done{background:var(--group);border-radius:16px;padding:22px 18px;display:flex;flex-direction:column;align-items:center;text-align:center;gap:6px;box-shadow:0 0 0 .5px var(--sep)}
.done svg{width:96px;height:96px}
.done h2{font-size:22px;font-weight:500;margin:4px 0 0;text-wrap:balance}
.done p{color:var(--label2);font-size:15px;margin:0}

/* ---------- add to home screen ---------- */
.install-card{background:var(--group);border-radius:16px;padding:16px 18px;box-shadow:0 0 0 .5px var(--sep)}
.install-body{display:flex;flex-direction:column;gap:6px}
.install-t{margin:0;font-size:17px;font-weight:500}
.install-s{margin:0;font-size:14px;color:var(--label2);line-height:1.5}
.install-s b{color:var(--label);font-weight:600}
.install-actions{display:flex;align-items:center;gap:14px;margin-top:8px;flex-wrap:wrap}
.ios-share{display:inline-grid;place-items:center;width:20px;height:20px;vertical-align:-4px;color:var(--accent)}
.ios-share svg{width:17px;height:17px}

/* ---------- tool detail ---------- */
.panel{background:var(--group);border-radius:16px;padding:18px;display:flex;flex-direction:column;gap:12px;box-shadow:0 0 0 .5px var(--sep)}
.panel p{margin:0;line-height:1.5}
.panel.centered{align-items:center;text-align:center}
.panel.tall{padding-block:32px}
.panel .muted{color:var(--label2);font-size:15px}
.panel .fb-q{font-weight:600}
.orb-wrap{display:grid;place-items:center;height:240px}
.orb{width:200px;height:200px;border-radius:50%;background:#B2D5D3;display:grid;place-items:center;transform:scale(.55);
  transition:transform 4s cubic-bezier(.45,0,.55,1);box-shadow:7px 5px 0 #29586126}
.orb span{font-weight:500;font-size:17px;color:#164343;transform:scale(1.4)}
.count{font-size:72px;font-weight:500;color:var(--moss);line-height:1;font-variant-numeric:lining-nums}
.count-label{font-size:20px;font-weight:600}
.dots{display:flex;gap:6px;justify-content:center}
.dots i{width:7px;height:7px;border-radius:50%;background:var(--fill)}
.dots i.on{background:var(--accent)}
.seg{display:grid;grid-template-columns:repeat(3,1fr);background:var(--fill);border-radius:10px;padding:2px;width:100%}
.seg button{border-radius:8px;padding:6px 4px;font-size:13.5px}
.seg button[aria-pressed=true]{background:var(--group);font-weight:600;box-shadow:0 3px 8px rgba(22,67,67,.12)}
.wise-dia{width:100%;max-width:300px}
.wise-dia text{font-size:12px;fill:currentColor;font-family:var(--ui)}
.num{flex:none;width:26px;font-size:16px;font-weight:500;color:var(--moss);font-variant-numeric:tabular-nums lining-nums;padding-top:1px}
.cell.step{align-items:flex-start;--inset:54px}
.cell.step .t{line-height:1.4}
.time{align-self:flex-start;background:var(--fill);border-radius:999px;padding:4px 12px;font-size:13px;color:var(--label2);font-style:italic}
.tool-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}
.tool-head>div{min-width:0}
.favbtn{width:40px;height:40px;border-radius:50%;background:var(--group);box-shadow:0 0 0 .5px var(--sep);display:grid;place-items:center;color:var(--label2);flex:none;margin-top:8px}
.favbtn svg{width:20px;height:20px}
.favbtn svg path{fill:none;stroke:currentColor;stroke-width:1.6;stroke-linejoin:round}
.favbtn[aria-pressed=true]{color:var(--accent)}
.favbtn[aria-pressed=true] svg path{fill:currentColor}
.fb-note{font-size:13px;color:var(--label2)}
.mins{font-size:13px;font-style:italic;white-space:nowrap}

/* Each feeling group gets its own disc treatment, all from the kit palette. */
.ico[data-g],.dot[data-g]{background:var(--d-bg);color:var(--d-ink);box-shadow:var(--d-ring,none)}
[data-g=anx]{--d-bg:#164343;--d-ink:#FFFFFF;--d-ring:0 0 0 1px var(--crisis-edge)}
[data-g=low]{--d-bg:#B2D5D3;--d-ink:#164343}
[data-g=angry]{--d-bg:#3E4B58;--d-ink:#FFFFFF;--d-ring:0 0 0 1px var(--crisis-edge)}
[data-g=lonely]{--d-bg:#FFFFFF;--d-ink:#164343;--d-ring:inset 0 0 0 1.6px #164343}
[data-g=stuck]{--d-bg:#295B61;--d-ink:#B2D5D3;--d-ring:0 0 0 1px var(--crisis-edge)}
[data-g=sleep]{--d-bg:#1A2839;--d-ink:#B2D5D3;--d-ring:0 0 0 1px var(--crisis-edge)}
[data-g=good]{--d-bg:#EAF3F2;--d-ink:#295B61;--d-ring:inset 0 0 0 1.6px #B2D5D3,2.5px 2px 0 #B2D5D3}
.cell.icon-row .ico[data-g]{width:36px;height:36px}
.cell.icon-row .ico[data-g] svg{width:19px;height:19px}
.filter{display:flex;gap:8px;overflow-x:auto;margin-inline:-16px;padding:2px 16px 4px;scrollbar-width:none}
.filter::-webkit-scrollbar{display:none}
.fchip{flex:none;display:inline-flex;align-items:center;gap:7px;background:var(--group);box-shadow:0 0 0 .5px var(--sep);
  border-radius:999px;padding:7px 14px;font-size:15px;white-space:nowrap}
.fchip[aria-pressed=true]{background:var(--btn);color:var(--btn-ink);box-shadow:none}
.dot{width:12px;height:12px;border-radius:50%;display:inline-block}
.fchip[aria-pressed=true] .dot{box-shadow:0 0 0 1.5px var(--btn-ink)}
.src a{color:var(--accent)}

/* ---------- garden ---------- */
.month-head{display:flex;align-items:center;justify-content:space-between;gap:8px}
.month-head .sub{margin-top:0}
.month-nav{display:flex;gap:4px;flex:none}
.month-nav button{width:38px;height:38px;border-radius:50%;display:grid;place-items:center;color:var(--accent);background:var(--group);box-shadow:0 0 0 .5px var(--sep)}
.month-nav button svg{width:9px;height:16px}
.month-nav button:disabled{color:var(--label3);cursor:default;box-shadow:0 0 0 .5px var(--sep);opacity:.6}
.cal-card{background:var(--group);border-radius:16px;padding:14px 10px 10px;box-shadow:0 0 0 .5px var(--sep)}
.cal{display:grid;grid-template-columns:repeat(7,1fr);row-gap:4px;text-align:center}
.dow{font-size:11px;color:var(--accent);letter-spacing:.12em;padding-bottom:6px}
.day{aspect-ratio:1;max-width:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;
  border-radius:12px;font-size:11px;color:var(--label2);font-variant-numeric:tabular-nums}
.day svg{width:64%;height:64%}
.day .n{line-height:1}
.day.empty .n{font-size:15px;color:var(--label)}
.day.today .n{color:var(--accent);font-weight:700}
.day[aria-pressed=true]{background:var(--fill)}
.bar{flex:1;height:6px;border-radius:3px;background:var(--fill);overflow:hidden}
.bar b{display:block;height:100%;background:var(--accent);border-radius:3px}
.bar-label{width:92px;flex:none}
.bar-n{width:20px;text-align:right}

/* ---------- tab bar ---------- */
.tabbar{position:fixed;left:0;right:0;bottom:0;z-index:8;background:var(--bar);
  -webkit-backdrop-filter:saturate(160%) blur(20px);backdrop-filter:saturate(160%) blur(20px);
  box-shadow:0 -.5px 0 var(--sep);padding-bottom:env(safe-area-inset-bottom,0px);
  padding-left:env(safe-area-inset-left,0px);padding-right:env(safe-area-inset-right,0px)}
.tabs{max-width:440px;margin:0 auto;display:grid;grid-template-columns:repeat(4,1fr)}
.tab{display:flex;flex-direction:column;align-items:center;gap:2px;padding:7px 0 9px;font-size:11px;color:var(--label2);opacity:.75}
.tab svg{width:26px;height:26px}
.tab[aria-current=page]{color:var(--accent);opacity:1;font-weight:600}

/* ---------- sheets ---------- */
.scrim{position:fixed;inset:0;z-index:20;background:rgba(12,26,28,.36);display:flex;align-items:flex-end;justify-content:center;animation:fade .2s}
.sheet{width:100%;max-width:440px;background:var(--ground);border-radius:16px 16px 0 0;
  padding-block:8px calc(20px + env(safe-area-inset-bottom,0px));display:flex;flex-direction:column;gap:18px;
  animation:up .3s cubic-bezier(.2,.8,.2,1);max-height:92%;overflow:auto}
/* The sheet is a scrolling flex column, so its children must not shrink to fit.
   Without this a row can be squashed to zero height and vanish silently, which
   is how the Find A Helpline link disappeared for every region that has no
   number of its own. */
.sheet > *{flex:none}
.grabber{width:36px;height:5px;border-radius:3px;background:var(--label3);margin:0 auto}
.sheet h2{font-size:24px;font-weight:500;margin:6px 0 0}
.crisis-row{background:var(--crisis);color:#fff;border-radius:14px;padding:14px 16px;display:flex;align-items:center;
  justify-content:space-between;gap:12px;box-shadow:0 0 0 1px var(--crisis-edge)}
.crisis-row .k{font-size:13px;color:#B2D5D3}
.crisis-row .v{font-size:20px;font-weight:600}
.crisis-row a{color:#164343;background:#B2D5D3;border-radius:999px;padding:7px 15px;font-weight:600;font-size:15px;text-decoration:none}
.crisis-list{display:flex;flex-direction:column;gap:10px}
@keyframes up{from{transform:translateY(100%)}to{transform:none}}
@keyframes fade{from{opacity:0}to{opacity:1}}
.wordmark{font-size:14px;color:var(--label2);text-align:center;padding-top:4px}
.wordmark i{font-weight:400}

@media (prefers-reduced-motion:reduce){
  .push,.scrim,.sheet{animation:none}
  .orb{transition:none}
  *{scroll-behavior:auto!important}
}

/* Vertical rhythm helpers used by the view containers. */
.stack{display:flex;flex-direction:column;gap:28px}
.stack-tight{display:flex;flex-direction:column;gap:22px}

/* ---------- backup ---------- */
.plain-input{width:100%;border:none;background:none;font:inherit;font-size:17px;color:var(--label);padding:0}
.plain-input:focus{outline:none}
.phrase-input{display:block;width:100%;border:none;padding:12px 16px;font:inherit;font-size:17px;
  background:var(--group);color:var(--label);resize:none;line-height:1.6}
.phrase-input:focus{outline:none}
.phrase-input::placeholder{color:var(--label3);font-style:italic}
/* The phrase is numbered so it can be read back a word at a time without
   losing your place, and set in tabular figures so the columns line up. */
.phrase{display:grid;grid-template-columns:repeat(2,1fr);gap:6px 12px;margin:0;padding:16px;
  background:var(--group);border-radius:14px;box-shadow:0 0 0 .5px var(--sep);
  list-style:none;counter-reset:w;font-variant-numeric:tabular-nums}
.phrase li{counter-increment:w;display:flex;align-items:baseline;gap:9px;font-size:17px;font-weight:500}
.phrase li::before{content:counter(w);min-width:1.4em;text-align:right;font-size:12px;font-weight:400;
  color:var(--label3);letter-spacing:.06em}
@media (min-width:380px){.phrase{grid-template-columns:repeat(3,1fr)}}
.primary.danger-btn{background:var(--danger);color:#fff}
#backupBody{display:flex;flex-direction:column;gap:18px}
#backupBody h2{font-size:24px;font-weight:500;margin:6px 0 0}
#backupBody .sub{margin-top:-10px}

/* ---------- crisis region picker ---------- */
.region-row{display:flex;align-items:center;justify-content:space-between;gap:12px;
  background:var(--group);border-radius:14px;padding:10px 16px;box-shadow:0 0 0 .5px var(--sep)}
.region-row label{font-size:12px;color:var(--accent);text-transform:uppercase;letter-spacing:.16em;flex:none}
.region-row select{font:inherit;font-size:16px;color:var(--label);background:none;border:none;
  text-align:right;max-width:62%;padding:4px 0}
.region-row select:focus-visible{outline:3px solid var(--accent);outline-offset:2px;border-radius:8px}

/* ---------- deleting one check-in ---------- */
.rowdel{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;flex:none;
  color:var(--label3);margin-right:-6px}
.rowdel svg{width:18px;height:18px}
.rowdel:active{background:var(--fill);color:var(--danger)}
.cell.confirming{background:var(--fill)}
.confirm-actions{display:flex;gap:8px;flex:none}
.confirm-no,.confirm-yes{border-radius:999px;padding:7px 14px;font-size:15px;font-weight:500}
.confirm-no{background:var(--group);color:var(--label);box-shadow:0 0 0 .5px var(--sep)}
.confirm-yes{background:var(--danger);color:#fff}

/* ---------- footer links ---------- */
.foot-links{display:flex;align-items:center;gap:14px;flex-wrap:wrap;justify-content:flex-end}
.foot-link{font-size:13px;color:var(--accent)}

/* ---------- install help ---------- */
.cell.install-step{align-items:flex-start;--inset:54px}
.cell.install-step .t{line-height:1.4;display:inline-flex;align-items:center;gap:8px;flex-wrap:wrap}
.inline-ico{display:inline-grid;place-items:center;width:26px;height:26px;border-radius:7px;
  background:var(--fill);color:var(--accent);flex:none}
.inline-ico svg{width:16px;height:16px}

/* ---------- desktop: the app as a calm, centred panel ----------
   The app is mobile-first; on a wide screen the 440px column was stranded in a
   large empty field with the tab bar floating loose. Here it becomes an
   intentional composition: a card panel on a slightly deeper canvas, a static
   (non-sticky) top bar, and the bottom bar as a centred nav pill aligned to the
   panel. Colour-mix keeps it correct in light and dark. Nothing below 760px
   changes, so the phone layout is untouched. */
@media (min-width:760px){
  body{background:color-mix(in srgb, var(--ground) 92%, #000);}
  .app{
    max-width:468px;
    margin:44px auto;
    background:var(--ground);
    border-radius:28px;
    box-shadow:0 18px 50px rgba(0,0,0,.20), 0 0 0 .5px var(--sep);
    min-height:0;
    padding-top:6px;
  }
  /* On desktop the card scrolls with the page, so the sticky reveal is not
     needed and would detach the bar from the card top. */
  .topbar{position:static;}
  /* The bottom bar becomes a centred pill matching the panel width. */
  .tabbar{
    left:50%;right:auto;transform:translateX(-50%);
    bottom:28px;
    width:min(468px, calc(100vw - 48px));
    border-radius:20px;
    background:var(--ground);
    box-shadow:0 12px 34px rgba(0,0,0,.22), 0 0 0 .5px var(--sep);
    -webkit-backdrop-filter:none;backdrop-filter:none;
    padding-bottom:0;
  }
  .tabs{max-width:none;}
}
