/* Village palette shared by the compact entry and tower scenery controls. */
#splash-screen.splash-screen {
    align-items: flex-end;
    padding: 24px 16px max(24px, env(safe-area-inset-bottom));
}
#splash-screen::after {
    background: linear-gradient(180deg, transparent 45%, #243d3540);
}
#splash-screen .splash-content {
    width: 360px;
    max-width: 100%;
    padding: 22px 28px;
    border: 1px solid #e3d3ac;
    border-radius: 24px;
    background: #fff9edee;
    color: #2d483a;
    box-shadow: 0 12px 40px #18312633;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
#splash-screen .splash-brand-mark {
    display: block;
    margin: 0 auto 8px;
    object-fit: contain;
    border-radius: 12px;
}
#splash-screen .splash-title {
    margin: 0;
    font-size: clamp(24px, 5vw, 30px);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -.6px;
    color: #294438;
    text-shadow: none;
}
#splash-screen .splash-title span { color: #9b742e; }
#splash-screen .splash-subtitle {
    margin: 5px 0 18px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .3px;
    color: #637363;
    background: none;
    -webkit-text-fill-color: currentColor;
    text-shadow: none;
}
#splash-screen .splash-progress {
    width: 100%;
    height: 4px;
    margin: 0 0 8px;
    background: #e7e0cd;
    box-shadow: none;
}
#splash-screen .splash-progress-fill {
    background: linear-gradient(90deg, #c49b50, #55785a);
    box-shadow: none;
}
#splash-screen .splash-status {
    color: #596c59;
    font-size: 12px;
    text-shadow: none;
    opacity: 1;
}
#splash-screen .splash-enter-prompt {
    width: 100%;
    min-height: 46px;
    margin: 0;
    padding: 10px 18px;
    border: 1px solid #456950;
    border-radius: 12px;
    background: #3e644d;
    color: #fff8e8;
    font: 700 15px 'Be Vietnam Pro', sans-serif;
    letter-spacing: 0;
    text-shadow: none;
    animation: none;
    box-shadow: 0 3px 8px #29443818;
    backdrop-filter: none;
}
#splash-screen .splash-enter-prompt span { margin-left: 12px; }
#splash-screen .splash-enter-prompt:hover { background: #31543e; transform: translateY(-1px); }
#splash-screen .splash-enter-prompt:focus-visible { outline: 3px solid #bd933e; outline-offset: 4px; }
#splash-screen.splash-ready :is(.splash-progress, .splash-status) { display: none; }

body.in-tower .tower-header-bar {
    background: #fff8ecef;
    border-color: #d9c8a1;
    box-shadow: 0 3px 12px #29443818;
}
body.in-tower :is(.tower-title-text, .tower-back-btn, .tower-secret-trigger, .tower-stars-pill) {
    color: #365440;
    text-shadow: none;
}
body.in-tower :is(.tower-back-btn, .tower-secret-trigger, .tower-stars-pill) {
    border-color: #d9c8a1;
    background: #f2ebdb;
    box-shadow: none;
}
body.in-tower .tower-stars-val { color: #8d682a; }
body.in-tower .tower-title-text { background: none; -webkit-text-fill-color: currentColor; filter: none; }
#tower-page .tower-stage-viewport {
    border-color: #d9c8a1;
    background: #e8e1cf;
    box-shadow: 0 8px 28px #29443822;
}
#tower-page .tower-stage-bg-layer { animation: none; }
#tower-page .tower-stage-vignette {
    background: linear-gradient(180deg, #273e3318, transparent 22%, transparent 72%, #273e3338);
}
#tower-page .tower-stage-cloud-shimmer { display: none; }
#tower-page .stage-top-rocket-pill {
    max-width: calc(100% - 32px);
    white-space: normal;
    background: #fff8ecef;
    border-color: #d9c8a1;
    box-shadow: 0 4px 16px #29443822;
    border-radius: 16px;
}
#tower-page :is(.stage-top-floor-name, .stage-floor-badge-text) {
    color: #365440;
    text-shadow: none;
}
#tower-page .stage-floor-badge-text { color: #98712e; }
#tower-page .stage-rocket-icon { filter: none; }
#tower-page .stage-enter-floor-btn {
    background: #3e644df2;
    border: 1px solid #c9b984;
    color: #fff8e8;
    border-radius: 14px;
    text-shadow: none;
    box-shadow: 0 4px 16px #29443833;
    animation: none;
}
#tower-page .stage-enter-floor-btn--locked { background: #f4eddff2; color: #61705d; border-color: #cabc9d; }
#tower-page .stage-enter-floor-btn:hover {
    background: #31543e;
    color: #fff8e8;
    border-color: #d9c8a1;
    box-shadow: 0 4px 16px #29443833;
}
/* The legacy lock styles use !important; keep their controls in the village palette. */
#tower-page .stage-enter-floor-btn--locked,
#tower-page .stage-enter-floor-btn--locked:hover {
    background: #f4eddff2 !important;
    color: #61705d !important;
    border: 1px solid #cabc9d !important;
    box-shadow: 0 4px 16px #29443822 !important;
}
#tower-page .stage-top-rocket-pill--locked,
#tower-page .stage-top-rocket-pill--locked:hover {
    border-color: #cabc9d !important;
    box-shadow: 0 4px 16px #29443822 !important;
}
#tower-page .stage-top-rocket-pill--locked .stage-floor-badge-text {
    color: #61705d !important;
    text-shadow: none !important;
}
#tower-page .stage-elevator-dock {
    background: #fff8ecef;
    border-color: #d9c8a1;
    box-shadow: 0 4px 18px #29443822;
}
#tower-page .elevator-dock-btn { background: #f2ebdb; border-color: #d9c8a1; color: #365440; box-shadow: none; }
#tower-page :is(.elevator-dock-arrow, .elevator-dock-tag, .altitude-label, .altitude-num) { color: #365440; text-shadow: none; }
#tower-page .stage-compact-status-chip {
    top: auto;
    bottom: 86px;
    transform: translateX(-50%);
    max-width: calc(100% - 32px);
    white-space: normal;
    text-align: center;
    animation: none;
    box-shadow: 0 3px 12px #29443822;
    text-shadow: none;
    border-color: #d9c8a1;
}
#tower-page .stage-chip--climbing { background: #3e644de8; color: #fff8e8; }
#tower-page .stage-chip--locked { background: #f4eddfe8; color: #61705d; }
#tower-page .stage-chip--completed { background: #3e644de8; color: #fff8e8; }
#tower-page .stage-chip--promotable { background: #f4deb0f2; color: #6c511c; }
#tower-page .stage-top-text-stack { min-width: 0; }
#tower-page .stage-top-floor-name { max-width: 100%; white-space: normal; }
#tower-page .elevator-dock-btn:hover:not(:disabled) { background: #d9e4d4; color: #294438; box-shadow: 0 3px 12px #29443822; }
#tower-page .elevator-dock-btn--secret,
#tower-page .elevator-dock-btn--secret:hover {
    background: #ece5f2 !important;
    border-color: #c9bad8 !important;
    box-shadow: none !important;
    animation: none;
}
#tower-page .elevator-dock-btn--secret span { color: #795c90 !important; }

@media (max-width: 600px) {
    /* Include the bookshelves when the library's wide illustration is cropped to portrait. */
    #tower-page .stage-tier-card[data-floor-order="8"] .tower-stage-bg-layer { object-position: 8% center; }
    #tower-page .stage-tier-card[data-floor-order="11"] .tower-stage-bg-layer { object-position: 30% center; }
}
@media (max-height: 500px) and (min-width: 600px) {
    #splash-screen.splash-screen { padding: 12px; }
    #splash-screen .splash-content { padding: 14px 24px; }
    #splash-screen .splash-brand-mark { width: 32px; height: 32px; margin-bottom: 4px; }
    #splash-screen .splash-subtitle { margin-bottom: 12px; }
}
@media (prefers-reduced-motion: reduce) {
    #splash-screen, #splash-screen .splash-progress-fill, #splash-screen .splash-enter-prompt { transition: none; }
}
