/* Nunito (SIL Open Font License), bundled so the app works offline and makes no third-party requests */
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 500 900; font-display: swap; src: url(assets/fonts/nunito-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: 'Nunito'; font-style: normal; font-weight: 500 900; font-display: swap; src: url(assets/fonts/nunito-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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* Bearly - pastel winter, living plush. Rounded sans, soft depth, snow light. */
:root {
  --snow: #fbf8ff;
  --paper: #ffffff;
  --mist: #f3edf9;
  --lav: #b9a7e8;
  --lav-deep: #6a55b5;
  --dusk: #f4c6d6;
  --cocoa: #6b4029;
  --cocoa-soft: #a2714f;
  --honey: #e9a93e;
  --honey-soft: #fbe7c1;
  --scarf: #c8322f;
  --pine: #3d7a5d;
  --pine-soft: #dcefe4;
  --ink: #33253a;
  --ink-2: #5e5068;
  --ink-3: #685a74; /* R26 a11y 2: at least 4.97:1 on every paper (was #766882, 4.15 on warm paper) */
  --line: #ece4f3;
  --shadow: 0 1px 2px rgba(24, 18, 30, .06), 0 8px 24px rgba(24, 18, 30, .08);
  --shadow-lg: 0 2px 6px rgba(24, 18, 30, .08), 0 24px 60px rgba(24, 18, 30, .18);
  --r-lg: 28px;
  --r-md: 20px;
  --r-sm: 14px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bot: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
/* a native app: no text-selection or image menus on long press, except where you type */
body { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
input, textarea { -webkit-touch-callout: default; -webkit-user-select: text; user-select: text; }
::placeholder { color: #7a6d83; opacity: 1; }
html, body { margin: 0; height: 100%; }
body {
  font-family: 'Nunito', ui-rounded, system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: #f3edf6;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; padding: 0; }
input, textarea { font: inherit; color: inherit; }
img, video { display: block; max-width: 100%; }
svg { display: block; }

/* ---------- stage: desktop shows a phone, phones show the app ---------- */
.stage { height: 100vh; overflow: clip; display: flex; align-items: center; justify-content: center; gap: 64px; padding: 32px; }
.aside { max-width: 300px; }
.aside-icon { width: 72px; height: 72px; border-radius: 18px; box-shadow: var(--shadow); }
.aside h1 { font-size: 2.75rem; font-weight: 900; letter-spacing: -.02em; margin: 18px 0 6px; }
.aside p { color: var(--ink-2); font-size: 1.0625rem; line-height: 1.5; margin: 0 0 14px; }
.aside-hint { font-size: 0.875rem !important; color: var(--ink-2) !important; }
.phone {
  position: relative; width: 390px; height: 844px; border-radius: 54px; overflow: hidden;
  background: var(--snow); box-shadow: 0 0 0 11px #1d1622, 0 0 0 13px #3a3040, 0 30px 80px rgba(20, 16, 24, .22);
  isolation: isolate; flex: none; transform-origin: center;
}
.notch { position: absolute; top: 11px; left: 50%; transform: translateX(-50%); width: 122px; height: 35px; border-radius: 20px; background: #0d0a10; z-index: 90; pointer-events: none; }
@media (max-width: 760px) {
  .stage { padding: 0; display: block; height: auto; overflow: visible; }
  .aside, .notch { display: none; }
  .phone { width: 100%; height: 100vh; height: 100dvh; border-radius: 0; box-shadow: none; }
  :root { --safe-top: max(env(safe-area-inset-top, 0px), 12px); }
}
@media (min-width: 761px) { :root { --safe-top: 50px; --safe-bot: 18px; } }

.app { position: absolute; inset: 0; overflow: hidden; }
.fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 70; }
.layer { position: absolute; inset: 0; z-index: 60; pointer-events: none; }
.layer > .on { pointer-events: auto; }

/* ---------- generic ---------- */
.screen { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.screen::-webkit-scrollbar { display: none; }
.pad { padding: calc(var(--safe-top) + 12px) 20px calc(var(--safe-bot) + 110px); }
.enter { animation: enter .5s var(--ease) both; }
@keyframes enter { from { opacity: 0; transform: translateY(14px); } }
.stagger > * { animation: enter .55s var(--ease) both; }
.stagger > *:nth-child(2) { animation-delay: .05s; } .stagger > *:nth-child(3) { animation-delay: .1s; }
.stagger > *:nth-child(4) { animation-delay: .15s; } .stagger > *:nth-child(5) { animation-delay: .2s; }
.stagger > *:nth-child(6) { animation-delay: .25s; } .stagger > *:nth-child(7) { animation-delay: .3s; }
.stagger > *:nth-child(n+8) { animation-delay: .35s; }

h2.title { font-size: 1.875rem; font-weight: 900; letter-spacing: -.02em; margin: 6px 0 4px; line-height: 1.1; }
.sub { color: var(--ink-2); font-size: 0.9375rem; line-height: 1.45; margin: 0 0 18px; }
.eyebrow { font-size: 0.75rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--lav-deep); }
.card { background: var(--paper); border-radius: var(--r-md); box-shadow: var(--shadow); padding: 16px; }
.row { display: flex; align-items: center; gap: 12px; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--ink-2); }
.tiny { font-size: 0.75rem; color: var(--ink-3); font-weight: 700; }

.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 56px; border-radius: 18px;
  font-weight: 800; font-size: 1.0625rem; background: var(--cocoa); color: #fff; box-shadow: 0 6px 0 #4a2a19, 0 10px 20px rgba(24, 18, 30, .16);
  transition: transform .15s var(--ease), box-shadow .15s var(--ease), opacity .2s;
}
.btn:active { transform: translateY(4px); box-shadow: 0 2px 0 #4a2a19, 0 4px 10px rgba(24, 18, 30, .14); }
.btn.honey { background: var(--honey); box-shadow: 0 6px 0 #b97d1d, 0 10px 20px rgba(24, 18, 30, .14); color: #3b2508; }
.btn.honey:active { box-shadow: 0 2px 0 #b97d1d; }
.btn.ghost { background: var(--paper); color: var(--ink); box-shadow: 0 0 0 2px var(--line); }
.btn.ghost:active { transform: scale(.98); }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn svg { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.link { font-weight: 800; color: var(--ink-2); font-size: 0.9375rem; padding: 14px; width: 100%; text-align: center; }

.ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: rgba(255, 255, 255, .8); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: var(--shadow); }
.ic svg, .i svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.i { display: inline-grid; place-items: center; }

.pill { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px 0 8px; border-radius: 999px; background: rgba(255, 255, 255, .85); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: var(--shadow); font-weight: 900; font-size: 0.9375rem; }
.pill .dot { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; }
.pill .dot svg { width: 15px; height: 15px; }
.honey-dot { background: var(--honey-soft); color: #8f5c0e; }
.flame-dot { background: #ffe1dc; color: #d9543b; }

/* ---------- onboarding ---------- */
.ob { display: flex; flex-direction: column; min-height: 100%; padding: calc(var(--safe-top) + 10px) 24px calc(var(--safe-bot) + 20px); }
.ob-top { display: flex; align-items: center; gap: 12px; height: 40px; margin-bottom: 8px; }
.ob-back { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: var(--ink-2); }
.ob-back svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.progress { flex: 1; height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; }
.progress i { display: block; height: 100%; width: 100% !important; background: var(--honey); clip-path: inset(0 calc(100% - var(--p, 0%)) 0 0 round 99px); transition: clip-path .6s var(--ease); }
.ob-body { flex: 1; display: flex; flex-direction: column; }
.ob-art { width: 100%; max-width: 280px; margin: 0 auto 8px; aspect-ratio: 1; object-fit: contain; }
.ob-art.sm { max-width: 190px; }
.ob h2 { font-size: 1.75rem; font-weight: 900; letter-spacing: -.02em; line-height: 1.12; margin: 8px 0 8px; text-align: center; }
.ob p.lead { text-align: center; color: var(--ink-2); font-size: 1rem; line-height: 1.45; margin: 0 0 20px; }
.ob-foot { display: grid; gap: 4px; margin-top: auto; padding-top: 16px; }
.float { animation: float 4s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-8px); } }

.splash { background: #f6eefa; }
.brand { text-align: center; margin-top: 8px; }
.brand b { display: block; font-size: 2.875rem; font-weight: 900; letter-spacing: -.03em; color: var(--cocoa); }
.brand span { font-size: 1.0625rem; color: var(--ink-2); font-weight: 700; }
.snowfield { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }

.den-wrap { position: relative; width: 100%; max-width: 330px; margin: 6px auto 0; aspect-ratio: 1; border-radius: 32px; overflow: hidden; box-shadow: var(--shadow); background: #e9e8f6; }
.den-wrap img, .den-wrap video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.den-wrap video { opacity: 0; transition: opacity .35s; }
.den-wrap.waking video { opacity: 1; }
.den-wrap.shake img { animation: shake .45s var(--ease); }
@keyframes shake { 20% { transform: rotate(-2deg) scale(1.02); } 40% { transform: rotate(2deg) scale(1.03); } 60% { transform: rotate(-1deg); } 80% { transform: rotate(1deg); } }
.taps { display: flex; gap: 10px; justify-content: center; margin: 16px 0 0; }
.taps i { width: 12px; height: 12px; border-radius: 50%; background: var(--line); transition: background .3s, transform .3s var(--spring); }
.taps i.on { background: var(--honey); transform: scale(1.25); }
.zzz { position: absolute; top: 16%; right: 22%; font-weight: 900; color: #fff; font-size: 1.375rem; text-shadow: 0 2px 6px rgba(24, 18, 30, .35); animation: zzz 2.6s ease-in-out infinite; pointer-events: none; }
@keyframes zzz { 0% { opacity: 0; transform: translate(0, 10px) scale(.7); } 30% { opacity: 1; } 100% { opacity: 0; transform: translate(14px, -30px) scale(1.2); } }

.field { width: 100%; height: 60px; border-radius: 18px; border: 2px solid var(--line); background: var(--paper); padding: 0 18px; font-size: 1.25rem; font-weight: 800; outline: none; text-align: center; transition: border-color .2s; }
.field:focus { border-color: var(--lav); }
textarea.field { height: 140px; padding: 16px; text-align: left; font-size: 1.0625rem; font-weight: 600; resize: none; line-height: 1.45; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 10px 16px; border-radius: 16px; background: var(--paper); box-shadow: 0 0 0 2px var(--line); font-weight: 800; font-size: 0.9375rem; transition: all .2s var(--ease); }
.chip .i svg { width: 18px; height: 18px; }
.chip.on { background: #f3eefe; box-shadow: 0 0 0 2px var(--lav-deep); color: var(--lav-deep); transform: scale(1.03); }

.choices { display: grid; gap: 12px; }
.choice { display: flex; align-items: center; gap: 14px; padding: 12px 16px 12px 12px; border-radius: 20px; background: var(--paper); box-shadow: 0 0 0 2px var(--line); text-align: left; transition: all .2s var(--ease); }
.choice img { width: 64px; height: 64px; flex: none; object-fit: contain; object-position: center bottom; border-radius: 14px; background: var(--mist); }
.choice b { display: block; font-size: 1.0625rem; font-weight: 900; }
.choice span { font-size: 0.875rem; color: var(--ink-2); font-weight: 600; }
.choice.on { box-shadow: 0 0 0 3px var(--honey); background: #fffaf0; }
.choice .face { width: 64px; height: 64px; border-radius: 14px; background-size: 200% auto; background-repeat: no-repeat; }

.plan { display: grid; gap: 10px; }
.plan .goal { animation: pop .5s var(--spring) both; }
@keyframes pop { from { opacity: 0; transform: scale(.85) translateY(10px); } }

.commit-days { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 18px; }
.commit-days button { height: 76px; border-radius: 18px; background: var(--paper); box-shadow: 0 0 0 2px var(--line); font-weight: 900; font-size: 1.5rem; display: grid; place-content: center; line-height: 1; }
.commit-days button small { display: block; font-size: 0.75rem; color: var(--ink-3); margin-top: 4px; font-weight: 800; }
.commit-days button.on { box-shadow: 0 0 0 3px var(--honey); background: #fffaf0; color: #9a5f06; }
.hold { position: relative; width: 132px; height: 132px; margin: 6px auto 4px; border-radius: 50%; display: grid; place-items: center; background: var(--paper); box-shadow: var(--shadow); touch-action: none; user-select: none; -webkit-user-select: none; }
.hold svg.ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.hold svg.ring circle { fill: none; stroke-width: 8; }
.hold .paw { width: 64px; height: 64px; color: var(--cocoa); transition: transform .2s var(--spring); }
.hold.pressing .paw { transform: scale(.88); }
.hold.done { background: var(--honey-soft); }

.times { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.time { padding: 18px 14px; border-radius: 20px; background: var(--paper); box-shadow: 0 0 0 2px var(--line); text-align: left; }
.time b { display: block; font-size: 1.375rem; font-weight: 900; margin-top: 6px; }
.time span { font-size: 0.8125rem; color: var(--ink-2); font-weight: 700; }
.time .i { width: 40px; height: 40px; border-radius: 12px; background: var(--mist); color: var(--lav-deep); }
.time.on { box-shadow: 0 0 0 3px var(--honey); background: #fffaf0; }

/* paywall */
.paywall { background: #fdf3e6; }
.pw-badge { align-self: center; font-size: 0.8125rem; font-weight: 900; color: #fff; background: var(--scarf); padding: 6px 12px; border-radius: 99px; letter-spacing: .02em; }
#pwBody .pw-lead { text-align: center; color: var(--ink-2); font-size: 0.9375rem; margin: 0 0 10px; }
.timeline { position: relative; display: grid; gap: 14px; margin: 14px 0 16px; padding-left: 4px; }
.timeline::before { content: ''; position: absolute; left: 22px; top: 22px; bottom: 22px; width: 8px; border-radius: 8px; background: #f7d9a3; }
.tl { position: relative; display: flex; gap: 14px; align-items: flex-start; }
.tl .i { position: relative; z-index: 1; width: 44px; height: 44px; flex: none; border-radius: 50%; background: var(--honey); color: #fff; box-shadow: 0 0 0 4px #fdf5ea; }
.tl:nth-child(2) .i { background: #f0c16f; } .tl:nth-child(3) .i { background: #d8cde4; color: var(--ink-2); }
.tl b { display: block; font-size: 1.0625rem; font-weight: 900; margin-top: 2px; }
.tl span { font-size: 0.875rem; color: var(--ink-2); line-height: 1.4; font-weight: 600; }
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.plan-opt { position: relative; padding: 14px; border-radius: 18px; background: var(--paper); box-shadow: 0 0 0 2px var(--line); text-align: left; }
.plan-opt b { display: block; font-weight: 900; font-size: 1rem; }
.plan-opt span { font-size: 0.8125rem; color: var(--ink-2); font-weight: 700; }
.plan-opt em { position: absolute; top: -10px; right: 10px; font-style: normal; font-size: 0.6875rem; font-weight: 900; color: #fff; background: var(--pine); padding: 3px 8px; border-radius: 99px; }
.plan-opt.on { box-shadow: 0 0 0 3px var(--honey); background: #fffaf0; }

/* ---------- home ---------- */
.home { background: var(--snow); }
.scene { position: relative; height: min(470px, 56vh); overflow: hidden; background: #e8dcef; }
.scene video, .scene .still { position: absolute; left: 0; top: -66px; width: 100%; height: auto; min-height: calc(100% + 66px); object-fit: cover; object-position: 50% 0; }
.scene .react { opacity: 0; transition: opacity .25s; }
.scene .react.on { opacity: 1; }
.scene-tint { position: absolute; inset: 0; pointer-events: none; transition: background 1s; mix-blend-mode: multiply; }
.scene[data-tod="dawn"] .scene-tint { background: linear-gradient(180deg, rgba(255, 190, 170, .25), transparent 60%); }
.scene[data-tod="day"] .scene-tint { background: linear-gradient(180deg, rgba(190, 220, 255, .18), transparent 60%); }
.scene[data-tod="night"] .scene-tint { mix-blend-mode: normal; background: linear-gradient(180deg, rgba(22, 18, 70, .72) 0%, rgba(38, 30, 96, .5) 45%, rgba(46, 38, 110, .32) 75%, rgba(46, 38, 110, .2)); }
.scene[data-tod="night"] .frost { box-shadow: inset 0 0 80px 22px rgba(150, 160, 230, .35); }
.scene[data-tod="night"] .aurora { inset: -10% -10% 65% -10%; }
.scene[data-tod="night"] .aurora.on { opacity: 1; }
.scene[data-tod="dusk"] .scene-tint { background: linear-gradient(180deg, rgba(255, 170, 190, .22), transparent 60%); }
.frost { position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 80px 22px rgba(235, 245, 255, .85); transition: opacity 1.2s var(--ease); }
.aurora { position: absolute; inset: -20% -10% 55% -10%; pointer-events: none; opacity: 0; filter: blur(22px); mix-blend-mode: screen; transition: opacity 1.4s;
  background: radial-gradient(40% 60% at 30% 60%, rgba(120, 255, 190, .8), transparent 70%), radial-gradient(40% 50% at 70% 50%, rgba(255, 130, 220, .6), transparent 70%), radial-gradient(35% 50% at 50% 30%, rgba(140, 180, 255, .7), transparent 70%);
  animation: aurora 12s ease-in-out 4 alternate; }
.aurora.on { opacity: .85; }
@keyframes aurora { 50% { transform: translateX(8%) skewX(-8deg) scaleY(1.15); } 100% { transform: translateX(-6%) skewX(6deg); } }
.lights { position: absolute; z-index: 2; left: -10px; right: -10px; top: calc(var(--safe-top) + 40px); height: 70px; pointer-events: none; opacity: 0; transition: opacity 1s; }
.lights.on { opacity: 1; }
.lights .bulb { animation: twinkle 2.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.lantern { position: absolute; z-index: 2; width: 38px; bottom: 110px; pointer-events: none; opacity: 0; transition: opacity 1s; filter: drop-shadow(0 0 14px rgba(255, 190, 90, .9)); animation: sway 5s ease-in-out infinite; transform-origin: top center; }
.lantern.on { opacity: 1; }
@keyframes sway { 50% { transform: rotate(4deg); } }
.hearts-fx { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.hearts-fx i { position: absolute; bottom: 30%; font-style: normal; color: #ff8fb1; opacity: 0; animation: rise 6s ease-in infinite; }
@keyframes rise { 0% { opacity: 0; transform: translateY(0) scale(.6); } 20% { opacity: .9; } 100% { opacity: 0; transform: translateY(-220px) translateX(20px) scale(1.1); } }
.scene-top { position: absolute; left: 0; right: 0; top: calc(var(--safe-top) + 4px); display: flex; align-items: center; gap: 8px; padding: 0 16px; z-index: 4; }
.scene-top .spacer { flex: 1; }
.tapzone { position: absolute; left: 10%; right: 10%; top: 40%; height: 48%; z-index: 2; border-radius: 40%; }
.bubble {
  position: absolute; left: 50%; top: calc(var(--safe-top) + 58px); transform: translateX(-50%) scale(.9); z-index: 4; max-width: 290px; width: max-content;
  padding: 10px 14px; border-radius: 18px; background: rgba(255, 255, 255, .95); box-shadow: var(--shadow); font-weight: 800; font-size: 0.9375rem; line-height: 1.35; text-align: center;
  opacity: 0; transition: opacity .3s, transform .35s var(--spring); pointer-events: none;
}
.bubble::after { content: ''; position: absolute; left: 50%; bottom: -7px; width: 14px; height: 14px; background: inherit; transform: translateX(-50%) rotate(45deg); border-radius: 3px; }
.bubble.on { opacity: 1; transform: translateX(-50%) scale(1); }
.bubble b { color: var(--cocoa); }
.bubble b.bella { color: var(--scarf); }

.away { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; background: rgba(245, 240, 252, .55); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); text-align: center; padding: 30px; }
.away .card { max-width: 280px; }
.away h3 { margin: 10px 0 4px; font-size: 1.25rem; font-weight: 900; }
.sled { font-size: 0; width: 76px; height: 76px; margin: 0 auto; border-radius: 22px; display: grid; place-items: center; background: var(--honey-soft); color: #8f5c0e; animation: float 2.4s ease-in-out 3; }
.sled svg { width: 40px; height: 40px; }
.countdown { font-size: 2.125rem; font-weight: 900; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }

.sheet-body { position: relative; margin-top: -34px; border-radius: 30px 30px 0 0; background: var(--snow); padding: 18px 18px calc(var(--safe-bot) + 110px); z-index: 5; }
.warm { padding: 14px 16px; }
.warm-top { display: flex; align-items: center; gap: 10px; }
.warm-top .i { width: 36px; height: 36px; border-radius: 12px; background: #ffe7d6; color: #e2702f; flex: none; }
.warm-top b { font-weight: 900; font-size: 0.9375rem; }
.warm-top span { font-size: 0.8125rem; color: var(--ink-2); font-weight: 700; }
.bar { position: relative; height: 14px; margin-top: 10px; border-radius: 99px; background: #f4ebf6; overflow: hidden; }
.bar i { position: absolute; inset: 0; background: #f39a7a; clip-path: inset(0 calc(100% - var(--p, 0%)) 0 0 round 99px); transition: clip-path .9s var(--ease); }
.bar-label { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-size: 0.625rem; font-weight: 900; color: rgba(60, 30, 50, .6); }

.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 14px 0 6px; }
.quick button { display: grid; justify-items: center; gap: 6px; padding: 12px 4px 10px; border-radius: 18px; background: var(--paper); box-shadow: var(--shadow); font-size: 0.75rem; font-weight: 800; color: var(--ink-2); transition: transform .15s var(--ease); }
.quick button:active { transform: scale(.94); }
.quick .i { width: 40px; height: 40px; border-radius: 14px; }
.q-mood .i { background: #e6f1ff; color: #4f7fd6; } .q-breathe .i { background: var(--pine-soft); color: var(--pine); }
.q-note .i { background: #fdeaf1; color: #cf4f7e; } .q-night .i { background: #ece8ff; color: var(--lav-deep); }

.sec-h { display: flex; align-items: center; justify-content: space-between; margin: 20px 2px 10px; }
.sec-h h3 { margin: 0; font-size: 1.125rem; font-weight: 900; }
.sec-h .tiny { font-size: 0.8125rem; }
.add { display: inline-flex; align-items: center; gap: 4px; font-weight: 900; font-size: 0.875rem; color: var(--lav-deep); min-height: 40px; padding: 6px 12px; border-radius: 12px; background: #f1ecfd; }
.add svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; }
.slot { font-size: 0.75rem; font-weight: 900; color: var(--ink-3); letter-spacing: .06em; text-transform: uppercase; margin: 14px 4px 8px; display: flex; align-items: center; gap: 6px; }
.slot svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.4; }

.goals { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.goal { display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 12px; border-radius: 20px; background: var(--paper); box-shadow: var(--shadow); text-align: left; width: 100%; transition: transform .2s var(--ease), opacity .3s; }
.goal:has(.gmain:active) { transform: scale(.985); }
.gmain { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; text-align: left; background: none; padding: 0; color: inherit; font: inherit; }
.gmain .grow { min-width: 0; }
.goal > .check { width: 44px; height: 44px; }
.check:active { transform: scale(.9); }
.honey-t { color: #8f5c0e !important; }
.goal .gi { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; flex: none; }
.goal .gi svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.goal b { display: block; font-weight: 800; font-size: 1rem; overflow-wrap: anywhere; }
.goal small { font-size: 0.75rem; font-weight: 800; color: var(--ink-3); display: flex; gap: 8px; margin-top: 2px; }
.goal small span { display: inline-flex; align-items: center; gap: 3px; }
.goal small svg { width: 12px; height: 12px; }
.check { width: 40px; height: 40px; border-radius: 14px; flex: none; display: grid; place-items: center; box-shadow: inset 0 0 0 2px var(--line); color: transparent; transition: all .3s var(--spring); }
.check svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.goal.done b { opacity: .75; }
.goal.done b { text-decoration: line-through; text-decoration-thickness: 2px; text-decoration-color: var(--ink-3); }
.goal.done .check { background: var(--pine); box-shadow: none; color: #fff; transform: scale(1.02); }
.goal.skip .check, .goal.snooze .check { box-shadow: inset 0 0 0 2px var(--line); color: var(--ink-2); background: var(--mist); }
.goal.skip b { opacity: .75; }
.c-sun { background: #fff3d6; color: #b06f00; } .c-water { background: #e2f0ff; color: #3d82d8; } .c-tooth { background: #eaf7f2; color: #3f9a7a; }
.c-move { background: #ffe8e1; color: #c4512f; } .c-mind { background: #efe9ff; color: #7a60d0; } .c-heart { background: #ffe7f0; color: #d24f82; }
.c-sleep { background: #e7e9ff; color: #5b62c9; } .c-leaf { background: #e5f5e7; color: #4e9a58; }
.all-done { text-align: center; padding: 18px; }
.all-done img { width: 150px; margin: 0 auto; }
.all-done b { display: block; font-size: 1.125rem; font-weight: 900; }

.buddy { display: flex; gap: 12px; align-items: center; margin-top: 16px; padding: 14px; border-radius: 22px; background: #eaf4ef; }
.buddy img { width: 84px; height: 84px; object-fit: contain; flex: none; }
.buddy b { font-weight: 900; font-size: 1rem; display: block; }
.buddy p { margin: 2px 0 10px; font-size: 0.8125rem; color: var(--ink-2); font-weight: 600; line-height: 1.35; }
.buddy button { height: 40px; padding: 0 14px; border-radius: 12px; background: #fff; font-weight: 900; font-size: 0.8125rem; box-shadow: var(--shadow); }

/* ---------- tab bar ---------- */
.tabs { position: absolute; left: 12px; right: 12px; bottom: calc(var(--safe-bot) + 10px); height: 70px; z-index: 50; display: grid; grid-template-columns: repeat(5, 1fr); padding: 6px; border-radius: 26px;
  background: rgba(255, 255, 255, .88); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); box-shadow: var(--shadow-lg); }
.tab { display: grid; justify-items: center; align-content: center; gap: 3px; border-radius: 20px; font-size: 0.6875rem; font-weight: 900; color: var(--ink-3); transition: color .2s, background .25s; position: relative; }
.tab svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s var(--spring); }
.tab.on { color: var(--cocoa); background: #f6eef4; }
.tab.on svg { transform: translateY(-1px) scale(1.08); }
.tab .badge { position: absolute; top: 6px; right: calc(50% - 20px); width: 9px; height: 9px; border-radius: 50%; background: var(--scarf); box-shadow: 0 0 0 2px #fff; }

/* ---------- sheets & modals ---------- */
.scrim { position: absolute; inset: 0; background: rgba(40, 25, 50, .38); opacity: 0; transition: opacity .3s; }
.scrim.on { opacity: 1; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; max-height: 92%; overflow-y: auto; background: var(--snow); border-radius: 30px 30px 0 0; padding: 10px 20px calc(var(--safe-bot) + 24px); transform: translateY(105%); transition: transform .45s var(--ease); box-shadow: var(--shadow-lg); scrollbar-width: none; }
.sheet.on { transform: translateY(0); }
.grab { width: 44px; height: 5px; border-radius: 5px; background: var(--line); margin: 0 auto 14px; }
.sheet h3 { margin: 4px 0 4px; font-size: 1.375rem; font-weight: 900; text-align: center; letter-spacing: -.01em; }
.sheet .sub { text-align: center; }
.act-goal { text-align: center; }
.act-goal .gi { width: 64px; height: 64px; border-radius: 20px; margin: 4px auto 10px; }
.act-goal .gi svg { width: 32px; height: 32px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.acts { display: grid; grid-template-columns: 1fr 1.4fr 1fr; gap: 10px; margin-top: 18px; }
.acts button { display: grid; justify-items: center; gap: 6px; padding: 14px 6px; border-radius: 20px; background: var(--paper); box-shadow: var(--shadow); font-weight: 900; font-size: 0.8125rem; color: var(--ink-2); }
.acts button .i { width: 44px; height: 44px; border-radius: 14px; background: var(--mist); }
.acts button.main { background: var(--pine); color: #fff; box-shadow: 0 6px 0 #386650, 0 10px 20px rgba(24, 18, 30, .14); }
.acts button.main .i { background: rgba(255, 255, 255, .2); }
.acts button.main svg { width: 28px; height: 28px; stroke-width: 3; }

.moods { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 16px 0; }
.mood { display: grid; justify-items: center; gap: 6px; padding: 12px 2px; border-radius: 18px; background: var(--paper); box-shadow: 0 0 0 2px var(--line); font-size: 0.75rem; font-weight: 900; color: var(--ink-2); transition: all .2s var(--spring); }
.mood svg { width: 34px; height: 34px; }
.mood.on { box-shadow: 0 0 0 3px var(--lav-deep); transform: translateY(-3px); color: var(--lav-deep); background: #f6f2ff; }
.reply { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 20px; background: #fff; box-shadow: var(--shadow); margin: 6px 0 14px; animation: pop .45s var(--spring) both; }
.reply img { width: 86px; height: 86px; object-fit: contain; flex: none; }
.reply p { margin: 0; font-weight: 700; font-size: 0.9375rem; line-height: 1.4; }
.reply p b { color: var(--cocoa); }
.reply p b.bella { color: var(--scarf); }

.breathe { overflow-x: hidden; position: absolute; inset: 0; background: #3b3470; color: #fff; display: flex; flex-direction: column; align-items: center; padding: calc(var(--safe-top) + 16px) 24px calc(var(--safe-bot) + 26px); opacity: 0; transition: opacity .5s; overflow: hidden; }
.breathe.on { opacity: 1; }
.breathe .close { align-self: flex-end; background: rgba(255, 255, 255, .15); color: #fff; box-shadow: none; }
.breathe .orb { position: relative; width: 280px; height: 280px; margin: auto 0 18px; display: grid; place-items: center; }
.breathe .orb::before { content: ''; position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle, rgba(255, 214, 170, .55), rgba(255, 170, 200, .15) 60%, transparent 70%); transform: scale(var(--s, .7)); transition: transform var(--d, 4s) ease-in-out; }
.breathe .orb img { position: relative; width: 210px; transform: scale(var(--s2, .92)); transition: transform var(--d, 4s) ease-in-out; filter: drop-shadow(0 20px 30px rgba(0, 0, 0, .3)); }
.breathe h3 { font-size: 1.75rem; font-weight: 900; margin: 0; letter-spacing: -.01em; flex: none; text-align: center; }
.breathe p { opacity: .85; font-weight: 700; margin: 6px 0 auto; text-align: center; }
.breathe .count { font-size: 4rem; font-weight: 900; opacity: .9; font-variant-numeric: tabular-nums; }
.stars { position: absolute; inset: 0; pointer-events: none; background-image: radial-gradient(1.5px 1.5px at 20% 30%, #fff, transparent), radial-gradient(1px 1px at 70% 20%, #fff, transparent), radial-gradient(1.5px 1.5px at 40% 70%, #fff, transparent), radial-gradient(1px 1px at 85% 60%, #fff, transparent), radial-gradient(1px 1px at 10% 85%, #fff, transparent), radial-gradient(1.5px 1.5px at 60% 45%, #fff, transparent); opacity: .6; }

.full { position: absolute; inset: 0; background: var(--snow); opacity: 0; transform: translateY(20px); transition: opacity .4s, transform .45s var(--ease); overflow-y: auto; }
.full.on { opacity: 1; transform: none; }

/* postcard reveal */
.reveal { position: absolute; inset: 0; display: grid; place-items: center; background: #f7ecf3; opacity: 0; transition: opacity .4s; padding: 24px; }
.reveal.on { opacity: 1; }
.reveal-inner { width: 100%; max-width: 330px; text-align: center; }
.flip { perspective: 1200px; width: 100%; aspect-ratio: 3 / 4; margin: 10px auto 18px; cursor: pointer; }
.flip-in { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .9s var(--ease); }
.flip.back .flip-in { transform: rotateY(180deg); }
.face-f, .face-b { position: absolute; inset: 0; border-radius: 22px; overflow: hidden; backface-visibility: hidden; -webkit-backface-visibility: hidden; box-shadow: var(--shadow-lg); }
.face-f { background: #fff; padding: 10px 10px 40px; }
.face-f img { width: 100%; height: 100%; object-fit: cover; border-radius: 14px; }
.face-f span { position: absolute; left: 0; right: 0; bottom: 10px; font-weight: 900; font-size: 0.9375rem; }
.face-b { overscroll-behavior: auto; transform: rotateY(180deg); background: #fffdf8 repeating-linear-gradient(180deg, transparent 0 31px, #efe3d4 31px 32px); padding: 32px 22px 22px; text-align: left; font-size: 1rem; line-height: 32px; font-weight: 700; color: #4b3a2e; }
.face-b .stamp { float: right; width: 62px; height: 74px; margin: 0 0 8px 10px; border: 3px dashed #e3c9a8; border-radius: 6px; overflow: hidden; }
.face-b .stamp img { width: 100%; height: 100%; object-fit: cover; }
.face-b .sig { font-weight: 900; color: var(--cocoa); }
.seal { animation: seal 1s var(--spring) both .2s; }
@keyframes seal { from { transform: scale(.3) rotate(-10deg); opacity: 0; } }

/* ---------- journey ---------- */
.adv-now { position: relative; overflow: hidden; border-radius: 26px; padding: 18px; color: #fff; background: #5b4a9e; box-shadow: var(--shadow-lg); }
.adv-now h3 { margin: 6px 0 2px; font-size: 1.375rem; font-weight: 900; max-width: 62%; line-height: 1.15; position: relative; z-index: 1; }
.adv-now p { margin: 0 0 12px; opacity: 1; font-weight: 700; font-size: 0.875rem; }
.adv-now .bar { background: rgba(255, 255, 255, .25); }
.adv-now img { position: absolute; right: -22px; bottom: -14px; width: 138px; opacity: .95; }
.adv-now .eyebrow { color: rgba(255, 255, 255, .95); }
.trail { position: relative; margin: 26px 0 8px; display: grid; gap: 18px; }
.trail::before { content: ''; position: absolute; left: 35px; top: 30px; bottom: 30px; width: 0; border-left: 4px dashed var(--lav); }
.stop { position: relative; display: flex; gap: 14px; align-items: center; text-align: left; width: 100%; }
.stop .thumb { position: relative; z-index: 1; width: 74px; height: 74px; border-radius: 22px; overflow: hidden; flex: none; box-shadow: 0 0 0 4px var(--snow), var(--shadow); background: var(--mist); display: grid; place-items: center; color: var(--ink-3); }
.stop .thumb img { width: 100%; height: 100%; object-fit: cover; }
.stop .thumb svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 2; }
.stop.locked .thumb img { filter: blur(8px) grayscale(.6) brightness(1.1); transform: scale(1.2); }
.stop b { display: block; font-weight: 900; font-size: 1rem; }
.stop span { font-size: 0.8125rem; color: var(--ink-2); font-weight: 700; }
.stop.next .thumb { box-shadow: 0 0 0 4px var(--snow), 0 0 0 7px var(--honey); }
.tag { display: inline-block; font-size: 0.6875rem; font-weight: 900; padding: 3px 8px; border-radius: 99px; background: var(--pine-soft); color: var(--pine); margin-top: 4px; }
.tag.next { background: var(--honey-soft); color: #9a5f06; }
.tag.lock { background: var(--mist); color: var(--ink-3); }

/* ---------- shop ---------- */
.shop-hero { display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: 24px; background: #fff1e6; margin-bottom: 16px; }
.shop-hero img { width: 90px; flex: none; }
.shop-hero b { display: block; font-size: 1.0625rem; font-weight: 900; }
.shop-hero p { margin: 2px 0 0; font-size: 0.8125rem; color: var(--ink-2); font-weight: 600; line-height: 1.4; }
.seg { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 16px; background: var(--mist); margin-bottom: 14px; }
.seg button { height: 44px; border-radius: 12px; font-weight: 900; font-size: 0.875rem; color: var(--ink-2); transition: all .25s var(--ease); }
.seg button.on { background: #fff; color: var(--ink); box-shadow: var(--shadow), inset 0 -3px 0 var(--cocoa); }
.items { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.item { position: relative; padding: 14px; border-radius: 22px; background: var(--paper); box-shadow: var(--shadow); text-align: left; display: flex; flex-direction: column; gap: 6px; transition: transform .2s var(--ease); }
.item:active { transform: scale(.97); }
.item .art { height: 86px; border-radius: 16px; display: grid; place-items: center; overflow: hidden; }
.item .art svg { width: 66px; height: 66px; }
.item b { font-weight: 900; font-size: 0.9375rem; }
.item span { font-size: 0.75rem; color: var(--ink-2); font-weight: 700; line-height: 1.35; }
.price { margin-top: auto; display: inline-flex; align-items: center; justify-content: center; gap: 5px; height: 34px; border-radius: 12px; background: var(--honey-soft); color: #8a560a; font-weight: 900; font-size: 0.875rem; }
.price svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.price.own { background: var(--pine-soft); color: var(--pine); }
.price.on { background: var(--pine); color: #fff; }
.item .plus-tag { position: absolute; top: 10px; right: 10px; font-size: 0.625rem; font-weight: 900; color: #fff; background: var(--scarf); padding: 3px 7px; border-radius: 99px; }

/* ---------- pals ---------- */
.pal-hero { position: relative; overflow: hidden; padding: 18px; border-radius: 26px; background: #e6f1ec; margin-bottom: 16px; }
.pal-hero img { position: absolute; right: -10px; bottom: -8px; width: 140px; }
.pal-hero h3 { margin: 4px 0 4px; font-size: 1.3125rem; font-weight: 900; max-width: 200px; }
.pal-hero p { margin: 0 0 12px; font-size: 0.8125rem; color: var(--ink-2); font-weight: 700; max-width: 190px; line-height: 1.4; }
.code { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 14px; background: #fff; font-weight: 900; letter-spacing: .08em; box-shadow: var(--shadow); }
.code svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; }
.pals { display: grid; gap: 10px; }
.pal { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 20px; background: var(--paper); box-shadow: var(--shadow); }
.ava { position: relative; width: 50px; height: 50px; flex: none; }
.ava svg.r { position: absolute; inset: -4px; width: 58px; height: 58px; transform: rotate(-90deg); }
.ava svg.r circle { fill: none; stroke-width: 4; stroke-linecap: round; }
.ava .face { position: absolute; inset: 3px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; color: #fff; font-size: 1.125rem; }
.pal b { display: block; font-weight: 900; font-size: 0.9375rem; }
.pal span { font-size: 0.75rem; color: var(--ink-2); font-weight: 700; }
.paw-btn { height: 38px; padding: 0 12px; border-radius: 13px; background: #fff3e3; color: #a3610a; font-weight: 900; font-size: 0.8125rem; display: inline-flex; align-items: center; gap: 6px; transition: all .25s var(--spring); }
.paw-btn svg { width: 18px; height: 18px; }
.paw-btn.sent { background: var(--pine-soft); color: var(--pine); }
.feed { display: grid; gap: 8px; }
.feed div { display: flex; gap: 10px; align-items: center; font-size: 0.875rem; font-weight: 700; color: var(--ink-2); padding: 10px 12px; border-radius: 16px; background: var(--paper); }
.feed div b { color: var(--ink); }
.feed .t { margin-left: auto; font-size: 0.6875rem; color: var(--ink-3); font-weight: 800; white-space: nowrap; }

/* ---------- me ---------- */
.me-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.me-head img { width: 76px; height: 76px; border-radius: 24px; box-shadow: var(--shadow); }
.me-head h2 { margin: 0; overflow-wrap: break-word; font-size: 1.625rem; font-weight: 900; letter-spacing: -.02em; }
.me-head span { font-size: 0.875rem; color: var(--ink-2); font-weight: 700; }
.me-head .plus-badge, .plus-badge { display: inline-block; margin-left: 6px; font-size: 0.6875rem; font-weight: 900; color: #fff; background: var(--scarf); padding: 2px 8px; border-radius: 99px; vertical-align: 5px; line-height: 1.5; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.stat { padding: 14px 10px; border-radius: 20px; background: var(--paper); box-shadow: var(--shadow); text-align: center; }
.stat b { display: block; font-size: 1.625rem; font-weight: 900; letter-spacing: -.02em; }
.stat span { font-size: 0.75rem; font-weight: 800; color: var(--ink-3); }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: 12px; }
.week div { display: grid; justify-items: center; gap: 6px; font-size: 0.6875rem; font-weight: 900; color: var(--ink-3); }
.week i { width: min(34px, 100%); height: auto; aspect-ratio: 1; border-radius: 12px; display: grid; place-items: center; background: var(--mist); }
.week i svg { width: 20px; height: 20px; }
.week i.fire { background: #ffe6de; color: #e06a3c; }
.week .today { color: var(--ink); }
.notes { display: grid; gap: 10px; }
.note { overflow-wrap: anywhere; padding: 14px; border-radius: 18px; background: #fffdf6; box-shadow: var(--shadow); font-weight: 700; font-size: 0.9375rem; line-height: 1.45; }
.note small { display: block; margin-top: 6px; font-size: 0.6875rem; color: var(--ink-3); font-weight: 800; }
.set { display: flex; align-items: center; justify-content: space-between; padding: 14px 4px; border-bottom: 1px solid var(--line); font-weight: 800; }
.set:last-child { border-bottom: 0; }
.switch { position: relative; width: 52px; height: 32px; border-radius: 99px; background: var(--line); transition: background .25s; flex: none; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .15); transition: transform .3s var(--spring); }
.switch.on { background: var(--pine); }
.switch.on::after { transform: translateX(20px); }
.danger { color: var(--scarf); font-weight: 900; min-height: 44px; padding: 10px 0; }

/* ---------- add goal ---------- */
.lib { display: grid; gap: 8px; margin-top: 10px; }
.lib button { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px; background: var(--paper); box-shadow: 0 0 0 2px var(--line); text-align: left; font-weight: 800; }
.lib .gi { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.lib .gi svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lib .plus { margin-left: auto; color: var(--lav-deep); }
.lib .plus svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; }
.slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0; }
.slots button { height: 42px; border-radius: 14px; background: var(--paper); box-shadow: 0 0 0 2px var(--line); font-weight: 900; font-size: 0.8125rem; }
.slots button.on { box-shadow: 0 0 0 3px var(--lav-deep); color: var(--lav-deep); }

/* ---------- toast & honey fly ---------- */
.toast { position: absolute; left: 50%; bottom: calc(var(--safe-bot) + 96px); transform: translate(-50%, 20px); z-index: 95; background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 16px; font-weight: 800; font-size: 0.875rem; opacity: 0; transition: all .35s var(--spring); pointer-events: none; max-width: 86%; text-align: center; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.fly { position: absolute; z-index: 96; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--honey); color: #fff; box-shadow: 0 3px 8px rgba(24, 18, 30, .2); pointer-events: none; }
.fly svg { width: 15px; height: 15px; }
.bump { animation: bump .45s var(--spring); }
@keyframes bump { 40% { transform: scale(1.18); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* falling snow (splash + "Fresh snowfall") */
.flake { position: absolute; top: -12px; border-radius: 50%; background: #fff; box-shadow: 0 0 6px rgba(255, 255, 255, .9); animation: fall linear infinite; }
@keyframes fall { to { transform: translate3d(30px, 110vh, 0); } }
.scene .snowfield { z-index: 2; }

/* ---------- store, legal and support ---------- */
.fine { font-size: 0.75rem; line-height: 1.5; color: var(--ink-2); font-weight: 600; margin: 10px 0 0; }
.fine.center { text-align: center; }
.fine a, .fine-link { color: var(--lav-deep); font-weight: 800; text-decoration: none; font-size: 0.75rem; }
.fine-link { display: inline; padding: 0; }
.full.paywall { background: #fdf3e6; }
.full .ob { min-height: 100%; }
#pwBody h2 { font-size: 1.625rem; }
#pwBody .btn[disabled] { opacity: .6; }

.paw-card { position: relative; text-align: center; padding: 20px 20px 18px; border-radius: 26px; background: #fff2ec; box-shadow: var(--shadow); }
.paw-card img { width: 150px; margin: 0 auto 6px; }
.paw-card b { display: block; font-size: 1.375rem; font-weight: 900; letter-spacing: -.01em; }
.paw-card p { margin: 6px 0 10px; font-weight: 700; color: var(--ink-2); line-height: 1.45; }
.paw-card span { font-size: 0.75rem; font-weight: 900; color: var(--cocoa); letter-spacing: .02em; }

.plus-card { display: flex; gap: 12px; align-items: center; padding: 14px; margin-top: 16px; border-radius: 22px; background: #fff1e6; }
.plus-card img { width: 78px; flex: none; }
.plus-card b { display: block; font-weight: 900; font-size: 1rem; }
.plus-card p { margin: 2px 0 10px; font-size: 0.8125rem; color: var(--ink-2); font-weight: 600; line-height: 1.35; }
.plus-card.is-plus { background: #eaf4ef; }
.mini { height: 34px; padding: 0 12px; border-radius: 12px; background: #fff; font-weight: 900; font-size: 0.8125rem; box-shadow: var(--shadow); }
.mini.dark { background: var(--cocoa); color: #fff; }
.support p { margin: 0; font-size: 0.875rem; line-height: 1.5; color: var(--ink-2); font-weight: 600; }
a.btn { text-decoration: none; }
.set > span:first-child { font-weight: 800; }

.perks::before { display: none; }
.perks .tl .i { background: var(--honey-soft) !important; color: #8f5c0e !important; box-shadow: none !important; }

/* keep the clock readable: scrolled content fades out under the status bar (the home scene is full-bleed) */
.app::after { content: ''; position: absolute; top: 0; left: 0; right: 0; height: calc(var(--safe-top) + 6px); z-index: 45; pointer-events: none;
  background: linear-gradient(180deg, var(--snow) 55%, rgba(251, 248, 255, 0)); }
.app.is-home::after, .app.is-splash::after { display: none; }

/* Pocket aurora must read in daylight too: plain blend by day, light-on-dark screen blend at night.
   It stays in the sky above the cabin and fades out before the bears, so it never tints their heads. */
.aurora { inset: -16% -10% 70% -10%; -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent 100%); mask-image: linear-gradient(to bottom, #000 55%, transparent 100%); }
.scene[data-tod="night"] .aurora { inset: -12% -10% 66% -10%; }
/* short scenes (iPhone SE, the iPad compatibility window): the bears' ears sit higher up, so the fade ends sooner by day */
@media (max-height: 700px) {
  .scene:not([data-tod="night"]) .aurora { inset: -16% -10% 74% -10%; -webkit-mask-image: linear-gradient(to bottom, #000 45%, transparent 90%); mask-image: linear-gradient(to bottom, #000 45%, transparent 90%); }
}
/* the shortest scenes (320x568): the night sky is mostly cropped away, so the night band ends sooner too */
@media (max-height: 600px) { .scene[data-tod="night"] .aurora { inset: -12% -10% 72% -10%; } }
/* the box changes at dusk and at tuck-in: it glides with the opacity instead of jumping */
.aurora { transition: opacity 1.4s, inset 1.4s; }
.aurora.on { opacity: .9; mix-blend-mode: normal; filter: blur(14px) saturate(1.6); }
.scene[data-tod="night"] .aurora.on { opacity: 1; mix-blend-mode: screen; filter: blur(22px); }

/* onboarding: falling snow stays behind the content, and the primary buttons stay above confetti bursts */
.splash .snowfield { z-index: 0; }
.ob { position: relative; }
.ob-foot { position: relative; z-index: 80; }

/* short screens (iPhone SE and similar): keep the paywall's buy button above the fold */
@media (max-height: 720px) {
  .paywall .ob-art.sm, .full.paywall .ob-art.sm { max-width: 92px !important; margin-bottom: 0; }
  #pwBody h2 { font-size: 1.375rem; margin: 4px 0 2px; }
  .perks { gap: 8px; margin: 8px 0 10px; }
  .perks .tl .i { width: 34px; height: 34px; }
  .perks .tl span { font-size: 0.8125rem; line-height: 1.3; }
  .perks .tl b { font-size: 0.9375rem; }
  .plans { margin-bottom: 8px; }
  .plan-opt { padding: 10px 12px; }
}

/* the tuck-in picture and onboarding art make room when the keyboard shrinks the view */
.tuck-art { display: block; width: 150px; border-radius: 24px; margin: 0 auto 8px; }
@media (max-height: 560px) {
  .tuck-art { width: 72px; border-radius: 16px; }
  .ob-art.sm { max-width: 84px; }
}

/* ---- 1.0.1 ---- */
[tabindex="-1"]:focus { outline: none; }
.q-night.is-done .i { background: #2f2a5c; color: #ffe8a3; }
.q-night.is-done { color: var(--ink-2); }
.card.empty { display: grid; justify-items: center; text-align: center; gap: 4px; padding: 20px; margin-bottom: 12px; }
.card.empty img { width: 110px; }
.card.empty b { font-size: 1.125rem; font-weight: 900; }
.card.care { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; background: #f3eefd; }
.card.care img { width: 72px; flex: none; }
.card.care b { font-weight: 900; font-size: 1rem; }
.card.care p { margin: 4px 0 10px; font-size: 0.875rem; color: var(--ink-2); font-weight: 700; }
.card.care .mini { min-height: 40px; display: inline-flex; align-items: center; text-decoration: none; }
.stars-fx { position: absolute; inset: 0 0 50% 0; pointer-events: none; z-index: 1; opacity: 0; transition: opacity 1s; }
.scene[data-tod="dusk"] .stars-fx, .scene[data-tod="night"] .stars-fx { opacity: 1; }
.stars-fx i { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #fff6d6; box-shadow: 0 0 6px 2px rgba(255, 240, 200, .7); animation: twinkle 2.6s ease-in-out infinite; }
@keyframes twinkle { 50% { opacity: .25; transform: scale(.7); } }
.snowman-fx { position: absolute; left: 12px; bottom: 18%; width: 78px; z-index: 2; pointer-events: none; filter: drop-shadow(0 6px 8px rgba(60, 40, 80, .25)); }
.cocoa-fx { position: absolute; right: 18px; bottom: 16%; width: 46px; z-index: 2; pointer-events: none; animation: float 3s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .stars-fx i, .cocoa-fx { animation: none; } }
.letter-nav { display: flex; align-items: center; justify-content: center; gap: 10px; margin: -4px 0 14px; font-size: 0.8125rem; font-weight: 800; color: var(--ink-2); }
.letter-nav .mini { min-height: 44px; display: inline-flex; align-items: center; gap: 4px; }
.letter-nav .mini svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.6; }
button.note { display: block; width: 100%; text-align: left; color: inherit; font-family: inherit; }
.me-head { position: relative; }
.me-edit { position: absolute; right: 0; top: 0; min-height: 44px; min-width: 52px; }
.price.short { background: var(--mist); color: var(--ink-2); }
.away { padding-top: calc(var(--safe-top) + 60px); }
.away .card { max-width: 290px; }
.away .countdown { font-size: clamp(1.25rem, 6vw, 2rem); }
.me-head > div { padding-right: 64px; min-width: 0; }
.me-head h2 { overflow-wrap: break-word; -webkit-hyphens: auto; hyphens: auto; }
.adv-now p { max-width: 62%; position: relative; z-index: 1; }
.breathe .chip { background: rgba(255, 255, 255, .12); color: #fff; box-shadow: none; }
.breathe .chip.on { background: #fff; color: var(--lav-deep); }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sheet-x { position: sticky; top: 4px; margin: -4px -6px -44px auto; z-index: 3; background: var(--paper); box-shadow: none; color: var(--ink-2); }
.sheet > h3, .sheet .act-goal h3 { padding-inline: 48px; }
.letter-nav .mini[aria-disabled="true"] { opacity: .4; }
.letter-nav { flex-wrap: wrap; }
.letter-nav > span { flex: 1 1 100%; order: -1; text-align: center; }
.letter-nav .fwd svg { transform: scaleX(-1); }
.q-night.is-later { color: var(--ink-2); }
.q-night.is-later .i { opacity: .45; }
.q-night small { display: block; font-size: 0.6875rem; font-weight: 800; color: var(--ink-2); line-height: 1.1; }
.add, .card.care .mini, .slots button { min-height: 44px; }
.card.care .mini { height: auto; padding: 8px 14px; line-height: 1.2; }
.card.care .row { flex-wrap: wrap; }
.switch::before { content: ''; position: absolute; inset: -6px; }
.tag.lock { color: var(--ink-2); }
.btn.danger { color: var(--scarf, #b3261e); }
@media (max-height: 600px) {
  .away { padding-top: calc(var(--safe-top) + 52px); place-items: start center; }
  .away .sled { display: none; }
  .away .card { padding: 14px; }
}
.m30 { margin-top: 16px; padding-top: 14px; border-top: 1.5px solid var(--line); }
.m30-row { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 8px; }
.m30-row > span { display: inline-flex; align-items: center; gap: 4px; font-weight: 900; }
.m30-row svg { width: 28px; height: 28px; }
.reveal { overflow-y: auto; overscroll-behavior: contain; }
.reveal-inner { margin: auto 0; }
@media (max-height: 600px) { .reveal { place-items: start center; padding-top: calc(var(--safe-top) + 12px); } }
.toast.undo { pointer-events: auto; display: flex; align-items: center; gap: 12px; padding-right: 8px; }
.undo-b { min-height: 36px; padding: 0 14px; border-radius: 12px; background: rgba(255, 255, 255, .18); color: #fff; font-weight: 900; }
.slots.four { grid-template-columns: repeat(4, 1fr); }
.icons { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin: 4px 0 16px; }
.icons .gi { width: 100%; aspect-ratio: 1; min-height: 44px; border-radius: 14px; display: grid; place-items: center; box-shadow: 0 0 0 2px transparent; }
.icons .gi.on { box-shadow: 0 0 0 3px var(--lav-deep); }
.icons .gi svg { width: 22px; height: 22px; }

/* Home: the first goals are visible without scrolling on every iPhone size */
.scene { height: min(430px, 50vh); }
.warm { padding: 10px 14px 12px; }
.warm .bar { margin-top: 8px; }
.quick { margin: 10px 0 2px; gap: 8px; }
.quick button { padding: 8px 4px; gap: 4px; }
.quick .i { width: 34px; height: 34px; }
.sheet-body > .sec-h:first-of-type, .sec-h { margin: 14px 2px 8px; }
/* the bears stand at the bottom of the video: anchor it there so a shorter scene trims sky, never bears */
.scene { container-type: inline-size; }
.scene video, .scene .still { top: auto; bottom: -40vw; bottom: -40cqw; min-height: 0; }
@media (max-height: 700px) { .scene { height: 46vh; } .scene video, .scene .still { bottom: -46vw; bottom: -46cqw; } }
.app.is-home.scrolled::after { display: block; }
@media (prefers-contrast: more) {
  :root { --ink-2: #2a1f30; --ink-3: #4a3d52; --line: #b9a9c9; }
  .card, .goal, .quick button, .item, .note { box-shadow: 0 0 0 1.5px #8d7aa3; }
}
/* R13: the same room at the end of Me, so Restore on the Plus card clears the tab bar at 115 % text on 320x568 */
.screen.pals .pad, .screen.me .pad { padding-bottom: calc(var(--safe-bot) + 140px); }

/* ---- R6 visual pass ---- */
.icons .gi svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.face-b { overflow-y: auto; overscroll-behavior: contain; }
@media (max-width: 360px) { .face-b { line-height: 28px; background-size: 100% 28px; padding: 26px 18px 18px; font-size: 0.9375rem; } }
@media (max-height: 700px) { .away { padding-top: calc(var(--safe-top) + 52px); padding-bottom: 44px; place-items: start center; } .away .card { padding: 14px; } .away .sled { width: 40px; height: 40px; } }
.ob h2, .bubble, .sheet h3 { overflow-wrap: anywhere; }
.ob h2, .sheet h3, h2.title, .shop-hero b, .warm-top span, .adv-now h3 { text-wrap: balance; }
.toast { left: 0; right: 0; margin: 0 auto; width: max-content; max-width: 86%; transform: translateY(20px); text-align: center; }
.toast.on { transform: translateY(0); }
.scene[data-tod="dawn"] .scene-tint { background: linear-gradient(180deg, rgba(255, 170, 140, .45), rgba(255, 200, 170, .12) 55%, transparent 75%); }
.scene[data-tod="dusk"] .scene-tint { background: linear-gradient(180deg, rgba(150, 110, 200, .5), rgba(255, 150, 120, .3) 45%, transparent 72%); }
.scene[data-tod="night"] .scene-tint { background: linear-gradient(180deg, rgba(22, 18, 70, .72) 0%, rgba(38, 30, 96, .45) 40%, rgba(46, 38, 110, .12) 58%, transparent 70%); }
.btn { height: auto; min-height: 56px; padding: 10px 18px; text-wrap: balance; text-align: center; line-height: 1.2; }
.sheet-x { box-shadow: 0 2px 10px rgba(40, 28, 60, .12); }
.me-head h2 { font-size: clamp(1.25rem, 6vw, 1.625rem); }
@media (max-width: 360px) { .me-head > div { padding-right: 56px; } .sheet > h3, .sheet .act-goal h3 { padding-inline: 40px; } }
a.link { display: block; text-decoration: none; }
.quick button { align-content: start; min-height: 84px; }
@media (max-height: 700px) { .q-night small { display: none; } .quick button { min-height: 0; } }
@media (max-height: 600px) { .ob-art { max-width: 190px; } .den-wrap { max-width: 230px; } .ob-art.sm { max-width: 140px; } }
.chip.on { transform: none; }
.week i svg { width: 26px; height: 26px; }
:focus-visible { outline: 3px solid var(--lav-deep); outline-offset: 2px; }
/* decorations follow the bears, which stand at the bottom of the scene */
/* R28 (code S2): each cqw has a vw line before it (the .scene is as wide as the window), for iOS 15, which has no container units */
.lights { top: auto; bottom: 66vw; bottom: 66cqw; }
.lantern { bottom: 28vw; bottom: 28cqw; }
.snowman-fx { bottom: 19vw; bottom: 19cqw; }
@media (max-height: 700px) { .lights { bottom: 62vw; bottom: 62cqw; } .lantern { bottom: 22vw; bottom: 22cqw; } .snowman-fx { bottom: 14vw; bottom: 14cqw; } }

[tabindex="-1"]:focus-visible, .sheet h3:focus-visible { outline: none; }
@media (max-height: 700px) { .scene[data-tod="night"] .scene-tint { background: linear-gradient(180deg, rgba(22, 18, 70, .7) 0%, rgba(38, 30, 96, .35) 22%, transparent 42%); } }
/* R6 native pass */
.scene { height: min(400px, 47vh); }
@media (max-height: 700px) { .scene { height: 46vh; } }
/* overscroll-behavior needs iOS 16: on iOS 15 only #homeScroll's own bounce shows (the web view itself never scrolls:
   capacitor.config scrollEnabled false), which is harmless */
#homeScroll { overscroll-behavior-y: none; }
.undo-b { min-height: 44px; }
.buddy button, .buddy .mini { min-height: 44px; }
.fine a { display: inline-block; padding: 11px 2px; }
/* 1.1: three Plus plans side by side */
.plans { grid-template-columns: repeat(3, 1fr); gap: 8px; }
.plan-opt { padding: 12px 10px; text-align: center; }
.plan-opt span { display: block; margin-top: 2px; line-height: 1.25; }
.plan-opt em { right: 50%; transform: translateX(50%); white-space: nowrap; }
/* the price you pay is the clearest number on each plan */
.plan-opt span { font-size: 0.9375rem; color: var(--ink); font-weight: 900; }
.plan-opt small { display: block; margin-top: 3px; font-size: 0.6875rem; font-weight: 800; color: var(--pine); line-height: 1.2; }
@media (max-height: 720px) { .plan-opt { padding: 10px 8px; } }
.plan-opt .fb { font-style: normal; font-weight: 700; color: var(--ink-2); }
.plan-opt .fb { display: block; font-size: 0.75rem; }
/* R7: the free way out right under the buy button, comfortable targets */
.pw-alt { display: flex; justify-content: center; gap: 4px; }
.pw-alt .link { width: auto; padding: 12px 14px; min-height: 44px; }
.fine-link { display: inline-block; min-height: 44px; padding: 12px 6px; }
.plus-card .mini { min-height: 44px; height: auto; padding: 8px 14px; }
/* R8 accessibility pass */
.price.own { color: #2f6449; }
.tag.next { color: #7f4d03; }
:root { --line-strong: #a596b8; }
.check { box-shadow: inset 0 0 0 2px var(--line-strong); }
.field { border-color: var(--line-strong); }
.switch { background: var(--line-strong); }
.switch.on { background: var(--pine); }
.hold svg.ring circle:first-child { stroke: #cfc4dc; }
:focus-visible { outline: 3px solid var(--lav-deep); outline-offset: 2px; box-shadow: 0 0 0 2px #fff, 0 0 0 6px var(--lav-deep); }
.breathe :focus-visible { outline-color: #fff; box-shadow: 0 0 0 2px #2f2a5c, 0 0 0 6px #fff; }
.fine a { padding: 13px 4px; }
.chips .chip { min-height: 46px; }
html.reduce .flake, html.reduce .hearts-fx, html.reduce .stars-fx, html.reduce .aurora, html.reduce .lights .bulb, html.reduce .lantern { animation: none !important; }
html.reduce .scene video { display: none; }
.set > span small { color: var(--ink-2); }
/* R9 performance: nothing animates unless it can be seen */
.lights:not(.on) .bulb, .lantern:not(.on), .aurora:not(.on) { animation: none; }
html.reduce .hearts-fx i, html.reduce .stars-fx i, html.reduce .cocoa-fx, html.reduce .bulb, html.reduce .flake { animation: none !important; }

/* R9 visual */
[tabindex="-1"]:focus-visible, .sheet h3:focus-visible { outline: none; box-shadow: none; }
.field:focus-visible { outline: none; border-color: var(--lav-deep); box-shadow: 0 0 0 3px rgba(106, 85, 181, .28); }
.tapzone:focus-visible { outline-offset: -6px; box-shadow: none; }
.lights { width: calc(100% + 20px); bottom: 58vw; bottom: 58cqw; }
.lights svg { width: 100%; }
.lantern { bottom: 36vw; bottom: 36cqw; }
.away { place-items: start center; padding: calc(var(--safe-top) + 52px) 30px 46px; }
.away .sled { width: 48px; height: 48px; }
.away .card { padding: 12px 16px; }
.reveal { padding-top: calc(var(--safe-top) + 12px); padding-bottom: calc(var(--safe-bot) + 16px); }
.sheet-x { box-shadow: 0 0 0 6px var(--paper); }
.fine.links { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; column-gap: 14px; }
.plus-card .mini { padding: 8px 11px; }
.layer:has(> .sheet.on) ~ .toast { bottom: auto; top: calc(var(--safe-top) + 12px); }
@media (max-height: 700px) {
  .scene { height: 41vh; }
  .reveal-inner { max-width: 290px; }
  .bubble { top: calc(var(--safe-top) + 50px); font-size: .8125rem; padding: 8px 12px; }
}
@media (max-height: 700px) {
  .away { padding-top: calc(var(--safe-top) + 46px); padding-bottom: 40px; }
  .away .sled, .away .tiny { display: none; }
  .away h3 { margin-top: 0; }
}

/* R10 accessibility and layout */
/* keyboard focus never ends up under the tab bar or the status bar */
.screen { scroll-padding-bottom: calc(var(--safe-bot) + 96px); scroll-padding-top: calc(var(--safe-top) + 8px); }
/* the honey and cozy-night counters are buttons now: they look exactly like before */
button.pill { border: 0; font: inherit; color: inherit; cursor: pointer; }
button.pill:active { transform: scale(.96); }
/* tall sheets leave room at the top so a toast never sits on their title */
.sheet { max-height: calc(100% - var(--safe-top) - 64px); }
.layer:has(> .full.on, > .breathe.on, > .reveal.on) ~ .toast { top: calc(var(--safe-top) + 12px); bottom: auto; }
/* the sticky close button never covers the line under a sheet title */
.sheet > .sub { padding-inline-end: 44px; }
/* controls with a fixed height grow with larger text instead of spilling */
.price { height: auto; min-height: 34px; padding-block: 6px; line-height: 1.2; text-align: center; }
.slots button { height: auto; min-height: 44px; padding-block: 8px; line-height: 1.2; }
/* non-text contrast: outlines and selected rings reach 3:1 */
:root { --line-strong: #8e7ea3; }
.choice.on, .time.on, .plan-opt.on { box-shadow: 0 0 0 3px #b97d1d; }
.commit-days button.on { box-shadow: 0 0 0 3px #b97d1d; }
.flame-dot { color: #c9572a; }
/* tab bar labels and the chosen tab are easier to read */
.tab { color: var(--ink-2); }
.tab.on { color: var(--cocoa); background: #efdfe9; box-shadow: inset 0 -3px 0 var(--cocoa); }
/* the goal row's focus ring follows the card's corners */
.gmain { border-radius: 14px; }
/* the plan badge never overlaps the plan name at larger text */
.plan-opt:has(em) { padding-top: 18px; }
.perks span, .tl span { text-wrap: pretty; }
/* Calmer cabin: nothing keeps floating */
html.reduce .sled, html.reduce .float, html.reduce .zzz { animation: none !important; }
/* breathing fits the smallest phones */
.breathe .close { flex: none; }
.breathe .orb { width: min(280px, 100%); height: auto; aspect-ratio: 1; }
/* bubble keeps clear of the bears' faces on short phones */
@media (max-height: 700px) { .bubble { max-width: 240px; } }
/* the Me Plus card buttons share one row when they can */
.plus-card .row .mini { flex: 1 1 auto; }
/* onboarding plan: each goal can be dropped */
.plan .goal { align-items: center; }
.plan-x { flex: none; width: 44px; height: 44px; margin: -6px -8px -6px 0; background: transparent; box-shadow: none; color: var(--ink-2); }
.plan-x svg { width: 18px; height: 18px; }

/* R11 purchase path */
/* a redrawn paywall stays put; with less motion nothing waits for a delay */
#pwBody.drawn, #pwBody.drawn > * { animation: none !important; }
@media (prefers-reduced-motion: reduce) { .stagger > *, .enter { animation-delay: 0s !important; } }
html.reduce .stagger > *, html.reduce .enter { animation-delay: 0s !important; }
/* on onboarding's Plus step (a screen, not a layer) the toast sits at the top, clear of the plans and the button */
#phone:has(#app #pwBody, .full.on #pwBody) .toast { top: calc(var(--safe-top) + 64px); bottom: auto; }
/* plans never push past the edge; with large text they stack as rows */
.plans { grid-template-columns: repeat(3, minmax(0, 1fr)); }
html.big .plans { grid-template-columns: 1fr; }
html.big .plan-opt { display: grid; grid-template-columns: 1fr auto; align-items: center; text-align: left; }
html.big .paywall .ob-art, html.big #pwBody .tl > div > span { display: none; }
html.big #pwBody .tl[data-perk="adv"] > div > span { display: block; }
.plan-opt .amt { white-space: nowrap; }
@media (max-width: 400px) { .plan-opt .amt { font-size: .92em; letter-spacing: -.01em; } }
.plan-opt { box-shadow: 0 0 0 1.5px var(--line-strong); }
/* the disabled buy button reads clearly (7.6:1), and the busy state looks like the same button */
#pwBody .btn[disabled], #pwBody .btn[aria-disabled="true"] { opacity: 1; background: #f3dfb8; color: #5a3d12; box-shadow: 0 6px 0 #d9bf8c; }
/* the Terms/Privacy/Restore row fits above the fold on shorter phones */
@media (max-height: 900px) { .paywall .ob-art.sm { max-width: 96px !important; } #pwBody .timeline { gap: 10px; } #pwBody .ob-foot { padding-top: 2px !important; } }
/* the iPhone app on an iPad or any wide window: the app fills the window, no desktop phone frame */
html.native .stage { padding: 0; display: block; height: auto; overflow: visible; }
html.native .aside, html.native .notch { display: none; }
html.native .phone { width: 100%; height: 100vh; height: 100dvh; border-radius: 0; box-shadow: none; transform: none !important; }
html.native { --safe-top: env(safe-area-inset-top, 0px); --safe-bot: env(safe-area-inset-bottom, 0px); }

/* R12 accessibility and battery */
/* the honey and cozy-night pills keep their look but get a 44 pt tap area */
button.pill { position: relative; }
button.pill::after { content: ''; position: absolute; inset: -4px -2px; }
/* the breathing screen scrolls instead of clipping when text is large on small phones */
.breathe { overflow-y: auto; }
.breathe .orb { flex: 0 1 auto; min-height: 0; }
@media (max-height: 620px) { .breathe .orb { width: 220px; height: 220px; } .breathe .orb img { width: 165px; } }
/* keyboard focus never lands under a sheet's edge */
.sheet, .full, .reveal { scroll-padding-block: 16px; }
/* Calmer cabin stops interface motion too, the same as the system's Reduce Motion */
html.reduce *, html.reduce *::before, html.reduce *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
/* the paywall stays compact from slightly larger text on short screens (iPad window, 375x667) */
@media (max-height: 700px) { html.mid .paywall .ob-art { display: none; } html.mid #pwBody .tl > div > span { display: none; } }
/* a plan that can't be chosen (a subscriber moving up, or a price Apple didn't send) looks like it */
.plan-opt:disabled { opacity: .5; }
/* 1.2 seasonal cabin magic: flat shapes, no gradients, still when motion is reduced */
.blossom-fx { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.blossom-fx svg { position: absolute; top: calc(var(--safe-top) + 46px); width: 112px; filter: drop-shadow(0 4px 6px rgba(120, 60, 90, .18)); }
.blossom-fx svg:first-child { left: -6px; }
.blossom-fx svg:last-child { right: -6px; transform: scaleX(-1); }
.sun-fx { position: absolute; right: 20px; top: calc(var(--safe-top) + 56px); width: 58px; z-index: 1; pointer-events: none; animation: sunspin 40s linear infinite; }
.sun-lanterns { position: absolute; left: 50%; transform: translateX(-50%); width: 170px; bottom: 56vw; bottom: 56cqw; z-index: 2; pointer-events: none; overflow: visible; }
.sun-lanterns .sl { animation: sway 5s ease-in-out infinite; transform-box: fill-box; transform-origin: top center; }
@keyframes sunspin { to { transform: rotate(360deg); } }
.leaves-fx { position: absolute; inset: 0 0 30% 0; pointer-events: none; z-index: 2; overflow: hidden; }
.leaves-fx i { position: absolute; width: 22px; height: 22px; animation: leaffall 9s linear infinite; }
.leaves-fx svg { width: 100%; height: 100%; display: block; }
@keyframes leaffall { 0% { transform: translate(0, -60px) rotate(0); opacity: 0; } 10% { opacity: 1; } 50% { transform: translate(18px, 90px) rotate(160deg); } 90% { opacity: 1; } 100% { transform: translate(-6px, 240px) rotate(320deg); opacity: 0; } }
.tree-fx { position: absolute; right: 12px; bottom: 18%; width: 72px; z-index: 2; pointer-events: none; filter: drop-shadow(0 6px 8px rgba(60, 40, 80, .25)); }
.tree-fx circle { animation: twinkle 2.2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.tree-fx circle:nth-of-type(2n) { animation-delay: -1.1s; }
.tree-fx { bottom: 19vw; bottom: 19cqw; }
.tree-fx ~ .cocoa-fx { right: 92px; }
@media (max-height: 700px) { .tree-fx { bottom: 14vw; bottom: 14cqw; } .sun-lanterns { bottom: 52vw; bottom: 52cqw; } }
html.reduce .sun-fx, html.reduce .sun-lanterns .sl, html.reduce .tree-fx circle { animation: none !important; }
html.reduce .leaves-fx i { animation: none !important; opacity: .9; }
@media (prefers-reduced-motion: reduce) { .sun-fx, .sun-lanterns .sl, .tree-fx circle, .leaves-fx i { animation: none; } }
/* 1.2 seasonal shop, postcard sharing */
.season-note { margin: -2px 2px 10px; font-size: 0.8125rem; }
.item.off-season .art { opacity: .55; }
.item .plus-tag { max-width: calc(100% - 20px); white-space: nowrap; }
.stop-row { position: relative; display: flex; align-items: center; gap: 8px; }
.stop-row .stop { flex: 1; min-width: 0; }
.stop-row .stop-share { flex: none; color: var(--ink-2); }
.stop-share svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.pc-share { margin-top: 10px; min-height: 48px; }
.pc-share svg, #shGo svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.share-prev { display: grid; place-items: center; margin: 4px 0 12px; }
.share-prev img { width: auto; max-width: 100%; height: min(38vh, 330px); aspect-ratio: 4 / 5; object-fit: contain; border-radius: 14px; background: var(--mist); box-shadow: var(--shadow); }
.chips.frames { justify-content: flex-start; margin-bottom: 14px; }
.chips.frames .chip { min-height: 44px; padding: 6px 12px; font-size: 0.875rem; }
.plus-mini { margin-left: 6px; font-size: 0.625rem; font-weight: 900; color: #fff; background: var(--scarf); padding: 2px 6px; border-radius: 99px; }

/* 1.2: while the bears are out the scene shows their empty yard (home-away.jpg, two trails of paw prints into the snow);
   the bear videos are hidden and the trip sits in a compact card up by the sky, so the trail stays in view */
.scene.is-away video { visibility: hidden; }
.scene.is-away .away { place-items: start center; background: none; backdrop-filter: none; -webkit-backdrop-filter: none; padding: calc(var(--safe-top) + 56px) 16px 0; }
.scene.is-away .away .card { display: grid; grid-template-columns: auto 1fr auto; align-items: center; column-gap: 12px; text-align: left; max-width: 340px; width: 100%; background: rgba(255, 255, 255, .88); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-radius: 20px; padding: 10px 14px; box-shadow: 0 8px 24px rgba(51, 37, 58, .12); }
.scene.is-away .away .sled { grid-row: 1 / span 2; width: 42px; height: 42px; border-radius: 13px; margin: 0; }
.scene.is-away .away .sled svg { width: 22px; height: 22px; }
.scene.is-away .away h3 { grid-column: 2; margin: 0; font-size: 0.9375rem; line-height: 1.2; }
.scene.is-away .away .muted { grid-column: 2; margin: 0 !important; font-size: 0.8125rem; line-height: 1.25; }
.scene.is-away .away .countdown { grid-column: 3; grid-row: 1 / span 2; font-size: 1.0625rem; text-align: right; max-width: 9.5em; }
.scene.is-away .away .tiny { display: none; }

/* 1.2 coherence (R14c) */
/* Me → Language: the label on its own line, a three-part control under it (the Shop's segments) */
.set.set-stack { flex-direction: column; align-items: stretch; gap: 10px; }
.seg.seg3 { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; }
.seg.seg3 button { min-width: 0; padding: 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Journey: the Plus places carry the same small Plus mark for everyone; the share buttons stay quiet beside the stops */
.stop b .plus-mini { display: inline-block; vertical-align: 2px; color: #fff; font-size: 0.625rem; line-height: 1.3; }
.stop-row .stop-share { width: 44px; height: 44px; background: transparent; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; color: var(--ink-3, var(--ink-2)); }
.stop-row .stop-share svg { width: 18px; height: 18px; }
/* Midsummer lanterns hang in the sky over the cabin, where the bears' speech bubble appears, and step aside while the
   bears talk: never behind the bubble, never across a face. The sun sits inside the sky, clear of the profile button */
.sun-fx { right: 28px; top: calc(var(--safe-top) + 96px); width: 52px; }
.sun-lanterns { bottom: auto; top: calc(var(--safe-top) + 56px); transition: opacity .35s; }
@media (min-height: 701px) { .scene:has(.bubble.on) .sun-lanterns { opacity: 0; } }
/* short scenes: the bears fill the sky, so the string hangs up between the pills and the profile button instead */
@media (max-height: 700px) {
  .sun-fx { top: calc(var(--safe-top) + 84px); width: 44px; }
  .sun-lanterns { bottom: auto; top: calc(var(--safe-top) + 4px); left: auto; right: 62px; transform: none; width: 112px; }
}
@media (max-height: 700px) and (max-width: 340px) { .sun-lanterns { right: 60px; width: 92px; } }
/* the news letter and a postcard's letter fit the card without scrolling on 667 pt screens */
@media (max-height: 700px) { .face-b { line-height: 28px; background-size: 100% 28px; padding: 26px 18px 18px; font-size: 0.9375rem; } }
/* with the tighter 28 px lines the ruled paper follows them (a 32 px rule in a 28 px tile never showed) */
@media (max-width: 360px), (max-height: 700px) { .face-b { background: #fffdf8 repeating-linear-gradient(180deg, transparent 0 27px, #efe3d4 27px 28px); } }
/* 375x667: the paywall's four perks, the plans and the buy button fit the first screen */
@media (max-height: 700px) { .paywall .ob-art.sm, .full.paywall .ob-art.sm { max-width: 68px !important; } #pwBody .pw-lead { margin-bottom: 4px; } }
@media (max-height: 700px) { #pwBody .perks { gap: 5px; } }
/* the three frame chips share one line down to 320 pt */
.chips.frames { flex-wrap: nowrap; gap: 8px; }
.chips.frames .chip { padding: 6px 10px; white-space: nowrap; }
.chips.frames .plus-mini { margin-left: 4px; }
@media (max-width: 340px) { .chips.frames { gap: 6px; } .chips.frames .chip { padding: 6px 8px; font-size: 0.8125rem; } }

/* ---- 1.2 R15: Bearly Plus that says what it is for (flat colours, no gradients) ---- */
/* the picture on top follows where the paywall was opened: a postcard, the postcard in a Plus frame, a shop item */
.ob-art.pw-art { max-width: 120px; border-radius: 18px; }
.pw-pc, .pw-frame { aspect-ratio: 4 / 5; object-fit: cover; box-shadow: var(--shadow); background: var(--mist); }
.pw-frame { background: #fffaf3; }
.pw-tile { display: grid; place-items: center; aspect-ratio: 1; border-radius: 24px; }
.pw-tile svg { width: 62%; height: 62%; }
/* the perk that matches is first and marked */
.perks .tl.on { background: #fff4dc; border-radius: 16px; box-shadow: 0 0 0 2px #e9a93e; padding: 8px 10px; margin: -2px -4px; }
.pw-perks-h { margin: 8px 0 -6px; text-align: center; font-size: 0.75rem; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
/* a subscriber moving up: the one plan across the width, the price on the right */
.plans.one { grid-template-columns: 1fr; }
.plans.one .plan-opt { display: grid; grid-template-columns: 1fr auto; align-items: center; text-align: left; padding: 14px 16px; }
.plans.one .plan-opt span { margin-top: 0; text-align: right; }
/* the yearly price per month: small and secondary, the billed price stays the biggest number */
.plan-opt .pm { display: block; font-style: normal; font-size: 0.75rem; font-weight: 700; color: var(--ink-2); line-height: 1.2; margin-top: 1px; }
/* the free trial in three steps with real dates, one row */
.trial-tl { position: relative; list-style: none; margin: -4px 0 4px; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; }
.trial-tl::before { content: ''; position: absolute; top: 7px; left: 16.6%; right: 16.6%; height: 3px; border-radius: 3px; background: #f1d9a8; }
.trial-tl.two::before { left: 25%; right: 25%; }
/* three steps: the last one (the price and the cancel-by day, R24 M6) gets the widest column, so it stays two or three lines;
   the line runs from the first dot to the last (the centres of 0.8 / 0.9 / 1.4 columns) */
.trial-tl:not(.two) { grid-auto-columns: auto; grid-template-columns: minmax(0, .8fr) minmax(0, .9fr) minmax(0, 1.4fr); }
.trial-tl:not(.two)::before { left: 12.9%; right: 22.6%; }
.trial-tl li { position: relative; padding-top: 20px; text-align: center; }
.trial-tl li::before { content: ''; position: absolute; top: 1px; left: 50%; width: 15px; height: 15px; margin-left: -7.5px; border-radius: 50%; background: var(--honey); box-shadow: 0 0 0 3px #fdf5ea; }
.trial-tl li:nth-child(2)::before { background: #f0c16f; }
.trial-tl li:last-child::before { background: #cbbfd9; }
.trial-tl b { display: block; font-size: 0.8125rem; font-weight: 900; line-height: 1.2; }
.trial-tl span { display: block; margin-top: 1px; font-size: 0.6875rem; font-weight: 700; color: var(--ink-2); line-height: 1.25; text-wrap: balance; }
/* onboarding: smaller bears and tighter perks make room for the trial row; on 667 pt screens the bears step aside */
.screen.paywall .ob-art.sm { max-width: 72px !important; margin-bottom: 0; }
#pwBody[data-ob="1"] .perks { gap: 8px; }
@media (max-height: 700px) { .screen.paywall .ob-art { display: none; } #pwBody .trial-tl { margin-top: -6px; } }
/* the Plus moments and the yes-or-no sheets */
.moment-art { display: block; width: 104px; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 16px; margin: 0 auto 10px; box-shadow: var(--shadow); }
@media (max-height: 700px) { .moment-art { width: 72px; } }
.btn.warn { background: var(--scarf); color: #fff; box-shadow: 0 6px 0 #8f2220, 0 10px 20px rgba(24, 18, 30, .14); }
.btn.warn:active { box-shadow: 0 2px 0 #8f2220; }
.plus-card .trial-note { display: inline; font-size: inherit; font-weight: 900; color: #7f4d03; }

/* ---- 1.2 R15 UX ---- */
/* Me → Backup: the label on top, two full-size buttons under it (44 pt like every other control) */
.set .mini { min-height: 44px; height: auto; padding: 8px 14px; }
.set-stack.backup-row .row { gap: 8px; }
.set-stack.backup-row .row .mini { flex: 1; }
/* Me → Bearly Plus: one or two buttons, then a quiet line for a code or restoring */
.plus-links { display: flex; flex-wrap: wrap; align-items: center; gap: 0 16px; margin: 4px 0 -8px; }
.plus-links span { color: var(--ink-3); font-weight: 800; }
.link-sm { min-height: 44px; padding: 0 6px; font-size: 0.8125rem; font-weight: 800; color: var(--lav-deep); }
.plus-links .link-sm:first-child { padding-left: 0; }
/* Home: the reward is said once, under the goals heading */
.reward-line { margin: -4px 4px 4px; font-size: 0.75rem; }
/* the profile sheet when the promise has moved past the four choices */
.pk-now { margin: 0 4px 6px; text-align: center; font-size: 0.8125rem; color: var(--ink-2); }
/* 320 pt with large text: nothing runs off the edge */
.items { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.item b, .item > span { overflow-wrap: break-word; -webkit-hyphens: manual; hyphens: manual; }
.moods { grid-template-columns: repeat(5, minmax(0, 1fr)); }
html.big .mood { font-size: 0.6875rem; overflow-wrap: anywhere; }
html.big .chips.frames { flex-wrap: wrap; }
.me-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; }
.me-head .me-edit { position: static; align-self: start; }
.me-head > div { padding-right: 0; }
@media (max-width: 360px) { .me-head > div { padding-right: 0; } }
html.big .seg.seg3 button { font-size: 0.8125rem; padding: 0 2px; }
@media (max-width: 360px) { .quick button { font-size: 0.6875rem; white-space: nowrap; } }
@media (max-width: 360px) { html.big .face-b { font-size: 0.875rem; line-height: 26px; background: #fffdf8 repeating-linear-gradient(180deg, transparent 0 25px, #efe3d4 25px 26px); } }
/* tucked in: the bears rest on a still, dimmer picture */
.scene.tucked .still, .scene.tucked video { filter: brightness(.8) saturate(.85); }
/* contrast: the collected tag, and switches that are off look off */
.stop .tag:not(.next):not(.lock) { color: #2f6449; }
.switch { background: #e4dcec; box-shadow: inset 0 0 0 2px #8e7ea3; }
.switch.on { background: var(--pine); box-shadow: none; }
/* every paywall: the close button floats in the corner, so the picture, the plans, the trial row and Maybe later fit the
   first screen (with the trial row and the per-month line the buy button stays above the fold at 375x667) */
.paywall .ob > .row { position: absolute; top: calc(var(--safe-top) + 4px); right: 14px; z-index: 3; }
.paywall .ob > .ob-art { margin-top: 6px; }
@media (max-height: 700px) { .paywall #pwBody h2 { margin-top: 6px; padding-inline: 40px; } .full.paywall .ob-art.sm { max-width: 56px !important; } }
/* R15 visual pass after the screenshots */
/* a postcard or a framed postcard on the paywall stays small enough for the buy button to stay on the first screen */
.paywall .ob-art.pw-pc, .paywall .ob-art.pw-frame { max-width: 72px !important; border-radius: 14px; }
@media (max-height: 700px) { .paywall .ob-art.pw-pc, .paywall .ob-art.pw-frame { max-width: 52px !important; border-radius: 10px; } }
.perks .tl.on { padding: 6px 8px; }
/* "≈ 33,25 kr/mån" keeps together */
.plan-opt .pm { white-space: nowrap; }
@media (max-width: 360px) { .plan-opt .pm { font-size: 0.6875rem; letter-spacing: -.01em; } }
/* 320 pt with large text: shop titles break between words, moods in rows of three, the Me header name whole */
.item b, .item > span { overflow-wrap: break-word; }
html.big .item b { font-size: 0.8125rem; }
html.big .moods { grid-template-columns: repeat(3, minmax(0, 1fr)); }
html.big .mood { overflow-wrap: normal; font-size: 0.75rem; }
@media (max-width: 360px) {
  html.big .me-head img { width: 52px; height: 52px; border-radius: 16px; }
  html.big .me-head h2 { font-size: 1.125rem; }
}
/* a paywall opened from something: a little tighter, and on short screens only the matching perk keeps its line */
#pwBody:not([data-ctx="me"]):not([data-ctx="ob"]) .perks { gap: 8px; }
.paywall .ob-art.pw-pc, .paywall .ob-art.pw-frame { max-width: 64px !important; }
@media (max-height: 700px) {
  .paywall .ob-art.pw-pc, .paywall .ob-art.pw-frame { max-width: 48px !important; }
  #pwBody:not([data-ctx="me"]):not([data-ctx="ob"]) .perks .tl:not(.on) > div > span { display: none; }
  #pwBody:not([data-ctx="me"]):not([data-ctx="ob"]) .perks { gap: 4px; }
}

/* ---- 1.2 R16 ---- */
/* the bears tucked in: their sleeping picture (the snow den) in place of the standing bears, under the night sky */
.scene .still.den { display: none; }
.scene.tucked .still.den { display: block; top: 0; bottom: auto; left: 0; width: 100%; height: 100%; min-height: 0; object-fit: cover; object-position: 50% 62%; }
.scene.tucked .still.base, .scene.tucked video { visibility: hidden; }
/* R36: the den breathes when tucked in: the loop sits exactly over the den still (same 1:1 picture, same crop) */
.scene video.den-loop { display: none; }
.scene.tucked video.den-loop { display: block; visibility: visible; top: 0; bottom: auto; left: 0; width: 100%; height: 100%; min-height: 0; object-fit: cover; object-position: 50% 62%; }
/* Home heading: Add never wraps into a two-line pill */
.sec-h h3 { min-width: 0; }
.sec-h .add { white-space: nowrap; flex: none; }
@media (max-width: 360px) { html.big .sec-h .add > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } html.big .sec-h .add { min-width: 44px; justify-content: center; } }
/* the slot labels are headings now: they keep the small label look */
h4.slot { font-size: 0.75rem; font-weight: 900; }
/* the Plus card title is a heading */
.plus-links .link-sm { padding: 0 6px 0 0; }
.plus-card .plus-h { margin: 0; font-size: 1rem; font-weight: 900; line-height: 1.3; }
.ob-plus { margin-top: -8px !important; font-weight: 800; color: var(--pine) !important; }
/* Me Plus card at large text: the picture on top, the text the full width of the card */
html.big .plus-card { flex-direction: column; align-items: stretch; }
html.big .plus-card img { width: 64px; align-self: center; }
/* sheet subtitles sit centred under the title, with no lone last word */
.sheet > .sub { padding-inline: 44px; text-wrap: balance; }
@media (max-width: 360px) { .sheet > .sub { padding-inline: 28px; } }
/* onboarding progress: the fill stands out from its track (3:1) */
.progress { background: #e7dcef; }
.progress i { background: #a8701a; }
/* the frame paywall shows the postcard large enough to see the frame, where the buy button has room */
@media (min-height: 800px) { .paywall .ob-art.pw-frame { max-width: 96px !important; } }
/* 375 x 667: on the onboarding paywall "Maybe later" stays on the first screen */
@media (max-height: 700px) { #pwBody[data-ob="1"] .perks .tl > div > span { display: none; } #pwBody[data-ob="1"] .perks { gap: 4px; margin: 6px 0 8px; } }
/* R28 (flows S4): there the perks say it all in their titles ("Northern lights any time"), and the plain names wait for a taller screen */
.perks .pt-short { display: none; }
@media (max-height: 700px) { #pwBody[data-ob="1"] .perks .pt-long { display: none; } #pwBody[data-ob="1"] .perks .pt-short { display: block; } }
/* the same wherever the lines under the perks are hidden for larger text */
html.big #pwBody[data-ob="1"] .perks .pt-long { display: none; } html.big #pwBody[data-ob="1"] .perks .pt-short { display: block; }
/* R29 (flows P2): every paywall, wherever a perk's line is hidden: opened from a Plus entry on a short screen (all but the
   matching perk), larger text (all but the adventures, which keep their line), and 105 % text on a short screen */
html.big #pwBody .perks .tl:not([data-perk="adv"]) .pt-long { display: none; } html.big #pwBody .perks .tl:not([data-perk="adv"]) .pt-short { display: block; }
@media (max-height: 700px) {
  #pwBody:not([data-ctx="me"]):not([data-ctx="ob"]) .perks .tl:not(.on) .pt-long, html.mid #pwBody .perks .pt-long { display: none; }
  #pwBody:not([data-ctx="me"]):not([data-ctx="ob"]) .perks .tl:not(.on) .pt-short, html.mid #pwBody .perks .pt-short { display: block; }
}
/* Dynamic Type up to 160 % (Larger Accessibility Sizes): layouts that need it go two by two or stack */
html.huge .quick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
html.huge .quick button { min-height: 0; white-space: normal; }
html.huge .acts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
html.huge .acts button.main { grid-column: 1 / -1; order: -1; }
html.huge .commit-days, html.huge .slots.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
html.huge .slots { grid-template-columns: 1fr; }
html.huge .stats { grid-template-columns: 1fr; }
html.huge .stat { display: flex; align-items: baseline; gap: 10px; text-align: left; padding: 10px 14px; }
html.huge .seg.seg3 { grid-template-columns: 1fr; }
html.huge .seg.seg3 button { white-space: normal; height: auto; min-height: 44px; }
html.huge .seg { grid-template-columns: 1fr; }
html.huge .stop .thumb { width: 56px; height: 56px; border-radius: 16px; }
html.huge .trail::before { left: 26px; }
html.huge .stop b, html.huge .stop span { overflow-wrap: anywhere; }
html.huge .tab .tab-l { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
html.huge .tab svg { width: 28px; height: 28px; }
html.huge .me-head { grid-template-columns: minmax(0, 1fr) auto; }
html.huge .me-head img { display: none; }
html.huge .set { flex-wrap: wrap; gap: 8px; }
html.huge .set > span:first-child { flex: 1 1 60%; min-width: 0; overflow-wrap: anywhere; }
html.huge .set-stack .row { flex-wrap: wrap; }
html.huge .set-stack .row .mini { flex: 1 1 100%; }
html.huge .row { flex-wrap: wrap; }
html.huge .plans { grid-template-columns: 1fr; }
html.huge .times { grid-template-columns: 1fr; }
html.huge .moods { grid-template-columns: repeat(2, minmax(0, 1fr)); }
html.huge .items { grid-template-columns: 1fr; }
html.huge .icons { grid-template-columns: repeat(4, minmax(0, 1fr)); }
html.huge .chips.frames { flex-wrap: wrap; }
html.huge .chips.frames .chip { white-space: normal; }
html.huge .trial-tl { grid-auto-flow: row; }
html.huge .trial-tl::before { display: none; }
html.huge .pw-alt { flex-wrap: wrap; }
html.huge .scene-top .pill { height: auto; min-height: 36px; }
html.huge .bubble { max-width: calc(100% - 32px); }
html.huge .warm-top { flex-wrap: wrap; }
/* R18: long words wrap whole (hyphenated in the page's language), never letter by letter */
html.huge .goal b, html.huge .note, html.huge .card b, html.huge h2, html.huge h3 { overflow-wrap: break-word; hyphens: auto; -webkit-hyphens: auto; }
html.huge .letter-nav .mini { flex: 1 1 auto; }
html.huge .scene.is-away .away .card { grid-template-columns: 1fr; }
html.huge .scene.is-away .away .sled { display: none; }
html.huge .scene.is-away .away .countdown { grid-column: 1; grid-row: auto; text-align: left; }

/* R17: the paywall title clears the close button with large text; letters at 160 % keep their signature on the card */
html.big #pwBody h2 { padding-inline: 44px; }
html.huge .face-b { font-size: 0.875rem; line-height: 24px; padding: 22px 16px 16px; background: #fffdf8 repeating-linear-gradient(180deg, transparent 0 23px, #efe3d4 23px 24px); }
html.huge .face-b .stamp { width: 48px; height: 58px; }

/* ---- 1.2 R18 fix A: layout and polish (CSS only) ---- */
/* the iPhone app in a window wider than a phone (an iPad with full support, a Mac): a centred phone-wide column, so the
   scene keeps its proportions and the bears keep their heads; everything inside .phone follows the column */
@media (min-width: 600px) {
  html.native body { background: #efe6f5; }
  html.native .phone { max-width: 480px; margin: 0 auto; box-shadow: 0 0 0 1px #e4dcec, 0 24px 60px rgba(24, 18, 30, .12); }
}
/* paywall: the matching perk is emphasised, not "selected" (the honey ring belongs to the plans); the context art is one
   size family: postcard and shop tile 64 pt, 80 pt where the screen is tall, the framed postcard stays larger */
.perks .tl.on { background: #fff; box-shadow: var(--shadow); }
.paywall .ob-art.pw-tile { max-width: 64px !important; border-radius: 14px; box-shadow: var(--shadow); }
@media (min-height: 800px) { .paywall .ob-art.pw-pc, .paywall .ob-art.pw-tile { max-width: 80px !important; } }
/* Me, mid-trial: the trial sentence is its own small white panel under the perks, the picture sits at the top */
.plus-card { align-items: flex-start; }
.plus-card .trial-note { display: block; margin: 8px 0 2px; padding: 8px 10px; border-radius: 12px; background: #fff; color: #7f4d03; font-weight: 800; }
.plus-card p br:has(+ .trial-note) { display: none; }
/* no lone last word in perk descriptions and in the bears' speech bubble */
.perks .tl > div > span { display: block; text-wrap: balance; }
.bubble { text-wrap: balance; }
/* the frame chips keep a 44 pt target even when the label is short ("Snö" at 320 pt) */
.chips.frames .chip { min-width: 44px; justify-content: center; }
/* the four promise chips get room at 320 pt ("14 kvällar") */
@media (max-width: 360px) { .slots.four button { font-size: .75rem; padding-inline: 2px; } }
/* one link colour: text links are lavender like the fine-print links; the ways out ("Maybe later", "Not now", "Skip")
   stay quiet grey on purpose */
.link { color: var(--lav-deep); }
.link[data-a="obNext"], .link[data-a="close"], .link[data-a="nameSkip"] { color: var(--ink-2); }
/* the sheet's close button is a soft round button, not a white square with a ring */
.sheet-x { background: var(--mist); box-shadow: none; border-radius: 50%; }
.sheet-x:focus-visible { box-shadow: 0 0 0 2px #fff, 0 0 0 6px var(--lav-deep); }
/* secondary buttons in Me's cards share one style (the lavender of Replay and Add) */
.set .mini { background: #f1ecfd; color: var(--lav-deep); box-shadow: none; }
/* tinted cards are flat; white cards carry the shadow */
.card.care, .paw-card { box-shadow: none; }
@media (prefers-contrast: more) { .card.care, .paw-card { box-shadow: 0 0 0 1.5px #8d7aa3; } }
/* radii follow the tokens: heroes 26, cards 20, controls 14, chips round; one heading size for hero cards */
:root { --r-hero: 26px; }
.adv-now, .pal-hero, .paw-card, .shop-hero { border-radius: var(--r-hero); }
.quick button, .note, .buddy, .plus-card, .item { border-radius: var(--r-md); }
.pal-hero h3 { font-size: 1.375rem; }
/* the trip card keeps its sled on 667 pt and shorter screens, so it is one component at every size */
@media (max-height: 700px) { .scene.is-away .away .sled { display: grid; } }
/* Larger Accessibility Sizes: the trip card stacks in one column (title, place, return time, all full width), so the
   return time never ends up in a narrow column or under the panel; on short screens the title and place go to
   VoiceOver only (the warmth card says "Out on: …") and the sled sits beside the return time */
/* larger text (115 % and up) and 320 pt screens: the return time goes under the place, beside the sled, so neither the
   title nor the time is squeezed into a narrow column */
html.big .scene.is-away .away .card { grid-template-columns: auto minmax(0, 1fr); }
html.big .scene.is-away .away .sled { grid-row: 1 / span 3; }
html.big .scene.is-away .away .countdown { grid-column: 2; grid-row: auto; text-align: left; max-width: none; }
@media (max-width: 360px) {
  .scene.is-away .away .card { grid-template-columns: auto minmax(0, 1fr); }
  .scene.is-away .away .sled { grid-row: 1 / span 3; }
  .scene.is-away .away .countdown { grid-column: 2; grid-row: auto; text-align: left; max-width: none; }
}
html.huge .scene.is-away .away .card { grid-template-columns: 1fr; }
html.huge .scene.is-away .away h3, html.huge .scene.is-away .away .muted, html.huge .scene.is-away .away .countdown { grid-column: 1; }
html.huge .scene.is-away .away .countdown { max-width: none; }
@media (max-height: 700px) {
  html.huge .scene.is-away .away .card { grid-template-columns: auto minmax(0, 1fr); }
  html.huge .scene.is-away .away .sled { display: grid; grid-row: auto; }
  html.huge .scene.is-away .away .countdown { grid-column: 2; }
  html.huge .scene.is-away .away h3, html.huge .scene.is-away .away .muted { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
/* Me at Larger Accessibility Sizes: a row's title takes the full width and its count drops below it, and a section
   heading lets its button wrap, so no word is broken letter by letter */
html.huge .card .row > .grow { flex: 1 1 100%; }
html.huge .sec-h { flex-wrap: wrap; gap: 8px; }

/* ---- 1.2 R18 part B ---- */
/* Me's last 7 days: a snow day (Bruno kept the fire going) is a snowflake, not an empty day */
.week i.snow { background: #e9f1ff; color: #6f95d3; }
/* notes read in their own direction (right-to-left too); a long list only lays out what is on screen */
button.note { text-align: start; }
.notes .note { content-visibility: auto; contain-intrinsic-size: auto 72px; }
/* a long one-word name never runs out of a letter or the warm-paw card */
.face-b, .paw-card span { overflow-wrap: anywhere; }
/* Low Power Mode can refuse to autoplay the bears' loop: never a play button over them */
video::-webkit-media-controls, video::-webkit-media-controls-start-playback-button, video::-webkit-media-controls-overlay-play-button { display: none !important; -webkit-appearance: none; }
/* the goal sheet: Complete is first for VoiceOver, in the middle on screen (at the largest sizes it is on top, above) */
.acts .act-l { order: 1; }
.acts .main { order: 2; }
.acts .act-r { order: 3; }
/* step 8 while StoreKit is asked (up to 1.5 s): the line under the buttons */
.ob-wait { margin: 6px 0 0; text-align: center; font-size: 0.8125rem; font-weight: 800; color: var(--ink-2); }
/* step 8 on short screens (iPhone SE): both answers fit on the first screen */
@media (max-height: 700px) {
  .ob-nudge .ob-art.sm { max-width: 104px; margin-bottom: 0; }
  .ob-nudge .ob-body h2 { margin-top: 2px; }
  .ob-nudge .time { padding: 10px 12px; }
  .ob-nudge .time .i { width: 32px; height: 32px; }
  .ob-nudge .time b { font-size: 1.125rem; margin-top: 2px; }
  .ob-nudge .ob-foot { padding-top: 10px; }
}

/* ---- 1.2 R19 ---- */
/* every paywall: the close button stays in the corner while the page scrolls, and a flat band in the paywall's colour
   keeps the clock readable over scrolled text (ios-design-review S1) */
.paywall .ob > .row { position: sticky; top: calc(var(--safe-top) + 4px); right: auto; height: 0; z-index: 6; margin-right: -10px; align-items: flex-start; }
/* 375x667: the bears' picture steps aside on the Me paywall, so the price and the Terms, Privacy and Restore row under the
   buy button stay on the first screen (a paywall opened from a postcard or an item keeps its small picture) */
@media (max-height: 700px) { .full.paywall .ob-art.sm:not(.pw-art) { display: none; } }
/* with the picture gone the lead moves up beside the docked close button: it keeps the h2's 40 px sides (native2 S1).
   Only that paywall: one opened from a postcard or an item keeps its picture, so its lead keeps the full width (review3 4;
   a sibling selector, no :has, so iOS 15.0-15.3 reads it too) */
@media (max-height: 700px) { .full.paywall .ob-art.sm:not(.pw-art) + #pwBody .pw-lead { padding-inline: 40px; } }
/* the onboarding paywall never shows its picture at 375x667, so its lead always sits beside the docked close button: the
   same 40 px sides, so the x never covers a word ("Plus adds a", R19 S1 / R23 native S5) */
@media (max-height: 700px) { .screen.paywall #pwBody .pw-lead { padding-inline: 40px; } }
.paywall .ob-back { background: #fdf3e6; border-radius: 50%; }
.full.paywall::before, .screen.paywall::before { content: ''; position: sticky; top: 0; display: block; height: var(--safe-top); margin-bottom: calc(-1 * var(--safe-top)); background: #fdf3e6; z-index: 5; }
/* larger text: the main button stays docked at the bottom in onboarding and on the paywall (S2), as iOS does */
html.big .ob-foot { position: sticky; bottom: 0; z-index: 80; background: var(--snow); margin: 0 -24px; padding: 10px 24px calc(var(--safe-bot) + 12px); box-shadow: 0 -1px 0 var(--line); }
html.big .paywall .ob-foot { background: #fdf3e6; }
html.big .splash .ob-foot { background: #f6eefa; }
html.huge .share-prev img { height: min(24vh, 200px); }
/* the grabber can be dragged: a 44 pt strip across the top of the sheet takes the finger (S3) */
.grab { position: relative; touch-action: none; cursor: grab; }
.grab::before { content: ''; position: absolute; left: -120px; right: -120px; top: -12px; bottom: -22px; }
/* titles at the largest text break between words, never inside one ("anoth-er") (S4) */
html.huge .sheet h3, html.huge .ob h2, html.huge h2.title { hyphens: manual; -webkit-hyphens: manual; text-wrap: balance; }
/* the trip card: where its title is hidden, the time left says "Back in 2:59", never a bare "2:59" (P1) */
.countdown .cd-w { display: none; }
@media (max-height: 700px) { html.huge .scene.is-away .away .cd-n { display: none; } html.huge .scene.is-away .away .cd-w { display: inline; font-size: 0.9375rem; } }
/* tab labels stay at their fixed size, as in iOS (P2) */
html.huge .tab .tab-l { position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: nowrap; font-size: 11px; line-height: 1.1; }
html.huge .tab svg { width: 24px; height: 24px; }
/* Plus marks are honey, not red: red is for counts and destructive actions on iOS (P3) */
.plus-mini, .plus-badge, .me-head .plus-badge, .item .plus-tag, .stop b .plus-mini { background: var(--honey); color: #3b2508; }
/* the promise step moves on by itself once promised: no greyed-out button before that (P4) */
#commitNext[disabled] { visibility: hidden; }
/* on a paywall a toast sits at the bottom, never over the title (P6) */
/* R28 (a11y P3): at the top after all, under the row with back and close: at the bottom it lay on the plans, the line
   under them, "Have a code?", "Maybe later" and the renewal terms, which are what such a toast talks about. Full width,
   so a long one ("No active Bearly Plus was found…" at 160 %) stays short enough to end above the docked button */
#phone:has(#app #pwBody, .full.on #pwBody) .toast { top: calc(var(--safe-top) + 60px); bottom: auto; }
/* the paywall: the price of the chosen plan and the Terms, Privacy and Restore row right under the buy button */
#pwBody .pw-price { margin: 8px 0 -6px; }
#pwBody .pw-cta { margin-top: 4px; }
.pw-web { display: grid; gap: 6px; text-align: center; margin: 4px 0 6px; }
.pw-web b { font-weight: 900; font-size: 1.0625rem; }
.pw-web span { color: var(--ink-2); font-size: 0.875rem; font-weight: 700; line-height: 1.4; }
.pw-web .btn { margin-top: 8px; }
/* Me: what iCloud carries, under the sync status; the quiet line under a sheet's answers */
.sync-what { display: block; margin-top: 2px; font-weight: 700; color: var(--ink-2); }
.sheet-note { margin: 12px 0 0; }
.ob-note { margin-top: -8px !important; font-weight: 700; }
/* no goals yet: the card is the first thing under the warmth meter */
.card.empty.empty-top { margin: 12px 0 2px; }
/* iPhone SE: the welcome screen keeps "Have a backup? Restore it" on the first screen (native P1) */
@media (max-height: 700px) { .splash .ob > div:first-child { height: 0 !important; } .splash .ob-art { width: 62%; } }
/* ---- 1.2 R19 native2 ---- */
/* the promise step: until the promise its button is hidden, so its foot is not docked (no empty band at large text) */
html.big .ob-foot.ob-idle { position: relative; background: none; box-shadow: none; }
/* the largest text on a short screen: the name step's foot stays under the field, so the field is on the first screen (P1) */
@media (max-height: 700px) { html.huge .ob-foot.ob-foot-name { position: relative; background: none; box-shadow: none; } }
/* larger text on the paywall: the price and the Terms, Privacy and Restore row dock together with the buy button (P2) */
html.big .pw-dock { position: sticky; bottom: 0; z-index: 80; background: #fdf3e6; margin: 0 -24px; padding: 0 24px calc(var(--safe-bot) + 4px); box-shadow: 0 -1px 0 var(--line); }
html.big #pwBody .pw-dock .ob-foot { position: relative; margin: 0; padding: 10px 0 0 !important; background: none; box-shadow: none; }
html.big #pwBody .pw-dock .pw-price { margin: 6px 0 -8px; }
html.big #pwBody .pw-dock .fine.links { margin-top: 0; }
/* ---- 1.2 R19 review3 ---- */
/* the largest text, or larger text on a screen under 600 pt: only the buy button and the price under it stay docked; the
   Terms, Privacy and Restore row follows right below them in the page, so the dock never takes half the screen (at 160 %
   on 320x568 the whole block took over 60 %). At 130 % on taller screens the three still dock together (P2) */
html.huge #pwBody .pw-dock { display: contents; }
html.huge #pwBody .pw-buy { position: sticky; bottom: 0; z-index: 80; background: #fdf3e6; margin: 0 -24px; padding: 0 24px calc(var(--safe-bot) + 10px); box-shadow: 0 -1px 0 var(--line); }
html.huge #pwBody .pw-dock .fine.links { margin-top: 10px; }
@media (max-height: 600px) {
  html.big #pwBody .pw-dock { display: contents; }
  html.big #pwBody .pw-buy { position: sticky; bottom: 0; z-index: 80; background: #fdf3e6; margin: 0 -24px; padding: 0 24px calc(var(--safe-bot) + 10px); box-shadow: 0 -1px 0 var(--line); }
  html.big #pwBody .pw-dock .fine.links { margin-top: 10px; }
}
/* focus moved by keyboard or Switch Control never lands behind the docked part (--pw-dock-h is measured in app.js) */
html.big .full.paywall, html.big .screen.paywall { scroll-padding-bottom: calc(var(--pw-dock-h, 0px) + 16px); }
/* ---- 1.3 R24 usability ---- */
/* the warmth card says what warmth is: its top row is the button that opens the explainer, the whole card answers a tap */
.card.warm { cursor: pointer; }
.warm-top { width: 100%; padding: 0; border: 0; background: none; font: inherit; color: inherit; text-align: left; }
.warm-top:focus-visible { outline: 3px solid var(--lav-deep); outline-offset: 4px; border-radius: 12px; }
.warm-line { margin: 10px 2px 0; font-size: 0.8125rem; font-weight: 700; line-height: 1.4; color: var(--ink-2); text-wrap: pretty; }
.warm-wait { color: var(--ink); }
/* a skipped or snoozed goal: its round check still shows a check, muted (a tap completes it) */
.goal.skip .check, .goal.snooze .check { color: var(--ink-3); }
.goal.skip .check svg, .goal.snooze .check svg { opacity: .55; }
/* the goal sheet's Skip and Snooze say what they do */
.acts .act-cap { display: block; font-size: 0.6875rem; font-weight: 700; color: var(--ink-3); line-height: 1.2; margin-top: -2px; }
.acts button { min-width: 0; overflow-wrap: anywhere; -webkit-hyphens: auto; hyphens: auto; }
/* the check-in: what it is about right under the weather, then Save, then Save and breathe */
.mood-tags-h { margin-top: 2px; }
.chips.mood-tags { justify-content: flex-start; margin-bottom: 16px; }
.chips.mood-tags .chip { min-height: 44px; padding: 6px 12px; font-size: 0.875rem; }
#moodExtra .btn { margin-top: 10px; }
#moodReply .reply { margin-top: 14px; }
/* the Shop says what each half holds */
.seg-note { margin: -6px 4px 12px; font-size: 0.8125rem; }
/* the promise step: its button is shown at full strength from the start (never a greyed-out, dead button, R19 P4); a tap
   on it before the promise nods the paw and says how (R24 F4) */
#commitNext[aria-disabled="true"] { visibility: visible; }
.hold.nudge { animation: holdNudge .6s var(--spring, ease-out); }
@keyframes holdNudge { 0%, 100% { transform: none; } 25% { transform: scale(1.08) rotate(-6deg); } 55% { transform: scale(1.04) rotate(5deg); } }
html.reduce .hold.nudge { animation: none; box-shadow: 0 0 0 4px var(--honey, #e9a93e); }
/* a confirm that clears or replaces everything: a quiet way out to a backup first */
.ask-extra { margin: -4px 0 14px; text-align: center; }
.ask-extra .link { min-height: 44px; }
/* the Home tile says Tassanteckning in Swedish too: in a narrow phone it breaks at its soft hyphen (Tass-/anteckning)
   instead of widening its column past the edge */
@media (max-width: 360px) { .quick .q-note { white-space: normal; } }
/* R25 iPhone Duo, outer display (466 x 678 pt): a phone that is short and wide. At max-height 700 the scene is 41vh with
   the art anchored 46cqw under its bottom; at 466 pt wide that showed only the art's band from 41 % to 74 %, so the bears'
   heads were cut at the eyes, the cabin was out of view and the night den was cropped. A window 450 to 599 pt wide and at
   most 700 pt tall gets a scene as tall as 73 % of its width: the same 33 % to 74 % band an iPhone SE shows. No iPhone is
   450 pt wide (the widest is 440), so no iPhone matches, not even with the keyboard up. The art's bottom anchor and every
   decoration placed from it are unchanged. Wider than 600 pt (the Duo's inner display) keeps the centred 480 pt column. */
@media (min-width: 450px) and (max-width: 599px) and (max-height: 700px) { .scene { height: 73vw; } }
/* ---- R26 (1.3.1) ---- */
/* no control that looks tappable and does nothing (R26 S4): Save before a weather, Save note and Add goal while empty are
   aria-disabled, faded but still tappable, and a tap says what is missing; the weather row nods */
#moodSave[aria-disabled="true"], #nSave[aria-disabled="true"], #gAdd[aria-disabled="true"] { opacity: .45; }
#moodSave[aria-disabled="true"]:active, #nSave[aria-disabled="true"]:active, #gAdd[aria-disabled="true"]:active { transform: none; }
.moods.nudge { animation: moodsNudge .5s var(--spring, ease-out); }
@keyframes moodsNudge { 0%, 100% { transform: none; } 30% { transform: translateX(-5px); } 60% { transform: translateX(4px); } }
html.reduce .moods.nudge { animation: none; }
#moodReply .pick-first { margin: 12px 0 0; font-weight: 700; color: var(--ink-2); }
/* a11y (R26): with larger text a settings row wraps when its label and its controls don't fit side by side (Påminnelsetid
   with 08:30 and 20:30 at 320 pt, Swedish, 130 %), so nothing runs past the card; the label keeps its own width */
html.big .set { flex-wrap: wrap; gap: 8px; }
html.big .set > span:first-child { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
html.big .set > .row { flex-wrap: wrap; margin-left: auto; }
/* the tags on Journey reach 4.5:1 (R26 a11y 2): "Next adventure" and "Postcard collected" */
.tag { color: #24523a; }
.stop .tag:not(.next):not(.lock) { color: #24523a; }
.tag.next { color: #6b4000; }
/* the warmth card's header is a button: a full 44 pt to tap (R26 a11y 7) */
.warm-top { min-height: 44px; }
/* a toast or the bears' peek over the bottom: room to scroll the last row clear of it (R26 a11y 5) */
.app.float-pad .screen::after { content: ''; display: block; height: 112px; }
/* the reminder step at the largest text (R26 native P4): both times, morning and evening, are seen before the buttons.
   The picture steps aside and the buttons follow the two choices instead of docking over the evening one */
html.huge .ob-nudge .ob-art.sm { display: none; }
html.huge .ob-nudge .ob-foot { position: relative; background: none; box-shadow: none; margin: 0; padding: 14px 0 calc(var(--safe-bot) + 12px); }
/* the notes in Me are laid out like everything else (R26 S5): with content-visibility a redrawn list started as 72 pt
   placeholders and then settled frame by frame to the notes' real heights, so the screen slid under a restored scroll
   position (the "same-tab re-render keeps scroll" jump). Me shows 3, 20, then 50 more at a time, so the layout is small */
.notes .note { content-visibility: visible; contain-intrinsic-size: none; }
/* a same-tab redraw (a purchase, a setting, a deleted goal) shows the screen as it was: no entrance played again (R26 S5) */
.screen.same .stagger > *, .screen.same.stagger > * { animation: none; }

/* ---- R27 (1.3.1) ---- */
/* the promise step's Next sits where the reminder step's "Allow gentle nudges" comes; an invisible twin of "Not now" keeps
   the place, so a finger that just tapped Next is never over the next step's "Not now" (native S1, verify P2) */
.ob-spacer { display: block; visibility: hidden; pointer-events: none; }
/* a tap that is not taken (the second half of a double tap on a new onboarding step) is never silent: the button nods */
.nod { animation: btnNod .45s var(--spring, ease-out); }
@keyframes btnNod { 30% { transform: scale(.95); } 65% { transform: scale(1.02); } }
html.reduce .nod { animation: none; outline: 3px solid var(--honey, #e9a93e); outline-offset: 2px; }
/* a toast over the bears' pop-up card moves up above it (flows P3) */
.toast.over-peek { bottom: var(--over-peek, calc(var(--safe-bot) + 96px)); }
/* over a sheet the toast leaves the corners free, so the sheet's close button is never under it at large text (a11y P2) */
.layer:has(> .sheet.on) ~ .toast { max-width: calc(100% - 136px); }
/* R28 (verify P4): a toast tall enough to reach a sheet's title moves under it (placeOverSheet in app.js) */
.toast.under-title { top: var(--under-title) !important; bottom: auto !important; }
/* R29 (verify P4): the same places from classes app.js sets (toastPlace), for iOS 15.0-15.3, which has no :has(). Where
   :has() works both apply and agree: the paywall's :has() rule still outranks these */
#phone .toast.t-sheet { bottom: auto; top: calc(var(--safe-top) + 12px); max-width: calc(100% - 136px); }
#phone .toast.t-full { top: calc(var(--safe-top) + 12px); bottom: auto; }
#phone .toast.t-pw { top: calc(var(--safe-top) + 60px); bottom: auto; }
/* a plan the App Store didn't send is shown faded and still takes a tap, which asks again (verify P6) */
.plan-opt[aria-disabled="true"] { opacity: .65; } /* R28 (a11y P2): readable (title 3:1 or more), still faded */
.name-left { margin: 6px 4px 0; text-align: end; color: var(--ink-2); }
.name-left:empty { display: none; }
/* at the largest text the reminder step's buttons are not docked (they follow the times, far below), so the promise
   step's docked Next needs no twin and covers less */
html.huge .ob-spacer { display: none; }
/* ---- R28 (1.3.1) ---- */
/* the warmth number always takes the room of "100/100", so the first tick of the day ("0/100" to "20/100") never wraps
   the title onto one more line and moves the list under a finger (verify P1, 320 pt at 160 %) */
.warm-top .tiny { flex: none; min-width: 7ch; text-align: right; font-variant-numeric: tabular-nums; }
/* the fairy lights on a short screen (375 x 667 and below, the Duo's outer display): they hang just under the top pills
   instead of behind them (flows P9) */
@media (max-height: 700px) { .lights { top: calc(var(--safe-top) + 48px); bottom: auto; } }

/* ---- 1.3.3 (R36, qa/r36/FIXES.md) ---- */
/* S2-1: the northern lights are a painted picture (assets/aurora.webp at night, aurora-day.webp by day: the ribbons with their own light as alpha) in a wide
   band over the trees and the cabin roof, below the pills and above the bears' ears. At night it is screen-blended on the dark
   wash at full strength; by day (Pocket aurora, Plus) a plain blend, softer. It drifts slowly; with less motion it holds still.
   The id selector wins over the 1.0-1.3 blob rules above (blur, mask, inset), which no longer apply */
#scene .aurora { inset: auto; left: -4%; right: -4%; top: -1%; height: 38%; background: url(assets/aurora.webp) 50% 0 / 100% 100% no-repeat; filter: none; -webkit-mask-image: none; mask-image: none; mix-blend-mode: normal; transform-origin: 50% 0; transition: opacity 1.4s; animation: auroraDrift 18s ease-in-out infinite alternate; }
#scene .aurora.on { opacity: .72; filter: saturate(1.3); mix-blend-mode: normal; background-image: url(assets/aurora-day.webp); }
#scene[data-tod="night"] .aurora.on { opacity: 1; mix-blend-mode: screen; filter: none; background-image: url(assets/aurora.webp); }
#scene .aurora:not(.on) { animation: none; }
@keyframes auroraDrift { from { transform: translate3d(-1.5%, 0, 0) scaleY(.96); } to { transform: translate3d(1.5%, 0, 0) scaleY(1.06); } }
/* short scenes (iPhone SE and the iPad window): the picture shows almost no sky above the bears, so the band stays at the very top, between and under the pills over the cabin roof, and never reaches their ears */
@media (max-height: 700px) { #scene .aurora { top: -2%; height: 24%; } }
/* tucked in, the den fills the scene: the lights sit over the snowy sky above the den's dome */
#scene.tucked .aurora { height: 32%; }
/* S2-2: the away scene crossfading in (less motion, or no film) sits where the films sit, under the night wash */
.scene .still.depart-fade { opacity: 0; pointer-events: none; }
/* S2-4: frost you can see: window frost from the edges (assets/frost.webp) drawn as a border image (nine slices, the middle
   never drawn), so the corners keep their shape on every phone and nothing in the middle, the bears' faces or the bubble,
   is ever covered. The pills, the bubble and the buttons are drawn above it. app.js sets its opacity as before (warmth melts
   it, Warm hearth removes it) */
#scene #frost { box-shadow: none; border-style: solid; border-color: transparent; border-width: 56px 38px 44px; border-image-source: url(assets/frost.webp); border-image-slice: 150 110 150 110; border-image-width: 1; border-image-repeat: stretch; }
#scene[data-tod="night"] #frost { box-shadow: none; filter: brightness(.86); }
@media (max-height: 700px) { #scene #frost { border-width: 42px 30px 34px; } }

/* ---- 1.3.4 (QA 2026-11-05, qa/site-qa-1105/FINDINGS.md) ---- */
/* A10: Save before a weather, Save note and Add goal while empty are still tappable, so their words must be readable: flat
   colours at 7.6:1 in place of the 45 % fade (3.1:1), the same way the paywall's waiting button is drawn */
#moodSave[aria-disabled="true"], #nSave[aria-disabled="true"], #gAdd[aria-disabled="true"] { opacity: 1; background: #e6d8ce; color: #5b3520; box-shadow: 0 6px 0 #cdbbad; }
/* A2: a 568 pt tall screen (iPhone SE 1st generation, or Display Zoom on a 4.7 inch iPhone): the welcome's buttons are
   on the first screen at every step. The foot docks at the bottom, the way it does at larger text (which keeps its own
   rules), on the page's own colour. The name step's foot stays under the field (the keyboard makes a taller phone this
   short too); the splash and the paywall have their own feet */
@media (max-height: 600px) {
  html:not(.big) .screen:not(.splash):not(.paywall) .ob-foot:not(.ob-foot-name) { position: sticky; bottom: 0; z-index: 80; background: var(--snow); margin: auto -24px 0; padding: 8px 24px calc(var(--safe-bot) + 10px); }
}
/* and on a phone that is narrow as well (320 x 568) each step is drawn a little tighter, so nothing lies under the docked
   foot: smaller headings and gaps, a smaller paw to hold, and the reminder step without its picture, so both times and
   both answers ("Allow gentle nudges", "Not now") are seen at once */
@media (max-height: 600px) and (max-width: 340px) {
  html:not(.big) .ob-body h2 { font-size: 1.5rem; margin: 4px 0 6px; }
  html:not(.big) .ob-body p.lead { margin-bottom: 12px; }
  html:not(.big) .ob-body .chips { gap: 8px; }
  html:not(.big) .ob-body .chips .chip { min-height: 44px; padding-block: 8px; }
  html:not(.big) .commit-days { margin-bottom: 12px; }
  html:not(.big) .commit-days button { height: 60px; }
  html:not(.big) .hold { width: 100px; height: 100px; margin: 2px auto; }
  html:not(.big) .hold .paw { width: 50px; height: 50px; }
  html:not(.big) .ob-body #holdTxt { margin: 8px 0 4px; }
  html:not(.big) .ob-nudge .ob-art.sm { display: none; }
}
