/* PWA для kidsplace — страница установки и подсказка. Яркие цвета, скругления, иконки Font Awesome. */
:root { --pwa-accent: #ff2e93; --pwa-purple: #7b2ff7; --pwa-grad: linear-gradient(135deg, #7b2ff7, #c026d3 55%, #ff2e93); --pwa-ink: #2b1d4a; --pwa-muted: #6b5f85; --pwa-card: #fff; }
:is(html, body):is([data-theme="dark"], [data-bs-theme="dark"], .dark) { --pwa-ink: #f4f0ff; --pwa-muted: #b4aacb; --pwa-card: #241d36; }

.pwa-page { max-width: 720px; margin: 0 auto; color: var(--pwa-ink); font-family: Nunito, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
.pwa-page svg { flex: none; }

.pwa-hero { position: relative; overflow: hidden; text-align: center; padding: 30px 20px 24px; margin-bottom: 18px; border-radius: 32px; color: #fff; background: var(--pwa-grad); box-shadow: 0 16px 40px rgba(192, 38, 211, .3); }
.pwa-hero__bubble { position: absolute; border-radius: 50%; pointer-events: none; }
.pwa-hero__bubble--1 { width: 150px; height: 150px; right: -40px; top: -50px; background: #ffc400; opacity: .95; }
.pwa-hero__bubble--2 { width: 90px; height: 90px; left: -30px; bottom: -30px; background: #3ddc97; opacity: .9; }
.pwa-app-icon { position: relative; width: 104px; height: 104px; border-radius: 28px; display: block; margin: 0 auto 14px; box-shadow: 0 12px 30px rgba(43, 29, 74, .35); animation: pwa-bob 3.2s ease-in-out infinite; }
.pwa-app-name { position: relative; font-size: 1.7rem; font-weight: 900; margin: 0 0 4px; line-height: 1.15; color: #fff !important; }
.pwa-app-desc { position: relative; font-size: 1rem; font-weight: 700; opacity: .92; max-width: 460px; margin: 0 auto; }
.pwa-hero .pwa-state { position: relative; margin: 18px 0 0; }
.pwa-hero .pwa-note { color: #fff; opacity: .85; }

.pwa-state { display: none; margin-bottom: 16px; }
html:not([data-pwa-state]) .pwa-state[data-show~="manual"],
html[data-pwa-state="prompt"] .pwa-state[data-show~="prompt"],
html[data-pwa-state="installed"] .pwa-state[data-show~="installed"],
html[data-pwa-state="ios"] .pwa-state[data-show~="ios"],
html[data-pwa-state="manual"] .pwa-state[data-show~="manual"] { display: block; }

.pwa-btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 52px; padding: 12px 28px; border: 0; border-radius: 999px; background: #fff; color: var(--pwa-purple); font-family: inherit; font-size: 17px; font-weight: 900; line-height: 1.2; cursor: pointer; box-shadow: 0 10px 24px rgba(43, 29, 74, .28); transition: transform .2s cubic-bezier(.3, 1.6, .5, 1); }
.pwa-btn:hover { transform: translateY(-2px) scale(1.02); }
.pwa-btn:active { transform: scale(.97); }
.pwa-btn-main { width: 100%; max-width: 360px; }
.pwa-note { margin-top: 8px; font-size: 13px; font-weight: 700; color: var(--pwa-muted); }
.pwa-note--top { margin: -4px 0 10px; }
.pwa-done b { display: inline-flex; align-items: center; gap: 8px; font-size: 1.1rem; font-weight: 900; padding: 10px 18px; border-radius: 999px; background: rgba(255, 255, 255, .22); }

.pwa-card { background: var(--pwa-card); border-radius: 26px; padding: 18px; box-shadow: 0 8px 26px rgba(123, 47, 247, .12); }
.pwa-h { display: flex; align-items: center; gap: 9px; font-size: 1.2rem; font-weight: 900; margin: 22px 0 12px; color: var(--pwa-ink); }
.pwa-card .pwa-h { margin-top: 0; }
.pwa-h svg { color: var(--pwa-accent); }

.pwa-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.pwa-steps li { display: flex; align-items: center; gap: 12px; font-weight: 700; }
.pwa-steps li > i { flex: none; width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-style: normal; font-weight: 900; color: #fff; background: var(--pwa-grad); }
.pwa-ico { display: inline-flex; vertical-align: -3px; margin-left: 4px; color: #1f8bff; }

.pwa-ways { display: grid; gap: 10px; }
.pwa-way { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 18px; background: color-mix(in srgb, var(--c) 10%, transparent); font-size: 14px; }
.pwa-way__ic { flex: none; width: 40px; height: 40px; border-radius: 14px; display: flex; align-items: center; justify-content: center; color: #fff; background: var(--c); }
.pwa-way b { display: block; margin-bottom: 2px; font-weight: 900; }

.pwa-why { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.pwa-why__item { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 22px; background: var(--pwa-card); box-shadow: 0 6px 18px rgba(123, 47, 247, .1); font-weight: 700; font-size: 14px; border-top: 5px solid var(--c); }
.pwa-why__ic { width: 46px; height: 46px; border-radius: 16px; display: flex; align-items: center; justify-content: center; color: #fff; background: var(--c); box-shadow: 0 6px 14px color-mix(in srgb, var(--c) 40%, transparent); }

.pwa-sc { display: flex; flex-wrap: wrap; gap: 8px; }
.pwa-sc__item { display: inline-flex; align-items: center; gap: 7px; padding: 9px 16px; border-radius: 999px; background: var(--pwa-card); color: var(--pwa-purple) !important; font-weight: 900; text-decoration: none !important; box-shadow: 0 4px 12px rgba(123, 47, 247, .14); }

html.pwa-standalone [data-pwa-install]:not(.pwa-btn) { display: none !important; }

/* Подсказка внизу экрана — над нижней панелью kidsplace */
.pwa-hint { position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); z-index: 2147482990; display: flex; align-items: center; gap: 10px; max-width: 480px; margin: 0 auto; padding: 10px 10px 10px 12px; border-radius: 24px; background: #fff; color: #2b1d4a; box-shadow: 0 14px 40px rgba(123, 47, 247, .28); font: 700 13px/1.35 Nunito, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; animation: pwa-in .35s cubic-bezier(.3, 1.4, .5, 1); }
body:has(.kp-bar) .pwa-hint { bottom: calc(92px + env(safe-area-inset-bottom, 0px)); }
.pwa-hint-icon { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 13px; }
.pwa-hint-text { flex: 1; min-width: 0; }
.pwa-hint-text b { display: block; font-size: 15px; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pwa-hint-text span { color: #6b5f85; }
.pwa-hint-btn { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 999px; background: var(--pwa-grad); color: #fff; padding: 10px 14px; font-family: inherit; font-size: 13px; font-weight: 900; line-height: 1; cursor: pointer; }
.pwa-hint-close { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: #f3eeff; color: #7b2ff7; width: 32px; height: 32px; padding: 0; cursor: pointer; }
:is(html, body):is([data-theme="dark"], [data-bs-theme="dark"], .dark) .pwa-hint { background: #241d36; color: #f4f0ff; }
:is(html, body):is([data-theme="dark"], [data-bs-theme="dark"], .dark) .pwa-hint-text span { color: #b4aacb; }
:is(html, body):is([data-theme="dark"], [data-bs-theme="dark"], .dark) .pwa-hint-close { background: #30264a; color: #cdb8ff; }
@keyframes pwa-in { from { opacity: 0; transform: translateY(16px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes pwa-bob { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-6px) rotate(3deg); } }
@media (prefers-reduced-motion: reduce) { .pwa-app-icon, .pwa-hint { animation: none; } }
