/* ─────────────────────────────────────────────────────────────────────────────
   Per-screen styles. Sizes are the Compose `.dp` / `.sp` values read straight off
   the Kotlin, so a card that is 16dp padded there is 16px padded here.
   ───────────────────────────────────────────────────────────────────────────── */

/* ── Boot ──────────────────────────────────────────────────────────────────── */
.boot { display: grid; place-items: center; }
.boot-inner { text-align: center; padding: 24px; }
.boot-title { font-size: 36px; font-weight: 900; letter-spacing: 2px; }
.boot-sub { margin-top: 8px; font-size: 12px; color: var(--text-gray); }
.boot-error { margin-top: 12px; font-size: 13px; color: var(--amber-warm); max-width: 280px; }
.boot-retry {
  margin-top: 20px; padding: 12px 28px; border-radius: 12px;
  background: var(--neon-lime); color: #000; font-size: 14px; font-weight: 900;
}
.boot-bar {
  width: 180px; height: 4px; margin: 20px auto 0; border-radius: 2px;
  background: rgba(255, 255, 255, 0.08); overflow: hidden;
}
.boot-bar-fill { width: 40%; height: 100%; border-radius: 2px; background: var(--neon-lime); animation: boot-slide 1.1s ease-in-out infinite; }
@keyframes boot-slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(350%); } }

/* ── Auth ──────────────────────────────────────────────────────────────────── */
.auth-screen { background: linear-gradient(180deg, var(--cosmic-dark-bg), #0C071C, var(--cosmic-dark-bg)); }
.auth-wrap { display: flex; flex-direction: column; align-items: center; padding: 24px; min-height: 100dvh; justify-content: center; }
.auth-title { margin: 0; font-size: 36px; font-weight: 900; letter-spacing: 2px; text-align: center; }
.auth-tagline { margin: 2px 0 0; font-size: 12px; text-align: center; }
.auth-tagline-count { color: var(--text-gray); font-family: Georgia, "Times New Roman", serif; font-style: italic; }
.auth-tagline-free { font-weight: 700; }
.auth-blurb { margin: 6px 0 0; font-size: 11px; line-height: 16px; color: var(--text-gray); text-align: center; }

.auth-card {
  width: 100%; margin-top: 32px; padding: 24px; border-radius: 24px;
  background: var(--surface-card); border: 1px solid var(--neutral-border);
}
.auth-card-title { margin: 0; font-size: 20px; font-weight: 900; }
.auth-card-sub { margin: 0 0 20px; font-size: 12px; color: var(--text-gray); }
.auth-error {
  margin-bottom: 16px; padding: 12px; border-radius: 10px; font-size: 13px; font-weight: 500;
  color: var(--amber-warm); background: rgba(255, 171, 0, 0.08); border: 1px solid rgba(255, 171, 0, 0.25);
}

/* Compose's OutlinedTextField: the label sits on the border and shrinks on focus. */
.field { position: relative; display: block; margin-bottom: 14px; }
.field input {
  width: 100%; height: 56px; padding: 18px 14px 6px 44px; font: inherit; font-size: 15px;
  color: var(--text-white); background: var(--field-bg);
  border: 1px solid var(--neutral-border); border-radius: 12px; outline: none;
  transition: border-color 160ms var(--ease-standard), background 160ms var(--ease-standard);
}
.field input:focus { border-color: var(--neon-lime); background: var(--field-bg-focus); }
.field-icon { position: absolute; left: 15px; top: 19px; color: var(--text-gray); pointer-events: none; }
.field-label {
  position: absolute; left: 44px; top: 18px; font-size: 15px; color: var(--text-gray);
  pointer-events: none; transition: all 140ms var(--ease-standard);
}
.field input:focus + .field-label,
.field input:not(:placeholder-shown) + .field-label { top: 8px; left: 44px; font-size: 11px; }

.auth-submit {
  display: block; width: 100%; height: 50px; margin-top: 24px; border-radius: 12px;
  background: var(--neon-lime); color: #000; font-size: 15px; font-weight: 900;
  cursor: pointer; border: none; font-family: inherit;
  transition: transform 200ms var(--ease-standard), filter 200ms var(--ease-standard);
}
.auth-submit.is-signup { background: var(--brand-purple); color: #fff; }
.auth-submit:active { transform: scale(0.965); filter: brightness(1.08); transition-duration: 90ms; }
.auth-submit:disabled { opacity: 0.6; }

.auth-guest {
  display: block; width: 100%; height: 46px; margin-top: 20px; border-radius: 12px;
  background: var(--ghost-bg); border: 1px solid var(--neutral-border);
  color: var(--text-gray); font-size: 13px; font-weight: 700; font-family: inherit; cursor: pointer;
}
.auth-switch { margin: 16px 0 0; text-align: center; font-size: 13px; color: var(--text-gray); }
.auth-switch-btn { font-size: 13px; font-weight: 700; cursor: pointer; background: none; border: none; font-family: inherit; }

/* ── Hub ───────────────────────────────────────────────────────────────────── */
.hub-screen { background: linear-gradient(180deg, #060410, var(--cosmic-dark-bg), #03020A); }
.hub-body { padding-bottom: 116px; }
.crossfade { animation: fade-in 220ms var(--ease-standard) both; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.hub-header {
  padding: 0 16px 24px;
  border-radius: 0 0 28px 28px;
  background: linear-gradient(180deg, #1B124C, #0F0B26);
}
.hub-header-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; }
.hub-avatar {
  width: 36px; height: 36px; border-radius: 50%; font-size: 12px; font-weight: 900; color: #fff;
  background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.15);
  display: grid; place-items: center; cursor: pointer; font-family: inherit;
}
.hub-welcome { margin-left: 12px; }
.hub-welcome-label { font-size: 10px; font-weight: 800; letter-spacing: 1.5px; color: rgba(255, 255, 255, 0.38); }
.hub-welcome-name { font-size: 14px; font-weight: 700; }
.hub-streak {
  display: flex; align-items: center; gap: 4px; padding: 6px 10px; border-radius: 10px;
  font-size: 11px; font-weight: 700;
  background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.08);
}

.hub-next {
  margin-top: 8px; padding: 16px; border-radius: 18px;
  background: rgba(255, 255, 255, 0.047); border: 1px solid rgba(255, 255, 255, 0.07);
}
.hub-next-eyebrow { font-size: 10px; font-weight: 900; letter-spacing: 1.5px; color: var(--neon-lime); }
.hub-next-title { margin: 8px 0 0; font-size: 22px; font-weight: 900; line-height: 26px; }
.hub-progress { height: 6px; margin-top: 12px; border-radius: 3px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.hub-progress-fill { height: 100%; border-radius: 3px; background: var(--neon-lime); transition: width 400ms var(--ease-standard); }
.hub-progress-fill.accent { background: var(--accent); }
.hub-progress-label { margin-top: 6px; font-size: 11px; color: rgba(255, 255, 255, 0.44); }
.hub-cta {
  display: block; width: 100%; height: 50px; margin-top: 16px; border-radius: 12px;
  background: var(--neon-lime); color: #000; font-size: 15px; font-weight: 900;
}
.hub-browse { display: block; width: 100%; margin-top: 10px; padding: 4px 0; font-size: 12px; font-weight: 500; color: rgba(255, 255, 255, 0.5); }

.hub-scroll { padding: 20px 16px 0; }
.hub-section-label { margin: 20px 0 10px; font-size: 10px; font-weight: 900; letter-spacing: 1.5px; color: rgba(255, 255, 255, 0.33); }
.hub-foot { margin: 20px 0 24px; font-size: 11px; line-height: 16px; color: rgba(255, 255, 255, 0.28); text-align: center; }

.daily-card, .list-row {
  display: flex; align-items: center; gap: 13px; width: 100%; text-align: left;
  padding: 16px; border-radius: 16px; background: var(--surface-card);
  border: 1px solid var(--neutral-border);
}
.daily-card.accent-amber { border-color: rgba(255, 171, 0, 0.40); }
.daily-card.accent-green { border-color: rgba(0, 200, 150, 0.25); }
.daily-icon, .list-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; flex: none; }
.daily-card.accent-amber .daily-icon { background: rgba(255, 171, 0, 0.12); color: var(--amber-warm); }
.daily-card.accent-green .daily-icon { background: rgba(0, 200, 150, 0.12); color: var(--success-green); }
.list-icon { width: 40px; height: 40px; border-radius: 11px; }
.list-icon.tone-cyan { background: rgba(0, 210, 252, 0.12); color: var(--cyan-link); }
.daily-text, .list-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.daily-eyebrow { font-size: 10px; font-weight: 900; letter-spacing: 1.2px; }
.daily-card.accent-amber .daily-eyebrow { color: var(--amber-warm); }
.daily-card.accent-green .daily-eyebrow { color: var(--success-green); }
.daily-title { margin-top: 3px; font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.daily-meta { font-size: 11px; color: rgba(255, 255, 255, 0.44); }
.list-row { padding: 14px; margin-bottom: 10px; border-radius: 16px; }
.list-title { font-size: 14px; font-weight: 700; }
.list-sub { font-size: 11px; color: var(--text-gray); }
.row-chevron { color: rgba(255, 255, 255, 0.31); flex: none; display: grid; place-items: center; }

/* Floating capsule nav — 60px bar, 54px FAB lifted 14px above it. */
.hub-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding: 12px 16px; pointer-events: none; }
.hub-nav > * { pointer-events: auto; }
#app .hub-nav { max-width: var(--app-width); margin: 0 auto; }
.hub-nav-bar {
  display: flex; align-items: center; justify-content: space-around; height: 60px; padding: 0 4px;
  border-radius: 30px; background: #0D091B; border: 1.5px solid #1C1635;
}
.nav-gap { width: 60px; flex: none; }
.nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 4px 12px; border-radius: 12px; font-size: 10px; color: #4A4560;
}
.nav-item.active { color: #fff; font-weight: 700; }
.nav-item.active svg { color: var(--brand-purple); }
/* The wrapper is full-width so the FAB centres over the bar, which meant it sat on top of
   Home and Roadmap and swallowed their taps — the buttons looked fine and did nothing.
   Only the circular button itself may receive pointer events. */
.nav-fab-wrap {
  position: absolute; left: 0; right: 0; top: -2px;
  display: flex; flex-direction: column; align-items: center;
  pointer-events: none;
}
.nav-fab { pointer-events: auto; }
.nav-fab {
  display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; color: #fff;
  background: linear-gradient(180deg, var(--brand-purple), #7C3AED);
  border: 3px solid #05030C; box-shadow: 0 8px 24px rgba(134, 93, 255, 0.4);
}
.nav-fab-label { margin-top: 2px; font-size: 10px; font-weight: 700; letter-spacing: 0.5px; color: rgba(255, 255, 255, 0.8); }

/* ── Shared sub-screen chrome ──────────────────────────────────────────────── */
.sub-screen { padding: 0 16px 32px; position: relative; z-index: 1; }
.sub-bar { display: flex; align-items: center; gap: 10px; padding: 8px 0 16px; }
.sub-title { margin: 0; font-size: 18px; font-weight: 900; }
.icon-btn {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; flex: none;
  color: #fff; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--neutral-border);
}

.soon-card { margin-top: 40px; padding: 32px 24px; border-radius: 20px; text-align: center; background: var(--surface-card); border: 1px solid var(--neutral-border); }
.soon-emoji { font-size: 40px; }
.soon-title { margin-top: 12px; font-size: 16px; font-weight: 900; }
.soon-body { margin: 8px 0 0; font-size: 13px; line-height: 20px; color: var(--text-gray); }

/* ── Profile ───────────────────────────────────────────────────────────────── */
.profile-card { padding: 24px; border-radius: 20px; text-align: center; background: var(--surface-card); border: 1px solid var(--neutral-border); }
.profile-avatar {
  width: 64px; height: 64px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center;
  font-size: 22px; font-weight: 900; background: linear-gradient(180deg, var(--brand-purple), #7C3AED);
}
.profile-name { margin-top: 12px; font-size: 18px; font-weight: 900; }
.profile-email { margin-top: 4px; font-size: 12px; color: var(--text-gray); }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.stat-tile { padding: 16px; border-radius: 16px; text-align: center; background: var(--surface-card); border: 1px solid var(--neutral-border); }
.stat-value { font-size: 24px; font-weight: 900; color: var(--neon-lime); }
.stat-label { margin-top: 2px; font-size: 11px; color: var(--text-gray); }
.logout-btn {
  display: block; width: 100%; height: 48px; margin-top: 20px; border-radius: 14px;
  font-size: 13px; font-weight: 700; color: var(--amber-warm);
  background: rgba(255, 171, 0, 0.08); border: 1px solid rgba(255, 171, 0, 0.25);
}

/* ── Campaign picker ───────────────────────────────────────────────────────── */
.shows-intro { margin: 0 0 16px; font-size: 12px; line-height: 18px; color: var(--text-gray); }
.show-card { display: block; width: 100%; text-align: left; padding: 16px; margin-bottom: 12px; border-radius: 18px; background: var(--surface-card); border: 1px solid var(--neutral-border); }
.show-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.show-name { font-size: 16px; font-weight: 900; }
.show-theme { margin-top: 2px; font-size: 11px; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; color: var(--brand-purple); }
.show-count { font-size: 12px; font-weight: 700; color: var(--text-gray); white-space: nowrap; }
.show-desc { margin: 10px 0 12px; font-size: 12px; line-height: 18px; color: var(--text-gray); }

/* ── Level map ─────────────────────────────────────────────────────────────── */
.map-screen { background: var(--cosmic-dark-bg); }
.map-bg { position: absolute; inset: 0; background: linear-gradient(180deg, var(--deep), var(--cosmic-dark-bg) 45%, #050310); pointer-events: none; }
.map-hero { padding: 4px 0 20px; }
.map-theme { font-size: 11px; font-weight: 900; letter-spacing: 1.4px; text-transform: uppercase; color: var(--accent); }
.map-count { margin: 6px 0 10px; font-size: 13px; color: var(--text-gray); }

.chapter { margin-bottom: 12px; border-radius: 18px; overflow: hidden; background: var(--surface-card); border: 1px solid var(--neutral-border); }
.chapter.locked { opacity: 0.55; }
.chapter-head { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px; text-align: left; }
.chapter-badge {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; flex: none;
  font-size: 14px; font-weight: 900; color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent);
}
.chapter.complete .chapter-badge { color: var(--success-green); background: rgba(0, 200, 150, 0.15); }
.chapter.locked .chapter-badge { color: rgba(255, 255, 255, 0.25); background: rgba(255, 255, 255, 0.04); }
.chapter-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.chapter-name { font-size: 14px; font-weight: 700; }
.chapter-meta { font-size: 11px; color: var(--text-gray); }
.chapter-caret { color: rgba(255, 255, 255, 0.4); flex: none; display: grid; place-items: center; transition: transform 200ms var(--ease-standard); }
.chapter.open .chapter-head .chapter-caret { transform: rotate(180deg); }
.chapter-levels { display: none; padding: 0 10px 10px; }
.chapter.open .chapter-levels { display: block; }

.level-node { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; margin-top: 6px; text-align: left; border-radius: 14px; background: rgba(255, 255, 255, 0.02); border: 1px solid transparent; }
.level-node.done { border-color: rgba(0, 200, 150, 0.3); }
.level-node.open { border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.level-node.current { border-width: 2px; border-color: var(--accent); }
.level-node.locked { opacity: 0.45; cursor: not-allowed; }
.level-dot { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; flex: none; }
.level-node.done .level-dot { color: var(--success-green); background: rgba(0, 200, 150, 0.14); }
.level-node.open .level-dot { color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.level-node.locked .level-dot { color: rgba(255, 255, 255, 0.3); background: rgba(255, 255, 255, 0.04); }
.level-text { display: flex; flex-direction: column; min-width: 0; }
.level-num { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.level-stars { font-size: 11px; color: rgba(255, 255, 255, 0.44); letter-spacing: 1px; }

/* ── Game ──────────────────────────────────────────────────────────────────── */
.game-screen { background: linear-gradient(180deg, #0A0718, var(--cosmic-dark-bg)); display: flex; flex-direction: column; }
.game-top { display: flex; align-items: center; gap: 10px; padding: 8px 16px 12px; border-bottom: 1px solid var(--neutral-border); position: sticky; top: 0; z-index: 5; background: #0A0718; }
.game-top-text { flex: 1; min-width: 0; }
.game-top-show { font-size: 10px; font-weight: 900; letter-spacing: 1.2px; color: var(--brand-purple); text-transform: uppercase; }
.game-top-level { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hint-btn { padding: 8px 14px; border-radius: 10px; font-size: 12px; font-weight: 700; color: var(--amber-warm); background: rgba(255, 171, 0, 0.08); border: 1px solid rgba(255, 171, 0, 0.25); flex: none; }

.game-scroll { padding: 16px; }
.card-eyebrow { font-size: 10px; font-weight: 900; letter-spacing: 1.4px; color: rgba(255, 255, 255, 0.4); }
.quote-card { padding: 14px 16px; border-radius: 14px; font-size: 13px; line-height: 20px; font-style: italic; color: var(--text-gray); background: rgba(134, 93, 255, 0.06); border-left: 3px solid var(--brand-purple); }
.objective-card, .schema-card, .editor-card, .blocks-card, .result-card { margin-top: 12px; padding: 16px; border-radius: 16px; background: var(--surface-card); border: 1px solid var(--neutral-border); }
.objective-text { margin: 8px 0 0; font-size: 14px; line-height: 21px; }

.hint-box { margin-top: 12px; padding: 16px; border-radius: 16px; background: rgba(255, 171, 0, 0.06); border: 1px solid rgba(255, 171, 0, 0.25); }
.hint-sql { display: block; margin-top: 8px; font-family: "Roboto Mono", ui-monospace, monospace; font-size: 12px; line-height: 19px; color: var(--neon-lime); word-break: break-word; }
.hint-warn { margin-top: 8px; font-size: 11px; color: var(--amber-warm); }

.table-block { margin-top: 10px; border-radius: 12px; overflow: hidden; border: 1px solid var(--neutral-border); }
.table-head { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; text-align: left; background: rgba(255, 255, 255, 0.02); }
.table-name { flex: 1; font-family: "Roboto Mono", monospace; font-size: 13px; font-weight: 700; color: var(--cyan-link); }
.table-cols { font-size: 11px; color: var(--text-gray); }
.table-block .chapter-caret { transition: transform 200ms var(--ease-standard); }
.table-block.open .chapter-caret { transform: rotate(180deg); }
.table-body { display: none; padding: 10px 12px 12px; }
.table-block.open .table-body { display: block; }
.col-list { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.col-chip { padding: 4px 8px; border-radius: 6px; font-family: "Roboto Mono", monospace; font-size: 11px; color: var(--text-gray); background: rgba(255, 255, 255, 0.04); }

.editor {
  display: block; width: 100%; margin-top: 10px; padding: 12px; border-radius: 12px; resize: vertical;
  min-height: 84px; font-family: "Roboto Mono", ui-monospace, monospace; font-size: 13px; line-height: 20px;
  color: var(--neon-lime); background: rgba(0, 0, 0, 0.35); border: 1px solid var(--neutral-border); outline: none;
}
.editor:focus { border-color: var(--brand-purple); }
.editor::placeholder { color: rgba(255, 255, 255, 0.25); font-family: Roboto, sans-serif; }
.editor-actions { display: flex; gap: 10px; margin-top: 12px; }
.btn-ghost { flex: 1; height: 46px; border-radius: 12px; font-size: 13px; font-weight: 700; color: var(--text-gray); background: var(--ghost-bg); border: 1px solid var(--neutral-border); }
.btn-run { flex: 1.4; height: 46px; border-radius: 12px; font-size: 14px; font-weight: 900; color: #000; background: var(--neon-lime); border: none; }

.blocks { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.block { padding: 9px 13px; border-radius: 10px; font-family: "Roboto Mono", monospace; font-size: 12.5px; font-weight: 500; color: var(--text-white); background: rgba(134, 93, 255, 0.10); border: 1px solid rgba(134, 93, 255, 0.28); }

.result-card.tone-ok { border-color: rgba(0, 200, 150, 0.35); }
.result-card.tone-error, .result-card.tone-warn { border-color: rgba(255, 171, 0, 0.35); }
.result-msg { margin: 8px 0 0; font-size: 13px; line-height: 20px; }
.table-scroll { margin-top: 10px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.data-table { border-collapse: collapse; font-family: "Roboto Mono", monospace; font-size: 12px; white-space: nowrap; }
.data-table th, .data-table td { padding: 7px 12px; text-align: left; border-bottom: 1px solid var(--neutral-border); }
.data-table th { font-weight: 700; color: var(--cyan-link); }
.data-table td { color: var(--text-gray); }
.table-more { margin-top: 6px; font-size: 11px; color: var(--text-gray); }
.game-foot-space { height: 24px; }

/* ── Dialogs ───────────────────────────────────────────────────────────────── */
.dialog-scrim { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 24px; background: rgba(3, 2, 8, 0.72); backdrop-filter: blur(2px); animation: fade-in 180ms var(--ease-standard) both; }
.victory {
  width: 100%; max-width: 360px; padding: 28px; border-radius: 28px; text-align: center;
  background: linear-gradient(180deg, #15102E, #090717); border: 1.5px solid #28224D;
  animation: pop-in 260ms var(--ease-standard) both;
}
@keyframes pop-in { from { transform: scale(0.88); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.victory-stars { font-size: 34px; letter-spacing: 6px; }
.star { color: rgba(255, 255, 255, 0.15); }
.star.on { color: var(--amber-warm); }
.victory-title { margin-top: 10px; font-size: 18px; font-weight: 900; letter-spacing: 1px; }
.victory-sub { margin: 10px 0 0; font-size: 13px; line-height: 20px; color: rgba(255, 255, 255, 0.5); }
.victory-actions { display: flex; gap: 12px; margin-top: 24px; }

/* ── Roadmap ───────────────────────────────────────────────────────────────── */
.rm-intro { margin: 0 0 16px; font-size: 12px; line-height: 18px; color: var(--text-gray); }
.rm-library { display: flex; flex-direction: column; gap: 12px; }

.rm-card {
  position: relative;
  display: flex; flex-direction: column; gap: 3px;
  width: 100%; text-align: left; overflow: hidden;
  padding: 16px; border-radius: 20px;
  background: linear-gradient(150deg, var(--card-a), var(--card-b));
  border: 1px solid color-mix(in srgb, var(--card-accent) 30%, transparent);
}
.rm-card.soon { opacity: 0.55; cursor: default; }

/* The abbreviation, set huge and low-contrast, sitting behind the text. */
.rm-watermark {
  position: absolute;
  /* Sits fully inside the card. Bleeding it off the right edge cut the second letter in
     half, so "XL" read as "XI" and "SQ" as "SO" — which looks like a typo, not a flourish. */
  right: 14px; bottom: 8px;
  font-family: var(--font-display);
  font-size: 88px; font-weight: 700; line-height: 0.85;
  letter-spacing: -0.05em;
  color: color-mix(in srgb, var(--card-accent) 15%, transparent);
  pointer-events: none;
  user-select: none;
}
.rm-card > *:not(.rm-watermark) { position: relative; z-index: 1; }

.rm-card-top { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.rm-tag {
  padding: 6px 11px; border-radius: 9px;
  font-size: 10px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85); background: rgba(255, 255, 255, 0.09);
}
.rm-chip {
  padding: 6px 11px; border-radius: 9px;
  font-size: 10px; font-weight: 800; letter-spacing: 0.08em;
  color: var(--card-accent);
  background: color-mix(in srgb, var(--card-accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--card-accent) 34%, transparent);
}
.rm-chip.soon, .rm-chip.ext {
  color: rgba(255, 255, 255, 0.5); background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
}
.rm-soon {
  padding: 2px 7px; border-radius: 6px; font-size: 9px; font-weight: 900; letter-spacing: 1px;
  color: var(--amber-warm); background: rgba(255, 171, 0, 0.12); border: 1px solid rgba(255, 171, 0, 0.3);
}

.rm-title {
  font-size: 19px; font-weight: 700; line-height: 1.2;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.rm-sub { margin-top: 3px; font-size: 12.5px; color: rgba(255, 255, 255, 0.5); }
.rm-bar { display: block; height: 5px; margin-top: 14px; border-radius: 3px; background: rgba(0, 0, 0, 0.4); overflow: hidden; }
.rm-bar-fill { display: block; height: 100%; border-radius: 3px; background: var(--card-accent); }
.rm-progress { margin-top: 6px; font-size: 11px; color: rgba(255, 255, 255, 0.45); }

.rm-head { padding: 4px 0 18px; }
.rm-head-tag { font-size: 11px; font-weight: 900; letter-spacing: 1.3px; text-transform: uppercase; color: var(--card-accent); }
.rm-head-title { margin: 6px 0 0; font-size: 20px; font-weight: 900; }
.rm-head-desc { margin: 8px 0 12px; font-size: 12px; line-height: 18px; color: var(--text-gray); }
.hub-progress-fill.accent-card { background: var(--card-accent); }
.rm-head-progress { margin-top: 6px; font-size: 11px; color: rgba(255, 255, 255, 0.5); }

.rm-tracks { display: flex; flex-direction: column; gap: 10px; }
.track-card {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 14px; border-radius: 16px; background: var(--surface-card); border: 1px solid var(--neutral-border);
}
.track-card.soon { opacity: 0.55; cursor: default; }
.track-badge {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; flex: none;
  font-size: 12px; font-weight: 900; color: var(--card-accent);
  background: color-mix(in srgb, var(--card-accent) 14%, transparent);
}
.track-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.track-name { font-size: 14px; font-weight: 700; }
.track-tagline { font-size: 11px; color: var(--text-gray); }
.track-meta { margin-top: 2px; font-size: 11px; color: rgba(255, 255, 255, 0.4); }

.rm-tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 12px; scrollbar-width: none; }
.rm-tabs::-webkit-scrollbar { display: none; }
.rm-tab {
  flex: none; padding: 8px 14px; border-radius: 20px; font-size: 12px; font-weight: 700;
  color: var(--text-gray); background: rgba(255, 255, 255, 0.04); border: 1px solid var(--neutral-border);
  white-space: nowrap;
}
.rm-tab.active { color: #05030C; background: var(--card-accent); border-color: var(--card-accent); }

.topic { margin-bottom: 10px; border-radius: 16px; overflow: hidden; background: var(--surface-card); border: 1px solid var(--neutral-border); }
.topic.checked { border-color: color-mix(in srgb, var(--card-accent) 40%, transparent); }
.topic-head { display: flex; align-items: flex-start; gap: 12px; padding: 14px; }
.topic-check {
  display: grid; place-items: center; width: 24px; height: 24px; margin-top: 1px; flex: none;
  border-radius: 7px; color: #05030C; background: transparent;
  border: 2px solid var(--neutral-border);
}
.topic-check.on { background: var(--card-accent); border-color: var(--card-accent); }
.topic-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.topic-title { font-size: 13.5px; font-weight: 700; line-height: 19px; }
.topic.checked .topic-title { color: var(--text-gray); }
.topic-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; }
.pill { padding: 2px 8px; border-radius: 6px; font-size: 10px; font-weight: 800; letter-spacing: 0.4px; }
.diff-easy { color: var(--success-green); background: rgba(0, 200, 150, 0.12); }
.diff-medium { color: var(--amber-warm); background: rgba(255, 171, 0, 0.12); }
.diff-hard { color: #FF6B6B; background: rgba(255, 107, 107, 0.12); }
.topic-dur { font-size: 10.5px; color: rgba(255, 255, 255, 0.4); }
.topic .chapter-caret { margin-top: 2px; }
.topic.open .chapter-caret { transform: rotate(180deg); }

.topic-body { display: none; padding: 0 14px 16px 50px; }
.topic.open .topic-body { display: block; }
.topic-body .card-eyebrow { display: block; margin-bottom: 6px; }
.topic-body p { margin: 0; font-size: 12.5px; line-height: 19px; color: var(--text-gray); }
.topic-body ul { margin: 0; padding-left: 18px; }
.topic-body li { margin-bottom: 5px; font-size: 12.5px; line-height: 19px; color: var(--text-gray); }
.why { padding: 12px; border-radius: 10px; background: rgba(255, 255, 255, 0.03); border-left: 3px solid var(--card-accent); }
.bullets { margin-top: 14px; }
.bullets.mistakes li { color: rgba(255, 171, 0, 0.85); }
.tips { margin-top: 14px; padding: 12px; border-radius: 10px; background: rgba(0, 200, 150, 0.06); border: 1px solid rgba(0, 200, 150, 0.2); }
.tips p { color: var(--success-green); }

.rm-section-desc { margin: 0 0 14px; font-size: 12.5px; line-height: 19px; color: var(--text-gray); }
.rm-section-card { margin-bottom: 10px; padding: 14px; border-radius: 14px; background: var(--surface-card); border: 1px solid var(--neutral-border); }
.rm-section-card-title { font-size: 13px; font-weight: 800; color: var(--card-accent); margin-bottom: 8px; }
.rm-section-card ul { margin: 0; padding-left: 18px; }
.rm-section-card li { margin-bottom: 5px; font-size: 12.5px; line-height: 19px; color: var(--text-gray); }

/* ── Auth: Google sign-in ──────────────────────────────────────────────────── */
.auth-or { display: flex; align-items: center; gap: 12px; margin: 18px 0 14px; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--neutral-border); }
.auth-or span { font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: rgba(255, 255, 255, 0.3); }
/* Google renders its own button into this slot; we only centre it. */
.google-slot { display: flex; justify-content: center; min-height: 44px; }
.auth-guest { margin-top: 16px; }

/* ── Profile: settings ─────────────────────────────────────────────────────── */
.profile-badge {
  display: inline-block; margin-top: 8px; padding: 3px 10px; border-radius: 20px;
  font-size: 10px; font-weight: 800; letter-spacing: 0.6px;
  color: var(--cyan-link); background: rgba(0, 210, 252, 0.1); border: 1px solid rgba(0, 210, 252, 0.25);
}
.settings-card { margin-top: 16px; padding: 16px; border-radius: 16px; background: var(--surface-card); border: 1px solid var(--neutral-border); }
.settings-row { display: flex; align-items: center; gap: 14px; }
.settings-text { flex: 1; min-width: 0; }
.settings-title { font-size: 14px; font-weight: 700; }
.settings-sub { margin-top: 2px; font-size: 11px; color: var(--text-gray); }
.settings-note { margin: 12px 0 0; font-size: 11px; line-height: 17px; color: rgba(255, 255, 255, 0.4); }
.settings-note.warn { color: var(--amber-warm); }
.link-btn { font-size: 11px; font-weight: 700; color: var(--cyan-link); text-decoration: underline; }

.switch {
  position: relative; width: 46px; height: 27px; flex: none; border-radius: 14px;
  background: rgba(255, 255, 255, 0.09); border: 1px solid var(--neutral-border);
  transition: background 180ms var(--ease-standard), border-color 180ms var(--ease-standard);
}
.switch span {
  position: absolute; top: 3px; left: 3px; width: 19px; height: 19px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  transition: transform 180ms var(--ease-standard), background 180ms var(--ease-standard);
}
.switch.on { background: var(--success-green); border-color: var(--success-green); }
.switch.on span { transform: translateX(19px); background: #04140F; }
