:root {
  --bg: #f5f1e8;
  --surface: #fffaf2;
  --surface-strong: #ffffff;
  --surface-alt: #efe7d9;
  --text: #1e2424;
  --muted: #51605d;
  --border: #cfbfaa;
  --accent: #245c58;
  --accent-strong: #1b4643;
  --accent-soft: #d7ebe8;
  --shadow: 0 24px 60px rgba(39, 40, 28, 0.08);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --max: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #f8f4ed 0%, #f2ede3 100%);
  line-height: 1.55;
}

a { color: inherit; text-decoration: none; }
img, iframe { max-width: 100%; display: block; }
button, input { font: inherit; }
button { cursor: pointer; }

.hidden { display: none !important; }
.hidden-field { position: absolute; left: -9999px; }

.skip-link {
  position: absolute;
  left: 12px;
  top: -48px;
  background: var(--accent);
  color: white;
  padding: 12px 16px;
  border-radius: 12px;
  z-index: 1000;
}
.skip-link:focus { top: 12px; }

.shell {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  padding: 18px 0;
}
.site-header-sticky {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  background: rgba(248, 244, 237, 0.9);
  border-bottom: 1px solid rgba(207, 191, 170, 0.85);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}
.header-inner-wide { align-items: center; }

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 280px;
}
.brand-photo {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  object-fit: cover;
  background: white;
  border: 1px solid rgba(207, 191, 170, 0.95);
  box-shadow: var(--shadow);
  flex: 0 0 auto;
}
.brand-title {
  display: block;
  font-size: 1.2rem;
}
.brand-subtitle {
  display: block;
  color: var(--muted);
  font-size: 0.97rem;
  margin-top: 2px;
}

.main-nav {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  background: rgba(255,255,255,0.72);
  border: 1px solid var(--border);
  font-weight: 700;
}
.nav-link.is-active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.utility-actions,
.action-row,
.card-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--accent);
  color: white;
}
.btn-primary:hover { background: var(--accent-strong); }
.btn-secondary {
  background: white;
  border-color: var(--border);
}
.btn-ghost {
  background: transparent;
  border-color: var(--border);
}
.btn-large {
  width: 100%;
  min-height: 58px;
  font-size: 1.05rem;
}
.btn.is-disabled {
  opacity: 0.68;
}

.hero {
  padding: 28px 0 46px;
}
.hero-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.95fr;
  gap: 28px;
  align-items: start;
}
.hero-layout-wide {
  grid-template-columns: 1.15fr 0.85fr;
}
.hero-copy {
  padding: 10px 0;
}
.hero-copy h1 {
  font-size: clamp(2.1rem, 4vw, 3.6rem);
  line-height: 1.08;
  margin: 0 0 16px;
}
.lead {
  font-size: 1.16rem;
  color: var(--muted);
  max-width: 760px;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  font-size: 0.88rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 800;
}

.panel,
.video-card,
.quick-start-card,
.schedule-card,
.focus-box,
.tip-card,
.footer-bar,
.section-chip {
  background: rgba(255,255,255,0.88);
  border: 1px solid rgba(207, 191, 170, 0.95);
  box-shadow: var(--shadow);
}

.panel {
  border-radius: var(--radius-xl);
  padding: 26px;
}
.panel-head h2,
.section-heading h2,
.week-panel-head h2,
.footer-bar h3 {
  margin: 0 0 8px;
  font-size: clamp(1.6rem, 2.5vw, 2rem);
}
.panel-head p,
.section-heading p,
.week-panel-head p,
.footer-bar p {
  margin: 0;
  color: var(--muted);
}
.panel-head.compact h2 { font-size: 1.5rem; }
.stack-lg { display: grid; gap: 18px; }

.field {
  display: grid;
  gap: 10px;
}
.field span {
  font-weight: 700;
}
.field input {
  min-height: 56px;
  padding: 0 18px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: white;
}
.field input:focus {
  outline: 3px solid rgba(36, 92, 88, 0.18);
  border-color: var(--accent);
}
.form-status {
  min-height: 1.5em;
  margin: 0;
  color: var(--muted);
}

.benefit-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 26px;
}
.benefit-item,
.tip-card {
  border-radius: var(--radius-lg);
  padding: 18px;
}
.benefit-item strong,
.tip-card strong { display: block; margin-bottom: 6px; }
.benefit-item span,
.tip-card span { color: var(--muted); }

.section-nav-wrap {
  padding: 0 0 8px;
}
.section-nav {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.section-chip {
  border-radius: 999px;
  padding: 14px 18px;
  font-weight: 700;
}

.content-section {
  padding: 36px 0;
}
.alt-surface {
  background: linear-gradient(180deg, rgba(239,231,217,0.55), rgba(239,231,217,0.2));
  border-top: 1px solid rgba(207,191,170,0.7);
  border-bottom: 1px solid rgba(207,191,170,0.7);
}
.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.quick-start-list {
  display: grid;
  gap: 14px;
  margin: 18px 0 20px;
}
.quick-start-card {
  display: grid;
  gap: 6px;
  border-radius: var(--radius-lg);
  padding: 18px;
}
.quick-start-card span { color: var(--muted); }
.field-search { margin-top: 10px; }

.video-grid,
.schedule-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}
.video-card,
.schedule-card {
  border-radius: var(--radius-xl);
  overflow: hidden;
}
.video-card-body,
.schedule-card {
  padding: 22px;
}
.video-card h3,
.schedule-card h3 {
  margin: 10px 0 10px;
  font-size: 1.35rem;
  line-height: 1.25;
}
.video-card p,
.schedule-card p {
  margin: 0;
  color: var(--muted);
}
.card-tag {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 800;
}
.video-shell {
  aspect-ratio: 16 / 9;
  background: #d9d0c1;
}
.video-poster {
  position: relative;
  width: 100%;
  height: 100%;
  border: 0;
  color: white;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
}
.video-poster::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(18,25,24,0.15), rgba(18,25,24,0.55));
}
.play-icon,
.play-text {
  position: relative;
  z-index: 1;
}
.play-icon {
  width: 80px;
  height: 80px;
  border-radius: 999px;
  background: rgba(255,255,255,0.95);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.play-icon::before {
  content: '';
  margin-left: 5px;
  border-style: solid;
  border-width: 14px 0 14px 22px;
  border-color: transparent transparent transparent var(--accent);
}
.play-text {
  font-size: 1rem;
  font-weight: 700;
}
.video-shell iframe {
  width: 100%;
  height: 100%;
  border: 0;
}
.card-actions {
  padding: 18px 22px 24px;
}

.site-footer {
  padding: 22px 0 42px;
}
.footer-bar {
  border-radius: var(--radius-xl);
  padding: 24px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
}

.week-tab-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}
.week-tab {
  text-align: left;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,0.85);
  padding: 18px;
}
.week-tab span {
  display: block;
  color: var(--accent);
  font-size: 0.92rem;
  font-weight: 800;
  margin-bottom: 8px;
}
.week-tab strong {
  display: block;
  line-height: 1.28;
  font-size: 1.05rem;
}
.week-tab.is-active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}
.week-tab.is-active span { color: rgba(255,255,255,0.82); }

.week-panel {
  border-radius: var(--radius-xl);
  background: rgba(255,255,255,0.9);
  border: 1px solid rgba(207, 191, 170, 0.95);
  box-shadow: var(--shadow);
  padding: 28px;
}
.week-panel-head {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
  margin-bottom: 22px;
}
.focus-box {
  border-radius: var(--radius-lg);
  padding: 18px;
}
.focus-box strong {
  display: block;
  margin-bottom: 8px;
}
.schedule-day {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  border-radius: 999px;
  padding: 0 12px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 800;
  font-size: 0.92rem;
  margin-bottom: 14px;
}
.schedule-time {
  font-weight: 700;
  margin: 10px 0 18px !important;
}
.schedule-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.schedule-links .btn {
  min-height: 46px;
  padding: 0 16px;
}

.tv-mode {
  font-size: 1.1rem;
}
.tv-mode .shell { width: min(1380px, calc(100% - 32px)); }
.tv-mode .hero-copy h1 { font-size: clamp(2.5rem, 4.6vw, 4.3rem); }
.tv-mode .lead,
.tv-mode .video-card p,
.tv-mode .schedule-card p,
.tv-mode .panel-head p,
.tv-mode .week-panel-head p,
.tv-mode .footer-bar p,
.tv-mode .quick-start-card span,
.tv-mode .benefit-item span,
.tv-mode .tip-card span { font-size: 1.15rem; }
.tv-mode .nav-link,
.tv-mode .btn,
.tv-mode .section-chip,
.tv-mode .card-tag,
.tv-mode .schedule-day,
.tv-mode .field input { min-height: 58px; font-size: 1.05rem; }

.high-contrast {
  --bg: #f7f7f7;
  --surface: #ffffff;
  --surface-strong: #ffffff;
  --surface-alt: #efefef;
  --text: #101010;
  --muted: #2b2b2b;
  --border: #666666;
  --accent: #003b38;
  --accent-strong: #002c2a;
  --accent-soft: #d9ecea;
}
.high-contrast body,
body.high-contrast {
  background: #fafafa;
}
.high-contrast .panel,
.high-contrast .video-card,
.high-contrast .quick-start-card,
.high-contrast .schedule-card,
.high-contrast .focus-box,
.high-contrast .tip-card,
.high-contrast .footer-bar,
.high-contrast .section-chip,
.high-contrast .nav-link,
.high-contrast .week-panel,
.high-contrast .week-tab {
  box-shadow: none;
}

@media (max-width: 1080px) {
  .hero-layout,
  .hero-layout-wide,
  .week-panel-head {
    grid-template-columns: 1fr;
  }
  .benefit-list,
  .week-tab-list,
  .video-grid,
  .schedule-grid {
    grid-template-columns: 1fr 1fr;
  }
  .footer-bar {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 760px) {
  .shell { width: min(var(--max), calc(100% - 20px)); }
  .site-header { padding: 14px 0; }
  .hero { padding: 18px 0 28px; }
  .main-nav,
  .utility-actions,
  .action-row,
  .card-actions,
  .section-nav {
    width: 100%;
  }
  .main-nav .nav-link,
  .utility-actions .btn,
  .action-row .btn,
  .card-actions .btn,
  .section-nav .section-chip {
    flex: 1 1 calc(50% - 8px);
  }
  .benefit-list,
  .week-tab-list,
  .video-grid,
  .schedule-grid {
    grid-template-columns: 1fr;
  }
  .panel,
  .week-panel,
  .video-card,
  .schedule-card,
  .footer-bar {
    border-radius: 22px;
  }
  .video-card h3,
  .schedule-card h3 { font-size: 1.22rem; }
  .schedule-links .btn {
    width: 100%;
  }
}
