:root {
  --bg-0: #04070d;
  --bg-1: #09101c;
  --bg-2: #10192a;
  --bg-3: #172338;
  --panel: rgba(10, 16, 28, 0.78);
  --panel-strong: rgba(14, 22, 38, 0.92);
  --panel-soft: rgba(255, 255, 255, 0.04);
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.18);
  --text: #edf3ff;
  --muted: #afbdd5;
  --soft: #8192ae;
  --accent: #7dd3fc;
  --accent-strong: #38bdf8;
  --accent-alt: #2dd4bf;
  --accent-wash: rgba(125, 211, 252, 0.14);
  --accent-glow: rgba(56, 189, 248, 0.32);
  --shadow: 0 24px 90px rgba(2, 8, 23, 0.5);
  --shadow-soft: 0 16px 50px rgba(2, 8, 23, 0.32);
  --hero-glow:
    radial-gradient(circle at 16% 18%, rgba(125, 211, 252, 0.2), transparent 26%),
    radial-gradient(circle at 84% 14%, rgba(45, 212, 191, 0.14), transparent 22%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
}

body[data-host-role="main"] {
  --accent: #7dd3fc;
  --accent-strong: #38bdf8;
  --accent-alt: #2dd4bf;
  --accent-wash: rgba(125, 211, 252, 0.14);
  --accent-glow: rgba(56, 189, 248, 0.28);
}

body[data-host-role="core"] {
  --accent: #93c5fd;
  --accent-strong: #60a5fa;
  --accent-alt: #818cf8;
  --accent-wash: rgba(96, 165, 250, 0.14);
  --accent-glow: rgba(96, 165, 250, 0.26);
}

body[data-host-role="edge"] {
  --accent: #fdba74;
  --accent-strong: #f59e0b;
  --accent-alt: #f97316;
  --accent-wash: rgba(245, 158, 11, 0.14);
  --accent-glow: rgba(245, 158, 11, 0.26);
}

body[data-host-role="ws"] {
  --accent: #fda4af;
  --accent-strong: #fb7185;
  --accent-alt: #f472b6;
  --accent-wash: rgba(251, 113, 133, 0.14);
  --accent-glow: rgba(251, 113, 133, 0.28);
}

body[data-host-role="cdn"] {
  --accent: #6ee7b7;
  --accent-strong: #34d399;
  --accent-alt: #14b8a6;
  --accent-wash: rgba(52, 211, 153, 0.14);
  --accent-glow: rgba(52, 211, 153, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
  background: linear-gradient(135deg, var(--bg-0), var(--bg-1) 45%, var(--bg-2));
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Trebuchet MS", "Gill Sans", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 18%, rgba(125, 211, 252, 0.12), transparent 24%),
    radial-gradient(circle at 84% 16%, rgba(255, 255, 255, 0.05), transparent 18%),
    radial-gradient(circle at 74% 82%, rgba(45, 212, 191, 0.08), transparent 20%),
    linear-gradient(140deg, var(--bg-0), var(--bg-1) 48%, var(--bg-2));
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  width: 34vw;
  height: 34vw;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.24;
  pointer-events: none;
  z-index: 0;
  animation: float-glow 16s ease-in-out infinite;
}

body::before {
  top: -10vw;
  left: -8vw;
  background: linear-gradient(135deg, var(--accent), transparent);
}

body::after {
  right: -10vw;
  bottom: -12vw;
  background: linear-gradient(135deg, var(--accent-alt), transparent);
  animation-delay: -8s;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

.scene-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.08));
}

.site-shell {
  position: relative;
  z-index: 1;
  width: min(1380px, calc(100% - 32px));
  margin: 18px auto 40px;
}

.site-header,
.hero,
.content-card,
.feature-card,
.route-card,
.player-shell,
.auth-dialog {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  box-shadow: var(--shadow);
}

.site-header {
  position: sticky;
  top: 14px;
  z-index: 25;
  display: grid;
  gap: 16px;
  padding: 18px 22px 22px;
  border-radius: 30px;
}

.header-bar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.brand-lockup {
  display: flex;
  gap: 16px;
  align-items: center;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(135deg, var(--accent-wash), rgba(255, 255, 255, 0.06)),
    rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.brand-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.brand-copy strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
  letter-spacing: 0.02em;
}

.brand-copy span {
  color: var(--muted);
  font-size: 0.95rem;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.status-chip,
.metric-pill,
.session-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.status-chip strong,
.session-badge {
  color: var(--text);
  font-weight: 600;
}

.status-chip::before,
.section-tag::before,
.panel-kicker::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-alt));
  box-shadow: 0 0 14px var(--accent-glow);
  flex: 0 0 auto;
}

.text-button,
.outline-button,
.solid-button,
.small-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.text-button:hover,
.outline-button:hover,
.solid-button:hover,
.small-button:hover {
  transform: translateY(-1px);
}

.text-button {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.outline-button,
.small-button {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
}

.solid-button {
  border-color: rgba(255, 255, 255, 0.12);
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #04111b;
  font-weight: 700;
  box-shadow: 0 14px 28px var(--accent-glow);
}

.outline-button:hover,
.small-button:hover,
.text-button:hover {
  border-color: var(--accent);
  color: var(--text);
}

.host-switcher {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.host-link {
  display: grid;
  gap: 4px;
  min-height: 102px;
  padding: 14px 16px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.035);
  box-shadow: var(--shadow-soft);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.host-link:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.16);
}

.host-link.is-active {
  border-color: rgba(255, 255, 255, 0.2);
  background: linear-gradient(135deg, var(--accent-wash), rgba(255, 255, 255, 0.05));
  box-shadow: 0 18px 42px rgba(2, 8, 23, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.host-link-name {
  color: var(--soft);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.host-link strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
}

.host-link small {
  color: var(--muted);
  line-height: 1.5;
}

.page-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.page-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease, color 150ms ease;
}

.page-nav a:hover {
  transform: translateY(-1px);
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.14);
}

.page-nav a.is-active {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.16);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
}

.page-body {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.hero {
  padding: 34px;
  border-radius: 34px;
  background: var(--hero-glow);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 22px;
  align-items: start;
}

.hero-copy {
  display: grid;
  gap: 18px;
}

.hero-stack {
  display: grid;
  gap: 16px;
}

.section-tag,
.panel-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 9px 13px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  width: fit-content;
}

.hero h1 {
  margin: 0;
  max-width: 12ch;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.7rem, 5.5vw, 5.1rem);
  line-height: 0.94;
  letter-spacing: -0.05em;
}

.hero-lead,
.hero-copy p,
.content-card p,
.content-card li,
.content-card dd,
.feature-card p,
.route-card p,
.player-shell p,
.auth-dialog p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.hero-actions,
.panel-actions,
.auth-actions,
.cross-links,
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.metric-pill {
  color: var(--text);
}

.metric-pill strong {
  color: var(--accent);
  font-weight: 600;
}

.panel,
.content-card,
.feature-card,
.route-card,
.player-shell {
  border-radius: 28px;
}

.panel {
  padding: 24px;
  display: grid;
  gap: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025));
}

.panel-header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.panel-title,
.content-card h2,
.content-card h3,
.feature-card h3,
.route-card h3,
.player-shell h2,
.player-shell h3,
.auth-dialog h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: -0.02em;
}

.panel-title {
  font-size: 1.45rem;
}

.session-badge {
  width: fit-content;
  color: var(--accent);
}

.info-list,
.signal-list,
.checklist,
.link-list,
.timeline,
.route-steps,
.playlist {
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.info-list li,
.signal-list li,
.checklist li,
.link-list li,
.timeline li,
.route-steps li,
.playlist li {
  padding: 14px 16px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.035);
}

.info-list strong,
.signal-list strong,
.checklist strong,
.link-list strong,
.timeline strong,
.route-steps strong {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
  font-weight: 600;
}

.content-card {
  padding: 28px;
  display: grid;
  gap: 18px;
}

.content-card h2 {
  font-size: clamp(1.7rem, 3vw, 2.45rem);
}

.section-head {
  display: grid;
  gap: 10px;
  max-width: 80ch;
}

.section-head h2 {
  margin: 0;
}

.card-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card-grid.is-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card-grid.is-5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.feature-card,
.route-card {
  padding: 22px;
  display: grid;
  gap: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02));
}

.feature-kicker {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: var(--soft);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.03);
}

.feature-meta {
  color: var(--soft);
  font-size: 0.92rem;
}

.split-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
  gap: 18px;
}

.player-shell {
  padding: 24px;
  display: grid;
  gap: 16px;
}

.player-screen {
  position: relative;
  min-height: 320px;
  padding: 24px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at 18% 18%, rgba(125, 211, 252, 0.16), transparent 22%),
    radial-gradient(circle at 74% 72%, rgba(52, 211, 153, 0.14), transparent 20%),
    linear-gradient(135deg, rgba(8, 13, 24, 0.96), rgba(13, 21, 35, 0.88));
  overflow: hidden;
}

.player-screen::after {
  content: "";
  position: absolute;
  inset: auto -12% -40% auto;
  width: 42%;
  height: 70%;
  background: radial-gradient(circle, var(--accent-glow), transparent 70%);
  filter: blur(32px);
  opacity: 0.75;
}

.player-overlay {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: space-between;
  min-height: 272px;
}

.player-overlay h3 {
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  max-width: 11ch;
}

.player-bar {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
}

.player-track {
  flex: 1 1 200px;
  min-height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.player-progress {
  width: 58%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--accent), var(--accent-alt));
}

.playlist li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.playlist span {
  color: var(--muted);
}

.route-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.route-card {
  gap: 16px;
}

.route-card .button-row {
  margin-top: auto;
}

.link-list a,
.page-pager a,
.feature-card a,
.route-card a {
  color: var(--text);
}

.page-pager {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.page-pager a {
  display: grid;
  gap: 4px;
  padding: 18px 20px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.035);
  box-shadow: var(--shadow-soft);
}

.page-pager span {
  color: var(--soft);
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.page-pager strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.12rem;
}

.site-footer {
  margin-top: 18px;
  padding: 18px 22px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  line-height: 1.75;
  box-shadow: var(--shadow-soft);
}

.site-footer strong {
  color: var(--text);
}

.auth-modal[hidden] {
  display: none;
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(2, 6, 14, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.auth-dialog {
  position: relative;
  width: min(720px, 100%);
  padding: 28px;
  border-radius: 30px;
  display: grid;
  gap: 18px;
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
}

.auth-form {
  display: grid;
  gap: 14px;
}

.field-row {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field-label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.95rem;
}

.field-input,
.field-select {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  outline: none;
}

.field-input:focus,
.field-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-wash);
}

.auth-form-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.auth-feedback {
  color: var(--soft);
  font-size: 0.92rem;
}

.is-hidden {
  display: none !important;
}

@keyframes float-glow {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }

  50% {
    transform: translate3d(16px, 22px, 0) scale(1.05);
  }
}

@media (max-width: 1180px) {
  .host-switcher,
  .card-grid.is-5 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

@media (max-width: 920px) {
  .site-shell {
    width: min(100%, calc(100% - 24px));
  }

  .header-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .header-actions {
    justify-content: flex-start;
  }

  .card-grid,
  .card-grid.is-3,
  .route-grid,
  .page-pager {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .site-header,
  .hero,
  .content-card,
  .player-shell,
  .auth-dialog {
    border-radius: 24px;
  }

  .site-header {
    top: 10px;
    padding: 16px;
  }

  .hero,
  .content-card,
  .player-shell {
    padding: 22px;
  }

  .hero h1 {
    max-width: none;
  }

  .host-switcher {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .field-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .site-shell {
    width: min(100%, calc(100% - 18px));
    margin-top: 10px;
  }

  .brand-lockup {
    gap: 12px;
  }

  .brand-mark {
    width: 46px;
    height: 46px;
  }

  .brand-copy strong {
    font-size: 1.16rem;
  }

  .host-switcher {
    grid-template-columns: 1fr;
  }

  .status-chip,
  .metric-pill,
  .session-badge,
  .text-button,
  .outline-button,
  .solid-button,
  .small-button {
    width: 100%;
  }

  .auth-form-actions {
    display: grid;
  }

  .player-screen {
    min-height: 280px;
  }
}
