/* PWA overrides: app-like shell without backend changes */

#installBanner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: none;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: white;
    z-index: 9999;
}

#installBanner button {
    border: 1px solid rgba(120, 20, 20, 0.3);
    background: rgba(10, 8, 9, 0.72);
    color: #efe9e9;
    border-radius: 8px;
    padding: 6px 12px;
    cursor: pointer;
}

#craveIosHintSheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: none;
    background: rgba(10, 8, 9, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(120, 20, 20, 0.28);
    padding: 14px 16px calc(14px + env(safe-area-inset-bottom, 0px));
}

#craveIosHintSheet .title {
    margin: 0 0 8px;
    color: #d7d1d1;
    font-size: 0.9rem;
}

#craveIosHintSheet .row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: #c3bcbc;
    font-size: 0.85rem;
    line-height: 1.35;
}

#craveIosHintSheet .close {
    margin-top: 10px;
    width: 100%;
    border: 1px solid rgba(120, 20, 20, 0.3);
    background: rgba(10, 8, 9, 0.72);
    color: #efe9e9;
    border-radius: 8px;
    padding: 8px 12px;
}

.site-header.site-header-pill {
    position: fixed;
    top: 16px;
    left: 16px;
    right: 16px;
    z-index: 1200;
    padding: 0;
}

.site-header.site-header-pill .header-pill {
    position: relative;
    height: 64px;
    display: grid;
    grid-template-columns: 44px 1fr auto;
    align-items: center;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(10, 8, 9, 0.78);
    border: 1px solid rgba(120, 20, 20, 0.22);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.site-header.site-header-pill .logo {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    pointer-events: none;
    font-size: 1.2rem;
    line-height: 1;
}

.header-pill-menu .menu-btn {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.header-pill-right {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    justify-self: end;
}

.header-pill-lang {
    margin-right: 0;
}

#langToggle {
    width: 72px;
    height: 34px;
    min-width: 72px;
}

.header-pwa-crystals {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 34px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(14, 12, 12, 0.82);
    border: 1px solid rgba(120, 20, 20, 0.22);
    white-space: nowrap;
}

body.crave-pwa-mode .home-main {
    min-height: 100vh;
    max-width: 760px;
    margin: 0 auto;
    padding: 108px 14px 130px;
}

body.crave-pwa-mode .intro-section,
body.crave-pwa-mode .reviews-section,
body.crave-pwa-mode .review-form-section,
body.crave-pwa-mode .hero-ad-space,
body.crave-pwa-mode .crave-ad-slot-mid,
body.crave-pwa-mode .hero-cta-after,
body.crave-pwa-mode .site-footer,
body.crave-pwa-mode .home-portal-line,
body.crave-pwa-mode .home-mobile-only-bar {
    display: none !important;
}

body.crave-pwa-mode .hero-choice-title {
    margin-top: 18px;
    margin-bottom: 18px;
}

body.crave-pwa-mode .characters-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    max-width: 760px;
    margin: 0 auto;
}

body.crave-pwa-mode .char-card {
    border-radius: 18px;
    height: 300px;
    overflow: hidden;
}

body.crave-pwa-mode .char-glass-panel {
    background: linear-gradient(to top, rgba(8, 6, 9, 0.94) 0%, rgba(8, 6, 9, 0.56) 55%, rgba(8, 6, 9, 0) 100%);
}

body.crave-pwa-mode .home-pwa-dock {
    position: fixed;
    left: 14px;
    right: 14px;
    bottom: 12px;
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    padding: 8px;
    border-radius: 18px;
    background: rgba(10, 8, 9, 0.82);
    border: 1px solid rgba(120, 20, 20, 0.24);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    z-index: 1400;
}

body.crave-pwa-mode .home-pwa-item {
    min-height: 44px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #dfd8d8;
    background: rgba(20, 16, 17, 0.55);
    border: 1px solid rgba(120, 20, 20, 0.2);
    font-size: 0.92rem;
}

body.crave-pwa-mode .home-pwa-item-active {
    background: rgba(120, 20, 20, 0.24);
    border-color: rgba(150, 30, 30, 0.35);
}

body.chat-page .chat-background-layer::after,
body.chat-page .character-background::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.2);
    pointer-events: none;
}

body.chat-page .chat-background-layer,
body.chat-page .character-background,
body.chat-page .parallax-layer {
    filter: blur(5px);
    -webkit-filter: blur(5px);
}

body.chat-page .story-box,
body.chat-page .chat-choice-panel {
    background: rgba(8, 6, 9, 0.55);
    border: 1px solid rgba(120, 20, 20, 0.26);
}

body.chat-page .choice-plaque {
    background: rgba(10, 8, 9, 0.72);
    border: 1px solid rgba(120, 20, 20, 0.22);
}

body.chat-page .choice-plaque.is-selected,
body.chat-page .choice-plaque.active {
    transform: scale(1.045);
    box-shadow: 0 0 18px rgba(140, 16, 16, 0.28);
}
