/* Nap Check — themes: pastel (default), pastel-dark, mint, neutral, midnight + (v1.13) baby-blue, sky, periwinkle, navy, bubblegum, peach, sunshine, teddy, forest, grape, charcoal */
:root, [data-theme="pastel"] {
  --bg: #fdf6fb; --bg2: #f6e8f3; --card: #ffffff; --ink: #4a3b52; --muted: #8d7b97; --line: #f0dcec;
  --pri: #b48ce0; --pri-ink: #fff; --pri-soft: #efe3fb; --good: #6cc4a1; --good-soft: #e1f6ec; --bad: #ef8a9e; --bad-soft: #fde6eb;
  --warn: #f2b56b; --warn-soft: #fdf0de; --info: #7fb8ec; --info-soft: #e5f1fc; --accent: #ffc6dd; --shadow: 0 6px 20px rgba(180, 140, 224, .14);
  --radius: 20px; --font: "Nunito", "Quicksand", ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", sans-serif;
}
[data-theme="pastel-dark"] {
  --bg: #231c2b; --bg2: #2c2337; --card: #322841; --ink: #f3e9fb; --muted: #b7a5c7; --line: #43375a;
  --pri: #c9a7f2; --pri-ink: #231c2b; --pri-soft: #3f3255; --good: #7fd6b2; --good-soft: #2b4139; --bad: #f59cb0; --bad-soft: #4a2e39;
  --warn: #f5c27f; --warn-soft: #4a3c2a; --info: #94c7f3; --info-soft: #2a3a4c; --accent: #f7a8c9; --shadow: 0 6px 20px rgba(0,0,0,.35);
}
[data-theme="mint"] {
  --bg: #f4fbf7; --bg2: #e3f4ea; --card: #fffefa; --ink: #34493f; --muted: #7b9187; --line: #d9ece1;
  --pri: #5fbf98; --pri-ink: #fff; --pri-soft: #dcf3e8; --good: #5fbf98; --good-soft: #dcf3e8; --bad: #f08c8c; --bad-soft: #fde5e5;
  --warn: #f0b663; --warn-soft: #fdf1dc; --info: #6db0d9; --info-soft: #e1f0f9; --accent: #ffe7a8; --shadow: 0 6px 20px rgba(95,191,152,.14);
}
[data-theme="neutral"] {
  --bg: #f5f5f4; --bg2: #ebebea; --card: #fff; --ink: #2b2b2b; --muted: #777; --line: #e2e2e0;
  --pri: #4f6d8a; --pri-ink: #fff; --pri-soft: #e4ebf2; --good: #4f8a6d; --good-soft: #e3f0e9; --bad: #b55a5a; --bad-soft: #f5e3e3;
  --warn: #b98a3c; --warn-soft: #f6eedd; --info: #4f6d8a; --info-soft: #e4ebf2; --accent: #d7d7d4; --shadow: 0 2px 8px rgba(0,0,0,.06);
  --radius: 10px; --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
[data-theme="midnight"] {
  --bg: #0f1424; --bg2: #161d33; --card: #1b2440; --ink: #e7ecff; --muted: #9aa6cc; --line: #2b365c;
  --pri: #8aa2ff; --pri-ink: #0f1424; --pri-soft: #27325a; --good: #6fd3a8; --good-soft: #1d3a36; --bad: #ff8fa3; --bad-soft: #42263a;
  --warn: #ffc778; --warn-soft: #3d3324; --info: #8aa2ff; --info-soft: #27325a; --accent: #b6a4ff; --shadow: 0 6px 24px rgba(0,0,0,.45);
}

/* v1.13 themes: blues + more */
[data-theme="baby-blue"] {
  --bg: #f3f8ff; --bg2: #e3efff; --card: #ffffff; --ink: #2f4058; --muted: #7d8ea6; --line: #d8e6f8;
  --pri: #6fa8ec; --pri-ink: #fff; --pri-soft: #dcebff; --good: #5fbf98; --good-soft: #dff4ea; --bad: #ef8a9e; --bad-soft: #fde6eb;
  --warn: #f2b56b; --warn-soft: #fdf0de; --info: #6fa8ec; --info-soft: #dcebff; --accent: #bfe0ff; --shadow: 0 6px 20px rgba(111,168,236,.16);
}
[data-theme="sky"] {
  --bg: #f1f9ff; --bg2: #ddf1fd; --card: #ffffff; --ink: #24465c; --muted: #7896aa; --line: #cfe7f6;
  --pri: #38a7e0; --pri-ink: #fff; --pri-soft: #d5eefb; --good: #3fb68b; --good-soft: #dcf3ea; --bad: #ea7b8f; --bad-soft: #fce4e9;
  --warn: #f0ac57; --warn-soft: #fdefdc; --info: #38a7e0; --info-soft: #d5eefb; --accent: #ffe08a; --shadow: 0 6px 20px rgba(56,167,224,.15);
}
[data-theme="periwinkle"] {
  --bg: #f5f6ff; --bg2: #e7eafe; --card: #ffffff; --ink: #363c66; --muted: #8288b0; --line: #dfe2fb;
  --pri: #7d8cf0; --pri-ink: #fff; --pri-soft: #e3e7ff; --good: #5fbf98; --good-soft: #dff4ea; --bad: #ef8a9e; --bad-soft: #fde6eb;
  --warn: #f2b56b; --warn-soft: #fdf0de; --info: #7d8cf0; --info-soft: #e3e7ff; --accent: #ffc6dd; --shadow: 0 6px 20px rgba(125,140,240,.15);
}
[data-theme="navy"] {
  --bg: #0e1a2f; --bg2: #14233d; --card: #1a2c4c; --ink: #e6efff; --muted: #9db0d1; --line: #2a4069;
  --pri: #5ea8ff; --pri-ink: #0e1a2f; --pri-soft: #1f3a63; --good: #5fd0a5; --good-soft: #17393a; --bad: #ff8ea2; --bad-soft: #43263a;
  --warn: #ffc56f; --warn-soft: #3b3325; --info: #5ea8ff; --info-soft: #1f3a63; --accent: #9fd0ff; --shadow: 0 6px 24px rgba(0,0,0,.45);
}
[data-theme="bubblegum"] {
  --bg: #fff5fa; --bg2: #ffe6f2; --card: #ffffff; --ink: #5a2a45; --muted: #a77a92; --line: #fbd7e8;
  --pri: #ff6fae; --pri-ink: #fff; --pri-soft: #ffe0ef; --good: #5fbf98; --good-soft: #dff4ea; --bad: #e5576f; --bad-soft: #fde2e7;
  --warn: #f2b56b; --warn-soft: #fdf0de; --info: #8ab8f0; --info-soft: #e5f0fc; --accent: #c9f0ff; --shadow: 0 6px 20px rgba(255,111,174,.16);
}
[data-theme="peach"] {
  --bg: #fff8f3; --bg2: #ffeadc; --card: #ffffff; --ink: #5b3a2c; --muted: #a8877a; --line: #fbdcc8;
  --pri: #f4916b; --pri-ink: #fff; --pri-soft: #ffe3d6; --good: #5fbf98; --good-soft: #dff4ea; --bad: #e86b7f; --bad-soft: #fde3e7;
  --warn: #f0b05a; --warn-soft: #fdf0dc; --info: #7fb8ec; --info-soft: #e5f1fc; --accent: #ffd6a8; --shadow: 0 6px 20px rgba(244,145,107,.16);
}
[data-theme="sunshine"] {
  --bg: #fffcf0; --bg2: #fff3c9; --card: #ffffff; --ink: #4a3d12; --muted: #9a8a55; --line: #f6e7ad;
  --pri: #e8a91c; --pri-ink: #2e2300; --pri-soft: #fff0bf; --good: #4fae78; --good-soft: #def2e5; --bad: #e46b6b; --bad-soft: #fde3e3;
  --warn: #e8901c; --warn-soft: #fdecd5; --info: #5f9fe0; --info-soft: #e2eefb; --accent: #ffd6e7; --shadow: 0 6px 20px rgba(232,169,28,.16);
}
[data-theme="teddy"] {
  --bg: #fbf6f0; --bg2: #f1e4d6; --card: #fffdfa; --ink: #4b3424; --muted: #977d68; --line: #e8d6c3;
  --pri: #a9744f; --pri-ink: #fff; --pri-soft: #f0dfcf; --good: #6aa77a; --good-soft: #e1efe3; --bad: #d2697a; --bad-soft: #f8e1e4;
  --warn: #d79a45; --warn-soft: #f8ead6; --info: #6f98c4; --info-soft: #e2ebf5; --accent: #f3c9a8; --shadow: 0 6px 20px rgba(169,116,79,.15);
}
[data-theme="forest"] {
  --bg: #111c17; --bg2: #172520; --card: #1d2e27; --ink: #e5f3ec; --muted: #9dbbad; --line: #2b4339;
  --pri: #6fd3a5; --pri-ink: #10201a; --pri-soft: #23402f; --good: #6fd3a5; --good-soft: #23402f; --bad: #ff8e9e; --bad-soft: #432a31;
  --warn: #f2c46c; --warn-soft: #3a3424; --info: #79b8e8; --info-soft: #213547; --accent: #b6e388; --shadow: 0 6px 24px rgba(0,0,0,.45);
}
[data-theme="grape"] {
  --bg: #1a1226; --bg2: #221832; --card: #2a1e3e; --ink: #f1e8ff; --muted: #b3a2cc; --line: #3d2d58;
  --pri: #b48cff; --pri-ink: #1a1226; --pri-soft: #3a2a5a; --good: #74d4ad; --good-soft: #22403a; --bad: #ff8fb0; --bad-soft: #47263b;
  --warn: #ffc578; --warn-soft: #3d3226; --info: #8fb4ff; --info-soft: #2a3358; --accent: #ff9ed1; --shadow: 0 6px 24px rgba(0,0,0,.45);
}
[data-theme="charcoal"] {
  --bg: #161718; --bg2: #1e2022; --card: #24272a; --ink: #e8eaec; --muted: #a0a6ab; --line: #34383c;
  --pri: #9bb4c9; --pri-ink: #161718; --pri-soft: #2e3a44; --good: #7cc4a0; --good-soft: #233630; --bad: #e59393; --bad-soft: #3e2828;
  --warn: #d9b26d; --warn-soft: #37301f; --info: #9bb4c9; --info-soft: #2e3a44; --accent: #c5cbd1; --shadow: 0 4px 16px rgba(0,0,0,.4);
  --radius: 12px; --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.45; min-height: 100vh; }
body.authed { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
a { color: var(--pri); text-decoration: none; font-weight: 600; }
h1 { font-size: 1.55rem; margin: .4rem 0 .8rem; letter-spacing: -.01em; }
h2 { font-size: 1.08rem; margin: 0 0 .6rem; }
h3 { font-size: .95rem; margin: 1rem 0 .4rem; color: var(--muted); }
.main { max-width: 640px; margin: 0 auto; padding: 14px 14px 24px; }
.muted { color: var(--muted); } .small { font-size: .88rem; } .tiny { font-size: .76rem; }
.center { text-align: center; } .right { text-align: right; } .mt { margin-top: 12px; }
.row { display: flex; align-items: center; } .col { display: flex; flex-direction: column; align-items: flex-end; }
.between { justify-content: space-between; } .gap { gap: 8px; } .row.wrap { flex-wrap: wrap; }
.col.gap { gap: 6px; }

/* top bar */
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 10px; padding: calc(10px + env(safe-area-inset-top)) 14px 10px;
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 800; }
.topnav { margin-left: auto; display: flex; gap: 4px; }
.icon-btn { background: var(--card); border: 1px solid var(--line); border-radius: 50%; width: 38px; height: 38px; display: grid; place-items: center; font-size: 1.05rem; cursor: pointer; }
.back { font-size: 1.8rem; line-height: 1; color: var(--ink); padding: 0 4px; }
.who { display: flex; align-items: center; gap: 8px; font-weight: 800; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--pri-soft); color: var(--pri); display: grid; place-items: center; font-weight: 800; }
.avatar.lg { width: 44px; height: 44px; font-size: 1.2rem; }

/* tab bar */
.tabbar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 10; display: grid; grid-template-columns: repeat(6, 1fr); background: var(--card);
  border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); box-shadow: 0 -4px 16px rgba(0,0,0,.04); }
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 1px; font-size: .68rem; color: var(--muted); padding: 4px 0; border-radius: 12px; }
.tabbar a span { font-size: 1.25rem; }
.tabbar a.on { color: var(--pri); background: var(--pri-soft); }

/* cards */
.card { display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 0 0 12px; box-shadow: var(--shadow); color: var(--ink); }
.card.dim, .dim { opacity: .55; }
.card.danger { border-color: var(--bad); }
details.card > summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
details.card > summary::-webkit-details-marker { display: none; }
details.card[open] > summary { margin-bottom: 10px; }
details > summary.small { cursor: pointer; color: var(--muted); margin-top: 8px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.grid2 > .card { margin: 0; }
.hello { font-size: 1.7rem; }
.wave { display: inline-block; animation: wave 2.4s ease-in-out infinite; transform-origin: 70% 70%; }
@keyframes wave { 0%,60%,100% { transform: rotate(0) } 10%,30% { transform: rotate(14deg) } 20% { transform: rotate(-8deg) } }

/* chips & pills */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.chip { display: inline-flex; align-items: center; gap: 4px; background: var(--pri-soft); color: var(--ink); border-radius: 999px; padding: 5px 11px; font-size: .8rem; font-weight: 700; border: 0; }
.chip.warn { background: var(--warn-soft); } .btnchip { cursor: pointer; font-family: inherit; }
.pill { display: inline-block; background: var(--bg2); border-radius: 999px; padding: 1px 8px; font-size: .72rem; font-weight: 700; color: var(--muted); }
.lockpill { background: var(--warn-soft); color: var(--ink); }

/* banners & flashes */
.flash, .banner { border-radius: 14px; padding: 11px 14px; margin-bottom: 12px; font-weight: 600; }
.flash-ok, .banner.good { background: var(--good-soft); } .flash-err { background: var(--bad-soft); } .flash-warn, .banner.lock { background: var(--warn-soft); }
.flash-info, .banner.info { background: var(--info-soft); }
.banner small { display: block; font-weight: 500; color: var(--muted); }

/* CTAs */
.cta { display: block; text-align: center; padding: 18px; border-radius: var(--radius); margin-bottom: 12px; font-size: 1.15rem; font-weight: 800;
  background: linear-gradient(135deg, var(--pri), var(--accent)); color: var(--pri-ink); box-shadow: var(--shadow); }
.cta small { display: block; font-weight: 600; opacity: .85; font-size: .8rem; }
.cta.good { background: linear-gradient(135deg, var(--good), var(--info)); }
.pulse { animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 0%,100% { transform: scale(1) } 50% { transform: scale(1.02) } }

/* nappy card */
.label { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 800; }
.big { font-size: 1.2rem; font-weight: 800; }
.huge { font-size: 1.9rem; font-weight: 800; margin: 6px 0 12px; }
.code { background: var(--pri-soft); border: 2px dashed var(--pri); border-radius: 14px; padding: 6px 12px; font: 800 1.45rem ui-monospace, Menlo, monospace; letter-spacing: .18em; text-align: center; color: var(--ink); }
.code small { display: block; font: 700 .6rem var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.code.xl { font-size: 2.4rem; padding: 12px 18px; margin: 10px auto; display: inline-block; }
.meter, .progress, .track { height: 12px; background: var(--bg2); border-radius: 999px; overflow: hidden; margin: 12px 0 6px; }
.meter span, .progress div, .track div { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--good), var(--pri)); }
.meter span.hot { background: linear-gradient(90deg, var(--warn), var(--bad)); }
.w0{width:3%}.w10{width:10%}.w20{width:20%}.w30{width:30%}.w40{width:40%}.w50{width:50%}.w60{width:60%}.w70{width:70%}.w80{width:80%}.w90{width:90%}.w100{width:100%}

/* tiles */
.tile, .tile-form .tile { width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 16px 8px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); font: 700 .9rem var(--font); color: var(--ink); font-size: 1.6rem; cursor: pointer; min-height: 104px; }
.tile span { font-size: .85rem; text-align: center; line-height: 1.2; }
.tile-form { margin: 0; }

/* goals */
.goals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.goal { background: var(--bg2); border-radius: 14px; padding: 10px 6px; text-align: center; }
.goal b { display: block; font-size: 1.3rem; } .goal span { font-size: .72rem; color: var(--muted); font-weight: 700; }
.goal.ok { background: var(--good-soft); } .goal.bad { background: var(--bad-soft); }
.stars { font-weight: 800; } .streak { background: var(--warn-soft); border-radius: 999px; padding: 2px 8px; margin-left: 4px; }

.li { padding: 8px 0; border-bottom: 1px dashed var(--line); gap: 10px; } .li:last-child { border-bottom: 0; }
.feed { padding: 5px 0; font-size: .9rem; border-bottom: 1px dashed var(--line); } .feed:last-child { border-bottom: 0; }
.request, .task { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px; border-radius: 14px; background: var(--warn-soft); margin-bottom: 8px; }
.task { background: var(--info-soft); }
.lockform { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line); background: var(--bg2); color: var(--ink);
  font: 800 .95rem var(--font); padding: 11px 16px; border-radius: 14px; cursor: pointer; text-align: center; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--pri); color: var(--pri-ink); border-color: transparent; }
.btn.good { background: var(--good); color: #fff; border-color: transparent; }
.btn.bad { background: var(--bad); color: #fff; border-color: transparent; }
.btn.sm { padding: 7px 11px; font-size: .82rem; border-radius: 11px; }
.btn.big { padding: 16px 24px; font-size: 1.1rem; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

/* forms */
.form { display: flex; flex-direction: column; gap: 10px; }
.form label, .grid-form label { display: flex; flex-direction: column; gap: 4px; font-size: .84rem; font-weight: 700; color: var(--muted); }
input, select, textarea { font: 600 1rem var(--font); color: var(--ink); background: var(--bg); border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px; width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--pri); outline-offset: 1px; }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--pri); }
input.narrow { width: 80px; }
.grid-form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: end; }
.grid-form .full, .grid-form .btn { grid-column: 1 / -1; }
fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
fieldset[disabled] { opacity: .55; }
legend { font-weight: 800; margin-bottom: 6px; padding: 0; }
label.check { flex-direction: row !important; align-items: center; gap: 8px !important; color: var(--ink) !important; font-weight: 600 !important; }
label.check.big { font-size: 1rem; }
.codeinput { font: 800 1.6rem ui-monospace, Menlo, monospace; text-transform: uppercase; letter-spacing: .3em; text-align: center; }

/* option tiles (radio) */
.scale, .modes, .roles, .themes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.scale.three { grid-template-columns: repeat(3, 1fr); }
.roles { grid-template-columns: 1fr 1fr; }
.opt { position: relative; cursor: pointer; }
.opt input { position: absolute; opacity: 0; }
.opt span { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px; border-radius: 14px; border: 2px solid var(--line); background: var(--bg);
  font-weight: 700; font-size: .84rem; text-align: center; color: var(--ink); }
.opt span b { font-size: 1.5rem; } .opt span small { color: var(--muted); font-weight: 600; }
.opt input:checked + span { border-color: var(--pri); background: var(--pri-soft); }
.opt input:focus-visible + span { outline: 2px solid var(--pri); }
.theme-swatch span { min-height: 54px; justify-content: center; }
.t-pastel span { background: linear-gradient(135deg, #fdf6fb, #efe3fb); color: #4a3b52; }
.t-pastel-dark span { background: linear-gradient(135deg, #322841, #3f3255); color: #f3e9fb; }
.t-mint span { background: linear-gradient(135deg, #f4fbf7, #dcf3e8); color: #34493f; }
.t-neutral span { background: linear-gradient(135deg, #f5f5f4, #e4ebf2); color: #2b2b2b; }
.t-midnight span { background: linear-gradient(135deg, #1b2440, #27325a); color: #e7ecff; }
.t-baby-blue span { background: linear-gradient(135deg, #f3f8ff, #c6e0ff); color: #2f4058; }
.t-sky span { background: linear-gradient(135deg, #f1f9ff, #a9dcf6); color: #24465c; }
.t-periwinkle span { background: linear-gradient(135deg, #f5f6ff, #cdd3fb); color: #363c66; }
.t-navy span { background: linear-gradient(135deg, #14233d, #2a4069); color: #e6efff; }
.t-bubblegum span { background: linear-gradient(135deg, #fff5fa, #ffc2de); color: #5a2a45; }
.t-peach span { background: linear-gradient(135deg, #fff8f3, #ffd1bb); color: #5b3a2c; }
.t-sunshine span { background: linear-gradient(135deg, #fffcf0, #ffe58a); color: #4a3d12; }
.t-teddy span { background: linear-gradient(135deg, #fbf6f0, #e5cdb4); color: #4b3424; }
.t-forest span { background: linear-gradient(135deg, #172520, #2b4339); color: #e5f3ec; }
.t-grape span { background: linear-gradient(135deg, #221832, #3d2d58); color: #f1e8ff; }
.t-charcoal span { background: linear-gradient(135deg, #1e2022, #34383c); color: #e8eaec; }

/* stash */
.item summary { gap: 12px; }
.qty { min-width: 44px; height: 44px; border-radius: 14px; background: var(--good-soft); display: grid; place-items: center; font-weight: 800; font-size: 1.1rem; }
.qty.low { background: var(--bad-soft); }
.templates { display: flex; flex-wrap: wrap; gap: 6px; }
.templates form { margin: 0; }
.rule.kept { border-color: var(--good); }
.tick { font-size: 1.3rem; } .bad-t { color: var(--bad); }

/* care */
.cups { display: flex; flex-wrap: wrap; gap: 4px; font-size: 1.5rem; margin: 6px 0 12px; }
.cups span { filter: grayscale(1); opacity: .35; } .cups span.full { filter: none; opacity: 1; }
.steps { list-style: none; padding: 0; counter-reset: s; }
.steps li { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; margin-bottom: 8px; box-shadow: var(--shadow); counter-increment: s; }
.steps li span:first-child::before { content: counter(s); display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--pri-soft); margin-right: 10px; font-weight: 800; font-size: .85rem; }
.steps li.done { opacity: .6; } .steps li.done span:first-child { text-decoration: line-through; }

/* history */
.daygrid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.day { border-radius: 12px; padding: 6px 0; text-align: center; background: var(--bg2); font-size: .8rem; }
.day b { display: block; } .day.ok { background: var(--good-soft); }
.table .tr { display: grid; grid-template-columns: 26px 78px 1fr; gap: 8px; padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: .9rem; }
.bar { display: grid; grid-template-columns: 1fr 1.2fr 30px; gap: 8px; align-items: center; font-size: .85rem; }
.bar .track { margin: 0; }

/* caregiver home */
.little-card { color: var(--ink); }

/* auth */
.auth { max-width: 420px; margin: 6vh auto 0; text-align: center; }
.auth .form { text-align: left; }
.auth .logo { border-radius: 26px; box-shadow: var(--shadow); }
.prose { line-height: 1.6; }

/* stickers */
.sticker-sheet { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 14px; }
.sticker { background: #fff; color: #000; border: 1px dashed #bbb; border-radius: 10px; padding: 8px; text-align: center; }
.sticker .qr svg, .sticker .qr img { width: 100%; height: auto; display: block; }
#scan-video { width: 100%; border-radius: 14px; margin-top: 8px; background: #000; }

.jump { margin: -6px 0 12px; }
.reveal { animation: pop .5s cubic-bezier(.2,1.6,.4,1); }
@keyframes pop { from { transform: scale(.9); opacity: 0 } to { transform: scale(1); opacity: 1 } }

@media (max-width: 420px) { .scale { grid-template-columns: repeat(3, 1fr); } .grid-form { grid-template-columns: 1fr; } .sticker-sheet { grid-template-columns: repeat(3, 1fr); } }
@media print {
  .topbar, .tabbar, .noprint, .flash { display: none !important; }
  body { background: #fff; padding: 0; } .main { max-width: none; padding: 0; }
  .sticker-sheet { grid-template-columns: repeat(6, 1fr); gap: 4mm; }
  .sticker { break-inside: avoid; border: 1px dashed #999; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; } }

/* admin */
.adminnav { display: flex; gap: 6px; overflow-x: auto; margin: -4px -14px 14px; padding: 0 14px 6px; scrollbar-width: none; }
.adminnav a { white-space: nowrap; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 7px 12px; font-size: .82rem; color: var(--ink); }
.adminnav a.on { background: var(--pri); color: var(--pri-ink); border-color: transparent; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px 6px; text-align: center; box-shadow: var(--shadow); }
.stat b { display: block; font-size: 1.5rem; } .stat span { font-size: .72rem; color: var(--muted); font-weight: 700; }
.stat.warnbg, .stat-link.alert { background: var(--warn-soft); }
.stat-link { text-align: center; } .stat-link b { font-size: 1.4rem; display: block; }
.userrow { color: var(--ink); font-weight: 500; }
.card-quote { background: var(--bg2); border-radius: 10px; padding: 8px 10px; }
.narrow-sel { width: auto; }
.announce { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; background: var(--info-soft); border-radius: 14px; padding: 10px 12px; margin-bottom: 12px; }
.announce span { grid-column: 1; font-size: .88rem; }
.announce form { grid-column: 2; grid-row: 1 / span 2; }
.announce .x { background: none; border: 0; font-size: 1rem; cursor: pointer; color: var(--muted); }

/* care features */
.hub { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 14px; }
.hubtile { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 4px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); color: var(--ink); font-size: .74rem; }
.hubtile span { font-size: 1.5rem; }
.scale.five { grid-template-columns: repeat(5, 1fr); } .scale.four { grid-template-columns: repeat(2, 1fr); }
.moodstrip { display: flex; flex-wrap: wrap; gap: 4px; font-size: 1.4rem; margin-bottom: 8px; }
.moodquick { display: flex; flex-direction: column; gap: 8px; }
.moodbtn { font-size: 1.7rem; background: var(--bg2); border: 0; border-radius: 14px; padding: 6px 8px; cursor: pointer; flex: 1; }
.moodbtn:active { transform: scale(.92); }
.note { border-left: 4px solid var(--accent); } .note.unread { background: var(--pri-soft); }
.note-body, .journal-body { white-space: normal; margin: 6px 0; line-height: 1.55; }
.notecta { background: linear-gradient(135deg, var(--accent), var(--pri)); }
.banner.safeword { background: var(--bad-soft); border: 2px solid var(--bad); display: flex; flex-direction: column; gap: 6px; }
.safeword-tile { border-color: var(--bad) !important; color: var(--bad) !important; }
.grid2.tight { margin: 0; }
.center-row { justify-content: center; }
.breathe { width: 180px; height: 180px; margin: 10px auto 16px; display: grid; place-items: center; }
.breathe span { width: 70px; height: 70px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff, var(--pri)); box-shadow: 0 0 40px var(--pri); animation: breathe 10s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { transform: scale(1); } 40%, 50% { transform: scale(2.4); } }
.breathe-text { font-weight: 700; }
@media (prefers-reduced-motion: reduce) { .breathe span { animation: none; transform: scale(1.8); } }

/* messages */
.msglink { color: var(--ink); } .msglink.has-unread { border-color: var(--pri); background: var(--pri-soft); }
.badge { background: var(--pri); color: var(--pri-ink); border-radius: 999px; padding: 2px 10px; font-size: .78rem; font-weight: 800; }
.chat { display: flex; flex-direction: column; gap: 8px; padding-bottom: 90px; min-height: 40vh; }
.bubble { max-width: 82%; padding: 9px 13px; border-radius: 18px; box-shadow: var(--shadow); word-wrap: break-word; overflow-wrap: anywhere; }
.bubble.theirs { align-self: flex-start; background: var(--card); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.bubble.mine { align-self: flex-end; background: var(--pri); color: var(--pri-ink); border-bottom-right-radius: 6px; }
.bubble .who-name { display: block; font-size: .72rem; color: var(--pri); margin-bottom: 2px; }
.bubble .meta { font-size: .68rem; opacity: .7; margin-top: 3px; display: flex; gap: 6px; justify-content: flex-end; align-items: center; }
.bubble.new { animation: pop .35s ease-out; }
.empty-chat { margin-top: 20vh; }
form.inline { display: inline; margin: 0; }
.linkbtn { background: none; border: 0; padding: 0; cursor: pointer; font-size: .8rem; color: inherit; opacity: .8; }
.composer { position: fixed; left: 0; right: 0; bottom: calc(64px + env(safe-area-inset-bottom)); z-index: 9; display: flex; gap: 8px; align-items: flex-end;
  max-width: 640px; margin: 0 auto; padding: 8px 14px; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); }
.composer textarea { flex: 1; resize: none; max-height: 140px; border-radius: 20px; padding: 10px 14px; }
.composer .btn { border-radius: 50%; width: 46px; height: 46px; padding: 0; font-size: 1.1rem; }

/* sessions */
.startcard h2 { margin-top: 0; }
.startcard form { justify-content: center; }
details.already { margin-top: 10px; text-align: left; }
details.already summary { cursor: pointer; color: var(--pri); font-weight: 700; }
.endsession { display: flex; gap: 10px; align-items: center; justify-content: flex-end; border-top: 1px dashed var(--line); padding-top: 10px; }
.nappystep { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; max-width: 60%; }
.nappystep details.already { margin-top: 0; }

/* setup guide */
.guide { max-width: 520px; margin: 0 auto; }
.dots { display: flex; justify-content: center; gap: 8px; margin: 4px 0 6px; }
.dots a { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.dots a.on { background: var(--pri); }
ul.ticks { padding-left: 1.1rem; margin: 0; } ul.ticks li { margin-bottom: 8px; font-size: .92rem; }
.guide ol { padding-left: 1.2rem; }
.guide .btn.block { margin-bottom: 10px; }
.hidden-code { text-decoration: none; letter-spacing: .08em; opacity: .85; }
.daypick { display: grid !important; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.daypick legend { grid-column: 1 / -1; }
.daypick .opt span { padding: 8px 2px; font-size: .75rem; }

/* care team */
.teamnote { color: var(--ink); background: var(--pri-soft); }
.member { padding: 10px 0; border-bottom: 1px dashed var(--line); } .member:last-of-type { border-bottom: 0; }
.perms { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; padding: 10px; background: var(--bg2); border-radius: 12px; }
.leadpill { background: var(--warn-soft); color: var(--ink); }
.feed .by { color: var(--muted); font-size: .72rem; }
.grow { flex: 1; }
.thick { letter-spacing: 1px; color: var(--pri); font-size: .7rem; } .thick .off { color: var(--line); }
.plan { background: var(--bg2); border-radius: 14px; padding: 10px 12px; margin-bottom: 12px; }
.plan-row { padding: 4px 0; border-bottom: 1px dashed var(--line); } .plan-row:last-of-type { border-bottom: 0; }
.plan-day { margin-top: 6px; text-transform: uppercase; letter-spacing: .05em; font-weight: 800; }
.narrow-time { width: auto; }

/* about */
.about { max-width: 620px; margin: 0 auto; }
.about .hero h1 { margin-bottom: 4px; }
.about .lead { font-size: 1.05rem; }
.about .logo { border-radius: 22px; box-shadow: var(--shadow); }
.rules-list { padding-left: 1.2rem; } .rules-list li { margin-bottom: 9px; }
.rules { border: 2px solid var(--pri); }

/* lockout */
.lockcard { background: linear-gradient(160deg, #2b2442, #3f3264); color: #f3e9fb; border: 0; }
.lockcard .muted { color: #c9b8e6; }
.moon { font-size: 3.4rem; animation: floaty 4s ease-in-out infinite; }
@keyframes floaty { 50% { transform: translateY(-6px); } }
.tznote { background: var(--info-soft); border-radius: 10px; padding: 6px 10px; margin-bottom: 10px; }
.msgreport { display: inline; } .msgreport summary { list-style: none; cursor: pointer; opacity: .6; display: inline; } .msgreport summary::-webkit-details-marker { display: none; }
.msgreport[open] { display: block; width: 100%; } .msgreport form { background: var(--card); color: var(--ink); border-radius: 12px; padding: 8px; margin-top: 6px; text-align: left; }
.evidence { background: var(--bad-soft); border-radius: 10px; padding: 8px 10px; margin: 6px 0; }

/* help */
.helpgroup { margin: 18px 0 8px; font-size: .9rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.helpitem summary { gap: 10px; justify-content: flex-start !important; } .helpitem summary span { font-size: 1.3rem; }
.helpbody { font-size: .92rem; line-height: 1.55; } .helpbody p { margin: 6px 0; }
.mb { margin-bottom: 8px; }
.pill.emerg { background: var(--bad-soft); color: var(--ink); }
/* v1.8.1 nappy status */
.banner.bad { background: var(--bad-soft); border: 1px solid var(--bad); }
.btn.big-btn { width: 100%; padding: 14px; font-size: 1.05rem; }
.statenow .big { display: block; }
.cardactions { display: flex; gap: 8px; flex-wrap: wrap; margin: -6px 0 14px; }
.restrict { border-top: 1px solid var(--line, rgba(0,0,0,.08)); padding-top: 10px; margin-top: 10px; }
.restrict-row { gap: 8px; margin: 6px 0; }
.composer-muted { margin: 8px 0; }
/* v1.9 little time / caregiver time */
.clocks { display: flex; gap: 10px; flex-wrap: wrap; }
.clockbox { flex: 1 1 120px; background: var(--bg2); border-radius: 14px; padding: 8px 12px; display: flex; flex-direction: column; gap: 2px; }
.clock { font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.littletime { background: linear-gradient(135deg, var(--pri-soft, #f6e8f3), var(--bg2)); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); margin-right: 4px; vertical-align: middle; }
.dot.on { background: var(--good); }
.daypick { display: flex; flex-wrap: wrap; gap: 4px; }
.daypick label { display: inline-flex; align-items: center; gap: 2px; font-size: .85rem; }
.blockrow { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px dashed rgba(0,0,0,.08); }
.cglist { display: flex; flex-direction: column; gap: 6px; }
.cgrow { background: var(--bg2); border-radius: 12px; padding: 8px 10px; }
.threads { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 6px; }
.threads .chip { white-space: nowrap; text-decoration: none; }
.threads .chip.on { background: var(--pri); color: var(--pri-ink); }
/* ---- chat themes (per person; class on .chat) ---- */
.chat[class*="ct-"]:not(.ct-app) { border-radius: 20px; padding: 12px 10px 90px; }
.chatthemes { position: relative; }
.chatthemes summary { list-style: none; cursor: pointer; }
.themegrid { position: absolute; right: 0; top: 100%; z-index: 20; background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; width: min(320px, 86vw); }
.ctswatch { display: flex; align-items: center; gap: 6px; border: 2px solid transparent; border-radius: 12px; padding: 6px 8px; background: var(--bg2); color: var(--ink); font: inherit; font-size: .8rem; cursor: pointer; text-align: left; }
.ctswatch.on { border-color: var(--pri); }
.ctswatch .sw-a, .ctswatch .sw-b { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.ct-app .sw-a { background: var(--pri); } .ct-app .sw-b { background: var(--card); border: 1px solid var(--line); }
.ct-bubblegum { --ct-bg: linear-gradient(160deg, #ffe3f1, #fff0f7); --ct-mine: #ff7eb6; --ct-mine-ink: #fff; --ct-theirs: #ffffff; --ct-theirs-ink: #5a2a45; --ct-name: #e0569a; }
.ct-ocean     { --ct-bg: linear-gradient(160deg, #dff3ff, #eefaff); --ct-mine: #3b9bd9; --ct-mine-ink: #fff; --ct-theirs: #ffffff; --ct-theirs-ink: #1d3c52; --ct-name: #2b7fb8; }
.ct-meadow    { --ct-bg: linear-gradient(160deg, #e6f7e3, #f4fbef); --ct-mine: #5fb36b; --ct-mine-ink: #fff; --ct-theirs: #ffffff; --ct-theirs-ink: #2c4a2f; --ct-name: #3f8f4b; }
.ct-sunshine  { --ct-bg: linear-gradient(160deg, #fff6d6, #fffbea); --ct-mine: #f5a623; --ct-mine-ink: #3a2600; --ct-theirs: #ffffff; --ct-theirs-ink: #4a3a10; --ct-name: #c47d00; }
.ct-starry    { --ct-bg: radial-gradient(circle at 20% 10%, #3a3470 0, #1b1838 60%); --ct-mine: #8c7cf0; --ct-mine-ink: #fff; --ct-theirs: #2c2850; --ct-theirs-ink: #ece8ff; --ct-name: #b9adff; }
.ct-teddy     { --ct-bg: linear-gradient(160deg, #f3e6d8, #faf3ea); --ct-mine: #a9744f; --ct-mine-ink: #fff; --ct-theirs: #fffaf4; --ct-theirs-ink: #4b3424; --ct-name: #8a5a37; }
.ct-rainbow   { --ct-bg: linear-gradient(160deg, #ffe9e9, #fff6dc, #e6fbe6, #e3f1ff, #f1e6ff); --ct-mine: linear-gradient(135deg, #ff8a8a, #ffc46b, #7fd88f, #6fb7ff, #b08cff); --ct-mine-ink: #fff; --ct-theirs: #ffffff; --ct-theirs-ink: #3d3350; --ct-name: #8a5fd6; }
.ct-plain     { --ct-bg: transparent; --ct-mine: #6b7280; --ct-mine-ink: #fff; --ct-theirs: var(--card); --ct-theirs-ink: var(--ink); --ct-name: var(--muted); }
.chat.ct-bubblegum, .chat.ct-ocean, .chat.ct-meadow, .chat.ct-sunshine, .chat.ct-starry, .chat.ct-teddy, .chat.ct-rainbow, .chat.ct-plain { background: var(--ct-bg); }
.chat:not(.ct-app) .bubble.mine { background: var(--ct-mine); color: var(--ct-mine-ink); }
.chat:not(.ct-app) .bubble.theirs { background: var(--ct-theirs); color: var(--ct-theirs-ink); border-color: transparent; }
.chat:not(.ct-app) .bubble .who-name { color: var(--ct-name); }
.chat.ct-starry .empty-chat, .chat.ct-starry .tiny { color: #cfc8f5; }
.ctswatch:not(.ct-app) .sw-a { background: var(--ct-mine); } .ctswatch:not(.ct-app) .sw-b { background: var(--ct-theirs); border: 1px solid rgba(0,0,0,.1); }
.iconpick { display: grid; grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); gap: 8px; margin: 6px 0 10px; }
.iconopt { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px; border-radius: 14px; border: 2px solid transparent; cursor: pointer; text-align: center; }
.iconopt input { position: absolute; opacity: 0; pointer-events: none; }
.iconopt img { border-radius: 14px; box-shadow: var(--shadow); }
.iconopt:has(input:checked) { border-color: var(--pri); background: var(--pri-soft); }
.iconopt:has(input:focus-visible) { outline: 2px solid var(--pri); }
