:root {
  --bg: #0d0f14;
  --bg-soft: radial-gradient(1200px 600px at 15% -10%, #241a3d 0%, transparent 60%),
             radial-gradient(1000px 500px at 100% 0%, #0d2b3d 0%, transparent 55%),
             #0d0f14;
  --card: #161922;
  --card-hover: #1d212c;
  --border: #262b38;
  --text: #f1f3f7;
  --text-muted: #939aab;
  --accent: #7c5cff;
  --accent-2: #22d3ee;
  --accent-grad: linear-gradient(135deg, #7c5cff 0%, #ff5eae 100%);
  --ok: #2fd47f;
  --ok-bg: rgba(47, 212, 127, 0.12);
  --warn: #f5a524;
  --warn-bg: rgba(245, 165, 36, 0.12);
  --live: #ef4444;
  --muted-bg: rgba(255, 255, 255, 0.04);
  --shadow: 0 12px 32px -12px rgba(0, 0, 0, 0.55);
  --radius: 16px;
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f4f5f9;
    --bg-soft: radial-gradient(1200px 600px at 15% -10%, #ece4ff 0%, transparent 60%),
               radial-gradient(1000px 500px at 100% 0%, #e2f6fb 0%, transparent 55%),
               #f4f5f9;
    --card: #ffffff;
    --card-hover: #fbfbff;
    --border: #e5e7f0;
    --text: #171a23;
    --text-muted: #666e7f;
    --ok-bg: rgba(47, 212, 127, 0.12);
    --warn-bg: rgba(245, 165, 36, 0.14);
    --muted-bg: rgba(20, 20, 40, 0.04);
    --shadow: 0 12px 32px -14px rgba(30, 20, 60, 0.25);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg-soft);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

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

.pub-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: rgba(13, 15, 20, 0.7);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
@media (prefers-color-scheme: light) {
  .pub-header { background: rgba(244, 245, 249, 0.75); }
}

.pub-brand { display: flex; align-items: center; gap: 0.6rem; font-weight: 800; font-size: 1.15rem; letter-spacing: -0.01em; }
.pub-brand .logo {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.1rem; height: 2.1rem; border-radius: 10px;
  background: var(--accent-grad);
  font-size: 1.1rem;
  box-shadow: 0 6px 16px -4px rgba(124, 92, 255, 0.6);
}

.pub-nav { display: flex; align-items: center; gap: 0.6rem; }
.pill {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.85rem;
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: var(--muted-bg);
}
.pill.session { color: var(--ok); border-color: transparent; background: var(--ok-bg); font-weight: 600; }
.pill-btn {
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.pill-btn:hover { background: var(--muted-bg); border-color: var(--accent); }
form.inline { display: inline; margin: 0; }

.pub-main { max-width: 1080px; margin: 0 auto; padding: 2.5rem 1.5rem 4rem; }

.hero { margin-bottom: 2.25rem; }
.hero h1 { font-size: clamp(1.7rem, 3vw, 2.4rem); margin: 0 0 0.4rem; letter-spacing: -0.02em; }
.hero p { color: var(--text-muted); margin: 0; font-size: 1rem; }

.station-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1rem;
}

.station-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: 1.4rem;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}
.station-card:hover { transform: translateY(-3px); background: var(--card-hover); border-color: var(--accent); }

.station-avatar {
  width: 3rem; height: 3rem; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-grad);
  color: #fff; font-weight: 800; font-size: 1.2rem;
  box-shadow: 0 8px 20px -6px rgba(124, 92, 255, 0.55);
}

.station-name { font-weight: 700; font-size: 1.05rem; display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }

.badge-private {
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
  padding: 0.15rem 0.5rem; border-radius: 999px;
  color: var(--warn); background: var(--warn-bg);
}

.station-cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  padding: 0.55rem 1rem;
  border-radius: 10px;
  background: var(--accent-grad);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  align-self: flex-start;
  transition: filter 0.15s ease;
}
.station-cta:hover { filter: brightness(1.08); }

.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--text-muted);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}
.empty-state .icon { font-size: 2rem; margin-bottom: 0.5rem; }

.back-link { display: inline-flex; align-items: center; gap: 0.35rem; color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1.1rem; }
.back-link:hover { color: var(--accent); }

.station-header { display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap; margin-bottom: 0.4rem; }
.station-header h1 { margin: 0; font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -0.02em; }
.notice-note { color: var(--text-muted); font-size: 0.85rem; margin: 0 0 1.5rem; }

.day-switcher {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  padding: 0.6rem;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--border);
}
.day-switcher .day-nav { display: flex; align-items: center; gap: 0.5rem; }
.day-switcher .day-label { display: flex; align-items: center; gap: 0.6rem; font-weight: 700; }
.day-switcher input[type=date] {
  background: var(--muted-bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 0.3rem 0.5rem;
  font-size: 0.85rem;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) { .day-switcher input[type=date] { color-scheme: light; } }

.hour-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.85rem;
}

.hour-card {
  position: relative;
  padding: 1rem 1.1rem;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.hour-card.is-available { border-left-color: var(--ok); }
.hour-card.is-pending { border-left-color: var(--warn); }
.hour-card.is-recording { border-left-color: var(--live); }
.hour-card:not(.is-available):not(.is-pending):not(.is-recording) { opacity: 0.65; }

.hour-card .hh { font-weight: 800; font-size: 1.05rem; margin-bottom: 0.5rem; letter-spacing: -0.01em; }
.hour-card .state {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-size: 0.8rem; color: var(--text-muted);
}
.hour-card .state.ok { color: var(--ok); }
.hour-card .state.warn { color: var(--warn); }
.hour-card .state.live { color: var(--live); animation: live-pulse 1.6s ease-in-out infinite; }

@keyframes live-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.hour-card audio { width: 100%; margin-top: 0.6rem; height: 2.1rem; border-radius: 8px; }
.hour-card .segments-note { margin-top: 0.35rem; font-size: 0.72rem; color: var(--text-muted); }

.pub-footer {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  padding: 2rem 1rem 2.5rem;
}
