*{box-sizing:border-box}body{font-family:'Segoe UI',Verdana,sans-serif;background:#101012;color:#f7f4ef;margin:0}
a{color:#b18cff}header{display:flex;gap:18px;align-items:center;padding:14px 22px;background:#141416;border-bottom:1px solid #232329;position:sticky;top:0}
header .brand{font-size:1.4rem;font-weight:700;color:#fff;text-decoration:none}header .brand span{color:#b18cff}
nav{margin-left:auto;display:flex;gap:14px}main{max-width:980px;margin:0 auto;padding:28px 18px}
.hero{text-align:center;padding:56px 10px}.hero h1{font-size:2.7rem}.hero h1 span{color:#b18cff}
.card{background:#17171b;border:1px solid #232329;border-radius:14px;padding:20px;margin:14px 0}
input,select,textarea{width:100%;padding:10px;border-radius:8px;border:1px solid #2c2c33;background:#101012;color:#f7f4ef;margin:6px 0 12px}
button,.btn{background:#b18cff;color:#17122b;border:0;border-radius:999px;padding:11px 26px;font-weight:700;cursor:pointer;text-decoration:none;display:inline-block}
button[disabled]{opacity:.45;cursor:not-allowed}.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:16px}
.msg{padding:10px 14px;border-radius:8px;background:#1f1f24;margin:8px 0}.err{color:#ff9c9c}table{width:100%;border-collapse:collapse}td,th{padding:8px;border-bottom:1px solid #26262c;text-align:left}
audio{width:100%;max-width:560px}
.badge{background:#26262c;color:#d9c9ff;border-radius:999px;padding:2px 10px;font-size:.75rem;font-weight:700;vertical-align:middle}
.locked{color:#9a93ad}
.bottom-nav{display:none}
@media (max-width:820px){
header nav{display:none}
body{padding-bottom:calc(74px + env(safe-area-inset-bottom))}
.bottom-nav{display:flex;position:fixed;left:0;right:0;bottom:0;z-index:60;background:#141416;border-top:1px solid #232329;margin:0;padding:6px 2px calc(6px + env(safe-area-inset-bottom));justify-content:space-around}
.bottom-nav a{display:flex;flex-direction:column;align-items:center;gap:2px;flex:1;color:#cfc9bd;text-decoration:none;font-size:.66rem;font-weight:600;padding:4px 2px;border-radius:10px}
.bottom-nav a.active{color:#f5b74e;background:#1e1e24}
.bottom-nav .bn-icon{font-size:1.3rem;line-height:1.1}
}

/* ===== Night Stage v3 — dark, art-forward, hero Create (look only) =====
   Discipline borrowed from the winners: a near-black stage, warm cream
   text, and ONE amber->pink gradient spent in exactly three places —
   the Create hero aura, the Create CTA, and the generating state.
   Everything else stays quiet so songs (and their covers) carry color.
   Animations use transform/opacity only; no full-screen filters. */

/* Ambience: one very subtle violet pool, nothing more. */
.stage-lights{position:fixed;inset:0;z-index:0;overflow:hidden;pointer-events:none}
.stage-lights .sl{position:absolute;border-radius:50%;will-change:transform,opacity}
.sl-violet{width:64vmax;height:64vmax;left:-20vmax;top:-26vmax;background:radial-gradient(closest-side,rgba(124,58,237,.16),rgba(124,58,237,0) 72%);animation:sl-drift-a 46s ease-in-out infinite alternate}
.sl-magenta,.sl-amber{display:none}
@keyframes sl-drift-a{from{transform:translate3d(0,0,0) scale(1)}to{transform:translate3d(7vw,5vh,0) scale(1.1)}}
header,main,footer{position:relative;z-index:1}

/* Panels: faint top-edge light + soft drop shadow */
.card{box-shadow:inset 0 1px 0 rgba(247,244,239,.05),0 14px 34px rgba(0,0,0,.32)}

/* ---- Create hero: the aura lives here, and only here ---- */
.create-hero{position:relative;text-align:center;padding:32px 14px 26px;margin:6px 0 18px;border-radius:16px;overflow:hidden;border:1px solid #26262c;background:radial-gradient(58% 92% at 50% 0%,rgba(245,158,11,.20),rgba(245,158,11,0) 62%),radial-gradient(66% 105% at 86% 8%,rgba(236,72,153,.20),rgba(236,72,153,0) 64%),radial-gradient(78% 120% at 10% 18%,rgba(124,58,237,.26),rgba(124,58,237,0) 66%),#141416}
.create-hero::after{content:"";position:absolute;inset:0;pointer-events:none;background:radial-gradient(46% 62% at 50% 42%,rgba(236,72,153,.16),rgba(236,72,153,0) 70%);animation:hero-breathe 7s ease-in-out infinite alternate}
@keyframes hero-breathe{from{opacity:.35}to{opacity:1}}
.create-hero>*{position:relative;z-index:1}
.stage-wave{display:flex;align-items:flex-end;justify-content:center;gap:3px;height:54px;padding:10px 10px 2px;filter:drop-shadow(0 0 8px rgba(236,72,153,.35))}
.stage-wave i{flex:1 1 0;max-width:5px;height:44px;border-radius:4px;background:linear-gradient(180deg,#f59e0b,#ec4899 60%,#a855f7);transform-origin:bottom;animation:wave-bounce 1.5s ease-in-out infinite alternate}
.stage-wave i:nth-child(3n){background:linear-gradient(180deg,#fbbf24,#f59e0b 45%,#ec4899)}
.stage-wave i:nth-child(4n){background:linear-gradient(180deg,#ec4899,#a855f7 60%,#7c3aed)}
.stage-wave i:nth-child(2n){animation-duration:1.15s;animation-delay:-.4s}
.stage-wave i:nth-child(3n){animation-duration:1.9s;animation-delay:-.8s}
.stage-wave i:nth-child(4n){animation-duration:1.3s;animation-delay:-.2s}
.stage-wave i:nth-child(5n){animation-duration:2.25s;animation-delay:-1.1s}
.stage-wave i:nth-child(7n){animation-duration:1.05s;animation-delay:-.6s}
@keyframes wave-bounce{from{transform:scaleY(.22)}to{transform:scaleY(1)}}
.stage-tag{color:#e9e2d0;margin:10px 0 0;font-size:1rem;letter-spacing:.02em}
.tw-line{color:#cfc9bd;margin:12px 0 0;font-size:1.02rem;min-height:1.5em}
.tw-line .tw-text{color:#f7f4ef;font-style:italic}
.tw-caret{display:inline-block;width:2px;height:1em;margin-left:2px;background:#f59e0b;vertical-align:-2px;animation:caret-blink 1.05s steps(1) infinite}
@keyframes caret-blink{50%{opacity:0}}
.btn-dice{margin-top:16px;background:#1d1d22;color:#f7f4ef;border:1px solid #3a3a44;box-shadow:none}
.btn-dice:hover{border-color:rgba(245,158,11,.65);color:#f5b74e}

/* Composer: a deep, quiet panel — the gradient is spent on its CTA only */
.card.composer{border:1px solid rgba(245,158,11,.26);background:linear-gradient(180deg,#191920,#17171b 60%);box-shadow:0 18px 44px rgba(0,0,0,.4)}
.card.composer input:focus,.card.composer select:focus,.card.composer textarea:focus{outline:none;border-color:#f59e0b;box-shadow:0 0 0 3px rgba(245,158,11,.18)}
.card.composer button[type=submit]{background:linear-gradient(90deg,#f59e0b,#ec4899);color:#fff;box-shadow:0 8px 28px rgba(236,72,153,.35)}
.card.composer button[type=submit]:hover{box-shadow:0 10px 36px rgba(236,72,153,.5)}

/* One-tap example prompts under the composer */
.example-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:12px;margin:14px 0}
.example-card{display:block;width:100%;text-align:left;background:#17171b;border:1px solid #26262c;border-radius:12px;padding:13px 14px;color:#f7f4ef;box-shadow:none;transition:transform .18s ease,border-color .18s ease}
.example-card:hover{border-color:rgba(245,158,11,.55);transform:translateY(-2px)}
.example-card .ex-title{display:block;color:#f5b74e;font-size:.76rem;font-weight:700;text-transform:uppercase;letter-spacing:.07em;margin-bottom:5px}
.example-card .ex-text{display:block;font-weight:400;color:#cfc9bd;font-size:.92rem;line-height:1.4}

/* ---- Art-forward tiles (My Songs + Feed) ---- */
.song-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:14px;margin:14px 0}
.tile{background:#17171b;border:1px solid #232329;border-radius:14px;overflow:hidden;display:flex;flex-direction:column;transition:transform .18s ease,border-color .18s ease}
.tile:hover{border-color:#3a3a44;transform:translateY(-2px)}
.tile-cover{display:block;aspect-ratio:1/1;overflow:hidden;background:#101012}
.cover-art{width:100%;height:100%;display:block;object-fit:cover}
.tile-body{padding:12px 14px 14px;display:flex;flex-direction:column;gap:5px}
.tile-body h3{margin:0;font-size:1rem;line-height:1.3}
.tile-body h3 a{color:#f7f4ef;text-decoration:none}
.tile-body h3 a:hover{color:#f5b74e}
.tile-meta{color:#9a93ad;font-size:.82rem;margin:0}
.tile-desc{color:#cfc9bd;font-size:.88rem;margin:0}
.tile-body audio{margin-top:8px}
.tile-body .btn{align-self:flex-start;margin-top:6px}

/* ---- Song detail: header tinted from the song's own cover ---- */
.song-hero{display:flex;gap:18px;align-items:center;border-radius:16px;padding:20px;margin:6px 0 16px;color:#f7f4ef;box-shadow:0 16px 40px rgba(0,0,0,.35)}
.song-hero-cover{width:128px;height:128px;flex:0 0 auto;border-radius:12px;overflow:hidden;box-shadow:0 10px 30px rgba(0,0,0,.45)}
.song-hero h1{margin:0 0 6px;font-size:1.7rem;line-height:1.2}
.hero-sub{color:rgba(247,244,239,.85);margin:0}
@media (max-width:560px){
.song-hero{flex-direction:column;align-items:flex-start}
.song-hero-cover{width:100%;max-width:220px;height:auto;aspect-ratio:1/1}
}

/* ---- Generating: the third place the gradient is spent ---- */
.card.forging{position:relative;overflow:hidden;border:1px solid rgba(236,72,153,.35)}
.card.forging::before{content:"";position:absolute;inset:0;pointer-events:none;background:linear-gradient(120deg,rgba(245,158,11,.14),rgba(236,72,153,.14) 55%,rgba(124,58,237,.14));animation:forge-pulse 2.6s ease-in-out infinite alternate}
@keyframes forge-pulse{from{opacity:.3}to{opacity:.85}}
.card.forging>*{position:relative;z-index:1}
.forge-line{color:#f3d9a4;font-weight:600;min-height:1.4em;margin:6px 0 0}

/* Brand EQ motif beside the wordmark (kept from v1) */
.brand-eq{display:inline-flex;align-items:flex-end;gap:2px;margin-left:9px;height:15px}
.brand-eq i{width:3px;height:15px;border-radius:2px;background:linear-gradient(180deg,#f59e0b,#ec4899);transform-origin:bottom;animation:wave-bounce 1.2s ease-in-out infinite alternate}
.brand-eq i:nth-child(2){animation-duration:.9s;animation-delay:-.3s}
.brand-eq i:nth-child(3){animation-duration:1.45s;animation-delay:-.7s}
.brand-eq i:nth-child(4){animation-duration:1.05s;animation-delay:-.15s}

/* Reduced motion: freeze everything — static gradients still read as
   stage light, and the waveform rests at a mid height. */
@media (prefers-reduced-motion:reduce){
.stage-lights .sl,.stage-wave i,.brand-eq i,.create-hero::after,.tw-caret,.card.forging::before,.melody-status.live{animation:none}
.stage-wave i{transform:scaleY(.62)}
.brand-eq i{transform:scaleY(.7)}
.tile,.example-card{transition:none}
}

/* ---- Talk to Melody (voice assistant) ----
   The CTA sits inside the Create hero, so it shares the hero's one
   amber->pink gradient spend; the panel itself stays a quiet card. */
.btn-melody{margin-top:16px;margin-left:10px;background:linear-gradient(90deg,#f59e0b,#ec4899);color:#fff;box-shadow:0 8px 28px rgba(236,72,153,.35)}
.melody-panel h2{margin:0;font-size:1.15rem}
.melody-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.melody-status{font-size:.8rem;font-weight:700;color:#f5b74e;background:#26262c;border-radius:999px;padding:4px 12px}
.melody-status.live{color:#fff;background:linear-gradient(90deg,rgba(245,158,11,.85),rgba(236,72,153,.85));animation:forge-pulse 2.6s ease-in-out infinite alternate}
.melody-intro{color:#cfc9bd;margin:10px 0 4px}
.melody-privacy{color:#9a93ad;font-size:.85rem;margin:4px 0 12px}
.melody-transcript{max-height:260px;overflow-y:auto;display:flex;flex-direction:column;gap:8px;padding:12px;background:#101012;border:1px solid #26262c;border-radius:12px}
.melody-transcript:empty{display:none}
.melody-line{max-width:88%;padding:8px 12px;border-radius:12px;line-height:1.45;font-size:.95rem}
.melody-line .melody-who{display:block;font-size:.7rem;font-weight:700;text-transform:uppercase;letter-spacing:.06em;margin-bottom:2px}
.melody-line.user{align-self:flex-end;background:#2a2140;color:#f7f4ef}
.melody-line.user .melody-who{color:#b18cff}
.melody-line.melody{align-self:flex-start;background:#1f1f24;color:#f7f4ef}
.melody-line.melody .melody-who{color:#f5b74e}
.melody-note{color:#f3d9a4;font-weight:600;margin:12px 0 0}
.melody-resume{margin:0 0 12px;padding:12px;background:#17171b;border:1px solid #2c2c33;border-radius:12px}
.melody-memory{color:#cfc9bd;margin:0 0 10px;font-size:.92rem}
.melody-resume-actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.melody-divider{align-self:center;color:#8f897d;font-size:.72rem;font-weight:700;text-transform:uppercase;letter-spacing:.08em;padding:2px 10px;border:1px solid #26262c;border-radius:999px}
.melody-line.earlier{opacity:.6}
.melody-controls{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-top:14px}
.btn-melody-start{background:linear-gradient(90deg,#f59e0b,#ec4899);color:#fff;box-shadow:0 8px 28px rgba(236,72,153,.35)}
.melody-timer{color:#9a93ad;font-variant-numeric:tabular-nums;font-size:.9rem}
.melody-panel audio{display:none}

/* ---- Share loop: public share pages, loop CTA, inspired strip ----
   The share page spends the gradient on its CTA band for the same
   reason Create does - it is the conversion surface. In-app covers
   stay clean; the branding lives here and on the share PNG only. */
.share-head{text-align:center;padding:10px 0 2px}
.share-cover{width:min(400px,82vw);aspect-ratio:1/1;margin:0 auto 16px;border-radius:16px;overflow:hidden;box-shadow:0 18px 46px rgba(0,0,0,.5)}
.share-head h1{margin:0 0 6px;font-size:1.9rem;line-height:1.2}
.share-player{margin:14px 0 4px}
.share-player audio{width:min(400px,100%)}
.share-brand{color:#9a93ad;font-size:.88rem;margin:6px 0 0}
.share-cta{background:linear-gradient(180deg,#191920,#17171b 60%);border:1px solid rgba(245,158,11,.35);border-radius:16px;padding:26px 20px;text-align:center;margin:18px 0;box-shadow:0 18px 44px rgba(0,0,0,.4)}
.share-cta h2{margin:0 0 8px}
.share-cta p{color:#cfc9bd;margin:0 0 14px}
.share-cta .btn-cta{display:inline-block;background:linear-gradient(90deg,#f59e0b,#ec4899);color:#fff;font-weight:700;padding:13px 26px;border-radius:10px;text-decoration:none;box-shadow:0 8px 28px rgba(236,72,153,.35)}
.share-cta .btn-cta:hover{box-shadow:0 10px 36px rgba(236,72,153,.5)}
.share-cta .btn-quiet{display:inline-block;margin-left:14px;color:#f5b74e;font-weight:600;text-decoration:none}
.share-cta .btn-quiet:hover{text-decoration:underline}
.share-more-title{margin:22px 0 4px}
a.tile-cover{text-decoration:none}
.share-toast{position:fixed;left:50%;bottom:calc(84px + env(safe-area-inset-bottom));transform:translateX(-50%);background:#232329;color:#f7f4ef;border:1px solid #3a3a44;padding:10px 18px;border-radius:999px;z-index:80;box-shadow:0 10px 30px rgba(0,0,0,.5);font-size:.92rem;white-space:nowrap}
.inspired-strip{display:flex;justify-content:space-between;align-items:center;gap:12px;background:rgba(245,158,11,.10);border:1px solid rgba(245,158,11,.45);color:#f3d9a4;border-radius:12px;padding:12px 16px;margin:14px 0}
.inspired-strip p{margin:0}
.inspired-strip[hidden]{display:none}
.inspired-close{background:none;border:none;color:#f3d9a4;font-size:1.35rem;line-height:1;cursor:pointer;box-shadow:none;padding:0 4px}
