/* =========================================================
   SVOIM  стилі
   порядок 1 токени · 2 база · 3 компоненти · 4 секції · 5 десктоп
   підхід mobile-first, один брейкпоінт (900px)
   ========================================================= */

/* ---------- 1. токен ---------- */
:root {
    /* колір */
    --bg:          #EEE8D9;
    --surface:     #E6DFCC;
    --surface-hi:  #F5F1E6;
    --ink:         #2E3828;
    --ink-soft:    #6B6E5C;
    --olive:       #3B4733;
    --line:        rgba(46, 56, 40, 0.14);

    /* шрифти */
    --font-body: 'Manrope', system-ui, sans-serif;
    --font-hand: 'Caveat', 'Segoe Print', cursive;

    /* форма */
    --radius-lg: 24px;
    --radius-md: 16px;
    --gutter: 20px;
    --page-max: 1240px;
}

/* ---------- 2. баба ---------- */
*, *::before, *::after { box-sizing: border-box; }

* { margin: 0; padding: 0; }

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

:focus-visible { outline: 2px solid var(--olive); outline-offset: 3px; }

.page {
    max-width: var(--page-max);
    min-height: 100dvh;
    margin: 0 auto;
    padding: 0 var(--gutter) 96px;   /* запас під нижню навігацію */
    display: flex;
    flex-direction: column;
}

main { flex: 1; }
[hidden] { display: none !important; }

/* ---------- 3. компоненти ---------- */

/* кнопка іконка */
.icon-btn {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: background-color 0.2s;
}
.icon-btn:hover { background: var(--line); }

/* головна кнопка */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding: 14px 22px;
    border-radius: 100px;
    background: var(--olive);
    color: var(--surface-hi);
    font-size: 15px;
    font-weight: 600;
    transition: transform 0.15s;
}
.btn:active { transform: scale(0.97); }
.btn .material-symbols-outlined { font-size: 20px; }

/* картка категорії */
.card {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 120px;
    padding: 18px;
    border-radius: var(--radius-lg);
    background: var(--surface);
    transition: background-color 0.2s;
}
.card:hover { background: #DFD7C1; }
.card:active { background: #D8CFB8; }

.card__icon  { font-size: 28px; margin-bottom: auto; }
.card__title { font-size: 15px; font-weight: 800; margin-top: 24px; letter-spacing: -0.2px; }
.card__desc,
.card__arrow { display: none; }   /* на мобільному тільки іконка + назва */

/* ---------- 4. секції ---------- */

/* шапка */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0 12px;
}

.logo {
    display: flex;
    flex-direction: column;
    font-weight: 800;
    font-size: 28px;
    line-height: 1;
    letter-spacing: -1.2px;
}
.logo__tag {
    margin-top: 4px;
    font-size: 8px;
    font-weight: 600;
    letter-spacing: 0.2px;
    color: var(--ink-soft);
}

.header__nav { display: none; }
.header__actions { display: flex; gap: 4px; }

/* Hero */
.hero {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin: 12px 0 28px;
}

.hero__title {
    font-family: var(--font-hand);
    font-size: 56px;
    font-weight: 700;
    line-height: 0.95;
    margin-bottom: 16px;
}

.hero__desc {
    font-size: 13px;
    line-height: 1.5;
    color: var(--ink-soft);
    margin-bottom: 20px;
}

.hero__note { display: none; }

.hero__photo {
    display: grid;
    place-items: center;
    min-height: 200px;
    border-radius: var(--radius-lg);
    background-color: var(--olive);
    background-image: var(--hero-photo, linear-gradient(135deg, #66735A, #2E3828));
    background-size: cover;
    background-position: center;
}
.hero__photo-hint { font-size: 36px; color: rgba(255, 255, 255, 0.4); }

/* сітка карток */
.cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* футер з містом і хвилястою лінією */
.footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: 28px;
    padding-top: 20px;
    font-size: 13px;
    font-weight: 600;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='8' viewBox='0 0 60 8'%3E%3Cpath d='M0 4Q15 0 30 4T60 4' fill='none' stroke='%232E3828' stroke-opacity='.4' stroke-width='1.2'/%3E%3C/svg%3E") repeat-x top / 60px 8px;
}
.footer .material-symbols-outlined { font-size: 18px; }

/* нижня навігація (мобільний) */
.bottom-nav {
    position: fixed;
    inset: auto 0 0 0;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    padding: 10px 8px calc(10px + env(safe-area-inset-bottom));
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    background: var(--surface-hi);
    box-shadow: 0 -6px 24px rgba(46, 56, 40, 0.08);
}
.bottom-nav__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    font-size: 10px;
    font-weight: 600;
    color: var(--ink-soft);
}
.bottom-nav__item.is-active { color: var(--ink); }
.bottom-nav__item .material-symbols-outlined { font-size: 24px; }

/* ---------- 4b. внутрішні сторінки ---------- */
.page-head { margin: 8px 0 20px; }
.page-head__title { font-size: 28px; font-weight: 800; letter-spacing: -0.5px; }
.page-head__sub { margin-top: 6px; font-size: 14px; color: var(--ink-soft); }

.back {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--ink-soft);
}
.back .material-symbols-outlined { font-size: 20px; }

/* пошук */
.search {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 48px;
    margin-bottom: 20px;
    padding: 0 16px;
    border-radius: 100px;
    background: var(--surface);
    color: var(--ink-soft);
}
.search input::-webkit-search-cancel-button { display: none; }
.search:focus-within { outline: 2px solid var(--olive); }
.search input {
    flex: 1;
    min-width: 0;
    height: 100%;
    border: 0;
    outline: 0;
    background: none;
    font: inherit;
    font-size: 14px;
    color: var(--ink);
}

/* плитки послуг */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    aspect-ratio: 1;
    padding: 10px;
    border-radius: var(--radius-md);
    background: var(--surface);
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.25;
    transition: background-color 0.2s;
}
.tile:hover { background: #DFD7C1; }
.tile .material-symbols-outlined { font-size: 28px; }
.empty { margin-top: 24px; font-size: 14px; color: var(--ink-soft); text-align: center; }
.needs-map-link { margin: -4px 0 18px; }

/* фільтри чіпси (популярный элемент веб- и мобильного интерфейса (UX/UI), который выглядит как небольшая интерактивная кнопка со скругленными краями (в форме таблетки))*/
.chips {
    display: flex;
    gap: 8px;
    margin: 0 calc(var(--gutter) * -1) 20px;
    padding: 0 var(--gutter);
    overflow-x: auto;
    scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
    flex: none;
    padding: 8px 16px;
    border: 1px solid var(--line);
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
}
.chip.is-active { background: var(--olive); border-color: var(--olive); color: var(--surface-hi); }

/* картки знижок */
.offers { display: grid; grid-template-columns: 1fr; gap: 16px; }
.offer {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--surface-hi);
    content-visibility: auto;            /* не малюємо те, що поза екраном */
    contain-intrinsic-size: auto 280px;
}
.offer__img {
    display: grid;
    place-items: center;
    aspect-ratio: 16 / 10;
    background-color: var(--tone, var(--olive));
    background-image: var(--img, none);  /* сюди можна підставити фото style="--img:url(img/x.jpg)" */
    background-size: cover;
    background-position: center;
    color: rgba(255, 255, 255, 0.5);
}
.offer__img .material-symbols-outlined { font-size: 40px; }
.offer__body { display: flex; flex-direction: column; flex: 1; gap: 4px; padding: 14px 16px 16px; }
.offer__title { font-size: 16px; font-weight: 800; line-height: 1.25; }
.offer__place { font-size: 12px; color: var(--ink-soft); }
.offer__foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 12px; }
.offer__foot .save-action { margin-left: auto; }
.badge {
    padding: 7px 14px;
    border-radius: 100px;
    background: var(--olive);
    color: var(--surface-hi);
    font-size: 11px;
    font-weight: 600;
}
.offer__go,
.row__go {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border: 1px solid var(--line);
    border-radius: 50%;
}
.offer__go .material-symbols-outlined,
.row__go .material-symbols-outlined { font-size: 18px; }

/* ---------- 4c. рядки, місце, мапа, профыль ---------- */
.chips + .chips { margin-top: -8px; }

/* рядок списку (події, результати пошуку, міні-картка на мапі) */
.rows { display: grid; gap: 10px; }
.row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 14px 10px 10px;
    border-radius: var(--radius-md);
    background: var(--surface);
}
.row__img {
    flex: none;
    display: grid;
    place-items: center;
    width: 76px;
    height: 68px;
    border-radius: 12px;
    background-color: var(--tone, var(--olive));
    background-image: var(--img, none);
    background-size: cover;
    color: rgba(255, 255, 255, 0.55);
}
.row__body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.row__title { font-size: 14px; font-weight: 800; line-height: 1.25; }
.row__meta { margin-top: 4px; font-size: 12px; line-height: 1.4; color: var(--ink-soft); }
.row-wrap { display: flex; align-items: center; gap: 8px; min-width: 0; }
.row-wrap .row { flex: 1; min-width: 0; }
.save-action {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 100px;
    color: var(--ink-soft);
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    transition: color 0.2s, background-color 0.2s, border-color 0.2s;
}
.save-action .material-symbols-outlined { font-size: 17px; }
.save-action[aria-pressed="true"] { border-color: var(--olive); background: var(--olive); color: var(--surface-hi); }
.save-action:focus-visible { outline: 2px solid var(--olive); outline-offset: 3px; }

.rating { display: inline-flex; align-items: center; gap: 3px; font-weight: 600; color: var(--ink); }
.rating .material-symbols-outlined { font-size: 14px; }
.tag { padding: 3px 10px; border-radius: 100px; background: var(--surface); font-size: 11px; font-weight: 600; color: var(--ink); }
.badge--soft { align-self: flex-start; margin-top: 8px; padding: 4px 10px; background: var(--surface-hi); color: var(--ink); }

/* сторінка місця */
.page-bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.page-bar .back { margin-bottom: 0; }
.place__img {
    position: relative;
    display: grid;
    place-items: center;
    aspect-ratio: 16 / 10;
    margin-bottom: 18px;
    border-radius: var(--radius-lg);
    background-color: var(--tone, var(--olive));
    background-image: var(--img, none);
    background-size: cover;
    color: rgba(255, 255, 255, 0.5);
}
.place__img > .material-symbols-outlined { font-size: 56px; }
.place__title { font-size: 26px; font-weight: 800; letter-spacing: -0.5px; }
.place__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0 14px; font-size: 13px; }
.fact { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; font-size: 13px; font-weight: 600; }
.fact--spaced { margin-top: 14px; }
.fact .material-symbols-outlined { font-size: 20px; color: var(--ink-soft); }
.services { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.service { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 100px; background: var(--surface); font-size: 12px; font-weight: 600; }
.service .material-symbols-outlined { font-size: 16px; }
.perk { margin: 18px 0 8px; padding: 14px 16px; border-radius: var(--radius-md); background: var(--surface); font-size: 13px; line-height: 1.4; }
.perk__title { margin-bottom: 4px; font-size: 14px; font-weight: 800; }
.accordion { border-top: 1px solid var(--line); }
.accordion summary { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; font-size: 14px; font-weight: 600; cursor: pointer; list-style: none; }
.accordion summary::-webkit-details-marker { display: none; }
.accordion__body { padding-bottom: 14px; font-size: 13px; line-height: 1.5; color: var(--ink-soft); }

/* мапа (схематична, SVG) */
.map { position: relative; isolation: isolate; height: 62dvh; min-height: 420px; overflow: hidden; border-radius: var(--radius-lg); background: var(--surface); }
.map__canvas { position: absolute; inset: 0; }
.map__note { position: absolute; top: 12px; left: 12px; right: 12px; z-index: 1000; padding: 10px 14px; border-radius: var(--radius-md); background: var(--surface-hi); font-size: 13px; text-align: center; }
.map-nearby { margin-top: 14px; }
.map-nearby:disabled { cursor: wait; opacity: 0.7; }
.map-pin { background: none; border: 0; }
.map-pin .material-symbols-outlined { display: block; font-size: 36px; color: var(--ink); }
.map-pin.is-active .material-symbols-outlined { color: var(--olive); transform: scale(1.3); transform-origin: bottom center; }
.map__card { z-index: 1000; position: absolute; inset: auto 12px 12px; display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: var(--radius-md); background: var(--surface-hi); box-shadow: 0 8px 24px rgba(46, 56, 40, 0.16); }
.map__card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; padding-left: 4px; font-size: 14px; }
.map__card-head strong { min-width: 0; line-height: 1.3; }
.map__card-toggle { flex: none; width: 36px; height: 36px; border: 1px solid var(--line); }
.map__card-body { display: grid; gap: 8px; }
.map__card-body .row { background: var(--surface); }

/* профіль */
.profile { max-width: 560px; }
.profile__head { display: flex; align-items: center; gap: 14px; margin: 8px 0 20px; }
.avatar { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--surface); }
.avatar .material-symbols-outlined { font-size: 32px; }
.menu-list { margin-bottom: 24px; }
.menu-item { display: flex; align-items: center; gap: 14px; padding: 16px 4px; border-bottom: 1px solid var(--line); font-size: 15px; font-weight: 600; }
.menu-item .material-symbols-outlined:last-child { margin-left: auto; color: var(--ink-soft); }

/* кнопки варіанти */
.btn--block { display: flex; justify-content: center; width: 100%; }
.btn--outline { background: none; border: 1px solid var(--ink); color: var(--ink); }

/* налаштування */
body[data-page="settings"] main { max-width: 680px; width: 100%; }
body[data-page="settings"] .page-head { margin-bottom: 24px; }
body[data-page="settings"] .form { display: grid; gap: 14px; }
body[data-page="settings"] .field { display: grid; gap: 8px; font-size: 13px; font-weight: 700; }
body[data-page="settings"] .field__label { color: var(--ink-soft); }
body[data-page="settings"] .field input {
    width: 100%;
    min-height: 50px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    outline: 0;
    background: var(--surface-hi);
    color: var(--ink);
    font: inherit;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}
body[data-page="settings"] .field input::placeholder { color: var(--ink-soft); opacity: 0.75; }
body[data-page="settings"] .field input:focus { border-color: var(--olive); box-shadow: 0 0 0 3px rgba(59, 71, 51, 0.12); }
body[data-page="settings"] .switch {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 76px;
    padding: 14px 2px;
    border-bottom: 1px solid var(--line);
    cursor: pointer;
}
body[data-page="settings"] .switch__text { display: grid; gap: 4px; font-size: 14px; font-weight: 700; }
body[data-page="settings"] .switch small { max-width: 440px; font-size: 12px; font-weight: 400; line-height: 1.5; color: var(--ink-soft); }
body[data-page="settings"] .switch input {
    position: relative;
    flex: none;
    width: 46px;
    height: 26px;
    margin: 0;
    appearance: none;
    border: 1px solid var(--line);
    border-radius: 100px;
    background: var(--surface);
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
}
body[data-page="settings"] .switch input::before {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--surface-hi);
    box-shadow: 0 1px 3px rgba(46, 56, 40, 0.2);
    content: "";
    transition: transform 0.2s;
}
body[data-page="settings"] .switch input:checked { border-color: var(--olive); background: var(--olive); }
body[data-page="settings"] .switch input:checked::before { transform: translateX(20px); }
body[data-page="settings"] .switch input:checked::before { background: #FFFFFF; }
body[data-page="settings"] .switch input:focus-visible { outline: 2px solid var(--olive); outline-offset: 3px; }
body[data-page="settings"] .form .btn { margin-top: 8px; }
body[data-page="settings"] .switch:has(input:checked) .switch__text { color: var(--olive); }
body[data-page="settings"] .toast { margin-top: 14px; font-size: 13px; font-weight: 600; color: var(--ink-soft); }

body[data-page^="my-"] main { width: 100%; max-width: 900px; margin: 0 auto; }
body[data-page^="my-"] .page-head { margin-bottom: 28px; }
body[data-page^="my-"] .page-head__sub { max-width: 560px; line-height: 1.55; }
body[data-page^="my-"] .empty {
    max-width: 760px;
    margin-top: 12px;
    padding: 18px 0;
    border-top: 1px solid var(--line);
    line-height: 1.55;
    text-align: left;
}
body[data-page^="my-"] .btn--gap { margin-top: 18px; }
body[data-page="my-events"] [data-list] { max-width: 760px; gap: 12px; }
body[data-page="my-events"] .row { min-height: 94px; border: 1px solid var(--line); background: var(--surface-hi); }
body[data-page="my-events"] .row__img { width: 84px; height: 74px; }
body[data-page="my-events"] .save-action { min-width: 92px; }
body[data-page="my-discounts"] .offers { grid-template-columns: 1fr; max-width: 760px; gap: 12px; }
body[data-page="my-discounts"] .offer {
    flex-direction: row;
    min-height: 132px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    content-visibility: visible;
    contain-intrinsic-size: auto;
}
body[data-page="my-discounts"] .offer__img { flex: none; width: 112px; aspect-ratio: auto; }
body[data-page="my-discounts"] .offer__body { min-width: 0; padding: 14px 16px; }
body[data-page="my-discounts"] .offer__foot { gap: 8px; }
.btn--gap { margin-top: 16px; }

/* ---------- 4d. панелі бокове меню, пошук, порожні стани ---------- */
.empty-state { display: grid; justify-items: center; gap: 12px; padding: 48px 0; text-align: center; font-size: 14px; color: var(--ink-soft); }
.empty-state > .material-symbols-outlined { font-size: 40px; }
.empty-state .page-head__title { color: var(--ink); }
.menu-item small { display: block; margin-top: 2px; font-size: 12px; font-weight: 400; color: var(--ink-soft); }
.menu-item.is-active { color: var(--olive); }

.drawer-backdrop {
    position: fixed; inset: 0; z-index: 130;
    background: rgba(30, 36, 26, 0.4);
    opacity: 0; visibility: hidden;
    transition: opacity 0.25s, visibility 0.25s;
}
.drawer {
    position: fixed; inset: 0 0 0 auto; z-index: 131;
    display: flex; flex-direction: column;
    width: min(320px, 86vw);
    padding: 20px;
    background: var(--surface-hi);
    transform: translateX(100%); visibility: hidden;
    transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1), visibility 0.3s;
}
.drawer.is-open, .drawer-backdrop.is-open { visibility: visible; }
.drawer.is-open { transform: none; }
.drawer-backdrop.is-open { opacity: 1; }
.drawer__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.drawer__logo { font-size: 26px; font-weight: 800; letter-spacing: -1.2px; }
.drawer .menu-list { margin-bottom: 0; }
.drawer__foot { margin-top: auto; font-size: 12px; line-height: 1.5; color: var(--ink-soft); }

.search-sheet { position: fixed; inset: 0; z-index: 140; overflow-y: auto; background: var(--bg); animation: fade 0.2s; }
.search-sheet__inner { max-width: 640px; margin: 0 auto; padding: 16px var(--gutter) 40px; }
.sheet-title { margin: 20px 0 4px; font-size: 13px; font-weight: 800; color: var(--ink-soft); }

/* ---------- 5. дескоп (від 900px) ---------- */
@media (min-width: 900px) {
    :root { --gutter: 48px; }

    .page { padding-bottom: 32px; }

    /* шапка лого | меню по центру | іконки */
    .header {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        padding: 32px 0 24px;
    }
    .header__actions { justify-content: flex-end; }

    .header__nav { display: flex; gap: 36px; }
    .header__link {
        padding-bottom: 4px;
        font-size: 14px;
        font-weight: 600;
        color: var(--ink-soft);
        border-bottom: 2px solid transparent;
        transition: color 0.2s;
    }
    .header__link:hover { color: var(--ink); }
    .header__link.is-active { color: var(--ink); border-color: var(--ink); }

    /* hero текст зліва, фото справа з плавним переходом */
    .hero {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
        align-items: center;
        gap: 0;
        margin: 0 0 40px;
    }
    .hero__text { position: relative; z-index: 1; }

    .hero__title { font-size: 92px; margin-bottom: 28px; }
    .hero__desc  { font-size: 16px; margin-bottom: 28px; }
    .btn { padding: 16px 28px; font-size: 16px; }

    .hero__photo {
        min-height: 420px;
        border-radius: 32px;
        mask-image: linear-gradient(90deg, transparent 0, #000 30%);
    }

    .hero__note {
        display: block;
        position: absolute;
        top: 12%;
        left: 47%;
        z-index: 2;
        font-family: var(--font-hand);
        font-size: 24px;
        line-height: 1;
        color: var(--ink-soft);
        transform: rotate(-6deg);
    }

    /* картки 4 в ряд, з описом і стрілкою */
    .cards { grid-template-columns: repeat(4, 1fr); gap: 20px; }

    .card { min-height: 190px; padding: 24px; }
    .card__title { font-size: 16px; margin-top: 28px; }
    .card__desc  { display: block; margin-top: 6px; font-size: 12px; line-height: 1.4; color: var(--ink-soft); }
    .card__arrow { display: block; margin-top: 14px; font-size: 18px; }

    /* внутрішні сторінки */
    .page-head { margin-bottom: 28px; }
    .page-head__title { font-size: 44px; }
    .search { max-width: 560px; margin-bottom: 28px; }
    .tiles { grid-template-columns: repeat(5, 1fr); gap: 16px; }
    .tile { font-size: 13px; }
    .chips { margin: 0 0 28px; padding: 0; }
    .offers { grid-template-columns: repeat(3, 1fr); gap: 24px; }

    /* події, результати, місце, мапа */
    .rows { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .rows--narrow { grid-template-columns: 1fr; max-width: 720px; }
    .place { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: start; }
    .map { height: 560px; }
    .map__card { inset: auto auto 16px 16px; width: min(420px, calc(100% - 32px)); }

    .bottom-nav { display: none; }
}

/* ---------- 6. анімації ----------
   правило тільки from-кадри + fill-mode backwards  тоді при вимкненій анімації
   (.low-end / reduced-motion) елементи просто стоять на місці й видимі. */
@view-transition { navigation: auto; }              /* плавний перехід між сторінками (Chrome/Edge/Safari) */
.header     { view-transition-name: header; }        /* шапка й меню не «мигають» при переході */
.bottom-nav { view-transition-name: bottom-nav; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.25s; }

@keyframes rise   { from { opacity: 0; transform: translateY(14px); } }
@keyframes reveal { from { opacity: 0; transform: scale(0.96); } }
@keyframes pop    { 50% { transform: scale(1.25); } }
@keyframes fade   { from { opacity: 0; } }

/* вхід головного екрана - одна послідовність */
.hero__title { animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) backwards; }
.hero__desc  { animation: rise 0.7s 0.12s cubic-bezier(0.2, 0.7, 0.2, 1) backwards; }
.hero .btn   { animation: rise 0.7s 0.24s cubic-bezier(0.2, 0.7, 0.2, 1) backwards; }
.hero__photo { animation: reveal 0.9s 0.1s cubic-bezier(0.2, 0.7, 0.2, 1) backwards; }
.hero__note  { animation: rise 0.6s 0.6s ease-out backwards; }

/* каскадна поява списків (перезапускається і при фільтрації) */
.stagger > li {
    animation: rise 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
    animation-delay: calc(var(--i, 9) * 55ms + 150ms);
}
.stagger > li:nth-child(1) { --i: 0; } .stagger > li:nth-child(2) { --i: 1; }
.stagger > li:nth-child(3) { --i: 2; } .stagger > li:nth-child(4) { --i: 3; }
.stagger > li:nth-child(5) { --i: 4; } .stagger > li:nth-child(6) { --i: 5; }
.stagger > li:nth-child(7) { --i: 6; } .stagger > li:nth-child(n+8) { --i: 7; }

.accordion[open] .accordion__body { animation: rise 0.3s ease-out; }
.accordion summary .material-symbols-outlined { transition: transform 0.25s; }
.accordion[open] summary .material-symbols-outlined { transform: rotate(180deg); }

/* відгук на дії */
.card, .tile, .row, .offer { transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1), background-color 0.2s; }
.card:active, .tile:active, .row:active { transform: scale(0.97); }
.chip { transition: background-color 0.2s, color 0.2s, border-color 0.2s; }
.btn .material-symbols-outlined { transition: transform 0.25s; }
.bottom-nav__item.is-active .material-symbols-outlined { animation: pop 0.35s; }
.icon-btn[aria-pressed="true"] { color: #A6472F; }
.icon-btn[aria-pressed="true"] .material-symbols-outlined { animation: pop 0.3s; }

@media (hover: hover) {
    .card:hover, .tile:hover, .row:hover, .offer:hover { transform: translateY(-3px); }
    .btn:hover .material-symbols-outlined { transform: translateX(4px); }
}

/* ---------- 7. кнопка телефона (кнопка внизу праворуч, тіки на десктопі) ---------- */
/*.preview-toggle { display: none; }

/* @media (min-width: 900px) {
    .preview-toggle {
        position: fixed;
        right: 24px;
        bottom: 24px;
        z-index: 120;
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 12px 18px;
        border-radius: 100px;
        background: var(--olive);
        color: var(--surface-hi);
        font-size: 13px;
        font-weight: 600;
        box-shadow: 0 8px 24px rgba(46, 56, 40, 0.25);
    }
    .device-overlay {
        position: fixed;
        inset: 0;
        z-index: 110;
        display: grid;
        place-items: center;
        background: #D8D1BC;
        animation: fade 0.25s;
    }
    .device {
        width: 390px;                                  /* 390 − рамка 20 = 370px екран */
   /*     height: min(844px, calc(100dvh - 48px));
        overflow: hidden;
        border: 10px solid #1F261B;
        border-radius: 48px;
        background: var(--bg);
        box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3);
        animation: rise 0.4s cubic-bezier(0.2, 0.7, 0.2, 1);
    }
    .device iframe { display: block; width: 100%; height: 100%; border: 0; }
}

/* ---------- ДОСТУПНІСТЬ ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; }
    ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* ---------- РЕЖИМ ДЛЯ СЛАБКИХ ПРИСТРОЇВ ----------
   клас .low-end на <html> ставить script.js: мало ядер/пам'яті, економія трафіку,
   повільна мережа або prefers-reduced-motion. */
.low-end *, .low-end *::before, .low-end *::after {
    transition: none !important;
    animation: none !important;
    box-shadow: none !important;
}
.low-end .hero__photo { mask-image: none; background-image: none; }  /* без маски й важкого фото */
.low-end .offer__img  { background-image: none; }
.low-end .bottom-nav  { border-top: 1px solid var(--line); }
.low-end::view-transition-group(*), .low-end::view-transition-old(*), .low-end::view-transition-new(*) { animation: none !important; }
.low-end .row__img { background-image: none; }
.low-end .place__img { background-image: none; }

.reduce-motion *, .reduce-motion *::before, .reduce-motion *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
}
.reduce-motion::view-transition-group(*), .reduce-motion::view-transition-old(*), .reduce-motion::view-transition-new(*) { animation: none !important; }

@media (max-width: 480px) {
    .rows > li { min-width: 0; }
    .rows .row { width: 100%; min-width: 0; }
    .rows .row-wrap { flex-wrap: wrap; }
    .rows .row-wrap .row { flex: 1 1 100%; }
    .rows .row-wrap .save-action { margin-left: auto; }
    body[data-page="my-discounts"] .offer__img { width: 88px; min-height: 116px; }
    body[data-page="my-discounts"] .offer__body { padding: 12px; }
    body[data-page="my-discounts"] .offer__foot { flex-wrap: wrap; }
    .map__card { max-height: 55%; overflow-y: auto; }
}