* {
  box-sizing: border-box;
  margin: 0;
  padding: 0
}

:root {
  --bg: #0f1117;
  --bg2: #161b25;
  --bg3: #1e2535;
  --bg4: #252d40;
  --border: #2a3348;
  --border2: #3a4a6a;
  --text: #e8edf5;
  --text2: #8a9bbf;
  --text3: #5a6a8a;
  --accent: #3d7fff;
  --accent2: #2563eb;
  --accent-text: #ffffff;
  --accent-glow: rgba(61, 127, 255, 0.15);
  --green: #22c55e;
  --amber: #f59e0b;
  --red: #ef4444;
  --purple: #a78bfa;
  --r: 10px;
  --r2: 14px;
}

html,
body {
  height: 100%;
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow: hidden
}

a {
  color: inherit;
  text-decoration: none
}

button {
  font-family: 'DM Sans', sans-serif;
  cursor: pointer
}

input {
  font-family: 'DM Sans', sans-serif
}

/* ── LOGIN SCREEN ── */
/* Independence notice above the login screen */
#site-notice {
    background: #fef3c7;
    color: #92400e;
    border-bottom: 1px solid rgba(146, 64, 14, .18);
    padding: 11px 20px;
    font-size: 12.5px;
    line-height: 1.6;
    text-align: center;
}

#site-notice strong {
    font-weight: 700;
}

[data-theme="dark"] #site-notice {
    background: rgba(245, 158, 11, .12);
    color: #fbbf24;
    border-bottom-color: rgba(245, 158, 11, .2);
}

#login-screen {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.login-footer {
  margin-top: 20px;
  text-align: center;
}

.login-footer a {
  font-size: 12px;
  color: var(--text3);
  text-decoration: underline;
  cursor: pointer;
  transition: color 0.15s;
}

.login-footer a:hover {
  color: var(--text2);
}

.login-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r2);
  padding: 32px 28px;
  width: 100%;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.login-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  text-align: center;
  margin-bottom: 8px;
}

.login-input {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
}

.login-input::placeholder {
  color: var(--text3);
}

.login-input:focus {
  border-color: var(--accent);
}

.login-btn {
  background: var(--accent);
  color: var(--accent-text);
  border: none;
  border-radius: var(--r, 8px);
  padding: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
  transition: opacity 0.15s;
}

.login-btn:hover {
  background: var(--accent2);
}

.login-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.login-error {
  color: var(--red);
  font-size: 12.5px;
  text-align: center;
  min-height: 18px;
  font-weight: 500;
}

/* ── LAYOUT ── */
.app {
  display: flex;
  height: 100dvh;
  overflow: hidden
}

/* ── SIDEBAR ── */
.sidebar {
  width: 230px;
  min-width: 230px;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar::-webkit-scrollbar {
  width: 4px
}

.sidebar::-webkit-scrollbar-thumb {
  background: var(--border2);
  border-radius: 4px
}

.sidebar-logo {
  padding: 20px 18px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.logo-icon {
  width: 34px;
  height: 34px;
  background: var(--accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.logo-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.3px
}

.logo-sub {
  font-size: 11px;
  color: var(--text3);
  margin-top: 1px
}

.nav-section {
  padding: 12px 10px 4px
}

.nav-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text3);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 0 8px;
  margin-bottom: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--r);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  color: var(--text2);
  font-size: 13.5px;
  font-weight: 400;
  transition: all 0.15s;
  cursor: pointer;
  margin-bottom: 1px;
}

.nav-item:hover {
  background: var(--bg3);
  color: var(--text)
}

.nav-item.active {
  background: var(--accent-glow);
  color: var(--accent);
  font-weight: 500
}

.nav-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0
}

/* ── MAIN ── */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0
}

.topbar {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.topbar-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  flex: 1
}

.avatar {
  width: 32px;
  height: 32px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  flex-shrink: 0;
  overflow: hidden;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.notif-btn {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  margin-left: auto;
}

.content {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px
}

.content::-webkit-scrollbar {
  width: 4px
}

.content::-webkit-scrollbar-thumb {
  background: var(--border2);
  border-radius: 4px
}

/* PAGE SECTIONS */
.page {
  display: none;
  flex-direction: column;
  gap: 18px
}

.page.active {
  display: flex
}

/* ── CARDS ── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px
}

.stat-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r2);
  padding: 16px 18px;
}

.stat-label {
  font-size: 11px;
  color: var(--text3);
  font-weight: 500;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  margin-bottom: 8px
}

.stat-val {
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  font-family: 'Space Mono', monospace;
  margin-bottom: 4px
}

.stat-sub {
  font-size: 12px;
  color: var(--text3)
}

.stat-sub .up {
  color: var(--green)
}

.stat-sub .dn {
  color: var(--red)
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px
}

.three-col {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px
}

.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r2);
  padding: 18px 20px
}

.full-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r2);
  padding: 18px 20px
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px
}

.card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.2px
}

.card-action {
  font-size: 12px;
  color: var(--accent);
  cursor: pointer;
  font-weight: 500
}

/* EXAM ITEMS */
.exam-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border)
}

.exam-item:last-child {
  border-bottom: none;
  padding-bottom: 0
}

.exam-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0
}

.exam-info {
  flex: 1;
  min-width: 0
}

.exam-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis
}

.exam-date {
  font-size: 11px;
  color: var(--text3)
}

.exam-badge {
  font-size: 11px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 20px;
  white-space: nowrap
}

.badge-upcoming {
  background: rgba(61, 127, 255, 0.15);
  color: var(--accent)
}

.badge-live {
  background: rgba(239, 68, 68, 0.15);
  color: var(--red)
}

.badge-done {
  background: rgba(34, 197, 94, 0.12);
  color: var(--green)
}

/* SUBJECT BARS */
.subject-bar {
  margin-bottom: 10px
}

.subject-bar:last-child {
  margin-bottom: 0
}

.sb-top {
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px
}

.sb-name {
  font-size: 12px;
  color: var(--text2);
  font-weight: 500
}

.sb-val {
  font-size: 12px;
  color: var(--text3);
  font-family: 'Space Mono', monospace
}

.sb-track {
  height: 5px;
  background: var(--bg4);
  border-radius: 4px;
  overflow: hidden
}

.sb-fill {
  height: 100%;
  border-radius: 4px
}

/* CLASS ITEMS */
.class-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border)
}

.class-item:last-child {
  border-bottom: none;
  padding-bottom: 0
}

.class-time {
  font-size: 11px;
  color: var(--text3);
  font-family: 'Space Mono', monospace;
  min-width: 48px
}

.class-info {
  flex: 1;
  min-width: 0
}

.class-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 1px
}

.class-teacher {
  font-size: 11px;
  color: var(--text3)
}

.class-btn {
  background: var(--accent);
  color: var(--accent-text);
  border: 1px solid transparent;
  border-radius: var(--r, 6px);
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 600;
}

.class-btn.gray {
  background: var(--bg3);
  color: var(--text2);
  border: 1px solid var(--border)
}

/* NOTICE */
.notice-item {
  padding: 10px 12px;
  background: var(--bg3);
  border-radius: var(--r);
  margin-bottom: 8px;
  border-left: 3px solid var(--accent);
}

.notice-item:last-child {
  margin-bottom: 0
}

.notice-item.amber {
  border-left-color: var(--amber)
}

.notice-item.red {
  border-left-color: var(--red)
}

.notice-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 2px
}

.notice-time {
  font-size: 11px;
  color: var(--text3)
}

/* TIMETABLE */
.tt-grid {
  display: grid;
  grid-template-columns: 60px repeat(6, 1fr);
  gap: 1px;
  background: var(--border);
  border-radius: var(--r);
  overflow: hidden;
  font-size: 12px
}

.tt-cell {
  background: var(--bg2);
  padding: 8px 10px
}

.tt-header {
  background: var(--bg3);
  font-weight: 600;
  font-size: 11px;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.5px
}

.tt-time {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: var(--text3)
}

.tt-class {
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 11px;
  font-weight: 500
}

.tt-phy {
  background: rgba(61, 127, 255, 0.15);
  color: var(--accent)
}

.tt-chem {
  background: rgba(167, 139, 250, 0.15);
  color: var(--purple)
}

.tt-math {
  background: rgba(34, 197, 94, 0.12);
  color: var(--green)
}

.tt-empty {
  color: var(--text3);
  font-size: 11px
}

.tt-select {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 13px;
  color: var(--text);
  outline: none;
  cursor: pointer;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

.tt-select:focus {
  border-color: var(--accent);
}

.manual-tool-row {
  display: flex;
  gap: 12px;
  margin-bottom: -6px;
  align-items: center;
  flex-wrap: wrap
}

.manual-tool-form {
  display: flex;
  gap: 8px;
  align-items: center;
  min-width: 220px
}

.manual-tool-input {
  width: 150px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 13px;
  color: var(--text);
  outline: none;
}

.manual-tool-input::placeholder {
  color: var(--text3)
}

.manual-tool-input:focus {
  border-color: var(--accent)
}

.manual-tool-form .start-btn {
  margin-top: 0;
  white-space: nowrap
}

/* EXAM HALL */
.exam-hall-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--r2);
  margin-bottom: 10px;
}

.exam-hall-item:last-child {
  margin-bottom: 0
}

.exam-hall-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.exam-hall-info {
  flex: 1;
  min-width: 0
}

.exam-hall-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 3px
}

.exam-hall-meta {
  font-size: 12px;
  color: var(--text3)
}

.exam-hall-right {
  text-align: right;
  flex-shrink: 0
}

.exam-hall-score {
  font-size: 16px;
  font-weight: 700;
  font-family: 'Space Mono', monospace
}

.exam-hall-rank {
  font-size: 11px;
  color: var(--text3);
  margin-top: 2px
}

.exam-hall-header-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 3px;
}

.exam-hall-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.exam-syllabus-btn {
  padding: 5px 10px;
  font-size: 11.5px;
  gap: 5px;
  margin-top: 0;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}

/* SYLLABUS MODAL */
.syllabus-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 5000;
  padding: 16px;
}

.syllabus-modal-card {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: 14px;
  max-width: 680px;
  width: 100%;
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  animation: modalFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.syllabus-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  gap: 12px;
}

.syllabus-modal-header-info {
  min-width: 0;
  flex: 1;
}

.syllabus-modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.syllabus-modal-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.syllabus-modal-meta {
  font-size: 12px;
  color: var(--text3);
  margin-top: 2px;
  line-height: 1.4;
}

.syllabus-modal-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.syllabus-modal-copy-btn {
  margin: 0;
  padding: 6px 11px;
  font-size: 11.5px;
  min-height: 32px;
}

.syllabus-modal-close-btn {
  background: var(--bg3);
  color: var(--text2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  transition: background 0.15s ease, color 0.15s ease;
}

.syllabus-modal-close-btn:hover {
  background: var(--bg4);
  color: var(--text);
}

.syllabus-modal-body {
  padding: 16px 18px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.syllabus-modal-subject-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 13px 15px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.syllabus-modal-subject-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
}

.syllabus-modal-topic {
  font-size: 12.5px;
  color: var(--text2);
  line-height: 1.5;
  padding-left: 10px;
  border-left: 2px solid var(--border2);
}

.start-btn {
  background: var(--accent);
  color: var(--accent-text);
  border: 1px solid transparent;
  border-radius: var(--r, 8px);
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  line-height: 1.2;
  transition: opacity 0.15s ease, background 0.15s ease;
  text-decoration: none;
}

.start-btn:hover:not(:disabled) {
  opacity: 0.9;
}

.start-btn.gray {
  background: var(--bg3);
  color: var(--text2);
  border: 1px solid var(--border);
}

.start-btn.gray:hover:not(:disabled) {
  background: var(--bg4);
  color: var(--text);
  border-color: var(--border2);
}

.start-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* COURSE DETAIL MODAL */
.course-detail-modal-card {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: 12px;
  max-width: 720px;
  width: 100%;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden
}

.course-detail-prose {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
  overflow-x: auto
}

.course-detail-prose a {
  color: var(--accent);
  word-break: break-word
}

.course-detail-prose img {
  max-width: 100%;
  height: auto;
  border-radius: 8px
}

.course-detail-prose table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin: 10px 0
}

.course-detail-prose td,
.course-detail-prose th {
  border: 1px solid var(--border);
  padding: 8px;
  vertical-align: top;
  background: var(--bg3)
}

/* ═══════════════════════════════════════════════
   RESULT ANALYSIS — v2 Monochromatic Design
═══════════════════════════════════════════════ */
.result-modal-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  max-width: 900px;
  width: 100%;
  max-height: 88vh;
  overflow: auto;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.result-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg2);
  z-index: 2;
}

.result-modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.report-container-minimal {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.report-header-grid {
  display: grid;
  grid-template-columns: 1.8fr 1.2fr;
  gap: 16px;
}

.report-info-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--r2);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.report-info-card.primary-card {
  border-left: 3px solid var(--accent);
}

.report-info-card h2 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text);
  line-height: 1.3;
}

.report-info-card p {
  font-size: 12px;
  color: var(--text2);
}

.report-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.report-meta-item {
  display: flex;
  flex-direction: column;
}

.report-meta-label {
  font-size: 9.5px;
  font-weight: 700;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 3px;
}

.report-meta-val {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Metrics Summary Cards ── */
.report-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.report-metric-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--r2);
  padding: 16px 14px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 96px;
  transition: border-color 0.15s, background 0.15s;
}

.report-metric-card:hover {
  border-color: var(--border2);
  background: var(--bg4);
}

.report-metric-card.accent-card {
  border-color: var(--accent);
  background: var(--accent-glow);
}

.report-metric-label {
  font-size: 9.5px;
  font-weight: 700;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 8px;
}

.report-metric-val {
  font-family: 'Space Mono', monospace;
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}

.report-metric-card.accent-card .report-metric-val {
  color: var(--accent);
}

.report-metric-sub {
  font-size: 11px;
  color: var(--text3);
  margin-top: 6px;
  line-height: 1.4;
}

/* ── Section Title ── */
.report-section-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
  padding-left: 10px;
  border-left: 2px solid var(--accent);
  margin-bottom: 10px;
}

/* ── Subject Table ── */
.report-table-wrapper {
  border: 1px solid var(--border);
  border-radius: var(--r2);
  overflow-x: auto;
  background: var(--bg3);
}

.report-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}

.report-table th,
.report-table td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
}

.report-table th {
  background: var(--bg4);
  font-size: 9.5px;
  font-weight: 700;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.report-table tr:last-child td {
  border-bottom: none;
}

.report-table tr:hover td {
  background: var(--bg4);
}

.report-table td.mono {
  font-family: 'Space Mono', monospace;
}

.report-table td.font-semibold {
  font-weight: 600;
}

/* Score Breakdown inline format */
.report-breakdown-row {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  font-weight: 500;
}

.report-breakdown-row span.c {
  color: var(--green);
}

.report-breakdown-row span.w {
  color: var(--red);
}

.report-breakdown-row span.u {
  color: var(--text3);
}

/* ── Attempt Bar ── */
.report-attempt-bar-container {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--r2);
  padding: 16px 18px;
}

.report-attempt-bar-text {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  color: var(--text2);
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 8px;
}

.report-attempt-bar-text span strong {
  color: var(--text);
  font-weight: 600;
}

.report-attempt-bar-line {
  height: 5px;
  background: var(--border);
  border-radius: 3px;
  display: flex;
  overflow: hidden;
  gap: 1px;
}

.report-attempt-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s ease;
}

.report-attempt-bar-fill.correct {
  background: #22c55e;
}

.report-attempt-bar-fill.wrong {
  background: #ef4444;
}

.report-attempt-bar-fill.skipped {
  background: var(--text3);
}

/* ── Class Top Performers ── */
.report-leaderboard-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--r2);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.report-leaderboard-entry {
  display: flex;
  align-items: center;
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
  transition: background 0.12s;
}

.report-leaderboard-entry:last-child {
  border-bottom: none;
}

.report-leaderboard-entry:hover {
  background: var(--bg4);
}

.report-lead-rank {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--bg4);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--text3);
  font-family: 'Space Mono', monospace;
  flex-shrink: 0;
}

.report-leaderboard-entry:nth-child(1) .report-lead-rank {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.3);
  color: #f59e0b;
}

.report-leaderboard-entry:nth-child(2) .report-lead-rank {
  background: rgba(148, 163, 184, 0.10);
  border-color: rgba(148, 163, 184, 0.25);
  color: #94a3b8;
}

.report-leaderboard-entry:nth-child(3) .report-lead-rank {
  background: rgba(205, 127, 50, 0.10);
  border-color: rgba(205, 127, 50, 0.25);
  color: #cd7f32;
}

.report-lead-name {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.report-lead-score {
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  background: var(--bg4);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3px 8px;
}

/* ── Action Buttons ── */
.report-actions {
  display: flex;
  gap: 8px;
  margin-top: 0;
  flex-wrap: wrap;
  align-items: center;
}

.report-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--bg3);
  color: var(--text2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  text-decoration: none;
  white-space: nowrap;
}

.report-btn svg {
  flex-shrink: 0;
  opacity: 0.7;
}

.report-btn:hover {
  color: var(--text);
  border-color: var(--border2);
  background: var(--bg4);
}

.report-btn:hover svg {
  opacity: 1;
}

.report-btn.primary {
  background: var(--accent);
  color: var(--accent-text, #000);
  border-color: transparent;
}

.report-btn.primary svg {
  opacity: 1;
}

.report-btn.primary:hover {
  background: var(--accent2);
  border-color: transparent;
}

.report-btn.secondary-accent {
  background: var(--accent-glow);
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 35%, transparent);
}

.report-btn.secondary-accent:hover {
  background: color-mix(in srgb, var(--accent) 20%, transparent);
  border-color: var(--accent);
  color: var(--text);
}

/* ── Tags / Chips ── */
.result-tags-minimal {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.result-chip-minimal {
  font-size: 10px;
  font-weight: 600;
  color: var(--text3);
  background: var(--bg4);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 9px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.result-link {
  font-size: 12px;
  color: var(--text);
  border: 1px solid var(--border);
  background: var(--bg3);
  border-radius: 8px;
  padding: 7px 12px;
  font-weight: 600;
  text-decoration: none
}

.leaderboard-wrap {
  margin-top: 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: auto;
  background: var(--bg3)
}

.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
  font-size: 12px
}

.leaderboard-table th,
.leaderboard-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  white-space: nowrap
}

.leaderboard-table th {
  font-size: 10.5px;
  color: var(--text2);
  text-transform: uppercase;
  background: var(--bg4);
  font-weight: 700;
  letter-spacing: 0.4px
}

.leaderboard-table td {
  color: var(--text)
}

.leaderboard-table tr:last-child td {
  border-bottom: none
}

.leaderboard-rank {
  color: var(--accent);
  font-family: 'Space Mono', monospace;
  font-weight: 700
}

.leaderboard-score {
  color: var(--text);
  font-family: 'Space Mono', monospace;
  font-weight: 700
}

.leaderboard-subjects {
  display: flex;
  gap: 5px;
  flex-wrap: wrap
}

.leaderboard-subject {
  border: 1px solid var(--border);
  background: var(--bg2);
  border-radius: 999px;
  padding: 2px 7px;
  color: var(--text);
  font-family: 'Space Mono', monospace;
  font-size: 11px
}

.leaderboard-card-list {
  display: none;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px
}

.leaderboard-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px
}

.leaderboard-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px
}

.leaderboard-rank-pill {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(61, 127, 255, 0.14);
  border: 1px solid rgba(61, 127, 255, 0.28);
  color: var(--accent);
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  flex-shrink: 0
}

.leaderboard-card-score {
  text-align: right
}

.leaderboard-card-score .leaderboard-score {
  font-size: 18px;
  display: block
}

/* MESSAGES */
#page-messages.active {
  display: flex;
  flex-direction: row;
  height: calc(100vh - 114px);
  gap: 16px;
  padding: 0;
}

.msg-sidebar {
  width: 320px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r2);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow: hidden;
}

.msg-content {
  flex: 1;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r2);
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.msg-group-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--r);
  cursor: pointer;
  transition: all 0.15s;
}

.msg-group-item:hover,
.msg-group-item.active {
  border-color: var(--accent);
}

.msg-group-item.unread {
  border-left: 3px solid var(--accent);
}

.msg-group-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg4);
  flex-shrink: 0;
}

.msg-group-icon-fallback {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
}

.msg-bubble {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 12px 12px 12px 2px;
  padding: 12px 16px;
  width: fit-content;
  max-width: 85%;
  align-self: flex-start;
}

.msg-bubble-text {
  font-size: 13px;
  color: var(--text);
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.msg-bubble-meta {
  font-size: 11px;
  color: var(--text3);
  margin-top: 6px;
  text-align: right;
}

.msg-back {
  display: none;
  background: var(--bg4);
  border: 1px solid var(--border);
  color: var(--text2);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
}

/* COURSES */
.course-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r2);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  overflow: hidden;
}

.course-image {
  aspect-ratio: 16/9;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg3);
}

.course-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.course-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.course-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  width: fit-content;
  max-width: 70%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.course-type {
  font-size: 11px;
  color: var(--text2);
  white-space: nowrap;
}

.course-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
  overflow-wrap: anywhere
}

.course-sub {
  font-size: 12px;
  color: var(--text3)
}

.course-meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  font-size: 12px;
  color: var(--text3);
}

.course-meta b {
  color: var(--text2);
  font-weight: 700;
}

.course-prog-bar {
  height: 4px;
  background: var(--bg4);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 4px
}

.course-prog-fill {
  height: 100%;
  border-radius: 4px;
  background: var(--accent)
}

.course-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between
}

.course-pct {
  font-size: 12px;
  color: var(--text2);
  font-weight: 500
}

.course-btn {
  background: var(--bg3);
  color: var(--accent);
  border: 1px solid rgba(61, 127, 255, 0.3);
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}

/* SCROLLBAR */
::-webkit-scrollbar {
  width: 4px;
  height: 4px
}

::-webkit-scrollbar-track {
  background: transparent
}

::-webkit-scrollbar-thumb {
  background: var(--border2);
  border-radius: 4px
}

/* MOBILE */
@media(max-width:768px) {
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 100;
    transform: translateX(-100%);
    transition: transform 0.25s;
    width: 240px;
  }

  .sidebar.open {
    transform: translateX(0)
  }

  .main {
    width: 100%
  }

  .stats-row {
    grid-template-columns: repeat(2, 1fr)
  }

  .stat-card {
    padding: 14px
  }

  .stat-val {
    font-size: 19px
  }

  .two-col {
    grid-template-columns: 1fr
  }

  .three-col {
    grid-template-columns: 1fr
  }

  .hamburger {
    display: flex !important
  }

  .content {
    padding: 14px 14px 90px;
    height: calc(100dvh - 56px);
    overflow-y: auto
  }

  .topbar {
    padding: 0 12px;
    position: sticky;
    top: 0;
    z-index: 90
  }

  .topbar-title {
    font-size: 14px
  }

  .notif-btn {
    margin-left: 0
  }

  .avatar {
    width: 30px;
    height: 30px
  }

  .card,
  .full-card {
    padding: 14px
  }

  .exam-hall-item {
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
  }

  .exam-hall-right {
    text-align: right;
    margin-left: auto;
    flex-shrink: 0;
  }

  .exam-hall-score {
    font-size: 14px;
  }

  .login-card {
    max-width: 100%;
    margin: 0 14px;
    padding: 24px 18px
  }

  .result-modal-card {
    max-height: 94dvh;
    border-radius: 10px;
    margin: 10px
  }

  .result-hero {
    grid-template-columns: 1fr 1fr;
    gap: 8px
  }

  .result-hero-score {
    grid-column: 1 / -1
  }

  .result-hero-value {
    font-size: 28px
  }

  .result-grid,
  .result-grid.three {
    grid-template-columns: repeat(3, minmax(0, 1fr))
  }

  .subject-result-head {
    align-items: center
  }

  .subject-highlight-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr))
  }

  .subject-result-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr))
  }

  .subject-result-score {
    font-size: 16px;
    padding: 4px 8px
  }

  .result-title {
    font-size: 14px
  }

  .leaderboard-wrap {
    display: none
  }

  .leaderboard-card-list {
    display: flex
  }

  #page-messages.active {
    flex-direction: column;
    height: calc(100dvh - 178px);
    gap: 10px;
  }

  .msg-sidebar {
    width: 100%;
    height: 100%;
    flex-shrink: 0;
  }

  .msg-content {
    width: 100%;
    height: 100%;
    flex-shrink: 0;
  }

  #page-messages.active .msg-content {
    display: none;
  }

  #page-messages.active.thread-open .msg-sidebar {
    display: none;
  }

  #page-messages.active.thread-open .msg-content {
    display: flex;
  }

  .msg-back {
    display: inline-flex;
    align-items: center
  }

  #page-courses {
    gap: 12px;
  }

  #courses-grid {
    gap: 12px;
  }

  .course-card {
    position: relative;
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    grid-template-areas:
      "image head"
      "image name"
      "image meta"
      "image progress"
      "image bottom";
    gap: 7px 12px;
    border-radius: 16px;
    padding: 12px;
    min-height: 134px;
    background:
      linear-gradient(90deg, color-mix(in srgb, var(--course-tone, var(--accent)) 12%, transparent), transparent 45%),
      var(--bg2);
  }

  .course-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 12px;
    bottom: 12px;
    width: 3px;
    border-radius: 0 99px 99px 0;
    background: var(--course-tone, var(--accent));
  }

  .course-card.no-image {
    grid-template-columns: 1fr;
    grid-template-areas:
      "head"
      "name"
      "meta"
      "progress"
      "bottom";
    min-height: 0;
    padding-left: 14px;
  }

  .course-image {
    grid-area: image;
    width: 86px;
    height: 110px;
    aspect-ratio: auto;
    border-radius: 13px;
    align-self: stretch;
  }

  .course-head {
    grid-area: head;
    align-items: center;
    min-width: 0;
  }

  .course-badge {
    max-width: 100%;
    padding: 4px 8px;
    font-size: 9.5px;
    letter-spacing: 0.35px;
  }

  .course-type {
    display: none;
  }

  .course-name {
    grid-area: name;
    font-size: 14px;
    line-height: 1.28;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .course-meta {
    grid-area: meta;
    grid-template-columns: 1fr;
    gap: 5px;
    font-size: 10.8px;
  }

  .course-meta span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .course-meta b {
    display: inline-block;
    min-width: 34px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.2px;
  }

  .course-prog-bar {
    grid-area: progress;
    height: 3px;
    margin-top: 1px;
  }

  .course-bottom {
    grid-area: bottom;
    gap: 10px;
    align-self: end;
  }

  .course-pct {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11px;
  }

  .course-btn {
    min-height: 34px;
    min-width: 72px;
    padding: 8px 12px !important;
  }

  .mobile-dock {
    display: flex
  }
}

.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text2);
  padding: 4px;
  border-radius: 6px;
}

.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 99;
}

/* MOBILE DOCK */
.mobile-dock {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 64px;
  padding: 8px max(10px, env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
  background: rgba(22, 27, 37, 0.95);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(10px);
  z-index: 120;
  gap: 6px;
}

.dock-btn {
  flex: 1;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--text3);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 600;
}

.dock-btn svg {
  width: 16px;
  height: 16px
}

.dock-btn.active {
  background: var(--accent-glow);
  color: var(--accent)
}

/* EMPTY STATE */
.empty {
  padding: 40px 0;
  text-align: center;
  color: var(--text3);
  font-size: 14px
}

/* Neural network */
.neural-card {
  max-width: 820px;
}

.neural-subtitle {
  font-size: 12px;
  color: var(--text3);
  margin-top: 4px;
}

.neural-chip {
  color: var(--accent);
  background: rgba(95, 141, 255, 0.12);
  border: 1px solid rgba(95, 141, 255, 0.28);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 700;
}

.neural-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
}

.neural-message {
  min-width: 0;
}

.neural-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.neural-copy {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.5;
  max-width: 560px;
}

.neural-action {
  margin-top: 0;
  white-space: nowrap;
}

.neural-status {
  margin-top: 12px;
  color: var(--text3);
  font-size: 12px;
  line-height: 1.5;
}

/* Motion polish */
.page {
  animation: pageFadeIn 0.2s ease;
}

@keyframes pageFadeIn {
  from {
    opacity: 0;
    transform: translateY(4px)
  }

  to {
    opacity: 1;
    transform: translateY(0)
  }
}

.card,
.full-card,
.stat-card,
.course-card,
.exam-hall-item,
.notice-item,
.msg-group-item {
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.card:hover,
.full-card:hover,
.stat-card:hover,
.course-card:hover,
.exam-hall-item:hover,
.notice-item:hover,
.msg-group-item:hover {
  transform: translateY(-1px);
}

/* Skeleton loader */
.skeleton-stack {
  display: flex;
  flex-direction: column;
  gap: 10px
}

.skeleton {
  position: relative;
  overflow: hidden;
  background: rgba(120, 140, 180, 0.14);
  border: 1px solid rgba(123, 150, 218, 0.14);
  border-radius: 10px;
  min-height: 54px;
}

.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.16), transparent);
  animation: skeletonShimmer 1.2s infinite;
}

@keyframes skeletonShimmer {
  100% {
    transform: translateX(100%)
  }
}

/* Command palette */
.command-palette-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 10, 20, 0.62);
  z-index: 7000;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 8vh 12px 12px;
}

.command-palette {
  width: min(680px, 100%);
  max-height: 75vh;
  border: 1px solid rgba(123, 150, 218, 0.32);
  border-radius: 16px;
  background: linear-gradient(165deg, rgba(20, 30, 54, 0.97), rgba(10, 16, 30, 0.97));
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.command-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-bottom: 1px solid rgba(123, 150, 218, 0.22);
}

.command-input {
  flex: 1;
  border: 1px solid rgba(123, 150, 218, 0.28);
  background: rgba(22, 33, 58, 0.72);
  border-radius: 10px;
  height: 40px;
  color: var(--text);
  padding: 0 12px;
  outline: none;
}

.command-shortcut {
  font-size: 11px;
  color: var(--text3);
  border: 1px solid rgba(123, 150, 218, 0.24);
  border-radius: 7px;
  padding: 4px 8px;
}

.command-list {
  overflow: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.command-item {
  border: 1px solid rgba(123, 150, 218, 0.2);
  border-radius: 10px;
  background: rgba(22, 33, 58, 0.58);
  color: var(--text2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  font-size: 13px;
}

.command-item:hover,
.command-item.active {
  border-color: rgba(123, 150, 218, 0.42);
  background: linear-gradient(90deg, rgba(95, 141, 255, 0.22), rgba(122, 109, 255, 0.12));
  color: var(--text);
}

.command-meta {
  font-size: 11px;
  color: var(--text3)
}

/* Virtualized list helpers */
.virtual-list {
  position: relative;
  overflow-y: auto;
}

.virtual-spacer {
  width: 100%;
}

.virtual-content {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
}

/* ---------------------------
   2026 UI OVERHAUL (v2 look)
---------------------------- */
:root {
  --bg: #0a0a0a;
  --bg2: #111111;
  --bg3: #1a1a1a;
  --bg4: #222222;
  --border: #2a2a2a;
  --border2: #3a3a3a;
  --text: #ededed;
  --text2: #a1a1a1;
  --text3: #666666;
  --accent: #fff;
  --accent2: #d4d4d4;
  --accent-text: #000000;
  --accent-glow: rgba(255, 255, 255, 0.08);
  --r: 8px;
  --r2: 12px;
}

html,
body {
  background: var(--bg);
  color: var(--text);
}

#login-screen {
  background: var(--bg);
}

.login-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.login-title {
  font-size: 22px;
  letter-spacing: -0.2px
}

.login-input {
  background: var(--bg3)
}

.login-btn {
  background: var(--accent);
  color: #000;
  border: none;
}

.app {
  max-width: 1600px;
  margin: 0 auto;
  padding: 16px;
  gap: 16px;
  height: 100dvh;
}

.sidebar {
  width: 240px;
  min-width: 240px;
  border: 1px solid var(--border);
  border-radius: var(--r2);
  background: var(--bg2);
  box-shadow: none;
}

.sidebar-logo {
  padding: 22px 20px 18px
}

.logo-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--accent);
  color: #000;
  box-shadow: none;
}

.logo-text {
  font-size: 15px
}

.logo-sub {
  font-size: 11.5px
}

.nav-section {
  padding: 14px 12px 6px
}

.nav-item {
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: var(--r);
  font-size: 13px;
}

.nav-item:hover {
  background: var(--bg3);
  border-color: transparent;
}

.nav-item.active {
  background: var(--bg3);
  border-color: var(--border);
  color: var(--text);
}

.main {
  border-radius: var(--r2);
  overflow: hidden
}

.topbar {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r2);
  height: 56px;
  padding: 0 16px;
  margin-bottom: 10px;
  box-shadow: none;
}

.topbar-title {
  font-size: 18px;
  letter-spacing: -0.2px;
}

.notif-btn {
  background: var(--bg3);
  border-color: var(--border);
}

.avatar {
  background: var(--accent);
  color: #000;
  box-shadow: none;
}

.content {
  padding: 0 2px 8px;
  gap: 16px;
}

.dashboard-hero {
  border: 1px solid var(--border);
  border-radius: var(--r2);
  padding: 22px;
  background: var(--bg2);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
}

.dashboard-hero-kicker {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #9fb4df;
  margin-bottom: 10px;
  font-weight: 600;
}

.dashboard-hero-title {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: -0.6px;
  max-width: 680px;
}

.dashboard-hero-sub {
  margin-top: 10px;
  color: var(--text2);
  font-size: 14px;
  max-width: 700px;
}

.dashboard-hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap
}

.dashboard-priority-card {
  border-color: var(--border);
}

.hero-btn {
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
  color: #000;
  background: var(--accent);
  box-shadow: none;
}

.hero-btn.ghost {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text2);
  box-shadow: none;
}

.stat-card,
.card,
.full-card,
.msg-sidebar,
.msg-content,
.course-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  box-shadow: none;
}

.stat-card {
  padding: 18px 18px
}

.stat-label {
  font-size: 10.5px;
  color: #9fb1d8
}

.stat-val {
  font-size: 24px;
  letter-spacing: -0.4px
}

.card-title {
  font-size: 14px
}

.card-action {
  font-weight: 600
}

.exam-item,
.class-item {
  border-bottom: 1px solid var(--border);
}

.exam-hall-item,
.notice-item,
.msg-group-item,
.tt-select,
.msg-bubble {
  border-color: var(--border);
  background: var(--bg3);
}

.start-btn {
  background: var(--accent);
  color: #000;
  border: none;
}

.start-btn.gray {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text2);
}

.exam-calendar-item {
  align-items: flex-start;
  gap: 14px;
  padding: 14px 0;
}

.exam-calendar-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.exam-calendar-chip {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(95, 141, 255, 0.12);
  border: 1px solid rgba(123, 150, 218, 0.26);
  border-radius: 999px;
  padding: 4px 8px;
}

.exam-calendar-chip.subtle {
  color: var(--text2);
  text-transform: none;
  font-weight: 500;
  max-width: 360px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.exam-calendar-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  margin-left: auto;
}

.exam-view-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 8px 11px;
  font-size: 11.5px;
  font-weight: 600;
  color: #000;
  background: var(--accent);
  box-shadow: none;
}

.exam-view-btn svg {
  width: 14px;
  height: 14px
}

.mobile-dock {
  background: var(--bg2);
  border-top: 1px solid var(--border);
}

@media(max-width:1024px) {
  .app {
    padding: 10px;
    gap: 10px
  }

  .sidebar {
    width: 246px;
    min-width: 246px
  }

  .dashboard-hero-title {
    font-size: 24px
  }
}

@media(max-width:768px) {
  .app {
    padding: 0
  }

  .main {
    border-radius: 0
  }

  .topbar {
    margin: 0;
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-top: none;
    padding: 0 12px;
    height: 56px;
  }

  .content {
    padding: 14px 14px 90px
  }

  .dashboard-hero {
    padding: 16px;
    border-radius: 16px;
    flex-direction: column;
    align-items: flex-start;
  }

  .dashboard-hero-title {
    font-size: 21px
  }

  .dashboard-hero-sub {
    font-size: 13px
  }

  .sidebar {
    border-radius: 0 18px 18px 0;
    border-left: none;
  }
}

/* Topbar utilities */
.topbar-search-wrap {
  width: min(420px, 42vw);
}

.topbar-search {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--bg3);
  border-radius: var(--r);
  height: 34px;
  color: var(--text);
  font-size: 13px;
  padding: 0 12px;
  outline: none;
}

.topbar-search::placeholder {
  color: var(--text3)
}

.topbar-search:focus {
  border-color: var(--border2)
}

.topbar-btn {
  width: 34px;
  height: 34px;
  border-radius: var(--r);
  border: 1px solid var(--border);
  background: var(--bg3);
  color: var(--text2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.sync-pill {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2px;
  border-radius: 999px;
  padding: 6px 10px;
  border: 1px solid rgba(88, 214, 141, 0.34);
  background: rgba(34, 197, 94, 0.14);
  color: #8df4b4;
  white-space: nowrap;
}

.sync-pill.cached {
  border-color: rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.12);
  color: #ffd694;
}

.sync-pill.offline {
  border-color: rgba(239, 68, 68, 0.34);
  background: rgba(239, 68, 68, 0.12);
  color: #ffb0b0;
}

.theme-preset-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.theme-mode-row {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.settings-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.theme-mode-btn {
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  background: color-mix(in srgb, var(--accent) 14%, var(--bg3));
  color: var(--text2);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
}

.theme-mode-btn.active {
  color: var(--text);
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-color: transparent;
}

.theme-preset-btn {
  border: 1px solid rgba(123, 150, 218, 0.24);
  border-radius: 12px;
  padding: 12px;
  background: rgba(22, 33, 58, 0.62);
  color: var(--text);
  text-align: left;
}

.theme-preset-btn.active {
  border-color: rgba(123, 150, 218, 0.5);
  box-shadow: 0 0 0 2px rgba(95, 141, 255, 0.2) inset;
}

.theme-preset-name {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 7px
}

.theme-preset-preview {
  display: flex;
  gap: 6px;
}

.theme-dot {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

/* Page sub-sections */
.subnav {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 4px 10px;
  overflow-x: auto;
}

.subnav::-webkit-scrollbar {
  height: 0
}

.subnav-chip {
  border: 1px solid var(--border);
  background: var(--bg3);
  color: var(--text2);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.subnav-chip.active {
  background: var(--accent);
  color: var(--accent-text);
  border-color: transparent;
}

/* Dashboard section visibility */
#page-dashboard[data-subview="overview"] .two-col {
  display: none
}

#page-dashboard[data-subview="schedule"] .stats-row {
  display: none
}

/* Better responsive polish across tabs */
@media(max-width:1024px) {
  .stats-row {
    grid-template-columns: 1fr 1fr
  }

  .three-col {
    grid-template-columns: 1fr 1fr
  }
}

@media(max-width:768px) {
  .topbar-search-wrap {
    flex: 1;
    min-width: 0
  }

  .sync-pill {
    display: none
  }

  .theme-preset-grid {
    grid-template-columns: 1fr
  }

  .theme-mode-row {
    flex-direction: column
  }

  .settings-actions {
    flex-direction: column
  }

  .neural-panel {
    align-items: stretch;
    flex-direction: column
  }

  .neural-action {
    width: 100%
  }

  .topbar-search {
    height: 34px;
    font-size: 12px;
  }

  .topbar-title {
    display: none
  }

  .subnav {
    position: sticky;
    top: 56px;
    z-index: 89;
    margin: 0 -14px;
    padding: 10px 14px;
    background: rgba(10, 16, 30, 0.94);
    border-bottom: 1px solid rgba(123, 150, 218, 0.18);
  }

  .subnav-chip {
    padding: 8px 12px
  }

  .card-header {
    gap: 8px;
    flex-wrap: wrap;
  }

  .card-title {
    font-size: 13px
  }

  .full-card,
  .card {
    border-radius: 14px
  }

  .exam-hall-item {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
  }

  .exam-hall-icon {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 8px;
  }

  .exam-hall-icon svg {
    width: 18px;
    height: 18px;
  }

  .exam-hall-info {
    flex: 1;
    min-width: 0;
  }

  .exam-hall-header-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 3px;
  }

  .exam-hall-name {
    font-size: 13.5px;
    line-height: 1.35;
    word-break: break-word;
  }

  .exam-badge {
    font-size: 10.5px;
    padding: 2px 7px;
  }

  .exam-hall-meta {
    font-size: 11.5px;
    line-height: 1.45;
    word-break: break-word;
  }

  .exam-hall-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    flex-wrap: wrap;
  }

  .exam-hall-actions .start-btn,
  .exam-syllabus-btn {
    padding: 6px 12px;
    font-size: 11.5px;
    border-radius: 6px;
    min-height: 30px;
    margin-top: 0;
  }

  .exam-hall-right {
    margin: 0;
    text-align: right;
    flex-shrink: 0;
    display: block;
    width: auto;
  }

  .exam-hall-score {
    font-size: 14px;
  }

  .exam-hall-rank {
    font-size: 10.5px;
  }

  .syllabus-modal-backdrop {
    padding: 12px;
  }

  .syllabus-modal-card {
    max-height: 90vh;
    border-radius: 12px;
  }

  .syllabus-modal-header {
    padding: 12px 14px;
    gap: 10px;
  }

  .syllabus-modal-title {
    font-size: 14px;
  }

  .syllabus-modal-meta {
    font-size: 11px;
  }

  .syllabus-modal-body {
    padding: 12px 14px;
    gap: 10px;
  }

  .syllabus-modal-subject-card {
    padding: 11px 13px;
    border-radius: 8px;
  }

  .syllabus-modal-subject-header {
    font-size: 12.5px;
  }

  .syllabus-modal-topic {
    font-size: 12px;
    line-height: 1.45;
    padding-left: 8px;
  }

  .exam-calendar-item {
    flex-direction: column;
    gap: 8px;
  }

  .exam-calendar-right {
    width: 100%;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .exam-calendar-chip.subtle {
    max-width: 100%
  }

  .tt-select {
    width: 100%;
    max-width: none !important;
  }

  #page-timetable>div:first-child,
  #page-examhall>div:first-child,
  #page-era>div:first-child {
    display: grid !important;
    grid-template-columns: 1fr !important;
    margin-bottom: 8px !important;
  }

  #page-messages.active {
    height: calc(100dvh - 208px);
  }

  .command-palette-backdrop {
    padding: 6vh 10px 10px
  }

  .command-header {
    padding: 8px
  }

  .command-input {
    height: 36px;
    font-size: 13px
  }

  .command-item {
    padding: 9px 10px
  }
}

/* Unified theme-aware buttons */
.start-btn,
.hero-btn,
.exam-view-btn,
.class-btn,
.course-btn {
  background: var(--accent);
  color: var(--accent-text);
  border: 1px solid transparent;
}

.start-btn.gray,
.class-btn.gray,
.hero-btn.ghost {
  background: var(--bg3);
  color: var(--text2);
  border: 1px solid var(--border);
}

.course-btn {
  color: var(--accent-text);
}

/* Light mode */
body.light-mode {
  --bg: #fafafa;
  --bg2: #ffffff;
  --bg3: #f5f5f5;
  --bg4: #ebebeb;
  --border: #e5e5e5;
  --border2: #d4d4d4;
  --text: #0a0a0a;
  --text2: #525252;
  --text3: #a3a3a3;
  --accent: #000;
  --accent2: #333;
  --accent-text: #ffffff;
  --accent-glow: rgba(0, 0, 0, 0.08);
}

body.light-mode {
  background: var(--bg);
}

body.light-mode .login-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

body.light-mode .login-input {
  background: var(--bg3);
}

body.light-mode .login-input::placeholder {
  color: var(--text3);
}

body.light-mode #login-screen {
  background: var(--bg);
}

body.light-mode .sidebar {
  background: var(--bg2);
}

body.light-mode .topbar {
  background: var(--bg2);
}

body.light-mode .dashboard-hero {
  background: var(--bg2);
}

body.light-mode .stat-card,
body.light-mode .card,
body.light-mode .full-card,
body.light-mode .msg-sidebar,
body.light-mode .msg-content,
body.light-mode .course-card,
body.light-mode .exam-hall-item,
body.light-mode .notice-item,
body.light-mode .msg-group-item,
body.light-mode .msg-bubble {
  background: #ffffff;
}

body.light-mode .hero-btn.ghost {
  background: var(--bg3);
  color: var(--text2);
}

body.light-mode .topbar-search,
body.light-mode .topbar-btn {
  background: var(--bg3);
}

body.light-mode .subnav {
  background: transparent;
}

body.light-mode .subnav-chip {
  background: var(--bg3);
  border-color: var(--border);
  color: var(--text2);
}

body.light-mode .subnav-chip.active {
  background: var(--accent);
  border-color: transparent;
  color: var(--accent-text);
}

body.light-mode .dock-btn.active {
  color: var(--accent);
  background: var(--accent-glow);
}

body.light-mode .mobile-dock {
  background: var(--bg2);
}

body.light-mode .exam-calendar-chip {
  background: var(--bg3);
  border-color: var(--border);
  color: var(--text2);
}

body.light-mode .exam-calendar-chip.subtle {
  color: var(--text3);
}

/* Theme presets (dark mode palettes) */
body.theme-ocean {
  --accent: #4f9dff;
  --accent2: #20b6ff;
  --accent-text: #ffffff;
  --accent-glow: rgba(79, 157, 255, 0.12);
}

body.theme-purple {
  --accent: #9b7bff;
  --accent2: #c25dff;
  --accent-text: #ffffff;
  --accent-glow: rgba(155, 123, 255, 0.12);
}

body.theme-emerald {
  --accent: #22c55e;
  --accent2: #14b8a6;
  --accent-text: #ffffff;
  --accent-glow: rgba(34, 197, 94, 0.10);
}



/* Final unified action-button system */
body .start-btn,
body .class-btn,
body .course-btn,
body .hero-btn,
body .exam-view-btn,
body #page-dashboard .stat-card button,
body .theme-mode-btn,
body .login-btn,
body .chem-btn-primary,
body button.start-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  border-radius: var(--r, 8px) !important;
  padding: 8px 14px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  background: var(--accent) !important;
  color: var(--accent-text) !important;
  border: 1px solid transparent !important;
  box-shadow: none !important;
  text-shadow: none !important;
  cursor: pointer !important;
  transition: opacity 0.15s ease, background 0.15s ease !important;
}

body .start-btn.gray,
body .class-btn.gray,
body .hero-btn.ghost,
body button.start-btn.gray {
  background: var(--bg3) !important;
  color: var(--text2) !important;
  border: 1px solid var(--border) !important;
}

body .start-btn.gray:hover:not(:disabled),
body .class-btn.gray:hover:not(:disabled),
body .hero-btn.ghost:hover:not(:disabled),
body button.start-btn.gray:hover:not(:disabled) {
  background: var(--bg4) !important;
  color: var(--text) !important;
  border-color: var(--border2) !important;
}

body .start-btn:hover:not(:disabled),
body .class-btn:hover:not(:disabled),
body .hero-btn:hover:not(:disabled),
body .login-btn:hover:not(:disabled),
body .chem-btn-primary:hover:not(:disabled) {
  opacity: 0.9 !important;
}

body .start-btn:disabled,
body .start-btn.gray:disabled,
body .class-btn:disabled,
body .class-btn.gray:disabled,
body .course-btn:disabled,
body .hero-btn:disabled,
body .hero-btn.ghost:disabled,
body .exam-view-btn:disabled,
body #page-dashboard .stat-card button:disabled {
  opacity: 0.55 !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
}

body.light-mode .app,
body.light-mode .dashboard-hero,
body.light-mode .sidebar,
body.light-mode .topbar,
body.light-mode .stat-card,
body.light-mode .card,
body.light-mode .full-card {
  box-shadow: none;
}

@media(max-width:768px) {
  body #page-courses .card-header {
    margin-bottom: 4px;
  }

  body #courses-grid.three-col {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  body #page-courses .course-card {
    background:
      linear-gradient(90deg, color-mix(in srgb, var(--course-tone, var(--accent)) 14%, transparent), transparent 48%),
      linear-gradient(165deg, rgba(18, 27, 49, 0.94), rgba(12, 18, 34, 0.94)) !important;
    border-color: color-mix(in srgb, var(--course-tone, var(--accent)) 32%, var(--border)) !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18) !important;
    transform: none !important;
  }

  body.light-mode #page-courses .course-card {
    background:
      linear-gradient(90deg, color-mix(in srgb, var(--course-tone, var(--accent)) 10%, transparent), transparent 48%),
      #ffffff !important;
    box-shadow: 0 8px 18px rgba(15, 25, 60, 0.08) !important;
  }

  body #page-courses .course-image {
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
  }

  body #page-courses .course-bottom {
    margin-top: 1px;
  }

  body #page-courses .course-btn {
    min-height: 34px !important;
    min-width: 72px !important;
    padding: 8px 12px !important;
    border-radius: 9px !important;
    flex-shrink: 0;
  }
}

@media (prefers-reduced-motion: reduce) {

  .page,
  .card,
  .full-card,
  .stat-card,
  .course-card,
  .exam-hall-item,
  .notice-item,
  .msg-group-item {
    animation: none !important;
    transition: none !important;
  }

  .skeleton::after {
    animation: none !important
  }
}

/* Chemistry practice */
.chem-practice-shell {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px
}

.chem-practice-content {
  display: flex;
  flex-direction: column;
  gap: 14px
}

.chem-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  padding: 2px 2px 4px
}

.chem-kicker {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: .08em
}

.chem-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.4px
}

.chem-stat-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px
}

.chem-stat-pill {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: var(--text3);
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 10px
}

.chem-stat-pill strong {
  color: var(--accent)
}

.chem-view {
  display: none
}

.chem-view.active {
  display: flex;
  flex-direction: column;
  gap: 12px
}

.chem-panel {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px
}

.chem-section-label {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 10px
}

.chem-menu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px
}

.chem-full-width {
  grid-column: span 2
}

.chem-btn {
  min-height: 42px;
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .14s ease, background .14s ease, border-color .14s ease
}

.chem-btn:active {
  transform: scale(.98)
}

.chem-btn-primary {
  color: var(--accent-text);
  background: var(--accent);
  box-shadow: none
}

.chem-btn-secondary {
  color: var(--text);
  background: var(--bg3);
  border: 1px solid var(--border)
}

.chem-btn-ghost {
  color: var(--text2);
  background: transparent;
  border: 1px solid var(--border)
}

.chem-btn-secondary:hover,
.chem-btn-ghost:hover {
  background: var(--bg4);
  color: var(--text)
}

.chem-wide-btn {
  width: 100%;
  margin-top: 2px
}

.chem-progress-track {
  height: 4px;
  background: var(--bg4);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 14px
}

.chem-progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  transition: width .25s ease
}

.chem-canvas-wrap {
  min-height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden
}

.chem-canvas-wrap canvas {
  max-width: 100%;
  height: auto;
  display: block
}

.chem-compound-name {
  margin-top: 14px;
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  color: var(--text)
}

.chem-compound-meta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 8px;
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: var(--text3)
}

.chem-compound-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px
}

.chem-meta-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block
}

.chem-dot-green {
  background: #22c55e
}

.chem-dot-red {
  background: #ef4444
}

.chem-dot-amber {
  background: #f59e0b
}

.chem-learn-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px
}

.chem-nav-counter {
  min-width: 64px;
  text-align: center;
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  color: var(--text3)
}

.chem-question-hint {
  margin-top: 12px;
  text-align: center;
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  color: var(--text3)
}

.chem-options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px
}

.chem-opt-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 12px 14px;
  text-align: left;
  color: var(--text);
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer
}

.chem-opt-btn:hover:not(:disabled) {
  background: var(--bg3);
  border-color: rgba(61, 127, 255, .45)
}

.chem-opt-letter {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg4);
  color: var(--text3);
  font-family: 'Space Mono', monospace;
  font-size: 11px
}

.chem-opt-btn.correct {
  background: rgba(34, 197, 94, .12);
  border-color: #22c55e;
  color: #22c55e
}

.chem-opt-btn.correct .chem-opt-letter {
  background: #22c55e;
  color: #06130b
}

.chem-opt-btn.wrong {
  background: rgba(239, 68, 68, .12);
  border-color: #ef4444;
  color: #ef4444
}

.chem-opt-btn.wrong .chem-opt-letter {
  background: #ef4444;
  color: white
}

.chem-opt-btn.reveal {
  border-color: #22c55e;
  color: #22c55e;
  opacity: .8
}

.chem-feedback-flash {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%) translateY(-60px);
  z-index: 1200;
  pointer-events: none;
  background: var(--accent);
  color: white;
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 700;
  transition: transform .24s ease
}

.chem-feedback-flash.show {
  transform: translateX(-50%) translateY(0)
}

.chem-feedback-flash.wrong {
  background: #ef4444
}

.chem-stats-sheet {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1100;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0, 0, 0, .56)
}

.chem-stats-sheet.open {
  display: flex
}

.chem-stats-panel {
  width: min(520px, 100%);
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 18px 18px 0 0;
  padding: 18px
}

.chem-stats-title {
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px
}

.chem-stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border)
}

.chem-stat-row:last-child {
  border-bottom: 0
}

.chem-stat-name {
  color: var(--text2);
  font-size: 13px
}

.chem-stat-val {
  color: var(--text3);
  font-family: 'Space Mono', monospace;
  font-size: 11px
}

.chem-hidden {
  display: none
}

.chem-board-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px
}

.chem-board-sub {
  font-size: 12px;
  color: var(--text3);
  margin-top: -5px
}

.chem-board-tabs {
  display: flex;
  gap: 6px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 4px
}

.chem-tab-btn {
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text3);
  font-size: 12px;
  font-weight: 700;
  padding: 7px 10px;
  cursor: pointer
}

.chem-tab-btn.active {
  background: var(--accent);
  color: var(--accent-text);
}

.chem-board-list {
  display: flex;
  flex-direction: column;
  gap: 8px
}

.chem-board-row {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  gap: 10px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px
}

.chem-board-rank {
  font-family: 'Space Mono', monospace;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700
}

.chem-board-name {
  min-width: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis
}

.chem-board-score {
  font-family: 'Space Mono', monospace;
  color: var(--text3);
  font-size: 11px;
  text-align: right
}

@media (max-width:700px) {
  .chem-header {
    align-items: flex-start;
    flex-direction: column
  }

  .chem-stat-bar {
    justify-content: flex-start
  }

  .chem-board-head {
    flex-direction: column
  }

  .chem-menu-grid,
  .chem-options-grid {
    grid-template-columns: 1fr
  }

  .chem-full-width {
    grid-column: auto
  }

  .chem-canvas-wrap {
    min-height: 220px
  }
}

/* Rank Predictor Scoped Styles */
.rank-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 4px 10px;
}

.rank-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text3);
  transition: background 0.3s;
  flex-shrink: 0;
}

.rank-dot.loading {
  background: #f0b429;
  animation: rank-blink 1s infinite;
}

.rank-dot.ready {
  background: #6fcf6f;
}

.rank-dot.error {
  background: #ef4444;
}

@keyframes rank-blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.25;
  }
}

.rank-predictor-container {
  margin-top: 16px;
}

.rank-inputs-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rank-grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.rank-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rank-field label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text3);
}

.rank-field input {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 10px 12px;
  font-size: 14px;
  color: var(--text);
  width: 100%;
  transition: border-color 0.15s;
  outline: none;
}

.rank-field input:focus {
  border-color: var(--accent);
}

.rank-field .hint {
  font-size: 11px;
  color: var(--text3);
  margin-top: 2px;
}

.rank-hero {
  text-align: center;
  padding: 12px 0 24px;
}

.rank-hero .big {
  font-size: 56px;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--accent);
  line-height: 1;
}

.rank-hero .lbl {
  font-size: 13px;
  color: var(--text3);
  margin-top: 6px;
}

.rank-prog-wrap {
  height: 6px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 24px;
}

.rank-prog-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 99px;
  width: 0%;
  transition: width 1s cubic-bezier(.4, 0, .2, 1);
}

.rank-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}

.rank-stat {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 12px 14px;
}

.rank-stat .sl {
  font-size: 11px;
  color: var(--text3);
  margin-bottom: 5px;
  font-weight: 500;
}

.rank-stat .sv {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.rank-stat .ss {
  font-size: 11px;
  color: var(--text3);
  margin-top: 2px;
}

.rank-pipe {
  border: 1px solid var(--border);
  border-radius: 11px;
  overflow: hidden;
  margin-top: 10px;
}

.rank-pipe-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 14px;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
  color: var(--text2);
}

.rank-pipe-row:last-child {
  border-bottom: none;
}

body:not(.light-mode) .rank-pipe-row.highlight {
  background: rgba(255, 255, 255, 0.03);
}

body.light-mode .rank-pipe-row.highlight {
  background: rgba(0, 0, 0, 0.02);
}

.rank-pl {
  color: var(--text3);
}

.rank-pv {
  font-weight: 600;
  color: var(--text2);
}

.rank-pv.accent {
  color: var(--accent);
}

.rank-pipe-sep {
  padding: 5px 14px;
  font-size: 11px;
  color: var(--text3);
  border-bottom: 1px solid var(--border);
  background: var(--bg3);
}

.rank-alert {
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 12px;
  line-height: 1.6;
  margin-top: 12px;
  display: none;
}

.rank-alert-warn {
  background: rgba(240, 180, 41, 0.1);
  color: #ffd694;
  border: 1px solid rgba(240, 180, 41, 0.35);
}

body.light-mode .rank-alert-warn {
  background: #fffcf0;
  color: #b7791f;
  border: 1px solid #fbd38d;
}

.rank-alert-good {
  background: rgba(34, 197, 94, 0.1);
  color: #8df4b4;
  border: 1px solid rgba(34, 197, 94, 0.35);
}

body.light-mode .rank-alert-good {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.rank-alert-red {
  background: rgba(239, 68, 68, 0.1);
  color: #ffb0b0;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

body.light-mode .rank-alert-red {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
}

@media(max-width: 700px) {
  .rank-grid2 {
    grid-template-columns: 1fr;
  }
}

/* Chemistry Practice Structure & Text Input Styles */
.chem-opt-btn-structure {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  width: 100%;
  aspect-ratio: 1.4;
  min-height: 160px;
  position: relative;
  transition: all 0.2s ease;
}

.chem-opt-btn-structure:hover:not(:disabled) {
  background: var(--bg3);
  border-color: rgba(61, 127, 255, 0.45);
}

.chem-opt-btn-structure.correct {
  background: rgba(34, 197, 94, 0.12);
  border-color: #22c55e;
}

.chem-opt-btn-structure.wrong {
  background: rgba(239, 68, 68, 0.12);
  border-color: #ef4444;
}

.chem-opt-btn-structure.reveal {
  border-color: #22c55e;
  opacity: 0.8;
}

.chem-opt-btn-structure canvas {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.chem-options-grid.chem-reverse-layout {
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 700px) {
  .chem-options-grid.chem-reverse-layout {
    grid-template-columns: 1fr;
  }
}

/* Switch Toggle Custom Styling */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: var(--border);
  border-radius: 24px;
  transition: 0.3s;
}

.switch-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 4px;
  bottom: 4px;
  background-color: var(--text3);
  border-radius: 50%;
  transition: 0.3s;
}

.switch input:checked+.switch-slider {
  background-color: var(--accent);
}

.switch input:checked+.switch-slider:before {
  transform: translateX(20px);
  background-color: #0a0a0a;
}

/* RDKit Canvas dark/light mode rendering filters */
.rdkit-canvas {
  background-color: #121b31;
  filter: invert(1) hue-rotate(180deg);
  transition: filter 0.15s ease, background-color 0.15s ease;
}

body.light-mode .rdkit-canvas {
  background-color: #ffffff;
  filter: none;
}

/* Practice Mode Selection styles */
.mode-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 10px;
}

.mode-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  cursor: pointer;
  transition: transform 0.22s cubic-bezier(0.25, 0.8, 0.25, 1), border-color 0.22s ease, box-shadow 0.22s ease;
  will-change: transform, box-shadow;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 240px;
  position: relative;
}

.mode-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent) !important;
  box-shadow: 0 12px 30px var(--accent-glow) !important;
}

.mode-card-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mode-card-icon {
  font-size: 32px;
}

.mode-card-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.mode-card-desc {
  font-size: 13px;
  color: var(--text3);
  line-height: 1.5;
}

.mode-card-btn {
  margin-top: 20px;
  width: 100%;
  pointer-events: none;
}

@media (max-width: 768px) {
  .chem-view-select-mode .chem-panel {
    padding: 20px 14px !important;
  }

  .chem-view-select-mode h2 {
    font-size: 20px !important;
    margin-bottom: 16px !important;
  }

  .mode-cards-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .mode-card {
    min-height: auto;
    padding: 16px;
    flex-direction: column;
    justify-content: center;
  }

  .mode-card-content {
    flex-direction: row;
    align-items: flex-start;
    gap: 16px;
  }

  .mode-card-icon {
    font-size: 28px;
    flex-shrink: 0;
  }

  .mode-card-title {
    font-size: 16px;
    margin-bottom: 4px;
  }

  .mode-card-desc {
    font-size: 12px;
    line-height: 1.4;
  }

  .mode-card-btn {
    display: none !important;
  }
}

/* CHEMICAL EQUATION STYLING */
.reaction-equation {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.eq-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  width: 100%;
}

.eq-block {
  background: var(--bg3);
  border: 1px solid var(--border);
  padding: 10px 12px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  text-align: center;
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 26%;
  min-width: 90px;
  word-break: break-word;
  line-height: 1.25;
}

.eq-reagent {
  border-color: var(--accent);
  color: var(--text);
  background: linear-gradient(135deg, var(--bg3), color-mix(in srgb, var(--accent) 8%, transparent));
}

.eq-reactant {
  border-color: #f5a623;
  color: var(--text);
  background: linear-gradient(135deg, var(--bg3), rgba(245, 166, 35, 0.08));
}

.eq-product {
  border-color: #22c986;
  color: var(--text);
  background: linear-gradient(135deg, var(--bg3), rgba(34, 201, 134, 0.08));
}

.eq-operator {
  font-family: 'Space Mono', monospace;
  font-size: 1.1rem;
  font-weight: bold;
  color: var(--text3);
  flex: 0 0 auto;
  padding: 0 2px;
}

.eq-arrow {
  font-family: 'Space Mono', monospace;
  font-size: 1.3rem;
  font-weight: bold;
  color: var(--accent);
  flex: 0 0 auto;
  padding: 0 2px;
}

.eq-hidden {
  border: 2px dashed var(--accent);
  background: rgba(124, 106, 247, 0.04);
  color: var(--accent);
  font-size: 1.3rem;
  font-weight: 700;
  animation: pulse-glow 2s infinite ease-in-out;
  min-height: 54px;
}

@keyframes pulse-glow {
  0% {
    box-shadow: 0 0 5px rgba(124, 106, 247, 0.2);
    border-color: rgba(124, 106, 247, 0.4);
  }

  50% {
    box-shadow: 0 0 15px rgba(124, 106, 247, 0.5);
    border-color: rgba(124, 106, 247, 0.9);
  }

  100% {
    box-shadow: 0 0 5px rgba(124, 106, 247, 0.2);
    border-color: rgba(124, 106, 247, 0.4);
  }
}

/* --- SOLUTIONS VIEWER --- */
.sol-tabs {
  display: flex;
  gap: 10px;
  margin: 16px 0;
  flex-wrap: wrap;
}

.sol-tab-btn {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text2);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s ease;
  outline: none;
}

.sol-tab-btn:hover {
  border-color: var(--border2);
  color: var(--text);
  background: var(--bg4);
}

.sol-tab-btn.active {
  background: var(--accent-glow);
  color: var(--accent);
  border-color: var(--accent);
}

.sol-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 16px;
  margin-bottom: 12px;
  transition: transform 0.2s, border-color 0.2s;
}

.sol-card:hover {
  transform: translateY(-2px);
  border-color: var(--border2);
}

.sol-card.correct-card {
  border-left: 4px solid var(--green);
}

.sol-card.incorrect-card {
  border-left: 4px solid var(--red);
}

.sol-card.skipped-card {
  border-left: 4px solid var(--text3);
}

.sol-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.sol-card-title {
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
}

.sol-card-badges {
  display: flex;
  gap: 6px;
  align-items: center;
}

.sol-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
}

.sol-badge.easy {
  background: rgba(34, 197, 94, 0.12);
  color: var(--green);
}

.sol-badge.medium {
  background: rgba(245, 158, 11, 0.12);
  color: var(--amber);
}

.sol-badge.hard {
  background: rgba(239, 68, 68, 0.12);
  color: var(--red);
}

.sol-badge.correct {
  background: rgba(34, 197, 94, 0.15);
  color: var(--green);
}

.sol-badge.incorrect {
  background: rgba(239, 68, 68, 0.15);
  color: var(--red);
}

.sol-badge.skipped {
  background: var(--bg4);
  color: var(--text3);
}

.sol-badge.time {
  background: var(--bg4);
  color: var(--text2);
  font-family: 'Space Mono', monospace;
}

.sol-badge.time.over {
  color: var(--amber);
  background: rgba(245, 158, 11, 0.1);
}

.sol-badge.time.under {
  color: var(--green);
  background: rgba(34, 197, 94, 0.08);
}

.sol-card-body {
  margin-bottom: 12px;
}

.sol-answers {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  background: var(--bg3);
  border: 1px solid var(--border);
  padding: 10px 14px;
  border-radius: 8px;
}

.sol-ans-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.sol-ans-label {
  color: var(--text3);
  font-weight: 500;
}

.sol-ans-val {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--bg4);
  color: var(--text);
}

.sol-ans-val.correct {
  background: rgba(34, 197, 94, 0.2);
  color: var(--green);
}

.sol-ans-val.incorrect {
  background: rgba(239, 68, 68, 0.2);
  color: var(--red);
}

.sol-toggle-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--accent);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  outline: none;
}

.sol-toggle-btn:hover {
  background: var(--accent-glow);
  border-color: var(--accent);
}

.sol-img-container {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin-top: 0;
}

.sol-img-container.expanded {
  margin-top: 12px;
}

.sol-img-wrapper {
  background: #ffffff;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  position: relative;
  min-height: 80px;
}

.sol-img {
  max-width: 100%;
  height: auto;
  display: none;
  border-radius: 4px;
}

.sol-spinner {
  border: 3px solid rgba(95, 141, 255, 0.1);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border-left-color: var(--accent);
  animation: spin-sol 0.8s linear infinite;
  display: none;
  margin: 16px 0;
}

.sol-error {
  color: var(--red);
  font-size: 13px;
  font-weight: 500;
  display: none;
  margin: 16px 0;
}

.sol-action-row {
  display: flex;
  justify-content: flex-end;
  width: 100%;
  margin-top: 4px;
}

.sol-action-btn {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text2);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}

.sol-action-btn:hover {
  background: var(--bg4);
  color: var(--text);
  border-color: var(--border2);
}

@keyframes spin-sol {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* --- ANSWER KEY PANEL --- */
.ak-panel {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 16px;
  margin-bottom: 16px;
  animation: ak-fade 0.15s ease;
}

@keyframes ak-fade {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.ak-subject-block {
  margin-bottom: 18px;
}

.ak-subject-block:last-child {
  margin-bottom: 0;
}

.ak-subject-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text3);
  border-left: 3px solid var(--accent);
  padding-left: 8px;
  margin-bottom: 10px;
}

.ak-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ak-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 52px;
  padding: 6px 4px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg3);
  gap: 2px;
}

.ak-qno {
  font-size: 9px;
  font-weight: 600;
  color: var(--text3);
  letter-spacing: 0.04em;
}

.ak-ans {
  font-family: 'Space Mono', monospace;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.ak-cell.ak-correct {
  border-color: var(--green);
  background: rgba(34, 197, 94, 0.08);
}

.ak-cell.ak-correct .ak-ans {
  color: var(--green);
}

.ak-cell.ak-wrong {
  border-color: var(--red);
  background: rgba(239, 68, 68, 0.08);
}

.ak-cell.ak-wrong .ak-ans {
  color: var(--red);
}

.ak-cell.ak-skipped {
  opacity: 0.5;
}

/* Mobile responsive rules for clean dark report-style Result Analysis page */
.report-table-desktop-wrapper {
  display: block;
}

.report-cards-mobile-wrapper {
  display: none;
}

.report-subject-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--r2);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.15s;
}

.report-subject-card:hover {
  border-color: var(--border2);
}

.report-subject-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}

.report-subject-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.report-subject-score {
  font-family: 'Space Mono', monospace;
  font-size: 14px;
  font-weight: 700;
  color: var(--green);
}

.report-subject-card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.report-sub-metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.report-sub-metric .lbl {
  font-size: 8.5px;
  font-weight: 700;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.report-sub-metric .val {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}

.report-subject-card-breakdown {
  border-top: 1px dashed var(--border);
  padding-top: 8px;
  margin-top: 4px;
}

@media(max-width: 768px) {
  .report-header-grid {
    grid-template-columns: 1fr !important;
  }

  .report-metrics-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }

  .report-meta-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }

  .report-table-desktop-wrapper {
    display: none !important;
  }

  .report-cards-mobile-wrapper {
    display: flex !important;
    flex-direction: column;
    gap: 10px;
  }

  .result-modal-card {
    max-height: 96dvh;
    border-radius: var(--r2);
    margin: 8px;
  }

  #result-modal-body {
    padding: 14px !important;
  }

  .report-actions {
    gap: 6px;
  }

  .report-btn {
    padding: 6px 10px;
    font-size: 11.5px;
  }
}

@media(max-width: 400px) {
  .report-metrics-grid {
    grid-template-columns: 1fr 1fr !important;
  }

  .report-subject-card-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }
}

/* EXAM CALENDAR DETAILS - Full Screen Page */
.calendar-detail-backdrop {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 6000;
  display: none;
  flex-direction: column;
  overflow-y: auto;
  color: var(--text);
  animation: calendarFadeIn 0.2s ease-out;
}

@keyframes calendarFadeIn {
  from {
    opacity: 0;
    transform: scale(0.99);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.calendar-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--bg2);
  position: sticky;
  top: 0;
  z-index: 10;
}

.calendar-detail-body {
  max-width: 800px;
  width: 100%;
  margin: 0 auto;
  padding: 40px 24px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.calendar-detail-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.calendar-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  border-top: 1px solid var(--border);
  padding-top: 24px;
}

.calendar-detail-meta-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.calendar-detail-meta-icon {
  background: var(--bg3);
  color: var(--accent);
  padding: 10px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.calendar-detail-meta-info {
  display: flex;
  flex-direction: column;
}

.calendar-detail-meta-label {
  font-size: 10px;
  text-transform: uppercase;
  color: var(--text3);
  font-weight: 700;
  letter-spacing: 0.8px;
  margin-bottom: 4px;
}

.calendar-detail-meta-val {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}

.calendar-detail-syllabus-header {
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 14px;
}

.calendar-detail-syllabus-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 6px;
}

.calendar-detail-syllabus-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: var(--text2);
  line-height: 1.5;
  padding: 10px 14px;
  background: var(--bg3);
  border-radius: 8px;
  border-left: 3px solid var(--border2);
}

/* --- OLD RESULT PAGE THEMED STYLES --- */
.result-modal-card {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: 12px;
  max-width: 860px;
  width: 100%;
  max-height: 86vh;
  overflow: auto;
}

.result-title {
  font-size: 15px;
  color: var(--text);
  font-weight: 700;
  line-height: 1.35;
}

.result-sub {
  font-size: 12px;
  color: var(--text3);
  margin-top: 4px;
}

.result-hero {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.result-hero-score {
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 22%, transparent), color-mix(in srgb, var(--green) 12%, transparent));
  border: 1px solid color-mix(in srgb, var(--accent) 34%, transparent);
  border-radius: 12px;
  padding: 16px;
  min-width: 0;
}

.result-hero-label {
  font-size: 11px;
  color: var(--text2);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.result-hero-value {
  font-size: 34px;
  color: var(--text);
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  line-height: 1.1;
  margin-top: 8px;
  word-break: break-word;
}

.result-hero-sub {
  font-size: 12px;
  color: var(--text3);
  margin-top: 6px;
}

.result-hero-stat {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  min-width: 0;
}

.result-hero-stat .result-value {
  font-size: 18px;
  margin-top: 8px;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.result-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.result-metric {
  padding: 10px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  min-width: 0;
}

.result-label {
  font-size: 10.5px;
  color: var(--text3);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.4px;
}

.result-value {
  font-size: 13px;
  color: var(--text);
  font-family: 'Space Mono', monospace;
  margin-top: 3px;
  word-break: break-word;
}

.result-section-title {
  margin-top: 14px;
  font-size: 13px;
  color: var(--text);
  font-weight: 700;
}

.result-chip-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.result-chip {
  font-size: 11px;
  color: var(--text2);
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 8px;
}

.subject-result-card {
  padding: 12px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-top: 8px;
}

.subject-result-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.subject-result-name {
  font-size: 13px;
  color: var(--text);
  font-weight: 700;
}

.subject-result-score {
  font-size: 22px;
  color: var(--accent);
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  white-space: nowrap;
  line-height: 1;
}

.subject-highlight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.subject-result-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-top: 8px;
}

.mini-metric {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 7px;
  min-width: 0;
}

.mini-label {
  font-size: 10px;
  color: var(--text3);
}

.mini-value {
  font-size: 12px;
  color: var(--text);
  font-family: 'Space Mono', monospace;
  margin-top: 2px;
  word-break: break-word;
}

.mini-metric.major {
  background: color-mix(in srgb, var(--accent) 9%, transparent);
  border-color: color-mix(in srgb, var(--accent) 25%, transparent);
}

.mini-metric.major .mini-value {
  font-size: 14px;
  color: var(--text);
  font-weight: 700;
}

.result-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.result-link {
  font-size: 12px;
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border-radius: 8px;
  padding: 7px 10px;
}

/* Portal Function Cards */
.function-nav-card {
  position: relative;
  overflow: hidden;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.function-nav-card:hover {
  border-color: var(--accent) !important;
  background: var(--bg4) !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.16);
}

.function-nav-card:active {
  transform: scale(0.98);
}

#settings-functions-btn.active {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 24%, var(--bg3));
  color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

@media (max-width: 768px) {
  .settings-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .settings-actions .theme-mode-btn {
    width: 100%;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-sizing: border-box;
    touch-action: manipulation;
  }

  #settings-functions-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    padding: 12px !important;
  }
}

@media (max-width: 480px) {
  .settings-actions {
    grid-template-columns: 1fr;
  }

  .exam-hall-item {
    gap: 10px;
    padding: 10px 12px;
  }

  .exam-hall-icon {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 7px;
  }

  .exam-hall-icon svg {
    width: 16px;
    height: 16px;
  }

  .exam-hall-name {
    font-size: 13px;
  }

  .exam-badge {
    font-size: 10px;
    padding: 2px 6px;
  }

  .exam-hall-meta {
    font-size: 11px;
  }

  .exam-hall-actions {
    gap: 6px;
    margin-top: 7px;
  }

  .exam-hall-actions .start-btn,
  .exam-syllabus-btn {
    padding: 5px 10px;
    font-size: 11px;
    min-height: 28px;
  }

  .syllabus-modal-backdrop {
    padding: 8px;
    align-items: flex-end;
  }

  .syllabus-modal-card {
    max-height: 92vh;
    border-radius: 16px 16px 10px 10px;
  }

  .syllabus-modal-header {
    padding: 10px 12px;
    gap: 8px;
  }

  .syllabus-modal-title {
    font-size: 13.5px;
  }

  .syllabus-modal-header-actions {
    gap: 6px;
  }

  .syllabus-modal-copy-btn,
  .syllabus-modal-close-btn {
    padding: 5px 9px;
    font-size: 11px;
    min-height: 28px;
  }

  .syllabus-modal-body {
    padding: 10px 12px;
    gap: 8px;
  }

  .syllabus-modal-subject-card {
    padding: 10px 11px;
  }
}

/* ── PSEUDO-LEADERBOARD & CALIBRATION CONSOLE ── */
.pl-card-mode-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
  padding: 12px 14px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.pl-mode-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  flex-wrap: wrap;
  gap: 8px;
}

.pl-mode-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text2);
}

.pl-card-mode-chips {
  display: flex;
  gap: 4px;
  background: var(--bg2);
  padding: 3px;
  border-radius: 9px;
  border: 1px solid var(--border);
}

.pl-card-mode-chip {
  background: transparent;
  border: none;
  color: var(--text2);
  border-radius: 7px;
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.16s ease;
}

.pl-card-mode-chip:hover:not(.active) {
  color: var(--text);
  background: var(--bg4);
}

.pl-card-mode-chip.active {
  background: var(--accent);
  color: var(--accent-text);
  box-shadow: 0 2px 8px var(--accent-glow);
}

.pl-slider-container {
  width: 100%;
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
}

.pl-slider-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.pl-slider-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text3);
}

.pl-slider-badge {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  background: rgba(61, 127, 255, 0.14);
  border: 1px solid rgba(61, 127, 255, 0.25);
  padding: 2px 7px;
  border-radius: 5px;
}

.neural-range {
  width: 100%;
  accent-color: var(--accent);
  cursor: pointer;
  height: 5px;
  border-radius: 3px;
  background: var(--bg2);
}

/* Calibration Console */
.pl-calibration-console {
  margin-top: 8px;
  margin-bottom: 14px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
}

.pl-calibration-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  flex-wrap: wrap;
  gap: 8px;
}

.pl-calibration-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pl-calibration-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
}

.pl-calib-icon {
  font-size: 13px;
}

.pl-calibration-actions {
  display: flex;
  gap: 6px;
}

.pl-calibration-guide {
  font-size: 11.5px;
  color: var(--text3);
  line-height: 1.4;
  margin-bottom: 10px;
}

.pl-anchor-columns {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text3);
  border-bottom: 1px solid var(--border);
}

.pl-anchor-scrollbox {
  max-height: 165px;
  overflow-y: auto;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 8px;
  margin-top: 4px;
}

.pl-anchor-container {
  display: flex;
  flex-direction: column;
  min-width: 320px;
}

.pl-anchor-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 12px;
  background: transparent;
  transition: background 0.12s ease;
}

.pl-anchor-row:last-child {
  border-bottom: none;
}

.pl-anchor-row:hover {
  background: rgba(255, 255, 255, 0.025);
}

.pl-anchor-row.topper-anchor {
  background: rgba(245, 158, 11, 0.08);
  border-left: 2px solid #f59e0b;
  border-radius: 4px 0 0 4px;
}

.pl-anchor-input {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 7px;
  font-size: 11.5px;
  font-family: 'Space Mono', monospace;
  font-weight: 600;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s;
  box-sizing: border-box;
}

.pl-anchor-input:focus {
  border-color: var(--accent);
  background: var(--bg);
}

.pl-anchor-del-btn {
  background: transparent;
  border: none;
  color: var(--text3);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  transition: color 0.15s, background 0.15s;
}

.pl-anchor-del-btn:hover:not(:disabled) {
  color: var(--red);
  background: rgba(239, 68, 68, 0.14);
}

.pl-anchor-del-btn:disabled {
  opacity: 0.2;
  cursor: not-allowed;
}

/* Badges */
.pl-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-family: 'Space Mono', monospace;
  display: inline-block;
  white-space: nowrap;
}

.pl-badge-topper {
  background: rgba(245, 158, 11, 0.16);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.pl-badge-anchor {
  background: rgba(61, 127, 255, 0.14);
  color: var(--accent);
  border: 1px solid rgba(61, 127, 255, 0.28);
}

.pl-badge-pred {
  background: var(--bg4);
  color: var(--text3);
  border: 1px solid var(--border);
}


/* Results Section & Telemetry */
.pl-meta-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  margin-bottom: 16px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--r);
  font-size: 12px;
  flex-wrap: wrap;
  gap: 10px;
}

.pl-meta-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pl-status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
}

.pl-meta-tag {
  color: var(--text3);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pl-meta-model {
  color: var(--text);
  font-family: 'Space Mono', monospace;
  font-size: 12px;
}

.pl-meta-right {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'Space Mono', monospace;
  font-size: 12px;
}

.pl-latency-label {
  color: var(--text3);
}

.pl-latency-val {
  color: var(--accent);
  font-weight: 700;
}

/* Subtabs for Neural page */
#page-neural[data-subview="leaderboard"] #card-ranknet-predictor {
  display: none !important;
}

#page-neural[data-subview="predictor"] #card-pseudo-leaderboard {
  display: none !important;
}

/* Responsive mobile adjustments for Pseudo-Leaderboard */
@media (max-width: 768px) {
  #card-pseudo-leaderboard .leaderboard-wrap {
    display: block !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    border-radius: 10px;
    margin-top: 10px;
  }

  #card-pseudo-leaderboard .leaderboard-table {
    min-width: 100% !important;
    font-size: 11.5px;
  }

  #card-pseudo-leaderboard .leaderboard-table th,
  #card-pseudo-leaderboard .leaderboard-table td {
    padding: 7px 8px;
    white-space: nowrap;
  }

  .pl-anchor-row {
    padding: 6px 4px;
    gap: 6px;
  }

  .pl-anchor-input {
    font-size: 11px;
    padding: 4px 4px;
  }
}

@media (max-width: 480px) {
  .rank-grid2 {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}