/* Practice modes: multiple choice, listening and read-aloud controls in the study modal. */
.flight-actions{display:flex;align-items:center;gap:8px}
.audio-toggle[aria-pressed="false"]{opacity:.65}

.speak-controls{position:absolute;left:17px;bottom:14px;display:flex;gap:6px}
.speak-button{display:inline-flex;align-items:center;gap:7px;padding:7px 12px;border-radius:999px;border:1px solid #c9d9b4;background:#f3f8ec;color:#4f7333;font:inherit;font-size:12px;font-weight:700;letter-spacing:0;line-height:1;cursor:pointer;transition:background .15s,border-color .15s}
.speak-button:hover{background:#e7f1da;border-color:#a5c67f}
.speak-button .icon{width:16px;height:16px}
.flight-sentence:has(.speak-controls){padding-bottom:58px}
.speak-button.slow{font-weight:600;opacity:.85}
.speech-status{font-size:12px;line-height:1.5;color:var(--flight-soft);margin:6px 0 14px;min-height:18px}

.choice-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.choice-option{display:flex;align-items:center;gap:12px;min-height:56px;padding:12px 16px;border-radius:14px;border:1px solid var(--line);background:var(--white);color:var(--ink);font:inherit;font-size:16px;font-weight:650;text-align:left;cursor:pointer;transition:border-color .15s,transform .15s,background .15s}
.choice-option:hover{border-color:#a5c67f;transform:translateY(-1px)}
.choice-option:focus-visible{outline:3px solid #a5c67f;outline-offset:2px}
.choice-option kbd{flex-shrink:0;width:26px;height:26px;display:grid;place-items:center;border-radius:8px;border:1px solid var(--line);font:inherit;font-size:12px;color:var(--muted)}
.choice-option span{overflow-wrap:anywhere}

.polish-hidden p{color:var(--muted);font-size:14px;font-weight:500}
.polish-hidden .text-link{margin-top:8px;font-size:13px}

html[data-theme="dark"] .speak-button{background:#1c1e33;border-color:#3f426a;color:#d2ef92}
html[data-theme="dark"] .speak-button:hover{background:#242641;border-color:#808f5f}
html[data-theme="dark"] .choice-option{background:#14162f;border-color:#3d406a;color:#e9eaf3}
html[data-theme="dark"] .choice-option:hover{border-color:#bfe964;background:#191b3a}
html[data-theme="dark"] .choice-option kbd{border-color:#3d406a;color:#a4a6c5}

@media(max-width:560px){.choice-grid{grid-template-columns:1fr}.speak-controls{left:12px;bottom:10px}}
.choice-answer .flight-answer-label>span:first-child{font-size:12px;font-weight:700;color:inherit;text-align:left;max-width:none}

/* AI explanation under the study feedback */
.ai-explain{margin-top:12px}
.ai-explain-button .icon{width:16px;height:16px}
.ai-explain-loading{display:flex;align-items:center;gap:8px;color:var(--muted);font-size:13px;font-weight:600}
.ai-explain-loading .icon{width:16px;height:16px;animation:ai-pulse 1.2s ease-in-out infinite}
@keyframes ai-pulse{50%{opacity:.35}}
.ai-explain.error p{font-size:13px;color:#946d37;margin:0 0 10px}
.ai-explain-actions{display:flex;flex-wrap:wrap;gap:8px}
.ai-explain.done{padding:16px 18px;border-radius:14px;border:1px solid #d9d2f6;background:#f6f3ff}
.ai-explain.done h4{display:flex;align-items:center;gap:7px;margin:0 0 8px;font-size:13px;color:#5b4bb0}
.ai-explain.done h4 .icon{width:15px;height:15px}
.ai-explain.done>p{margin:0;font-size:14px;line-height:1.55}
.ai-examples{list-style:none;margin:12px 0 0;padding:0;display:grid;gap:8px}
.ai-examples li{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 12px;border-radius:10px;background:#ffffffaa}
.ai-examples li div{display:grid;gap:2px}
.ai-examples span{font-weight:650;font-size:14px}
.ai-examples small{color:var(--muted);font-size:12px}
.ai-examples .icon-button{flex-shrink:0}
html[data-theme="dark"] .ai-explain.done{background:#1d1d3a;border-color:#3b3870}
html[data-theme="dark"] .ai-explain.done h4{color:#c3b9ff}
html[data-theme="dark"] .ai-examples li{background:#14162f}
html[data-theme="dark"] .ai-explain.error p{color:#e2c48f}
@media(prefers-reduced-motion:reduce){.ai-explain-loading .icon{animation:none}}

/* AI card generator inside the bulk import workspace */
.studio-import-actions{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end}
.ai-generator{margin-bottom:18px;border:1px solid #d9d2f6;border-radius:14px;background:#f6f3ff}
.ai-generator summary{display:flex;align-items:center;gap:10px;padding:12px 14px;cursor:pointer;list-style:none}
.ai-generator summary::-webkit-details-marker{display:none}
.ai-generator summary>.icon:first-child{width:20px;height:20px;color:#6d5bd0;flex-shrink:0}
.ai-generator summary>.icon:last-child{margin-left:auto;width:16px;height:16px;transition:transform .2s}
.ai-generator[open] summary>.icon:last-child{transform:rotate(180deg)}
.ai-generator summary span{display:grid;gap:2px}
.ai-generator summary strong{font-size:13px}
.ai-generator summary small{font-size:11px;color:var(--muted);font-weight:500}
.ai-generator-body{padding:0 14px 14px;display:grid;gap:8px}
.ai-generator-body>label{font-size:11px;font-weight:700}
.ai-generator-body textarea{width:100%;min-height:84px;resize:vertical;padding:10px 12px;border-radius:10px;border:1px solid var(--line);background:var(--white);color:var(--ink);font:inherit;font-size:13px}
.ai-generator-row{display:flex;align-items:flex-end;gap:10px;flex-wrap:wrap}
.ai-generator-row .field{margin:0}
.ai-generator-row .field label{font-size:11px}
.ai-generator-row button{margin-left:auto}
.ai-generator-status{margin:0;font-size:12px;color:var(--muted);min-height:1em}
.ai-generator-status .text-link{font-size:12px}
html[data-theme="dark"] .ai-generator{background:#1d1d3a;border-color:#3b3870}
html[data-theme="dark"] .ai-generator summary>.icon:first-child{color:#c3b9ff}
html[data-theme="dark"] .ai-generator-body textarea{background:#14162f;border-color:#3d406a;color:#e9eaf3}

/* Streak protection in the streak card */
.streak-shield{display:flex;gap:9px;align-items:flex-start;margin:12px 0 0;padding:10px 12px;border-radius:12px;background:#eef4ff;color:#3d5a8c;font-size:11px;line-height:1.45}
.streak-shield>.icon{width:17px;height:17px;flex-shrink:0;margin-top:1px}
.streak-shield span{display:grid;gap:2px}
.streak-shield small{font-size:10px;color:var(--muted)}
.week-day.frozen .day-dot{background:#dfe9ff;color:#3d5a8c;border-color:#b8c9ee}
.week-day.frozen .day-dot .icon{width:13px;height:13px}
html[data-theme="dark"] .streak-shield{background:#1d2044;color:#cbcce1}
html[data-theme="dark"] .week-day.frozen .day-dot{background:#232651;color:#cbcce1;border-color:#3a3f87}

/* Install button: shown only while the browser offers installation */
.install-link{display:none}
html.can-install .install-link{display:flex;margin-bottom:6px}
.ai-example-actions{display:flex;align-items:center;gap:6px;flex-shrink:0}
.ai-example-add{padding:6px 10px;font-size:12px;min-height:0}
.ai-example-add .icon{width:14px;height:14px}
.ai-example-added{display:inline-flex;align-items:center;gap:4px;font-size:12px;font-weight:700;color:#527b35}
.ai-example-added .icon{width:14px;height:14px}
.ai-examples-note{margin:10px 0 0;font-size:11px;color:var(--muted)}
html[data-theme="dark"] .ai-example-added{color:#d2ef92}
@media(max-width:560px){.ai-examples li{flex-direction:column;align-items:flex-start}}

/* Weekly summary on the statistics page */
.weekly-card{margin:0 0 20px;padding:22px 24px;border-radius:var(--radius,17px);background:var(--white);border:1px solid var(--line)}
.weekly-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;flex-wrap:wrap}
.weekly-head h2{margin:0;font-size:16px}
.weekly-head p{margin:4px 0 0;font-size:12px;color:var(--muted)}
.weekly-change{padding:6px 12px;border-radius:999px;font-size:12px;font-weight:700;background:#eef1f5;color:#5d6876}
.weekly-change.up{background:#e4f0d4;color:#527b35}
.weekly-change.down{background:#f5ecdc;color:#946d37}
.weekly-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:18px}
.weekly-metric{display:grid;gap:2px;padding:14px 16px;border-radius:14px;background:var(--bg)}
.weekly-metric strong{font-size:24px;letter-spacing:-.5px}
.weekly-metric span{font-size:12px;font-weight:600}
.weekly-metric small{font-size:11px;color:var(--muted)}
.weekly-hard{margin-top:18px}
.weekly-hard-head{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}
.weekly-hard h3{margin:0;font-size:13px}
.weekly-hard ul{list-style:none;margin:12px 0 0;padding:0;display:grid;gap:8px}
.weekly-hard li{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:12px;padding:10px 14px;border-radius:12px;border:1px solid var(--line)}
.weekly-hard li span{font-size:12px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.weekly-hard li small{font-size:11px;font-weight:700;color:#946d37}
.weekly-empty{display:flex;align-items:center;gap:8px;margin:16px 0 0;font-size:13px;color:var(--muted)}
.weekly-empty .icon{width:16px;height:16px;color:#527b35}
html[data-theme="dark"] .weekly-card{background:var(--white);border-color:var(--line)}
html[data-theme="dark"] .weekly-metric{background:#12142ab3}
html[data-theme="dark"] .weekly-change{background:#1c1f42;color:#a4a6c5}
html[data-theme="dark"] .weekly-change.up{background:#25273c;color:#d2ef92}
html[data-theme="dark"] .weekly-change.down{background:#3a3020;color:#e2c48f}
html[data-theme="dark"] .weekly-hard li small{color:#e2c48f}
@media(max-width:640px){.weekly-metrics{grid-template-columns:1fr}.weekly-hard li{grid-template-columns:1fr auto}.weekly-hard li span{grid-column:1/-1;grid-row:2}}

/* First-run onboarding */
.onboarding fieldset{border:0;margin:0 0 18px;padding:0}
.onboarding legend{font-size:13px;font-weight:700;margin-bottom:10px}
.onboarding-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.onboarding-options.pace{grid-template-columns:repeat(3,minmax(0,1fr))}
.onboarding-option{position:relative;display:block;cursor:pointer}
.onboarding-option input{position:absolute;opacity:0;pointer-events:none}
.onboarding-option span{display:grid;gap:3px;height:100%;padding:12px 14px;border-radius:12px;border:1px solid var(--line);background:var(--white);transition:border-color .15s,background .15s}
.onboarding-option strong{font-size:13px}
.onboarding-option small{font-size:11px;color:var(--muted)}
.onboarding-option:hover span{border-color:#a5c67f}
.onboarding-option input:checked+span{border-color:#85b55c;background:#eef6e4;box-shadow:inset 0 0 0 1px #85b55c}
.onboarding-option input:focus-visible+span{outline:3px solid #a5c67f;outline-offset:2px}
.onboarding-note{display:flex;gap:8px;align-items:flex-start;margin:0;font-size:12px;color:var(--muted);line-height:1.5}
.onboarding-note .icon{width:16px;height:16px;flex-shrink:0}
html[data-theme="dark"] .onboarding-option span{background:#14162f;border-color:#3d406a}
html[data-theme="dark"] .onboarding-option input:checked+span{background:#25273c;border-color:#bfe964;box-shadow:inset 0 0 0 1px #bfe964}
@media(max-width:560px){.onboarding-options,.onboarding-options.pace{grid-template-columns:1fr}}

/* Daily reminder */
.reminder-link{margin-top:10px;font-size:11px}
.reminder-link .icon{width:14px;height:14px}
.reminder-note{display:flex;gap:8px;align-items:flex-start;margin:14px 0 0;font-size:12px;color:var(--muted);line-height:1.5}
.reminder-note .icon{width:16px;height:16px;flex-shrink:0}
#reminder-time{font-size:18px;max-width:160px}

/* Deck sharing */
.share-status{display:flex;align-items:center;gap:8px;margin:0;font-size:13px;color:var(--muted)}
.share-status .icon{width:16px;height:16px}
.share-intro{margin:0 0 14px;font-size:13px;line-height:1.5}
.share-link-row{display:flex;gap:8px}
.share-link{flex:1;min-width:0;padding:10px 12px;border-radius:10px;border:1px solid var(--line);background:var(--bg);color:var(--ink);font:inherit;font-size:12px}
.share-native{margin-top:10px}
.share-note{margin:12px 0 0;font-size:11px;color:var(--muted)}
.shared-meta{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:14px}
.shared-meta span{display:inline-flex;align-items:center;gap:6px;padding:4px 10px;border-radius:999px;background:var(--bg);font-size:12px;font-weight:600}
.shared-cards{list-style:none;margin:0;padding:0;display:grid;gap:8px}
.shared-cards li{display:grid;gap:3px;padding:10px 12px;border-radius:10px;border:1px solid var(--line);font-size:14px}
.shared-cards mark{background:#e4f0d4;color:#527b35;border-radius:5px;padding:0 4px}
.shared-cards small{font-size:12px;color:var(--muted)}
html[data-theme="dark"] .share-link{background:#14162f;border-color:#3d406a;color:#e9eaf3}
html[data-theme="dark"] .shared-meta span{background:#14162f}
html[data-theme="dark"] .shared-cards mark{background:#25273c;color:#d2ef92}
@media(max-width:560px){.share-link-row{flex-direction:column}}

/* Galaxy map on the statistics page */
.galaxy-card{margin:0 0 20px;padding:22px 24px;border-radius:var(--radius,17px);background:var(--white);border:1px solid var(--line)}
.galaxy-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;flex-wrap:wrap}
.galaxy-head h2{margin:0;font-size:16px}
.galaxy-head p{margin:4px 0 0;font-size:12px;color:var(--muted)}
.galaxy-count{display:inline-flex;align-items:center;gap:6px;padding:6px 12px;border-radius:999px;background:#eef1f5;font-size:12px;font-weight:700}
.galaxy-count .icon{width:14px;height:14px}
.galaxy-map{display:block;width:100%;max-width:760px;height:auto;margin:12px auto 0;overflow:visible}
.galaxy-route line{stroke:#b9c3d3;stroke-width:2;stroke-dasharray:3 7;stroke-linecap:round}
.planet{cursor:pointer;outline:none}
.planet-glow{opacity:.12;transition:opacity .2s}
.planet:hover .planet-glow,.planet:focus-visible .planet-glow{opacity:.35}
.planet:focus-visible .planet-track{stroke:#85b55c;stroke-width:3}
.planet-track{fill:none;stroke:#e3e8ef;stroke-width:3}
.planet-progress{fill:none;stroke:#85b55c;stroke-width:3;stroke-linecap:round}
.planet-shade{fill:#00000018;pointer-events:none}
.planet.unexplored .planet-body{opacity:.45}
.planet-flag{fill:#f2b48a;stroke:#946d37;stroke-width:1.5;stroke-linejoin:round}
.planet-title{font-size:12px;font-weight:700;text-anchor:middle;fill:var(--ink)}
.planet-meta{font-size:10px;text-anchor:middle;fill:var(--muted)}
html[data-theme="dark"] .galaxy-card{background:var(--white);border-color:var(--line)}
html[data-theme="dark"] .galaxy-count{background:#1c1f42;color:#e9e9f2}
html[data-theme="dark"] .galaxy-route line{stroke:#3d406a}
html[data-theme="dark"] .planet-track{stroke:#24274a}
html[data-theme="dark"] .planet-progress{stroke:#bfe964}
html[data-theme="dark"] .planet-shade{fill:#0d0e1e40}
@media(max-width:640px){.galaxy-map{max-width:420px}}

/* Badges on the statistics page */
.badges-card{margin:0 0 20px;padding:22px 24px;border-radius:var(--radius,17px);background:var(--white);border:1px solid var(--line)}
.badges-grid{list-style:none;margin:16px 0 0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:10px}
.badge{display:grid;justify-items:center;text-align:center;gap:6px;padding:16px 12px;border-radius:14px;border:1px solid var(--line)}
.badge-icon{width:44px;height:44px;border-radius:50%;display:grid;place-items:center}
.badge-icon .icon{width:22px;height:22px}
.badge strong{font-size:13px}
.badge small{font-size:11px;color:var(--muted);line-height:1.4}
.badge.earned .badge-icon{background:#e4f0d4;color:#527b35;box-shadow:0 0 0 4px #e4f0d466}
.badge.locked .badge-icon{background:#eef1f5;color:#9aa4b2}
.badge.locked strong{color:var(--muted)}
html[data-theme="dark"] .badges-card{background:var(--white);border-color:var(--line)}
html[data-theme="dark"] .badge{border-color:var(--line)}
html[data-theme="dark"] .badge.earned .badge-icon{background:#25273c;color:#d2ef92;box-shadow:0 0 0 4px #25273c66}
html[data-theme="dark"] .badge.locked .badge-icon{background:#1c1f42;color:#5f6290}
