:root {
  --bg: #fff5ee;
  --bg-deep: #ffe3d4;
  --surface: rgba(255, 255, 255, 0.9);
  --surface-solid: #ffffff;
  --text: #2c2330;
  --muted: #776b78;
  --line: rgba(85, 53, 65, 0.12);
  --primary: #ff6b4a;
  --primary-deep: #db4438;
  --secondary: #ffb84d;
  --accent: #5fbd99;
  --notice: #fff1be;
  --notice-text: #784d10;
  --shadow: 0 16px 42px rgba(128, 68, 57, 0.12);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --font: "Noto Sans SC", "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}

body[data-theme="ocean"] {
  --bg: #effbff;
  --bg-deep: #d3f1f4;
  --surface: rgba(255, 255, 255, 0.92);
  --text: #122d41;
  --muted: #5d7482;
  --line: rgba(28, 87, 111, 0.14);
  --primary: #178ec2;
  --primary-deep: #09618b;
  --secondary: #53c7c5;
  --accent: #79bf73;
  --notice: #dff8e8;
  --notice-text: #1e6751;
  --shadow: 0 16px 42px rgba(25, 107, 138, 0.12);
}

body[data-theme="paper"] {
  --bg: #f8f7ed;
  --bg-deep: #e8efd0;
  --surface: rgba(255, 255, 249, 0.92);
  --text: #283d2d;
  --muted: #687568;
  --line: rgba(47, 77, 51, 0.14);
  --primary: #6d9f4f;
  --primary-deep: #3f7038;
  --secondary: #d29b44;
  --accent: #c87855;
  --notice: #fff1c8;
  --notice-text: #73501c;
  --shadow: 0 16px 42px rgba(71, 91, 53, 0.12);
}

body[data-theme="berry"] {
  --bg: #fbf2fa;
  --bg-deep: #f0d9ef;
  --surface: rgba(255, 255, 255, 0.92);
  --text: #33233c;
  --muted: #77667f;
  --line: rgba(101, 57, 110, 0.14);
  --primary: #9b59b6;
  --primary-deep: #733b8d;
  --secondary: #e57a9c;
  --accent: #55a9a2;
  --notice: #ffe3ec;
  --notice-text: #8a3154;
  --shadow: 0 16px 42px rgba(126, 67, 131, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background:
    radial-gradient(circle at 4% 4%, var(--bg-deep) 0, transparent 23rem),
    radial-gradient(circle at 100% 24%, var(--bg-deep) 0, transparent 20rem),
    var(--bg);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

button,
summary {
  font: inherit;
}

button {
  color: inherit;
}

.app-shell {
  width: min(100% - 28px, 720px);
  margin: 0 auto;
  padding: 16px 0 44px;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 242px;
  padding: 26px 24px 28px;
  border-radius: var(--radius-xl);
  color: #fff;
  background: linear-gradient(135deg, var(--primary-deep), var(--primary) 58%, var(--secondary));
  box-shadow: var(--shadow);
}

.hero::after {
  position: absolute;
  right: -5rem;
  bottom: -7rem;
  width: 18rem;
  height: 18rem;
  border: 2rem solid rgba(255, 255, 255, 0.13);
  border-radius: 50%;
  content: "";
}

.hero-orbit {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 50%;
  transform: rotate(-20deg);
}

.orbit-one {
  top: 54px;
  right: 18px;
  width: 100px;
  height: 28px;
}

.orbit-two {
  top: 60px;
  right: 36px;
  width: 64px;
  height: 18px;
}

.hero-sticker {
  position: absolute;
  z-index: 1;
  display: grid;
  place-items: center;
  color: #fff9c9;
  text-shadow: 0 3px 0 rgba(100, 35, 35, 0.18);
  user-select: none;
}

.sticker-star {
  top: 28px;
  right: 132px;
  font-size: 30px;
  transform: rotate(-12deg);
}

.sticker-pencil {
  right: 28px;
  bottom: 24px;
  color: #fff;
  font-size: 52px;
  transform: rotate(28deg);
}

.sticker-cloud {
  right: 124px;
  bottom: 24px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 34px;
}

.hero-topline,
.section-heading,
.compact-heading,
.day-summary,
.lesson-main,
.lesson-meta,
.interest-topline,
.page-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hero-topline {
  position: relative;
  z-index: 1;
  align-items: center;
}

.eyebrow,
.date-chip,
.time-badge,
.section-kicker,
.section-hint,
.day-tab,
.theme-option,
.lesson-tag,
.interest-day,
.interest-time {
  font-weight: 700;
  letter-spacing: 0.02em;
}

.eyebrow {
  font-size: 15px;
  opacity: 0.92;
}

.date-chip {
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.14);
}

h1,
h2,
p {
  margin: 0;
}

.hero h1 {
  position: relative;
  z-index: 1;
  max-width: 8ch;
  margin-top: 30px;
  font-size: clamp(2.8rem, 12vw, 4.8rem);
  line-height: 0.98;
  letter-spacing: -0.08em;
}

.hero h1 span {
  color: #fff8bf;
}

.hero-note {
  position: relative;
  z-index: 1;
  margin-top: 18px;
  font-size: 16px;
  opacity: 0.92;
}

.theme-panel,
.panel {
  position: relative;
  margin-top: 16px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.theme-panel {
  padding: 18px 20px;
}

.section-heading {
  align-items: flex-end;
  margin-bottom: 16px;
}

.compact-heading {
  align-items: center;
  margin-bottom: 12px;
}

.section-kicker {
  margin-bottom: 2px;
  color: var(--primary-deep);
  font-size: 13px;
}

h2 {
  font-size: clamp(1.45rem, 5vw, 1.9rem);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.section-hint {
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}

.theme-picker {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.theme-option,
.day-tab {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-solid);
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.theme-option {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 4px;
  font-size: 14px;
}

.theme-option:hover,
.theme-option:focus-visible,
.day-tab:hover,
.day-tab:focus-visible {
  transform: translateY(-1px);
  border-color: var(--primary);
  outline: none;
}

.theme-option.is-active,
.day-tab.is-selected {
  border-color: var(--primary);
  color: var(--primary-deep);
  background: color-mix(in srgb, var(--primary) 12%, white);
}

.theme-swatch {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  border-radius: 50%;
}

.swatch-sunrise { background: linear-gradient(135deg, #ff6b4a, #ffbf55); }
.swatch-ocean { background: linear-gradient(135deg, #178ec2, #53c7c5); }
.swatch-paper { background: linear-gradient(135deg, #6d9f4f, #d29b44); }
.swatch-berry { background: linear-gradient(135deg, #9b59b6, #e57a9c); }

.time-badge {
  padding: 7px 11px;
  border-radius: 999px;
  color: var(--primary-deep);
  background: color-mix(in srgb, var(--primary) 12%, white);
  font-size: 14px;
  white-space: nowrap;
}

.after-school-grid,
.interest-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.after-card,
.interest-card {
  position: relative;
  min-height: 110px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-solid);
}

.after-card::before {
  position: absolute;
  top: 14px;
  bottom: 14px;
  left: 0;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: var(--accent);
  content: "";
}

.after-card.is-featured {
  border-color: var(--primary);
  background: var(--notice);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 18%, transparent);
}

.after-card.is-featured::before {
  background: var(--primary);
}

.after-day,
.after-title,
.after-time,
.after-note {
  display: block;
}

.after-day {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 14px;
}

.after-title {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.25;
}

.after-time {
  margin-top: 8px;
  color: var(--primary-deep);
  font-size: 16px;
  font-weight: 800;
}

.after-note {
  margin-top: 5px;
  color: var(--notice-text);
  font-size: 15px;
  font-weight: 800;
}

.day-tabs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 14px;
}

.day-tab {
  position: relative;
  padding: 7px 2px;
  font-size: 16px;
}

.day-tab.is-today::after {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  content: "";
}

.day-summary {
  align-items: flex-start;
  flex-wrap: wrap;
  margin-bottom: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  color: var(--notice-text);
  background: var(--notice);
}

.day-summary strong {
  display: block;
  color: var(--text);
  font-size: 17px;
}

.day-summary span {
  font-size: 15px;
}

.summary-right {
  display: grid;
  justify-items: end;
  gap: 3px;
}

.summary-right small {
  color: var(--primary-deep);
  font-size: 13px;
  font-weight: 800;
}

.lesson-list,
.routine-list {
  display: grid;
  gap: 8px;
}

.lesson-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-solid);
}

.lesson-card.is-now,
.schedule-card.is-now {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 18%, transparent);
}

.lesson-index {
  display: grid;
  place-items: center;
  min-height: 54px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(145deg, var(--primary), var(--secondary));
  font-size: 19px;
  font-weight: 900;
}

.lesson-index small {
  display: block;
  margin-top: -4px;
  font-size: 12px;
  font-weight: 700;
}

.lesson-index span {
  display: block;
  margin-bottom: -4px;
  font-size: 20px;
  line-height: 1;
}

.lesson-main {
  align-items: baseline;
}

.lesson-subject {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.25;
}

.lesson-teacher,
.lesson-time {
  color: var(--muted);
  font-size: 15px;
}

.lesson-meta {
  justify-content: flex-start;
  margin-top: 3px;
}

.now-tag {
  padding: 2px 7px;
  border-radius: 999px;
  color: #fff;
  background: var(--primary);
  font-size: 12px;
  font-weight: 800;
}

.lesson-tag {
  padding: 2px 7px;
  border-radius: 999px;
  color: var(--primary-deep);
  background: color-mix(in srgb, var(--primary) 12%, white);
  font-size: 12px;
}

.list-divider {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin: 7px 2px 1px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
}

.list-divider span {
  color: var(--primary-deep);
  font-size: 18px;
  font-weight: 900;
}

.list-divider small {
  color: var(--muted);
  font-size: 13px;
}

.schedule-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: linear-gradient(145deg, var(--surface-solid), color-mix(in srgb, var(--secondary) 10%, white));
}

.schedule-card.is-featured {
  border-color: var(--primary);
  background: var(--notice);
}

.schedule-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(145deg, var(--primary), var(--secondary));
  font-size: 23px;
  font-weight: 900;
}

.schedule-card.pickup .schedule-icon {
  color: var(--notice-text);
  background: var(--notice);
  border: 2px solid var(--primary);
}

.schedule-topline {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.schedule-topline strong {
  font-size: 19px;
  line-height: 1.25;
}

.schedule-time {
  color: var(--primary-deep);
  font-size: 16px;
  font-weight: 900;
  white-space: nowrap;
}

.schedule-note {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 15px;
}

.schedule-card.is-featured .schedule-note {
  color: var(--notice-text);
  font-weight: 800;
}

.empty-day {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 24px 14px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-lg);
  color: var(--muted);
  background: color-mix(in srgb, var(--secondary) 7%, white);
  text-align: center;
}

.empty-day strong {
  color: var(--text);
  font-size: 19px;
}

.empty-day-icon {
  color: var(--secondary);
  font-size: 34px;
}

.interest-card {
  min-height: 132px;
  padding: 15px;
  background: linear-gradient(145deg, var(--surface-solid), color-mix(in srgb, var(--secondary) 9%, white));
}

.interest-topline {
  align-items: flex-start;
}

.interest-day {
  color: var(--primary-deep);
  font-size: 15px;
}

.interest-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: #fff;
  background: var(--primary);
  font-size: 19px;
}

.interest-time {
  margin-top: 16px;
  color: var(--text);
  font-size: 22px;
  line-height: 1;
}

.interest-name {
  margin-top: 6px;
  font-size: 17px;
  font-weight: 800;
}

details {
  border-radius: var(--radius-md);
  background: var(--surface-solid);
}

summary {
  min-height: 50px;
  padding: 14px 16px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 800;
  list-style-position: inside;
}

.routine-list {
  padding: 0 10px 12px;
}

.routine-row {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px 6px;
  border-top: 1px solid var(--line);
}

.routine-time {
  color: var(--primary-deep);
  font-size: 15px;
  font-weight: 800;
  white-space: nowrap;
}

.routine-label {
  font-size: 16px;
}

.routine-row.is-service {
  margin: 0 -2px;
  padding-right: 8px;
  padding-left: 8px;
  border-radius: 10px;
  background: var(--notice);
}

.routine-row.is-service .routine-label {
  color: var(--notice-text);
  font-weight: 800;
}

.page-footer {
  justify-content: center;
  margin-top: 22px;
  color: var(--muted);
  font-size: 14px;
}

.footer-star {
  color: var(--primary);
  font-size: 18px;
}

@media (max-width: 520px) {
  .app-shell {
    width: min(100% - 20px, 720px);
    padding-top: 10px;
  }

  .hero {
    min-height: 220px;
    padding: 22px 20px 24px;
  }

  .hero h1 {
    margin-top: 28px;
    font-size: 3rem;
  }

  .theme-panel,
  .panel {
    padding: 18px;
    border-radius: 22px;
  }

  .after-school-grid,
  .interest-grid {
    gap: 8px;
  }

  .after-card,
  .interest-card {
    padding: 12px;
  }

  .after-title {
    font-size: 17px;
  }

  .after-time,
  .after-note {
    font-size: 15px;
  }

  .lesson-card {
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 10px;
    padding: 11px 12px;
  }

  .lesson-subject {
    font-size: 18px;
  }

  .lesson-main {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .interest-time {
    font-size: 20px;
  }

  .day-tabs {
    display: flex;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .day-tab {
    min-width: 68px;
    flex: 1 0 68px;
  }

  .day-tab.is-today::after {
    right: 6px;
  }

  .summary-right {
    justify-items: start;
    width: 100%;
  }

  .schedule-topline {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .routine-row {
    grid-template-columns: 98px minmax(0, 1fr);
    gap: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
