
/*
  ZR Market Premium UI System
  Purpose: deployment UI must stay visually close to the approved premium render.
  Rules: no emoji-dependent layout, stable typography, vector icons, fixed mobile rhythm,
  production-safe fallbacks for Telegram WebView and desktop Telegram.
*/

:root {
    color-scheme: light dark;
    --zr-canvas: #f4ece2;
    --zr-canvas-2: #e9ddcf;
    --zr-paper: #fffaf4;
    --zr-paper-2: #f8f0e7;
    --zr-cream: #efe7dd;
    --zr-sand: #d7c4ae;
    --zr-gold: #b08c6a;
    --zr-gold-2: #c8a07c;
    --zr-brown: #5a4a42;
    --zr-ink: #2e241e;
    --zr-muted: #8c7869;
    --zr-line: rgba(90, 74, 66, .12);
    --zr-line-strong: rgba(90, 74, 66, .18);
    --zr-white-a: rgba(255, 255, 255, .72);
    --zr-white-b: rgba(255, 255, 255, .44);
    --zr-glass: rgba(255, 250, 244, .78);
    --zr-glass-strong: rgba(255, 250, 244, .94);
    --zr-success: #5f8b63;
    --zr-warning: #b38645;
    --zr-danger: #b9635a;
    --zr-star: #d8a455;

    --tg-bg: var(--tg-theme-bg-color, var(--zr-canvas));
    --tg-text: var(--tg-theme-text-color, var(--zr-ink));
    --tg-hint: var(--tg-theme-hint-color, var(--zr-muted));
    --tg-link: var(--tg-theme-link-color, var(--zr-brown));
    --tg-button: var(--tg-theme-button-color, var(--zr-gold));
    --tg-button-text: var(--tg-theme-button-text-color, #ffffff);
    --tg-secondary-bg: var(--tg-theme-secondary-bg-color, var(--zr-paper-2));

    --font-ui: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-mono: "SF Mono", ui-monospace, Menlo, Monaco, Consolas, monospace;

    --app-width: 480px;
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);

    --r-10: 10px;
    --r-14: 14px;
    --r-18: 18px;
    --r-22: 22px;
    --r-26: 26px;
    --r-30: 30px;
    --r-34: 34px;
    --r-pill: 999px;

    --space-page: 18px;
    --space-section: 24px;

    --shadow-hairline: inset 0 1px 0 rgba(255, 255, 255, .58);
    --shadow-xs: 0 1px 2px rgba(46, 36, 30, .05);
    --shadow-sm: 0 10px 28px rgba(46, 36, 30, .085);
    --shadow-md: 0 20px 50px rgba(46, 36, 30, .12);
    --shadow-lg: 0 32px 70px rgba(46, 36, 30, .16);
}

[data-theme="dark"] {
    --zr-canvas: #211a17;
    --zr-canvas-2: #2b231f;
    --zr-paper: #352c27;
    --zr-paper-2: #2f2723;
    --zr-cream: #3a302a;
    --zr-sand: #796354;
    --zr-gold: #c49b74;
    --zr-gold-2: #d3b08e;
    --zr-brown: #efe4d8;
    --zr-ink: #fbf5ed;
    --zr-muted: #c3ad9a;
    --zr-line: rgba(255, 255, 255, .09);
    --zr-line-strong: rgba(255, 255, 255, .16);
    --zr-white-a: rgba(255, 255, 255, .08);
    --zr-white-b: rgba(255, 255, 255, .04);
    --zr-glass: rgba(54, 45, 40, .80);
    --zr-glass-strong: rgba(58, 48, 42, .94);
    --zr-success: #91bd95;
    --zr-warning: #d1ad70;
    --zr-danger: #de8379;
    --zr-star: #f0bf66;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { min-height: 100%; background: var(--zr-canvas); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
    min-height: 100%;
    font-family: var(--font-ui);
    font-size: 15px;
    line-height: 1.35;
    font-weight: 450;
    color: var(--tg-text);
    background:
        radial-gradient(900px 540px at 18% -6%, rgba(215, 196, 174, .72), transparent 58%),
        radial-gradient(680px 440px at 100% 2%, rgba(176, 140, 106, .22), transparent 54%),
        linear-gradient(180deg, var(--zr-canvas), var(--zr-canvas-2));
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: geometricPrecision;
    font-kerning: normal;
    font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
}
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    opacity: .24;
    background-image: linear-gradient(rgba(90,74,66,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(90,74,66,.025) 1px, transparent 1px);
    background-size: 36px 36px;
    mask-image: linear-gradient(180deg, rgba(0,0,0,.6), transparent 72%);
}
button, input, textarea, select { font: inherit; }
button { cursor: pointer; color: inherit; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

#app {
    position: relative;
    width: 100%;
    max-width: var(--app-width);
    min-height: 100vh;
    margin: 0 auto;
    padding-bottom: calc(104px + var(--safe-bottom));
}
#app::before {
    content: "";
    position: fixed;
    top: 0;
    left: 50%;
    width: min(100%, var(--app-width));
    height: 100vh;
    transform: translateX(-50%);
    z-index: -1;
    background: linear-gradient(180deg, rgba(255,255,255,.22), rgba(255,255,255,0));
    border-left: 1px solid rgba(255,255,255,.36);
    border-right: 1px solid rgba(90,74,66,.05);
}

.loading-screen {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 24px;
    text-align: center;
    color: var(--zr-muted);
}
.loading-screen p { font-size: 13px; letter-spacing: .16em; text-transform: uppercase; font-weight: 700; }
.spinner {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 3px solid rgba(176, 140, 106, .16);
    border-top-color: var(--zr-gold);
    animation: spin .82s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; transform: translate3d(0, 8px, 0);} to { opacity: 1; transform: translate3d(0, 0, 0);} }
.fade-in { animation: fadeIn .34s cubic-bezier(.2,.8,.2,1); }
.hidden { display: none !important; }

.glass-card,
.zr-card {
    background: linear-gradient(180deg, rgba(255,255,255,.76), rgba(255,250,244,.88));
    border: 1px solid rgba(255,255,255,.66);
    border-radius: var(--r-26);
    box-shadow: var(--shadow-hairline), var(--shadow-sm);
    backdrop-filter: blur(22px) saturate(150%);
    -webkit-backdrop-filter: blur(22px) saturate(150%);
}
[data-theme="dark"] .glass-card,
[data-theme="dark"] .zr-card {
    background: linear-gradient(180deg, rgba(59,49,43,.84), rgba(47,39,35,.94));
    border-color: rgba(255,255,255,.08);
}
@supports not ((backdrop-filter: blur(10px)) or (-webkit-backdrop-filter: blur(10px))) {
    .glass-card, .zr-card, .bottom-nav, .app-header { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--zr-glass-strong); }
}

.app-header {
    position: sticky;
    top: 0;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 78px;
    padding: calc(14px + var(--safe-top)) var(--space-page) 14px;
    background: linear-gradient(180deg, rgba(246,239,231,.96), rgba(246,239,231,.74));
    border-bottom: 1px solid rgba(90, 74, 66, .065);
    backdrop-filter: blur(24px) saturate(160%);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
}
[data-theme="dark"] .app-header { background: linear-gradient(180deg, rgba(33,26,23,.96), rgba(33,26,23,.74)); }
.brand-kicker,
.app-header .brand-kicker {
    margin-bottom: 6px;
    color: var(--zr-muted);
    font-size: 11px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
}
.app-header h1,
.screen-title {
    font-size: 25px;
    line-height: 1.04;
    font-weight: 760;
    letter-spacing: -.035em;
    color: var(--zr-ink);
}
.header-spacer { width: 42px; height: 42px; flex: 0 0 42px; }
.user-avatar,
.brand-avatar {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 50%;
    overflow: hidden;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: -.02em;
    background: linear-gradient(145deg, var(--zr-gold-2), var(--zr-brown));
    border: 1px solid rgba(255,255,255,.46);
    box-shadow: var(--shadow-hairline), 0 12px 22px rgba(46,36,30,.12);
}
.user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.back-btn {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.62);
    background: linear-gradient(180deg, rgba(255,255,255,.72), rgba(255,250,244,.90));
    box-shadow: var(--shadow-hairline), var(--shadow-xs);
    display: grid;
    place-items: center;
    font-size: 18px;
    font-weight: 700;
    color: var(--zr-brown);
}
[data-theme="dark"] .back-btn { border-color: rgba(255,255,255,.10); background: rgba(255,255,255,.08); color: var(--zr-ink); }

.search-bar { padding: 16px var(--space-page) 8px; }
.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 54px;
    padding: 0 17px;
    border-radius: var(--r-pill);
    background: linear-gradient(180deg, rgba(255,255,255,.76), rgba(255,250,244,.94));
    border: 1px solid rgba(255,255,255,.72);
    box-shadow: var(--shadow-hairline), 0 10px 22px rgba(46,36,30,.055);
}
.search-input-wrapper input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--zr-ink);
    font-size: 15px;
    font-weight: 520;
    letter-spacing: -.01em;
}
.search-input-wrapper input::placeholder { color: var(--zr-muted); opacity: .86; }
.search-icon,
.inline-icon {
    width: 19px;
    height: 19px;
    flex: 0 0 19px;
    color: var(--zr-muted);
}

.banner-carousel {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding: 8px var(--space-page) 9px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}
.banner-carousel::-webkit-scrollbar { display: none; }
.banner-slide {
    position: relative;
    flex: 0 0 88.5%;
    min-height: 212px;
    border-radius: 32px;
    overflow: hidden;
    isolation: isolate;
    scroll-snap-align: start;
    background:
        radial-gradient(400px 260px at 92% 12%, rgba(255,255,255,.34), transparent 55%),
        radial-gradient(380px 300px at 6% 100%, rgba(90,74,66,.38), transparent 55%),
        linear-gradient(135deg, #d7c4ae 0%, #b08c6a 52%, #69564c 100%);
    border: 1px solid rgba(255,255,255,.52);
    box-shadow: var(--shadow-hairline), var(--shadow-md);
}
.banner-slide::before {
    content: "";
    position: absolute;
    inset: 1px;
    border-radius: 31px;
    pointer-events: none;
    background: linear-gradient(135deg, rgba(255,255,255,.28), transparent 42%);
    z-index: 1;
}
.banner-slide img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: .42;
    filter: saturate(.9) contrast(1.04);
    transform: translateZ(0);
}
.banner-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(180deg, rgba(33,23,18,.02) 0%, rgba(33,23,18,.18) 34%, rgba(33,23,18,.62) 100%);
}
.banner-overlay {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: 100%;
    padding: 20px;
    color: #fff;
}
.banner-pill,
.premium-pill {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    gap: 7px;
    padding: 8px 12px;
    margin-bottom: 12px;
    border-radius: var(--r-pill);
    background: rgba(255,255,255,.17);
    border: 1px solid rgba(255,255,255,.24);
    color: rgba(255,255,255,.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    font-size: 11px;
    line-height: 1;
    font-weight: 760;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.banner-overlay h3 {
    max-width: 92%;
    font-size: 28px;
    line-height: .99;
    font-weight: 800;
    letter-spacing: -.055em;
    text-wrap: balance;
}
.banner-overlay p {
    max-width: 92%;
    margin-top: 9px;
    color: rgba(255,255,255,.86);
    font-size: 14px;
    line-height: 1.44;
    font-weight: 500;
}
.banner-cta {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 42px;
    margin-top: 15px;
    padding: 0 16px;
    border-radius: var(--r-pill);
    color: #392b23;
    background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(245,237,229,.86));
    box-shadow: 0 10px 22px rgba(39,29,23,.18), inset 0 1px 0 rgba(255,255,255,.7);
    font-size: 13px;
    font-weight: 760;
    letter-spacing: -.01em;
}

.section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    padding: 0 var(--space-page);
    margin: 25px 0 13px;
}
.section-header h2 {
    font-size: 21px;
    line-height: 1.05;
    font-weight: 780;
    letter-spacing: -.035em;
    color: var(--zr-ink);
}
.section-header small,
.section-link {
    color: var(--zr-muted);
    font-size: 12px;
    line-height: 1.15;
    font-weight: 650;
    letter-spacing: -.01em;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 11px;
    padding: 0 var(--space-page);
}
.category-card {
    min-height: 122px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 11px;
    padding: 14px 10px;
    border-radius: 26px;
    background: linear-gradient(180deg, rgba(255,255,255,.76), rgba(255,250,244,.92));
    border: 1px solid rgba(255,255,255,.64);
    box-shadow: var(--shadow-hairline), var(--shadow-sm);
    transition: transform .18s cubic-bezier(.2,.8,.2,1), box-shadow .18s cubic-bezier(.2,.8,.2,1);
}
.category-card:active { transform: translateY(1px) scale(.985); }
.category-icon,
.logo-fallback {
    width: 54px;
    height: 54px;
    border-radius: 20px;
    display: grid;
    place-items: center;
    color: #fff;
    background:
        radial-gradient(circle at 30% 15%, rgba(255,255,255,.34), transparent 35%),
        linear-gradient(145deg, var(--zr-gold-2), var(--zr-brown));
    box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 12px 24px rgba(176,140,106,.20);
}
.category-icon svg,
.logo-fallback svg,
.ui-icon { width: 24px; height: 24px; stroke: currentColor; }
.category-card span {
    max-width: 100%;
    color: var(--zr-ink);
    text-align: center;
    font-size: 12px;
    line-height: 1.16;
    font-weight: 720;
    letter-spacing: -.01em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.business-list { padding: 0 var(--space-page); }
.business-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 100px;
    padding: 14px;
    margin-bottom: 12px;
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(255,255,255,.80), rgba(255,250,244,.94));
    border: 1px solid rgba(255,255,255,.68);
    box-shadow: var(--shadow-hairline), var(--shadow-sm);
    transition: transform .18s cubic-bezier(.2,.8,.2,1), box-shadow .18s cubic-bezier(.2,.8,.2,1);
}
.business-card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 28px;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(255,255,255,.25), transparent 38%);
    opacity: .55;
}
.business-card:active { transform: translateY(1px) scale(.987); }
.business-card .logo {
    position: relative;
    z-index: 1;
    width: 68px;
    height: 68px;
    flex: 0 0 68px;
    border-radius: 22px;
    overflow: hidden;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(145deg, var(--zr-gold-2), var(--zr-brown));
    box-shadow: inset 0 1px 0 rgba(255,255,255,.24), 0 12px 20px rgba(46,36,30,.10);
}
.business-card .logo img { width: 100%; height: 100%; object-fit: cover; }
.business-card .info { position: relative; z-index: 1; flex: 1; min-width: 0; }
.business-card .name {
    color: var(--zr-ink);
    font-size: 16px;
    line-height: 1.15;
    font-weight: 760;
    letter-spacing: -.025em;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.business-card .desc {
    color: var(--zr-muted);
    font-size: 13px;
    line-height: 1.4;
    font-weight: 500;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 9px;
}
.business-card .meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    color: var(--zr-brown);
    font-size: 12px;
    font-weight: 700;
}
.rating-stars { display: inline-flex; align-items: center; gap: 2px; color: var(--zr-star); }
.rating-stars span { color: inherit !important; }
.rating-stars .empty { color: rgba(90,74,66,.20) !important; }
.rating-count { color: var(--zr-muted); font-weight: 650; }

.filter-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    white-space: nowrap;
    padding: 0 var(--space-page) 14px;
    scrollbar-width: none;
}
.filter-scroll::-webkit-scrollbar { display: none; }
.filter-chip {
    appearance: none;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 15px !important;
    margin: 0 !important;
    border-radius: var(--r-pill) !important;
    border: 1px solid rgba(255,255,255,.68) !important;
    background: linear-gradient(180deg, rgba(255,255,255,.76), rgba(255,250,244,.92)) !important;
    box-shadow: var(--shadow-hairline), var(--shadow-xs);
    color: var(--zr-brown);
    font-size: 13px !important;
    font-weight: 720;
    letter-spacing: -.01em;
}
.filter-chip.active {
    color: #fff !important;
    background: linear-gradient(180deg, var(--zr-brown), #41342e) !important;
    border-color: transparent !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 10px 22px rgba(46,36,30,.16);
}

.business-detail .hero {
    position: relative;
    height: 300px;
    overflow: hidden;
    isolation: isolate;
    border-radius: 0 0 36px 36px;
    background:
        radial-gradient(400px 250px at 85% 8%, rgba(255,255,255,.32), transparent 55%),
        linear-gradient(145deg, var(--zr-sand), var(--zr-gold) 52%, var(--zr-brown));
    box-shadow: var(--shadow-md);
}
.business-detail .hero img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(.92) contrast(1.03);
    opacity: .82;
}
.business-detail .hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(28,19,15,.05) 0%, rgba(28,19,15,.18) 34%, rgba(28,19,15,.58) 100%);
}
.business-detail .hero .back-btn { position: absolute; top: calc(16px + var(--safe-top)); left: 16px; z-index: 3; color: #fff; background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.22); }
.business-detail .content { padding: 19px var(--space-page) 0; }
.business-detail .title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.business-detail .title {
    min-width: 0;
    color: var(--zr-ink);
    font-size: 30px;
    line-height: 1.02;
    font-weight: 810;
    letter-spacing: -.06em;
    text-wrap: balance;
}
.business-detail .rating-block {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    min-width: 76px;
    padding: 8px 10px;
    border-radius: 19px;
    background: linear-gradient(180deg, rgba(255,255,255,.78), rgba(255,250,244,.94));
    border: 1px solid rgba(255,255,255,.62);
    box-shadow: var(--shadow-hairline), var(--shadow-xs);
}
.business-detail .rating-block .score { color: var(--zr-star); font-size: 20px; line-height: 1; font-weight: 820; letter-spacing: -.03em; }
.business-detail .rating-block .count { margin-top: 3px; color: var(--zr-muted); font-size: 10px; line-height: 1; font-weight: 700; }
.business-detail .section {
    margin-bottom: 14px;
    padding: 18px;
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(255,255,255,.76), rgba(255,250,244,.92));
    border: 1px solid rgba(255,255,255,.66);
    box-shadow: var(--shadow-hairline), var(--shadow-sm);
}
.section-title,
.business-detail .section-title {
    margin-bottom: 11px;
    color: var(--zr-muted);
    font-size: 11px;
    line-height: 1;
    font-weight: 820;
    letter-spacing: .14em;
    text-transform: uppercase;
}
.business-detail .description { color: var(--zr-brown); font-size: 15px; line-height: 1.62; font-weight: 520; letter-spacing: -.01em; }
.business-detail .contact-row {
    display: flex;
    align-items: center;
    gap: 13px;
    min-height: 58px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(90,74,66,.085);
}
.business-detail .contact-row:last-child { border-bottom: 0; }
.contact-icon {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: var(--zr-brown);
    background: rgba(176,140,106,.12);
    border: 1px solid rgba(176,140,106,.16);
}
.contact-icon svg { width: 19px; height: 19px; }
.business-detail .contact-row .label { color: var(--zr-muted); font-size: 11px; line-height: 1.15; font-weight: 760; letter-spacing: .04em; text-transform: uppercase; }
.business-detail .contact-row .value { color: var(--zr-ink); font-size: 15px; line-height: 1.25; font-weight: 680; letter-spacing: -.015em; }

.btn-primary,
.btn-secondary,
.btn-metal {
    appearance: none;
    width: 100%;
    min-height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 18px;
    border-radius: var(--r-pill);
    border: 1px solid transparent;
    text-decoration: none;
    font-size: 15px;
    line-height: 1;
    font-weight: 780;
    letter-spacing: -.015em;
    transition: transform .16s cubic-bezier(.2,.8,.2,1), filter .16s ease, opacity .16s ease;
}
.btn-primary {
    color: #fff;
    background: linear-gradient(180deg, #caa27d 0%, #ad8460 100%);
    border-color: rgba(255,255,255,.24);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.32), 0 16px 32px rgba(176,140,106,.27);
}
.btn-secondary,
.btn-metal {
    color: var(--zr-ink);
    background: linear-gradient(180deg, rgba(255,255,255,.80), rgba(255,250,244,.95));
    border-color: rgba(255,255,255,.68);
    box-shadow: var(--shadow-hairline), var(--shadow-xs);
}
.btn-primary:active,
.btn-secondary:active,
.btn-metal:active { transform: translateY(1px) scale(.99); filter: saturate(.96); }

.rating-widget { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 8px 0 2px; }
.rating-widget .star-btn { appearance: none; width: 38px; height: 38px; border: 0; background: transparent; color: rgba(90,74,66,.22); font-size: 31px; line-height: 1; }
.rating-widget .star-btn.active { color: var(--zr-star); }

.admin-panel { padding: 0 var(--space-page) 120px; }
.admin-panel .app-header { margin: 0 calc(var(--space-page) * -1) 18px; }
.admin-stats { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 11px; margin-bottom: 14px; }
.stat-card {
    min-height: 104px;
    padding: 16px;
    border-radius: 27px;
    background: linear-gradient(180deg, rgba(255,255,255,.78), rgba(255,250,244,.94));
    border: 1px solid rgba(255,255,255,.66);
    box-shadow: var(--shadow-hairline), var(--shadow-sm);
}
.stat-card .value { color: var(--zr-ink); font-size: 24px; line-height: 1.05; font-weight: 820; letter-spacing: -.045em; }
.stat-card .label { margin-top: 7px; color: var(--zr-muted); font-size: 12px; font-weight: 700; }
.admin-table { width: 100%; border-collapse: collapse; min-width: 560px; }
.admin-table th, .admin-table td { padding: 13px 10px; text-align: left; vertical-align: middle; border-bottom: 1px solid rgba(90,74,66,.08); font-size: 13px; }
.admin-table th { color: var(--zr-muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; font-weight: 820; }
.status-badge { display: inline-flex; align-items: center; min-height: 24px; padding: 0 9px; border-radius: var(--r-pill); font-size: 11px; font-weight: 800; }
.status-active { color: var(--zr-success); background: rgba(95,139,99,.14); }
.status-inactive, .status-rejected, .status-blocked { color: var(--zr-danger); background: rgba(185,99,90,.14); }
.status-pending { color: var(--zr-warning); background: rgba(179,134,69,.14); }
.admin-action, .admin-invoice, .admin-publish { width: 30px; height: 30px; margin-right: 4px; border: 1px solid var(--zr-line); border-radius: 12px; background: var(--zr-white-a); font-size: 13px; font-weight: 760; }

.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 7px; color: var(--zr-muted); font-size: 11px; line-height: 1; font-weight: 820; letter-spacing: .12em; text-transform: uppercase; }
.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    min-height: 52px;
    border: 1px solid rgba(255,255,255,.68);
    outline: none;
    border-radius: 20px;
    padding: 14px;
    color: var(--zr-ink);
    background: linear-gradient(180deg, rgba(255,255,255,.78), rgba(255,250,244,.94));
    box-shadow: var(--shadow-hairline), var(--shadow-xs);
    font-size: 15px;
    font-weight: 520;
}
.form-group textarea { min-height: 112px; resize: vertical; }

.empty-state, .error-state { padding: 44px 22px; text-align: center; color: var(--zr-muted); }
.empty-state .title, .error-state .title { color: var(--zr-ink); font-size: 20px; font-weight: 780; letter-spacing: -.03em; margin-bottom: 8px; }

.bottom-nav {
    position: fixed;
    left: 50%;
    bottom: calc(12px + var(--safe-bottom));
    transform: translateX(-50%);
    width: calc(min(100%, var(--app-width)) - 24px);
    z-index: 160;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    gap: 4px;
    padding: 7px;
    border-radius: 30px;
    background: rgba(255,250,244,.80);
    border: 1px solid rgba(255,255,255,.70);
    box-shadow: var(--shadow-hairline), var(--shadow-lg);
    backdrop-filter: blur(26px) saturate(160%);
    -webkit-backdrop-filter: blur(26px) saturate(160%);
}
[data-theme="dark"] .bottom-nav { background: rgba(47,39,35,.84); border-color: rgba(255,255,255,.08); }
.nav-item {
    min-width: 0;
    min-height: 58px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border: 0;
    border-radius: 23px;
    background: transparent;
    color: var(--zr-muted);
    font-size: 10.5px;
    line-height: 1;
    font-weight: 720;
    letter-spacing: -.01em;
}
.nav-item .icon { width: 20px; height: 20px; display: grid; place-items: center; color: currentColor; }
.nav-item .icon svg { width: 20px; height: 20px; stroke-width: 2.1; }
.nav-item.active {
    color: var(--zr-ink);
    background: linear-gradient(180deg, rgba(255,255,255,.78), rgba(255,250,244,.96));
    box-shadow: var(--shadow-hairline), 0 9px 20px rgba(46,36,30,.07);
}
[data-theme="dark"] .nav-item.active { background: rgba(255,255,255,.08); }

.premium-preview-shell { min-height: 100vh; padding: 24px 0 120px; }
.premium-preview-note { max-width: var(--app-width); margin: 0 auto 14px; padding: 0 18px; color: var(--zr-muted); font-size: 12px; font-weight: 650; }
.design-lock-badge { display: inline-flex; padding: 7px 11px; border-radius: var(--r-pill); background: rgba(255,255,255,.52); border: 1px solid rgba(255,255,255,.62); color: var(--zr-brown); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; font-weight: 820; }

@media (min-width: 720px) {
    body { background-attachment: fixed; }
    #app { min-height: 100vh; }
    .business-list { display: block; }
    .banner-slide { flex-basis: 88.5%; }
    .category-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
}
@media (max-width: 390px) {
    :root { --space-page: 15px; }
    .app-header h1, .screen-title { font-size: 23px; }
    .banner-overlay h3 { font-size: 25px; }
    .banner-slide { min-height: 202px; border-radius: 30px; }
    .category-card { min-height: 116px; }
    .business-detail .title { font-size: 27px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Premium component lock: profile, contacts, invoices and AI blocks */
.profile-content,
.useful-contacts-page .contacts-list {
    padding: 16px var(--space-page) 0;
}
.profile-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px;
    margin-bottom: 14px;
}
.profile-name {
    color: var(--zr-ink);
    font-size: 18px;
    line-height: 1.15;
    font-weight: 780;
    letter-spacing: -.03em;
}
.profile-id {
    margin-top: 5px;
    color: var(--zr-muted);
    font-size: 12px;
    font-weight: 650;
}
.profile-count {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    color: #fff;
    background: linear-gradient(180deg, var(--zr-gold-2), var(--zr-gold));
    box-shadow: inset 0 1px 0 rgba(255,255,255,.32), 0 12px 22px rgba(176,140,106,.19);
    font-weight: 820;
    letter-spacing: -.03em;
}
.profile-business-list { margin-top: 14px; }
.profile-business-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px;
    margin-bottom: 12px;
}
.profile-business-main {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}
.profile-business-logo {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    color: #fff;
    background: linear-gradient(145deg, var(--zr-gold), var(--zr-brown));
    box-shadow: inset 0 1px 0 rgba(255,255,255,.26);
}
.profile-business-logo svg { width: 22px; height: 22px; }
.profile-business-info { min-width: 0; }
.profile-business-name {
    color: var(--zr-ink);
    font-size: 15px;
    line-height: 1.15;
    font-weight: 760;
    letter-spacing: -.025em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.profile-business-meta {
    margin-top: 6px;
    color: var(--zr-muted);
    font-size: 12px;
    line-height: 1.2;
    font-weight: 650;
}
.profile-business-card .btn-secondary,
#invoice-block > .btn-secondary {
    width: auto;
    min-height: 42px;
    padding: 0 14px;
    font-size: 13px;
    flex: 0 0 auto;
}
#business-form-block,
#invoice-block { margin-top: 14px; }
.business-form-card { padding: 18px; }
.form-head h2 {
    margin-bottom: 14px;
    color: var(--zr-ink);
    font-size: 20px;
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -.04em;
}
.ai-panel {
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 12px;
    padding: 14px;
    margin: 13px 0 16px;
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(255,255,255,.62), rgba(255,250,244,.88));
    border: 1px solid rgba(255,255,255,.62);
    box-shadow: var(--shadow-hairline), var(--shadow-xs);
}
.ai-panel-icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 17px;
    color: var(--zr-brown);
    background: rgba(176,140,106,.13);
    border: 1px solid rgba(176,140,106,.18);
}
.ai-panel-icon svg { width: 21px; height: 21px; }
.ai-panel-title {
    color: var(--zr-ink);
    font-size: 15px;
    line-height: 1.15;
    font-weight: 790;
    letter-spacing: -.02em;
}
.ai-panel-text {
    margin-top: 5px;
    color: var(--zr-muted);
    font-size: 12px;
    line-height: 1.35;
    font-weight: 620;
}
.ai-panel-btn {
    grid-column: 1 / -1;
    min-height: 44px;
    font-size: 13px;
}
.invoice-list { margin-top: 12px; }
.invoice-card {
    padding: 15px;
    margin-bottom: 12px;
    border-radius: 25px;
    background: linear-gradient(180deg, rgba(255,255,255,.76), rgba(255,250,244,.94));
    border: 1px solid rgba(255,255,255,.66);
    box-shadow: var(--shadow-hairline), var(--shadow-sm);
}
.invoice-top,
.invoice-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.invoice-bottom { margin-top: 12px; }
.invoice-title {
    color: var(--zr-ink);
    font-size: 15px;
    font-weight: 790;
    letter-spacing: -.02em;
}
.invoice-desc {
    margin-top: 5px;
    color: var(--zr-muted);
    font-size: 12px;
    line-height: 1.35;
    font-weight: 620;
}
.invoice-amount {
    flex: 0 0 auto;
    color: var(--zr-ink);
    font-size: 16px;
    font-weight: 820;
    letter-spacing: -.035em;
}
.invoice-card .pay-invoice {
    width: auto;
    min-height: 40px;
    padding: 0 14px;
    font-size: 13px;
}
.filter-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 12px var(--space-page) 10px;
    scrollbar-width: none;
}
.filter-scroll::-webkit-scrollbar { display: none; }
.useful-contact-card {
    padding: 16px;
    margin-bottom: 12px;
}
.useful-contact-head {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-bottom: 12px;
}
.useful-contact-logo {
    width: 50px;
    height: 50px;
    flex: 0 0 50px;
    display: grid;
    place-items: center;
    border-radius: 19px;
    color: #fff;
    background: linear-gradient(145deg, var(--zr-gold), var(--zr-brown));
    box-shadow: inset 0 1px 0 rgba(255,255,255,.26);
}
.useful-contact-logo svg { width: 22px; height: 22px; }
.useful-contact-info { min-width: 0; }
.useful-contact-name {
    color: var(--zr-ink);
    font-size: 16px;
    line-height: 1.15;
    font-weight: 780;
    letter-spacing: -.03em;
}
.useful-contact-cat {
    margin-top: 5px;
    color: var(--zr-muted);
    font-size: 12px;
    font-weight: 650;
}
.useful-contact-desc {
    margin-bottom: 13px;
    color: var(--zr-brown);
    font-size: 14px;
    line-height: 1.55;
    font-weight: 520;
}
.useful-contact-row {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 7px 0;
    color: var(--zr-ink);
    background: transparent;
    border: 0;
    border-top: 1px solid rgba(90,74,66,.07);
    text-align: left;
    font-size: 14px;
    line-height: 1.3;
    font-weight: 620;
}
.useful-contact-row:first-of-type { border-top: 0; }
.useful-contact-row.contact-phone,
.useful-contact-row.contact-website { color: var(--zr-brown); }

[data-theme="dark"] .business-form-card,
[data-theme="dark"] .invoice-card,
[data-theme="dark"] .ai-panel,
[data-theme="dark"] .stat-card,
[data-theme="dark"] .business-detail .section {
    background: linear-gradient(180deg, rgba(59,49,43,.84), rgba(47,39,35,.94));
    border-color: rgba(255,255,255,.08);
}
.detail-stars { margin-bottom: 16px; font-size: 20px; }
.booking-note { margin-top: 10px; color: var(--zr-muted); text-align: center; font-size: 12px; line-height: 1.35; font-weight: 650; }
.bottom-spacer { height: 80px; }
.native-panel { padding: 18px; margin-bottom: 14px; }
.native-panel-note { margin-top: 10px; color: var(--zr-muted); font-size: 12px; line-height: 1.35; font-weight: 650; }
.admin-table-wrap { padding: 12px; overflow: auto; }
.admin-row-id { color: var(--zr-muted); font-size: 11px; font-weight: 700; }
.loading-more { display: grid; padding: 18px; place-items: center; }
.spinner-small { width: 26px; height: 26px; border-width: 2px; }
.spinner-small.centered { margin: 0 auto 14px; }
.error-action { margin-top: 18px; }


/* Premium deployment lock: keeps the real HTML close to the approved render */
:root { --font-weight-title: 780; --font-weight-ui: 620; }
@media (max-width: 360px) { :root { --space-page: 14px; --app-width: 430px; } }
@media (min-width: 481px) { body { background-attachment: fixed; } }

.star-icon { display: block; color: var(--zr-star); filter: drop-shadow(0 1px 0 rgba(255,255,255,.2)); }
.star-icon.empty { color: rgba(90,74,66,.20); }
[data-theme="dark"] .star-icon.empty { color: rgba(255,255,255,.16); }
.rating-stars { min-height: 18px; }
.rating-widget .star-btn {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: linear-gradient(180deg, rgba(255,255,255,.62), rgba(255,250,244,.86));
    box-shadow: var(--shadow-hairline), var(--shadow-xs);
    color: rgba(90,74,66,.24);
}
.rating-widget .star-btn svg { width: 22px; height: 22px; fill: currentColor; stroke: none; }
.rating-widget .star-btn.active { color: var(--zr-star); }

.action-btn {
    width: 36px;
    height: 36px;
    display: inline-grid;
    place-items: center;
    margin-right: 6px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.62);
    background: linear-gradient(180deg, rgba(255,255,255,.72), rgba(255,250,244,.90));
    box-shadow: var(--shadow-hairline), var(--shadow-xs);
    color: var(--zr-brown);
}
.action-btn svg { width: 17px; height: 17px; }
.admin-table td:last-child { white-space: nowrap; }
.back-btn svg { width: 20px; height: 20px; }
.nav-item svg { stroke-width: 1.85; stroke-linecap: round; stroke-linejoin: round; }

/* Stable media slots: no blurry stretched ad cards */
.banner-slide img, .business-detail .hero img, .business-card .logo img {
    image-rendering: auto;
    backface-visibility: hidden;
    transform: translateZ(0) scale(1.0001);
}
.banner-slide:not(:has(img)) { background-image: url('./assets/ad-placeholder-premium.svg'); background-size: cover; background-position: center; }

/* Make preview and production use the same visual rhythm */
.home-page, .catalog-page, .search-page, .profile-page, .business-detail, .admin-panel { contain: layout paint; }
.btn-primary, .btn-secondary, .banner-cta, .filter-chip, .nav-item { user-select: none; }
input, textarea, select { -webkit-appearance: none; appearance: none; }
select { background-image: linear-gradient(45deg, transparent 50%, var(--zr-muted) 50%), linear-gradient(135deg, var(--zr-muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 12px) 50%; background-size: 6px 6px, 6px 6px; background-repeat: no-repeat; padding-right: 36px !important; }

/* Render guard for typography */
.app-header h1, .screen-title, .banner-overlay h3, .section-header h2, .business-detail .title {
    font-family: var(--font-ui);
    font-synthesis: none;
    line-height: .98;
}
.business-card .name, .stat-card .value, .btn-primary, .btn-secondary { font-synthesis: none; }
/* ── Photo Manager ─────────────────────────────────────── */
.photo-manager { margin-bottom: 16px; }
.photo-manager label { display: block; font-size: 13px; font-weight: 620; color: var(--zr-muted); margin-bottom: 8px; }

.photo-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.photo-thumb {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: var(--r-14);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.photo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.photo-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,.55);
    color: #fff;
    font-size: 11px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.photo-add-btn {
    width: 80px;
    height: 80px;
    border-radius: var(--r-14);
    border: 2px dashed var(--zr-sand);
    background: var(--zr-paper-2);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    color: var(--zr-muted);
    transition: border-color .18s, background .18s;
}
.photo-add-btn:active { border-color: var(--zr-gold); background: var(--zr-cream); }
.photo-add-btn:disabled { opacity: .5; cursor: default; }

.photo-hint { font-size: 11px; color: var(--zr-muted); margin-top: 6px; }
.photo-error { font-size: 13px; color: var(--zr-danger); margin-top: 6px; padding: 8px 12px; background: rgba(185,99,90,.1); border-radius: 8px; }

/* ── Form groups in Profile ───────────────────────────── */
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; font-weight: 620; color: var(--zr-muted); margin-bottom: 6px; }
.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 11px 14px;
    border-radius: var(--r-14);
    border: 1.5px solid var(--zr-line-strong);
    background: var(--zr-paper);
    color: var(--zr-ink);
    font-family: var(--font-ui);
    font-size: 15px;
    outline: none;
    transition: border-color .18s;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus { border-color: var(--zr-gold); }
.form-group textarea { resize: vertical; min-height: 100px; }
