/* GlennZero base styles. Brand: red #D3413F on dark #121313. */
:root { --bg: #121313; --panel: #1b1c1c; --line: #2c2d2d; --text: #f2f2f2; --muted: #a8a8a8; --red: #D3413F; --ok: #4caf7a; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 "Public Sans", system-ui, sans-serif; }
a { color: var(--text); }
.wrap { max-width: 960px; margin: 0 auto; padding: 0 16px; }
.top { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.4rem; letter-spacing: .02em; text-decoration: none; }
.brand img { width: 40px; height: 40px; }
.brand span { color: var(--red); }
.top nav { display: flex; gap: 16px; align-items: center; }
.top nav a { text-decoration: none; color: var(--muted); }
main { padding: 32px 0 64px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 24px; max-width: 460px; margin: 0 auto; }
.card.wide { max-width: none; }
h1 { font-size: 1.8rem; margin: 0 0 16px; }
h2 { font-size: 1.25rem; margin: 28px 0 8px; }
label { display: block; margin: 14px 0 6px; font-weight: 600; }
input[type=text], input[type=email], input[type=password] { width: 100%; padding: 10px 12px; border-radius: 6px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font: inherit; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.check input { margin-top: 5px; }
.btn { display: inline-block; margin-top: 18px; padding: 10px 18px; border: 0; border-radius: 6px; background: var(--red); color: #fff; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; }
.btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--text); }
.btn.link { background: none; padding: 0; color: var(--muted); font-weight: 400; }
.muted { color: var(--muted); }
.error { color: #ff8a80; font-size: .92rem; margin-top: 4px; }
.status { background: #183326; border: 1px solid var(--ok); padding: 10px 12px; border-radius: 6px; margin-bottom: 16px; }
.danger { border-color: #5a2524; }
footer { border-top: 1px solid var(--line); padding: 20px 0; color: var(--muted); font-size: .9rem; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th, .table td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table code, .codes { font-family: "JetBrains Mono", ui-monospace, monospace; }
.codes { background: var(--bg); border: 1px solid var(--line); padding: 12px; border-radius: 6px; }
.qr { background: #fff; display: inline-block; padding: 12px; border-radius: 6px; }
select { width: 100%; padding: 10px 12px; border-radius: 6px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font: inherit; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0; }
.filters input, .filters select { width: auto; flex: 1 1 160px; }
.filters .btn { margin-top: 0; }
.row { display: flex; gap: 8px; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: .8rem; border: 1px solid var(--line); color: var(--muted); }
.badge-live { border-color: var(--ok); color: var(--ok); }
.badge-testing { border-color: #c9a227; color: #e0c35a; }
.badge-ai { border-color: #6b6f73; color: #d0d3d6; font-size: .7rem; vertical-align: middle; letter-spacing: .03em; }
.badge-rejected { border-color: #5a2524; color: #ff8a80; }
textarea { width: 100%; padding: 10px 12px; border-radius: 6px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font: inherit; line-height: 1.5; resize: vertical; }
textarea.lyrics { min-height: 12em; max-height: none; overflow-y: auto; white-space: pre-wrap; }
.counter { text-align: right; font-size: .85rem; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 16px; }
fieldset.chips { border: 0; padding: 0; margin: 14px 0 0; }
fieldset.chips legend { font-weight: 600; margin-bottom: 6px; }
fieldset.chips label { display: inline-flex; gap: 6px; align-items: center; margin: 0 8px 8px 0; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; font-weight: 400; cursor: pointer; }
fieldset.chips label:has(input:checked) { border-color: var(--red); }
.price { margin-top: 18px; }
.lyrics-box { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.lyrics-box .lyrics-view { align-self: stretch; margin: 0; }
.lyrics-view { white-space: pre-wrap; font: inherit; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 14px; }
[hidden] { display: none !important; }
.top nav form { margin: 0; }
.top nav .btn.link { margin-top: 0; }
input[type=radio], input[type=checkbox] { accent-color: var(--red); }
details.edit { margin: 14px 0; border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; }
details.edit summary { cursor: pointer; font-weight: 600; }
form.inline { display: inline-block; }

/* GZ10: change policy before payment */
form.checkout { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); }
ul.policy { padding-left: 20px; color: var(--muted); }
ul.policy li { margin-bottom: 6px; }

/* GZ17, GZ18: making-of steps and the delivered song */
ol.steps { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 8px; }
ol.steps li { display: flex; align-items: center; gap: 8px; color: var(--muted); }
ol.steps li::before { content: ""; width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--muted); }
ol.steps li.done { color: inherit; }
ol.steps li.done::before { background: var(--ok); border-color: var(--ok); }
ol.steps li.now { color: inherit; font-weight: 600; }
ol.steps li.now::before { background: var(--red); border-color: var(--red); }
.delivery { margin: 20px 0; padding: 16px; border: 1px solid var(--line); border-radius: 8px; }
.delivery audio { width: 100%; margin-bottom: 12px; }

/* GZ13: choosing a take */
.take-list { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-top: 12px; }
.take { padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
.take h3 { margin: 0 0 8px; }
.take audio { width: 100%; margin-bottom: 8px; }
.take.pending { border-style: dashed; }
form.retake { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }

/* GZ19: free editor */
form.editor { margin: 0; }
form.editor .row label { flex: 1; }
form.editor details.editor-box > summary { cursor: pointer; font-weight: 600; font-size: 1.1em; padding: 6px 0; }
form.editor .sliders { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin: 8px 0 16px; }
form.editor .sliders label { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px; }
form.editor .sliders output { font-variant-numeric: tabular-nums; color: var(--muted, inherit); }
form.editor .sliders input[type=range] { width: 100%; accent-color: var(--red); }
form.editor .sliders label.check { grid-column: 1 / -1; justify-content: flex-start; }
form.editor .editor-actions { display: flex; flex-wrap: wrap; gap: 8px; }
form.editor .ask-edit { margin: 4px 0 12px; }
form.editor .ask-row { display: flex; gap: 8px; flex-wrap: wrap; }
form.editor .ask-row input { flex: 1; min-width: 200px; }
svg.wave { width: 100%; height: 64px; display: block; margin-bottom: 12px; }
svg.wave rect { fill: var(--red); }
svg.wave rect.cut { fill: var(--bg, #121313); opacity: .7; }

/* GZ21: paid change */
.card.change { border-color: var(--red); }
form.change-request { margin-top: 0; }
.card-row { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 16px; }
/* GZ42: EU and UK analytics consent. */
.consent { position: fixed; left: 16px; right: 16px; bottom: 16px; max-width: 640px; margin: 0 auto; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px; z-index: 10; }
.consent p { margin: 0; }
.bar { background: var(--red); height: 8px; border-radius: 4px; }
.table-wrap { overflow-x: auto; margin: 0 -6px; }
.table td.nowrap { white-space: nowrap; }
.table.audit td.who { overflow-wrap: break-word; }
.table.audit td.details { min-width: 12em; }
.table.audit td.details > span { display: block; }
.table.audit td.details code { overflow-wrap: anywhere; }

/* GZ6/GZ17: progress while lyrics or the song are being made */
.progress-card { border: 1px solid var(--line, #2a2a33); border-radius: 10px; padding: 14px 16px; margin-bottom: 16px; }
.progress { position: relative; height: 8px; border-radius: 999px; background: color-mix(in srgb, var(--muted) 25%, transparent); overflow: hidden; margin: 12px 0 8px; }
.progress > span { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: var(--red); transition: width .6s ease; }
.progress::after { content: ""; position: absolute; inset: 0; width: 40%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.45), transparent); animation: gz-progress 1.6s ease-in-out infinite; }
@keyframes gz-progress { from { transform: translateX(-100%); } to { transform: translateX(260%); } }
ol.steps li.now::before { animation: gz-pulse 1.2s ease-in-out infinite; }
@keyframes gz-pulse { 50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--red) 30%, transparent); } }
.progress-card .slow { color: var(--muted); font-size: .92em; margin: 0; }
@media (prefers-reduced-motion: reduce) { .progress::after, ol.steps li.now::before { animation: none; } }
.progress-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 4px; font-size: 1.1rem; }
.progress-detail { margin: 0 0 4px; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid color-mix(in srgb, var(--red) 25%, transparent); border-top-color: var(--red); animation: gz-spin .8s linear infinite; }
@keyframes gz-spin { to { transform: rotate(360deg); } }
ol.steps li .tick { color: var(--ok); font-weight: 700; }
.mini-bar { position: relative; display: inline-block; width: 90px; height: 6px; border-radius: 999px; overflow: hidden; background: color-mix(in srgb, var(--red) 20%, transparent); }
.mini-bar::after { content: ""; position: absolute; inset: 0; width: 40%; border-radius: inherit; background: var(--red); animation: gz-mini 1.2s ease-in-out infinite; }
@keyframes gz-mini { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
@media (prefers-reduced-motion: reduce) { .spinner, .mini-bar::after { animation: none; } .mini-bar::after { width: 100%; opacity: .6; } }
.melody-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
#melody-playback { width: 100%; margin: 8px 0; }

/* GZ17: song page, one step at a time. */
.song-page { padding: 8px 0 48px; }
.stepper { list-style: none; margin: 8px 0 24px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; font-size: .9rem; font-weight: 600; }
.stepper li { padding: 8px 14px; border-radius: 999px; background: var(--panel); color: var(--muted); }
.stepper li.now { background: var(--red); color: #fff; }
.stepper li.done { color: var(--ok); }
.song-title { margin: 0 0 6px; font-size: clamp(1.8rem, 4vw, 2.5rem); line-height: 1.15; }
.song-sub { margin: 0 0 20px; color: var(--muted); }
.lead { font-size: 1.1rem; margin: 0 0 20px; }
.small { font-size: .9rem; }
.center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 22px; margin-bottom: 20px; }
.panel h2 { margin: 0 0 8px; font-size: 1.25rem; }
.panel.danger { border-color: var(--red); }
.panel.change { border-color: var(--red); }
.panel-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.panel-head h2, .panel-head h3 { margin: 0; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.row-actions .btn, .panel-head .btn, .ask-row .btn { margin-top: 0; }
.btn { min-height: 44px; border-radius: 10px; }
.btn.big { display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 54px; font-size: 1.1rem; font-weight: 800; }
.hero-head .btn.big { width: auto; padding: 0 24px; margin-top: 0; }
.song-grid { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.song-main { flex: 999 1 520px; min-width: 0; }
.song-grid.two { align-items: stretch; }
.song-grid.two > * { flex: 1 1 300px; min-width: 0; margin-top: 0; }
.pay-card { flex: 1 1 300px; min-width: 0; position: sticky; top: 16px; }
.big-price { font-size: 2.6rem; font-weight: 800; margin: 4px 0 8px; line-height: 1.1; }
.big-price s { font-size: 1.2rem; color: var(--muted); font-weight: 400; }
ul.ticks { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 8px; }
ul.ticks li::before { content: "✓"; color: var(--ok); font-weight: 800; margin-right: 10px; }
.pay-card form.checkout { margin-top: 0; padding-top: 0; border-top: 0; }
.pay-card label.check { display: block; padding-left: 30px; text-indent: -30px; margin: 10px 0; }
.pay-card label.check input { margin: 0 10px 0 0; }
details.fold { margin-top: 14px; }
details.fold > summary, details.promo > summary, details.policy-fold > summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; gap: 8px; list-style: none; }
details.fold > summary::-webkit-details-marker, details.promo > summary::-webkit-details-marker, details.policy-fold > summary::-webkit-details-marker { display: none; }
details.fold > summary { display: inline-flex; padding: 0 16px; border: 1px solid var(--line); border-radius: 10px; }
details.fold > summary::after, details.promo > summary::after, details.policy-fold > summary::after { content: "▾"; color: var(--muted); }
details[open].fold > summary::after, details[open].promo > summary::after, details[open].policy-fold > summary::after { content: "▴"; }
details[open].fold > summary { margin-bottom: 12px; }
details.promo > summary, details.policy-fold > summary { font-weight: 400; color: var(--muted); }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.tile { background: var(--bg); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; }
.tile span { color: var(--muted); font-size: .85rem; }
.say-change { margin-top: 16px; }
.ask-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.ask-row input { flex: 1 1 260px; min-height: 48px; margin: 0; }
.record-row { display: flex; align-items: center; gap: 16px; margin: 10px 0 14px; }
.record-btn { width: 72px; height: 72px; border-radius: 50%; border: 0; background: var(--red); color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: none; }
.record-btn.stop { background: var(--text); color: var(--bg); }
.step-title { font-size: 1.8rem; margin: 0 0 6px; }
.take-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.take-card { display: flex; flex-direction: column; gap: 14px; margin-bottom: 0; }
.take-card audio { width: 100%; }
.take-card .btn.big { margin-top: auto; }
.take-card.pending { border-style: dashed; }
.take-wait { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 120px; text-align: center; }
.panel.retake { margin-top: 20px; }
.panel.retake h3 { margin: 0 0 4px; }
.hero-player .hero-head { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 16px; margin-bottom: 18px; }
.hero-player .ready { margin: 0; color: var(--ok); font-weight: 600; font-size: .9rem; }
.hero-player h2 { font-size: 1.8rem; margin: 2px 0 0; }
.hero-player audio { width: 100%; }
.editor-box h2 .small { font-weight: 400; margin-left: 6px; }
.edit-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 14px 0; }
.edit-tile { background: var(--bg); border-radius: 12px; padding: 14px 16px; }
.edit-tile h3 { margin: 0 0 8px; font-size: 1.05rem; }
.edit-tile label { display: block; margin-bottom: 8px; }
.edit-tile input[type=range] { width: 100%; }
.quiet { margin-top: 28px; color: var(--muted); }
.quiet h2 { font-size: 1.1rem; }
.lyrics-view { max-height: 420px; overflow: auto; margin: 0; }
