/* orelolyrics app. Landing styles first (from the design), then the working screens. */
@property --acc { syntax: '<color>'; inherits: true; initial-value: #FFC978; }
@property --acc2 { syntax: '<color>'; inherits: true; initial-value: #FF8A6B; }
:root {
  color-scheme: dark;
  --bg: #07060F;
  --fg: #F6F2FF;
  --mut: rgba(246, 242, 255, .74);
  --faint: rgba(246, 242, 255, .52);
  --line: rgba(255, 255, 255, .22);
  --glass: rgba(16, 12, 36, .58);
  --card: rgba(14, 10, 32, .52);
  --ink: #1A1204;
  --acc: #FFC978;
  --acc2: #FF8A6B;
  --serif: 'Instrument Serif', 'Times New Roman', Georgia, serif;
  --sans: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ar: 'Amiri', 'Noto Naskh Arabic', 'Geeza Pro', 'Times New Roman', serif;
  --head-h: 84px;
  transition: --acc 2.6s ease, --acc2 2.6s ease;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
html { scrollbar-gutter: stable; }
body {
  background: var(--bg);
  color: var(--fg);
  font: 400 16px/1.5 var(--sans);
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: rgba(7, 6, 15, .85); }
button, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- the scene ---------- */
.scenes, .grain, .shade { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.scenes { overflow: hidden; }
.scene { position: absolute; inset: 0; background: var(--base); opacity: 0; transition: opacity 2.8s ease; }
.scene.on { opacity: 1; }
.s0 { --base: #150E26; --c1: #F4A94E; --c2: #C94F6D; --c3: #4A2D86; }
.s1 { --base: #050A18; --c1: #2A6BFF; --c2: #16B5A6; --c3: #0F2B63; }
.s2 { --base: #1A0A1E; --c1: #FF4F86; --c2: #FF9A55; --c3: #5E2A9A; }
.blob { position: absolute; border-radius: 50%; will-change: transform; }
.b1 { width: 80vmax; height: 80vmax; left: -22vmax; top: -34vmax; background: radial-gradient(circle, var(--c1) 0%, transparent 62%); opacity: .62; animation: drift1 46s ease-in-out infinite alternate; }
.b2 { width: 90vmax; height: 90vmax; right: -30vmax; bottom: -46vmax; background: radial-gradient(circle, var(--c2) 0%, transparent 62%); opacity: .5; animation: drift2 58s ease-in-out infinite alternate; }
.b3 { width: 56vmax; height: 56vmax; left: 34%; top: 14%; background: radial-gradient(circle, var(--c3) 0%, transparent 66%); opacity: .8; animation: drift3 40s ease-in-out infinite alternate; }
@keyframes drift1 { to { transform: translate3d(9vmax, 6vmax, 0) scale(1.08); } }
@keyframes drift2 { to { transform: translate3d(-12vmax, -7vmax, 0) scale(1.1); } }
@keyframes drift3 { to { transform: translate3d(-10vmax, 9vmax, 0) scale(.94); } }
.grain { opacity: .09; mix-blend-mode: overlay; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }
.shade { background:
  radial-gradient(ellipse 80% 55% at 50% 30%, rgba(5, 4, 14, 0) 0%, rgba(5, 4, 14, .5) 100%),
  linear-gradient(to top, rgba(6, 5, 16, .92) 0%, rgba(6, 5, 16, .62) 34%, rgba(6, 5, 16, 0) 62%); }

/* ---------- header and the staff ---------- */
.wrap { position: relative; z-index: 1; }
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 9; isolation: isolate; display: flex; align-items: center; justify-content: space-between; gap: 16px; height: var(--head-h); }
.top::before { content: ""; position: absolute; top: 0; bottom: 0; left: calc(50% - 50vw); right: calc(50% - 50vw); z-index: -1; background: linear-gradient(rgba(7, 6, 15, .86), rgba(7, 6, 15, .6)); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid rgba(255, 255, 255, .08); opacity: 0; transition: opacity .4s ease; }
.top.scrolled::before { opacity: 1; }
.mark {
  font-family: var(--serif); font-size: 30px; line-height: 1; letter-spacing: .01em; text-decoration: none;
  background-image: linear-gradient(90deg, var(--acc) 0 50%, #FFFFFF 50% 100%);
  background-size: 200% 100%; background-position: 100% 0;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: fillmark 7s ease-in-out infinite alternate;
}
@keyframes fillmark { 0%, 14% { background-position: 100% 0; } 86%, 100% { background-position: 0 0; } }
.staff { position: relative; width: min(470px, 46vw); height: 62px; }
.staff::before { content: ""; position: absolute; left: 0; right: 0; top: 4px; height: 33px; background: repeating-linear-gradient(to bottom, rgba(255, 255, 255, .22) 0 1px, transparent 1px 8px); }
.note { position: absolute; left: var(--x); top: var(--y); width: 44px; height: 44px; margin: -22px 0 0 -22px; display: grid; place-items: center; text-decoration: none; color: var(--faint); }
.note::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .6); background: #0B0A18; transition: background .5s ease, border-color .5s ease, box-shadow .5s ease, transform .5s ease; }
.note span { position: absolute; left: 50%; top: calc(50% + 50px - var(--y)); transform: translateX(-50%); font-size: 12px; letter-spacing: .06em; white-space: nowrap; transition: color .4s ease; }
.note:hover { color: var(--fg); }
.note:hover::before { border-color: var(--fg); }
.note.on { color: var(--fg); }
.note.on::before { background: var(--acc); border-color: var(--acc); box-shadow: 0 0 16px var(--acc); transform: scale(1.15); }

/* ---------- first screen ---------- */
.first { min-height: calc(100vh - var(--head-h)); display: flex; flex-direction: column; }
.main { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: clamp(24px, 5vh, 56px); text-align: center; padding-block: clamp(0px, 3vh, 36px) 8px; }
.hero { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 14px; width: 100%; max-width: 1120px; min-height: clamp(170px, 29vh, 290px); }
.tag { margin: 0 0 2px; display: inline-flex; align-items: center; gap: 9px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.tag svg { fill: var(--acc); }
.line { margin: 0; font-size: clamp(32px, 5.2vw, 78px); line-height: 1.28; text-wrap: balance; transition: opacity .55s ease, transform .9s ease; filter: drop-shadow(0 0 30px color-mix(in srgb, var(--acc) 38%, transparent)); }
.line.ar { font-family: var(--ar); font-weight: 700; font-size: clamp(36px, 6vw, 88px); line-height: 1.4; }
.line.en { font-family: var(--serif); font-style: italic; font-weight: 400; }
.fill {
  --dir: to right;
  background-image: linear-gradient(var(--dir), var(--acc) var(--p, 0%), rgba(255, 255, 255, .9) var(--p, 0%));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.line[dir="rtl"] .fill, .fill[dir="rtl"] { --dir: to left; }
.sub { margin: 0; color: var(--mut); font-size: clamp(15px, 1.5vw, 19px); letter-spacing: .02em; transition: opacity .55s ease, transform .9s ease; }
.sub.ar { font-family: var(--ar); font-size: clamp(19px, 2vw, 26px); letter-spacing: 0; }
.line.out, .sub.out { opacity: 0; transform: translateY(10px); }

.drop { display: flex; flex-direction: column; align-items: center; gap: 14px; width: 100%; max-width: 560px; }
.ring {
  position: relative; width: 148px; height: 148px; padding: 0; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .05); display: grid; place-items: center;
  box-shadow: inset 0 0 0 1px var(--line), 0 0 70px color-mix(in srgb, var(--acc) 22%, transparent);
  transition: transform .5s ease, background .5s ease, box-shadow 1.2s ease;
}
/* Glow pulse animates opacity of a pseudo-element (GPU-composited) instead of box-shadow */
.ring::after { content: ""; position: absolute; inset: 0; border-radius: 50%; pointer-events: none; opacity: 0; box-shadow: 0 0 96px color-mix(in srgb, var(--acc) 34%, transparent); animation: halo 6s ease-in-out infinite alternate; }
@keyframes halo { to { opacity: 1; } }
.ring:hover:not(:disabled) { transform: scale(1.04); background: rgba(255, 255, 255, .09); }
.wrap.over .ring { transform: scale(1.1); background: rgba(255, 255, 255, .13); }
.prog { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.prog circle { fill: none; stroke-width: 3; }
.prog .bar { stroke: var(--acc); stroke-linecap: round; stroke-dasharray: 427.3; stroke-dashoffset: 427.3; opacity: 0; transition: opacity .5s ease; filter: drop-shadow(0 0 8px var(--acc)); }
.eq { display: flex; align-items: center; gap: 5px; height: 48px; }
.eq i { display: block; width: 4px; border-radius: 2px; background: var(--acc); transform-origin: 50% 50%; animation: breathe 3.6s ease-in-out infinite alternate; }
.eq i:nth-child(1) { height: 16px; animation-delay: -.4s; }
.eq i:nth-child(2) { height: 30px; animation-delay: -1.3s; }
.eq i:nth-child(3) { height: 46px; animation-delay: -2.1s; }
.eq i:nth-child(4) { height: 26px; animation-delay: -.9s; }
.eq i:nth-child(5) { height: 14px; animation-delay: -1.8s; }
@keyframes breathe { from { transform: scaleY(.55); } to { transform: scaleY(1); } }
.pct, .tick { display: none; }
.pct { font-family: var(--serif); font-size: 38px; font-variant-numeric: tabular-nums; }
.tick { stroke: var(--acc); }
[data-state="work"] .eq, [data-state="done"] .eq { display: none; }
[data-state="work"] .pct { display: block; }
[data-state="done"] .tick { display: block; }
[data-state="work"] .bar, [data-state="done"] .bar { opacity: 1; }
[data-state="work"] .ring, [data-state="done"] .ring { animation: none; }
[data-state="work"] .ring::after, [data-state="done"] .ring::after { animation: none; }

.head { font-family: var(--serif); font-weight: 400; font-size: clamp(36px, 4.4vw, 58px); line-height: 1.08; letter-spacing: -.01em; margin: 6px 0 0; text-wrap: balance; overflow-wrap: anywhere; }
.lead { margin: 0; max-width: 46ch; color: var(--mut); font-size: 17px; line-height: 1.55; min-height: 3.1em; text-wrap: balance; }
.hint { margin: 0; color: var(--faint); font-size: 13px; letter-spacing: .04em; }
.actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 2px 14px; }
.link { min-height: 44px; padding: 0 8px; background: none; border: 0; color: var(--mut); font-size: 14px; text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .3); text-underline-offset: 5px; }
.link:hover { color: var(--fg); text-decoration-color: var(--acc); }
.pill { min-height: 52px; padding: 0 32px; border-radius: 26px; border: 0; background: var(--acc); color: var(--ink); font-weight: 600; font-size: 16px; letter-spacing: .01em; transition: transform .3s ease, filter .3s ease; }
.pill:hover { transform: translateY(-1px); filter: brightness(1.08); }
.panel { width: 100%; }
.panel textarea { width: 100%; min-height: 108px; padding: 14px 16px; border-radius: 18px; border: 1px solid var(--line); background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); resize: vertical; line-height: 1.6; }
.panel textarea::placeholder { color: var(--faint); }
.fine { margin: 0; color: var(--faint); font-size: 12px; max-width: 40ch; }

.cue { display: flex; justify-content: center; padding-block: 6px 2px; }
.cue button { min-height: 44px; display: inline-flex; align-items: center; gap: 10px; padding: 0 14px; background: none; border: 0; color: var(--mut); font-size: 14px; letter-spacing: .04em; }
.cue button:hover { color: var(--fg); }
.cue svg { stroke: var(--acc); animation: nudge 2.8s ease-in-out infinite alternate; }
@keyframes nudge { to { transform: translateY(4px); } }

.foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 24px; padding-block: 2px 22px; }
.site-footer { max-width: 1120px; margin: 0 auto; padding: 0 16px 28px; }
.legal-links { width: 100%; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 18px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--mut); font-size: 13px; }
.legal-links .link { padding: 0; min-height: 32px; }
.inline-legal { display: inline; min-height: 0; padding: 0; vertical-align: baseline; font-size: inherit; }
.legal-dialog { position: relative; max-width: 680px; max-height: min(86vh, 780px); overflow: auto; }
.legal-dialog h3 { padding-right: 38px; }
.legal-close { position: absolute; top: 16px; right: 16px; min-width: 38px; min-height: 38px; padding: 0; font-size: 24px; }
.legal-content { margin-top: 18px; color: var(--mut); line-height: 1.7; }
.legal-content h4 { margin: 18px 0 4px; color: var(--fg); font-size: 16px; font-weight: 600; }
.legal-content h4:first-child { margin-top: 0; }
.legal-content p { margin: 8px 0; }
.legal-content ul { padding-inline-start: 22px; }
.shelf { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; min-width: 0; }
.eyebrow { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); margin-right: 6px; }
.chip { min-height: 44px; display: inline-flex; align-items: center; gap: 9px; padding: 0 14px 0 10px; border-radius: 22px; border: 1px solid transparent; background: transparent; color: var(--mut); font-size: 14px; transition: background .3s ease, border-color .3s ease; }
.chip:hover { background: rgba(255, 255, 255, .07); border-color: var(--line); color: var(--fg); }
.chip i { width: 10px; height: 10px; border-radius: 50%; display: block; }
.chip small { color: var(--faint); font-size: 12px; font-variant-numeric: tabular-nums; }
.demo { display: flex; align-items: center; gap: 4px; color: var(--faint); font-size: 13px; min-width: 0; }
.demo b { color: var(--mut); font-weight: 500; }
.dots { display: flex; }
.dot { width: 44px; height: 44px; background: none; border: 0; display: grid; place-items: center; padding: 0; }
.dot span { width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, .35); transition: background .4s ease, transform .4s ease, box-shadow .4s ease; }
.dot[aria-pressed="true"] span { background: var(--acc); transform: scale(1.35); box-shadow: 0 0 12px var(--acc); }

/* ---------- the stages ---------- */
.story { max-width: 1120px; margin: 0 auto; padding-top: clamp(24px, 6vh, 64px); }
.step { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(24px, 5vw, 72px); align-items: center; padding-block: clamp(36px, 8vh, 84px); scroll-margin-top: calc(var(--head-h) + 6px); }
.step.flip .vis { order: 2; }
.vis { position: relative; min-width: 0; min-height: 340px; padding: 22px; border-radius: 30px; background: var(--card); border: 1px solid var(--line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); display: grid; place-items: center; overflow: hidden; }
.copy { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.copy .eyebrow { margin: 0; }
.copy h2 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(34px, 4.2vw, 56px); line-height: 1.08; letter-spacing: -.01em; text-wrap: balance; }
.copy p { margin: 0; max-width: 46ch; color: var(--mut); font-size: 17px; line-height: 1.6; text-wrap: pretty; }
.feats { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.feats li { padding: 7px 14px; border-radius: 20px; border: 1px solid var(--line); background: rgba(255, 255, 255, .04); color: var(--fg); font-size: 14px; }

/* split picture */


/* pictures picture */
.film { width: min(100%, 470px); display: flex; flex-direction: column; gap: 16px; }
.tiles { display: flex; gap: 10px; }
.tile { position: relative; flex: 1; min-width: 0; aspect-ratio: 3 / 4; border-radius: 16px; overflow: hidden; background: #111; }
.tile > i { position: absolute; inset: -6%; display: block; animation: kb 22s ease-in-out infinite alternate; }
.tile:nth-child(2) > i { animation-delay: -6s; } .tile:nth-child(3) > i { animation-delay: -11s; } .tile:nth-child(4) > i { animation-delay: -15s; }
@keyframes kb { from { transform: scale(1) translate(0, 0); } to { transform: scale(1.1) translate(-2.5%, -2%); } }
.tile .bdg { position: absolute; left: 6px; right: 6px; bottom: 6px; padding: 4px 6px; border-radius: 10px; background: rgba(8, 6, 20, .66); font-size: 11px; text-align: center; color: #fff; }
.tile.mine { outline: 2px dashed var(--acc); outline-offset: -3px; }
.desc { padding: 10px 16px; border-radius: 18px; background: var(--glass); border: 1px solid var(--line); font-size: 13px; color: var(--mut); font-style: italic; }

/* video picture */
.frames { width: min(100%, 500px); display: flex; align-items: flex-end; justify-content: center; gap: 16px; }
.fr { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; }
.fr small { font-size: 12px; color: var(--faint); letter-spacing: .06em; }
.vid { position: relative; width: 100%; overflow: hidden; border-radius: 12px; container-type: inline-size; display: grid; place-items: center; box-shadow: 0 10px 36px rgba(0, 0, 0, .45);
  background: linear-gradient(to top, rgba(6, 5, 16, .72), rgba(6, 5, 16, .1) 70%), radial-gradient(circle at 25% 15%, var(--acc2), transparent 62%), radial-gradient(circle at 85% 95%, var(--acc), transparent 58%), #0B0A18; }
.fr.w { width: 52%; } .fr.w .vid { aspect-ratio: 16 / 9; }
.fr.t { width: 21%; } .fr.t .vid { aspect-ratio: 9 / 16; }
.fr.s { width: 23%; } .fr.s .vid { aspect-ratio: 1 / 1; }
.mline { margin: 0; padding: 0 8%; text-align: center; line-height: 1.35; text-wrap: balance; }
.fr.w .mline { font-size: 7.4cqw; } .fr.t .mline { font-size: 14cqw; } .fr.s .mline { font-size: 11cqw; }
.mline.ar { font-family: var(--ar); font-weight: 700; }
.mline.en { font-family: var(--serif); font-style: italic; }

/* doors: the three things you can take */
.doors { width: 640px; max-width: calc(100vw - 32px); display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 6px; }
.door { flex: 1 1 180px; min-height: 100px; padding: 14px 18px; text-align: left; border-radius: 22px; border: 1px solid var(--line); background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); display: flex; flex-direction: column; gap: 3px; transition: transform .35s ease, border-color .35s ease, opacity .5s ease; }
.door b { font-family: var(--serif); font-weight: 400; font-size: 26px; line-height: 1.1; }
.door span { font-size: 13px; color: var(--mut); line-height: 1.4; }
.door em { margin-top: auto; padding-top: 6px; font-style: normal; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.door:disabled { opacity: .55; }
.door[data-ready="1"] em { color: var(--acc); }
.door[data-ready="1"]:hover { transform: translateY(-3px); border-color: var(--acc); }
.stack { width: min(100%, 500px); display: flex; flex-direction: column; align-items: center; gap: 20px; }

.eg { margin: 0; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.docs { width: 100%; display: grid; grid-template-columns: 1fr; gap: 12px; }
.doc { position: relative; padding: 16px 18px; border-radius: 18px; border: 1px solid var(--line); background: var(--glass); }
.doc .ext { position: absolute; top: 12px; right: 12px; }
.doc pre { margin: 0; padding-right: 48px; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 12.5px; line-height: 1.7; color: var(--mut); white-space: pre-wrap; overflow-wrap: anywhere; }
.players { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pl { --c: var(--acc); display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 22px 14px 14px; border-radius: 22px; border: 1px solid var(--line); background: var(--glass); }
.pl.m { --c: var(--acc2); }
.pl b { margin-top: 12px; font-family: var(--serif); font-weight: 400; font-size: 24px; line-height: 1.1; }
.pl small { font-size: 12px; color: var(--mut); }
.orb { position: relative; width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; color: var(--ink); background: radial-gradient(circle at 35% 30%, #fff7e6, var(--c) 48%, color-mix(in srgb, var(--c) 40%, #000) 100%); box-shadow: 0 0 40px color-mix(in srgb, var(--c) 55%, transparent); transition: transform .3s ease, box-shadow .3s ease; }
.orb:hover { transform: scale(1.06); }
.orb svg { grid-area: 1 / 1; transition: opacity .2s ease; }
.orb .ic-play { margin-left: 4px; }
.orb .ic-pause { opacity: 0; }
.pl.on .orb { animation: beat 1.6s ease-in-out infinite; box-shadow: 0 0 64px color-mix(in srgb, var(--c) 80%, transparent); }
.pl.on .ic-play { opacity: 0; } .pl.on .ic-pause { opacity: 1; }
@keyframes beat { 50% { transform: scale(1.07); } }
.seek { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; margin: 14px 0 0; background: transparent; cursor: pointer; --p: 0%; }
.seek::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(90deg, var(--c) var(--p), rgba(255, 255, 255, .18) var(--p)); }
.seek::-moz-range-track { height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .18); }
.seek::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--c); }
.seek::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; margin-top: -6px; border-radius: 50%; background: #fff; box-shadow: 0 0 12px var(--c); }
.seek::-moz-range-thumb { width: 16px; height: 16px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 0 12px var(--c); }
.tm2 { width: 100%; display: flex; justify-content: space-between; font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }
.tm2 i { font-style: normal; }
@media (prefers-reduced-motion: reduce) { .pl.on .orb, .pl.busy .orb::after, .pl.loading .orb::after { animation: none; } }
@media (prefers-reduced-motion: reduce) { .pl.busy .orb::before, .loading-dots i { animation: none; } }
.stack .srt, .stack .players { width: 100%; }
.files { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.file { display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, .06); font-size: 13px; color: var(--fg); }
.ext { padding: 3px 8px; border-radius: 8px; background: var(--acc); color: var(--ink); font-size: 11px; font-weight: 700; letter-spacing: .06em; }
.tiles.sm { width: 100%; }
.tiles.sm .tile { aspect-ratio: 16 / 11; border-radius: 12px; }
.stack .frames { width: 100%; }

.go { min-height: 56px; min-width: 200px; padding: 0 40px; margin: 6px 0 4px; border: 0; border-radius: 999px; background: var(--acc); color: var(--ink); font-size: 18px; font-weight: 600; letter-spacing: .02em; box-shadow: 0 0 40px color-mix(in srgb, var(--acc) 45%, transparent); transition: transform .3s ease, box-shadow .3s ease; }
.go:hover { transform: translateY(-2px) scale(1.03); box-shadow: 0 0 56px color-mix(in srgb, var(--acc) 65%, transparent); }
.srt { width: 100%; border-radius: 20px; border: 1px solid var(--line); background: rgba(8, 7, 20, .55); overflow: hidden; }
.srt-h { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--mut); }
.srt-b { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 14px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; line-height: 1.55; }
.cue2 { display: flex; flex-direction: column; color: var(--faint); }
.cue2 em { font-style: normal; color: var(--mut); }
.cue2 strong { font-family: var(--sans, inherit); font-weight: 500; font-size: 16px; color: var(--fg); margin-top: 2px; }
.cue2 .flag { align-self: flex-start; margin-top: 6px; }

.close { text-align: center; padding-block: clamp(48px, 10vh, 110px) clamp(32px, 6vh, 64px); display: flex; flex-direction: column; align-items: center; gap: 22px; }
.close h2 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(38px, 5vw, 68px); line-height: 1.06; letter-spacing: -.01em; }
.end { text-align: center; color: var(--faint); font-size: 13px; padding-bottom: 36px; }

.toast { position: fixed; z-index: 11; left: 50%; bottom: calc(26px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 12px); max-width: calc(100% - 32px); padding: 11px 20px; border-radius: 24px; background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .4s ease, transform .4s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 859px) {
  .step { grid-template-columns: 1fr; gap: 24px; }
  .step.flip .vis { order: 0; }
  .vis { min-height: 300px; }
}
@media (max-width: 640px) {
  :root { --head-h: 64px; }
  .mark { font-size: 26px; }
  .staff { width: 46vw; height: 46px; }
  .note { width: 36px; margin-left: -18px; }
  .note span { display: none; }
  .ring { width: 124px; height: 124px; }
  .eq { height: 40px; }
  .eq i:nth-child(3) { height: 38px; }
  .pct { font-size: 32px; }
  .lead { font-size: 16px; }
  .shelf { display: none; }
  .demo .pre { display: none; }
  .foot { justify-content: center; }
  .vis { padding: 16px; border-radius: 24px; }
  .ln { font-size: 20px; } .act .ln { font-size: 22px; }
}
@media (max-height: 760px) and (min-width: 641px) {
  .hero { min-height: 140px; }
  .main { gap: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .blob, .mark, .eq i, .ring, .ring::after, .p-disc, .tile > i, .cue svg { animation: none !important; }
  .scene { transition-duration: 1s; }
}

/* ======================================================================
   The app
   ====================================================================== */
.hide, [hidden] { display: none !important; }
html { scroll-behavior: auto; }
.mut { color: var(--mut); font-size: 14px; }
.err { color: #ffb3b3; white-space: pre-wrap; font-size: 14px; min-height: 0; }
.err:empty { display: none; }
.ok { color: var(--acc); }
a { color: var(--acc); }
audio { color-scheme: dark; }

/* fields */
:where(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=file]), select, textarea) {
  width: 100%; min-height: 44px; padding: 0 14px; border-radius: 14px; border: 1px solid var(--line);
  background: rgba(255, 255, 255, .06); color: var(--fg); font: inherit; font-size: 15px;
}
:where(textarea) { padding: 12px 14px; line-height: 1.55; min-height: 80px; resize: vertical; }
:where(select) { appearance: none; -webkit-appearance: none; padding-right: 34px; background-image: linear-gradient(45deg, transparent 50%, var(--mut) 50%), linear-gradient(135deg, var(--mut) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
option { background: #120e26; color: #fff; }
input[type=color] { width: 52px; height: 44px; padding: 3px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, .06); }
input[type=range] { width: 100%; accent-color: var(--acc); min-height: 32px; }
input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--acc); flex: none; }
input[type=file]:not(.sr) { color: var(--mut); font-size: 14px; max-width: 100%; }
::placeholder { color: var(--faint); }
label.f { display: flex; flex-direction: column; gap: 6px; font-size: 13px; letter-spacing: .04em; color: var(--mut); min-width: 0; }
label.chk { display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--fg); letter-spacing: 0; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }

/* buttons */
.btn { min-height: 44px; padding: 0 20px; border-radius: 22px; border: 1px solid var(--line); background: rgba(255, 255, 255, .06); color: var(--fg); display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 14px; text-decoration: none; transition: background .3s ease, border-color .3s ease, transform .3s ease; }
.btn:hover:not(:disabled) { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .4); }
.btn.p { background: var(--acc); color: var(--ink); border-color: transparent; font-weight: 600; }
.btn.p:hover:not(:disabled) { filter: brightness(1.08); background: var(--acc); }
.btn.big { min-height: 52px; padding: 0 30px; font-size: 16px; border-radius: 26px; }
.btn.sm { min-height: 36px; padding: 0 14px; font-size: 13px; border-radius: 18px; }
.btn.ghost { background: transparent; }
.btn:disabled { opacity: .45; }
.btn.is-busy::before, .status-busy::before { content: ""; width: 14px; height: 14px; flex: none; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
.status-busy::before { display: inline-block; margin-inline-end: 6px; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }
label.btn { cursor: pointer; }
.tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
.ib { min-width: 36px; min-height: 36px; padding: 0 8px; border-radius: 10px; border: 0; background: rgba(255, 255, 255, .07); color: var(--fg); font-size: 14px; }
.ib:hover:not(:disabled) { background: rgba(255, 255, 255, .16); }
.ib:disabled { opacity: .35; }

/* header: account */
.right { display: flex; align-items: center; gap: 12px; }
.acctwrap { position: relative; }
.acct { min-height: 44px; display: inline-flex; align-items: center; gap: 10px; padding: 0 16px 0 6px; border-radius: 24px; border: 1px solid var(--line); background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); color: var(--fg); font-size: 14px; white-space: nowrap; }
.acct:hover { border-color: rgba(255, 255, 255, .4); }
.acct .av { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--acc); color: var(--ink); font-weight: 700; font-size: 14px; }
.acct:not(.in) { padding-left: 16px; }
.acct:not(.in) .av { display: none; }
.menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 20; min-width: 236px; padding: 8px; border-radius: 20px; background: rgba(14, 10, 32, .94); border: 1px solid var(--line); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); box-shadow: 0 18px 50px rgba(0, 0, 0, .5); }
.menu .who { padding: 10px 12px 12px; margin-bottom: 6px; border-bottom: 1px solid var(--line); }
.menu .who b { display: block; font-weight: 500; font-size: 14px; overflow: hidden; text-overflow: ellipsis; }
.menu .who span { font-size: 13px; color: var(--acc); }
.menu button { display: flex; width: 100%; min-height: 42px; align-items: center; padding: 0 12px; border: 0; border-radius: 12px; background: none; color: var(--fg); text-align: left; font-size: 14px; }
.menu button:hover { background: rgba(255, 255, 255, .09); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }

/* dialogs */
dialog { width: calc(100% - 32px); max-width: 440px; padding: 26px; border-radius: 26px; border: 1px solid var(--line); background: #120e26; color: var(--fg); box-shadow: 0 30px 90px rgba(0, 0, 0, .6); }
dialog::backdrop { background: rgba(4, 3, 12, .72); backdrop-filter: blur(5px); }
dialog h3 { margin: 0 0 6px; font-family: var(--serif); font-weight: 400; font-size: 32px; line-height: 1.1; }
dialog .stack2 { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; }
dialog .ledger { max-height: 190px; overflow: auto; border-radius: 14px; border: 1px solid var(--line); }
.lrow { display: flex; justify-content: space-between; padding: 9px 14px; font-size: 14px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.lrow:last-child { border-bottom: 0; }
.bal { font-family: var(--serif); font-size: 52px; line-height: 1; color: var(--acc); }
.rowf { display: flex; gap: 10px; }
.rowf > input { flex: 1; min-width: 0; }
dialog textarea[readonly] { min-height: 70px; font-family: ui-monospace, Menlo, monospace; font-size: 13px; }
.confirm-dialog { max-width: 520px; }
.confirm-dialog h3 { font-family: inherit; font-size: 20px; font-weight: 600; }
.confirm-dialog #confirmMessage { margin: 12px 0 0; line-height: 1.6; white-space: pre-line; }
.confirm-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.confirm-actions button { min-width: 104px; }
.confirm-actions .danger { border-color: rgba(255, 120, 145, .55); background: rgba(255, 120, 145, .16); }
.status-note:not(:empty) { max-width: 100%; margin-block: 12px 20px; padding: 10px 14px; border: 1px solid var(--line); border-inline-start: 3px solid var(--acc); border-radius: 12px; background: rgba(255,255,255,.035); color: var(--mut); line-height: 1.6; }
.status-note:empty { display: none; }

/* home: upload extras */
#ready, #idle { align-items: center; }
.langrow { display: inline-flex; align-items: center; gap: 8px; color: var(--mut); font-size: 14px; }
.langrow select { width: auto; min-height: 38px; font-size: 14px; border-radius: 19px; padding: 0 30px 0 14px; }
.consent { display: flex; align-items: flex-start; gap: 10px; max-width: 46ch; text-align: left; font-size: 13px; color: var(--mut); line-height: 1.45; }
.consent input { margin-top: 1px; }
.consent.needs-confirm { color: #ffd0d0; background: rgba(255, 105, 105, .12); outline: 2px solid rgba(255, 130, 130, .8); outline-offset: 6px; border-radius: 6px; }
.consent.needs-confirm input { outline: 2px solid #ff8a8a; outline-offset: 3px; }
.quote { min-height: 20px; margin: 0; font-size: 14px; color: var(--acc); }
.quote.error { color: #ffb3b3; }
.tip { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; max-width: 46ch; padding: 12px 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--glass); text-align: left; font-size: 13px; color: var(--mut); }
.tip b { color: var(--fg); font-weight: 500; }
.songsec { width: 100%; max-width: 1120px; margin-top: 8px; display: flex; flex-direction: column; gap: 12px; text-align: left; }
.songlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.songlist .mut { grid-column: 1 / -1; }
.song { display: flex; border-radius: 20px; border: 1px solid var(--line); background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); overflow: hidden; transition: border-color .3s ease, transform .3s ease; }
.song:hover { border-color: var(--acc); transform: translateY(-2px); }
.song .open { flex: 1; min-width: 0; min-height: 60px; padding: 0 16px; background: none; border: 0; display: flex; flex-direction: column; justify-content: center; gap: 1px; text-align: left; color: var(--fg); }
.sn { font-family: var(--serif); font-size: 22px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ss { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--acc2); }
.song .del { width: 48px; background: none; border: 0; color: var(--faint); font-size: 22px; }
.song .del:hover { color: #ff9a9a; }

/* the open song */
.proj { max-width: 1120px; margin: 0 auto; padding-bottom: 72px; }
.pbar { position: sticky; top: calc(var(--head-h) + env(safe-area-inset-top, 0px)); z-index: 8; isolation: isolate; display: flex; align-items: center; gap: 14px; min-height: 64px; }
.pbar::before { content: ""; position: absolute; inset: 0 calc(50% - 50vw); z-index: -1; background: linear-gradient(rgba(7, 6, 15, .88), rgba(7, 6, 15, .7)); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid rgba(255, 255, 255, .08); }
.back { min-height: 44px; padding: 0 14px 0 10px; border-radius: 22px; border: 1px solid var(--line); background: transparent; color: var(--mut); font-size: 14px; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.back:hover { color: var(--fg); border-color: rgba(255, 255, 255, .4); }
.pname { margin: 0; flex: 0 1 auto; min-width: 0; font-family: var(--serif); font-weight: 400; font-size: 28px; line-height: 1.1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pbar audio { flex: 1 1 260px; min-width: 0; height: 40px; }
.screen { padding-top: clamp(20px, 4vh, 40px); display: flex; flex-direction: column; gap: 22px; }
.sh { display: flex; flex-direction: column; gap: 8px; }
.sh .eyebrow { margin: 0; }
.sh h2 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(34px, 4.2vw, 52px); line-height: 1.08; letter-spacing: -.01em; }
.sh p { margin: 0; max-width: 60ch; color: var(--mut); font-size: 16px; line-height: 1.55; }
.card { padding: 22px; border-radius: 26px; background: var(--card); border: 1px solid var(--line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.card h3 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 26px; line-height: 1.15; }
.card > .mut:first-child, .card h3 + .mut { margin-top: -8px; }
details.adv { border-radius: 16px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); }
details.adv > summary { list-style: none; cursor: pointer; min-height: 44px; display: flex; align-items: center; padding: 0 16px; font-size: 14px; color: var(--mut); }
details.adv > summary::-webkit-details-marker { display: none; }
details.adv > summary::after { content: "+"; margin-left: auto; color: var(--faint); font-size: 18px; }
details.adv[open] > summary::after { content: "–"; }
details.adv[open] > summary { color: var(--fg); }
details.adv > .in { padding: 4px 16px 16px; display: flex; flex-direction: column; gap: 14px; }

/* words */
.nowbox { min-height: 132px; padding: 18px 22px; border-radius: 28px; background: var(--card); border: 1px solid var(--line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); display: grid; place-items: center; text-align: center; }
.now { --dir: to left; direction: rtl; margin: 0; font-family: var(--ar); font-weight: 700; font-size: clamp(28px, 4vw, 48px); line-height: 1.5; text-wrap: balance; filter: drop-shadow(0 0 26px color-mix(in srgb, var(--acc) 34%, transparent)); }
.now.ltr { --dir: to right; direction: ltr; font-family: var(--serif); font-style: italic; font-weight: 400; }
.now span { background-image: linear-gradient(var(--dir), var(--acc) var(--p, 0%), rgba(255, 255, 255, .55) var(--p, 0%)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.now.upcoming { filter: none; opacity: .48; }
.now.upcoming span { background: none; color: var(--mut); }
.now:empty::before { content: "Press play and the words light up as they are sung."; font: 400 15px/1.5 var(--sans); color: var(--faint); }
.format-gate { width: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255, 255, 255, .025); }
.format-gate > p { flex: 1 1 100%; margin: 0; }
.format-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.format-buttons button:disabled { opacity: .5; cursor: not-allowed; }
.format-gate[data-unlocked="1"] > p, .format-gate[data-unlocked="1"] #lyricsUnlockBtn { display: none; }
.stem-price { margin: -10px 0 0; font-size: 13px; }
#drop[data-state="work"] .lead::before { content: ""; display: inline-block; width: 13px; height: 13px; margin-inline-end: 8px; vertical-align: -1px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
.bar2 { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.bar2 .sp { flex: 1; }
.bar2 select { width: auto; min-height: 38px; border-radius: 19px; font-size: 14px; }
.chkline { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--mut); min-height: 38px; }
details.more { position: relative; }
details.more > summary { list-style: none; cursor: pointer; min-height: 38px; padding: 0 16px; display: inline-flex; align-items: center; border-radius: 19px; border: 1px solid var(--line); background: rgba(255, 255, 255, .06); font-size: 14px; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > .pop { position: fixed; z-index: 30; left: 12px; top: 12px; width: min(320px, calc(100vw - 24px)); max-height: min(72vh, 520px); overflow: auto; overscroll-behavior: contain; padding: 8px; border-radius: 18px; background: rgba(14, 10, 32, .97); border: 1px solid var(--line); box-shadow: 0 18px 50px rgba(0, 0, 0, .5); }
details.more .pop button { display: flex; width: 100%; min-height: 56px; flex-direction: column; align-items: flex-start; justify-content: center; gap: 3px; padding: 8px 12px; border: 0; border-radius: 12px; background: none; color: var(--fg); text-align: start; font-size: 14px; line-height: 1.35; }
details.more .pop button small { color: var(--mut); font-size: 12px; font-weight: 400; line-height: 1.35; white-space: normal; }
details.more .pop button:hover { background: rgba(255, 255, 255, .09); }
.lines { max-height: min(62vh, 660px); overflow: auto; display: flex; flex-direction: column; gap: 4px; padding: 8px; border-radius: 24px; border: 1px solid var(--line); background: var(--card); scroll-behavior: auto; }
.ln { padding: 8px 10px; border-radius: 16px; border: 1px solid transparent; transition: background .3s ease; }
.ln.on { background: rgba(255, 255, 255, .08); border-color: var(--line); }
.ln.chk { box-shadow: inset 3px 0 0 var(--acc2); }
.lr { display: flex; align-items: center; gap: 8px; }
.ln .t { width: 82px; flex: none; min-height: 38px; padding: 0 6px; text-align: center; font-variant-numeric: tabular-nums; font-size: 13px; color: var(--mut); }
.ln .tx { flex: 1; min-width: 0; min-height: 40px; font-size: 18px; }
.ln input { background: transparent; border-color: transparent; }
.ln input:hover, .ln input:focus { background: rgba(255, 255, 255, .07); border-color: var(--line); }
.wn { flex: none; padding: 1px 9px; border-radius: 10px; border: 1px solid var(--acc2); color: var(--acc2); font-size: 11px; letter-spacing: .04em; }
.ib.play { color: var(--acc); }
.trl { padding: 2px 12px 4px 98px; font-size: 14px; color: var(--mut); }
.sg { margin: 6px 0 2px 90px; padding: 10px 12px; border-radius: 14px; background: rgba(255, 255, 255, .06); font-size: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.sg small { color: var(--faint); }
#tlwrap { display: flex; flex-direction: column; gap: 10px; padding: 0 16px 16px; }
#tl { width: 100%; height: 190px; border-radius: 14px; background: #0A0818; touch-action: none; cursor: grab; display: block; }
.zoomrow { display: flex; align-items: center; gap: 12px; }
.zoomrow input { flex: 1; }

/* tracks */
.players.big { max-width: 560px; }
.dl3 { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.dl3 select { width: auto; min-height: 44px; border-radius: 22px; }
.pl .orb:disabled { opacity: .4; box-shadow: none; }
.pl.busy .orb:disabled, .pl.loading .orb:disabled { opacity: .88; }
.pl .seek:disabled { opacity: .4; }
button.orb { border: 0; padding: 0; }
.dl3 [data-stem="vocals"] { --track-color: var(--acc); }
.dl3 [data-stem="music"] { --track-color: var(--acc2); }
.dl3 [data-stem] { background: var(--track-color); color: var(--ink); border-color: transparent; }
.dl3 [data-stem].btn.p:hover:not(:disabled) { background: var(--track-color); }
.dl3 [data-stem="song"] { color: var(--fg); background: rgba(255,255,255,.06); border: 1px solid var(--line); }
.dl3 [data-stem="song"]:hover:not(:disabled) { color: var(--fg); background: rgba(255,255,255,.12); }
.pl.busy .orb::before { content: ""; position: absolute; inset: -15px; border: 1px solid color-mix(in srgb, var(--c) 38%, transparent); border-radius: 50%; animation: orb-pulse 1.5s ease-out infinite; pointer-events: none; }
.pl.busy .orb::after, .pl.loading .orb::after { content: ""; position: absolute; inset: -8px; border: 3px solid color-mix(in srgb, var(--c) 24%, transparent); border-top-color: var(--c); border-inline-end-color: var(--c); border-radius: 50%; animation: orb-spin .9s linear infinite; pointer-events: none; }
.pl.busy .orb .ic-play { opacity: .25; }
.track-status { display: flex; min-height: 1.6em; align-items: center; gap: 8px; }
.loading-dots { display: inline-flex; align-items: center; gap: 4px; }
.loading-dots i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .35; animation: dot-pulse 1s ease-in-out infinite; }
.loading-dots i:nth-child(2) { animation-delay: .16s; }
.loading-dots i:nth-child(3) { animation-delay: .32s; }
@keyframes orb-pulse { 0% { transform: scale(.82); opacity: .75; } 100% { transform: scale(1.18); opacity: 0; } }
@keyframes dot-pulse { 50% { opacity: 1; transform: translateY(-2px); } }
@keyframes orb-spin { to { transform: rotate(360deg); } }

/* video */
.vgrid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: 22px; align-items: start; }
.vcol { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.vstick { position: sticky; top: calc(var(--head-h) + 64px + 14px); }
.stage { display: grid; place-items: center; min-height: 160px; padding: 14px; border-radius: 20px; background: rgba(0, 0, 0, .35); }
.stage canvas { width: 100%; max-height: 62vh; object-fit: contain; border-radius: 12px; display: block; }
.stage audio { width: 100%; margin-top: 12px; }
.seg { display: grid; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); gap: 8px; }
.seg button { min-height: 62px; padding: 10px 14px; text-align: left; border-radius: 16px; border: 1px solid var(--line); background: rgba(255, 255, 255, .04); color: var(--fg); font-size: 14px; font-weight: 500; transition: border-color .3s ease, background .3s ease; }
.seg button small { display: block; margin-top: 2px; color: var(--mut); font-size: 12px; font-weight: 400; line-height: 1.35; }
.seg button.on { border-color: var(--acc); background: color-mix(in srgb, var(--acc) 14%, transparent); }
.seg button:disabled { opacity: .45; }
.presets { display: flex; flex-wrap: wrap; gap: 8px; }
.fprev { height: 62px; min-width: 0; padding: 8px 14px; border-radius: 14px; background: rgba(0, 0, 0, .3); font-size: 26px; text-align: center; line-height: 1.4; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.translation-settings { display: flex; flex-direction: column; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255, 255, 255, .025); }
.translation-settings .chkline { min-height: 28px; color: var(--fg); }
.lang-pill { display: inline-flex; align-items: center; min-width: 0; min-height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; color: var(--fg); background: rgba(255, 255, 255, .04); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cost-summary, #imcost { min-height: 1.5em; }
.cost-summary { margin: -8px 0 0; }
#genbtn { min-width: 220px; justify-content: flex-start; }
.sclist { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.sclist:empty { display: none; }
.sc { border-radius: 20px; border: 1px solid var(--line); background: var(--glass); overflow: hidden; display: flex; flex-direction: column; }
.th { width: 100%; display: grid; place-items: center; background: #0C0A1A; color: var(--faint); font-size: 13px; overflow: hidden; min-height: 90px; }
.th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sb { padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.sb .meta { font-size: 12px; color: var(--faint); letter-spacing: .04em; }
.sb .lyr { margin: 0; font-size: 14px; color: var(--mut); max-height: 3.2em; overflow: hidden; }
.sb textarea { min-height: 72px; font-size: 13px; }
.meter { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .14); overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; background: var(--acc); transition: width .3s ease; box-shadow: 0 0 10px var(--acc); }
#rstage { font-size: 14px; color: var(--mut); margin-bottom: 8px; }
#vprev { width: 100%; border-radius: 14px; background: #000; }
#thc { width: 100%; max-width: 480px; border-radius: 12px; }

@media (max-width: 900px) {
  .vgrid { grid-template-columns: 1fr; }
  .vstick { position: static; }
}
@media (max-width: 640px) {
  .right { gap: 8px; }
  .acct { padding: 0 12px 0 4px; font-size: 13px; }
  .acct:not(.in) { padding-left: 12px; }
  .acct .av { width: 28px; height: 28px; }
  .staff { width: 36vw; }
  .mark { font-size: 22px; }
  .pbar { flex-wrap: wrap; gap: 6px 10px; padding-block: 8px; }
  .pname { font-size: 22px; flex: 1; }
  .pbar audio { flex-basis: 100%; }
  .back { padding: 0 12px 0 8px; }
  .card { padding: 16px; border-radius: 22px; }
  .lr { flex-wrap: wrap; }
  .ln .tx { order: 5; flex: 1 1 100%; }
  .trl, .sg { padding-left: 12px; margin-left: 0; }
  .players { gap: 10px; }
  .orb { width: 72px; height: 72px; }
}
.mut:empty, .err:empty { display: none; }

/* fourth example scene */
.s3 { --base: #0B0820; --c1: #8A5CFF; --c2: #2FB5E8; --c3: #2B1B66; }

/* header chips */
.chip2 { min-height: 44px; display: inline-flex; align-items: center; gap: 7px; padding: 0 14px; border-radius: 24px; border: 1px solid var(--line); background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); color: var(--fg); font-size: 14px; white-space: nowrap; }
.chip2:hover { border-color: rgba(255, 255, 255, .4); }
.chip2 svg { color: var(--acc); }
.chip2.lang { width: auto; min-width: 88px; padding: 0 12px; justify-content: center; font-size: 14px; cursor: pointer; }

/* the picture wheel */
.carwrap { position: relative; border-radius: 22px; background: rgba(0, 0, 0, .28); border: 1px solid var(--line); }
.car { --fw: 260px; --fh: 146px; position: relative; height: calc(var(--fh) + 72px); perspective: 1100px; perspective-origin: 50% 45%; overflow: hidden; touch-action: pan-y; cursor: grab; user-select: none; -webkit-user-select: none; border-radius: 22px; }
.car:active { cursor: grabbing; }
.ring3d { position: absolute; left: 50%; top: 36px; width: var(--fw); height: var(--fh); margin-left: calc(var(--fw) / -2); transform-style: preserve-3d; transition: transform .7s cubic-bezier(.2, .7, .2, 1); }
.face { position: absolute; inset: 0; padding: 0; border: 0; background: none; color: inherit; backface-visibility: hidden; -webkit-backface-visibility: hidden; opacity: .5; transition: opacity .5s ease; cursor: pointer; }
.face.front { opacity: 1; }
.fi { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 14px; overflow: hidden; background: #0C0A1A; border: 1px solid rgba(255, 255, 255, .18); box-shadow: 0 12px 30px rgba(0, 0, 0, .5); color: var(--faint); font-size: 12px; transition: transform .35s ease, box-shadow .35s ease; }
.fi img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.face.front:hover .fi, .face.front:focus-visible .fi { transform: scale(1.1); box-shadow: 0 18px 50px rgba(0, 0, 0, .6), 0 0 30px color-mix(in srgb, var(--acc) 40%, transparent); }
.fb { position: absolute; left: 8px; top: 8px; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 12px; background: rgba(8, 6, 20, .74); display: grid; place-items: center; font-size: 12px; }
.face.front .fb { background: var(--acc); color: var(--ink); }
.cbtn { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: rgba(10, 8, 24, .72); color: var(--fg); font-size: 26px; line-height: 1; padding: 0 0 3px; }
.cbtn.prev { left: 10px; } .cbtn.next { right: 10px; }
.cbtn:hover { border-color: var(--acc); }
.sclist { grid-template-columns: 1fr; max-width: 640px; }
.sclist .sc:not(.cur) { display: none; }
.sclist .th { display: none; }
dialog.lb { position: relative; max-width: min(92vw, 1100px); width: auto; max-height: 92vh; padding: 42px 58px 14px; text-align: center; overflow: auto; }
.lb img { max-width: 100%; max-height: 78vh; border-radius: 14px; display: block; margin: 0 auto; object-fit: contain; }
.lb p { margin: 10px 0 0; }
.lbnav, .lbclose { position: absolute; z-index: 1; display: grid; place-items: center; border: 1px solid var(--line); background: rgba(10, 8, 24, .82); color: var(--fg); }
.lbnav { top: 50%; width: 44px; height: 44px; border-radius: 50%; transform: translateY(-50%); font-size: 28px; line-height: 1; }
.lbnav.prev { left: 8px; } .lbnav.next { right: 8px; }
.lbclose { top: 7px; right: 7px; width: 34px; height: 34px; border-radius: 50%; font-size: 23px; line-height: 1; }
.lbnav:hover:not(:disabled), .lbclose:hover { border-color: var(--acc); }
.lbnav:disabled { opacity: .35; }
@media (max-width: 640px) { dialog.lb { max-width: 96vw; padding: 42px 42px 12px; } .lb img { max-height: 74vh; } }
@media (prefers-reduced-motion: reduce) { .ring3d, .face, .fi { transition: none; } }

/* right-to-left (Arabic) */
.staff { direction: ltr; }
.pl .seek, .tm2, #tl, .zoomrow input { direction: ltr; }
[dir=rtl] .menu { right: auto; left: 0; }
[dir=rtl] details.more > .pop { left: auto; right: 0; }
[dir=rtl] .menu button, [dir=rtl] .seg button, [dir=rtl] details.more .pop button, [dir=rtl] .consent, [dir=rtl] .tip, [dir=rtl] .songsec, [dir=rtl] .song .open { text-align: right; }
[dir=rtl] .trl { padding: 2px 98px 4px 12px; }
[dir=rtl] .sg { margin: 6px 90px 2px 0; }
[dir=rtl] :where(select) { padding-right: 14px; padding-left: 34px; background-position: 18px 50%, 13px 50%; }
[dir=rtl] .ln .t { direction: ltr; }
[dir=rtl] .eyebrow { margin-right: 0; margin-left: 6px; }
[dir=rtl] .acct { padding: 0 6px 0 16px; }
[dir=rtl] .acct:not(.in) { padding-right: 16px; }
[dir=rtl] details.adv > summary::after { margin-left: 0; margin-right: auto; }
[dir=rtl] .cue svg, [dir=rtl] .tag svg { transform: scaleX(-1); }
[dir=rtl] .back { padding: 0 10px 0 14px; }
[dir=rtl] body { font-family: var(--sans); }
@media (max-width: 640px) {
  .chip2 { padding: 0 10px; min-height: 40px; }
  .chip2.lang { width: auto; min-width: 80px; }
  .car { height: calc(var(--fh) + 60px); }
  .ring3d { top: 28px; }
}

/* phone: the staff becomes a bottom bar so the header keeps room for credits, language and account */
@media (max-width: 640px) {
  body { padding-bottom: calc(90px + env(safe-area-inset-bottom, 0px)); }
  .staff { position: fixed; left: 0; right: 0; bottom: 0; width: auto; height: calc(80px + env(safe-area-inset-bottom, 0px)); z-index: 9; background: rgba(7, 6, 15, .92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid rgba(255, 255, 255, .1); }
  .staff::before { left: 22px; right: 22px; top: 8px; }
  .note span { display: block; }
  .toast { bottom: calc(100px + env(safe-area-inset-bottom, 0px)); }
}
.vgrid > .vcol:first-child { align-self: stretch; }


/* Keep account controls from shifting the navigation when session data arrives. */
.right { width: 280px; flex: 0 0 280px; justify-content: flex-end; gap: 12px; }
.cred-slot { width: 70px; flex: 0 0 70px; display: flex; justify-content: center; }
.cred-slot .chip2 { width: 100%; justify-content: center; padding-inline: 0; }
.acctwrap { width: 142px; min-width: 0; flex: 0 0 142px; }
.acct { width: 100%; min-width: 0; overflow: hidden; }
#acctTxt { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct .av { flex: 0 0 auto; }

/* Keep the preview and its playback controls in view together. */
.preview-card { padding: 16px; gap: 10px; }
.preview-card .stage { min-height: 0; padding: 8px; }
.preview-card .stage canvas { max-height: min(34vh, 340px); }
.preview-card audio { width: 100%; min-height: 40px; margin: 0; }

@media (max-width: 900px) and (min-width: 641px) {
  .right { width: 236px; flex-basis: 236px; gap: 8px; }
  .cred-slot { width: 60px; flex-basis: 60px; }
  .acctwrap { width: 116px; flex-basis: 116px; }
  .staff { width: min(340px, 36vw); }
}
@media (max-width: 640px) {
  .right { width: auto; flex: 0 0 auto; gap: 6px; }
  .cred-slot { width: 52px; flex-basis: 52px; }
  .acctwrap { width: 102px; flex-basis: 102px; }
  .preview-card .stage canvas { max-height: min(34vh, 300px); }
}
@media (max-width: 400px) {
  .mark { font-size: 20px; }
  .right { gap: 4px; }
  .right .chip2.lang { width: auto; min-width: 76px; }
  .cred-slot { width: 44px; flex-basis: 44px; }
  .acctwrap { width: 76px; flex-basis: 76px; }
}


/* Language tags and language-aware video style controls. */
.song-language-settings { display: flex; flex-direction: column; gap: 12px; }
.language-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; min-height: 34px; margin-top: 6px; }
.language-tag { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 2px 6px 2px 10px; border-radius: 16px; border: 1px solid color-mix(in srgb, var(--acc) 55%, transparent); background: color-mix(in srgb, var(--acc) 12%, transparent); color: var(--fg); font-size: 13px; }
.language-tag button { width: 22px; height: 22px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--mut); line-height: 1; }
.language-tag button:hover:not(:disabled) { background: rgba(255,255,255,.12); color: var(--fg); }
.language-tag button:disabled { opacity: .4; }
#sourceLangAdd, #capLangAdd { width: auto; min-width: 180px; min-height: 38px; margin-top: 8px; border-radius: 12px; }
.source-fonts { gap: 10px; }
.source-fonts .f { min-width: 0; }
.source-fonts .fprev { height: 42px; margin-top: 4px; padding-block: 3px; font-size: 18px; }
#trcontrols { align-items: start; }
.meta-fields { display: flex; flex-direction: column; gap: 12px; }
.meta-fields .f { min-width: 0; }
.meta-fields textarea { min-height: 100px; padding-inline-end: 54px; resize: vertical; }
.meta-copy-wrap { position: relative; }
.meta-copy { position: absolute; top: 8px; right: 8px; width: 36px; height: 36px; display: grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 11px; background: rgba(10,8,24,.86); color: var(--mut); }
.meta-copy:hover { color: var(--acc); border-color: var(--acc); }
.meta-copy svg { width: 17px; height: 17px; }
.meta-count { display: block; margin-top: 4px; color: var(--faint); font-size: 12px; text-align: end; }
[dir=rtl] .meta-copy { right: auto; left: 8px; }
