/* Android learning surfaces: one primary action and a board sized to real WebView height. */
/* WebView 91 ignores behavior:"instant" when CSS requests smooth scrolling. */
html { scroll-behavior:auto; scroll-padding:12px 0 84px; }
body[data-offline] { color:#e8edf2; }
body[data-app-view=lesson][data-app-section=play] { padding-bottom:12px!important; }
body[data-app-view=lesson][data-app-section=play] .journey-nav,
body[data-app-view=gems] .site-header { display:none; }
button,summary { touch-action:manipulation; }
button:disabled { cursor:default; }
.home-activities button,.home-back,.vocabulary-open,.vocabulary-close,.vocabulary-filters button { min-height:48px; }
.vocabulary-head .vocabulary-close.secondary-action { width:48px; height:48px; min-width:48px; min-height:48px; flex:none; }
.home-feature__art,.home-feature__copy { min-height:195px; }
.home-feature__copy { padding-top:16px; padding-bottom:16px; }
.home-feature__chapter { margin-bottom:10px; }
.home-feature__signal { margin-top:12px; }
.offline-progress-summary { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.offline-progress-summary>div { display:flex; flex-direction:column; gap:3px; }
.offline-progress-summary span { font-size:12px; }
.offline-progress-summary strong { font-size:17px; color:#e8edf2; }
.home-feature__status { font-size:13px; line-height:1.6; }
.journey-catalog .champion-node__badge { font-size:11px; }
.journey-lesson .lesson-nav { grid-template-columns:repeat(3,minmax(0,1fr)); }
.journey-lesson .lesson-nav__button { background:#132237; border:1px solid #304155; box-shadow:none; color:#bdcddd; }
.journey-lesson .lesson-nav__button.is-active { background:#183b3f; border-color:#4c8d8b; color:#b5f5e8; }
.journey-lesson .champion-gem-card { display:none; }
.journey-lesson .lesson-deck,.journey-lesson .lesson-stage { gap:6px; }
.offline-lesson-navigation { display:contents; }
body[data-app-section=play] .champion-profile { display:none; }
body[data-app-section=play] .offline-lesson-navigation { display:block; position:relative; z-index:8; }
.offline-lesson-navigation>summary { min-height:48px; padding:12px 4px; line-height:24px; font-size:13px; color:#cce8e1; cursor:pointer; }
body[data-app-section=play] .offline-lesson-navigation[open] .lesson-nav { position:absolute; top:100%; left:0; right:0; padding:10px; background:#132237; border:1px solid #4c8d8b; border-radius:10px; box-shadow:0 12px 30px #0009; }
body[data-app-section=play] .lesson-stage { margin-top:0; }
.journey-lesson .transmission-label { text-transform:none; letter-spacing:.3px; color:#adc4d5; }
.offline-reading-tools { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px; align-items:start; margin-bottom:12px; }
.offline-reading-tools .offline-bio-facts { margin:0; border:0; }
.offline-reading-tools .offline-bio-facts[open] { grid-column:1/-1; }
.offline-reading-tools .vocabulary-launcher { margin:0; }
.offline-reading-position { grid-column:1/-1; font-size:11px; color:#b5c7d6; }
.offline-reading-tools summary { padding:12px 0; font-size:13px; }
.vocabulary-open { background:transparent; border:0; padding:10px 8px; }
.journey-lesson .bio-log-entry { display:block; padding:16px; border:1px solid #2b4054; background:#122033; }
.journey-lesson .bio-log-entry__marker { display:none; }
.journey-lesson .bio-log-entry__copy p { line-height:1.65; }
.journey-lesson .lesson-panel--quote { margin:26px 0 8px; padding:20px; border-left:2px solid #d8b971; background:#112031; border-radius:0 12px 12px 0; }
.journey-lesson .champion-quote { margin:14px 0; padding:0; font-size:21px; line-height:1.5; color:#f0dfb4; }
.journey-lesson .quote-byline { font-size:14px; color:#abc1d0; }
.journey-lesson .quiz-console { border:1px solid #304155; box-shadow:none; gap:12px; padding:14px; }
.journey-lesson .quiz-head { display:flex; align-items:start; gap:8px; }
.journey-lesson .quiz-head { border:0; background:none; box-shadow:none; }
body[data-offline] .lesson-panel--quiz .quiz-console { background:#132237; border-color:#304155; }
body[data-offline] .bio-log-entry__copy { background:none; box-shadow:none; border:0; padding:0; }
body[data-offline] .lesson-panel--quote .champion-quote { background:none; box-shadow:none; border:0; }
.journey-lesson .quiz-orbit-score { background:none; border:0; padding:0; border-radius:0; }
.quiz-head .vocabulary-launcher { margin:0; flex:none; }
.quiz-head .vocabulary-open { padding:0; width:48px; }
.quiz-head .vocabulary-open span { display:none; }
.journey-lesson .quiz-question-copy { flex:1; min-width:0; }
.journey-lesson .quiz-question-copy strong { font-size:20px; line-height:1.35; }
.journey-lesson .quiz-orbit-node { display:none; }
.journey-lesson .quiz-orbit-map { min-height:0; padding:0; }
.journey-lesson .quiz-orbit-score { margin-left:0; }
.journey-lesson .quiz-option { box-shadow:none; background:#1a2c40; border:1px solid #3c5368; }
.journey-lesson .quiz-option { display:flex; flex-direction:column; align-items:stretch; gap:6px; }
.offline-answer-state { font-size:12px; line-height:1.3; font-weight:600; }
.offline-quiz-score { font-size:12px; color:#b5c7d6; }
.journey-lesson .quiz-option::after,.journey-lesson .quiz-option::before { display:none; }
.quiz-console.is-correct .quiz-option:not(.is-correct),
.quiz-console.is-wrong .quiz-option:not(.is-wrong):not(.is-correct) { display:none; }
.journey-lesson .quiz-option.is-correct { color:#d9fff0; background:#17423c; border-color:#55a28f; }
.journey-lesson .quiz-option.is-wrong { color:#ffe3dc; background:#472e32; border-color:#b87973; }
.journey-lesson .quiz-feedback { border:0; background:#112e32; color:#d7f4ea; }
.journey-lesson .quiz-feedback.is-wrong { background:#35262f; color:#f4dddd; }
.quiz-finish .primary-action,.quiz-finish .secondary-action { width:100%; min-height:48px; margin-top:12px; }
.section-advance { background:none; border:0; padding:12px 0; }
.section-advance__copy { display:none; }
.section-advance__button { width:100%; min-height:48px; }
.offline-training { display:flex; gap:4px; background:#122136; border-radius:10px; padding:3px; }
.offline-training button { flex:1; min-height:48px; min-width:0; padding:8px; border:1px solid transparent; border-radius:8px; background:none; color:#b8c5d3; font-family:inherit; font-size:13px; font-weight:600; line-height:1.3; }
.offline-training button[aria-pressed=true] { background:#204046; border-color:#4b8486; color:#cef9ed; }
.journey-lesson .puzzle-module-section { display:grid; grid-template-columns:1fr 1fr; gap:6px; position:relative; }
.offline-puzzle-selector { margin:0; align-self:start; min-width:0; }
.offline-puzzle-selector summary { padding:12px 8px; font-size:12px; }
.offline-puzzle-selector[open] { margin-bottom:0; }
.offline-puzzle-selector[open] .puzzle-route { position:absolute; top:60px; left:0; right:0; z-index:7; background:#132237; border:1px solid #4c8d8b; border-radius:10px; box-shadow:0 12px 30px #0009; }
.journey-lesson .puzzle-command { grid-column:1/-1; }
.offline-puzzle-selector .puzzle-route { display:block; padding:12px; max-height:50vh; overflow:auto; border:0; background:none; }
.offline-puzzle-selector .puzzle-route__head { margin:0 0 8px; padding:0; display:block; }
.offline-puzzle-selector .puzzle-route__grid { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:6px; }
.offline-puzzle-selector .puzzle-route__slot { min-height:48px; padding:8px; border-radius:8px; box-shadow:none; }
.offline-puzzle-selector .puzzle-route__slot strong { font-size:15px; }
.offline-puzzle-selector .puzzle-route__slot .puzzle-route__mark { display:block; width:auto; height:auto; background:none; box-shadow:none; font-size:13px; line-height:18px; }
.offline-puzzle-selector .puzzle-route__slot .puzzle-route__mark::before,.offline-puzzle-selector .puzzle-route__slot .puzzle-route__mark::after { display:none; }
.offline-puzzle-selector .puzzle-route__slot.is-assisted { border-color:#c5a865; color:#f0dfb4; }
.offline-puzzle-selector .puzzle-route__slot.is-reviewed { border-color:#799ebb; color:#ccdfed; }
.offline-slot-legend { display:grid; grid-template-columns:1fr 1fr; gap:8px; font-size:11px; line-height:1.4; color:#c3d5df; margin-top:14px; }
.offline-extra-label { display:block; margin:16px 0 8px; }
.offline-selector-note,.offline-training-caption { font-size:12px; line-height:1.5; color:#b5c7d6; margin:12px 0; }
.journey-lesson .puzzle-board-frame { position:relative; display:flex; flex-direction:column; gap:6px; }
.journey-lesson .puzzle-board-timer-dock { min-height:48px; gap:8px; z-index:1; }
[data-training-mode=practice] .puzzle-board-timer-dock { display:none; }
.journey-lesson .puzzle-board-timer-dock::before,.journey-lesson .puzzle-board-timer-dock::after { display:none; }
.journey-lesson .champion-puzzle-board { flex:none; min-width:0; max-width:100%; }
.journey-lesson .puzzle-timer--board { background:#142539; border:1px solid #304155; color:#d8e9e8; box-shadow:none; font-size:13px; }
.journey-lesson .puzzle-timer--board { padding:8px 12px!important; background:#142539!important; border-color:#304155!important; color:#d8e9e8!important; }
.journey-lesson .puzzle-timer--board::before,.journey-lesson .puzzle-timer--board::after { display:none; }
.offline-clock-button { min-width:106px; }
.journey-lesson .puzzle-status-card { box-shadow:none; border:0; background:#122136; }
.journey-lesson .puzzle-status-card strong { font-size:14px; }
.journey-lesson .puzzle-status-card p { font-size:12px; }
.journey-lesson .puzzle-status-card::before,.journey-lesson .puzzle-status-card::after { display:none; }
.journey-lesson .puzzle-telemetry { display:flex; flex-direction:column; align-items:stretch; }
.champion-puzzle-board .silicio-board-shapes { left:var(--guidance-left,0px)!important; top:var(--guidance-top,0px)!important; }
.offline-study-panel { display:flex; flex-direction:column; gap:6px; height:168px; }
.offline-study-copy { flex:1; min-height:0; overflow-y:auto; overscroll-behavior:contain; border-radius:10px; }
.offline-study-copy:focus-visible { outline:2px solid #72ded3; outline-offset:2px; }
.offline-study-actions,.offline-review-controls { display:flex; gap:6px; flex:none; }
.offline-study-actions button,.offline-review-controls button { flex:1; min-height:48px; min-width:0; padding:8px 6px; font-size:13px; line-height:1.3; box-shadow:none; }
.offline-study-panel.is-solved .offline-study-actions { display:grid; grid-template-columns:1fr 1fr; }
.offline-study-panel.is-solved .puzzle-solution-next { grid-column:1/-1; }
.offline-study-note { font-size:14px; line-height:1.5; color:#d3f4ed; background:#173039; padding:10px; margin:0; border-radius:10px; }
.offline-study-panel [hidden] { display:none!important; }
.offline-puzzle-info>summary { min-height:48px; padding:12px 0; font-size:12px; line-height:24px; color:#b5c7d6; cursor:pointer; }
.offline-move-feedback { outline:2px solid #b87973; outline-offset:2px; }
.journey-lesson .puzzle-board-retry,.journey-lesson .puzzle-board-solution { display:none!important; }
.journey-lesson .puzzle-facts { display:block; border-top:1px solid #304155; }
.journey-lesson .puzzle-facts>div { display:flex; gap:8px; padding:8px 0; background:none; border:0; }
.journey-lesson .puzzle-facts dt { flex:none; }
.journey-lesson .puzzle-facts dd { font-size:12px; }
.journey-lesson .puzzle-retry,.journey-lesson .puzzle-solution-next { width:100%; margin:8px 0 0; }
.journey-lesson .offline-study-actions .puzzle-retry { grid-column:auto; width:auto; margin:0; background:#1a2c40; color:#d3e7e4; border:1px solid #4a6377; }
.journey-lesson .offline-study-actions .puzzle-retry.primary-action { background:#f7c94b; color:#171208; border-color:#f7c94b; }
.journey-lesson .offline-study-actions .puzzle-solution-next { margin:0; }
.offline-board-paused::after { top:calc(50% + 26px); font-size:13px; padding:8px 12px; }
.offline-reviewing .offline-clock-button { visibility:hidden; }
.offline-collection { padding:0; border:0; background:none; box-shadow:none; }
.offline-collection::before,.offline-collection::after { display:none; }
.puzzle-landing-modal__ship,.puzzle-landing-modal__particles { display:none; }
.puzzle-landing-modal__panel { background:#132237; border:1px solid #4c8d8b; box-shadow:0 20px 70px #0008; }
.journey-collection h1 { font-size:24px; margin:18px 0 12px; }
.offline-collection-header { display:flex; align-items:center; gap:16px; margin:0 0 20px; }
.offline-collection-header p { color:#b8c5d3; font-size:14px; line-height:1.5; }
.offline-collection-header .gem-chamber__counter { border:0; padding:0; background:none; min-width:90px; }
.offline-collection-header .gem-chamber__counter strong { font-size:28px; }
.offline-gem-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); grid-auto-rows:1fr; gap:12px; align-items:stretch; }
.offline-gem-card { min-width:0; overflow:hidden; border:1px solid #31465c; border-radius:14px; background:#132237; }
.offline-gem-card.is-earned { border-color:#777044; background:linear-gradient(145deg,#203537,#132237 65%); }
.offline-gem-grid .gem-node { display:grid; grid-template-columns:1fr 1fr; grid-template-rows:64px 1fr auto auto; gap:10px 8px; justify-items:start; width:100%; height:100%; min-width:0; min-height:218px; padding:16px 14px 12px; background:none; border:0; border-radius:12px; text-align:left; }
.offline-gem-grid .gem-node:focus-visible { outline:3px solid #7ee7d6; outline-offset:-3px; }
.offline-gem-portrait { grid-column:1; grid-row:1; width:52px; height:62px; align-self:center; object-fit:contain; border-radius:10px; background:#fff; }
.offline-gem-grid .gem-node__crystal { grid-column:2; grid-row:1; width:32px; height:42px; align-self:end; justify-self:center; margin-bottom:4px; animation:none; }
.offline-gem-grid .gem-node strong { position:absolute; right:14px; top:10px; margin:0; font-size:10px; letter-spacing:.1em; color:#9eafb9; }
.offline-gem-grid .gem-node small { grid-column:1/-1; grid-row:2; align-self:start; white-space:normal; overflow-wrap:break-word; color:#f4eedc; font-size:14px; line-height:1.35; min-height:2.7em; }
.offline-gem-state { grid-column:1/-1; grid-row:3; font-size:11px; color:#b9cdce; }
.is-earned .offline-gem-state { color:#f4dc9c; }
.offline-gem-hint { grid-column:1/-1; grid-row:4; display:flex; align-items:center; justify-content:space-between; gap:6px; width:100%; border-top:1px solid #31465c; padding:10px 0 8px; color:#9ce0d5; font-size:11px; line-height:1.6; }
.offline-gem-arrow { flex:none; width:7px; height:7px; margin-right:3px; border-top:2px solid currentColor; border-right:2px solid currentColor; transform:rotate(45deg); }
.offline-gem-quote { margin:0; padding:20px; border:1px solid #405757; border-left:3px solid #e6ca7d; border-radius:4px 14px 14px 4px; background:linear-gradient(130deg,#24383c,#152538); color:#f4eedc; font-size:18px; line-height:1.65; font-style:normal; overflow-wrap:break-word; }
.offline-gem-details-hero { display:flex; align-items:center; gap:14px; }
.offline-gem-details-hero .offline-gem-portrait { flex:none; }
.offline-gem-details-hero h3 { color:#efcf86; font-size:15px; }
.offline-gem-details-hero .offline-gem-details-state { color:#9eafb9; font-size:13px; }
@media(max-width:379px) { .offline-gem-grid { grid-template-columns:minmax(0,1fr); } }
@media(min-width:760px) { .offline-gem-grid { grid-template-columns:repeat(3,minmax(0,1fr)); } }
.gem-ceremony__panel { max-height:calc(100dvh - 28px); padding:20px; overflow-y:auto; overscroll-behavior:contain; }
.gem-ceremony__gem { width:144px; height:144px; margin-bottom:8px; }
.gem-ceremony__crystal { width:66px; height:84px; }
.gem-ceremony h2 { font-size:30px; line-height:1.08; margin:10px 0; }
.gem-ceremony p { font-size:14px; line-height:1.5; }
.gem-ceremony__seal { margin-top:10px; }
@media(max-height:600px) { .gem-ceremony__gem { width:104px; height:104px; } .gem-ceremony__crystal { width:48px; height:62px; } .gem-ceremony h2 { font-size:26px; } }
.gem-ceremony__actions { width:100%; flex-direction:column; }
.gem-ceremony__actions button { min-height:48px; white-space:normal; line-height:1.4; }
.gem-ceremony__line { background:#f6c74a; color:#171208; border-color:#f6c74a; }
.gem-ceremony__line:hover,.gem-ceremony__line:focus-visible { color:#171208; }
.gem-ceremony__actions button:focus-visible { outline:3px solid #7ee7d6; outline-offset:3px; }
.offline-gem-legend { margin:24px 0; color:#b8c5d3; font-size:14px; line-height:1.6; }
.offline-gem-legend summary { min-height:48px; padding:12px 0; color:#dbebea; }
.offline-sheet .vocabulary-sheet { gap:14px; max-width:540px; overflow-y:auto; }
.offline-sheet h2 { font-size:22px; }
.offline-sheet h3,.offline-sheet p { margin:0; line-height:1.6; }
.offline-sheet p { color:#c3d5df; }
.offline-sheet button:not(.vocabulary-close) { min-height:48px; }
.offline-sheet progress { width:100%; height:8px; accent-color:#67d6c2; }

/* Promotion is a visual chess choice, separate from the reading sheets. */
.vocabulary-overlay.promotion-overlay { align-items:center; padding:20px; background:rgba(3,9,18,.78); }
.offline-sheet .promotion-sheet { max-width:520px; max-height:calc(100dvh - 40px); padding:24px; gap:0; border:1px solid #66878c; border-radius:24px; background:radial-gradient(ellipse at 100% 0,#1a424a 0,transparent 65%),#101e30; box-shadow:0 24px 80px #0009,inset 0 1px #c8e8df33; }
.promotion-sheet .vocabulary-head { gap:10px 16px; margin:0; flex-wrap:wrap-reverse; }
.promotion-sheet .vocabulary-head h2 { flex:1 0 auto; max-width:100%; margin:0; color:#f3f6f8; font-size:28px; line-height:1.2; letter-spacing:-.5px; overflow-wrap:normal; }
.promotion-sheet .vocabulary-head h2:focus { outline:none; }
.promotion-sheet .vocabulary-close { flex:none; margin-left:auto; border-color:#79919e; color:#eaf4f8; }
.offline-sheet .promotion-instruction { margin:10px 0 20px; color:#c8dce5; font-size:14px; line-height:1.5; }
.promotion-choices { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; flex-shrink:0; }
.promotion-choice { display:flex; flex-direction:column; align-items:center; gap:10px; width:100%; min-width:0; padding:12px; border:1px solid #728b98; border-radius:18px; background:#172e40; color:#f4f7f9; font-family:inherit; font-size:15px; font-weight:600; line-height:1.4; cursor:pointer; transition:border-color .12s,background-color .12s,transform .12s; touch-action:manipulation; -webkit-tap-highlight-color:transparent; }
.promotion-piece { display:grid; place-items:center; width:100%; height:100px; border-radius:11px; background:#e8dfc9; box-shadow:inset 0 1px #fff9; }
.promotion-piece img { display:block; width:92px; height:92px; object-fit:contain; pointer-events:none; }
.promotion-label { color:#f4f7f9; font-size:15px; font-weight:600; line-height:1.4; overflow-wrap:normal; }
@media(hover:hover) { .promotion-choice:hover { background:#244c55; border-color:#80e5d0; } }
.promotion-choice:active { background:#295963; border-color:#a5f1d8; transform:scale(.97); }
.promotion-choice:focus-visible { outline:3px solid #f3d288; outline-offset:3px; border-color:#f3d288; }
@media(min-width:600px), (orientation:landscape) {
 .offline-sheet .promotion-sheet { max-width:680px; }
 .promotion-choices { grid-template-columns:repeat(4,minmax(0,1fr)); }
}
@media(max-width:359px) {
 .vocabulary-overlay.promotion-overlay { padding:12px; }
 .offline-sheet .promotion-sheet { padding:18px; max-height:calc(100dvh - 24px); }
 .promotion-piece { height:82px; }
 .promotion-piece img { width:76px; height:76px; }
 .promotion-sheet .vocabulary-head h2 { font-size:23px; }
}
@media(max-height:440px) {
 .vocabulary-overlay.promotion-overlay { padding:10px; }
 .offline-sheet .promotion-sheet { padding:14px 18px; max-height:calc(100dvh - 20px); border-radius:20px; }
 .promotion-sheet .vocabulary-head h2 { font-size:24px; }
 .offline-sheet .promotion-instruction { margin:4px 0 12px; font-size:13px; }
 .promotion-choice { padding:8px; gap:6px; border-radius:14px; }
 .promotion-piece { height:70px; border-radius:8px; }
 .promotion-piece img { width:66px; height:66px; }
 .promotion-label { font-size:13px; }
}
@media(prefers-reduced-motion:reduce) { .promotion-choice { transition:none; } .promotion-choice:active { transform:none; } }
.offline-gem-progress { display:grid; gap:6px; font-size:14px; }
.offline-sound-switch { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.offline-switch-track { flex:none; width:48px; height:28px; padding:4px; background:#5c6f83; border-radius:18px; }
.offline-switch-track::before { content:''; display:block; width:20px; height:20px; border-radius:50%; background:#fff; transition:transform .15s; }
[aria-checked=true] .offline-switch-track { background:#337f73; }
[aria-checked=true] .offline-switch-track::before { transform:translateX(20px); }
@media(min-width:600px) and (max-height:599px) {
 .journey-lesson .puzzle-module-section { grid-template-columns:52% 45%; column-gap:3%; align-items:start; }
 .lesson-panel--play .puzzle-command,.lesson-panel--play .puzzle-arena { display:contents; }
 .offline-training { grid-column:2; grid-row:1; }
 .lesson-panel--play .offline-puzzle-selector { grid-column:2; grid-row:2; }
 .lesson-panel--play .offline-puzzle-selector[open] .puzzle-route { left:55%; }
 .lesson-panel--play .puzzle-telemetry { grid-column:2; grid-row:3; margin:0; }
 .lesson-panel--play .puzzle-board-frame { grid-column:1; grid-row:1/span 3; }
 .journey-lesson .champion-profile { display:none; }
}
@media(prefers-reduced-motion:reduce) {
 body[data-offline] *,body[data-offline] *::before,body[data-offline] *::after { animation-duration:.01ms!important; transition-duration:.01ms!important; }
}
@media(max-width:350px) {
 .offline-training button { font-size:12px; padding:8px 3px; }
 .offline-puzzle-selector summary { font-size:12px; padding:12px 4px; }
 .offline-lesson-navigation>summary { font-size:12px; }
}
