/* Home and the side menu on laptops, as in the owner's full-page mockup (4 Dec 2026,
   docs/screens/desktop-home-mockup-4dec/mockup.webp). Night look only, side menu widths only (>= 960 px).
   Markup: js/views/home-desk.js (Home), js/app.js (the side menu). Phones are untouched.
   Sizes come from the mockup measured at a 1440 px window: --u is one mockup pixel there, and the whole page
   scales with the width it has, like the mockup does. Rows may grow a little on tall windows. */

/* The compass is the side menu's icon for Others on laptops only; the tab bar keeps its star. */
.tab .ic-desk { display: none; }
.rail-life { display: none; }
.nt-prem-rail { display: none; }

@media (min-width: 960px) {
  /* ---------- The side menu ---------- */
  html.look-night .tabs { gap: 0 !important; padding: 18px 20px 24px !important; background: linear-gradient(180deg, #030f2f 0%, #041231 100%) !important; box-shadow: none !important; border-right: 1px solid rgba(70, 100, 180, 0.10) !important; }
  html.look-night .rail-brand { gap: 9px !important; height: 48px; margin: 0 0 15px !important; padding: 0 0 0 6px !important; font-size: 27px !important; }
  html.look-night .rail-brand img { width: 50px !important; height: 50px !important; margin: -2px -3px 0 -4px !important; }
  html.look-night .tab-list { gap: 3px !important; }
  html.look-night .tab {
    position: relative; min-height: 41px !important; height: 41px; padding: 0 12px 0 17px !important; gap: 19px !important; border-radius: 11px !important;
    border: 1.5px solid transparent; background: none !important; box-shadow: none !important;
    font: 500 16.5px/1 var(--font-head) !important; letter-spacing: 0 !important; color: #dbe3ff !important;
  }
  html.look-night .tab .ic { flex: none; width: 22px !important; height: 22px !important; padding: 0 !important; background: none !important; box-shadow: none !important;
    color: #c9d6ff !important; stroke: currentColor; stroke-width: 1.8; fill: none; }
  html.look-night .tab .ic .ic-fill { fill: none !important; }
  html.look-night .tab .ic-desk { display: block; }
  html.look-night .tab .ic-phone { display: none; }
  html.look-night .tab:hover { background: rgba(80, 120, 220, 0.12) !important; }
  html.look-night .tab.is-on {
    color: #19f3f6 !important;
    background: linear-gradient(90deg, #0d2b5e 0%, #0d2959 60%, #0f2c62 100%) padding-box, linear-gradient(90deg, #1f7fc0 0%, #23558f 55%, #2f6fb4 100%) border-box !important;
    box-shadow: 0 0 14px rgba(25, 200, 245, 0.14), inset 0 1px 0 rgba(140, 220, 255, 0.10) !important;
  }
  html.look-night .tab.is-on .ic { color: #19f3f6 !important; }
  html.look-night .tab.is-on .ic .ic-fill { fill: none !important; }
  html.look-night .tab span { white-space: nowrap; }

  /* The upgrade card: gold rim, "Free plan", the title, three ticks, the button, and the welcome clock under it. */
  html.look-night body .rail-up:not([hidden]) {
    display: flex !important; flex-direction: column; align-items: stretch; gap: 0; margin-top: auto; padding: 14px 16px 16px 17px !important; border-radius: 15px !important;
    border: 1.5px solid transparent !important;
    background: radial-gradient(90% 55% at 50% 108%, rgba(214, 150, 60, 0.32) 0%, rgba(214, 150, 60, 0) 70%) padding-box,
                radial-gradient(80% 50% at 15% -5%, rgba(110, 90, 200, 0.35) 0%, rgba(110, 90, 200, 0) 70%) padding-box,
                linear-gradient(180deg, #241f57 0%, #121c50 45%, #141b4c 70%, #2c2850 100%) padding-box,
                linear-gradient(160deg, #fff1a0 0%, #f6cf55 30%, #d79a32 60%, #f8d35a 100%) border-box !important;
    box-shadow: 0 0 22px -4px rgba(253, 200, 70, 0.45), 0 0 0 1px rgba(255, 220, 110, 0.06) !important; color: #fff !important;
  }
  html.look-night body .rail-up:active { transform: translateY(1px); }
  html.look-night body .rail-up .rail-up-badge { display: flex; align-items: center; gap: 7px; margin: 0 0 8px !important; padding: 0 !important; background: none !important; box-shadow: none !important;
    font: 700 12.5px/1 var(--font-head) !important; color: #f5c542 !important; }
  html.look-night body .rail-up .rail-up-badge .ic { width: 15px !important; height: 15px !important; color: #f5c542 !important; }
  html.look-night body .rail-up > b { display: block; margin: 0 0 14px; font: 800 20.5px/1.2 var(--font-head) !important; letter-spacing: -0.01em; color: #fff !important; }
  html.look-night body .rail-up > small:not(.wl-pill) { display: none; }
  html.look-night .rail-up-list { display: grid; gap: 0; margin: 0 0 11px; padding: 0 0 0 4px; list-style: none; }
  html.look-night .rail-up-list li { display: flex; align-items: center; gap: 10px; height: 22px; font: 400 13px/1 var(--font-head); color: #eef1ff; white-space: nowrap; }
  html.look-night .rail-up-list li span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  html.look-night .rail-tick { flex: none; width: 15px; height: 15px; fill: none; stroke: #3edc7a; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
  html.look-night body .rail-up .rail-up-btn {
    display: flex; align-items: center; justify-content: center; gap: 7px; width: 100%; height: 44px; min-height: 44px; margin: 0 !important; border: 0 !important; border-radius: 11px !important;
    font: 800 17px/1 var(--font-head) !important; color: #191640 !important;
    background: linear-gradient(180deg, #fee57c 0%, #fdd94b 45%, #fbc32e 100%) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 6px 16px -6px rgba(253, 200, 70, 0.65) !important;
  }
  html.look-night .rail-arrow { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
  /* The welcome offer's clock, only while it runs (js/welcome.js). */
  html.look-night body .rail-up .rail-up-end { display: none !important; }
  html.look-night body .rail-up .rail-up-end.wl-pill:not([hidden]) {
    display: flex !important; align-items: center; justify-content: center; gap: 6px; margin: 10px 0 -3px; white-space: nowrap;
    font: 600 12.5px/1 var(--font-head) !important; color: #e9e2c4 !important;
  }
  html.look-night body .rail-up .rail-up-end .wl-clock { color: #ffd84d; font-weight: 800; letter-spacing: 0.01em; }
  html.look-night body .rail-up .rail-up-end .wl-dot { width: 6px; height: 6px; }
  /* While the welcome offer runs the card is the deal (js/welcome.js, after Riffloop's banner): "Lifetime 34% off",
     the clock right under it, coral with "Final hour" in the last hour. */
  html.look-night body .rail-up.is-deal > b { margin-bottom: 6px; }
  html.look-night body .rail-up.is-deal .rail-up-end.wl-pill:not([hidden]) { justify-content: flex-start; margin: 0 0 16px; font-size: 13px !important; color: #e9e2c4 !important; }
  html.look-night body .rail-up.is-deal .rail-up-end .wl-clock { font-size: 13.5px; }
  html.look-night body .rail-up.is-final .rail-up-end.wl-pill:not([hidden]) { color: #ff8a7a !important; font-weight: 800 !important; }
  html.look-night body .rail-up.is-final .rail-up-end .wl-clock { color: #ff8a7a; }
  html.look-night body .rail-up .rail-up-price { display: flex; align-items: baseline; gap: 8px; margin: -2px 0 6px; }
  html.look-night body .rail-up .rail-up-price b { font: 800 22px/1 var(--font-head); color: #ffd84d; }
  html.look-night body .rail-up .rail-up-price s { font: 600 14px/1 var(--font-head); color: rgba(230, 233, 255, 0.6); text-decoration-color: #ff7a7a; text-decoration-thickness: 2px; }
  html.look-night body .rail-up:not([hidden]) + .rail-me { margin-top: 20px !important; }

  /* The menu's upgrade banner, small like Riffloop's (owner, 5 Dec 2026): crown tile, a bold line ("Lifetime 34% off ·
     $39", or "Unlock Premium") over a smaller one (the gold clock, or "One payment. No subscription."), an arrow.
     Painted by js/welcome.js paintRailPrem. */
  html.look-night body .rail-up, html.look-night body a.rail-up:not([hidden]) { display: none !important; }
  html.look-night body .nt-prem-rail:not([hidden]) {
    display: flex; align-items: center; gap: 10px; margin-top: auto; padding: 12px 10px 12px 11px; border-radius: 15px;
    text-decoration: none; color: #fff; border: 1.4px solid transparent;
    background: linear-gradient(165deg, #133a8f 0%, #0f2f78 100%) padding-box, linear-gradient(120deg, #6fa6e8 0%, #2c52a6 55%, #1a367f 100%) border-box;
    box-shadow: 0 10px 24px -16px rgba(40, 120, 255, 0.7);
    transition: transform 140ms cubic-bezier(0.23, 1, 0.32, 1), filter 140ms ease;
  }
  html.look-night body .nt-prem-rail:hover { filter: brightness(1.08); }
  html.look-night body .nt-prem-rail:active { transform: scale(0.98); }
  html.look-night body .nt-prem-rail .nt-prem-crown {
    flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
    background: linear-gradient(160deg, #2a4f9e 0%, #1d3a7c 100%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  }
  html.look-night body .nt-prem-rail .nt-prem-crown svg { width: 19px; height: 17px; margin-top: -2px; }
  html.look-night body .nt-prem-rail .nt-prem-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
  html.look-night body .nt-prem-rail .nt-prem-text b { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font: 800 14.5px/1.2 var(--font-head); letter-spacing: -0.01em; color: #fff; }
  html.look-night body .nt-prem-rail.is-wrap .nt-prem-text :is(b, small) { white-space: normal; overflow: visible; flex-wrap: wrap; text-wrap: balance; }
  html.look-night body .nt-prem-rail.no-price .nt-prem-price { display: none; }
  html.look-night body .nt-prem-rail .nt-prem-text small { display: flex; align-items: center; gap: 5px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font: 500 12px/1.2 var(--font-head); color: #c9d4f5; }
  html.look-night body .nt-prem-rail .nt-prem-ends { font-weight: 700 !important; color: #ffcc1d !important; }
  html.look-night body .nt-prem-rail .nt-prem-ends svg { flex: none; width: 13px; height: 13px; }
  html.look-night body .nt-prem-rail .nt-prem-ends .wl-clock { font-variant-numeric: tabular-nums; font-weight: 700; color: inherit; }
  html.look-night body .nt-prem-rail.is-final .nt-prem-ends { color: #ff8f7e !important; }
  html.look-night body .nt-prem-rail.is-final .nt-prem-ends circle { fill: #ff8f7e; }
  html.look-night body .nt-prem-rail .nt-prem-go { flex: none; display: grid; place-items: center; width: 15px; color: #c9d4f5; }
  html.look-night body .nt-prem-rail .nt-prem-go svg { width: 15px; height: 15px; }
  html.look-night body .nt-prem-rail:not([hidden]) + .rail-life[hidden] + .rail-me { margin-top: 20px !important; }

  /* Bought: "Lifetime / You're on Lifetime" with a check, where the upgrade card would be (owner's Songs mockup). */
  html.look-night body .rail-life:not([hidden]) {
    position: relative; display: flex; flex-direction: column; gap: 12px; margin-top: auto; padding: 14px 16px 16px 17px; border-radius: 15px; text-decoration: none; color: #fff;
    border: 1.5px solid transparent;
    background: radial-gradient(90% 60% at 20% 0%, rgba(90, 110, 230, 0.35) 0%, rgba(90, 110, 230, 0) 70%) padding-box,
                linear-gradient(180deg, #172c73 0%, #12235f 100%) padding-box, linear-gradient(180deg, #4a63c8 0%, #2d438f 100%) border-box;
  }
  html.look-night body .rail-life-tag { display: flex; align-items: center; gap: 7px; font: 700 16px/1 var(--font-head); color: #f5c542; }
  html.look-night body .rail-life-tag .ic { width: 18px; height: 18px; color: #f5c542; }
  html.look-night body .rail-life-tag .ic .ic-fill { fill: #f5c542; }
  html.look-night body .rail-life-text { display: flex; flex-direction: column; gap: 4px; padding-right: 36px; }
  html.look-night body .rail-life-text small { font: 400 14px/1.2 var(--font-head); color: #cbd5f7; }
  html.look-night body .rail-life-text b { font: 800 19px/1.15 var(--font-head); color: #fff; }
  html.look-night body .rail-life-check { position: absolute; right: 15px; bottom: 18px; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
    background: linear-gradient(180deg, #4ff0ff 0%, #1fd3f0 100%); box-shadow: 0 0 12px rgba(40, 225, 250, 0.5); }
  html.look-night body .rail-life-check svg { width: 17px; height: 17px; fill: none; stroke: #052233; stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; }
  html.look-night body .rail-life:not([hidden]) + .rail-me { margin-top: 20px !important; }

  /* The account chip at the foot of the menu. */
  html.look-night body .rail-user {
    gap: 12px !important; height: 61px; padding: 0 14px 0 13px !important; border-radius: 13px !important;
    border: 1.5px solid transparent;
    background: linear-gradient(90deg, #16306c 0%, #182969 55%, #1a2766 100%) padding-box, linear-gradient(90deg, #1f78a6 0%, #2a3f86 60%, #2b3a80 100%) border-box !important;
    box-shadow: none !important;
  }
  html.look-night body .rail-user .avatar { width: 37px !important; height: 37px !important; font: 700 16px/1 var(--font-head) !important; color: #fff !important;
    background: radial-gradient(circle at 35% 30%, #22d8de 0%, #00b7c6 60%, #0399b4 100%) !important; box-shadow: none !important; }
  html.look-night body .rail-user .avatar.has-pic { background: none !important; }
  html.look-night body .rail-user b { font: 700 15.5px/1.2 var(--font-head) !important; color: #fff !important; }
  html.look-night body .rail-user small { font: 500 14px/1.2 var(--font-head) !important; color: #a9cbff !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}
/* A short window keeps the menu itself on screen: the card loses its ticks first, then goes. */
@media (min-width: 960px) and (max-height: 700px) { html.look-night .rail-up-list { display: none; } html.look-night body .rail-up > b { margin-bottom: 12px; } }
/* Shorter still: the card goes, so the menu and the account chip stay on screen (as before the mockup, css/playful.css). */
@media (min-width: 960px) and (max-height: 600px) { html.look-night body .nt-prem-rail:not([hidden]) { display: none !important; } html.look-night body .nt-prem-rail:not([hidden]) + .rail-life[hidden] + .rail-me { margin-top: auto !important; } html.look-night body .rail-up:not([hidden]) { display: none !important; } html.look-night body .rail-up + .rail-me { margin-top: auto !important; } }

/* ---------- Home ---------- */
@media (min-width: 960px) {
  html.look-night .view:has(> .dk-home) { padding: 16px 26px 24px 40px !important; }
  html.look-night .dk-home { max-width: 1400px; margin: 0 auto; container-type: inline-size; color: #fff; font-family: var(--font-head); }
  html.look-night .dk-home a { color: inherit; text-decoration: none; }
  html.look-night .dk-grid {
    /* Browsers without container units (Safari before 16) size from the window: about 314px goes to the menu and margins.
       Fit to window (owner, 4 Dec 2026): never taller than the window either (the rows need about 680 units, plus the
       40px of page margin), down to 80% at most; a shorter window still scrolls. */
    --u: max(0.8px, min(clamp(0.8px, calc((100vw - 314px) / 1120), 1.12px), calc((100vh - 40px) / 680)));
    display: flex; flex-direction: column; gap: 0;
    min-height: calc(100vh - 40px); min-height: calc(100svh - 40px);
    max-height: calc(1080 * var(--u));
  }
  html.look-night .dk-grid > * { min-height: 0; }
  @supports (width: 1cqi) { html.look-night .dk-grid { --u: max(0.8px, min(clamp(0.8px, calc(100cqi / 1120), 1.12px), calc((100vh - 40px) / 680))); } }
  /* Row heights from the mockup; each may grow by up to about 45% to fill a tall window (an iPad held sideways). */
  html.look-night .dk-hero { flex: 148 1 calc(148 * var(--u)); max-height: calc(214 * var(--u)); }
  html.look-night .dk-row-2 { flex: 136 1 calc(136 * var(--u)); max-height: calc(197 * var(--u)); margin-top: calc(15 * var(--u)); }
  html.look-night .dk-row-3 { flex: 180 1 calc(180 * var(--u)); max-height: calc(261 * var(--u)); margin-top: calc(15 * var(--u)); }
  html.look-night .dk-week { flex: 73 1 calc(73 * var(--u)); max-height: calc(105 * var(--u)); margin-top: calc(11 * var(--u)); }
  html.look-night .dk-tiles { flex: 88 1 calc(88 * var(--u)); max-height: calc(127 * var(--u)); margin-top: calc(11 * var(--u)); }

  html.look-night .dk-card {
    position: relative; box-sizing: border-box; overflow: hidden; isolation: isolate; border-radius: calc(19 * var(--u));
    border: 1.5px solid transparent; color: #fff;
    background: linear-gradient(180deg, #14306f 0%, #112762 100%) padding-box, linear-gradient(180deg, #2c4f96 0%, #1b3170 100%) border-box;
    box-shadow: 0 10px 30px -18px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(150, 190, 255, 0.06);
  }
  html.look-night .dk-ic { display: block; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
  html.look-night .dk-ic .f { fill: currentColor; stroke: none; }
  html.look-night .dk-row { display: grid; min-height: 0; }
  html.look-night .dk-row-2 { grid-template-columns: 692fr 672fr; column-gap: calc(16 * var(--u)); }
  html.look-night .dk-row-3 { grid-template-columns: 679fr 692fr; column-gap: calc(11 * var(--u)); }
  html.look-night .dk-bar { position: relative; display: block; height: calc(10 * var(--u)); border-radius: 99px; background: #3f5c95; overflow: hidden; }
  html.look-night .dk-bar > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #2ff0f6 0%, #53fafb 100%); box-shadow: 0 0 10px rgba(80, 250, 250, 0.45); }

  /* The banner: the latest song */
  html.look-night .dk-hero {
    display: flex; align-items: center; padding: 0 calc(33 * var(--u));
    background: radial-gradient(40% 120% at 100% 100%, rgba(110, 95, 235, 0.75) 0%, rgba(110, 95, 235, 0) 70%) padding-box,
                radial-gradient(45% 140% at 0% 0%, rgba(0, 120, 170, 0.6) 0%, rgba(0, 120, 170, 0) 70%) padding-box,
                linear-gradient(100deg, #005b90 0%, #00508a 35%, #034896 70%, #1a4aa8 100%) padding-box,
                linear-gradient(180deg, #1d8ac6 0%, #0d548f 45%, #3a62c4 100%) border-box;
    box-shadow: 0 16px 40px -22px rgba(0, 0, 0, 0.9), 0 0 24px -8px rgba(20, 140, 220, 0.35);
  }
  html.look-night .dk-hero-text { position: relative; z-index: 2; min-width: 0; max-width: calc(100% - 300 * var(--u)); }
  html.look-night .dk-eyebrow { margin: 0 0 calc(6 * var(--u)); font: 500 calc(14 * var(--u))/1.2 var(--font-head); color: #d6e8ff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  html.look-night .dk-home .dk-title { width: auto; max-width: 100%; margin: 0 0 calc(12 * var(--u)) !important; padding: 0 !important; font: 800 calc(37 * var(--u))/1.08 var(--font-head) !important;
    letter-spacing: -0.012em !important; color: #fff !important; text-shadow: none !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  html.look-night .dk-home .dk-title::after { content: none !important; }
  html.look-night .dk-home .dk-title.is-long { font-size: calc(30 * var(--u)) !important; }
  html.look-night .dk-home .dk-title.is-longer { font-size: calc(25 * var(--u)) !important; }
  html.look-night .dk-chips { display: flex; gap: calc(18 * var(--u)); }
  html.look-night .dk-chip {
    display: inline-flex; align-items: center; gap: calc(11 * var(--u)); height: calc(37 * var(--u)); padding: 0 calc(22 * var(--u)) 0 calc(20 * var(--u)); border-radius: 99px;
    border: 1.5px solid rgba(160, 215, 255, 0.55); background: rgba(0, 45, 100, 0.28); white-space: nowrap;
    font: 500 calc(15 * var(--u))/1 var(--font-head); color: #fff; transition: background-color 120ms ease;
  }
  html.look-night .dk-chip:hover { background: rgba(60, 140, 230, 0.25); }
  html.look-night .dk-chip:first-child .dk-ic { color: #3fe3ff; }
  html.look-night .dk-chip .dk-ic { width: calc(19 * var(--u)); height: calc(19 * var(--u)); stroke-width: 2.2; }
  html.look-night .dk-chip.is-main { border-color: rgba(255, 220, 110, 0.8); background: rgba(255, 210, 80, 0.12); }
  html.look-night .dk-bud { position: absolute; z-index: 1; right: calc(48 * var(--u)); bottom: calc(2 * var(--u)); height: calc(100% - 10 * var(--u)); max-height: calc(176 * var(--u)); width: auto; pointer-events: none; }
  html.look-night .dk-notes { position: absolute; z-index: 1; right: calc(266 * var(--u)); top: calc(44 * var(--u)); width: calc(22 * var(--u)); height: auto; pointer-events: none; }
  html.look-night .dk-singer { position: absolute; z-index: 3; top: calc(16 * var(--u)); right: calc(300 * var(--u)); }

  /* Today's practice */
  html.look-night .dk-today {
    display: flex; align-items: center; padding: calc(4 * var(--u)) calc(24 * var(--u)) 0 calc(85 * var(--u));
    background: radial-gradient(55% 120% at 0% 50%, rgba(80, 45, 200, 0.95) 0%, rgba(80, 45, 200, 0) 75%) padding-box,
                radial-gradient(60% 90% at 55% -10%, rgba(25, 80, 170, 0.9) 0%, rgba(25, 80, 170, 0) 80%) padding-box,
                linear-gradient(90deg, #4530b6 0%, #253f9f 45%, #2650bd 80%, #2c5bd0 100%) padding-box,
                linear-gradient(90deg, #6a46e6 0%, #3a52c8 45%, #3d78d8 100%) border-box;
  }
  html.look-night .dk-today-ic { position: absolute; left: calc(-61 * var(--u)); top: calc(2 * var(--u)); color: #36d9ff; }
  html.look-night .dk-today-ic .dk-ic { width: calc(40 * var(--u)); height: calc(40 * var(--u)); stroke-width: 2; }
  html.look-night .dk-today-text { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
  html.look-night .dk-today-text > b { font: 800 calc(27 * var(--u))/1.1 var(--font-head); letter-spacing: -0.01em; white-space: nowrap; }
  html.look-night .dk-today-text > small { margin-top: calc(4 * var(--u)); font: 400 calc(14.5 * var(--u))/1.3 var(--font-head); color: #d8ddff; white-space: nowrap; }
  html.look-night .dk-yellow {
    display: inline-flex; align-items: center; gap: calc(10 * var(--u)); height: calc(43 * var(--u)); margin-top: calc(14 * var(--u)); padding: 0 calc(26 * var(--u)) 0 calc(34 * var(--u)); border-radius: 99px;
    font: 700 calc(16.5 * var(--u))/1 var(--font-head); color: #15123a; white-space: nowrap;
    background: linear-gradient(180deg, #fee57c 0%, #fdd648 50%, #fbc334 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 8px 20px -8px rgba(253, 200, 60, 0.7);
  }
  html.look-night .dk-yellow small { font: 500 calc(13 * var(--u))/1 var(--font-head); color: #2a2348; }
  html.look-night .dk-yellow .dk-ic { width: calc(20 * var(--u)); height: calc(20 * var(--u)); color: #15123a; }
  html.look-night .dk-today:hover .dk-yellow { filter: brightness(1.04); }
  html.look-night .dk-today-rings { position: absolute; z-index: 0; right: calc(-70 * var(--u)); bottom: calc(-120 * var(--u)); width: calc(330 * var(--u)); height: calc(260 * var(--u)); border-radius: 50%; pointer-events: none;
    background: radial-gradient(closest-side, rgba(120, 90, 240, 0.0) 60%, rgba(150, 120, 255, 0.16) 61%, rgba(150, 120, 255, 0.0) 75%, rgba(160, 130, 255, 0.10) 76%, rgba(160, 130, 255, 0) 92%),
                radial-gradient(closest-side at 60% 60%, rgba(140, 100, 240, 0.35) 0%, rgba(140, 100, 240, 0) 100%); }

  /* The retest / check-up / program card */
  html.look-night .dk-due {
    display: flex; align-items: center; gap: calc(17 * var(--u)); padding: 0 calc(23 * var(--u)) calc(2 * var(--u)) calc(66 * var(--u));
    background: radial-gradient(70% 100% at 50% 0%, rgba(30, 70, 150, 0.6) 0%, rgba(30, 70, 150, 0) 80%) padding-box,
                linear-gradient(180deg, #16377e 0%, #12306f 50%, #112860 100%) padding-box,
                linear-gradient(90deg, #3a3aa6 0%, #283a8e 50%, #2a4a9a 100%) border-box;
  }
  html.look-night .dk-due-ic { position: absolute; left: calc(-44 * var(--u)); top: calc(-2 * var(--u)); color: #8fd6ff; }
  html.look-night .dk-due-ic .dk-ic { width: calc(27 * var(--u)); height: calc(27 * var(--u)); }
  html.look-night .dk-due-text { position: relative; flex: 1; min-width: 0; }
  html.look-night .dk-due-text h2 { margin: 0 0 calc(7 * var(--u)); font: 700 calc(19.5 * var(--u))/1.15 var(--font-head); color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  html.look-night .dk-due-text p { margin: 0; max-width: calc(275 * var(--u)); text-wrap: balance; font: 400 calc(14 * var(--u))/1.4 var(--font-head); color: #ccd5f4; }
  html.look-night .dk-due-foot { display: flex; align-items: center; gap: calc(20 * var(--u)); margin-top: calc(12 * var(--u)); }
  html.look-night .dk-due-foot .dk-bar { flex: 0 1 calc(227 * var(--u)); min-width: calc(80 * var(--u)); }
  html.look-night .dk-due-foot > span:last-child { font: 400 calc(14 * var(--u))/1 var(--font-head); color: #eef2ff; white-space: nowrap; }
  html.look-night .dk-white {
    flex: none; display: inline-flex; align-items: center; justify-content: center; min-width: calc(91 * var(--u)); height: calc(41 * var(--u)); padding: 0 calc(18 * var(--u)); border: 0; border-radius: 99px; cursor: pointer;
    font: 700 calc(16 * var(--u))/1 var(--font-head); color: #121845 !important; white-space: nowrap;
    background: linear-gradient(180deg, #f3f6ff 0%, #dfe6fb 100%); box-shadow: 0 6px 16px -8px rgba(0, 0, 0, 0.6), inset 0 1px 0 #fff;
  }
  html.look-night .dk-white:hover { background: #fff; }

  /* Your vocal range */
  html.look-night .dk-head { display: flex; align-items: center; gap: calc(13 * var(--u)); font: 600 calc(17 * var(--u))/1 var(--font-head); color: #fff; white-space: nowrap; }
  html.look-night .dk-head > .dk-ic { width: calc(23 * var(--u)); height: calc(23 * var(--u)); color: #6fd0ff; }
  html.look-night .dk-range { display: flex; flex-direction: column; padding: calc(16 * var(--u)) calc(30 * var(--u)) 0 calc(20 * var(--u));
    background: radial-gradient(60% 80% at 60% 0%, rgba(20, 60, 130, 0.55) 0%, rgba(20, 60, 130, 0) 80%) padding-box, linear-gradient(180deg, #132e6a 0%, #152a64 100%) padding-box,
                linear-gradient(180deg, #2a4a98 0%, #1a2f77 100%) border-box; }
  html.look-night .dk-range-mid { display: flex; align-items: center; gap: calc(24 * var(--u)); margin: auto 0 auto calc(14 * var(--u)); padding-top: calc(4 * var(--u)); }
  html.look-night .dk-range-notes { font: 800 calc(42 * var(--u))/1 var(--font-head); letter-spacing: -0.005em; white-space: nowrap;
    background: linear-gradient(180deg, #7af6ff 0%, #2fe1f4 60%, #1fd0ee 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
  html.look-night .dk-keys { flex: 0 1 calc(254 * var(--u)); width: calc(254 * var(--u)); min-width: 0; height: calc(47 * var(--u)); margin-left: auto; margin-right: calc(15 * var(--u)); }
  html.look-night .dk-keys .st-kw { fill: #f3f5fb; stroke: none; }
  html.look-night .dk-keys .st-kw.on { fill: #1ff4f7; }
  html.look-night .dk-keys .st-kb { fill: #151a33; stroke: none; }
  html.look-night .dk-keys .st-kb.on { fill: #0fb3c6; }
  html.look-night .dk-range-boxes { display: grid; grid-template-columns: 304fr 279fr; gap: calc(15 * var(--u)); margin: 0 0 calc(18 * var(--u)) calc(12 * var(--u)); }
  html.look-night .dk-box { display: flex; align-items: center; gap: calc(11 * var(--u)); min-width: 0; height: calc(51 * var(--u)); padding: 0 calc(12 * var(--u)) 0 calc(13 * var(--u)); border-radius: calc(10 * var(--u));
    border: 1px solid rgba(80, 130, 200, 0.35); background: linear-gradient(180deg, rgba(25, 62, 110, 0.75) 0%, rgba(20, 50, 100, 0.65) 100%); }
  html.look-night .dk-box > span { display: flex; flex-direction: column; gap: calc(5 * var(--u)); min-width: 0; }
  html.look-night .dk-box b { font: 700 calc(14 * var(--u))/1.1 var(--font-head); white-space: nowrap; }
  html.look-night .dk-box small { font: 400 calc(12.5 * var(--u))/1.1 var(--font-head); color: #c8d2f2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  html.look-night .dk-ic-check { width: calc(22 * var(--u)); height: calc(22 * var(--u)); color: #36cf75; }
  html.look-night .dk-ic-check .k { stroke: #fff; stroke-width: 2.4; fill: none; }
  html.look-night .dk-ic-pink { width: calc(22 * var(--u)); height: calc(22 * var(--u)); color: #ff4fa3; stroke-width: 2.2; }
  html.look-night .dk-range.is-empty { padding-bottom: calc(16 * var(--u)); }
  html.look-night .dk-empty-text { display: flex; flex-direction: column; align-items: flex-start; gap: calc(14 * var(--u)); min-width: 0; max-width: calc(270 * var(--u)); }
  html.look-night .dk-empty { font: 400 calc(14.5 * var(--u))/1.4 var(--font-head); color: #ccd5f4; text-wrap: balance; }
  html.look-night .dk-keys.is-dim { opacity: 0.35; }

  /* Song ideas for your voice */
  html.look-night .dk-ideas { display: flex; flex-direction: column; padding: calc(15 * var(--u)) calc(34 * var(--u)) calc(8 * var(--u)) calc(27 * var(--u));
    background: radial-gradient(60% 80% at 40% 0%, rgba(20, 60, 130, 0.5) 0%, rgba(20, 60, 130, 0) 80%) padding-box, linear-gradient(180deg, #122c66 0%, #0e2658 100%) padding-box,
                linear-gradient(180deg, #2e5299 0%, #1e3b7a 100%) border-box; }
  html.look-night .dk-ideas .dk-head { padding-right: calc(4 * var(--u)); }
  html.look-night .dk-all { display: inline-flex; align-items: center; gap: calc(4 * var(--u)); margin-left: auto; font: 600 calc(13.5 * var(--u))/1 var(--font-head); color: #4fd6ec !important; }
  html.look-night .dk-all .dk-ic { width: calc(15 * var(--u)); height: calc(15 * var(--u)); stroke-width: 2.4; }
  html.look-night .dk-idea-list { flex: 1; display: grid; grid-auto-rows: 1fr; margin: calc(6 * var(--u)) 0 0 calc(5 * var(--u)); padding: 0; list-style: none; }
  html.look-night .dk-idea-list li + li { border-top: 1px solid rgba(120, 155, 225, 0.22); }
  html.look-night .dk-idea { display: flex; align-items: center; gap: calc(16 * var(--u)); height: 100%; min-height: calc(42 * var(--u)); }
  html.look-night .dk-av { flex: none; width: calc(37 * var(--u)); height: calc(37 * var(--u)); border-radius: 50%; overflow: hidden; background: #2a3c7a; display: grid; place-items: center;
    font: 700 calc(13 * var(--u))/1 var(--font-head); color: #fff; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12); }
  html.look-night .dk-av img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.35); }
  html.look-night .dk-idea-text { display: flex; flex-direction: column; gap: calc(3 * var(--u)); min-width: 0; }
  html.look-night .dk-idea-text b { font: 600 calc(14 * var(--u))/1.15 var(--font-head); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  html.look-night .dk-idea-text small { font: 400 calc(12 * var(--u))/1.15 var(--font-head); color: #b6c2ea; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  html.look-night .dk-play { flex: none; display: grid; place-items: center; width: calc(29 * var(--u)); height: calc(29 * var(--u)); margin-left: auto; border-radius: 50%;
    border: 1.5px solid rgba(235, 240, 255, 0.85); background: rgba(255, 255, 255, 0.1); transition: background-color 120ms ease; }
  html.look-night .dk-play .dk-ic { width: calc(15 * var(--u)); height: calc(15 * var(--u)); color: #fff; margin-left: calc(1.5 * var(--u)); }
  html.look-night .dk-idea:hover .dk-play { background: rgba(255, 255, 255, 0.24); }

  /* This week's practice */
  html.look-night .dk-week { display: grid; grid-template-columns: auto auto minmax(0, 1fr) calc(198 * var(--u)); align-items: center; column-gap: calc(18 * var(--u)); padding: 0 calc(42 * var(--u)) 0 calc(27 * var(--u));
    background: radial-gradient(50% 120% at 50% 0%, rgba(25, 65, 140, 0.45) 0%, rgba(25, 65, 140, 0) 80%) padding-box, linear-gradient(180deg, #112c66 0%, #10285f 100%) padding-box,
                linear-gradient(180deg, #24508e 0%, #163470 100%) border-box; }
  html.look-night .dk-week > .dk-ic { width: calc(29 * var(--u)); height: calc(29 * var(--u)); color: #5fd8ff; }
  html.look-night .dk-week-text { display: flex; flex-direction: column; gap: calc(6 * var(--u)); min-width: 0; }
  html.look-night .dk-week-text b { font: 700 calc(19.5 * var(--u))/1.1 var(--font-head); white-space: nowrap; }
  html.look-night .dk-week-text small { font: 400 calc(13 * var(--u))/1.1 var(--font-head); color: #c4cdef; white-space: nowrap; }
  html.look-night .dk-days { display: flex; justify-content: center; gap: calc(26 * var(--u)); margin: 0; padding: 0; list-style: none; }
  html.look-night .dk-days li { display: flex; flex-direction: column; align-items: center; gap: calc(6 * var(--u)); width: calc(26 * var(--u)); }
  html.look-night .dk-days i { display: grid; place-items: center; box-sizing: border-box; width: calc(26 * var(--u)); height: calc(26 * var(--u)); border-radius: 50%; background: #203c73; border: 1.5px solid #3f5b93; }
  html.look-night .dk-days li.on i { background: #3ac77a; border-color: #3ac77a; box-shadow: 0 0 10px rgba(60, 210, 130, 0.35); }
  html.look-night .dk-days li.on svg { width: 70%; height: 70%; fill: none; stroke: #0d2a2a; stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; }
  html.look-night .dk-days li.now i { width: calc(29 * var(--u)); height: calc(29 * var(--u)); margin: calc(-1.5 * var(--u)) 0; background: #0a3f78; border: calc(2.6 * var(--u)) solid #27e3f5; box-shadow: 0 0 12px rgba(40, 225, 245, 0.55); }
  html.look-night .dk-days span { font: 700 calc(10.5 * var(--u))/1 var(--font-head); color: #e6ecff; text-transform: uppercase; }
  html.look-night .dk-week-count { display: flex; flex-direction: column; gap: calc(10 * var(--u)); }
  html.look-night .dk-week-count > span:first-child { font: 400 calc(17 * var(--u))/1 var(--font-head); color: #e3e8ff; white-space: nowrap; }

  /* Streak, level, main goal, next check-up */
  html.look-night .dk-tiles { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); column-gap: calc(11 * var(--u)); margin-bottom: 0; padding: 0; list-style: none; }
  html.look-night .dk-tiles > li { display: block; min-width: 0; }
  html.look-night .dk-tiles[data-n="2"] { --n: 2; }
  html.look-night .dk-tiles[data-n="3"] { --n: 3; }
  /* One bright button (owner, 4 Dec 2026): before the first song, "Pick a song" is the yellow one and Today's button
     is white; a countdown card (nothing due) has no button and its words take the room. */
  html.look-night .dk-home.is-pick .dk-chip.is-main {
    border-color: transparent; color: #15123a; font-weight: 700;
    background: linear-gradient(180deg, #fee57c 0%, #fdd648 50%, #fbc334 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 8px 20px -8px rgba(253, 200, 60, 0.7);
  }
  html.look-night .dk-home.is-pick .dk-chip.is-main .dk-ic { color: #15123a; }
  html.look-night .dk-home.is-pick .dk-yellow { background: linear-gradient(180deg, #f3f6ff 0%, #dfe6fb 100%); color: #121845; box-shadow: 0 6px 16px -8px rgba(0, 0, 0, 0.6), inset 0 1px 0 #fff; }
  html.look-night .dk-home.is-pick .dk-yellow small { color: #3a4170; }
  html.look-night .dk-due.is-later .dk-due-text p { max-width: calc(380 * var(--u)); }
  html.look-night .dk-due.is-later .dk-due-foot .dk-bar { flex-basis: calc(260 * var(--u)); }
  html.look-night .dk-tile { display: flex; align-items: center; height: 100%; gap: calc(20 * var(--u)); padding: 0 calc(16 * var(--u)) 0 calc(28 * var(--u));
    background: radial-gradient(60% 90% at 20% 50%, rgba(30, 75, 160, 0.45) 0%, rgba(30, 75, 160, 0) 80%) padding-box, linear-gradient(180deg, #132f6d 0%, #0f275f 100%) padding-box,
                linear-gradient(180deg, #2d55a0 0%, #1b3575 100%) border-box; }
  html.look-night .dk-tile > span { display: flex; flex-direction: column; gap: calc(4 * var(--u)); min-width: 0; }
  html.look-night .dk-tile b { font: 700 calc(19.5 * var(--u))/1.12 var(--font-head); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  html.look-night .dk-tile small { font: 400 calc(14 * var(--u))/1.15 var(--font-head); color: #ccd5f4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  html.look-night .dk-tile small.dk-tile-label { font-size: calc(13 * var(--u)); color: #c4cdef; }
  html.look-night .dk-tile-streak { padding-left: calc(30 * var(--u)); gap: calc(26 * var(--u));
    background: radial-gradient(45% 100% at 12% 55%, rgba(255, 140, 40, 0.28) 0%, rgba(255, 140, 40, 0) 80%) padding-box,
                linear-gradient(100deg, #45354c 0%, #3b3557 50%, #36325a 100%) padding-box,
                linear-gradient(100deg, #6a4a55 0%, #4a4470 100%) border-box; }
  html.look-night .dk-tile-streak b { font-size: calc(21 * var(--u)); font-weight: 800; }
  html.look-night .dk-ic-flame { width: calc(42 * var(--u)); height: calc(46 * var(--u)); filter: drop-shadow(0 0 8px rgba(255, 150, 40, 0.65)); }
  html.look-night .dk-tile-level > .dk-ic { width: calc(34 * var(--u)); height: calc(34 * var(--u)); color: #3debfd; stroke-width: 2; }
  html.look-night .dk-tile-goal { padding-left: calc(30 * var(--u));
    background: radial-gradient(45% 100% at 10% 50%, rgba(140, 70, 230, 0.35) 0%, rgba(140, 70, 230, 0) 80%) padding-box, linear-gradient(180deg, #172f72 0%, #13286a 100%) padding-box,
                linear-gradient(180deg, #3a4ea8 0%, #23377d 100%) border-box; }
  html.look-night .dk-tile-goal > .dk-ic { width: calc(38 * var(--u)); height: calc(38 * var(--u)); color: #c06bff; stroke-width: 2.3; filter: drop-shadow(0 0 6px rgba(190, 110, 255, 0.6)); }
  html.look-night .dk-tile-goal b { font-size: calc(18.5 * var(--u)); }
  /* A long goal name (other languages) takes two smaller lines rather than an ellipsis. */
  html.look-night .dk-tile b.is-long { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; white-space: normal; font-size: calc(15.5 * var(--u)); line-height: 1.12; }
  html.look-night .dk-tile-check > .dk-ic { width: calc(38 * var(--u)); height: calc(38 * var(--u)); color: #5fb8ff; stroke-width: 2; filter: drop-shadow(0 0 6px rgba(90, 170, 255, 0.6)); }
  html.look-night .dk-tile-check b { font-weight: 800; }
  html.look-night .dk-tile-check > span, html.look-night .dk-tile-goal > span { gap: calc(3 * var(--u)); }
  html.look-night a.dk-card { transition: transform 120ms ease, box-shadow 120ms ease; }
  html.look-night a.dk-card:hover { transform: translateY(-1px); box-shadow: 0 14px 30px -16px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(120, 180, 255, 0.18); }
  html.look-night .dk-home :focus-visible { outline: 2px solid #7fe8ff; outline-offset: 2px; }
  /* The title takes focus when the page opens (for screen readers); Safari would ring it as if tabbed to. */
  html.look-night .dk-home .dk-title:focus, html.look-night .dk-home .dk-title:focus-visible { outline: none; }

  /* A narrow laptop window (or a tablet): the paired cards stack, the tiles go two by two. */
  @container (max-width: 860px) {
    html.look-night .dk-grid { --u: 0.86px; max-height: none; min-height: 0; }
    html.look-night .dk-grid > * { flex: none !important; max-height: none !important; }
    html.look-night .dk-hero { height: calc(150 * var(--u)); }
    html.look-night .dk-row-2, html.look-night .dk-row-3 { grid-template-columns: 1fr; row-gap: calc(15 * var(--u)); }
    html.look-night .dk-row-2 > * { height: calc(140 * var(--u)); }
    html.look-night .dk-row-3 > * { height: calc(190 * var(--u)); }
    html.look-night .dk-week { grid-template-columns: auto minmax(0, 1fr) calc(170 * var(--u)); row-gap: calc(12 * var(--u)); padding: calc(16 * var(--u)) calc(26 * var(--u)); }
    html.look-night .dk-days { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; padding-left: calc(48 * var(--u)); }
    html.look-night .dk-tiles { row-gap: calc(11 * var(--u)); }
    html.look-night .dk-tile { height: calc(88 * var(--u)); }
  }
}
@media (min-width: 960px) and (prefers-reduced-motion: reduce) { html.look-night body .nt-prem-rail { transition: none; } html.look-night a.dk-card { transition: none; } html.look-night a.dk-card:hover { transform: none; } }
