/* The opening screen is the app home, with each tool one tap away. */
.shell { padding-bottom: calc(103px + env(safe-area-inset-bottom)); }
.home-visible .topbar { min-height: 46px; }
.home-brand h1:focus { outline: none; }
.home-brand { text-align: center; margin: -17px 0 15px; }
.home-brand img { display: block; width: 154px; height: auto; margin: 0 auto 5px; }
.home-brand p { font-size: .9375rem; line-height: 1.5; color: var(--muted); }
.app-home { animation: home-appear .45s ease-out; }
.home-tool-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 11px; }
.home-tool { display: grid; gap: 6px; align-content: start; position: relative; min-height: 145px; border-radius: 22px; padding: 16px; color: #193d42; text-decoration: none; }
.home-tool img { width: 43px; height: 43px; margin-bottom: 3px; }
.home-tool strong { font-size: 1rem; line-height: 1.3; }
.home-tool span { font-size: .875rem; line-height: 1.4; opacity: .8; }
.home-tool.mint { background: #b6dace; }.home-tool.peach { background: #f4bba6; }.home-tool.lavender { background: #c9c2de; }.home-tool.yellow { background: #e4cc92; }
.collection-pill { margin-left: auto; border-radius: 99px; font-size: .875rem; padding: 8px 11px; background: var(--panel); color: var(--teal); white-space: nowrap; }
.app-navigation { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: min(100%,548px); z-index: 10; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); background: #0c2732f5; border-top: 1px solid #395660; padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); backdrop-filter: blur(16px); }
.app-navigation a { display: grid; justify-items: center; align-content: center; gap: 5px; min-height: 55px; border-radius: 14px; color: #b2cbc9; text-decoration: none; font-size: .875rem; line-height: 1.2; }.app-navigation svg { width: 22px; height: 22px; }
.app-navigation a[aria-current="page"] { background: #1d4148; color: #8be0c6; }
body:has(.is-playing) .app-navigation { display: none; }
/* Stickers live directly in the app, without a book frame or page navigation. */
.collection-subtitle { color: var(--muted); font-size: 1rem; margin: -6px 0 24px; }
.collection-summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 0 20px; border-bottom: 1px solid #34505a; }
.collection-summary > strong { font-size: 1.8rem; color: #b7dfc9; }.collection-summary strong span { font-size: .875rem; font-weight: 500; color: var(--muted); }.collection-summary > span { font-size: .875rem; color: var(--muted); }
.sticker-collection { list-style: none; margin: 0; padding: 26px 0 18px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 29px 13px; }
.collection-item { display: grid; align-content: start; justify-items: center; gap: 6px; text-align: center; min-width: 0; }.collection-item strong { font-size: 1rem; line-height: 1.35; }.collection-item > span { color: var(--muted); font-size: .875rem; }
.collection-art { width: min(100%,173px); aspect-ratio: 1; border-radius: 37%; padding: 14px; margin-bottom: 5px; background: radial-gradient(ellipse at center,color-mix(in srgb,var(--sticker-tint) 12%,transparent),transparent 72%); }
.loose-sticker { display: block; width: 100%; height: auto; transform: rotate(var(--tilt,-5deg)); filter: drop-shadow(0 2px 1px #0004) drop-shadow(0 8px 7px #0003); }
.waiting .collection-art { position: relative; background: transparent; }.waiting .collection-art::before { content:''; position:absolute; inset:17px; border: 1.5px dashed #829b986e; border-radius:50%; transform:rotate(var(--tilt)); }
.waiting .loose-sticker { opacity: .2; filter: grayscale(1); }.waiting > strong { color: #b2cbc9; font-weight: 550; }
.next-sticker-note { display: flex; align-items: center; gap: 12px; border-top: 1px solid #34505a; padding: 20px 5px; }.next-sticker-note p { display: grid; gap: 7px; }.next-sticker-note strong { font-size: .9375rem; font-weight: 650; }.next-sticker-note p span { color: var(--muted); font-size: .875rem; line-height: 1.5; }.tiny-star { font-size: 2rem; color: #e0c88d; }
.earlier-heading { color: var(--muted); font-weight: 600; }.earlier-stickers { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; padding: 12px 4px; }
.new-sticker .loose-sticker { animation: sticker-settle .8s cubic-bezier(.2,.7,.2,1) both; }.sticker-detail-art { width: 190px; margin: 25px auto; }.sticker-detail-copy { color: var(--muted); text-align: center; line-height: 1.6; margin-bottom: 14px; }
.routine-emoji { display: inline-grid; place-items: center; font-size: 2rem; line-height: 1.2; }.routine-player .routine-emoji, .routine-intro .routine-emoji { width: 180px; height: 180px; font-size: 7rem; }.emoji-picks { display: grid; grid-template-columns:repeat(5,1fr); gap:7px; margin-bottom:14px; }.emoji-picks button { min-height:50px; background:var(--panel); border-radius:10px; font-size:1.7rem; }
@keyframes home-appear { from { opacity:.1; transform:translateY(8px); } to { opacity:1; transform:none; } }
@keyframes sticker-settle { from { opacity:0; transform:scale(1.5) rotate(-17deg) translateY(-20px); } to { opacity:1; transform:rotate(var(--tilt)); } }
@media(max-width:360px) { .home-brand img { width:145px; }.home-tool { padding:13px; min-height:137px; }.home-tool span { font-size:.875rem; }.collection-summary { flex-wrap:wrap; } }
@media(min-width:700px) { .home-brand img { width:190px; }.home-brand { margin-top:-10px; }.home-tool { min-height:145px; } }
@media(prefers-reduced-motion:reduce) { .app-home,.new-sticker .loose-sticker { animation:none; } }
.narration-note { font-size:.9375rem; color:var(--muted); line-height:1.6; padding:16px 0 4px; }
.welcome-start { min-height:58px; max-width:340px; font-size:1.1rem; margin-top:22px; }
.picker-section-title { font-size:.9375rem; font-weight:650; margin:16px 0 10px; color:var(--muted); }
.home-loading { text-align:center; padding:24px 0; }.home-loading img { display:block; margin:0 auto 14px; }.home-loading p { color:var(--muted); font-size:.9375rem; }
.routine-intro h1 { font-size:clamp(2.7rem,11vw,4.5rem); margin:20px 0; }
.countdown-page { text-align:center; }.countdown-page > .text-button:first-child { display:flex; width:fit-content; }
.countdown-stage { min-height:60svh; display:grid; place-content:center; gap:24px; }.countdown-stage p { font-size:clamp(1.5rem,6vw,2.4rem); font-weight:650; }
.countdown-number { font-size:clamp(6rem,25vw,10rem); line-height:1.1; font-weight:800; color:#bde3d5; animation:count-breathe 1.1s ease-in-out both; }
@keyframes count-breathe { 0% { opacity:0;transform:scale(.94); } 35%,75% { opacity:1;transform:scale(1); } 100% { opacity:.15;transform:scale(1.02); } }
.step-complete .routine-big-art { animation-duration:1.4s; }.step-complete .step-celebration { animation-duration:1.8s; }.step-complete.bright .step-celebration span { animation-duration:1.8s; }
.routine-finished { animation:finish-arrive .8s ease-out both; }
@keyframes finish-arrive { from { opacity:0;transform:translateY(15px); } to { opacity:1;transform:none; } }
@media(prefers-reduced-motion:reduce) { .countdown-number,.routine-finished { animation:none; } }
/* Random sticker collection and tactile reveal. Artwork uses the approved sheets as sprites. */
.sticker-sprite { display:inline-block; width:100%; aspect-ratio:1; background-image:var(--sheet); background-repeat:no-repeat; background-size:var(--sprite-size,400% 300%); background-position:var(--sprite-x) var(--sprite-y); }
.sticker-sprite.loose-sticker { height:auto; }.sticker-view-tabs { display:flex; gap:5px; padding:5px; border-radius:99px; background:var(--panel); margin:18px 0 24px; }.sticker-view-tabs button { flex:1; min-height:45px; border-radius:99px; background:transparent; font-weight:700; }.sticker-view-tabs .selected { color:var(--ink); background:#bee3d6; }
.copy-count { display:inline-block; background:#1b4049; border-radius:99px; padding:4px 12px; font-variant-numeric:tabular-nums; }.waiting .copy-count { background:transparent; }.today-empty { padding:45px 15px; text-align:center; color:var(--muted); display:grid; gap:12px; }.today-empty > span { color:#e7c689; font-size:4rem; }.today-empty p:first-of-type { color:var(--cream); font-size:1.2rem; font-weight:700; }
.unopened-packets { display:grid; gap:8px; margin-top:18px; }.special-collection { color:var(--cream); margin-bottom:12px; }.special-collection strong { font-size:.9rem; }
.packet-page,.sticker-reward-page { padding-top:12px; }.packet-content { display:grid; justify-items:center; text-align:center; padding-top:35px; }.packet-content h1 { font-size:clamp(1.8rem,7vw,2.7rem); max-width:340px; }.sticker-packet { width:min(65vw,260px); height:310px; background:none; position:relative; margin:30px 0 20px; border-radius:20px; touch-action:pan-y; transform:rotate(-5deg); filter:drop-shadow(0 15px 20px #0004); }
.packet-body { position:absolute; inset:17px 0 0; border-radius:12px 12px 22px 22px; background:linear-gradient(125deg,#f9dca8,#edbdb4 52%,#d2c3e2); display:grid; place-content:center; justify-items:center; gap:14px; border:1px solid #fff3; }.packet-top { position:absolute; left:0; right:0; top:0; height:43px; border-radius:10px 10px 0 0; background:#b8ddcf; z-index:2; border-bottom:2px dashed #254b423b; transform-origin:left bottom; }.packet-star { color:#2b514b; font-size:6rem; line-height:1; }.packet-brand { color:#35564c; font-size:1.1rem; font-weight:800; letter-spacing:-.04em; }.packet-peel { position:absolute; top:0; right:0; width:44px; height:43px; border-radius:0 10px 0 12px; background:#e9f0dc; z-index:3; box-shadow:-4px 4px 5px #2e4f331a; }
.packet-instruction { color:var(--muted); font-size:.9375rem; }.packet-open { max-width:320px; margin-top:22px; min-height:57px; }
.packet-later { display: grid; place-items: center; width: 94%; max-width: 300px; min-height: 51px; margin-top: 8px; border-color: #658888; text-decoration: none; }
.packet-opening .packet-top,.packet-opening .packet-peel { animation:packet-peel 1.4s ease-in-out forwards; }.packet-opening .packet-body { animation:packet-glow 2s ease-in-out both; }
@keyframes packet-peel { 0% {transform:none;} 40% {transform:translate(12px,-20px) rotate(-7deg);} 100% {transform:translate(60px,-110px) rotate(28deg);opacity:0;} }
@keyframes packet-glow { 0%{box-shadow:0 0 0 #ffe3ab00;} 65%{box-shadow:0 0 65px #ffe3ab40;transform:scale(1.04);} 100%{box-shadow:0 0 90px #ffe3ab55;transform:scale(1.02);} }
.reward-focus { display:grid; justify-items:center; text-align:center; padding-top:26px; }.reward-kicker { font-size:1.1rem; color:#bbdfce; font-weight:700; margin:15px 0; }.reward-sticker-stage { width:min(75vw,330px); aspect-ratio:1; position:relative; padding:15px; background:radial-gradient(ellipse,#e7d2a120,transparent 70%); }.reward-loose-sticker { animation:reward-unfold 1.9s cubic-bezier(.15,.7,.2,1) both; filter:drop-shadow(0 14px 10px #0004); }.reward-focus h1 { margin-top:16px; font-size:clamp(2rem,8vw,3rem); }.reward-quantity { color:var(--muted); font-size:1.15rem; }.keep-sticker { width:100%; max-width:340px; min-height:58px; margin-top:27px; }.reward-spark { position:absolute; color:#f2d38c; font-size:2.1rem; animation:reward-spark 1.6s ease-out both; }.reward-spark.one { top:8%;left:4%; }.reward-spark.two { right:4%;bottom:13%; animation-delay:.25s; }
@keyframes reward-unfold { 0%{opacity:0;transform:translateY(35px) scale(.7) rotate(-12deg);} 60%{opacity:1;transform:translateY(-5px) scale(1.05) rotate(3deg);} 100%{opacity:1;transform:none;} }
@keyframes reward-spark { from{opacity:0;transform:scale(.3);} 50%{opacity:1;} to{opacity:1;transform:scale(1);} }
.extra-rewards { margin-top:25px; border-top:1px solid #3b555b; padding-top:16px; width:100%; }.extra-rewards h2 { color:var(--muted); font-size:.9375rem; margin:0 0 12px; }.extra-rewards > div { display:inline-grid; justify-items:center; gap:6px; width:100px; font-size:.875rem; vertical-align:top; }.extra-rewards img { width:60px;height:60px; }
.routine-name-entry { display:block; margin:15px 0 25px; }.routine-name-entry input { width:100%; border:none; border-bottom:2px solid #4b7976; border-radius:0; padding:12px 0; background:none; font-size:clamp(1.7rem,7vw,2.3rem); color:var(--cream); font-weight:700; letter-spacing:-.04em; outline-offset:6px; }.routine-name-entry input::placeholder { color:#9ab5b2; opacity:1; }.first-step-button { min-height:135px; background:#13333b; border-radius:22px; font-size:1.15rem; }.routine-more { margin-top:20px; border-top:1px solid #36515a; }.routine-more summary { color:var(--muted); cursor:pointer; padding:15px 0; font-size:.9375rem; }.custom-step-entry { width:100%; min-height:57px; border-radius:15px; background:#bee3d6; color:var(--ink); font-weight:750; margin:4px 0 15px; }.custom-step-preview { display:flex; align-items:center; gap:16px; padding:18px; border-radius:18px; background:#173b44; margin:18px 0; overflow-wrap:anywhere; }.custom-step-preview > span { font-size:2.5rem; flex:0 0 auto; }.emoji-suggestions { display:flex; gap:9px; margin-bottom:18px; }.emoji-suggestions button { min-width:58px; min-height:54px; border:1px solid #587779; border-radius:13px; background:var(--panel); font-size:1.8rem; }
.bell-pull { width:min(100%,410px); }.bell-stage { min-height:60svh; display:grid; place-items:center; }.bell-page [data-bell-status] { min-height:24px; }
@media(prefers-reduced-motion:reduce) { .packet-opening .packet-top,.packet-opening .packet-peel { opacity:0;animation:none; }.packet-opening .packet-body,.reward-loose-sticker,.reward-spark { animation:none; } }

.waiting .sticker-sprite { filter:brightness(0) invert(1); opacity:.14; }
@media(max-height:750px) { .packet-content { padding-top:16px; }.sticker-packet { height:260px; width:218px; margin:20px 0 14px; }.reward-sticker-stage { width:min(65vw,270px); }.reward-focus { padding-top:12px; } }

.home-brand .brand-slogan,
.home-loading .brand-slogan {
  font: italic 700 clamp(1.1rem, 4.4vw, 1.4rem)/1.3 Georgia, serif;
  color: #f0c3b4;
  max-width: 25ch;
  text-wrap: balance;
  margin-inline: auto;
}
.routine-cover {
  display: inline-block;
  flex: 0 0 auto;
  background: url('/gp/assets/routines/routine-covers.png') var(--cover-x) var(--cover-y) / 300% 200% no-repeat;
  aspect-ratio: 1;
}
.routine-list-link :is(.routine-cover, .routine-emoji) {
  width: 42px;
  height: 42px;
}
.emoji-browser {
  margin: 12px 0 18px;
  padding: 10px 0;
  border-top: 1px solid #36515a;
}
.emoji-browser summary {
  min-height: 44px;
  padding-block: 10px;
  cursor: pointer;
  font-weight: 650;
}
.emoji-bank {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(44px, 1fr));
  gap: 5px;
  max-height: 150px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 4px;
}
.emoji-bank button {
  min-height: 44px;
  border-radius: 8px;
  background: #173b44;
  font-size: 1.45rem;
}
.emoji-bank p { grid-column: 1 / -1; }

.quick-bedtime-link { display: block; width: fit-content; margin: 8px auto 0; }
.step-label-button { min-width: 0; overflow-wrap: anywhere; }
.step-timer-edit { flex: 0 0 auto; min-height: 44px; padding-inline: 3px; font-size: .875rem; }
.routine-next {
  display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 8px 12px;
  border: 1px solid #365463; border-radius: 14px; color: var(--cream); text-align: left;
}
.routine-next > span:first-child { color: var(--muted); font-size: .875rem; }
.routine-next img, .routine-next .routine-emoji { width: 40px; height: 40px; flex: 0 0 auto; font-size: 1.5rem; }
.run-adjustments { justify-content: space-between; }
.step-timer { display: grid; justify-items: center; gap: 8px; margin-top: 12px; }
.step-timer button { min-height: 44px; background: #21483f; color: #fff5dc; }
.step-timer [role="status"]:empty { display: none; }
.step-timer-dial {
  width: 88px; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(#39806d var(--timer-fill, 0%), #ded4b8 0%);
  font-variant-numeric: tabular-nums; font-weight: 750;
}
.step-timer-dial[hidden] { display: none; }
.step-timer-dial > span {
  display: grid; place-items: center; width: 72px; aspect-ratio: 1;
  border-radius: 50%; background: var(--cream);
}
.door-check { display: flex; gap: 4px 12px; flex-wrap: wrap; justify-content: center; border: 0; margin-top: 12px; }
.door-check legend { margin: auto; font-weight: 700; }
.door-check label { display: flex; align-items: center; min-height: 44px; gap: 5px; }
.door-check input { width: 18px; height: 18px; accent-color: #21483f; }
.finish-sparkles { display: block; color: #f1ce7e; font-size: 2rem; letter-spacing: .25em; }
.sticker-group { margin-top: 24px; }
.sticker-group .sticker-collection { padding-top: 10px; }
.sticker-group h2 { font-size: 1.1rem; }
.unopened-packets > button { display: grid; gap: 4px; text-align: left; min-height: 62px; }
.sticker-routine { overflow-wrap: anywhere; }
.routine-now { font-size: .875rem; color: #315960; font-weight: 700; }
.sticker-preview-waiting { filter: brightness(0) invert(1); opacity: .22; }
.activity-card .activity-setup { margin: 8px 0 14px; }

.album-tabs a {
  flex: 1 1 0; min-width: 0; min-height: 44px; display: grid; place-items: center;
  padding: 6px; border-radius: 99px; text-align: center; text-decoration: none;
  color: var(--cream); font-size: clamp(.85rem, 3.4vw, 1rem); font-weight: 700;
}
.album-tabs a[aria-current="page"] { background: #bee3d6; color: var(--ink); }
.album-back { min-height: 44px; display: inline-flex; align-items: center; gap: 6px; }
.album-back svg { width: 16px; height: 16px; flex: none; }
.moment-list, .moment-choice { display: grid; gap: 10px; }
.sticker-pack-card {
  display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: 12px;
  min-height: 84px; background: #153640; border: 1px solid #365463; border-radius: 16px;
  padding: 8px 14px; color: var(--cream); text-decoration: none;
}
.sticker-pack-card:hover { background: #1e4550; }
.sticker-pack-card > span:nth-child(2) { display: grid; gap: 4px; overflow-wrap: anywhere; }
.sticker-pack-card small { color: var(--muted); font-size: .875rem; }
.pack-chevron { font-size: 1.7rem; color: var(--muted); }
.album-pack-count { margin-top: 10px; color: var(--muted); }
.sticker-group .sticker-collection {
  grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 8px;
}
.sticker-group .collection-art { margin: 0; padding: 5px; }
.sticker-group .collection-item strong { font-size: .875rem; }
.sticker-group .waiting .collection-art::before { inset: 7px; }
.sticker-group .copy-count { padding: 2px 8px; }
.pack-complete, .earlier-collection { margin-top: 24px; }
.earlier-collection summary { min-height: 44px; padding: 12px 0; cursor: pointer; }
.sticker-play, .moment-note {
  background: #153640; border: 1px solid #365463; border-radius: 16px;
  padding: 16px; line-height: 1.55; margin: 14px 0;
}
.sticker-play h2 { font-size: 1rem; margin: 0 0 6px; }
.album-action { display: flex; align-items: center; justify-content: center; min-height: 48px; text-decoration: none; }
.moment-list { padding: 0; margin: 18px 0; list-style: none; }
.moment-empty { margin-top: 16px; }
.moment-choice { border: 0; padding: 0; margin-bottom: 18px; }
.moment-choice legend { padding-bottom: 10px; }
.moment-choice label { cursor: pointer; min-height: 62px; grid-template-columns: 44px minmax(0, 1fr) auto; }
.moment-choice label:has(input:checked) { border-color: #9ad3bd; background: #214940; }
.moment-choice input { width: 20px; height: 20px; accent-color: #aee0ce; }
.album-form textarea { width: 100%; resize: vertical; }

.emoji-filters {
  display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 10px;
}
.emoji-bank { max-height: min(34dvh, 235px); }
.emoji-more { min-height: 44px; margin-top: 6px; }
.emoji-more[hidden] { display: none; }
.step-picker-group { margin-top: 18px; }
.step-picker-group h3 { margin-bottom: 10px; font-size: 1rem; }
.step-pick .routine-emoji { width: 46px; height: 46px; font-size: 1.85rem; }
.moment-examples h2 { font-size: 1rem; margin: 18px 0 8px; }
.moment-examples > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.moment-example {
  display: grid; align-content: start; justify-items: center; gap: 5px;
  border: 1px solid #365463; border-radius: 12px; padding: 8px 4px;
  background: #153640; color: var(--cream); text-align: center; text-decoration: none;
  font-size: .875rem; line-height: 1.25;
}
.moment-example .sticker-sprite { width: min(56px, 100%); }
.sticker-play-link { min-height: 44px; display: inline-grid; place-items: center; }

.routine-overview .routine-row:not(.shared-step) {
  grid-template-columns: 34px minmax(0, 1fr) auto 30px;
}
.routine-row .step-label-button { display: flex; align-items: center; gap: 8px; }
.step-edit-art { display: grid; place-items: center; flex: 0 0 38px; width: 38px; height: 38px; }
.routine-row .step-edit-art img { width: 38px; height: 38px; }
.step-edit-art .routine-emoji { font-size: 1.65rem; }
.custom-step-preview [data-step-icon] img { display: block; width: 48px; height: 48px; }

.album-custom-moment {
  display: flex; align-items: center; justify-content: center;
  min-height: 46px; border-radius: 12px; border: 1px solid #477080;
  margin: 12px 0 16px; color: var(--cream); background: #153640; text-decoration: none;
  font-weight: 700;
}
.moment-emoji { display: grid; place-items: center; line-height: 1; font-size: 2rem; }
.sticker-detail-art .moment-emoji { min-height: 155px; font-size:  clamp(5rem, 24vw, 8rem); }


.home-shortcut small { display: block; color: var(--teal); font-size: .8125rem; margin-top: 3px; }
.home-tool-grid { margin-top: 18px; }
.routine-browse-link { display: inline-flex; align-items: center; text-decoration: none; }
.moment-optional {
  padding: 4px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.moment-optional summary {
  align-content: center;
  cursor: pointer;
  min-height: 44px;
  font-weight: 650;
}
.moment-optional small { color: var(--muted); font-size: .875rem; font-weight: 450; }

.home-today, .daily-lineup {
  background: linear-gradient(145deg, #24474a, #142f3a);
  border-color: #54706e;
}
.home-today .routines-section-heading { margin-bottom: 10px; }
.home-today h2 { font-size: 1.35rem; }
.home-today .lineup-list { margin-top: 0; }
.lineup-edit.secondary {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 12px;
  border: 1px solid #aacfc3;
  border-radius: 12px;
  background: #c3e6d8;
  color: #183d38;
  font-size: .875rem;
  white-space: nowrap;
}
.lineup-routine-name { min-width: 0; overflow-wrap: anywhere; }
.lineup-list .lineup-start { color: #bbebd8; }
.starter-routines { display: grid; gap: 6px; }
.starter-routine {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  min-height: 49px;
  border: 1px solid #53756e;
  border-radius: 13px;
  color: #fcf1dc;
  background: #173742;
  text-align: left;
}
.starter-routine :is(img, .routine-cover) { width: 38px; height: 38px; }
.starter-routine > span:last-child { color: #bdebd9; font-size: .875rem; }
.home-tool { min-height: 116px; }
.home-tool img { width: 34px; height: 34px; }
.collection-filters { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0; }
.collection-filters a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 5px 12px;
  border: 1px solid #557370;
  border-radius: 99px;
  color: var(--cream);
  font-size: .875rem;
  text-decoration: none;
}
.collection-filters a[aria-current="page"] { background: #c3e6d8; color: #183d38; }
.moment-save-choices { display: grid; gap: 10px; margin-top: 20px; }
.moment-save-choices a { display: grid; gap: 5px; padding: 14px; text-align: left; }
.moment-save-choices small { color: var(--muted); font-size: .875rem; }

.featured-routine {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(78px, 34%);
  align-items: center;
  gap: 12px;
  min-height: 158px;
  margin-bottom: 15px;
  padding: 18px 21px;
  border-radius: 25px;
  background: radial-gradient(ellipse at 95% 5%, #e8e9b7, transparent 65%), #bde1d4;
  color: #1f4842;
  text-decoration: none;
}
.featured-routine-copy { display: grid; justify-items: start; gap: 7px; }
.featured-routine-copy > span { font-size: .875rem; font-weight: 650; }
.featured-routine-copy strong { font-size: clamp(1.5rem, 7vw, 2.1rem); line-height: 1.06; overflow-wrap: anywhere; }
.featured-routine-copy b { background: #224a42; color: #fff6df; padding: 9px 13px; border-radius: 50px; font-size: .875rem; }
.featured-routine > :is(img, .routine-cover, .routine-emoji) { width: 100%; height: auto; aspect-ratio: 1; }
.featured-routine > .routine-emoji { font-size: clamp(3rem, 14vw, 5rem); }
.daily-lineup:is(.home-today, .routine-library) {
  padding: 11px 16px 14px;
  border: 1px solid #efc788;
  background: #f8e3b7;
  color: #30413e;
  box-shadow: inset 0 0 0 3px #f8e3b7, inset 0 0 0 4px #b99b6037;
}
.daily-lineup.home-today { background: #f8ecd1; border-color: #dbc8a2; box-shadow: none; }
.home-today .routines-section-heading { border-bottom: 1px solid #baa174; padding-bottom: 5px; margin-bottom: 0; }
.home-today .lineup-edit.secondary { background: transparent; border-color: #947a48; color: #38534b; }
:is(.home-today, .routine-library) .lineup-list { gap: 0; }
:is(.home-today, .routine-library) .lineup-list li + li { border-top: 1px dashed #bba478; }
:is(.home-today, .routine-library) .lineup-list .routine-list-link { background: transparent; border: 0; color: #263f3b; padding-inline: 0; }
:is(.home-today, .routine-library) .lineup-list .routine-list-link:hover { background: #fff3d1; }
:is(.home-today, .routine-library) .lineup-list .routine-cover { width: 47px; height: 47px; }
.routine-shelf { margin-top: 8px; }
.routine-shelf-title { margin: 0; font-size: 1rem; }
.routine-ready-shelf { margin: 6px 0; }
.routine-shelf + .routine-ready-shelf { margin-top: 9px; border-top: 1px solid #c2a779; }
.routine-ready-shelf summary { min-height: 44px; padding-block: 11px; cursor: pointer; font-weight: 750; }
.routine-library-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.routine-library-actions > * { flex: 1 1 auto; text-align: center; text-decoration: none; }
.routine-library .tool-actions { margin-top: 10px; padding-top: 10px; border-top: 1px solid #c2a779; }
.routine-library .tool-actions .secondary { background: #fff6de; border-color: #8c7953; color: #304a41; text-decoration: none; }
.routine-library :is(a, summary, button):focus-visible { outline-color: #296451; }
.routine-list-empty { margin: 3px 0 9px; color: #3c5549; font-size: .9rem; line-height: 1.4; }
.routine-hidden-shelf { border-top: 1px solid #c2a779; margin-top: 8px; }
.routine-hidden-shelf summary { padding-block: 11px; min-height: 44px; font-weight: 750; cursor: pointer; }
:is(.routine-library, .home-today) .routine-list-action { flex: none; min-height: 44px; padding: 5px 9px; background: #fff6de; color: #304a41; border-color: #8c7953; font-size: .875rem; }
.home-routines-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.home-routines-heading h2 { margin: 0; }
.home-routines-heading .home-arrange-button { min-height: 44px; padding: 5px 12px; background: #294b44; color: #fff6da; border-color: #294b44; }
.home-today .home-routine-grip { width: 44px; height: 44px; flex: none; color: #36574f; background: #fff3d1; border-color: #b29b6a; }
.home-today .home-routine-grip:disabled { visibility: hidden; }
.home-today [data-home-row] { position: relative; }
.home-today [data-home-row].dragging { z-index: 2; opacity: 1; border-radius: 12px; background: #fff6de; box-shadow: 0 6px 14px #483e2955; transform: translateY(var(--drag-y)); }
.home-today [data-home-row]:is(.drop-before, .drop-after)::after { content: ""; position: absolute; left: 3px; right: 3px; height: 3px; border-radius: 3px; background: #316952; }
.home-today [data-home-row].drop-before::after { top: -2px; }
.home-today [data-home-row].drop-after::after { bottom: -2px; }
.home-today .home-undo-done {
  min-width: 44px;
  min-height: 44px;
  padding: 4px 7px;
  color: #2f5447;
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
  font-size: .875rem;
  font-weight: 750;
}
.home-today .home-undo-done:hover { background: #fff3d1; }
:is(.home-today, .routine-library) .lineup-done { color: #42564c; white-space: normal; line-height: 1.35; }
.lineup-art { display: grid; flex: none; place-items: center; }
.home-today .lineup-list { gap: 4px; }
.home-today .lineup-list > li { border: 1px solid transparent; border-radius: 10px; padding-inline: 7px; }
.home-today .lineup-list > li + li { border-top: 1px solid transparent; }
.home-today .lineup-list .routine-list-link { min-height: 50px; padding-block: 4px; }
.home-today .lineup-list .lineup-art :is(.routine-cover, .routine-emoji, img) { width: 37px; height: 37px; }
.home-today .lineup-list .lineup-art .routine-emoji { font-size: 1.5rem; }
.home-today .lineup-list > li.home-routine-complete { background: #e5eed9; border-color: #b7c8a6; }
.home-today .home-routine-complete .routine-list-link:hover,
.home-today .home-routine-complete .home-undo-done:hover { background: #d7e6ca; }
.home-today .home-routine-complete .lineup-routine-name .lineup-done { color: #31543d; font-weight: 700; }
.home-today .routine-ready-shelf { margin-bottom: 2px; }
.home-today .routine-ready-shelf summary { color: #485843; font-size: .9rem; }
.home-completion-notice {
  width: max-content;
  max-width: calc(100% - 24px);
  white-space: normal;
  text-align: center;
}
.home-today .lineup-list :is(.lineup-start, .lineup-done), .home-today .lineup-progress { color: #42564c; }
.home-today .starter-routine { background: #fff2cf; border: 0; color: #263f3b; }
.home-today .starter-routine > span:last-child { color: #38534b; }
.home-today .starter-routines { margin-top: 8px; }
.home-welcome {
  padding: clamp(14px, 4vw, 21px);
  border: 1px solid #e5c591;
  border-radius: 23px;
  background: #fff3db;
  color: #263f37;
}
.home-welcome h2 {
  margin: 0 0 8px;
  font: 700 clamp(1.62rem, 7vw, 2.3rem)/1.08 Georgia, serif;
  letter-spacing: -.04em;
  text-wrap: balance;
}
.home-welcome > p { margin: 0 0 13px; line-height: 1.4; }
.home-welcome :is(.welcome-ready, .welcome-routines) { display: grid; place-items: center; width: 100%; margin-top: 8px; min-height: 48px; border-radius: 12px; padding: 7px 10px; text-align: center; text-decoration: none; }
.home-welcome .welcome-ready { background: #294b44; color: #fff6da; }
.home-welcome .welcome-ready:hover { background: #1d3f39; }
.home-welcome .welcome-routines { background: #fff9ec; border-color: #9f9275; color: #294b44; }
.home-welcome .welcome-routines:hover { background: #f5e9cf; }
.welcome-options { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; column-gap: 8px; }
.welcome-options .text-button { display: inline-flex; align-items: center; min-height: 44px; padding-inline: 4px; color: #38594e; font-weight: 750; }
.welcome-options .text-button:hover { color: #263f37; }
.home-welcome :is(a, button):focus-visible { outline: 3px solid #2f7360; outline-offset: 2px; }
.home-brand .home-guide-link { min-height: 44px; margin-top: 6px; padding: 5px 15px; border-radius: 999px; font-size: .875rem; }
[data-home-welcome]:not(:empty) { margin-bottom: 12px; }
.home-guide-dialog { padding-bottom: max(16px, env(safe-area-inset-bottom)); }
.guide-progress { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; list-style: none; padding: 0; margin: 0 0 11px; }
.guide-progress li { border-top: 3px solid #dbd3bf; color: var(--paper-muted); padding: 5px 0 0; font-size: .875rem; font-weight: 650; }
.guide-progress [aria-current="step"] { border-color: #467964; color: #294b44; font-weight: 800; }
.guide-picture { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border: 1px solid #d7cba9; border-radius: 13px; background: #eaeedc; }
.home-guide-dialog h3 { margin: 14px 0 5px; font: 700 clamp(1.35rem, 5.8vw, 1.85rem)/1.08 Georgia, serif; text-wrap: balance; }
.home-guide-dialog h3:focus { outline: none; }
.guide-copy { margin: 0; font-size: 1rem; line-height: 1.45; }
.guide-actions { display: flex; gap: 8px; margin-top: 12px; }
.guide-actions .primary { flex: 1; }
.guide-alternatives { margin: 8px 0 0; color: var(--paper-muted); font-size: .875rem; line-height: 1.4; }
.guide-wall-details { margin-top: 10px; }
.guide-wall-example { margin: 0; }
.guide-example-sheet {
  padding: 7px;
  border: 1px solid var(--paper-line);
  border-radius: 10px;
  background: #fffdf8;
}
.guide-example-sheet > p { margin: 0 0 5px; font: 700 1.05rem/1.2 Georgia, serif; }
.guide-example-sheet ol { margin: 0; padding-left: 24px; }
.guide-example-sheet li { padding: 7px 0; border-top: 1px solid #e9e1ce; font-weight: 650; }
.guide-example-sheet li img { width: 30px; height: 30px; margin-right: 8px; object-fit: contain; vertical-align: middle; }
.guide-wall-example figcaption { margin-top: 6px; font-size: .875rem; line-height: 1.4; }
.home-memory { display: grid; grid-template-columns: 43px minmax(0, 1fr); gap: 12px; margin: 14px 0 17px; padding: 13px 14px; border: 1px solid #526472; border-radius: 17px; background: #203743; }
.home-memory img { width: 43px; height: 43px; }
.home-memory h2 { font-size: 1rem; }
.home-memory p { color: #d6dfd5; margin: 4px 0 7px; overflow-wrap: anywhere; font-size: .9375rem; }
.home-memory-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 9px; }
.home-memory-actions a { display: inline-flex; align-items: center; min-height: 44px; font-size: .875rem; text-decoration: none; }
.draft-name { padding: 16px; background: #203a46; border-radius: 16px; }
.draft-name span { color: #e7ddc5; font-weight: 650; }
.draft-name input { font-size: 1.3rem; margin-top: 6px; }
.draft-actions { display: grid; gap: 8px; margin-top: 14px; }
.draft-actions button { min-height: 48px; }
.draft-actions [data-tool="start"] { background: #214844; color: #f8edcf; }
.recent-stickers { border-bottom: 1px solid var(--line); margin-bottom: 20px; padding-bottom: 12px; }
.recent-stickers h2, .all-stickers-title, .sticker-origins h2 { font-size: 1.15rem; }
.recent-stickers .tool-description { margin: 8px 0; }
.today-stickers { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 14px 0 4px; }
.today-stickers .collection-art { margin: 0; padding: 5px; }
.today-stickers .collection-item strong { font-size: .875rem; }
.sticker-origins { margin: 14px 0; padding: 12px 16px; background: #153640; border-radius: 14px; }
.sticker-origins ul { margin: 8px 0 0; padding-left: 20px; }
.moment-milestone-choice { display: grid; grid-template-columns: auto 1fr; gap: 4px 8px; align-items: center; border: 1px solid var(--line); border-radius: 13px; padding: 12px; }
.moment-milestone-choice input { width: 21px; height: 21px; accent-color: var(--teal); }
.moment-milestone-choice small { grid-column: 2; color: var(--muted); }

.sticker-sprite {
  display: inline-grid;
  place-items: center;
  background: none;
}
.sticker-crop {
  display: block;
  background-image: var(--sheet);
  background-repeat: no-repeat;
}
.collection-item.waiting .sticker-crop { opacity: .8; }
.moment-entry-card {
  padding: 17px;
  margin-top: 15px;
  border-radius: 24px;
  border: 1px solid #dad1a7;
  background: #f4e5c4;
  color: #273a36;
  box-shadow: inset 0 0 0 4px #f8edce;
}
.moment-entry-card .tool-field { color: #273a36; }
.moment-entry-card textarea { color: #233d35; background: #fff8e6; border-color: #9b9174; resize: vertical; }
.moment-entry-card textarea::placeholder { color: #596250; }
.moment-entry-card .moment-milestone-choice { background: #faefd6; border-color: #a89d7a; }
.moment-entry-card .moment-milestone-choice small { display: block; color: #486055; }
.moment-idea-link { margin-top: 6px; }
.moment-entry-card .primary { background: #244d43; color: #fff3d9; }
.moment-entry-card .tool-status { color: #834a34; }
.family-sharing-card { padding: 18px; margin: 15px 0; border: 1px solid #59756f; background: #18363e; border-radius: 19px; }
.family-sharing-card h2 { margin: 0 0 8px; font-size: 1.25rem; }
.family-sharing-card p { color: #e8e7d2; line-height: 1.5; }
.family-sharing-card .tool-primary { display: grid; place-items: center; text-align: center; min-height: 48px; margin-top: 16px; text-decoration: none; }

.family-access { margin-top: 10px; }
.family-access summary { min-height: 44px; padding-block: 12px; cursor: pointer; }

/* Play uses warm activity cards and keeps the age choice beside the main action. */
.play-heading {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0 12px;
  margin: 14px 0 12px;
}
.activity-page-title { font-size: clamp(2.3rem, 9vw, 3rem); letter-spacing: -.055em; }
.play-saved { color: var(--cream); }
.play-saved span { color: #ffae9d; font-size: 1.5rem; line-height: 1; }
.activity-setup-panel {
  color-scheme: light;
  color: #253832;
  background: #f8e9c9;
  border-radius: 30px 30px 24px 24px;
  padding: clamp(15px, 5vw, 24px);
}
.play-intro { display: flex; justify-content: space-between; align-items: center; gap: 5px; margin-bottom: 10px; }
.play-intro h2 { font-size: clamp(1.55rem, 6.4vw, 2.15rem); letter-spacing: -.04em; line-height: 1.15; }
.play-intro img { width: clamp(48px, 16vw, 78px); height: auto; transform: rotate(8deg); }
.activity-setup-panel legend { margin-bottom: 7px; font-size: 1rem; }
.activity-setup-panel .ages { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.activity-setup-panel .choice { background: #fff8e7; border-color: #9a8f73; border-radius: 13px; }
.activity-setup-panel .choice:has(:checked), .activity-setup-panel .choice:has(:indeterminate) {
  color: #183f36;
  background: #c0e1ca;
  border-color: #366857;
}
.activity-setup-panel .generate-actions { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin-top: 13px; }
.activity-setup-panel .generate-actions .primary { color: #fff7e5; background: #235246; min-height: 49px; font-size: 1.1rem; }
.activity-setup-panel .generate-actions .primary:hover { background: #193f35; }
.activity-setup-panel .secondary { color: #263c35; background: transparent; border-color: #9a8f73; }
.activity-setup-panel .secondary:hover { background: #fffaed; }
.activity-setup-panel .field-error { color: #862b2b; }
.activity-setup-panel :focus-visible, .moment-entry-card :focus-visible { outline-color: #135b61; }
.play-choices { margin-top: 20px; }
.play-choices h2 { font-size: 1.125rem; margin-bottom: 9px; }
.quick-activity-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.quick-activity-choices button {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 63px;
  padding: 9px;
  border-radius: 17px;
  text-align: left;
  line-height: 1.2;
  font-size: .9375rem;
  font-weight: 750;
  color: #253832;
  background: var(--play-colour);
}
.quick-activity-choices img { width: clamp(23px, 7vw, 32px); height: auto; flex: none; }
.quick-activity-choices [data-id="supper"] { --play-colour: #f4bba6; }
.quick-activity-choices [data-id="active"] { --play-colour: #e9d49e; }
.quick-activity-choices [data-id="quiet"] { --play-colour: #c9c2de; }
.quick-activity-choices [data-id="learning"] { --play-colour: #b6dace; }
.quick-activity-choices button:hover { filter: brightness(1.08); }
.daily-play-link { margin-top: 7px; }
.words-search { margin-block: 12px; }
.words-answer h2 { font-size: 1.08rem; }
.words-answer .words-card { margin-inline: 0; background: #e2d8ee; }
.transition-timer { display: grid; gap: 12px; text-align: center; margin-top: 15px; }
.transition-presets, .transition-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.transition-presets .secondary, .transition-actions .secondary { background: #fff8e7; border-color: #9a8f73; }
.transition-presets [aria-pressed="true"] { background: #c0e1ca; border-color: #366857; }
.transition-display { font-size: clamp(3.6rem, 17vw, 6rem); font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; }
.transition-timer progress { width: 100%; accent-color: #286254; }
.transition-status:empty { display: none; }
.transition-timer button:disabled { opacity: .55; cursor: default; }
.moment-entry-card .tool-field { margin: 0; }
.moment-entry-card .tool-status:empty { display: none; }
#share-dialog .tool-status:empty { display: none; }

#share-dialog { width: min(440px, calc(100% - 24px)); max-height: calc(100dvh - 24px); padding: 14px; border: 1px solid var(--line); border-radius: 22px; color: var(--cream); background: #0f2b38; }
#share-dialog::backdrop { background: rgb(0 10 18 / 72%); }
#share-dialog .filter-form { grid-template-rows: none; gap: 10px; }
#share-dialog .sheet-heading { padding: 0 2px 4px; }
#share-dialog h2 { margin: 0; }
.share-choice { display: grid; width: 100%; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 78px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; color: var(--cream); background: #1b3a45; text-align: left; text-decoration: none; }
.share-choice:hover, .share-choice:focus-visible { border-color: var(--teal); }
.share-choice strong, .share-choice small { display: block; }
.share-choice small { margin-top: 3px; color: var(--muted); font-size: .87rem; line-height: 1.35; }
.share-choice-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; color: #15333a; background: #b8e2d1; font-size: 1.45rem; font-weight: 750; }
#share-family .share-choice-icon { background: #f4d9ab; }
.share-choice-icon svg { width: 23px; height: 23px; }
.share-public-link { padding-top: 6px; }

/* The header starts setup. Library, editing and booklet actions sit below the list. */
.home-routines-heading { min-height: 48px; margin-bottom: 4px; }
.home-today :is(a, summary, button):focus-visible { outline-color: #296451; }
.home-setup:empty { display: none; }
.home-setup-button.primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 44px;
  border-radius: 12px;
  background: #294b44;
  color: #fff6da;
  text-decoration: none;
}
.home-routines-heading .home-setup-button { padding: 5px 10px; font-size: .875rem; text-align: center; }
.home-setup-button.primary:hover { background: #1d3f39; }
.home-setup-button svg { width: 17px; height: 17px; flex: none; }
.home-today .home-routine-actions {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin-top: 10px; padding-top: 10px; border-top: 1px solid #c2a779;
}
.home-routine-actions button {
  width: auto; min-height: 44px; padding: 7px 14px; font-size: .9rem; font-weight: 750;
}
.home-print-routines.primary { background: #294b44; color: #fff6da; border-color: #294b44; }
.home-print-routines.primary:hover { background: #1d3f39; }
.home-edit-list.secondary { background: transparent; color: #304a41; border-color: #8c7953; }
.home-edit-list.secondary:hover { background: #fff8e5; }
.home-parent-tools { margin-top: 21px; }
.home-parent-tools > h2 { margin: 0; padding-inline: 2px; font-size: 1.15rem; }
.home-parent-tools .home-memory { margin: 10px 0; }
.home-parent-tools .home-tool-grid { grid-template-columns: 1fr; gap: 5px; margin: 10px 0; }
.home-parent-tools .home-tool { grid-template-columns: 34px 1fr; column-gap: 10px; row-gap: 1px; align-items: center; align-content: center; min-height: 59px; padding: 7px 11px; border-radius: 13px; }
.home-parent-tools .home-tool img { grid-row: span 2; width: 32px; height: 32px; margin: 0; }
.home-skills {
  margin-top: 12px; padding: 11px 13px 13px; border-radius: 21px;
  background: #e7eee3; border: 1px solid #bdcfbc; color: #234438;
}
.home-skills h2 { font-size: clamp(1.05rem, 4.6vw, 1.28rem); line-height: 1.2; }
.home-skills > p { margin-top: 3px; font-size: .875rem; color: #3d5b4e; }
.home-skills button:focus-visible { outline-color: #296451; }
.home-skills :is(.skill-add, .skill-action) {
  flex: none; min-height: 44px; width: auto; padding: 6px 10px;
  background: #f6faf3; color: #234438; border-color: #789383;
  font-size: .875rem;
}
.home-skills .skill-add { background: #294d40; color: #f6faf3; border-color: #294d40; }
.home-skills .skill-add:hover { background: #355f50; }
.home-skills .skill-action:hover { background: #fff; }
.skill-list { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 4px; }
.skill-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 6px; min-height: 56px; padding: 2px 4px; border: 1px solid transparent;
  border-radius: 12px;
}
.skill-row.skill-practiced { background: #cfe3cf; border-color: #a6c2ac; }
.skill-edit {
  min-width: 0; min-height: 48px; padding: 4px; display: flex; align-items: center;
  gap: 7px; background: transparent; border-radius: 8px; text-align: left;
  overflow-wrap: anywhere;
}
.skill-edit:hover { background: #f6faf3; }
.skill-art { flex: none; display: grid; place-items: center; width: 36px; }
.skill-art img { width: 34px; height: 34px; }
.skill-art .routine-emoji { font-size: 1.35rem; }
.skill-art .routine-emoji-pair { font-size: .95rem; }
.skill-edit svg { width: 15px; height: 15px; flex: none; }
.skill-name { display: grid; gap: 2px; font-size: .9375rem; }
.skill-name small { color: #31543d; font-weight: 700; }
/* The wizard uses the same paper palette as the printed routines. */
body:has(#parent-tools:not([hidden]) .setup-page) :is(.topbar, .app-navigation) { display: none; }
body:has(#parent-tools:not([hidden]) .setup-page) .shell { padding: 12px clamp(8px, 3vw, 20px) max(12px, env(safe-area-inset-bottom)); }

:is(.setup-page, .routine-paper-dialog) {
  --paper: #fff7e7;
  --paper-ink: #243d35;
  --paper-muted: #536154;
  --paper-line: #dfd1b8;
  --leaf: #2a5348;
}
.setup-page {
  padding: clamp(13px, 4vw, 24px);
  border: 1px solid #efd7ac;
  border-radius: 26px;
  background: var(--paper);
  color: var(--paper-ink);
  color-scheme: light;
  box-shadow: 0 18px 42px #0003;
}
.setup-page :is(a, button, input, summary):focus-visible { outline: 3px solid #2f7360; outline-offset: 2px; }
.setup-header { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 4px; margin-bottom: 11px; }
.setup-wordmark { grid-column: 2; width: 62px; height: 42px; padding: 6px 9px; border-radius: 12px; background: #243d35; object-fit: contain; }
.setup-nav-control, .setup-tool {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 0;
  border-radius: 9px;
  color: #2e594b;
  background: transparent;
  font-size: .875rem;
  font-weight: 750;
  text-decoration: none;
  padding: 4px 7px;
}
.setup-nav-control:hover, .setup-tool:hover { background: #eaeadd; }
.setup-nav-control svg { width: 16px; height: 16px; }
.setup-nav-control:first-child { grid-column: 1; justify-self: start; }
.setup-close { grid-column: 3; justify-self: end; }
.setup-progress {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.setup-progress li {
  padding-top: 5px;
  border-top: 3px solid #e7d9c2;
  color: var(--paper-muted);
  font-size: .75rem;
  line-height: 1.35;
}
.setup-progress .complete { border-color: #97b8a4; }
.setup-progress [aria-current="step"] { border-color: #507964; color: var(--paper-ink); font-weight: 800; }
.setup-intro { margin: 17px 0 16px; }
.setup-intro h1 {
  max-width: 15em;
  margin: 0;
  font: 700 clamp(1.65rem, 7.1vw, 2.45rem)/1.08 Georgia, serif;
  letter-spacing: -.04em;
  text-wrap: balance;
}
.setup-intro h1:focus { outline: none; }
.setup-help { margin: 6px 0 0; color: var(--paper-muted); font-size: .95rem; line-height: 1.45; }
.setup-page [data-setup-status]:empty { display: none; }
.setup-page [data-setup-status] { color: #883c34; margin: 10px 0 0; }
.setup-choice-grid, .setup-activities { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.setup-choice {
  display: grid;
  align-content: center;
  justify-items: center;
  align-items: center;
  min-width: 0;
  min-height: 106px;
  gap: 4px;
  padding: 8px;
  border: 1px solid var(--paper-line);
  border-radius: 16px;
  background: #fff2d8;
  color: var(--paper-ink);
  text-align: center;
}
.setup-choice[data-setup-choice="ready"] { background: #e1eddf; }
.setup-choice[data-setup-choice="meal"] { background: #f8e3d5; }
.setup-choice[data-setup-choice="bed"] { background: #ece4f0; }
.setup-choice:hover, .setup-activity:hover { border-color: #587f6d; }
.setup-choice strong { display: block; font-size: .96rem; line-height: 1.25; }
.setup-choice small { display: block; margin-top: 2px; color: var(--paper-muted); font-size: .8rem; line-height: 1.3; }
.setup-choice-art img { display: block; width: 66px; height: 57px; object-fit: contain; mix-blend-mode: multiply; }
.setup-alternatives { display: grid; gap: 6px; margin-top: 10px; }
.setup-choice-compact {
  grid-template-columns: 41px minmax(0, 1fr);
  justify-items: start;
  min-height: 56px;
  gap: 8px;
  background: #fffdf6;
  text-align: left;
}
.setup-choice-compact .setup-choice-art img { width: 40px; height: 36px; }
.setup-more { margin-top: 5px; }
.setup-more summary { min-height: 44px; padding: 12px 2px; cursor: pointer; color: #35574b; font-size: .89rem; font-weight: 700; }
.setup-more > a { display: inline-flex; align-items: center; min-height: 44px; font-size: .9rem; color: #365c50; }
.setup-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.setup-naming { display: grid; gap: 16px; }
.setup-naming-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: clamp(8px, 3vw, 14px);
  padding: clamp(9px, 3vw, 14px);
  border: 1px solid var(--paper-line);
  border-radius: 16px;
  background: #fffdf6;
}
.setup-naming-art {
  display: grid;
  place-items: center;
  width: clamp(42px, 13vw, 62px);
  aspect-ratio: 1;
  border-radius: 13px;
  background: #f6e6c4;
}
.setup-naming-art img { width: 78%; height: 78%; object-fit: contain; mix-blend-mode: multiply; }
.setup-naming-card input {
  min-height: 48px;
  width: 100%;
  padding: 4px 0;
  border: 0;
  border-bottom: 1px solid #b6a991;
  border-radius: 0;
  background: transparent;
  color: var(--paper-ink);
  font: 700 clamp(1.15rem, 5vw, 1.55rem)/1.2 Georgia, serif;
}
.setup-naming-card input::placeholder { color: var(--paper-muted); }
.setup-picker-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 8px; margin: 0 0 12px; }
.setup-picker-tools .setup-tool { padding-inline: 3px; }
.setup-custom-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 7px 12px;
  border: 1px solid #d7aa8e;
  border-radius: 12px;
  background: #f8e3d5;
  color: #47382f;
  font-size: .875rem;
  font-weight: 800;
}
.setup-custom-button span { font-size: 1.25rem; line-height: 1; }
.setup-custom-button:hover { background: #f3d6c4; border-color: #a66c52; }
.setup-custom-button:disabled { opacity: .6; }
.setup-search { display: block; margin-bottom: 10px; }
.setup-search input, .setup-name input {
  display: block;
  min-height: 46px;
  width: 100%;
  margin: 0;
  padding: 8px 11px;
  border: 1px solid #bcad93;
  border-radius: 10px;
  background: #fffdf7;
  color: var(--paper-ink);
  font: inherit;
}
.setup-search input::placeholder, .setup-name input::placeholder { color: #6b7165; }
.setup-activity {
  position: relative;
  min-width: 0;
  min-height: 93px;
  display: grid;
  align-content: center;
  align-items: center;
  justify-items: center;
  gap: 4px;
  padding: 7px 8px;
  border: 1px solid var(--paper-line);
  border-radius: 14px;
  background: #fffdf7;
  color: var(--paper-ink);
  text-align: center;
  line-height: 1.18;
  font-size: .9rem;
  font-weight: 700;
}
.setup-activity-label, .setup-edit-activity > span:last-child { overflow-wrap: anywhere; }
.setup-activity-art, .setup-preview-art { display: grid; place-items: center; }
.setup-activity-art img, .setup-preview-art img { display: block; width: 54px; height: 47px; object-fit: contain; mix-blend-mode: multiply; }
.setup-activity .routine-emoji, .setup-review .routine-emoji { font-size: 1.8rem; }
.setup-check {
  position: absolute;
  top: 6px;
  right: 6px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--leaf);
  color: #fff8e8;
  visibility: hidden;
  font-size: .84rem;
}
.setup-activity[aria-pressed="true"] { border-color: #608670; background: #e6efdf; box-shadow: inset 0 0 0 1px #608670; }
.setup-activity[aria-pressed="true"] .setup-check { visibility: visible; }
.setup-activity:disabled, .setup-tool:disabled { opacity: .55; }
.setup-dock {
  display: grid;
  gap: 7px;
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin-top: 12px;
  padding: 7px 0 max(4px, env(safe-area-inset-bottom));
  background: var(--paper);
  border-top: 1px solid var(--paper-line);
}
.setup-screen:has([data-setup-search]:focus, [data-setup-name]:focus) .setup-dock { position: static; }
.setup-page .primary {
  min-height: 50px;
  border-radius: 13px;
  background: var(--leaf);
  color: #fff9ec;
}
.setup-page .primary:hover { background: #24483f; }
.setup-page .primary:disabled { background: #e7e5d7; color: #5d695b; cursor: default; }
.setup-dock .primary { position: relative; width: 100%; padding-inline: 39px; }
.setup-dock .primary > span { position: absolute; right: 14px; }
.setup-picked { display: flex; min-height: 25px; align-items: center; justify-content: space-between; gap: 6px; color: var(--paper-muted); font-size: .875rem; font-weight: 700; }
.setup-picks-preview { display: flex; gap: 4px; }
.setup-picks-preview > span { display: grid; place-items: center; width: 29px; height: 27px; border-radius: 7px; background: #e5ebda; }
.setup-picks-preview img { width: 24px; height: 24px; object-fit: contain; mix-blend-mode: multiply; }
.setup-picks-preview .routine-emoji { font-size: .88rem; }
.setup-sheet { padding: 13px; border: 1px solid var(--paper-line); border-radius: 17px; background: #fffdf6; }
.setup-name { display: grid; gap: 4px; color: var(--paper-muted); font-size: .82rem; font-weight: 750; }
.setup-name input { border-width: 0 0 1px; border-radius: 0; padding: 3px 0; color: var(--paper-ink); font: 700 clamp(1.2rem, 5vw, 1.65rem)/1.2 Georgia, serif; }
.setup-sheet-tools { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--paper-muted); font-size: .84rem; font-weight: 650; }
.setup-review { list-style: none; margin: 0; padding: 0; }
.setup-preview-step { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px dashed var(--paper-line); }
.setup-step-number { display: grid; place-items: center; flex: 0 0 24px; height: 24px; border-radius: 50%; background: #f6e6c4; color: #425e50; font-size: .75rem; font-weight: 800; }
.setup-edit-activity { display: flex; flex: 1 1 100px; align-items: center; gap: 8px; min-width: 0; min-height: 50px; background: transparent; color: var(--paper-ink); border-radius: 8px; padding: 0 5px; text-align: left; font-size: .95rem; font-weight: 750; }
.setup-edit-activity:hover, .setup-order button:hover { background: #eaeadd; }
.setup-preview-art { flex: 0 0 auto; }
.setup-order { display: flex; gap: 3px; margin-left: auto; }
.setup-order button { width: 44px; height: 44px; border: 1px solid var(--paper-line); border-radius: 9px; background: #fff8e8; color: var(--paper-ink); }
.setup-order button:disabled { opacity: .42; }
.setup-finish-actions .setup-tool { justify-self: center; }
.setup-save-hint { margin: 0; color: var(--paper-muted); font-size: .875rem; line-height: 1.4; text-align: center; text-wrap: balance; }
@media (max-width: 360px) {
  .setup-page { padding-inline: 11px; }
  .setup-choice-art img { width: 57px; height: 52px; }
  .setup-picker-tools .setup-tool { font-size: .81rem; }
  .setup-activity { font-size: .83rem; }
}
@media (max-width: 290px) { .setup-choice-grid, .setup-activities { grid-template-columns: 1fr; } }

.routine-mark-done { margin-block: 10px 0; }
.meal-completion-list { display: grid; gap: 8px; }
.meal-completion-list > div { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 5px; }

.paired-world-header { display: flex; justify-content: center; margin: 0 auto 5px; }
.paired-world-header a { display: block; border-radius: 10px; padding-inline: 10px; }
.paired-world-header img { display: block; object-fit: contain; }
.paired-world-card, .sticker-device-code { display: grid; gap: 12px; }
.paired-world-card { padding: 18px; background: var(--panel); border-radius: 18px; }
.sticker-device-code img { max-width: 100%; height: auto; justify-self: center; background: white; }
.sticker-device-code input { width: 100%; }

.memories-index { display: grid; gap: 14px; }
.memories-toolbar {
  display: grid; gap: 9px; padding: 14px; border-radius: 19px;
  background: #203a45; border: 1px solid #4e6670;
}
.memories-toolbar .album-action { margin: 0; }
.memories-toolbar .collection-filters { margin: 0; }
.memories-index .moment-list { margin: 0; padding: 0; list-style: none; }
.memory-list-card {
  display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center;
  min-height: 64px; gap: 12px; padding: 9px 13px; border-radius: 14px;
  text-decoration: none; background: #f4e8ce; color: #233c3b;
}
.memory-list-card:hover { background: #fff3d7; }
.memory-list-card strong, .memory-list-card small { display: block; overflow-wrap: anywhere; }
.memory-list-card small { margin-top: 3px; color: #425954; font-size: .8125rem; }
.memory-list-card :is(.moment-emoji, .sticker-sprite) { width: 38px; font-size: 1.8rem; text-align: center; }
