:root {
  color-scheme: light;
  --bg: #c95a33;
  --panel: rgba(255, 243, 229, 0.08);
  --panel-strong: rgba(255, 243, 229, 0.14);
  --ink: #fff0df;
  --muted: rgba(255, 240, 223, 0.74);
  --line: rgba(255, 240, 223, 0.34);
  --accent: #fff0df;
  --accent-strong: #fff8ef;
  --live: #fff0df;
  --idle: rgba(255, 240, 223, 0.44);
  --shadow: none;
  --serif: "Cormorant Garamond", "Iowan Old Style", "Baskerville", "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
}

button,
input {
  font: inherit;
}

.shell {
  position: relative;
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 28px 0 42px;
}

.shell-narrow {
  width: min(840px, calc(100% - 36px));
}

.shell-viewer {
  min-height: 100vh;
}

.translation-screen {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: clamp(24px, 6vw, 88px);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 54px;
  border-bottom: 1px solid var(--line);
  color: var(--accent);
}

.site-mark,
.site-date,
.eyebrow,
.side-note,
.status-row,
.field,
.button,
.history-line {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.site-mark,
.site-date,
.eyebrow,
.side-note {
  margin: 0;
}

.hero {
  display: grid;
  align-items: center;
  gap: 22px;
  min-height: 44vh;
  padding: 52px 0 36px;
}

.hero-viewer {
  grid-template-columns: minmax(90px, 1fr) minmax(260px, 560px) minmax(90px, 1fr);
}

.hero-broadcast {
  display: block;
  min-height: auto;
  padding-bottom: 26px;
}

.hero-center {
  text-align: center;
}

h1 {
  margin: 0;
  color: var(--accent);
  font-family: var(--serif);
  font-size: clamp(4.4rem, 13vw, 10.5rem);
  font-weight: 500;
  line-height: 0.82;
  letter-spacing: -0.04em;
}

.lede {
  max-width: 610px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 2.5vw, 1.55rem);
  line-height: 1.42;
}

.side-note {
  color: var(--accent);
  line-height: 1.18;
}

.side-note-right {
  text-align: right;
}

.caption-stage,
.control-panel,
.history {
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.caption-stage,
.control-panel {
  padding: clamp(18px, 4vw, 34px);
}

.caption-stage.compact {
  margin-top: 18px;
}

.history {
  margin-top: 18px;
  padding: 18px 22px;
}

.status-row {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}

.status-dot {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: var(--idle);
  box-shadow: 0 0 0 6px rgba(255, 240, 223, 0.1);
}

.status-dot.live {
  background: var(--live);
  box-shadow: 0 0 0 6px rgba(255, 240, 223, 0.16);
}

.current-caption {
  min-height: 2.8em;
  margin: 28px 0 0;
  color: var(--accent);
  font-family: var(--serif);
  font-size: clamp(3rem, 9vw, 7.8rem);
  font-weight: 500;
  line-height: 0.94;
  letter-spacing: -0.035em;
}

.viewer-captions {
  display: grid;
  width: min(1500px, 100%);
  gap: clamp(10px, 2vw, 24px);
  text-align: center;
}

.viewer-caption-line {
  margin: 0;
  color: var(--accent);
  font-family: var(--serif);
  font-size: clamp(2.6rem, 7vw, 7rem);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.caption-history {
  display: grid;
  gap: 12px;
}

.history-line {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--muted);
}

.field input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0;
  background: rgba(255, 240, 223, 0.08);
  color: var(--accent);
  padding: 14px 16px;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.button {
  border: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  padding: 12px 18px;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.button-primary {
  border-color: var(--accent);
  background: var(--panel-strong);
  color: var(--accent);
}

.button-primary:hover:not(:disabled) {
  background: rgba(255, 240, 223, 0.2);
}

#translated-audio {
  display: none;
}

.songline {
  position: absolute;
  right: 0;
  bottom: 2px;
  left: 0;
  margin: 0;
  overflow: hidden;
  color: var(--accent);
  font-family: var(--serif);
  font-size: clamp(1.3rem, 4vw, 3rem);
  line-height: 1;
  opacity: 0.92;
  text-align: center;
  transform: rotate(-2deg);
  white-space: nowrap;
}

.songline-small {
  position: static;
  margin-top: 26px;
  font-size: clamp(1.1rem, 3vw, 2rem);
}

@media (max-width: 640px) {
  .shell,
  .shell-narrow {
    padding: 18px 0 28px;
  }

  .site-header {
    min-height: 48px;
  }

  .hero {
    padding: 34px 0 22px;
  }

  .hero-viewer {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .hero-center,
  .side-note-right {
    text-align: left;
  }

  .side-note {
    display: none;
  }

  .caption-stage,
  .control-panel,
  .history {
    padding: 18px;
  }

  .translation-screen {
    padding: 24px;
  }

  .viewer-caption-line {
    font-size: clamp(2rem, 10vw, 4rem);
  }
}
