/* Approved blue and yellow identity, pictured category selector and dark surfaces. */
:root{--surface:#fff;--surface-soft:#edf4fc;--text:#102b50;--link:#0866ce;--shadow:#e4eaf1}
.settings-button{width:44px;height:44px;display:grid;place-items:center;border:0;border-radius:10px;background:transparent}
.settings-button:hover{background:#ffffff20}.settings-button img{width:21px;filter:brightness(0) invert(1)}
.menu-settings{display:flex;align-items:center;gap:12px;width:100%;border:0;border-top:1px solid var(--line);background:transparent;padding:15px;font-size:14px;text-align:left;margin-top:5px;min-height:48px}
.menu-settings:hover{background:var(--surface-soft)}
.settings-install{margin-top:18px;padding-top:18px;border-top:1px solid var(--line)}.settings-install .install-button{width:100%;justify-content:center}.settings-install .install-help{margin-top:12px}
.category-area{max-width:420px;position:relative;margin-bottom:20px}
.category-field-label,.topic-label{display:block;color:var(--muted);font-size:12px;font-weight:700;margin-bottom:8px}
.category-picker{position:relative}
.category-summary{width:100%;display:flex;align-items:center;gap:12px;justify-content:space-between;min-height:72px;border:1px solid var(--line);background:var(--surface);border-radius:13px;padding:8px 17px 8px 10px;cursor:pointer;font-size:16px;font-weight:700;text-align:left}
.category-summary>.icon{width:19px;transition:transform .15s}
.category-picker[data-open=true] .category-summary>.icon{transform:rotate(180deg)}
.category-value{display:flex;align-items:center;gap:14px}
.category-picture{height:52px;width:49px;flex:0 0 49px;display:grid;place-items:center;border-radius:9px;background:#eef5fd;overflow:hidden}
.category-picture .art{width:39px;flex-shrink:0}.all-picture .icon{width:25px;height:25px}
.category-options{position:absolute;top:calc(100% + 7px);left:0;right:0;z-index:20;background:var(--surface);border:1px solid var(--line);border-radius:15px;box-shadow:0 14px 38px #102b5029;padding:6px;max-height:min(440px,52dvh);overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}
.category-options button{display:flex;align-items:center;gap:13px;width:100%;padding:6px 9px;min-height:64px;border:0;border-radius:9px;background:transparent;text-align:left;font-size:15px;font-weight:600}
.category-options button:hover,.category-options button[aria-pressed=true]{background:var(--surface-soft)}
.category-options button:focus-visible{outline-offset:-3px}.category-check{margin-left:auto;visibility:hidden}.category-check .icon{width:19px}
.category-options button[aria-pressed=true] .category-check{visibility:visible}
.topic-filters:empty{display:none}.topic-filters{margin:0 0 24px}.topic-buttons{display:flex;gap:8px;flex-wrap:wrap}
.topic-buttons button{padding:10px 14px;border:1px solid var(--line);border-radius:9px;min-height:44px;background:var(--surface);font-size:13px;font-weight:600}
.topic-buttons button[aria-pressed=true]{color:white;background:var(--blue);border-color:var(--blue)}.topic-buttons button:hover{border-color:var(--blue)}
.site-footer{display:block;padding-top:16px}.footer-top{display:flex;align-items:center;justify-content:space-between;gap:16px}
.teacher-link{font-size:12px;color:var(--muted);border:0;padding:12px 0;background:none;text-decoration:underline;text-underline-offset:4px;min-height:44px;white-space:nowrap}
.settings-brands{display:flex;align-items:center;justify-content:flex-start;gap:8px;flex-wrap:wrap;margin-top:16px;text-align:left}.settings-brands>span{color:var(--muted);font-size:12px}
.official-logo{display:flex;align-items:center;flex-shrink:0;min-height:32px}.official-logo img{display:block;height:auto;width:100%}
.taalroute-logo{width:72px}.alfabeta-logo{width:24px}
.official-logo .logo-white{display:none}
[data-theme=dark] .official-logo .logo-dark{display:none}
[data-theme=dark] .official-logo .logo-white{display:block}
.theme-setting{display:flex;gap:16px;align-items:center;justify-content:space-between;padding:18px 0;min-height:64px;cursor:pointer;font-weight:600}
.theme-setting>span:first-child{display:flex;align-items:center;gap:12px}.theme-setting input{position:absolute;opacity:0;width:1px;height:1px}
.theme-switch{width:48px;height:28px;border-radius:20px;background:#8090a4;position:relative;flex:0 0 48px;transition:background .15s}
.theme-switch::before{content:'';position:absolute;top:4px;left:4px;width:20px;height:20px;background:white;border-radius:50%;transition:transform .15s}
.theme-setting input:checked+.theme-switch{background:var(--blue)}.theme-setting input:checked+.theme-switch::before{transform:translateX(20px)}.theme-setting input:focus-visible+.theme-switch{outline:3px solid #dc5c25;outline-offset:4px}
.teacher-dialog{width:min(640px,calc(100% - 32px))}.teacher-dialog .teacher-lead{font-weight:800;font-size:20px;color:var(--link);line-height:1.5;margin-bottom:17px}
.teacher-dialog p,.teacher-dialog li{font-size:14px;line-height:1.85}.teacher-dialog p+p{margin-top:10px}.teacher-dialog h3{font-size:17px;margin:25px 0 9px}.teacher-dialog ol{padding-left:23px}.teacher-dialog li{padding-left:4px;margin-bottom:10px}.teacher-close{margin-top:25px}.teacher-dialog h2:focus{outline:0}
/* Interface icons follow the text colour; artwork and brand marks keep their own colours. */
:root[data-theme=dark]{color-scheme:dark;color:#eaf2fc;background:#101b2a;--text:#eaf2fc;--navy:#eaf2fc;--muted:#aabbd0;--line:#36465b;--surface:#1a293c;--surface-soft:#24384f;--link:#8bc3ff;--shadow:#0b1420;--green:#82deb0}
[data-theme=dark] .mission-card,[data-theme=dark] .mini-card,[data-theme=dark] .library-card,[data-theme=dark] .progress-item,[data-theme=dark] .empty-state,[data-theme=dark] .mobile-menu,[data-theme=dark] .share-dialog,[data-theme=dark] .install-help,[data-theme=dark] .small-button,[data-theme=dark] .search-field input,[data-theme=dark] .level-select{background:var(--surface);color:var(--text);border-color:var(--line)}
[data-theme=dark] .mission-card{box-shadow:0 5px 0 var(--shadow)}
[data-theme=dark] .mission-intro,[data-theme=dark] .eyebrow,[data-theme=dark] .art-caption,[data-theme=dark] .below-card,[data-theme=dark] .below-card a,[data-theme=dark] .back-link,[data-theme=dark] .level-select span,[data-theme=dark] .help,[data-theme=dark] .storage-note,[data-theme=dark] .storage-note strong,[data-theme=dark] .undo-button,[data-theme=dark] .progress-summary p,[data-theme=dark] .resume-banner span,[data-theme=dark] .install-help summary{color:var(--muted)}
[data-theme=dark] .variant-link,[data-theme=dark] .text-link,[data-theme=dark] .card-bottom,[data-theme=dark] .progress-number{color:var(--link)}
[data-theme=dark] .variant-link{border-color:#547ca6}
[data-theme=dark] .level-tag,[data-theme=dark] .level-select input:checked+span,[data-theme=dark] .close-button,[data-theme=dark] .help p,[data-theme=dark] .progress-summary,[data-theme=dark] .resume-banner,[data-theme=dark] .step-list li::before,[data-theme=dark] .step-list .quote{background:var(--surface-soft);color:var(--text);border-color:var(--line)}
[data-theme=dark] .step-list .quote{border-left-color:#71b8ff}
[data-theme=dark] .primary{color:#102b50}[data-theme=dark] .whatsapp-primary{color:#fff}
[data-theme=dark] .share-link{color:#8ddeba}
[data-theme=dark] .success-count,[data-theme=dark] .message-preview{background:#193b32;color:#d4f2df;border-color:#315d4c}
[data-theme=dark] .notice{background:#3d341a;color:#ffe7a0;border-color:#756137}
[data-theme=dark] .status-tag{color:#15704c}[data-theme=dark] .status-tag.busy{color:#876006}
[data-theme=dark] .mobile-menu a:hover,[data-theme=dark] .small-button:hover{background:var(--surface-soft)}
[data-theme=dark] .icon,[data-theme=dark] .chevron,[data-theme=dark] .mobile-menu img{filter:brightness(0) invert(.92)}
[data-theme=dark] .primary:not(.whatsapp-primary) .icon,[data-theme=dark] .category-picture .icon,[data-theme=dark] .success-seal .icon{filter:none}
[data-theme=dark] .whatsapp-primary .icon{filter:brightness(0) invert(1)}
.whatsapp-primary .icon{filter:brightness(0) invert(1)}
[data-theme=dark] .success-art{background-color:#eef5fd;mix-blend-mode:normal;border-radius:16px;margin-top:18px;margin-bottom:18px}
@media(max-width:600px){.category-area{max-width:none}.category-options{max-height:min(410px,48dvh)}.category-summary{min-height:68px;font-size:15px}.category-options button{font-size:14px}.topic-buttons{gap:7px}.topic-buttons button{font-size:12px;padding:10px 12px}.teacher-link{font-size:11px}.footer-top{font-size:10px}.teacher-dialog p,.teacher-dialog li{font-size:14px}}
@media(prefers-reduced-motion:reduce){.theme-switch,.theme-switch::before,.category-summary>.icon{transition:none}}

/* Share the actual preview image and preserve a separate text/link action. */
.whatsapp-primary{position:relative;display:flex;justify-content:center;align-items:center;text-align:center;padding-inline:48px}
.whatsapp-primary>.icon{position:absolute;left:18px;margin:0;width:22px;height:22px}
.share-card-preview{max-width:310px;margin:0 auto 22px;border-radius:16px;overflow:hidden;background:#eaf3fd;color:#102b50;box-shadow:0 8px 28px #102b5018}
.share-card-preview img{display:block;width:100%;height:auto}
.share-card-preview p{padding:24px;font-size:16px;text-align:center}
.share-url-button{width:100%;justify-content:center;margin-top:15px}
.share-message-details{margin-top:18px;font-size:14px}
.share-message-details summary{cursor:pointer;padding:10px 0;font-weight:700}
.share-message-details .message-preview{white-space:pre-wrap;overflow-wrap:anywhere;user-select:text}
.share-dialog{max-height:90dvh;overflow-y:auto}
.dialog-secondary{flex-wrap:wrap}
@media(max-width:600px){.share-card-preview{max-width:260px}.whatsapp-primary{font-size:15px;padding-inline:46px}}

/* Permanent app navigation, based on Nico's three-button reference. */
:root{--bottom-nav-space:calc(5.25rem + env(safe-area-inset-bottom,0px));scroll-padding-bottom:calc(var(--bottom-nav-space) + 1rem)}
body{padding-bottom:var(--bottom-nav-space)}
.bottom-nav{position:fixed;inset:auto 0 0;z-index:30;background:var(--surface);border-top:1px solid var(--line);box-shadow:0 -4px 20px #102b5008;padding:8px max(12px,env(safe-area-inset-right,0px)) calc(8px + env(safe-area-inset-bottom,0px)) max(12px,env(safe-area-inset-left,0px))}
.bottom-nav-inner{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;max-width:720px;margin:auto}
.bottom-nav a{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;padding:10px 4px;min-height:64px;border-radius:16px;color:var(--muted);font-size:.875rem;font-weight:700;line-height:1.35;text-align:center}
.bottom-nav a:hover{background:var(--surface-soft)}
.bottom-nav a[aria-current]{background:#e8f1ff;color:var(--blue)}
.bottom-nav-icon{display:block;width:25px;height:25px;flex-shrink:0;stroke-width:1.8}
.bottom-nav a:focus-visible{outline-offset:-3px}
[data-theme=dark] .bottom-nav a[aria-current]{background:#253e5b;color:#8bc3ff}
.toast{bottom:calc(var(--bottom-nav-space) + 16px)}
.app-main{min-height:calc(100dvh - 185px - var(--bottom-nav-space))}
@media(max-width:600px){.bottom-nav{padding-top:7px}.bottom-nav-inner{gap:5px}.bottom-nav a{font-size:.8125rem;border-radius:14px;min-height:62px;padding:9px 3px;gap:6px}.bottom-nav-icon{width:24px;height:24px}.app-main{min-height:calc(100dvh - 155px - var(--bottom-nav-space))}}

/* Compact category recognition and teacher information in Settings. */
.settings-links{margin-top:18px;padding-top:18px;border-top:1px solid var(--line)}
.settings-links .small-button{width:100%;justify-content:flex-start}

/* Compact Op Pad wordmark with the original tilted location mark. */
.site-header .brand{gap:12px;min-height:44px;letter-spacing:0;align-items:center}
.site-header .brand-mark{width:34px;height:34px;flex:0 0 34px;border-radius:10px;transform:rotate(-7deg);box-shadow:1px 1.5px 0 #1647a899}
.site-header .brand-mark img{display:block;width:23px;height:23px;transform:none}
.brand-copy{display:flex;flex-direction:column;align-items:flex-start;gap:5px}
.site-header .brand-taalroute{display:block;width:70px;height:auto}
.brand-name{display:block;font-size:20px;line-height:1;font-weight:800;letter-spacing:-.5px;white-space:nowrap}
