:root {
  color-scheme: light;
  --accent: #1677c8;
  --accent-strong: #0c5e9f;
  --accent-soft: #dff2ff;
  --accent-pale: #f1f9ff;
  --surface: #ffffff;
  --surface-muted: #f4f8fb;
  --text: #17202a;
  --text-muted: #5a6875;
  --border: #cfe1ed;
  --danger: #b42318;
  --success: #137a49;
  --shadow: 0 14px 38px rgba(35, 111, 164, 0.12);
  --radius: 16px;
  --font:
    "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC",
    system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: #eaf5fc;
  font-family: var(--font);
  -webkit-text-size-adjust: 100%;
}

body {
  min-width: 320px;
  min-height: 100dvh;
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(180deg, #dff2ff 0, #eef8fe 280px, #f6fafc 680px),
    var(--surface-muted);
  font-family: var(--font);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 4px solid rgba(22, 119, 200, 0.24);
  outline-offset: 2px;
}

button:active {
  transform: scale(0.98);
}

.app-shell {
  width: min(100%, 540px);
  min-height: 100dvh;
  margin: 0 auto;
  padding:
    max(16px, env(safe-area-inset-top))
    16px
    calc(34px + env(safe-area-inset-bottom));
}

.wide-shell {
  width: min(1180px, calc(100% - 32px));
  min-height: 100dvh;
  margin: 0 auto;
  padding: 24px 0 48px;
}

.brand-header {
  display: grid;
  grid-template-columns: 58px 1fr auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.brand-mark {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border: 3px solid rgba(255, 255, 255, 0.9);
  border-radius: 16px;
  background: var(--accent);
  box-shadow: 0 10px 24px rgba(22, 119, 200, 0.22);
  color: #fff;
  font-size: 21px;
  font-weight: 900;
  letter-spacing: -1px;
}

.brand-copy h1,
.brand-copy p,
.page-title,
.page-subtitle,
.section-title,
.card-title,
.card-copy,
.lesson-title,
.lesson-meta,
.status-copy,
.empty-copy {
  margin: 0;
}

.brand-copy h1 {
  font-size: 25px;
  font-weight: 900;
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.brand-copy p {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 16px;
  font-weight: 700;
}

.header-action,
.icon-button {
  min-width: 48px;
  min-height: 48px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--accent-strong);
  font-size: 18px;
  font-weight: 900;
}

.context-panel,
.panel,
.entry-card,
.video-panel {
  border: 1px solid rgba(207, 225, 237, 0.95);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.context-panel {
  display: grid;
  grid-template-columns: 1fr 1.45fr;
  gap: 10px;
  padding: 12px;
}

.context-control {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.context-control span {
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 800;
}

.context-control select,
.context-control button,
.form-control {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--accent-pale);
  color: var(--text);
  font-size: 17px;
  font-weight: 800;
}

.context-control button {
  overflow: hidden;
  padding: 0 12px;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.subject-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 18px 0;
}

.subject-button {
  min-height: 92px;
  padding: 14px 8px;
  border: 2px solid #b7d7ea;
  border-radius: var(--radius);
  background: #eef8fe;
  color: var(--accent-strong);
  font-size: 24px;
  font-weight: 950;
  line-height: 1.2;
  text-align: center;
  box-shadow: 0 8px 20px rgba(49, 124, 174, 0.09);
}

.subject-button[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.subject-button[hidden] {
  display: none;
}

.course-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 18px 2px 12px;
}

.page-title {
  font-size: 26px;
  font-weight: 950;
}

.page-subtitle {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 16px;
  font-weight: 700;
}

.module-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.module-grid.single {
  grid-template-columns: 1fr;
}

.module-button {
  display: grid;
  min-height: 96px;
  place-items: center;
  padding: 14px;
  border: 1px solid #a9d1e9;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-size: 23px;
  font-weight: 950;
  text-align: center;
  box-shadow: 0 9px 22px rgba(39, 111, 159, 0.08);
}

.module-button strong {
  display: block;
}

.module-button small {
  display: block;
  margin-top: 7px;
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 700;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px 8px;
  margin-top: 18px;
}

.quick-button {
  min-height: 66px;
  padding: 8px 5px;
  border: 1px solid #b8d7e9;
  border-radius: 14px;
  background: #fff;
  color: #244356;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.25;
}

.quick-button.quiz {
  width: 88px;
  height: 88px;
  min-height: 88px;
  align-self: center;
  justify-self: center;
  border: 5px solid #fff;
  border-radius: 50%;
  background: var(--accent);
  box-shadow:
    0 0 0 2px var(--accent),
    0 12px 28px rgba(22, 119, 200, 0.25);
  color: #fff;
  font-size: 22px;
}

.quick-spacer {
  min-height: 66px;
}

.back-row {
  display: grid;
  grid-template-columns: 50px 1fr 50px;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  text-align: center;
}

.back-row h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 950;
}

.list-stack {
  display: grid;
  gap: 12px;
}

.lesson-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 78px;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 8px 20px rgba(39, 111, 159, 0.07);
}

.lesson-main {
  display: grid;
  grid-template-columns: 40px 1fr;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.play-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 18px;
  font-weight: 950;
}

.lesson-title {
  font-size: 19px;
  font-weight: 900;
  line-height: 1.35;
}

.lesson-meta {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 700;
}

.quiz-button,
.primary-button,
.secondary-button,
.danger-button {
  min-height: 48px;
  padding: 0 16px;
  border-radius: 12px;
  font-size: 17px;
  font-weight: 900;
  white-space: nowrap;
}

.primary-button,
.quiz-button {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
}

.secondary-button {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--accent-strong);
}

.danger-button {
  border: 1px solid #f0b7b2;
  background: #fff5f4;
  color: var(--danger);
}

.status-panel {
  padding: 22px 18px;
  text-align: center;
}

.status-number {
  display: block;
  color: var(--accent-strong);
  font-size: 44px;
  font-weight: 950;
}

.status-copy {
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 17px;
  font-weight: 700;
}

.video-panel {
  overflow: hidden;
}

.video-frame {
  display: grid;
  width: min(72%, 300px);
  aspect-ratio: 9 / 16;
  margin: 18px auto;
  place-items: center;
  overflow: hidden;
  border-radius: var(--radius);
  background: #142735;
}

.video-frame video {
  width: 100%;
  height: 100%;
  background: #142735;
  object-fit: contain;
}

.video-placeholder {
  padding: 26px;
  color: #fff;
  font-size: 19px;
  font-weight: 800;
  line-height: 1.6;
  text-align: center;
}

.video-copy {
  padding: 0 18px 20px;
}

.video-copy h2 {
  margin: 0;
  font-size: 23px;
  font-weight: 950;
}

.video-copy p {
  margin: 8px 0 0;
  color: var(--text-muted);
  font-size: 16px;
  font-weight: 700;
}

.progress-line {
  height: 10px;
  overflow: hidden;
  margin-top: 16px;
  border-radius: 8px;
  background: #dfeaf1;
}

.progress-line span {
  display: block;
  width: var(--progress, 0%);
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  padding: 18px;
  place-items: center;
  background: rgba(16, 32, 44, 0.52);
}

.modal {
  width: min(100%, 460px);
  max-height: min(86dvh, 760px);
  overflow: auto;
  padding: 20px;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 28px 80px rgba(20, 50, 70, 0.3);
}

.modal h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 950;
}

.modal p {
  margin: 10px 0 0;
  color: var(--text-muted);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.6;
}

.modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}

.region-fields,
.permission-grid {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.region-fields label,
.form-field {
  display: grid;
  gap: 6px;
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 800;
}

.form-control {
  padding: 0 12px;
  background: #fff;
}

.entry-wrap {
  display: grid;
  min-height: calc(100dvh - 40px);
  place-items: center;
}

.entry-card {
  width: 100%;
  padding: 24px;
}

.entry-logo {
  display: grid;
  width: 76px;
  height: 76px;
  margin: 0 auto;
  place-items: center;
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  font-size: 28px;
  font-weight: 950;
}

.entry-card h1 {
  margin: 18px 0 0;
  font-size: 28px;
  font-weight: 950;
  text-align: center;
}

.entry-card p {
  margin: 9px 0 0;
  color: var(--text-muted);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.6;
  text-align: center;
}

.entry-card .primary-button {
  width: 100%;
  min-height: 58px;
  margin-top: 20px;
  font-size: 21px;
}

.trust-line {
  margin-top: 16px;
  color: var(--success);
  font-size: 15px;
  font-weight: 800;
  text-align: center;
}

.footer {
  margin-top: 18px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.7;
  opacity: 0.72;
  text-align: center;
}

.footer a {
  color: inherit;
  text-decoration: none;
}

.footer a:hover,
.footer a:focus-visible {
  color: var(--accent-strong);
  text-decoration: underline;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.admin-header h1 {
  margin: 0;
  font-size: 30px;
  font-weight: 950;
}

.admin-header p {
  margin: 5px 0 0;
  color: var(--text-muted);
  font-size: 16px;
  font-weight: 700;
}

.admin-grid {
  display: grid;
  grid-template-columns: 310px 1fr;
  gap: 18px;
  align-items: start;
}

.panel {
  padding: 18px;
}

.panel h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 950;
}

.panel-description {
  margin: 7px 0 0;
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.6;
}

.form-stack {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.permission-option {
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--accent-pale);
  font-size: 16px;
  font-weight: 800;
}

.permission-option input {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
}

.student-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.student-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(220px, 1.6fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
}

.student-row strong {
  display: block;
  font-size: 18px;
}

.student-row small {
  display: block;
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 700;
}

.permission-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.permission-tag {
  border: 1px solid #b9d5e5;
  padding: 5px 9px;
  border-radius: 8px;
  background: #fff;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.permission-tag.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.student-actions {
  display: flex;
  gap: 8px;
}

.empty-state {
  padding: 38px 18px;
  border: 1px dashed #accdde;
  border-radius: var(--radius);
  background: var(--accent-pale);
  text-align: center;
}

.empty-copy {
  color: var(--text-muted);
  font-size: 17px;
  font-weight: 700;
}

.toast {
  position: fixed;
  z-index: 40;
  right: 18px;
  bottom: 18px;
  max-width: calc(100% - 36px);
  padding: 14px 18px;
  border-radius: 12px;
  background: #17364a;
  color: #fff;
  box-shadow: 0 16px 42px rgba(17, 45, 64, 0.26);
  font-size: 16px;
  font-weight: 800;
}

@media (max-width: 760px) {
  .wide-shell {
    width: min(100%, 540px);
    padding: 16px;
  }

  .admin-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-grid {
    grid-template-columns: 1fr;
  }

  .student-row {
    grid-template-columns: 1fr;
  }

  .student-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

/* 学员学习端严格沿用已确认的小程序版式 */
.learning-shell {
  width: min(100%, 430px);
  padding:
    max(8px, env(safe-area-inset-top))
    2px
    calc(20px + env(safe-area-inset-bottom));
}

.learning-shell > .footer {
  display: block;
}

.mini-page-header {
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  min-height: 44px;
  align-items: center;
  margin-bottom: 10px;
  text-align: center;
}

.mini-page-header h1 {
  margin: 0;
  font-size: 21px;
  font-weight: 900;
}

.mini-back-button,
.mini-info-button {
  display: grid;
  min-width: 42px;
  min-height: 42px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  font-size: 16px;
  font-weight: 900;
}

.inner-page-header {
  grid-template-columns: 82px 1fr 82px;
}

.inner-page-header .mini-back-button {
  display: flex;
  min-width: 76px;
  justify-content: flex-start;
  gap: 3px;
  padding: 0 6px;
  color: var(--accent-strong);
  font-size: 17px;
}

.inner-page-header .mini-back-button span {
  white-space: nowrap;
}

.mini-back-button svg {
  width: 25px;
  height: 25px;
}

.mini-info-button {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--accent-strong);
}

.subject-tabs {
  display: grid;
  grid-template-columns: repeat(var(--subject-count, 4), minmax(0, 1fr));
  margin-bottom: 16px;
}

.subject-tab {
  min-width: 0;
  min-height: 58px;
  padding: 8px 4px;
  border: 1px solid #bdd4e2;
  border-radius: 0;
  background: #fff;
  color: #203746;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.25;
  white-space: normal;
}

.subject-tab[aria-pressed="true"] {
  border-color: #339cff;
  background: #339cff;
  color: #fff;
}

.subject-tab[hidden] {
  display: none;
}

.course-hero {
  position: relative;
  overflow: hidden;
  min-height: 150px;
  margin-bottom: 16px;
  padding: 18px;
  border-radius: 16px;
  background:
    radial-gradient(circle at 88% 28%, rgba(255, 255, 255, 0.24) 0 14%, transparent 15%),
    radial-gradient(circle at 94% 72%, rgba(255, 255, 255, 0.14) 0 27%, transparent 28%),
    linear-gradient(135deg, #339cff, #75baf2);
  color: #fff;
}

.course-hero-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.course-hero-title h2 {
  margin: 0;
  color: inherit;
  font-size: 24px;
  font-weight: 900;
}

.course-hero-icon {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
}

.course-hero-icon svg {
  width: 19px;
  height: 19px;
}

.vehicle-line {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.picker-field {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.picker-field > span {
  font-size: 16px;
  font-weight: 800;
}

.picker-field select,
.location-button {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.94);
  color: #1b3343;
  font-size: 17px;
  font-weight: 800;
}

.picker-field select {
  padding: 0 10px;
}

.location-button {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 5px;
  padding: 0 9px;
  text-align: left;
}

.location-button strong {
  min-width: 0;
  overflow: hidden;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.location-button svg {
  width: 18px;
  height: 18px;
}

.inline-region-panel {
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid #c8dfec;
  border-radius: 16px;
  background: #fff;
}

.inline-region-panel h2 {
  margin: 0 0 12px;
  font-size: 20px;
  font-weight: 900;
}

.inline-region-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.inline-region-grid label {
  display: grid;
  min-width: 0;
  gap: 6px;
  color: #425b6b;
  font-size: 15px;
  font-weight: 800;
}

.inline-region-grid select {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 0 6px;
  border: 1px solid #bed4e1;
  border-radius: 11px;
  background: #fff;
  color: var(--text);
  font-size: 16px;
  font-weight: 800;
}

.inline-region-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.feature-grid.single {
  grid-template-columns: 1fr;
}

.feature-card {
  display: grid;
  grid-template-columns: 1fr auto;
  min-height: 124px;
  align-items: center;
  padding: 18px;
  border: 0;
  border-radius: 16px;
  color: #fff;
  text-align: left;
}

.training-card {
  background: linear-gradient(135deg, #339cff, #74b9f2);
}

.featured-card {
  background: linear-gradient(135deg, #f3883b, #f6b17b);
}

.feature-grid.single .feature-card {
  position: relative;
  display: flex;
  justify-content: center;
  text-align: center;
}

.feature-grid.single .feature-icon {
  position: absolute;
  right: 18px;
}

.feature-card strong,
.feature-card small {
  display: block;
  color: inherit;
}

.feature-card strong {
  font-size: 23px;
  font-weight: 900;
}

.feature-card small {
  margin-top: 6px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.feature-icon {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.24);
}

.feature-icon svg {
  width: 28px;
  height: 28px;
}

.orbit-menu {
  display: grid;
  width: min(100%, 390px);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: 108px 118px 108px;
  align-items: center;
  gap: 6px 10px;
  margin: 2px auto 0;
}

.orbit-button {
  position: relative;
  display: grid;
  width: 100%;
  height: 104px;
  place-content: center;
  justify-items: center;
  gap: 8px;
  padding: 4px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  text-align: center;
}

.orbit-button:nth-child(1) {
  grid-column: 1;
  grid-row: 1;
}

.orbit-button:nth-child(2) {
  grid-column: 2;
  grid-row: 1;
}

.orbit-button:nth-child(3) {
  grid-column: 3;
  grid-row: 1;
}

.orbit-button:nth-child(4) {
  grid-column: 1;
  grid-row: 3;
}

.orbit-button:nth-child(5) {
  grid-column: 2;
  grid-row: 3;
}

.orbit-button:nth-child(6) {
  grid-column: 3;
  grid-row: 3;
}

.orbit-icon {
  display: grid;
  width: 68px;
  height: 68px;
  place-items: center;
  border-radius: 22px;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.3) 0 7px, transparent 8px),
    radial-gradient(circle at 86% 82%, rgba(255, 255, 255, 0.16) 0 12px, transparent 13px),
    #55aaf5;
  color: #fff;
  box-shadow: 0 8px 18px rgba(51, 156, 255, 0.18);
}

.orbit-button:nth-child(2) .orbit-icon {
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.3) 0 7px, transparent 8px),
    radial-gradient(circle at 86% 82%, rgba(255, 255, 255, 0.16) 0 12px, transparent 13px),
    #5dc977;
}

.orbit-button:nth-child(3) .orbit-icon {
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.3) 0 7px, transparent 8px),
    radial-gradient(circle at 86% 82%, rgba(255, 255, 255, 0.16) 0 12px, transparent 13px),
    #eb77b1;
}

.orbit-button:nth-child(4) .orbit-icon {
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.3) 0 7px, transparent 8px),
    radial-gradient(circle at 86% 82%, rgba(255, 255, 255, 0.16) 0 12px, transparent 13px),
    #55aaf5;
}

.orbit-button:nth-child(5) .orbit-icon {
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.3) 0 7px, transparent 8px),
    radial-gradient(circle at 86% 82%, rgba(255, 255, 255, 0.16) 0 12px, transparent 13px),
    #f3883b;
}

.orbit-button:nth-child(6) .orbit-icon {
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.3) 0 7px, transparent 8px),
    radial-gradient(circle at 86% 82%, rgba(255, 255, 255, 0.16) 0 12px, transparent 13px),
    #eb77b1;
}

.orbit-mark {
  display: grid;
  grid-area: 1 / 1;
  place-items: center;
  font-size: 26px;
  font-weight: 950;
  line-height: 1;
}

.orbit-icon > i[data-lucide] {
  display: none;
}

.orbit-icon > svg {
  grid-area: 1 / 1;
}

.orbit-icon.icon-loaded .orbit-mark {
  display: none;
}

.orbit-icon svg {
  width: 31px;
  height: 31px;
}

.orbit-button strong {
  font-size: 16px;
  font-weight: 900;
  line-height: 1.2;
}

.orbit-button.quiz-center {
  grid-column: 2;
  grid-row: 2;
  justify-self: center;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 70% 24%, rgba(255, 255, 255, 0.2), transparent 30%),
    linear-gradient(145deg, #339cff, #1681df);
  color: #fff;
  box-shadow: 0 14px 30px rgba(51, 156, 255, 0.34);
  font-size: 23px;
  font-weight: 900;
}

.orbit-button:active {
  transform: scale(0.98);
}

.lesson-intro {
  margin-bottom: 16px;
  padding: 18px;
  border-radius: 16px;
  background:
    radial-gradient(circle at 90% 12%, rgba(51, 156, 255, 0.2), transparent 34%),
    linear-gradient(180deg, #e4f3ff, #fff 72%);
}

.lesson-intro h2,
.lesson-intro p {
  margin: 0;
}

.lesson-intro h2 {
  font-size: 23px;
  font-weight: 900;
}

.lesson-intro p {
  margin-top: 6px;
  color: #425b6b;
  font-size: 16px;
  font-weight: 700;
}

.paired-lessons,
.vertical-lessons {
  display: grid;
  gap: 12px;
}

.paired-lesson-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.paired-lesson-button,
.paired-quiz-button,
.vertical-lesson-button {
  width: 100%;
  min-height: 68px;
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 18px;
  font-weight: 900;
}

.paired-lesson-button {
  display: grid;
  place-content: center;
  gap: 3px;
  border: 1px solid #9ed0ee;
  background: #dff2ff;
  color: #17384c;
  line-height: 1.2;
  text-align: center;
}

.paired-lesson-name,
.paired-lesson-type {
  display: block;
  white-space: nowrap;
}

.paired-lesson-name {
  font-size: 18px;
}

.paired-lesson-type {
  font-size: 17px;
}

.paired-quiz-button {
  border: 1px solid #339cff;
  background: #339cff;
  color: #fff;
}

.vertical-lesson-button {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  border: 1px solid #c7dce9;
  background: #fff;
  color: var(--text);
  text-align: left;
}

.vertical-lesson-button svg {
  width: 22px;
  height: 22px;
  color: #339cff;
}

.training-quiz-button {
  position: relative;
  display: grid;
  width: 100%;
  min-height: 82px;
  margin-top: 18px;
  place-items: center;
  padding: 14px 62px 14px 22px;
  border: 0;
  border-radius: 20px;
  background: linear-gradient(135deg, #339cff, #5c9ee8);
  color: #fff;
  box-shadow: 0 12px 28px rgba(51, 156, 255, 0.28);
  text-align: center;
}

.training-quiz-button strong,
.training-quiz-button small {
  display: block;
}

.training-quiz-button strong {
  font-size: 24px;
  font-weight: 900;
}

.training-quiz-button small {
  margin-top: 4px;
  font-size: 15px;
  font-weight: 700;
}

.training-quiz-arrow {
  position: absolute;
  right: 16px;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
}

.skill-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.skill-button {
  display: grid;
  min-height: 76px;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border: 1px solid #bed9e9;
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  text-align: left;
}

.skill-button span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  background: #dff2ff;
  color: #0c69ad;
}

.skill-button strong {
  font-size: 16px;
  line-height: 1.3;
}

.mini-video-panel {
  padding-top: 6px;
}

.mini-video-stage {
  display: grid;
  width: min(66%, 250px);
  aspect-ratio: 9 / 16;
  margin: 0 auto 16px;
  overflow: hidden;
  place-items: center;
  border-radius: 16px;
  background:
    radial-gradient(circle at 70% 24%, rgba(51, 156, 255, 0.3), transparent 28%),
    linear-gradient(150deg, #dff2ff, #e5ecf1);
}

.mini-video-stage video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #122431;
}

.mini-video-stage .video-placeholder {
  padding: 18px;
  text-align: center;
}

.mini-video-copy h2,
.mini-video-copy p {
  margin: 0;
}

.mini-video-copy h2 {
  font-size: 23px;
  font-weight: 900;
}

.mini-video-copy p {
  margin-top: 7px;
  color: var(--text-muted);
  font-size: 16px;
  font-weight: 700;
}

/* 手机首页紧凑布局：保留大字，减少固定高度和无效留白。 */
@media (max-width: 480px) {
  .home-shell {
    padding-top: max(4px, env(safe-area-inset-top));
  }

  .home-shell .subject-tabs {
    margin-bottom: 10px;
  }

  .home-shell .subject-tab {
    min-height: 48px;
    padding: 5px 3px;
    font-size: 17px;
  }

  .home-shell .course-hero {
    min-height: 0;
    margin-bottom: 16px;
    padding: 10px 12px;
  }

  .home-shell .course-hero-title h2 {
    font-size: 21px;
  }

  .home-shell .course-hero-icon {
    width: 28px;
    height: 28px;
  }

  .home-shell .vehicle-line {
    gap: 8px;
    margin-top: 9px;
  }

  .home-shell .picker-field {
    gap: 3px;
  }

  .home-shell .picker-field > span {
    font-size: 15px;
  }

  .home-shell .picker-field select,
  .home-shell .location-button {
    min-height: 42px;
    font-size: 16px;
  }

  .home-shell .feature-grid {
    gap: 10px;
    margin-bottom: 20px;
  }

  .home-shell .feature-card {
    min-height: 100px;
    padding: 12px 14px;
  }

  .home-shell .feature-card strong {
    font-size: 23px;
  }

  .home-shell .feature-card small {
    margin-top: 4px;
    font-size: 13px;
  }

  .home-shell .feature-icon {
    width: 52px;
    height: 52px;
  }

  .home-shell .feature-icon svg {
    width: 29px;
    height: 29px;
  }

  .home-shell .orbit-menu {
    width: 100%;
    grid-template-rows: 94px 108px 94px;
    gap: 4px 8px;
    margin-top: 0;
  }

  .home-shell .orbit-button {
    width: 100%;
    height: 92px;
    gap: 5px;
  }

  .home-shell .orbit-icon {
    width: 58px;
    height: 58px;
    border-radius: 18px;
  }

  .home-shell .orbit-icon svg {
    width: 29px;
    height: 29px;
  }

  .home-shell .orbit-button strong {
    font-size: 16px;
  }

  .home-shell .orbit-button.quiz-center {
    width: 104px;
    height: 104px;
    font-size: 23px;
  }

  .home-shell .footer {
    display: none;
  }
}

@media (max-width: 360px) {
  .home-shell .feature-grid,
  .home-shell .vehicle-line {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .home-shell .feature-card {
    grid-template-columns: minmax(0, 1fr) 42px;
    min-height: 96px;
    gap: 4px;
    padding: 10px;
  }

  .home-shell .feature-card strong {
    font-size: 20px;
  }

  .home-shell .feature-card small {
    font-size: 12px;
  }

  .home-shell .feature-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
  }

  .home-shell .feature-icon svg {
    width: 24px;
    height: 24px;
  }

  .home-shell .picker-field > span,
  .home-shell .picker-field select,
  .home-shell .location-button {
    font-size: 15px;
  }

  .inline-region-grid {
    grid-template-columns: 1fr;
  }

  .home-shell .orbit-menu {
    column-gap: 2px;
  }
}

@media (max-width: 380px) {
  .app-shell {
    padding-inline: 12px;
  }

  .brand-header {
    grid-template-columns: 52px 1fr auto;
  }

  .brand-mark {
    width: 52px;
    height: 52px;
    font-size: 19px;
  }

  .brand-copy h1 {
    font-size: 22px;
  }

  .context-panel {
    grid-template-columns: 1fr;
  }

  .subject-button {
    min-height: 82px;
    font-size: 21px;
  }

  .quick-button {
    font-size: 15px;
  }

  .lesson-row {
    grid-template-columns: 1fr;
  }

  .quiz-button {
    width: 100%;
  }
}

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