/* App-specific additions; the website keeps its existing palette and layout. */
.bdq-app-nav{display:none}.bdq-app-network[hidden],.app-page [hidden]{display:none!important}
.app-login-entry{font:600 14px/1.5 system-ui;margin:16px 0}.app-login-entry a{display:inline-block;min-height:44px;padding:10px 0;color:var(--bd-accent,#ffd078);text-decoration:underline;text-underline-offset:3px}html.bdq-installed .app-login-entry{display:none}
body .bdq-install-callout{display:flex;align-items:center;gap:16px;box-sizing:border-box;width:100%;margin:24px 0;padding:20px;border:1px solid var(--bd-line,#46647d);border-top:3px solid var(--bd-accent,#ffd078);border-radius:16px;background:var(--bd-card,#0c1724);color:var(--bd-ink,#f5f8ff);text-align:left;font:500 15px/1.5 'Barlow',system-ui,sans-serif}
body .bdq-install-callout img{width:48px;height:48px;flex-shrink:0;border-radius:12px}body .bdq-install-copy{flex:1;min-width:0}body .bdq-install-copy strong{display:block;font-size:18px;line-height:1.3;color:var(--bd-ink,#f5f8ff)}body .bdq-install-copy p{margin:6px 0 0;font-size:14px;line-height:1.5;color:var(--bd-muted,#bccbdc)}
body .bdq-install-link{display:inline-flex;align-items:center;justify-content:center;gap:12px;box-sizing:border-box;min-height:48px;padding:12px 16px;border-radius:10px;background:var(--bd-accent,#ffd078);color:var(--bd-card,#17202c);font:700 15px/1.4 'Barlow',system-ui,sans-serif;text-decoration:none;text-align:center}body .bdq-install-link:hover{filter:brightness(1.06)}body .bdq-install-link:focus-visible,body .bdq-install-menu:focus-visible{outline:3px solid var(--bd-cyan,#65e7ff);outline-offset:3px}
html body#bdq-app #nav-mobile-panel .bdq-install-menu,html body #nav-mobile-panel.bdq-common-mobile .mobile-nav-btn.bdq-install-menu{grid-column:1/-1;display:flex;justify-content:center;flex-wrap:wrap;gap:6px 10px;min-height:48px;background:var(--bd-accent,#ffd078)!important;color:var(--bd-card,#17202c)!important;border-color:var(--bd-accent,#ffd078)!important;font-weight:700}body .bdq-install-menu small{font-size:12px;font-weight:500}
body .bdq-install-mobile{display:none}html.bdq-app-installed body .bdq-install-callout,html.bdq-app-installed body #nav-mobile-panel .bdq-install-menu,html.bdq-app-installed .app-login-entry{display:none!important}
html body#bdq-app #home-hub .bdq-install-link{color:var(--bd-card,#17202c)}body.challenges-page:has(#game-section:not([hidden])) .bdq-install-mobile{display:none}
@media(max-width:1119px){body .bdq-install-mobile{display:flex}}
@media(max-width:600px){body .bdq-install-callout{flex-wrap:wrap;gap:12px;padding:16px}body .bdq-install-copy{flex-basis:calc(100% - 60px)}body .bdq-install-link{width:100%}body .bdq-install-copy strong{font-size:17px}}
.app-page{max-width:980px;margin:0 auto;color:var(--bd-ink,#f5f8ff)}
.app-hero{display:flex;gap:24px;align-items:center;margin:12px 0 28px}.app-hero img{width:104px;height:104px;flex-shrink:0;border-radius:24px;box-shadow:0 8px 28px #0003}.app-hero h1{font-size:clamp(2rem,5vw,3rem);line-height:1.1;margin:0 0 12px}.app-kicker{color:var(--bd-accent,#ffd078);font-size:13px;font-weight:800;letter-spacing:.06em;margin:0 0 9px}.app-hero p:last-child{margin-bottom:0;color:var(--bd-muted,#bccbdc);line-height:1.6}
.app-actions{display:flex;gap:12px;flex-wrap:wrap;margin:22px 0}.app-actions .btn{min-height:48px;display:inline-flex;align-items:center;justify-content:center}.app-page a:focus-visible,.app-page button:focus-visible,.app-page summary:focus-visible{outline:3px solid var(--bd-cyan,#65e7ff);outline-offset:3px}.app-note{line-height:1.6;color:var(--bd-muted,#bccbdc);font-size:14px}.app-features,.app-instructions{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:26px 0}.app-feature,.app-instruction{min-width:0;padding:22px;border:1px solid var(--bd-line,#46647d);border-radius:16px;background:var(--bd-card,#0c1724)}.app-feature h2,.app-instruction h2{font-size:22px;margin:0 0 10px}.app-feature p{margin:0;color:var(--bd-muted,#bccbdc);line-height:1.6}.app-instruction ol{padding-left:22px;margin-bottom:0;line-height:1.7}.app-instruction li+li{margin-top:12px}.app-instruction:target{outline:2px solid var(--bd-accent,#ffd078);outline-offset:3px}.app-availability{padding:18px 22px;border-left:3px solid var(--bd-accent,#ffd078);background:var(--bd-raised,#182c40);border-radius:0 12px 12px 0;line-height:1.6}.app-diagnostics{margin:28px 0}.app-diagnostics summary{min-height:44px;cursor:pointer;padding:10px 0;font-weight:700}.app-diagnostics dl{display:grid;grid-template-columns:1fr 1.5fr;gap:12px;line-height:1.5;font-size:14px}.app-diagnostics dt{color:var(--bd-muted,#bccbdc)}.app-diagnostics dd{margin:0;overflow-wrap:anywhere}.app-update-note{border:1px solid var(--bd-line,#46647d);border-radius:10px;padding:14px;line-height:1.5}.app-page section[id]{scroll-margin-top:calc(var(--nav-h,76px) + 20px)}
.bdq-app-network{position:fixed;top:calc(var(--nav-h,64px) + env(safe-area-inset-top,0px) + 8px);left:16px;right:16px;margin:0 auto;max-width:540px;z-index:95;display:flex;align-items:center;gap:12px;padding:10px 14px;background:#182c40;color:#fff0ce;border:1px solid #ffd078;border-radius:12px;font:600 14px/1.5 system-ui;box-shadow:0 4px 20px #0004}.bdq-app-network button{margin-left:auto;width:36px;min-height:36px;flex-shrink:0;border:0;border-radius:8px;background:transparent;color:inherit;font-size:24px;cursor:pointer}
.offline-page{margin:0;min-height:100vh;min-height:100dvh;display:grid;place-items:center;box-sizing:border-box;padding:24px;padding:max(24px,env(safe-area-inset-top)) max(20px,env(safe-area-inset-right)) max(24px,env(safe-area-inset-bottom)) max(20px,env(safe-area-inset-left));background:#0c1724;color:#f5f8ff;font:16px/1.6 system-ui}.offline-card{box-sizing:border-box;width:min(100%,520px);padding:28px;border:1px solid #46647d;border-radius:20px;background:#182c40}.offline-card img{width:72px;height:72px;border-radius:18px}.offline-card h1{font-size:28px;line-height:1.2;color:#ffd078}.offline-card p{color:#d5dfeb}.offline-card button,.offline-card a{display:block;box-sizing:border-box;width:100%;padding:14px 18px;text-align:center;font:700 16px/1.5 system-ui;border:1px solid #ffd078;border-radius:10px;text-decoration:none;cursor:pointer}.offline-card button{background:#ffd078;color:#17202c}.offline-card a{color:#ffd078;margin-top:12px}.offline-card :focus-visible{outline:3px solid #65e7ff;outline-offset:4px}
html.bdq-installed{--app-bottom:calc(66px + env(safe-area-inset-bottom,0px))}
html.bdq-installed body .bdq-common-nav#nav{height:calc(var(--nav-h) + env(safe-area-inset-top,0px))!important;padding-top:env(safe-area-inset-top,0px)}
html.bdq-installed .bdq-header-inner{padding-left:max(16px,env(safe-area-inset-left,0px));padding-right:max(16px,env(safe-area-inset-right,0px))}
html.bdq-installed body .bdq-common-mobile#nav-mobile-panel{top:calc(var(--nav-h) + env(safe-area-inset-top,0px));max-height:calc(100dvh - var(--nav-h) - env(safe-area-inset-top,0px) - var(--app-bottom))}
html.bdq-installed #bdq-extension .shell{padding-top:calc(var(--nav-h) + env(safe-area-inset-top,0px) + 24px)}
html.bdq-installed body#bdq-app .view:not(#view-login){padding-top:calc(var(--nav-h) + env(safe-area-inset-top,0px) + 22px)}
@media(max-width:1119px){
 html.bdq-installed body:not(#bdq-app):not(.offline-page){padding-bottom:var(--app-bottom)}
 html.bdq-installed body#bdq-app .view{padding-bottom:calc(var(--app-bottom) + 24px)}
 html.bdq-installed .bdq-app-nav{position:fixed;bottom:0;left:0;right:0;z-index:80;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));height:var(--app-bottom);box-sizing:border-box;padding:6px max(4px,env(safe-area-inset-right,0px)) calc(6px + env(safe-area-inset-bottom,0px)) max(4px,env(safe-area-inset-left,0px));background:var(--bd-card,#0c1724);color:var(--bd-ink,#f5f8ff);border-top:1px solid var(--bd-line,#46647d);box-shadow:0 -6px 24px #0002}
 html.bdq-installed .bdq-app-nav a{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-height:48px;min-width:0;border-radius:9px;color:var(--bd-muted,#bccbdc);text-decoration:none;font:600 12px/1.3 system-ui;-webkit-tap-highlight-color:transparent}
 html.bdq-installed .bdq-app-nav a[data-active]{color:var(--bd-accent,#ffd078);background:var(--bd-raised,#182c40)}
 .bdq-app-nav svg{width:22px;height:22px}.bdq-app-nav a:focus-visible{outline:3px solid var(--bd-cyan,#65e7ff);outline-offset:-3px}
 html.bdq-installed body .bdq-sound-toggle,html.bdq-installed body#bdq-app #audio-btn{bottom:calc(var(--app-bottom) + 12px)}
 html.bdq-installed body:has(#view-game.active) .bdq-app-nav,html.bdq-installed.bdq-app-keyboard .bdq-app-nav{display:none}
 html.bdq-installed .shell{padding-left:max(16px,env(safe-area-inset-left,0px));padding-right:max(16px,env(safe-area-inset-right,0px))}
}
@media(max-width:600px){.app-hero{align-items:flex-start;gap:16px}.app-hero img{width:72px;height:72px;border-radius:18px}.app-hero h1{font-size:30px}.app-features,.app-instructions{grid-template-columns:1fr}.app-actions>*{width:100%}.app-feature,.app-instruction{padding:20px}.app-diagnostics dl{grid-template-columns:1fr}.app-diagnostics dd{margin-bottom:8px}html.bdq-installed input:not([type=checkbox]):not([type=radio]),html.bdq-installed select,html.bdq-installed textarea{font-size:16px!important}}
@media(max-width:420px){html.bdq-installed .challenges-page .mode-card[data-mode=matching] strong{font-size:18px}}
