/* =============================================================================
   ALINA · Mini App — СТИЛИ
   Дизайн-токены и значения соответствуют SPEC.md 1:1.
   Чистый CSS, без сборки. Менять цвета/радиусы — здесь, в :root.
   ========================================================================== */

:root {
  /* Палитра (тёплый нюд, без ярких цветов и градиентов) */
  --bg: #FAF8F6;
  --surface: #FFFFFF;
  --cream: #F4ECE3;
  --beige: #EBE1D5;
  --nude: #E6D3C6;
  --rose: #DCC1BC;
  --accent: #C0958B;
  --accent-deep: #A8786E;
  --ink: #2C2723;
  --ink-2: #5A524B;
  --muted: #988D83;
  --muted-2: #B6ABA1;
  --hair: rgba(44, 39, 35, 0.085);
  --hair-2: rgba(44, 39, 35, 0.05);

  /* Форма и тени */
  --radius: 22px;
  --shadow-card: 0 1px 2px rgba(44, 39, 35, 0.04), 0 8px 24px rgba(44, 39, 35, 0.055);
  --shadow-btn: 0 8px 20px rgba(44, 39, 35, 0.16);

  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  color-scheme: light; /* не даём webview инвертировать интерфейс в тёмную тему */
}

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

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overscroll-behavior: none;
}

h1, h2, h3, p { margin: 0; text-wrap: pretty; }
img { max-width: 100%; display: block; }

button {
  font-family: var(--sans);
  -webkit-tap-highlight-color: transparent;
  color: inherit;
}

/* Единый микро-отклик на нажатие */
.pbtn:active,
.chip:active,
.choose-btn:active,
.icon-btn:active,
.social:active,
.navitem:active,
.map:active { transform: scale(0.975); }

/* Скрытый скроллбар */
.scroll, .chiprow, .promo-row { scrollbar-width: none; }
.scroll::-webkit-scrollbar,
.chiprow::-webkit-scrollbar,
.promo-row::-webkit-scrollbar { width: 0; height: 0; }

/* ───────────────────────── Каркас приложения ───────────────────────── */
.app {
  height: var(--app-height, 100dvh);
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

/* Верхняя панель */
.appbar {
  flex-shrink: 0;
  padding: max(14px, env(safe-area-inset-top)) 18px 12px;
  background: var(--bg);
  position: relative;
  z-index: 6;
  border-bottom: 1px solid var(--hair-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  width: 38px; height: 38px;
  border-radius: 12px;
  background: var(--ink);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif);
  font-size: 18px; font-weight: 600;
  color: var(--cream);
  letter-spacing: 0.02em;
  user-select: none;
}
.appbar-title {
  font-size: 15px; font-weight: 700;
  letter-spacing: 0.005em;
  color: var(--ink);
}
.icon-btn {
  width: 38px; height: 38px;
  border-radius: 12px; border: none; cursor: pointer;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--hair);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-2);
  transition: transform .12s ease;
}

/* Прокручиваемая область */
.scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

/* Экран (для анимации переключения) */
.screen { display: none; }
.screen.active { display: block; animation: screenIn .32s ease both; }
@keyframes screenIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .screen.active { animation: none; }
}

.pad { padding: 18px 18px 26px; }

/* Нижняя навигация */
.bottomnav {
  flex-shrink: 0;
  background: rgba(250, 248, 246, 0.92);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  border-top: 1px solid var(--hair-2);
  padding: 10px 8px max(18px, calc(env(safe-area-inset-bottom) + 8px));
  display: flex;
  justify-content: space-around;
}
.navitem {
  border: none; background: none; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 2px 12px; flex: 1;
  color: var(--muted-2);
  transition: color .18s ease, transform .12s ease;
}
.navitem svg { stroke-width: 1.7; }
.navitem.active { color: var(--ink); }
.navitem.active svg { stroke-width: 1.9; }
.navlabel { font-size: 10px; font-weight: 500; letter-spacing: 0.01em; }
.navitem.active .navlabel { font-weight: 700; }

/* ───────────────────────── Базовые компоненты ───────────────────────── */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.pbtn {
  width: 100%; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 9px;
  padding: 17px 20px;
  border-radius: 16px;
  font-size: 15.5px; font-weight: 600; letter-spacing: 0.01em;
  background: var(--ink); color: #fff;
  box-shadow: var(--shadow-btn);
  transition: transform .12s ease, box-shadow .2s ease;
}

.chiprow { display: flex; gap: 8px; overflow-x: auto; margin: 0 -18px; padding: 0 18px; }
.chiprow--services { margin-bottom: 18px; }
.chiprow--portfolio { margin: 0; padding: 0 18px 16px; }
.chip {
  flex-shrink: 0; border: none; cursor: pointer; white-space: nowrap;
  padding: 9px 16px; border-radius: 999px;
  font-size: 13px; font-weight: 600; letter-spacing: 0.01em;
  background: var(--surface); color: var(--ink-2);
  box-shadow: inset 0 0 0 1px var(--hair);
  transition: all .18s ease;
}
.chip.active { background: var(--ink); color: #fff; box-shadow: none; }

/* Плейсхолдер фото / фото */
.tint {
  position: relative; width: 100%;
  border-radius: var(--radius);
  overflow: hidden; flex-shrink: 0;
  background: var(--nude);
  box-shadow: inset 0 0 0 1px rgba(44, 39, 35, 0.045);
}
.tint > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tint-label {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 7px; opacity: 0.55; color: rgba(60, 48, 42, 0.6);
}
.tint-label .cap {
  font-size: 9.5px; font-weight: 600; letter-spacing: 0.18em;
  text-transform: uppercase; color: rgba(60, 48, 42, 0.62);
}

/* Тона подложек (из ui.jsx) */
.t-nude  { background: #E7D5C8; }
.t-rose  { background: #E2C8C2; }
.t-dust  { background: #D9BEB7; }
.t-beige { background: #E9E0D4; }
.t-cream { background: #F2EADF; }
.t-taupe { background: #DDD0C4; }
.t-mocha { background: #D6C3B5; }
.t-sand  { background: #E4D6C6; }
.t-blush { background: #E9D2CD; }
.t-stone { background: #D8D0C6; }
.t-clay  { background: #D2BCB0; }
.t-pearl { background: #EFE7DD; }

.stars { display: flex; gap: 2.5px; }

/* «Стеклянные» пилюли */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: 0 2px 8px rgba(44, 39, 35, 0.08);
  font-family: var(--sans); color: var(--ink);
}
.pill-tr { position: absolute; top: 14px; right: 14px; }
.pill-bl { position: absolute; bottom: 14px; left: 14px; }
.pill--rating { padding: 7px 12px 7px 10px; font-size: 13px; font-weight: 700; }
.pill--status { padding: 7px 13px; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.pill--status .dot { width: 7px; height: 7px; border-radius: 999px; background: #7BA37A; }
.pill--likes { position: absolute; bottom: 10px; left: 10px; padding: 5px 10px; font-size: 11px; font-weight: 700; background: rgba(255, 255, 255, 0.7); }
.pill--map { position: absolute; bottom: 12px; right: 12px; padding: 8px 13px; font-size: 12px; font-weight: 700; background: rgba(255, 255, 255, 0.82); }

/* ───────────────────────── Экран 1 · Главная ───────────────────────── */
.identity { margin-top: -44px; position: relative; z-index: 2; padding: 20px; }
.identity-head { display: flex; align-items: flex-start; justify-content: space-between; }
.master-name { font-family: var(--serif); font-size: 28px; font-weight: 600; line-height: 1.05; margin-bottom: 6px; }
.master-sub { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 500; color: var(--muted); }
.sep-dot { width: 3px; height: 3px; border-radius: 999px; background: var(--muted-2); }
.badge {
  padding: 6px 11px; border-radius: 999px; background: var(--cream);
  font-size: 11px; font-weight: 700; letter-spacing: 0.04em;
  color: var(--accent-deep); white-space: nowrap;
}
.rating-line { display: flex; align-items: center; gap: 8px; margin: 13px 0 14px; }
.rating-line .val { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.rating-line .muted { font-size: 13px; font-weight: 500; color: var(--muted); }
.about { font-size: 13.5px; font-weight: 500; line-height: 1.55; color: var(--ink-2); margin-bottom: 16px; }
.stats {
  display: flex; justify-content: space-between; padding: 14px 4px;
  border-top: 1px solid var(--hair-2); border-bottom: 1px solid var(--hair-2);
  margin-bottom: 16px;
}
.stat { text-align: center; flex: 1; }
.stat .num { font-family: var(--serif); font-size: 21px; font-weight: 600; line-height: 1.05; margin-bottom: 3px; }
.stat .lbl { font-size: 11px; font-weight: 600; letter-spacing: 0.03em; color: var(--muted); }

.section { margin-top: 26px; }
.section--reviews { margin-top: 24px; }

.label { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 13px; }
.label h3 { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; color: var(--ink); }
.label .action { font-size: 12.5px; font-weight: 600; color: var(--accent-deep); cursor: pointer; }

.promo-row { display: flex; gap: 12px; overflow-x: auto; margin: 0 -18px; padding: 0 18px 4px; }
.promo {
  flex-shrink: 0; width: 250px; display: flex; align-items: center; gap: 14px;
  background: var(--surface); border-radius: 20px; padding: 14px; box-shadow: var(--shadow-card);
}
.promo .ptext { min-width: 0; }
.promo .off { font-family: var(--serif); font-size: 30px; font-weight: 600; line-height: 1.05; color: var(--accent-deep); margin-bottom: 3px; }
.promo .ptitle { font-size: 13px; font-weight: 700; color: var(--ink); }
.promo .pnote { font-size: 11.5px; font-weight: 500; color: var(--muted); margin-top: 2px; }

.reviews { display: flex; flex-direction: column; gap: 12px; }
.review { padding: 16px; }
.review-head { display: flex; align-items: center; gap: 11px; margin-bottom: 10px; }
.review-name { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.review-date { font-size: 11.5px; font-weight: 500; color: var(--muted); }
.review-text { font-size: 13px; font-weight: 500; line-height: 1.5; color: var(--ink-2); }
.review-head .stars { margin-left: auto; }

/* ───────────────────────── Экран 2 · Услуги ───────────────────────── */
.intro-title { font-family: var(--serif); font-size: 22px; font-weight: 500; line-height: 1.2; color: var(--ink); margin: 2px 0 16px; }
.intro-title .sub { display: block; font-family: var(--sans); font-size: 13.5px; font-weight: 500; color: var(--muted); margin-top: 2px; }

.list { display: flex; flex-direction: column; gap: 12px; }
.service { padding: 12px; display: flex; gap: 13px; align-items: center; }
.service .body { flex: 1; min-width: 0; }
.service .sname { font-size: 14.5px; font-weight: 700; letter-spacing: -0.01em; color: var(--ink); }
.service .sdesc { font-size: 12px; font-weight: 500; color: var(--muted); margin-top: 3px; }
.service .sdur { display: flex; align-items: center; gap: 6px; margin-top: 9px; color: var(--muted-2); }
.service .sdur span { font-size: 12px; font-weight: 600; color: var(--muted); }
.service .right { display: flex; flex-direction: column; align-items: flex-end; gap: 9px; }
.service .sprice { font-size: 15.5px; font-weight: 700; color: var(--ink); white-space: nowrap; }
.choose-btn {
  border: none; cursor: pointer; background: var(--ink); color: #fff;
  padding: 8px 15px; border-radius: 11px;
  font-size: 12.5px; font-weight: 600; box-shadow: var(--shadow-btn);
  transition: transform .12s ease;
}

/* ───────────────────────── Экран 3 · Портфолио ───────────────────────── */
.screen-portfolio .pad-portfolio { padding: 18px 0 26px; }
.portfolio-title { font-family: var(--serif); font-size: 22px; font-weight: 500; padding: 0 18px; margin: 2px 0 14px; }
.portfolio-title .count { font-family: var(--sans); font-size: 13.5px; font-weight: 500; color: var(--muted); }
.masonry { column-count: 2; column-gap: 12px; padding: 0 18px; }
.masonry-item { break-inside: avoid; margin-bottom: 12px; }

/* ───────────────────────── Экран 4 · Контакты ───────────────────────── */
.studio-card { padding: 18px; margin-bottom: 14px; }
.studio-name { font-family: var(--serif); font-size: 24px; font-weight: 600; color: var(--ink); margin-bottom: 14px; }
.info-row { display: flex; gap: 12px; align-items: flex-start; }
.info-row + .info-row { margin-top: 14px; }
.info-ico {
  width: 38px; height: 38px; border-radius: 12px; background: var(--cream);
  flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  color: var(--accent-deep);
}
.info-main { font-size: 13.5px; font-weight: 700; color: var(--ink); line-height: 1.35; }
.info-note { font-size: 12px; font-weight: 500; color: var(--muted); margin-top: 2px; }

.map {
  position: relative; margin-bottom: 18px; cursor: pointer;
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-card);
  transition: transform .12s ease;
}
.map .tint { border-radius: 0; }
.map-streets { position: absolute; inset: 0; }
.map-pin { position: absolute; left: 50%; top: 46%; transform: translate(-50%, -100%); }
.map-pin .head {
  width: 34px; height: 34px; border-radius: 50% 50% 50% 0;
  background: var(--accent-deep); transform: rotate(-45deg);
  box-shadow: 0 6px 14px rgba(44, 39, 35, 0.28);
  display: flex; align-items: center; justify-content: center;
}
.map-pin .dot { width: 11px; height: 11px; border-radius: 999px; background: #fff; transform: rotate(45deg); }

.socials { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px; }
.social {
  padding: 15px; display: flex; align-items: center; gap: 11px;
  background: var(--surface); border: none; cursor: pointer; text-align: left;
  border-radius: var(--radius); box-shadow: var(--shadow-card);
  transition: transform .12s ease;
}
.social-ico {
  width: 42px; height: 42px; border-radius: 13px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; color: var(--ink);
}
.social-main { min-width: 0; }
.social-title { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.social-sub { font-size: 11px; font-weight: 500; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
