:root {
  --student-ink: #17324f;
  --student-muted: #60758a;
  --student-green: #16815c;
}

* { box-sizing: border-box; }

.student-session-context,
.student-home-route-proxies,
.student-home-status {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}

.economy-dashboard-menu button[hidden] { display: none !important; }
.economy-dashboard-menu button.is-locked { cursor: not-allowed; opacity: .58; }

.economy-home-mission-header-action,
.economy-wallet-notice-head > a,
.economy-wallet-info-head > a,
.economy-wallet-parent-message-head > a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: inherit;
  text-decoration: none;
}

.economy-wallet-notice-head > a,
.economy-wallet-info-head > a,
.economy-wallet-parent-message-head > a {
  min-height: 32px;
  border: 1px solid rgba(22, 129, 92, .18);
  border-radius: 8px;
  background: #fff;
  padding: 6px 10px;
  color: #16815c;
  font-size: 11px;
  font-weight: 1000;
  white-space: nowrap;
}

.student-summary-message,
.economy-wallet-notice-list > .student-summary-message,
.economy-home-mission-list > .student-summary-message {
  width: 100%;
  margin: 0;
  color: #52677c;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.45;
}

.student-home-avatar-source {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: #fff;
}
.student-home-avatar-source img { width: 100%; height: 100%; object-fit: cover; }
.student-home-avatar-source img[data-avatar-source='fallback'] { object-fit: contain; }

.economy-home-student-menu-card > i {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(223, 252, 229, .72), rgba(193, 230, 172, .42));
  color: #16815c;
}

.student-favorite-status { min-height: 18px; margin: 9px 0 0; color: var(--student-muted); font-size: 10px; font-weight: 800; }

.student-admin-preview-switchbar {
  position: sticky;
  z-index: 80;
  top: 0;
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #263c57;
  background: #0d1827;
  padding: 8px 22px;
  color: #eef5ff;
  box-shadow: 0 8px 24px rgb(4 10 20 / 28%);
}
.student-admin-preview-switchbar[hidden], .student-admin-preview-audit[hidden] { display: none !important; }
.student-admin-preview-switchbar > div:first-child, .student-admin-preview-actions, .student-admin-preview-audit { display: flex; align-items: center; gap: 8px; }
.student-admin-preview-switchbar span, .student-admin-preview-audit label { color: #b7cae3; font-size: 10px; font-weight: 900; }
.student-admin-preview-actions a, .student-admin-preview-audit button { display: inline-flex; min-height: 36px; align-items: center; border: 1px solid #3c5b80; border-radius: 7px; background: #13253b; padding: 0 13px; color: #e3efff; font-size: 11px; font-weight: 900; text-decoration: none; }
.student-admin-preview-audit input { min-height: 36px; border: 1px solid #3c5b80; border-radius: 7px; background: #081322; padding: 0 10px; color: #fff; }
body.teacher-student-preview .student-economy-app button,
body.teacher-student-preview .student-economy-app input,
body.teacher-student-preview .student-economy-app select,
body.teacher-student-preview .student-economy-app textarea { pointer-events: none; }

.student-home-teacher-mode {
  position: fixed;
  z-index: 75;
  right: 18px;
  bottom: 18px;
  min-height: 44px;
  border: 1px solid #31445e;
  border-radius: 999px;
  background: #101a29;
  padding: 0 18px;
  color: #f1f5fb;
  box-shadow: 0 10px 28px rgb(15 23 42 / 32%);
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.student-home-tutorial { width: min(540px, calc(100% - 28px)); padding: 0; border: 1px solid #dfb861; border-radius: 18px; background: #fffaf0; color: var(--student-ink); box-shadow: 0 22px 55px rgba(15, 23, 42, .32); }
.student-home-tutorial::backdrop { background: rgba(15, 23, 42, .64); backdrop-filter: blur(3px); }
.student-home-tutorial form { display: grid; gap: 16px; padding: 22px; }
.student-home-tutorial header span { color: var(--student-green); font-size: 10px; font-weight: 900; letter-spacing: .08em; }
.student-home-tutorial h2 { margin: 4px 0 0; font-size: 24px; }
.student-home-tutorial ol { display: grid; gap: 9px; margin: 0; padding-left: 25px; }
.student-home-tutorial li strong, .student-home-tutorial li span, .student-favorite-option strong, .student-favorite-option small { display: block; }
.student-home-tutorial li span { margin-top: 2px; color: var(--student-muted); font-size: 11px; line-height: 1.45; }
.student-home-tutorial button { min-height: 46px; border: 0; border-radius: 10px; background: var(--student-green); color: #fff; font: inherit; font-weight: 900; cursor: pointer; }
.student-favorite-dialog { max-height: min(760px, calc(100vh - 28px)); }
.student-favorite-dialog form { grid-template-rows: auto minmax(0, 1fr) auto auto; max-height: min(716px, calc(100vh - 72px)); }
.student-favorite-options { display: grid; gap: 8px; overflow-y: auto; padding: 2px; }
.student-favorite-option { min-height: 52px; display: grid; grid-template-columns: 24px minmax(0, 1fr); align-items: center; gap: 10px; border: 1px solid rgba(195, 137, 47, .28); border-radius: 11px; padding: 8px 12px; background: #fffef9; }
.student-favorite-option input { width: 20px; height: 20px; accent-color: var(--student-green); }
.student-favorite-option small, .student-favorite-dialog header p { color: var(--student-muted); font-size: 10px; }
.student-favorite-dialog-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.student-favorite-dialog-actions button:last-child { background: var(--student-green); color: #fff; }

@media (max-width: 700px) {
  .student-admin-preview-switchbar { align-items: stretch; flex-direction: column; }
  .student-admin-preview-actions { flex-wrap: wrap; }
}
