:root {
  --bg: #0e0a07;
  --bg-soft: #1a130d;
  --bg-softer: #15100b;
  --fg: #f3e9d2;
  --muted: #b8a585;
  --muted-dim: #8a7858;
  --accent: #d6a35c;
  --accent-soft: #6b4a26;
  --rule: rgba(214, 163, 92, 0.25);
  --live: #6dd28a;
  --font-serif: "Iowan Old Style", "Cormorant Garamond", Georgia, "Songti SC",
    "Noto Serif CJK SC", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC",
    "Noto Sans CJK SC", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(
      ellipse at top,
      rgba(214, 163, 92, 0.08),
      transparent 60%
    ),
    var(--bg);
}

.site-header,
main,
.site-footer {
  max-width: min(720px, 100vw);
  width: 100%;
  margin: 0 auto;
  padding: 0 1.25rem;
  overflow-wrap: anywhere;
}

.site-header {
  padding-top: 3rem;
  padding-bottom: 1.25rem;
  text-align: center;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.site-header h1 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(2.2rem, 5vw, 3rem);
  letter-spacing: 0.02em;
  margin: 0 0 0.25rem;
  color: var(--accent);
}

.live-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 0 0 rgba(109, 210, 138, 0.7);
  animation: pulse 2.4s ease-out infinite;
}

.live-dot.stale {
  background: var(--muted-dim);
  animation: none;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(109, 210, 138, 0.55);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(109, 210, 138, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(109, 210, 138, 0);
  }
}

.tagline {
  margin: 0.5rem 0 0;
  color: var(--muted);
  font-style: italic;
}

.lang-switch {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem;
  width: fit-content;
  max-width: 100%;
  margin: 0.85rem auto 0;
  padding: 0.2rem;
  background: var(--bg-soft);
  border: 1px solid var(--rule);
  border-radius: 999px;
}

.lang-btn {
  appearance: none;
  background: transparent;
  border: 0;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease;
}

.lang-btn:hover {
  color: var(--fg);
}

.lang-btn[aria-pressed="true"] {
  background: var(--accent);
  color: var(--bg);
}

.lang-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

main {
  flex: 1;
  padding-top: 1rem;
  padding-bottom: 3rem;
}

.callout {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  background: var(--bg-softer);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  padding: 0.85rem 1rem;
  margin-bottom: 1.25rem;
}

.callout-icon {
  font-size: 1.1rem;
  line-height: 1.4;
  color: var(--accent);
  flex: 0 0 auto;
}

.callout-body {
  flex: 1;
  min-width: 0;
}

.callout-body p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
}

.callout-body p + p {
  margin-top: 0.2rem;
}

.callout-text {
  color: var(--fg);
}

.callout code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85em;
  background: rgba(214, 163, 92, 0.1);
  padding: 0 0.3em;
  border-radius: 3px;
  color: var(--accent);
}

.player {
  background: var(--bg-soft);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 1.5rem 1.25rem 1.25rem;
  margin-bottom: 2rem;
}

.np-label {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.6rem;
}

.np-label span + span {
  color: var(--muted-dim);
}

.now-playing .np-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--fg);
  margin: 0 0 0.15rem;
  line-height: 1.3;
}

.now-playing .np-meta {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0.4rem 0 0.85rem;
  font-variant-numeric: tabular-nums;
}

.np-prompt {
  font-size: 0.95rem;
  color: var(--muted);
  margin: 0.15rem 0;
  font-style: italic;
}

audio {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  display: block;
  margin-top: 1rem;
}

.tagline,
.callout-text,
.now-playing .np-title,
.np-prompt,
.tip-blurb,
.recent-title {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.status {
  font-size: 0.8rem;
  color: var(--muted-dim);
  margin-top: 0.6rem;
  min-height: 1.2em;
}

.status.warn {
  color: var(--accent);
}

.recent,
.tip {
  margin-bottom: 2rem;
}

.recent h2,
.tip h2 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 1rem;
  color: var(--accent);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.4rem;
  margin: 0 0 0.6rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.recent-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.recent-list li {
  padding: 0.55rem 0.25rem;
  border-bottom: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  cursor: pointer;
}

.recent-list li:hover {
  background: rgba(214, 163, 92, 0.04);
}

.recent-list li.active {
  background: rgba(214, 163, 92, 0.08);
}

.recent-list li.empty {
  color: var(--muted-dim);
  cursor: default;
  font-style: italic;
}

.recent-list li.empty:hover {
  background: transparent;
}

.recent-title {
  font-family: var(--font-serif);
  color: var(--fg);
  font-size: 0.95rem;
}

.recent-meta {
  font-size: 0.75rem;
  color: var(--muted-dim);
  font-variant-numeric: tabular-nums;
}

.tip-blurb {
  color: var(--muted);
  margin: 0 0 1rem;
}

.tip-qr {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
  background: var(--bg-softer);
  border: 1px solid var(--rule);
  border-radius: 6px;
}

.tip-qr img {
  width: 132px;
  max-width: 42vw;
  height: auto;
  display: block;
  border-radius: 4px;
  background: #fff;
  padding: 0.35rem;
}

.tip-qr figcaption {
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.site-footer {
  padding: 1.5rem 1.25rem 2rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--rule);
}

.site-footer a {
  color: var(--accent);
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}
