/* 2026 blue and white visual system. Loaded after the legacy component sheet. */
:root {
  --ink: #142b48;
  --ink-soft: #536983;
  --muted: #74879d;
  --blue: #2469d4;
  --blue-deep: #164fae;
  --aqua: #477fd4;
  --mint: #eaf2ff;
  --sky: #eaf2ff;
  --paper: #fff;
  --paper-strong: #fff;
  --line: #dce6f3;
  --shadow: 0 5px 20px rgba(24, 64, 116, .06);
  --radius-xl: 22px;
  --radius-lg: 18px;
  --radius-md: 14px;
}
html, body { background: #e9eff8; }
body { color: var(--ink); }
.app-shell { border-color: #dce6f3; background: #f5f8fd; box-shadow: 0 18px 56px rgba(20, 52, 92, .12); }
.app-shell::before, .ambient, .noise { display: none; }
.app-header { min-height: 76px; padding: calc(14px + env(safe-area-inset-top)) 22px 7px; background: transparent; }
.app-main { padding: 0 20px calc(94px + env(safe-area-inset-bottom)); }
.brand-mark, .settings-header-title strong { color: #112a4a; }
.brand-mark { font-size: 18px; letter-spacing: -.035em; }
.brand-symbol { background: #2469d4; box-shadow: 0 4px 12px rgba(36, 105, 212, .2); }
.eyebrow { color: #356fbd; font-size: 10px; letter-spacing: .12em; }
.home-date { color: #647c9a; font-size: 11px; }
.welcome-copy h1 { color: #122b4c; font-size: clamp(30px, 8vw, 35px); }
.welcome-copy p { color: #5e7490; font-size: 14px; }
.section-heading h2 { color: #173252; font-size: 18px; }
.section-heading .muted.small { color: #8091a6; font-size: 12px; }
.page-title-row h1 { color: #142f51; }

.glass-panel, .glass-card,
.metric, .quick-action, .logbook-entry, .subject-card,
.bank-version-card, .catalog-chapter, .catalog-knowledge-group,
.catalog-mode-card, .route-card, .settings-group, .profile-top,
.feedback-card, .admin-feedback-card, .leaderboard-card,
.question-card, .question-row, .data-empty, .login-hero {
  border-color: #e0e8f3;
  background: #fff;
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.glass-panel, .glass-card { border-radius: 18px; }
.icon-button, .circle-button {
  width: 44px; height: 44px; color: #315477;
  border: 1px solid #dce6f3; border-radius: 14px;
  background: #fff; box-shadow: 0 3px 12px rgba(26, 69, 124, .05);
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
.icon-button:hover, .circle-button:hover { background: #f2f7ff; }
.icon-button .icon, .circle-button .icon { width: 20px; height: 20px; }
.theme-toggle-button { color: #2469d4; background: #eef5ff; }
.theme-toggle-button:hover { background: #e4efff; }

.welcome-line { margin-top: 18px; }
.home-start-card { margin-top: 22px; }
.continue-card {
  min-height: 190px; padding: 23px 21px; color: #fff;
  border: 1px solid rgba(255,255,255,.14); border-radius: 21px;
  background: linear-gradient(118deg, #123b78 0%, #1857ac 61%, #347ee2 100%);
  box-shadow: 0 13px 27px rgba(27, 82, 159, .19);
}
.continue-card::after { border-color: rgba(255,255,255,.2); box-shadow: 0 0 0 16px rgba(255,255,255,.045), 0 0 0 34px rgba(255,255,255,.025); }
.card-kicker { color: #c9e0ff; font-size: 11px; letter-spacing: .05em; }
.continue-copy h2 { color: #fff; font-size: 22px; line-height: 1.3; }
.continue-copy p { color: #dceaff; font-size: 13px; line-height: 1.5; }
.continue-button { min-height: 44px; margin-top: 17px; padding: 0 16px; color: #124487; border-radius: 12px; background: #fff; box-shadow: 0 5px 13px rgba(5, 39, 91, .13); font-size: 13px; }
.continue-button .icon { width: 15px; height: 15px; }
.hero-navigation { width: 72px; height: 72px; color: #fff; border-color: rgba(255,255,255,.23); background: rgba(255,255,255,.11); }
.hero-navigation::before { border-color: rgba(255,255,255,.18); }
.metric-strip { gap: 9px; margin-top: 12px; }
.metric { min-height: 70px; padding: 12px 6px; border: 1px solid #e3ebf5; border-radius: 15px; }
.metric + .metric { border-left: 1px solid #e3ebf5; }
.metric strong { color: #1c4f94; font-size: 21px; }
.metric span { color: #75879d; font-size: 11px; }
.section { margin-top: 28px; }
.quick-grid { gap: 10px; }
.quick-action, .quick-action:nth-child(even), .quick-action:nth-child(n+3) {
  min-height: 78px; padding: 12px 11px;
  border: 1px solid #e0e8f3; border-radius: 16px;
  background: #fff; text-align: left;
}
.quick-action { grid-template-columns: 38px minmax(0, 1fr) 15px; gap: 9px; }
.quick-action .quick-icon, .quick-action:nth-child(n) .quick-icon {
  width: 38px; height: 38px; margin: 0; color: #2469d4;
  border-radius: 12px; background: #eaf2ff;
}
.quick-action:nth-child(2) .quick-icon { color: #1b72b9; background: #e8f5ff; }
.quick-action:nth-child(3) .quick-icon { color: #3e69ac; background: #edf2fc; }
.quick-action:nth-child(4) .quick-icon { color: #4665ba; background: #eff1fd; }
.quick-action .quick-copy strong { color: #1c385b; font-size: 13px; }
.quick-action .quick-copy small { color: #74869c; font-size: 11px; }
.quick-action > .icon:last-child { color: #9babbd; }
.quick-action:hover, .subject-card:hover { border-color: #bad1f3; background: #fbfdff; }
.logbook-entry { min-height: 72px; border: 1px solid #e0e8f3; border-radius: 16px; }
.logbook-symbol, .subject-symbol, .bank-version-icon, .catalog-hero-icon,
.catalog-mode-icon, .settings-icon, .login-hero-orb, .data-empty .empty-icon {
  color: #2469d4; border-color: #d8e7fa; border-radius: 12px; background: #eaf2ff; box-shadow: none;
}
.subject-card:nth-child(n) .subject-symbol { color: #2469d4; background: #eaf2ff; }

.search-bar { height: 50px; border: 1px solid #dce6f3; border-radius: 14px; background: #fff; box-shadow: var(--shadow); }
.search-bar .icon { color: #5c7da3; }
.search-bar input { min-height: 48px; color: var(--ink); font-size: 16px; }
.search-bar input::placeholder { color: #94a4b7; }
.role-switch-button.is-active, .library-sidebar .role-switch-button.is-active { color: #1555ae; background: #e9f2ff; box-shadow: none; }
.library-sidebar { border-color: #dce6f3; background: #edf3fb; }
.library-sidebar-heading { color: #607a9b; }
.library-sidebar .role-switch-button { min-height: 59px; color: #617892; }
.library-sidebar .role-switch-button span { font-size: 13px; }
.library-sidebar .role-switch-button small { color: #7188a4; font-size: 11px; }
.library-sidebar .role-switch-button.is-active::before { background: #2469d4; }
.library-sidebar .role-switch-button.is-active small { color: #527bb3; }
.library-content .library-intro { color: #72869e; font-size: 11px; }
.library-content .section-heading h2 { color: #183658; font-size: 15px; }
.library-content .section-heading .muted { font-size: 10px; }
.library-content .subject-grid, .library-content .subject-card { border-color: #dce6f3; }
.library-content .subject-card { min-height: 86px; padding: 14px 12px; gap: 10px; }
.library-content .subject-card .subject-symbol { width: 36px; height: 36px; flex-shrink: 0; }
.library-content .subject-card .subject-role { color: #647d99; font-size: 11px; }
.library-content .subject-card strong { color: #1a3658; font-size: 14px; line-height: 1.45; }
.library-content .subject-card small { color: #687f9b; font-size: 12px; line-height: 1.4; }
.library-content .subject-card .category-entry { color: #9aadbf; }

.primary-button, .secondary-button { min-height: 48px; padding: 0 16px; border-radius: 13px; font-size: 14px; }
.primary-button { color: #fff; border: 1px solid #2469d4; background: #2469d4; box-shadow: 0 7px 16px rgba(36, 105, 212, .18); }
.primary-button:hover { background: #1558bb; }
.secondary-button { color: #22558f; border: 1px solid #d5e3f5; background: #fff; }
.compact-button, .catalog-filter-row .compact-button { min-height: 39px; font-size: 12px; }
.catalog-filter-row .is-active, .font-size-option.is-active,
.question-list-toolbar .compact-button.is-active { color: #fff; border-color: #2469d4; background: #2469d4; box-shadow: none; }
.theme-mode-option, .login-mode-button, .practice-mode-choice, .random-count-choice { min-height: 44px; font-size: 12px; }
.theme-mode-option.is-active, .login-mode-button.is-active,
.practice-mode-choice.is-active, .random-count-choice.is-active,
.catalog-mode-card.is-active { color: #1555ad; border-color: #a9c9f4; background: #eaf2ff; box-shadow: none; }
.catalog-mode-card.is-active strong, .practice-mode-choice.is-active small { color: #1555ad; }
.settings-toggle.is-on { background: #2469d4; box-shadow: none; }
.settings-row { min-height: 70px; padding: 14px 16px; }
.settings-row + .settings-row { border-color: #e5ecf5; }
.settings-row-button:hover { background: #f7faff; }
.bank-version-card { min-height: 74px; padding: 15px; border-radius: 16px; }
.catalog-mode-card { min-height: 76px; padding: 13px; border-radius: 14px; }
.catalog-mode-card strong { color: #254667; font-size: 14px; }
.catalog-mode-card small { font-size: 12px; line-height: 1.45; }
.catalog-chapter { border-radius: 16px; }
.thin-progress i { background: #2469d4; }
.option-row { min-height: 59px; padding: 13px; border-color: #dbe6f3; border-radius: 14px; background: #fff; }
.option-row p { color: #294461; font-size: 15px; line-height: 1.65; }
.option-row:hover { border-color: #adcaf0; background: #f8fbff; }
.option-row.is-selected { border-color: #80adeb; background: #ecf4ff; box-shadow: none; }
.option-row.is-selected .option-letter { background: #2469d4; }
.option-row.is-correct { border-color: #72b595; background: #edf8f1; }
.option-row.is-wrong { border-color: #e6a3a3; background: #fff1f1; }
.question-tool.is-active, .question-meta .icon-button.is-active { color: #1555ad; background: #eaf2ff; }
.practice-dialog { border: 1px solid #dce6f3; border-radius: 22px; background: #fff; box-shadow: 0 22px 60px rgba(18, 46, 84, .2); }
.practice-dialog-backdrop { background: rgba(12, 35, 68, .4); }
.tabbar {
  left: max(14px, calc((100vw - 470px) / 2 + 14px));
  right: max(14px, calc((100vw - 470px) / 2 + 14px));
  bottom: calc(8px + env(safe-area-inset-bottom));
  gap: 4px; padding: 5px 6px; border: 1px solid #dce6f3;
  border-radius: 20px; background: rgba(255,255,255,.97);
  box-shadow: 0 6px 22px rgba(20, 52, 94, .1);
}
.tabbar-item { min-height: 54px; padding: 3px 2px; justify-content: center; gap: 2px; color: #687e98; font-size: 11px; line-height: 15px; }
.tabbar-item .tabbar-icon { width: 44px; height: 30px; border-radius: 11px; }
.tabbar-item .tabbar-icon .icon { width: 25px; height: 25px; stroke-width: 1.8; }
.tabbar-item[aria-current="page"] { color: #1e5eb8; }
.tabbar-item[aria-current="page"] .tabbar-icon { background: #e7f0ff; }
.tabbar-item[aria-current="page"] .tabbar-icon .icon { color: #2469d4; }
:where(button, a, input, summary):focus-visible { outline: 3px solid rgba(36,105,212,.42); outline-offset: 2px; }

/* Dark mode uses the same hierarchy and blue accent. */
body.night-mode {
  --ink: #edf4ff; --ink-soft: #b6c8de; --muted: #91a6bf;
  --blue: #80afff; --blue-deep: #9bc2ff; --aqua: #80afff;
  --line: #2a405d; --shadow: 0 5px 22px rgba(0,0,0,.12);
  --night-bg: #081626; --night-surface: #12263c;
  --night-surface-soft: #0e2034; --night-surface-raised: #19314c;
  --night-border: #2a405d;
  background: #081626;
}
html.night-mode, html.night-mode body { background: #081626; }
body.night-mode .app-shell { border-color: #213954; background: #0b1a2b; box-shadow: 0 18px 56px rgba(0,0,0,.25); }
body.night-mode .app-shell::before, body.night-mode .ambient { display: none; }
body.night-mode .app-header { background: transparent; }
body.night-mode .brand-mark, body.night-mode .welcome-copy h1,
body.night-mode .section-heading h2, body.night-mode .page-title-row h1,
body.night-mode .settings-header-title strong { color: #eef5ff; }
body.night-mode .welcome-copy p, body.night-mode .home-date { color: #a2b5ce; }
body.night-mode .eyebrow { color: #8cb9ff; }
body.night-mode .glass-panel, body.night-mode .glass-card,
body.night-mode .metric, body.night-mode .quick-action, body.night-mode .logbook-entry,
body.night-mode .subject-card, body.night-mode .bank-version-card,
body.night-mode .catalog-chapter, body.night-mode .catalog-knowledge-group,
body.night-mode .catalog-mode-card, body.night-mode .route-card,
body.night-mode .settings-group, body.night-mode .profile-top,
body.night-mode .feedback-card, body.night-mode .admin-feedback-card,
body.night-mode .leaderboard-card, body.night-mode .question-card,
body.night-mode .question-row, body.night-mode .data-empty,
body.night-mode .login-hero { border-color: #2a405b; background: #12263d; box-shadow: var(--shadow); }
body.night-mode .icon-button, body.night-mode .circle-button { color: #b6d1f7; border-color: #304864; background: #19314b; }
body.night-mode .theme-toggle-button { color: #9bc2ff; background: #203d61; }
body.night-mode .continue-card { border-color: #28579a; background: linear-gradient(118deg, #143469, #194e9a 67%, #2868c0); box-shadow: 0 13px 27px rgba(0,0,0,.2); }
body.night-mode .card-kicker { color: #c7dfff; }
body.night-mode .continue-copy p { color: #d7e7fc; }
body.night-mode .continue-button { color: #133f7d; background: #f4f8ff; }
body.night-mode .metric + .metric { border-left-color: #2a405b; }
body.night-mode .metric strong { color: #d7e8ff; }
body.night-mode .metric span, body.night-mode .quick-action .quick-copy small { color: #9aafc8; }
body.night-mode .quick-action .quick-copy strong, body.night-mode .library-content .subject-card strong { color: #e8f2ff; }
body.night-mode .quick-action .quick-icon, body.night-mode .quick-action:nth-child(n) .quick-icon,
body.night-mode .logbook-symbol, body.night-mode .subject-symbol,
body.night-mode .bank-version-icon, body.night-mode .catalog-hero-icon,
body.night-mode .catalog-mode-icon, body.night-mode .settings-icon,
body.night-mode .login-hero-orb, body.night-mode .data-empty .empty-icon { color: #9cc4ff; border-color: #315480; background: #203e64; }
body.night-mode .subject-card:nth-child(n) .subject-symbol { color: #9cc4ff; background: #203e64; }
body.night-mode .quick-action > .icon:last-child, body.night-mode .library-content .subject-card .category-entry { color: #8fa9c6; }
body.night-mode .library-sidebar { border-color: #2a405b; background: #102238; }
body.night-mode .library-sidebar-heading, body.night-mode .library-sidebar .role-switch-button,
body.night-mode .library-content .library-intro, body.night-mode .library-content .subject-card .subject-role,
body.night-mode .library-content .subject-card small { color: #99aec7; }
body.night-mode .library-sidebar .role-switch-button.is-active { color: #dceaff; background: #214368; }
body.night-mode .library-sidebar .role-switch-button.is-active small { color: #a7c6ef; }
body.night-mode .library-content .subject-grid, body.night-mode .library-content .subject-card { border-color: #2a405b; }
body.night-mode .library-content .section-heading h2 { color: #e8f2ff; }
body.night-mode .search-bar { border-color: #2d4561; background: #142940; }
body.night-mode .search-bar input { color: #e8f2ff; }
body.night-mode .search-bar input::placeholder { color: #93a8c1; }
body.night-mode .search-bar .icon { color: #a2b9d5; }
body.night-mode .primary-button { color: #fff; border-color: #3979dd; background: #3979dd; }
body.night-mode .secondary-button { color: #bed9ff; border-color: #345172; background: #1b3450; }
body.night-mode .theme-mode-option.is-active, body.night-mode .login-mode-button.is-active,
body.night-mode .practice-mode-choice.is-active, body.night-mode .random-count-choice.is-active,
body.night-mode .catalog-mode-card.is-active { color: #d4e7ff; border-color: #477bb7; background: #24486f; }
body.night-mode .catalog-mode-card.is-active strong,
body.night-mode .practice-mode-choice.is-active small { color: #d4e7ff; }
body.night-mode .catalog-filter-row .is-active, body.night-mode .font-size-option.is-active,
body.night-mode .question-list-toolbar .compact-button.is-active { color: #fff; border-color: #3979dd; background: #3979dd; }
body.night-mode .settings-toggle.is-on { background: #3979dd; }
body.night-mode .option-row { color: #e8f2ff; border-color: #2d4561; background: #142940; }
body.night-mode .option-row p { color: #e1edfc; }
body.night-mode .option-row.is-selected { border-color: #6096dc; background: #1d426b; }
body.night-mode .option-row.is-selected .option-letter { background: #3979dd; }
body.night-mode .option-row.is-correct { border-color: #427e64; background: #1c3a32; }
body.night-mode .option-row.is-wrong { border-color: #9b6060; background: #402a31; }
body.night-mode .practice-dialog { border-color: #36506d; background: #142940; }
body.night-mode .tabbar { border-color: #2b415d; background: rgba(17,37,60,.97); box-shadow: 0 8px 28px rgba(0,0,0,.25); }
body.night-mode .tabbar-item { color: #9bb0cb; }
body.night-mode .tabbar-item[aria-current="page"] { color: #a6ccff; }
body.night-mode .tabbar-item[aria-current="page"] .tabbar-icon { background: #21446e; }
body.night-mode .tabbar-item[aria-current="page"] .tabbar-icon .icon { color: #a6ccff; }
@media (min-width: 471px) { body { background: #e9eff8; } body.night-mode { background: #081626; } }
@media (max-width: 360px) {
  .app-main { padding-inline: 15px; }
  .quick-grid { gap: 7px; }
  .quick-action { grid-template-columns: 32px minmax(0,1fr) 12px; gap: 6px; padding-inline: 8px; }
  .quick-action .quick-icon, .quick-action:nth-child(n) .quick-icon { width: 32px; height: 32px; }
  .library-browser { grid-template-columns: 73px minmax(0,1fr); gap: 10px; }
}

/* Secondary screens follow the same surfaces and touch scale. */
.profile-top { padding: 17px; border: 1px solid #e0e8f3; border-radius: 18px; background: #fff; }
.profile-top .avatar { width: 56px; height: 56px; border-radius: 17px; }
.profile-copy .identity { color: #215dab; border-radius: 9px; background: #eaf2ff; }
.profile-stats { gap: 9px; margin-top: 11px; padding: 0; border: 0; }
.profile-stat { min-height: 67px; padding: 13px 6px; border: 1px solid #e0e8f3; border-radius: 14px; background: #fff; }
.profile-stat + .profile-stat { border-left: 1px solid #e0e8f3; }
.profile-menu { overflow: hidden; margin-top: 17px; border: 1px solid #e0e8f3; border-radius: 17px; background: #fff; box-shadow: var(--shadow); }
.profile-menu-row { min-height: 60px; padding: 13px 15px; }
.profile-menu-row + .profile-menu-row { border-color: #e8eef6; }
.profile-menu-row:nth-child(n) .menu-icon { color: #2469d4; background: #eaf2ff; }
.profile-menu-row strong { font-size: 13px; }
.membership-card { border-radius: 18px; background: linear-gradient(115deg, #142e59, #28549b 65%, #4975bb); box-shadow: 0 10px 24px rgba(21, 57, 115, .16); }
.membership-card button { min-height: 36px; padding: 0 12px; color: #173c70; border-radius: 10px; background: #fff; font-size: 11px; }
.settings-card, .question-list, .chat-detail-list { border: 1px solid #e0e8f3; border-radius: 17px; background: #fff; box-shadow: var(--shadow); }
.settings-section-label { color: #4f729b; font-size: 10px; }
.settings-icon:nth-child(n), .settings-icon-aqua, .settings-icon-green, .settings-icon-purple { color: #2469d4; background: #eaf2ff; }
.question-list .question-row + .question-row { border-color: #e5edf7; }
.question-index, .question-meta .type { color: #2469d4; background: #eaf2ff; }
.question-paper { padding: 21px 18px; border: 1px solid #dce6f3; border-radius: 19px; background: #fff; box-shadow: var(--shadow); }
.question-stem, .question-ask { color: #173252; font-size: 18px; line-height: 1.62; }
.question-ask { border-color: #e1eaf5; }
.question-tool-actions { border: 1px solid #dce6f3; background: #f3f7fd; }
.question-tool { min-height: 38px; font-size: 11px; }
.question-note-editor { border-color: #bcd3f4; background: #eef5ff; }
.question-note-editor textarea { min-height: 94px; border-color: #c8d9ef; background: #fff; font-size: 14px; }
.practice-settings-button, .practice-mode-badge, .practice-mode-badge.is-study { color: #2365bc; border-color: #c6dcf8; background: #eaf2ff; }
.practice-settings-sheet { border: 1px solid #dce6f3; border-radius: 21px; background: #fff; box-shadow: 0 22px 52px rgba(20,52,94,.2); }
.practice-mode-choice { min-height: 78px; padding: 13px; border-color: #dce6f3; border-radius: 14px; background: #fff; }
.login-mode-tabs { border: 1px solid #dce6f3; background: #edf3fb; }
.login-card { border-radius: 18px; }
.login-field > span { font-size: 12px; }
.login-field input { min-height: 50px; color: #173252; border-color: #d5e2f3; border-radius: 13px; background: #fff; font-size: 16px; }
.login-field input:focus { border-color: #76a9ec; box-shadow: 0 0 0 3px rgba(36,105,212,.13); }
.login-agreement input { width: 18px; height: 18px; accent-color: #2469d4; }
.feed-card { border: 1px solid #e0e8f3; border-radius: 17px; background: #fff; }
.feed-avatar, .feed-avatar.green, .feed-avatar.purple { background: linear-gradient(135deg, #1a58b4, #568ee0); }
.feed-card > p { color: #435c79; }
.chat-detail-list { background: #f6f9fe; }
.chat-bubble { color: #294461; background: #fff; }
.chat-bubble-row.mine .chat-bubble { color: #fff; background: #2469d4; }
body.night-mode .profile-top, body.night-mode .profile-stat,
body.night-mode .profile-menu, body.night-mode .settings-card,
body.night-mode .question-list, body.night-mode .chat-detail-list,
body.night-mode .question-paper, body.night-mode .practice-settings-sheet,
body.night-mode .practice-mode-choice, body.night-mode .feed-card {
  color: #e8f2ff; border-color: #2a405b; background: #12263d; box-shadow: var(--shadow);
}
body.night-mode .profile-stat + .profile-stat, body.night-mode .profile-menu-row + .profile-menu-row,
body.night-mode .question-list .question-row + .question-row { border-color: #2a405b; }
body.night-mode .profile-copy .identity, body.night-mode .profile-menu-row:nth-child(n) .menu-icon,
body.night-mode .settings-icon:nth-child(n), body.night-mode .settings-icon-aqua,
body.night-mode .settings-icon-green, body.night-mode .settings-icon-purple,
body.night-mode .question-index, body.night-mode .question-meta .type,
body.night-mode .practice-settings-button, body.night-mode .practice-mode-badge,
body.night-mode .practice-mode-badge.is-study { color: #a8ccff; border-color: #32577e; background: #21456d; }
body.night-mode .question-stem, body.night-mode .question-ask { color: #edf5ff; border-color: #304866; }
body.night-mode .question-tool-actions { border-color: #2a405b; background: #0e2034; }
body.night-mode .question-note-editor { border-color: #345880; background: #173553; }
body.night-mode .question-note-editor textarea, body.night-mode .login-field input {
  color: #edf5ff; border-color: #34506e; background: #10253b;
}
body.night-mode .login-mode-tabs { border-color: #2a405b; background: #0e2034; }
body.night-mode .feed-card > p { color: #bbcee4; }
body.night-mode .chat-bubble { color: #dbeaff; background: #203a56; }
body.night-mode .chat-bubble-row.mine .chat-bubble { color: #fff; background: #3979dd; }
.membership-card.is-locked { background: linear-gradient(115deg, #183a70, #315f9f 70%, #567bb5); box-shadow: 0 10px 24px rgba(21,57,115,.16); }
.membership-card.is-locked button { color: #173c70; background: #fff; }
.leaderboard-periods, .role-switch, .segmented { border-color: #dce6f3; background: #eaf1fb; }
.leaderboard-period { min-height: 43px; font-size: 12px; }
.leaderboard-period.is-active, .segment.is-active { color: #185ab5; background: #fff; box-shadow: 0 2px 8px rgba(24,64,116,.08); }
.leaderboard-me { min-height: 77px; }
.leaderboard-me-icon, .leaderboard-empty .empty-icon { color: #2469d4; background: #eaf2ff; }
.leaderboard-row { min-height: 73px; }
.leaderboard-row.is-me { background: #eaf2ff; }
.leaderboard-avatar { background: linear-gradient(135deg, #1c5db9, #6a9ae3); }
.leaderboard-copy strong { font-size: 13px; }
.account-field > span { font-size: 12px; }
.account-field input, .feedback-form select, .feedback-form textarea,
.feedback-form input, .admin-feedback-card textarea { min-height: 48px; color: #173252; border-color: #d5e2f3; background: #fff; font-size: 15px; }
.account-field input:focus, .search-bar:focus-within,
.feedback-form select:focus, .feedback-form textarea:focus,
.feedback-form input:focus, .admin-feedback-card textarea:focus {
  border-color: #76a9ec; box-shadow: 0 0 0 3px rgba(36,105,212,.13);
}
body.night-mode .membership-card, body.night-mode .membership-card.is-locked { background: linear-gradient(115deg, #17366a, #244e90 70%, #3864a4); }
body.night-mode .membership-card button, body.night-mode .membership-card.is-locked button { color: #173c70; background: #f4f8ff; }
body.night-mode .leaderboard-periods, body.night-mode .role-switch,
body.night-mode .segmented { border-color: #2a405b; background: #102238; }
body.night-mode .leaderboard-period { color: #9cb2cc; }
body.night-mode .leaderboard-period.is-active, body.night-mode .segment.is-active { color: #c9e0ff; background: #24456b; }
body.night-mode .leaderboard-row.is-me { background: #1d3c60; }
body.night-mode .leaderboard-me-icon, body.night-mode .leaderboard-empty .empty-icon { color: #a8ccff; background: #21456d; }
body.night-mode .leaderboard-avatar { background: linear-gradient(135deg, #2a61a8, #5b8fce); }
body.night-mode .account-field input, body.night-mode .feedback-form select,
body.night-mode .feedback-form textarea, body.night-mode .feedback-form input,
body.night-mode .admin-feedback-card textarea { color: #edf5ff; border-color: #34506e; background: #10253b; }
body.night-mode .role-switch-button.is-active { color: #d8eaff; background: #24466d; box-shadow: none; }
body.night-mode .role-switch-button.is-active small { color: #afc9e9; }
body.night-mode .subject-card:hover, body.night-mode .quick-action:hover,
body.night-mode .bank-version-card:hover { border-color: #466c9a; background: #1b3655; }
body.night-mode .tabbar-item.is-active .tabbar-icon { color: #a6ccff; border: 0; background: #21446e; box-shadow: none; }

/* Keep WebView fallback surfaces on the same palette as the main theme. */
.continue-copy p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tabbar { -webkit-backdrop-filter: none; backdrop-filter: none; }
.quick-action .quick-icon .icon, .subject-symbol .icon { color: inherit; }
body.night-mode .quick-action .quick-icon .icon { color: inherit; }
.section-heading a, .text-button { color: #2469d4; }
body.night-mode .section-heading a, body.night-mode .text-button { color: #9cc4ff; }

.welcome-copy { min-width: 0; }
.welcome-copy h1 { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.question-meta .icon-button { width: 44px; height: 44px; border-radius: 13px; }
.question-tool { min-width: 44px; min-height: 44px; }
.compact-button, .catalog-filter-row .compact-button, .font-size-option { min-height: 44px; }
.search-clear { width: 44px; height: 44px; }
