:root {
  --bg: #f5f6f8;
  --bg-soft: #fbfbfc;
  --panel: #ffffff;
  --panel-soft: #f1f3f5;
  --panel-dark: #0f1114;
  --panel-dark-soft: #171a1f;
  --text: #111317;
  --muted: #626b78;
  --muted-light: #b7bfcb;
  --border: #d7dce3;
  --border-dark: #2b2f36;
  --blue: #3366ff;
  --red: #d94b57;
  --black: #0f1114;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --shadow: 0 18px 45px rgba(15, 17, 20, 0.06);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  background:
    linear-gradient(180deg, rgba(51, 102, 255, 0.04), transparent 16rem),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
  color: var(--text);
}

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

button,
input {
  font: inherit;
}

.site-shell {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1rem 0 2.5rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.25rem 0 1rem;
  backdrop-filter: blur(18px);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  padding: 0.7rem 1rem;
  border-radius: 18px;
}

.brand-logo {
  display: block;
  width: min(320px, 40vw);
  height: auto;
}

.header-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.header-account-button {
  white-space: nowrap;
}

.header-nav a {
  padding: 0.75rem 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--border);
  color: var(--muted);
  transition: 160ms ease;
}

.header-nav a:hover {
  color: var(--text);
  border-color: #c1c8d2;
}

.page,
.section,
.hero {
  display: grid;
  gap: 0.9rem;
}

.panel,
.panel-dark,
.section-head,
.search-row {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
}

.panel-soft {
  background: var(--panel-soft);
}

.panel-dark {
  background: var(--panel-dark);
  border: 1px solid var(--border-dark);
  color: #fff;
}

.hero {
  grid-template-columns: 1.3fr minmax(290px, 0.8fr);
}

.hero-copy,
.hero-side,
.player-card,
.download-card,
.section-head,
.search-row,
.support-card,
.comments-card {
  padding: 1.1rem;
}

.eyebrow,
.mini-label,
.stat-label {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.18rem;
  text-transform: uppercase;
}

.eyebrow {
  color: var(--blue);
}

.mini-label,
.stat-label {
  color: var(--muted);
}

.panel-dark .mini-label {
  color: var(--muted-light);
}

.hero h1,
.section-head h2,
.download-card h2 {
  margin: 0;
  font-size: clamp(2rem, 3.2vw, 3rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.hero-side h2 {
  margin: 0;
  font-size: 1.4rem;
  line-height: 1.05;
}

.live-room-grid h3,
.support-card h3 {
  margin: 0;
  font-size: 1.1rem;
}

.lede,
.section-copy,
#hero-status-copy,
.footnote,
.slot-meta,
.artist-meta,
.replay-meta,
.muted-text {
  color: var(--muted);
  line-height: 1.42;
}

.panel-dark .section-copy,
.panel-dark .muted-text {
  color: var(--muted-light);
}

.hero-listener-row {
  margin-top: 1rem;
}

.hero-listener-chip {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: #edf2ff;
  color: var(--blue);
  font-size: 0.8rem;
  font-weight: 700;
}

.hero-actions,
.download-actions,
.support-actions,
.player-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.65rem;
  padding: 0.72rem 1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  transition: 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-solid {
  background: var(--black);
  border-color: var(--black);
  color: #fff;
}

.button-ghost,
.button-store {
  background: #fff;
}

.button-disabled {
  opacity: 0.55;
  pointer-events: none;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 1rem;
}

.stat-row strong {
  display: block;
  margin-top: 0.2rem;
  font-size: 1.35rem;
  color: var(--text);
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  background: var(--panel);
  border: 1px solid var(--border);
}

.player-card {
  overflow: hidden;
}

.player-topbar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 1rem;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12rem;
  text-transform: uppercase;
}

.player-frame {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: #000;
}

.player-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.player-controls {
  padding-top: 1rem;
}

.live-room-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 0.9rem;
}

.support-card {
  display: grid;
  gap: 0.8rem;
}

.comments-card {
  display: grid;
  gap: 0.8rem;
}

.comments-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 0.75rem;
}

.comments-total {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  min-height: 2rem;
  padding: 0 0.7rem;
  border-radius: 999px;
  background: #1d2128;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 800;
}

.comments-list,
.stack-list,
.artist-grid,
.replay-grid {
  display: grid;
  gap: 0.8rem;
}

.comment-item {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 0.7rem;
  align-items: start;
  padding: 0.8rem;
  border-radius: var(--radius-md);
  background: var(--panel-dark-soft);
  border: 1px solid #20252d;
}

.comment-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #232832;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 800;
}

.comment-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.comment-name {
  font-size: 0.88rem;
  font-weight: 800;
}

.comment-time {
  color: var(--muted-light);
  font-size: 0.72rem;
}

.comment-body {
  margin: 0.18rem 0 0;
  color: #eef1f6;
  font-size: 0.85rem;
  line-height: 1.35;
}

.card {
  padding: 0.95rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.schedule-card {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 0.9rem;
}

.slot-time,
.artist-time-chip,
.replay-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.34rem 0.6rem;
  border-radius: 999px;
  background: #3d424a;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05rem;
}

.slot-date {
  text-align: center;
}

.slot-date .day {
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 800;
}

.slot-date .time {
  margin-top: 0.2rem;
  font-size: 1rem;
  font-weight: 800;
}

.slot-title,
.artist-name,
.replay-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
}

.artist-grid {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.artist-card {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 0.85rem;
  align-items: start;
}

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 800;
}

.artist-head,
.replay-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 0.75rem;
}

.search-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.8rem;
  background: var(--panel);
  border: 1px solid var(--border);
}

.search-input {
  width: 100%;
  min-height: 2.8rem;
  padding: 0 0.2rem;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
}

.empty-state {
  padding: 1rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.8);
}

.panel-dark .empty-state {
  border-color: #2b2f36;
  background: #171a1f;
  color: var(--muted-light);
}

.hidden {
  display: none;
}

.replay-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.download-card {
  display: grid;
  gap: 1rem;
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.auth-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 17, 20, 0.56);
  backdrop-filter: blur(10px);
}

.auth-panel {
  position: relative;
  width: min(460px, 100%);
  display: grid;
  gap: 0.95rem;
  padding: 1.1rem;
  border-radius: 22px;
  background: #ffffff;
  border: 1px solid var(--border);
  box-shadow: 0 30px 70px rgba(15, 17, 20, 0.2);
}

.auth-panel-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
}

.auth-panel-head h2 {
  margin: 0;
  font-size: 1.5rem;
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.auth-close-button {
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 999px;
  background: var(--panel-soft);
  color: var(--text);
  cursor: pointer;
  font-size: 1.2rem;
}

.auth-tab-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.auth-lane-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.auth-tab-button {
  min-height: 2.55rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  font-weight: 700;
}

.auth-tab-button-active {
  background: var(--black);
  border-color: var(--black);
  color: #fff;
}

.auth-lane-button {
  min-height: 2.8rem;
  padding: 0.65rem 0.8rem;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  font-weight: 700;
  text-align: center;
}

.auth-lane-button-active {
  border-color: #b7c6ef;
  background: #edf2ff;
  color: var(--blue);
}

.auth-form,
.auth-signed-in {
  display: grid;
  gap: 0.8rem;
}

.auth-field {
  display: grid;
  gap: 0.4rem;
}

.auth-field span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.auth-field input {
  min-height: 3rem;
  padding: 0.8rem 0.95rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  outline: none;
}

.auth-field input:focus {
  border-color: #b4c2e8;
  box-shadow: 0 0 0 3px rgba(51, 102, 255, 0.08);
}

.auth-type-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 0.95rem;
  border-radius: 14px;
  background: #f4f6f9;
  border: 1px solid var(--border);
}

.auth-type-label {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.auth-type-value {
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 800;
}

.auth-submit {
  width: 100%;
}

.auth-status {
  margin: 0;
  padding: 0.8rem 0.95rem;
  border-radius: 14px;
  background: #f1f4f8;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

.auth-status.auth-status-error {
  background: #fff1f2;
  color: #a93847;
}

.auth-status.auth-status-success {
  background: #eef7f0;
  color: #276841;
}

@media (max-width: 980px) {
  .hero,
  .live-room-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 640px) {
  .site-shell {
    width: min(100% - 1rem, 1180px);
    padding-top: 0.6rem;
  }

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

  .header-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .brand {
    width: 100%;
  }

  .brand-logo {
    width: min(240px, 58vw);
  }

  .header-nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 0.1rem;
  }

  .header-account-button {
    width: 100%;
  }

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

  .player-controls,
  .support-actions,
  .download-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .comment-head,
  .artist-head,
  .replay-head {
    flex-direction: column;
    align-items: start;
  }
}
