.cms-pwa-splash {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #816D62;
    color: #fff;
    transition: opacity 0.35s ease;
}
.cms-pwa-splash.is-hide {
    opacity: 0;
    pointer-events: none;
}
.cms-pwa-splash img {
    width: 140px;
    height: auto;
    max-height: 140px;
    object-fit: contain;
    background: #fff;
    border-radius: 20px;
    padding: 10px;
}
.cms-pwa-splash-name {
    margin-top: 14px;
    font-weight: 800;
    font-size: 15px;
    letter-spacing: 0.04em;
}
.cms-pwa-spin {
    width: 26px;
    height: 26px;
    margin-top: 22px;
    border: 3px solid rgba(255,255,255,0.28);
    border-top-color: #fff;
    border-radius: 50%;
    animation: cmsPwaSpin 0.8s linear infinite;
}
@keyframes cmsPwaSpin { to { transform: rotate(360deg); } }

.cms-pwa-nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 99990;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 40px;
    padding: calc(env(safe-area-inset-top, 0px) + 4px) 8px 4px;
    background: #816D62;
    color: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.12);
}
.cms-pwa-nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.cms-pwa-nav-item {
    display: flex;
    align-items: center;
    gap: 4px;
}
.cms-pwa-nav-btn {
    width: 28px;
    height: 28px;
    border: 0;
    background: rgba(255,255,255,0.16);
    color: #fff;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 11px;
    padding: 0;
    flex-shrink: 0;
}
.cms-pwa-nav-btn:hover {
    background: rgba(255,255,255,0.28);
}
.cms-pwa-kbd {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1;
    padding: 2px 5px;
    border-radius: 4px;
    background: rgba(0,0,0,0.22);
    color: rgba(255,255,255,0.92);
    white-space: nowrap;
}
.cms-pwa-nav-logo {
    height: 24px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
    background: #fff;
    border-radius: 6px;
    padding: 2px 6px;
}
.cms-pwa-nav-spacer {
    width: 148px;
    flex-shrink: 0;
}
.cms-pwa-install {
    position: fixed;
    right: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    z-index: 99980;
    display: none;
    align-items: center;
    gap: 8px;
    border: 0;
    border-radius: 999px;
    padding: 10px 16px;
    background: #816D62;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    cursor: pointer;
}
.cms-pwa-install.is-show { display: inline-flex; }
.cms-pwa-install img {
    height: 20px;
    width: 20px;
    object-fit: contain;
    background: #fff;
    border-radius: 4px;
    padding: 2px;
}

:root {
    --cms-pwa-nav-h: 0px;
}

@media (display-mode: standalone) {
    .cms-pwa-nav { display: flex; }
}
body.avalon-cms-pwa {
    padding-top: var(--cms-pwa-nav-h, 0px);
}
body.avalon-cms-pwa .sidebar {
    top: var(--cms-pwa-nav-h, 0px) !important;
    height: calc(100vh - var(--cms-pwa-nav-h, 0px)) !important;
}
body.avalon-cms-pwa .sidebar-overlay {
    top: var(--cms-pwa-nav-h, 0px);
    height: calc(100vh - var(--cms-pwa-nav-h, 0px));
}
@media (max-width: 640px) {
    .cms-pwa-kbd { display: none; }
    .cms-pwa-nav-spacer { width: 72px; }
}
