:root {
  color-scheme: dark;
  --black: #0b0b0b;
  --charcoal: #171717;
  --panel: rgba(31, 28, 23, 0.9);
  --gold: #d4af37;
  --gold-light: #e6c65a;
  --warm-white: #f6f1e8;
  --muted: #cfc7b8;
  --border: rgba(212, 175, 55, 0.24);
  --radius: 24px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  font-family: Georgia, "Times New Roman", serif;
  background: var(--black);
  color: var(--warm-white);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--black); }
body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 50% -10%, rgba(212, 175, 55, 0.13), transparent 34rem),
    linear-gradient(145deg, #1a1814 0%, #100f0d 58%, #18150f 100%);
  color: var(--warm-white);
}
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: var(--gold-light); }
:focus-visible { outline: 3px solid var(--gold-light); outline-offset: 3px; }

.boot-fallback { min-height: 100vh; display: grid; place-items: center; color: var(--muted); }
.intro {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center;
  background: radial-gradient(circle, rgba(212,175,55,.11), transparent 38%), linear-gradient(145deg,#1a1814,#100f0d 58%,#18150f);
  opacity: 1; transition: opacity 500ms ease;
}
.intro.is-leaving { opacity: 0; pointer-events: none; }
.intro__content {
  display: grid;
  justify-items: center;
  width: min(420px, 82vw);
}
.intro__stage {
  position: relative;
  display: grid;
  place-items: center;
  width: min(420px, 82vw);
  aspect-ratio: 1;
  overflow: visible;
}
.intro__frame {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  background: transparent;
  border: 0;
  box-shadow: none;
}
.intro__brand-image {
  display: block;
  width: min(420px, 82vw);
  max-width: 82vw;
  height: auto;
  background: transparent;
  border: 0;
  box-shadow: none;
  animation: none;
}
.intro__frame--from { animation: website-crossfade-from 5s linear both; }
.intro__frame--to { animation: website-crossfade-to 5s linear both; }
@keyframes website-crossfade-from {
  from { opacity: 1; }
  to { opacity: 0; }
}
@keyframes website-crossfade-to {
  from { opacity: 0; }
  to { opacity: 1; }
}
.intro__progress {
  width: min(58%, 150px);
  height: 3px;
  margin-top: 1.4rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(246,241,232,.13);
}
.intro__progress span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(212,175,55,.45), var(--gold-light));
  transform: scaleX(0);
  transform-origin: left center;
  animation: intro-loading-progress 5s cubic-bezier(.22,.7,.25,1) forwards;
}
@keyframes intro-loading-progress {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

.app-shell { min-height: 100vh; padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: .7rem;
  min-height: 64px; padding: 10px max(20px, env(safe-area-inset-left));
  background: rgba(11,11,11,.82); border-bottom: 1px solid rgba(212,175,55,.12); backdrop-filter: blur(18px);
  font-size: 1.05rem; letter-spacing: .04em;
}
.topbar__heart { width: 36px; height: 36px; object-fit: contain; }
.notice {
  position: sticky; top: 64px; z-index: 15; display: grid; gap: 8px; margin: 0 auto; padding: .7rem 1rem;
  width: min(100%, 760px); background: #332b17; border-bottom: 1px solid var(--border);
  color: var(--warm-white); text-align: center; font: .9rem/1.4 system-ui, sans-serif;
}
.install-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  width: min(calc(100% - 40px), 780px); margin: 22px auto 0; padding: 18px 20px;
  border: 1px solid var(--border); border-radius: 20px;
  background: linear-gradient(135deg, rgba(212,175,55,.13), rgba(255,255,255,.025));
  box-shadow: var(--shadow);
}
.install-banner div { display: grid; gap: 5px; }
.install-banner strong { font-size: 1.08rem; font-weight: 400; }
.install-banner span, .install-section p { color: var(--muted); font: .9rem/1.5 system-ui, sans-serif; }
.install-banner .primary-button { flex: 0 0 auto; }
.main-content { width: min(100%, 820px); min-height: 70vh; margin: 0 auto; }
.page { padding: clamp(34px, 7vw, 72px) 20px 40px; animation: page-in 380ms ease both; }
@keyframes page-in { from { opacity: 0; transform: translateY(8px); } }
h1, h2, p { margin-top: 0; }
h1 { max-width: 17ch; margin-bottom: .45rem; font-size: clamp(2.25rem, 8vw, 4.6rem); font-weight: 400; line-height: 1.04; letter-spacing: -.03em; }
.greeting { overflow-wrap: anywhere; }
.greeting--long { max-width: 22ch; font-size: clamp(2rem, 5.5vw, 3.5rem); line-height: 1.08; }
h2 { font-size: clamp(1.35rem, 4vw, 2rem); font-weight: 400; line-height: 1.2; }
.lead { max-width: 42rem; color: var(--muted); font-size: clamp(1.05rem, 3vw, 1.25rem); line-height: 1.65; }
.eyebrow { margin-bottom: .6rem; color: var(--gold-light); font: 700 .76rem/1.2 system-ui, sans-serif; letter-spacing: .14em; text-transform: uppercase; }
.section-block { margin-top: clamp(44px, 9vw, 72px); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; color: var(--muted); }
.section-heading h2 { color: var(--warm-white); }
.card-list { display: grid; gap: 18px; margin-top: 24px; }
.card {
  position: relative; overflow: hidden; padding: clamp(22px, 5vw, 34px);
  border: 1px solid var(--border); border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(255,255,255,.045), rgba(255,255,255,.015));
  box-shadow: var(--shadow);
}
.card.is-important { border-color: rgba(230,198,90,.7); }
.card time { display: block; margin: -.3rem 0 1.15rem; color: var(--muted); font: .84rem/1.4 system-ui, sans-serif; }
.card p { color: var(--muted); line-height: 1.7; }
.card img:not(.song-cover) { width: 100%; max-height: 300px; margin: .5rem 0 1rem; border-radius: 16px; object-fit: cover; }
.carousel-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: -24px; padding: 0 16px; transform: translateY(50%); }
.icon-button {
  width: 48px; height: 48px; border: 1px solid var(--border); border-radius: 50%;
  background: #211e18; color: var(--gold-light); cursor: pointer;
}
.primary-button, .secondary-button, .danger-button, .text-button {
  min-height: 48px; padding: .75rem 1.15rem; border-radius: 999px; cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}
.primary-button { border: 1px solid var(--gold); background: linear-gradient(135deg, #d4af37, #a88322); color: #111; font-weight: 700; }
.secondary-button { border: 1px solid var(--border); background: rgba(212,175,55,.07); color: var(--warm-white); }
.danger-button { margin-top: 24px; border: 1px solid rgba(225,126,103,.45); background: transparent; color: #f0b4a6; }
.text-button { border: 0; background: transparent; color: var(--gold-light); }
.primary-button:hover, .secondary-button:hover, .icon-button:hover { transform: translateY(-1px); border-color: var(--gold-light); }
.section-block > .secondary-button { margin-top: 34px; }
.empty-state { padding: 26px; border: 1px dashed var(--border); border-radius: var(--radius); color: var(--muted); line-height: 1.6; }
.text-link { font-family: system-ui, sans-serif; }
.song-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(180px, 34%); gap: clamp(22px, 5vw, 40px); align-items: center; }
.song-card__body { min-width: 0; }
.song-card__media { display: grid; place-items: center; }
.song-cover { width: 100%; aspect-ratio: 1; border-radius: 18px; object-fit: cover; background: #211e18; }
.song-cover--empty { display: grid; place-items: center; color: var(--gold); font-size: 3rem; }
.song-preview { margin: 1.1rem 0 0; }
.song-preview__label { margin-bottom: .45rem; color: var(--warm-white) !important; font: 700 .82rem/1.3 system-ui, sans-serif; }
.song-streaming { display: flex; align-items: center; gap: .8rem; margin-top: 1.5rem; }
.song-streaming__label { margin: 0; color: var(--warm-white) !important; font: 700 .9rem/1.35 system-ui, sans-serif; }
.song-streaming__play {
  display: inline-grid; flex: 0 0 auto; width: 2.75rem; height: 2.75rem; place-items: center;
  border: 1px solid var(--gold); border-radius: 50%; background: linear-gradient(135deg, #d4af37, #a88322);
  color: #111; text-decoration: none; box-shadow: 0 8px 22px rgb(0 0 0 / 20%);
  transition: transform .18s ease, border-color .18s ease, filter .18s ease;
}
.song-streaming__play span { margin-left: .15rem; font-size: .95rem; line-height: 1; }
.song-streaming__play:hover { transform: translateY(-1px); border-color: var(--gold-light); filter: brightness(1.08); }
.song-streaming__play:focus-visible { outline: 2px solid var(--warm-white); outline-offset: 3px; }
.song-streaming__play--inline {
  display: inline-grid; width: 1.8rem; height: 1.8rem; margin: 0 .15rem;
  vertical-align: middle; box-shadow: none; transform: translateY(-.05rem);
}
.song-streaming__play--inline span { font-size: .65rem; }
.song-streaming__play--inline:hover { transform: translateY(-.05rem); filter: none; }
.preview-audio { display: block; width: 100%; accent-color: var(--gold); }

.navigation {
  position: fixed; z-index: 30; right: 0; bottom: 0; left: 0; display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 7px max(8px, env(safe-area-inset-right)) calc(7px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
  border-top: 1px solid rgba(212,175,55,.17); background: rgba(11,11,11,.92); backdrop-filter: blur(20px);
}
.navigation button { min-height: 58px; border: 0; border-radius: 15px; background: transparent; color: var(--muted); font: .72rem/1.2 system-ui,sans-serif; cursor: pointer; }
.navigation button.is-active { background: rgba(212,175,55,.1); color: var(--gold-light); }
.nav-icon { display: block; margin-bottom: 4px; font-size: 1.35rem; }

.onboarding { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.onboarding-card { width: min(100%, 650px); padding: clamp(26px, 7vw, 52px); border: 1px solid var(--border); border-radius: 30px; background: var(--panel); box-shadow: var(--shadow); }
.onboarding-card h1 { font-size: clamp(2rem, 7vw, 3.8rem); }
.step-count { color: var(--gold-light); font: 700 .78rem system-ui,sans-serif; letter-spacing: .12em; text-transform: uppercase; }
.progress { height: 3px; margin-bottom: 36px; border-radius: 10px; background: rgba(255,255,255,.09); overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--gold); transition: width 300ms ease; }
.onboarding-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 34px; }
.onboarding-actions > div { display: flex; gap: 8px; }
.button-stack { display: grid; gap: 12px; margin-top: 28px; }
.decision-button {
  min-height: 48px;
  padding: .75rem 1.15rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255,255,255,.025);
  color: var(--warm-white);
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}
.decision-button:hover {
  transform: translateY(-1px);
  border-color: var(--gold-light);
  background: rgba(212,175,55,.08);
}
.decision-button:disabled {
  border-color: var(--gold);
  background: rgba(212,175,55,.12);
  color: var(--gold-light);
  cursor: wait;
}
.welcome-note { display: grid; gap: 6px; margin-top: 30px; padding: 20px; border-left: 2px solid var(--gold); color: var(--muted); }
.onboarding-install {
  display: grid; gap: 12px; margin-top: 28px; padding: 20px;
  border: 1px solid var(--border); border-radius: 20px; background: rgba(212,175,55,.07);
}
.onboarding-install p { margin: 0; color: var(--muted); font: .92rem/1.55 system-ui, sans-serif; }
.onboarding-install .primary-button { width: 100%; }
.ios-install-guide ol {
  display: grid; gap: 10px; margin: 4px 0 6px; padding-left: 1.35rem;
  color: var(--warm-white); font: .92rem/1.5 system-ui, sans-serif;
}
.ios-install-guide .secondary-button { width: 100%; }
label { display: block; margin-bottom: 8px; color: var(--warm-white); font-family: system-ui,sans-serif; }
input[type="text"], input:not([type]) {
  width: 100%; min-height: 50px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 14px;
  background: rgba(255,255,255,.04); color: var(--warm-white);
}
.field-hint { color: var(--muted); font: .88rem/1.5 system-ui,sans-serif; }
.notification-status {
  max-width: 42rem;
  margin-bottom: 18px;
  padding: 14px 16px;
  border-left: 3px solid var(--gold);
  background: rgba(212,175,55,.07);
  color: var(--warm-white);
  font: .92rem/1.55 system-ui, sans-serif;
}
.notification-types-hint { margin-top: 22px; }
.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; margin-top: 20px; }
.choice { position: relative; margin: 0; }
.choice input { position: absolute; opacity: 0; }
.choice span { display: grid; place-items: center; min-height: 52px; padding: 8px; border: 1px solid var(--border); border-radius: 15px; color: var(--muted); cursor: pointer; text-align: center; }
.choice input:checked + span { border-color: var(--gold); background: rgba(212,175,55,.12); color: var(--warm-white); }
.choice input:focus-visible + span { outline: 3px solid var(--gold-light); outline-offset: 3px; }
.check-list { display: grid; gap: 12px; margin-top: 20px; }
.check-list label { display: flex; align-items: center; gap: 10px; }
.check-list input { width: 20px; height: 20px; accent-color: var(--gold); }
.settings-form { display: grid; gap: 26px; margin-top: 34px; }
fieldset { margin: 0; padding: 22px; border: 1px solid var(--border); border-radius: 20px; }
legend { padding: 0 8px; color: var(--gold-light); font-size: 1.15rem; }
.settings-section { margin-top: 44px; }
.external-link-hint {
  max-width: 38rem;
  margin-bottom: 16px;
  color: var(--muted);
  font: .92rem/1.6 system-ui, sans-serif;
}
.link-list { display: grid; gap: 1px; overflow: hidden; border: 1px solid var(--border); border-radius: 18px; background: var(--border); }
.link-list a { padding: 16px 18px; background: #191713; color: var(--warm-white); font-family: system-ui,sans-serif; text-decoration: none; }

@media (min-width: 980px) {
  .app-shell { padding: 0 0 0 220px; }
  .topbar { position: fixed; width: 220px; height: 86px; border-right: 1px solid rgba(212,175,55,.12); }
  .navigation { top: 86px; right: auto; width: 220px; grid-template-columns: 1fr; align-content: start; gap: 8px; padding: 18px; border-top: 0; border-right: 1px solid rgba(212,175,55,.12); }
  .navigation button { display: flex; align-items: center; gap: 12px; padding: 0 16px; font-size: .9rem; text-align: left; }
  .nav-icon { width: 24px; margin: 0; text-align: center; }
  .notice { top: 0; }
}

@media (max-width: 560px) {
  .install-banner { align-items: stretch; flex-direction: column; }
  .install-banner .primary-button { width: 100%; }
  .song-card { grid-template-columns: 1fr; }
  .song-card__media { grid-row: 1; justify-items: start; }
  .song-cover { max-width: 220px; }
  .choice-grid { grid-template-columns: 1fr; }
  .onboarding-actions { align-items: stretch; flex-direction: column-reverse; }
  .onboarding-actions > div { justify-content: space-between; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 1ms !important; transition-duration: 1ms !important; }
  .intro__progress span { transform: scaleX(1); animation: none !important; }
}
