:root {
  --bg: #fff7e7;
  --paper: #fffdf8;
  --surface: rgba(255, 253, 248, 0.88);
  --surface-solid: #fffdf8;
  --surface-2: #fff1cf;
  --surface-3: #f7e1b8;
  --text: #3d3126;
  --muted: #7b6957;
  --line: rgba(124, 94, 55, 0.18);
  --shadow: 0 18px 44px rgba(111, 79, 34, 0.12);
  --accent: #fac94d;
  --accent-deep: #c1812b;
  --capy: #b88761;
  --yuja-soft: #fff0ad;
  --live: #fac94d;
  --recorded: #c9b3ff;
  --relay: #8fd6d7;
  --sb: #d8a088;
  --notice: #e9cf72;
  --off: #d6cec0;
  --chip-text: #4b3720;
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
}

:root[data-theme="dark"] {
  --bg: #101821;
  --paper: #131f2d;
  --surface: rgba(20, 31, 46, 0.88);
  --surface-solid: #152235;
  --surface-2: #202d3e;
  --surface-3: #2b3540;
  --text: #fff8ee;
  --muted: #d2c5b5;
  --line: rgba(255, 235, 205, 0.13);
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
  --accent: #fac94d;
  --accent-deep: #d39d34;
  --capy: #80614d;
  --yuja-soft: #443a23;
  --live: #b58b35;
  --recorded: #715fa3;
  --relay: #3c777a;
  --sb: #8f6a5c;
  --notice: #8c7a3e;
  --off: #66656b;
  --chip-text: #fff8ee;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-height: 100%; }
body {
  font-family: "Pretendard", "Malgun Gothic", "Apple SD Gothic Neo", system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 8% 0%, rgba(250, 201, 77, .22), transparent 25%),
    radial-gradient(circle at 95% 8%, rgba(143, 214, 215, .18), transparent 26%),
    linear-gradient(180deg, var(--bg), color-mix(in srgb, var(--bg) 72%, #ffffff 28%));
}
.page-shell { width: min(1180px, calc(100% - 28px)); margin: 18px auto 32px; }
.hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: linear-gradient(135deg, var(--paper), var(--yuja-soft) 55%, color-mix(in srgb, var(--paper) 78%, var(--relay) 22%));
  box-shadow: var(--shadow);
  padding: 18px 20px;
}
.hero::before {
  content: "";
  position: absolute;
  right: -70px;
  top: -80px;
  width: 210px;
  height: 210px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--capy) 45%, transparent);
  opacity: .55;
}
.hero::after {
  content: "♨";
  position: absolute;
  right: 34px;
  bottom: -22px;
  font-size: 80px;
  line-height: 1;
  color: color-mix(in srgb, var(--accent-deep) 34%, transparent);
  font-weight: 900;
}
.hero-inner { position: relative; z-index: 1; display: flex; justify-content: space-between; gap: 18px; align-items: center; }
.hero-badge { display: inline-flex; align-items: center; width: fit-content; border-radius: 999px; padding: 8px 13px; background: var(--accent); color: #4a310e; font-weight: 900; letter-spacing: .055em; font-size: 12px; }
h1 { margin: 10px 0 6px; font-size: clamp(28px, 5.2vw, 44px); line-height: 1.05; letter-spacing: -0.05em; }
.subtitle { margin: 0; color: var(--muted); font-weight: 700; }
.theme-toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.theme-btn { border: 1px solid var(--line); background: var(--surface-solid); color: var(--text); padding: 11px 15px; border-radius: 999px; font-weight: 900; cursor: pointer; box-shadow: 0 4px 12px rgba(0,0,0,.04); }
.theme-btn.active { background: var(--accent); color: #4a310e; border-color: transparent; }
.notice { position: relative; z-index: 1; margin-top: 14px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); padding: 12px 14px; }
.notice.hidden { display: none; }
.notice-title { font-weight: 900; margin-bottom: 5px; }
.main-flow { display: grid; gap: 16px; margin-top: 16px; }
.status-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.panel { border-radius: var(--radius-lg); border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); padding: 16px; backdrop-filter: blur(8px); }
.panel-head, .section-title-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.panel-head h2, .section-title-row h2 { margin: 0; font-size: 22px; letter-spacing: -0.04em; }
.section-kicker { margin: 0 0 4px; color: var(--accent-deep); font-weight: 1000; font-size: 12px; letter-spacing: .12em; }
.meta-pill { display: inline-flex; white-space: nowrap; align-items: center; border: 1px solid var(--line); background: color-mix(in srgb, var(--surface-solid) 82%, var(--surface-2) 18%); color: var(--muted); padding: 7px 11px; border-radius: 999px; font-size: 12px; font-weight: 900; }
.feature-card { min-height: 170px; border-radius: 24px; border: 1px solid var(--line); background: linear-gradient(180deg, color-mix(in srgb, var(--surface-solid) 86%, var(--surface-2) 14%), color-mix(in srgb, var(--surface-solid) 72%, var(--surface-3) 28%)); padding: 18px; display: flex; align-items: stretch; }
.empty-state { align-items: center; justify-content: center; color: var(--muted); font-weight: 900; }
.feature-inner { display: flex; flex-direction: column; justify-content: space-between; width: 100%; gap: 12px; }
.feature-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.feature-title { margin: 0; font-size: clamp(30px, 4vw, 42px); line-height: 1.06; letter-spacing: -0.055em; }
.feature-date, .time-range { color: var(--muted); font-weight: 900; }
.category-badge, .today-category, .legend-item { display: inline-flex; align-items: center; border-radius: 999px; padding: 8px 11px; font-size: 12px; font-weight: 1000; color: var(--chip-text); }
.cat-live, .legend-item.live { background: var(--live); }
.cat-recorded, .legend-item.recorded { background: var(--recorded); }
.cat-relay, .legend-item.relay { background: var(--relay); }
.cat-sb, .legend-item.sb { background: var(--sb); }
.cat-notice, .legend-item.notice { background: var(--notice); }
.cat-off, .legend-item.off { background: var(--off); }
.today-section { padding: 18px; }
.today-list { display: grid; gap: 10px; }
.today-item { display: grid; grid-template-columns: 92px 1fr auto; gap: 14px; align-items: center; border: 1px solid var(--line); background: color-mix(in srgb, var(--surface-solid) 84%, var(--surface-2) 16%); border-radius: 19px; padding: 12px 14px; }
.today-time { font-size: 19px; font-weight: 1000; color: var(--accent-deep); }
.today-title { font-weight: 1000; font-size: 18px; margin-bottom: 3px; }
.today-meta { color: var(--muted); font-weight: 700; }
.week-section { padding: 18px; }
.week-board { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; align-items: stretch; }
.week-day-card { min-height: 265px; border: 1px solid var(--line); border-radius: 24px; overflow: hidden; background: color-mix(in srgb, var(--surface-solid) 78%, var(--surface-2) 22%); display: flex; flex-direction: column; }
.week-day-head { min-height: 86px; padding: 14px 13px; background: linear-gradient(180deg, color-mix(in srgb, var(--surface-3) 60%, var(--surface-solid) 40%), color-mix(in srgb, var(--surface-solid) 76%, var(--surface-2) 24%)); border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.week-day-name { display: block; font-size: 24px; line-height: 1; margin-bottom: 8px; }
.week-date { display: block; color: var(--muted); font-size: 12px; font-weight: 800; }
.week-count { display: inline-flex; border: 1px solid var(--line); background: var(--surface-solid); color: var(--muted); border-radius: 999px; padding: 5px 8px; font-size: 11px; font-weight: 900; white-space: nowrap; }
.week-items { display: flex; flex-direction: column; gap: 8px; padding: 10px; flex: 1; }
.week-item { border-radius: 16px; padding: 10px 10px 11px; color: var(--chip-text); font-weight: 900; min-height: 68px; display: flex; flex-direction: column; justify-content: center; }
.week-item.live { background: color-mix(in srgb, var(--live) 82%, var(--surface-solid) 18%); }
.week-item.recorded { background: color-mix(in srgb, var(--recorded) 82%, var(--surface-solid) 18%); }
.week-item.relay { background: color-mix(in srgb, var(--relay) 82%, var(--surface-solid) 18%); }
.week-item.sb { background: color-mix(in srgb, var(--sb) 82%, var(--surface-solid) 18%); }
.week-item.notice { background: color-mix(in srgb, var(--notice) 82%, var(--surface-solid) 18%); }
.week-item.off { background: color-mix(in srgb, var(--off) 82%, var(--surface-solid) 18%); }
.week-time { display: block; font-size: 12px; opacity: .82; margin-bottom: 5px; }
.week-title { display: block; font-size: 14px; line-height: 1.25; word-break: keep-all; }
.week-empty { color: var(--muted); font-weight: 800; font-size: 13px; padding: 12px 4px; }
.footer-note { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 16px; color: var(--muted); font-weight: 700; }
.legend { display: flex; flex-wrap: wrap; gap: 8px; }
.footer-text { font-size: 13px; }
@media (max-width: 1040px) {
  .week-board { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .page-shell { width: min(100% - 16px, 1180px); margin: 8px auto 22px; }
  .hero, .panel { border-radius: 22px; }
  .hero { padding: 16px; }
  .hero-inner { flex-direction: column; align-items: flex-start; }
  .theme-toolbar { width: 100%; justify-content: flex-start; }
  .theme-btn { padding: 10px 13px; }
  .status-grid { grid-template-columns: 1fr; }
  .panel-head, .section-title-row { align-items: flex-start; flex-direction: column; }
  .feature-card { min-height: 150px; }
  .feature-top { align-items: flex-start; flex-direction: column; }
  .feature-title { font-size: 32px; }
  .today-item { grid-template-columns: 76px 1fr; align-items: start; }
  .today-category { grid-column: 2; justify-self: start; }
  .week-board { grid-template-columns: 1fr; }
  .week-day-card { min-height: auto; }
  .week-day-head { min-height: auto; align-items: center; }
  .week-items { padding: 10px; }
  .week-item { min-height: auto; }
}
@media (max-width: 420px) {
  h1 { font-size: 31px; }
  .subtitle { font-size: 13px; }
  .today-item { grid-template-columns: 1fr; }
  .today-category { grid-column: 1; }
  .today-time { font-size: 17px; }
}
