:root {
  --orange: #ff6600;
  --orange-dark: #cc4f00;
  --orange-light: #ff8a3d;
  --cream: #fffeed;
  --cream-tint: #fff7d6;
  --ink: #1a1a1a;
  --ink-soft: #2a2a2a;
  --muted: #6b6b6b;
  --border: #ead9b8;
  --shadow: 0 2px 12px rgba(60, 30, 0, 0.06);
  --shadow-strong: 0 8px 28px rgba(60, 30, 0, 0.12);
  --radius: 12px;
  --display: 'Oswald', 'Impact', 'Helvetica Neue', sans-serif;
  --body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--body);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: var(--orange-dark); text-decoration: none; }
a:hover { color: var(--orange); text-decoration: underline; }

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, var(--orange) 0%, var(--orange-dark) 100%);
  color: white;
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  color: white;
  font-weight: 700;
}
.brand:hover { text-decoration: none; color: white; }
.brand img {
  width: 38px; height: 38px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
.brand-name {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1;
}
.brand-name em {
  font-style: normal;
  font-weight: 500;
  opacity: 0.92;
  margin-left: 0.4rem;
  padding: 0.1rem 0.45rem;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 4px;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  vertical-align: middle;
}

.site-nav { display: flex; gap: 1.5rem; }
.site-nav a {
  color: white;
  font-family: var(--display);
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.88;
  transition: opacity 0.15s;
}
.site-nav a:hover { opacity: 1; text-decoration: none; color: white; }

main { max-width: 1100px; margin: 0 auto; padding: 2rem 1.5rem 1rem; }

.live-section { margin-bottom: 3rem; }
.live-inner { position: relative; }
.live-status {
  background: white;
  border: 1px solid var(--border);
  border-left: 4px solid var(--orange);
  border-radius: 8px;
  padding: 0.9rem 1.1rem;
  color: var(--muted);
  font-size: 0.95rem;
  box-shadow: var(--shadow);
}
.live-status.loading::after {
  content: '';
  display: inline-block;
  width: 8px; height: 8px;
  margin-left: 0.5rem;
  border-radius: 50%;
  background: var(--orange);
  animation: pulse 1.4s ease-in-out infinite;
  vertical-align: middle;
}
@keyframes pulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}
.live-player {
  position: relative;
  background: black;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-strong);
  aspect-ratio: 16 / 9;
}
.live-player iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.live-offline {
  background: white;
  border: 1px solid var(--border);
  border-left: 4px solid var(--orange);
  border-radius: 8px;
  padding: 0.9rem 1.1rem;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.live-offline strong {
  color: var(--ink);
  font-size: 1rem;
  font-family: var(--display);
  letter-spacing: 0.03em;
}
.live-offline span { color: var(--muted); font-size: 0.95rem; }
.hidden { display: none !important; }

.live-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: #ff0033;
  color: white;
  font-family: var(--display);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 0.3rem 0.7rem;
  border-radius: 4px;
  text-transform: uppercase;
  animation: live-pulse 2s ease-in-out infinite;
}
@keyframes live-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 0, 51, 0.6); }
  50% { box-shadow: 0 0 0 8px rgba(255, 0, 51, 0); }
}

section h2 {
  font-family: var(--display);
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 0 1.25rem;
  color: var(--ink);
  border-bottom: 4px solid var(--orange);
  padding-bottom: 0.5rem;
  display: inline-block;
}

.schedule-section { margin-bottom: 3rem; }
.schedule-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.event-card {
  display: flex;
  gap: 1rem;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.event-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-strong);
}
.event-cover {
  flex: 0 0 220px;
  background: #f0e6d0;
  background-size: cover;
  background-position: center;
}
.event-body {
  flex: 1;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
}
.event-date {
  font-family: var(--display);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--orange-dark);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.35rem;
}
.event-title {
  font-family: var(--display);
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin: 0 0 0.5rem;
  text-transform: uppercase;
}
.event-meta { color: var(--muted); font-size: 0.9rem; margin-bottom: 0.5rem; }
.event-desc {
  color: var(--ink-soft);
  font-size: 0.95rem;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.event-link {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.archive-controls { margin-bottom: 1.25rem; }
.archive-controls input[type="search"] {
  width: 100%;
  max-width: 340px;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: var(--body);
  background: white;
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.archive-controls input[type="search"]:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255, 102, 0, 0.15);
}

.archive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}
.archive-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  cursor: pointer;
}
.archive-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-strong);
}
.archive-card:hover .archive-thumb::after { opacity: 1; }
.archive-card:hover .archive-play { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.archive-thumb {
  aspect-ratio: 16 / 9;
  background: #ddd;
  position: relative;
  overflow: hidden;
}
.archive-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.archive-card:hover .archive-thumb img { transform: scale(1.04); }
.archive-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 50%, rgba(0,0,0,0.45) 100%);
  opacity: 0.6;
  transition: opacity 0.2s ease;
  pointer-events: none;
}
.archive-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.85);
  width: 56px;
  height: 56px;
  background: rgba(255, 102, 0, 0.92);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  box-shadow: 0 4px 14px rgba(0,0,0,0.4);
  pointer-events: none;
}
.archive-play::before {
  content: '';
  display: block;
  width: 0; height: 0;
  border-left: 16px solid white;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  margin-left: 4px;
}
.archive-duration {
  position: absolute;
  bottom: 0.55rem;
  right: 0.55rem;
  background: rgba(0, 0, 0, 0.78);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: 3px;
  font-variant-numeric: tabular-nums;
  z-index: 1;
}
.archive-body { padding: 0.85rem 1rem 1rem; }
.archive-title {
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin: 0 0 0.3rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.archive-date {
  font-size: 0.82rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.loading-row, .empty-row {
  padding: 1.5rem;
  text-align: center;
  color: var(--muted);
  background: white;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

.site-footer {
  margin-top: 4rem;
  padding: 2rem 1.5rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, var(--cream) 0%, var(--cream-tint) 100%);
}
.site-footer p { margin: 0.3rem 0; }
.site-footer a {
  color: var(--orange-dark);
  font-weight: 500;
}

.video-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.video-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(4px);
}
.video-modal-content {
  position: relative;
  width: 100%;
  max-width: 1100px;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.video-modal-close {
  position: absolute;
  top: -2.5rem;
  right: 0;
  background: transparent;
  border: 0;
  color: white;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
}
.video-modal-close:hover { color: var(--orange-light); }
.video-modal-title {
  color: white;
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding-right: 3rem;
}
.video-modal-frame {
  position: relative;
  background: black;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}
.video-modal-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
body.modal-open { overflow: hidden; }

.notify-form {
  margin-top: 1rem;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.9rem 1.1rem;
  box-shadow: var(--shadow);
}
.notify-form label {
  display: block;
  font-family: var(--display);
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 0.55rem;
}
.notify-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.notify-form input[type="email"] {
  flex: 1 1 220px;
  min-width: 0;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font: inherit;
  background: white;
  color: var(--ink);
  outline: none;
}
.notify-form input[type="email"]:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255, 102, 0, 0.15);
}
.notify-submit {
  background: var(--orange);
  color: white;
  border: 0;
  padding: 0.55rem 1.1rem;
  border-radius: 6px;
  font-family: var(--display);
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.15s;
}
.notify-submit:hover { background: var(--orange-dark); }
.notify-submit:disabled { opacity: 0.6; cursor: default; }
.notify-status {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 0.55rem;
  min-height: 1.2em;
}
.notify-status.ok { color: var(--orange-dark); font-weight: 600; }
.notify-status.err { color: #c81e3a; }

.install-banner {
  position: fixed;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  z-index: 50;
  width: calc(100% - 2rem);
  max-width: 480px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.install-banner-icon {
  width: 44px; height: 44px;
  border-radius: 8px;
  flex: 0 0 auto;
}
.install-banner-text { flex: 1; min-width: 0; line-height: 1.3; }
.install-banner-text strong {
  display: block;
  font-family: var(--display);
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  color: var(--ink);
}
.install-banner-text span {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.1rem;
}
.install-banner-actions { display: flex; align-items: center; gap: 0.25rem; flex: 0 0 auto; }
.install-banner-btn {
  background: var(--orange);
  color: white;
  border: 0;
  padding: 0.5rem 0.85rem;
  border-radius: 6px;
  font-family: var(--display);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
}
.install-banner-btn:hover { background: var(--orange-dark); }
.install-banner-close {
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 1.4rem;
  line-height: 1;
  padding: 0.25rem 0.45rem;
  cursor: pointer;
  border-radius: 4px;
}
.install-banner-close:hover { color: var(--ink); }
.install-banner.is-ios .install-banner-btn { display: none; }

@media (display-mode: standalone) {
  .install-banner { display: none !important; }
}

@media (max-width: 640px) {
  .site-header { padding: 0.6rem 1rem; }
  .brand-name { font-size: 1.2rem; }
  .brand-name em { font-size: 0.75rem; padding: 0.05rem 0.35rem; }
  .brand img { width: 32px; height: 32px; }
  .site-nav { gap: 1rem; }
  .site-nav a { font-size: 0.85rem; letter-spacing: 0.05em; }
  main { padding: 1.5rem 1rem 1rem; }
  section h2 { font-size: 1.5rem; }
  .event-card { flex-direction: column; }
  .event-cover { flex: 0 0 180px; aspect-ratio: 16 / 9; }
  .event-title { font-size: 1.2rem; }
  .archive-play { width: 48px; height: 48px; }
  .archive-play::before { border-left-width: 14px; }
}
