/* Panora Life — the Calm Sky home (js/sky.js, js/wins.js; Craig 2026-10-15).
 *
 * The whole home is a sky that follows the time of day, the same in light and
 * dark (it is the brand's look, like the icon's navy). Everything on it is
 * white type and frosted glass. The parts keep ONE colour each everywhere: the
 * wheel's slices, these tiles, the week's little wheels.
 */
#wins-home.sky {
  color: var(--sky-ink, #fff);
  min-height: 100%;
  padding-bottom: 28px;
  transition: background 0.6s ease;
}
/* Three colour families (Craig, 2026-10-15), chosen in Settings -> Theme
   (app.prefs.sky -> html[data-sky]), each moving through the day:
     Grove    the default: deep forest greens with cream type and a cream glow
     Sunrise  softer and warmer: peach, rose, lilac
     Glacier  crisper and cooler: icy cyan, electric blue, deep navy
   Every stop under the type is deep enough to read on. */
#wins-home.sky {
  --sky-ink: #f4ecd8;
}
#wins-home.sky-morning {
  --sky-bg:
    radial-gradient(120% 55% at 50% -8%, rgba(242, 228, 190, 0.42), rgba(242, 228, 190, 0) 62%),
    linear-gradient(180deg, #46765a 0%, #33604a 34%, #22453a 70%, #15291f 100%);
}
#wins-home.sky-afternoon {
  --sky-bg:
    radial-gradient(120% 55% at 50% -8%, rgba(246, 236, 206, 0.36), rgba(246, 236, 206, 0) 62%),
    linear-gradient(180deg, #4d7f5e 0%, #386650 34%, #26493c 70%, #172d23 100%);
}
#wins-home.sky-evening {
  --sky-bg:
    radial-gradient(120% 55% at 50% -8%, rgba(236, 196, 140, 0.4), rgba(236, 196, 140, 0) 62%),
    linear-gradient(180deg, #3b5f48 0%, #2a4636 36%, #1b3027 70%, #0f1d17 100%);
}
#wins-home.sky-night {
  --sky-bg: linear-gradient(180deg, #22392b 0%, #16271d 45%, #0b1510 100%);
}
html[data-sky='sunrise'] #wins-home.sky {
  --sky-ink: #ffffff;
}
/* White type on the light top of Sunrise and Glacier was 2.2-2.8:1 (UI review UI-02;
   4.5:1 is the bar). A band of each sky's own deep colour sits behind the date and
   the day line, as its own layer at the top of Home, and fades out by the wheel, so
   the sky's hues stay; Grove already passes. Night is dark already. */
#wins-home.sky::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 470px;
  pointer-events: none;
  z-index: -1;
}
/* Grove too, now that the row on Home sits on its lightest part (decision 0085). */
html:not([data-sky]) #wins-home.sky:not(.sky-night)::after,
html[data-sky='grove'] #wins-home.sky:not(.sky-night)::after {
  background: linear-gradient(
    180deg,
    rgba(8, 34, 22, 0.4) 0,
    rgba(8, 34, 22, 0.34) 170px,
    rgba(8, 34, 22, 0) 470px
  );
}
html[data-sky='sunrise'] #wins-home.sky:not(.sky-night)::after {
  background: linear-gradient(
    180deg,
    rgba(150, 30, 80, 0.4) 0,
    rgba(150, 30, 80, 0.34) 170px,
    rgba(150, 30, 80, 0) 470px
  );
}
html[data-sky='glacier'] #wins-home.sky:not(.sky-night)::after {
  background: linear-gradient(
    180deg,
    rgba(11, 31, 74, 0.36) 0,
    rgba(11, 31, 74, 0.3) 170px,
    rgba(11, 31, 74, 0) 470px
  );
}
html[data-sky='sunrise'] #wins-home.sky-morning {
  --sky-bg: linear-gradient(180deg, #f0765f 0%, #dd5c80 30%, #8a5fd0 62%, #5344b4 100%);
}
html[data-sky='sunrise'] #wins-home.sky-afternoon {
  --sky-bg: linear-gradient(180deg, #ec6f62 0%, #cf5c8e 32%, #8f66d4 64%, #5c4cbc 100%);
}
html[data-sky='sunrise'] #wins-home.sky-evening {
  --sky-bg: linear-gradient(180deg, #e0806a 0%, #a5568f 34%, #4a3f95 66%, #262257 100%);
}
html[data-sky='sunrise'] #wins-home.sky-night {
  --sky-bg: linear-gradient(180deg, #4a3488 0%, #33276a 40%, #1a1440 100%);
}
html[data-sky='glacier'] #wins-home.sky {
  --sky-ink: #ffffff;
}
html[data-sky='glacier'] #wins-home.sky-morning {
  --sky-bg: linear-gradient(180deg, #2fa6dc 0%, #2a72d6 30%, #2a40a6 64%, #0f1a52 100%);
}
html[data-sky='glacier'] #wins-home.sky-afternoon {
  --sky-bg: linear-gradient(180deg, #22b0e2 0%, #2279dc 32%, #2643ad 64%, #0e1850 100%);
}
html[data-sky='glacier'] #wins-home.sky-evening {
  --sky-bg: linear-gradient(180deg, #2b6fb2 0%, #2a46a0 34%, #20287a 66%, #0a0f3a 100%);
}
html[data-sky='glacier'] #wins-home.sky-night {
  --sky-bg: linear-gradient(180deg, #18306a 0%, #101d4a 45%, #070c26 100%);
}
/* Dark: the same sky, deepened - so dark Ocean is still Ocean. */
/* The sky is painted on this fixed layer, not on Home itself: iPhone Safari ignores
   background-attachment: fixed, so the sky stopped one screen down (UI review UI-01).
   Dark mode lays its deepening over the same layer. */
#wins-home.sky::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background: var(--sky-bg, none);
  transition: background 0.6s ease;
}
/* An over-scroll bounce shows the sky's bottom colour, never the cream page. */
html.on-home:has(#wins-home.sky-morning) body {
  background-color: #15291f;
}
html.on-home:has(#wins-home.sky-afternoon) body {
  background-color: #172d23;
}
html.on-home:has(#wins-home.sky-evening) body {
  background-color: #0f1d17;
}
html.on-home:has(#wins-home.sky-night) body {
  background-color: #0b1510;
}
html[data-sky='sunrise'].on-home:has(#wins-home.sky-morning) body {
  background-color: #5b4fae;
}
html[data-sky='sunrise'].on-home:has(#wins-home.sky-afternoon) body {
  background-color: #6a5cbc;
}
html[data-sky='sunrise'].on-home:has(#wins-home.sky-evening) body {
  background-color: #262257;
}
html[data-sky='sunrise'].on-home:has(#wins-home.sky-night) body {
  background-color: #1a1440;
}
html[data-sky='glacier'].on-home:has(#wins-home.sky-morning) body {
  background-color: #0f1a52;
}
html[data-sky='glacier'].on-home:has(#wins-home.sky-afternoon) body {
  background-color: #0e1850;
}
html[data-sky='glacier'].on-home:has(#wins-home.sky-evening) body {
  background-color: #0a0f3a;
}
html[data-sky='glacier'].on-home:has(#wins-home.sky-night) body {
  background-color: #070c26;
}
#wins-home.sky {
  position: relative;
  isolation: isolate;
}
/* ...deepened in dark, like the sky above it. */
:root[data-theme='dark'].on-home body {
  background-image: linear-gradient(rgba(8, 7, 20, 0.5), rgba(8, 7, 20, 0.5));
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']).on-home body {
    background-image: linear-gradient(rgba(8, 7, 20, 0.5), rgba(8, 7, 20, 0.5));
  }
}
:root[data-theme='dark'] #wins-home.sky::before {
  background: linear-gradient(rgba(8, 7, 20, 0.5), rgba(8, 7, 20, 0.5)), var(--sky-bg, none);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) #wins-home.sky::before {
    background: linear-gradient(rgba(8, 7, 20, 0.5), rgba(8, 7, 20, 0.5)), var(--sky-bg, none);
  }
}

#wins-home.sky .topbar h1,
#wins-home.sky .iconbtn,
#wins-home.sky .sky-glass,
#wins-home.sky .wins-total .num,
#wins-home.sky .statrow .num,
#wins-home.sky .mw-n,
#wins-home.sky .rv-open,
#wins-home.sky .rv-open-c,
#wins-home.sky .wins-rules,
#wins-home.sky .wins-rules summary,
#wins-home.sky .wins-recent,
#wins-home.sky .today-next {
  color: var(--sky-ink, #fff);
}

/* The line about today */
#wins-home.sky .sky-date {
  font-size: 13px;
  font-weight: 700;
  margin: 0 2px 2px;
}
#wins-home.sky .sky-line {
  font-size: 25px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 2px 12px;
  text-wrap: balance;
  text-shadow: 0 1px 10px rgba(30, 10, 60, 0.18);
}

/* Glass, the one surface on the sky */
#wins-home.sky .sky-glass {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 22px;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  color: #fff;
}
#wins-home.sky .sky-head {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  margin: 20px 4px 8px;
}

/* The score sits straight on the sky: its card loses its own sky */
#wins-home.sky .score-card {
  background: none !important;
  box-shadow: none;
  padding: 4px 0 0;
}
#wins-home.sky .today-next {
  background: rgba(255, 255, 255, 0.2);
  color: var(--sky-ink, #fff);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 16px;
  margin: 0 0 6px;
  font-weight: 700;
}
#wins-home.sky p.today-next.done {
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.9);
}

/* Welcome, as glass */
#wins-home.sky .welcome-card {
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.26);
  box-shadow: none;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
/* Its type is the sky's, not the old orange card's dark accent ink, which was
   dark green on dark glass in Grove; and "Set up" on white uses the sky's own
   deep colour, at least 6:1 (outside review 2026-10-17, F7: it was 2.5:1). */
#wins-home.sky .welcome-card {
  color: var(--sky-ink, #fff);
  --sky-deep: #22453a;
}
html[data-sky='sunrise'] #wins-home.sky .welcome-card {
  --sky-deep: #5b4fae;
}
html[data-sky='glacier'] #wins-home.sky .welcome-card {
  --sky-deep: #2a40a6;
}
#wins-home.sky .welcome-card .welcome-go {
  color: var(--sky-deep);
}

/* Four advice cards */
#wins-home.sky .sky-advice {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}
#wins-home.sky .sky-card {
  display: grid;
  gap: 2px;
  align-content: start;
  text-align: left;
  padding: 12px 13px;
  font: inherit;
  cursor: pointer;
  min-height: 92px;
}
#wins-home.sky .sky-card:focus-visible,
#wins-home.sky .sky-go:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
#wins-home.sky .sky-cap {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.95;
}
#wins-home.sky .sky-v {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}
#wins-home.sky .sky-s {
  font-size: 12.5px;
  line-height: 1.3;
}

/* Coming up */
#wins-home.sky .sky-plan {
  padding: 2px 14px;
}
#wins-home.sky .sky-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 14px;
}
#wins-home.sky .sky-row:last-child {
  border-bottom: 0;
}
#wins-home.sky .sky-row.sky-empty {
  grid-template-columns: 1fr;
  opacity: 0.9;
}
#wins-home.sky .sky-t {
  font-size: 12.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
#wins-home.sky .sky-what {
  min-width: 0;
  display: grid;
  gap: 1px;
}
#wins-home.sky .sky-what b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#wins-home.sky .sky-what small {
  font-size: 12.5px;
  line-height: 1.25;
}
#wins-home.sky .sky-go {
  border: 0;
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  border-radius: 99px;
  padding: 5px 12px;
  font: 700 12.5px var(--font-ui);
  cursor: pointer;
}

/* The week: wins, the seven little wheels, the streak */
#wins-home.sky .sky-week {
  padding: 14px 12px 10px;
}
#wins-home.sky .wins-hero {
  background: none;
  border: 0;
  box-shadow: none;
  padding: 0 4px 10px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  text-align: left;
}
#wins-home.sky .wins-total .num {
  color: #fff;
  font-size: 30px;
}
#wins-home.sky .wins-word,
#wins-home.sky .wins-sub {
  color: var(--sky-ink, #fff);
}
#wins-home.sky .wins-strip {
  margin: 2px 0 4px;
}
#wins-home.sky .wins-day .lbl {
  color: var(--sky-ink, #fff);
}
#wins-home.sky .mw-n {
  color: #fff;
}
#wins-home.sky .mw-track {
  fill: rgba(255, 255, 255, 0.2);
}
#wins-home.sky .wins-day.today .dot.mw {
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0),
    0 0 0 3px #fff;
}
#wins-home.sky .mw-frost {
  background: rgba(255, 255, 255, 0.9);
}
#wins-home.sky .wins-nudge {
  color: var(--sky-ink, #fff);
  margin: 8px 4px 6px;
}
#wins-home.sky .statrow {
  margin: 8px 0 2px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  padding-top: 10px;
}
#wins-home.sky .statrow .num {
  color: #fff;
}
#wins-home.sky .statrow .lbl {
  color: var(--sky-ink, #fff);
}

/* The tools: the parts as compact tiles in the wheel's colours */
#wins-home.sky .home-grid {
  gap: 10px;
  margin: 0 0 4px;
}
#wins-home.sky .tile {
  min-height: 104px;
  padding: 12px 13px;
  border-radius: 20px;
}
#wins-home.sky .tile.wide {
  grid-column: auto;
  min-height: 104px;
}
#wins-home.sky .tile:last-child:nth-child(odd) {
  grid-column: span 2;
}
#wins-home.sky .tile .tile-value,
#wins-home.sky .tile.wide .tile-value {
  font-size: 18px;
}
#wins-home.sky .tile .tile-sub {
  font-size: 12px;
}
#wins-home.sky .tile .tile-ico {
  width: 28px;
  height: 28px;
  padding: 4px;
  border-radius: 9px;
}
#wins-home.sky .tile .tile-label {
  font-size: 14px;
}
/* Option D (Craig, 2026-10-15): the tiles are the same frosted glass as the
   rest of Home; each part keeps its colour in its icon chip, in the theme's
   own soft set (the wheel uses the same, js/score.js PAL). */
#wins-home.sky .tile[data-tile='food'] {
  --c1: #e2bd72;
  --c2: #c29c50;
}
#wins-home.sky .tile[data-tile='exercise'] {
  --c1: #d79a7c;
  --c2: #b6795b;
}
#wins-home.sky .tile[data-tile='unplug'] {
  --c1: #86b8b2;
  --c2: #62968f;
}
#wins-home.sky .tile[data-tile='sleep'] {
  --c1: #a3b3cf;
  --c2: #7f90ae;
}
#wins-home.sky .tile[data-tile='still'] {
  --c1: #a6c79c;
  --c2: #83a679;
}
#wins-home.sky .tile[data-tile='focus'] {
  --c1: #bba4c0;
  --c2: #97809e;
}
#wins-home.sky .tile[data-tile='know'] {
  --c1: #ece0bd;
  --c2: #cbbd98;
}
html[data-sky='sunrise'] #wins-home.sky .tile[data-tile='food'] {
  --c1: #f6c08e;
  --c2: #dc9f6a;
}
html[data-sky='sunrise'] #wins-home.sky .tile[data-tile='exercise'] {
  --c1: #f2a1a8;
  --c2: #d77f88;
}
html[data-sky='sunrise'] #wins-home.sky .tile[data-tile='unplug'] {
  --c1: #a9c2ee;
  --c2: #87a1d4;
}
html[data-sky='sunrise'] #wins-home.sky .tile[data-tile='sleep'] {
  --c1: #c3b6ec;
  --c2: #9f90d0;
}
html[data-sky='sunrise'] #wins-home.sky .tile[data-tile='still'] {
  --c1: #a9dcc6;
  --c2: #82bfa6;
}
html[data-sky='sunrise'] #wins-home.sky .tile[data-tile='focus'] {
  --c1: #dcaedb;
  --c2: #bd8cbc;
}
html[data-sky='sunrise'] #wins-home.sky .tile[data-tile='know'] {
  --c1: #f5dd9a;
  --c2: #d8bd74;
}
html[data-sky='glacier'] #wins-home.sky .tile[data-tile='food'] {
  --c1: #f0cf8c;
  --c2: #d2ae66;
}
html[data-sky='glacier'] #wins-home.sky .tile[data-tile='exercise'] {
  --c1: #eba3ae;
  --c2: #cd818d;
}
html[data-sky='glacier'] #wins-home.sky .tile[data-tile='unplug'] {
  --c1: #9ccbf2;
  --c2: #76aad8;
}
html[data-sky='glacier'] #wins-home.sky .tile[data-tile='sleep'] {
  --c1: #aab4ee;
  --c2: #8691d4;
}
html[data-sky='glacier'] #wins-home.sky .tile[data-tile='still'] {
  --c1: #97dcd8;
  --c2: #6fbdb8;
}
html[data-sky='glacier'] #wins-home.sky .tile[data-tile='focus'] {
  --c1: #c6b2ec;
  --c2: #a68fd0;
}
html[data-sky='glacier'] #wins-home.sky .tile[data-tile='know'] {
  --c1: #e9e2c8;
  --c2: #cbc3a6;
}

/* Your week + Ask, the wins details */
/* Coming up, Your week and Ask your data are one stack of cards: 10px apart, the same as
   every other pair of cards on Home (Craig 2026-10-17: Wind down sat 2px above Your week). */
#wins-home.sky .sky-plan ~ .rv-open {
  margin: 10px 0 0;
}
#wins-home.sky .rv-open {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: #fff;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
#wins-home.sky .rv-open .muted,
#wins-home.sky .rv-open-s {
  color: rgba(255, 255, 255, 0.88);
}
#wins-home.sky .rv-open-c {
  color: #fff;
}
#wins-home.sky .sky-more {
  margin-top: 16px;
  padding: 4px 14px;
}
#wins-home.sky .sky-more > summary {
  cursor: pointer;
  font-weight: 700;
  padding: 10px 0;
  list-style: none;
}
#wins-home.sky .sky-more > summary::-webkit-details-marker {
  display: none;
}
#wins-home.sky .sky-more > summary::after {
  content: ' ›';
  opacity: 0.8;
}
#wins-home.sky .sky-more[open] > summary::after {
  content: ' ⌄';
}
#wins-home.sky .sectionlbl {
  color: rgba(255, 255, 255, 0.85);
}
#wins-home.sky .wins-recent {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.18);
  color: #fff;
  box-shadow: none;
}
#wins-home.sky .wins-recent .muted,
#wins-home.sky .wins-rules .muted {
  color: rgba(255, 255, 255, 0.85);
}
#wins-home.sky .wins-rules {
  color: #fff;
}
#wins-home.sky .wins-rules summary {
  color: #fff;
}
@media (prefers-reduced-motion: reduce) {
  #wins-home.sky {
    transition: none;
  }
}

/* Settings: the three colour families as swatches. */
.sky-pick {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.sky-pick button {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 8px 4px 10px;
  border-radius: 14px;
  border: 2px solid transparent;
  background: var(--surface-quiet, rgba(0, 0, 0, 0.04));
  color: var(--ink);
  font: 600 13px var(--font-ui);
  cursor: pointer;
}
.sky-pick button[aria-checked='true'] {
  border-color: var(--accent);
}
.sky-pick button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.sky-pick .sw {
  width: 100%;
  height: 44px;
  border-radius: 10px;
  display: block;
}
.sky-pick .sw-grove {
  background:
    radial-gradient(120% 60% at 50% -10%, rgba(242, 228, 190, 0.55), rgba(242, 228, 190, 0) 60%),
    linear-gradient(180deg, #46765a, #33604a 35%, #22453a 70%, #15291f);
}
.sky-pick .sw-sunrise {
  background: linear-gradient(180deg, #f0765f, #dd5c80 35%, #8a5fd0 70%, #5344b4);
}
.sky-pick .sw-glacier {
  background: linear-gradient(180deg, #2fa6dc, #2a72d6 35%, #2a40a6 70%, #0f1a52);
}

/* ---------- one theme across every part (Craig, 2026-10-15) ----------
   The strip along the top of every section (the Home button bar) wears the
   theme's gradient, so Food, Sleep, Focus and the rest read as one app. */
.appbar {
  background: linear-gradient(100deg, #2c573f 0%, #3b6a4e 50%, #56805c 100%) !important;
  border-bottom: 0 !important;
}
html[data-sky='sunrise'] .appbar {
  background: linear-gradient(100deg, #b5545f 0%, #a65a7e 45%, #8a6fcb 100%) !important;
}
html[data-sky='glacier'] .appbar {
  background: linear-gradient(100deg, #1d74c4 0%, #2a64cc 45%, #2a40a6 100%) !important;
}
.appbar .homebtn,
.appbar .homebtn span {
  color: #f4ecd8 !important;
}
html[data-sky='sunrise'] .appbar .homebtn,
html[data-sky='sunrise'] .appbar .homebtn span,
html[data-sky='glacier'] .appbar .homebtn,
html[data-sky='glacier'] .appbar .homebtn span {
  color: #fff !important;
}
:root[data-theme='dark'] .appbar {
  box-shadow: inset 0 0 0 100vmax rgba(8, 7, 20, 0.42);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .appbar {
    box-shadow: inset 0 0 0 100vmax rgba(8, 7, 20, 0.42);
  }
}

/* ---------- Refinement pass (ChatGPT review, 2026-10-15) ----------
   A smaller wheel under the next step, one quiet "how it works" line, the week's
   numbers named, and compact tool tiles that are destinations, not a third copy
   of the same status. */
#wins-home.sky .score-board {
  color: var(--sky-ink, #fff);
}
#wins-home.sky .score-card {
  gap: 8px;
}
#wins-home.sky .score-how-wrap {
  width: 100%;
  display: grid;
  justify-items: center;
}
#wins-home.sky .score-how {
  border: 0;
  background: none;
  color: var(--sky-ink, #fff);
  font: 700 13.5px var(--font-ui);
  padding: 6px 10px;
  cursor: pointer;
  display: inline-flex;
  gap: 6px;
  align-items: center;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.45);
  text-underline-offset: 3px;
}
#wins-home.sky .score-how:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
  border-radius: 8px;
}
#wins-home.sky .score-explain {
  width: 100%;
  box-sizing: border-box;
  margin-top: 6px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.24);
  font-size: 13.5px;
  line-height: 1.4;
  color: var(--sky-ink, #fff);
}
#wins-home.sky .score-explain p {
  margin: 0 0 8px;
}
#wins-home.sky .score-explain p:last-child {
  margin: 8px 0 0;
}
#wins-home.sky .score-explain ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 3px;
}
#wins-home.sky .score-explain li {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 8px;
}
/* Coming from another app? (js/imports.js, decision 0035) */
#wins-home.sky .hist-card {
  padding: 14px 16px;
  margin: 0 0 12px;
}
#wins-home.sky .hist-card p {
  margin: 0 0 6px;
}
#wins-home.sky .hist-t {
  font-weight: 700;
  font-size: 15.5px;
}
#wins-home.sky .hist-s {
  font-size: 13.5px;
  opacity: 0.92;
}
#wins-home.sky .hist-btns {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 8px;
}
#wins-home.sky .hist-btns .hist-later {
  white-space: nowrap;
  color: inherit;
  font-weight: 600;
  min-height: 44px;
}

/* The open parts and a resting day, in the sky's own ink like the breakdown (decision 0068). */
#wins-home.sky .score-open-chip,
#wins-home.sky .score-rest {
  color: var(--sky-ink, #fff);
}
#wins-home.sky .score-rest .link-btn {
  min-height: 44px;
  border: 0;
  background: none;
  color: inherit;
  font: 700 13.5px var(--font-ui);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

/* The breakdown: how today's number adds up (decision 0034). */
#wins-home.sky .score-explain ul.sx-rows {
  gap: 10px;
  margin: 2px 0 10px;
}
#wins-home.sky .score-explain li.sx-row {
  display: block;
}
#wins-home.sky .sx-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
#wins-home.sky .sx-head b {
  font-size: 14.5px;
}
#wins-home.sky .sx-tag {
  font-size: 11.5px;
  font-weight: 600;
  opacity: 0.8;
}
#wins-home.sky .sx-pts {
  margin-left: auto;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
#wins-home.sky .sx-bar {
  height: 6px;
  margin: 5px 0 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  overflow: hidden;
}
#wins-home.sky .sx-bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
}
#wins-home.sky .score-explain .sx-line {
  margin: 0;
  font-size: 12.5px;
  opacity: 0.9;
}
#wins-home.sky .score-explain ul.sx-why {
  gap: 2px;
}
#wins-home.sky .score-explain .sx-why li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12.5px;
  opacity: 0.92;
}
#wins-home.sky .sx-sub {
  flex: none;
  font-variant-numeric: tabular-nums;
}
#wins-home.sky .score-explain .sx-total {
  display: flex;
  justify-content: space-between;
  margin: 0 0 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  font-size: 15px;
}
#wins-home.sky .score-explain .sx-next {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 10px;
}
#wins-home.sky .score-hubbtn {
  cursor: pointer;
  outline: none;
}
#wins-home.sky .score-detail {
  margin-top: 2px;
}
#wins-home.sky .wins-sub {
  font-size: 13px;
  font-weight: 600;
}
#wins-home.sky .wins-strip-cap {
  text-align: center;
  font-size: 12px;
  margin: 0 0 2px;
  color: var(--sky-ink, #fff);
  opacity: 0.9;
}
#wins-home.sky .tile .tile-sub,
#wins-home.sky .tile .tile-bar {
  display: none;
}
#wins-home.sky .tile {
  min-height: 84px;
}
#wins-home.sky .tile.wide {
  min-height: 84px;
}
.dom-wins .tile-state.empty {
  display: none;
}

/* ---------- Option D: glass tiles, colour chips, the theme's ink (2026-10-15) ---------- */
:root {
  --wheel-ink: #1f3a2c;
}
html[data-sky='sunrise'] {
  --wheel-ink: #3a2448;
}
html[data-sky='glacier'] {
  --wheel-ink: #13244a;
}
#wins-home.sky .tile {
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: none;
  color: var(--sky-ink, #fff);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
#wins-home.sky .tile:active {
  box-shadow: none;
  background: rgba(255, 255, 255, 0.2);
}
#wins-home.sky .tile:focus-visible {
  outline: 2px solid #fff;
}
#wins-home.sky .tile .tile-ico {
  background: var(--c1);
  box-shadow: none;
  stroke: var(--wheel-ink);
}
#wins-home.sky .tile .tile-ico .fill {
  fill: var(--wheel-ink);
}
#wins-home.sky .tile-state.on .wins-tick {
  background: var(--sky-ink, #fff);
  color: var(--wheel-ink);
}
#wins-home.sky .score-ic {
  stroke: var(--wheel-ink);
}
#wins-home.sky .sd-ic:not(.sd-day) svg {
  stroke: var(--wheel-ink);
}

/* ---------- Audit fixes (2026-10-15, design/audit) ---------- */
/* A1: the wins rules read on the sky in light mode too. */
#wins-home.sky .wins-pts {
  color: var(--sky-ink, #fff);
}
#wins-home.sky .wins-rule-count {
  color: var(--sky-ink, #fff);
  opacity: 0.8;
}
/* The bars' icons in the theme's ink, on each part's own colour. */
#wins-home.sky .sr-ic svg {
  stroke: var(--wheel-ink);
}
/* A15: only the words are underlined, not the chevron. */
#wins-home.sky .score-how {
  text-decoration: none;
}
#wins-home.sky .score-how-t {
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.45);
  text-underline-offset: 3px;
}
/* A16: comfortable tap targets without making things look bigger. */
#wins-home.sky .score-how,
#wins-home.sky .wins-rules > summary {
  min-height: 44px;
}
#wins-home.sky .sky-go {
  position: relative;
}
#wins-home.sky .sky-go::after {
  content: '';
  position: absolute;
  inset: -9px -6px;
}
#wins-home .iconbtn[data-opens-settings] {
  min-width: 44px;
  min-height: 44px;
}
/* A18: the welcome comes first; the next step waits until it is done. */
#wins-home .welcome-card ~ .today-card .today-next {
  display: none;
}

/* Grove's top glows, so its glass needs a darker tint for small text to read (decision 0085). */
html:not([data-sky]) #wins-home.sky .tile,
html[data-sky='grove'] #wins-home.sky .tile,
html:not([data-sky]) #wins-home.sky .sky-glass,
html[data-sky='grove'] #wins-home.sky .today-next,
html:not([data-sky]) #wins-home.sky .today-next,
html[data-sky='grove'] #wins-home.sky .sky-glass {
  background-color: rgba(10, 34, 24, 0.42);
}
html:not(.mono-light) #wins-home.sky .sky-go {
  background-color: rgba(0, 0, 0, 0.28);
  color: #fff;
}

/* ===================== The living sky (decision 0143) =====================
   Craig, 2026-11-16: "let's see what we can do to make them better and more dynamic... maybe
   there is some movement in the background and the colors move around... maybe it's reactive
   to touch... make sure the themes carry over throughout the modules in ways that look good and
   aren't distracting", and "match the breathing bubble to each theme".

   Each theme names its own colours once, here:
     --lv-a, --lv-b, --lv-c   three soft glows that drift slowly across Home and a session
     --orb-hi, --orb-lo       the breathing bubble, light to deep
     --orb-wash               its glow, and the ripple where a finger touches
     --lv-tint                the faint wash at the top of every part's page */
:root {
  --lv-a: rgba(242, 228, 190, 0.3);
  --lv-b: rgba(120, 180, 140, 0.32);
  --lv-c: rgba(30, 80, 60, 0.4);
  --orb-hi: #f6f0da;
  --orb-lo: #79a986;
  --orb-wash: rgba(242, 228, 190, 0.4);
  --lv-tint: rgba(70, 118, 90, 0.14);
}
html[data-sky='sunrise'] {
  --lv-a: rgba(255, 196, 160, 0.36);
  --lv-b: rgba(232, 108, 160, 0.3);
  --lv-c: rgba(120, 92, 226, 0.34);
  --orb-hi: #ffe8dc;
  --orb-lo: #e9819f;
  --orb-wash: rgba(255, 206, 196, 0.42);
  --lv-tint: rgba(221, 92, 128, 0.13);
}
html[data-sky='ember'] {
  --lv-a: rgba(255, 206, 120, 0.34);
  --lv-b: rgba(242, 112, 46, 0.32);
  --lv-c: rgba(140, 34, 40, 0.36);
  --orb-hi: #ffe7c4;
  --orb-lo: #f0913e;
  --orb-wash: rgba(255, 198, 128, 0.42);
  --lv-tint: rgba(239, 111, 46, 0.14);
}
html[data-sky='glacier'] {
  --lv-a: rgba(168, 230, 255, 0.34);
  --lv-b: rgba(56, 140, 240, 0.32);
  --lv-c: rgba(30, 40, 160, 0.38);
  --orb-hi: #e6f6ff;
  --orb-lo: #4f9fe6;
  --orb-wash: rgba(176, 222, 255, 0.42);
  --lv-tint: rgba(42, 114, 214, 0.13);
}
html[data-sky='slate'] {
  --lv-a: rgba(255, 226, 190, 0.22);
  --lv-b: rgba(130, 156, 190, 0.3);
  --lv-c: rgba(30, 47, 70, 0.4);
  --orb-hi: #f1f4fa;
  --orb-lo: #8aa0bd;
  --orb-wash: rgba(222, 232, 246, 0.36);
  --lv-tint: rgba(95, 126, 157, 0.14);
}
html[data-sky='mono'] {
  --lv-a: rgba(255, 255, 255, 0.16);
  --lv-b: rgba(170, 170, 176, 0.18);
  --lv-c: rgba(0, 0, 0, 0.3);
  --orb-hi: #ffffff;
  --orb-lo: #a4a5aa;
  --orb-wash: rgba(255, 255, 255, 0.3);
  --lv-tint: rgba(110, 110, 116, 0.12);
}
/* On Black & white's light page the glows are greys that show on white. */
html.mono-light {
  --lv-a: rgba(255, 255, 255, 0.7);
  --lv-b: rgba(150, 150, 158, 0.22);
  --lv-c: rgba(110, 110, 118, 0.2);
}

/* The layer itself (js/sky.js Rest.sky.living). Three very large soft circles, each moved only
   by transform, which the phone's graphics chip does cheaply; one full drift takes about a
   minute, so it is felt more than watched. */
.living {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.living.living-fixed {
  position: fixed;
  z-index: -1;
}
.lv-b {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 120vmax;
  height: 120vmax;
  margin: -60vmax 0 0 -60vmax;
  border-radius: 50%;
  will-change: transform;
}
.lv-b1 {
  background: radial-gradient(closest-side, var(--lv-a), transparent);
  animation: lv-1 46s ease-in-out infinite alternate;
}
.lv-b2 {
  background: radial-gradient(closest-side, var(--lv-b), transparent);
  animation: lv-2 58s ease-in-out infinite alternate;
}
.lv-b3 {
  background: radial-gradient(closest-side, var(--lv-c), transparent);
  animation: lv-3 71s ease-in-out infinite alternate;
}
@keyframes lv-1 {
  from {
    transform: translate(-34%, -40%) scale(0.75);
  }
  to {
    transform: translate(16%, -18%) scale(1);
  }
}
@keyframes lv-2 {
  from {
    transform: translate(38%, 4%) scale(0.85);
  }
  to {
    transform: translate(-12%, 28%) scale(1.1);
  }
}
@keyframes lv-3 {
  from {
    transform: translate(-24%, 44%) scale(1);
  }
  to {
    transform: translate(28%, 12%) scale(0.8);
  }
}
/* A touch leaves a soft glow that spreads and fades. */
.lv-touch {
  position: absolute;
  width: 180px;
  height: 180px;
  margin: -90px 0 0 -90px;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--orb-wash), transparent);
  animation: lv-touch 1.6s ease-out forwards;
}
@keyframes lv-touch {
  from {
    transform: scale(0.25);
    opacity: 1;
  }
  to {
    transform: scale(3);
    opacity: 0;
  }
}
/* Someone who asked their phone for less motion gets a still sky. */
@media (prefers-reduced-motion: reduce) {
  .lv-b {
    animation: none;
  }
  .lv-touch {
    display: none;
  }
}

/* Inside the parts: a faint wash of the theme at the top of the page, still, so the theme is
   felt everywhere without moving under what people read. */
html:not(.on-home) body {
  background-image: linear-gradient(180deg, var(--lv-tint) 0, var(--lv-tint) 150px, transparent 380px);
  background-repeat: no-repeat;
}
/* Each part's header is solid so it can stay put over what scrolls under it; it takes the
   same wash, so the tint runs on unbroken from the top bar into the page. */
html:not(.on-home) .parthead {
  background-image: linear-gradient(var(--lv-tint), var(--lv-tint));
}

/* Home's "More" (js/wins.js, decision 0162): the tips, Coming up, the tools and the other
   ideas, folded under one line so Home starts short. */
#wins-home .home-more {
  margin: 12px 0 0;
  padding: 0;
  border-radius: 18px;
}
#wins-home .home-more > summary {
  list-style: none;
  cursor: pointer;
  display: grid;
  gap: 2px;
  padding: 14px 44px 14px 16px;
  position: relative;
  color: var(--sky-ink, #fff);
  min-height: 44px;
}
#wins-home .home-more > summary::-webkit-details-marker {
  display: none;
}
#wins-home .home-more > summary::after {
  content: '';
  position: absolute;
  right: 18px;
  top: 50%;
  width: 9px;
  height: 9px;
  margin-top: -7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.2s;
}
#wins-home .home-more[open] > summary::after {
  transform: rotate(225deg);
  margin-top: -2px;
}
#wins-home .home-more-t {
  font-weight: 800;
  font-size: 16px;
}
#wins-home .home-more-s {
  font-size: 13px;
  opacity: 0.85;
}
#wins-home .home-more[open] {
  padding-bottom: 12px;
}
#wins-home .home-more[open] > :not(summary) {
  margin-left: 12px;
  margin-right: 12px;
}
