:root {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --text: #172033;
  --muted: #718096;
  --line: #e7ecf3;
  --blue: #2563eb;
  --blue-dark: #1748b8;
  --blue-soft: #eaf1ff;
  --green: #0ea875;
  --orange: #f59e0b;
  --purple: #7c4dff;
  --shadow: 0 12px 30px rgba(36, 67, 120, 0.08);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.landing-shell {
  min-height: calc(100vh - 46px);
  display: grid;
  grid-template-columns: minmax(360px, .95fr) minmax(360px, .75fr);
  gap: 34px;
  align-items: start;
  padding: clamp(34px, 7vh, 72px) 7vw 42px;
  background:
    radial-gradient(circle at 12% 10%, rgba(255, 215, 106, .34), transparent 28%),
    radial-gradient(circle at 86% 18%, rgba(91, 141, 239, .16), transparent 24%),
    #fffaf0;
}
.landing-copy { max-width: 600px; padding-top: 8px; }
.landing-brand { display: flex; align-items: center; gap: 13px; margin-bottom: 38px; }
.egg-logo {
  width: 58px; height: 58px; border-radius: 22px;
  display: grid; place-items: center; overflow: hidden;
  background: #fffdf7; border: 2px solid rgba(8, 22, 47, .1); box-shadow: 0 12px 28px rgba(64, 52, 27, .12);
}
.egg-logo img {
  width: 120%; height: 120%; object-fit: cover; object-position: 50% 54%;
  transform: translateY(3px);
}
.landing-brand strong, .landing-brand span { display: block; }
.landing-brand strong { font-size: 30px; letter-spacing: .04em; }
.landing-brand span { color: #7b7164; margin-top: 2px; }
.landing-slogan {
  margin: 12px 0 10px;
  color: #08162f;
  font-size: clamp(44px, 5.5vw, 72px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: .08em;
}
.landing-subtitle {
  margin: 0 0 28px;
  color: #6a6258;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: .18em;
}
.landing-copy h1 { margin: 14px 0 16px; font-size: 46px; line-height: 1.13; letter-spacing: 0; }
.landing-lead { color: #6a6258; font-size: 16px; line-height: 1.85; margin: 0 0 22px; }
.landing-points { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.landing-points span {
  padding: 8px 12px; border-radius: 999px; background: #fff; border: 1px solid #f1dfbd;
  color: #4f5d74; font-size: 13px; font-weight: 700;
}
.landing-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.landing-visual { position: relative; min-height: 430px; align-self: center; }
.egg-bounce {
  position: absolute; z-index: 3; left: 50%; top: 22%;
  width: 150px; height: 178px; display: grid; place-items: center;
  transform: translateX(-50%);
  animation: egg-bob 2.4s cubic-bezier(.45, 0, .2, 1) infinite;
}
.egg-body {
  width: 108px; height: 128px; border-radius: 48% 48% 43% 43%;
  display: block; overflow: hidden; background: #fffdf7;
  box-shadow: 0 18px 35px rgba(64, 52, 27, .16);
}
.egg-body img {
  width: 126%; height: 126%; object-fit: cover; object-position: 50% 50%;
  transform: translate(-11%, -5%);
}
.egg-shadow {
  position: absolute; left: 38px; bottom: 12px; width: 74px; height: 13px; border-radius: 50%;
  background: rgba(8, 22, 47, .12); animation: egg-shadow 2.8s ease-in-out infinite;
}
.spark { position: absolute; color: #ffd76a; font-size: 24px; font-weight: 900; }
.spark-one { right: 10px; top: 20px; animation: twinkle 1.8s ease-in-out infinite; }
.spark-two { left: 6px; top: 68px; font-size: 18px; color: #8ccd8a; animation: twinkle 2.2s ease-in-out infinite .25s; }
.float-card {
  position: absolute; z-index: 2; border: 1px solid rgba(8, 22, 47, .08); background: rgba(255, 255, 255, .78);
  box-shadow: 0 22px 48px rgba(64, 52, 27, .12); backdrop-filter: blur(14px);
}
.float-card-main {
  left: 10%; right: 8%; bottom: 14%; border-radius: 22px; padding: 24px;
  animation: float-soft 4.4s ease-in-out infinite;
}
.float-card-main span { color: #8a7a61; font-size: 12px; font-weight: 800; letter-spacing: .12em; }
.float-card-main strong { display: block; margin: 8px 0 6px; color: #08162f; font-size: 22px; }
.float-card-main small { color: #6a6258; font-size: 13px; }
.float-card-small {
  border-radius: 999px; padding: 10px 14px; color: #4f5d74; font-size: 13px; font-weight: 800;
  animation: float-soft 5s ease-in-out infinite .2s;
}
.float-card-one { left: 6%; top: 18%; }
.float-card-two { right: 4%; top: 36%; animation-delay: .7s; }
.float-ring {
  position: absolute; inset: 18% 8% 16%; border-radius: 34px;
  border: 1px solid rgba(255, 215, 106, .75); transform: rotate(-5deg);
}
@keyframes egg-bob {
  0%, 100% { transform: translateX(-50%) translateY(0) rotate(-3deg) scale(1); }
  35% { transform: translateX(-50%) translateY(-18px) rotate(5deg) scale(1.03); }
  55% { transform: translateX(-50%) translateY(-11px) rotate(-4deg) scale(.99); }
}
@keyframes egg-shadow {
  0%, 100% { transform: scaleX(1); opacity: .16; }
  50% { transform: scaleX(.7); opacity: .08; }
}
@keyframes twinkle {
  0%, 100% { transform: scale(.88) rotate(0); opacity: .55; }
  50% { transform: scale(1.15) rotate(12deg); opacity: 1; }
}
@keyframes float-soft {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.app-shell { min-height: calc(100vh - 46px); display: flex; }
.sidebar {
  width: 248px;
  padding: 28px 20px 22px;
  background: #fff;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  position: fixed;
  inset: 0 auto 0 0;
}
.brand { display: flex; align-items: center; gap: 11px; margin-bottom: 36px; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center;
  color: #fff; font-size: 21px; font-weight: 800;
  background: linear-gradient(145deg, #3485ff, #1e52cf);
  box-shadow: 0 7px 18px rgba(37, 99, 235, .25);
}
.brand strong, .brand span, .profile-card strong, .profile-card span { display: block; }
.brand strong { font-size: 17px; letter-spacing: .04em; }
.brand span, .profile-card span { color: var(--muted); font-size: 11px; margin-top: 3px; }
.nav-list { display: grid; gap: 7px; }
.nav-item {
  border: 0; background: transparent; color: #5e6b82; border-radius: 11px;
  padding: 12px 14px; text-align: left; display: flex; align-items: center; gap: 12px;
  transition: .18s ease;
}
.nav-item:hover { background: #f5f8ff; color: var(--blue); }
.nav-item.active { background: var(--blue-soft); color: var(--blue); font-weight: 700; }
.nav-icon { width: 22px; text-align: center; font-weight: 800; }
.sidebar-card {
  margin-top: auto; background: #f7f9fe; border: 1px solid var(--line); border-radius: 14px;
  padding: 15px; display: grid; gap: 8px;
}
.sidebar-card strong { font-size: 13px; }
.sidebar-card small { color: var(--muted); font-size: 11px; }
.progress { height: 6px; border-radius: 99px; background: #e4eaf5; overflow: hidden; }
.progress span { display: block; height: 100%; border-radius: inherit; background: var(--blue); }
.profile-card {
  margin-top: 18px; padding: 13px; border-radius: 14px; background: #fffdf7;
  border: 1px solid #f1dfbd; display: grid; gap: 6px;
}
.profile-actions { display: flex; justify-content: space-between; gap: 8px; margin-top: 2px; }
.danger-text { color: #dc2626 !important; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #e8f0ff; color: var(--blue); font-weight: 700; }

.main { margin-left: 248px; width: calc(100% - 248px); padding: 30px 38px 50px; }
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; }
.topbar h1 { margin: 4px 0 0; font-size: 25px; }
.eyebrow { margin: 0; color: #8b97aa; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.eyebrow.light { color: rgba(255,255,255,.7); }
.top-actions { display: flex; gap: 10px; align-items: center; }
.icon-button {
  width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; color: #64748b; position: relative;
}
.dot { position: absolute; width: 6px; height: 6px; background: #f43f5e; border: 1px solid #fff; border-radius: 50%; top: 8px; right: 9px; }
.primary-button, .secondary-button, .hero-button {
  border-radius: 10px; padding: 10px 16px; font-weight: 700; border: 0;
}
.primary-button { background: var(--blue); color: #fff; box-shadow: 0 5px 13px rgba(37,99,235,.18); }
.primary-button:hover { background: var(--blue-dark); }
.secondary-button { background: #fff; color: var(--blue); border: 1px solid #cfe0ff; }
.hero-button { margin-top: 13px; background: #fff; color: var(--blue); }
.page { display: none; }
.page.active { display: block; }

.overview-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(360px, .75fr); gap: 18px; }
.overview-left { min-height: 248px; display: grid; grid-template-rows: 64px 1fr; gap: 10px; }
.exam-countdown-strip {
  border-radius: 18px; padding: 8px 10px;
  background: linear-gradient(135deg, rgba(255,255,255,.96), rgba(234,241,255,.92));
  border: 1px solid #dce8ff;
  box-shadow: var(--shadow); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px;
}
.countdown-item {
  border-radius: 13px; background: rgba(255,255,255,.78); padding: 7px 10px; min-width: 0;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center;
  border: 1px solid rgba(191,213,255,.72);
}
.countdown-item span {
  color: #60708a; font-size: 11px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.countdown-item strong {
  color: var(--blue); font-size: 18px; font-weight: 900; white-space: nowrap; letter-spacing: 0;
}
.hero-card {
  min-height: 190px; border-radius: 20px; color: #fff; overflow: hidden; position: relative;
  padding: 32px 38px; display: flex; justify-content: space-between;
  background: linear-gradient(120deg, #1e56d9, #3b82f6 70%, #61a6ff);
  box-shadow: 0 18px 35px rgba(37,99,235,.2);
}
.hero-card h2 { margin: 10px 0 8px; font-size: 27px; }
.hero-card p:not(.eyebrow) { margin: 0; color: rgba(255,255,255,.82); font-size: 14px; }
.hero-visual { width: 260px; position: relative; }
.book-shape {
  position: absolute; right: 55px; top: 23px; width: 112px; height: 130px;
  border-radius: 13px 20px 20px 13px; background: rgba(255,255,255,.92); color: var(--blue);
  display: grid; place-items: center; text-align: center; font-size: 22px; font-weight: 800;
  transform: rotate(6deg); box-shadow: 0 14px 25px rgba(0,0,0,.12);
}
.book-shape::before { content: ""; position: absolute; left: 10px; top: 0; bottom: 0; width: 2px; background: #d6e5ff; }
.orbit { position: absolute; border: 1px solid rgba(255,255,255,.22); border-radius: 50%; }
.orbit-one { width: 220px; height: 220px; right: 0; top: -30px; }
.orbit-two { width: 155px; height: 155px; right: 32px; top: 2px; }
.compact-hero { min-height: 0; align-items: center; }
.compact-hero h2 { max-width: 520px; }

.calendar-panel { min-height: 248px; position: relative; overflow: visible; }
.calendar-head, .calendar-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.calendar-head h3 { margin: 5px 0 0; font-size: 17px; }
.mini-button {
  border: 1px solid var(--line); background: #fff; color: #60708a; border-radius: 8px;
  width: 30px; height: 30px; font-weight: 800;
}
.mini-button:hover { color: var(--blue); border-color: #bfd5ff; }
.calendar-weekdays, .mini-calendar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.calendar-weekdays { margin: 16px 0 7px; color: #98a3b5; font-size: 11px; text-align: center; }
.calendar-day {
  height: 31px; border: 0; border-radius: 9px; background: #f6f8fc; color: #4b5870;
  position: relative; display: grid; place-items: center; font-size: 12px;
}
.calendar-day:hover, .calendar-day:focus { outline: none; background: var(--blue-soft); color: var(--blue); }
.calendar-day.today { background: var(--blue); color: #fff; font-weight: 800; }
.calendar-day.muted-day { color: #c2cad8; background: #fafbfe; }
.course-dot {
  position: absolute; width: 5px; height: 5px; border-radius: 50%; background: #ef4444;
  bottom: 4px; left: 50%; transform: translateX(-50%);
}
.calendar-day.today .course-dot { background: #fff; }
.course-popover {
  position: absolute; z-index: 5; width: 220px; border-radius: 12px; padding: 12px;
  background: #172033; color: #fff; box-shadow: 0 14px 28px rgba(15, 23, 42, .22);
}
.course-popover strong { display: block; margin-bottom: 8px; font-size: 12px; }
.popover-course em, .course-subject-label {
  display: inline-flex; width: fit-content; border-radius: 999px; padding: 2px 7px;
  background: #fff8e2; color: #9a6a00; font-size: 11px; font-style: normal; font-weight: 800;
}
.popover-course { display: grid; gap: 2px; padding: 7px 0; border-top: 1px solid rgba(255,255,255,.12); }
.popover-course span { color: #bfdbfe; font-size: 11px; }
.popover-course b { font-size: 12px; }
.popover-course small { color: rgba(255,255,255,.7); font-size: 11px; line-height: 1.5; }
.calendar-manage { margin-top: 12px; padding: 0; }

.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; margin: 20px 0; }
.stat-card, .panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: 15px; box-shadow: var(--shadow);
}
.stat-card { padding: 17px; display: flex; align-items: center; gap: 13px; }
.stat-icon {
  width: 42px; height: 42px; flex: 0 0 42px; border-radius: 12px; display: grid; place-items: center; font-weight: 800;
}
.stat-icon.blue { color: var(--blue); background: var(--blue-soft); }
.stat-icon.orange { color: var(--orange); background: #fff6df; }
.stat-icon.green { color: var(--green); background: #e7f8f2; }
.stat-icon.purple { color: var(--purple); background: #f0ebff; }
.stat-card span, .stat-card strong, .stat-card small { display: block; }
.stat-card span { color: var(--muted); font-size: 12px; }
.stat-card strong { font-size: 23px; margin: 2px 0; }
.stat-card small { color: #a0aabd; font-size: 10px; }

.content-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 20px; }
.panel { padding: 20px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.panel h3 { font-size: 17px; margin: 5px 0 0; }
.text-button { border: 0; background: transparent; color: var(--blue); font-size: 12px; }
.soft-tag { color: #8290a6; background: #f5f7fb; padding: 5px 8px; border-radius: 7px; font-size: 11px; }
.task-list { display: grid; gap: 9px; }
.task-item { display: grid; grid-template-columns: 37px 1fr auto; align-items: center; gap: 11px; padding: 9px 0; border-bottom: 1px solid #f0f3f8; }
.task-item:last-child { border-bottom: 0; }
.subject-badge { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: #edf3ff; color: var(--blue); font-size: 11px; font-weight: 700; }
.task-item strong, .task-item span { display: block; }
.task-item strong { font-size: 13px; }
.task-item span { color: var(--muted); font-size: 11px; margin-top: 3px; }
.status { font-size: 11px; border-radius: 99px; padding: 4px 7px; }
.status.due { color: #d97706; background: #fff7e7; }
.status.done { color: var(--green); background: #e8f8f2; }
.subject-chart { display: grid; gap: 13px; }
.chart-row { display: grid; grid-template-columns: 34px 1fr 25px; align-items: center; gap: 9px; color: #69778d; font-size: 12px; }
.bar { height: 7px; background: #eef2f7; border-radius: 99px; overflow: hidden; }
.bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #4b8dff, #7cb4ff); }
.recent-panel { margin-top: 20px; }
.mistake-row { display: grid; grid-template-columns: 70px 1.5fr 1fr 1fr 80px; gap: 12px; align-items: center; padding: 12px 8px; border-top: 1px solid #f0f3f7; font-size: 12px; }
.mistake-row.header { color: #9aa5b6; border-top: 0; padding-top: 0; }
.mistake-row strong { font-size: 12px; }
.mastery { color: var(--green); }
.learning { color: #d97706; }

.section-tools { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.section-title { margin: 4px 0 0; font-size: 22px; }
.filter-row { display: flex; gap: 7px; flex-wrap: wrap; }
.filter { border: 1px solid var(--line); background: #fff; color: #718096; border-radius: 9px; padding: 7px 13px; }
.filter.active { color: var(--blue); border-color: #bfd5ff; background: var(--blue-soft); }
.mistake-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.mistake-card { background: #fff; border: 1px solid var(--line); border-radius: 15px; padding: 17px; box-shadow: var(--shadow); }
.mistake-card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.mistake-image, .review-image { width: 100%; max-height: 220px; object-fit: contain; border: 1px solid var(--line); border-radius: 12px; background: #f7f9fd; margin-bottom: 12px; }
.mistake-card h3 { font-size: 14px; line-height: 1.65; margin: 0 0 12px; min-height: 46px; }
.mistake-meta { display: flex; gap: 6px; flex-wrap: wrap; }
.meta-tag { font-size: 10px; color: #758297; background: #f5f7fa; padding: 4px 6px; border-radius: 6px; }
.review-date { display: block; color: #9aa5b6; margin-top: 14px; font-size: 11px; }
.empty-state { grid-column: 1 / -1; padding: 50px; text-align: center; color: var(--muted); background: #fff; border: 1px dashed #ccd6e5; border-radius: 15px; }

.review-layout { display: grid; grid-template-columns: 1.4fr .65fr; gap: 20px; }
.review-card { min-height: 430px; }
.review-question { font-size: 19px; line-height: 1.8; margin: 25px 0; }
.review-image { max-height: 360px; margin: 20px 0 0; }
.answer-box { background: #f7f9fd; border: 1px solid var(--line); border-radius: 12px; padding: 15px; margin: 15px 0; }
.answer-box p { color: #65748a; line-height: 1.7; font-size: 13px; }
.review-actions { display: flex; gap: 10px; margin-top: 25px; }
.review-actions button { flex: 1; }
.review-ring {
  --percent: 0deg; width: 130px; height: 130px; margin: 30px auto 15px; border-radius: 50%;
  background: conic-gradient(var(--blue) var(--percent), #edf1f7 0);
  display: grid; place-items: center; position: relative;
}
.review-ring::before { content: ""; position: absolute; width: 96px; height: 96px; border-radius: 50%; background: #fff; }
.review-ring span { position: relative; font-size: 23px; font-weight: 800; color: var(--blue); }
.muted { color: var(--muted); font-size: 12px; text-align: center; }
.tip-box { margin-top: 28px; border-radius: 12px; padding: 13px; background: #f5f8ff; color: #63718a; font-size: 12px; line-height: 1.65; }
.tip-box strong { color: var(--blue); }

.schedule-summary-grid, .schedule-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.schedule-summary-grid { margin-bottom: 20px; }
.schedule-summary-card { min-height: 180px; }
.schedule-brief-list { display: grid; gap: 9px; }
.schedule-brief-item {
  display: grid; grid-template-columns: 88px 1fr; gap: 10px; align-items: start;
  padding: 10px 0; border-top: 1px solid #edf1f7;
}
.schedule-brief-item:first-child { border-top: 0; }
.schedule-brief-item time { color: var(--blue); font-weight: 800; font-size: 12px; }
.schedule-brief-item strong, .schedule-brief-item span { display: block; }
.schedule-brief-item span { color: var(--muted); font-size: 12px; margin-top: 3px; line-height: 1.55; }
.schedule-brief-list .empty-state { padding: 26px 12px; }
.course-form label, .recognition-label {
  display: grid; gap: 6px; color: #5e6c82; font-size: 12px; margin-bottom: 12px;
}
.course-form input, .course-form select, .recognition-label textarea {
  width: 100%; border: 1px solid #dfe6f0; border-radius: 9px; padding: 9px 10px;
  color: var(--text); background: #fff; outline: none;
}
.course-form input:focus, .course-form select:focus, .recognition-label textarea:focus { border-color: #91b5ff; box-shadow: 0 0 0 3px #edf3ff; }
.date-mode-row { display: flex; gap: 8px; margin-bottom: 12px; }
.mode-chip {
  border: 1px solid #d8e3f5; background: #fff; color: #60708a; border-radius: 999px;
  padding: 7px 12px; font-size: 12px; font-weight: 800;
}
.mode-chip.active { background: var(--blue-soft); border-color: #bfd5ff; color: var(--blue); }
.mode-chip:disabled { opacity: .48; cursor: not-allowed; }
.multi-date-panel {
  border: 1px solid #edf1f7; border-radius: 12px; padding: 12px; margin-bottom: 12px; background: #fbfcff;
}
.date-add-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.selected-date-list { display: flex; flex-wrap: wrap; gap: 8px; min-height: 30px; }
.selected-date-chip {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid #cfe0ff; border-radius: 999px;
  background: #fff; color: #41516a; padding: 6px 9px; font-size: 12px; font-weight: 700;
}
.selected-date-chip button { border: 0; background: transparent; color: #8a98ad; font-weight: 900; padding: 0; }
.schedule-upload { height: 132px; }
.schedule-upload input { display: none; }
#schedule-upload-prompt { display: grid; gap: 6px; color: #62728a; }
#schedule-upload-prompt small { color: #9aa7ba; font-size: 11px; }
.schedule-month-panel { margin-top: 20px; }
.schedule-month-weekdays, .schedule-month-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.schedule-month-weekdays { margin: 16px 0 8px; color: #98a3b5; font-size: 11px; text-align: center; }
.schedule-date-cell {
  min-height: 128px; border: 1px solid #edf1f7; border-radius: 12px; background: #fff; padding: 9px;
  display: flex; flex-direction: column; gap: 7px; overflow: hidden;
}
.schedule-date-cell.muted-day { background: #fafbfe; color: #b6c0cf; }
.schedule-date-cell.today { border-color: #9bbcff; box-shadow: 0 0 0 3px #edf3ff; }
.schedule-date-number { font-weight: 800; font-size: 13px; color: var(--text); }
.schedule-date-cell.muted-day .schedule-date-number { color: #b6c0cf; }
.schedule-day-items { display: grid; gap: 5px; min-width: 0; }
.schedule-day-item {
  border-radius: 8px; background: #f5f8ff; color: #44546a; padding: 5px 6px;
  font-size: 11px; line-height: 1.35; overflow: hidden;
}
.schedule-day-item time { display: block; color: var(--blue); font-weight: 800; margin-bottom: 2px; }
.schedule-day-item span { display: block; color: #9a6a00; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.schedule-day-item strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.course-manager-list { display: grid; gap: 10px; max-height: min(62vh, 620px); overflow: auto; }
#schedule-manager-dialog { width: min(760px, calc(100% - 32px)); }
.course-row {
  display: grid; grid-template-columns: 62px 1fr auto; gap: 13px; align-items: center;
  padding: 12px; border: 1px solid #edf1f7; border-radius: 13px; background: #fbfcff;
}
.course-row > div:nth-child(2) strong, .course-row > div:nth-child(2) span { display: block; }
.course-row > div:nth-child(2) span { margin-top: 4px; color: var(--muted); font-size: 12px; }
.course-row-actions { display: flex; gap: 8px; }
.date-pill {
  height: 52px; border-radius: 12px; display: grid; place-items: center; background: #fff1f2; color: #e11d48;
}
.date-pill strong { font-size: 14px; }
.date-pill span { font-size: 10px; margin-top: -8px; color: #fb7185; }

.module-placeholder {
  min-height: 410px; border-radius: 21px; padding: 50px; color: #fff; display: flex; align-items: center; justify-content: space-between;
  overflow: hidden;
}
.module-placeholder h2 { font-size: 29px; margin: 12px 0; }
.module-placeholder p:not(.eyebrow) { max-width: 520px; color: rgba(255,255,255,.78); line-height: 1.8; }
.word-module { background: linear-gradient(120deg, #5536c9, #896bff); }
.classic-module { background: linear-gradient(120deg, #087e82, #27a9a1); }
.flash-card, .classic-card {
  width: 245px; height: 160px; border-radius: 17px; background: rgba(255,255,255,.95); color: #302873;
  display: flex; flex-direction: column; justify-content: center; padding: 25px; transform: rotate(4deg); box-shadow: 0 18px 28px rgba(0,0,0,.15);
}
.classic-card { color: #176f70; transform: rotate(-3deg); }
.flash-card strong, .classic-card strong { font-size: 24px; margin: 10px 0; }
.flash-card span, .classic-card span { font-size: 12px; line-height: 1.6; }

dialog { border: 0; padding: 0; border-radius: 18px; box-shadow: 0 25px 70px rgba(28,46,80,.25); width: min(610px, calc(100% - 32px)); }
dialog::backdrop { background: rgba(16,27,48,.38); backdrop-filter: blur(2px); }
.dialog-card { padding: 24px; }
.dialog-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; }
.dialog-head h2 { margin: 5px 0 0; font-size: 21px; }
.close-button { border: 0; background: #f3f5f8; width: 30px; height: 30px; border-radius: 8px; color: #7b8799; font-size: 20px; }
.upload-zone {
  height: 165px; border: 1px dashed #b8cae8; border-radius: 13px; background: #f8faff; display: grid; place-items: center;
  margin-bottom: 15px; overflow: hidden; cursor: pointer; text-align: center;
}
.upload-zone input { display: none; }
.upload-zone img { width: 100%; height: 100%; object-fit: contain; }
#upload-prompt { display: grid; gap: 6px; color: #62728a; }
#upload-prompt small { color: #9aa7ba; font-size: 11px; }
.camera-icon { font-size: 25px; color: var(--blue); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dialog-card label { display: grid; gap: 6px; color: #5e6c82; font-size: 12px; margin-bottom: 12px; }
.dialog-card input, .dialog-card select, .dialog-card textarea {
  width: 100%; border: 1px solid #dfe6f0; border-radius: 9px; padding: 9px 10px; color: var(--text); background: #fff; outline: none;
}
.dialog-card input:focus, .dialog-card select:focus, .dialog-card textarea:focus { border-color: #91b5ff; box-shadow: 0 0 0 3px #edf3ff; }
.field-hint { min-height: 16px; color: var(--muted); font-size: 11px; line-height: 1.4; }
.field-hint.ok { color: var(--green); }
.field-hint.error { color: #dc2626; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 17px; }
.auth-note { color: var(--muted); background: #f6f8fc; border-radius: 10px; padding: 11px 12px; font-size: 12px; line-height: 1.7; margin: 0 0 15px; }
.auth-message {
  border-radius: 10px;
  padding: 10px 12px;
  margin: -3px 0 14px;
  font-size: 12px;
  line-height: 1.6;
  font-weight: 700;
}
.auth-message.error {
  color: #b42318;
  background: #fff1f0;
  border: 1px solid #ffd7d2;
}
.auth-message.ok {
  color: #087443;
  background: #ecfdf3;
  border: 1px solid #b7ebc6;
}
.auth-actions button { min-width: 120px; }
.auth-actions .text-button { min-width: auto; align-self: center; }
.auth-channel-row { display: flex; gap: 8px; margin: 4px 0 14px; }
.channel-button {
  border: 1px solid #dfe6f0; background: #fff; color: #66758c; border-radius: 9px; padding: 8px 10px;
  font-size: 12px; font-weight: 700;
}
.channel-button.active { color: #08162f; border-color: #ffd76a; background: #fff8e2; }
.channel-button:disabled { cursor: not-allowed; opacity: .62; }
.exam-settings { margin-top: 4px; }
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); background: #172033; color: #fff;
  border-radius: 10px; padding: 10px 15px; font-size: 12px; opacity: 0; pointer-events: none; transition: .2s;
  z-index: 2147483647;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.site-footer {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  color: #7d8798;
  background: rgba(255, 255, 255, .88);
  border-top: 1px solid var(--line);
  font-size: 12px;
}
.site-footer a {
  color: #637089;
  text-decoration: none;
}
.site-footer a:hover { color: var(--blue); }

@media (max-width: 980px) {
  .landing-shell { grid-template-columns: 1fr; padding: 30px 24px 40px; align-items: start; }
  .landing-copy { max-width: none; }
  .landing-visual { min-height: 250px; align-self: start; }
  .landing-copy h1 { font-size: 38px; }
  .landing-slogan { font-size: 46px; }
  .sidebar { width: 78px; padding: 24px 12px; }
  .brand > div:not(.brand-mark), .nav-item:not(.active) .nav-icon + *, .sidebar-card, .profile-card { display: none; }
  .brand { justify-content: center; }
  .nav-item { justify-content: center; padding: 12px; font-size: 0; }
  .nav-icon { font-size: 14px; }
  .main { margin-left: 78px; width: calc(100% - 78px); padding: 24px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .mistake-grid { grid-template-columns: repeat(2, 1fr); }
  .overview-grid, .schedule-layout, .schedule-summary-grid { grid-template-columns: 1fr; }
  .overview-left { min-height: auto; grid-template-rows: auto minmax(180px, auto); }
  .exam-countdown-strip { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .landing-shell { padding: 20px 16px 30px; gap: 16px; }
  .landing-brand { margin-bottom: 24px; }
  .landing-copy h1 { font-size: 31px; }
  .landing-slogan { font-size: 38px; letter-spacing: .04em; }
  .landing-subtitle { font-size: 16px; margin-bottom: 22px; }
  .landing-lead { font-size: 14px; line-height: 1.7; }
  .landing-visual { min-height: 210px; }
  .egg-bounce { left: 50%; top: 4px; width: 122px; height: 148px; }
  .egg-body { width: 86px; height: 104px; }
  .egg-shadow { left: 31px; bottom: 10px; width: 60px; }
  .float-card-main { left: 4px; right: 4px; bottom: 0; padding: 16px; border-radius: 18px; }
  .float-card-main strong { font-size: 18px; }
  .float-card-one { left: 0; top: 42px; }
  .float-card-two { right: 0; top: 88px; }
  .float-ring { inset: 24px 18px 38px; border-radius: 26px; }
  .sidebar { position: fixed; z-index: 10; top: auto; width: 100%; height: 64px; padding: 7px 12px; border-top: 1px solid var(--line); border-right: 0; }
  .brand, .sidebar-card, .profile-card { display: none; }
  .nav-list { grid-template-columns: repeat(6, 1fr); gap: 2px; }
  .nav-item, .nav-item:not(.active) { font-size: 0; display: grid; place-items: center; padding: 9px; }
  .nav-icon { font-size: 15px; }
  .main { margin-left: 0; width: 100%; padding: 18px 14px 85px; }
  .topbar { align-items: flex-start; }
  .topbar h1 { font-size: 21px; }
  .icon-button { display: none; }
  .primary-button { padding: 9px 12px; }
  .hero-card { padding: 25px; min-height: 190px; }
  .hero-card h2 { font-size: 22px; max-width: 230px; }
  .exam-countdown-strip { gap: 7px; padding: 9px; }
  .countdown-item { grid-template-columns: 1fr auto; align-items: center; }
  .countdown-item strong { font-size: 12px; }
  .hero-visual { display: none; }
  .stats-grid, .content-grid, .mistake-grid, .review-layout, .schedule-layout, .schedule-summary-grid, .overview-grid { grid-template-columns: 1fr; }
  .schedule-month-weekdays, .schedule-month-grid { grid-template-columns: 1fr; }
  .schedule-date-cell { min-height: auto; }
  .calendar-panel { min-height: auto; }
  .course-popover { left: 12px !important; right: 12px; width: auto; }
  .stat-card { padding: 14px; }
  .mistake-row { grid-template-columns: 55px 1fr 80px; }
  .mistake-row > *:nth-child(3), .mistake-row > *:nth-child(4) { display: none; }
  .module-placeholder { padding: 30px; min-height: 420px; display: block; }
  .flash-card, .classic-card { margin: 40px auto 0; }
  .form-grid { grid-template-columns: 1fr; gap: 0; }
}
