/* Local material controls share theme tokens with the account UI. */
.beta-topbar {display:grid;grid-template-columns:auto minmax(220px,580px);justify-content:space-between;}
.material-filters {margin:24px 0;padding:20px;border:1px solid var(--auth-border);border-radius:18px;background:var(--auth-panel);color:var(--auth-text);}
.material-filter-heading {display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-bottom:16px;font-size:12px;line-height:1.7;}
.material-filter-heading strong {display:flex;align-items:center;gap:10px;}
.material-filter-heading strong svg {width:18px;height:18px;color:var(--auth-accent);flex-shrink:0;}
.material-filter-heading>span,.material-help,.practice-progress,.load-more-wrap {color:var(--auth-muted);font-size:11px;line-height:1.9;}
.material-filter-fields,.practice-settings {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;}
.material-filter-fields label,.practice-settings label,.practice-number {display:flex;flex-direction:column;gap:10px;min-width:0;font-size:11px;line-height:1.7;}
.material-filter-fields select,.practice-settings select,.practice-number input {width:100%;min-width:0;padding:14px 12px;border:1px solid var(--auth-border);border-radius:12px;background:var(--auth-field);color:var(--auth-text);font:inherit;}
.material-active-filters {display:flex;flex-wrap:wrap;gap:10px;margin-top:16px;}
.material-active-filters button {display:inline-flex;align-items:center;gap:10px;border:1px solid var(--auth-border);border-radius:30px;background:var(--auth-field);color:var(--auth-accent);padding:9px 13px;font:inherit;font-size:10px;cursor:pointer;}
.material-active-filters svg {width:14px;height:14px;flex-shrink:0;}
.material-active-filters button:hover {border-color:var(--auth-accent);}
.material-filters select:focus-visible,.practice-card select:focus-visible,.practice-card input:focus-visible {outline:2px solid var(--auth-accent);outline-offset:3px;}
.material-results {display:grid;gap:8px;margin:16px 0;min-width:0;}
.material-results .search-result-item {width:100%;min-width:0;}
.material-results .search-result-body {min-width:0;overflow-wrap:anywhere;}
.material-results .search-result-title,.material-results .search-result-meta {white-space:normal;}
.practice-settings {grid-template-columns:repeat(3,minmax(0,1fr));margin:24px 0;}
.practice-progress {display:flex;justify-content:space-between;gap:16px;flex-wrap:wrap;margin:24px 0 8px;}
.practice-card progress {width:100%;height:5px;accent-color:var(--auth-accent);}
.practice-question {font-size:clamp(16px,2vw,23px);line-height:1.7;margin:24px 0;overflow-wrap:anywhere;}
.practice-options {display:grid;gap:12px;border:0;padding:0;margin:0 0 22px;min-width:0;}
.practice-options label {display:flex;align-items:flex-start;gap:14px;background:var(--auth-field);border:1px solid var(--auth-border);border-radius:14px;padding:16px;font-size:12px;line-height:1.9;cursor:pointer;color:var(--auth-text);}
.practice-options label:has(input:checked) {border-color:var(--auth-accent);}
.practice-options input {margin-top:5px;accent-color:var(--auth-accent);flex-shrink:0;}
.practice-number {max-width:360px;margin-bottom:24px;}
.practice-feedback {padding:20px;margin:20px 0;border:1px solid var(--auth-border);border-left:3px solid var(--auth-accent);border-radius:12px;background:var(--auth-panel);font-size:12px;line-height:1.9;}
.practice-feedback.is-wrong {border-left-color:#fb7185;}
.practice-feedback p {margin:10px 0 0;color:var(--auth-muted);}
.practice-exit {margin-top:24px;}
.practice-score {font-size:clamp(36px,7vw,64px);color:var(--auth-accent);margin:20px 0;}
.sr-only {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;}
@media(max-width:900px){.beta-topbar{grid-template-columns:auto minmax(0,1fr);}.practice-settings{grid-template-columns:1fr;}}
@media(max-width:600px){.beta-topbar{grid-template-columns:minmax(0,1fr);}.material-filter-fields{grid-template-columns:1fr;}.material-filters{padding:16px;}.material-filter-heading{gap:8px;}.practice-options label{padding:13px;font-size:11px;}}

/* Comfortable controls and one dropdown treatment across beta. */
.custom-select {display:block;position:relative;min-width:0;width:100%;font-size:13px;line-height:1.7;}
.custom-select select[hidden] {display:none!important;}
.custom-select-trigger {display:flex;align-items:center;justify-content:space-between;gap:16px;width:100%;min-height:54px;padding:14px 17px;border:1px solid var(--auth-border);border-radius:14px;background:var(--auth-field);color:var(--auth-text);font:inherit;text-align:left;cursor:pointer;transition:border-color .18s,background .18s;}
.custom-select-trigger:hover,.custom-select-trigger[aria-expanded="true"] {border-color:var(--auth-accent);}
.custom-select-trigger:focus-visible {outline:2px solid var(--auth-accent);outline-offset:3px;}
.custom-select-trigger:disabled {opacity:.5;cursor:default;}
.custom-select-value {min-width:0;overflow-wrap:anywhere;}
.custom-select-chevron {display:flex;flex:0 0 18px;color:var(--auth-accent);transition:transform .18s;}
.custom-select-chevron svg {width:18px;height:18px;}
.custom-select-trigger[aria-expanded="true"] .custom-select-chevron {transform:rotate(180deg);}
.custom-select-popup {position:fixed;z-index:1000;box-sizing:border-box;overflow-y:auto;overscroll-behavior:contain;padding:7px;border:1px solid var(--auth-border);border-radius:16px;background:var(--auth-panel);color:var(--auth-text);box-shadow:0 18px 50px #0004;font-family:inherit;font-size:13px;line-height:1.8;scrollbar-width:thin;scrollbar-color:var(--auth-border) transparent;}
.custom-select-option {display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 13px;border-radius:10px;cursor:pointer;overflow-wrap:anywhere;}
.custom-select-option.is-highlighted {background:var(--auth-field);}
.custom-select-option[aria-selected="true"] {color:var(--auth-accent);}
.custom-select-check {display:flex;flex:0 0 17px;visibility:hidden;}
.custom-select-check svg {width:17px;height:17px;}
.custom-select-option[aria-selected="true"] .custom-select-check {visibility:visible;}
.collection-controls>.custom-select {flex:0 1 320px;}
.back-intro-btn {display:inline-flex;align-items:center;gap:12px;padding:13px 19px;min-height:48px;line-height:1.6;}
.back-intro-btn>svg {flex-shrink:0;width:18px;height:18px;}
.subtabs-bar {gap:12px;padding:5px 0 18px;}
.subtab-btn {display:flex;align-items:center;gap:14px;padding:17px 18px;min-height:84px;min-width:205px;white-space:normal;text-align:left;}
.subtab-icon {display:flex;align-items:center;justify-content:center;flex:0 0 24px;}
.subtab-icon svg {width:24px;height:24px;}
.subtab-text {display:flex;flex-direction:column;gap:6px;min-width:0;}
.subtab-text strong {font-size:12px;line-height:1.6;}
.subtab-text small {font-size:10px;line-height:1.7;}
.material-filter-fields label,.practice-settings label,.practice-number {font-size:12px;gap:12px;}
.material-filter-heading {font-size:13px;}
.material-filter-heading>span,.material-help,.practice-progress,.load-more-wrap {font-size:12px;line-height:1.9;}
.material-active-filters button {font-size:11px;padding:10px 14px;}
.practice-settings {gap:22px;margin:28px 0 24px;}
#practiceSettings>.material-help {margin:0 0 22px;}
#practiceSettings>.btn-primary {min-height:50px;padding:15px 23px;font-size:12px;}
.practice-card>.material-help {margin:18px 0 24px;}
@media(min-width:1500px){.subtabs-bar{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));overflow:visible;}.subtab-btn{min-width:0;}}
@media(max-width:700px){.collection-controls>.custom-select{flex:1 1 auto;}.custom-select,.custom-select-popup{font-size:12px;}.subtab-btn{padding:15px 17px;min-width:220px;}.subtabs-bar{scroll-padding-inline:4px;}}
@media(prefers-reduced-motion:reduce){.custom-select-trigger,.custom-select-chevron{transition:none;}}

/* Shared footer lives outside the individual page screens. */
.site-footer {display:flex;align-items:flex-start;justify-content:space-between;gap:18px 32px;margin:12px 36px 0 calc(var(--sidebar-width) + 36px);padding:25px 0 30px;border-top:1px solid var(--auth-border);color:var(--auth-muted);font-size:11px;line-height:1.9;}
.site-footer-brand {flex-shrink:0;font-weight:650;letter-spacing:.02em;}
.site-footer p {margin:0;text-align:right;max-width:650px;}
.auth-mode .site-footer {margin-inline:36px;}
@media(min-width:901px) and (max-width:1280px){.site-footer{margin-right:26px;margin-left:calc(var(--sidebar-width) + 26px);}}
@media(max-width:900px){.site-footer,.auth-mode .site-footer{margin-inline:23px;}}
@media(max-width:600px){.site-footer{flex-direction:column;gap:10px;padding:22px 0 26px;}.site-footer p{text-align:left;}}
@media(max-width:560px){.site-footer,.auth-mode .site-footer{margin-inline:17px;}}

/* Keep the shared footer at the viewport bottom when content is short. */
body {min-height:100vh;min-height:100dvh;display:flex;flex-direction:column;}
.beta-topbar,.site-footer {flex-shrink:0;}
.app-main {flex:1 0 auto;}
.auth-mode .app-main {display:flex;flex-direction:column;}
.auth-mode .dossier-screen:not(.hidden),.auth-mode .dossier-container {display:flex;flex-direction:column;flex:1;}
.auth-mode .auth-stage {min-height:0;flex:1;}

/* Align action labels and Lucide icons on the same visual center. */
.home-path strong {display:inline-flex;align-items:center;justify-content:center;gap:12px;line-height:1.5;}
.btn-primary,.btn-secondary,.search-submit-btn,.home-action-btn,.topic-pill-btn,.tag-chip,.auth-submit,.branch-course-link {display:inline-flex;align-items:center;justify-content:center;gap:10px;line-height:1.5;}
.home-path strong>.ui-icon,.btn-primary>.ui-icon,.btn-secondary>.ui-icon,.search-submit-btn>.ui-icon,.home-action-btn>.ui-icon,.topic-pill-btn>.ui-icon,.tag-chip>.ui-icon,.auth-submit>.ui-icon,.branch-course-link>.ui-icon {display:block;flex-shrink:0;margin-block:0;vertical-align:middle;}

/* Signed-in account uses the standard application shell. */
.account-mode .branch-topbar {display:none;}
.account-page {width:100%;max-width:1280px;margin:0 auto;color:var(--auth-text);}
.account-heading {margin:0 0 30px;}
.account-eyebrow {color:var(--auth-accent);font-size:10px;line-height:1.8;letter-spacing:.08em;margin:0 0 12px;}
.account-heading h1 {font-size:clamp(28px,3.5vw,46px);line-height:1.3;letter-spacing:-.04em;margin:0 0 14px;}
.account-heading h1>span {color:var(--auth-accent);}
.account-heading>div>p:last-child {color:var(--auth-muted);font-size:12px;line-height:1.9;margin:0;}
.account-layout {display:grid;grid-template-columns:minmax(260px,.8fr) minmax(0,1.5fr);gap:24px;align-items:stretch;}
.account-panel {min-width:0;padding:30px;border:1px solid var(--auth-border);border-radius:24px;background:var(--auth-panel);}
.account-profile {display:flex;flex-direction:column;align-items:flex-start;}
.account-avatar {display:grid;place-items:center;width:64px;height:64px;border:1px solid var(--auth-border);border-radius:20px;background:var(--auth-field);color:var(--auth-accent);margin-bottom:24px;}
.account-avatar svg {width:30px;height:30px;}
.account-panel h2 {font-size:clamp(18px,2vw,26px);line-height:1.6;margin:0 0 16px;overflow-wrap:anywhere;letter-spacing:-.03em;}
.account-details {width:100%;margin:8px 0 28px;}
.account-details>div {padding:18px 0;border-bottom:1px solid var(--auth-border);}
.account-details dt {display:flex;align-items:center;gap:9px;font-size:10px;color:var(--auth-muted);margin:0 0 10px;}
.account-details dt svg {width:15px;height:15px;}
.account-details dd {font-size:12px;line-height:1.9;margin:0;overflow-wrap:anywhere;}
.account-profile-actions {margin-top:auto;display:flex;flex-direction:column;align-items:flex-start;gap:20px;width:100%;}
.account-profile-actions .btn-secondary {font-size:11px;min-height:46px;}
.account-signout {display:inline-flex;align-items:center;gap:10px;padding:4px 0;background:transparent;border:0;color:var(--auth-muted);font:inherit;font-size:11px;line-height:1.8;cursor:pointer;}
.account-signout:hover {color:var(--auth-text);}
.account-signout:disabled {opacity:.6;cursor:wait;}
.account-signout svg {width:17px;height:17px;}
.account-panel-heading {display:flex;align-items:center;gap:12px;margin-bottom:20px;}
.account-panel-heading .account-eyebrow {margin:0;}
.account-section-icon {display:grid;place-items:center;flex:0 0 42px;width:42px;height:42px;border:1px solid var(--auth-border);border-radius:13px;background:var(--auth-field);color:var(--auth-accent);}
.account-section-icon svg {width:21px;height:21px;}
.account-description {font-size:12px;color:var(--auth-muted);line-height:1.9;margin:0 0 24px;}
.account-stats {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:24px 0;}
.account-stats>div {display:flex;flex-direction:column;gap:9px;padding:18px 13px;border:1px solid var(--auth-border);border-radius:15px;background:var(--auth-field);}
.account-stats strong {font-size:25px;line-height:1.4;color:var(--auth-accent);}
.account-stats strong small {font-size:12px;font-weight:400;color:var(--auth-muted);}
.account-stats>div>span {font-size:9px;line-height:1.8;color:var(--auth-muted);}
.account-progress-label {display:flex;justify-content:space-between;gap:15px;font-size:11px;line-height:1.8;margin-bottom:11px;color:var(--auth-muted);}
.account-progress-label strong {color:var(--auth-accent);}
.account-learning progress {display:block;width:100%;height:7px;accent-color:var(--auth-accent);border:0;border-radius:10px;background:var(--auth-field);overflow:hidden;}
.account-learning progress::-webkit-progress-bar {background:var(--auth-field);border-radius:10px;}
.account-learning progress::-webkit-progress-value {background:var(--auth-accent);border-radius:10px;}
.account-learning progress::-moz-progress-bar {background:var(--auth-accent);border-radius:10px;}
.account-next {display:flex;flex-direction:column;gap:9px;margin:26px 0 21px;}
.account-next>span {font-size:10px;color:var(--auth-muted);}
.account-next strong {font-size:13px;line-height:1.7;}
.account-course-actions {display:flex;flex-wrap:wrap;gap:12px;}
.account-course-actions>a {min-height:46px;font-size:11px;padding:13px 18px;}
.account-storage-note {display:flex;align-items:flex-start;gap:9px;font-size:9px;line-height:1.9;color:var(--auth-muted);margin:22px 0 0;}
.account-storage-note svg {flex-shrink:0;width:15px;height:15px;margin-top:2px;}
.account-shortcuts {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;margin-top:24px;}
.account-shortcut {display:flex;align-items:center;gap:18px;padding:23px;border:1px solid var(--auth-border);border-radius:20px;background:var(--auth-panel);color:var(--auth-text);text-decoration:none;transition:border-color .2s,background .2s;}
.account-shortcut:hover {border-color:var(--auth-accent);background:var(--auth-field);}
.account-shortcut>span:last-child {display:flex;flex-direction:column;gap:9px;min-width:0;}
.account-shortcut strong {font-size:13px;line-height:1.6;}
.account-shortcut small {font-size:10px;line-height:1.9;color:var(--auth-muted);}
.account-mode .sidebar-login {border-color:var(--auth-accent);}
.account-page a:focus-visible,.account-page button:focus-visible {outline:2px solid var(--auth-accent);outline-offset:4px;}
@media(max-width:1100px){.account-layout{grid-template-columns:minmax(0,1fr);}.account-profile-actions{flex-direction:row;align-items:center;flex-wrap:wrap;}.account-avatar{margin-bottom:18px;}.account-panel{padding:26px;}}
@media(max-width:600px){.account-heading{margin-bottom:24px;}.account-panel{padding:21px 18px;border-radius:20px;}.account-layout,.account-shortcuts{gap:18px;}.account-shortcuts{grid-template-columns:minmax(0,1fr);margin-top:18px;}.account-stats{gap:8px;}.account-stats>div{padding:14px 9px;}.account-stats strong{font-size:22px;}.account-course-actions{flex-direction:column;}.account-course-actions>a{width:100%;}.account-details dd{font-size:11px;}}

/* One self-contained area for choosing objects and reading their comparison. */
.comparison-panel {margin:28px 0;padding:24px;border:1px solid var(--auth-border);border-radius:20px;background:var(--auth-panel);color:var(--auth-text);}
.comparison-heading {display:flex;justify-content:space-between;align-items:center;gap:16px;}
.comparison-heading h2 {display:flex;align-items:center;gap:12px;font-size:15px;line-height:1.7;margin:0;}
.comparison-heading h2 svg {width:21px;height:21px;flex-shrink:0;color:var(--auth-accent);}
.comparison-heading>span {flex-shrink:0;font-size:11px;color:var(--auth-accent);}
.comparison-help {font-size:11px;line-height:1.9;color:var(--auth-muted);margin:13px 0 20px;max-width:850px;}
.comparison-slots {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-bottom:20px;}
.comparison-slot {display:flex;align-items:center;gap:12px;min-width:0;padding:15px;border:1px solid var(--auth-border);border-radius:13px;background:var(--auth-field);font-size:12px;line-height:1.8;}
.comparison-slot-number {color:var(--auth-accent);font-size:10px;flex-shrink:0;}
.comparison-slot strong {overflow-wrap:anywhere;min-width:0;}
.comparison-slot.is-empty {border-style:dashed;background:transparent;color:var(--auth-muted);font-size:11px;}
.comparison-slot button {display:grid;place-items:center;flex:0 0 30px;width:30px;height:30px;margin-left:auto;border:1px solid var(--auth-border);border-radius:50%;background:transparent;color:var(--auth-muted);cursor:pointer;}
.comparison-slot button:hover {color:var(--auth-accent);border-color:var(--auth-accent);}
.comparison-slot button svg {width:15px;height:15px;}
.comparison-actions {display:flex;align-items:center;flex-wrap:wrap;gap:12px;}
.comparison-actions>.btn-primary,.comparison-actions>.btn-secondary {font-size:11px;min-height:44px;}
.comparison-actions button:disabled {opacity:.5;cursor:default;transform:none;}
.comparison-clear {padding:10px 4px;border:0;background:transparent;color:var(--auth-muted);font:inherit;font-size:10px;cursor:pointer;}
.comparison-clear:hover {color:var(--auth-text);}
.comparison-limit {margin:14px 0 0;}
#comparisonResult:not([hidden]) {margin-top:26px;padding-top:22px;border-top:1px solid var(--auth-border);}
#comparisonResult h3 {font-size:15px;line-height:1.8;margin:0 0 18px;}
.comparison-table-wrap {overflow-x:auto;border:1px solid var(--auth-border);border-radius:14px;}
.comparison-table {width:100%;min-width:500px;border-collapse:collapse;table-layout:fixed;font-size:11px;line-height:1.9;}
.comparison-table th,.comparison-table td {padding:16px;vertical-align:top;text-align:left;border-bottom:1px solid var(--auth-border);overflow-wrap:anywhere;white-space:pre-line;}
.comparison-table th:not(:last-child),.comparison-table td:not(:last-child) {border-right:1px solid var(--auth-border);}
.comparison-table thead th {background:var(--auth-field);color:var(--auth-accent);}
.comparison-table th:first-child {width:23%;}
.comparison-table tbody th {font-size:10px;color:var(--auth-muted);font-weight:500;}
.comparison-table tr:last-child>* {border-bottom:0;}
.comparison-panel :is(button,a,[tabindex]):focus-visible {outline:2px solid var(--auth-accent);outline-offset:3px;}
@media(max-width:600px){.comparison-panel{padding:18px 15px;}.comparison-slots{grid-template-columns:minmax(0,1fr);gap:10px;}.comparison-heading h2{font-size:13px;gap:9px;}.comparison-actions{align-items:stretch;}.comparison-actions>.btn-secondary,.comparison-actions>.btn-primary{width:100%;}.comparison-table td,.comparison-table th{padding:12px;}}
.learning-course-picker { margin: 10px 0 14px; }
.learning-course-picker .geo-select { width: 100%; }
.site-footer-right { display:flex; align-items:center; gap:20px; flex-wrap:wrap; justify-content:flex-end; }
.site-footer-links { display:inline-flex; align-items:center; gap:14px; }
.site-footer-links a { color:var(--auth-muted); text-decoration:none; font-size:10px; transition:color .16s ease; }
.site-footer-links a:hover { color:var(--auth-accent); }
.progress-courses-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(220px, 1fr)); gap:14px; margin:22px 0 28px; }
.progress-course-card { display:flex; flex-direction:column; gap:10px; padding:16px 18px; border:1px solid var(--auth-border); border-radius:16px; background:var(--auth-panel); color:var(--auth-text); text-decoration:none; transition:border-color .16s ease, transform .16s ease; }
.progress-course-card:hover { border-color:var(--auth-accent); transform:translateY(-2px); }
.progress-course-top { display:flex; align-items:center; justify-content:space-between; gap:10px; font-size:12px; }
.progress-course-top span { color:var(--auth-accent); font-size:11px; }
.progress-course-card progress { width:100%; height:6px; }
.progress-course-card small { color:var(--auth-muted); font-size:10px; }
.account-edit-form { margin:18px 0 4px; }
.account-edit-row { display:flex; gap:10px; align-items:center; margin-top:8px; }
.account-edit-row input { flex:1; min-width:0; min-height:44px; padding:10px 14px; border:1px solid var(--auth-border); border-radius:12px; background:var(--auth-field); color:var(--auth-text); font:inherit; font-size:12px; }
.account-edit-row input:focus { outline:none; border-color:var(--auth-accent); }
.account-saved-note { margin:8px 0 0; font-size:10px; color:var(--auth-accent); }
@media (max-width: 720px) { .site-footer-right { justify-content:flex-start; gap:10px; } .account-edit-row { flex-direction:column; align-items:stretch; } }
.dossier-bookmark-row { margin-top: 14px; }
.practice-stats-strip { display:flex; flex-wrap:wrap; gap:10px; margin:16px 0 20px; }
.practice-stat-chip { display:inline-flex; align-items:center; gap:8px; padding:9px 14px; border:1px solid var(--auth-border); border-radius:999px; background:var(--auth-panel); color:var(--auth-text); font-size:11px; text-decoration:none; }
.practice-stat-chip svg { width:15px; height:15px; color:var(--auth-accent); flex-shrink:0; }
.practice-stat-chip.is-link:hover { border-color:var(--auth-accent); }
.practice-result-actions { display:flex; flex-wrap:wrap; gap:12px; margin-top:18px; }
.interactive-map-shell { position:relative; }
.interactive-world-svg { width:100%; height:auto; display:block; border-radius:14px; cursor:grab; touch-action:none; }
.interactive-world-svg:active { cursor:grabbing; }
.map-zoom-controls { position:absolute; top:14px; right:14px; z-index:2; display:inline-flex; gap:6px; padding:4px; border-radius:12px; background:rgba(9,18,22,.82); border:1px solid var(--auth-border); backdrop-filter:blur(6px); }
.map-zoom-controls button { min-width:32px; height:32px; padding:0 10px; border:0; border-radius:8px; background:transparent; color:#e2f5eb; font:inherit; font-size:11px; cursor:pointer; }
.map-zoom-controls button:hover { background:rgba(94,234,212,.16); color:#5eead4; }
.map-trainer-head { display:flex; flex-wrap:wrap; align-items:flex-end; justify-content:space-between; gap:16px; margin-bottom:18px; }
.map-mode-tabs { display:flex; flex-wrap:wrap; gap:8px; }
.map-mode-tabs .is-active { border-color:var(--auth-accent); color:var(--auth-accent); }
.map-toolbar { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:14px; margin-bottom:18px; }
.map-cat-label { display:flex; align-items:center; gap:10px; font-size:11px; color:var(--auth-muted); }
.map-score-badge { padding:9px 14px; border:1px solid var(--auth-border); border-radius:12px; background:var(--auth-field); font-size:11px; }
.map-prompt-box, .map-pin-card, .map-finish-box { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:14px; padding:18px 20px; margin-bottom:16px; border:1px solid var(--auth-border); border-radius:16px; background:var(--auth-field); }
.map-prompt-box h2 { margin:4px 0 0; font-size:20px; }
.map-guess-result { display:flex; flex-direction:column; gap:10px; align-items:flex-end; }
.map-guess-actions { display:flex; flex-wrap:wrap; gap:10px; }
.map-pin-card p { margin:6px 0 0; font-size:12px; color:var(--auth-muted); max-width:640px; }
.flashcard-stage { display:flex; flex-direction:column; gap:16px; margin-top:12px; }
.flashcard-box { padding:28px 26px; border:1px solid var(--auth-border); border-radius:20px; background:var(--auth-field); display:flex; flex-direction:column; gap:18px; }
.flashcard-meta { display:flex; flex-wrap:wrap; justify-content:space-between; gap:8px; font-size:10px; color:var(--auth-muted); text-transform:uppercase; letter-spacing:.06em; }
.flashcard-front { margin:0; font-size:18px; line-height:1.5; }
.flashcard-back { padding-top:16px; border-top:1px solid var(--auth-border); font-size:13px; line-height:1.75; color:var(--auth-text); display:flex; flex-direction:column; gap:12px; align-items:flex-start; }
.flashcard-actions { display:flex; flex-wrap:wrap; gap:12px; }
@media (max-width: 720px) { .map-guess-result { align-items:flex-start; } }
.account-name-row { display:flex; align-items:center; gap:10px; }
.account-name-row h2 { margin:0; }
.account-name-edit-btn { display:inline-grid; place-items:center; width:34px; height:34px; padding:0; border:1px solid var(--auth-border); border-radius:10px; background:var(--auth-field); color:var(--auth-muted); cursor:pointer; flex-shrink:0; transition:border-color .16s ease, color .16s ease; }
.account-name-edit-btn:hover { border-color:var(--auth-accent); color:var(--auth-accent); }
.account-inline-name-form { display:flex; align-items:center; gap:8px; margin-top:6px; }
.account-inline-name-form[hidden] { display:none; }
.account-inline-name-form input { flex:1; min-width:0; min-height:42px; padding:8px 12px; border:1px solid var(--auth-accent); border-radius:12px; background:var(--auth-field); color:var(--auth-text); font:inherit; font-size:14px; font-weight:600; }
.account-inline-name-form input:focus { outline:none; }
.account-inline-btn { display:inline-grid; place-items:center; width:40px; height:40px; padding:0; border:1px solid var(--auth-border); border-radius:11px; background:var(--auth-field); color:var(--auth-muted); cursor:pointer; flex-shrink:0; }
.account-inline-btn.is-save { background:var(--auth-button); border-color:transparent; color:var(--auth-button-text); }
.account-inline-btn:hover { border-color:var(--auth-accent); color:var(--auth-accent); }
.account-inline-btn.is-save:hover { opacity:.9; color:var(--auth-button-text); }
.sidebar-login.is-signed-in { padding:9px 12px; gap:11px; }
.sidebar-user-avatar { display:inline-grid; place-items:center; width:30px; height:30px; border-radius:50%; overflow:hidden; flex-shrink:0; background:var(--auth-field); border:1px solid var(--auth-border); color:var(--auth-text); font-size:10px; font-weight:700; }
.sidebar-user-avatar img { width:100%; height:100%; object-fit:cover; display:block; }
.sidebar-user-name { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:12px; font-weight:600; }
:root[data-sidebar="collapsed"] .sidebar-login.is-signed-in { justify-content:center; padding:8px; }
:root[data-sidebar="collapsed"] .sidebar-user-name { display:none; }
.sidebar-brand-row .brand-logo { min-height:69px; padding:18px 22px 14px; align-items:center; }
:root[data-sidebar="collapsed"] .beta-sidebar .brand-logo { min-height:69px; padding:18px 0 14px; }
.real-map-frame { border:1px solid var(--auth-border); border-radius:18px; overflow:hidden; background:#091114; }
.real-world-map { width:100%; height:min(68vh, 620px); min-height:420px; z-index:1; background:#191919 !important; }
:root[data-theme="light"] .real-world-map { background:#d0cfd4 !important; }
.map-legend-bar { display:flex; align-items:center; flex-wrap:wrap; gap:12px; }
.map-currents-toggle.is-active { border-color:var(--auth-accent); color:var(--auth-accent); }
.current-legend-item { display:inline-flex; align-items:center; gap:7px; font-size:11px; color:var(--auth-muted); }
.current-legend-item i { width:14px; height:3px; border-radius:99px; display:inline-block; }
.current-legend-item.is-warm i { background:#fb7185; box-shadow:0 0 8px rgba(251,113,133,.7); }
.current-legend-item.is-cold i { background:#5eead4; box-shadow:0 0 8px rgba(94,234,212,.7); }
@keyframes geostudyCurrentFlow { from { stroke-dashoffset: 48; } to { stroke-dashoffset: 0; } }
.ocean-flow-path { animation: geostudyCurrentFlow 2.4s linear infinite; filter: drop-shadow(0 0 4px rgba(94,234,212,.55)); }
.ocean-flow-path.is-warm { filter: drop-shadow(0 0 4px rgba(251,113,133,.65)); }
body.quiet-mode .ocean-flow-path { animation: none; }
@media (prefers-reduced-motion: reduce) { .ocean-flow-path { animation: none; } }
.ocean-current-label { background:transparent; border:0; white-space:nowrap; pointer-events:none; }
.ocean-current-label span { display:inline-block; padding:3px 8px; border-radius:999px; font-family:'Unbounded',sans-serif; font-size:9px; font-weight:600; letter-spacing:.02em; background:rgba(9,16,18,.78); border:1px solid rgba(94,234,212,.35); color:#a7f3d0; backdrop-filter:blur(4px); transform:translate(-50%,-50%); }
.ocean-current-label.is-warm span { border-color:rgba(251,113,133,.45); color:#fda4af; }
:root[data-theme="light"] .ocean-current-label span { background:rgba(255,255,255,.88); color:#0f766e; border-color:rgba(15,118,110,.35); }
:root[data-theme="light"] .ocean-current-label.is-warm span { color:#be123c; border-color:rgba(190,18,60,.35); }
.geo-map-tooltip { background:#0d1413 !important; color:#e2f5eb !important; border:1px solid #263e3a !important; border-radius:10px !important; font-family:'Unbounded',sans-serif !important; font-size:10px !important; line-height:1.6 !important; padding:7px 11px !important; box-shadow:0 10px 30px rgba(0,0,0,.45) !important; }
:root[data-theme="light"] .geo-map-tooltip { background:#ffffff !important; color:#0f151d !important; border-color:#c1d9d5 !important; }
.leaflet-control-zoom a { background:#101615 !important; color:#d8ede9 !important; border-color:#263e3a !important; }
.leaflet-control-zoom a:hover { background:#172421 !important; color:#5eead4 !important; }
:root[data-theme="light"] .leaflet-control-zoom a { background:#ffffff !important; color:#0f151d !important; border-color:#c1d9d5 !important; }
.bookmark-row { display:flex; align-items:stretch; gap:8px; }
.bookmark-row > .search-result-item { flex:1; min-width:0; }
.bookmark-remove-btn { display:inline-grid; place-items:center; width:44px; flex-shrink:0; border:1px solid var(--auth-border); border-radius:14px; background:var(--auth-panel); color:var(--auth-muted); cursor:pointer; transition:border-color .16s ease, color .16s ease; }
.bookmark-remove-btn:hover { border-color:#fb7185; color:#fb7185; }
.geo-toast-stack { position:fixed; right:24px; bottom:24px; z-index:999; display:flex; flex-direction:column; gap:10px; max-width:min(400px, calc(100vw - 32px)); pointer-events:none; }
.geo-toast { pointer-events:auto; display:flex; align-items:center; gap:11px; padding:13px 15px; border:1px solid var(--auth-border); border-radius:16px; background:var(--auth-panel); color:var(--auth-text); box-shadow:0 16px 42px rgba(0,0,0,.38); font-size:11px; line-height:1.5; opacity:0; transform:translateY(12px); transition:opacity .2s ease, transform .2s ease; }
.geo-toast.is-visible { opacity:1; transform:translateY(0); }
.geo-toast.is-leaving { opacity:0; transform:translateY(8px); }
.geo-toast-icon { display:inline-grid; place-items:center; width:24px; height:24px; border-radius:8px; background:rgba(94,234,212,.14); color:var(--auth-accent); flex-shrink:0; }
.geo-toast.is-error .geo-toast-icon { background:rgba(251,113,133,.15); color:#fb7185; }
.geo-toast-icon svg { width:14px; height:14px; }
.geo-toast-text { flex:1; min-width:0; }
.geo-toast-action { color:var(--auth-accent); font-weight:600; text-decoration:none; white-space:nowrap; padding:4px 8px; border-radius:8px; background:rgba(94,234,212,.1); }
.geo-toast-action:hover { background:rgba(94,234,212,.2); }
.geo-toast-close { display:inline-grid; place-items:center; width:24px; height:24px; padding:0; border:0; background:transparent; color:var(--auth-muted); cursor:pointer; flex-shrink:0; }
.geo-toast-close:hover { color:var(--auth-text); }
.geo-toast-close svg { width:14px; height:14px; }
@media (max-width: 600px) { .geo-toast-stack { left:16px; right:16px; bottom:16px; max-width:none; } }
@media (prefers-reduced-motion: reduce) { .geo-toast { transition:none; } }
@media (max-width: 640px) { .real-world-map { height:56dvh; min-height:340px; } .ocean-current-label span { font-size:7.5px; padding:2px 6px; } }
.dossier-real-map { width:100%; height:380px; z-index:1; background:#191919 !important; }
:root[data-theme="light"] .dossier-real-map { background:#d0cfd4 !important; }
@media (max-width: 640px) { .dossier-real-map { height:300px; } }
.geo-map-dot { width:16px; height:16px; border-radius:50%; border:3px solid #09182d; box-shadow:0 0 12px rgba(94,234,212,.8); }
.geo-map-dot.is-real { background:#5eead4; }
.geo-map-dot.is-guess { background:#f97316; border-color:#fff; box-shadow:0 0 12px rgba(249,115,22,.8); }
.geo-ml-popup .maplibregl-popup-content { background:#0d1413; color:#e2f5eb; border:1px solid #263e3a; border-radius:10px; font-family:'Unbounded',sans-serif; font-size:10px; line-height:1.6; padding:8px 12px; box-shadow:0 10px 30px rgba(0,0,0,.45); }
.geo-ml-popup .maplibregl-popup-tip { border-top-color:#0d1413; }
:root[data-theme="light"] .geo-ml-popup .maplibregl-popup-content { background:#ffffff; color:#0f151d; border-color:#c1d9d5; }
:root[data-theme="light"] .geo-ml-popup .maplibregl-popup-tip { border-top-color:#ffffff; }
.maplibregl-ctrl-group { background:#101615 !important; border:1px solid #263e3a !important; }
.maplibregl-ctrl-group button .maplibregl-ctrl-icon { filter: invert(1) brightness(1.2); }
:root[data-theme="light"] .maplibregl-ctrl-group { background:#ffffff !important; border-color:#c1d9d5 !important; }
:root[data-theme="light"] .maplibregl-ctrl-group button .maplibregl-ctrl-icon { filter: none; }
.numeric-input-row { display:flex; align-items:center; gap:8px; margin-top:8px; }
.numeric-input-row input { flex:1; min-width:0; }
.numeric-sign-btn { display:inline-grid; place-items:center; width:44px; height:44px; flex-shrink:0; border:1px solid var(--auth-border); border-radius:12px; background:var(--auth-field); color:var(--auth-accent); font:inherit; font-size:16px; font-weight:700; cursor:pointer; }
.numeric-sign-btn:hover { border-color:var(--auth-accent); }
.numeric-hint { display:block; margin-top:6px; font-size:10px; line-height:1.5; color:var(--auth-muted); }
.branch-route-bar { display:flex; flex-wrap:wrap; align-items:center; gap:14px; margin-top:18px; }
.branch-route-btn { text-decoration:none; }
.branch-route-meta { font-size:11px; color:var(--auth-muted); }
/* snappy-no-lag */
:root { --motion-speed: 0ms; }
.beta-topbar { backdrop-filter:none; background:#090b0a; }
:root[data-theme="light"] .beta-topbar { background:#f5f8f7; }
*, *::before, *::after { transition-duration: 0ms !important; }
.geo-toast { transition: none !important; transform: none !important; }
.progress-course-card:hover, .sidebar-item:hover, .beta-sidebar .nav-branch-btn:hover { transform: none !important; }
.gamify-home-grid { display:grid; grid-template-columns:minmax(260px, 1fr) minmax(300px, 1.35fr); gap:16px; margin-top:16px; }
.gamify-status-card, .gamify-daily-card { padding:20px 22px; border:1px solid var(--auth-border); border-radius:20px; background:var(--auth-panel); display:flex; flex-direction:column; gap:12px; }
.gamify-rank-row, .gamify-goal-row, .gamify-daily-head, .gamify-status-links { display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; }
.gamify-rank-pill { display:inline-flex; align-items:center; gap:8px; padding:6px 12px; border-radius:999px; background:rgba(94,234,212,.12); color:var(--auth-accent); font-size:11px; font-weight:700; }
.gamify-rank-pill svg, .gamify-goal-row svg, .gamify-done-badge svg, .gamify-streak-box svg, .lb-meta svg { width:15px; height:15px; color:var(--auth-accent); flex-shrink:0; }
.gamify-xp-val { font-size:14px; color:var(--auth-text); }
.gamify-goal-row { font-size:11px; color:var(--auth-muted); }
.gamify-goal-row span { display:inline-flex; align-items:center; gap:5px; }
.gamify-status-card progress, .account-gamify-panel progress { width:100%; height:7px; }
.gamify-status-links a { font-size:11px; color:var(--auth-accent); text-decoration:none; font-weight:600; }
.gamify-done-badge { display:inline-flex; align-items:center; gap:5px; font-size:10px; color:var(--auth-accent); font-weight:700; }
.gamify-daily-q { margin:0; font-size:13px; line-height:1.55; color:var(--auth-text); }
.gamify-daily-form { display:flex; flex-direction:column; gap:10px; }
.gamify-daily-opts { display:flex; flex-direction:column; gap:7px; }
.gamify-daily-opts label { display:flex; align-items:center; gap:9px; padding:9px 12px; border:1px solid var(--auth-border); border-radius:11px; background:var(--auth-field); font-size:11px; cursor:pointer; }
.account-gamify-panel { margin-top:20px; display:flex; flex-direction:column; gap:16px; }
.account-gamify-head { display:flex; flex-wrap:wrap; align-items:flex-start; justify-content:space-between; gap:14px; }
.gamify-xp-pill { display:inline-block; margin-left:8px; padding:4px 10px; border-radius:999px; background:rgba(94,234,212,.14); color:var(--auth-accent); font-size:11px; vertical-align:middle; }
.gamify-streak-box { display:flex; gap:14px; font-size:11px; color:var(--auth-muted); padding:10px 14px; border:1px solid var(--auth-border); border-radius:12px; background:var(--auth-field); }
.gamify-streak-box span { display:inline-flex; align-items:center; gap:6px; }
.account-daily-goal { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:12px; font-size:11px; color:var(--auth-muted); }
.lb-opt-toggle { display:inline-flex; align-items:center; gap:8px; cursor:pointer; color:var(--auth-text); font-size:11px; }
.achievements-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(220px, 1fr)); gap:10px; }
.achievement-tile { display:flex; align-items:flex-start; gap:11px; padding:12px 14px; border:1px solid var(--auth-border); border-radius:14px; background:var(--auth-field); }
.achievement-tile.is-unlocked { border-color:rgba(94,234,212,.45); }
.achievement-tile.is-locked { opacity:.52; }
.ach-icon { display:inline-grid; place-items:center; width:32px; height:32px; border-radius:10px; background:rgba(94,234,212,.12); color:var(--auth-accent); flex-shrink:0; }
.achievement-tile.is-locked .ach-icon { background:transparent; color:var(--auth-muted); border:1px solid var(--auth-border); }
.ach-icon svg { width:16px; height:16px; }
.achievement-tile strong { display:block; font-size:11px; color:var(--auth-text); margin-bottom:2px; }
.achievement-tile small { display:block; font-size:9.5px; line-height:1.45; color:var(--auth-muted); }
.leaderboard-list { display:flex; flex-direction:column; gap:10px; margin-top:16px; }
.leaderboard-row { display:grid; grid-template-columns:42px 34px 1fr auto; align-items:center; gap:12px; padding:12px 16px; border:1px solid var(--auth-border); border-radius:14px; background:var(--auth-field); }
.leaderboard-row.is-me { border-color:var(--auth-accent); }
.leaderboard-row.is-top-1 .lb-rank { color:#fbbf24; }
.leaderboard-row.is-top-2 .lb-rank { color:#cbd5e1; }
.leaderboard-row.is-top-3 .lb-rank { color:#fb923c; }
.lb-rank { font-size:13px; font-weight:800; color:var(--auth-muted); }
.lb-user strong { display:block; font-size:12px; color:var(--auth-text); }
.lb-user small { display:block; font-size:10px; color:var(--auth-muted); }
.lb-meta { display:flex; align-items:center; gap:14px; font-size:11px; }
.lb-meta span { display:inline-flex; align-items:center; gap:4px; color:var(--auth-muted); }
.lb-meta strong { color:var(--auth-accent); }
@media (max-width: 760px) { .gamify-home-grid { grid-template-columns:1fr; } .leaderboard-row { grid-template-columns:34px 30px 1fr; } .lb-meta { grid-column:1 / -1; justify-content:space-between; } }
.gamify-guest-hint { margin:0; font-size:10px; line-height:1.5; color:var(--auth-muted); }
.gamify-guest-banner { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:14px; padding:16px 18px; margin-bottom:14px; border:1px solid rgba(94,234,212,.35); border-radius:16px; background:rgba(94,234,212,.06); }
.gamify-guest-banner strong { display:block; font-size:12px; color:var(--auth-text); margin-bottom:4px; }
.gamify-guest-banner p { margin:0; }
.learning-review-actions { display:flex; flex-wrap:wrap; gap:12px; margin-top:16px; }
.account-lb-controls { display:flex; flex-wrap:wrap; align-items:center; gap:14px; }
.account-lb-btn { min-height:38px; padding:8px 14px; font-size:11px; text-decoration:none; }
.practice-mode-tabs { display:flex; flex-wrap:wrap; gap:8px; }
.practice-mode-tabs .is-active { border-color:var(--auth-accent); color:var(--auth-accent); }
.olymp-filters { grid-template-columns:repeat(4, minmax(0, 1fr)); }
.olymp-grid { display:flex; flex-direction:column; gap:12px; margin-top:14px; }
.olymp-card { padding:18px 20px; border:1px solid var(--auth-border); border-radius:16px; background:var(--auth-field); display:flex; flex-direction:column; gap:14px; }
.olymp-card.is-done { border-color:rgba(94,234,212,.45); }
.olymp-card-tags { display:flex; flex-wrap:wrap; gap:8px; }
.olymp-tag { display:inline-flex; align-items:center; padding:4px 10px; border:1px solid var(--auth-border); border-radius:999px; font-size:10px; color:var(--auth-muted); background:var(--auth-panel); }
.olymp-tag.is-stage { color:var(--auth-accent); border-color:rgba(94,234,212,.35); font-weight:700; }
.olymp-card-actions { display:flex; flex-wrap:wrap; gap:10px; align-items:center; }
.olymp-open-btn { text-decoration:none; }
.olymp-mark-btn.is-done { border-color:var(--auth-accent); color:var(--auth-accent); opacity:.85; }
.olymp-viewer { margin:18px 0 22px; border:1px solid var(--auth-accent); border-radius:18px; overflow:hidden; background:var(--auth-panel); }
.olymp-viewer-head { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:12px; padding:14px 18px; border-bottom:1px solid var(--auth-border); }
.olymp-viewer-head strong { display:block; font-size:12px; color:var(--auth-text); margin-top:2px; }
.olymp-viewer-actions { display:flex; flex-wrap:wrap; gap:8px; }
.olymp-viewer-actions a { text-decoration:none; }
.olymp-pdf-frame { width:100%; height:min(75vh, 760px); min-height:460px; border:0; display:block; background:#141a19; }
@media (max-width: 900px) { .olymp-filters { grid-template-columns:repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .olymp-filters { grid-template-columns:1fr; } .olymp-pdf-frame { height:62dvh; min-height:360px; } }
.olymp-section-label { margin:0 0 8px; font-size:11px; color:var(--auth-accent); font-weight:600; }
.olymp-textarea { width:100%; margin-top:8px; padding:12px 14px; border:1px solid var(--auth-border); border-radius:14px; background:var(--auth-field); color:var(--auth-text); font:inherit; font-size:12px; line-height:1.6; resize:vertical; }
.olymp-textarea:focus { outline:none; border-color:var(--auth-accent); }
.olymp-form-actions, .olymp-selfgrade-row { display:flex; flex-wrap:wrap; gap:10px; margin-top:14px; }
.olymp-scheme-box { border-color:var(--auth-accent); }
.olymp-answer-text { white-space:pre-line; margin:8px 0 0; line-height:1.7; }
.olymp-user-echo { margin:12px 0 0; padding-top:10px; border-top:1px solid var(--auth-border); font-size:11px; color:var(--auth-muted); }
#practiceSettings > .btn-primary, #olympPracticeSettings > .btn-primary { margin-top: 16px; }
