:root {
  --bg: #000000;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-strong: rgba(255, 255, 255, 0.08);
  --muted: rgba(255, 255, 255, 0.68);
  --muted-soft: rgba(255, 255, 255, 0.44);
  --text: #ffffff;
  --yellow: #fad12d;
  --red: #db2c2c;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.18);
  --shadow: 0 32px 120px rgba(0, 0, 0, 0.45);
}

@font-face {
  font-family: 'Radioz';
  src: url('./Radioz.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'CallOfOpsDuty';
  src: url('./Call-of-Ops-Duty.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top center, rgba(219, 44, 44, 0.14), transparent 34%),
    radial-gradient(circle at 18% 18%, rgba(250, 209, 45, 0.12), transparent 24%),
    linear-gradient(180deg, #080808 0%, #000000 46%, #050505 100%);
  color: var(--text);
  font-family: 'Radioz', sans-serif;
}

button,
input,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

.page-shell {
  position: relative;
  min-height: 100vh;
  padding: 16px 14px 32px;
  overflow: hidden;
}

.page-noise {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.02) 50%, transparent 100%),
    radial-gradient(circle at center, transparent 58%, rgba(255, 255, 255, 0.015) 100%);
  opacity: 0.85;
}

.stage-shell {
  position: relative;
  z-index: 1;
  max-width: 1160px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 84px minmax(0, 760px) 84px;
  gap: 14px;
  align-items: start;
  justify-content: center;
}

.stage {
  display: grid;
  gap: 18px;
}

.rail {
  display: flex;
  min-height: calc(100vh - 48px);
}

.rail-left {
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  padding-top: 60px;
}

.rail-right {
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 18px;
  padding-bottom: 44px;
}

.rail-button,
.go-button,
.sheet-close,
.sheet-action,
.toolbar-play,
.transport-button,
.card-button,
.preview-button,
.suggestion-button {
  appearance: none;
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
  color: inherit;
  font: inherit;
}

.rail-button {
  font-family: 'CallOfOpsDuty', sans-serif;
  font-size: 1rem;
  letter-spacing: 0.04em;
  transition: opacity 120ms ease, transform 120ms ease;
}

.rail-button:hover,
.go-button:hover,
.sheet-close:hover,
.sheet-action:hover,
.toolbar-play:hover,
.transport-button:hover,
.card-button:hover,
.preview-button:hover,
.suggestion-button:hover {
  opacity: 0.84;
}

.rail-button:active,
.go-button:active,
.sheet-close:active,
.sheet-action:active,
.toolbar-play:active,
.transport-button:active,
.card-button:active,
.preview-button:active,
.suggestion-button:active {
  transform: translateY(1px);
}

.rail-button:disabled,
.go-button:disabled,
.sheet-close:disabled,
.sheet-action:disabled,
.toolbar-play:disabled,
.transport-button:disabled,
.card-button:disabled,
.preview-button:disabled,
.suggestion-button:disabled {
  cursor: not-allowed;
  opacity: 0.28;
  transform: none;
}

.rail-button-vertical {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  min-height: 120px;
}

.rail-accent-white {
  color: #ffffff;
}

.rail-accent-yellow {
  color: var(--yellow);
}

.rail-accent-red {
  color: var(--red);
}

.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
  padding-top: 4px;
}

.search-field {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 4px 12px;
  border-bottom: 1px solid var(--line);
}

.search-icon {
  color: var(--muted);
  font-size: 0.95rem;
}

.search-field input {
  width: 100%;
  background: none;
  border: 0;
  outline: none;
  color: var(--text);
  font: 400 1rem/1.2 'Radioz', sans-serif;
}

.search-field input::placeholder {
  color: var(--muted-soft);
}

.go-button {
  font-family: 'CallOfOpsDuty', sans-serif;
  font-size: 1.45rem;
  line-height: 1;
  color: var(--red);
}

.hero-stack {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding-top: 10px;
}

.wordmark {
  display: inline-flex;
  align-items: flex-end;
  gap: 8px;
  transform: translateX(4px);
}

.wordmark-logo {
  width: 34px;
  height: auto;
  transform: rotate(-16deg) translateY(-4px);
  border-radius: 3px;
}

.wordmark-audio {
  font-family: 'CallOfOpsDuty', sans-serif;
  font-size: clamp(2.1rem, 5.6vw, 3.2rem);
  line-height: 0.9;
  color: var(--red);
  transform: rotate(-11deg);
}

.wordmark-exp {
  font-family: 'CallOfOpsDuty', sans-serif;
  font-size: clamp(0.9rem, 2vw, 1.28rem);
  color: var(--yellow);
  transform: rotate(-17deg) translateY(-8px);
}

.brand-title {
  margin: 0;
  font-size: clamp(2.25rem, 6vw, 3rem);
  line-height: 0.92;
}

.stage-status-label,
.section-heading,
.now-playing-label,
.stat-label,
.sheet-title,
.sheet-action,
.toolbar-play,
.sheet-close {
  font-family: 'CallOfOpsDuty', sans-serif;
}

.stage-status-label {
  margin: 0;
  font-size: 1rem;
  color: var(--yellow);
}

.suggestions {
  display: grid;
}

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

.suggestion-button {
  min-height: 44px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 0.98rem;
  padding: 0 14px;
}

.stage-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.stat-card {
  display: grid;
  gap: 6px;
  padding: 12px 10px;
  text-align: center;
}

.stat-card:not(:last-child) {
  border-right: 1px solid var(--line);
}

.stat-label {
  font-size: 0.86rem;
  color: var(--yellow);
}

.stat-value {
  color: var(--muted);
  font-size: 0.95rem;
}

.preview-section {
  display: grid;
  gap: 10px;
}

.section-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-heading {
  margin: 0;
  font-size: 0.94rem;
  color: var(--yellow);
}

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

.preview-card {
  display: grid;
  gap: 10px;
  padding: 14px 0 12px;
  border-bottom: 1px solid var(--line);
}

.preview-title,
.card-title,
.now-playing-title {
  margin: 0;
  font-size: clamp(1.08rem, 2.6vw, 1.5rem);
  line-height: 1.05;
}

.preview-meta,
.card-meta,
.card-copy,
.status-message,
.error-message,
.time-row,
.empty-state,
.sheet-section-subtitle {
  color: var(--muted);
}

.preview-meta,
.card-meta {
  font-size: 0.82rem;
}

.preview-actions,
.card-actions,
.transport-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.preview-button,
.card-button,
.transport-button {
  font-family: 'CallOfOpsDuty', sans-serif;
  font-size: 1.02rem;
  line-height: 1;
}

.preview-button-primary,
.transport-button-primary,
.card-button-primary {
  color: var(--red);
}

.preview-button-secondary,
.transport-button-secondary,
.card-button-secondary {
  color: var(--yellow);
}

.preview-button-tertiary,
.card-button-tertiary {
  color: rgba(255, 255, 255, 0.78);
}

.status-stack {
  display: grid;
  justify-items: center;
  gap: 6px;
}

.status-message,
.error-message {
  margin: 0;
  text-align: center;
  font-size: 1rem;
}

.error-message {
  color: var(--red);
}

.now-playing {
  display: grid;
  gap: 12px;
  justify-items: center;
  text-align: center;
  padding-top: 6px;
}

.now-playing-label {
  margin: 0;
  font-size: 0.94rem;
  color: var(--yellow);
}

.now-playing-title {
  max-width: 22ch;
}

.now-playing-placeholder {
  font-size: clamp(1.02rem, 2.4vw, 1.2rem);
  color: var(--text);
}

.now-playing-meta {
  color: var(--muted);
  font-size: 0.92rem;
}

.progress-wrap {
  width: min(100%, 620px);
  display: grid;
  gap: 8px;
}

.progress-slider {
  width: 100%;
  appearance: none;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  outline: none;
}

.progress-slider::-webkit-slider-thumb {
  appearance: none;
  width: 36px;
  height: 24px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 6px 20px rgba(255, 255, 255, 0.1);
}

.progress-slider::-moz-range-thumb {
  width: 36px;
  height: 24px;
  border-radius: 999px;
  border: 0;
  background: #ffffff;
}

.progress-slider::-moz-range-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.time-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-family: 'CallOfOpsDuty', sans-serif;
  font-size: 0.86rem;
}

.transport-row {
  justify-content: center;
}

.sheet {
  position: fixed;
  inset: 0;
  z-index: 20;
}

.sheet[hidden] {
  display: none;
}

.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(14px);
}

.sheet-panel {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(920px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  margin: 12px auto;
  background:
    linear-gradient(180deg, rgba(17, 17, 17, 0.96), rgba(5, 5, 5, 0.98)),
    var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 26px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--line);
}

.sheet-title {
  margin: 0;
  font-size: clamp(1.3rem, 3vw, 1.8rem);
}

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

.sheet-close,
.sheet-action,
.toolbar-play {
  font-size: 0.96rem;
}

.sheet-close {
  color: var(--yellow);
}

.sheet-body {
  overflow: auto;
  padding: 22px 24px 34px;
}

.sheet-copy {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.sheet-section-title {
  margin: 0 0 6px;
  font-size: 1.36rem;
  color: var(--yellow);
}

.sheet-section-subtitle {
  margin: 0;
  max-width: 56ch;
  font-size: 0.9rem;
}

.sheet-count {
  font-size: 0.98rem;
  color: var(--muted);
}

.saved-toolbar {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 18px;
}

.toolbar-play {
  color: var(--red);
}

.card-list {
  display: grid;
  gap: 0;
}

.card {
  display: grid;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.card-head {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: flex-start;
}

.card-meta-stack {
  display: grid;
  gap: 6px;
}

.card-side {
  display: grid;
  gap: 8px;
  text-align: right;
}

.card-side-label {
  color: var(--yellow);
  font-size: 0.82rem;
}

.card-copy {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.4;
}

.card-current .card-title {
  color: #ffffff;
}

.card-current {
  border-bottom-color: rgba(250, 209, 45, 0.26);
}

.empty-state {
  padding: 28px 0 8px;
  font-size: 0.98rem;
}

.hidden {
  display: none !important;
}

body.sheet-open {
  overflow: hidden;
}

@media (max-width: 1040px) {
  .stage-shell {
    grid-template-columns: 66px minmax(0, 1fr) 66px;
  }

  .rail-button {
    font-size: 0.92rem;
  }

  .preview-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .page-shell {
    padding-inline: 10px;
  }

  .stage-shell {
    grid-template-columns: 42px minmax(0, 1fr) 42px;
    gap: 10px;
  }

  .rail {
    min-height: 0;
  }

  .rail-left,
  .rail-right {
    padding: 44px 0 0;
    gap: 12px;
  }

  .rail-button {
    font-size: 0.76rem;
  }

  .search-row {
    gap: 10px;
  }

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

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

  .stat-card:nth-child(2n) {
    border-right: 0;
  }

  .stat-card:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .sheet-panel {
    width: calc(100vw - 12px);
    max-height: calc(100vh - 12px);
    margin: 6px auto;
    border-radius: 20px;
  }

  .sheet-header,
  .sheet-body {
    padding-inline: 16px;
  }

  .sheet-copy,
  .card-head {
    grid-template-columns: 1fr;
    display: grid;
  }

  .card-side {
    text-align: left;
  }

  .card-actions {
    gap: 12px;
  }
}

@media (max-width: 540px) {
  .page-shell {
    padding-top: 12px;
  }

  .stage-shell {
    grid-template-columns: 34px minmax(0, 1fr) 34px;
  }

  .rail-left,
  .rail-right {
    padding-top: 40px;
    gap: 10px;
  }

  .brand-title {
    letter-spacing: 0.01em;
  }

  .wordmark-logo {
    width: 26px;
  }

  .go-button {
    font-size: 1.2rem;
  }

  .transport-row,
  .preview-actions,
  .card-actions {
    justify-content: flex-start;
  }

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