:root {
  --bg: #0f0d13; --panel: #1a1622; --line: #2c2537; --ink: #f3eee6; --muted: #b3a9c2;
  --gold: #e2b86e; --gold-ink: #241a08; --ok: #6fd39b; --warn: #f0b35a; --bad: #ef7d7d;
}
* { box-sizing: border-box; }
body { margin: 0; background: radial-gradient(1200px 600px at 20% -10%, #2a1f3d 0%, var(--bg) 55%) fixed; color: var(--ink);
       font: 16px/1.55 Inter, system-ui, sans-serif; }
.top { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; max-width: 980px; margin: 0 auto; }
.brand { display: flex; gap: 12px; align-items: center; }
.brand b { font: 700 20px "Playfair Display", serif; display: block; }
.brand small { color: var(--gold); letter-spacing: .04em; }
.logo { width: 40px; height: 40px; border-radius: 12px; background: var(--gold); color: var(--gold-ink); display: grid; place-items: center; font-size: 22px; }
#account { display: flex; gap: 10px; align-items: center; color: var(--muted); font-size: 14px; }
#account img { width: 30px; height: 30px; border-radius: 50%; }
main { max-width: 980px; margin: 0 auto; padding: 0 16px 40px; }
.hero { text-align: center; padding: 48px 8px 28px; }
.hero h1 { font: 700 clamp(30px, 6vw, 52px)/1.1 "Playfair Display", serif; margin: 0 0 14px; }
.hero p { color: var(--muted); max-width: 620px; margin: 0 auto 22px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 22px; margin: 18px 0; }
.card h2 { font: 600 22px "Playfair Display", serif; margin: 0 0 14px; }
.hidden { display: none !important; }
label { display: block; margin: 0 0 14px; font-weight: 500; }
.hint { color: var(--muted); font-weight: 400; font-size: 13px; }
input, select, textarea { width: 100%; margin-top: 6px; padding: 11px 12px; border-radius: 10px; border: 1px solid var(--line);
  background: #120f18; color: var(--ink); font: inherit; }
textarea { resize: vertical; font-family: ui-monospace, Consolas, monospace; font-size: 14px; }
input[type=range] { padding: 0; accent-color: var(--gold); }
.row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 640px) { .row { grid-template-columns: 1fr; } }
button { font: 600 15px Inter, sans-serif; border-radius: 12px; padding: 12px 18px; cursor: pointer; border: 1px solid var(--line);
  background: transparent; color: var(--ink); }
button.primary { background: var(--gold); color: var(--gold-ink); border: 0; }
button:disabled { opacity: .5; cursor: not-allowed; }
.fine { color: var(--muted); font-size: 13px; }
.msg { min-height: 1.4em; margin: 10px 0 0; color: var(--warn); }
.plan { background: #120f18; border: 1px dashed var(--line); border-radius: 12px; padding: 10px 14px; margin-bottom: 16px; color: var(--muted); }
.plan b { color: var(--gold); }
.song { border-top: 1px solid var(--line); padding: 14px 0; display: grid; gap: 8px; }
.song:first-child { border-top: 0; }
.song-head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.song-head b { font-size: 17px; }
.chip { font-size: 12px; padding: 3px 10px; border-radius: 99px; border: 1px solid var(--line); color: var(--muted); }
.chip.ready { color: var(--ok); border-color: var(--ok); }
.chip.composing, .chip.queued, .chip.new { color: var(--warn); border-color: var(--warn); }
.chip.failed, .chip.rejected { color: var(--bad); border-color: var(--bad); }
.wallet { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  background: linear-gradient(90deg, #2a2113, #1a1622); border: 1px solid var(--gold); border-radius: 14px; padding: 12px 16px; margin-bottom: 18px; }
.wallet b { font-size: 20px; color: var(--gold); }
.wallet .coin { font-size: 20px; }
.topup { background: var(--gold); color: var(--gold-ink); font-weight: 600; text-decoration: none; padding: 8px 16px; border-radius: 10px; }
.compose-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.cost { color: var(--muted); font-size: 14px; }
.cost b { color: var(--gold); }
.cost.short { color: var(--bad); }
.plans .best { border-color: var(--gold); position: relative; }
.plans .best::after { content: "Most popular"; position: absolute; top: -10px; right: 10px; background: var(--gold); color: var(--gold-ink);
  font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 99px; }
.preset-box { background: #211a2c; border: 1px solid var(--gold); border-radius: 14px; padding: 14px; margin-bottom: 18px; }
.tip { background: #2a2113; border-left: 3px solid var(--gold); border-radius: 8px; padding: 10px 12px; margin: 0 0 12px; font-size: 14px; color: var(--ink); }
.tip b { color: var(--gold); }
.lyric-help .fit.short { color: var(--bad); font-weight: 600; }
.lyric-help { margin: -6px 0 14px; font-size: 13px; color: var(--muted); }
.lyric-help .fit { min-height: 1.4em; margin-bottom: 4px; }
.lyric-help .fit.good { color: var(--ok); } .lyric-help .fit.warn { color: var(--warn); }
.lyric-help summary { cursor: pointer; color: var(--gold); }
.lyric-help ul { margin: 6px 0; padding-left: 18px; }
.lyric-help code, .lyric-help pre { background: #120f18; border: 1px solid var(--line); border-radius: 6px; padding: 1px 5px; color: var(--ink); }
.lyric-help pre { padding: 8px 10px; white-space: pre-wrap; }
label.check { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-weight: 500; }
label.check input { width: 18px; height: 18px; margin: 0; accent-color: var(--gold); }
label.check .hint { flex-basis: 100%; padding-left: 28px; }
.progress { background: #120f18; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.progress .bar { height: 12px; border-radius: 99px; background: #2a2335; overflow: hidden; }
.progress .bar i { display: block; height: 100%; width: 0; border-radius: 99px; transition: width .25s linear;
  background: linear-gradient(90deg, #b8873a, var(--gold), #f6d79c, var(--gold)); background-size: 200% 100%;
  animation: shimmer 1.6s linear infinite; }
.progress.queued .bar i, .progress.new .bar i { animation: shimmer 1.6s linear infinite, breathe 1.6s ease-in-out infinite; }
.progress.late .bar i { animation: shimmer 1.2s linear infinite, breathe 1.4s ease-in-out infinite; }
.progress-msg { display: flex; justify-content: space-between; gap: 10px; margin-top: 8px; font-size: 15px; font-weight: 500; color: var(--ink); }
.progress-msg .pct { color: var(--gold); font-variant-numeric: tabular-nums; }
.progress.late .step { color: var(--gold); }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: 0 0; } }
@keyframes breathe { 50% { opacity: .55; } }
audio { width: 100%; }
.song a { color: var(--gold); font-size: 14px; }
.plans { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 760px) { .plans { grid-template-columns: repeat(2, 1fr); } }
.plans > div { border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.plans b { display: block; font: 600 18px "Playfair Display", serif; }
.plans .price { color: var(--gold); font-size: 20px; font-weight: 600; margin: 6px 0; }
.doc { max-width: 780px; margin: 0 auto; }
.doc h1 { font: 700 34px/1.2 "Playfair Display", serif; margin: 24px 0 6px; }
.doc h2 { font: 600 21px "Playfair Display", serif; margin: 26px 0 8px; color: var(--gold); }
.doc p, .doc li { color: #ddd5e6; }
.doc li { margin: 4px 0; }
.doc .updated { color: var(--muted); font-size: 13px; }
.doc a, footer a { color: var(--gold); }
.fill { background: #5a3d0c; color: #ffd58a; padding: 0 4px; border-radius: 4px; }
.brand { color: inherit; text-decoration: none; }
footer nav { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 8px; font-size: 13px; }
footer { text-align: center; color: var(--muted); font-size: 12px; padding: 24px 16px 40px; }
.plans .buy { width: 100%; margin-top: 10px; padding: 9px; }
.msg.good { color: var(--ok); }
.billing { background: #120f18; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: end; margin-top: 8px; }
@media (max-width: 640px) { .row2 { grid-template-columns: 1fr; } }
#purchases h3 { font: 600 17px "Playfair Display", serif; margin: 18px 0 6px; }
.purchase { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; border-top: 1px solid var(--line); padding: 8px 0; font-size: 14px; }
.share-row { display: flex; gap: 10px 14px; align-items: center; flex-wrap: wrap; font-size: 14px; }
.share-row .shared { color: var(--ok); font-weight: 600; }
.small { padding: 6px 12px; font-size: 13px; border-radius: 8px; }
.share { max-width: 720px; margin: 0 auto; padding: 0 16px 30px; }
.share-card { text-align: center; padding: 32px 22px; }
.share-card h1 { font: 700 clamp(28px, 6vw, 44px)/1.15 "Playfair Display", serif; margin: 8px 0 12px; }
.share-eyebrow { color: var(--gold); font-size: 14px; letter-spacing: .03em; }
.share-note { font: 500 italic 20px/1.5 "Playfair Display", serif; color: #f6d79c; margin: 0 0 18px; }
.share-card audio { margin: 6px 0 14px; }
.share-actions { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }
.share-actions a { color: var(--gold); }
.share-lyrics { text-align: left; margin-top: 18px; color: #ddd5e6; }
.share-lyrics summary { cursor: pointer; color: var(--gold); text-align: center; }
.share-cta { text-align: center; }
.cta { display: inline-block; margin-top: 8px; background: var(--gold); color: var(--gold-ink); font-weight: 600; text-decoration: none; padding: 12px 20px; border-radius: 12px; }
/* tabs: sticky under the header on desktop, fixed at the bottom on phones */
.tabs { position: sticky; top: 0; z-index: 10; display: flex; gap: 8px; justify-content: center; padding: 10px 16px;
  background: rgba(15, 13, 19, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.tabs button { border-radius: 99px; padding: 9px 18px; font-size: 15px; background: transparent; border: 1px solid var(--line); }
.tabs button.active { background: var(--gold); color: var(--gold-ink); border-color: var(--gold); }
.tabs .badge { font-size: 12px; opacity: .8; margin-left: 2px; }
.tabs .badge:empty { display: none; }
@media (max-width: 640px) {
  .tabs { position: fixed; top: auto; bottom: 0; left: 0; right: 0; border-bottom: 0; border-top: 1px solid var(--line); padding: 8px 6px calc(8px + env(safe-area-inset-bottom)); }
  .tabs button { flex: 1; padding: 9px 6px; font-size: 13px; }
  body { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
}
video.vid { width: 100%; max-height: 70vh; border-radius: 12px; background: #000; }
video.vid.vertical { width: auto; max-width: 100%; height: 60vh; display: block; margin: 0 auto; }
.free-banner { max-width: 980px; margin: 10px auto 0; padding: 10px 16px; border-radius: 12px; background: #3a2a0d;
  border: 1px solid var(--gold); color: #ffd58a; font-weight: 600; text-align: center; }
.price-table { font-size: 14px; color: var(--muted); margin-top: 12px; }
.price-table summary { cursor: pointer; color: var(--gold); }
.price-table table { border-collapse: collapse; margin-top: 8px; }
.price-table td, .price-table th { padding: 4px 12px 4px 0; text-align: left; }
.signin-choices { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
button.primary.alt { background: transparent; color: var(--gold); border: 1px solid var(--gold); }
.phone-box { max-width: 520px; margin: 18px auto; }
.phone-row { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.phone-row span { padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: #120f18; color: var(--muted); }
.phone-row input { margin-top: 0; letter-spacing: .05em; }
#pb-code { letter-spacing: .4em; font-size: 20px; text-align: center; }
.signin-choices.pulse { animation: pulse 1.2s ease-out 2; border-radius: 16px; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(226,184,110,.6); } 100% { box-shadow: 0 0 0 18px rgba(226,184,110,0); } }
fieldset.photos { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin: 0 0 14px; }
fieldset.photos legend { padding: 0 6px; font-weight: 600; }
fieldset.photos input[type=radio] { width: 18px; height: 18px; margin: 0; accent-color: var(--gold); }
.thumbs { display: flex; gap: 10px; flex-wrap: wrap; margin: 10px 0; }
.thumbs figure { position: relative; margin: 0; }
.thumbs img { height: 120px; border-radius: 10px; border: 1px solid var(--line); display: block; }
.thumbs button { position: absolute; top: 4px; right: 4px; padding: 2px 8px; font-size: 13px; border-radius: 99px; background: rgba(0,0,0,.65); }
.thumbs figcaption { text-align: center; font-size: 12px; color: var(--gold); margin-top: 4px; }
.howto { font-size: 14px; color: #ddd5e6; margin-top: 10px; }
.howto summary { cursor: pointer; color: var(--gold); font-weight: 600; }
.howto li { margin: 6px 0; }
.top-right { display: flex; gap: 10px; align-items: center; }
button.install { padding: 8px 12px; font-size: 14px; border-color: var(--gold); color: var(--gold); }
@media (max-width: 640px) { button.install { padding: 7px 10px; font-size: 13px; } }
.logo-img { width: 44px; height: 44px; display: block; }
.home-btn { color: var(--gold); text-decoration: none; border: 1px solid var(--gold); border-radius: 10px; padding: 7px 12px; font-size: 14px; font-weight: 600; white-space: nowrap; }
.invited { background: #3a2a0d; border: 1px solid var(--gold); color: #ffd58a; border-radius: 12px; padding: 10px 14px; display: inline-block; }
.invite { background: linear-gradient(90deg, #2a2113, #1a1622); border: 1px solid var(--gold); border-radius: 14px; padding: 14px; margin-bottom: 14px; }
.invite-code { display: flex; gap: 10px 14px; align-items: center; flex-wrap: wrap; }
.invite-code span { color: var(--muted); font-size: 13px; }
.invite-code b { font: 700 24px ui-monospace, Consolas, monospace; letter-spacing: .15em; color: var(--gold); }
.small-link { color: var(--gold); font-size: 14px; }
.status-video { display: grid; gap: 8px; }
video.vid.vertical.small { height: 46vh; }
.gift-row, .gift-form, .gift-done { display: grid; gap: 8px; }
.gift-row { grid-template-columns: auto 1fr; align-items: center; }
.gift-form, .gift-done { background: #211a2c; border: 1px solid var(--gold); border-radius: 12px; padding: 12px; }
.report-link { background: none; border: 0; color: var(--muted); font-size: 13px; padding: 2px 0; justify-self: start; cursor: pointer; }
.report-link:hover { color: var(--bad); }
.account-zone { border-top: 1px solid var(--line); margin-top: 22px; padding-top: 12px; }
.account-zone h3 { font: 600 17px "Playfair Display", serif; margin: 0 0 6px; }
button.danger { border-color: var(--bad); color: var(--bad); }
.play-app .web-only, .play-app .topup, .play-app #plans { display: none !important; }
.last-frame { display: grid; grid-template-columns: 110px 1fr; gap: 12px; align-items: start; background: #120f18; border: 1px solid var(--line); border-radius: 12px; padding: 10px; }
.last-frame img { width: 110px; border-radius: 8px; display: block; }
.last-frame > button { grid-column: 1 / -1; justify-self: start; }
.last-frame p { margin: 4px 0 8px; }
button.primary-ish { border-color: var(--gold); color: var(--gold); }

/* ---- Help: chatbot + support requests ---- */
.help-fab { position: fixed; right: 16px; bottom: 16px; z-index: 50; background: var(--gold); color: var(--gold-ink); border: 0;
  border-radius: 999px; padding: 12px 18px; box-shadow: 0 6px 24px rgba(0,0,0,.45); }
.help-badge { display: inline-block; min-width: 20px; margin-left: 6px; padding: 0 6px; border-radius: 999px; background: var(--bad); color: #fff; font-size: 12px; }
.help-panel { position: fixed; right: 16px; bottom: 16px; z-index: 51; width: min(400px, calc(100vw - 32px)); height: min(640px, calc(100vh - 32px));
  display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 10px 40px rgba(0,0,0,.55); overflow: hidden; }
.help-panel > header { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.help-tabs { display: flex; gap: 6px; padding: 8px 14px 0; }
.help-tabs button { padding: 6px 12px; font-size: 13px; border-radius: 8px 8px 0 0; background: transparent; color: var(--muted); }
.help-tabs button.on { color: var(--gold); border-color: var(--gold); }
.help-body { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 8px; padding: 10px 14px 14px; overflow-y: auto; }
#help-chat.help-body { overflow: hidden; }
.help-log { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.hm { margin: 0; padding: 8px 12px; border-radius: 12px; max-width: 88%; white-space: pre-wrap; font-size: 14px; line-height: 1.45; }
.hm.user { align-self: flex-end; background: #3a2d4f; }
.hm.bot { align-self: flex-start; background: #120f18; border: 1px solid var(--line); }
.hm.note { align-self: center; color: var(--muted); font-size: 13px; text-align: center; max-width: 100%; }
.hm small { color: var(--muted); font-size: 11px; }
.hm button { margin-top: 8px; }
.help-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.help-form { display: flex; gap: 8px; align-items: center; }
.help-form input { margin: 0; }
.help-human { align-self: center; background: transparent; color: var(--gold); border: 0; }
.help-panel textarea { font-family: inherit; }
.ticket { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.ticket header { display: flex; justify-content: space-between; gap: 8px; }
.ticket .tstate { margin: 0; font-size: 13px; color: var(--gold); }
.ticket .tthread { display: flex; flex-direction: column; gap: 6px; }
.ticket .tactions { display: flex; flex-wrap: wrap; gap: 6px; }
.ticket .tactions form { flex-basis: 100%; }
@media (max-width: 640px) { .help-panel { right: 0; bottom: 0; width: 100vw; height: 100dvh; border-radius: 0;
  padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); } }
/* phones that draw edge-to-edge (Android 15+, the Play app): keep the page clear of the status bar and side cut-outs */
body { padding-top: env(safe-area-inset-top); padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }

.rules-banner { max-width: 980px; margin: 10px auto 0; padding: 10px 16px; border-radius: 12px; background: #1d1828; border: 1px solid var(--line);
  color: var(--muted); font-size: 13px; display: flex; gap: 12px; align-items: center; }
.rules-banner a { color: var(--gold); }
@media (max-width: 640px) { .rules-banner { flex-direction: column; align-items: flex-start; margin: 10px 16px 0; } }
label.check.needs { outline: 1px dashed var(--gold); outline-offset: 4px; border-radius: 8px; }

/* ---- contest ---- */
.contest-prize { font: 600 20px "Playfair Display", serif; color: var(--gold); margin: 0 0 6px; }
.contest-steps { padding-left: 20px; } .contest-steps li { margin: 6px 0; }
.contest-slots { font-weight: 600; color: var(--warn); min-height: 1.2em; }
.contest-entry { background: #142017; border: 1px solid #2c4a33; border-radius: 12px; padding: 12px 14px; margin: 10px 0; }
#k-form h3 { font: 600 18px "Playfair Display", serif; margin: 14px 0 10px; }
/* Song tab: 3 numbered steps, style hint, instrument chips, "More options" */
h3.step { display: flex; align-items: center; gap: 10px; margin: 22px 0 12px; padding-top: 16px; border-top: 1px solid var(--line);
          font: 600 18px "Playfair Display", serif; }
h3.step span { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--gold);
               color: var(--gold-ink); font: 700 15px Inter, sans-serif; }
#song-form .preset-box + h3.step { border-top: 0; padding-top: 0; }
.style-hint { margin: -6px 0 14px; color: var(--muted); }
.field { margin: 0 0 14px; font-weight: 500; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chip { margin: 0; cursor: pointer; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span { display: inline-block; padding: 7px 13px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel);
             font-size: 14px; color: var(--ink); user-select: none; }
.chip input:checked + span { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); }
.chip input:checked + span::before { content: "✓ "; }
.chip input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
details.more { margin: 0 0 14px; }
details.more summary { cursor: pointer; color: var(--gold); margin-bottom: 10px; }
/* Video tab: auto-change note, photos box, step-heading hint */
.auto-note { margin: -4px 0 12px; color: var(--warn); }
h3.step .hint { font: 400 13px Inter, sans-serif; }
details.photos-box > summary { font-weight: 600; }
details.photos-box[open] > summary { margin-bottom: 12px; }
#v-adv .price-table { margin-top: 6px; }
/* My creations: filter chips, compact card button row, panels, "Not made" */
.lib-chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 6px; }
.lib-chips button { padding: 7px 14px; font-size: 14px; border-radius: 999px; background: var(--panel); color: var(--muted); }
.lib-chips button span { opacity: .75; font-weight: 500; }
.lib-chips button.on { background: var(--gold); color: var(--gold-ink); border-color: var(--gold); }
.song-media { display: grid; gap: 8px; }
.card-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.card-actions .on { border-color: var(--gold); color: var(--gold); }
.song a.btn-link { display: inline-block; border: 1px solid var(--line); background: var(--panel); color: var(--ink); text-decoration: none; font-weight: 600; }
.card-panel:not(:empty) { display: grid; gap: 10px; background: #120f18; border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.card-text summary { cursor: pointer; color: var(--gold); font-size: 14px; }
.card-text pre { white-space: pre-wrap; font: 14px/1.5 Inter, sans-serif; margin: 8px 0 0; color: var(--ink); }
.lib-more { justify-self: start; margin-top: 12px; }
.lib-notmade { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 12px; }
.lib-notmade summary { cursor: pointer; color: var(--muted); }
/* Credits tab: balance box, history, picked pack, folded account settings */
.balance { background: #120f18; border: 1px solid var(--gold); border-radius: 14px; padding: 14px 16px; margin: 0 0 18px; }
.bal-big { font-size: 18px; }
.bal-big b { font: 700 30px "Playfair Display", serif; color: var(--gold); margin: 0 4px; }
.balance .fine { margin: 4px 0 8px; }
table.ledger { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 6px; }
table.ledger td { padding: 6px 4px; border-top: 1px solid var(--line); vertical-align: top; }
table.ledger td.amt { text-align: right; white-space: nowrap; }
table.ledger .plus { color: var(--ok); } table.ledger .minus { color: var(--muted); }
table.ledger a { color: var(--gold); }
h3.sub { margin: 4px 0 6px; }
.plans > div.picked { border-color: var(--gold); box-shadow: 0 0 0 2px #e2b86e55; }
#billing { margin-top: 14px; }
details.account-zone { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 12px; }
/* Contest tab: prize chips, chosen-song preview */
.contest-prizes { display: flex; gap: 10px; flex-wrap: wrap; margin: 4px 0 10px; }
.prize-chip { display: grid; grid-template-columns: auto auto; column-gap: 8px; align-items: center; padding: 8px 14px;
  border: 1px solid var(--gold); border-radius: 14px; background: #211a2c; }
.prize-chip i { font-style: normal; font-size: 24px; grid-row: span 2; }
.prize-chip b { font: 700 20px "Playfair Display", serif; color: var(--gold); }
.prize-chip small { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.contest-steps .primary-ish { margin-left: 6px; }
.k-preview { margin: -6px 0 10px; }
.k-preview summary { cursor: pointer; color: var(--gold); font-size: 14px; }
.k-preview pre { white-space: pre-wrap; font: 14px/1.5 Inter, sans-serif; margin: 6px 0 0; }
.k-cert { margin-top: 8px; } .k-cert a { color: var(--gold); }
/* phones: when the bottom tab bar is shown, the Help button sits above it instead of covering the Credits tab */
@media (max-width: 640px) {
  body:has(#tabs:not(.hidden)) .help-fab { bottom: calc(84px + env(safe-area-inset-bottom)); right: 12px; padding: 10px 15px; }
}
/* contest: "Results are out!" card at the top of the Contest tab (shown once results/<id> is published) */
.k-results { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin: 12px 0 16px; padding: 18px 20px;
  border-radius: 16px; border: 2px solid var(--gold); background: linear-gradient(135deg, #3a2c12, #1a1622 70%);
  box-shadow: 0 0 24px rgba(226, 184, 110, .25); animation: kr-glow 2.4s ease-in-out infinite alternate; }
.k-results.hidden { display: none; }
.k-results .kr-icon { font-size: 48px; line-height: 1; }
.k-results .kr-text { flex: 1 1 260px; }
.k-results .kr-kicker { color: var(--gold); text-transform: uppercase; letter-spacing: .08em; font-size: 13px; font-weight: 700; }
.k-results .kr-head { font: 700 24px "Playfair Display", serif; margin: 2px 0 4px; }
.k-results .kr-sub { color: var(--muted); }
.k-results .kr-btn { padding: 12px 20px; border-radius: 12px; background: var(--gold); color: var(--gold-ink); font-weight: 700;
  text-decoration: none; white-space: nowrap; }
@keyframes kr-glow { from { box-shadow: 0 0 10px rgba(226, 184, 110, .15); } to { box-shadow: 0 0 28px rgba(226, 184, 110, .4); } }
@media (prefers-reduced-motion: reduce) { .k-results { animation: none; } }
/* group song card (Song tab) */
.group-box { border: 2px solid var(--gold); border-radius: 16px; padding: 14px 16px; margin: 12px 0 16px;
  background: linear-gradient(135deg, #2f2412, #1a1622 70%); }
.group-box > summary { display: flex; gap: 12px; align-items: center; cursor: pointer; list-style: none; font-size: 18px; }
.group-box > summary::-webkit-details-marker { display: none; }
.group-box .gb-icon { font-size: 36px; }
.group-box .new-badge { background: var(--gold); color: var(--gold-ink); font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 8px; vertical-align: middle; }
.group-box .gp-how { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; font-size: 13px; }
.group-box .gp-how span { border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; }
.group-box .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.group-box h4 { margin: 14px 0 4px; }
.wa-btn { display: block; text-align: center; padding: 12px; border-radius: 12px; background: #25d366; color: #062b14; font-weight: 700; text-decoration: none; }
@media (max-width: 520px) { .group-box .row2 { grid-template-columns: 1fr; } }
/* gift reply loop */
.reply-cta { display: block; text-align: center; margin: 16px auto 4px; font-size: 18px; padding: 14px 20px; }
.reply-note { background: #2f2412; border: 1px solid var(--gold); border-radius: 12px; padding: 10px 14px; margin: 0 0 12px; }
/* festival campaign banner (config/campaign) */
.camp-banner { display: flex; align-items: center; gap: 12px; padding: 14px 16px; margin: 12px 0; border-radius: 16px; text-decoration: none;
  color: var(--ink); border: 2px solid #f0a14a; background: linear-gradient(135deg, #4a2a0c, #2a1630 75%); box-shadow: 0 0 22px rgba(240, 161, 74, .25); }
.camp-banner.hidden { display: none; }
.camp-banner .cb-icon { font-size: 40px; } .camp-banner b { display: block; font-size: 18px; } .camp-banner small { color: var(--muted); }
.camp-banner > span:nth-child(2) { flex: 1; }
.camp-banner .cb-go { background: var(--gold); color: var(--gold-ink); font-weight: 700; padding: 10px 14px; border-radius: 12px; white-space: nowrap; }

/* Video tab: engine choice (Studio = our MiniMax H3 / Google Veo) + selfie camera */
.engine-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 4px 0 6px; }
.engine-opt { display: flex; gap: 10px; align-items: flex-start; border: 2px solid var(--line); border-radius: 14px; padding: 12px; cursor: pointer; }
.engine-opt:has(input:checked) { border-color: var(--gold); background: rgba(226, 184, 110, .08); }
.engine-opt input { margin-top: 4px; } .engine-opt b { display: block; font-size: 16px; } .engine-opt small { color: var(--muted); }
.engine-credit { margin: 0 0 10px; }
.photo-pick { display: flex; gap: 10px; flex-wrap: wrap; margin: 6px 0; }
.file-btn { position: relative; overflow: hidden; display: inline-flex; align-items: center; cursor: pointer; border: 1px solid var(--line);
  border-radius: 10px; padding: 6px 12px; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.camera-box { position: fixed; inset: 0; background: rgba(0, 0, 0, .85); z-index: 60; display: flex; align-items: center; justify-content: center;
  padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); }
.camera-box.hidden { display: none; }
.camera-inner { position: relative; width: min(92vw, 520px); text-align: center; }
.camera-inner video { width: 100%; border-radius: 14px; transform: scaleX(-1); background: #000; }
.face-guide { position: absolute; left: 50%; top: 42%; width: 46%; aspect-ratio: 3 / 4; transform: translate(-50%, -50%);
  border: 3px dashed rgba(226, 184, 110, .9); border-radius: 50%; pointer-events: none; }
@media (max-width: 520px) { .engine-pick { grid-template-columns: 1fr; } }

/* ---- description helper (quick choices) ---- */
.ph-box { border: 1px dashed var(--line); border-radius: 12px; padding: 10px 12px; margin: 0 0 14px; }
.ph-moods { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }
.chip-btn.on { border-color: var(--gold); color: var(--gold); }

.improve-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: -6px 0 12px; }

/* ---- 🎤 lip-sync mode of the Video tab ---- */
#videostudio.lip-mode .no-lip { display: none !important; }
.lip-only { display: none; }
#videostudio.lip-mode .lip-only { display: block; }
.lip-duet { margin: 10px 0 4px; }
.lip-duet .fine { margin: 4px 0 0 26px; }
.lip-box { border: 1px solid var(--gold); border-radius: 14px; padding: 12px 14px; margin: 0 0 14px; background: rgba(226, 184, 110, .07); }
.lip-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.lip-box audio { width: 100%; margin: 8px 0 4px; }

/* ---- ✨ Ask chat (CHAT_TAB_PLAN.md) ---- */
.card.ask { padding: 0; overflow: hidden; }
.ask-wrap { display: grid; grid-template-columns: 240px 1fr; min-height: min(720px, calc(100dvh - 190px)); }
.ask-side { border-right: 1px solid var(--line); padding: 16px 12px; display: flex; flex-direction: column; gap: 6px; background: #15111c; }
.ask-new { width: 100%; }
.ask-h { margin: 14px 4px 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.ask-tools { display: grid; gap: 4px; }
.ask-tools button, .ask-open { text-align: left; padding: 8px 10px; font-size: 14px; font-weight: 500; border: 0; border-radius: 10px; }
.ask-tools button:hover, .ask-open:hover, .ask-thread.active .ask-open { background: rgba(226, 184, 110, .12); }
.ask-threads { overflow-y: auto; max-height: 40vh; display: grid; gap: 2px; }
.ask-thread { display: flex; align-items: center; }
.ask-open { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ask-del { border: 0; padding: 6px 8px; font-size: 13px; opacity: .55; }
.ask-del:hover { opacity: 1; }
.ask-main { display: flex; flex-direction: column; min-width: 0; padding: 12px 16px 10px; }
.ask-top { display: flex; align-items: center; gap: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.ask-menu { display: none; padding: 6px 12px; }
.ask-log { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 14px 2px;
  max-height: calc(100dvh - 300px); min-height: 320px; }
.ask-msg { max-width: 82%; padding: 10px 14px; border-radius: 16px; line-height: 1.5; overflow-wrap: anywhere; }
.ask-msg.user { align-self: flex-end; background: var(--gold); color: var(--gold-ink); border-bottom-right-radius: 4px; }
.ask-msg.bot { align-self: flex-start; background: #120f18; border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.ask-typing span { display: inline-block; width: 7px; height: 7px; margin: 0 2px; border-radius: 50%; background: var(--muted);
  animation: askdot 1.2s infinite ease-in-out; }
.ask-typing span:nth-child(2) { animation-delay: .2s; } .ask-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes askdot { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.ask-card { margin-top: 10px; padding: 12px; border: 1px solid var(--gold); border-radius: 12px; background: rgba(226, 184, 110, .07); }
.ask-card pre { white-space: pre-wrap; font: 14px/1.5 Inter, system-ui, sans-serif; margin: 6px 0 0; }
.ask-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.ask-empty { margin: auto 0; text-align: center; padding: 20px 4px; }
.ask-empty h3 { margin: 0 0 6px; }
.ask-starters { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 14px; }
.ask-form { display: flex; gap: 8px; align-items: flex-end; padding-top: 8px; }
.ask-form textarea { margin: 0; resize: none; min-height: 46px; max-height: 160px; }
.ask-form button { padding: 12px 16px; }
.ask-note { margin: 6px 2px 0; text-align: center; }
.ask-shade { position: fixed; inset: 0; background: rgba(0, 0, 0, .5); z-index: 39; }
body.ask-on .help-fab { display: none; }
@media (max-width: 760px) {
  .ask-wrap { grid-template-columns: 1fr; }
  .ask-menu { display: inline-block; }
  .ask-side { position: fixed; top: 0; bottom: 0; left: 0; width: min(80vw, 300px); z-index: 40; transform: translateX(-105%);
    transition: transform .2s ease; padding-top: calc(16px + env(safe-area-inset-top)); padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
  .ask-side.open { transform: none; }
  .ask-main { padding: 10px 10px 8px; }
  .ask-log { max-height: calc(100dvh - 290px - env(safe-area-inset-bottom)); }
  .ask-msg { max-width: 90%; }
}

.delete-row { margin-top: 8px; }
.danger-ish { color: var(--bad); border-color: rgba(239, 125, 125, .4); }

.ask-result { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: rgba(111, 211, 155, .07); border: 1px solid rgba(111, 211, 155, .35); }
.ask-result audio, .ask-result video { width: 100%; margin-top: 8px; }
.ask-result video.vertical { max-height: 60vh; width: auto; max-width: 100%; display: block; }
.ask-card.used .ask-acts .primary { background: transparent; color: var(--ink); border-color: var(--line); }
.doc-table { width: 100%; border-collapse: collapse; margin: 10px 0 14px; font-size: 14px; }
.doc-table th, .doc-table td { text-align: left; padding: 8px 10px; border: 1px solid var(--line); vertical-align: top; }
.doc-table th { background: #120f18; }

/* ---- Ask: formatted answers + Copy / Report ---- */
.ask-msg.bot p { margin: 0 0 8px; } .ask-msg.bot p:last-of-type { margin-bottom: 4px; }
.ask-msg.bot ul, .ask-msg.bot ol { margin: 4px 0 8px; padding-left: 22px; } .ask-msg.bot li { margin: 3px 0; }
.ask-h1, .ask-h2 { font: 600 18px "Playfair Display", serif; color: var(--gold); margin: 10px 0 6px; }
.ask-h3 { font-weight: 700; margin: 8px 0 4px; }
.ask-msg.bot code { background: #241c30; padding: 1px 5px; border-radius: 5px; font-size: 13px; }
.ask-code { background: #0b0910; border: 1px solid var(--line); border-radius: 10px; padding: 10px; overflow-x: auto; font-size: 13px; white-space: pre; }
.ask-tbl { overflow-x: auto; margin: 6px 0 10px; } .ask-tbl table { border-collapse: collapse; font-size: 14px; }
.ask-tbl th, .ask-tbl td { border: 1px solid var(--line); padding: 5px 8px; text-align: left; vertical-align: top; } .ask-tbl th { color: var(--gold); }
.ask-msg.bot hr { border: 0; border-top: 1px solid var(--line); margin: 10px 0; }
.ask-tools { display: flex; gap: 6px; margin-top: 6px; opacity: .75; }
.ask-tool { background: transparent; border: 1px solid var(--line); color: var(--muted); padding: 3px 9px; font-size: 12px; border-radius: 8px; }
.ask-tool:hover { color: var(--ink); opacity: 1; }

.lip-longer p { margin: 0 0 8px; } .lip-longer-opts { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-bottom: 8px; }
