/*
 * The stage behind singing a song from its video (js/stage.js), and the song picture's glow on its page.
 * Dark in both themes: it's a concert. --live (0..1) rises while Bud hears a voice.
 */

/* ---------- The stage ---------- */
.at-stage {
  --live: 0;
  position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  background: radial-gradient(120% 80% at 50% 0%, #2a1b6b 0%, #120c38 45%, #07061a 100%);
  animation: st-in 600ms ease-out both;
}
@keyframes st-in { from { opacity: 0; } }
.at-stage .st-art {
  position: absolute; inset: -12%; background: center / cover no-repeat;
  filter: blur(44px) saturate(1.5); opacity: calc(0.32 + 0.16 * var(--live)); transform: scale(1.1);
}
.at-stage .st-wash { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7, 6, 26, 0.35) 0%, rgba(13, 9, 40, 0.55) 55%, rgba(7, 6, 26, 0.92) 100%); }

/* Spotlights from the top, swaying slowly; brighter while you sing. */
.st-beams { position: absolute; inset: 0; opacity: calc(0.45 + 0.55 * var(--live)); mix-blend-mode: screen; }
.st-beams i {
  position: absolute; top: -10%; width: 42vmax; height: 120%; transform-origin: 50% 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0) 78%);
  clip-path: polygon(46% 0, 54% 0, 100% 100%, 0 100%);
  filter: blur(6px);
  animation: st-sway 7s ease-in-out infinite alternate;
}
.st-beams .b1 { left: -14vmax; --a: -18deg; background-image: linear-gradient(180deg, rgba(57, 230, 238, 0.42), rgba(57, 230, 238, 0) 78%); }
.st-beams .b2 { left: 10%; --a: -6deg; animation-delay: -2s; background-image: linear-gradient(180deg, rgba(255, 120, 200, 0.34), rgba(255, 120, 200, 0) 75%); }
.st-beams .b3 { right: 10%; --a: 7deg; animation-delay: -4s; background-image: linear-gradient(180deg, rgba(255, 214, 92, 0.32), rgba(255, 214, 92, 0) 75%); }
.st-beams .b4 { right: -14vmax; --a: 18deg; animation-delay: -1s; background-image: linear-gradient(180deg, rgba(150, 120, 255, 0.4), rgba(150, 120, 255, 0) 78%); }
@keyframes st-sway { from { transform: rotate(calc(var(--a) - 7deg)); } to { transform: rotate(calc(var(--a) + 7deg)); } }

/* Floating stage lights. */
.st-dust i {
  position: absolute; left: var(--x); top: var(--y); width: var(--s); height: var(--s); border-radius: 50%;
  background: hsl(var(--h) 90% 75%); box-shadow: 0 0 12px 2px hsl(var(--h) 90% 70% / 0.7);
  opacity: calc(0.25 + 0.5 * var(--live)); animation: st-float 9s ease-in-out infinite alternate; animation-delay: calc(var(--d) * -1);
}
@keyframes st-float { from { transform: translate(0, 0); } to { transform: translate(14px, -34px); } }

/* The crowd along the bottom, above the phone's tab bar. */
.st-crowd { position: absolute; left: 0; right: 0; bottom: calc(var(--tab-h) + var(--safe-b)); height: clamp(130px, 24svh, 230px); }
.st-glowline {
  position: absolute; left: -10%; right: -10%; bottom: 40%; height: 70%;
  background: radial-gradient(50% 60% at 50% 100%, rgba(255, 120, 200, calc(0.16 + 0.3 * var(--live))), rgba(57, 230, 238, 0) 70%);
}
.st-people { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.st-people .p { transform-box: fill-box; transform-origin: 50% 100%; animation: st-bob 0.9s ease-in-out infinite alternate; animation-delay: calc(var(--d) * -1); }
@keyframes st-bob { from { transform: translateY(0); } to { transform: translateY(calc(-1.5px - 7px * var(--live))); } }
.st-people .arm, .st-people .phone { transform-box: fill-box; transform-origin: 50% 100%; animation: st-wave 1.4s ease-in-out infinite alternate; animation-delay: calc(var(--d) * -1); }
@keyframes st-wave { from { transform: rotate(-6deg); } to { transform: rotate(8deg); } }
.st-people .light { fill: #fff6c8; filter: drop-shadow(0 0 6px #ffe27a) drop-shadow(0 0 14px rgba(255, 226, 122, 0.8)); opacity: calc(0.45 + 0.55 * var(--live)); }
.st-people .cheer-only { opacity: 0; transform: scaleY(0.2); transition: opacity 260ms ease, transform 360ms cubic-bezier(.2, 1.6, .4, 1); animation: none; }
.at-stage.is-cheer .cheer-only { opacity: 1; transform: none; }
.at-stage.is-cheer .st-beams { animation: st-flash 1.4s ease-out; }
@keyframes st-flash { 0% { opacity: 1; filter: brightness(1.6); } 100% { filter: none; } }

/* ---------- What sits on the stage ---------- */
.sc-shell.is-stage { isolation: isolate; color: #f4f6ff; }
.sc-shell.is-stage .ot-now-label { color: rgba(230, 234, 255, 0.72); }
.sc-shell.is-stage .ot-now-words { color: #fff; text-shadow: 0 2px 18px rgba(255, 120, 200, 0.45); }
.sc-shell.is-stage .ot-live, .sc-shell.is-stage .ot-hint, .sc-shell.is-stage .at-loop-tip { color: rgba(230, 234, 255, 0.78); }
.sc-shell.is-stage .ot-live b { color: #fff; }
.sc-shell.is-stage .sc-lanebox {
  background: rgba(14, 10, 44, 0.48); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.16), 0 18px 40px -18px rgba(0, 0, 0, 0.8);
  border: 0;
}
.sc-shell.is-stage .sc-readout { background: rgba(255, 255, 255, 0.12); color: #fff; }
.sc-shell.is-stage .sc-readout-note { color: #fff; }
.sc-shell.is-stage .sc-count { color: #fff; background: rgba(14, 10, 44, 0.55); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.sc-shell.is-stage .sc-count .sc-count-n { color: #fff; text-shadow: 0 0 24px rgba(57, 230, 238, 0.9), 0 0 60px rgba(255, 120, 200, 0.6); }
.sc-shell.is-stage .sc-count small { color: rgba(230, 234, 255, 0.75); }
.sc-shell.is-stage .ot-track { background: rgba(255, 255, 255, 0.14); }
.sc-shell.is-stage .ot-track i { background: linear-gradient(90deg, #39e6ee, #ff78c8); }
.sc-shell.is-stage .sc-yt { box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2), 0 20px 50px -16px rgba(0, 0, 0, 0.9), 0 0 60px -10px rgba(255, 120, 200, calc(0.25 + 0.35 * var(--live, 0))); border-color: transparent; }
.sc-shell.is-stage .btn-link { color: #fff; text-decoration-color: rgba(57, 230, 238, 0.8); }
.sc-shell.is-stage .ot-actions .btn-primary { box-shadow: 0 0 0 2.5px #07061a, 0 0 28px rgba(57, 230, 238, 0.45); }
.sc-shell.is-stage .ot-actions { background: none !important; box-shadow: none !important; }
.sc-shell.is-stage .ot-freeover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.sc-shell.is-stage .sc-yt-credit { color: rgba(230, 234, 255, 0.6); }

/* The tab bar and side rail go dark with the room. */
body.on-stage .tabs { background: rgba(7, 6, 26, 0.86); box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.08); }
body.on-stage .tab { color: #9aa3c7; }
body.on-stage .tab.is-on, body.on-stage .tab.is-on:hover { color: #fff; }
body.on-stage .tab.is-on .ic { background: rgba(57, 230, 238, 0.18); box-shadow: 0 0 0 2px rgba(57, 230, 238, 0.5); color: #39e6ee; }
body.on-stage .rail-brand { color: #fff; }
body.on-stage .rail-up, body.on-stage .rail-me { opacity: 0.85; }
@media (min-width: 960px) {
  body.on-stage .tabs { background: #0b0924; box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.08); }
  body.on-stage .tab.is-on { background: rgba(255, 255, 255, 0.08); box-shadow: none; }
  .st-crowd { bottom: 0; height: clamp(140px, 22svh, 210px); }
}
body.on-stage { background: #07061a; }

/* ---------- The song page: the song's picture as a soft glow at the top ---------- */
.at-glow { position: fixed; left: 0; right: 0; top: 0; height: min(620px, 78svh); z-index: -1; pointer-events: none; overflow: hidden; }
.at-glow .st-art {
  position: absolute; inset: -10% -10% 0; background: center / cover no-repeat; filter: blur(56px) saturate(1.8);
  opacity: 0.42; animation: st-in 700ms ease-out both;
  -webkit-mask-image: linear-gradient(180deg, #000 30%, transparent 100%); mask-image: linear-gradient(180deg, #000 30%, transparent 100%);
}
.sc-shell.is-songpage { position: relative; isolation: isolate; }
html[data-theme="dark"] .at-glow .st-art { opacity: 0.38; }

/* Song page details: centred on the phone, chips for what to expect, one big button. */
.ot-page .ot-artist { margin: 2px 0 0; font: 600 1.05rem/1.3 var(--font-body, inherit); color: var(--ink-soft); }
.ot-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 4px; padding: 0; list-style: none; }
.ot-chips li {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
  background: var(--white); box-shadow: 0 0 0 2px var(--ink-line, rgba(17, 22, 64, 0.85)); font-size: 0.86rem; font-weight: 600; color: var(--ink);
}
.ot-chips .ic { width: 16px; height: 16px; }
html[data-theme="dark"] .ot-chips li { background: #151e3e; box-shadow: 0 0 0 1.5px #2a3560; color: #e9edff; }
.ot-page.is-yt .ot-actions .btn-primary { min-height: 64px; font-size: 1.2rem; position: relative; }
.ot-page.is-yt .ot-actions .btn-primary { animation: ot-ring 2.4s ease-out infinite; }
@keyframes ot-ring { 0% { outline: 3px solid rgba(23, 182, 194, 0.55); outline-offset: 0; } 70%, 100% { outline: 3px solid rgba(23, 182, 194, 0); outline-offset: 12px; } }
.sc-shell.is-songpage .sc-yt-credit { display: none; }
@media (max-width: 999px) {
  .ot-page.is-yt .ot-page-head { text-align: center; }
  .ot-page.is-yt .ot-chips { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .at-stage, .at-stage *, .at-glow .st-art, .ot-page.is-yt .ot-actions .btn-primary { animation: none !important; transition: none !important; }
}

/* The lighter stage (js/stage.js LITE: iPhones and iPads with less memory). Same colours, nothing that costs graphics
   memory every frame: no blurred cover, no beams, no dust, no glow filters, no frosted glass, the crowd stands still. */
html.is-lite .at-stage .st-art, html.is-lite .st-beams, html.is-lite .st-dust { display: none; }
html.is-lite .at-stage .st-wash { background: radial-gradient(120% 70% at 50% 0%, rgba(80, 60, 170, 0.55), rgba(13, 9, 40, 0) 70%), linear-gradient(180deg, #0d0a2c 0%, #120d3a 55%, #07061a 100%); }
html.is-lite .at-stage, html.is-lite .at-stage * { animation: none !important; transition: none !important; }
html.is-lite .st-people .light { filter: none; }
html.is-lite .at-glow .st-art { filter: none; opacity: 0.16; animation: none; }
html.is-lite .sc-shell.is-stage .sc-lanebox { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(14, 10, 44, 0.82); }
html.is-lite .sc-shell.is-stage .sc-count { -webkit-backdrop-filter: none; backdrop-filter: none; }
html.is-lite .ot-actions > .ot-live.is-pin { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(7, 8, 30, 0.86); }
/* The song's video drawn at 3/4 size and scaled up: YouTube picks its picture size from the player's own size. */
html.is-lite .sc-yt iframe, html.is-lite .sc-ytwords iframe,
.sc-ytdock.is-light .sc-yt iframe, .sc-ytdock.is-light .sc-ytwords iframe { width: 75%; height: 75%; transform: scale(1.3334); transform-origin: 0 0; }

/* The glow shows through: no pale box behind the button. */
.sc-shell.is-songpage .ot-page.is-yt .ot-actions { position: static; background: none; box-shadow: none; }
/* A prepared song's page: no song map (the tune stays on our side, and the button stays in view). */
.ot-page.is-yt .sc-mapcard { display: none; }

/* ---------- Karaoke / With the singer, on the song page ---------- */
.ot-vswitch {
  display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; margin: 6px 0 2px; width: max-content; max-width: 100%; align-self: flex-start;
  background: var(--white); box-shadow: 0 0 0 2px var(--ink-line, rgba(17, 22, 64, 0.85));
}
.ot-vswitch button {
  display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 999px; padding: 8px 14px; min-height: 40px;
  background: none; color: var(--ink-soft); font: 700 0.92rem/1 var(--font-head); cursor: pointer;
}
.ot-vswitch button .ic { width: 16px; height: 16px; }
.ot-vswitch button[aria-pressed="true"] { background: var(--ink, #111640); color: #fff; }
.ot-vswitch button:focus-visible { outline: 3px solid var(--tk-teal, #17b6c2); outline-offset: 2px; }
.ot-page.is-yt .ot-chips { margin-top: 8px; }
@media (max-width: 999px) { .ot-page.is-yt .ot-vswitch { display: flex; width: max-content; margin-left: auto; margin-right: auto; } }
html[data-theme="dark"] .ot-vswitch { background: #151e3e; box-shadow: 0 0 0 1.5px #2a3560; }
html[data-theme="dark"] .ot-vswitch button { color: #a9b4d1; }
html[data-theme="dark"] .ot-vswitch button[aria-pressed="true"] { background: #39e6ee; color: #07101f; }

/* ---------- The key: Lower, Original, Higher (14 Nov 2026), under Karaoke / With the singer ---------- */
.ot-keypick { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 2px 0 0; width: 100%; align-self: stretch; }
.ot-keypick-label { font: 700 0.85rem/1 var(--font-head); color: var(--ink-soft); }
.ot-kswitch { display: inline-flex; flex: none; gap: 2px; padding: 3px; border-radius: 999px; background: var(--white); box-shadow: 0 0 0 1.5px var(--line, rgba(17, 22, 64, 0.18)); max-width: 100%; }
.ot-kswitch button {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; border: 0; border-radius: 999px;
  padding: 6px 14px; min-height: 38px; min-width: 76px; background: none; color: var(--ink-soft); font: 700 0.88rem/1.1 var(--font-head); cursor: pointer;
}
.ot-kswitch button[aria-pressed="true"] { background: var(--tk-teal, #17b6c2); color: #07101f; }
.ot-kswitch button:focus-visible { outline: 3px solid var(--tk-teal, #17b6c2); outline-offset: 2px; }
.ot-kfit { font: 700 0.66rem/1 var(--font-body, inherit); letter-spacing: 0.02em; color: var(--tk-teal-ink, #0b7c86); }
.ot-kswitch button[aria-pressed="true"] .ot-kfit { color: #07101f; }
/* Four or five keys (23 Nov 2026): the switch fills the row and each button shares it, so all fit at 360 px. */
.ot-kswitch.is-many { display: flex; width: 100%; }
.ot-kswitch.is-many button { flex: 1 1 0; min-width: 0; padding: 6px 2px; font-size: 0.8rem; }
.ot-knote { flex-basis: 100%; margin: 0; font-size: 0.88rem; line-height: 1.4; color: var(--ink-soft); }
@media (max-width: 999px) {
  .ot-page.is-yt .ot-keypick { justify-content: center; text-align: center; }
}
html[data-theme="dark"] .ot-kswitch { background: #151e3e; box-shadow: 0 0 0 1.5px #2a3560; }
html[data-theme="dark"] .ot-kswitch button { color: #a9b4d1; }
html[data-theme="dark"] .ot-kswitch button[aria-pressed="true"] { background: #39e6ee; color: #07101f; }
html[data-theme="dark"] .ot-kfit { color: #39e6ee; }
html[data-theme="dark"] .ot-kswitch button[aria-pressed="true"] .ot-kfit { color: #07101f; }
/* The key a take was sung in, under the song's name on the results. */
.tc-key, .at-key { margin: 2px 0 0; font: 700 0.82rem/1.2 var(--font-head); color: var(--ink-soft); }

/* ---------- "Hear the singer" on the results: the original in a small player in the corner ---------- */
.sc-shell.is-peek .sc-ytdock {
  position: fixed !important; right: 14px; left: auto; bottom: calc(var(--tab-h) + var(--safe-b) + 14px); top: auto;
  width: min(230px, 56vw) !important; max-width: none !important; margin: 0 !important; z-index: 60;
  border-radius: 16px; box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.55); animation: st-peek 260ms ease-out both;
}
.sc-shell.is-peek .sc-yt { border-radius: 16px; }
.sc-shell.is-peek .sc-yt-credit { display: none; }
@keyframes st-peek { from { opacity: 0; transform: translateY(16px) scale(0.96); } }
@media (min-width: 960px) { .sc-shell.is-peek .sc-ytdock { bottom: 20px; right: 24px; width: 340px !important; } }

/* The practice loop's small links, side by side; the fix card's "Hear the singer first". */
.at-loop-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px; }
.at-loop-links .btn-link, .ot-fix-singer { display: inline-flex; align-items: center; gap: 6px; }
.at-loop-links .ic, .ot-fix-singer .ic { width: 18px; height: 18px; }
.ot-fix-actions { flex-direction: column; align-items: center; gap: 10px; }
@media (prefers-reduced-motion: reduce) { .sc-shell.is-peek .sc-ytdock { animation: none; } }

/* "Not the right bit? Earlier / Later" while the singer plays from a guessed spot. */
.sc-nudge { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px 8px; padding: 8px 10px; font-size: 0.86rem; }
.sc-nudge span { color: var(--ink-soft); font-weight: 600; }
.sc-nudge button { display: inline-flex; align-items: center; gap: 4px; border: 0; border-radius: 999px; padding: 6px 12px; min-height: 36px; background: var(--ink, #111640); color: #fff; font: 700 0.86rem/1 var(--font-head); cursor: pointer; }
.sc-nudge button .ic { width: 14px; height: 14px; }
.sc-shell.is-peek .sc-ytdock .sc-nudge { background: var(--white); border-radius: 0 0 16px 16px; }
.sc-shell.is-stage .sc-nudge span { color: rgba(230, 234, 255, 0.78); }
.sc-shell.is-stage .sc-nudge button { background: rgba(255, 255, 255, 0.14); box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.25); }
html[data-theme="dark"] .sc-shell.is-peek .sc-ytdock .sc-nudge { background: #151e3e; }

/* ---------- The real crowd (owner, 13 Nov 2026): a looped clip filling the bottom, fading up into the dark ---------- */
.at-stage .st-real {
  position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 70%; object-fit: cover; object-position: 50% 30%;
  opacity: 0; transition: opacity 700ms ease;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 35%); mask-image: linear-gradient(180deg, transparent 0%, #000 35%);
}
/* Once it plays: brighter while you sing, and it takes over from the drawn crowd. */
.at-stage.has-real .st-real { opacity: calc(0.75 + 0.25 * var(--live)); }
/* With the real crowd, the dark wash eases off at the bottom so the crowd shows; the top stays dark for reading. */
.at-stage.has-real .st-wash { background: linear-gradient(180deg, rgba(7, 6, 26, 0.55) 0%, rgba(13, 9, 40, 0.45) 40%, rgba(7, 6, 26, 0.1) 100%); }
.at-stage.has-real .st-people { opacity: 0; transition: opacity 600ms ease; }
.at-stage.has-real .st-glowline { display: none; }
.at-stage.has-real .st-art { opacity: calc(0.18 + 0.1 * var(--live)); }
/* The tab bar sits over the bottom of the clip on a phone: the crowd starts above it. */
@media (max-width: 959px) { .at-stage .st-real { bottom: calc(var(--tab-h) + var(--safe-b)); height: 58%; object-position: 50% 20%; } }
.at-stage.is-cheer .st-real { filter: brightness(1.25); }
@media (prefers-reduced-motion: reduce) { .at-stage .st-real { display: none; } }
/* The stage reaches the bottom of the window even when the singing screen is shorter than it. */
.sc-shell.is-stage { min-height: 100svh; }
/* Back, above the video while singing: across the whole width, and white on the stage. */
@media (min-width: 1000px) { .sc-shell.is-singing.has-yt .sc-backbar { grid-column: 1 / -1; margin-bottom: 0; } }
.sc-shell.is-stage .sc-backbar { color: #fff; }

/* ---------- Singing on a computer: one centred column (owner, 13 Nov 2026) ----------
   The karaoke video is the star, as large as the window allows; right under it, at the same width, the song and
   what Bud hears on the left, the time sung on the right, a slim voice strip, then Finish with Start over beside it.
   --sing-w: the video's width, so the strip and the buttons line up with it. */
@media (min-width: 1000px) {
  .sc-shell.is-singing.has-yt { --sing-w: min(100%, 1160px, calc((100svh - 368px) * 1.778)); }
  .sc-shell.is-singing.has-yt .sc-main { display: block; max-width: 1240px; padding-top: 8px; }
  .sc-shell.is-singing.has-yt .sc-backbar { display: flex; width: var(--sing-w); margin: 0 auto 6px; }
  .sc-shell.is-singing.has-yt .sc-ytdock { position: static; width: var(--sing-w); max-width: none; margin: 0 auto; }
  .sc-shell.is-singing.has-yt .sc-yt-credit { display: none; }
  .sc-shell.is-singing.has-yt .sc-stage { width: var(--sing-w); margin: 0 auto; }
  .sc-shell.is-singing.has-yt .ot-run {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 20px; row-gap: 10px; align-items: end;
    padding-top: 10px; max-width: none;
  }
  .sc-shell.is-singing.has-yt .ot-run > * { grid-column: 1 / -1; margin-top: 0; margin-bottom: 0; }
  .sc-shell.is-singing.has-yt .ot-run > .ot-now { grid-column: 1; grid-row: 1; text-align: left; min-height: 0; align-items: flex-start; }
  .sc-shell.is-singing.has-yt .ot-run > .ot-live { grid-column: 2; grid-row: 1; justify-content: flex-end; margin: 0; padding-bottom: 4px; }
  .sc-shell.is-singing.has-yt .ot-run .ot-now-label { font-size: 0.85rem; }
  .sc-shell.is-singing.has-yt .ot-run .ot-now-words { font-size: 1.25rem; }
  .sc-shell.is-singing.has-yt .ot-run .sc-lane { height: 92px; }
  .sc-shell.is-singing.has-yt .ot-run .ot-track { height: 6px; }
  .sc-shell.is-singing.has-yt .ot-run .ot-actions { display: flex; flex-direction: row; justify-content: center; align-items: center; gap: 24px; margin-top: 6px; }
  .sc-shell.is-singing.has-yt .ot-run .ot-actions .btn-primary { width: auto; min-width: 280px; }
  /* Practising a moment: the tip under the heading, and the small links beside the button. */
  .sc-shell.is-singing.has-yt .ot-run.at-loop > .at-loop-tip { text-align: left; margin-left: 0; margin-right: 0; max-width: none; }
  .sc-shell.is-singing.has-yt .at-loop .ot-actions { flex-wrap: wrap; }
}

/* ---------- The song page of a song from its video, on a computer (owner, 13 Nov 2026) ----------
   The video and the details are the same height and centred together; the details read top to bottom as title,
   which video, the facts, then Sing it straight away. The last take and the free note sit under the button, small. */
@media (min-width: 1000px) {
  .sc-shell.is-songpage.has-yt .sc-main { align-items: start; padding-top: 0; }
  .sc-shell.is-songpage.has-yt .sc-backbar { align-self: start; margin-bottom: 4px; }
  .sc-shell.is-songpage.has-yt .sc-ytdock { position: static; align-self: start; margin-top: 14px; }
  .sc-shell.is-songpage.has-yt .sc-stage { align-self: start; }
  .ot-page.is-yt { gap: 12px; max-width: 520px; margin: 0; }
  .ot-page.is-yt > .ot-page-head { order: 1; }
  .ot-page.is-yt > .ot-vswitch { order: 2; margin: 4px 0 0; }
  .ot-page.is-yt > .ot-keypick { order: 2; }
  .ot-page.is-yt > .ot-chips { order: 3; margin: 0; }
  .ot-page.is-yt > .ot-actions { order: 4; margin-top: 10px; align-items: stretch; }
  .ot-page.is-yt > .ot-last { order: 5; }
  .ot-page.is-yt > .ot-freebar { order: 6; margin-top: 0; }
  .ot-page.is-yt > .ot-takes { order: 7; }
  .ot-page.is-yt .ot-actions .ot-hint, .ot-page.is-yt .ot-actions .ot-other { text-align: left; align-self: flex-start; }
  .ot-page.is-yt .ot-actions .ot-other { margin-top: 0; padding-left: 0; }
  /* "Pick a different song" sits outside the button group since 21 Nov 2026: here it stays at the end, on the left. */
  .ot-page.is-yt > .ot-other { order: 8; align-self: flex-start; margin-top: 0; padding-left: 0; }
  .ot-page.is-yt .ob-title { font-size: clamp(2.4rem, 3.6vw, 3.2rem); line-height: 1.05; }
}
/* The last take, small: one line under the button, not a big card. */
.ot-page.is-yt .ot-last { padding: 8px 14px 8px 8px; gap: 12px; border-width: 2px; box-shadow: none; border-radius: 999px; align-self: flex-start; }
.ot-page.is-yt .ot-last .tk-score.sm { width: 44px; height: 44px; }
.ot-page.is-yt .ot-last .tk-score.sm b { font-size: 1.05rem; }
.ot-page.is-yt .ot-last-text { flex-direction: row; flex-wrap: wrap; align-items: baseline; column-gap: 10px; }
.ot-page.is-yt .ot-last-text small { font-size: 0.85rem; }
.ot-page.is-yt .ot-last-text .btn-link { font-size: 0.92rem; }
html[data-theme="dark"] .ot-page.is-yt .ot-last { border-color: #2a3560; background: #151e3e; }
/* The song's picture as a glow: dark mode only. In light mode a dark or grey cover blurred over white turned the
   page a muddy grey (owner, 13 Nov 2026). */
:root:not([data-theme="dark"]) .at-glow { display: none; }
html[data-theme="dark"] .ot-freebar-ic { background: #ffd65a; }
html[data-theme="dark"] .ot-freebar-ic .ic .ic-fill { fill: #111640; }

/* The corner player's close button, and Earlier / Later that read in both themes (owner, 13 Nov 2026).
   In dark mode --ink turns light, so the buttons were white on white. */
.sc-peek-close { display: none; }
.sc-shell.is-peek .sc-peek-close {
  position: absolute; top: -12px; left: -12px; z-index: 2; display: grid; place-items: center; width: 32px; height: 32px; padding: 0;
  border: 0; border-radius: 50%; cursor: pointer; background: #1c1c1e; color: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35), 0 0 0 2px #fff;
}
.sc-shell.is-peek .sc-peek-close .ic { width: 16px; height: 16px; }
.sc-shell.is-peek .sc-peek-close:focus-visible { outline: 3px solid var(--tk-teal, #17b6c2); outline-offset: 2px; }
html[data-theme="dark"] .sc-shell.is-peek .sc-peek-close { background: #3a3a3c; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5), 0 0 0 2px #000; }
.sc-shell.is-peek .sc-ytdock .sc-nudge span { color: var(--ink-soft); }
.sc-shell.is-peek .sc-ytdock .sc-nudge button { background: #111640; color: #fff; box-shadow: none; }
html[data-theme="dark"] .sc-shell.is-peek .sc-ytdock .sc-nudge span { color: #a9b4d1; }
html[data-theme="dark"] .sc-shell.is-peek .sc-ytdock .sc-nudge button { background: rgba(255, 255, 255, 0.14); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22); }
html[data-theme="dark"] .sc-shell.is-peek .sc-ytdock .sc-nudge button:hover { background: rgba(255, 255, 255, 0.22); }

/* Session start on a phone (owner, 14 Nov 2026: "it looks like shit", then "doesn't look good"): 7 parts with a line
   of explanation each pushed Start off the screen, and a progress bar, a speech bubble that repeated the title and
   a two-column table made it busy. Now: no bar and no bubble before starting, Bud big in the middle, the parts as
   one short path of names joined by a line, everything centred in the screen, and Start pinned at the bottom. */
.s-hero-bud, .s-tip-in { display: none; }
@media (max-width: 719px) {
  .session-shell.is-start .ob-progress, .session-shell.is-start .ob-seg-label { visibility: hidden !important; }
  .session-shell.is-start .ob-guide { display: none; }
  .ob-stage > .s-start { padding-bottom: 0; text-align: center; }
  .s-start .s-hero-bud { display: block; width: 76px; margin: auto auto 4px; }
  .s-start .s-hero-bud svg { width: 100%; height: auto; display: block; }
  .s-start .eyebrow { display: none; }
  .s-start .ob-title { font-size: 2.2rem; margin-top: 0; }
  .s-start .ob-hint { font-size: 0.98rem; max-width: 300px; }
  .s-start .s-parts { grid-template-columns: max-content; justify-content: center; gap: 0; margin: 16px auto 0; text-align: left; }
  .s-start .s-parts li { grid-template-columns: 24px max-content; gap: 12px; align-items: center; min-height: 30px; }
  .s-start .s-parts li:not(:last-child)::after { content: ''; position: absolute; left: 11px; top: 27px; width: 2px; height: 6px; border-radius: 1px; background: var(--track, #dfe6ee); }
  .s-start .s-parts .part-swatch { width: 24px; height: 24px; font-size: 0.75rem; }
  .s-start .s-parts small { display: none; }
  .s-start .s-parts b { font-size: 0.95rem; font-weight: 600; line-height: 1.2; }
  .s-start > .tick-list { display: none; }
  .s-start .s-tip-in { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 0 0 10px; font-size: 0.88rem; font-weight: 600; color: var(--ink-soft); }
  .s-start .s-tip-in .ic { width: 16px; height: 16px; color: var(--teal-text, #0b6b73); }
  .s-start > .ob-actions {
    position: sticky !important; bottom: 0; z-index: 5; margin-top: auto; width: 100%;
    padding: 16px 0 max(14px, env(safe-area-inset-bottom)) !important;
    background: var(--white) !important; box-shadow: 0 -18px 16px -6px var(--white) !important;
  }
  html[data-theme="dark"] .s-start > .ob-actions { background: var(--d-panel, #111833) !important; box-shadow: 0 -18px 16px -6px var(--d-panel, #111833) !important; }
}
/* "Play from the start", under the switch while the singer's video is on (22 Nov 2026). */
.ot-fromstart { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; align-self: flex-start; font-weight: 700; }
.ot-fromstart[hidden] { display: none; }
.ot-fromstart .ic { width: 16px; height: 16px; }
@media (max-width: 999px) { .ot-page.is-yt .ot-fromstart { align-self: center; } }
@media (max-width: 759px) { .ot-page.is-yt > .ot-fromstart { order: 4; margin-top: -4px; } }
