/* Almaty Radar. Светлая тема по умолчанию, тёмная — переключателем 🌙 (data-theme на <html>).
   Шрифты: Manrope — текст, Unbounded — заголовки (оба с кириллицей и казахскими буквами). */
:root {
  --bg: #f7f4ef; --card: #ffffff; --ink: #1a1720; --muted: #6f6a77; --line: #ebe5dc;
  --accent: #ff5133; --accent-ink: #ffffff; --accent-soft: #ffe9e3; --chip: #efe9e1; --chip-ink: #3b3642;
  --gem: #7c3aed; --gem-soft: #efe7ff; --ok: #0f9d6a; --warn: #b45309;
  --shadow: 0 1px 2px rgba(40, 25, 10, .05), 0 6px 20px rgba(40, 25, 10, .06);
  --radius: 16px;
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Unbounded", "Manrope", system-ui, sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #121015; --card: #1c1a21; --ink: #f2eff6; --muted: #a39eac; --line: #2c2832;
  --accent: #ff6b4f; --accent-ink: #1d0b06; --accent-soft: #3a1e18; --chip: #27242d; --chip-ink: #e5e1ea;
  --gem: #a78bfa; --gem-soft: #2a2140; --ok: #34d399; --warn: #f59e0b;
  --shadow: none;
  color-scheme: dark;
}
* { box-sizing: border-box; }
/* display: grid у .list/.panel иначе перебивает атрибут hidden */
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.45 var(--font);
  -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }

/* ---------- Шапка ---------- */
.hero { max-width: 1040px; margin: 0 auto; padding: 18px 16px 6px; padding-top: max(18px, env(safe-area-inset-top)); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.brand img { width: 34px; height: 34px; border-radius: 10px; }
.brand b, .brand span { font: 700 19px/1.1 var(--display); letter-spacing: -.01em; }
.hero-row { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.tagline { margin: 0; color: var(--muted); font-size: 14px; max-width: 520px; }
.tagline b { color: var(--ink); font-weight: 700; }
.icon-btn { margin-left: auto; width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--card); display: grid; place-items: center; cursor: pointer; font-size: 17px; text-decoration: none; }
.icon-btn + .icon-btn { margin-left: 6px; }

.top { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top-in { max-width: 1040px; margin: 0 auto; padding: 10px 16px 8px; }
.top .brand { margin-bottom: 8px; }
.search { position: relative; }
.search::before { content: "⌕"; position: absolute; left: 13px; top: 50%; transform: translateY(-52%); color: var(--muted); font-size: 18px; }
#q { width: 100%; padding: 11px 14px 11px 36px; border-radius: 14px; border: 1px solid var(--line); background: var(--card);
  outline: none; transition: border-color .15s, box-shadow .15s; }
#q:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.chips { display: flex; gap: 6px; overflow-x: auto; padding: 8px 0 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 6px 12px; border-radius: 999px; background: var(--chip); color: var(--chip-ink); border: 0;
  font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: none; transition: background .15s, color .15s; }
.chip.on { background: var(--ink); color: var(--bg); }

/* ---------- «Лучшее на выходных» ---------- */
.best { max-width: 1040px; margin: 0 auto; padding: 16px 0 4px; }
.best h2, .day { font: 700 15px/1.2 var(--display); margin: 0; letter-spacing: -.01em; }
.best h2 { padding: 0 16px 10px; display: flex; align-items: baseline; gap: 8px; }
.best h2 small { font: 500 13px var(--font); color: var(--muted); }
.rail { display: flex; gap: 12px; overflow-x: auto; padding: 2px 16px 10px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.tile { flex: none; width: 250px; scroll-snap-align: start; background: var(--card); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); text-decoration: none; color: inherit;
  display: flex; flex-direction: column; transition: transform .15s; }
.tile:hover { transform: translateY(-2px); }
.tile .thumb { aspect-ratio: 16 / 10; }
.tile .tb { padding: 10px 12px 12px; display: grid; gap: 3px; }
.tile .meta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile h3 { margin: 0; font-size: 15px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- Лента ---------- */
.list { padding: 8px 16px 24px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px;
  max-width: 1040px; margin: 0 auto; overflow-wrap: anywhere; }
@media (min-width: 760px) { .list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }
.day { grid-column: 1 / -1; margin: 14px 0 0; display: flex; align-items: center; gap: 10px; }
.day::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.day:first-child { margin-top: 4px; }

.card { background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  border: 1px solid var(--line); display: grid; grid-template-columns: 112px minmax(0, 1fr); min-height: 132px;
  animation: rise .25s ease both; }
@media (min-width: 420px) { .card { grid-template-columns: 128px minmax(0, 1fr); } }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
.card .body { padding: 10px 12px 10px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.card h3 { margin: 0; font-size: 15.5px; line-height: 1.25; font-weight: 700; }
.card h3 a { text-decoration: none; }
.card h3 a:hover { color: var(--accent); }
.meta { color: var(--muted); font-size: 13px; }
.summary { font-size: 13.5px; color: var(--chip-ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.price { font-weight: 800; font-size: 14px; }
.price.free { color: var(--ok); }
.tags { display: flex; gap: 4px; flex-wrap: wrap; }
.tag { font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--chip); color: var(--chip-ink); }
.tag.gem { background: var(--gem-soft); color: var(--gem); }
.tag.disc { background: var(--accent); color: var(--accent-ink); }
.tag.free { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.promo { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; }
.promo code { background: var(--accent-soft); color: var(--accent); padding: 2px 8px; border-radius: 6px; font-weight: 800;
  cursor: pointer; border: 1px dashed var(--accent); }
.foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: auto; padding-top: 4px; font-size: 12.5px; }
.src { color: var(--muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.src a { text-decoration: none; }
.src a:hover { color: var(--accent); }
.score { font-weight: 800; color: var(--accent); white-space: nowrap; }
.more { color: var(--muted); cursor: pointer; padding: 0 2px; }
.empty { grid-column: 1 / -1; text-align: center; color: var(--muted); padding: 48px 0; }

/* Картинка / заглушка + дата-плашка */
.thumb { position: relative; display: block; background: var(--chip); overflow: hidden; }
.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ph { position: absolute; inset: 0; display: grid; place-items: center; font-size: 38px;
  background: linear-gradient(135deg, var(--c1, #ffb199), var(--c2, #ff5133)); }
.ph::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 75% 20%, rgba(255,255,255,.35), transparent 55%); }
.dateplate { position: absolute; left: 8px; top: 8px; z-index: 1; background: rgba(255,255,255,.95); color: #1a1720;
  border-radius: 10px; padding: 4px 7px 3px; text-align: center; line-height: 1; box-shadow: 0 2px 8px rgba(0,0,0,.15); min-width: 40px; }
.dateplate b { display: block; font: 800 17px/1 var(--display); color: #ff5133; }
.dateplate small { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.dateplate.long { font-size: 10.5px; font-weight: 800; padding: 5px 7px; }
.badge-gem { position: absolute; right: 8px; bottom: 8px; z-index: 1; font-size: 13px; background: rgba(0,0,0,.55);
  border-radius: 999px; padding: 1px 6px; }

/* Скелетоны при загрузке */
.skel { background: var(--card); border-radius: var(--radius); border: 1px solid var(--line); height: 132px; position: relative; overflow: hidden; }
.skel::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--chip) 80%, transparent), transparent); animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }

/* ---------- Нижние вкладки ---------- */
.tabs { position: fixed; bottom: 0; left: 0; right: 0; display: flex; background: color-mix(in srgb, var(--card) 98%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); z-index: 6; }
.tabs button, .tabs .tab-link { flex: 1; border: 0; background: none; padding: 7px 0 8px; font-size: 11px; font-weight: 600;
  color: var(--muted); display: grid; justify-items: center; gap: 1px; cursor: pointer; text-decoration: none; }
.tabs button span, .tabs .tab-link span { font-size: 20px; line-height: 1.2; filter: grayscale(.6); opacity: .8; }
.tabs button.on { color: var(--accent); }
.tabs button.on span { filter: none; opacity: 1; }
@media (min-width: 760px) { .tabs { left: 50%; right: auto; transform: translateX(-50%); bottom: 14px; width: 420px;
  border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding-bottom: 0; } }
.toast { position: fixed; left: 50%; bottom: 88px; transform: translateX(-50%); background: var(--ink); color: var(--bg);
  padding: 9px 15px; border-radius: 12px; font-size: 14px; font-weight: 600; z-index: 9; }

/* ---------- Подвал ---------- */
.site-foot { max-width: 1040px; margin: 0 auto; padding: 18px 16px 120px; color: var(--muted); font-size: 13px; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-bottom: 10px; }
.site-foot a { color: var(--ink); font-weight: 600; text-decoration: none; }
.site-foot a:hover { color: var(--accent); }

/* ---------- Админка ---------- */
.admin-link { margin-left: auto; font-size: 14px; font-weight: 600; text-decoration: none; color: var(--muted);
  background: none; border: 0; cursor: pointer; padding: 4px 6px; }
.panel { padding: 12px 16px 110px; max-width: 640px; margin: 0 auto; display: grid; gap: 10px; }
.panel h2 { margin: 16px 0 0; font: 700 16px var(--display); }
.panel label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.panel input, .panel select, .panel textarea { width: 100%; padding: 10px 12px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink); }
.panel button { padding: 10px 15px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); cursor: pointer; font-weight: 600; }
.panel button.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.row { display: flex; gap: 8px; }
.row input { flex: 1; }
.hint, .muted { color: var(--muted); font-size: 13px; margin: 0; }
.result { font-size: 14px; white-space: pre-wrap; }
.status { font-size: 13px; color: var(--muted); white-space: pre-wrap; }
.src-row { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.src-row .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.src-row small { display: block; color: var(--muted); }
.src-row button { padding: 4px 9px; font-size: 13px; }
.addr-list { display: grid; gap: 10px; }
.addr { display: flex; gap: 12px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px; }
.addr .qr { flex: none; background: #fff; border-radius: 8px; padding: 4px; line-height: 0; }
.addr .qr svg { width: 110px; height: 110px; display: block; }
.addr .txt { min-width: 0; display: grid; gap: 2px; font-size: 14px; }
.addr .txt a { color: var(--accent); word-break: break-all; font-weight: 700; }
.addr .txt small { color: var(--muted); }

/* ---------- Страницы для поисковиков (/e/…, разделы) ---------- */
body.seo .top-in { display: flex; flex-direction: column; }
.page { max-width: 760px; margin: 0 auto; padding: 14px 16px 24px; overflow-wrap: anywhere; }
.page h1 { font: 700 clamp(22px, 5vw, 30px)/1.15 var(--display); letter-spacing: -.02em; margin: 6px 0 12px; }
.page h2 { font: 700 15px var(--display); margin: 26px 0 8px; display: flex; align-items: center; gap: 10px; }
.page h2::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.page .lead { font-size: 16.5px; margin: 0 0 14px; }
.page a { color: var(--accent); }
.crumbs { font-size: 13px; color: var(--muted); }
.crumbs a { text-decoration: none; color: var(--muted); }
.passed { background: var(--accent-soft); padding: 10px 12px; border-radius: 12px; }
.ev-hero { display: block; position: relative; aspect-ratio: 16 / 9; border-radius: 20px; overflow: hidden; margin: 6px 0 14px; background: var(--chip); }
.ev-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ev-hero .ph { font-size: 64px; }
.ev-hero .dateplate { left: 12px; top: 12px; padding: 6px 10px 5px; min-width: 52px; }
.ev-hero .dateplate b { font-size: 24px; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; margin: 0 0 16px; padding: 14px 16px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; }
.page .promo code { font-size: 15px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--accent);
  color: var(--accent-ink) !important; padding: 12px 18px; border-radius: 14px; font-weight: 800; text-decoration: none; }
.buybar { position: sticky; bottom: 0; padding: 10px 0 max(10px, env(safe-area-inset-bottom));
  background: linear-gradient(transparent, var(--bg) 30%); }
.buybar .btn { width: 100%; }
@media (min-width: 760px) { .buybar { position: static; background: none; } .buybar .btn { width: auto; } }
.ev-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.ev-list li a { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; align-items: center; text-decoration: none;
  color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 8px; }
.ev-list li a:hover b { color: var(--accent); }
.ev-list .thumb { width: 64px; height: 64px; border-radius: 10px; }
.ev-list .ph { font-size: 24px; }
.ev-list span { display: grid; gap: 2px; min-width: 0; }
.ev-list small { color: var(--muted); }
.more-link { margin-top: 20px; }
body.seo .site-foot { padding-bottom: 32px; border-top: 1px solid var(--line); margin-top: 24px; }
body.seo .top .brand { margin-bottom: 4px; }
