﻿:root {
    --app-bg: #f6f8fb;
    --surface: #ffffff;
    --surface-2: #f5f8ff;
    --ink: #1f2430;
    --muted: #6d7280;
    --line: rgba(31, 36, 48, 0.1);
    --brand: #ff6b4a;
    --brand-2: #6a72ff;
    --ok: #18a77a;
    --shadow: 0 18px 45px rgba(40, 36, 30, 0.12);
    --bottom-safe: 0px;
}

* {
    box-sizing: border-box;
}

html {
    width: 100%;
    height: 100%;
    overflow: hidden;
    overscroll-behavior: none;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body.pwa-shell {
    margin: 0;
    position: fixed;
    inset: 0;
    width: 100%;
    min-height: 100dvh;
    height: 100dvh;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.92), rgba(246,248,251,0.96)),
        radial-gradient(circle at 12% 0%, rgba(255, 107, 74, 0.18), transparent 28%),
        radial-gradient(circle at 90% 8%, rgba(106, 114, 255, 0.16), transparent 26%);
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    overflow: hidden;
    overscroll-behavior: none;
    touch-action: pan-y;
}

body.pwa-shell .floating-shop-buttons,
body.pwa-shell .floating-btn {
    display: none !important;
}

button,
input,
select {
    font: inherit;
}

a {
    color: inherit;
    text-decoration: none;
}

.app-frame {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
    height: 100dvh;
    max-width: 680px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    max-width: 100%;
}

.app-topbar {
    position: relative;
    flex: 0 0 auto;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 10px;
    background: rgba(246, 248, 251, 0.88);
    border-bottom: 1px solid rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(18px);
}

.pwa-topbar-modern {
    gap: 8px;
}

.pwa-menu-button,
.pwa-drawer-close {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 999px;
    color: var(--ink);
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 8px 22px rgba(31, 36, 48, 0.08);
}

.pwa-menu-button {
    font-size: 1.35rem;
}

.pwa-topbar-modern .brand-chip {
    flex: 1 1 auto;
    justify-content: center;
    margin-right: 0;
    min-width: 0;
}

.pwa-topbar-modern .brand-chip img {
    width: 30px;
    height: 30px;
    border-radius: 10px;
}

.pwa-topbar-modern .wallet-chip,
.pwa-topbar-modern .login-chip {
    flex: 0 0 auto;
}

.pwa-drawer-overlay {
    position: fixed;
    inset: 0;
    z-index: 90;
    background: rgba(15, 23, 42, 0.34);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
    backdrop-filter: blur(4px);
}

.pwa-drawer {
    position: fixed;
    z-index: 91;
    left: 0;
    top: 0;
    bottom: 0;
    width: min(330px, 88vw);
    padding: calc(16px + env(safe-area-inset-top, 0px)) 14px calc(18px + env(safe-area-inset-bottom, 0px));
    border-radius: 0 30px 30px 0;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.98), rgba(246,248,251,0.98)),
        radial-gradient(circle at 18% 4%, rgba(32,188,165,0.16), transparent 30%),
        radial-gradient(circle at 90% 92%, rgba(255,116,72,0.16), transparent 32%);
    box-shadow: 24px 0 60px rgba(15, 23, 42, 0.22);
    transform: translateX(-105%);
    transition: transform 0.25s ease;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 16px;
}

.pwa-menu-open .pwa-drawer-overlay {
    opacity: 1;
    pointer-events: auto;
}

.pwa-menu-open .pwa-drawer {
    transform: translateX(0);
}

.pwa-drawer-head {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) 40px;
    align-items: center;
    gap: 10px;
}

.pwa-drawer-head img {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    box-shadow: 0 12px 24px rgba(31,36,48,0.12);
}

.pwa-drawer-head strong,
.pwa-drawer-head span {
    display: block;
    min-width: 0;
}

.pwa-drawer-head strong {
    color: var(--ink);
    font-weight: 950;
    line-height: 1.05;
}

.pwa-drawer-head span {
    margin-top: 2px;
    color: var(--muted);
    font-weight: 850;
    font-size: 0.8rem;
}

.pwa-drawer-nav {
    display: grid;
    align-content: start;
    gap: 8px;
    overflow-y: auto;
    padding-right: 2px;
}

.pwa-drawer-nav a {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    min-height: 54px;
    border-radius: 18px;
    padding: 6px 10px 6px 6px;
    color: var(--ink);
    background: rgba(255,255,255,0.74);
    border: 1px solid rgba(31,36,48,0.06);
    font-weight: 900;
}

.pwa-drawer-nav a i {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 15px;
    color: #fff;
    background: linear-gradient(135deg, #20bca5, #6672ff);
}

.pwa-drawer-nav a.active {
    color: #f05c3f;
    background: #fff4ee;
    border-color: rgba(240,92,63,0.16);
}

.brand-chip,
.wallet-chip,
.login-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 8px 22px rgba(31, 36, 48, 0.08);
    padding: 6px 12px;
    font-weight: 750;
}

.app-back-button {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.92);
    box-shadow: 0 8px 22px rgba(31, 36, 48, 0.08);
    color: var(--ink);
    font-size: 1.22rem;
}

.app-topbar .brand-chip {
    min-width: 0;
    margin-right: auto;
}

.app-back-button + .brand-chip span {
    max-width: 112px;
}

@media (min-width: 390px) {
    .app-back-button + .brand-chip span {
        max-width: 150px;
    }
}

.brand-chip img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.brand-chip span {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wallet-chip,
.login-chip {
    color: #fff;
    background: linear-gradient(135deg, #242a3a, #5a6276);
}

.app-main {
    flex: 1 1 auto;
    min-height: 0;
    padding: 14px 16px 58px;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.app-shop-shell {
    max-width: 100%;
}

.app-hero,
.print-hero {
    padding: 26px 18px;
    border-radius: 28px;
    color: #fff;
    background:
        linear-gradient(135deg, rgba(31,36,48,0.7), rgba(31,36,48,0.2)),
        linear-gradient(135deg, #ff7b54 0%, #ffb15c 42%, #6977ff 100%);
    box-shadow: var(--shadow);
    min-height: 250px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.eyebrow {
    margin: 0 0 8px;
    color: inherit;
    opacity: 0.72;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.app-hero h1 {
    margin: 0;
    font-size: clamp(2rem, 13vw, 3.8rem);
    line-height: 0.95;
    letter-spacing: 0;
}

.app-hero p:not(.eyebrow) {
    margin: 14px 0 0;
    max-width: 360px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 1rem;
    line-height: 1.45;
}

.home-main {
    padding: 12px 14px 78px;
}

.home-shell {
    background:
        linear-gradient(180deg, rgba(248,250,255,0.96), rgba(241,245,249,0.98)),
        radial-gradient(circle at 10% 0%, rgba(255,107,74,0.18), transparent 28%),
        radial-gradient(circle at 90% 4%, rgba(29,185,168,0.14), transparent 26%),
        radial-gradient(circle at 50% 100%, rgba(106,114,255,0.14), transparent 32%);
}

.home-dashboard {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: end;
    gap: 14px;
    padding: 18px 18px 16px;
    border-radius: 28px;
    color: #fff;
    background:
        linear-gradient(135deg, rgba(18,24,38,0.74), rgba(18,24,38,0.34)),
        linear-gradient(135deg, #1fb9a8 0%, #4777f3 54%, #ff8a55 100%);
    box-shadow: 0 16px 34px rgba(31,36,48,0.14);
}

.home-dashboard h1 {
    margin: 0;
    font-size: 1.85rem;
    line-height: 1.02;
}

.home-dashboard p:not(.eyebrow) {
    max-width: 300px;
    margin: 8px 0 0;
    color: rgba(255,255,255,0.84);
    font-size: 0.9rem;
    line-height: 1.35;
}

.install-mini {
    display: grid;
    place-items: center;
    min-width: 58px;
    min-height: 58px;
    padding: 8px;
    border: 1px solid rgba(255,255,255,0.38);
    border-radius: 20px;
    color: #fff;
    background: rgba(255,255,255,0.16);
    font-weight: 850;
}

.install-mini span {
    display: none;
}

.install-mini i {
    font-size: 1.25rem;
}

.home-service-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 0;
}

.home-service-card {
    position: relative;
    aspect-ratio: 1 / 1;
    min-height: 0;
    padding: 16px;
    border-radius: 26px;
    overflow: hidden;
    background: rgba(255,255,255,0.88);
    box-shadow: 0 12px 30px rgba(31,36,48,0.08);
}

.home-service-card::after {
    content: "";
    position: absolute;
    right: -28px;
    bottom: -34px;
    width: 96px;
    height: 96px;
    border-radius: 32px;
    background: rgba(255,255,255,0.18);
    transform: rotate(14deg);
}

.home-service-card i {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 19px;
    color: #fff;
    font-size: 1.45rem;
}

.home-service-card strong,
.home-service-card span {
    position: relative;
    z-index: 1;
    display: block;
}

.home-service-card strong {
    margin-top: 16px;
    color: var(--ink);
    font-size: 1.12rem;
    line-height: 1.08;
}

.home-service-card.primary strong {
    margin-top: 0;
    color: #fff;
    font-size: 1.45rem;
}

.home-service-card span {
    margin-top: 6px;
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.28;
}

.home-service-card.primary span {
    color: rgba(255,255,255,0.78);
    font-size: 0.88rem;
}

.home-service-card.print i { background: linear-gradient(135deg, #ff6b4a, #f7b955); }
.home-service-card.music i { background: linear-gradient(135deg, #111827, #6672ff); }
.home-service-card.ai i { background: linear-gradient(135deg, #20bca5, #2f90ff); }
.home-service-card.ai-chat i { background: linear-gradient(135deg, #2563eb, #8b5cf6); }
.home-service-card.shop i { background: linear-gradient(135deg, #8b5cf6, #ec4899); }
.home-service-card.wallet i { background: linear-gradient(135deg, #242a3a, #5a6276); }
.home-service-card.profile i { background: linear-gradient(135deg, #4b5563, #9ca3af); }

.app-auth-shell {
    background:
        linear-gradient(180deg, rgba(248,250,255,0.96), rgba(241,245,249,0.98)),
        radial-gradient(circle at 14% 0%, rgba(32,188,165,0.15), transparent 30%),
        radial-gradient(circle at 92% 6%, rgba(102,114,255,0.15), transparent 28%);
}

.app-auth-main {
    display: grid;
    align-items: start;
    padding: 16px 14px 92px;
}

.app-auth-card {
    width: 100%;
    padding: 22px;
    border-radius: 28px;
    background: rgba(255,255,255,0.92);
    border: 1px solid rgba(31,36,48,0.08);
    box-shadow: 0 18px 42px rgba(31,36,48,0.1);
}

.app-auth-card h1 {
    margin: 0 0 18px;
    color: var(--ink);
    font-size: 1.85rem;
    line-height: 1.02;
}

.app-auth-form {
    display: grid;
    gap: 12px;
}

.app-auth-form label {
    display: grid;
    gap: 7px;
    color: #475467;
    font-size: 0.82rem;
    font-weight: 850;
}

.app-auth-form input[type="text"],
.app-auth-form input[type="email"],
.app-auth-form input[type="tel"],
.app-auth-form input[type="password"] {
    width: 100%;
    min-height: 52px;
    border: 1px solid rgba(31,36,48,0.1);
    border-radius: 18px;
    outline: 0;
    padding: 0 14px;
    color: var(--ink);
    background: #f7f8fc;
    font-size: 1rem;
    font-weight: 700;
}

.app-auth-form input:focus {
    border-color: rgba(102,114,255,0.55);
    box-shadow: 0 0 0 4px rgba(102,114,255,0.12);
    background: #fff;
}

.app-auth-form button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 56px;
    margin-top: 4px;
    border: 0;
    border-radius: 20px;
    color: #fff;
    background: linear-gradient(135deg, #20bca5, #6672ff);
    box-shadow: 0 14px 28px rgba(80,100,230,0.24);
    font-size: 1rem;
    font-weight: 900;
}

.app-auth-check {
    grid-template-columns: 22px minmax(0, 1fr);
    align-items: center;
    color: var(--ink);
}

.app-auth-check input {
    width: 20px;
    height: 20px;
    accent-color: #20bca5;
}

.app-auth-alert {
    margin: 0 0 14px;
    padding: 12px 14px;
    border-radius: 18px;
    font-weight: 800;
    line-height: 1.35;
}

.app-auth-alert.error {
    color: #9f1239;
    background: #ffe4e6;
}

.app-auth-alert.ok {
    color: #067647;
    background: #dcfce7;
}

.app-auth-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 16px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid rgba(31,36,48,0.08);
}

.app-auth-links a {
    color: #4f46e5;
    font-weight: 850;
}

.wallet-shell {
    background:
        linear-gradient(180deg, rgba(248,250,255,0.96), rgba(241,245,249,0.98)),
        radial-gradient(circle at 10% 0%, rgba(36,42,58,0.16), transparent 28%),
        radial-gradient(circle at 92% 4%, rgba(255,107,74,0.16), transparent 26%);
}

.wallet-main {
    padding: 12px 14px 78px;
}

.wallet-balance-card {
    padding: 20px;
    border-radius: 28px;
    color: #fff;
    background:
        linear-gradient(135deg, rgba(18,24,38,0.82), rgba(18,24,38,0.28)),
        linear-gradient(135deg, #242a3a, #6672ff 58%, #ff8a55);
    box-shadow: var(--shadow);
}

.wallet-balance-card span,
.wallet-balance-card p {
    margin: 0;
    color: rgba(255,255,255,0.72);
    font-weight: 800;
}

.wallet-balance-card strong {
    display: block;
    margin-top: 8px;
    font-size: 2.55rem;
    line-height: 1;
}

.wallet-balance-card p {
    margin-top: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wallet-panel,
.wallet-history {
    margin-top: 14px;
    padding: 16px;
    border-radius: 26px;
    background: rgba(255,255,255,0.9);
    box-shadow: 0 12px 30px rgba(31,36,48,0.08);
}

.wallet-panel-title {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.wallet-panel-title h1,
.wallet-panel-title h2 {
    margin: 0;
    color: var(--ink);
    font-size: 1.45rem;
    line-height: 1;
}

.wallet-panel-title > i {
    display: grid;
    place-items: center;
    min-width: 42px;
    height: 42px;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, #ff6b4a, #6672ff);
}

.wallet-form {
    display: grid;
    gap: 12px;
}

.amount-grid,
.method-grid {
    display: grid;
    gap: 8px;
}

.amount-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.amount-option,
.method-option span {
    display: grid;
    place-items: center;
    min-height: 52px;
    border: 1px solid rgba(31,36,48,0.1);
    border-radius: 16px;
    color: var(--ink);
    background: #f8f9ff;
    font-weight: 900;
}

.amount-option.active {
    border-color: #6672ff;
    background: #eef1ff;
    box-shadow: inset 0 0 0 1px rgba(102,114,255,0.26);
}

.wallet-input-label {
    display: grid;
    gap: 7px;
    color: var(--ink);
    font-weight: 850;
}

.wallet-input-label input {
    min-height: 52px;
    border: 1px solid rgba(31,36,48,0.1);
    border-radius: 16px;
    padding: 0 14px;
    background: #f8f9ff;
    color: var(--ink);
    outline: none;
    font-weight: 850;
}

.method-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.method-option span {
    grid-template-columns: 38px 1fr;
    grid-template-rows: auto auto;
    align-items: center;
    justify-items: start;
    gap: 10px;
    min-height: 64px;
    padding: 8px 12px;
    place-items: initial;
    text-align: left;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.method-option b,
.method-option small {
    display: block;
    grid-column: 2;
    min-width: 0;
}

.method-option b {
    align-self: end;
    white-space: nowrap;
}

.method-option small {
    align-self: start;
    margin-top: 2px;
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 760;
}

.method-option span i {
    grid-row: 1 / 3;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, #242a3a, #6672ff);
}

.method-option input:checked + span {
    border-color: #ff6b4a;
    background: linear-gradient(135deg, #fff1eb, #ffffff);
    color: #ff5b35;
    box-shadow: inset 0 0 0 1px rgba(255,107,74,0.24), 0 10px 20px rgba(255,107,74,0.12);
    transform: translateY(-1px);
}

.method-option input:checked + span small {
    color: #b84625;
}

.method-option input:checked + span i {
    background: linear-gradient(135deg, #ff6b4a, #ffae55);
}

.method-details {
    display: grid;
    gap: 8px;
}

.method-detail {
    display: none;
    padding: 13px;
    border: 1px solid rgba(31,36,48,0.1);
    border-radius: 18px;
    background: #f8f9ff;
}

.method-detail.active {
    display: grid;
    gap: 12px;
}

.method-detail-head {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 10px;
    align-items: center;
}

.method-detail-head > i {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 15px;
    color: #fff;
    background: linear-gradient(135deg, #242a3a, #6672ff);
}

.method-detail-head strong,
.method-detail-head span {
    display: block;
}

.method-detail-head span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 750;
    line-height: 1.32;
}

.payment-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.payment-badges span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 28px;
    padding: 0 8px;
    border-radius: 999px;
    color: #242a3a;
    background: #fff;
    font-size: 0.74rem;
    font-weight: 850;
}

.commission-box {
    display: grid;
    gap: 7px;
    padding: 10px;
    border-radius: 14px;
    background: #fff;
}

.commission-box div,
.requisite-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.commission-box span,
.requisite-row > span {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
}

.commission-box strong {
    color: var(--ink);
}

.requisite-row {
    display: grid;
    grid-template-columns: minmax(92px, 1fr) auto;
    padding: 10px;
    border-radius: 14px;
    background: #fff;
}

.requisite-row button {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    min-height: 36px;
    border: 0;
    border-radius: 12px;
    color: var(--ink);
    background: #eef1ff;
    padding: 0 10px;
    font-weight: 900;
    white-space: nowrap;
}

.requisite-row button b {
    white-space: nowrap;
    font-size: 0.92rem;
    letter-spacing: 0;
}

.method-note,
.method-instruction {
    margin: 0;
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.36;
}

.method-instruction {
    padding: 10px;
    border-radius: 14px;
    color: #075f49;
    background: #ddfff5;
}

.wallet-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 54px;
    border: 0;
    border-radius: 16px;
    color: #fff;
    background: linear-gradient(135deg, #242a3a, #ff6b4a 52%, #ffae55);
    box-shadow: 0 14px 28px rgba(255,107,74,0.22);
    font-weight: 900;
}

.wallet-history-list {
    display: grid;
    gap: 8px;
}

.wallet-history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    border-radius: 16px;
    background: #f8f9ff;
}

.wallet-history-item strong,
.wallet-history-item span {
    display: block;
}

.wallet-history-item span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 750;
}

.wallet-history-item em {
    color: #20a68f;
    font-style: normal;
    font-weight: 900;
}

.wallet-history-actions {
    display: grid;
    justify-items: end;
    gap: 6px;
}

.wallet-history-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 32px;
    padding: 0 10px;
    border-radius: 999px;
    color: #fff;
    background: #242a3a;
    font-size: 0.76rem;
    font-weight: 900;
}

.wallet-empty {
    display: grid;
    place-items: center;
    gap: 8px;
    min-height: 112px;
    border: 1px dashed rgba(31,36,48,0.18);
    border-radius: 18px;
    color: var(--muted);
    background: #f8f9ff;
    font-weight: 850;
    text-align: center;
}

.wallet-empty i {
    color: #6672ff;
    font-size: 1.35rem;
}

.wallet-app-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-radius: 16px;
    font-weight: 850;
}

.wallet-app-alert.error {
    color: #991b1b;
    background: #fee2e2;
}

.wallet-code-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
}

.wallet-code-modal.open {
    display: block;
}

.wallet-code-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(17,24,39,0.68);
}

.wallet-code-panel {
    position: absolute;
    left: 50%;
    bottom: calc(74px + env(safe-area-inset-bottom));
    display: grid;
    gap: 12px;
    width: min(520px, calc(100% - 24px));
    max-height: calc(100dvh - 96px - env(safe-area-inset-bottom));
    overflow: auto;
    padding: 18px;
    border-radius: 26px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(17,24,39,0.28);
    transform: translateX(-50%);
}

.wallet-code-icon {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 18px;
    color: #fff;
    background: linear-gradient(135deg, #20bca5, #6672ff);
}

.wallet-code-panel h2,
.wallet-code-panel p {
    margin: 0;
}

.wallet-code-panel h2 {
    color: var(--ink);
    font-size: 1.45rem;
    line-height: 1.05;
}

.wallet-code-text {
    color: var(--muted);
    font-weight: 760;
    line-height: 1.35;
}

.wallet-code-display,
.wallet-code-requisites,
.wallet-code-note {
    border-radius: 18px;
    background: #f8f9ff;
}

.wallet-code-display {
    display: grid;
    gap: 9px;
    padding: 14px;
    text-align: center;
}

.wallet-code-display span,
.wallet-code-requisites span {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 850;
}

.wallet-code-display strong {
    color: var(--ink);
    font-size: 2.3rem;
    letter-spacing: 0.08em;
}

.wallet-code-display button,
.wallet-code-requisites button,
.wallet-code-done {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    border: 0;
    border-radius: 15px;
    font-weight: 900;
    text-decoration: none;
}

.wallet-code-display button {
    color: #fff;
    background: linear-gradient(135deg, #242a3a, #6672ff);
}

.wallet-code-requisites {
    display: grid;
    gap: 8px;
    padding: 12px;
}

.wallet-code-requisites > div {
    display: grid;
    gap: 6px;
}

.wallet-code-requisites b {
    color: var(--ink);
    font-size: 1rem;
}

.wallet-code-requisites button {
    justify-content: space-between;
    color: var(--ink);
    background: #fff;
    padding: 0 12px;
}

.wallet-code-requisites button b {
    white-space: nowrap;
}

.wallet-code-requisites p {
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 760;
}

.wallet-code-note {
    display: grid;
    grid-template-columns: 34px 1fr;
    align-items: center;
    gap: 8px;
    padding: 10px;
    color: #075f49;
    background: #ddfff5;
    font-size: 0.84rem;
    font-weight: 800;
}

.wallet-code-note i {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    color: #fff;
    background: #20bca5;
}

.wallet-code-done {
    color: #fff;
    background: linear-gradient(135deg, #242a3a, #ff6b4a 52%, #ffae55);
}

.wallet-result-card {
    display: grid;
    justify-items: start;
    gap: 14px;
    margin-top: 16px;
    padding: 20px;
    border-radius: 28px;
    background: rgba(255,255,255,0.94);
    box-shadow: var(--shadow);
}

.wallet-result-icon {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border-radius: 22px;
    color: #fff;
    background: linear-gradient(135deg, #20bca5, #6672ff);
    font-size: 2rem;
}

.wallet-result-card.error .wallet-result-icon {
    background: linear-gradient(135deg, #ef4444, #b91c1c);
}

.wallet-result-card.pending .wallet-result-icon {
    background: linear-gradient(135deg, #f59e0b, #ff6b4a);
}

.wallet-result-card h1,
.wallet-result-card p {
    margin: 0;
}

.wallet-result-card h1 {
    color: var(--ink);
    font-size: 2rem;
    line-height: 1;
}

.wallet-result-card > p:not(.eyebrow) {
    color: var(--muted);
    font-weight: 760;
    line-height: 1.38;
}

.wallet-result-card > div:not(.wallet-result-icon) {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    padding: 12px;
    border-radius: 16px;
    background: #f8f9ff;
}

.wallet-result-card span {
    color: var(--muted);
    font-weight: 850;
}

.wallet-result-card strong {
    color: var(--ink);
}

.wallet-result-card a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 54px;
    border-radius: 18px;
    color: #fff;
    background: linear-gradient(135deg, #242a3a, #ff6b4a 52%, #ffae55);
    font-weight: 900;
    text-decoration: none;
}

.app-order-result,
.app-order-photos {
    margin-top: 16px;
    padding: 18px;
    border-radius: 28px;
    background: rgba(255,255,255,0.94);
    box-shadow: var(--shadow);
}

.app-order-result {
    display: grid;
    gap: 14px;
}

.app-order-icon {
    display: grid;
    place-items: center;
    width: 62px;
    height: 62px;
    border-radius: 22px;
    color: #fff;
    background: linear-gradient(135deg, #ff6b4a, #ffae55);
    font-size: 1.95rem;
}

.app-order-result.paid .app-order-icon {
    background: linear-gradient(135deg, #20bca5, #6672ff);
}

.app-order-result h1,
.app-order-result p {
    margin: 0;
}

.app-order-result h1 {
    color: var(--ink);
    font-size: 2rem;
    line-height: 1;
}

.app-order-result > p:not(.eyebrow) {
    color: var(--muted);
    font-weight: 760;
    line-height: 1.36;
}

.app-order-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.app-order-stats div,
.app-order-total {
    padding: 11px;
    border-radius: 17px;
    background: #f8f9ff;
}

.app-order-stats span,
.app-order-total span {
    display: block;
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 850;
}

.app-order-stats strong,
.app-order-total strong {
    display: block;
    margin-top: 4px;
    color: var(--ink);
    font-weight: 900;
}

.app-order-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.app-order-total strong {
    margin-top: 0;
    font-size: 1.35rem;
}

.app-order-pay {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 54px;
    border: 0;
    border-radius: 18px;
    color: #fff;
    background: linear-gradient(135deg, #242a3a, #ff6b4a 52%, #ffae55);
    box-shadow: 0 14px 28px rgba(255,107,74,0.2);
    font-weight: 900;
    text-decoration: none;
}

.app-order-pay:disabled {
    opacity: 0.68;
}

.app-order-delete {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 50px;
    border: 1px solid rgba(239,68,68,0.24);
    border-radius: 18px;
    color: #b91c1c;
    background: #fee2e2;
    font-weight: 900;
}

.app-order-delete:disabled {
    opacity: 0.68;
}

.app-order-photo-list {
    display: grid;
    gap: 10px;
}

.app-order-photo-list article {
    display: grid;
    grid-template-columns: 64px 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 9px;
    border-radius: 18px;
    background: #f8f9ff;
}

.app-order-photo-list img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 14px;
    background: #eef1ff;
}

.app-order-photo-list strong,
.app-order-photo-list span {
    display: block;
}

.app-order-photo-list strong {
    color: var(--ink);
}

.app-order-photo-list span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 760;
}

.app-order-photo-list b {
    color: var(--ink);
    white-space: nowrap;
}

.profile-shell {
    background:
        linear-gradient(180deg, rgba(248,250,255,0.96), rgba(241,245,249,0.98)),
        radial-gradient(circle at 10% 0%, rgba(255,107,74,0.14), transparent 28%),
        radial-gradient(circle at 90% 4%, rgba(102,114,255,0.16), transparent 28%);
}

.profile-main {
    padding: 12px 14px 88px;
}

.profile-hero-card,
.profile-panel,
.profile-stats div,
.profile-notice {
    background: rgba(255,255,255,0.94);
    box-shadow: 0 12px 30px rgba(31,36,48,0.08);
}

.profile-hero-card {
    display: grid;
    grid-template-columns: 68px 1fr;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border-radius: 28px;
}

.profile-avatar {
    display: grid;
    place-items: center;
    width: 68px;
    height: 68px;
    border-radius: 24px;
    color: #fff;
    background: linear-gradient(135deg, #242a3a, #6672ff);
    font-size: 2rem;
}

.profile-hero-card h1,
.profile-panel-title h1,
.profile-panel-title h2 {
    margin: 0;
    color: var(--ink);
}

.profile-hero-card h1 {
    font-size: 1.55rem;
    line-height: 1;
}

.profile-hero-card span {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-weight: 760;
    overflow-wrap: anywhere;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 14px;
}

.profile-stats div {
    padding: 13px 10px;
    border-radius: 18px;
}

.profile-stats span,
.profile-referral span {
    display: block;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 850;
}

.profile-stats strong,
.profile-referral strong {
    display: block;
    margin-top: 5px;
    color: var(--ink);
}

.profile-notice {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    padding: 12px;
    border-radius: 18px;
    font-weight: 850;
}

.profile-notice.success {
    color: #075f49;
    background: #ddfff5;
}

.profile-notice.error {
    color: #991b1b;
    background: #fee2e2;
}

.profile-panel {
    display: grid;
    gap: 12px;
    margin-top: 16px;
    padding: 16px;
    border-radius: 26px;
}

.profile-panel-title {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
}

.profile-panel-title > div {
    min-width: 0;
}

.profile-panel-title > i,
.profile-panel-title > a {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    max-width: 132px;
    height: 42px;
    padding: 0 13px;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, #242a3a, #6672ff);
    font-size: 0.82rem;
    font-weight: 900;
    line-height: 1.05;
    text-align: center;
    text-decoration: none;
    white-space: normal;
    overflow-wrap: anywhere;
}

.profile-action-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.profile-action-grid a {
    display: grid;
    gap: 8px;
    min-height: 132px;
    padding: 14px;
    border-radius: 20px;
    color: var(--ink);
    background: #f8f9ff;
    text-decoration: none;
}

.profile-action-grid i {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 16px;
    color: #fff;
    background: linear-gradient(135deg, #ff6b4a, #ffae55);
    font-size: 1.25rem;
}

.profile-action-grid strong,
.profile-action-grid span {
    display: block;
}

.profile-action-grid span {
    color: var(--muted);
    font-weight: 760;
}

.profile-promo-form {
    display: grid;
    gap: 8px;
}

.profile-promo-form input {
    min-height: 52px;
    border: 1px solid rgba(31,36,48,0.1);
    border-radius: 16px;
    padding: 0 14px;
    background: #f8f9ff;
    color: var(--ink);
    font-weight: 850;
}

.profile-promo-form button,
.profile-referral button {
    min-height: 50px;
    border: 0;
    border-radius: 16px;
    color: #fff;
    background: linear-gradient(135deg, #242a3a, #6672ff);
    font-weight: 900;
}

.profile-referral {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.profile-referral div {
    padding: 12px;
    border-radius: 18px;
    background: #f8f9ff;
}

.profile-referral button {
    grid-column: 1 / -1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.profile-order-list,
.profile-print-order-list {
    display: grid;
    gap: 10px;
}

.profile-order-list a,
.profile-print-order-list article {
    border-radius: 18px;
    background: #f8f9ff;
}

.profile-order-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    color: var(--ink);
    text-decoration: none;
}

.profile-order-list strong,
.profile-order-list span,
.profile-print-order-list strong,
.profile-print-order-list span {
    display: block;
}

.profile-order-list span,
.profile-print-order-list span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 760;
}

.profile-order-list b {
    color: var(--ink);
    white-space: nowrap;
}

.profile-empty {
    margin: 0;
    color: var(--muted);
    font-weight: 760;
}

.profile-print-order-list article {
    display: grid;
    gap: 9px;
    padding: 12px;
}

.profile-print-order-list article > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--ink);
    text-decoration: none;
}

.profile-print-order-list article > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.profile-print-order-list em {
    padding: 5px 8px;
    border-radius: 999px;
    color: #8a4b00;
    background: #fff3c4;
    font-size: 0.72rem;
    font-style: normal;
    font-weight: 900;
    white-space: nowrap;
}

.profile-print-order-list em.paid {
    color: #075f49;
    background: #ddfff5;
}

.profile-print-order-list button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    border: 0;
    border-radius: 15px;
    color: #b91c1c;
    background: #fee2e2;
    font-weight: 900;
}

.app-order-delete-btn {
    display: inline-grid !important;
    place-items: center !important;
    flex: 0 0 auto;
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    min-height: 42px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 15px !important;
    color: #c23535 !important;
    background: linear-gradient(145deg, #fff4f4, #ffe1e1) !important;
    box-shadow: 0 10px 22px rgba(194, 53, 53, 0.12) !important;
}

.app-order-delete-btn i {
    font-size: 1.08rem;
    line-height: 1;
}

.app-order-delete-btn:disabled {
    opacity: 0.55;
}

.app-order-head-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex: 0 0 auto;
    max-width: none;
    min-width: max-content;
}

.app-account-card-head > div:first-child {
    min-width: 0;
}

.app-account-card-head > div:first-child strong {
    overflow-wrap: anywhere;
}

.app-order-head-actions em {
    flex: 0 0 auto !important;
    max-width: none !important;
    min-width: max-content !important;
    white-space: nowrap !important;
    padding: 6px 9px !important;
    font-size: 0.72rem !important;
    line-height: 1 !important;
}

.app-confirm-overlay {
    position: fixed;
    inset: 0;
    z-index: 220;
    display: grid;
    place-items: end center;
    padding: 18px 16px calc(18px + env(safe-area-inset-bottom, 0px));
    background: rgba(16, 22, 35, 0.38);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.app-confirm-dialog {
    width: min(100%, 420px);
    display: grid;
    gap: 14px;
    padding: 18px;
    border-radius: 26px;
    background: rgba(255,255,255,0.98);
    box-shadow: 0 26px 70px rgba(16, 22, 35, 0.26);
}

.app-confirm-icon {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 19px;
    color: #c23535;
    background: linear-gradient(145deg, #fff4f4, #ffe2e2);
    font-size: 1.45rem;
}

.app-confirm-dialog strong {
    display: block;
    color: var(--ink);
    font-size: 1.18rem;
    line-height: 1.15;
}

.app-confirm-dialog span {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.35;
    font-weight: 750;
}

.app-confirm-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.app-confirm-actions button {
    min-height: 48px;
    border: 0;
    border-radius: 17px;
    font-weight: 950;
}

.app-confirm-cancel {
    color: #424b5f;
    background: #f1f4fb;
}

.app-confirm-delete {
    color: #fff;
    background: linear-gradient(135deg, #e55353, #b91c1c);
    box-shadow: 0 12px 24px rgba(185, 28, 28, 0.18);
}

.print-recent-orders {
    margin-top: 16px;
    padding: 16px;
    border-radius: 26px;
    background: rgba(255,255,255,0.94);
    box-shadow: 0 12px 30px rgba(31,36,48,0.08);
}

.print-recent-orders .section-title > a {
    display: grid;
    place-items: center;
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, #242a3a, #6672ff);
    font-weight: 900;
    text-decoration: none;
}

.recent-empty {
    margin: 0;
}

.print-recent-list {
    display: grid;
    gap: 10px;
}

.print-recent-list article {
    display: grid;
    gap: 9px;
    padding: 12px;
    border-radius: 18px;
    background: #f8f9ff;
}

.print-recent-list article > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--ink);
    text-decoration: none;
}

.print-recent-list strong,
.print-recent-list span {
    display: block;
}

.print-recent-list span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 760;
}

.print-recent-list b {
    color: var(--ink);
    white-space: nowrap;
}

.print-recent-list article > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.print-recent-list em {
    padding: 5px 8px;
    border-radius: 999px;
    color: #8a4b00;
    background: #fff3c4;
    font-size: 0.72rem;
    font-style: normal;
    font-weight: 900;
    white-space: nowrap;
}

.print-recent-list em.paid {
    color: #075f49;
    background: #ddfff5;
}

.print-recent-list button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    border: 0;
    border-radius: 14px;
    color: #b91c1c;
    background: #fee2e2;
    padding: 0 12px;
    font-weight: 900;
}

.home-banner {
    display: grid;
    grid-template-columns: 1fr 48px;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    padding: 18px;
    border-radius: 26px;
    background: #111827;
    color: #fff;
    box-shadow: var(--shadow);
}

.home-banner h2,
.home-banner p {
    margin: 0;
}

.home-banner h2 {
    font-size: 1.35rem;
    line-height: 1.05;
}

.home-banner p:not(.eyebrow) {
    margin-top: 8px;
    color: rgba(255,255,255,0.72);
    line-height: 1.35;
}

.home-banner a {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 17px;
    color: #111827;
    background: #fff;
}

.print-main {
    padding: 12px 14px 58px;
}

.print-hero {
    min-height: 260px;
}

.print-hero h1 {
    margin: 0;
    font-size: clamp(2.2rem, 13vw, 3.45rem);
    line-height: 0.94;
}

.print-hero p:not(.eyebrow) {
    margin: 14px 0 0;
    color: rgba(255,255,255,0.9);
    line-height: 1.42;
}

.print-hero .primary-action {
    margin-top: 20px;
}

.hero-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.primary-action,
.ghost-action,
.upload-drop,
.order-bar button {
    appearance: none;
    border: 0;
    cursor: pointer;
}

.primary-action,
.ghost-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 50px;
    border-radius: 16px;
    padding: 0 18px;
    font-weight: 850;
}

.primary-action {
    color: #1f2430;
    background: #fff;
}

.ghost-action {
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.notice-panel {
    display: grid;
    grid-template-columns: 42px 1fr auto;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
    padding: 14px;
    border-radius: 20px;
    background: var(--surface);
    box-shadow: 0 8px 24px rgba(31, 36, 48, 0.08);
}

.notice-panel i {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    color: #fff;
    background: var(--brand);
}

.notice-panel strong,
.notice-panel p {
    margin: 0;
}

.notice-panel p {
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.86rem;
    line-height: 1.35;
}

.notice-panel a {
    color: var(--brand);
    font-weight: 800;
}

.quick-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin: 16px 0;
}

.quick-card {
    display: grid;
    gap: 8px;
    place-items: center;
    min-height: 92px;
    padding: 12px 6px;
    border-radius: 22px;
    background: var(--surface);
    box-shadow: 0 10px 28px rgba(31, 36, 48, 0.08);
    color: var(--ink);
    font-weight: 750;
    font-size: 0.82rem;
}

.quick-card i {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 15px;
    color: #fff;
    background: linear-gradient(135deg, var(--brand-2), #8b62ff);
    font-size: 1.2rem;
}

.quick-card.accent-print i {
    background: linear-gradient(135deg, var(--brand), #ffb15c);
}

.print-workspace,
.rubric-list {
    margin-top: 16px;
    padding: 16px;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: var(--shadow);
}

.section-title {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.section-title h2 {
    margin: 0;
    font-size: 1.55rem;
    line-height: 1;
}

.section-title .eyebrow {
    color: var(--brand);
}

.photo-count {
    flex: 0 0 auto;
    padding: 7px 10px;
    border-radius: 999px;
    color: var(--muted);
    background: #f3f1ec;
    font-size: 0.82rem;
    font-weight: 800;
}

.upload-drop {
    display: grid;
    place-items: center;
    gap: 6px;
    width: 100%;
    min-height: 150px;
    border-radius: 24px;
    border: 2px dashed rgba(255, 107, 74, 0.48);
    color: var(--ink);
    background: var(--surface-2);
}

.upload-drop i {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 18px;
    color: #fff;
    background: linear-gradient(135deg, var(--brand), #ffb15c);
    font-size: 1.65rem;
}

.upload-drop span {
    color: var(--muted);
    font-size: 0.9rem;
}

.photo-list {
    display: grid;
    gap: 12px;
    margin-top: 14px;
}

.empty-state {
    margin: 14px 0 0;
    color: var(--muted);
    text-align: center;
    font-size: 0.92rem;
}

.photo-item {
    display: grid;
    grid-template-columns: 88px 1fr;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #fff;
    padding: 10px;
}

.photo-thumb {
    position: relative;
    width: 88px;
    height: 116px;
    border-radius: 16px;
    overflow: hidden;
    background: #ece8df;
}

.photo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-status {
    position: absolute;
    left: 6px;
    right: 6px;
    bottom: 6px;
    min-height: 22px;
    border-radius: 999px;
    color: #fff;
    background: rgba(31, 36, 48, 0.75);
    display: grid;
    place-items: center;
    font-size: 0.72rem;
    font-weight: 800;
}

.photo-status.ready {
    background: var(--ok);
}

.photo-controls {
    min-width: 0;
}

.photo-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.field {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.field label {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 800;
}

.field select,
.field input {
    width: 100%;
    min-height: 38px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #f8f6f2;
    padding: 0 9px;
    color: var(--ink);
}

.photo-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 10px;
}

.retouch-toggle {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 36px;
    padding: 0 10px;
    border-radius: 999px;
    background: #f8f6f2;
    color: var(--ink);
    font-size: 0.82rem;
    font-weight: 750;
}

.remove-photo {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 12px;
    color: #c83333;
    background: #fff0ef;
}

.rubric-list {
    display: grid;
    gap: 8px;
}

.rubric-list .section-title {
    margin-bottom: 6px;
}

.rubric-list a {
    display: grid;
    grid-template-columns: 42px 1fr auto;
    align-items: center;
    gap: 10px;
    min-height: 56px;
    padding: 8px 10px;
    border-radius: 17px;
    background: #fff;
    border: 1px solid var(--line);
    font-weight: 780;
}

.rubric-list i {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, var(--brand-2), #8b62ff);
}

.rubric-list b {
    display: grid;
    place-items: center;
    min-width: 24px;
    height: 24px;
    border-radius: 999px;
    color: #fff;
    background: var(--brand);
    font-size: 0.75rem;
}

.order-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    border-radius: 20px;
    background: rgba(31, 36, 48, 0.94);
    box-shadow: 0 14px 30px rgba(31, 36, 48, 0.18);
    color: #fff;
}

.order-summary-top {
    margin-bottom: 14px;
}

.order-summary-bottom {
    margin-top: 14px;
}

.order-summary[hidden] {
    display: none !important;
}

.order-summary span {
    display: block;
    color: rgba(255,255,255,0.66);
    font-size: 0.76rem;
    font-weight: 750;
}

.order-summary strong {
    display: block;
    margin-top: 2px;
    font-size: 1.3rem;
}

.order-summary button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    border-radius: 16px;
    padding: 0 15px;
    background: linear-gradient(135deg, var(--brand), #ffb15c);
    color: #fff;
    font-weight: 850;
}

.order-summary button:disabled {
    opacity: 0.6;
}

.bottom-nav {
    position: fixed;
    left: 50%;
    bottom: 0;
    z-index: 30;
    width: min(680px, 100%);
    transform: translateX(-50%);
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    padding: 5px 8px calc(5px + env(safe-area-inset-bottom, 0px));
    background: rgba(255, 255, 255, 0.92);
    border-top: 1px solid rgba(31, 36, 48, 0.08);
    backdrop-filter: blur(18px);
}

.bottom-nav a {
    display: grid;
    gap: 3px;
    place-items: center;
    min-height: 50px;
    border-radius: 14px;
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 780;
}

.bottom-nav i {
    font-size: 1.18rem;
}

.bottom-nav a.active {
    color: var(--brand);
    background: #fff1eb;
}

.toast-stack {
    position: fixed;
    left: 50%;
    bottom: 104px;
    z-index: 60;
    width: min(640px, calc(100% - 28px));
    transform: translateX(-50%);
    display: grid;
    gap: 8px;
    pointer-events: none;
}

.app-toast {
    padding: 12px 14px;
    border-radius: 16px;
    color: #fff;
    background: rgba(31, 36, 48, 0.94);
    box-shadow: 0 14px 32px rgba(31, 36, 48, 0.2);
    font-weight: 740;
}

.app-account-list {
    display: grid;
    gap: 12px;
}

.app-account-card,
.app-empty-card {
    border: 1px solid rgba(31, 36, 48, 0.08);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 14px 32px rgba(31, 36, 48, 0.08);
}

.app-account-card {
    padding: 14px;
}

.app-account-card.is-highlighted {
    border-color: rgba(102, 126, 234, 0.62);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.12), 0 14px 32px rgba(31, 36, 48, 0.08);
}

.app-account-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.app-account-card-head strong {
    display: block;
    color: var(--ink);
    font-size: 1rem;
    line-height: 1.18;
}

.app-account-card-head span,
.app-account-meta span,
.app-account-muted {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 720;
}

.app-account-card-head em {
    flex: 0 0 auto;
    max-width: 42%;
    padding: 7px 10px;
    border-radius: 999px;
    background: #f1f4fb;
    color: #3d4b6d;
    font-size: 0.74rem;
    font-style: normal;
    font-weight: 850;
    text-align: center;
}

.app-account-card-head em.status-paid,
.app-account-card-head em.status-delivered,
.app-account-card-head em.status-completed {
    background: #e8fff5;
    color: #0f8c58;
}

.app-account-card-head em.status-cancelled {
    background: #fff0ef;
    color: #c83333;
}

.app-account-card-head em.status-processing,
.app-account-card-head em.status-shipped {
    background: #fff6df;
    color: #9a6400;
}

.app-account-meta {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.app-account-meta span {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    min-width: 0;
    overflow-wrap: anywhere;
}

.app-account-meta i {
    flex: 0 0 auto;
    color: var(--brand-2);
}

.app-order-items {
    display: grid;
    gap: 8px;
    margin-top: 12px;
    padding: 10px;
    border-radius: 16px;
    background: #f7f8fb;
}

.app-order-items div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    font-size: 0.82rem;
    font-weight: 760;
}

.app-order-items span {
    min-width: 0;
    overflow-wrap: anywhere;
    color: var(--ink);
}

.app-order-items b {
    color: var(--muted);
    font-size: 0.76rem;
}

.app-empty-card {
    display: grid;
    place-items: center;
    gap: 8px;
    min-height: 210px;
    padding: 24px 18px;
    text-align: center;
}

.app-empty-card i {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    color: #fff;
    font-size: 1.65rem;
}

.app-empty-card strong {
    color: var(--ink);
    font-size: 1.1rem;
}

.app-empty-card span {
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 720;
}

.app-empty-card a,
.app-account-actions a,
.app-account-actions button,
.app-account-form button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    border: 0;
    border-radius: 15px;
    padding: 0 14px;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    color: #fff;
    font-size: 0.86rem;
    font-weight: 850;
}

.app-account-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.app-account-actions a,
.app-account-actions button {
    flex: 1 1 130px;
}

.app-account-muted {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
}

.app-account-form {
    display: grid;
    gap: 12px;
}

.app-account-form label {
    display: grid;
    gap: 7px;
    color: var(--ink);
    font-size: 0.82rem;
    font-weight: 840;
}

.app-account-form input {
    width: 100%;
    min-height: 52px;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 0 14px;
    background: #f8f9fc;
    color: var(--ink);
    font-size: 1rem;
    font-weight: 740;
}

.app-account-form button {
    min-height: 54px;
    margin-top: 4px;
}

.app-load-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 50px;
    margin-top: 12px;
    border: 0;
    border-radius: 17px;
    background: linear-gradient(135deg, #242a3a, #6672ff);
    color: #fff;
    font-weight: 850;
}

.app-load-more:disabled {
    opacity: 0.65;
}

.app-receipt-viewer {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: grid;
    grid-template-rows: 1fr auto;
    gap: 14px;
    padding: calc(env(safe-area-inset-top) + 18px) 16px calc(env(safe-area-inset-bottom) + 24px);
    background: rgba(15, 19, 31, 0.92);
}

.app-receipt-viewer[hidden] {
    display: none;
}

.app-receipt-viewer img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    min-height: 0;
}

.app-receipt-viewer a {
    justify-self: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    border-radius: 16px;
    padding: 0 18px;
    background: #fff;
    color: var(--ink);
    font-weight: 850;
}

.app-receipt-close {
    position: fixed;
    top: calc(env(safe-area-inset-top) + 14px);
    right: 14px;
    z-index: 2;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--ink);
    font-size: 1.4rem;
}

@media (min-width: 760px) {
    .app-frame {
        border-left: 1px solid rgba(31, 36, 48, 0.08);
        border-right: 1px solid rgba(31, 36, 48, 0.08);
        background: rgba(255, 255, 255, 0.24);
    }

    .home-service-card {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    .home-service-card i {
        margin: 0 auto;
    }

    .home-service-card strong {
        margin-top: 14px;
    }
}

@media (max-width: 390px) {
    .app-main {
        padding-left: 12px;
        padding-right: 12px;
    }

    .quick-grid {
        gap: 8px;
    }

    .quick-card {
        min-height: 84px;
        font-size: 0.74rem;
    }

    .home-main,
    .print-main {
        padding-left: 12px;
        padding-right: 12px;
    }

    .home-dashboard {
        padding: 16px;
    }

    .home-dashboard h1 {
        font-size: 1.62rem;
    }

    .home-service-card {
        padding: 14px;
    }

    .amount-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .method-option span {
        min-height: 60px;
    }

    .method-option b {
        white-space: normal;
    }

    .requisite-row {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .requisite-row button {
        justify-content: space-between;
        width: 100%;
    }

    .photo-item {
        grid-template-columns: 78px 1fr;
    }

    .photo-thumb {
        width: 78px;
        height: 108px;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}

.home-service-card.ai-upload i {
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
}

.ai-upload-main {
    padding-bottom: 82px;
}

.app-ai-upload-hero,
.app-ai-upload-panel {
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 14px 34px rgba(31, 36, 48, 0.09);
}

.app-ai-upload-hero {
    padding: 22px;
    color: #fff;
    background: linear-gradient(135deg, #8b5cf6, #14b8a6 52%, #f97316);
}

.app-ai-upload-hero h1 {
    margin: 0;
    font-size: 2rem;
    line-height: 1;
}

.app-ai-upload-hero > div,
.app-ai-category-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
}

.app-ai-upload-hero span,
.app-ai-category-scroll a,
.app-ai-category-scroll button {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 12px;
    border-radius: 999px;
    font-weight: 850;
}

.app-ai-upload-hero span {
    background: rgba(255,255,255,0.18);
}

.app-ai-category-scroll a,
.app-ai-category-scroll button {
    border: 0;
    background: #f2f4fb;
    color: var(--ink);
    font-size: 0.82rem;
    font-family: inherit;
}

.app-ai-category-scroll a.active,
.app-ai-category-scroll button.active {
    color: #fff;
    background: linear-gradient(135deg, #8b5cf6, #14b8a6);
}

.app-ai-upload-panel {
    display: grid;
    gap: 14px;
    margin-top: 14px;
    padding: 16px;
}

.app-ai-theme-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.app-ai-theme-grid a,
.app-ai-theme-grid button {
    display: grid;
    gap: 8px;
    min-height: 138px;
    padding: 14px;
    border: 1px solid rgba(31,36,48,0.08);
    border-radius: 20px;
    background: #f8f9ff;
    color: var(--ink);
    font: inherit;
    text-align: left;
}

.app-ai-theme-grid a.active,
.app-ai-theme-grid button.active {
    color: #fff;
    background: linear-gradient(135deg, #242a3a, #6672ff);
}

.app-ai-theme-grid i {
    font-size: 1.6rem;
}

.app-ai-theme-grid span {
    align-self: end;
    opacity: 0.76;
    font-weight: 850;
}

.app-ai-option,
.app-ai-radio-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    padding: 10px 12px;
    border-radius: 16px;
    background: #f7f8fc;
    font-weight: 780;
}

.app-ai-radio-group {
    display: grid;
    gap: 8px;
}

.app-ai-textarea,
.app-ai-input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #f8f9fc;
    color: var(--ink);
    font: inherit;
    font-weight: 720;
    padding: 12px;
}

.app-ai-textarea {
    min-height: 96px;
    resize: vertical;
}

.app-ai-upload-drop {
    display: grid;
    place-items: center;
    gap: 8px;
    min-height: 180px;
    border: 2px dashed rgba(106, 114, 255, 0.45);
    border-radius: 22px;
    background: #f8f9ff;
    text-align: center;
}

.app-ai-upload-drop i {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 18px;
    color: #fff;
    background: linear-gradient(135deg, #8b5cf6, #14b8a6);
    font-size: 1.7rem;
}

.app-ai-upload-drop input {
    display: none;
}

.app-ai-crop,
.app-ai-job-list,
.app-ai-result-images {
    display: grid;
    gap: 10px;
}

.app-ai-crop[hidden],
.app-ai-preview[hidden],
.app-ai-textarea[hidden],
.app-ai-input[hidden],
.app-ai-result-loading[hidden],
.app-ai-result-images[hidden],
.app-ai-result-error[hidden] {
    display: none;
}

.app-ai-crop img {
    max-width: 100%;
    max-height: 56vh;
    border-radius: 18px;
}

.app-ai-crop > div,
.app-ai-submit-grid,
.app-ai-result-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.app-ai-crop button,
.app-ai-submit-grid button,
.app-ai-wallet-link,
.app-ai-consent button,
.app-ai-result-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 50px;
    border: 0;
    border-radius: 16px;
    padding: 0 12px;
    color: #fff;
    background: linear-gradient(135deg, #242a3a, #6672ff);
    font-weight: 850;
}

.app-ai-submit-grid button:first-child {
    background: linear-gradient(135deg, #16a34a, #22c55e);
}

.app-ai-submit-grid button:disabled,
.app-ai-consent button:disabled {
    opacity: 0.5;
}

.app-ai-preview {
    display: grid;
    grid-template-columns: 82px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 18px;
    background: #f8f9fc;
}

.app-ai-preview img {
    width: 82px;
    height: 82px;
    object-fit: cover;
    border-radius: 14px;
}

.app-ai-preview button {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    color: #fff;
    background: #6672ff;
}

.app-ai-consent p {
    margin: 0;
    color: var(--muted);
    font-weight: 690;
    line-height: 1.45;
}

.app-ai-consent label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--ink);
    font-weight: 780;
}

.app-ai-job-card,
.app-ai-job-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    border-radius: 18px;
    background: #f8f9fc;
}

.app-ai-job-card {
    padding: 8px;
}

.app-ai-job-link {
    flex: 1 1 auto;
    min-width: 0;
    padding: 4px !important;
    background: transparent !important;
}

.app-ai-delete-job,
.app-ai-result-delete {
    flex: 0 0 auto;
    display: inline-grid;
    place-items: center;
    width: 44px;
    min-width: 44px;
    height: 44px;
    border: 0;
    border-radius: 15px;
    color: #b42318;
    background: #fff0ef;
    font-weight: 900;
}

.app-ai-result-delete {
    width: auto;
    padding: 0 14px;
    color: #fff;
    background: linear-gradient(135deg, #ef4444, #b42318);
}

.app-ai-job-list span {
    display: block;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 720;
}

.app-ai-job-list em {
    flex: 0 0 auto;
    padding: 7px 10px;
    border-radius: 999px;
    background: #eef1fb;
    color: #3d4b6d;
    font-style: normal;
    font-size: 0.76rem;
    font-weight: 850;
}

.app-ai-job-list em.success {
    background: #e8fff5;
    color: #0f8c58;
}

.app-ai-job-list em.failed {
    background: #fff0ef;
    color: #c83333;
}

.app-ai-result-state {
    display: grid;
    place-items: center;
    gap: 10px;
    min-height: 230px;
    text-align: center;
}

.app-ai-result-state > i {
    display: grid;
    place-items: center;
    width: 76px;
    height: 76px;
    border-radius: 26px;
    color: #fff;
    background: linear-gradient(135deg, #8b5cf6, #14b8a6);
    font-size: 2rem;
    animation: appAiPulse 1.5s ease-in-out infinite;
}

.app-ai-result-state.success > i {
    background: linear-gradient(135deg, #16a34a, #22c55e);
    animation: none;
}

.app-ai-result-state.failed > i {
    background: linear-gradient(135deg, #dc2626, #fb7185);
    animation: none;
}

@keyframes appAiPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(0.94); opacity: 0.72; }
}

.app-ai-result-state h1 {
    margin: 0;
    font-size: 1.8rem;
}

.app-ai-result-state span {
    color: var(--muted);
    font-weight: 720;
}

.app-ai-result-loading {
    display: grid;
    place-items: center;
    gap: 10px;
    padding: 22px 16px;
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(20,184,166,0.12), rgba(99,102,241,0.12));
    color: var(--ink);
    text-align: center;
    box-shadow: inset 0 0 0 1px rgba(31,36,48,0.06);
}

.app-ai-result-loading i {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 20px;
    color: #fff;
    background: linear-gradient(135deg, #14b8a6, #6366f1);
    font-size: 1.75rem;
    animation: appAiSpin 1.05s linear infinite;
}

.app-ai-result-loading strong {
    font-size: 1.05rem;
    font-weight: 900;
}

.app-ai-result-loading span {
    max-width: 280px;
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 720;
    line-height: 1.35;
}

@keyframes appAiSpin {
    to { transform: rotate(360deg); }
}

.app-ai-result-images div {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-weight: 850;
}

.app-ai-result-images img {
    width: 100%;
    border-radius: 20px;
    background: #f8f9fc;
}

.app-ai-result-error {
    padding: 12px;
    border-radius: 16px;
    background: #fff0ef;
    color: #c83333;
    font-weight: 780;
}

/* AI upload app polish */
.ai-upload-shell {
    background:
        linear-gradient(180deg, rgba(248,250,255,0.97), rgba(243,247,250,0.99)),
        radial-gradient(circle at 12% 0%, rgba(20,184,166,0.16), transparent 26%),
        radial-gradient(circle at 92% 8%, rgba(236,72,153,0.14), transparent 24%);
}

.ai-upload-main {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 12px 14px 84px;
}

.app-ai-upload-hero {
    order: 0;
    position: relative;
    min-height: 216px;
    overflow: hidden;
    padding: 22px;
    border-radius: 30px;
    color: #fff;
    background:
        radial-gradient(circle at 80% 20%, rgba(255,255,255,0.26), transparent 22%),
        linear-gradient(135deg, #172033 0%, #235f6d 48%, #8f4b6f 100%);
    box-shadow: 0 20px 44px rgba(23, 32, 51, 0.2);
}

.app-ai-upload-hero::after {
    content: '';
    position: absolute;
    left: -18%;
    right: -12%;
    bottom: -42%;
    height: 58%;
    border-radius: 50%;
    background: rgba(255,255,255,0.16);
}

.app-ai-hero-copy {
    position: relative;
    z-index: 2;
    max-width: 78%;
}

.app-ai-hero-copy h1 {
    margin: 0;
    font-size: 2.15rem;
    line-height: 0.98;
}

.app-ai-hero-copy p:not(.eyebrow) {
    margin: 12px 0 0;
    color: rgba(255,255,255,0.82);
    font-size: 0.93rem;
    line-height: 1.35;
    font-weight: 650;
}

.app-ai-hero-orb {
    position: absolute;
    right: 18px;
    top: 28px;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 74px;
    height: 74px;
    border-radius: 24px;
    background: linear-gradient(135deg, #2dd4bf, #818cf8);
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.26);
    transform: rotate(8deg);
}

.app-ai-hero-orb i {
    font-size: 2rem;
}

.app-ai-hero-chips {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    z-index: 2;
    display: flex;
    gap: 8px;
    overflow-x: auto;
}

.app-ai-hero-chips span {
    flex: 0 0 auto;
    min-height: 36px;
    padding: 0 13px;
    border-radius: 999px;
    background: rgba(255,255,255,0.18);
    border: 1px solid rgba(255,255,255,0.28);
    color: #fff;
    font-weight: 850;
}

.app-ai-flow {
    order: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.app-ai-flow div {
    display: grid;
    place-items: center;
    gap: 5px;
    min-height: 72px;
    border-radius: 20px;
    background: rgba(255,255,255,0.88);
    box-shadow: 0 10px 24px rgba(31,36,48,0.07);
    color: var(--ink);
    font-size: 0.76rem;
    font-weight: 850;
}

.app-ai-flow i {
    color: #14b8a6;
    font-size: 1.25rem;
}

.app-ai-categories { order: 2; }
.app-ai-themes { order: 3; }
.app-ai-examples { order: 4; }
.app-ai-create-card { order: 5; border: 1px solid rgba(20,184,166,0.18); }
.app-ai-consent { order: 6; }
.app-ai-history { order: 7; }

.app-ai-upload-panel {
    margin-top: 0;
    border-radius: 26px;
    box-shadow: 0 14px 34px rgba(31,36,48,0.08);
}

.app-ai-upload-drop {
    min-height: 210px;
    border: 0;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.9), rgba(248,250,252,0.94)),
        radial-gradient(circle at 50% 0%, rgba(20,184,166,0.14), transparent 42%);
    box-shadow: inset 0 0 0 2px rgba(20,184,166,0.22);
}

.app-ai-upload-drop strong {
    color: var(--ink);
    font-size: 1.2rem;
}

.app-ai-upload-drop span {
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 720;
}

.app-ai-upload-drop i {
    width: 68px;
    height: 68px;
    border-radius: 24px;
    background: linear-gradient(135deg, #14b8a6, #818cf8);
}

.app-ai-category-scroll {
    padding-bottom: 4px;
}

.app-ai-category-scroll a,
.app-ai-category-scroll button {
    min-height: 42px;
    background: #f6f7fb;
    box-shadow: inset 0 0 0 1px rgba(31,36,48,0.06);
    -webkit-touch-callout: none;
    user-select: none;
}

.app-ai-category-scroll a.active,
.app-ai-category-scroll button.active {
    background: linear-gradient(135deg, #172033, #235f6d);
}

.app-ai-theme-grid {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
    scroll-snap-type: x mandatory;
}

.app-ai-theme-grid a,
.app-ai-theme-grid button {
    flex: 0 0 168px;
    min-height: 152px;
    scroll-snap-align: start;
    border: 0;
    background:
        linear-gradient(180deg, #ffffff, #f7f9fc);
    box-shadow: inset 0 0 0 1px rgba(31,36,48,0.07), 0 12px 24px rgba(31,36,48,0.06);
    -webkit-touch-callout: none;
    user-select: none;
}

.app-ai-theme-grid a.active,
.app-ai-theme-grid button.active {
    background:
        radial-gradient(circle at 85% 14%, rgba(255,255,255,0.22), transparent 24%),
        linear-gradient(135deg, #172033, #235f6d 58%, #8f4b6f);
}

.app-ai-theme-grid i {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 16px;
    color: #fff;
    background: linear-gradient(135deg, #14b8a6, #818cf8);
}

.app-ai-theme-grid a.active i,
.app-ai-theme-grid button.active i {
    background: rgba(255,255,255,0.18);
}

.app-ai-option,
.app-ai-radio-group label {
    background: #f8fafc;
    box-shadow: inset 0 0 0 1px rgba(31,36,48,0.06);
}

.app-ai-submit-grid {
    position: static;
    grid-template-columns: 1fr;
    padding-top: 4px;
}

.app-ai-submit-grid:has(button + button) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.app-ai-submit-grid button,
.app-ai-wallet-link {
    min-height: 56px;
    box-shadow: 0 16px 30px rgba(31,36,48,0.16);
}

.app-ai-submit-grid button:last-child {
    background: linear-gradient(135deg, #14b8a6, #6366f1);
}

.app-ai-preview {
    box-shadow: inset 0 0 0 1px rgba(31,36,48,0.06);
}

.app-ai-job-card,
.app-ai-job-list a {
    background: #fff;
    box-shadow: inset 0 0 0 1px rgba(31,36,48,0.06);
}

/* AI upload app v41 */
.ai-upload-shell .app-topbar {
    backdrop-filter: blur(18px);
}

.ai-upload-main {
    gap: 14px;
    padding: 10px 14px calc(78px + env(safe-area-inset-bottom));
}

.app-ai-upload-hero {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    align-items: center;
    min-height: 118px;
    padding: 16px;
    border-radius: 26px;
    color: var(--ink);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.98), rgba(247,250,252,0.98));
    border: 1px solid rgba(20,184,166,0.18);
    box-shadow: 0 14px 34px rgba(31,36,48,0.08);
}

.app-ai-upload-hero::before {
    content: none;
}

.app-ai-upload-hero::after {
    content: none;
}

.app-ai-upload-hero .app-ai-hero-copy {
    display: block;
    overflow: visible;
    min-width: 0;
    max-width: none;
}

.app-ai-hero-copy h1 {
    max-width: none;
    margin: 0;
    color: var(--ink);
    font-size: 1.46rem;
    line-height: 1.08;
    letter-spacing: 0;
}

.app-ai-hero-copy p:not(.eyebrow) {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 0.84rem;
    line-height: 1.32;
}

.app-ai-upload-hero .app-ai-hero-orb {
    display: none;
}

.app-ai-hero-orb i {
    font-size: 1.42rem;
}

.app-ai-upload-hero .app-ai-hero-chips {
    grid-column: 1 / -1;
    position: static;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
}

.app-ai-hero-chips span {
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    background: #eef7f5;
    border: 1px solid rgba(20,184,166,0.18);
    color: #16756d;
    font-size: 0.82rem;
    font-weight: 850;
    backdrop-filter: none;
}

.app-ai-hero-chips span:first-child {
    max-width: none;
}

.app-ai-flow {
    gap: 10px;
}

.app-ai-flow div {
    min-height: 66px;
    border: 1px solid rgba(20,184,166,0.12);
    background: rgba(255,255,255,0.94);
}

.app-ai-flow div:nth-child(2) i {
    color: #6366f1;
}

.app-ai-flow div:nth-child(3) i {
    color: #f97316;
}

.app-ai-upload-panel {
    border: 1px solid rgba(31,36,48,0.06);
    background: rgba(255,255,255,0.96);
}

.app-ai-create-card {
    padding: 18px;
    border: 1px solid rgba(20,184,166,0.2);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.98), rgba(246,250,250,0.98));
}

.app-ai-create-card form {
    display: grid;
    gap: 12px;
}

.app-ai-create-card .profile-panel-title {
    align-items: center;
}

.app-ai-create-card .profile-panel-title h2,
.app-ai-themes .profile-panel-title h2,
.app-ai-history .profile-panel-title h2 {
    font-size: 1.28rem;
}

.app-ai-upload-drop {
    min-height: 196px;
    border-radius: 24px;
    background:
        radial-gradient(circle at 50% 16%, rgba(20,184,166,0.16), transparent 36%),
        linear-gradient(180deg, #ffffff, #f4f7fb);
}

.app-ai-upload-drop:active {
    transform: scale(0.99);
}

.app-ai-category-scroll a,
.app-ai-category-scroll button,
.app-ai-theme-grid a,
.app-ai-theme-grid button {
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.app-ai-category-scroll a:active,
.app-ai-category-scroll button:active,
.app-ai-theme-grid a:active,
.app-ai-theme-grid button:active {
    transform: scale(0.97);
}

.app-ai-theme-grid {
    margin-right: -16px;
    padding-right: 16px;
}

.app-ai-theme-grid a,
.app-ai-theme-grid button {
    flex-basis: 158px;
    border-radius: 22px;
}

.app-ai-theme-grid strong {
    line-height: 1.16;
}

.app-ai-theme-grid a.active,
.app-ai-theme-grid button.active {
    box-shadow: 0 16px 30px rgba(35,95,109,0.22);
}

.ai-upload-main.is-loading {
    opacity: 0.72;
    pointer-events: none;
}

.app-ai-examples {
    overflow: hidden;
}

.app-ai-examples:empty,
.app-ai-examples[hidden] {
    display: none;
}

.app-ai-examples-body {
    min-height: 0;
}

.app-ai-examples-loading {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 64px;
    padding: 12px;
    border-radius: 18px;
    background: #f6f8fc;
    color: var(--muted);
    font-weight: 820;
}

.app-ai-examples-loading i {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, #14b8a6, #6366f1);
}

.app-ai-example-strip {
    display: flex;
    gap: 12px;
    margin-right: -16px;
    padding: 2px 16px 4px 0;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
}

.app-ai-example-strip.single {
    display: block;
    margin-right: 0;
    padding-right: 0;
    overflow: visible;
}

.app-ai-example-card {
    flex: 0 0 254px;
    display: grid;
    gap: 10px;
    scroll-snap-align: start;
}

.app-ai-example-strip.single .app-ai-example-card {
    width: 100%;
}

.app-ai-example-card strong {
    color: var(--ink);
    font-size: 0.92rem;
    line-height: 1.2;
}

.app-ai-example-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
    min-height: 138px;
    border: 0;
    border-radius: 22px;
    padding: 8px;
    background: linear-gradient(135deg, rgba(20,184,166,0.12), rgba(99,102,241,0.13));
    box-shadow: inset 0 0 0 1px rgba(31,36,48,0.06);
}

.app-ai-example-strip.single .app-ai-example-pair {
    min-height: 176px;
}

.app-ai-example-pair span {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    background: #eef2f7;
}

.app-ai-example-pair b {
    position: absolute;
    left: 7px;
    top: 7px;
    z-index: 2;
    padding: 4px 7px;
    border-radius: 999px;
    background: rgba(17,24,39,0.72);
    color: #fff;
    font-size: 0.66rem;
}

.app-ai-example-pair img {
    width: 100%;
    height: 126px;
    object-fit: cover;
    display: block;
}

.app-ai-example-strip.single .app-ai-example-pair img {
    height: 168px;
}

.app-ai-examples-empty {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 70px;
    padding: 12px;
    border-radius: 18px;
    background: #f6f8fc;
    color: var(--muted);
    font-weight: 820;
}

.app-ai-examples-empty i {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    border-radius: 15px;
    color: #fff;
    background: linear-gradient(135deg, #14b8a6, #6366f1);
}

.app-ai-example-modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: none;
    align-items: flex-end;
    padding: 18px 14px calc(18px + env(safe-area-inset-bottom));
    background: rgba(15,23,42,0.62);
}

.app-ai-example-modal.open {
    display: flex;
}

.app-ai-example-modal-card {
    width: min(680px, 100%);
    margin: 0 auto;
    max-height: 88dvh;
    overflow-y: auto;
    border-radius: 28px;
    padding: 16px;
    background: #fff;
    box-shadow: 0 24px 60px rgba(15,23,42,0.32);
}

.app-ai-example-modal-card h2 {
    margin: 4px 48px 14px 2px;
    color: var(--ink);
    font-size: 1.2rem;
}

.app-ai-example-modal-close {
    float: right;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    color: #fff;
    background: #111827;
}

.app-ai-example-modal-images {
    display: grid;
    gap: 12px;
}

.app-ai-example-modal-images figure {
    margin: 0;
}

.app-ai-example-modal-images figcaption {
    margin-bottom: 6px;
    color: var(--muted);
    font-weight: 850;
}

.app-ai-example-modal-images img {
    width: 100%;
    max-height: 58dvh;
    object-fit: contain;
    border-radius: 20px;
    background: #f4f6fb;
}

.app-ai-option,
.app-ai-radio-group label {
    border-radius: 18px;
}

.app-ai-radio-group {
    gap: 10px;
}

.app-ai-input,
.app-ai-textarea {
    min-height: 56px;
    margin: 2px 0 8px;
}

.app-ai-input::placeholder,
.app-ai-textarea::placeholder {
    color: #8b93a3;
    opacity: 1;
}

.app-ai-crop {
    position: relative;
    padding-bottom: 0;
}

.app-ai-crop > div {
    position: static;
    z-index: 1;
    padding: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
}

.app-ai-submit-grid button,
.app-ai-wallet-link {
    border-radius: 18px;
}

.app-ai-preview {
    border-radius: 22px;
    background: #fff;
}

.app-ai-job-card,
.app-ai-job-list a {
    border-radius: 20px;
}

@media (max-width: 380px) {
    .app-ai-hero-copy h1 {
        font-size: 1.68rem;
    }

    .app-ai-hero-copy {
        max-width: 76%;
    }

    .app-ai-theme-grid a,
    .app-ai-theme-grid button {
        flex-basis: 146px;
    }
}

/* AI upload rebuild v51 */
.ai-upload-shell {
    background:
        linear-gradient(180deg, #f8fafc 0%, #eef4f7 100%),
        radial-gradient(circle at 14% 4%, rgba(20,184,166,0.12), transparent 28%),
        radial-gradient(circle at 88% 14%, rgba(99,102,241,0.10), transparent 30%);
}

.ai-upload-main {
    gap: 12px;
    padding: 10px 14px calc(76px + env(safe-area-inset-bottom, 0px));
}

.ai-upload-shell .app-topbar {
    background: rgba(248,250,252,0.9);
    border-bottom: 1px solid rgba(31,36,48,0.04);
}

.ai-upload-shell .app-ai-upload-hero {
    min-height: auto;
    padding: 16px;
    border-radius: 24px;
    color: var(--ink);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,252,252,0.98));
    border: 1px solid rgba(20,184,166,0.18);
    box-shadow: 0 12px 28px rgba(31,36,48,0.07);
}

.ai-upload-shell .app-ai-hero-copy h1 {
    font-size: 1.34rem;
    line-height: 1.12;
}

.ai-upload-shell .app-ai-hero-copy p:not(.eyebrow) {
    max-width: none;
    margin-top: 7px;
    color: #667085;
}

.ai-upload-shell .app-ai-flow {
    gap: 8px;
}

.ai-upload-shell .app-ai-flow div {
    min-height: 56px;
    border-radius: 18px;
    box-shadow: 0 8px 18px rgba(31,36,48,0.05);
}

.ai-upload-shell .app-ai-upload-panel {
    padding: 15px;
    border-radius: 24px;
    background: rgba(255,255,255,0.98);
    border: 1px solid rgba(31,36,48,0.05);
    box-shadow: 0 12px 28px rgba(31,36,48,0.07);
}

.ai-upload-shell .profile-panel-title h2 {
    font-size: 1.26rem;
    line-height: 1.12;
}

.ai-upload-shell .app-ai-theme-grid {
    gap: 10px;
    margin-right: -15px;
    padding-right: 15px;
}

.ai-upload-shell .app-ai-theme-grid button {
    position: relative;
    flex-basis: 206px;
    min-height: 242px;
    padding: 10px;
    border-radius: 20px;
    overflow: hidden;
    color: #101828;
    background:
        linear-gradient(180deg, #ffffff, #f8fafc);
    border-top: 3px solid #14b8a6;
}

.ai-upload-shell .app-ai-theme-grid button.active {
    background:
        linear-gradient(180deg, #fff7ed, #ffffff);
    border: 2px solid #14b8a6;
    border-top-width: 3px;
    color: #101828;
    box-shadow: 0 0 0 3px rgba(20,184,166,0.16), 0 14px 30px rgba(31,36,48,0.08);
}

.ai-upload-shell .app-ai-theme-grid button:nth-child(4n + 1) {
    border-top-color: #7c3aed;
}

.ai-upload-shell .app-ai-theme-grid button:nth-child(4n + 2) {
    border-top-color: #f97316;
}

.ai-upload-shell .app-ai-theme-grid button:nth-child(4n + 3) {
    border-top-color: #65a30d;
}

.ai-upload-shell .app-ai-theme-grid button:nth-child(4n + 4) {
    border-top-color: #0ea5e9;
}

.ai-upload-shell .app-ai-theme-preview {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
    min-height: 110px;
    margin: -2px -2px 8px;
    padding: 7px;
    border-radius: 17px;
    background: #0b1020;
}

.ai-upload-shell .app-ai-theme-preview span {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    background: rgba(255,255,255,0.12);
}

.ai-upload-shell .app-ai-theme-preview b {
    position: absolute;
    left: 6px;
    top: 6px;
    z-index: 2;
    padding: 3px 7px;
    border-radius: 999px;
    color: #fff;
    background: rgba(15,23,42,0.72);
    font-size: 0.62rem;
}

.ai-upload-shell .app-ai-theme-preview span:last-child b {
    background: rgba(22,101,52,0.82);
}

.ai-upload-shell .app-ai-theme-preview img {
    display: block;
    width: 100%;
    height: 104px;
    object-fit: cover;
}

.ai-upload-shell .app-ai-theme-grid button > i {
    width: 48px;
    height: 48px;
    margin-bottom: 8px;
}

.ai-upload-shell .app-ai-theme-grid button strong {
    display: block;
    min-height: 42px;
    font-size: 1rem;
    line-height: 1.14;
}

.ai-upload-shell .app-ai-theme-price {
    align-self: auto;
    justify-self: start;
    display: inline-flex;
    min-height: 34px;
    margin-top: 8px;
    padding: 0 13px;
    border-radius: 999px;
    align-items: center;
    color: #fff;
    background: linear-gradient(135deg, #f97316, #c2410c);
    box-shadow: 0 10px 22px rgba(249,115,22,0.22);
    opacity: 1;
    font-weight: 900;
}

.ai-upload-shell .app-ai-theme-example-link {
    align-self: end;
    justify-self: stretch;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 38px;
    margin: 8px -2px -2px;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    opacity: 1;
    font-size: 0.78rem;
    font-weight: 900;
}

.ai-upload-shell .app-ai-theme-example-link i {
    display: inline-block;
    width: auto;
    height: auto;
    margin: 0;
    border-radius: 0;
    color: inherit;
    background: transparent;
    font-size: 0.95rem;
}

.ai-upload-shell .app-ai-examples {
    padding: 0;
    overflow: hidden;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.ai-upload-shell .app-ai-examples .profile-panel-title {
    padding: 0 4px;
    margin-bottom: 8px;
}

.ai-upload-shell .app-ai-example-strip {
    gap: 10px;
    margin-right: -14px;
    padding-right: 14px;
}

.ai-upload-shell .app-ai-example-card {
    flex-basis: 286px;
    padding: 10px;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(31,36,48,0.07);
}

.ai-upload-shell .app-ai-example-strip.single .app-ai-example-card {
    width: 100%;
}

.ai-upload-shell .app-ai-example-pair {
    min-height: 0;
    padding: 0;
    gap: 8px;
    border-radius: 18px;
    background: transparent;
    box-shadow: none;
}

.ai-upload-shell .app-ai-example-pair span {
    border-radius: 16px;
}

.ai-upload-shell .app-ai-example-pair img {
    height: 132px;
}

.ai-upload-shell .app-ai-example-strip.single .app-ai-example-pair img {
    height: 158px;
}

.ai-upload-shell .app-ai-create-card {
    border-color: rgba(20,184,166,0.2);
}

.ai-upload-shell .app-ai-upload-drop {
    min-height: 180px;
}

.bottom-nav {
    bottom: 0 !important;
    height: 64px !important;
    min-height: 64px !important;
    padding: 5px 8px 4px !important;
    align-items: end;
    overflow: visible;
}

.bottom-nav a {
    min-height: 54px;
    transform: none !important;
}

.pwa-build-version {
    position: absolute;
    left: auto;
    right: 8px;
    top: -15px;
    bottom: auto;
    z-index: 2;
    transform: none;
    padding: 1px 5px;
    border-radius: 999px;
    background: rgba(255,255,255,0.86);
    color: rgba(31,36,48,0.42);
    font-size: 0.62rem;
    font-weight: 800;
    pointer-events: none;
}

/* AI upload fixes v60 */
.ai-upload-shell .app-topbar {
    gap: 8px;
    padding-left: 12px;
    padding-right: 12px;
}

.ai-upload-shell .app-back-button {
    width: 38px;
    height: 38px;
}

.ai-upload-shell .app-back-button + .brand-chip {
    flex: 1 1 auto;
    justify-content: center;
    max-width: none;
    min-width: 0;
    margin-right: 0;
    padding: 6px 10px;
}

.ai-upload-shell .app-back-button + .brand-chip span {
    max-width: none;
    font-size: clamp(0.92rem, 3.8vw, 1.08rem);
    line-height: 1;
    letter-spacing: 0;
}

.ai-upload-shell .wallet-chip {
    flex: 0 0 auto;
    min-height: 38px;
    padding: 6px 10px;
}

.ai-upload-shell .app-ai-theme-example-link {
    cursor: pointer;
    touch-action: manipulation;
}

.ai-upload-shell .app-ai-theme-example-link:active {
    transform: translateY(1px) scale(0.99);
}

.app-ai-gallery-modal .app-ai-gallery-card {
    width: min(94vw, 560px);
    max-height: min(82dvh, 760px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.app-ai-gallery-modal {
    align-items: center;
    padding-top: calc(16px + env(safe-area-inset-top, 0px));
    padding-bottom: calc(78px + env(safe-area-inset-bottom, 0px));
}

.app-ai-gallery-modal .app-ai-gallery-card {
    transform: translateY(-3dvh);
}

.app-ai-gallery-modal .app-ai-gallery-card h2 {
    margin: -4px 42px 0 0;
    font-size: 1.35rem;
    line-height: 1.12;
}

.app-ai-gallery-list {
    display: grid;
    gap: 12px;
    overflow-y: auto;
    padding-right: 2px;
    -webkit-overflow-scrolling: touch;
}

.app-ai-gallery-item {
    padding: 10px;
    border-radius: 20px;
    background: linear-gradient(180deg, #ffffff, #f8fafc);
    border: 1px solid rgba(31,36,48,0.08);
}

.app-ai-gallery-item h3 {
    margin: 0 0 9px;
    color: #101828;
    font-size: 1rem;
    line-height: 1.18;
}

.app-ai-gallery-item .app-ai-example-pair {
    min-height: 0;
    padding: 0;
    gap: 8px;
    background: transparent;
    box-shadow: none;
}

.app-ai-gallery-item .app-ai-example-pair span {
    aspect-ratio: 3 / 4;
}

.app-ai-gallery-item .app-ai-example-pair img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* AI upload carousel rebuild v60 */
.ai-upload-shell .app-ai-upload-hero,
.ai-upload-shell .app-ai-flow {
    display: none !important;
}

.ai-upload-shell .app-ai-theme-grid {
    display: flex;
    gap: 14px;
    margin: 0 -15px;
    padding: 2px 15px 14px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 15px;
    -webkit-overflow-scrolling: touch;
}

.ai-upload-shell .app-ai-theme-grid::-webkit-scrollbar {
    display: none;
}

.ai-upload-shell .app-ai-theme-grid button {
    position: relative;
    display: flex;
    flex-direction: column;
    flex: 0 0 calc(100% - 8px);
    min-height: 560px;
    padding: 16px;
    scroll-snap-align: center;
    scroll-snap-stop: always;
}

.ai-upload-shell .app-ai-theme-grid button.active {
    background:
        radial-gradient(circle at 12% 8%, rgba(20,184,166,0.18), transparent 36%),
        linear-gradient(180deg, #ecfffb 0%, #fff8ef 100%) !important;
    border-color: #10b981 !important;
    box-shadow:
        0 0 0 3px rgba(16,185,129,0.18),
        0 18px 36px rgba(31,36,48,0.12) !important;
}

.ai-upload-shell .app-ai-theme-grid button.active::after {
    content: "";
    position: absolute;
    inset: 8px;
    border-radius: 18px;
    border: 1px solid rgba(16,185,129,0.22);
    pointer-events: none;
}

.ai-upload-shell .app-ai-theme-favorite {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid rgba(245,158,11,0.45);
    box-shadow: 0 8px 18px rgba(180,83,9,0.12);
    transition: transform 0.16s ease, background 0.16s ease;
}

.ai-upload-shell .app-ai-theme-favorite::before {
    content: "в…";
    position: absolute;
    left: 50%;
    top: 50%;
    color: #b45309;
    font-family: Arial, sans-serif;
    font-size: 1.82rem;
    font-weight: 900;
    line-height: 1;
    transform: translate(-50%, -51%);
}

.ai-upload-shell .app-ai-theme-favorite:active {
    transform: scale(0.94);
}

.ai-upload-shell .app-ai-theme-grid button.is-favorite .app-ai-theme-favorite {
    background: linear-gradient(135deg, #f59e0b, #f97316);
    border-color: transparent;
    box-shadow: 0 10px 22px rgba(249,115,22,0.28);
}

.ai-upload-shell .app-ai-theme-grid button.is-favorite .app-ai-theme-favorite::before {
    color: #fff;
}

.ai-upload-shell .app-ai-favorites-filter {
    display: inline-flex;
    align-items: center;
    margin-top: 12px;
}

.ai-upload-shell .app-ai-favorites-filter input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.ai-upload-shell .app-ai-favorites-filter span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 42px;
    padding: 0 14px;
    border-radius: 999px;
    color: #475467;
    background: #f4f6fb;
    border: 1px solid rgba(31,36,48,0.08);
    font-size: 0.88rem;
    font-weight: 900;
}

.ai-upload-shell .app-ai-favorites-filter input:checked + span {
    color: #fff;
    background: linear-gradient(135deg, #f59e0b, #f97316);
    border-color: transparent;
    box-shadow: 0 10px 22px rgba(249,115,22,0.22);
}

.ai-upload-shell .app-ai-theme-preview {
    align-self: stretch;
    width: 100%;
    box-sizing: border-box;
    min-height: 282px;
    max-height: none !important;
    margin: -4px 0 14px;
    padding: 9px;
}

.ai-upload-shell .app-ai-theme-preview img {
    height: 264px !important;
    object-fit: contain !important;
    background: rgba(255,255,255,0.08);
}

.ai-upload-shell .app-ai-theme-grid button > i {
    width: 72px;
    height: 72px;
    margin-bottom: 18px;
    font-size: 2rem;
}

.ai-upload-shell .app-ai-theme-grid button strong {
    min-height: auto;
    font-size: 1.2rem;
    line-height: 1.08;
}

.ai-upload-shell .app-ai-theme-description {
    display: block;
    margin-top: 8px;
    color: #667085;
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.28;
    text-align: left;
    display: -webkit-box;
    max-height: 3.58em;
    overflow: hidden;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.ai-upload-shell .app-ai-theme-price {
    min-height: 42px;
    margin-top: 0;
    padding: 0 18px;
    font-size: 1.05rem;
}

.ai-upload-shell .app-ai-theme-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    margin-top: 14px;
}

.ai-upload-shell .app-ai-theme-bottom {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    margin-top: auto;
}

.ai-upload-shell .app-ai-theme-count {
    flex: 0 0 auto;
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    border-radius: 999px;
    color: #475467;
    background: rgba(248,250,252,0.92);
    border: 1px solid rgba(31,36,48,0.08);
    font-size: 0.82rem;
    font-weight: 900;
    white-space: nowrap;
}

.ai-upload-shell .app-ai-theme-example-link {
    align-self: stretch;
    width: 100%;
    min-height: 46px;
    margin-top: 0;
    margin-bottom: 0;
    border-radius: 16px;
    font-size: 0.92rem;
    white-space: nowrap;
}

.ai-upload-shell .app-ai-theme-select-link {
    align-self: stretch;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 46px;
    border-radius: 16px;
    color: #0f766e;
    background: rgba(20,184,166,0.12);
    border: 1px solid rgba(20,184,166,0.24);
    font-size: 0.94rem;
    font-weight: 950;
    line-height: 1;
    white-space: nowrap;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.6);
}

.ai-upload-shell .app-ai-theme-select-link.active,
.ai-upload-shell .app-ai-theme-grid button.active .app-ai-theme-select-link {
    color: #fff;
    background: linear-gradient(135deg, #10b981, #14b8a6);
    border-color: transparent;
    box-shadow: 0 12px 22px rgba(20,184,166,0.22);
}

.ai-upload-shell .app-ai-selected-theme-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 2px 0 -4px;
    color: #667085;
    font-size: 0.78rem;
    font-weight: 850;
    line-height: 1.25;
    text-align: center;
}

.ai-upload-shell .app-ai-selected-theme-note span {
    color: #98a2b3;
}

.ai-upload-shell .app-ai-selected-theme-note strong {
    max-width: min(520px, 72vw);
    color: #263242;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.ai-upload-shell .app-ai-theme-controls {
    display: none;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 2px;
}

@media (min-width: 769px) {
    .ai-upload-shell .app-ai-theme-controls {
        display: flex;
    }
}

.ai-upload-shell .app-ai-theme-controls button {
    display: grid;
    place-items: center;
    width: 48px;
    height: 42px;
    border: 0;
    border-radius: 16px;
    color: #101828;
    background: #fff;
    box-shadow: 0 10px 24px rgba(31,36,48,0.1);
    font-size: 1.1rem;
}

.ai-upload-shell .app-ai-theme-controls [data-theme-home] {
    width: 56px;
    color: #fff;
    background: linear-gradient(135deg, #14b8a6, #6366f1);
}

.ai-upload-shell .app-ai-theme-controls button:active {
    transform: translateY(1px) scale(0.98);
}

.ai-chat-shell {
    background:
        linear-gradient(180deg, rgba(248,250,255,0.96), rgba(241,245,249,0.98)),
        radial-gradient(circle at 8% 0%, rgba(37,99,235,0.16), transparent 30%),
        radial-gradient(circle at 96% 8%, rgba(139,92,246,0.16), transparent 28%);
}

.ai-chat-main {
    display: grid;
    gap: 14px;
    padding: 12px 14px 92px;
}

.ai-chat-model-panel {
    padding: 10px;
}

.ai-chat-quick-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: stretch;
    gap: 10px;
}

.ai-chat-model-picker {
    min-width: 0;
    position: relative;
}

.ai-chat-model-picker summary {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) 18px;
    align-items: center;
    gap: 8px;
    min-height: 58px;
    padding: 8px 12px 8px 8px;
    border-radius: 20px;
    color: var(--ink);
    background: #f7f8fc;
    border: 1px solid rgba(31,36,48,0.08);
    list-style: none;
    cursor: pointer;
}

.ai-chat-model-picker summary .ai-chat-model-icon {
    grid-area: auto;
    width: 38px;
    height: 38px;
    margin-bottom: 0;
    border-radius: 14px;
}

.ai-chat-model-picker summary::-webkit-details-marker {
    display: none;
}

.ai-chat-model-picker summary small,
.ai-chat-model-picker summary strong {
    display: block;
    min-width: 0;
}

.ai-chat-model-picker summary > span:not(.ai-chat-model-icon) {
    display: block;
    min-width: 0;
    width: 100%;
}

.ai-chat-model-picker summary small {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.ai-chat-model-picker summary strong {
    margin-top: 2px;
    font-size: 0.96rem;
    line-height: 1.15;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.ai-chat-model-picker summary > .bi-chevron-down {
    color: #707786;
    transition: transform 0.18s ease;
}

.ai-chat-model-picker[open] summary > .bi-chevron-down {
    transform: rotate(180deg);
}

.ai-chat-new-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-width: 112px;
    min-height: 58px;
    padding: 0 14px;
    border: 0;
    border-radius: 20px;
    color: #fff;
    background: linear-gradient(135deg, #20bca5, #6672ff);
    box-shadow: 0 12px 22px rgba(80,100,230,0.22);
    font-weight: 850;
}

.ai-chat-control-card,
.ai-chat-window {
    padding: 16px;
    border-radius: 24px;
    background: rgba(255,255,255,0.9);
    border: 1px solid rgba(31,36,48,0.08);
    box-shadow: 0 16px 36px rgba(31,36,48,0.08);
}

.ai-chat-control-card .profile-panel-title,
.ai-chat-window-title {
    margin-bottom: 12px;
}

.ai-chat-icon-button,
.ai-chat-mini-action,
.ai-chat-composer button,
.ai-chat-message-actions button {
    border: 0;
    cursor: pointer;
}

.ai-chat-icon-button {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 16px;
    color: #fff;
    background: linear-gradient(135deg, #20bca5, #6672ff);
    box-shadow: 0 12px 22px rgba(80,100,230,0.22);
    font-size: 1.05rem;
}

.ai-chat-model-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.ai-chat-model-picker .ai-chat-model-grid {
    grid-template-columns: 1fr;
    max-height: min(42dvh, 340px);
    overflow-y: auto;
    margin-top: 10px;
    padding-right: 2px;
}

.ai-chat-model-card {
    min-width: 0;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    grid-template-areas:
        "icon title"
        "icon input"
        "icon output";
    column-gap: 10px;
    align-items: center;
    padding: 10px;
    border-radius: 20px;
    border: 1px solid rgba(31,36,48,0.08);
    background: #f7f8fc;
    text-align: left;
    color: var(--ink);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.ai-chat-model-card.active {
    border-color: rgba(102,114,255,0.65);
    background: #fff;
    box-shadow: 0 12px 24px rgba(102,114,255,0.16);
    transform: translateY(-1px);
}

.ai-chat-model-card .ai-chat-model-icon {
    grid-area: icon;
}

.ai-chat-model-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 15px;
    color: #fff;
    margin-bottom: 10px;
}

.ai-chat-model-card strong,
.ai-chat-model-card small {
    display: block;
    min-width: 0;
}

.ai-chat-model-card strong {
    grid-area: title;
    font-size: 0.95rem;
    line-height: 1.15;
}

.ai-chat-model-card small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.7rem;
    line-height: 1.25;
}

.ai-chat-model-card small:nth-of-type(1) {
    grid-area: input;
}

.ai-chat-model-card small:nth-of-type(2) {
    grid-area: output;
}

.ai-chat-history-card {
    padding-bottom: 12px;
}

.ai-chat-conversations {
    display: grid;
    gap: 9px;
    max-height: 260px;
    overflow-y: auto;
    padding-right: 2px;
}

.ai-chat-conversation {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 38px 38px;
    gap: 7px;
    align-items: center;
    padding: 7px;
    border-radius: 18px;
    border: 1px solid rgba(31,36,48,0.08);
    background: #f8f9fd;
}

.ai-chat-conversation.active {
    border-color: rgba(32,188,165,0.5);
    background: #fff;
}

.ai-chat-conversation-open {
    min-width: 0;
    padding: 4px;
    border: 0;
    background: transparent;
    text-align: left;
    color: inherit;
}

.ai-chat-conversation-open strong,
.ai-chat-conversation-open span {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.ai-chat-conversation-open strong {
    font-size: 0.9rem;
    line-height: 1.2;
}

.ai-chat-conversation-open span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.72rem;
}

.ai-chat-mini-action {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 14px;
    color: #5f6675;
    background: #fff;
}

.ai-chat-mini-action.danger {
    color: #b4232f;
    background: #fff0f1;
}

.ai-chat-window {
    display: grid;
    grid-template-rows: auto minmax(360px, 1fr);
    min-height: 480px;
}

.ai-chat-messages {
    min-height: 0;
    max-height: min(62dvh, 620px);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 2px 2px 4px;
}

.ai-chat-empty,
.ai-chat-empty-small {
    display: grid;
    place-items: center;
    text-align: center;
    gap: 8px;
    min-height: 170px;
    color: var(--muted);
    border: 1px dashed rgba(31,36,48,0.14);
    border-radius: 20px;
    background: #f8f9fd;
    padding: 18px;
}

.ai-chat-empty i {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 18px;
    color: #fff;
    background: linear-gradient(135deg, #20bca5, #6672ff);
    font-size: 1.5rem;
}

.ai-chat-empty strong {
    color: var(--ink);
    font-size: 1.1rem;
}

.ai-chat-empty-small {
    min-height: 72px;
    font-weight: 750;
}

.ai-chat-message {
    display: grid;
    gap: 6px;
    max-width: 92%;
}

.ai-chat-message.user {
    align-self: flex-end;
}

.ai-chat-message.assistant {
    align-self: flex-start;
}

.ai-chat-message-body {
    border-radius: 22px;
    padding: 12px 14px;
    box-shadow: 0 10px 22px rgba(31,36,48,0.08);
}

.ai-chat-message.user .ai-chat-message-body {
    color: #fff;
    background: linear-gradient(135deg, #242a3a, #6672ff);
    border-bottom-right-radius: 8px;
}

.ai-chat-message.assistant .ai-chat-message-body {
    color: var(--ink);
    background: #fff;
    border: 1px solid rgba(31,36,48,0.08);
    border-bottom-left-radius: 8px;
}

.ai-chat-message-body p {
    margin: 0;
    line-height: 1.5;
    white-space: normal;
    overflow-wrap: anywhere;
}

.ai-chat-message-body pre {
    overflow-x: auto;
    margin: 8px 0;
    padding: 10px;
    border-radius: 12px;
    color: #e5e7eb;
    background: #111827;
}

.ai-chat-message-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: 0.72rem;
    padding: 0 4px;
}

.ai-chat-message.user .ai-chat-message-actions {
    justify-content: flex-end;
}

.ai-chat-message-actions button {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 10px;
    color: #606879;
    background: #f3f5fa;
}

.ai-chat-composer {
    position: sticky;
    bottom: 0;
    z-index: 8;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 52px;
    gap: 10px;
    padding: 10px;
    border-radius: 24px;
    background: rgba(255,255,255,0.94);
    border: 1px solid rgba(31,36,48,0.08);
    box-shadow: 0 16px 34px rgba(31,36,48,0.12);
}

.ai-chat-composer textarea {
    width: 100%;
    min-height: 52px;
    max-height: 140px;
    resize: none;
    border: 0;
    outline: 0;
    border-radius: 18px;
    padding: 15px 14px;
    background: #f5f7fb;
    color: var(--ink);
    font-weight: 650;
    line-height: 1.35;
}

.ai-chat-composer button {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 18px;
    color: #fff;
    background: linear-gradient(135deg, #20bca5, #6672ff);
    box-shadow: 0 14px 24px rgba(80,100,230,0.24);
    font-size: 1.05rem;
}

.ai-chat-composer button:disabled {
    opacity: 0.72;
}

.ai-chat-loader,
.ai-chat-send-loader {
    display: inline-block;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 3px solid rgba(102,114,255,0.18);
    border-top-color: #6672ff;
    animation: aiChatSpin 0.82s linear infinite;
}

.ai-chat-send-loader {
    width: 20px;
    height: 20px;
    border-color: rgba(255,255,255,0.35);
    border-top-color: #fff;
}

@keyframes aiChatSpin {
    to { transform: rotate(360deg); }
}

body > .app-toast {
    position: fixed;
    left: 50%;
    bottom: 104px;
    z-index: 100;
    width: min(560px, calc(100% - 28px));
    transform: translate(-50%, 14px);
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

body > .app-toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

@media (max-width: 760px) {
    .ai-chat-quick-row {
        grid-template-columns: minmax(0, 1fr) 54px;
    }

    .ai-chat-new-button {
        min-width: 54px;
        width: 54px;
        padding: 0;
    }

    .ai-chat-new-button span {
        display: none;
    }
}

@media (max-width: 420px) {
    .ai-chat-main {
        padding-left: 12px;
        padding-right: 12px;
    }

    .ai-chat-model-grid {
        grid-template-columns: 1fr;
    }

    .ai-chat-window {
        min-height: 430px;
        grid-template-rows: auto minmax(300px, 1fr);
    }

    .ai-chat-message {
        max-width: 96%;
    }
}

.home-service-card.contacts i {
    background: linear-gradient(135deg, #16b8a7, #4f8cff);
}

.app-contact-main,
.app-shop-main,
.app-product-main,
.app-cart-main,
.app-checkout-main {
    display: grid;
    gap: 16px;
    width: 100%;
    min-width: 0;
}

.app-product-main {
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    max-width: 100%;
    overflow-x: hidden;
    padding-bottom: 142px;
}

.app-contact-hero,
.app-shop-hero,
.app-cart-summary {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 14px;
    border-radius: 28px;
    padding: 20px;
    color: #fff;
    background: linear-gradient(135deg, #182236, #13b8a9 52%, #6672ff);
    box-shadow: 0 16px 34px rgba(31, 36, 48, 0.16);
}

.app-shop-hero {
    display: block;
    align-items: stretch;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.app-shop-hero-empty {
    display: grid;
    place-items: center;
    min-height: 96px;
    text-align: center;
}

.app-shop-hero-empty span {
    color: rgba(255,255,255,0.88);
    font-size: 0.92rem;
    font-weight: 950;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.app-shop-hero > div {
    min-width: 0;
}

.app-shop-quick-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
    min-width: 0;
}

.app-contact-hero > i {
    display: grid;
    place-items: center;
    flex: 0 0 58px;
    width: 58px;
    height: 58px;
    border-radius: 20px;
    color: #fff;
    background: rgba(255,255,255,0.18);
    font-size: 1.5rem;
}

.app-contact-hero span,
.app-shop-hero span,
.app-cart-summary span,
.app-product-category {
    display: block;
    color: rgba(255,255,255,0.72);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.app-contact-hero h1,
.app-shop-hero h1,
.app-cart-summary h1 {
    margin: 4px 0 6px;
    font-size: clamp(1.75rem, 6vw, 2.35rem);
    line-height: 1;
}

.app-contact-hero p,
.app-shop-hero p {
    margin: 0;
    max-width: 520px;
    color: rgba(255,255,255,0.88);
    font-weight: 700;
    line-height: 1.35;
}

.app-contact-list,
.app-cart-list {
    display: grid;
    gap: 12px;
}

.app-contact-card,
.app-product-panel,
.app-contact-map,
.app-empty-card {
    border-radius: 24px;
    background: rgba(255,255,255,0.94);
    border: 1px solid rgba(31,36,48,0.08);
    box-shadow: 0 16px 34px rgba(31,36,48,0.08);
}

.app-contact-card {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 14px;
}

.app-contact-card > i {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 18px;
    color: #fff;
    background: linear-gradient(135deg, #20bca5, #6672ff);
    font-size: 1.25rem;
}

.app-contact-card span,
.app-section-heading span {
    display: block;
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.app-contact-card a,
.app-contact-card strong {
    display: block;
    margin-top: 4px;
    color: var(--ink);
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 850;
    line-height: 1.25;
}

.app-contact-map {
    overflow: visible;
    padding: 16px;
    margin-bottom: 12px;
}

.app-contact-map-frame {
    position: relative;
    overflow: hidden;
    min-height: 300px;
    margin-top: 12px;
    border-radius: 20px;
    background:
        linear-gradient(135deg, rgba(32,188,165,0.10), rgba(102,114,255,0.12)),
        #eef3f8;
}

.app-contact-map-fallback {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 8px;
    padding: 22px;
    color: #475467;
    text-align: center;
    font-weight: 850;
    background:
        radial-gradient(circle at 22% 18%, rgba(32,188,165,0.22), transparent 32%),
        radial-gradient(circle at 80% 76%, rgba(102,114,255,0.20), transparent 34%),
        #eef3f8;
}

.app-contact-map-fallback i {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 18px;
    color: #fff;
    background: linear-gradient(135deg, #20bca5, #6672ff);
    font-size: 1.35rem;
    box-shadow: 0 14px 26px rgba(80,100,230,0.20);
}

.app-contact-map-fallback strong {
    color: var(--ink);
    font-size: 1.08rem;
}

.app-contact-map-fallback span {
    max-width: 260px;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.25;
}

.app-contact-map-fallback.is-hidden {
    opacity: 0;
    pointer-events: none;
}

.app-contact-map-frame::before {
    content: "Р—Р°РіСЂСѓР¶Р°РµРј РєР°СЂС‚Сѓ...";
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #667085;
    font-weight: 900;
    z-index: 0;
}

.app-contact-map iframe {
    position: relative;
    z-index: 1;
    width: 100%;
    height: min(360px, 42vh);
    min-height: 300px;
    border: 0;
}

.app-contact-map-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    margin-top: 12px;
    border-radius: 16px;
    color: #fff;
    background: linear-gradient(135deg, #20bca5, #6672ff);
    font-weight: 900;
    box-shadow: 0 12px 24px rgba(80,100,230,0.22);
}

.contacts-shell .app-contact-main {
    display: block;
    min-height: 0;
    height: auto;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 150px !important;
}

.app-shop-cart-button,
.app-shop-orders-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    border-radius: 24px;
    color: #1f2430;
    background: rgba(255,255,255,0.92);
    text-decoration: none;
    padding: 12px;
    box-shadow: 0 12px 24px rgba(0,0,0,0.1);
    overflow: hidden;
}

.app-shop-cart-button i,
.app-shop-orders-button i {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 16px;
    color: #fff;
    background: linear-gradient(135deg, #242a3a, #6672ff);
    font-size: 1.5rem;
}

.app-shop-cart-button span {
    display: grid;
    gap: 2px;
}

.app-shop-cart-button strong,
.app-shop-orders-button strong {
    color: #1f2430;
    font-size: 0.96rem;
    line-height: 1.05;
    min-width: 0;
    overflow-wrap: anywhere;
}

.app-shop-cart-button small {
    color: var(--muted);
    font-weight: 800;
}

.app-shop-orders-button {
    justify-content: center;
}

.app-shop-orders-button i {
    background: linear-gradient(135deg, #ff7448, #ffae4a);
}

.app-shop-search {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border-radius: 22px;
    background: #fff;
    border: 1px solid rgba(31,36,48,0.08);
}

.app-shop-search i {
    text-align: center;
    color: var(--muted);
    font-size: 1.15rem;
}

.app-shop-search input,
.app-shop-sort select,
.app-checkout-form textarea {
    width: 100%;
    border: 0;
    outline: 0;
    border-radius: 16px;
    background: #f5f7fb;
    color: var(--ink);
    font-weight: 800;
    padding: 14px;
}

.app-shop-search button,
.app-load-more,
.app-primary-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 18px;
    padding: 14px 18px;
    color: #fff;
    text-decoration: none;
    font-weight: 900;
    background: linear-gradient(135deg, #20bca5, #6672ff);
    box-shadow: 0 12px 24px rgba(80,100,230,0.24);
}

.app-shop-filters {
    display: grid;
    gap: 12px;
}

.app-shop-cats {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
}

.app-shop-cats::-webkit-scrollbar {
    display: none;
}

.app-shop-cats a {
    flex: 0 0 auto;
    border-radius: 999px;
    padding: 12px 16px;
    color: var(--ink);
    background: #f2f4f8;
    border: 1px solid rgba(31,36,48,0.08);
    text-decoration: none;
    font-weight: 900;
}

.app-shop-cats a.active {
    color: #fff;
    background: linear-gradient(135deg, #102d3b, #1aa8a0);
}

.app-shop-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.app-shop-card {
    position: relative;
    display: grid;
    gap: 8px;
    min-width: 0;
    border-radius: 24px;
    padding: 10px;
    background: rgba(255,255,255,0.96);
    border: 1px solid rgba(31,36,48,0.08);
    box-shadow: 0 14px 28px rgba(31,36,48,0.08);
}

.app-shop-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    border-radius: 18px;
    background: #f0f2f7;
}

.app-shop-image img,
.app-product-gallery > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.app-shop-badge {
    position: absolute;
    left: 8px;
    top: 8px;
    border-radius: 999px;
    padding: 5px 8px;
    color: #fff;
    background: #ff6b42;
    font-size: 0.7rem;
    font-weight: 900;
}

.app-shop-wish,
.app-product-wish {
    display: grid;
    place-items: center;
    border: 0;
    color: #6d7484;
    background: #fff;
    box-shadow: 0 10px 20px rgba(31,36,48,0.1);
}

.app-shop-wish {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 38px;
    height: 38px;
    border-radius: 14px;
}

.app-shop-wish.active,
.app-product-wish.active {
    color: #ff5a66;
}

.app-shop-title {
    min-height: 42px;
    color: var(--ink);
    text-decoration: none;
    font-weight: 900;
    line-height: 1.15;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.app-shop-cat {
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 800;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.app-shop-card-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.app-shop-card-bottom strong {
    color: var(--ink);
    font-size: 1.05rem;
}

.app-shop-add {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 16px;
    color: #fff;
    background: linear-gradient(135deg, #ff7448, #ffae4a);
}

.app-shop-more {
    border-radius: 14px;
    padding: 10px 12px;
    color: #fff;
    background: #232b3c;
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 900;
}

.app-empty-card {
    grid-column: 1 / -1;
    display: grid;
    place-items: center;
    gap: 8px;
    min-height: 180px;
    padding: 22px;
    text-align: center;
    color: var(--muted);
}

.app-empty-card i {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 20px;
    color: #fff;
    background: linear-gradient(135deg, #20bca5, #6672ff);
    font-size: 1.45rem;
}

.app-empty-card strong {
    color: var(--ink);
    font-size: 1.2rem;
}

.app-product-gallery {
    overflow: hidden;
    border-radius: 28px;
    background: linear-gradient(145deg, #eef2f7, #ffffff 58%, #e7edf5);
    box-shadow: 0 16px 34px rgba(31,36,48,0.08);
    height: 360px;
    min-height: 360px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 10px;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: center;
    gap: 10px;
}

.app-product-gallery:has(.app-product-thumbs) {
    grid-template-columns: minmax(0, 1fr) 76px;
}

.app-product-gallery > img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: 100% !important;
    min-height: 0;
    max-height: 100%;
    border-radius: 22px;
    background: #e9eef5;
    object-fit: contain !important;
}

.app-product-thumbs {
    display: grid;
    gap: 8px;
    align-content: start;
    overflow-x: hidden;
    overflow-y: auto;
    height: 100%;
    padding: 2px;
    max-width: 100%;
    min-width: 0;
    scrollbar-width: none;
}

.app-product-thumbs::-webkit-scrollbar {
    display: none;
}

.app-product-thumbs button {
    overflow: hidden;
    width: 70px;
    height: 70px;
    border-radius: 16px;
    border: 2px solid transparent;
    background: #f2f4f8;
    padding: 0;
}

.app-product-thumbs img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    background: #e9eef5;
}

.app-product-thumbs button.active {
    border-color: #20bca5;
}

.app-product-panel {
    display: grid;
    align-content: start;
    gap: 14px;
    padding: 18px;
    width: 100%;
    min-width: 0;
    overflow: visible;
}

.app-product-panel > * {
    min-width: 0;
}

.app-product-category {
    color: var(--muted);
}

.app-product-panel h1,
.app-section-heading h2 {
    margin: 0;
    color: var(--ink);
    line-height: 1.08;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.app-product-panel h1 {
    font-size: clamp(1.45rem, 6vw, 2.25rem);
}

.app-product-panel .app-section-heading h2 {
    font-size: clamp(1.35rem, 5.5vw, 2rem);
}

.app-product-panel p {
    margin: 0;
    color: var(--muted);
    font-weight: 700;
    line-height: 1.4;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.app-product-price-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    min-width: 0;
}

.app-product-price-row strong {
    font-size: clamp(1.35rem, 5.4vw, 1.6rem);
    color: #ff6b42;
}

.app-product-price-row span {
    color: var(--muted);
    text-decoration: line-through;
    font-weight: 800;
}

.app-product-wish {
    margin-left: auto;
    width: 48px;
    height: 48px;
    border-radius: 16px;
}

.app-product-variation {
    display: grid;
    gap: 10px;
    min-width: 0;
}

.app-product-variation > strong {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.app-product-variation > div {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
}

.app-product-variation button,
.app-choice {
    border-radius: 18px;
    border: 1px solid rgba(31,36,48,0.1);
    background: #f5f7fb;
    color: var(--ink);
    font-weight: 900;
    padding: 12px 14px;
    min-width: 0;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.app-product-variation button.active {
    color: #fff;
    background: linear-gradient(135deg, #20bca5, #6672ff);
}

.app-product-variation button small {
    display: block;
    font-size: 0.72rem;
    opacity: 0.8;
}

.app-product-stock {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    border-radius: 999px;
    padding: 8px 12px;
    font-weight: 900;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
}

.app-product-stock.ok {
    color: #087a5e;
    background: #dffbf2;
}

.app-product-stock.bad {
    color: #a52222;
    background: #ffe5e5;
}

.app-product-qty {
    display: grid;
    grid-template-columns: 56px 1fr 56px;
    border-radius: 18px;
    overflow: hidden;
    background: #f5f7fb;
    max-width: 100%;
}

.app-product-qty button,
.app-product-qty input {
    border: 0;
    min-height: 52px;
    text-align: center;
    background: transparent;
    color: var(--ink);
    font-weight: 900;
    font-size: 1.1rem;
}

.app-product-attrs {
    display: grid;
    gap: 8px;
}

.app-product-attrs div {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    justify-content: space-between;
    gap: 12px;
    border-radius: 14px;
    padding: 12px;
    background: #f5f7fb;
    min-width: 0;
}

.app-product-attrs span,
.app-product-attrs strong {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.app-product-description {
    color: var(--muted);
    font-weight: 700;
    line-height: 1.45;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.app-product-description p {
    margin: 0 0 12px;
}

.app-product-description p:last-child {
    margin-bottom: 0;
}

.app-product-description-image {
    overflow: hidden;
    margin: 14px 0;
    border-radius: 20px;
    background: #f2f5fa;
    border: 1px solid rgba(31,36,48,0.08);
}

.app-product-description-image img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 520px;
    object-fit: contain;
}

.app-customize-panel {
    grid-template-columns: minmax(0, 1fr);
}

.app-customize-panel span,
.app-customizer-head span {
    display: block;
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.app-customize-panel h2,
.app-customizer-head h1 {
    margin: 4px 0 6px;
    color: var(--ink);
    line-height: 1.05;
}

.app-customize-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 54px;
    border-radius: 18px;
    color: #fff;
    text-decoration: none;
    font-weight: 950;
    background: linear-gradient(135deg, #20bca5, #6672ff);
    box-shadow: 0 14px 28px rgba(80,100,230,0.22);
}

.app-customizer-main {
    display: grid;
    gap: 14px;
    padding-bottom: 142px;
}

.app-customizer-templates {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
}

.app-customizer-templates::-webkit-scrollbar {
    display: none;
}

.app-customizer-templates button {
    flex: 0 0 auto;
    border: 1px solid rgba(31,36,48,0.08);
    border-radius: 999px;
    padding: 12px 16px;
    color: var(--ink);
    background: #fff;
    font-weight: 900;
}

.app-customizer-templates button.active {
    color: #fff;
    background: linear-gradient(135deg, #102d3b, #20bca5);
}

.app-customizer-stage {
    overflow: hidden;
    border-radius: 26px;
    padding: 14px;
    background: linear-gradient(145deg, #eef2f7, #fff);
    box-shadow: 0 16px 34px rgba(31,36,48,0.08);
    text-align: center;
    min-height: 360px;
}

.app-customizer-canvas-wrap {
    display: inline-block;
    width: 100%;
    border-radius: 18px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 12px 24px rgba(31,36,48,0.12);
}

.app-customizer-canvas-wrap canvas,
.app-customizer-canvas-wrap .canvas-container,
.app-customizer-canvas-wrap .lower-canvas,
.app-customizer-canvas-wrap .upper-canvas {
    display: block !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    touch-action: none;
}

.app-customizer-tools {
    gap: 12px;
}

.app-custom-upload {
    display: grid;
    place-items: center;
    gap: 8px;
    min-height: 156px;
    border-radius: 22px;
    border: 2px dashed rgba(32,188,165,0.34);
    background: rgba(32,188,165,0.06);
    color: var(--ink);
    font-weight: 950;
    text-align: center;
}

.app-custom-upload i {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border-radius: 22px;
    color: #fff;
    background: linear-gradient(135deg, #20bca5, #6672ff);
    font-size: 1.7rem;
}

.app-custom-upload small {
    color: var(--muted);
    font-weight: 800;
}

.app-customizer-tool-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.app-customizer-tool-row button {
    display: grid;
    place-items: center;
    gap: 5px;
    min-height: 72px;
    border: 0;
    border-radius: 18px;
    color: var(--ink);
    background: #f5f7fb;
    font-weight: 900;
}

.app-customizer-tool-row button i {
    font-size: 1.25rem;
    color: #20a99a;
}

.app-cancel-reason {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    margin-top: 12px;
    padding: 12px;
    border-radius: 18px;
    color: #8f1d1d;
    background: #fff1f1;
    border: 1px solid rgba(220, 38, 38, 0.16);
}

.app-cancel-reason > i {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, #ef4444, #f97316);
}

.app-cancel-reason strong,
.app-cancel-reason span,
.app-cancel-reason small {
    display: block;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.app-cancel-reason strong {
    color: #7f1d1d;
    font-weight: 950;
}

.app-cancel-reason span {
    margin-top: 3px;
    color: #991b1b;
    font-weight: 780;
    line-height: 1.35;
}

.app-cancel-reason small {
    margin-top: 6px;
    color: #b45309;
    font-weight: 800;
}

.app-cart-summary {
    display: grid;
    color: #fff;
}

.app-cart-summary div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.app-cart-summary strong {
    font-size: 1.25rem;
}

.app-cart-item {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr) 48px;
    gap: 12px;
    align-items: center;
    border-radius: 24px;
    padding: 10px;
    background: #fff;
    border: 1px solid rgba(31,36,48,0.08);
    box-shadow: 0 12px 24px rgba(31,36,48,0.07);
}

.app-cart-item img {
    width: 92px;
    height: 92px;
    border-radius: 18px;
    object-fit: cover;
    background: #f2f4f8;
}

.app-cart-item a {
    color: var(--ink);
    text-decoration: none;
    font-weight: 900;
}

.app-cart-item span {
    display: block;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 800;
}

.app-cart-item strong {
    display: block;
    margin: 4px 0;
    color: #ff6b42;
}

.app-cart-qty {
    display: inline-grid;
    grid-template-columns: 34px 48px 34px;
    overflow: hidden;
    border-radius: 14px;
    background: #f5f7fb;
}

.app-cart-qty button,
.app-cart-qty input,
.app-cart-remove {
    border: 0;
    min-height: 34px;
    text-align: center;
    background: transparent;
    color: var(--ink);
    font-weight: 900;
}

.app-cart-remove {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    color: #b42323;
    background: #fff0f0;
}

.app-cart-actions {
    display: grid;
    gap: 10px;
}

.app-cart-actions button {
    border: 0;
    border-radius: 18px;
    padding: 14px;
    color: #b42323;
    background: #fff0f0;
    font-weight: 900;
}

.app-checkout-form {
    display: grid;
    gap: 14px;
}

.app-choice {
    display: flex;
    align-items: center;
    gap: 12px;
}

.app-choice input {
    width: 22px;
    height: 22px;
    accent-color: #20bca5;
}

.app-choice span {
    display: grid;
    gap: 2px;
}

.app-choice small {
    color: var(--muted);
}

.app-error-banner {
    border-radius: 20px;
    padding: 16px;
    color: #9d1d1d;
    background: #ffe1e1;
    font-weight: 900;
}

@media (min-width: 760px) {
    .app-shop-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .app-shop-quick-actions {
        grid-template-columns: minmax(128px, 0.7fr) minmax(140px, 1fr);
    }

}

@media (min-width: 900px) {
    .app-product-main {
        grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
        align-items: start;
    }

    .app-product-gallery {
        position: sticky;
        top: 90px;
        height: 520px;
        min-height: 520px;
    }
}

@media (max-width: 430px) {
    .app-shop-main,
    .app-contact-main,
    .app-product-main,
    .app-cart-main,
    .app-checkout-main {
        gap: 12px;
    }

    .app-shop-grid {
        gap: 10px;
    }

    .app-shop-card {
        border-radius: 20px;
        padding: 8px;
    }

    .app-shop-title {
        font-size: 0.92rem;
    }

    .app-contact-hero,
    .app-shop-hero {
        padding: 16px;
    }

    .app-shop-cart-button {
        min-width: 86px;
    }

    .app-product-gallery {
        border-radius: 24px;
        height: 300px;
        min-height: 300px;
        padding: 8px;
        gap: 8px;
    }

    .app-product-gallery:has(.app-product-thumbs) {
        grid-template-columns: minmax(0, 1fr) 64px;
    }

    .app-product-gallery > img {
        height: 100% !important;
        min-height: 0;
        max-height: none;
    }

    .app-product-thumbs button {
        width: 58px;
        height: 58px;
        border-radius: 14px;
    }

    .app-product-panel {
        border-radius: 22px;
        padding: 16px;
    }
}

/* v119 mobile shell hotfix */
html, body { overflow-x: hidden !important; }
body.pwa-shell { width: 100vw !important; max-width: 100vw !important; overflow-x: hidden !important; }
.app-frame { width: 100vw !important; max-width: 100vw !important; margin: 0 auto !important; overflow-x: hidden !important; }
.app-topbar { width: 100%; max-width: 100vw; box-sizing: border-box; }
.wallet-chip, .login-chip {
    color: #1f2430 !important;
    background: rgba(255,255,255,0.92) !important;
    border: 1px solid rgba(31,36,48,0.08) !important;
    box-shadow: 0 10px 24px rgba(31,36,48,0.10) !important;
}
.wallet-chip *, .login-chip * { color: #1f2430 !important; }
.wallet-chip { min-width: 96px; }
.bottom-nav {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    max-width: none !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 70px !important;
    transform: none !important;
    box-sizing: border-box !important;
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 0 !important;
    padding: 7px 6px calc(7px + env(safe-area-inset-bottom, 0px)) !important;
    overflow: visible !important;
    background: rgba(255,255,255,0.96) !important;
}
.bottom-nav a {
    min-width: 0 !important;
    min-height: 56px !important;
    width: auto !important;
    padding: 4px 0 !important;
    font-size: 0.72rem !important;
    line-height: 1.05 !important;
    transform: none !important;
}
.bottom-nav i { font-size: 1.24rem !important; }
.bottom-nav span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.pwa-build-version {
    right: 10px !important;
    top: -18px !important;
    bottom: auto !important;
    transform: none !important;
}
.app-main { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)) !important; }

/* v120 bottom nav vertical fix */
.bottom-nav {
    bottom: 0 !important;
    min-height: 84px !important;
    height: 84px !important;
    padding: 8px 6px 0 !important;
    align-items: end !important;
    align-content: end !important;
}
.bottom-nav a {
    height: 68px !important;
    min-height: 68px !important;
    align-self: end !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    padding: 3px 0 5px !important;
    border-radius: 18px !important;
}
.bottom-nav i {
    display: block !important;
    line-height: 1 !important;
    font-size: 1.26rem !important;
}
.bottom-nav span {
    display: block !important;
    line-height: 1.08 !important;
    font-size: 0.72rem !important;
}
.pwa-build-version {
    top: -24px !important;
    right: 12px !important;
}
.app-main {
    padding-bottom: 88px !important;
}

/* pwa update prompt */
.pwa-update-banner {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(92px + env(safe-area-inset-bottom, 0px));
    z-index: 120;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    max-width: 640px;
    margin: 0 auto;
    padding: 12px;
    border-radius: 22px;
    background: rgba(255,255,255,0.96);
    border: 1px solid rgba(31,36,48,0.08);
    box-shadow: 0 18px 42px rgba(31,36,48,0.18);
    transform: translateY(18px);
    opacity: 0;
    pointer-events: none;
    transition: transform .22s ease, opacity .22s ease;
}
.pwa-update-banner.show {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}
.pwa-update-text {
    display: grid;
    gap: 2px;
    min-width: 0;
}
.pwa-update-text strong {
    color: #1f2430;
    font-weight: 900;
    font-size: 0.96rem;
}
.pwa-update-text span {
    color: #6d7280;
    font-weight: 750;
    font-size: 0.78rem;
    line-height: 1.25;
}
.pwa-update-banner button {
    min-height: 44px;
    border: 0;
    border-radius: 16px;
    padding: 0 16px;
    color: #fff;
    background: linear-gradient(135deg,#20bca5,#6672ff);
    font-weight: 900;
    box-shadow: 0 10px 22px rgba(48,93,232,0.24);
}
.pwa-update-banner button:disabled {
    opacity: .72;
}
@media (max-width: 380px) {
    .pwa-update-banner {
        grid-template-columns: 1fr;
    }
    .pwa-update-banner button {
        width: 100%;
    }
}

/* v122 compact full-width bottom nav */
.bottom-nav {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 100% !important;
    height: calc(66px + env(safe-area-inset-bottom, 0px)) !important;
    min-height: 0 !important;
    transform: none !important;
    box-sizing: border-box !important;
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    align-items: start !important;
    align-content: start !important;
    gap: 0 !important;
    padding: 4px 0 env(safe-area-inset-bottom, 0px) !important;
    margin: 0 !important;
    overflow: visible !important;
    background: rgba(255,255,255,0.98) !important;
    border-radius: 0 !important;
    border-top: 1px solid rgba(31,36,48,0.08) !important;
}
.bottom-nav a {
    width: 100% !important;
    min-width: 0 !important;
    height: 58px !important;
    min-height: 58px !important;
    align-self: start !important;
    justify-self: stretch !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    padding: 2px 0 3px !important;
    margin: 0 !important;
    border-radius: 14px !important;
    font-size: 0.70rem !important;
    line-height: 1.05 !important;
}
.bottom-nav a.active {
    background: linear-gradient(180deg, #fff7f2, #fff0ea) !important;
}
.bottom-nav i {
    font-size: 1.20rem !important;
    line-height: 1 !important;
}
.bottom-nav span {
    max-width: 100% !important;
    line-height: 1.05 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}
.pwa-build-version {
    top: -22px !important;
    right: 10px !important;
}
.app-main {
    padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)) !important;
}
.pwa-update-banner {
    bottom: 78px !important;
}

/* v123 rebuilt bottom navigation */
.bottom-nav {
    position: fixed !important;
    inset: auto 0 0 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 80 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    min-width: 100vw !important;
    height: 64px !important;
    min-height: 64px !important;
    max-height: 64px !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    align-items: stretch !important;
    justify-items: stretch !important;
    gap: 0 !important;
    overflow: hidden !important;
    background: #ffffff !important;
    border-radius: 0 !important;
    border: 0 !important;
    border-top: 1px solid rgba(31,36,48,0.10) !important;
    box-shadow: 0 -8px 26px rgba(31,36,48,0.08) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}
.bottom-nav a {
    position: relative !important;
    width: 100% !important;
    height: 64px !important;
    min-height: 64px !important;
    max-height: 64px !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 5px 0 4px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: #666d78 !important;
    font-size: 11px !important;
    font-weight: 850 !important;
    line-height: 1 !important;
    text-align: center !important;
    transform: none !important;
    box-shadow: none !important;
}
.bottom-nav a.active {
    color: #df6a55 !important;
    background: #fff3ee !important;
}
.bottom-nav a.active::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    width: 28px;
    height: 3px;
    border-radius: 999px;
    transform: translateX(-50%);
    background: #df6a55;
}
.bottom-nav i {
    display: block !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 21px !important;
    line-height: 1 !important;
    color: currentColor !important;
}
.bottom-nav span {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 2px !important;
    margin: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    line-height: 1.05 !important;
    color: currentColor !important;
}
.pwa-build-version {
    position: fixed !important;
    right: 8px !important;
    bottom: 68px !important;
    top: auto !important;
    left: auto !important;
    z-index: 82 !important;
    transform: none !important;
    padding: 1px 6px !important;
    border-radius: 999px !important;
    background: rgba(255,255,255,0.90) !important;
    color: rgba(31,36,48,0.45) !important;
    font-size: 11px !important;
    font-weight: 900 !important;
    line-height: 1.2 !important;
    pointer-events: none !important;
}
.app-main {
    padding-bottom: 72px !important;
}
.pwa-update-banner {
    bottom: 76px !important;
}

/* v164 favorites and services app pages */
.app-section-main{display:grid;gap:14px}
.app-section-hero{display:grid;grid-template-columns:72px minmax(0,1fr);align-items:center;gap:14px;padding:20px;border-radius:28px;color:#fff;background:linear-gradient(135deg,#172033,#20bca5 58%,#6672ff);box-shadow:0 18px 42px rgba(31,36,48,.14);overflow:hidden}
.app-section-hero.favorites{background:linear-gradient(135deg,#261827,#ef5da8 48%,#ff8a48)}
.app-section-hero.services{background:linear-gradient(135deg,#132236,#20bca5 45%,#6672ff)}
.app-section-hero>i{display:grid;place-items:center;width:68px;height:68px;border-radius:23px;background:rgba(255,255,255,.18);font-size:2rem}
.app-section-hero h1{margin:2px 0 6px;font-size:2rem;line-height:1.02}
.app-section-hero span{display:block;color:rgba(255,255,255,.84);font-weight:750;line-height:1.3}
.app-empty-card{display:grid;place-items:center;text-align:center;gap:10px;padding:28px 18px;border-radius:26px;background:rgba(255,255,255,.96);border:1px solid rgba(31,36,48,.08);box-shadow:0 16px 34px rgba(31,36,48,.08);color:#1f2430}
.app-empty-card>i{display:grid;place-items:center;width:62px;height:62px;border-radius:22px;color:#fff;background:linear-gradient(135deg,#20bca5,#6672ff);font-size:1.8rem}
.app-empty-card strong{font-size:1.2rem}.app-empty-card span{color:#747b88;font-weight:750}
.app-primary-link{display:inline-grid;place-items:center;min-height:46px;padding:0 18px;border-radius:16px;color:#fff!important;background:linear-gradient(135deg,#20bca5,#6672ff);font-weight:900}
.app-favorite-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.app-favorite-card{position:relative;display:grid;overflow:hidden;border-radius:24px;background:rgba(255,255,255,.96);border:1px solid rgba(31,36,48,.08);box-shadow:0 14px 30px rgba(31,36,48,.08);transition:opacity .18s ease,transform .18s ease}
.app-favorite-image{display:block;aspect-ratio:1/1;background:#eef2f7;overflow:hidden}.app-favorite-image img{width:100%;height:100%;object-fit:cover;display:block}
.app-favorite-remove{position:absolute;top:9px;right:9px;display:grid;place-items:center;width:38px;height:38px;border:0;border-radius:14px;color:#b4232c;background:rgba(255,237,237,.94);box-shadow:0 10px 22px rgba(31,36,48,.12);font-size:1.1rem}
.app-favorite-body{display:grid;gap:9px;padding:12px}.app-favorite-body strong{display:-webkit-box;min-height:2.35em;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:2;font-size:.96rem;line-height:1.18;color:#1f2430}
.app-favorite-price{display:flex;align-items:center;gap:7px;flex-wrap:wrap}.app-favorite-price b{color:#e46d57;font-size:1.1rem}.app-favorite-price span{color:#9aa1ad;text-decoration:line-through;font-weight:800}
.app-favorite-cart,.app-favorite-open{display:grid;place-items:center;min-height:42px;border:0;border-radius:15px;color:#fff!important;background:linear-gradient(135deg,#20bca5,#6672ff);font-weight:900;text-align:center}
.app-service-list,.app-orders-list{display:grid;gap:12px}
.app-service-card,.app-order-row{display:grid;grid-template-columns:58px minmax(0,1fr);gap:12px;align-items:center;padding:14px;border-radius:24px;background:rgba(255,255,255,.96);border:1px solid rgba(31,36,48,.08);box-shadow:0 14px 30px rgba(31,36,48,.08)}
.app-service-card>i{display:grid;place-items:center;width:56px;height:56px;border-radius:20px;color:#fff;background:linear-gradient(135deg,#20bca5,#6672ff);font-size:1.42rem}
.app-service-card strong,.app-order-row strong{display:block;color:#1f2430;font-size:1.05rem;line-height:1.16}.app-service-card span,.app-order-row span{display:-webkit-box;margin-top:4px;color:#737b88;font-weight:750;line-height:1.25;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:2}
.app-service-card b{grid-column:2;justify-self:start;padding:7px 12px;border-radius:999px;color:#e46d57;background:#fff2eb;font-size:.82rem}
.app-text-panel,.app-service-form,.app-service-examples,.app-order-detail,.app-status-filter{padding:16px;border-radius:24px;background:rgba(255,255,255,.96);border:1px solid rgba(31,36,48,.08);box-shadow:0 14px 30px rgba(31,36,48,.08)}
.app-service-examples{display:grid;gap:10px}.app-service-examples>div{display:flex;gap:10px;overflow-x:auto;padding-bottom:3px}.app-service-examples img{width:126px;height:126px;border-radius:18px;object-fit:cover;flex:0 0 auto;background:#eef2f7}
.app-service-form{display:grid;gap:12px}.app-service-form label{display:grid;gap:7px}.app-service-form label span{font-weight:950;color:#1f2430}
.app-service-form input,.app-service-form textarea,.app-service-form select{width:100%;min-height:48px;border:1px solid rgba(31,36,48,.12);border-radius:16px;background:#f7f8fb;padding:11px 13px;font:inherit;font-weight:750;color:#1f2430}.app-service-form textarea{min-height:96px;resize:vertical}.app-service-form small{color:#7a8393;font-weight:700}
.app-status-filter{display:flex;gap:8px;overflow-x:auto}.app-status-filter a{flex:0 0 auto;display:grid;place-items:center;min-height:40px;padding:0 14px;border-radius:999px;background:#f6f8fb;border:1px solid rgba(31,36,48,.08);font-weight:900;color:#1f2430}.app-status-filter a.active{color:#fff;background:linear-gradient(135deg,#173042,#20bca5)}
.app-order-row{grid-template-columns:minmax(0,1fr) auto}.app-order-row small{display:inline-block;margin-top:8px;color:#e46d57;font-weight:950}
.app-status{display:inline-grid;place-items:center;min-height:34px;padding:0 10px;border-radius:999px;font-size:.78rem;white-space:nowrap}.app-status.info{color:#115e85;background:#e0f2fe}.app-status.warn{color:#92400e;background:#fef3c7}.app-status.success{color:#047857;background:#d1fae5}.app-status.danger{color:#991b1b;background:#fee2e2}
.app-order-detail{display:grid;gap:14px}.app-order-detail-head{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:start}.app-order-detail h1{margin:0 0 4px;font-size:1.75rem}.app-order-detail-head span,.app-order-meta span{color:#737b88;font-weight:800}
.app-order-meta{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.app-order-meta span{display:flex;gap:7px;align-items:center;min-height:42px;padding:0 11px;border-radius:15px;background:#f7f8fb}
.app-order-fields{display:grid;gap:9px}.app-order-fields>div{display:grid;gap:5px;padding:12px;border-radius:16px;background:#f7f8fb}.app-order-fields span{color:#7a8393;font-weight:900;font-size:.82rem}.app-order-fields strong{color:#1f2430;line-height:1.35}.app-order-fields a{color:#2563eb;font-weight:900}
.app-comments-list{display:grid;gap:9px}.app-comments-list article{display:grid;gap:4px;padding:12px;border-radius:16px;background:#f7f8fb}.app-comments-list article span{color:#7a8393;font-size:.8rem;font-weight:850}.app-comments-list p{margin:0;line-height:1.35}
.home-rubric-card.favorites>i{background:linear-gradient(135deg,#ef5da8,#ff8a48)}.home-rubric-card.services>i{background:linear-gradient(135deg,#20bca5,#6672ff)}.home-rubric-card.service-orders>i{background:linear-gradient(135deg,#172033,#20bca5)}
.app-shop-favorites-button{display:flex;align-items:center;gap:10px;min-height:58px;padding:10px 12px;border-radius:20px;background:rgba(255,255,255,.96);border:1px solid rgba(31,36,48,.08);box-shadow:0 12px 26px rgba(31,36,48,.08);font-weight:950}.app-shop-favorites-button i{display:grid;place-items:center;width:38px;height:38px;border-radius:14px;color:#fff;background:linear-gradient(135deg,#ef5da8,#ff8a48)}
@media(max-width:430px){.app-section-hero{grid-template-columns:60px minmax(0,1fr);padding:17px;border-radius:26px}.app-section-hero>i{width:58px;height:58px;border-radius:20px;font-size:1.65rem}.app-section-hero h1{font-size:1.65rem}.app-favorite-grid{grid-template-columns:1fr 1fr;gap:10px}.app-service-card,.app-order-row{border-radius:22px}}

/* v164 force bottom nav into iPhone rounded area. This must stay last. */
body.pwa-shell::after,
.bottom-nav::after {
    display: none !important;
    content: none !important;
    height: 0 !important;
}

.bottom-nav {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: -18px !important;
    z-index: 220 !important;
    width: 100vw !important;
    min-width: 100vw !important;
    max-width: 100vw !important;
    height: 86px !important;
    min-height: 86px !important;
    max-height: 86px !important;
    padding: 0 12px 22px !important;
    margin: 0 !important;
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 0 !important;
    align-items: end !important;
    justify-items: stretch !important;
    overflow: visible !important;
    background: rgba(255,255,255,.98) !important;
    border-top: 1px solid rgba(31,36,48,.08) !important;
    box-shadow: 0 -14px 34px rgba(31,36,48,.10) !important;
    -webkit-backdrop-filter: blur(18px) !important;
    backdrop-filter: blur(18px) !important;
    transform: translateZ(0) !important;
    transition: none !important;
}

.bottom-nav a {
    height: 54px !important;
    min-height: 54px !important;
    max-height: 54px !important;
    margin: 5px 0 !important;
    align-self: end !important;
    transform: translateY(8px) !important;
}

.app-main {
    padding-bottom: 86px !important;
}

body.news-shell .app-main,
body.contacts-shell .app-main {
    padding-bottom: 128px !important;
}

.pwa-update-banner {
    bottom: 86px !important;
}

/* v164 bottom nav: occupy iPhone safe area instead of floating above it. */
body.pwa-shell::after,
.bottom-nav::after {
    display: none !important;
    content: none !important;
    height: 0 !important;
}

.bottom-nav {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: calc(-1 * env(safe-area-inset-bottom, 0px)) !important;
    z-index: 180 !important;
    width: 100vw !important;
    min-width: 100vw !important;
    max-width: 100vw !important;
    height: calc(64px + env(safe-area-inset-bottom, 0px)) !important;
    min-height: calc(64px + env(safe-area-inset-bottom, 0px)) !important;
    max-height: none !important;
    padding: 0 12px env(safe-area-inset-bottom, 0px) !important;
    margin: 0 !important;
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 0 !important;
    align-items: end !important;
    justify-items: stretch !important;
    overflow: hidden !important;
    background: rgba(255,255,255,.98) !important;
    border-top: 1px solid rgba(31,36,48,.08) !important;
    box-shadow: 0 -14px 34px rgba(31,36,48,.10) !important;
    transform: translateZ(0) !important;
    transition: none !important;
    -webkit-backdrop-filter: blur(18px) !important;
    backdrop-filter: blur(18px) !important;
}

.bottom-nav a {
    height: 54px !important;
    min-height: 54px !important;
    max-height: 54px !important;
    margin: 5px 0 !important;
    align-self: end !important;
}

.app-main {
    padding-bottom: calc(74px + env(safe-area-inset-bottom, 0px)) !important;
}

body.news-shell .app-main,
body.contacts-shell .app-main {
    padding-bottom: calc(118px + env(safe-area-inset-bottom, 0px)) !important;
}

.pwa-update-banner {
    bottom: calc(78px + env(safe-area-inset-bottom, 0px)) !important;
}

/* v164 contacts map visibility and scroll fix */
body.contacts-shell .app-frame {
    overflow: hidden !important;
}

body.contacts-shell .app-main {
    display: block !important;
    height: auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    padding-bottom: 150px !important;
}

body.contacts-shell .app-contact-map {
    display: block !important;
    overflow: visible !important;
    margin-bottom: 14px !important;
}

body.contacts-shell .app-contact-map-frame {
    min-height: 300px !important;
    height: 300px !important;
}

body.contacts-shell .app-contact-map iframe {
    display: block !important;
    width: 100% !important;
    height: 300px !important;
    min-height: 300px !important;
    background: transparent !important;
}

/* v124 bottom nav reaches iPhone edge */
.bottom-nav {
    position: fixed !important;
    inset: auto 0 0 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    min-width: 100vw !important;
    height: calc(64px + env(safe-area-inset-bottom, 0px)) !important;
    min-height: calc(64px + env(safe-area-inset-bottom, 0px)) !important;
    max-height: none !important;
    padding: 0 0 env(safe-area-inset-bottom, 0px) !important;
    margin: 0 !important;
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    align-items: start !important;
    justify-items: stretch !important;
    overflow: hidden !important;
    background: #ffffff !important;
    border-top: 1px solid rgba(31,36,48,0.10) !important;
    box-shadow: 0 -8px 26px rgba(31,36,48,0.08) !important;
}
.bottom-nav::after {
    content: '';
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: env(safe-area-inset-bottom, 0px);
    background: #ffffff;
    pointer-events: none;
}
.bottom-nav a {
    height: 64px !important;
    min-height: 64px !important;
    max-height: 64px !important;
    z-index: 1 !important;
}
.pwa-build-version {
    bottom: calc(68px + env(safe-area-inset-bottom, 0px)) !important;
}
.app-main {
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)) !important;
}
.pwa-update-banner {
    bottom: calc(76px + env(safe-area-inset-bottom, 0px)) !important;
}

/* v125 iPhone bottom dock */
:root {
    --pwa-dock-extra: max(26px, env(safe-area-inset-bottom, 0px));
    --pwa-dock-button-height: 64px;
}
body.pwa-shell::after {
    content: '';
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: var(--pwa-dock-extra);
    z-index: 79;
    background: #ffffff;
    pointer-events: none;
}
.bottom-nav {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 80 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    min-width: 100vw !important;
    height: calc(var(--pwa-dock-button-height) + var(--pwa-dock-extra)) !important;
    min-height: calc(var(--pwa-dock-button-height) + var(--pwa-dock-extra)) !important;
    max-height: none !important;
    padding: 0 0 var(--pwa-dock-extra) !important;
    margin: 0 !important;
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    align-items: end !important;
    justify-items: stretch !important;
    gap: 0 !important;
    overflow: hidden !important;
    background: #ffffff !important;
    border-top: 1px solid rgba(31,36,48,0.10) !important;
    box-shadow: 0 -8px 26px rgba(31,36,48,0.08) !important;
}
.bottom-nav::after {
    content: '';
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: var(--pwa-dock-extra);
    background: #ffffff;
    pointer-events: none;
}
.bottom-nav a {
    height: var(--pwa-dock-button-height) !important;
    min-height: var(--pwa-dock-button-height) !important;
    max-height: var(--pwa-dock-button-height) !important;
    align-self: end !important;
    z-index: 1 !important;
}
.pwa-build-version {
    bottom: calc(var(--pwa-dock-button-height) + var(--pwa-dock-extra) + 4px) !important;
}
.app-main {
    padding-bottom: calc(var(--pwa-dock-button-height) + var(--pwa-dock-extra) + 8px) !important;
}
.pwa-update-banner {
    bottom: calc(var(--pwa-dock-button-height) + var(--pwa-dock-extra) + 12px) !important;
}

/* v126 lower iPhone bottom nav */
:root {
    --pwa-dock-extra: 8px;
    --pwa-dock-button-height: 64px;
}
body.pwa-shell::after {
    content: '';
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: var(--pwa-dock-extra);
    z-index: 79;
    background: #ffffff;
    pointer-events: none;
}
.bottom-nav {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 80 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    min-width: 100vw !important;
    height: calc(var(--pwa-dock-button-height) + var(--pwa-dock-extra)) !important;
    min-height: calc(var(--pwa-dock-button-height) + var(--pwa-dock-extra)) !important;
    max-height: none !important;
    padding: 0 0 var(--pwa-dock-extra) !important;
    margin: 0 !important;
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    align-items: end !important;
    justify-items: stretch !important;
    gap: 0 !important;
    overflow: hidden !important;
    background: #ffffff !important;
    border-top: 1px solid rgba(31,36,48,0.10) !important;
    box-shadow: 0 -8px 26px rgba(31,36,48,0.08) !important;
}
.bottom-nav::after {
    content: '';
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: var(--pwa-dock-extra);
    background: #ffffff;
    pointer-events: none;
}
.bottom-nav a {
    height: var(--pwa-dock-button-height) !important;
    min-height: var(--pwa-dock-button-height) !important;
    max-height: var(--pwa-dock-button-height) !important;
    align-self: end !important;
    padding-top: 7px !important;
    padding-bottom: 3px !important;
    z-index: 1 !important;
}
.pwa-build-version {
    bottom: calc(var(--pwa-dock-button-height) + var(--pwa-dock-extra) + 4px) !important;
}
.app-main {
    padding-bottom: calc(var(--pwa-dock-button-height) + var(--pwa-dock-extra) + 8px) !important;
}
.pwa-update-banner {
    bottom: calc(var(--pwa-dock-button-height) + var(--pwa-dock-extra) + 12px) !important;
}

/* v127 no bottom cushion */
:root {
    --pwa-dock-extra: 0px;
    --pwa-dock-button-height: 66px;
}
body.pwa-shell::after,
.bottom-nav::after {
    display: none !important;
    content: none !important;
    height: 0 !important;
}
.bottom-nav {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 80 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    min-width: 100vw !important;
    height: 66px !important;
    min-height: 66px !important;
    max-height: 66px !important;
    padding: 0 !important;
    margin: 0 !important;
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    align-items: stretch !important;
    justify-items: stretch !important;
    gap: 0 !important;
    overflow: hidden !important;
    background: #ffffff !important;
    border-top: 1px solid rgba(31,36,48,0.10) !important;
    box-shadow: 0 -8px 26px rgba(31,36,48,0.08) !important;
    transform: none !important;
}
.bottom-nav a {
    height: 66px !important;
    min-height: 66px !important;
    max-height: 66px !important;
    width: 100% !important;
    align-self: stretch !important;
    justify-self: stretch !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 3px !important;
    padding: 11px 0 0 !important;
    margin: 0 !important;
    border-radius: 0 !important;
    z-index: 1 !important;
}
.bottom-nav i {
    font-size: 21px !important;
    line-height: 1 !important;
    margin: 0 !important;
}
.bottom-nav span {
    line-height: 1.05 !important;
    margin: 0 !important;
    padding: 0 2px !important;
}
.pwa-build-version {
    bottom: 70px !important;
}
.app-main {
    padding-bottom: 72px !important;
}
.pwa-update-banner {
    bottom: 76px !important;
}

/* v128 home redesign */
.home-main-v128 {
    display: grid;
    gap: 16px;
    padding-top: 14px !important;
    perspective: 1200px;
}
.home-showcase {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) 0.85fr;
    gap: 14px;
    min-height: 236px;
    padding: 22px;
    border-radius: 30px;
    overflow: hidden;
    color: #fff;
    background:
        linear-gradient(145deg, rgba(14,22,36,.96), rgba(26,84,94,.92) 48%, rgba(91,91,190,.92)),
        #111827;
    box-shadow: 0 24px 54px rgba(26, 42, 72, .22);
    transform-style: preserve-3d;
}
.home-showcase::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, rgba(255,255,255,.18), transparent 42%, rgba(255,255,255,.10));
    pointer-events: none;
}
.home-showcase-copy {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
}
.home-eyebrow,
.home-section-head span {
    color: rgba(255,255,255,.72);
    font-size: .72rem;
    font-weight: 950;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.home-showcase h1 {
    margin: 0;
    max-width: 9.5em;
    font-size: clamp(2rem, 9vw, 3.55rem);
    line-height: .96;
    letter-spacing: 0;
}
.home-showcase p {
    margin: 0;
    max-width: 22rem;
    color: rgba(255,255,255,.82);
    font-size: .98rem;
    line-height: 1.35;
    font-weight: 760;
}
.home-showcase-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}
.home-showcase-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 14px;
    border-radius: 16px;
    color: #172033;
    background: rgba(255,255,255,.94);
    font-weight: 930;
    box-shadow: 0 14px 28px rgba(0,0,0,.16);
}
.home-showcase-actions a + a {
    color: #fff;
    background: rgba(255,255,255,.16);
    border: 1px solid rgba(255,255,255,.24);
}
.home-visual-stack {
    position: relative;
    min-height: 190px;
    transform-style: preserve-3d;
}
.home-visual-card {
    position: absolute;
    display: grid;
    place-items: center;
    border-radius: 25px;
    color: #fff;
    border: 1px solid rgba(255,255,255,.22);
    box-shadow: 0 20px 36px rgba(0,0,0,.22);
    transform-style: preserve-3d;
}
.home-visual-card-main {
    right: 12px;
    top: 18px;
    width: 124px;
    height: 124px;
    background: rgba(255,255,255,.16);
    transform: rotateY(-18deg) rotateX(10deg) translateZ(28px);
}
.home-visual-card-main img {
    width: 70px;
    height: 70px;
    border-radius: 20px;
    object-fit: contain;
}
.home-visual-card-main strong {
    position: absolute;
    right: 12px;
    top: 10px;
    padding: 3px 8px;
    border-radius: 999px;
    background: #111827;
    font-size: .75rem;
}
.home-visual-card-print,
.home-visual-card-chat {
    width: 86px;
    height: 74px;
    gap: 3px;
    font-size: .76rem;
    font-weight: 900;
}
.home-visual-card-print {
    left: 0;
    top: 92px;
    background: linear-gradient(135deg,#ff7048,#f7b955);
    transform: rotateY(18deg) rotateZ(-5deg) translateZ(42px);
}
.home-visual-card-chat {
    right: 0;
    bottom: 4px;
    background: linear-gradient(135deg,#2f90ff,#7c3aed);
    transform: rotateY(-14deg) rotateZ(7deg) translateZ(54px);
}
.home-visual-card i {
    font-size: 1.42rem;
}
.home-quick-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}
.home-quick-card {
    display: grid;
    place-items: center;
    gap: 8px;
    min-height: 96px;
    padding: 12px 8px;
    border-radius: 24px;
    color: #1f2430;
    background: rgba(255,255,255,.94);
    border: 1px solid rgba(31,36,48,.07);
    box-shadow: 0 16px 34px rgba(31,36,48,.08);
    text-align: center;
    font-weight: 920;
    transform: translateZ(0);
    transition: transform .18s ease, box-shadow .18s ease;
}
.home-quick-card:active,
.home-rubric-card:active {
    transform: scale(.98) translateY(1px);
}
.home-quick-card i {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 17px;
    color: #fff;
    font-size: 1.28rem;
}
.home-quick-card.print i,
.home-rubric-card.print > i { background: linear-gradient(135deg,#ff7048,#f7b955); }
.home-quick-card.ai i,
.home-rubric-card.ai > i { background: linear-gradient(135deg,#20bca5,#2f90ff); }
.home-quick-card.shop i,
.home-rubric-card.shop > i { background: linear-gradient(135deg,#8b5cf6,#ec4899); }
.home-section-head {
    display: grid;
    gap: 4px;
    padding: 2px 2px 0;
}
.home-section-head span {
    color: #7a8393;
}
.home-section-head h2 {
    margin: 0;
    color: #1f2430;
    font-size: 1.36rem;
    line-height: 1.08;
}
.home-rubric-list {
    display: grid;
    gap: 10px;
}
.home-rubric-card {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr) 22px;
    align-items: center;
    gap: 12px;
    min-height: 86px;
    padding: 12px;
    border-radius: 24px;
    background: rgba(255,255,255,.95);
    border: 1px solid rgba(31,36,48,.07);
    box-shadow: 0 14px 30px rgba(31,36,48,.07);
    transform-style: preserve-3d;
}
.home-rubric-card > i {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 19px;
    color: #fff;
    font-size: 1.32rem;
    box-shadow: 0 12px 22px rgba(31,36,48,.12);
}
.home-rubric-card.ai-upload > i { background: linear-gradient(135deg,#a855f7,#ec4899); }
.home-rubric-card.ai-chat > i { background: linear-gradient(135deg,#2563eb,#8b5cf6); }
.home-rubric-card.music > i { background: linear-gradient(135deg,#111827,#6672ff); }
.home-rubric-card.news > i { background: linear-gradient(135deg,#f97316,#ef4444); }
.home-rubric-card.contacts > i { background: linear-gradient(135deg,#20bca5,#3b82f6); }
.home-rubric-card.wallet > i { background: linear-gradient(135deg,#242a3a,#5a6276); }
.home-rubric-card.profile > i { background: linear-gradient(135deg,#4b5563,#9ca3af); }
.home-rubric-card strong {
    display: block;
    color: #1f2430;
    font-size: 1.04rem;
    line-height: 1.12;
}
.home-rubric-card span {
    display: -webkit-box;
    margin-top: 4px;
    color: #717887;
    font-size: .82rem;
    line-height: 1.25;
    font-weight: 750;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}
.home-rubric-card b {
    color: #9aa1ad;
    font-size: 1rem;
}
@media (min-width: 760px) {
    .home-main-v128 {
        max-width: 980px;
        margin: 0 auto;
        grid-template-columns: minmax(0, 1fr);
    }
    .home-rubric-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .home-showcase h1 {
        max-width: 12em;
    }
}
@media (max-width: 420px) {
    .home-showcase {
        grid-template-columns: 1fr;
        min-height: 0;
        padding: 20px;
    }
    .home-visual-stack {
        min-height: 118px;
    }
    .home-visual-card-main {
        right: 50%;
        top: 0;
        width: 104px;
        height: 104px;
        transform: translateX(50%) rotateY(-14deg) rotateX(8deg);
    }
    .home-visual-card-main img {
        width: 62px;
        height: 62px;
    }
    .home-visual-card-print {
        left: 8px;
        top: 48px;
    }
    .home-visual-card-chat {
        right: 8px;
        bottom: 0;
    }
    .home-quick-row {
        grid-template-columns: 1fr;
    }
}

/* v129 home polish */
.home-main-v128 {
    gap: 14px;
}
.home-showcase {
    isolation: isolate;
}
.home-showcase::after {
    content: '';
    position: absolute;
    right: -70px;
    bottom: -110px;
    width: 260px;
    height: 260px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(255,255,255,.22), rgba(255,255,255,0) 68%);
    pointer-events: none;
}
.home-showcase-copy,
.home-visual-stack {
    position: relative;
    z-index: 2;
}
.home-rubric-card {
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.home-rubric-card:hover {
    transform: translateY(-2px) rotateX(1deg);
    box-shadow: 0 20px 40px rgba(31,36,48,.10);
    border-color: rgba(32,188,165,.26);
}
@media (max-width: 520px) {
    .home-main-v128 {
        gap: 12px;
        padding-top: 10px !important;
    }
    .home-showcase {
        grid-template-columns: 1fr;
        gap: 14px;
        min-height: 390px;
        padding: 20px;
        border-radius: 30px;
    }
    .home-showcase-copy {
        justify-content: flex-start;
        gap: 11px;
    }
    .home-showcase h1 {
        max-width: 8.6em;
        font-size: 2.42rem;
        line-height: .98;
    }
    .home-showcase p {
        display: block;
        max-width: 19rem;
        font-size: .92rem;
        line-height: 1.34;
    }
    .home-showcase-actions {
        margin-top: 2px;
    }
    .home-showcase-actions a {
        min-height: 42px;
        padding: 0 13px;
        border-radius: 15px;
        font-size: .86rem;
    }
    .home-visual-stack {
        min-height: 142px;
        margin-top: 2px;
    }
    .home-visual-card-main {
        right: 50%;
        top: 2px;
        width: 112px;
        height: 112px;
        transform: translateX(50%) rotateY(-14deg) rotateX(8deg) translateZ(20px);
    }
    .home-visual-card-main img {
        width: 66px;
        height: 66px;
    }
    .home-visual-card-print {
        left: 0;
        top: 56px;
        width: 92px;
        height: 76px;
    }
    .home-visual-card-chat {
        right: 0;
        bottom: 4px;
        width: 92px;
        height: 76px;
    }
    .home-quick-row {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }
    .home-quick-card {
        min-height: 88px;
        padding: 10px 6px;
        border-radius: 22px;
        gap: 7px;
        font-size: .78rem;
        line-height: 1.12;
    }
    .home-quick-card i {
        width: 42px;
        height: 42px;
        border-radius: 16px;
        font-size: 1.14rem;
    }
    .home-section-head h2 {
        font-size: 1.24rem;
    }
    .home-rubric-card {
        min-height: 82px;
        grid-template-columns: 52px minmax(0, 1fr) 18px;
        gap: 10px;
        padding: 11px;
        border-radius: 22px;
    }
    .home-rubric-card > i {
        width: 50px;
        height: 50px;
        border-radius: 18px;
        font-size: 1.22rem;
    }
    .home-rubric-card strong {
        font-size: .98rem;
    }
    .home-rubric-card span {
        font-size: .78rem;
    }
}

/* v164 loading states and home edge polish */
body.home-shell,
body.home-shell .app-frame,
body.home-shell .app-main {
    background: #f6f8fb;
}
body.home-shell .app-main {
    width: 100%;
    max-width: 100vw;
    padding-right: 16px !important;
    box-shadow: inset -1px 0 0 #f6f8fb;
}
body.home-shell .home-showcase,
body.home-shell .home-quick-row,
body.home-shell .home-section-head,
body.home-shell .home-rubric-list {
    width: 100%;
    max-width: 100%;
}
body.home-shell .home-showcase::after {
    display: none !important;
}
body.home-shell .home-showcase {
    padding-bottom: 32px !important;
}
body.home-shell .home-visual-stack {
    margin-top: -14px !important;
    min-height: 162px !important;
}
body.home-shell .home-visual-card-main {
    top: -6px !important;
}
body.home-shell .home-visual-card-print {
    top: 42px !important;
}
body.home-shell .home-visual-card-chat {
    bottom: 20px !important;
}
@media (max-width: 520px) {
    body.home-shell .home-showcase {
        min-height: 408px !important;
        padding-bottom: 34px !important;
    }
    body.home-shell .home-visual-stack {
        margin-top: -10px !important;
        min-height: 158px !important;
    }
    body.home-shell .home-visual-card-main {
        top: -8px !important;
    }
    body.home-shell .home-visual-card-print {
        top: 44px !important;
    }
    body.home-shell .home-visual-card-chat {
        bottom: 16px !important;
    }
}

.ai-upload-shell .app-ai-image-wait {
    position: relative;
    display: block;
    min-height: 96px;
    overflow: hidden;
    background:
        linear-gradient(110deg, rgba(241,245,249,.72), rgba(255,255,255,.96), rgba(241,245,249,.72));
    background-size: 220% 100%;
    animation: appAiImageWait 1.15s ease-in-out infinite;
}
.ai-upload-shell .app-ai-image-wait img {
    opacity: 0;
    transition: opacity .22s ease;
}
.ai-upload-shell .app-ai-image-wait.is-loaded {
    animation: none;
    background: transparent;
}
.ai-upload-shell .app-ai-image-wait.is-loaded img {
    opacity: 1;
}
.ai-upload-shell .app-ai-image-wait::after {
    content: "\0417\0430\0433\0440\0443\0437\043a\0430...";
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding-top: 20px;
    color: #667085;
    font-size: .78rem;
    font-weight: 950;
    letter-spacing: 0;
    pointer-events: none;
}
.ai-upload-shell .app-ai-image-wait.is-loaded::after {
    display: none;
}
.ai-upload-shell .app-ai-image-wait.is-error::after {
    content: "\041d\0435\0020\0437\0430\0433\0440\0443\0437\0438\043b\043e\0441\044c";
    color: #b42318;
}
@keyframes appAiImageWait {
    0% { background-position: 0% 50%; }
    100% { background-position: 220% 50%; }
}

/* v164 food-style bottom nav baseline */
.bottom-nav {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 90 !important;
    width: 100vw !important;
    max-width: none !important;
    height: 66px !important;
    min-height: 66px !important;
    max-height: 66px !important;
    transform: none !important;
    transition: none !important;
    contain: layout paint !important;
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    padding: 0 12px 0 !important;
    overflow: visible !important;
    background: rgba(255,255,255,.86) !important;
    border-top: 1px solid rgba(31,36,48,.08) !important;
    box-shadow: 0 -14px 34px rgba(31,36,48,.10) !important;
    -webkit-backdrop-filter: blur(18px) !important;
    backdrop-filter: blur(18px) !important;
}
.bottom-nav a {
    height: 54px !important;
    min-height: 54px !important;
    max-height: 54px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 2px !important;
    padding: 4px 6px !important;
    margin: 6px 0 !important;
    border-radius: 14px !important;
    font-size: 9px !important;
    line-height: 1.05 !important;
    font-weight: 800 !important;
    transform: none !important;
    transition: background-color .12s ease, color .12s ease !important;
}
.bottom-nav a.active {
    color: #e46d57 !important;
    background: rgba(228,109,87,.10) !important;
}
.bottom-nav a.active::before {
    display: none !important;
    content: none !important;
}
.bottom-nav i {
    width: 25px !important;
    height: 25px !important;
    display: grid !important;
    place-items: center !important;
    border-radius: 10px !important;
    font-size: 19px !important;
    transform: none !important;
    transition: none !important;
}
.bottom-nav a.active i {
    background: rgba(228,109,87,.12) !important;
    transform: none !important;
}
.app-main {
    padding-bottom: 82px !important;
}

/* v164 news app and small shell fixes */
.pwa-build-version {
    position: fixed !important;
    right: 8px !important;
    bottom: 70px !important;
    top: auto !important;
    left: auto !important;
    z-index: 180 !important;
    display: inline-grid !important;
    place-items: center !important;
    min-width: 42px !important;
    height: 22px !important;
    padding: 0 8px !important;
    border-radius: 999px !important;
    background: rgba(31,36,48,.74) !important;
    color: #fff !important;
    font-size: 11px !important;
    font-weight: 950 !important;
    line-height: 1 !important;
    opacity: 1 !important;
    pointer-events: none !important;
}

.app-news-main {
    display: grid;
    gap: 14px;
}

.app-news-hero,
.app-news-detail,
.app-news-card,
.app-news-cats {
    border: 1px solid rgba(31,36,48,.07);
    background: rgba(255,255,255,.96);
    box-shadow: 0 16px 34px rgba(31,36,48,.08);
}

.app-news-hero {
    display: grid;
    grid-template-columns: 62px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 18px;
    border-radius: 28px;
}

.app-news-hero > i {
    display: grid;
    place-items: center;
    width: 62px;
    height: 62px;
    border-radius: 22px;
    color: #fff;
    background: linear-gradient(135deg,#f97316,#ef4444);
    font-size: 1.55rem;
}

.app-news-hero span,
.app-news-label {
    color: #7a8393;
    font-size: .72rem;
    font-weight: 950;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.app-news-hero h1,
.app-news-detail h1 {
    margin: 2px 0 0;
    color: #1f2430;
    line-height: 1.04;
}

.app-news-hero p {
    margin: 7px 0 0;
    color: #68707c;
    font-weight: 760;
    line-height: 1.35;
}

.app-news-cats {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 12px;
    border-radius: 24px;
    -webkit-overflow-scrolling: touch;
}

.app-news-cats a {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    color: #1f2430;
    background: #f4f6fa;
    border: 1px solid rgba(31,36,48,.08);
    font-weight: 900;
}

.app-news-cats a.active {
    color: #fff;
    background: linear-gradient(135deg,#f97316,#ef4444);
    border-color: transparent;
}

.app-news-list {
    display: grid;
    gap: 12px;
}

.app-news-card {
    position: relative;
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr) 16px;
    gap: 12px;
    align-items: center;
    min-height: 116px;
    padding: 10px;
    border-radius: 24px;
}

.app-news-card img,
.app-news-card-empty {
    width: 96px;
    height: 96px;
    border-radius: 20px;
    object-fit: cover;
    background: linear-gradient(135deg,#edf2f7,#ffffff);
}

.app-news-card-empty {
    display: grid;
    place-items: center;
    color: #8a93a3;
    font-size: 1.4rem;
}

.app-news-card small,
.app-news-meta {
    color: #7a8393;
    font-weight: 850;
}

.app-news-card strong {
    display: -webkit-box;
    margin-top: 4px;
    color: #1f2430;
    font-size: 1rem;
    line-height: 1.14;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.app-news-card p {
    display: -webkit-box;
    margin: 6px 0 0;
    color: #68707c;
    font-size: .82rem;
    line-height: 1.28;
    font-weight: 720;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.app-news-card > b {
    color: #9aa1ad;
}

.app-news-detail {
    overflow: hidden;
    border-radius: 30px;
}

.app-news-detail-image {
    display: block;
    width: 100%;
    max-height: 340px;
    object-fit: cover;
    background: #eef2f7;
}

.app-news-detail-body {
    display: grid;
    gap: 12px;
    padding: 18px;
}

.app-news-detail h1 {
    font-size: clamp(1.65rem, 7vw, 2.35rem);
}

.app-news-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: .82rem;
}

.app-news-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.app-news-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.app-news-tags span {
    padding: 6px 10px;
    border-radius: 999px;
    color: #334155;
    background: #f1f5f9;
    font-size: .76rem;
    font-weight: 900;
}

.app-news-lead {
    margin: 0;
    color: #4b5563;
    font-size: 1rem;
    line-height: 1.42;
    font-weight: 800;
}

.app-news-content {
    color: #263040;
    font-size: .96rem;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.app-news-content p {
    margin: 0 0 12px;
}

.app-news-content img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 12px auto;
    border-radius: 18px;
    box-shadow: 0 12px 28px rgba(31,36,48,.12);
}

.app-news-content a {
    color: #2563eb;
    font-weight: 850;
}

@media (max-width: 430px) {
    .app-news-card {
        grid-template-columns: 84px minmax(0, 1fr) 14px;
        min-height: 104px;
    }

    .app-news-card img,
    .app-news-card-empty {
        width: 84px;
        height: 84px;
    }
}

/* v164 final iPhone dock: the menu owns the rounded safe area instead of floating above it. */
body.pwa-shell::after,
.bottom-nav::after {
    display: none !important;
    content: none !important;
}

.bottom-nav {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 140 !important;
    width: 100vw !important;
    min-width: 100vw !important;
    max-width: 100vw !important;
    height: calc(64px + max(env(safe-area-inset-bottom, 0px), 22px)) !important;
    min-height: calc(64px + max(env(safe-area-inset-bottom, 0px), 22px)) !important;
    max-height: none !important;
    padding: 0 12px max(env(safe-area-inset-bottom, 0px), 22px) !important;
    margin: 0 !important;
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 0 !important;
    align-items: end !important;
    justify-items: stretch !important;
    overflow: hidden !important;
    background: rgba(255,255,255,.98) !important;
    border-top: 1px solid rgba(31,36,48,.08) !important;
    box-shadow: 0 -14px 34px rgba(31,36,48,.10) !important;
    -webkit-backdrop-filter: blur(18px) !important;
    backdrop-filter: blur(18px) !important;
    transform: none !important;
    transition: none !important;
}

.bottom-nav a {
    height: 54px !important;
    min-height: 54px !important;
    max-height: 54px !important;
    margin: 5px 0 !important;
    align-self: end !important;
    border-radius: 14px !important;
}

.app-main {
    padding-bottom: calc(74px + max(env(safe-area-inset-bottom, 0px), 22px)) !important;
}

.pwa-build-version {
    bottom: calc(68px + max(env(safe-area-inset-bottom, 0px), 22px)) !important;
}

.pwa-update-banner {
    bottom: calc(78px + max(env(safe-area-inset-bottom, 0px), 22px)) !important;
}

/* v164 news page layout fix */
body.news-shell .app-frame {
    height: 100dvh !important;
    overflow: hidden !important;
}

body.news-shell .app-topbar {
    flex: 0 0 auto !important;
    z-index: 160 !important;
}

body.news-shell .app-main {
    display: block !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    padding-top: 18px !important;
    padding-bottom: calc(142px + max(env(safe-area-inset-bottom, 0px), 22px)) !important;
}

body.news-shell .app-news-hero,
body.news-shell .app-news-cats,
body.news-shell .app-news-list,
body.news-shell .app-news-detail {
    position: relative;
    z-index: 1;
    width: 100%;
}

body.news-shell .app-news-hero {
    margin-bottom: 14px;
}

body.news-shell .app-news-cats {
    min-height: 64px;
    margin: 0 0 14px;
    align-items: center;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
}

body.news-shell .app-news-cats a {
    min-height: 42px !important;
    height: 42px !important;
    color: #1f2430 !important;
    transform: none !important;
    opacity: 1 !important;
}

body.news-shell .app-news-cats a.active {
    color: #fff !important;
}

body.news-shell .app-news-list {
    display: grid;
    gap: 12px;
}

body.news-shell .app-news-detail {
    overflow: visible;
    margin-bottom: 28px;
}

body.news-shell .app-news-detail-body {
    padding-bottom: 34px;
}

body.news-shell .app-news-content {
    padding-bottom: 28px;
}

/* v164 lower bottom menu and keep app version only in the drawer. */
.pwa-build-version {
    display: none !important;
}

.bottom-nav {
    height: 64px !important;
    min-height: 64px !important;
    max-height: 64px !important;
    padding: 0 12px !important;
    align-items: stretch !important;
    overflow: visible !important;
}

.bottom-nav a {
    height: 54px !important;
    min-height: 54px !important;
    max-height: 54px !important;
    margin: 5px 0 !important;
    align-self: center !important;
}

.app-main {
    padding-bottom: 74px !important;
}

.pwa-update-banner {
    bottom: 76px !important;
}

/* v164: bottom dock removed. Navigation lives in the top drawer. */
.bottom-nav,
body.pwa-shell::after,
.bottom-nav::after {
    display: none !important;
    content: none !important;
    height: 0 !important;
    min-height: 0 !important;
    max-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
}

.app-main {
    padding-bottom: 22px !important;
}

.pwa-update-banner {
    bottom: 16px !important;
}

/* v164 services pages polish */
body.app-services-shell .app-topbar,
body.app-service-orders-shell .app-topbar {
    position: relative !important;
    z-index: 40 !important;
    flex: 0 0 auto !important;
}

body.app-services-shell .app-main,
body.app-service-orders-shell .app-main {
    display: grid !important;
    gap: 16px !important;
    padding-top: 18px !important;
    padding-left: max(16px, env(safe-area-inset-left, 0px)) !important;
    padding-right: max(16px, env(safe-area-inset-right, 0px)) !important;
    overflow-x: hidden !important;
}

body.app-services-shell .app-section-hero.services,
body.app-service-orders-shell .app-section-hero.services {
    position: relative;
    z-index: 1;
    min-height: 132px;
    margin-top: 2px;
    border-radius: 30px;
    background:
        radial-gradient(circle at 86% 14%, rgba(255,255,255,.28), transparent 28%),
        linear-gradient(135deg, #112238 0%, #16bda7 54%, #6472ff 100%);
}

body.app-services-shell .app-section-hero.services h1,
body.app-service-orders-shell .app-section-hero.services h1 {
    font-size: clamp(1.55rem, 7vw, 2.05rem);
}

body.app-service-orders-shell .app-status-filter {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 10px;
    overflow: visible !important;
    border-radius: 26px;
    background: rgba(255,255,255,.9);
}

body.app-service-orders-shell .app-status-filter a {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-width: 0;
    min-height: 46px;
    padding: 0 10px;
    border-radius: 17px;
    background: #f5f7fb;
    border: 1px solid rgba(31,36,48,.08);
    color: #1f2430;
    font-size: .88rem;
    font-weight: 900;
    white-space: nowrap;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.75);
}

body.app-service-orders-shell .app-status-filter a i {
    font-size: 1rem;
    line-height: 1;
    color: #20a997;
}

body.app-service-orders-shell .app-status-filter a.active {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(135deg, #173042, #20bca5 58%, #6672ff);
    box-shadow: 0 12px 24px rgba(32,188,165,.22);
}

body.app-service-orders-shell .app-status-filter a.active i {
    color: #fff;
}

@media (max-width: 360px) {
    body.app-service-orders-shell .app-status-filter a {
        gap: 5px;
        padding: 0 8px;
        font-size: .82rem;
    }
}

/* v164 AI postcards modal and image stability */
.ai-upload-shell .app-topbar {
    position: relative !important;
    z-index: 220 !important;
    flex: 0 0 auto !important;
    visibility: visible !important;
    opacity: 1 !important;
    transform: translateZ(0) !important;
}

.app-ai-example-modal[hidden] {
    display: none !important;
}

.ai-upload-shell .app-ai-theme-preview img,
.ai-upload-shell .app-ai-example-pair img,
.app-ai-gallery-item .app-ai-example-pair img,
.app-ai-example-modal-images img {
    image-orientation: from-image;
}

/* v164 services spacing and AI postcards topbar persistence */
body.app-services-shell .app-section-main,
body.app-service-orders-shell .app-section-main {
    gap: 22px !important;
}

body.app-services-shell .app-section-hero.services,
body.app-service-orders-shell .app-section-hero.services {
    margin-bottom: 4px !important;
}

body.app-services-shell .app-section-hero.services .eyebrow,
body.app-service-orders-shell .app-section-hero.services .eyebrow {
    margin-bottom: 8px !important;
}

body.app-services-shell .app-section-hero.services h1,
body.app-service-orders-shell .app-section-hero.services h1 {
    margin-bottom: 10px !important;
}

body.ai-upload-shell .app-frame {
    isolation: isolate;
}

body.ai-upload-shell .app-topbar {
    display: flex !important;
    position: relative !important;
    z-index: 500 !important;
    min-height: calc(62px + env(safe-area-inset-top, 0px)) !important;
    visibility: visible !important;
    opacity: 1 !important;
}

body.ai-upload-shell .ai-upload-main {
    position: relative;
    z-index: 1;
}

/* v164 services mobile hero and desktop exit link */
body.app-services-shell .app-section-hero.services {
    grid-template-columns: 62px minmax(0, 1fr) !important;
    align-items: center !important;
    min-height: 156px !important;
    padding: 22px 18px !important;
    overflow: hidden !important;
}

body.app-services-shell .app-section-hero.services > i {
    width: 62px !important;
    height: 62px !important;
    border-radius: 22px !important;
    font-size: 1.7rem !important;
}

body.app-services-shell .app-section-hero.services span {
    display: -webkit-box !important;
    overflow: hidden !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;
    font-size: clamp(1rem, 4.7vw, 1.24rem) !important;
    line-height: 1.22 !important;
}

.pwa-desktop-site-link {
    display: none;
}

@media (min-width: 900px) and (hover: hover) {
    .pwa-desktop-site-link {
        position: fixed;
        right: 22px;
        bottom: 22px;
        z-index: 600;
        display: inline-flex;
        align-items: center;
        gap: 10px;
        min-height: 48px;
        padding: 0 16px;
        border-radius: 999px;
        color: #fff !important;
        background: linear-gradient(135deg, #172033, #20bca5);
        box-shadow: 0 18px 42px rgba(31,36,48,.18);
        font-weight: 950;
    }
}

/* v172 Android scroll and contrast fix */
html.pwa-android,
html.pwa-android body.pwa-shell {
    height: auto !important;
    min-height: 100% !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior-y: auto !important;
}

html.pwa-android body.pwa-shell {
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    min-height: 100svh !important;
    height: auto !important;
    touch-action: pan-y !important;
}

html.pwa-android .app-frame {
    min-height: 100svh !important;
    height: auto !important;
    overflow: visible !important;
}

html.pwa-android .app-main {
    flex: 0 0 auto !important;
    min-height: auto !important;
    height: auto !important;
    overflow: visible !important;
    padding-bottom: 18px !important;
    overscroll-behavior-y: auto !important;
}

html.pwa-android .app-main::after {
    content: none !important;
    display: none !important;
    height: 0 !important;
}

html.pwa-android .app-shop-more,
html.pwa-android .app-favorite-open,
html.pwa-android a.app-shop-more,
html.pwa-android a[class*="open"],
html.pwa-android button[class*="open"] {
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
}

/* v172 AI postcards examples: examples are opened only by button, detail modal stays above gallery. */
body.ai-upload-shell .app-ai-examples {
    display: none !important;
}

#appAiExamplesGallery {
    z-index: 1120 !important;
}

#appAiExampleModal {
    z-index: 1240 !important;
    align-items: center !important;
    padding-top: calc(18px + env(safe-area-inset-top, 0px)) !important;
}

#appAiExampleModal .app-ai-example-modal-card {
    max-height: min(88dvh, 820px) !important;
}

html.pwa-android body.ai-upload-shell {
    max-width: 100vw !important;
}

html.pwa-android body.ai-upload-shell .app-frame,
html.pwa-android body.ai-upload-shell .ai-upload-main {
    width: 100vw !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
    transform: translateX(0) !important;
}

html.pwa-android body.ai-upload-shell .app-ai-create-card {
    width: calc(100vw - 32px) !important;
    max-width: calc(100vw - 32px) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    overflow: hidden !important;
    transform: translateX(0) !important;
}

html.pwa-android body.ai-upload-shell .app-ai-create-card form,
html.pwa-android body.ai-upload-shell .app-ai-upload-drop,
html.pwa-android body.ai-upload-shell .app-ai-submit-grid,
html.pwa-android body.ai-upload-shell .app-ai-radio-group,
html.pwa-android body.ai-upload-shell .app-ai-option,
html.pwa-android body.ai-upload-shell .app-ai-input,
html.pwa-android body.ai-upload-shell .app-ai-textarea {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    transform: translateX(0) !important;
    box-sizing: border-box !important;
}

@media (max-width: 430px) {
    body.app-services-shell .app-section-hero.services {
        grid-template-columns: 56px minmax(0, 1fr) !important;
        min-height: 168px !important;
        padding: 20px 16px !important;
        border-radius: 28px !important;
    }

    body.app-services-shell .app-section-hero.services > i {
        width: 54px !important;
        height: 54px !important;
        border-radius: 19px !important;
        font-size: 1.48rem !important;
    }

    body.app-services-shell .app-section-hero.services h1 {
        margin-bottom: 8px !important;
        font-size: clamp(1.86rem, 8.5vw, 2.2rem) !important;
    }

    body.app-services-shell .app-section-hero.services .eyebrow {
        margin-bottom: 7px !important;
        font-size: .82rem !important;
    }
}
