/* «Где Кара?» — brand tokens and the site inside Telegram (owner, 2026-11-01). Guide: /app/brand.html */
:root {
  --ocean: #0A6C74;      /* primary: buttons, active tab, links */
  --lagoon: #22B8B0;     /* secondary: gradients, highlights */
  --sunset: #FF6B4A;     /* accent: «сегодня», calls to action */
  --mango: #FFB547;      /* featured, stars */
  --sand: #FAF5EE;       /* page */
  --shell: #FFFFFF;      /* cards */
  --ink: #142430;        /* text */
  --mist: #6E7F8C;       /* secondary text */
  --line: rgba(20, 36, 48, .08);
  --tint: rgba(10, 108, 116, .08);
  --shadow: 0 6px 22px rgba(10, 60, 70, .08);
  --sea: linear-gradient(135deg, #22B8B0 0%, #0A6C74 100%);
  --dusk: linear-gradient(135deg, #FFB547 0%, #FF6B4A 100%);
  --r-card: 20px;
  --r-btn: 14px;
  --tabbar: 64px;
  --font: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --sand: #0D1B24; --shell: #15262F; --ink: #EEF4F6; --mist: #8FA3AE;
  --line: rgba(255, 255, 255, .08); --tint: rgba(34, 184, 176, .14); --shadow: none;
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--sand); color: var(--ink); }
body { font: 500 15px/1.45 var(--font); -webkit-font-smoothing: antialiased; overscroll-behavior-y: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: inherit; }
img { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--font); margin: 0; letter-spacing: -.2px; }
#app { min-height: 100vh; padding-bottom: calc(var(--tabbar) + 20px + env(safe-area-inset-bottom)); }
/* backwards, not both: a transform left on the page would trap the map's fixed layer at height 0 */
.page { animation: enter .2s ease-out backwards; }
.page.still { animation: none; }
@keyframes enter { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.press { transition: transform .12s ease; }
.press:active { transform: scale(.97); }

/* header */
.top { padding: 14px 16px 6px; display: flex; align-items: center; gap: 10px; }
.top .logo { width: 36px; height: 36px; flex: 0 0 36px; }
.wordmark { font-weight: 800; font-size: 22px; letter-spacing: -.4px; }
.wordmark b { color: var(--sunset); }
.top .date { margin-left: auto; color: var(--mist); font-size: 13px; font-weight: 600; text-align: right; }
.title { padding: 14px 16px 4px; }
.title h1 { font-size: 26px; font-weight: 800; line-height: 1.15; }
.title .sub { color: var(--mist); font-weight: 600; margin-top: 4px; }
.searchpill { margin: 10px 16px 0; display: flex; align-items: center; gap: 10px; background: var(--shell); border-radius: 16px;
  padding: 12px 14px; box-shadow: var(--shadow); color: var(--mist); font-weight: 600; width: calc(100% - 32px); }
.searchpill input { flex: 1; border: 0; outline: 0; background: none; font: inherit; color: var(--ink); }
.searchpill svg { flex: 0 0 18px; color: var(--ocean); }

/* sections of a page */
.block { margin: 22px 0 0; }
.block > .head { display: flex; align-items: baseline; justify-content: space-between; padding: 0 16px 10px; }
.block > .head h2 { font-size: 19px; font-weight: 800; }
.block > .head .more { color: var(--ocean); font-weight: 700; font-size: 14px; }
.pad { padding: 0 16px; }

/* horizontal rails */
.rail { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 2px 16px 6px; scroll-padding-inline: 16px; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; }

/* a card with a picture */
.tile { flex: 0 0 72%; max-width: 290px; background: var(--shell); border-radius: var(--r-card); overflow: hidden; box-shadow: var(--shadow); }
.grid .tile { max-width: none; }
.pic { position: relative; aspect-ratio: 16 / 10; background: var(--sea); display: flex; align-items: center; justify-content: center; font-size: 42px; }
.pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pic .tag { position: absolute; left: 10px; top: 10px; }
.tile .body { padding: 10px 12px 12px; }
.tile .t { font-weight: 750; font-size: 15px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile .s { color: var(--mist); font-size: 13px; margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.meta { display: flex; gap: 6px; align-items: center; margin-top: 6px; color: var(--mist); font-size: 12.5px; font-weight: 650; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 0 16px; }
.grid .pic { aspect-ratio: 1 / 1; font-size: 38px; }

/* tints for cards without a photo */
.tint-0 { background: linear-gradient(135deg, #22B8B0, #0A6C74); }
.tint-1 { background: linear-gradient(135deg, #FFB547, #FF6B4A); }
.tint-2 { background: linear-gradient(135deg, #7ED6C8, #2E8FA3); }
.tint-3 { background: linear-gradient(135deg, #FFD08A, #F08A5D); }

/* badges and chips */
.badge { display: inline-block; font-size: 12px; font-weight: 750; border-radius: 999px; padding: 3px 9px; background: var(--tint); color: var(--ocean); }
.badge.hot { background: var(--sunset); color: #fff; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 0 16px 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; background: var(--shell); border-radius: 999px; padding: 9px 14px; font-weight: 700; font-size: 14px; box-shadow: var(--shadow); white-space: nowrap; }
.chip .n { color: var(--mist); font-weight: 600; margin-left: 4px; }
.chip.on { background: var(--ocean); color: #fff; }
.chip.on .n { color: rgba(255, 255, 255, .75); }
.sticky { position: sticky; top: 0; z-index: 6; background: color-mix(in srgb, var(--sand) 92%, transparent); backdrop-filter: blur(12px); padding: 10px 0; }

/* category tiles */
.cats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 0 16px; }
.cat { background: var(--shell); border-radius: 18px; padding: 12px 4px 10px; text-align: center; box-shadow: var(--shadow); }
.cat .i { font-size: 28px; line-height: 1; }
.cat .l { font-size: 12px; font-weight: 700; margin-top: 6px; line-height: 1.2; }
.cats.big { grid-template-columns: 1fr 1fr; }
.cats.big .cat { display: flex; align-items: center; gap: 12px; padding: 14px; text-align: left; }
.cats.big .cat .i { font-size: 30px; width: 46px; height: 46px; border-radius: 14px; background: var(--tint); display: flex; align-items: center; justify-content: center; flex: 0 0 46px; }
.cats.big .cat .l { font-size: 14.5px; margin: 0; }
.cats.big .cat .n { color: var(--mist); font-size: 12.5px; font-weight: 600; margin-top: 2px; }

/* list rows */
.list { margin: 0 16px; background: var(--shell); border-radius: var(--r-card); overflow: hidden; box-shadow: var(--shadow); }
.row { display: flex; gap: 12px; align-items: center; padding: 11px 14px; width: 100%; }
.row + .row { border-top: 1px solid var(--line); }
.thumb { flex: 0 0 58px; height: 58px; border-radius: 14px; overflow: hidden; display: flex; align-items: center; justify-content: center; font-size: 26px; color: #fff; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.row .main { flex: 1; min-width: 0; }
.row .t { font-weight: 750; font-size: 15px; line-height: 1.25; }
.row .s { color: var(--mist); font-size: 13px; margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row .chev { color: var(--mist); }

/* banner (book, collections) */
.banner { margin: 0 16px; border-radius: var(--r-card); padding: 18px; color: #fff; background: var(--sea); display: flex; align-items: center; gap: 14px; box-shadow: var(--shadow); width: calc(100% - 32px); }
.banner.warm { background: var(--dusk); }
.banner .i { font-size: 36px; }
.banner .t { font-weight: 800; font-size: 17px; }
.banner .s { opacity: .9; font-size: 13px; font-weight: 600; margin-top: 2px; }

/* the card page */
.hero { position: relative; background: var(--sea); }
.gallery { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.gallery::-webkit-scrollbar { display: none; }
.gallery img { flex: 0 0 100%; height: 280px; object-fit: cover; scroll-snap-align: center; }
.hero .emoji { height: 200px; display: flex; align-items: center; justify-content: center; font-size: 72px; }
.dots { position: absolute; bottom: 10px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, .55); }
.sheet { position: relative; margin-top: -18px; background: var(--sand); border-radius: 22px 22px 0 0; padding: 18px 16px 0; }
.sheet h1 { font-size: 25px; font-weight: 800; line-height: 1.2; margin-top: 8px; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; margin-top: 16px; }
.btn { background: var(--shell); border-radius: var(--r-btn); padding: 12px 8px; font-weight: 750; font-size: 14px; text-align: center; box-shadow: var(--shadow); }
.btn.primary { background: var(--ocean); color: #fff; }
.btn.warm { background: var(--sunset); color: #fff; }
.text { font-size: 16px; line-height: 1.6; font-weight: 500; }
.text p { margin: 14px 0 0; }

/* tab bar */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--tabbar) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: color-mix(in srgb, var(--shell) 94%, transparent); backdrop-filter: blur(16px); border-top: 1px solid var(--line); }
.tabbar button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--mist); font-size: 11px; font-weight: 700; }
.tabbar button svg { width: 24px; height: 24px; }
.tabbar button.on { color: var(--ocean); }

/* map */
.mapwrap { position: fixed; inset: 0 0 calc(var(--tabbar) + env(safe-area-inset-bottom)) 0; z-index: 1; }
#map { position: absolute; inset: 0; background: #cfe9ea; }
.mapchips { position: absolute; top: 10px; left: 0; right: 0; z-index: 500; }
.bubble { background: var(--ocean); color: #fff; border: 3px solid #fff; border-radius: 999px; font: 800 13px/1 var(--font);
  display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 14px rgba(10, 60, 70, .3); }
.bubble span { padding: 0 6px; white-space: nowrap; }
.pinicon { font-size: 22px; text-shadow: 0 2px 6px rgba(0, 0, 0, .3); }
/* a place's pin: the brand's map mark with the type's emoji */
.pin { width: 34px; height: 34px; border-radius: 50% 50% 50% 4px; transform: rotate(-45deg); background: var(--shell);
  border: 3px solid var(--ocean); display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 12px rgba(10, 60, 70, .3); }
.pin span { transform: rotate(45deg); font-size: 16px; line-height: 1; }
.marker-cluster { background: none !important; }
.drawer { position: absolute; left: 0; right: 0; bottom: 0; z-index: 600; max-height: 62%; overflow-y: auto; background: var(--sand);
  border-radius: 22px 22px 0 0; box-shadow: 0 -8px 30px rgba(0, 0, 0, .15); padding: 8px 0 16px; animation: up .22s ease-out both; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer .grip { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 4px auto 10px; }
.leaflet-container { font-family: var(--font); }
.tiles-dark { filter: brightness(.62) invert(1) contrast(1.1) hue-rotate(195deg) saturate(.5) brightness(.9); }

/* states */
.empty { text-align: center; color: var(--mist); padding: 40px 24px; font-weight: 600; }
.empty .big { font-size: 46px; }
.sk { background: linear-gradient(90deg, var(--line) 25%, var(--tint) 50%, var(--line) 75%); background-size: 200% 100%; animation: shimmer 1.1s linear infinite; border-radius: 14px; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.loadmore { height: 1px; }
@media (prefers-reduced-motion: reduce) { .page, .sk, .drawer { animation: none; } }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(3, 1fr); } .cats { grid-template-columns: repeat(6, 1fr); } }
