/* STARNAVI v3 unified experience layer */
:root {
  --space-950: #020617;
  --space-900: #06112b;
  --space-850: #081a3a;
  --surface-1: rgba(7, 22, 57, 0.82);
  --surface-2: rgba(12, 35, 80, 0.78);
  --surface-3: rgba(19, 48, 104, 0.62);
  --line-soft: rgba(102, 187, 255, 0.18);
  --line-strong: rgba(86, 203, 255, 0.5);
  --cyan-300: #70ddff;
  --cyan-400: #2fc9ff;
  --blue-500: #2676ff;
  --violet-400: #9c75ff;
  --gold-300: #ffd76b;
  --gold-400: #ffb82e;
  --green-400: #54e59a;
  --red-400: #ff7185;
  --ink-1: #f4f8ff;
  --ink-2: #b8c9e8;
  --ink-3: #7f96bc;
  --focus-ring: 0 0 0 3px rgba(47, 201, 255, 0.28);
  --shadow-panel: 0 18px 60px rgba(0, 4, 24, 0.52);
  --shadow-cyan: 0 0 34px rgba(47, 201, 255, 0.2);
  --radius-panel: 22px;
}

html {
  color-scheme: dark;
  background: var(--space-950);
}

body,
html {
  min-height: 100%;
  height: auto;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink-1);
  background:
    radial-gradient(circle at 50% -10%, rgba(38, 118, 255, 0.32), transparent 36%),
    radial-gradient(circle at 92% 38%, rgba(111, 63, 255, 0.18), transparent 30%),
    radial-gradient(circle at 8% 78%, rgba(23, 133, 255, 0.15), transparent 26%),
    linear-gradient(180deg, #030718 0%, #06142e 52%, #020817 100%);
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  z-index: 0;
  opacity: 0.72;
  background-image:
    radial-gradient(circle, rgba(255,255,255,.9) 0 1px, transparent 1.5px),
    radial-gradient(circle, rgba(112,221,255,.7) 0 1px, transparent 1.5px);
  background-position: 0 0, 53px 79px;
  background-size: 137px 137px, 193px 193px;
}

body::after {
  z-index: 0;
  background: linear-gradient(90deg, transparent, rgba(47,201,255,.025) 50%, transparent);
}

button,
a,
input,
select,
textarea {
  font: inherit;
}

input,
textarea,
select,
.review-list,
.answer-feedback-analysis {
  user-select: text;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.top-navbar,
.hud-top-battle-bar {
  min-height: 72px;
  padding: 12px clamp(18px, 3vw, 46px);
  border-bottom: 1px solid rgba(112, 221, 255, 0.2);
  background: rgba(2, 8, 26, 0.78);
  backdrop-filter: blur(22px) saturate(150%);
  box-shadow: 0 10px 40px rgba(0, 4, 24, 0.26);
}

.top-navbar {
  position: sticky;
  top: 0;
}

.brand-logo {
  min-width: max-content;
  gap: 12px;
}

.logo-icon {
  font-size: 30px;
}

.logo-text {
  font-size: clamp(17px, 1.5vw, 24px);
  letter-spacing: 1.4px;
  background: linear-gradient(90deg, #ffffff 0 52%, var(--cyan-300) 52% 100%);
  -webkit-background-clip: text;
}

.nav-right-controls {
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-pill,
.nav-btn-action {
  min-height: 40px;
  padding: 8px 15px;
  border: 1px solid rgba(98, 169, 255, 0.22);
  background: linear-gradient(180deg, rgba(18, 42, 91, 0.74), rgba(7, 22, 55, 0.82));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}

.nav-btn-action:hover,
.nav-pill:hover {
  border-color: var(--line-strong);
  background: rgba(21, 58, 122, 0.78);
  transform: translateY(-1px);
}

.main-view-container {
  padding: 28px clamp(16px, 2.6vw, 42px) 112px;
}

.starnavi-home-layout {
  grid-template-columns: minmax(250px, 0.76fr) minmax(520px, 1.8fr) minmax(270px, 0.86fr);
  gap: clamp(16px, 1.6vw, 26px);
  max-width: 1540px;
}

.glass-card,
.quick-challenge-section,
.battle-large-question-card,
.battle-progress-card,
.modal-box,
.result-dialog-card {
  border: 1px solid var(--line-soft);
  background:
    linear-gradient(180deg, rgba(19, 52, 112, 0.36), rgba(5, 19, 51, 0.76)),
    var(--surface-1);
  box-shadow: var(--shadow-panel), inset 0 1px 0 rgba(255,255,255,.05);
  backdrop-filter: blur(22px) saturate(145%);
}

.glass-card {
  border-radius: var(--radius-panel);
  padding: 20px;
  margin-bottom: 18px;
  overflow: hidden;
}

.glass-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(120deg, rgba(112,221,255,.07), transparent 34%, rgba(156,117,255,.05));
}

.card-title,
.student-name,
.quick-section-title,
.radar-title {
  color: var(--ink-1);
  letter-spacing: .35px;
}

.more-link {
  color: var(--ink-2);
}

.student-profile-card {
  border-color: rgba(100, 117, 255, 0.48);
  background:
    radial-gradient(circle at 12% 0%, rgba(75, 74, 255, .27), transparent 42%),
    linear-gradient(180deg, rgba(19, 37, 96, .9), rgba(9, 26, 67, .82));
}

.robot-avatar-box,
.navi-avatar-glow {
  border-color: var(--cyan-300);
  box-shadow: 0 0 0 5px rgba(47,201,255,.09), 0 0 28px rgba(47,201,255,.34);
}

.task-item,
.rank-user-row,
.quest-task-row {
  border-radius: 13px;
  transition: background .2s ease, transform .2s ease, border-color .2s ease;
}

.task-item:hover,
.rank-user-row:hover,
.quest-task-row:hover {
  background: rgba(47,201,255,.07);
  transform: translateX(2px);
}

.task-action-btn,
.hero-card-btn,
.btn-primary,
.btn-next-question-glow {
  border: 1px solid rgba(126, 231, 255, .65);
  color: #02101f;
  background: linear-gradient(135deg, #7be6ff, #28baf6 58%, #2489ff);
  box-shadow: 0 8px 22px rgba(35, 176, 255, .26), inset 0 1px 0 rgba(255,255,255,.5);
}

.task-action-btn:hover,
.hero-card-btn:hover,
.btn-primary:hover,
.btn-next-question-glow:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}

.hero-title-banner {
  padding: 4px 12px 20px;
}

.main-hero-title {
  font-size: clamp(25px, 2.5vw, 42px);
  color: #d9f5ff;
  text-shadow: 0 0 24px rgba(47,201,255,.26);
}

.main-hero-desc {
  color: var(--ink-2);
  font-size: clamp(13px, 1vw, 16px);
}

.main-hero-cards-row {
  gap: 20px;
}

.hero-card {
  min-height: 410px;
  border-radius: 28px;
  overflow: hidden;
  isolation: isolate;
  border-width: 1px;
  box-shadow: 0 20px 60px rgba(0,5,30,.46), inset 0 0 40px rgba(86,203,255,.08);
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 66% 24%, rgba(255,255,255,.13), transparent 3%),
    radial-gradient(circle at 20% 18%, rgba(112,221,255,.26), transparent 38%),
    linear-gradient(165deg, rgba(31, 103, 255, .62), rgba(6, 24, 73, .78));
}

.hero-card-purple::before {
  background:
    radial-gradient(circle at 70% 22%, rgba(255,255,255,.14), transparent 3%),
    radial-gradient(circle at 22% 25%, rgba(169, 116, 255, .32), transparent 38%),
    linear-gradient(165deg, rgba(111, 60, 255, .62), rgba(18, 17, 73, .82));
}

.hero-card:hover {
  transform: translateY(-5px) scale(1.008);
  border-color: var(--cyan-300);
}

.hero-card-visual {
  filter: drop-shadow(0 20px 30px rgba(0,0,0,.3));
}

.hero-mascot-icon {
  font-size: clamp(100px, 9vw, 144px);
}

.hero-card-title {
  font-size: clamp(27px, 2vw, 36px);
  text-shadow: 0 2px 15px rgba(0,0,0,.35);
}

.quick-challenge-section {
  border-radius: 20px;
  padding: 18px;
}

.quick-mini-card {
  min-height: 132px;
  border-color: rgba(92, 150, 255, .2);
  background: linear-gradient(160deg, rgba(22, 52, 111, .65), rgba(6, 22, 56, .8));
}

.quick-mini-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-3px);
  box-shadow: var(--shadow-cyan);
}

.campaign-rules-panel {
  display: grid;
  gap: 7px;
  margin-top: 18px;
  padding: 15px 17px;
  border: 1px solid rgba(77, 195, 255, .26);
  border-radius: 14px;
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.55;
  background: rgba(17, 56, 116, .34);
}

.campaign-rules-panel strong { color: #8be8ff; font-size: 14px; }

.free-explore-config-modal { width: min(920px, calc(100vw - 36px)); max-width: 920px; }
.free-explore-modal-title { display: flex; align-items: center; gap: 11px; }
.free-explore-modal-title > span { font-size: 28px; }
.free-explore-modal-title h2 { margin: 0; }
.free-explore-modal-title p { margin: 3px 0 0; color: #8da6ca; font-size: 11px; }
.free-explore-config-grid { display: grid; grid-template-columns: 1.08fr .92fr; gap: 16px; padding-top: 12px; }
.free-explore-config-section { min-width: 0; padding: 15px; border: 1px solid rgba(96, 169, 255, .2); border-radius: 17px; background: rgba(5, 22, 57, .64); }
.free-explore-config-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.free-explore-config-heading strong { display: block; color: #f2f8ff; font-size: 13px; }
.free-explore-config-heading small { display: block; margin-top: 4px; color: #7e99bf; font-size: 10px; line-height: 1.45; }
.free-explore-config-heading button { padding: 4px 7px; border: 1px solid rgba(94, 208, 255, .3); border-radius: 7px; background: rgba(26, 94, 157, .28); color: #95e6ff; font-size: 9px; cursor: pointer; }
.free-explore-category-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; max-height: 355px; padding-right: 3px; overflow-y: auto; }
.free-explore-category-option { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; align-items: center; gap: 7px; min-height: 38px; padding: 7px 9px; border: 1px solid rgba(97, 141, 205, .2); border-radius: 10px; background: rgba(8, 31, 71, .62); cursor: pointer; transition: border-color .18s ease, background .18s ease; }
.free-explore-category-option input { position: absolute; opacity: 0; pointer-events: none; }
.free-explore-category-option .category-check { display: grid; width: 18px; height: 18px; place-items: center; border: 1px solid rgba(102, 154, 220, .46); border-radius: 5px; color: transparent; font-size: 10px; }
.free-explore-category-option.selected { border-color: rgba(74, 213, 255, .52); background: rgba(13, 91, 151, .44); }
.free-explore-category-option.selected .category-check { border-color: #5de0ff; background: linear-gradient(135deg, #2498eb, #5adce9); color: #fff; }
.category-option-name { overflow: hidden; color: #d9e9ff; font-size: 10px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.free-explore-category-option small { color: #6f8bad; font-size: 8px; }
.free-explore-tier-options { display: grid; gap: 7px; }
.free-explore-tier-options button { display: grid; grid-template-columns: 30px 1fr; align-items: center; gap: 8px; padding: 9px 11px; border: 1px solid rgba(99, 144, 210, .22); border-radius: 11px; background: rgba(8, 31, 73, .62); color: #dceaff; text-align: left; cursor: pointer; }
.free-explore-tier-options button.selected { border-color: rgba(164, 111, 255, .68); background: linear-gradient(115deg, rgba(37, 107, 194, .5), rgba(103, 63, 192, .52)); box-shadow: 0 0 18px rgba(105, 91, 255, .14); }
.free-explore-tier-options button > span { font-size: 20px; }
.free-explore-tier-options strong, .free-explore-tier-options small { display: block; }
.free-explore-tier-options strong { font-size: 11px; }
.free-explore-tier-options small { margin-top: 2px; color: #819cc2; font-size: 9px; }
.quantity-heading { margin-top: 17px; }
.free-explore-count-options { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.free-explore-count-options button { display: flex; align-items: baseline; justify-content: center; gap: 2px; min-height: 42px; border: 1px solid rgba(91, 151, 220, .25); border-radius: 10px; background: rgba(9, 34, 76, .7); color: #cfe6ff; cursor: pointer; }
.free-explore-count-options button strong { font-size: 14px; }
.free-explore-count-options button span { font-size: 8px; }
.free-explore-count-options button.selected { border-color: #63dfff; background: linear-gradient(135deg, rgba(35, 135, 217, .68), rgba(92, 78, 209, .64)); color: #fff; }
.free-explore-count-options button:disabled { cursor: not-allowed; opacity: .3; }
.free-explore-reward-rule { display: grid; gap: 5px; margin-top: 14px; padding: 11px; border: 1px solid rgba(255, 193, 72, .26); border-radius: 11px; background: rgba(108, 67, 9, .16); }
.free-explore-reward-rule strong { color: #ffd26f; font-size: 11px; }
.free-explore-reward-rule span { color: #aebfd7; font-size: 9px; line-height: 1.5; }
.free-explore-config-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 15px; }
.free-explore-config-footer > div:last-child { display: flex; gap: 9px; }
#freeExploreConfigSummary { color: #7fdcf8; font-size: 10px; }
#freeExploreConfigSummary.warning { color: #ffbe67; }

.free-explore-badge { padding: 3px 7px; border-radius: 999px; background: rgba(119, 83, 222, .25); color: #c7a9ff; font-size: 8px; font-weight: 800; }
.free-explore-setting-row { display: flex; justify-content: space-between; gap: 8px; margin-top: 8px; padding: 8px 9px; border-radius: 9px; background: rgba(4, 19, 49, .48); color: #7893b7; font-size: 9px; }
.free-explore-setting-row strong { color: #e4efff; font-size: 9px; }
.free-explore-category-title { margin: 12px 0 6px; color: #86a0c5; font-size: 9px; font-weight: 700; }
.free-explore-category-tags { display: flex; flex-wrap: wrap; gap: 5px; max-height: 122px; overflow-y: auto; }
.free-explore-category-tags span { padding: 4px 6px; border: 1px solid rgba(71, 207, 255, .25); border-radius: 7px; background: rgba(23, 91, 143, .25); color: #aeeeff; font-size: 8px; }
.free-explore-progress-card { margin-top: 13px; padding: 9px; border-radius: 10px; background: rgba(4, 17, 45, .56); }
.free-explore-progress-card > div:first-child { display: flex; justify-content: space-between; color: #8ca3c4; font-size: 9px; }
.free-explore-progress-card strong { color: #63e1ff; }
.free-explore-progress-track, .free-explore-header-progress { height: 6px; overflow: hidden; border-radius: 99px; background: rgba(81, 111, 160, .26); }
.free-explore-progress-track { margin-top: 7px; }
.free-explore-progress-track i, .free-explore-header-progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #35d5df, #3aa7ff, #8a6cff); transition: width .25s ease; }
.free-explore-rule-note { margin-top: 11px; color: #6f89ae; font-size: 8px; line-height: 1.65; }
.free-explore-header-progress { flex: 1; max-width: 280px; }
.free-explore-status-heading { display: flex; justify-content: space-between; color: #91a6c5; font-size: 11px; font-weight: 700; }
.free-explore-status-heading span { color: #71daf6; font-size: 8px; }
.free-explore-stats-trio { margin: 9px 0 0; padding: 7px 2px; }
.free-explore-no-score { margin-top: 8px; padding: 7px 8px; border-radius: 8px; background: rgba(64, 52, 129, .2); color: #ae9edc; font-size: 8px; line-height: 1.5; }
.free-explore-completion-tip { display: flex; align-items: center; gap: 10px; }
.free-explore-completion-tip > span { font-size: 23px; }
.free-explore-completion-tip strong, .free-explore-completion-tip small { display: block; }
.free-explore-completion-tip strong { color: #ffd16b; font-size: 11px; }
.free-explore-completion-tip small { margin-top: 3px; color: #8199bb; font-size: 8px; }
.free-explore-result-rule { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin: 13px 0; padding: 12px; border: 1px solid rgba(255, 194, 69, .27); border-radius: 13px; background: rgba(105, 67, 9, .14); }
.free-explore-result-rule > div { display: flex; justify-content: space-between; gap: 8px; padding: 7px 9px; border-radius: 8px; background: rgba(8, 24, 54, .54); color: #91a7c7; font-size: 10px; }
.free-explore-result-rule strong { color: #ffd36e; }
.free-explore-result-rule p { grid-column: 1 / -1; margin: 0; color: #8d9fba; font-size: 9px; text-align: center; }

@media (max-width: 900px) {
  .free-explore-config-grid { grid-template-columns: 1fr; }
  .free-explore-category-options { max-height: 210px; }
  .free-explore-config-footer { align-items: stretch; flex-direction: column; }
  .free-explore-config-footer > div:last-child { justify-content: flex-end; }
}

@media (max-width: 560px) {
  .free-explore-category-options { grid-template-columns: 1fr; }
  .free-explore-count-options { grid-template-columns: repeat(3, 1fr); }
}
.tier-card.locked, .galaxy-planet-card.locked { opacity: .5; filter: saturate(.45); cursor: not-allowed; }
.tier-cards-grid .tier-card.locked:hover, .galaxy-map-grid .galaxy-planet-card.locked:hover {
  transform: none;
  border-color: var(--line-soft);
  box-shadow: none;
}

.bottom-dock-nav {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  width: min(980px, calc(100vw - 32px));
  z-index: 30;
  border: 1px solid rgba(87, 154, 255, .25);
  background: rgba(4, 17, 49, .84);
  backdrop-filter: blur(24px) saturate(160%);
  box-shadow: 0 22px 60px rgba(0,0,0,.52);
}

.dock-nav-item {
  min-height: 70px;
  color: var(--ink-3);
}

.dock-nav-item.active {
  color: var(--ink-1);
  background: linear-gradient(180deg, rgba(47,201,255,.26), rgba(38,118,255,.18));
}

.dock-nav-item.active::before {
  background: var(--cyan-300);
  box-shadow: 0 0 20px var(--cyan-400);
}

/* Battle */
.game-view-wrapper {
  width: 100%;
}

.hud-container {
  margin: -28px calc(clamp(16px, 2.6vw, 42px) * -1) 22px;
}

.hud-top-battle-bar {
  position: sticky;
  top: 0;
  z-index: 50;
}

.hud-center-title-capsule {
  border: 1px solid rgba(116, 111, 255, .48);
  background: linear-gradient(180deg, rgba(20, 31, 84, .88), rgba(7, 19, 55, .9));
  box-shadow: 0 8px 28px rgba(0,0,0,.35), inset 0 -2px 0 rgba(156,117,255,.58);
}

.battle-arena-layout {
  grid-template-columns: minmax(220px, .72fr) minmax(520px, 1.9fr) minmax(250px, .82fr);
  gap: clamp(16px, 1.8vw, 28px);
  max-width: 1540px;
  margin: 0 auto;
}

.battle-progress-card,
.battle-health-card,
.current-status-mini-card,
.battle-props-card,
.battle-combo-card {
  border-radius: 20px;
}

.battle-health-card {
  padding: 15px 16px;
  border-color: rgba(76, 209, 255, .38);
  background:
    radial-gradient(circle at 12% 12%, rgba(44, 192, 255, .14), transparent 38%),
    linear-gradient(145deg, rgba(10, 49, 105, .94), rgba(11, 29, 70, .94));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 12px 28px rgba(0, 17, 56, .25);
}

.battle-health-heading,
.battle-health-title,
.battle-health-meta {
  display: flex;
  align-items: center;
}

.battle-health-heading,
.battle-health-meta {
  justify-content: space-between;
  gap: 10px;
}

.battle-health-title { gap: 9px; }
.battle-health-title > span { font-size: 24px; filter: drop-shadow(0 0 8px rgba(61, 202, 255, .45)); }
.battle-health-title div { display: grid; gap: 2px; }
.battle-health-title strong { color: #f3fbff; font-size: 14px; }
.battle-health-title small { color: #7fa8cc; font-size: 9px; }
.battle-health-value { color: #63ddff; font-size: 18px; letter-spacing: .4px; text-shadow: 0 0 14px rgba(64, 208, 255, .38); }

.battle-health-track {
  height: 13px;
  margin-top: 13px;
  overflow: hidden;
  border: 1px solid rgba(111, 203, 255, .2);
  border-radius: 999px;
  background: rgba(1, 13, 39, .8);
  box-shadow: inset 0 2px 6px rgba(0,0,0,.42);
}

.battle-health-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #21c9ec, #5de7ff 70%, #b8f5ff);
  box-shadow: 0 0 14px rgba(50, 210, 255, .62);
  transition: width .35s ease, background .25s ease;
}

.battle-health-meta { margin-top: 8px; color: #8ca9c7; font-size: 9px; }
.battle-health-meta b { color: #9de9ff; font-size: 9px; white-space: nowrap; }
.battle-health-card.warning { border-color: rgba(255, 101, 123, .58); background: radial-gradient(circle at 12% 12%, rgba(255, 68, 103, .15), transparent 38%), linear-gradient(145deg, rgba(77, 28, 65, .94), rgba(24, 27, 70, .94)); }
.battle-health-card.warning .battle-health-value,
.battle-health-card.warning .battle-health-meta b { color: #ffabb7; }
.battle-health-card.warning .battle-health-track i { background: linear-gradient(90deg, #ff496d, #ff7b8d 72%, #ffc3ca); box-shadow: 0 0 14px rgba(255, 73, 109, .52); }
.compact-status-trio { grid-template-columns: repeat(2, 1fr); }

.battle-system-notice {
  margin-top: 9px;
  padding: 7px 9px;
  border: 1px solid rgba(75, 188, 255, .16);
  border-radius: 9px;
  background: rgba(2, 16, 45, .55);
  color: #91abc9;
  font-size: 9px;
  line-height: 1.45;
}

.challenge-failure-rule {
  margin-top: 10px;
  padding: 10px 11px;
  border: 1px solid rgba(255, 194, 92, .28);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(91, 50, 17, .34), rgba(21, 32, 71, .54));
}

.failure-rule-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #ffd986;
  font-size: 11px;
}

.failure-rule-heading span {
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(255, 191, 72, .13);
  color: #ffe6a8;
  white-space: nowrap;
}

.challenge-failure-rule p {
  margin: 7px 0 0;
  color: var(--ink-2);
  font-size: 10px;
  line-height: 1.55;
}

.challenge-failure-rule.warning {
  border-color: rgba(255, 99, 117, .62);
  background: linear-gradient(135deg, rgba(112, 25, 48, .5), rgba(30, 31, 72, .58));
  box-shadow: 0 0 18px rgba(255, 69, 102, .12);
}

.challenge-failure-rule.warning .failure-rule-heading,
.challenge-failure-rule.warning .failure-rule-heading span {
  color: #ffadb7;
}

.boss-failure-rule {
  padding-top: 6px;
  border-top: 1px dashed rgba(255, 126, 160, .24);
  color: #ffbdc8 !important;
}

.battle-large-question-card {
  min-height: 188px;
  border-color: rgba(123, 154, 255, .72);
  background:
    radial-gradient(circle at 88% 82%, rgba(90, 83, 255, .36), transparent 36%),
    linear-gradient(145deg, rgba(32, 79, 184, .87), rgba(51, 52, 168, .72));
  box-shadow: 0 18px 46px rgba(0, 21, 91, .4), inset 0 1px 0 rgba(255,255,255,.16);
}

.battle-question-text {
  line-height: 1.65;
  font-size: clamp(20px, 1.7vw, 29px);
}

.vertical-options-list {
  gap: 14px;
}

.battle-opt-item {
  min-height: 68px;
  border: 1px solid rgba(103, 134, 255, .56);
  background: linear-gradient(180deg, rgba(41, 74, 162, .73), rgba(15, 39, 94, .86));
  box-shadow: 0 10px 24px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.06);
}

.battle-opt-item:hover:not(:disabled) {
  border-color: var(--cyan-300);
  background: linear-gradient(180deg, rgba(43, 104, 200, .82), rgba(17, 55, 122, .9));
  transform: translateX(4px);
}

.battle-opt-item:disabled {
  cursor: not-allowed;
  opacity: .5;
}

.battle-opt-item:focus-visible {
  outline: 3px solid rgba(112, 221, 255, .7);
  outline-offset: 3px;
}

.battle-opt-item.correct {
  border-color: #b7ff69;
  background: linear-gradient(180deg, rgba(69, 174, 94, .88), rgba(27, 112, 72, .88));
  box-shadow: 0 0 28px rgba(130,255,104,.32);
}

.battle-opt-item.wrong {
  border-color: var(--red-400);
  background: linear-gradient(180deg, rgba(172, 48, 72, .85), rgba(99, 27, 55, .9));
}

.battle-opt-item.eliminated {
  opacity: .28;
  filter: saturate(.2);
  text-decoration: line-through;
}

.answer-feedback-panel {
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(112,221,255,.24);
  border-radius: 14px;
  background: rgba(5, 20, 53, .82);
  animation: feedback-in .22s ease-out;
}

.answer-feedback-head {
  margin-bottom: 6px;
  font-weight: 800;
}

.answer-feedback-head.success { color: var(--green-400); }
.answer-feedback-head.danger { color: var(--red-400); }
.answer-feedback-analysis { color: var(--ink-2); line-height: 1.7; font-size: 13px; }

.path-choice-strip,
.boss-health-panel {
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(112, 221, 255, .28);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(11, 39, 91, .92), rgba(23, 27, 87, .86));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07);
}

.path-choice-strip {
  display: grid;
  grid-template-columns: auto repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: 9px;
}

.path-choice-label { color: var(--cyan-300); font-size: 12px; font-weight: 800; }

.path-choice-strip button {
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  justify-content: center;
  gap: 2px 8px;
  min-height: 54px;
  padding: 6px 10px;
  border: 1px solid rgba(119, 145, 255, .42);
  border-radius: 10px;
  background: rgba(23, 47, 111, .74);
  color: var(--ink-2);
  cursor: pointer;
}

.path-choice-strip button strong { color: #f5f8ff; font-size: 13px; }
.path-choice-strip button span { color: #a9c8ef; font-size: 11px; }
.path-choice-strip button small { grid-column: 1 / -1; color: #7ddfff; font-size: 9px; }
.path-choice-strip.choice-locked button[aria-disabled="true"] { opacity: .45; cursor: not-allowed; filter: grayscale(.35); }

.path-choice-strip button:hover,
.path-choice-strip button.selected {
  border-color: var(--cyan-300);
  color: #fff;
  background: linear-gradient(135deg, rgba(25, 126, 218, .78), rgba(105, 70, 211, .78));
  box-shadow: 0 0 18px rgba(52, 190, 255, .2);
}

.boss-health-meta { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 9px; color: var(--ink-2); }
.boss-health-meta strong { color: #ffb86b; }
.boss-health-track { height: 11px; overflow: hidden; border-radius: 999px; background: rgba(2, 12, 41, .92); }
.boss-health-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff496c, #ff9f43);
  box-shadow: 0 0 18px rgba(255, 84, 107, .52);
  transition: width .35s ease;
}

.memory-preview-active .battle-question-text { animation: memory-pulse 1s ease-in-out infinite; }
.memory-preview-active + .vertical-options-list { filter: blur(4px); opacity: .38; }

@keyframes memory-pulse {
  50% { text-shadow: 0 0 22px rgba(112, 221, 255, .8); transform: scale(1.012); }
}

@keyframes feedback-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.battle-prop-btn.active {
  border-color: var(--gold-300);
  box-shadow: 0 0 20px rgba(255,184,46,.24);
}

.difficulty-step-summary {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 7px;
  margin: -7px 0 8px;
  padding: 7px 9px;
  border: 1px solid rgba(91, 206, 255, .18);
  border-radius: 10px;
  background: rgba(20, 57, 116, .34);
  color: #8fa8cb;
  font-size: 9px;
}
.difficulty-step-summary strong { color: #eaf7ff; font-size: 10px; }
.difficulty-step-summary em { padding: 2px 6px; border-radius: 999px; background: rgba(255, 184, 46, .14); color: #ffd064; font-style: normal; font-weight: 800; }
.orbit-node-heading { display: flex; align-items: center; gap: 6px; }
.orbit-difficulty { padding: 1px 5px; border: 1px solid rgba(94, 214, 255, .22); border-radius: 999px; color: #72defd; font-size: 8px; font-weight: 800; }
.orbit-node-label { color: #91a6c9; font-size: 9px; }
.orbit-node-item.active .orbit-difficulty { border-color: rgba(255, 199, 74, .46); color: #ffd064; }
.chest-mode-hint { display: block; color: #7fb3dc; font-size: 8px; line-height: 1.4; }

.battle-props-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; color: var(--text-muted); font-size: 12px; font-weight: 700; }
.auto-prop-toggle { display: inline-flex; align-items: center; gap: 5px; color: #87a4c9; font-size: 9px; cursor: pointer; }
.auto-prop-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.auto-prop-toggle i { position: relative; width: 27px; height: 15px; border-radius: 999px; background: rgba(110, 138, 183, .32); transition: background .18s ease; }
.auto-prop-toggle i::after { content: ''; position: absolute; top: 2px; left: 2px; width: 11px; height: 11px; border-radius: 50%; background: #d7e5f8; transition: transform .18s ease; }
.auto-prop-toggle input:checked + i { background: linear-gradient(90deg, #2495e9, #5bdff4); }
.auto-prop-toggle input:checked + i::after { transform: translateX(12px); background: #fff; }
.auto-prop-toggle input:focus-visible + i { outline: 2px solid #67dfff; outline-offset: 2px; }
.prop-reminder { margin-top: 8px; padding: 8px; border: 1px solid rgba(255, 190, 65, .34); border-radius: 10px; background: rgba(105, 67, 12, .18); color: #dce8f8; font-size: 9px; line-height: 1.45; animation: feedback-in .18s ease-out; }
.prop-reminder > div { display: flex; gap: 6px; margin-top: 6px; }
.prop-reminder button { flex: 1; min-height: 25px; border: 1px solid rgba(108, 215, 255, .3); border-radius: 7px; background: rgba(31, 102, 167, .34); color: #dff8ff; font-size: 9px; cursor: pointer; }
.prop-reminder button:first-child { border-color: rgba(255, 199, 76, .4); background: rgba(176, 111, 16, .28); color: #ffd774; }
.battle-prop-btn:disabled { cursor: not-allowed; opacity: .42; filter: grayscale(.5); transform: none; }

.props-container {
  position: sticky;
  bottom: 0;
  z-index: 90;
  padding-top: 18px;
}

.battle-bottom-action-dock {
  border-color: rgba(95, 153, 255, .32);
  background: rgba(3, 16, 47, .9);
  backdrop-filter: blur(22px);
}

.timer-fill-yellow {
  background: linear-gradient(90deg, var(--gold-300), var(--gold-400));
}

.battle-timer-dock-wrap {
  width: min(560px, 52vw);
}

.btn-battle-pause {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 88px;
  min-height: 34px;
  padding: 6px 12px;
  border: 1px solid rgba(104, 210, 255, .38);
  border-radius: 999px;
  background: rgba(22, 70, 137, .5);
  color: #dff7ff;
  font-size: 11px;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.btn-battle-pause:hover:not(:disabled) {
  border-color: var(--cyan-300);
  background: rgba(29, 104, 178, .68);
  transform: translateY(-1px);
}

.btn-battle-pause.active {
  border-color: rgba(255, 198, 75, .62);
  background: rgba(126, 80, 12, .62);
  color: #ffe29a;
}

.btn-battle-pause:disabled { cursor: not-allowed; opacity: .42; }

.battle-pause-mask {
  position: absolute;
  inset: -8px;
  z-index: 80;
  display: grid;
  place-items: center;
  min-height: 100%;
  border: 1px solid rgba(90, 181, 255, .28);
  border-radius: 22px;
  background:
    radial-gradient(circle at 50% 42%, rgba(65, 109, 205, .24), transparent 36%),
    rgba(2, 12, 37, .96);
  backdrop-filter: blur(22px);
  box-shadow: inset 0 0 70px rgba(24, 91, 181, .18);
}

.pause-mask-content {
  display: grid;
  justify-items: center;
  gap: 9px;
  max-width: 360px;
  padding: 28px;
  text-align: center;
}

.pause-mask-content > span { color: var(--cyan-300); font-size: 44px; filter: drop-shadow(0 0 14px rgba(73, 202, 255, .45)); }
.pause-mask-content strong { color: #f5fbff; font-size: 24px; }
.pause-mask-content p { margin: 0; color: var(--ink-2); font-size: 12px; line-height: 1.65; }

.node-steps-chain {
  max-width: min(48%, 360px);
  gap: 4px;
}

.node-steps-chain .step-chain-line {
  width: clamp(5px, .8vw, 12px);
}

/* Dialog system */
.modal-backdrop,
.result-dialog-overlay,
.admin-modal-overlay {
  background: rgba(1, 6, 22, .78);
  backdrop-filter: blur(18px) saturate(125%);
}

#resultModalContainer {
  position: fixed;
  inset: 0;
  z-index: 10000;
}

.result-dialog-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 3vw, 40px);
  overflow: hidden;
  animation: fadeInModal .22s ease-out;
}

.modal-box,
.result-dialog-card {
  width: min(92vw, 760px);
  max-height: min(90vh, 900px);
  padding: 0;
  overflow: hidden;
  border-radius: 24px;
}

.modal-box-large { max-width: 940px; }

.modal-box::before,
.result-dialog-card::before {
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan-300), var(--violet-400), transparent);
}

.modal-header {
  min-height: 72px;
  padding: 18px 22px;
  background: rgba(16, 39, 86, .42);
}

.modal-body {
  padding: 20px 22px !important;
  scrollbar-width: thin;
  scrollbar-color: rgba(112,221,255,.45) transparent;
}

.modal-close {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  color: var(--ink-2);
}

.tier-card,
.backpack-item-card,
.achieve-card,
.checkin-day-card,
.profile-stat-card,
.galaxy-map-card {
  border: 1px solid rgba(93, 151, 255, .2);
  background: linear-gradient(160deg, rgba(20, 51, 108, .64), rgba(6, 22, 57, .8));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}

.tier-card:hover,
.tier-card.selected,
.backpack-item-card:hover,
.achieve-card.unlocked:hover {
  border-color: var(--line-strong);
  background: linear-gradient(160deg, rgba(28, 73, 147, .72), rgba(9, 30, 73, .88));
}

.btn-secondary,
.btn-ghost,
.admin-btn.secondary {
  border: 1px solid rgba(110, 166, 255, .28);
  background: rgba(19, 45, 98, .58);
  color: var(--ink-1);
}

.btn-secondary:hover,
.btn-ghost:hover,
.admin-btn.secondary:hover {
  border-color: var(--cyan-300);
  background: rgba(27, 77, 145, .62);
}

.admin-input,
.admin-textarea,
.admin-select,
.auth-input {
  border: 1px solid rgba(99, 159, 255, .26);
  background: rgba(2, 13, 39, .72);
  color: var(--ink-1);
}

.result-dialog-card {
  max-width: 840px;
  width: min(840px, 94vw);
  max-height: min(86vh, 820px);
  padding: 28px;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(112, 221, 255, .45) transparent;
  animation: scaleUpModal .24s cubic-bezier(.16, 1, .3, 1);
}

.result-header {
  text-align: center;
}

.result-trophy-icon {
  font-size: 48px;
  line-height: 1;
}

.result-title {
  margin: 12px 0 6px;
  color: var(--ink-1);
  font-size: clamp(24px, 3vw, 38px);
}

.result-subtitle {
  margin: 0;
  color: var(--ink-2);
  line-height: 1.6;
}

.result-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 22px 0;
}

.result-stats-grid .stat-box {
  display: grid;
  gap: 6px;
  padding: 14px 12px;
  border-radius: 14px;
  text-align: center;
}

.result-stats-grid .stat-label { color: var(--ink-3); font-size: 12px; }
.result-stats-grid .stat-value { color: var(--ink-1); font-size: 20px; font-weight: 800; }
.result-stats-grid .stat-value.highlight { color: var(--cyan-300); }
.result-stats-grid .stat-value.gold { color: var(--gold-300); }

.failure-explain-panel {
  margin: -4px 0 18px;
  padding: 15px;
  border: 1px solid rgba(255, 99, 117, .38);
  border-radius: 16px;
  background:
    radial-gradient(circle at 100% 0, rgba(255, 67, 115, .12), transparent 34%),
    rgba(40, 18, 54, .48);
}

.failure-explain-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.failure-explain-head div {
  display: grid;
  gap: 3px;
}

.failure-explain-head span {
  color: var(--ink-3);
  font-size: 11px;
}

.failure-explain-head strong {
  color: #ffb4c1;
  font-size: 16px;
}

.failure-explain-head > b {
  padding: 6px 9px;
  border: 1px solid rgba(255, 114, 139, .26);
  border-radius: 999px;
  background: rgba(255, 77, 114, .12);
  color: #ffc0ca;
  font-size: 11px;
  white-space: nowrap;
}

.failure-explain-panel > p {
  margin: 9px 0 12px;
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.55;
}

.failure-rule-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.failure-rule-grid div {
  display: grid;
  gap: 4px;
  padding: 9px 8px;
  border: 1px solid rgba(117, 147, 223, .18);
  border-radius: 10px;
  background: rgba(5, 25, 64, .54);
  text-align: center;
}

.failure-rule-grid span { color: var(--ink-3); font-size: 10px; }
.failure-rule-grid strong { color: var(--ink-1); font-size: 11px; }

.result-actions-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.review-panel {
  margin-top: 18px;
  max-height: 300px;
  overflow-y: auto;
  padding: 16px;
  border: 1px solid rgba(98, 157, 255, .2);
  border-radius: 14px;
  background: rgba(4, 19, 49, .72);
}

body.modal-open {
  overflow: hidden;
}

/* Personal profile */
.profile-modal-box {
  width: min(940px, 94vw);
  max-width: 940px !important;
  max-height: 88vh;
  padding: 0;
  background: linear-gradient(165deg, rgba(10, 35, 82, .98), rgba(4, 18, 51, .98));
}

.profile-modal-header { padding: 20px 24px; }
.profile-modal-heading { display: flex; align-items: center; gap: 13px; }
.profile-heading-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; font-size: 23px; background: linear-gradient(145deg, rgba(47, 201, 255, .2), rgba(111, 77, 255, .24)); border: 1px solid rgba(112, 221, 255, .28); }
.profile-modal-heading h2 { margin: 0; color: var(--ink-1); font-size: 21px; }
.profile-modal-heading p { margin: 3px 0 0; color: var(--ink-3); font-size: 12px; }
.profile-content-body { padding: 20px 24px 24px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(112,221,255,.42) transparent; }
.profile-loading-state, .profile-empty-state { display: grid; justify-items: center; gap: 8px; padding: 50px 20px; color: var(--ink-3); text-align: center; }
.profile-loading-state span, .profile-empty-state > span { font-size: 34px; }
.profile-loading-state p, .profile-empty-state p, .profile-empty-state h3 { margin: 0; }
.profile-empty-state h3 { color: var(--ink-1); }
.profile-empty-state .btn-primary { margin-top: 10px; }
.profile-empty-state.compact { min-height: 210px; align-content: center; padding: 30px 20px; border: 1px dashed rgba(112, 221, 255, .2); border-radius: 16px; background: rgba(4, 20, 54, .4); }
.profile-loading-orbit { animation: profile-orbit 1.4s ease-in-out infinite; }
@keyframes profile-orbit { 50% { transform: translateY(-5px) rotate(8deg); } }

.profile-rank-card { display: grid; grid-template-columns: minmax(250px, .9fr) minmax(300px, 1.1fr); align-items: center; gap: 28px; padding: 19px 22px; border: 1px solid rgba(255, 184, 46, .3); border-radius: 18px; background: radial-gradient(circle at 10% 0%, rgba(255, 184, 46, .12), transparent 46%), rgba(4, 18, 48, .66); }
.profile-rank-identity { display: flex; align-items: center; gap: 15px; }
.profile-rank-icon { display: grid; place-items: center; width: 62px; height: 62px; flex: 0 0 auto; border-radius: 18px; font-size: 34px; background: rgba(255, 184, 46, .1); box-shadow: inset 0 0 24px rgba(255,184,46,.08); }
.profile-eyebrow { color: var(--ink-3); font-size: 11px; letter-spacing: .8px; }
.profile-rank-identity h3 { margin: 3px 0; color: var(--gold-300); font-size: 21px; }
.profile-rank-identity p, .profile-rank-progress p { margin: 0; color: var(--ink-3); font-size: 12px; }
.profile-rank-identity p strong { color: var(--ink-1); }
.profile-rank-progress > div:first-child { display: flex; justify-content: space-between; margin-bottom: 8px; color: var(--ink-2); font-size: 12px; }
.profile-rank-progress > div strong { color: var(--gold-300); }
.profile-progress-track { height: 8px; overflow: hidden; margin-bottom: 7px; border-radius: 999px; background: rgba(255,255,255,.09); }
.profile-progress-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #ffb82e, #ffe066); box-shadow: 0 0 14px rgba(255,184,46,.34); }

.profile-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 14px 0 18px; }
.profile-metrics article { display: flex; align-items: center; gap: 11px; min-height: 78px; padding: 13px 15px; border: 1px solid rgba(98, 157, 255, .18); border-radius: 15px; background: rgba(11, 38, 84, .58); }
.profile-metrics article > span { font-size: 22px; }
.profile-metrics article div { display: grid; gap: 2px; }
.profile-metrics strong { color: var(--ink-1); font-size: 21px; }
.profile-metrics small { color: var(--ink-3); font-size: 11px; }
.metric-green { color: var(--green-400) !important; }
.metric-gold { color: var(--gold-300) !important; }
.metric-red { color: var(--red-400) !important; }

.profile-tabs { display: flex; gap: 8px; padding: 5px; border: 1px solid rgba(98,157,255,.16); border-radius: 14px; background: rgba(2, 14, 40, .6); }
.profile-tab { flex: 1; display: flex; align-items: center; justify-content: center; gap: 9px; min-height: 43px; border: 0; border-radius: 10px; color: var(--ink-3); background: transparent; cursor: pointer; font-weight: 700; transition: .2s ease; }
.profile-tab b { min-width: 24px; padding: 2px 7px; border-radius: 999px; background: rgba(255,255,255,.08); color: inherit; font-size: 11px; }
.profile-tab:hover { color: var(--ink-1); background: rgba(47,201,255,.07); }
.profile-tab.active { color: var(--cyan-300); background: linear-gradient(135deg, rgba(34,112,207,.32), rgba(71,65,188,.25)); box-shadow: inset 0 0 0 1px rgba(112,221,255,.24); }
.profile-panel { display: grid; gap: 10px; max-height: 350px; margin-top: 12px; padding-right: 4px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(112,221,255,.42) transparent; }

.profile-record-card { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 18px; padding: 15px 18px 15px 20px; overflow: hidden; border: 1px solid rgba(98,157,255,.16); border-radius: 15px; background: rgba(5, 24, 59, .78); }
.profile-record-card::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--red-400); }
.profile-record-card.victory::before { background: var(--green-400); }
.record-title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.record-status { color: var(--ink-1); font-size: 13px; font-weight: 800; }
.record-mode { padding: 3px 8px; border-radius: 999px; color: var(--ink-2); background: rgba(112,221,255,.08); font-size: 10px; }
.record-main time { display: block; margin: 6px 0 9px; color: var(--ink-3); font-size: 11px; }
.record-facts { display: flex; flex-wrap: wrap; gap: 7px 16px; color: var(--ink-3); font-size: 12px; }
.record-facts strong { color: var(--ink-1); }
.record-score { min-width: 88px; text-align: right; }
.record-score strong { display: block; color: var(--gold-300); font-size: 25px; }
.record-score span { color: var(--ink-3); font-size: 10px; }

.profile-wrong-card { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; padding: 15px; border: 1px solid rgba(98,157,255,.17); border-radius: 15px; background: rgba(5, 24, 59, .76); }
.wrong-index { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; color: var(--cyan-300); background: rgba(47,201,255,.12); font-weight: 800; }
.wrong-content h4 { margin: 2px 0 10px; color: var(--ink-1); font-size: 14px; line-height: 1.55; }
.wrong-answer { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.wrong-answer span { padding: 3px 7px; border-radius: 6px; color: var(--green-400); background: rgba(84,229,154,.1); font-size: 10px; }
.wrong-answer strong { color: var(--green-400); font-size: 12px; }
.wrong-content details { color: var(--ink-2); font-size: 12px; }
.wrong-content summary { color: var(--cyan-300); cursor: pointer; }
.wrong-content details p { margin: 8px 0 0; padding: 10px 12px; border-radius: 9px; background: rgba(1,12,35,.6); line-height: 1.65; }

@media (max-width: 760px) {
  .profile-modal-backdrop { padding: 8px; align-items: center; }
  .profile-modal-box { width: 100%; max-height: 94vh; border-radius: 20px; }
  .profile-modal-header, .profile-content-body { padding: 16px; }
  .profile-rank-card { grid-template-columns: 1fr; gap: 16px; }
  .profile-metrics { grid-template-columns: 1fr 1fr; }
  .profile-record-card { grid-template-columns: 1fr; }
  .record-score { position: absolute; top: 15px; right: 15px; }
  .record-title-row { padding-right: 90px; }
}

.result-stats-grid .stat-box {
  border: 1px solid rgba(98, 157, 255, .18);
  background: rgba(12, 37, 83, .62);
}

.leaderboard-empty,
.table-empty-state {
  padding: 26px 14px;
  color: var(--ink-3);
  text-align: center;
}

.toast-stack {
  position: fixed;
  top: 86px;
  right: 22px;
  z-index: 5000;
  display: grid;
  gap: 10px;
  pointer-events: none;
}

.starnavi-toast {
  width: min(380px, calc(100vw - 32px));
  padding: 13px 16px;
  border: 1px solid rgba(112,221,255,.32);
  border-radius: 13px;
  background: rgba(6, 23, 59, .94);
  color: var(--ink-1);
  box-shadow: 0 16px 42px rgba(0,0,0,.42);
  transform: translateX(20px);
  opacity: 0;
  transition: opacity .2s ease, transform .2s ease;
}

.starnavi-toast.show { opacity: 1; transform: translateX(0); }
.starnavi-toast.success { border-color: rgba(84,229,154,.55); }
.starnavi-toast.warning { border-color: rgba(255,184,46,.58); }
.starnavi-toast.danger { border-color: rgba(255,113,133,.58); }

@media (max-width: 1280px) {
  .starnavi-home-layout,
  .battle-arena-layout {
    grid-template-columns: 240px minmax(480px, 1fr) 250px;
  }
  .nav-btn-action { padding-inline: 10px; }
  .hero-card { min-height: 370px; }
}

@media (max-width: 1080px) {
  .top-navbar { align-items: flex-start; }
  .logo-text { font-size: 17px; }
  .starnavi-home-layout {
    grid-template-columns: minmax(220px, .72fr) minmax(480px, 1.6fr);
  }
  .home-right-sidebar { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  .battle-arena-layout { grid-template-columns: 210px minmax(480px, 1fr); }
  .battle-right-sidebar { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .battle-right-sidebar .glass-card { margin-bottom: 0; }
  .hud-center-title-capsule { order: 3; width: 100%; }
  .hud-top-battle-bar { flex-wrap: wrap; }
}

@media (max-width: 820px) {
  .top-navbar { position: relative; flex-direction: column; gap: 12px; }
  .nav-right-controls { width: 100%; justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }
  .nav-right-controls > * { flex: 0 0 auto; }
  .main-view-container { padding: 18px 14px 104px; }
  .starnavi-home-layout,
  .battle-arena-layout { display: flex; flex-direction: column; }
  .home-center-hub { order: -1; }
  .home-left-sidebar,
  .home-right-sidebar { width: 100%; }
  .home-right-sidebar { display: block; }
  .main-hero-cards-row { grid-template-columns: 1fr 1fr; }
  .hero-card { min-height: 330px; }
  .battle-center-arena { order: -2; width: 100%; }
  .battle-left-sidebar,
  .battle-right-sidebar { width: 100%; }
  .battle-right-sidebar { display: grid; grid-template-columns: 1fr 1fr; }
  .battle-progress-card .planet-orbit-vertical-track { max-height: 240px; overflow: auto; }
  .battle-bottom-action-dock { gap: 10px; }
  .btn-return-galaxy { min-width: 44px; font-size: 0; }
  .btn-return-galaxy span { font-size: 22px; }
  .hud-score-pill { display: none; }
}

/* 登录与注册：品牌说明和操作表单双区布局。 */
.auth-modal-backdrop { padding: 20px; align-items: center; }
.auth-modal-box { display: grid; grid-template-columns: .86fr 1.14fr; width: min(820px, 94vw); max-width: 820px; max-height: min(720px, 92vh); padding: 0; overflow: hidden; border-color: rgba(92, 187, 255, .34); background: rgba(6, 22, 57, .98); }
.auth-brand-panel { position: relative; display: flex; flex-direction: column; justify-content: center; min-height: 520px; padding: 38px 34px; overflow: hidden; background: radial-gradient(circle at 22% 18%, rgba(54, 203, 255, .19), transparent 34%), linear-gradient(145deg, rgba(17, 74, 149, .96), rgba(27, 31, 107, .92)); }
.auth-brand-panel::after { content: ''; position: absolute; right: -70px; bottom: -90px; width: 230px; height: 230px; border: 1px solid rgba(117, 224, 255, .18); border-radius: 50%; box-shadow: 0 0 0 32px rgba(116, 113, 255, .06), 0 0 0 66px rgba(116, 113, 255, .04); }
.auth-brand-orbit { position: relative; z-index: 1; display: grid; width: 58px; height: 58px; margin-bottom: 24px; place-items: center; border: 1px solid rgba(147, 228, 255, .42); border-radius: 18px; background: rgba(2, 17, 51, .4); font-size: 31px; box-shadow: 0 0 28px rgba(71, 206, 255, .2); }
.auth-brand-kicker { position: relative; z-index: 1; color: #6ee7ff; font-size: 10px; font-weight: 800; letter-spacing: 2px; }
.auth-brand-panel h2 { position: relative; z-index: 1; margin: 10px 0 12px; color: #fff; font-size: 25px; line-height: 1.25; }
.auth-brand-panel p { position: relative; z-index: 1; margin: 0; color: #bdd0ec; font-size: 12px; line-height: 1.8; }
.auth-benefit-list { position: relative; z-index: 1; display: grid; gap: 10px; margin-top: 28px; color: #d8e9ff; font-size: 11px; }
.auth-benefit-list span::first-letter { color: #5eead4; }
.auth-form-panel { position: relative; padding: 32px 36px 26px; }
.auth-modal-close { position: absolute; top: 16px; right: 16px; z-index: 2; }
.auth-mobile-heading { display: flex; align-items: center; gap: 9px; margin-bottom: 20px; color: #f4f8ff; font-size: 17px; }
.auth-mobile-heading span { font-size: 21px; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; padding: 4px; border-radius: 13px; background: rgba(2, 13, 39, .65); }
.auth-tab-btn { min-height: 38px; border: 0; border-radius: 10px; background: transparent; color: #8298ba; font-size: 12px; font-weight: 700; cursor: pointer; }
.auth-tab-btn.active { background: linear-gradient(135deg, rgba(31, 127, 220, .72), rgba(74, 74, 195, .62)); color: #fff; box-shadow: 0 4px 18px rgba(26, 111, 209, .22); }
.auth-form { display: grid; gap: 13px; margin-top: 18px; }
.auth-field { display: grid; gap: 6px; }
.auth-field > span { color: #c9d7ec; font-size: 11px; font-weight: 650; }
.auth-field > span small { color: #7186aa; font-size: 9px; font-weight: 500; }
.auth-input-wrap { display: grid; grid-template-columns: 30px 1fr auto; align-items: center; min-height: 46px; padding: 0 11px; border: 1px solid rgba(99, 159, 255, .24); border-radius: 13px; background: rgba(2, 13, 39, .72); transition: border-color .18s ease, box-shadow .18s ease; }
.auth-input-wrap:focus-within { border-color: #58d7ff; box-shadow: 0 0 0 3px rgba(56, 189, 248, .1); }
.auth-input-wrap > i { font-style: normal; font-size: 14px; opacity: .75; }
.auth-input { width: 100%; height: 44px; padding: 0; border: 0 !important; outline: 0; background: transparent !important; color: #f3f8ff; font-size: 12px; box-shadow: none !important; }
.auth-input::placeholder { color: #526887; }
.auth-password-toggle { padding: 5px; border: 0; background: transparent; color: #61d8ff; font-size: 10px; cursor: pointer; }
.auth-message { display: none; min-height: 34px; padding: 9px 11px; border: 1px solid rgba(255, 113, 133, .3); border-radius: 10px; background: rgba(142, 31, 57, .16); color: #ff9aaa; font-size: 11px; }
.auth-message.show { display: block; }
.auth-submit-btn, .auth-guest-btn { display: flex; align-items: center; justify-content: center; min-height: 50px; border-radius: 14px; cursor: pointer; }
.auth-submit-btn { flex-direction: column; border: 1px solid rgba(121, 230, 255, .62); background: linear-gradient(135deg, #60dff2, #299af2); color: #06152e; box-shadow: 0 10px 25px rgba(31, 154, 235, .22); }
.auth-submit-btn span { font-size: 13px; font-weight: 850; }
.auth-submit-btn small { margin-top: 2px; font-size: 9px; opacity: .72; }
.auth-submit-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.auth-submit-btn:disabled, .auth-guest-btn:disabled { cursor: wait; opacity: .7; }
.auth-divider { display: flex; align-items: center; gap: 10px; color: #617594; font-size: 9px; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: rgba(117, 151, 204, .13); }
.auth-guest-btn { gap: 10px; border: 1px solid rgba(245, 180, 45, .24); background: rgba(105, 70, 14, .13); color: #ffd36b; }
.auth-guest-btn span { font-size: 11px; font-weight: 750; }
.auth-guest-btn small { color: #a69572; font-size: 9px; }
.auth-guest-btn:hover { border-color: rgba(245, 180, 45, .5); background: rgba(105, 70, 14, .24); }
.auth-privacy-note { margin: 0; color: #617594; font-size: 8px; line-height: 1.6; text-align: center; }
.auth-loading-dot { width: 14px; height: 14px; border: 2px solid rgba(5, 22, 48, .2); border-top-color: #06152e; border-radius: 50%; animation: authSpin .7s linear infinite; }
@keyframes authSpin { to { transform: rotate(360deg); } }

@media (max-width: 680px) {
  .auth-modal-backdrop { padding: 10px; }
  .auth-modal-box { display: block; width: 100%; max-height: 94vh; overflow-y: auto; border-radius: 22px; }
  .auth-brand-panel { display: none; }
  .auth-form-panel { padding: 25px 18px 20px; }
  .auth-mobile-heading { padding-right: 38px; }
  .auth-guest-btn { flex-direction: column; gap: 2px; }
}

@media (max-width: 580px) {
  .main-hero-cards-row,
  .quick-cards-grid,
  .backpack-grid,
  .achieve-grid,
  .checkin-grid,
  .result-stats-grid { grid-template-columns: 1fr; }
  .failure-explain-head { align-items: flex-start; flex-direction: column; }
  .failure-rule-grid { grid-template-columns: 1fr 1fr; }
  .hero-card { min-height: 350px; }
  .bottom-dock-nav { bottom: 8px; width: calc(100vw - 16px); }
  .dock-nav-item { min-height: 60px; padding-inline: 4px; }
  .dock-icon { font-size: 18px; }
  .dock-lbl { font-size: 11px; }
  .modal-backdrop { padding: 8px; align-items: flex-end; }
  .modal-box { width: 100%; max-height: 94vh; border-radius: 22px 22px 10px 10px; }
  .modal-header { padding: 15px 16px; }
  .modal-body { padding: 16px !important; }
  .result-dialog-overlay { padding: 10px; align-items: center; }
  .result-dialog-card { width: 100%; max-height: 92vh; padding: 20px 16px; border-radius: 20px; }
  .result-actions-row > button { width: 100%; }
  .tier-card { grid-template-columns: 48px 1fr; }
  .battle-right-sidebar { display: block; }
  .battle-bottom-action-dock { padding: 10px; }
  .battle-timer-dock-wrap { min-width: 0; }
  .btn-next-question-glow { min-width: 104px; padding-inline: 14px; }
  .floating-astronaut-companion { display: none; }
  .path-choice-strip { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}

/* ================= 2026-08 首页经济闭环与一屏指挥舱 ================= */
.chest-reward-hint {
  display: block;
  margin-top: 3px;
  color: var(--ink-3, #91a6c9);
  font-size: 10px;
  font-weight: 500;
}

.task-action-btn:disabled {
  cursor: default;
  opacity: .68;
}

.task-action-btn[data-state="claimable"] {
  color: #07142d;
  border-color: #76e5ff;
  background: linear-gradient(135deg, #67e8f9, #38bdf8);
  box-shadow: 0 0 18px rgba(56, 189, 248, .3);
}

.knowledge-strength-section {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(118, 183, 255, .14);
}

.knowledge-strength-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  color: #f4f8ff;
  font-size: 13px;
  font-weight: 700;
}

.knowledge-strength-heading small {
  color: var(--ink-3, #91a6c9);
  font-size: 9px;
  font-weight: 500;
}

.knowledge-strength-list { display: grid; gap: 8px; }
.knowledge-strength-row { display: grid; grid-template-columns: 16px minmax(48px, .9fr) 1.5fr 36px 38px; align-items: center; gap: 6px; }
.knowledge-strength-row .strength-rank { color: #fbbf24; font-size: 9px; font-weight: 800; }
.knowledge-strength-row .strength-name { overflow: hidden; color: #cddcff; font-size: 10px; white-space: nowrap; text-overflow: ellipsis; }
.knowledge-strength-row .strength-track { height: 6px; overflow: hidden; border-radius: 9px; background: rgba(126, 161, 219, .13); }
.knowledge-strength-row .strength-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #2dd4bf, #38bdf8); box-shadow: 0 0 10px rgba(56, 189, 248, .3); }
.knowledge-strength-row strong { color: #65e7ff; font-size: 10px; text-align: right; }
.knowledge-strength-row small { color: var(--ink-3, #91a6c9); font-size: 8px; text-align: right; }
.knowledge-strength-empty { padding: 18px 8px; color: var(--ink-3, #91a6c9); font-size: 11px; line-height: 1.6; text-align: center; }

@media (min-width: 1200px) and (min-height: 700px) {
  .top-navbar { min-height: 64px; padding: 10px 28px; }
  .main-view-container { height: calc(100vh - 64px); min-height: 0; padding: 14px 24px 70px; overflow: hidden; }
  .menu-view-wrapper { height: 100%; min-height: 0; }
  .starnavi-home-layout {
    grid-template-columns: minmax(230px, .78fr) minmax(560px, 1.8fr) minmax(260px, .88fr);
    gap: 16px;
    align-items: stretch;
    max-width: 1600px;
    height: 100%;
  }
  .home-left-sidebar { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 12px; min-height: 0; }
  .home-center-hub { display: flex; flex-direction: column; min-height: 0; }
  .home-right-sidebar { display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 12px; min-height: 0; }
  .glass-card { margin: 0; padding: 14px; border-radius: 20px; }
  .student-profile-card { padding: 14px; }
  .student-motto { margin-top: 8px; padding-top: 7px; }
  .task-center-card { min-height: 0; }
  .card-section-header { margin-bottom: 10px; }
  .task-items-list { gap: 8px; }
  .task-item { gap: 8px; padding: 8px 9px; }
  .task-icon-box { font-size: 17px; }
  .task-action-btn { padding: 4px 8px; }
  .star-chest-card { padding: 11px 14px; }
  .rocket-decoration-box { display: none; }
  .hero-title-banner { flex: 0 0 auto; margin-bottom: 12px; padding: 3px 0 0; }
  .main-hero-title { font-size: clamp(25px, 2.2vw, 38px); }
  .main-hero-desc { margin-top: 5px; font-size: 12px; }
  .main-hero-cards-row { flex: 1; min-height: 0; gap: 14px; }
  .hero-card { min-height: 0; height: 100%; padding: 18px 20px; border-radius: 24px; }
  .hero-card-visual { flex: 1; min-height: 110px; }
  .hero-mascot-icon { font-size: clamp(96px, 6.5vw, 136px); }
  .hero-card-title { font-size: clamp(25px, 2.2vw, 34px); }
  .hero-card-desc { margin-top: 3px; }
  .hero-card-btn { min-height: 52px; margin-top: 14px; }
  .stats-radar-card { min-height: 0; overflow: hidden; }
  .student-stats-trio { padding: 10px 6px; }
  .stat-trio-icon { font-size: 20px; }
  .stat-trio-val { font-size: 17px; }
  .stat-trio-lbl { font-size: 9px; }
  .knowledge-strength-section { margin-top: 9px; padding-top: 9px; }
  .knowledge-strength-list { gap: 6px; }
  .leaderboard-card { padding: 13px 14px; }
  .rank-user-row { min-height: 34px; padding-block: 6px; }
  .my-rank-footer { margin-top: 7px; padding-top: 8px; }
  .bottom-dock-nav { bottom: 8px; min-height: 52px; padding: 5px 10px; }
  .dock-nav-item { min-height: 42px; }
}

/* 侧栏按信息职责重新分区：个人数据在左，成长激励在右。 */
.side-feature-card {
  width: 100%;
  display: grid;
  grid-template-columns: 38px 1fr 18px;
  align-items: center;
  gap: 10px;
  color: #eef6ff;
  text-align: left;
  cursor: pointer;
  appearance: none;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.side-feature-card:hover { transform: translateY(-2px); border-color: rgba(90, 215, 255, .5); background: rgba(15, 49, 105, .82); }
.side-feature-card:focus-visible { outline: 2px solid #62dcff; outline-offset: 2px; }
.side-feature-icon { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 12px; background: rgba(62, 177, 255, .13); font-size: 20px; }
.side-feature-copy { display: grid; gap: 3px; }
.side-feature-copy strong { font-size: 13px; }
.side-feature-copy small { color: var(--ink-3, #91a6c9); font-size: 10px; }
.side-feature-arrow { color: #65dfff; font-size: 24px; text-align: right; }
.hero-card-sub-action {
  margin-top: 8px;
  padding: 6px 10px;
  border: 0;
  background: transparent;
  color: #9ceaff;
  font-size: 11px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.hero-card-sub-action:hover { color: #fff; }

/* 两张主模式卡片共享相同的内容行，避免附加入口挤压左卡片并造成标题、按钮错位。 */
.main-hero-cards-row { align-items: stretch; }
.main-hero-cards-row .hero-card {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto 35px;
  align-items: center;
}
.main-hero-cards-row .hero-card-visual {
  width: 100%;
  height: auto;
  align-self: stretch;
  justify-self: center;
}
.main-hero-cards-row .hero-card-text { width: 100%; }
.main-hero-cards-row .hero-card-sub-action { align-self: start; }

@media (min-width: 1200px) and (min-height: 700px) {
  .main-view-container { padding-bottom: 14px; }
  .home-left-sidebar {
    grid-column: 3;
    grid-row: 1;
    grid-template-rows: minmax(0, 1fr) auto auto;
  }
  .home-center-hub { grid-column: 2; grid-row: 1; }
  .home-right-sidebar {
    grid-column: 1;
    grid-row: 1;
    grid-template-rows: minmax(0, 1fr) auto auto;
  }
  .task-center-card { overflow: hidden; }
  .stats-radar-card { overflow: hidden; }
  .side-feature-card { min-height: 64px; padding: 11px 13px; }
  .hero-card-sub-action { flex: 0 0 auto; }
}

@media (max-width: 1199px) {
  .bottom-dock-nav { display: none !important; }
  .main-view-container { padding-bottom: 20px; }
}

/* 首页第二轮信息密度：展开背包、排行榜与成就。 */
.home-backpack-panel { margin-top: 12px; }
.home-backpack-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 10px; }
.home-backpack-heading > div { display: grid; gap: 3px; }
.home-backpack-heading strong { color: #f5f9ff; font-size: 14px; }
.home-backpack-heading small { color: var(--ink-3, #91a6c9); font-size: 10px; }
.backpack-manage-btn, .panel-link-button { border: 0; background: transparent; color: #64dcff; font: inherit; cursor: pointer; }
.backpack-manage-btn { padding: 6px 10px; border: 1px solid rgba(83, 205, 255, .3); border-radius: 999px; font-size: 10px; font-weight: 700; }
.backpack-manage-btn:hover { color: #fff; background: rgba(56, 189, 248, .14); }
.home-backpack-items { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.home-prop-item { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 9px; border: 1px solid rgba(99, 154, 238, .14); border-radius: 12px; background: rgba(4, 18, 51, .5); }
.home-prop-item > span { font-size: 19px; }
.home-prop-item div { display: grid; min-width: 0; }
.home-prop-item strong { color: #fbbf24; font-size: 13px; }
.home-prop-item small { overflow: hidden; color: #aabbd8; font-size: 9px; white-space: nowrap; text-overflow: ellipsis; }

.home-achievement-panel { display: flex; flex-direction: column; min-height: 0; }
.achievement-summary-row { display: grid; grid-template-columns: 40px auto 1fr; align-items: center; gap: 10px; padding: 10px; border-radius: 13px; background: rgba(4, 18, 51, .52); }
.achievement-summary-icon { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 12px; background: rgba(56, 189, 248, .14); font-size: 21px; }
.achievement-summary-row > div:nth-child(2) { display: grid; min-width: 76px; }
.achievement-summary-row strong { color: #f7fbff; font-size: 15px; }
.achievement-summary-row small { color: #91a6c9; font-size: 9px; }
.achievement-summary-track { height: 7px; overflow: hidden; border-radius: 10px; background: rgba(134, 165, 215, .14); }
.achievement-summary-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #f59e0b, #facc15); }
.home-achievement-list { display: grid; align-content: space-evenly; flex: 1; min-height: 0; margin-top: 8px; }
.home-achievement-row { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 8px; padding: 7px 4px; border-bottom: 1px solid rgba(119, 160, 220, .1); opacity: .72; }
.home-achievement-row > span { font-size: 17px; filter: grayscale(.6); }
.home-achievement-row > div { display: grid; }
.home-achievement-row strong { color: #d9e6fa; font-size: 11px; }
.home-achievement-row small { color: #8298ba; font-size: 9px; }
.home-achievement-row b { color: #8298ba; font-size: 9px; font-weight: 600; }
.home-achievement-row.unlocked { opacity: 1; }
.home-achievement-row.unlocked > span { filter: none; }
.home-achievement-row.unlocked b { color: #52e3b0; }

@media (min-width: 1200px) and (min-height: 700px) {
  .home-center-hub .main-hero-cards-row { flex: 1; min-height: 0; }
  .home-backpack-panel { flex: 0 0 auto; margin-top: 12px; padding: 12px 14px; }
  .home-right-sidebar { grid-template-rows: auto minmax(0, 1fr); }
  .home-right-sidebar .leaderboard-card { display: flex; flex-direction: column; min-height: 0; }
  .home-right-sidebar .rank-list-items { display: grid; align-content: space-evenly; flex: 1; min-height: 0; }
  .home-right-sidebar .rank-user-row { min-height: 40px; }
  .home-left-sidebar { grid-template-rows: auto auto minmax(0, 1fr); }
  .home-left-sidebar .task-center-card { min-height: auto; padding: 11px 12px; }
  .home-left-sidebar .task-items-list { gap: 6px; }
  .home-left-sidebar .task-item { padding-block: 6px; }
  .home-left-sidebar .home-achievement-panel { min-height: 0; }
}

@media (max-width: 820px) {
  .home-backpack-items { grid-template-columns: repeat(2, 1fr); }
  .home-prop-item:last-child { grid-column: 1 / -1; }
}

@media (min-width: 1200px) and (max-height: 780px) {
  .student-motto, .main-hero-desc, .task-sub { display: none; }
  .profile-header-row { gap: 10px; }
  .robot-avatar-box { width: 48px; height: 48px; }
  .task-center-card { padding: 11px; }
  .task-item { padding-block: 6px; }
  .hero-title-banner { margin-bottom: 8px; }
  .hero-card { padding: 14px 18px; }
  .hero-card-visual { min-height: 76px; }
  .hero-mascot-icon { font-size: clamp(78px, 6.5vw, 96px); }
  .hero-card-btn { min-height: 46px; margin-top: 9px; }
  .knowledge-strength-heading { margin-bottom: 7px; }
}

/* 成就奖励到账弹窗：替代浏览器原生 alert，保持沉浸式星际体验。 */
.achievement-reward-overlay {
  position: fixed;
  inset: 0;
  z-index: 7000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(1, 6, 22, .76);
  opacity: 0;
  backdrop-filter: blur(10px);
  transition: opacity .18s ease;
}
.achievement-reward-overlay.show { opacity: 1; }
.achievement-reward-dialog {
  position: relative;
  width: min(420px, calc(100vw - 32px));
  overflow: hidden;
  padding: 32px 32px 28px;
  border: 1px solid rgba(92, 220, 255, .42);
  border-radius: 26px;
  background:
    radial-gradient(circle at 50% -15%, rgba(69, 215, 255, .23), transparent 45%),
    linear-gradient(155deg, #102d64 0%, #091d48 52%, #101b43 100%);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .56), 0 0 42px rgba(38, 188, 255, .18), inset 0 1px rgba(255, 255, 255, .1);
  color: #fff;
  text-align: center;
  transform: translateY(14px) scale(.96);
  transition: transform .22s cubic-bezier(.2, .8, .2, 1);
}
.achievement-reward-overlay.show .achievement-reward-dialog { transform: translateY(0) scale(1); }
.achievement-reward-close {
  position: absolute;
  z-index: 3;
  top: 14px;
  right: 14px;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(170, 211, 255, .18);
  border-radius: 50%;
  background: rgba(8, 23, 57, .7);
  color: #a9bddb;
  font-size: 24px;
  cursor: pointer;
}
.achievement-reward-close:hover { border-color: rgba(103, 220, 255, .55); color: #fff; }
.achievement-reward-glow {
  position: absolute;
  top: -120px;
  left: 50%;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: rgba(40, 205, 255, .14);
  filter: blur(24px);
  transform: translateX(-50%);
  pointer-events: none;
}
.achievement-reward-sparkles i { position: absolute; color: #ffd45f; font-style: normal; text-shadow: 0 0 12px #ffc928; }
.achievement-reward-sparkles i:nth-child(1) { top: 45px; left: 70px; font-size: 18px; }
.achievement-reward-sparkles i:nth-child(2) { top: 95px; left: 40px; color: #66e6ff; }
.achievement-reward-sparkles i:nth-child(3) { top: 42px; right: 72px; font-size: 14px; }
.achievement-reward-sparkles i:nth-child(4) { top: 112px; right: 45px; color: #8befff; }
.achievement-reward-sparkles i:nth-child(5) { top: 156px; right: 82px; font-size: 10px; }
.achievement-reward-medal {
  position: relative;
  z-index: 1;
  display: grid;
  width: 88px;
  height: 88px;
  margin: 4px auto 16px;
  place-items: center;
  border: 1px solid rgba(255, 215, 86, .5);
  border-radius: 26px;
  background: linear-gradient(145deg, rgba(255, 205, 48, .2), rgba(255, 145, 31, .08));
  box-shadow: 0 0 32px rgba(255, 192, 35, .18), inset 0 0 20px rgba(255, 255, 255, .06);
  transform: rotate(-3deg);
}
.achievement-reward-medal span { font-size: 46px; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .28)); }
.achievement-reward-eyebrow { margin: 0 0 7px; color: #60defd; font-size: 12px; font-weight: 800; letter-spacing: .18em; }
.achievement-reward-dialog h3 { margin: 0; color: #fff; font-size: 25px; line-height: 1.25; }
.achievement-reward-copy { margin: 9px auto 18px; color: #9eb2d1; font-size: 13px; line-height: 1.6; }
.achievement-reward-amount { display: flex; align-items: baseline; justify-content: center; gap: 7px; margin: 2px 0 17px; color: #ffd34e; }
.achievement-reward-coin { display: grid; width: 25px; height: 25px; place-items: center; border: 2px solid #fff0a0; border-radius: 50%; background: linear-gradient(145deg, #ffd84a, #ee9218); color: rgba(255,255,255,.45); font-size: 8px; box-shadow: 0 0 14px rgba(255, 196, 39, .35); }
.achievement-reward-amount strong { font-size: 43px; line-height: 1; text-shadow: 0 4px 16px rgba(255, 185, 27, .22); }
.achievement-reward-amount small { font-size: 15px; font-weight: 800; }
.achievement-reward-balance { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; padding: 11px 14px; border: 1px solid rgba(100, 167, 241, .15); border-radius: 13px; background: rgba(3, 15, 43, .48); color: #9db1d0; font-size: 12px; }
.achievement-reward-balance strong { color: #f7fbff; font-size: 16px; }
.achievement-reward-confirm {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(100deg, #5de1f7, #25a4f3);
  box-shadow: 0 10px 24px rgba(29, 167, 240, .28), inset 0 1px rgba(255,255,255,.55);
  color: #031c3f;
  font: inherit;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}
.achievement-reward-confirm:hover { filter: brightness(1.08); transform: translateY(-1px); }
.achievement-reward-confirm:focus-visible, .achievement-reward-close:focus-visible { outline: 3px solid rgba(110, 228, 255, .5); outline-offset: 3px; }

@media (max-width: 520px) {
  .achievement-reward-dialog { padding: 28px 20px 22px; border-radius: 22px; }
  .achievement-reward-dialog h3 { font-size: 22px; }
  .achievement-reward-amount strong { font-size: 38px; }
}

@media (prefers-reduced-motion: reduce) {
  .achievement-reward-overlay, .achievement-reward-dialog { transition: none; }
}

/* 学员战绩中的星星与等级规则说明。 */
.growth-rule-details { position: relative; margin: -8px 0 12px; }
.growth-rule-details summary { display: flex; width: max-content; margin-left: auto; align-items: center; gap: 5px; color: #7edfff; font-size: 10px; cursor: pointer; list-style: none; }
.growth-rule-details summary::-webkit-details-marker { display: none; }
.growth-rule-details summary:hover { color: #fff; }
.growth-rule-popover { position: absolute; z-index: 20; top: calc(100% + 8px); right: 0; width: min(350px, calc(100vw - 48px)); padding: 14px 15px; border: 1px solid rgba(94, 218, 255, .34); border-radius: 14px; background: linear-gradient(155deg, #102d62, #071a42); box-shadow: 0 16px 40px rgba(0,0,0,.42); color: #a9bddb; text-align: left; }
.growth-rule-popover::before { content: ''; position: absolute; top: -5px; right: 24px; width: 9px; height: 9px; border-top: 1px solid rgba(94, 218, 255, .34); border-left: 1px solid rgba(94, 218, 255, .34); background: #102d62; transform: rotate(45deg); }
.growth-rule-popover strong { display: block; margin-bottom: 3px; color: #f6c84e; font-size: 11px; }
.growth-rule-popover p { margin: 0 0 10px; font-size: 10px; line-height: 1.65; }
.growth-rule-popover p:last-child { margin-bottom: 0; }
