/* RC19: fixed application canvas adapted from the supplied QuickAqua v64.
   Body never scrolls. Header and content live inside one fixed outer canvas.
   The tab bar overlays the content and includes, rather than adds a margin
   below, the platform's bottom safe area. No JS viewport-height injection. */
:root {
 --nav-core-height:58px;
 --nav-bottom-gap:max(6px,env(safe-area-inset-bottom,0px));
 --nav-total-height:calc(var(--nav-core-height) + var(--nav-bottom-gap));
 --muted:#dbcee7;--line:#cbb1df45;
}
html,body {height:100%;min-height:0;overflow:hidden;background:#171320;}
body {display:block;position:relative;inset:auto;}
@media(display-mode:standalone),(display-mode:fullscreen){body{height:100%;}}
html.fearcast-standalone body {height:100%;}
.app-shell {
 position:fixed;inset:0;min-width:0;min-height:0;
 display:grid;grid-template-rows:auto minmax(0,1fr);
 overflow:hidden;background:radial-gradient(ellipse at 0 0,#56336155,transparent 60%),#171023;
}
.app-shell>.app-header {
 position:relative;top:auto;z-index:2;margin:0;max-width:none;
 padding-block:calc(7px + env(safe-area-inset-top,0px)) 7px;
 background:#171320;border-bottom:1px solid #ffffff14;
 filter:none!important;-webkit-filter:none!important;
 backdrop-filter:none!important;-webkit-backdrop-filter:none!important;
 transform:none!important;
}
.app-shell>.app-header .brand-word {font-size:20px;}
.app-shell>.app-header .brand-mark {width:32px;height:32px;}
.app-shell>.app-main {
 width:100%;height:auto;min-height:0;max-width:1040px;margin:0 auto;
 overflow-y:auto;overflow-x:hidden;overscroll-behavior-y:contain;overflow-anchor:none;
 padding-bottom:calc(var(--nav-total-height) + 18px);
 scroll-padding-bottom:calc(var(--nav-total-height) + 18px);
}
/* Plain, matched controls. The visible face is 36px; the transparent hit
   extension preserves a 44px target without the oversized visual treatment. */
.app-shell>.app-header .settings-button,.datebar #refresh {
 display:inline-flex;align-items:center;justify-content:center;position:relative;
 flex:none;width:76px;min-width:76px;max-width:76px;height:36px;min-height:36px;
 padding:0 8px;border:1px solid #d2bbeb3d;border-radius:11px;
 background:#ffffff0c;color:#f5eaff;font:600 12px/1.2 -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
 box-shadow:none;white-space:nowrap;letter-spacing:0;
}
.app-shell>.app-header .settings-button::before,.datebar #refresh::before,.datebar #saveNight::before {
 content:"";position:absolute;inset:-4px;pointer-events:auto;
}
.app-shell>.app-header .settings-button:hover,.datebar #refresh:hover {background:#ffffff16;border-color:#e4cef466;}
.app-shell>.app-header .settings-button:active,.datebar #refresh:active {background:#ffffff22;transform:none;}
.datebar {padding-block:7px 4px;grid-template-columns:minmax(0,1fr) 36px 76px;gap:8px;}
.datebar #saveNight {position:relative;width:36px;height:36px;min-height:36px;padding:0;border:1px solid #d2bbeb30;border-radius:11px;background:#ffffff08;box-shadow:none;}
.datebar #saveNight::after {font-size:20px;}
.datebar #refresh.is-syncing::after {display:none;}
.datebar select {font-size:16px;}
.status-strip {color:#d8c8e4;}
.status-strip button {background:transparent;box-shadow:none;}
/* Brighter reading surfaces retain RC18's useful contrast, without its bevels. */
.card,.next-move,.weather-detail {background:linear-gradient(140deg,#372a47,#272037);border-color:#d0b4e43d;box-shadow:inset 0 1px #f0e2ff12,0 6px 18px #05020c22;}
.night-summary {background:linear-gradient(130deg,#402744,#2b213e);border-color:#d2a9e65c;}
.summary-label,.summary-cell small,.summary-weather {color:#e7d5f0;}
.admission-brief,.featured-context {color:#d3c1df;}
.house-meta {background:linear-gradient(145deg,#422956,#2b213f);}
.house-state,.waitnum small {color:#e8d7f4;}
.has-wait .house-state {color:#c1f5df;}
.house-source {color:#dfd0e8;}
.weather-scene {background:radial-gradient(ellipse at 85% 10%,#b1b6e83d,transparent 70%),linear-gradient(150deg,#4a385a,#26253d);}
#sceneDetail {color:#e5d9ef;}
.sheet,.house-sheet {background:linear-gradient(145deg,#34233f,#241b32);}
.settings-group,.preferences-backup,.connections {margin-top:12px;padding-top:0;border-top:1px solid #d4b6e330;}
.settings-group>summary,.preferences-backup>summary,.connections>summary {font-size:15px;color:#f8edff;padding:15px 0;}
.ticket-settings {padding-top:0;border-bottom:0;}
.about-group .method {margin-top:6px;}
/* Content occupies the pixels underneath this translucent bar. Safe-area
   space is part of the glass surface, never a separate blank margin. */
.app-shell>.bottom-tabs {
 position:absolute;inset:auto 0 0;left:0;right:0;top:auto;bottom:0;
 z-index:30;margin:0 auto;transform:none;bottom:var(--nav-bottom-gap);
 width:min(460px,calc(100% - 16px - env(safe-area-inset-left,0px) - env(safe-area-inset-right,0px)));
 max-width:none;height:var(--nav-core-height);min-height:0;
 display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:3px;
 padding:4px;
 border:1px solid #e4d1ff47;
 border-radius:25px;
 background:linear-gradient(135deg,rgba(88,65,112,.32),rgba(31,22,47,.42));
 backdrop-filter:blur(18px) saturate(150%);
 -webkit-backdrop-filter:blur(18px) saturate(150%);
 box-shadow:inset 0 1px #f4e9ff33,0 -3px 18px #08050f29;
}
.bottom-tabs button {height:48px;min-height:48px;padding:2px;gap:3px;font-size:11px;color:#e0d2ec;box-shadow:none;background:transparent;}
.bottom-tabs button[aria-selected=true] {color:#fff;}
.tab-lens {
 border-radius:19px;border-color:#e6d2ff63;
 background:linear-gradient(145deg,#e6caff40,#ae7fe42b);
 backdrop-filter:none;-webkit-backdrop-filter:none;
 box-shadow:inset 0 1px #f5e6ff47,0 2px 8px #08040f33;
}
@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))) {
 .app-shell>.bottom-tabs {background:#2b203cef;}
}
@media(prefers-reduced-transparency:reduce) {
 .app-shell>.bottom-tabs {background:#30243f;backdrop-filter:none;-webkit-backdrop-filter:none;}
 .tab-lens {background:#654b7e;}
}
@media(prefers-contrast:more) {
 :root{--muted:#f1e7f8;}
 .app-shell>.bottom-tabs {background:#271b38ed;border-color:#eadbff99;}
 .app-shell>.app-header .settings-button,.datebar #refresh {border-color:#e4cef480;}
}
@media(max-width:359px){.app-shell>.app-header .brand-word{font-size:18px}.brand{gap:7px}}

/* RC21 mobile shell: explicit layering prevents header row collapse. */
:root {--header-core-height:58px;--header-total-height:calc(var(--header-core-height) + env(safe-area-inset-top,0px));}
.app-shell {display:block;}
.app-shell>.app-header {
 position:absolute;inset:0 0 auto;height:var(--header-total-height);
 display:grid;grid-template-columns:minmax(0,1fr) auto 76px;gap:8px;align-items:center;
 padding-block:calc(7px + env(safe-area-inset-top,0px)) 7px;
 background:rgba(23,19,32,.90);
 backdrop-filter:blur(12px) saturate(125%)!important;-webkit-backdrop-filter:blur(12px) saturate(125%)!important;
}
.app-shell>.app-main {position:absolute;inset:0;padding-top:var(--header-total-height);scroll-padding-top:var(--header-total-height);}
.app-shell>.app-header .brand {min-width:0;gap:7px;white-space:nowrap;}
.app-shell>.app-header .brand-mark {width:28px;height:28px;}
.app-shell>.app-header .brand-word {font-size:19px;}
.header-weather {display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:58px;max-width:86px;height:44px;color:#f5ebff;line-height:1.15;gap:2px;white-space:nowrap;}
.header-weather>span {font-size:8px;color:#d6c5e3;text-transform:uppercase;letter-spacing:.6px;}
.header-weather strong {font-size:12px;font-weight:650;}
.header-weather small {font-size:8px;color:#e0ccec;}
.header-weather.is-cached strong {color:#decfbf;}
.header-weather:hover {text-decoration:none;}
.desktop-gate[hidden]{display:none!important}
.desktop-gate {position:fixed;inset:0;z-index:100000;display:grid;place-items:center;padding:28px;background:radial-gradient(ellipse at 50% 0,#46244f,transparent 65%),#171023;color:#f8edff;text-align:center;}
.desktop-gate>div {max-width:420px;}
.desktop-gate img {border-radius:19px;}
.desktop-gate h1 {font-size:40px;line-height:1.1;margin:20px 0;}
.desktop-gate p {font-size:16px;color:#d9c8e6;line-height:1.6;}
.desktop-gate .fine {font-size:13px;}
html:not(.fearcast-mobile) .app-shell {visibility:hidden;}
/* Phone layouts remain phone layouts in landscape; desktop layouts are removed. */
.featured-grid,.queue-grid {grid-template-columns:minmax(0,1fr);}
.night-hero {height:240px;}
.night-hero h1 {font-size:46px;}
@media(max-width:359px){.app-shell>.app-header .brand-word{font-size:16px}.app-shell>.app-header{gap:6px}.header-weather{min-width:54px}.header-weather strong{font-size:11px}.header-weather small{font-size:7.5px}}
@media(prefers-reduced-transparency:reduce){.app-shell>.app-header{background:#171320;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;}}

.bottom-tabs svg {flex-shrink:0;}
