/* ==========================================================================
   智慧教育，海燕翱翔 —— 全站公共样式
   主题：深海蓝 + 海燕青，寓意“海燕翱翔于智慧之海”
   ========================================================================== */

:root {
  --deep: #062a4d;
  --deep-2: #0b3b66;
  --sea: #1769aa;
  --sea-light: #2f9bd8;
  --cyan: #22d3ee;
  --sky: #e8f4fd;
  --sand: #fff8ec;
  --gold: #f6a623;
  --gold-soft: #ffe9c2;
  --ink: #10263a;
  --ink-2: #3c5a76;
  --ink-3: #6b8299;
  --line: #dbe8f4;
  --white: #ffffff;
  --primary: #1769aa;
  --primary-soft: #e1effb;
  --primary-glow: rgba(23, 105, 170, 0.28);
  --shadow-sm: 0 2px 10px rgba(9, 48, 84, 0.07);
  --shadow: 0 10px 30px rgba(9, 48, 84, 0.12);
  --shadow-lg: 0 22px 60px rgba(9, 48, 84, 0.18);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 26px;
  --maxw: 1200px;
  --nav-h: 68px;
  --font: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Source Han Sans SC",
    "Noto Sans SC", "Segoe UI", system-ui, -apple-system, sans-serif;
}

/* 初中主题：珊瑚橙 */
body.grade-junior {
  --primary: #e2653a;
  --primary-soft: #fdeae2;
  --primary-glow: rgba(226, 101, 58, 0.28);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: #f5f9fd;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  font-size: 16px;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; }

.wrap { width: min(var(--maxw), 92vw); margin-inline: auto; }
.hidden { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ------------------------------ 顶部导航 ------------------------------ */
.topbar {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.topbar__inner {
  display: flex; align-items: center; gap: 18px;
  min-height: var(--nav-h);
}

.brand { display: flex; align-items: center; gap: 12px; flex: none; }

.brand__mark {
  width: 44px; height: 44px; border-radius: 13px; flex: none;
  background: linear-gradient(140deg, var(--deep), var(--sea-light));
  display: grid; place-items: center;
  box-shadow: 0 6px 16px rgba(9, 48, 84, 0.28);
  overflow: hidden;
}
.brand__mark svg { width: 30px; height: 30px; }

.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__title {
  font-size: 19px; font-weight: 800; letter-spacing: 0.5px;
  background: linear-gradient(100deg, var(--deep), var(--sea-light));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand__sub { font-size: 11px; color: var(--ink-3); letter-spacing: 2.6px; }

.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }

.nav__link {
  position: relative; padding: 9px 15px; border-radius: 999px;
  font-size: 15px; color: var(--ink-2); font-weight: 600;
  transition: background 0.18s, color 0.18s;
  white-space: nowrap;
}
.nav__link:hover { background: var(--sky); color: var(--sea); }
.nav__link.is-active { background: var(--primary-soft); color: var(--primary); }
.nav__link.is-active::after {
  content: ""; position: absolute; left: 50%; bottom: 2px;
  width: 16px; height: 3px; border-radius: 3px; transform: translateX(-50%);
  background: var(--primary);
}

.nav-toggle {
  display: none; width: 42px; height: 42px; border-radius: 12px;
  border: 1px solid var(--line); margin-left: auto;
  align-items: center; justify-content: center; flex-direction: column; gap: 5px;
}
.nav-toggle span {
  display: block; width: 18px; height: 2px; border-radius: 2px; background: var(--ink-2);
}

/* ------------------------------ 学段切换 ------------------------------ */
.grade-switch {
  display: inline-flex; padding: 4px; gap: 4px;
  background: #eef4fa; border: 1px solid var(--line); border-radius: 999px;
}
.grade-switch__btn {
  padding: 7px 18px; border-radius: 999px; font-size: 14px; font-weight: 700;
  color: var(--ink-2); transition: all 0.18s; white-space: nowrap;
}
.grade-switch__btn:hover { color: var(--primary); }
.grade-switch__btn.is-active {
  background: var(--primary); color: #fff;
  box-shadow: 0 6px 16px var(--primary-glow);
}
.grade-switch--float {
  position: fixed; right: 22px; bottom: 26px; z-index: 70;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow); backdrop-filter: blur(8px);
}

/* 深色背景（页头 / 首屏 / 个人页横幅）上的学段切换 */
.grade-switch--on-dark {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.34);
}
.grade-switch--on-dark .grade-switch__btn { color: rgba(255, 255, 255, 0.9); }
.grade-switch--on-dark .grade-switch__btn:hover { color: #fff; }
.grade-switch--on-dark .grade-switch__btn.is-active {
  background: #fff; color: var(--primary);
  box-shadow: 0 6px 16px rgba(4, 24, 42, 0.28);
}
body.grade-junior .grade-switch--on-dark .grade-switch__btn.is-active { color: var(--primary); }

/* ------------------------------ 页头 ------------------------------ */
.page-head {
  position: relative; overflow: hidden; color: #fff;
  background: linear-gradient(120deg, var(--deep), var(--sea) 62%, var(--sea-light));
  padding: 54px 0 60px;
}
.page-head::before,
.page-head::after {
  content: ""; position: absolute; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.22), transparent 68%);
}
.page-head::before { width: 460px; height: 460px; right: -120px; top: -190px; }
.page-head::after { width: 320px; height: 320px; left: -120px; bottom: -190px; }
.page-head .wrap { position: relative; z-index: 2; }
.page-head__tag {
  display: inline-block; padding: 4px 13px; border-radius: 999px; font-size: 12.5px;
  letter-spacing: 2px; background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.3); margin-bottom: 14px;
}
.page-head h1 { margin: 0 0 10px; font-size: clamp(25px, 3.4vw, 38px); letter-spacing: 1px; }
.page-head p { margin: 0; max-width: 760px; color: rgba(255, 255, 255, 0.88); }
.page-head__actions { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 12px; }

.breadcrumb { font-size: 13.5px; color: rgba(255, 255, 255, 0.78); margin-bottom: 12px; }
.breadcrumb a:hover { color: #fff; text-decoration: underline; }

/* ------------------------------ 按钮 ------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px; border-radius: 999px; font-size: 15px; font-weight: 700;
  transition: transform 0.16s, box-shadow 0.16s, background 0.16s, color 0.16s;
  border: 1px solid transparent; white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn--primary {
  background: linear-gradient(120deg, var(--primary), var(--sea-light));
  color: #fff; box-shadow: 0 10px 24px var(--primary-glow);
}
.btn--primary:hover { box-shadow: 0 14px 32px var(--primary-glow); transform: translateY(-2px); }
.btn--ghost {
  background: rgba(255, 255, 255, 0.14); color: #fff;
  border-color: rgba(255, 255, 255, 0.45);
}
.btn--ghost:hover { background: rgba(255, 255, 255, 0.26); }
.btn--line {
  background: #fff; color: var(--primary); border-color: var(--line);
  box-shadow: var(--shadow-sm);
}
.btn--line:hover { border-color: var(--primary); transform: translateY(-2px); }
.btn--sm { padding: 8px 15px; font-size: 13.5px; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* ------------------------------ 区块 ------------------------------ */
.section { padding: 62px 0; }
.section--tight { padding: 40px 0; }
.section--sky { background: linear-gradient(180deg, #f0f7fd, #ffffff); }
.section--sand { background: linear-gradient(180deg, var(--sand), #ffffff); }

.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 20px; flex-wrap: wrap; margin-bottom: 28px;
}
.section-head__left { max-width: 720px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 700; letter-spacing: 2.4px;
  color: var(--primary); text-transform: uppercase; margin-bottom: 8px;
}
.eyebrow::before {
  content: ""; width: 22px; height: 2px; border-radius: 2px; background: var(--primary);
}
.section-title { margin: 0 0 8px; font-size: clamp(21px, 2.6vw, 29px); letter-spacing: 0.6px; }
.section-desc { margin: 0; color: var(--ink-3); }

/* ------------------------------ 卡片 ------------------------------ */
.grid { display: grid; gap: 20px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); overflow: hidden; position: relative;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #c6ddf0; }
.card__media {
  height: 128px; position: relative;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--deep), var(--sea-light));
  color: #fff; font-size: 34px; font-weight: 800; letter-spacing: 2px;
}
.card__media::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 80% 10%, rgba(255, 255, 255, 0.28), transparent 60%);
}
.card__body { padding: 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card__title { margin: 0; font-size: 17.5px; font-weight: 800; letter-spacing: 0.3px; }
.card__text { margin: 0; color: var(--ink-3); font-size: 14.3px; }
.card__foot {
  margin-top: auto; padding-top: 12px; border-top: 1px dashed var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-size: 13px; color: var(--ink-3);
}

.tag {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.4px;
  background: var(--sky); color: var(--sea);
}
.tag--gold { background: var(--gold-soft); color: #a86a00; }
.tag--primary { background: var(--primary-soft); color: var(--primary); }
.tag--junior { background: #fdeae2; color: #c04d24; }
.tag--plain { background: #f0f4f8; color: var(--ink-2); font-weight: 600; }

.tag-row { display: flex; flex-wrap: wrap; gap: 7px; }

/* ------------------------------ 学段分区 ------------------------------ */
.zone {
  border-radius: var(--radius-lg); padding: 26px;
  border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow-sm);
  position: relative; overflow: hidden;
}
.zone + .zone { margin-top: 34px; }
.zone--primary { background: linear-gradient(180deg, #f2f8fe, #ffffff 42%); }
.zone--junior { background: linear-gradient(180deg, #fef4ef, #ffffff 42%); }
.zone::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px;
  background: linear-gradient(180deg, var(--sea), var(--cyan));
}
.zone--junior::before { background: linear-gradient(180deg, #e2653a, var(--gold)); }
.zone__head {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding-bottom: 18px; border-bottom: 1px dashed var(--line); margin-bottom: 22px;
}
.zone__badge {
  width: 52px; height: 52px; border-radius: 16px; flex: none;
  display: grid; place-items: center; font-size: 15px; font-weight: 800; color: #fff;
  background: linear-gradient(140deg, var(--sea), var(--sea-light));
  letter-spacing: 1px; text-align: center; line-height: 1.05;
}
.zone--junior .zone__badge { background: linear-gradient(140deg, #d6542a, #f09447); }
.zone__title { margin: 0; font-size: 20px; font-weight: 800; }
.zone__desc { margin: 2px 0 0; font-size: 13.6px; color: var(--ink-3); }
.zone__count { margin-left: auto; font-size: 13px; color: var(--ink-3); }
.zone.is-locked .zone__body { display: none; }

/* ------------------------------ 筛选栏 ------------------------------ */
.filters {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow-sm); margin-bottom: 26px;
  display: flex; flex-direction: column; gap: 14px;
}
.filter-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.filter-row__label {
  font-size: 13px; font-weight: 800; color: var(--ink-2);
  min-width: 62px; letter-spacing: 1px;
}
.chip {
  padding: 6px 14px; border-radius: 999px; font-size: 13.4px; font-weight: 600;
  background: #f2f6fa; color: var(--ink-2); border: 1px solid transparent;
  transition: all 0.16s;
}
.chip:hover { background: var(--sky); color: var(--sea); }
.chip.is-active {
  background: var(--primary); color: #fff; border-color: var(--primary);
  box-shadow: 0 6px 14px var(--primary-glow);
}

.search-box { position: relative; flex: 1; min-width: 210px; }
.search-box input {
  width: 100%; padding: 10px 16px 10px 40px; border-radius: 999px;
  border: 1px solid var(--line); background: #f8fbfe; color: var(--ink);
  outline: none; transition: border-color 0.16s, box-shadow 0.16s;
}
.search-box input:focus {
  border-color: var(--primary); background: #fff;
  box-shadow: 0 0 0 4px var(--primary-glow);
}
.search-box::before {
  content: "🔍"; position: absolute; left: 14px; top: 50%;
  transform: translateY(-50%); font-size: 14px; opacity: 0.6;
}

.result-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; font-size: 13.6px; color: var(--ink-3);
  margin-bottom: 16px;
}

/* ------------------------------ 列表条目 ------------------------------ */
.item {
  display: flex; gap: 16px; padding: 16px; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); transition: transform 0.18s, box-shadow 0.18s;
}
.item:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.item__icon {
  width: 54px; height: 54px; border-radius: 15px; flex: none;
  display: grid; place-items: center; font-size: 24px;
  background: var(--sky); color: var(--sea);
}
.item__main { flex: 1; min-width: 0; }
.item__title {
  margin: 0 0 5px; font-size: 16.4px; font-weight: 800;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.item__desc { margin: 0 0 8px; font-size: 13.8px; color: var(--ink-3); }
.item__meta {
  display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.6px; color: var(--ink-3);
}
.item__side { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; flex: none; }

/* ------------------------------ 名师 ------------------------------ */
.teacher-card { text-align: left; }
.teacher-card .avatar {
  width: 66px; height: 66px; border-radius: 50%; display: grid; place-items: center;
  font-size: 21px; font-weight: 800; color: #fff; letter-spacing: 1px;
  background: linear-gradient(140deg, var(--sea), var(--cyan));
  box-shadow: 0 8px 20px var(--primary-glow);
}
.teacher-card .avatar--warm { background: linear-gradient(140deg, #e2653a, #f6a623); }
.quote {
  border-left: 4px solid var(--primary); background: var(--primary-soft);
  padding: 14px 18px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 14.6px; color: var(--ink); margin: 0;
}
.quote--warm { border-color: var(--gold); background: var(--gold-soft); }

/* ------------------------------ 详情抽屉 ------------------------------ */
.drawer-mask {
  position: fixed; inset: 0; background: rgba(6, 32, 56, 0.42);
  backdrop-filter: blur(3px); z-index: 90; opacity: 0; pointer-events: none;
  transition: opacity 0.22s;
}
.drawer-mask.is-open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(600px, 94vw);
  background: #fff; z-index: 95; box-shadow: -18px 0 50px rgba(6, 32, 56, 0.24);
  transform: translateX(102%); transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex; flex-direction: column;
}
.drawer.is-open { transform: none; }
.drawer__head {
  padding: 20px 22px; border-bottom: 1px solid var(--line);
  display: flex; align-items: flex-start; gap: 14px;
  background: linear-gradient(120deg, var(--deep), var(--sea));
  color: #fff;
}
.drawer__head h3 { margin: 0 0 6px; font-size: 19px; }
.drawer__head p { margin: 0; font-size: 13.4px; color: rgba(255, 255, 255, 0.85); }
.drawer__close {
  margin-left: auto; width: 34px; height: 34px; border-radius: 10px; flex: none;
  background: rgba(255, 255, 255, 0.16); color: #fff; font-size: 17px;
  display: grid; place-items: center;
}
.drawer__close:hover { background: rgba(255, 255, 255, 0.3); }
.drawer__body { padding: 22px; overflow-y: auto; flex: 1; }
.drawer__foot {
  padding: 16px 22px; border-top: 1px solid var(--line);
  display: flex; gap: 10px; flex-wrap: wrap; background: #fafdff;
}

/* ------------------------------ 个人页 ------------------------------ */
.profile-hero {
  background: linear-gradient(120deg, var(--deep), var(--sea) 65%, var(--sea-light));
  color: #fff; border-radius: var(--radius-lg); padding: 28px;
  display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
  box-shadow: var(--shadow);
}
.profile-hero__avatar {
  width: 86px; height: 86px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-size: 30px; font-weight: 800;
  background: rgba(255, 255, 255, 0.18); border: 2px solid rgba(255, 255, 255, 0.5);
}
.profile-hero__name { margin: 0 0 4px; font-size: 24px; }
.profile-hero__meta { margin: 0; font-size: 13.8px; color: rgba(255, 255, 255, 0.86); }

.stat-grid { display: grid; gap: 16px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow-sm);
}
.stat__num {
  font-size: 27px; font-weight: 800; letter-spacing: 0.5px;
  background: linear-gradient(120deg, var(--primary), var(--sea-light));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat__label { font-size: 13px; color: var(--ink-3); }

.panel {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); overflow: hidden;
}
.panel__head {
  padding: 16px 20px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.panel__head h3 { margin: 0; font-size: 17px; }
.panel__head .hint { font-size: 12.6px; color: var(--ink-3); }
.panel__body { padding: 20px; }

.progress {
  height: 9px; border-radius: 999px; background: #eaf2f9; overflow: hidden;
}
.progress__bar {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--sea), var(--cyan));
  transition: width 0.4s ease;
}

.plan-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 4px;
  border-bottom: 1px dashed var(--line);
}
.plan-item:last-child { border-bottom: 0; }
.plan-item__check {
  width: 22px; height: 22px; border-radius: 7px; border: 2px solid var(--line);
  flex: none; display: grid; place-items: center; font-size: 12px; color: #fff;
  transition: all 0.16s; cursor: pointer; background: #fff;
}
.plan-item__check.is-done { background: var(--primary); border-color: var(--primary); }
.plan-item.is-done .plan-item__text { text-decoration: line-through; color: var(--ink-3); }
.plan-item__text { font-size: 14.4px; flex: 1; }
.plan-item__tag { font-size: 12px; }

.timeline { position: relative; padding-left: 22px; }
.timeline::before {
  content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px;
  width: 2px; border-radius: 2px; background: var(--line);
}
.timeline__item { position: relative; padding: 0 0 16px 0; }
.timeline__item::before {
  content: ""; position: absolute; left: -20px; top: 8px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft);
}
.timeline__time { font-size: 12.4px; color: var(--ink-3); }
.timeline__text { font-size: 14.3px; margin: 2px 0 0; }

.empty {
  text-align: center; padding: 40px 18px; color: var(--ink-3);
  border: 1px dashed var(--line); border-radius: var(--radius); background: #fbfdff;
}
.empty__icon { font-size: 34px; margin-bottom: 8px; }

/* ------------------------------ 表单 ------------------------------ */
.form-grid { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.field input, .field select, .field textarea {
  padding: 10px 13px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: #f8fbfe; outline: none;
  transition: border-color 0.16s, box-shadow 0.16s;
}
.field textarea { min-height: 92px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--primary); background: #fff; box-shadow: 0 0 0 4px var(--primary-glow);
}

.toast {
  position: fixed; left: 50%; bottom: 34px; transform: translate(-50%, 24px);
  background: var(--deep); color: #fff; padding: 11px 22px; border-radius: 999px;
  font-size: 14px; box-shadow: var(--shadow-lg); z-index: 120;
  opacity: 0; pointer-events: none; transition: all 0.24s;
}
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }

/* ------------------------------ 页脚 ------------------------------ */
.footer {
  margin-top: 40px; padding: 44px 0 96px; color: rgba(255, 255, 255, 0.82);
  background: linear-gradient(180deg, var(--deep-2), #041c33);
}
.footer__grid {
  display: grid; gap: 26px; grid-template-columns: 1.5fr 1fr 1fr 1fr;
  padding-bottom: 26px; border-bottom: 1px solid rgba(255, 255, 255, 0.13);
}
.footer h4 { margin: 0 0 12px; font-size: 15px; color: #fff; }
.footer p { margin: 0 0 8px; font-size: 13.6px; }
.footer a { font-size: 13.6px; color: rgba(255, 255, 255, 0.82); display: block; padding: 4px 0; }
.footer a:hover { color: var(--cyan); }
.footer__bottom {
  padding-top: 18px; display: flex; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; font-size: 12.8px; color: rgba(255, 255, 255, 0.6);
}

/* ------------------------------ 首页专用 ------------------------------ */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background: linear-gradient(125deg, #041f39 0%, var(--deep) 34%, var(--sea) 72%, var(--sea-light) 100%);
  padding: 68px 0 76px;
}
.hero__inner {
  position: relative; z-index: 3;
  display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 40px; align-items: center;
}
.hero__tag {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 15px;
  border-radius: 999px; background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.3); font-size: 13px; letter-spacing: 1.6px;
}
.hero h1 {
  margin: 20px 0 8px; font-size: clamp(32px, 5vw, 54px); line-height: 1.16;
  letter-spacing: 2px;
}
.hero h1 .accent {
  background: linear-gradient(100deg, var(--cyan), #a8ecff 55%, var(--gold));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__slogan { margin: 0 0 14px; font-size: 17px; letter-spacing: 3px; color: rgba(255, 255, 255, 0.9); }
.hero__desc { margin: 0 0 26px; max-width: 620px; color: rgba(255, 255, 255, 0.84); }
.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero__stats {
  display: flex; gap: 34px; flex-wrap: wrap; margin-top: 34px;
  padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, 0.16);
}
.hero__stat b { display: block; font-size: 26px; letter-spacing: 1px; }
.hero__stat span { font-size: 13px; color: rgba(255, 255, 255, 0.72); }

.hero__art { position: relative; }
.hero__art-card {
  background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius-lg); padding: 22px; backdrop-filter: blur(6px);
  box-shadow: var(--shadow-lg);
}
.hero__art-card h3 { margin: 0 0 14px; font-size: 16px; letter-spacing: 1px; }
.hero__art-list li {
  display: flex; align-items: center; gap: 10px; padding: 9px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.16); font-size: 14px;
}
.hero__art-list li:last-child { border-bottom: 0; }
.hero__art-list .dot {
  width: 8px; height: 8px; border-radius: 50%; flex: none;
  background: var(--cyan); box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.2);
}
.hero__art-list .when { margin-left: auto; font-size: 12.4px; color: rgba(255, 255, 255, 0.7); }

.hero__wave { position: absolute; left: 0; right: 0; bottom: -2px; z-index: 2; width: 100%; }
.hero__bird { position: absolute; right: 6%; top: 12%; z-index: 2; opacity: 0.9; }
.hero__glow {
  position: absolute; border-radius: 50%; z-index: 1;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.34), transparent 66%);
}
.hero__glow--a { width: 520px; height: 520px; right: -140px; top: -180px; }
.hero__glow--b { width: 380px; height: 380px; left: -160px; bottom: -160px;
  background: radial-gradient(circle, rgba(246, 166, 35, 0.22), transparent 66%); }

.entry-grid { display: grid; gap: 20px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.entry {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px 20px; box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}
.entry:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.entry::after {
  content: ""; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px;
  border-radius: 50%; background: var(--sky); opacity: 0.8; transition: transform 0.3s;
}
.entry:hover::after { transform: scale(1.16); }
.entry__icon {
  position: relative; z-index: 2; width: 52px; height: 52px; border-radius: 15px;
  display: grid; place-items: center; font-size: 25px; margin-bottom: 14px;
  background: linear-gradient(140deg, var(--primary-soft), #fff);
  border: 1px solid var(--line);
}
.entry h3 { position: relative; z-index: 2; margin: 0 0 8px; font-size: 17.5px; }
.entry p { position: relative; z-index: 2; margin: 0 0 14px; font-size: 13.8px; color: var(--ink-3); }
.entry__more { position: relative; z-index: 2; font-size: 13.4px; font-weight: 800; color: var(--primary); }

.marquee {
  overflow: hidden; background: #fff; border-block: 1px solid var(--line);
  padding: 12px 0;
}
.marquee__track {
  display: flex; gap: 40px; white-space: nowrap; width: max-content;
  animation: slide 34s linear infinite;
}
.marquee__track span { font-size: 13.6px; color: var(--ink-2); }
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes slide { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.steps { display: grid; gap: 18px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.step {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow-sm); position: relative;
}
.step__num {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  font-weight: 800; color: #fff; margin-bottom: 12px;
  background: linear-gradient(140deg, var(--sea), var(--cyan));
}
.step h3 { margin: 0 0 6px; font-size: 16.5px; }
.step p { margin: 0; font-size: 13.7px; color: var(--ink-3); }

.cta {
  border-radius: var(--radius-lg); padding: 38px; color: #fff; text-align: center;
  background: linear-gradient(120deg, var(--deep), var(--sea) 70%, var(--sea-light));
  box-shadow: var(--shadow-lg);
}
.cta h2 { margin: 0 0 10px; font-size: clamp(20px, 2.6vw, 28px); letter-spacing: 1px; }
.cta p { margin: 0 0 22px; color: rgba(255, 255, 255, 0.86); }
.cta__actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ------------------------------ 响应式 ------------------------------ */
@media (max-width: 1024px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__art { order: 2; }
  .grid--4, .entry-grid, .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--3, .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 780px) {
  .nav {
    position: fixed; inset: var(--nav-h) 0 auto 0; flex-direction: column;
    align-items: stretch; gap: 6px; padding: 14px 5vw 20px;
    background: #fff; border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow); margin-left: 0;
    transform: translateY(-130%); transition: transform 0.24s; z-index: 55;
  }
  .nav.is-open { transform: none; }
  .nav__link { padding: 12px 16px; border-radius: 12px; }
  .nav__link.is-active::after { display: none; }
  .nav-toggle { display: flex; }
  .brand__sub { display: none; }

  .grid--2, .grid--3, .grid--4, .entry-grid, .steps, .stat-grid,
  .form-grid { grid-template-columns: 1fr; }
  .item { flex-direction: column; }
  .item__side { align-items: flex-start; flex-direction: row; }
  .footer__grid { grid-template-columns: 1fr; }
  .section { padding: 44px 0; }
  .zone { padding: 18px; }
  .grade-switch--float { right: 12px; bottom: 14px; }
}

@media print {
  .topbar, .footer, .drawer, .drawer-mask, .grade-switch--float { display: none !important; }
}

/* ==========================================================================
   追加样式：四类课程 / 资料管理 / 名师在线编辑 / 学生成长记录
   ========================================================================== */

.select {
  padding: 10px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: #f8fbfe; color: var(--ink); outline: none; max-width: 100%;
}
.select:focus { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 4px var(--primary-glow); }

.chip-row { display: flex; gap: 8px; flex-wrap: wrap; }

.hint { font-size: 12.8px; color: var(--ink-3); }

.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 11px;
  border-radius: 999px; font-size: 12.4px; font-weight: 700;
  background: #eef4fa; color: var(--ink-2); border: 1px solid var(--line);
}
.badge--on { background: #e3f7ec; color: #17794a; border-color: #bfe8d2; }
.badge--warn { background: var(--gold-soft); color: #a86a00; border-color: #f2d59a; }

.notice {
  border: 1px solid var(--line); border-left: 4px solid var(--sea-light);
  background: #f7fbfe; border-radius: 0 var(--radius) var(--radius) 0;
  padding: 14px 18px; font-size: 13.8px; color: var(--ink-2); line-height: 1.75;
}
.notice--ok { border-left-color: #2fb27a; background: #f4fcf8; }
.notice--warn { border-left-color: var(--gold); background: #fffaf1; }
.notice code, .deploy-list code { background: #eef4fa; padding: 1px 6px; border-radius: 5px; font-size: 12.6px; }

.deploy-list { margin: 10px 0 0; padding-left: 20px; display: grid; gap: 8px; }
.deploy-list li { list-style: decimal; }

.nice-list { display: grid; gap: 8px; margin: 0 0 16px; }
.nice-list li { font-size: 14.2px; color: var(--ink-2); }
.drawer__body h4 { margin: 18px 0 8px; font-size: 15.4px; }
.drawer__body h4:first-child { margin-top: 0; }

/* ------------------------------ 四类课程卡片 ------------------------------ */
.subject-card {
  display: block; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s; position: relative; overflow: hidden;
}
.subject-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #c6ddf0; }
.subject-card__icon {
  width: 50px; height: 50px; border-radius: 15px; display: grid; place-items: center;
  font-size: 24px; margin-bottom: 12px;
  background: linear-gradient(140deg, var(--primary-soft), #fff); border: 1px solid var(--line);
}
.subject-card h3 { margin: 0 0 6px; font-size: 17px; }
.subject-card p { margin: 0 0 12px; font-size: 13.4px; color: var(--ink-3); }
.subject-card__count { font-size: 13px; font-weight: 800; color: var(--primary); }

.card__media { display: flex; align-items: center; justify-content: center; gap: 10px; }
.card__icon { font-size: 24px; letter-spacing: 0; }

/* ------------------------------ 名师卡片 ------------------------------ */
.teacher-head { display: flex; gap: 14px; align-items: center; }
.teacher-head__name { margin: 0 0 4px; }
.teacher-card .quote { margin: 6px 0 10px; font-size: 14.2px; }
.teacher-card .card__text { font-size: 13.6px; }

.teacher-view__intro { font-size: 15px; color: var(--ink-2); margin: 14px 0 4px; }
.teacher-view__meta { display: block; margin-top: 14px; }
.points-list { display: grid; gap: 10px; }
.points-list li {
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: #fbfdff;
}
.points-list li b { color: var(--primary); display: block; margin-bottom: 4px; }
.points-list li div { font-size: 14.2px; color: var(--ink-2); margin: 0; }
.cases-list { display: grid; gap: 10px; }
.cases-list li { display: flex; gap: 12px; align-items: flex-start; }
.cases-list__time {
  flex: none; min-width: 76px; font-size: 12.4px; font-weight: 800; color: var(--primary);
  background: var(--primary-soft); border-radius: 999px; padding: 2px 10px; text-align: center;
}
.cases-list li div { font-size: 14.2px; color: var(--ink-2); }

/* ------------------------------ 富文本编辑器 ------------------------------ */
.editor { display: grid; gap: 14px; }
.editor__meta { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.editor__toolbar {
  display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px;
}
.editor__toolbar button {
  padding: 5px 12px; border-radius: 8px; border: 1px solid var(--line);
  background: #f8fbfe; font-size: 12.8px; color: var(--ink-2); font-weight: 600;
}
.editor__toolbar button:hover { border-color: var(--primary); color: var(--primary); background: #fff; }
.editor__preview {
  margin-top: 8px; padding: 10px 12px; border-radius: 10px;
  border: 1px dashed var(--line); background: #fbfdff; font-size: 13.8px; color: var(--ink-2);
  min-height: 20px;
}
.editor__preview:empty { display: none; }
.editor__group { display: grid; gap: 10px; }
.editor__group-head { display: flex; align-items: center; gap: 12px; }
.editor__group-head b { font-size: 14.6px; }
.editor__rows { display: grid; gap: 10px; }
.editor__row {
  display: grid; gap: 8px; grid-template-columns: 150px 1fr 34px;
  align-items: start; border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: #fbfdff;
}
.editor__row--dim { grid-template-columns: 130px 60px 80px 1fr 34px; }
.editor__row input, .editor__row textarea, .editor__row select {
  padding: 8px 11px; border-radius: 8px; border: 1px solid var(--line);
  background: #fff; outline: none; width: 100%; font-size: 13.6px;
}
.editor__row textarea { min-height: 44px; resize: vertical; }
.editor__row-del {
  width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line);
  background: #fff; color: var(--ink-3);
}
.editor__row-del:hover { color: #c0392b; border-color: #f0b6ae; background: #fff5f4; }
.editor__section {
  margin: 22px 0 12px; font-size: 15.4px; display: flex; align-items: center; gap: 12px;
  padding-bottom: 8px; border-bottom: 1px dashed var(--line);
}
.editor__section:first-of-type { margin-top: 0; }

/* ------------------------------ 管理后台 ------------------------------ */
.admin-session { margin-top: 12px !important; font-size: 13.6px; color: rgba(255,255,255,.88); }
.admin-tabs {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 20px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; box-shadow: var(--shadow-sm);
}
.data-table { width: 100%; border-collapse: collapse; font-size: 13.8px; }
.data-table th, .data-table td {
  padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top;
}
.data-table th { background: #f7fbfe; font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table .row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.diff--up { color: #17794a; font-weight: 700; }
.diff--down { color: #c0392b; font-weight: 700; }

/* ------------------------------ 学生成长记录 ------------------------------ */
.profile-hero__meta { font-size: 13.8px; }
.dim { padding: 10px 0; border-bottom: 1px dashed var(--line); }
.dim:last-child { border-bottom: 0; }
.dim__head { display: flex; justify-content: space-between; font-size: 14.2px; margin-bottom: 6px; }
.dim__note { margin: 6px 0 0; font-size: 12.8px; color: var(--ink-3); }
.radar { width: 100%; max-width: 320px; margin: 0 auto; display: block; }

.bar-chart { display: flex; gap: 18px; align-items: flex-end; height: 220px; padding: 10px 4px 0; }
.bar-chart__col { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; }
.bar-chart__value { font-size: 13px; font-weight: 800; color: var(--primary); margin-bottom: 6px; }
.bar-chart__track {
  position: relative; flex: 1; width: 100%; max-width: 54px;
  background: linear-gradient(180deg, #f2f8fe, #fff); border-radius: 10px 10px 4px 4px;
  border: 1px solid var(--line); display: flex; align-items: flex-end; justify-content: center;
}
.bar-chart__bar {
  position: absolute; bottom: 0; width: 62%; border-radius: 8px 8px 0 0;
  background: linear-gradient(180deg, var(--sea-light), var(--sea));
}
.bar-chart__avg {
  position: absolute; bottom: 0; width: 90%; border-radius: 6px 6px 0 0;
  background: rgba(47, 155, 216, 0.18); border: 1px dashed rgba(47, 155, 216, 0.5);
}
.bar-chart__label { margin-top: 8px; font-size: 12.4px; color: var(--ink-3); text-align: center; }

.timeline__desc { margin: 2px 0 0; font-size: 13.6px; color: var(--ink-3); }

.honor-list { display: grid; gap: 12px; }
.honor-list li { display: flex; gap: 12px; align-items: flex-start; }
.honor-list__level {
  flex: none; font-size: 12.2px; font-weight: 800; color: #a86a00;
  background: var(--gold-soft); border-radius: 999px; padding: 2px 10px;
}
.honor-list li b { font-size: 14.4px; }
.honor-list__date { margin-left: 8px; font-size: 12.4px; color: var(--ink-3); }
.honor-list__note { margin: 3px 0 0; font-size: 13.2px; color: var(--ink-3); }

.comment-list { display: grid; gap: 14px; }
.comment { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: #fbfdff; }
.comment__head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.comment__head b { font-size: 14.4px; }
.comment__date { margin-left: auto; font-size: 12.4px; color: var(--ink-3); }
.comment__text { margin: 8px 0 0; font-size: 13.8px; color: var(--ink-2); }

.reflect { padding: 12px 0; border-bottom: 1px dashed var(--line); }
.reflect:last-child { border-bottom: 0; }
.reflect h4 { margin: 0 0 6px; font-size: 14.2px; color: var(--primary); }
.reflect p { margin: 0; font-size: 14px; color: var(--ink-2); }
.reflect--next { background: var(--primary-soft); border-radius: 12px; padding: 12px 14px; border-bottom: 0; }

.item--mine { border-color: #f2d59a; background: linear-gradient(180deg, #fffdf7, #fff); }

/* 提示条（成功 / 失败） */
.toast--error { background: #a33224; }
.toast--ok { background: var(--deep); }

@media (max-width: 1024px) {
  .editor__row, .editor__row--dim { grid-template-columns: 1fr 1fr; }
  .editor__row-del { grid-column: span 2; justify-self: end; }
  .editor__meta { grid-template-columns: 1fr; }
}

@media (max-width: 780px) {
  .bar-chart { gap: 8px; height: 180px; }
  .editor__row, .editor__row--dim { grid-template-columns: 1fr; }
  .editor__row-del { grid-column: auto; justify-self: end; }
  .data-table { display: block; overflow-x: auto; white-space: nowrap; }
}

/* ==========================================================================
   追加样式：两级分类 / 视频权限 / 卡片角标 / 代码片段
   ========================================================================== */

/* 课程封面上的权限角标 */
.card__media { position: relative; }
.card__badge {
  position: absolute; right: 12px; bottom: 10px; z-index: 2;
  padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700;
  background: rgba(255, 255, 255, 0.2); color: #fff; border: 1px solid rgba(255, 255, 255, 0.45);
  letter-spacing: 0.4px;
}
.card__badge--on { background: rgba(255, 255, 255, 0.92); color: #17794a; border-color: #fff; }

/* 「无权限观看」提示块 */
.deny {
  text-align: center; padding: 22px 18px; border-radius: var(--radius);
  border: 1px dashed #e6c07a; background: linear-gradient(180deg, #fffaf1, #fff);
}
.deny--inline { text-align: left; margin-bottom: 6px; }
.deny__icon { font-size: 34px; line-height: 1; }
.deny__title { margin: 10px 0 8px; font-size: 19px; color: #a86a00; letter-spacing: 1px; }
.deny__text { margin: 0; font-size: 14px; color: var(--ink-2); }
.deny__meta { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 14px; }

/* 视频就绪区 */
.video-box { display: grid; gap: 12px; }
.video-box__frame {
  height: 168px; border-radius: var(--radius); display: grid; place-items: center; gap: 6px;
  background: linear-gradient(135deg, var(--deep), var(--sea-light)); color: #fff; text-align: center;
}
.video-box__frame p { margin: 0; font-size: 13.4px; color: rgba(255, 255, 255, 0.85); }
.video-box__play {
  width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.22); border: 2px solid rgba(255, 255, 255, 0.6); font-size: 20px;
}

/* 无权限按钮（灰色，但仍可点击查看提示） */
.btn--muted {
  background: #f1f5f9; color: var(--ink-2); border: 1px solid var(--line);
}
.btn--muted:hover { background: #e8eef5; color: var(--ink); }

/* 代码片段（给维护者看的格式示例） */
.code-block {
  margin: 12px 0 0; padding: 14px; border-radius: var(--radius-sm);
  background: #0b2136; color: #cfe8ff; font-size: 12.4px; line-height: 1.7;
  overflow-x: auto; white-space: pre-wrap; word-break: break-all;
}

/* 二级分类行：为空时不占位置 */
.chip-row:empty { display: none; }

/* ==========================================================================
   移动端适配（手机优先修复）
   断点：1024 平板横屏 / 900 折叠屏与小笔记本 / 780 手机横屏与小平板竖屏 /
         560 常见手机竖屏（iPhone 15 等 390—430px 宽）/ 380 超窄屏
   ========================================================================== */

/* 触控与滚动体验基础设置 */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { overflow-x: hidden; }
img, svg, table { max-width: 100%; }

/* 所有横向按钮组：手机上可横向滑动，避免挤压换行 */
@media (max-width: 780px) {
  .chip-row {
    display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 8px;
    padding-bottom: 6px; margin-inline: -4px; padding-inline: 4px;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .chip-row::-webkit-scrollbar { display: none; }
  .chip { flex: 0 0 auto; }
  .filter-row { align-items: flex-start; }
  .filter-row__label { min-width: 74px; padding-top: 6px; }
}

/* 表格：手机上横向滚动，首列不塌陷 */
.table-scroll { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 780px) {
  .table-scroll .data-table { min-width: 640px; }
  .data-table th, .data-table td { padding: 9px 10px; }
}

/* 抽屉：手机上占满屏幕，底部按钮换行更好点 */
@media (max-width: 780px) {
  .drawer { width: 100%; border-radius: 0; }
  .drawer__head { padding: 16px 16px; }
  .drawer__head h3 { font-size: 17px; }
  .drawer__body { padding: 16px; }
  .drawer__foot {
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
    gap: 8px;
  }
  .drawer__foot .btn { flex: 1 1 auto; justify-content: center; }
}

/* 首屏与页头：手机上收紧留白，标题字号收一档 */
@media (max-width: 780px) {
  .hero { padding: 40px 0 60px; }
  .hero h1 { font-size: clamp(26px, 8vw, 34px); letter-spacing: 1px; }
  .hero__slogan { font-size: 14px; letter-spacing: 2px; }
  .hero__desc { font-size: 14.6px; }
  .hero__stats { gap: 20px; margin-top: 24px; padding-top: 18px; }
  .hero__stat b { font-size: 22px; }
  .hero__stat span { font-size: 12.4px; }
  .hero__art-card { padding: 16px; }
  .hero__art-card h3 { font-size: 15px; }
  .hero__art-list li { font-size: 13.4px; flex-wrap: wrap; }
  .hero__bird { display: none; }

  .page-head { padding: 32px 0 38px; }
  .page-head h1 { font-size: clamp(21px, 6.4vw, 27px); line-height: 1.35; }
  .page-head p { font-size: 14.2px; }
  .page-head__actions { gap: 10px; }
  .page-head__actions .btn { flex: 1 1 auto; }
}

/* 卡片与列表：手机上单列、图片区收矮、操作按钮更好点 */
@media (max-width: 780px) {
  .section { padding: 34px 0; }
  .section--tight { padding: 24px 0; }
  .section-title { font-size: clamp(19px, 5.4vw, 23px); }
  .section-desc { font-size: 13.8px; }

  .card__media { height: 96px; font-size: 24px; }
  .card__body { padding: 14px; gap: 8px; }
  .card__title { font-size: 16.4px; }
  .card__text { font-size: 13.6px; }
  .card__icon { font-size: 20px; }
  .card__badge { right: 10px; bottom: 8px; font-size: 11.4px; padding: 2px 8px; }
  .card__foot { font-size: 12.4px; flex-wrap: wrap; }

  .item { padding: 14px; gap: 12px; }
  .item__icon { width: 46px; height: 46px; font-size: 20px; border-radius: 13px; }
  .item__title { font-size: 15.4px; }
  .item__side { width: 100%; }
  .item__side .btn { flex: 1 1 auto; justify-content: center; }

  .entry { padding: 18px 16px; }
  .entry h3 { font-size: 16.4px; }
  .entry p { font-size: 13.4px; }

  .step { padding: 18px; }
  .zone { padding: 16px; }
  .zone__head { gap: 10px; padding-bottom: 14px; margin-bottom: 16px; }
  .zone__badge { width: 44px; height: 44px; font-size: 13px; border-radius: 13px; }
  .zone__title { font-size: 17px; }
  .zone__count { margin-left: 0; font-size: 12.4px; }

  .filters { padding: 14px; gap: 12px; }
  .select, .search-box input { font-size: 15px; }  /* 15px 以上可避免 iOS 聚焦缩放 */
  .search-box { min-width: 100%; }
  .result-bar { font-size: 12.8px; }
}

/* 筛选栏里的说明文字与二维码级别的细节：手机上隐藏次要信息 */
@media (max-width: 560px) {
  .filters .hint { display: none; }
  .marquee__track span { font-size: 12.6px; }
  .marquee { padding: 10px 0; }

  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .stat { padding: 14px; }
  .stat__num { font-size: 22px; }
  .stat__label { font-size: 12.2px; }

  .profile-hero { padding: 20px; gap: 16px; }
  .profile-hero__avatar { width: 64px; height: 64px; font-size: 24px; }
  .profile-hero__name { font-size: 20px; }
  .profile-hero__meta { font-size: 13px; }
  .profile-hero > div[style*="text-align:right"] { text-align: left !important; width: 100%; }

  .panel__head { padding: 13px 15px; }
  .panel__body { padding: 15px; }

  .bar-chart { gap: 6px; height: 160px; }
  .bar-chart__value { font-size: 12px; }
  .bar-chart__label { font-size: 11px; }

  .points-list li, .cases-list li div { font-size: 13.6px; }
  .cases-list li { flex-direction: column; gap: 6px; }
  .cases-list__time { min-width: 0; }

  .exp-card__topic { font-size: 16px; }
  .exp-card__gist { font-size: 13.6px; }
  .editor__row { padding: 9px; }

  .footer { padding: 32px 0 84px; }
  .footer h4 { font-size: 14.4px; }
  .footer a, .footer p { font-size: 13.2px; }
  .footer__bottom { font-size: 12px; }

  .cta { padding: 24px 18px; }
  .cta h2 { font-size: 19px; }
  .cta__actions .btn { flex: 1 1 100%; }
}

/* 超窄屏（旧机型 / 分屏）：进一步压缩 */
@media (max-width: 380px) {
  .wrap { width: 94vw; }
  .brand__title { font-size: 16.4px; }
  .nav__link { font-size: 14.4px; }
  .chip { padding: 5px 11px; font-size: 12.6px; }
  .btn { padding: 10px 16px; font-size: 14.2px; }
  .btn--sm { padding: 7px 12px; font-size: 12.8px; }
  .hero h1 { font-size: 24px; }
}

/* 横屏手机：减少竖向留白，避免内容被折行挤压 */
@media (max-height: 520px) and (orientation: landscape) {
  .hero { padding: 26px 0 44px; }
  .hero__stats { display: none; }
  .page-head { padding: 22px 0 26px; }
  .section { padding: 26px 0; }
}

/* 支持刘海屏安全区 */
@supports (padding: max(0px)) {
  .topbar__inner { padding-left: max(0px, env(safe-area-inset-left)); padding-right: max(0px, env(safe-area-inset-right)); }
  .grade-switch--float {
    right: calc(12px + env(safe-area-inset-right, 0px));
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  }
}

/* 触控设备：按钮最小点击区 44px，去掉 hover 位移以免误触 */
@media (hover: none) and (pointer: coarse) {
  .btn { min-height: 44px; }
  .chip { min-height: 38px; display: inline-flex; align-items: center; }
  .nav__link { min-height: 44px; display: flex; align-items: center; }
  .card:hover, .entry:hover, .item:hover, .subject-card:hover { transform: none; }
  .btn:active { transform: scale(0.98); }
}

/* ==========================================================================
   经验卡片（主题制）：标题是经验主题，供稿人在底部
   ========================================================================== */
.exp-card__topic {
  margin: 0; font-size: 17.4px; font-weight: 800; line-height: 1.45; letter-spacing: 0.2px;
}
.exp-card__gist {
  margin: 0; font-size: 14.2px; color: var(--primary); font-weight: 700;
}
.exp-card__gist::before { content: "结论："; color: var(--ink-3); font-weight: 600; }
.exp-card__intro { margin: 0; }
.exp-card__foot { align-items: center; }
.exp-card__author { font-size: 12.6px; color: var(--ink-3); white-space: nowrap; }

@media (max-width: 780px) {
  .exp-card__foot { flex-wrap: wrap; gap: 8px; }
  .exp-card__author { white-space: normal; }
}

/* ==========================================================================
   追加样式：技术主题页（三层 / 路线 / 媒体）与资料新分类
   ========================================================================== */

/* 三层概览卡 */
.layer-card { display: flex; flex-direction: column; }
.layer-card__count {
  margin: 10px 0 12px; font-size: 13.4px; font-weight: 800; color: var(--primary);
}
.layer-card .btn { margin-top: auto; align-self: flex-start; }

/* 按周路线 */
.route {
  border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
  box-shadow: var(--shadow-sm); padding: 22px; margin-bottom: 22px;
}
.route__head { padding-bottom: 14px; border-bottom: 1px dashed var(--line); margin-bottom: 18px; }
.route__head h3 { margin: 0 0 8px; font-size: 20px; }
.route__head p { margin: 0 0 10px; color: var(--ink-2); font-size: 14.2px; }
.route__track { margin-bottom: 20px; }
.route__track:last-child { margin-bottom: 0; }
.route__track-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.route__track-head b { font-size: 16px; }
.route__weeks { display: grid; gap: 14px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.week-card {
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px;
  background: linear-gradient(180deg, #f8fbfe, #fff); display: flex; flex-direction: column; gap: 10px;
}
.week-card__num {
  align-self: flex-start; padding: 2px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 800; color: #fff;
  background: linear-gradient(120deg, var(--primary), var(--sea-light));
}
.week-card h4 { margin: 0; font-size: 15.4px; line-height: 1.4; }
.week-card__row { font-size: 13.4px; }
.week-card__label {
  display: inline-block; min-width: 34px; font-weight: 800; color: var(--primary); font-size: 12.4px;
}
.week-card__row ul { margin: 4px 0 0; padding-left: 18px; display: grid; gap: 3px; }
.week-card__row li { list-style: disc; color: var(--ink-2); }
.week-card__extra {
  margin-top: auto; padding: 8px 10px; border-radius: 8px; background: var(--gold-soft);
  font-size: 12.6px; color: #87561a;
}
.week-card__extra b { display: block; margin-bottom: 2px; }
.route__advanced {
  margin-top: 4px; padding: 14px 16px; border-radius: var(--radius-sm);
  background: var(--primary-soft); font-size: 13.6px;
}
.route__advanced b { display: block; margin-bottom: 6px; color: var(--primary); }
.route__advanced ul { padding-left: 18px; display: grid; gap: 4px; }
.route__advanced li { list-style: disc; }

/* 图集 */
.media-card { margin: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; box-shadow: var(--shadow-sm); }
.media-card__frame {
  height: 168px; display: grid; place-items: center; background: #f2f7fc; overflow: hidden;
}
.media-card__img { width: 100%; height: 100%; object-fit: contain; padding: 10px; }
.img--broken {
  width: 100%; height: 100%; background: #eef3f8;
  background-image: linear-gradient(135deg, #e6eef6 25%, #f4f8fb 25%, #f4f8fc 50%, #e6eef6 50%, #e6eef6 75%, #f4f8fc 75%);
  background-size: 18px 18px; color: transparent;
}
.media-card figcaption { padding: 14px; font-size: 13.4px; }
.media-card figcaption b { font-size: 14.6px; }
.media-card figcaption p { margin: 6px 0 8px; color: var(--ink-3); }
.media-card__src { font-size: 11.8px; color: var(--ink-3); }

/* 视频卡 */
.video-card {
  border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
  box-shadow: var(--shadow-sm); padding: 16px; display: flex; flex-direction: column; gap: 8px;
}
.video-card__frame {
  position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: var(--radius-sm);
  overflow: hidden; background: linear-gradient(135deg, var(--deep), var(--sea-light));
}
.video-card__frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.video-card__frame--link { display: grid; place-items: center; color: #fff; text-align: center; gap: 4px; }
.video-card__frame--link span { font-size: 30px; }
.video-card__frame--link p { margin: 0; font-size: 13px; color: rgba(255,255,255,.85); }
.video-card h4 { margin: 4px 0 0; font-size: 15.4px; }
.video-card p { margin: 0; font-size: 13.4px; color: var(--ink-2); }

/* 内容块 */
.block-p { margin: 10px 0; font-size: 14.4px; color: var(--ink-2); line-height: 1.8; }
.block-list { display: grid; gap: 6px; margin: 8px 0 14px; padding-left: 18px; }
.block-list li { list-style: disc; font-size: 14.2px; color: var(--ink-2); }
.outcome-box {
  margin: 14px 0 6px; padding: 12px 14px; border-radius: var(--radius-sm);
  background: var(--primary-soft); font-size: 14px;
}
.outcome-box b { display: block; margin-bottom: 4px; color: var(--primary); }
.outcome-box p { margin: 0; color: var(--ink-2); }
.outcome-box .hint { display: block; margin-top: 6px; }
.card__outcome { margin: 0; font-size: 13.2px; color: var(--primary); font-weight: 600; }
.card__media--tech { background: linear-gradient(135deg, var(--deep), var(--sea)); }

/* 面板内的小条目（相关经验 / 资料） */
.mini-item {
  padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: #fbfdff; cursor: pointer; transition: border-color 0.16s, background 0.16s;
}
.mini-item + .mini-item { margin-top: 10px; }
.mini-item:hover { border-color: var(--primary); background: #fff; }
.mini-item b { font-size: 14.6px; }
.mini-item p { margin: 6px 0; font-size: 13.4px; color: var(--ink-3); }

/* 响应式：路线的周卡在窄屏改成单列 */
@media (max-width: 1024px) {
  .route__weeks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 780px) {
  .route { padding: 16px; }
  .route__weeks { grid-template-columns: 1fr; }
  .route__head h3 { font-size: 17px; }
  .media-card__frame { height: 140px; }
  .video-card { padding: 12px; }
}
