:root {
  --bg-0: #05070c;
  --bg-1: #0b1020;
  --bg-2: #151515;
  --ink: #eef1ea;
  --muted: #b7bdb2;
  --line: rgba(238, 241, 234, 0.18);
  --panel: rgba(8, 12, 20, 0.78);
  --panel-soft: rgba(8, 12, 20, 0.58);
  --accent: #f2b84f;
  --accent-2: #ca6e2a;
  --accent-3: #94c7c3;
  --danger: #f16666;
  --ok: #59f5a6;
  --radius-lg: 22px;
  --radius-md: 14px;
  --shadow-deep: 0 20px 46px rgba(0, 0, 0, 0.32);
}

* {
  box-sizing: border-box;
  min-width: 0;
}

html,
body {
  height: 100%;
  scroll-behavior: smooth;
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
  line-height: 1.55;
  background:
    radial-gradient(1200px 900px at 10% -20%, rgba(242, 184, 79, 0.09), transparent 60%),
    radial-gradient(900px 700px at 100% 0%, rgba(148, 199, 195, 0.1), transparent 55%),
    linear-gradient(180deg, var(--bg-1), var(--bg-0) 40%, var(--bg-2));
  overflow-wrap: anywhere;
}

img,
video,
iframe,
canvas,
svg {
  max-width: 100%;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 100% 3px, 3px 100%;
  mix-blend-mode: soft-light;
  opacity: 0.2;
}

#starfieldCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

header,
main,
footer {
  position: relative;
  z-index: 2;
}

.site-nav {
  background: rgba(5, 8, 14, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

.navbar-brand {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.2rem;
  letter-spacing: 0.01em;
}

.nav-link {
  color: rgba(238, 241, 234, 0.86) !important;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.nav-link:hover,
.nav-link:focus,
.nav-link.active {
  color: #fff !important;
}

.editor-main {
  padding: 2rem 0 2.8rem;
}

.editor-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.9fr);
  gap: 1.1rem;
  margin-bottom: 1.1rem;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-deep);
}

.hero-content {
  padding: 1.2rem 1.15rem 1.15rem;
}

.hero-kicker {
  margin: 0;
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}

.hero-title {
  margin: 0.35rem 0 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.62rem, 3.2vw, 2.35rem);
  line-height: 1.12;
}

.hero-subhead {
  margin: 0.62rem 0 0;
  color: var(--muted);
  font-size: 1rem;
}

.hero-chips {
  margin-top: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
}

.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.05);
  color: #f4f6f2;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.24rem 0.55rem;
}

.hero-links {
  margin-top: 0.95rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.hero-links .btn,
.entry-actions .btn {
  white-space: normal;
  line-height: 1.22;
}

.hero-story {
  margin-top: 0.95rem;
}

.hero-story p {
  margin: 0.6rem 0;
  color: #e8ece4;
}

.hero-story p:last-child {
  margin-bottom: 0;
}

.hero-subhead,
.section-subhead,
.entry-title,
.entry-text,
.tracklist li {
  overflow-wrap: anywhere;
}

.hero-story .platform-links {
  margin-top: 0.72rem;
}

.hero-cover {
  padding: 0.7rem;
}

.hero-cover img {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  display: block;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.36);
  object-fit: cover;
}

.editor-section {
  margin-top: 1rem;
  padding: 1.1rem;
}

.editor-section h2,
.editor-section h3,
.editor-section h4 {
  font-family: "Fraunces", Georgia, serif;
}

.section-title {
  margin: 0;
  font-size: clamp(1.24rem, 2.2vw, 1.56rem);
}

.section-subhead {
  margin: 0.35rem 0 0;
  color: var(--muted);
}

.text-flow p {
  margin: 0.72rem 0;
  text-wrap: pretty;
}

.text-flow p:first-child {
  margin-top: 0.1rem;
}

.platform-links {
  margin-top: 0.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.62rem;
}

.platform-link {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 0.35rem 0.62rem;
  color: var(--ink);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.03);
  white-space: normal;
  line-height: 1.2;
  transition: transform 0.14s ease, background 0.14s ease;
}

.platform-link:hover,
.platform-link:focus {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.platform-link img {
  width: 18px;
  height: 18px;
  display: block;
}

.embed-wrap {
  margin-top: 0.82rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(4, 8, 14, 0.72);
  position: relative;
}

.embed-status {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.6rem 0.8rem;
  color: var(--muted);
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
}

.embed-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(242, 184, 79, 0.25);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: embed-spin 1s linear infinite;
}

@keyframes embed-spin {
  to {
    transform: rotate(360deg);
  }
}

.embed-wrap iframe {
  display: block;
  width: 100%;
  border: 0;
}

.embed-wrap.is-loading iframe {
  opacity: 0.72;
}

.embed-note {
  margin: 0.56rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border-radius: 999px;
  padding: 0.25rem 0.56rem;
  border: 1px solid;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.status-ok {
  background: rgba(89, 245, 166, 0.15);
  border-color: rgba(89, 245, 166, 0.42);
  color: #c5ffdf;
}

.status-pending {
  background: rgba(242, 184, 79, 0.16);
  border-color: rgba(242, 184, 79, 0.42);
  color: #ffecc8;
}

.status-no {
  background: rgba(241, 102, 102, 0.14);
  border-color: rgba(241, 102, 102, 0.42);
  color: #ffd6d6;
}

.entry-list {
  display: grid;
  gap: 0.62rem;
  margin-top: 0.82rem;
}

.entry-card {
  background: var(--panel-soft);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 0.8rem;
}

.entry-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.55rem;
  align-items: center;
}

.entry-title {
  margin: 0;
  font-size: 1rem;
  line-height: 1.3;
}

.entry-text {
  margin: 0.48rem 0 0;
  color: var(--muted);
}

.entry-actions {
  margin-top: 0.62rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tracklist {
  margin: 0.58rem 0 0;
  padding-left: 1.2rem;
}

.tracklist li {
  margin: 0.2rem 0;
  color: #e8ece4;
}

.entry-collapse {
  margin-top: 0.56rem;
  padding: 0.72rem;
  border-radius: 10px;
  border: 1px dashed rgba(255, 255, 255, 0.22);
  background: rgba(2, 5, 10, 0.52);
}

.btn-outline-light {
  --bs-btn-hover-bg: rgba(255, 255, 255, 0.12);
  --bs-btn-border-color: rgba(255, 255, 255, 0.33);
}

.btn-soft {
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
}

.btn-soft:hover,
.btn-soft:focus {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.footer-line {
  border-top: 1px solid var(--line);
  background: rgba(5, 8, 14, 0.78);
}

.footer-inner {
  padding: 0.9rem 0;
  font-size: 0.92rem;
  color: var(--muted);
  text-align: center;
}

.footer-inner p {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.18rem 0.4rem;
  margin: 0;
}

.footer-license {
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
}

.footer-license:hover,
.footer-license:focus {
  color: #fff;
}

@media (max-width: 991.98px) {
  .editor-main {
    padding-top: 1.25rem;
  }

  .site-nav .navbar-collapse {
    margin-top: 0.52rem;
    padding: 0.44rem 0.62rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    background: rgba(2, 6, 12, 0.82);
  }

  .site-nav .nav-link {
    padding: 0.44rem 0.35rem;
  }

  .editor-hero {
    grid-template-columns: 1fr;
  }

  .hero-cover {
    order: -1;
  }
}

@media (max-width: 575.98px) {
  .editor-main {
    padding: 0.98rem 0 1.8rem;
  }

  .hero-content,
  .editor-section {
    padding: 0.92rem;
  }

  .hero-kicker {
    font-size: 0.7rem;
    letter-spacing: 0.11em;
  }

  .hero-title {
    font-size: clamp(1.4rem, 8vw, 1.84rem);
    line-height: 1.14;
  }

  .hero-subhead {
    font-size: 0.95rem;
  }

  .hero-chip {
    font-size: 0.7rem;
    padding: 0.22rem 0.5rem;
  }

  .section-title {
    font-size: 1.24rem;
  }

  .section-subhead {
    font-size: 0.9rem;
  }

  .entry-card {
    padding: 0.72rem;
  }

  .entry-title {
    font-size: 0.95rem;
  }

  .tracklist {
    padding-left: 1rem;
  }

  .embed-status {
    font-size: 0.82rem;
    padding: 0.52rem 0.66rem;
  }

  .embed-note {
    font-size: 0.82rem;
  }

  .embed-wrap iframe[height="466"] {
    height: 420px;
  }

  .platform-link {
    font-size: 0.9rem;
  }

  .hero-links {
    display: grid;
    grid-template-columns: 1fr;
  }

  .hero-links .btn {
    width: 100%;
    text-align: center;
  }

  .platform-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.46rem;
  }

  .platform-link {
    justify-content: center;
    text-align: center;
  }

  .entry-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .entry-actions {
    width: 100%;
  }

  .entry-actions .btn {
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 390px) {
  .platform-links {
    grid-template-columns: 1fr;
  }

  .hero-chip {
    font-size: 0.68rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html,
  body {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
