/* v2-scorebar-hint-20260418 */
/* ══════════════════════════════════════════════════════════════
   styles.css — Global stylesheet for AbacusCoach Platform
   Covers: CSS variables, layout, header, landing, login,
           student app, question cards, score bar, modals,
           abacus beads, responsive.
   ══════════════════════════════════════════════════════════════ */

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --primary:   #1e1b3a;   /* warm dark purple */
  --accent:    #f5603d;   /* warm coral */
  --accent2:   #6366f1;   /* indigo */
  --accent3:   #f59e0b;   /* amber */
  --green:     #10b981;   /* emerald */
  --surface:   #ffffff;
  --surface2:  #f7f5f0;
  --surface3:  #eeeae0;
  --border:    #d4cfc4;
  --text:      #1a1a2e;
  --text2:     #5a5568;
  --text3:     #9b94a8;
  --radius:    12px;
  --shadow:    0 2px 16px rgba(26,26,46,.10);
  --shadow-lg: 0 8px 40px rgba(26,26,46,.16);
  --hdr-h:     60px;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Baloo 2', 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', sans-serif;
  background: var(--surface2);
  color: var(--text);
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; }

/* ══════════════════════════════════════════════════════════════
   HEADER
   ══════════════════════════════════════════════════════════════ */
.app-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  background: var(--surface);
  border-bottom: 1.5px solid var(--border);
  height: var(--hdr-h);
  box-shadow: 0 1px 8px rgba(26,26,46,.06);
}
.hdr-inner {
  max-width: 1100px; margin: 0 auto;
  height: 100%; padding: 0 1.25rem;
  display: flex; align-items: center; gap: 1.5rem;
}
.hdr-logo {
  display: flex; align-items: center; gap: 8px;
  text-decoration: none; flex-shrink: 0;
}
.hdr-logo-icon  { font-size: 22px; }
.hdr-logo-site  { font-size: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--text3); line-height: 1; }
.hdr-logo-name  { font-size: 15px; font-weight: 800; color: var(--primary); line-height: 1.1; }
.hdr-logo-name span { color: var(--accent); }

.hdr-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.hdr-nav-link {
  font-size: 13px; font-weight: 700; color: var(--text2);
  padding: 6px 12px; border-radius: 999px;
  transition: background .15s, color .15s;
}
.hdr-nav-link:hover { background: var(--surface2); color: var(--primary); }
.hdr-nav-link.active { background: var(--surface2); color: var(--primary); }
.hdr-nav-soon { opacity: .45; cursor: default; }
.hdr-nav-soon:hover { background: transparent !important; }

.hdr-right {
  display: flex; align-items: center; gap: 8px; margin-left: 12px;
}
.hdr-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  border: 1.5px solid var(--border); object-fit: cover;
}
.hdr-username { font-size: 13px; font-weight: 700; color: var(--primary); }
.hdr-btn {
  font-size: 12px; font-weight: 700;
  padding: 6px 14px; border-radius: 999px; border: none;
  transition: opacity .15s, transform .1s;
}
.hdr-btn:hover { opacity: .85; }
.hdr-btn:active { transform: scale(.97); }
.hdr-login-btn  { background: var(--accent); color: #fff; }
.hdr-logout-btn { background: var(--surface2); color: var(--text2); border: 1.5px solid var(--border); }

@media (max-width: 600px) {
  .hdr-nav { display: none; }
  .hdr-username { display: none; }
}

/* ══════════════════════════════════════════════════════════════
   PAGE MOUNT
   ══════════════════════════════════════════════════════════════ */
.page-mount { min-height: calc(100vh - var(--hdr-h)); padding-top: var(--hdr-h); }

/* ══════════════════════════════════════════════════════════════
   LANDING PAGE
   ══════════════════════════════════════════════════════════════ */
.landing-hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent2) 100%);
  padding: 4rem 1.5rem 3.5rem;
  text-align: center;
}
.landing-hero-inner { max-width: 640px; margin: 0 auto; }
.landing-eyebrow {
  font-size: 11px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase;
  color: rgba(255,255,255,.6); margin-bottom: .75rem;
}
.landing-headline {
  font-size: clamp(2rem, 6vw, 3.25rem); font-weight: 900;
  line-height: 1.1; color: #fff; margin-bottom: 1rem;
}
.landing-accent { color: var(--accent); }
.landing-sub { font-size: 1rem; color: rgba(255,255,255,.75); line-height: 1.6; }

.landing-audience { padding: 3rem 1.5rem; }
.landing-audience-inner { max-width: 820px; margin: 0 auto; }
.landing-section-title {
  font-size: 1rem; font-weight: 800; color: var(--text3);
  text-transform: uppercase; letter-spacing: 1.2px;
  margin-bottom: 1.25rem; text-align: center;
}

.audience-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.audience-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface); border: 2px solid var(--border);
  border-radius: var(--radius); padding: 1.1rem 1.25rem;
  text-align: left; transition: border-color .18s, box-shadow .18s, transform .1s;
}
.audience-card:hover:not(:disabled) { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.audience-card--active { border-color: var(--accent); }
.audience-card--active:hover { border-color: var(--accent); }
.audience-card--soon { opacity: .55; cursor: not-allowed; }
.aud-icon  { font-size: 2rem; flex-shrink: 0; }
.aud-body  { flex: 1; }
.aud-title { font-size: 14px; font-weight: 800; color: var(--primary); margin-bottom: 2px; }
.aud-desc  { font-size: 12px; color: var(--text3); line-height: 1.4; }
.aud-arrow { font-size: 18px; color: var(--accent); font-weight: 700; flex-shrink: 0; }
.aud-badge {
  font-size: 10px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase;
  background: var(--surface2); color: var(--text3); padding: 3px 8px; border-radius: 999px;
  flex-shrink: 0;
}

.landing-features { padding: 1.5rem 1.5rem 3rem; }
.landing-features-inner {
  max-width: 820px; margin: 0 auto;
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
}
.feature-chip {
  font-size: 12px; font-weight: 700; color: var(--text2);
  background: var(--surface); border: 1.5px solid var(--border);
  padding: 6px 14px; border-radius: 999px;
}

/* ══════════════════════════════════════════════════════════════
   LOGIN PAGE
   ══════════════════════════════════════════════════════════════ */
.login-wrap {
  min-height: calc(100vh - var(--hdr-h));
  display: flex; align-items: center; justify-content: center;
  padding: 2rem 1rem;
}
.login-card {
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: 20px; padding: 2.5rem 2rem;
  width: 100%; max-width: 400px;
  box-shadow: var(--shadow-lg);
  text-align: center;
}
.login-logo   { font-size: 3rem; margin-bottom: .75rem; }
.login-title  { font-size: 1.25rem; font-weight: 900; color: var(--primary); margin-bottom: .5rem; }
.login-sub    { font-size: 13px; color: var(--text2); margin-bottom: 1.75rem; line-height: 1.5; }

.login-google-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 12px 20px;
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: 10px; font-size: 14px; font-weight: 700; color: var(--primary);
  transition: background .15s, border-color .15s, box-shadow .15s;
}
.login-google-btn:hover { background: var(--surface2); border-color: var(--text3); box-shadow: var(--shadow); }
.login-google-btn:disabled { opacity: .6; cursor: not-allowed; }

.login-error {
  margin-top: 10px; padding: 8px 12px;
  background: #fff5f7; border: 1.5px solid var(--accent);
  border-radius: 8px; font-size: 13px; color: var(--accent); font-weight: 600;
}

.login-divider {
  display: flex; align-items: center; gap: 10px;
  margin: 1.25rem 0;
  color: var(--text3); font-size: 12px;
}
.login-divider::before, .login-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

.login-guest-btn {
  display: block; width: 100%;
  padding: 11px 20px; border: 1.5px dashed var(--border);
  border-radius: 10px; background: transparent;
  font-size: 13px; font-weight: 700; color: var(--text2);
  transition: border-color .15s, color .15s;
}
.login-guest-btn:hover { border-color: var(--accent); color: var(--primary); }
.login-guest-note { display: block; font-size: 11px; font-weight: 500; color: var(--text3); margin-top: 2px; }

.login-terms {
  font-size: 11px; color: var(--text3); margin-top: 1.25rem; line-height: 1.5;
}
.login-terms a { color: var(--accent); }

/* ══════════════════════════════════════════════════════════════
   STUDENT APP — Layout
   ══════════════════════════════════════════════════════════════ */
.app-layout {
  display: flex; align-items: flex-start;
  max-width: 1100px; margin: 0 auto;
  padding: 1.5rem 1rem;
  gap: 1.5rem;
}

/* ── Sidebar ───── */
.app-sidebar {
  width: 240px; flex-shrink: 0;
  position: sticky; top: calc(var(--hdr-h) + 1rem);
}
.sidebar-section { margin-bottom: 1.25rem; }
.sidebar-label {
  font-size: 10px; font-weight: 800; letter-spacing: 1.2px;
  text-transform: uppercase; color: var(--text3); margin-bottom: 8px;
}
.mode-pills, .level-pills, .digit-pills { display: flex; flex-direction: column; gap: 4px; }
.mode-pill, .level-pill, .digit-pill {
  padding: 9px 12px; border-radius: 8px;
  background: var(--surface); border: 1.5px solid var(--border);
  font-size: 13px; font-weight: 700; color: var(--text2);
  text-align: left; transition: background .15s, border-color .15s;
}
.mode-pill:hover, .level-pill:hover, .digit-pill:hover { border-color: var(--accent); color: var(--primary); }
.mode-pill.active, .level-pill.active, .digit-pill.active {
  background: #fff0f3; border-color: var(--accent); color: var(--primary);
}

.stepper-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px;
}
.stepper-label { font-size: 12px; font-weight: 700; color: var(--text2); }
.mini-stepper {
  display: flex; align-items: center; gap: 0;
  border: 1.5px solid var(--border); border-radius: 8px; overflow: hidden;
}
.mini-stepper button {
  width: 30px; height: 30px; border: none; background: var(--surface2);
  font-size: 16px; font-weight: 700; color: var(--accent);
}
.mini-stepper button:hover { background: var(--surface3); }
.mini-stepper span {
  min-width: 32px; height: 30px; line-height: 30px; text-align: center;
  font-size: 14px; font-weight: 700; font-family: 'DM Mono', monospace;
  border-left: 1.5px solid var(--border); border-right: 1.5px solid var(--border);
  color: var(--primary);
}

.ops-mini { display: flex; flex-direction: column; gap: 4px; }
.op-mini-check {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px; border-radius: 7px;
  border: 1.5px solid var(--border); background: var(--surface);
  font-size: 12px; font-weight: 700; color: var(--text2);
  cursor: pointer; user-select: none;
  transition: border-color .15s, background .15s;
}
.op-mini-check:hover   { border-color: var(--accent); }
.op-mini-check.active  { border-color: var(--accent); background: #fff0f3; color: var(--primary); }
.op-mini-check input   { display: none; }

.generate-btn {
  width: 100%; padding: 13px;
  background: var(--accent); color: #fff;
  border: none; border-radius: 10px;
  font-size: 15px; font-weight: 800;
  letter-spacing: .3px;
  box-shadow: 0 4px 14px rgba(233,69,96,.35);
  transition: opacity .15s, transform .1s;
  margin-bottom: 12px;
}
.generate-btn:hover  { opacity: .9; }
.generate-btn:active { transform: scale(.98); }

.guest-banner {
  background: #fffbf0; border: 1.5px solid var(--accent3);
  border-radius: 10px; padding: 10px 12px;
}
.guest-banner-text { font-size: 12px; color: var(--text2); margin-bottom: 6px; }
.guest-banner-cta {
  width: 100%; padding: 7px;
  background: var(--accent3); color: #fff;
  border: none; border-radius: 7px;
  font-size: 12px; font-weight: 800;
}

/* ── Main content ───── */
.app-main { flex: 1; min-width: 0; }

.app-welcome {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; min-height: 300px;
  padding: 3rem 1rem; text-align: center;
}
.welcome-abacus { font-size: 4rem; margin-bottom: 1rem; }
.welcome-title  { font-size: 1.5rem; font-weight: 900; color: var(--primary); margin-bottom: .5rem; }
.welcome-sub    { font-size: 14px; color: var(--text2); }

/* ── Score bar ─────── */
.score-bar {
  position: sticky;
  top: var(--hdr-h);
  z-index: 40;
  background: var(--primary);
  border-bottom: 1.5px solid rgba(255,255,255,.1);
  padding: 10px 1.25rem;
  box-shadow: 0 3px 12px rgba(0,0,0,.2);
  /* Bleed to full content width, offset the sa-content padding */
  margin: -2rem -2.5rem 1.5rem;
}
@media (max-width: 768px) {
  .score-bar { margin: -1rem -1rem 1rem; }
}
.score-bar-inner {
  display: flex; align-items: center; gap: 10px;
  flex-wrap: nowrap; overflow-x: auto;
}
.sb-item {
  font-size: 12px; font-weight: 800;
  color: rgba(255,255,255,.75);
  white-space: nowrap;
  display: flex; align-items: center; gap: 4px;
}
.sb-sep {
  width: 1px; height: 16px;
  background: rgba(255,255,255,.15); flex-shrink: 0;
}
.sb-correct span { color: #4ade80; font-size: 15px; font-weight: 900; }
.sb-wrong span   { color: #fc8080; font-size: 15px; font-weight: 900; }
.sb-remaining span { color: #fff; font-size: 15px; font-weight: 900; }
.sb-progress-wrap {
  flex: 1; height: 8px;
  background: rgba(255,255,255,.12);
  border-radius: 999px; overflow: hidden;
  min-width: 60px;
}
.sb-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #34d399);
  border-radius: 999px;
  transition: width .4s ease;
}
.sb-pct {
  font-size: 13px; font-weight: 900;
  color: #fff; min-width: 40px; text-align: right;
}
.sb-timer {
  font-size: 12px; font-weight: 700;
  color: rgba(255,255,255,.55);
  font-family: 'DM Mono', monospace;
  min-width: 38px; text-align: right;
}

/* ── Practice info bar (session chips) ── */
.practice-info-bar {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 8px;
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: 12px; padding: 10px 14px;
  margin-bottom: 1rem; margin-top: 1.5rem;
}
.ib-chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.ib-chip {
  font-size: 11px; font-weight: 700; padding: 4px 10px;
  border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface2); color: var(--text2);
  white-space: nowrap;
}
.ib-chip-grid { background: #eef2ff; border-color: #c7d2fe; color: #4338ca; }
.ib-chip-op   { background: #fff7ed; border-color: #fed7aa; color: #c2410c; }
.ib-chip-lvl  { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.ib-settings-btn {
  font-size: 12px; font-weight: 700; padding: 6px 14px;
  border-radius: 8px; border: 1.5px solid var(--border);
  background: var(--surface2); color: var(--text2);
  cursor: pointer; font-family: inherit;
  transition: all .15s; white-space: nowrap; flex-shrink: 0;
}
.ib-settings-btn:hover { background: var(--surface3); border-color: var(--accent2); color: var(--accent2); }

/* ══════════════════════════════════════════════════════════════
   QUESTION CARDS
   ══════════════════════════════════════════════════════════════ */
/* 2-column question grid */
.q-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1rem;
}
@media (max-width: 860px) {
  .q-grid { grid-template-columns: 1fr; }
}

.question-card {
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem;
  box-shadow: var(--shadow);
  transition: border-color .2s, background .3s;
  position: relative;
  overflow: hidden;
}
.question-card.q-state-correct { border-color: var(--green); }
.question-card.q-state-locked  { border-color: var(--accent); }
.question-card.q-state-wrong   { border-color: var(--accent3); }

.q-header { display: none; } /* replaced by q-card-header */

/* Dark navy card header — thin strip */
.q-card-header {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--primary);
  margin: -1.25rem -1.25rem .875rem;
  padding: .5rem .875rem;
  border-radius: calc(var(--radius) - 2px) calc(var(--radius) - 2px) 0 0;
  gap: 8px; min-height: 36px;
}
.q-card-header-left { display: flex; align-items: center; gap: 6px; }
.q-card-num { font-size: 12px; font-weight: 700; color: rgba(255,255,255,.85); }
.q-badge { font-size: 13px; margin-left: 2px; }

/* Hint button — plain emoji, no oval/circle wrapper */
.q-hint-icon-btn {
  background: none; border: none; cursor: pointer;
  font-size: 16px; line-height: 1; padding: 2px 4px;
  opacity: .7; transition: opacity .15s, transform .15s;
  flex-shrink: 0;
}
.q-hint-icon-btn:hover { opacity: 1; transform: scale(1.15); }
.q-type-badge { display: none; }

/* Load More */
.load-more-wrap { margin-top: 1.5rem; display: flex; flex-direction: column; gap: 1rem; }

/* "Want more practice?" dark banner */
.load-more-banner {
  background: var(--primary);
  border-radius: var(--radius);
  padding: 1.1rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
}
.load-more-banner-text {
  display: flex; flex-direction: column; gap: 3px;
}
.load-more-banner-text strong {
  font-size: 14px; font-weight: 800; color: #fff;
}
.load-more-banner-text span {
  font-size: 12px; color: rgba(255,255,255,.55);
}
.load-more-banner-btn {
  padding: 10px 22px; border-radius: 999px; border: none;
  background: var(--accent); color: #fff;
  font-size: 13px; font-weight: 800; cursor: pointer;
  font-family: inherit; white-space: nowrap;
  transition: opacity .15s, transform .15s;
  box-shadow: 0 4px 16px rgba(245,96,61,.35);
}
.load-more-banner-btn:hover { opacity: .9; transform: translateY(-1px); }

/* "Open Worksheet" card */
.load-more-worksheet {
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem 1.5rem;
  text-align: center;
}
.load-more-worksheet p {
  font-size: 13px; color: var(--text2); margin-bottom: 1rem; line-height: 1.6;
}
.load-more-ws-btn {
  padding: 11px 28px; border-radius: 12px; border: none;
  background: var(--primary); color: #fff;
  font-size: 13px; font-weight: 800; cursor: pointer;
  font-family: inherit; transition: opacity .15s;
}
.load-more-ws-btn:hover { opacity: .85; }

/* Added questions divider */
.load-more-added-divider {
  display: flex; align-items: center; gap: 10px; margin: 1.5rem 0 .5rem;
}
.load-more-line { flex: 1; height: 1px; background: var(--border); }
.load-more-label {
  font-size: 10px; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase; color: var(--text3); white-space: nowrap;
}

.q-body {
  display: flex; gap: 1rem; align-items: flex-start;
}
.q-left  { flex: 1; min-width: 0; }
.q-right {
  flex-shrink: 0;
  display: flex; flex-direction: column; align-items: center;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px;
  gap: 6px;
}
/* Abacus inside q-right — no double border */
.q-right .clickable-abacus {
  background: transparent !important;
  border: none !important;
  padding: 4px 2px !important;
}
.q-right .abacus-actions {
  display: flex; gap: 5px; width: 100%; padding: 2px 0 0;
  border-top: 1px solid var(--border);
  padding-top: 6px;
}

/* Number table */
.number-table { border-collapse: collapse; margin-bottom: .75rem; }
.number-table td { padding: 2px 4px; font-size: 18px; font-weight: 700; font-family: 'DM Mono', monospace; }
.op-sign     { text-align: right; padding-right: 8px; color: var(--accent); min-width: 22px; }
.answer-cell { color: var(--text3); }

.answer-section { }
.answer-label {
  font-size: 10px; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase; color: var(--text3); margin-bottom: 6px;
}
.type-input-row { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; }
.answer-input {
  flex: 1; max-width: 120px;
  padding: 8px 10px; border: 1.5px solid var(--border);
  border-radius: 8px; font-size: 15px; font-weight: 700;
  font-family: 'DM Mono', monospace; color: var(--primary);
  background: var(--surface2); outline: none;
  transition: border-color .2s;
}
.answer-input:focus { border-color: var(--accent); }
.answer-input:disabled { background: var(--surface3); color: var(--text3); }
.check-btn {
  padding: 8px 14px; background: var(--accent2); color: #fff;
  border: none; border-radius: 8px;
  font-size: 12px; font-weight: 800;
  transition: opacity .15s;
}
.check-btn:hover    { opacity: .85; }
.check-btn:disabled { opacity: .4; cursor: not-allowed; }

.answer-feedback {
  font-size: 12px; font-weight: 700; min-height: 18px;
  margin-bottom: 4px;
}
.answer-feedback.correct { color: var(--green); }
.answer-feedback.wrong   { color: var(--accent); }
.answer-feedback.locked  { color: var(--text3);  }

.correct-reveal {
  font-size: 13px; color: var(--text2); font-weight: 600; margin-top: 4px;
}

/* Abacus panel */
.abacus-actions {
  display: flex; gap: 6px; margin-top: 6px;
}
.pq-check-btn {
  flex: 1; padding: 7px 10px; border: none;
  background: var(--accent2); color: #fff; border-radius: 7px;
  font-size: 11px; font-weight: 800;
  transition: opacity .15s;
}
.pq-check-btn:hover    { opacity: .85; }
.pq-check-btn:disabled { opacity: .4; cursor: not-allowed; }
.pq-reset-btn {
  padding: 7px 10px; border: 1.5px solid var(--border);
  background: var(--surface2); color: var(--text2);
  border-radius: 7px; font-size: 11px; font-weight: 700;
}
.pq-reset-btn:hover { border-color: var(--accent); color: var(--accent); }

/* Guest upsell card */
.guest-upsell-card {
  background: #fffbf0; border: 1.5px solid var(--accent3);
  border-radius: var(--radius); padding: 1rem 1.25rem;
  margin-top: .5rem;
}
.guest-upsell-inner {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.guest-upsell-icon { font-size: 1.5rem; flex-shrink: 0; }
.guest-upsell-inner > div { flex: 1; font-size: 13px; color: var(--text2); }
.guest-upsell-btn {
  padding: 8px 14px; background: var(--accent3); color: #fff;
  border: none; border-radius: 8px; font-size: 13px; font-weight: 800;
  flex-shrink: 0;
}

/* ══════════════════════════════════════════════════════════════
   CLICKABLE ABACUS BEADS (shared with lesson files)
   ══════════════════════════════════════════════════════════════ */
.clickable-abacus {
  display: inline-flex; gap: 4px;
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 8px;
  user-select: none;
}
.cab-rod-col {
  display: flex; flex-direction: column; align-items: center;
  width: 38px; padding: 0 4px;
}
.cab-place-label {
  font-size: 7px; font-weight: 700; letter-spacing: .5px;
  text-transform: uppercase; color: var(--text3); margin-bottom: 3px; height: 10px;
}
.cab-rod-area { position: relative; width: 100%; }
.cab-spindle {
  position: absolute; left: 50%; top: 0; bottom: 0;
  width: 3px; transform: translateX(-50%);
  background: linear-gradient(180deg, #c0a060, #8a6030); border-radius: 2px; z-index: 0;
  box-shadow: 1px 0 2px rgba(0,0,0,.15);
}
.cab-beam {
  position: absolute; left: -4px; right: -4px;
  background: #1a1836; border-radius: 2px; z-index: 2;
  box-shadow: 0 1px 4px rgba(0,0,0,.3);
}
.cab-bead {
  position: absolute; left: 50%; transform: translateX(-50%);
  width: 26px; border-radius: 8px; z-index: 3;
  cursor: pointer;
  transition: top .22s cubic-bezier(.34,1.4,.64,1), background .15s, box-shadow .15s;
  box-shadow: 0 2px 4px rgba(0,0,0,.2), inset 0 1px 0 rgba(255,255,255,.3);
}
.cab-bead:hover { box-shadow: 0 3px 8px rgba(0,0,0,.25), inset 0 1px 0 rgba(255,255,255,.3); filter: brightness(1.1); }
.cab-bead.locked { cursor: default; }

/* Heaven bead — red */
.cab-upper-bead {
  background: radial-gradient(ellipse at 38% 30%, #ea5555, #c01818 50%, #6a0808);
  box-shadow: 0 2px 6px rgba(180,20,20,.35), inset 0 1px 0 rgba(255,255,255,.25);
}
.cab-upper-bead.active {
  background: radial-gradient(ellipse at 38% 30%, #ff7070, #e02020 50%, #880808);
  box-shadow: 0 3px 10px rgba(200,20,20,.45), inset 0 1px 0 rgba(255,255,255,.3);
}

/* Earth beads — blue */
.cab-lower-bead {
  background: radial-gradient(ellipse at 38% 30%, #4a9ee8, #1a5ec8 50%, #0a2a7a);
  box-shadow: 0 2px 6px rgba(20,60,180,.3), inset 0 1px 0 rgba(255,255,255,.2);
}
.cab-lower-bead.active {
  background: radial-gradient(ellipse at 38% 30%, #60b8ff, #2a78e8 50%, #1040a8);
  box-shadow: 0 3px 10px rgba(30,80,200,.4), inset 0 1px 0 rgba(255,255,255,.25);
}

/* Abacus SVG wrap */
.abacus-svg-wrap { display: inline-flex; flex-direction: column; align-items: center; gap: 4px; }
.abacus-answer-label {
  font-size: 10px; font-weight: 700; color: var(--text3);
  letter-spacing: .5px; text-transform: uppercase;
}

/* ══════════════════════════════════════════════════════════════
   MODALS
   ══════════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(15,20,40,.8);
  display: flex; align-items: center; justify-content: center;
  z-index: 500; padding: 1rem;
}
.modal-card {
  background: var(--surface); border-radius: 20px;
  padding: 2rem; width: 100%; max-width: 440px;
  box-shadow: 0 24px 80px rgba(0,0,0,.35);
  animation: popIn .3s cubic-bezier(.34,1.56,.64,1);
}
.summary-card { text-align: center; }
.sum-emoji   { font-size: 3rem; margin-bottom: .5rem; }
.sum-title   { font-size: 1.4rem; font-weight: 900; color: var(--primary); margin-bottom: .25rem; }
.sum-sub     { font-size: 13px; color: var(--text2); margin-bottom: 1.5rem; }
.sum-stats   { display: flex; gap: 1rem; justify-content: center; margin-bottom: 1.5rem; flex-wrap: wrap; }
.sum-stat    { text-align: center; }
.sum-stat-val { font-size: 1.5rem; font-weight: 900; color: var(--primary); line-height: 1; }
.sum-stat-lbl { font-size: 10px; font-weight: 700; color: var(--text3); text-transform: uppercase; letter-spacing: 1px; margin-top: 2px; }
.sum-actions  { display: flex; gap: 8px; }
.sum-btn {
  flex: 1; padding: 11px; border: 1.5px solid var(--border);
  border-radius: 10px; background: var(--surface2);
  font-size: 13px; font-weight: 800; color: var(--text2);
  transition: border-color .15s, color .15s;
}
.sum-btn:hover { border-color: var(--accent); color: var(--primary); }
.sum-btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.sum-btn-primary:hover { background: #d63050; border-color: #d63050; color: #fff; }

/* ══════════════════════════════════════════════════════════════
   TOAST
   ══════════════════════════════════════════════════════════════ */
.app-toast {
  position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%);
  background: var(--primary); color: #fff;
  padding: 10px 20px; border-radius: 999px;
  font-size: 13px; font-weight: 700;
  box-shadow: 0 8px 30px rgba(0,0,0,.25);
  z-index: 999; pointer-events: none;
  opacity: 0; transition: opacity .25s;
  white-space: nowrap;
}
.app-toast.show { opacity: 1; }

/* ══════════════════════════════════════════════════════════════
   ANIMATIONS
   ══════════════════════════════════════════════════════════════ */
@keyframes popIn {
  from { opacity: 0; transform: scale(.88); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes shake {
  0%,100% { transform: translateX(0); }
  20%,60% { transform: translateX(-6px); }
  40%,80% { transform: translateX(6px); }
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .app-layout {
    flex-direction: column; padding: .75rem;
  }
  .app-sidebar {
    width: 100%; position: static;
  }
  .mode-pills, .level-pills { flex-direction: row; flex-wrap: wrap; }
  .mode-pill, .level-pill { flex: 1; text-align: center; }

  .q-body { flex-direction: column; }
  .q-right { align-self: flex-start; }

  .hdr-inner { gap: .75rem; }
  .hdr-logo-site { display: none; }
}

@media (max-width: 480px) {
  .sum-stats { gap: .75rem; }
  .number-table td { font-size: 15px; }
  .answer-input { max-width: 90px; }
  .landing-headline { font-size: 1.75rem; }
}

/* ══════════════════════════════════════════════════════════════
   PRACTICE SHEET BUTTON (sidebar)
   ══════════════════════════════════════════════════════════════ */
.sheet-btn {
  width: 100%; padding: 11px;
  background: var(--surface); color: var(--text2);
  border: 1.5px solid var(--border); border-radius: 10px;
  font-size: 14px; font-weight: 700;
  transition: border-color .15s, color .15s, background .15s;
  margin-bottom: 12px;
}
.sheet-btn:hover { border-color: var(--accent2); color: var(--primary); background: var(--surface2); }
.sheet-btn:active { transform: scale(.98); }

/* ══════════════════════════════════════════════════════════════
   WORKSHEET — TOOLBAR  (screen only, hidden on print)
   ══════════════════════════════════════════════════════════════ */
.ws-toolbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: .75rem 1rem;
  margin-bottom: 1.25rem; box-shadow: var(--shadow);
}
.ws-back-btn {
  padding: 7px 14px; background: var(--surface2);
  border: 1.5px solid var(--border); border-radius: 8px;
  font-size: 13px; font-weight: 700; color: var(--text2);
  flex-shrink: 0; transition: border-color .15s, color .15s;
}
.ws-back-btn:hover { border-color: var(--accent); color: var(--primary); }

.ws-toolbar-meta {
  display: flex; gap: 6px; flex-wrap: wrap; flex: 1;
}
.ws-meta-chip {
  font-size: 11px; font-weight: 700; color: var(--text2);
  background: var(--surface2); border: 1px solid var(--border);
  padding: 3px 10px; border-radius: 999px; white-space: nowrap;
}
.ws-print-btns { display: flex; gap: 6px; flex-wrap: wrap; }

.ws-regen-btn {
  padding: 7px 12px; background: var(--surface2);
  border: 1.5px solid var(--border); border-radius: 8px;
  font-size: 12px; font-weight: 700; color: var(--text2);
  transition: border-color .15s;
}
.ws-regen-btn:hover { border-color: var(--accent); color: var(--primary); }

.ws-print-btn {
  padding: 7px 14px; border: none; border-radius: 8px;
  font-size: 12px; font-weight: 800; color: #fff;
  transition: opacity .15s;
}
.ws-print-btn:hover { opacity: .88; }
.ws-print-btn:active { transform: scale(.97); }
.ws-pdf-btn     { background: var(--accent2); }
.ws-answers-btn { background: var(--surface2); color: var(--text2); border: 1.5px solid var(--border); }
.ws-answers-btn.active { background: var(--green); color: #fff; border-color: var(--green); }

/* ══════════════════════════════════════════════════════════════
   WORKSHEET — PAGE  (screen preview + print target)
   ══════════════════════════════════════════════════════════════ */
.ws-page {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  box-shadow: var(--shadow-lg);
  max-width: 860px;
}

/* Page header */
.ws-page-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding-bottom: 1rem; margin-bottom: 1.25rem;
  border-bottom: 2px solid var(--primary);
}
.ws-page-title {
  display: flex; align-items: center; gap: 10px;
}
.ws-logo-mark   { font-size: 1.75rem; }
.ws-page-site   { font-size: 13px; font-weight: 800; color: var(--primary); }
.ws-page-sub    { font-size: 11px; color: var(--text3); margin-top: 2px; }
.ws-page-meta   { text-align: right; }
.ws-meta-field  {
  font-size: 11px; font-weight: 600; color: var(--text2);
  margin-bottom: 4px; display: flex; align-items: center; gap: 6px; justify-content: flex-end;
}
.ws-meta-line {
  display: inline-block; width: 120px;
  border-bottom: 1px solid var(--border); height: 14px;
}

/* Question grid */
.ws-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem 1.5rem;
  margin-bottom: 1.5rem;
}
.ws-cell {
  display: flex; flex-direction: column; align-items: flex-start;
}
.ws-q-label {
  font-size: 9px; font-weight: 800; letter-spacing: 1px;
  text-transform: uppercase; color: var(--text3);
  margin-bottom: 4px;
}

/* Number table inside each cell */
.ws-table {
  border-collapse: collapse;
  font-family: 'DM Mono', monospace;
}
.ws-op  {
  text-align: right; padding-right: 6px;
  font-size: 16px; font-weight: 700; color: var(--accent);
  min-width: 18px; vertical-align: bottom;
  padding-bottom: 2px;
}
.ws-num {
  text-align: right; padding-left: 2px;
  font-size: 18px; font-weight: 700; color: var(--primary);
  min-width: 52px; vertical-align: bottom;
  padding-bottom: 2px;
}
.ws-divider-row .ws-rule {
  border-top: 2px solid var(--primary);
  padding-top: 3px;
}
.ws-answer-blank {
  height: 26px; min-width: 52px;
  border-bottom: 1.5px solid var(--border);
  vertical-align: bottom;
}

/* Answer key */
.ws-answer-key {
  border-top: 1.5px dashed var(--border);
  padding-top: .75rem; margin-top: .5rem;
}
.ws-answer-key-title {
  font-size: 9px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 1px; color: var(--text3); margin-bottom: 6px;
}
.ws-answer-row {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.ws-ans-chip {
  font-size: 11px; font-weight: 700; font-family: 'DM Mono', monospace;
  color: var(--primary); background: var(--surface2);
  border: 1px solid var(--border); padding: 3px 9px; border-radius: 6px;
}

/* Page footer */
.ws-page-footer {
  display: flex; justify-content: space-between;
  margin-top: 1.25rem; padding-top: .75rem;
  border-top: 1px solid var(--border);
  font-size: 9px; color: var(--text3); font-weight: 600;
}

/* ══════════════════════════════════════════════════════════════
   PRINT STYLES — everything that matters for paper
   ══════════════════════════════════════════════════════════════ */
@media print {
  /* Hide all UI chrome */
  .no-print,
  .app-header,
  .app-sidebar,
  .ws-toolbar,
  .score-bar,
  #sa-score-bar {
    display: none !important;
  }

  /* Remove screen decoration from page */
  body, .page-mount, .app-layout, .app-main {
    background: #fff !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  /* Worksheet page fills paper */
  .ws-page {
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 1cm 1.5cm !important;
    max-width: 100% !important;
    width: 100% !important;
  }

  /* Keep grid on one page if possible */
  .ws-grid { break-inside: avoid; }
  .ws-cell { break-inside: avoid; }

  /* Answer key: visibility is toggled inline by printWorksheet() */

  /* Restore fonts and colours for print */
  .ws-num    { color: #000 !important; }
  .ws-op     { color: #000 !important; }
  .ws-page-site { color: #000 !important; }
}

/* ══════════════════════════════════════════════════════════════
   MY PROGRESS BUTTON (sidebar)
   ══════════════════════════════════════════════════════════════ */
.progress-btn {
  width: 100%; padding: 11px;
  background: var(--surface); color: var(--text2);
  border: 1.5px solid var(--border); border-radius: 10px;
  font-size: 14px; font-weight: 700;
  transition: border-color .15s, color .15s, background .15s;
  margin-bottom: 12px;
}
.progress-btn:hover  { border-color: var(--accent2); color: var(--primary); background: var(--surface2); }
.progress-btn:active { transform: scale(.98); }

/* ══════════════════════════════════════════════════════════════
   PROGRESS VIEW
   ══════════════════════════════════════════════════════════════ */
.pv-wrap   { padding: 0 0 2rem; }

.pv-header {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 1.25rem;
}
.pv-back-btn {
  padding: 7px 14px;
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: 8px; font-size: 13px; font-weight: 700; color: var(--text2);
  transition: border-color .15s, color .15s; flex-shrink: 0;
}
.pv-back-btn:hover { border-color: var(--accent); color: var(--primary); }

.pv-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 16px; font-weight: 900; color: var(--primary);
}
.pv-title-icon { font-size: 18px; }

/* Loading / empty / error / guest states */
.pv-loading, .pv-error {
  padding: 2rem 1rem; text-align: center;
  font-size: 13px; color: var(--text3); font-weight: 600;
}
.pv-error { color: var(--accent); }

.pv-empty, .pv-guest {
  display: flex; flex-direction: column; align-items: center;
  padding: 3rem 1rem; text-align: center; gap: .5rem;
}
.pv-empty-icon, .pv-guest-icon { font-size: 2.5rem; margin-bottom: .25rem; }
.pv-empty p, .pv-guest p { font-size: 14px; font-weight: 700; color: var(--primary); }
.pv-empty-sub {
  font-size: 12px; color: var(--text3); font-weight: 500; margin-top: 2px;
}

/* Session list */
.pv-list { display: flex; flex-direction: column; gap: 0; }

.pv-list-header {
  font-size: 10px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 1.2px; color: var(--text3);
  padding-bottom: 8px; margin-bottom: 4px;
  border-bottom: 1.5px solid var(--border);
}

.pv-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--surface3);
  transition: background .1s;
}
.pv-row:last-child { border-bottom: none; }

.pv-row-left {
  display: flex; align-items: center; gap: 10px;
  flex-shrink: 0; width: 90px;
}
.pv-row-num {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--surface2); border: 1.5px solid var(--border);
  font-size: 11px; font-weight: 800; color: var(--text3);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.pv-row-date {
  font-size: 13px; font-weight: 700; color: var(--primary);
}

.pv-row-center { flex: 1; }
.pv-bar-wrap {
  height: 6px; background: var(--surface2);
  border-radius: 999px; overflow: hidden;
}
.pv-bar-fill {
  height: 100%; border-radius: 999px;
  transition: width .4s ease;
}

.pv-row-right {
  display: flex; flex-direction: column; align-items: flex-end;
  flex-shrink: 0; gap: 1px;
}
.pv-pct   { font-size: 15px; font-weight: 900; line-height: 1; }
.pv-score { font-size: 11px; font-weight: 600; color: var(--text3); }

/* ══════════════════════════════════════════════════════════════
   STATS CARD
   ══════════════════════════════════════════════════════════════ */
.stats-card {
  display: flex; align-items: center;
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: .75rem 1.25rem;
  margin-bottom: 1.25rem; box-shadow: var(--shadow);
  gap: 0; flex-wrap: wrap;
}
.stats-item {
  display: flex; flex-direction: column; align-items: center;
  flex: 1; min-width: 70px; gap: 2px; padding: .25rem .5rem;
}
.stats-icon { font-size: 1.1rem; line-height: 1; }
.stats-val  {
  font-size: 15px; font-weight: 900; color: var(--primary);
  line-height: 1.1; white-space: nowrap;
}
.stats-lbl  {
  font-size: 9px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .9px; color: var(--text3);
}
.stats-divider {
  width: 1px; align-self: stretch;
  background: var(--border); margin: .25rem 0;
}

/* Streak colour states */
.stats-streak-green .stats-val { color: var(--green); }
.stats-streak-orange .stats-val { color: var(--accent3); }

@media (max-width: 480px) {
  .stats-card { gap: 4px; padding: .6rem .75rem; }
  .stats-divider { display: none; }
  .stats-item { min-width: 60px; }
  .stats-val  { font-size: 13px; }
}

/* ══════════════════════════════════════════════════════════════
   BOOT LOADER — shown while Firebase resolves auth state
   Prevents blank screen on refresh.
   ══════════════════════════════════════════════════════════════ */
.boot-loader {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; min-height: calc(100vh - var(--hdr-h));
  gap: 14px;
}
.boot-spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.boot-label {
  font-size: 13px; font-weight: 700; color: var(--text3);
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ══════════════════════════════════════════════════════════════
   PARENT DASHBOARD
   ══════════════════════════════════════════════════════════════ */
.pd-wrap {
  max-width: 720px; margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

/* Page header */
.pd-page-header  { margin-bottom: 2rem; }
.pd-page-title   {
  display: flex; align-items: center; gap: 10px;
  font-size: 1.35rem; font-weight: 900; color: var(--primary);
  margin-bottom: .35rem;
}
.pd-page-sub     { font-size: 13px; color: var(--text3); }

/* Sections */
.pd-section { margin-bottom: 2rem; }
.pd-section-title {
  font-size: 10px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 1.2px; color: var(--text3);
  margin-bottom: .75rem;
}

/* Stats grid */
.pd-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.pd-stat-cell {
  display: flex; flex-direction: column; align-items: center;
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: .9rem .5rem;
  gap: 3px; text-align: center;
}
.pd-stat-icon { font-size: 1.25rem; }
.pd-stat-val  { font-size: 16px; font-weight: 900; line-height: 1; }
.pd-stat-lbl  {
  font-size: 9px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .9px; color: var(--text3);
}

/* Activity list */
.pd-activity-list { display: flex; flex-direction: column; }
.pd-activity-row  {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 0; border-bottom: 1px solid var(--surface3);
}
.pd-activity-row:last-child { border-bottom: none; }

.pd-act-num  {
  width: 22px; height: 22px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--surface2);
  border: 1.5px solid var(--border);
  font-size: 11px; font-weight: 800; color: var(--text3);
}
.pd-act-date { font-size: 13px; font-weight: 700; color: var(--primary); min-width: 72px; }
.pd-act-bar-wrap {
  flex: 1; height: 6px; background: var(--surface2);
  border-radius: 999px; overflow: hidden;
}
.pd-act-bar-fill  { height: 100%; border-radius: 999px; transition: width .4s; }
.pd-act-pct       { font-size: 14px; font-weight: 900; min-width: 38px; text-align: right; }
.pd-act-score     { font-size: 11px; font-weight: 600; color: var(--text3); min-width: 34px; }

/* States */
.pd-spinner-wrap { display: flex; justify-content: center; padding: 1.5rem 0; }
.pd-empty        { font-size: 13px; color: var(--text3); padding: 1rem 0; }
.pd-error        { font-size: 13px; color: var(--accent); padding: 1rem 0; }

@media (max-width: 480px) {
  .pd-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .pd-act-date   { min-width: 58px; font-size: 12px; }
}

/* ══════════════════════════════════════════════════════════════
   GLOBAL POLISH — Custom scrollbars + Round close buttons
   ══════════════════════════════════════════════════════════════ */

/* ── Custom scrollbars (WebKit) ────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 999px;
  transition: background .2s;
}
::-webkit-scrollbar-thumb:hover { background: var(--text3); }

/* Modal / overlay scrollbars — slightly wider for comfort */
.adm-modal::-webkit-scrollbar,
.tch-modal::-webkit-scrollbar,
.lp-sidebar::-webkit-scrollbar,
.adm-sidebar::-webkit-scrollbar,
.tch-sidebar::-webkit-scrollbar,
.par-sidebar::-webkit-scrollbar { width: 4px; }

/* Firefox */
* { scrollbar-width: thin; scrollbar-color: var(--border) transparent; }

/* ── Round close / X buttons — fix oval shape everywhere ──── */
/* Target all common close button patterns */
.adm-modal-close,
.adm-sidebar-x,
.tch-sidebar-x,
.par-sidebar-x,
.lp-sidebar-close,
.ob-role-btn .ob-spinner,
[id$="-close"],
[class*="sidebar-x"],
[class*="modal-close"],
[class*="close-btn"],
[class*="btn-close"] {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  min-height: 32px !important;
  padding: 0 !important;
  border-radius: 50% !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  aspect-ratio: 1 / 1 !important;
  flex-shrink: 0 !important;
}

/* Specific overrides for dashboard X buttons */
.adm-sidebar-x { background: rgba(255,255,255,.1); color: rgba(255,255,255,.7); border: none; cursor: pointer; font-size: 14px; }
.adm-sidebar-x:hover { background: rgba(255,255,255,.2); color: #fff; }
.tch-sidebar-x { background: rgba(255,255,255,.1); color: rgba(255,255,255,.7); border: none; cursor: pointer; font-size: 14px; }
.tch-sidebar-x:hover { background: rgba(255,255,255,.2); color: #fff; }
.par-sidebar-x { background: rgba(255,255,255,.1); color: rgba(255,255,255,.7); border: none; cursor: pointer; font-size: 14px; }
.par-sidebar-x:hover { background: rgba(255,255,255,.2); color: #fff; }
.adm-modal-close { background: var(--surface2); border: 1.5px solid var(--border); color: var(--text3); cursor: pointer; font-size: 14px; }
.adm-modal-close:hover { background: var(--border); color: var(--primary); }
.lp-sidebar-close { background: var(--surface2); border: 1.5px solid var(--border); color: var(--text3); cursor: pointer; font-size: 12px; }
.lp-sidebar-close:hover { background: var(--border); }