/* Trial look "Night", shared base for every screen (16 Nov 2026). The owner's four mockups (Songs, Home, Practice
   library, Your path; matched in look-night.css and look-night-home|practice|path.css) set the language: navy page,
   a teal-to-blue band with Bud at the top, indigo cards with a lit rim, one yellow main button, white second
   buttons, cyan accents, lavender small text. Screens without a mockup take it from here, then their own file
   (look-night-<screen>.css) for what's left.
   The Night look is dark only: js/theme.js makes the theme dark while it's on, so the dark theme's coverage of every
   screen is the starting point and its colours are re-pointed to the night palette below. Loads before the
   matched screens' files, which win where they say something. */

html.look-night[data-theme="dark"] {
  --nb-page: #09132b; --nb-page-2: #081228; --nb-card: #16316e; --nb-card-2: #1b3372; --nb-card-3: #1a2964;
  --nb-deep: #112351; --nb-rim: #3b4c94; --nb-rim-lit: #5868b9; --nb-glow: rgba(53, 121, 219, 0.55);
  --nb-ink: #ffffff; --nb-soft: #bacdfb; --nb-cyan: #22eef2; --nb-cyan-2: #3fd8ff; --nb-yellow: #fddc52; --nb-navy-ink: #0b1433;

  /* The dark theme's own tokens, re-pointed. */
  --d-panel: #132a63; --d-raised: #183372; --d-ink: #ffffff; --d-soft: #bacdfb; --d-edge: #3b4c94; --d-accent: #22eef2;
  --ink: #ffffff; --ink-soft: #bacdfb; --panel: #132a63; --line: #2c3b74; --line-strong: #3b4c94; --dash: #46536f;
  --mint: #09132b; --mint-brand: #09132b; --bg-2: #0c1838; --cream: #071126; --cream-deep: #16316e;
  --teal-wash: #16316e; --teal-text: #3fe6f5; --good-text: #3fe6f5; --blush: #1b2a66; --sun: #1b2a66; --sun-deep: #24356f;
  --wave: #0c1838; --wave-2: #0a1532; --yellow: #24356f; --belly: #24356f; --track: #24356f;
  --wl-wash: #16316e; --wl-sunwash: #16316e; --wl-blush: #1b2a66; --wl-good: #16316e;
  --pl-wash: #16316e; --pl-sunwash: #16316e; --pl-blush: #1b2a66; --pl-lilac: #1b2a66;
  --sh-card: 0 0 0 1.5px #2e3d7c; --sh-raise: 0 0 0 1.5px #3b4c94, 0 10px 24px -14px rgba(53, 121, 219, 0.7);
  --sh-solid: none; --sh-press: 0 0 0 1.5px #2e3d7c;
  /* The light theme's teal fills (progress segments, skill bars) become the night cyan. */
  --teal: #22eef2; --teal-dark: #22eef2; --teal-deeper: #14a3ab; --coral-dark: #14a3ab;
}
html.look-night[data-theme="dark"], html.look-night[data-theme="dark"] body { background: var(--nb-page); color: var(--nb-ink); }
html.look-night[data-theme="dark"] .app-main, html.look-night[data-theme="dark"] .view { background-color: transparent; }

/* ---------- Buttons: one yellow main action, white second ones, cyan links ---------- */
html.look-night[data-theme="dark"] .btn-primary, html.look-night[data-theme="dark"] .btn-primary:hover {
  border: 0; border-radius: 999px; color: #10163a;
  background: linear-gradient(180deg, #fff3a0 0%, #ffe46a 35%, #fdd33f 100%);
  box-shadow: 0 2px 0 rgba(180, 120, 10, 0.55), 0 6px 18px -4px rgba(253, 211, 63, 0.45);
}
html.look-night[data-theme="dark"] .btn-primary .ic { color: #10163a; }
html.look-night[data-theme="dark"] .btn-primary:disabled, html.look-night[data-theme="dark"] .btn-primary[aria-disabled="true"] { opacity: 0.5; }
html.look-night[data-theme="dark"] .btn-secondary, html.look-night[data-theme="dark"] .btn-secondary:hover {
  border: 0; border-radius: 999px; color: var(--nb-navy-ink);
  background: linear-gradient(180deg, #ffffff 0%, #e4e9fb 100%); box-shadow: 0 4px 12px -4px rgba(0, 0, 0, 0.45);
}
html.look-night[data-theme="dark"] .btn-secondary .ic { color: var(--nb-navy-ink); }
html.look-night[data-theme="dark"] .btn-link, html.look-night[data-theme="dark"] a.btn-link { color: #8fd8ff; }
html.look-night[data-theme="dark"] .eyebrow { color: var(--nb-cyan-2); }

/* ---------- Cards: indigo glass with a lit rim ---------- */
html.look-night[data-theme="dark"] :is(.hcard, .card, .st-card) {
  color: var(--nb-ink); border: 1.5px solid transparent; border-radius: 22px;
  background: linear-gradient(120deg, var(--nb-card) 0%, var(--nb-card-2) 55%, var(--nb-card-3) 100%) padding-box,
              linear-gradient(180deg, var(--nb-rim-lit) 0%, #3b4aa6 50%, #3579db 100%) border-box;
  box-shadow: 0 10px 24px -16px var(--nb-glow);
}
html.look-night[data-theme="dark"] :is(.hcard, .card, .st-card) :is(small, p, .card-note) { color: var(--nb-soft); }
html.look-night[data-theme="dark"] :is(.card-title, h2, h3) { color: var(--nb-ink); }
html.look-night[data-theme="dark"] .due-icon, html.look-night[data-theme="dark"] .way-ic { color: var(--nb-cyan); }

/* Lists of rows (way-rows) share the song cards' look. */
html.look-night[data-theme="dark"] .way-rows {
  border: 1.5px solid transparent; border-radius: 22px;
  background: linear-gradient(90deg, var(--nb-deep), #13265d) padding-box, linear-gradient(180deg, #2e3d7c, #24356f) border-box;
  box-shadow: none;
}
html.look-night[data-theme="dark"] .way-row { color: var(--nb-ink); }
html.look-night[data-theme="dark"] .way-row + .way-row { border-top-color: #3d4f7b; }
html.look-night[data-theme="dark"] .way-row small { color: var(--nb-soft); }

/* ---------- Inputs, switches, chips, bars ---------- */
html.look-night[data-theme="dark"] .input, html.look-night[data-theme="dark"] textarea.input, html.look-night[data-theme="dark"] select.input {
  color: #fff; border: 1.5px solid #5b63ea; border-radius: 14px; background: rgba(34, 46, 126, 0.75); box-shadow: 0 0 5px rgba(78, 96, 238, 0.35);
}
html.look-night[data-theme="dark"] .input::placeholder { color: #c6cdf4; }
html.look-night[data-theme="dark"] .input:focus { border-color: var(--nb-cyan-2); outline: none; }
html.look-night[data-theme="dark"] .seg-switch { border: 0; border-radius: 999px; background: linear-gradient(180deg, #ffffff 0%, #f3f5fc 100%); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35); }
html.look-night[data-theme="dark"] .seg-switch a { color: #081330; border-radius: 999px; }
html.look-night[data-theme="dark"] .seg-switch a[aria-current="page"] { color: #111410; background: linear-gradient(180deg, #fff6c4 0%, #ffeb8c 22%, #fddc52 60%, #fbd33c 100%); box-shadow: 0 1.6px 0 #f2a283, 0 3px 9px rgba(236, 110, 150, 0.45); }
html.look-night[data-theme="dark"] .seg-ctl { background: #0c1838; }
html.look-night[data-theme="dark"] .seg-ctl input:checked + span { background: #16316e; color: #fff; box-shadow: 0 0 0 1.5px var(--nb-cyan); }
html.look-night[data-theme="dark"] :is(.skill-bar, .pg-bar, .sc-prog) { background: #24356f; }

/* ---------- Sheets, toasts, the menu ---------- */
html.look-night[data-theme="dark"] .sheet { color: #fff; background: linear-gradient(180deg, #13265a 0%, #0d1b44 100%); box-shadow: 0 -1.5px 0 #3b4c94, 0 -18px 40px -20px rgba(0, 0, 0, 0.7); }
html.look-night[data-theme="dark"] .sheet :is(p, small) { color: var(--nb-soft); }
html.look-night[data-theme="dark"] .toast { color: #fff; background: #16316e; box-shadow: 0 0 0 1.5px #3b4c94, 0 10px 24px -10px rgba(0, 0, 0, 0.6); }
html.look-night[data-theme="dark"] .rail-menu { background: #13265a; border-color: #3b4c94; }

/* ---------- Full-screen flows (sessions, lessons, the song coach, the welcome) ---------- */
html.look-night[data-theme="dark"] .ob-shell:not(.sc-embedded) { background: var(--nb-page); }
html.look-night[data-theme="dark"] .ob-top { background: rgba(9, 19, 43, 0.92); box-shadow: 0 1px 0 rgba(120, 140, 220, 0.14); }
html.look-night[data-theme="dark"] .ob-icon-btn { color: #fff; }
/* The sticky action bar fades into the page instead of sitting in a lighter box; ticks are cyan, not navy on navy. */
html.look-night[data-theme="dark"] .ob-actions { background: linear-gradient(180deg, rgba(9, 19, 43, 0) 0, var(--nb-page) 22px); box-shadow: none; }
html.look-night[data-theme="dark"] .tick-list li::before { background-color: var(--nb-cyan); }

@media (max-width: 759px) {
  /* ---------- Tab pages without their own mockup: the Practice band (teal-to-blue, Bud and waves, words erased) on top, the same theme as Songs, Home and Practice (owner, 16 Nov 2026) ---------- */
  html.look-night body:has(.page:not(.practice):not(.path) > .page-hero) .app-main { background: url("../media/practice-hero.jpg") 50% var(--safe-t, 0px) / 100% auto no-repeat, var(--nb-page); }
  html.look-night .page:not(.practice):not(.path) > .page-hero {
    min-height: calc(171.9px + var(--safe-t, 0px)); margin: calc(-14px - var(--safe-t, 0px)) calc(-1 * var(--gutter)) 18px; padding: calc(13.7px + var(--safe-t, 0px)) 21.2px 14px;
    justify-content: flex-start; background: none; border-radius: 0; box-shadow: none; overflow: visible;
  }
  html.look-night .page:not(.practice):not(.path) > .page-hero > :is(.ph-deco, .ph-bud) { display: none; }
  html.look-night .page:not(.practice):not(.path) > .page-hero .eyebrow {
    display: inline-block; height: 24.7px; box-sizing: border-box; margin: 0; padding: 0 9.4px; border-radius: 999px;
    font: 700 12.6px/24.7px var(--font-head); letter-spacing: 0.03em; text-transform: uppercase; color: #10163a;
    background: linear-gradient(180deg, #fff3a0 0%, #fdea7e 50%, #f9dc5a 100%); box-shadow: 0 1.5px 0 rgba(150, 110, 10, 0.55), 0 3px 8px rgba(0, 0, 0, 0.25); transform: none;
  }
  /* Titles keep clear of Bud on the right, with the mockups' cyan brush stroke under them. */
  html.look-night .page:not(.practice):not(.path) > .page-hero .page-title {
    position: relative; max-width: 200px; margin: 3.2px 0 0; padding: 0 0 9px; color: #fff;
    font: 800 26.5px/30px var(--font-head); letter-spacing: 0; text-shadow: none;
  }
  html.look-night .page:not(.practice):not(.path) > .page-hero .page-title::after {
    content: ''; position: absolute; left: -3.9px; bottom: -1px; width: 145px; height: 10px; pointer-events: none;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 132 9'%3E%3Cdefs%3E%3ClinearGradient id='u' x1='0' x2='1'%3E%3Cstop offset='0' stop-color='%2346e4f8'/%3E%3Cstop offset='.63' stop-color='%2368f6ff'/%3E%3Cstop offset='.76' stop-color='%2346d4f0' stop-opacity='.55'/%3E%3Cstop offset='1' stop-color='%2346d4f0' stop-opacity='0'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M2.4 6.2 C30 3.2 70 1.8 100 2.0 C112 2.1 124 2.9 131 4.0 C123 4.8 112 5.5 100 5.9 C70 6.6 32 7.6 3.4 9.2 A1.5 1.5 0 0 1 2.4 6.2 Z' fill='url(%23u)'/%3E%3C/svg%3E") no-repeat 0 0 / 100% 100%;
  }
  html.look-night .page:not(.practice):not(.path) > .page-hero .page-lede { display: none; }
  html.look-night .page:not(.practice):not(.path) > .page-hero .seg-switch { display: grid; grid-template-columns: 1fr 1fr; height: 48px; margin-top: 18px; padding: 1.3px; }
  html.look-night .page:not(.practice):not(.path) > .page-hero .seg-switch a { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 0; font: 600 14.8px/1 var(--font-head); }
  html.look-night .page:not(.practice):not(.path) > .page-hero .pg-back, html.look-night .page:not(.practice):not(.path) > .page-hero a.others-back { color: #fff; }
  /* Every tab band laid out exactly as Your path's (look-night-path.css), so the header is the same on every tab
     (owner, 16 Nov 2026): sticker at 17 px, one-line title under it with the brush stroke, the switch at 108 px. */
  html.look-night .page:is(.progress, .profile) { display: flow-root; }
  html.look-night .page:not(.practice):not(.path) > .page-hero { padding-left: 13.7px; padding-right: 13.7px; }
  html.look-night .page:not(.practice):not(.path) > .page-hero .eyebrow { margin: 3.3px 0 0 7.5px; }
  html.look-night .page:not(.practice):not(.path) > .page-hero .others-back { margin-left: 7.5px; }
  html.look-night .page:not(.practice):not(.path) > .page-hero .page-title { max-width: 236px; margin: 3.2px 0 0 7.6px; padding: 0; }
  html.look-night .page:not(.practice):not(.path) > .page-hero .page-title::after { left: 3.7px; top: auto; bottom: -10.6px; }
  html.look-night .page:not(.practice):not(.path) > .page-hero .seg-switch { height: 48.1px; margin-top: 32.9px; }
  html.look-night .page:not(.practice):not(.path) > .page-hero:has(.seg-switch) { padding-bottom: 0 !important; margin-bottom: 16.7px !important; min-height: 0 !important; }
}

/* The logo (owner, 16 Nov 2026; Bud swapped for the new icon's 17 Nov): Bud, and the
   wordmark (ui.js brandWord) with "Sing" white and "bud" glowing cyan, in the wordmark font. Every place the logo
   shows: the log-in screens, the laptop's side menu, the full-screen flows' top bar. */
html.look-night .bw { font-family: "Plus Jakarta Sans", var(--font-head); font-weight: 800; letter-spacing: -0.01em; }
html.look-night .bw-a { color: #fff; }
html.look-night .bw-b { color: #3fe6f5; text-shadow: 0 0 14px rgba(34, 238, 242, 0.45); }
/* 17 Nov 2026: the logo is now the owner's new icon Bud (singing into a mic), cut out on his own (tools/make-logo.py). */
html.look-night :is(.login-brand, .ob-brand, .rail-brand) > img, html.look-night img.logpage-mark {
  content: url("../icons/singbud-mark.png?v=mark5"); object-fit: contain; border-radius: 0; background: none; box-shadow: none;
  filter: drop-shadow(0 0 10px rgba(34, 238, 242, 0.35));
}
html.look-night .login-brand { gap: 10px; }
html.look-night .login-brand > img { width: 36px; height: 36px; }
html.look-night .login-brand .bw { font-size: 1.5rem; }
html.look-night img.logpage-mark { box-shadow: none; }

/* A hair of space before "bud": the tight tracking made the g and b touch (owner, 17 Nov 2026). */
.bw-b { margin-left: 0.05em; }
