/* ==========================================================================
   AiGid — интерактивный прототип. Стиль: Apple Liquid Glass.
   Материал: полупрозрачное стекло (backdrop-filter blur+saturate), световые
   грани, блики. Бренд: системный шрифт + терракота. Структура прежняя:
   телефон-рамка → .viewport → экраны (.screen) + оверлеи.
   ========================================================================== */

* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --accent: #F0512E;
  --accent-deep: #C23B1B;
  --accent-soft: rgba(240, 81, 46, .14);
  --ink: #1B1815;
  --muted: rgba(27, 24, 21, .58);
  --line: rgba(255, 255, 255, .45);
  --line2: rgba(255, 255, 255, .6);
  --screen: #ECE9E2;
  --page: #E9E4DC;
  --ok: #1E9E75;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --ease: cubic-bezier(.4, 0, .2, 1);
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  /* рецепт стекла */
  --glass-bg: linear-gradient(165deg, rgba(255,255,255,.62), rgba(255,255,255,.28) 40%, rgba(255,255,255,.38));
  --glass-line: rgba(255, 255, 255, .65);
  --glass-shadow: 0 14px 36px rgba(20, 15, 12, .18), inset 0 1px 0 rgba(255, 255, 255, .7);
  --glass-dark-bg: linear-gradient(165deg, rgba(40,34,28,.66), rgba(40,34,28,.44) 40%, rgba(40,34,28,.56));
  --glass-dark-line: rgba(255, 255, 255, .28);
  --terra-bg: linear-gradient(165deg, rgba(240,81,46,.92), rgba(240,81,46,.76));
  --terra-shadow: 0 12px 30px rgba(240, 81, 46, .35), inset 0 1px 0 rgba(255, 255, 255, .5);
}

html, body { height: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  min-height: 100vh;
  padding: 28px 16px;
}

.hide { display: none !important; }

/* ---------- Панель сценариев (демо-стенд слева) ---------- */
.scnbar { width: 260px; flex: 0 0 auto; }
.scn-head { padding: 0 8px; margin-bottom: 16px; }
.scn-title { font-size: 24px; font-weight: 700; letter-spacing: -.02em; margin-top: 10px; }
.scn-sub { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
#scnList { display: flex; flex-direction: column; gap: 5px; }
.scn {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 10px 12px; border-radius: 14px; text-align: left;
  border: 1px solid transparent; background: transparent; cursor: pointer;
  font-family: var(--font); transition: background .18s, border-color .18s, box-shadow .18s;
}
.scn:hover { background: rgba(255,255,255,.7); }
.scn.on { background: #fff; border-color: rgba(0,0,0,.06); box-shadow: 0 10px 24px rgba(20,15,12,.08); }
.scn .n {
  width: 26px; height: 26px; border-radius: 50%; flex: 0 0 auto;
  background: rgba(0,0,0,.07); color: var(--muted); font-size: 12.5px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; transition: background .18s, color .18s;
}
.scn.on .n { background: var(--accent); color: #fff; }
.scn .tx { min-width: 0; }
.scn b { display: block; font-size: 14.5px; font-weight: 600; color: var(--ink); }
.scn i { display: block; font-style: normal; font-size: 12px; color: var(--muted); margin-top: 1px; }

@media (max-width: 920px) {
  body { flex-direction: column; gap: 18px; }
  .scnbar { width: min(384px, 94vw); }
  #scnList { flex-direction: row; overflow-x: auto; padding-bottom: 6px; }
  .scn { flex: 0 0 auto; }
  .scn i { display: none; }
}

/* ---------- Телефон ---------- */
.phone {
  position: relative;
  width: min(384px, 94vw);
  height: min(812px, calc(100vh - 56px));
  background: #0B0B0C;
  border-radius: 52px;
  padding: 12px;
  box-shadow: 0 40px 90px rgba(20, 15, 12, .34), inset 0 0 0 2px #26262a;
  flex: 0 0 auto;
}
.screenbox {
  position: relative;
  width: 100%;
  height: 100%;
  background: var(--screen);
  border-radius: 42px;
  overflow: hidden;
}
.island {
  position: absolute;
  top: 12px; left: 50%; transform: translateX(-50%);
  width: 108px; height: 30px;
  background: #0B0B0C;
  border-radius: 18px;
  z-index: 90;
}
.statusbar {
  position: absolute; top: 0; left: 0; right: 0; height: 50px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 26px 0;
  font-size: 14px; font-weight: 600; color: var(--ink);
  text-shadow: 0 1px 5px rgba(255,255,255,.55);
  z-index: 60; pointer-events: none;
  transition: color .3s;
}
.statusbar .ic { display: inline-flex; gap: 6px; align-items: center; }
.homebar {
  position: absolute; bottom: 7px; left: 50%; transform: translateX(-50%);
  width: 132px; height: 5px; border-radius: 3px; background: rgba(0,0,0,.22); z-index: 95;
  transition: background .3s;
}
/* тёмные экраны (итоги, плеер): светлый статусбар и хоумбар */
body.sblight .statusbar { color: #fff; text-shadow: 0 1px 5px rgba(0,0,0,.45); }
body.sblight .homebar { background: rgba(255,255,255,.55); }

/* ---------- Вьюпорт и роутер экранов ---------- */
.viewport { position: absolute; inset: 0; border-radius: 42px; overflow: hidden; }
.screen {
  position: absolute; inset: 0;
  background: var(--screen);
  transform: translateX(100%);
  transition: transform .4s var(--ease);
  overflow-y: auto; overflow-x: hidden;
  will-change: transform;
}
.screen.active { transform: translateX(0); }
.screen.past   { transform: translateX(-26%); }
.screen::-webkit-scrollbar { display: none; }

/* фото-подложки экранов */
.bgph {
  position: absolute; left: 0; right: 0; top: 0; height: 1400px;
  background-size: cover; background-position: center;
  z-index: 0; pointer-events: none;
}
.bgph.blur { filter: blur(26px) saturate(1.3) brightness(1.05); transform: scale(1.12); }
.bgph.mapblur { background-image: url(assets/map.jpg); filter: saturate(1.1) blur(4px); transform: scale(1.05); }
.bgph.lightveil::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(rgba(251,250,247,.72), rgba(251,250,247,.45) 45%, rgba(251,250,247,.66)); }
.bgph.darkveil::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(rgba(20,16,12,.52), rgba(20,16,12,.72)); }
.hasbg > :not(.bgph):not(.onb-foot) { position: relative; z-index: 1; }

/* ---------- Стеклянные поверхности (общий рецепт) ---------- */
.nowcard, .plancard, .menu, .sheet, .mic, .mic-status, .qchips button,
.iconbtn, .dots, .chip, .row, .setrow, .stat, .fogmini, .obinput input,
.obsend, .transcript, .cbtn, .tcard, .stopnum, .btn.ghost, .vb.guide {
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(26px) saturate(190%);
  backdrop-filter: blur(26px) saturate(190%);
  border: 1px solid var(--glass-line);
  box-shadow: var(--glass-shadow);
}
/* блик по диагонали */
.nowcard::after, .plancard::after, .sheet::after, .mic::after, .row::after,
.setrow::after, .stat::after, .fogmini::after, .tcard::after, .day-hero::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(115deg, rgba(255,255,255,.42) 0%, transparent 26%, transparent 72%, rgba(255,255,255,.18) 100%);
}
.nowcard, .plancard, .sheet, .mic, .row, .setrow, .stat, .fogmini, .tcard, .day-hero { position: relative; overflow: hidden; }

/* ---------- Общие элементы ---------- */
.pad { padding: 62px 22px 26px; }
.h1 { font-size: 26px; font-weight: 700; letter-spacing: -.02em; line-height: 1.12; }
.sub { color: var(--muted); font-size: 15px; margin-top: 6px; line-height: 1.45; }
.wordmark { font-size: 17px; font-weight: 700; letter-spacing: .22em; }
.topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 60px 18px 10px;
}
.iconbtn {
  width: 40px; height: 40px; border-radius: 50%;
  color: var(--ink);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: transform .1s;
}
.iconbtn:active { transform: scale(.94); }
.title-lg { font-size: 22px; font-weight: 700; letter-spacing: -.01em; }

.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 54px; padding: 0 24px; border-radius: 18px;
  background: var(--terra-bg); color: #fff;
  border: 1px solid rgba(255,255,255,.45);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  font-family: var(--font); font-size: 16px; font-weight: 600; cursor: pointer;
  transition: transform .12s var(--ease-out), box-shadow .2s, filter .2s;
  box-shadow: var(--terra-shadow);
}
.btn::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(115deg, rgba(255,255,255,.4) 0%, transparent 30%, transparent 75%, rgba(255,255,255,.15) 100%); }
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: scale(.97); }
.btn.block { width: 100%; }
.btn.ghost { color: var(--ink); box-shadow: var(--glass-shadow); }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  position: relative; overflow: hidden;
  padding: 10px 16px; border-radius: 999px;
  color: var(--ink); font-size: 14px; cursor: pointer;
  transition: all .18s var(--ease-out); user-select: none;
}
.chip:active { transform: scale(.96); }
.chip.on { background: var(--terra-bg); border-color: rgba(255,255,255,.45); color: #fff; box-shadow: var(--terra-shadow); }

.field-label { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin: 26px 0 12px; }

/* ---------- Экран онбординга (диалог с гидом) ---------- */
#onboarding { background: var(--screen); }
@keyframes breathe { 0%,100%{ transform: scale(1); box-shadow: 0 16px 40px rgba(240,81,46,.4);} 50%{ transform: scale(1.04); box-shadow: 0 18px 52px rgba(240,81,46,.55);} }
.onb-foot { position: absolute; left: 22px; right: 22px; bottom: 26px; z-index: 2; }

.obchat { display: flex; flex-direction: column; gap: 8px; margin-top: 26px; }

.obinput { display: flex; gap: 8px; align-items: center; }
.obinput input {
  flex: 1; min-width: 0; height: 48px; border-radius: 999px;
  padding: 0 18px; font-family: var(--font); font-size: 14.5px; color: var(--ink);
  outline: none; transition: border-color .2s;
}
.obinput input::placeholder { color: var(--muted); }
.obinput input:focus { border-color: var(--accent); }
.obsend, .obmic {
  width: 48px; height: 48px; border-radius: 50%; flex: 0 0 auto; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: transform .12s var(--ease-out);
}
.obsend:active, .obmic:active { transform: scale(.93); }
.obsend { color: var(--ink); }
.obmic { border: 1px solid rgba(255,255,255,.5); color: #fff;
  background: linear-gradient(165deg, #FF6B47, var(--accent) 55%, #D8431F);
  box-shadow: 0 8px 20px rgba(240,81,46,.45), inset 0 1px 1px rgba(255,255,255,.55);
  animation: breathe 2.8s var(--ease) infinite; }

/* ---------- Экран карты (main) ---------- */
#main { background: #ECE9E2; overflow: hidden; }
.map { position: absolute; inset: 0; transition: transform 1.4s var(--ease); will-change: transform; }
.map .lyr { position: absolute; inset: 0; }
.map .base  { background: url(assets/map.jpg) center/cover no-repeat; filter: grayscale(1) brightness(1.1) contrast(.92); }
.map .color { background: url(assets/map.jpg) center/cover no-repeat; filter: saturate(1.15) contrast(1.02);
  -webkit-mask: radial-gradient(circle at 50% 40%, #000 30%, transparent 54%);
          mask: radial-gradient(circle at 50% 40%, #000 30%, transparent 54%); }
.map .fog   { background: radial-gradient(circle at 50% 40%, rgba(236,233,226,0) 30%, rgba(236,233,226,.38) 74%, rgba(236,233,226,.66) 100%); }
.cred { position: absolute; right: 8px; bottom: 6px; font-size: 9px; color: #6f6b63; background: rgba(255,255,255,.6); padding: 1px 5px; border-radius: 4px; z-index: 3; }

.topfade { position: absolute; top: 0; left: 0; right: 0; height: 110px; z-index: 4; pointer-events: none;
  background: linear-gradient(rgba(251,250,247,.65), rgba(251,250,247,0)); }
.dots {
  position: absolute; top: 54px; right: 18px; width: 44px; height: 44px; border-radius: 50%;
  z-index: 20; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.dots i { width: 4px; height: 4px; border-radius: 50%; background: var(--ink); box-shadow: -7px 0 0 var(--ink), 7px 0 0 var(--ink); }

/* маркеры: стеклянные линзы */
.mk { position: absolute; transform: translate(-50%, -50%); z-index: 6; }
.mk.pin {
  transform: translate(-50%, -50%);
  width: 30px; height: 30px; border-radius: 50%; cursor: pointer;
  background: linear-gradient(165deg, rgba(255,255,255,.75), rgba(255,255,255,.3));
  -webkit-backdrop-filter: blur(10px) saturate(180%); backdrop-filter: blur(10px) saturate(180%);
  border: 1px solid var(--glass-line);
  box-shadow: 0 6px 16px rgba(20,15,12,.25), inset 0 1px 0 rgba(255,255,255,.8);
  display: flex; align-items: center; justify-content: center;
  transition: width .25s var(--ease-out), height .25s var(--ease-out);
}
.mk.pin svg { display: none; }
.mk.pin::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: #A8A093; transition: background .25s, box-shadow .25s; }
.mk.pin.active { width: 36px; height: 36px; }
.mk.pin.active::after { background: var(--accent); box-shadow: 0 0 10px rgba(240,81,46,.65); }
.mk.pin:hover { width: 34px; height: 34px; }
.mk.you { width: 22px; height: 22px; }
.mk.you .core  { position: absolute; inset: 0; border-radius: 50%; background: var(--accent); border: 3px solid #fff; box-shadow: 0 1px 6px rgba(0,0,0,.45); z-index: 3; }
.mk.you .pulse { position: absolute; inset: 0; border-radius: 50%; background: var(--accent); opacity: .5; animation: ping 2s ease-out infinite; }
.mk.you .pulse.d2 { animation-delay: 1s; }
@keyframes ping { 0%{ transform: scale(1); opacity: .55; } 70%{ opacity: 0; } 100%{ transform: scale(4.6); opacity: 0; } }
/* акцент на пине (камера наехала) */
.mk.pin.focus { animation: pinpop .7s var(--ease-out); }
@keyframes pinpop {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  35%      { transform: translate(-50%, -58%) scale(1.25); }
  65%      { transform: translate(-50%, -47%) scale(.95); }
}

/* нижний блок карты */
.map-bottom { position: absolute; left: 0; right: 0; bottom: 0; z-index: 15;
  display: flex; flex-direction: column; align-items: center; gap: 11px; padding: 0 14px 16px; }
.nowcard {
  width: 100%; border-radius: 24px; padding: 14px 16px;
  display: flex; gap: 12px; align-items: center; cursor: pointer;
  transition: transform .12s var(--ease-out);
}
.nowcard:active { transform: scale(.99); }
.nowcard .ic { width: 46px; height: 46px; border-radius: 15px; flex: 0 0 auto;
  background: linear-gradient(165deg, rgba(240,81,46,.18), rgba(240,81,46,.08));
  border: 1px solid rgba(240,81,46,.25); color: var(--accent);
  display: flex; align-items: center; justify-content: center; font-size: 20px; }
.nowcard .lbl { font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-deep); font-weight: 700; }
.nowcard .ttl { font-size: 16px; font-weight: 650; margin: 1px 0; }
.nowcard .meta { font-size: 12px; color: var(--muted); }
.nowcard.slide { animation: cardin .42s var(--ease-out); }
@keyframes cardin { from { transform: translateX(52px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* кнопка-свитч «говорить» */
.mic { width: 156px; height: 64px; border-radius: 999px;
  transition: background .25s; user-select: none; touch-action: none; }
.mic .arrow { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 22px; transition: opacity .2s; z-index: 1; }
.mic.cont { background: var(--terra-bg); border-color: rgba(255,255,255,.45); box-shadow: var(--terra-shadow); }
.mic.cont .arrow { opacity: 0; }
.mic .knob { position: absolute; left: 5px; top: 5px; width: 54px; height: 54px; border-radius: 50%; z-index: 2;
  background: linear-gradient(165deg, #FF6B47, var(--accent) 55%, #D8431F);
  border: 1px solid rgba(255,255,255,.5);
  color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 16px rgba(240,81,46,.45), inset 0 1px 1px rgba(255,255,255,.55); cursor: grab;
  transition: left .22s var(--ease-out), background .25s; animation: breathe 2.8s var(--ease) infinite; }
.mic.cont .knob { left: 97px; background: rgba(255,255,255,.92); color: var(--accent); animation: none; }
.mic .knob.listening { animation: micpulse 1.1s ease-out infinite; }
.mic .knob:active { cursor: grabbing; }
@keyframes micpulse { 0%{ box-shadow: 0 0 0 0 rgba(240,81,46,.5);} 70%{ box-shadow: 0 0 0 18px rgba(240,81,46,0);} 100%{ box-shadow: 0 0 0 0 rgba(240,81,46,0);} }

/* пуш-уведомление (итоги дня) */
.push {
  position: absolute; top: 58px; left: 14px; right: 14px; z-index: 35;
  border-radius: 20px; padding: 12px 14px;
  display: flex; gap: 11px; align-items: center; cursor: pointer;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(26px) saturate(190%); backdrop-filter: blur(26px) saturate(190%);
  border: 1px solid var(--glass-line); box-shadow: var(--glass-shadow);
  transform: translateY(-96px); opacity: 0;
  transition: transform .5s var(--ease-out), opacity .4s;
}
.push.show { transform: none; opacity: 1; }
.push .pic { width: 38px; height: 38px; border-radius: 11px; flex: 0 0 auto;
  background: linear-gradient(165deg, #FF6B47, var(--accent));
  border: 1px solid rgba(255,255,255,.5); color: #fff;
  display: flex; align-items: center; justify-content: center; }
.push b { font-size: 13.5px; }
.push .ptx { font-size: 12.5px; color: rgba(27,24,21,.72); margin-top: 1px; }
.push .pwhen { font-size: 11px; color: var(--muted); align-self: flex-start; }

/* ---------- Меню (оверлей) ---------- */
.menu { position: absolute; top: 104px; right: 18px; width: 210px; z-index: 40;
  border-radius: 20px; padding: 7px;
  opacity: 0; transform: translateY(-8px) scale(.96); transform-origin: top right; pointer-events: none;
  transition: opacity .18s, transform .18s var(--ease-out); }
.menu.open { opacity: 1; transform: none; pointer-events: auto; }
.menu button { display: flex; width: 100%; align-items: center; gap: 12px; padding: 12px 13px; border: none;
  background: transparent; border-radius: 13px; font-family: var(--font); font-size: 15px; color: var(--ink);
  cursor: pointer; text-align: left; }
.menu button:hover { background: rgba(240,81,46,.14); color: var(--accent-deep); }
.menu svg { color: var(--muted); flex: 0 0 auto; } .menu button:hover svg { color: var(--accent); }

/* ---------- Нижняя шторка «место» ---------- */
.scrim { position: absolute; inset: 0; background: rgba(20,15,12,.32); z-index: 50; opacity: 0; pointer-events: none; transition: opacity .3s; }
.scrim.open { opacity: 1; pointer-events: auto; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 55; max-height: 82%;
  border-radius: 28px 28px 0 0;
  transform: translateY(102%); transition: transform .42s var(--ease-out);
  display: flex; flex-direction: column; }
.sheet.open { transform: translateY(0); }
/* ручка лежит поверх фото */
.sheet .handle { position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
  width: 44px; height: 5px; border-radius: 3px; background: rgba(255,255,255,.85);
  box-shadow: 0 1px 4px rgba(0,0,0,.25); cursor: grab; z-index: 3; }
.sheet-scroll { overflow-y: auto; padding: 0 22px 24px; position: relative; z-index: 1; }
.sheet-scroll::-webkit-scrollbar { display: none; }
/* фото места — в край: к верху и бокам шторки */
.sheet .hero { height: 220px; border-radius: 28px 28px 0 0; margin: 0 -22px 16px; position: relative; overflow: hidden;
  background: linear-gradient(135deg, #F0512E, #F58B5E) center/cover;
  display: flex; align-items: flex-end; padding: 14px; }
.sheet .hero .tag { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; font-weight: 600;
  color: #fff; background: rgba(0,0,0,.3); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.3); padding: 4px 10px; border-radius: 999px; }
.sheet .p-title { font-size: 23px; font-weight: 700; letter-spacing: -.01em; }
.sheet .p-meta { color: var(--muted); font-size: 13px; margin: 5px 0 14px; }
.sheet .p-story { font-size: 15px; line-height: 1.6; color: rgba(27,24,21,.85); }
.sheet .p-actions { display: flex; gap: 10px; margin-top: 20px; }
.sheet .p-actions .btn { flex: 1; }
.actbtn { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: 0 0 auto; width: 58px;
  background: none; border: none; font-family: var(--font); font-size: 11px; color: var(--muted); cursor: pointer; }
.actbtn .ring { width: 46px; height: 46px; border-radius: 50%;
  background: rgba(255,255,255,.5); border: 1px solid var(--glass-line);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7);
  display: flex; align-items: center; justify-content: center; color: var(--ink); transition: all .18s; }
.actbtn:hover .ring { border-color: var(--accent); color: var(--accent); }
.actbtn.on .ring { background: var(--terra-bg); border-color: rgba(255,255,255,.45); color: #fff; box-shadow: var(--terra-shadow); }

/* ---------- Списки (сохранённое) ---------- */
.list { display: flex; flex-direction: column; gap: 11px; padding: 4px 16px 26px; }
.row { border-radius: 20px; padding: 12px 14px; cursor: pointer; transition: transform .12s var(--ease-out); }
.row:active { transform: scale(.99); }
.row { display: flex; gap: 12px; align-items: center; }
.row .thumb { width: 52px; height: 52px; border-radius: 14px; object-fit: cover; flex: 0 0 auto; border: 1px solid rgba(255,255,255,.6); position: relative; z-index: 1; }
.row .ttl { font-size: 15px; font-weight: 650; }
.row .meta { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

/* настройки */
.setrow { display: flex; align-items: center; justify-content: space-between; padding: 15px 16px;
  border-radius: 18px; margin: 0 16px 9px; }
.setrow .name { font-size: 14.5px; position: relative; z-index: 1; }
.toggle { width: 46px; height: 28px; border-radius: 999px; background: rgba(120,112,100,.35);
  border: 1px solid rgba(255,255,255,.5);
  position: relative; cursor: pointer; transition: background .22s; flex: 0 0 auto; z-index: 1; }
.toggle::after { content: ""; position: absolute; top: 2px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.28); transition: left .22s var(--ease-out); }
.toggle.on { background: linear-gradient(165deg, #FF6B47, var(--accent)); } .toggle.on::after { left: 19px; }

/* профиль */
.avatar-lg { width: 78px; height: 78px; border-radius: 50%;
  background: linear-gradient(165deg, #FF6B47, var(--accent));
  border: 1px solid rgba(255,255,255,.5);
  box-shadow: 0 10px 26px rgba(240,81,46,.35), inset 0 1px 1px rgba(255,255,255,.5);
  color: #fff; display: flex; align-items: center; justify-content: center; font-size: 30px; font-weight: 700; margin: 6px 0 14px; }
.stats { display: flex; gap: 10px; margin-top: 20px; }
.stat { flex: 1; border-radius: 18px; padding: 16px; text-align: center; }
.stat .n { font-size: 24px; font-weight: 700; position: relative; z-index: 1; }
.stat .l { font-size: 12px; color: var(--muted); margin-top: 3px; position: relative; z-index: 1; }

/* ---------- Голосовой диалог (пузыри) ---------- */
.vchat {
  position: absolute; left: 16px; right: 16px; bottom: 208px; z-index: 14;
  display: flex; flex-direction: column; gap: 8px; pointer-events: none;
  transition: opacity .4s;
}
.vchat.fade { opacity: 0; }
.vb {
  max-width: 80%; padding: 11px 15px; border-radius: 20px;
  font-size: 14px; line-height: 1.42;
  animation: vbin .32s var(--ease-out);
  position: relative; overflow: hidden;
}
.vb.user { align-self: flex-end;
  background: var(--terra-bg); color: #fff; border-bottom-right-radius: 7px;
  border: 1px solid rgba(255,255,255,.45);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  box-shadow: var(--terra-shadow); }
.vb.guide { align-self: flex-start; color: var(--ink); border-bottom-left-radius: 7px; }
.vb::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(115deg, rgba(255,255,255,.35) 0%, transparent 30%, transparent 78%, rgba(255,255,255,.12) 100%); }
@keyframes vbin { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
.vb.typing { display: flex; gap: 4px; padding: 14px 15px; }
.vb.typing i { width: 6px; height: 6px; border-radius: 50%; background: rgba(27,24,21,.35); animation: tdot 1s infinite; }
.vb.typing i:nth-child(2) { animation-delay: .15s; }
.vb.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes tdot { 0%,100% { opacity: .35; transform: none; } 50% { opacity: 1; transform: translateY(-3px); } }

/* волна распознавания в реплике пользователя */
.vwave { display: flex; gap: 3px; align-items: center; height: 16px; padding: 2px 6px; }
.vwave i { width: 3px; height: 100%; border-radius: 2px; background: rgba(255,255,255,.92);
  transform-origin: center; animation: eqb .8s ease-in-out infinite; }
.vwave i:nth-child(2) { animation-delay: .12s; }
.vwave i:nth-child(3) { animation-delay: .24s; }
.vwave i:nth-child(4) { animation-delay: .06s; }
.vwave i:nth-child(5) { animation-delay: .3s; }
/* «говорящий» эквалайзер в ответе гида */
.gspeak { display: inline-flex; gap: 2.5px; align-items: center; height: 12px; margin-right: 6px; vertical-align: -1px; }
.gspeak i { width: 3px; height: 100%; border-radius: 2px; background: var(--accent);
  transform-origin: center; animation: eqb .7s ease-in-out infinite; }
.gspeak i:nth-child(2) { animation-delay: .14s; }
.gspeak i:nth-child(3) { animation-delay: .28s; }
@keyframes eqb { 0%,100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }

/* ---------- Маршрут прогулки ---------- */
.route { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 5; pointer-events: none;
  opacity: 0; transition: opacity .5s; }
.route.show { opacity: 1; }
.route path {
  fill: none; stroke: var(--accent);
  stroke-width: 1;                                 /* юниты viewBox: ~3,6px на экране */
  stroke-linecap: round; stroke-linejoin: round;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.3));
  transition: stroke-dashoffset 1.8s var(--ease);
  /* dasharray/dashoffset задаёт JS по реальной длине пути — прорисовка от старта */
}
.route .walker { fill: var(--accent); stroke: #fff; stroke-width: .8; opacity: 0; transition: opacity .3s; }
.route.walking .walker { opacity: 1; }

/* номера остановок — стеклянные монетки */
.stopnum {
  position: absolute; z-index: 7; width: 26px; height: 26px; border-radius: 50%;
  color: var(--accent-deep); font-size: 12px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  transform: translate(-50%, -50%) scale(0);
  transition: transform .38s cubic-bezier(.34, 1.56, .64, 1);
}
.stopnum.pop { transform: translate(-50%, -50%) scale(1); }

/* прогулка: приглушаем пины, чтобы читался маршрут */
#main.walkmode .mk.pin { opacity: .25; }

/* ---------- Карточка «план прогулки» ---------- */
.plancard { width: 100%; border-radius: 24px; padding: 15px 16px; animation: cardin .42s var(--ease-out); }
.plancard .lbl { font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-deep); font-weight: 700; margin-bottom: 4px; position: relative; z-index: 1; }
.stops { display: flex; flex-direction: column; position: relative; z-index: 1; }
.stop { display: flex; align-items: center; gap: 10px; font-size: 14.5px; font-weight: 600; padding: 7px 0; }
.stop em { margin-left: auto; font-style: normal; color: var(--muted); font-size: 12.5px; font-weight: 500; }
.stop .sd { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); flex: 0 0 auto; }
.plancard .btn { position: relative; z-index: 1; }

/* ---------- «Карта открытий» в профиле ---------- */
.fogmini { border-radius: 22px; padding: 14px; }
.fogmini > * { position: relative; z-index: 1; }
.fm-map { position: relative; height: 130px; border-radius: 14px; overflow: hidden; border: 1px solid rgba(255,255,255,.55); }
.fm-base { position: absolute; inset: 0; background: url(assets/map.jpg) center/cover;
  filter: grayscale(1) brightness(1.08) contrast(.85); }
.fm-color { position: absolute; inset: 0; background: url(assets/map.jpg) center/cover;
  -webkit-mask:
    radial-gradient(circle at 50% 40%, #000 11%, transparent 17%),
    radial-gradient(circle at 52% 25%, #000 7%, transparent 12%),
    radial-gradient(ellipse 24% 8% at 63% 55%, #000 60%, transparent 100%),
    radial-gradient(circle at 31% 62%, #000 5%, transparent 10%);
  mask:
    radial-gradient(circle at 50% 40%, #000 11%, transparent 17%),
    radial-gradient(circle at 52% 25%, #000 7%, transparent 12%),
    radial-gradient(ellipse 24% 8% at 63% 55%, #000 60%, transparent 100%),
    radial-gradient(circle at 31% 62%, #000 5%, transparent 10%);
}
.fm-row { display: flex; gap: 14px; align-items: center; font-size: 13.5px; color: rgba(27,24,21,.8);
  margin-top: 12px; line-height: 1.35; }
.fm-row .pct { font-size: 34px; font-weight: 800; color: var(--accent); letter-spacing: -.02em; }
.fbar { height: 8px; border-radius: 4px; background: rgba(255,255,255,.5); margin-top: 12px; overflow: hidden; border: 1px solid rgba(255,255,255,.5); }
.fbar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--accent), #F7B267); }
.flegend { display: flex; gap: 16px; margin-top: 10px; font-size: 12px; color: var(--muted); }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.sw.c1 { background: var(--accent); } .sw.c2 { background: #C9C2B8; }

/* ---------- Подсказки-чипы над миком ---------- */
.qchips { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.qchips button {
  position: relative; overflow: hidden;
  color: var(--ink); cursor: pointer;
  font-family: var(--font); font-size: 12.5px; font-weight: 600;
  padding: 9px 14px; border-radius: 999px;
  transition: transform .12s var(--ease-out), background .2s, color .2s;
}
.qchips button:hover { background: var(--terra-bg); color: #fff; border-color: rgba(255,255,255,.45); }
.qchips button:active { transform: scale(.95); }

/* ---------- Рекомендация: «почему тебе» + перелистывание ---------- */
.why { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.why span { font-size: 11px; padding: 4px 9px; border-radius: 999px;
  background: rgba(240,81,46,.13); color: var(--accent-deep); font-weight: 600;
  border: 1px solid rgba(240,81,46,.2); }
.nowcard.flip { animation: flipin .32s var(--ease-out); }
@keyframes flipin { from { transform: perspective(500px) rotateX(-40deg); opacity: .4; } to { transform: none; opacity: 1; } }
#reccard { transform-origin: 50% 0; }

/* ---------- Караоке-транскрипт ---------- */
.transcript span { transition: color .2s; }
.transcript span.k { color: var(--accent-deep); }

/* ---------- Итоги дня: тёмное вечернее стекло ---------- */
#summary { color: #fff; }
#summary .title-lg { color: #fff; }
#summary .iconbtn { background: var(--glass-dark-bg); border-color: var(--glass-dark-line); color: #fff; }
#summary .field-label { color: rgba(255,255,255,.55); }
#summary .day-hero, #summary .trow, #summary .postcard {
  opacity: 0; transform: translateY(14px);
  transition: opacity .5s var(--ease-out), transform .5s var(--ease-out);
}
#summary .day-hero.in, #summary .trow.in, #summary .postcard.in { opacity: 1; transform: none; }

.day-hero {
  border-radius: 24px; padding: 20px; color: #fff;
  background: var(--glass-dark-bg);
  -webkit-backdrop-filter: blur(26px) saturate(160%); backdrop-filter: blur(26px) saturate(160%);
  border: 1px solid var(--glass-dark-line);
  box-shadow: 0 18px 44px rgba(20,15,12,.35), inset 0 1px 0 rgba(255,255,255,.25);
}
.day-hero > * { position: relative; z-index: 1; }
.dh-city { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; opacity: .7; font-weight: 600; }
.dh-big { font-size: 26px; font-weight: 800; letter-spacing: -.02em; margin-top: 6px; }
.dstats { display: flex; gap: 8px; margin-top: 16px; }
.dstat { flex: 1; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); border-radius: 14px; padding: 10px 6px; text-align: center; }
.dstat b { display: block; font-size: 16px; }
.dstat span { font-size: 11px; opacity: .65; }
.tl .trow { display: flex; gap: 12px; margin-bottom: 10px; }
.trow .tm { width: 44px; flex: 0 0 auto; font-size: 13px; font-weight: 700; color: rgba(255,255,255,.55); padding-top: 12px; }
.trow .tcard { flex: 1; border-radius: 18px; padding: 10px 13px;
  background: var(--glass-dark-bg); border-color: var(--glass-dark-line);
  box-shadow: 0 12px 30px rgba(20,15,12,.3), inset 0 1px 0 rgba(255,255,255,.2);
  display: flex; gap: 10px; align-items: center; }
.tcard > * { position: relative; z-index: 1; }
.tcard .ttl { font-size: 14.5px; font-weight: 600; color: #fff; }
.tcard .meta { font-size: 12px; color: rgba(255,255,255,.6); margin-top: 2px; }
.tthumb { width: 42px; height: 42px; border-radius: 10px; object-fit: cover; flex: 0 0 auto; border: 1px solid rgba(255,255,255,.3); }

.postcard {
  position: relative; height: 180px; border-radius: 22px; overflow: hidden;
  background: url(assets/map.jpg) center/cover; color: #fff;
  border: 1px solid rgba(255,255,255,.35);
  display: flex; flex-direction: column; justify-content: space-between; padding: 14px 16px;
  box-shadow: 0 16px 40px rgba(240,81,46,.25);
}
.postcard::before { content: ""; position: absolute; inset: 0;
  background: linear-gradient(160deg, rgba(240,81,46,.78), rgba(35,32,28,.82)); }
.pc-route { position: absolute; inset: 0; width: 100%; height: 100%; }
.pc-route path { fill: none; stroke: rgba(255,255,255,.85); stroke-width: 2px;
  vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-dasharray: .04 .03; }
.pc-top, .pc-bottom { position: relative; display: flex; align-items: baseline; justify-content: space-between; }
.pc-bottom { flex-direction: column; align-items: flex-start; gap: 2px; }
.pc-top .wordmark { color: #fff; opacity: .9; font-size: 12px; }
.pc-date { font-size: 12px; font-weight: 600; opacity: .8; }
.pc-city { font-size: 21px; font-weight: 800; letter-spacing: -.01em; }
.pc-stats { font-size: 12.5px; opacity: .9; }

#summary .btn.ghost { background: var(--glass-dark-bg); border-color: var(--glass-dark-line); color: #fff;
  box-shadow: 0 12px 30px rgba(20,15,12,.3), inset 0 1px 0 rgba(255,255,255,.2); }

/* ---------- Экран «Рассказ» (плеер): фото на весь экран ---------- */
#story { color: var(--ink); }
#story .title-lg { color: #fff; text-shadow: 0 1px 8px rgba(0,0,0,.4); }
#storyBg { height: 100%; background-size: cover; background-position: center; }
#storyBg::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(rgba(0,0,0,.22), transparent 32%, rgba(0,0,0,.28) 70%, rgba(0,0,0,.42)); }
.story-hero {
  margin: 6px 18px 0; height: 168px; border-radius: 22px; position: relative;
  background: transparent;
  display: flex; align-items: flex-end; justify-content: center; padding-bottom: 10px;
}
.story-hero .tag {
  position: absolute; top: 0; left: 0;
  font-size: 11px; letter-spacing: .06em; text-transform: uppercase; font-weight: 600;
  color: #fff; background: rgba(0,0,0,.3);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.3);
  padding: 5px 12px; border-radius: 999px;
}
.eq { display: flex; gap: 6px; align-items: center; height: 46px; }
.eq i { width: 6px; height: 100%; border-radius: 4px; background: #fff; opacity: .95;
  box-shadow: 0 1px 6px rgba(0,0,0,.3);
  transform-origin: center; transform: scaleY(.25); transition: transform .13s ease; } /* высоты задаёт JS */

.story-body { padding: 16px 16px 24px; }
.s-title { font-size: 24px; font-weight: 700; letter-spacing: -.01em; color: #fff; text-shadow: 0 2px 12px rgba(0,0,0,.45); }
.s-meta { color: rgba(255,255,255,.75); font-size: 13px; margin-top: 5px; text-shadow: 0 1px 6px rgba(0,0,0,.4); }
.transcript {
  font-size: 14.5px; line-height: 1.6; color: rgba(27,24,21,.9);
  border-radius: 20px; padding: 15px 16px; margin-top: 16px;
  position: relative; overflow: hidden;
}
.pbar { height: 5px; border-radius: 3px; background: rgba(255,255,255,.35); margin-top: 18px; position: relative; overflow: hidden; }
.pfill { position: absolute; top: 0; bottom: 0; left: 0; width: 45%; border-radius: 3px; background: var(--accent); transition: width .4s linear; }
.ptimes { display: flex; justify-content: space-between; font-size: 12px; color: rgba(255,255,255,.75); margin-top: 7px; text-shadow: 0 1px 5px rgba(0,0,0,.4); }
.controls { display: flex; gap: 18px; align-items: center; justify-content: center; margin: 20px 0 4px; }
.cbtn {
  width: 52px; height: 52px; border-radius: 50%;
  color: var(--ink); font-family: var(--font); font-size: 13px; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: transform .12s var(--ease-out);
}
.cbtn:active { transform: scale(.93); }
.cbtn.big { width: 68px; height: 68px;
  background: linear-gradient(165deg, #FF6B47, var(--accent) 55%, #D8431F);
  color: #fff; border: 1px solid rgba(255,255,255,.5);
  box-shadow: 0 10px 26px rgba(240,81,46,.45), inset 0 1px 1px rgba(255,255,255,.55); }
.nextup {
  display: flex; gap: 10px; align-items: center; margin-top: 12px; padding: 12px 14px;
  border-radius: 16px; cursor: pointer;
  background: var(--terra-bg); color: #fff;
  border: 1px solid rgba(255,255,255,.4);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  box-shadow: var(--terra-shadow);
  font-size: 13.5px; font-weight: 600;
}

@media (prefers-reduced-motion: reduce) { * { animation: none !important; } }
