/* Trial look "Night" for Home (#/home), phones: matched to the owner's mockup (16 Nov 2026) the way the Songs tab
   was (css/look-night.css): the mockup's own top as a picture, words erased, the rest placed to its pixels at 375px.
   Only with html.look-night (#/songs?look=night). */

/* One "mockup pixel" is a 375th of the screen width, so the whole screen scales exactly on a 360px phone.
   The card backgrounds are the mockup's own (media/home-*.jpg, words erased): gradients, glows, waves, the
   pictures in them (calendar, play button, tile icons, crown, chevrons). The words and the keyboard are ours. */
html.look-night { --u: calc(100vw / 375); }
@media (max-width: 759px) {
  html.look-night body:has(.nt-home) .app-main {
    background: linear-gradient(180deg, #072a50 calc(190 * var(--u)), #0b1838 calc(325 * var(--u)), #0b152f calc(438 * var(--u)), #091226 calc(578 * var(--u)), #0a1022 calc(650 * var(--u)), #0a1022 100%) !important;
  }
  html.look-night body:has(.nt-home) .app-main::before { display: none !important; }
  html.look-night .nt-home .st-home { display: block !important; padding: 0 !important; gap: 0 !important; }
  html.look-night .nt-home a { text-decoration: none; }
  html.look-night .nt-home .ic { display: block; }

  /* Hero: the mockup's top (Bud with the microphone, notes, waves, the yellow button); our words on it. */
  html.look-night .nt-hero {
    position: relative; box-sizing: border-box; height: calc(193.9 * var(--u) + var(--safe-t, 0px));
    margin: calc(-14px - var(--safe-t, 0px)) calc(-1 * var(--gutter)) 0; padding: 0;
    background: url("../media/home-hero.jpg") 0 var(--safe-t, 0px) / 100% auto no-repeat, #091734;
  }
  html.look-night .nt-greet {
    position: absolute; left: calc(21.3 * var(--u)); top: calc(18.4 * var(--u) + var(--safe-t, 0px)); margin: 0;
    font: 600 calc(14.04 * var(--u))/calc(20 * var(--u)) var(--font-head); letter-spacing: 0; color: #a6f0ff; white-space: nowrap;
  }
  html.look-night .nt-wave { position: relative; top: calc(1.3 * var(--u)); font-size: calc(18.2 * var(--u)); margin-left: calc(-1 * var(--u)); }
  html.look-night .nt-home .nt-title {
    position: absolute; left: calc(21.6 * var(--u)); top: calc(44.6 * var(--u) + var(--safe-t, 0px)); width: calc(200 * var(--u)); margin: 0 !important; padding: 0 !important;
    font: 700 calc(29.7 * var(--u))/calc(28.4 * var(--u)) var(--font-head) !important; letter-spacing: 0; color: #fff !important; text-align: left;
  }
  html.look-night .nt-home .nt-title::first-line { font-size: calc(27.92 * var(--u)); }
  /* The brush stroke under "sing today", with the little drop the mockup has. */
  html.look-night .nt-home .nt-title::after {
    content: ''; position: absolute; left: calc(11.6 * var(--u)); top: calc(51.1 * var(--u)); width: calc(127.4 * var(--u)); height: calc(24 * var(--u)); pointer-events: none;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 24'%3E%3Cdefs%3E%3ClinearGradient id='u' x1='0' x2='1'%3E%3Cstop offset='0' stop-color='%2328d2e8'/%3E%3Cstop offset='.6' stop-color='%2333d8ec'/%3E%3Cstop offset='.9' stop-color='%2333d4ec'/%3E%3Cstop offset='1' stop-color='%2330c6e4' stop-opacity='.55'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M5.4 18.3 Q44 8.6 114.8 5.4 L115 7.5 Q46 10.9 6.2 21.6 A1.65 1.65 0 0 1 5.4 18.3 Z' fill='url(%23u)'/%3E%3Cpath d='M60.2 2.6 C62.6 2.6 63.3 5.2 61.6 7.4 L60.4 8.9 L59 7.4 C57.2 5.2 57.9 2.6 60.2 2.6 Z' fill='%2333d6ea'/%3E%3C/svg%3E") no-repeat 0 0 / 100% 100%;
  }
  html.look-night .nt-pick {
    position: absolute; left: calc(19.8 * var(--u)); top: calc(131.3 * var(--u) + var(--safe-t, 0px)); width: calc(335.1 * var(--u)); height: calc(54.7 * var(--u));
    display: flex; align-items: center; justify-content: center; border-radius: 999px; color: #1b1c2b;
    font: 700 calc(21.09 * var(--u))/1 var(--font-head); padding: 0 0 calc(4.7 * var(--u)) calc(15.2 * var(--u)); box-sizing: border-box;
  }
  html.look-night .nt-hero .nt-pick { position: absolute; }
  /* The note and arrow are painted on the button picture, about 110px apart: room for "Pick a song" only. Other
     languages ("Song aussuchen", "Choisir une chanson") ran into them, so there the words get a little smaller and wrap
     between the two. English keeps the mockup exactly. */
  html.look-night:not([lang="en"]) .nt-pick:not(.cm-pick) > span { max-width: calc(116 * var(--u)); font-size: calc(16.5 * var(--u)); line-height: 1.12; text-align: center; }
  html.look-night .nt-pick .ic { display: none; }
  html.look-night .nt-pick:active { transform: scale(0.99); }

  /* The cards, each on its own mockup picture. */
  html.look-night .nt-today, html.look-night .nt-range, html.look-night .nt-up {
    position: relative; display: block; box-sizing: border-box; margin-left: calc(11 * var(--u) - var(--gutter)); width: calc(353.4 * var(--u));
    background-size: 100% 100% !important; background-repeat: no-repeat !important; color: #fff;
  }
  html.look-night .nt-today { margin-top: calc(4.4 * var(--u)); height: calc(119.4 * var(--u)); border-radius: calc(24 * var(--u)); background-image: url("../media/home-today.jpg"); }
  html.look-night .nt-today-ic, html.look-night .nt-play { display: none; }
  html.look-night .nt-today-title { position: absolute; left: calc(61.4 * var(--u)); top: calc(13.3 * var(--u)); font: 700 calc(18.76 * var(--u))/calc(24 * var(--u)) var(--font-head); color: #fff; white-space: nowrap; }
  html.look-night .nt-chip { position: absolute; left: calc(296.6 * var(--u)); top: calc(18.8 * var(--u)); display: block; font: 600 calc(11.57 * var(--u))/calc(16 * var(--u)) var(--font-head); color: #fff; }
  html.look-night .nt-chip .ic { display: none; }
  html.look-night .nt-today-body { position: absolute; left: calc(80.8 * var(--u)); top: calc(46.8 * var(--u)); width: calc(140 * var(--u)); font: 500 calc(13.05 * var(--u))/calc(17.4 * var(--u)) var(--font-head); color: #dfe5ff; }
  html.look-night .nt-start { position: absolute; left: calc(248.6 * var(--u)); top: calc(54.6 * var(--u)); width: calc(88.5 * var(--u)); height: calc(38.4 * var(--u)); display: flex; align-items: center; justify-content: center; gap: calc(2.5 * var(--u)); padding-left: calc(8 * var(--u)); box-sizing: border-box;
    font: 700 calc(17 * var(--u))/1 var(--font-head); color: #11173a; }
  html.look-night .nt-start .ic { width: calc(14 * var(--u)); height: calc(14 * var(--u)); color: #11173a; stroke-width: 3; }

  html.look-night .nt-tiles { position: relative; height: calc(101.8 * var(--u)); margin: calc(11.9 * var(--u)) calc(-1 * var(--gutter)) 0; }
  html.look-night .nt-tile { position: absolute; top: 0; height: 100%; box-sizing: border-box; border-radius: calc(17 * var(--u)); background-size: 100% 100%; color: #fff; }
  html.look-night .nt-tile-goal { left: calc(12.8 * var(--u)); width: calc(115.5 * var(--u)); background-image: url("../media/home-goal.jpg"); }
  html.look-night .nt-tile-progress { left: calc(140.1 * var(--u)); width: calc(105.3 * var(--u)); background-image: url("../media/home-progress.jpg"); }
  html.look-night .nt-tile-plan { left: calc(256.9 * var(--u)); width: calc(105.8 * var(--u)); background-image: url("../media/home-plan.jpg"); }
  html.look-night .nt-tile-ic, html.look-night .nt-tile-sub .ic { display: none !important; }
  html.look-night .nt-tile b { position: absolute; left: calc(17.6 * var(--u)); top: calc(38.6 * var(--u)); font: 700 calc(13.4 * var(--u))/calc(20 * var(--u)) var(--font-head); white-space: nowrap; }
  html.look-night .nt-tile-progress b { left: calc(16.4 * var(--u)); }
  html.look-night .nt-tile-plan b { left: calc(14.2 * var(--u)); }
  html.look-night .nt-tile-sub { position: absolute; left: calc(17.6 * var(--u)); top: calc(60.2 * var(--u)); width: calc(78 * var(--u)); font: 500 calc(10.93 * var(--u))/calc(14.6 * var(--u)) var(--font-head); color: #d6e0ff; }
  /* Room for two lines on the tile picture: a longer goal (picked in Profile, or in another language) ends with "…"
     instead of running off the bottom. */
  html.look-night .nt-tile-sub { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
  html.look-night .nt-tile-progress .nt-tile-sub { left: calc(16.4 * var(--u)); width: calc(72 * var(--u)); font-size: calc(10.9 * var(--u)); }
  html.look-night .nt-tile-plan .nt-tile-sub { top: calc(59.7 * var(--u)); left: calc(14.2 * var(--u)); width: calc(82 * var(--u)); font-size: calc(10.2 * var(--u)); }

  html.look-night .nt-range { margin-top: calc(11.9 * var(--u)); height: calc(130 * var(--u)); border-radius: calc(24 * var(--u)); background-image: url("../media/home-range.jpg"); }
  html.look-night .nt-range-mic, html.look-night .nt-range-info { display: none; }
  html.look-night .nt-range-label { position: absolute; left: calc(51 * var(--u)); top: calc(14.2 * var(--u)); font: 600 calc(10.4 * var(--u))/calc(12 * var(--u)) var(--font-head); letter-spacing: calc(1.35 * var(--u)); text-transform: uppercase; color: #a9b5f2; }
  html.look-night .nt-range-notes { position: absolute; left: calc(25.8 * var(--u)); top: calc(36.4 * var(--u)); font: 800 calc(23.56 * var(--u))/1 var(--font-head); color: #fff; }
  html.look-night .nt-keys { position: absolute; left: calc(37.5 * var(--u)); top: calc(73.7 * var(--u)); width: calc(277.7 * var(--u)); height: calc(42.2 * var(--u)); overflow: visible; }
  html.look-night .nt-keys .st-kw { fill: #eef1fb; }
  html.look-night .nt-keys .st-kw.on { fill: #22eef2; stroke: #22eef2; }
  html.look-night .nt-keys .st-kb { fill: #0b0f22; }
  html.look-night .nt-keys .st-kb.on { fill: #14a3ab; stroke: #14a3ab; }

  html.look-night .nt-up { margin-top: calc(10.6 * var(--u)); height: calc(60.8 * var(--u)); border-radius: calc(24 * var(--u)); background-image: url("../media/home-unlock.jpg"); }
  html.look-night .nt-up-crown, html.look-night .nt-up-line, html.look-night .nt-up > .ic { display: none; }
  html.look-night .nt-up-text b { position: absolute; left: calc(72.6 * var(--u)); top: calc(7.7 * var(--u)); font: 700 calc(17.4 * var(--u))/calc(24 * var(--u)) var(--font-head); white-space: nowrap; }
  html.look-night .nt-up-text small { position: absolute; left: calc(72.2 * var(--u)); top: calc(33.3 * var(--u)); font: 500 calc(13.45 * var(--u))/calc(17 * var(--u)) var(--font-head); color: #e6e9ff; white-space: nowrap; }

  /* The rest of Home, under the mockup's part, in the same night colours. */
  html.look-night .nt-more { margin-top: calc(16 * var(--u)); display: grid; gap: 14px; }
  html.look-night .nt-more .st-card, html.look-night .nt-more .hcard, html.look-night .nt-more .stat-grid > li {
    background: linear-gradient(160deg, rgba(40, 58, 150, 0.55), rgba(22, 36, 90, 0.6)) !important; color: #fff !important;
    border: 1px solid rgba(110, 124, 230, 0.4) !important; box-shadow: none !important;
  }
  html.look-night .nt-more .stat-grid > li { background: none !important; border: 0 !important; }
  html.look-night .nt-more .stat-tile {
    background: linear-gradient(160deg, rgba(40, 58, 150, 0.55), rgba(22, 36, 90, 0.6)) !important; border: 1px solid rgba(110, 124, 230, 0.4) !important; box-shadow: none !important;
  }
  html.look-night .nt-more .stat-icon, html.look-night .nt-more .stat-label { color: #8fe9ff !important; }
  html.look-night .nt-more .stat-icon { background: rgba(63, 216, 255, 0.14) !important; box-shadow: none !important; }
  html.look-night .nt-more :is(p, small, span, li) { color: #c6d0f5; }
  html.look-night .nt-more :is(b, h2, h3, strong) { color: #fff !important; }
}

/* The upgrade card, remade (16 Nov 2026, owner: "make the upgrade at the bottom better"): no longer the mockup's
   picture, which read flat and muddy with nothing to press. Deep indigo with a gold rim, the crown in a lit gold disc,
   a crisp title, the price line, and a gold "Upgrade" pill to tap. One soft light sweep after Home opens, not a loop:
   Home is seen every day. */
@media (max-width: 759px) {
  html.look-night .nt-up {
    display: flex !important; align-items: center; gap: calc(12 * var(--u)); height: auto !important; min-height: calc(60 * var(--u));
    padding: calc(8 * var(--u)) calc(10 * var(--u)) calc(8 * var(--u)) calc(11 * var(--u)); overflow: hidden; text-decoration: none;
    border: 1.5px solid transparent; border-radius: calc(24 * var(--u));
    background: radial-gradient(120% 140% at 0% 0%, rgba(253, 220, 82, 0.22) 0%, rgba(253, 220, 82, 0) 55%) padding-box,
                linear-gradient(115deg, #2a2160 0%, #1a2462 50%, #101a4a 100%) padding-box,
                linear-gradient(120deg, #fff1a0 0%, #f5c044 35%, #8a5a1a 65%, #f5c044 100%) border-box !important;
    background-size: auto !important;
    box-shadow: 0 10px 28px -14px rgba(253, 200, 70, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  }
  html.look-night .nt-up-crown {
    display: grid !important; place-items: center; flex: none; width: calc(40 * var(--u)); height: calc(40 * var(--u)); border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #fff6c4 0%, #ffd95a 45%, #e39a2b 100%);
    box-shadow: 0 0 0 2px rgba(255, 241, 160, 0.35), 0 0 18px rgba(253, 200, 70, 0.55);
  }
  html.look-night .nt-up-crown .ic { width: calc(21 * var(--u)); height: calc(21 * var(--u)); color: #4a2a05; }
  html.look-night .nt-up-crown .ic .ic-fill { fill: #4a2a05; }
  html.look-night .nt-up-line { display: none; }
  html.look-night .nt-up-text { display: grid; gap: calc(2 * var(--u)); flex: 1; min-width: 0; }
  html.look-night .nt-up-text b, html.look-night .nt-up-text small { position: static !important; white-space: normal !important; }
  html.look-night .nt-up-text b { font: 800 calc(16.4 * var(--u))/1.15 var(--font-head) !important; color: #fff; }
  html.look-night .nt-up-text small { font: 500 calc(13 * var(--u))/1.3 var(--font-head) !important; color: #f3dfa0 !important; }
  html.look-night .nt-up > .ic { display: none; }
  html.look-night .nt-up-cta {
    display: inline-flex; align-items: center; gap: calc(2 * var(--u)); flex: none; height: calc(34 * var(--u)); padding: 0 calc(9 * var(--u)) 0 calc(13 * var(--u)); border-radius: 999px;
    font: 800 calc(14 * var(--u))/1 var(--font-head); color: #2a1a02;
    background: linear-gradient(180deg, #fff3a0 0%, #ffe46a 35%, #f5c044 100%); box-shadow: 0 2px 0 rgba(150, 95, 10, 0.6), 0 6px 16px -6px rgba(253, 200, 70, 0.7);
  }
  html.look-night .nt-up-cta .ic { width: calc(16 * var(--u)); height: calc(16 * var(--u)); color: #2a1a02; }
  html.look-night .nt-up:active { transform: scale(0.985); }
  html.look-night .nt-up-shine { position: absolute; top: -30%; bottom: -30%; left: 0; width: 30%; pointer-events: none;
    background: linear-gradient(90deg, rgba(255, 246, 196, 0) 0%, rgba(255, 246, 196, 0.28) 50%, rgba(255, 246, 196, 0) 100%);
    transform: translateX(-140%) skewX(-18deg); animation: nt-up-shine 1100ms cubic-bezier(0.77, 0, 0.175, 1) 900ms forwards; }
  @keyframes nt-up-shine { to { transform: translateX(460%) skewX(-18deg); } }
}
@media (max-width: 759px) and (prefers-reduced-motion: reduce) { html.look-night .nt-up-shine { display: none; } }
html.look-night .nt-up { transition: transform 140ms cubic-bezier(0.23, 1, 0.32, 1); }

/* "Or pick another song" under the song button (26 Nov 2026): a quiet link, so the song stays the one big thing. */
html.look-night .nt-home .nt-other { display: flex; align-items: center; justify-content: center; gap: 4px; margin: -4px auto 2px; padding: 6px 12px;
  color: #9fe7ef; font-weight: 700; font-size: 15px; text-decoration: underline; text-underline-offset: 4px; }
html.look-night .nt-home .nt-other .ic { width: 16px; height: 16px; }
