@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600;700&display=swap");

:root{
  --bg-top:#0b7a7b;
  --bg-bot:#003f40;

  --txt:#ffffff;
  --txt-soft:rgba(255,255,255,.78);

  --glass: rgba(0, 55, 58, 0.06);
  --glass-strong: rgba(0, 55, 58, 0.08);
  --stroke: rgba(255,255,255,.16);

  --r-lg: 26px;
  --r-md: 18px;
  --r-pill: 999px;

  --w: 440px;
  --tab: 96px;
  --tabbar-h: 56px;

  --font: "Cormorant Garamond", serif;
}

/* reset + убрать белую полосу/скролл справа */
*{ box-sizing:border-box; }
html,body{ height:100%; margin:0; padding:0; overflow-x:hidden; }
body{
  font-family: var(--font);
  background: linear-gradient(180deg,var(--bg-top),var(--bg-bot));
  color: var(--txt);
  overflow:hidden;               /* скроллим внутри .app */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* фон-картинки НЕ через background, а img + object-fit */
.bg-hero,
.bg-main{
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
}
.bg-hero{ object-position: left top; }
.bg-main{ display:none; object-position: center top; }

/* лёгкий “туман”, чтобы текст читался, но НЕ закрывал лицо */
body::before{
  content:"";
  position:fixed;
  inset:0;
  z-index:0;
  pointer-events:none;
  background:
    radial-gradient(900px 520px at 78% 16%, rgba(0,0,0,.04), rgba(0,0,0,0) 62%),
    linear-gradient(180deg, rgba(0,0,0,.06), rgba(0,0,0,.18));
}

/* основной контейнер */
.app{
  position: relative;
  z-index: 1;
  height: 100dvh;
  overflow-y: auto;
  overflow-x: hidden;

  width: min(var(--w), 100vw);
  margin: 0 auto;

  padding: 18px 18px calc(var(--tab) + 18px);
}
.app::-webkit-scrollbar{ width:0; height:0; }
.app{ scrollbar-width:none; }

/* ===== ROUTER / SCREENS ===== */
.screen{ display:none !important; }
.screen.screen--active{ display:block !important; }

/* header справа */
.header{
  display:flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  padding-top: 10px;
}

.logo{
  display:inline-flex;
  align-items:center;
  gap: 0;
}
.logo__word{
  font-size: 34px;
  line-height: 1;
  letter-spacing: .22em;
  font-weight: 600;
  text-transform: uppercase;
}
.logo__o{
  width: 30px;
  height: 30px;
  border-radius: 999px;
  margin-left: -10px;           /* как “О” в слове */
  transform: translateY(2px);
}

.tagline{
  margin-top: 8px;
  letter-spacing: .10em;
  text-transform: uppercase;
  font-size: 13px;
  color: rgba(255,255,255,.80);
}
.tagline__line{ line-height: 1.35; }

/* стеклянные блоки */
.glass{
  border-radius: var(--r-lg);
  background: var(--glass);
  border: 1px solid var(--stroke);
  backdrop-filter: blur(14px);
  box-shadow: 0 24px 54px rgba(0,0,0,.38);
}

/* карточка с копирайтом: смещаем вниз, чтобы НЕ на лице */
.glass--copy{
  margin-top: 300px;
  margin-bottom: 100px;
  padding: 18px 22px;
}

/* текст */
.copy{
  margin: 0;
  font-size: 18px;
  line-height: 1.5;
  color: rgba(255,255,255,.78);
}

/* секция вопроса */
.section{ margin-top: 18px; }
.section__title{
  margin: 18px 0 12px;
  font-size: 18px;
  letter-spacing: .06em;
  text-transform: uppercase;
  font-weight: 600;
}

/* “стеклянные” кнопки-чипсы как на референсе */
.chips{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.chip{
  all: unset;
  box-sizing: border-box;

  border: 1px solid rgba(255,255,255,.22);
  background: rgba(0,0,0,.10);
  color: rgba(255,255,255,.86);

  border-radius: var(--r-pill);
  padding: 12px 14px;

  font-family: var(--font);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: .06em;
  text-transform: uppercase;

  backdrop-filter: blur(12px);
  box-shadow: 0 10px 26px rgba(0,0,0,.22);

  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform .08s ease, background .12s ease, border-color .12s ease;
}

.chip:active{
  transform: scale(.985);
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.30);
}

.chip[disabled]{
  opacity: .55;
  cursor: default;
}

/* tabbar как на макете (4 пункта) */
.tabbar{
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;

  width: min(var(--w), 100vw);
  height: var(--tab);

  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;

  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: rgba(0, 55, 58, 0.55);
  border-top: 1px solid rgba(255,255,255,.12);
  backdrop-filter: blur(16px);

  z-index: 20;
}

.tabbar__btn{
  appearance:none;
  -webkit-appearance:none;
  border: 0;
  background: transparent;

  display:grid;
  place-items:center;
  gap: 6px;

  color: rgba(255,255,255,.88);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;

  border-radius: 18px;
}

.tabbar__btn[disabled]{ opacity: .55; cursor: default; }

.tabbar__btn--active{
  background: rgba(255,255,255,.10);
  outline: 1px solid rgba(255,255,255,.16);
}

.tabbar__icon{
  width: 56px;
  height: 56px;
  object-fit: contain;
  opacity: .95;
}

.tabbar__txt{
  font-size: 9px;
  letter-spacing: .06em;
  text-transform: lowercase;
  font-weight: 600;
  color: rgba(255,255,255,.88);
}

/* =========================
   ASSISTANTS (accordion) UI
   ========================= */

.assistants{ padding: 16px 14px 0; }
.assistants__list{ display:flex; flex-direction:column; gap: 14px; }

.acc{
  border-radius: 22px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.10);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  overflow: hidden;
}

.acc__head{
  width: 100%;
  display:flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 18px 16px;

  background: transparent;
  border: 0;
  color: rgba(255,255,255,0.94);
  text-align: left;

  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.acc__left{ display:flex; flex-direction:column; gap: 4px; min-width:0; }

.acc__title{
  font-family: var(--font);
  font-size: 34px;
  line-height: 1.0;
  letter-spacing: 0.01em;
}

.acc__sub{
  font-family: var(--font);
  font-size: 20px;
  opacity: 0.85;
}

.acc__icon{
  font-family: var(--font);
  font-size: 42px;
  line-height: 1;
  opacity: 0.9;
  padding-right: 4px;
}

.acc__body{
  border-top: 1px solid rgba(255,255,255,.10);
  overflow: hidden;
  max-height: 0;
  transition: max-height .28s ease;
}

.acc__bodyInner{ padding: 14px 12px 16px; }
.acc__soon{ opacity:.85; font-size:16px; padding: 10px 6px; }

/* Карточка тарифа */
.plans{ display:flex; flex-direction:column; gap: 14px; }

.offer{
  border-radius: 22px;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.10);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 16px;

  display:flex;
  gap: 14px;
}

.offer__left{ flex:1; min-width:0; }

.offer__tier{
  font-family: var(--font);
  font-size: 34px;
  line-height: 1.0;
  margin-bottom: 10px;
  color: rgba(255,255,255,0.94);
}

.offer__list{
  margin: 0;
  padding-left: 18px;
  color: rgba(255,255,255,0.86);
  font-family: var(--font);
  font-size: 20px;
  line-height: 1.35;
}

.offer__right{
  width: 120px;
  display:flex;
  flex-direction:column;
  gap: 10px;
  align-items: stretch;
  justify-content:flex-start;
}

.offer__gifts{
  align-self: flex-end;
  padding: 8px 12px;
  border-radius: 14px;
  background: rgba(0,0,0,0.14);
  border: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.90);
  font-family: var(--font);
  font-size: 18px;
}

/* Кнопки как на макете (розовое стекло) */
.btnPink{
  height: 40px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.10);

  background: rgba(237, 198, 208, 0.65);
  color: rgba(10, 70, 72, 0.95);

  font-family: var(--font);
  font-size: 18px;

  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.btnPink:active{ transform: translateY(1px); }
.btnPink--ghost{ background: rgba(237, 198, 208, 0.45); }

/* компактная ссылка вместо большой второй кнопки */
.btnLink{
  height: 28px;
  border: 0;
  background: transparent;
  color: rgba(255,255,255,0.88);
  font-family: var(--font);
  font-size: 18px;
  text-decoration: underline;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.btnLink:active{ opacity: .85; }
.btnPink:disabled{ opacity: 0.5; cursor: default; transform: none; }

/* ============ DETAILS (свайп/тап) ============ */

#screen-details.screen--active{ display:block !important; }

.details{
  margin-top: 18px;
  padding: 16px;
  position: relative;
}

/* убираем “двойной заголовок”: у карточек заказчика уже есть своя шапка */
.details__head{
  position: absolute;
  top: 10px;
  right: 10px;
  left: 10px;
  display:flex;
  justify-content: flex-end;
  align-items:center;
  gap: 12px;
  padding: 0;
  border: 0;
  pointer-events: none; /* кликаем по карточке */
}

.details__title{ display:none; }

.details__back{
  pointer-events: auto; /* крестик кликабельный */
  border: 0;
  background: rgba(0,0,0,0.18);
  color: rgba(255,255,255,.92);
  font-size: 28px;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,.14);
  backdrop-filter: blur(10px);
  -webkit-tap-highlight-color: transparent;
}

/* кнопка “назад” на карточках */
.details__nav{
  pointer-events: auto;
  border: 0;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(0,0,0,0.18);
  border: 1px solid rgba(255,255,255,.14);
  color: rgba(255,255,255,.92);
  font-size: 34px;
  line-height: 1;
  display:grid;
  place-items:center;
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-tap-highlight-color: transparent;
}
.details__nav:active{ opacity:.85; }
.details__nav--prev{ margin-right: auto; }

.details__stage{
  padding: 8px 0 0;
  display:flex;
  justify-content: center;
}

/* нижнюю подсказку и прогресс убираем — это дублирует контент карточек */
.details__footer{ display:none; }

/* ===== DETAILS CARDS (готовые SVG экраны заказчика) ===== */

/* убираем внешнюю “рамку” нашего контейнера, чтобы не было каши из бордеров */
.details.glass{
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
}

.details{
  margin-top: 0;
  padding: 0;
}

.details__stage{
  padding: 0;
  display:flex;
  justify-content: center;
}

.detailsCardClip{
  position: relative;
  width: 100%;
  max-width: 100%;

  /* делаем карточку крупнее: почти во весь экран, но оставляем место под таббар */
  height: calc(100dvh - var(--tab) - 18px);

  border-radius: 26px;
  overflow: hidden;

  /* убираем наши бордеры/тени — оставляем только дизайн карточки */
  border: 0;
  background: transparent;
  box-shadow: none;
}

.detailsCardImg{
  width: 100%;
  height: 100%;
  display:block;

  /* базово показываем всю карточку */
  object-fit: contain;
  object-position: center;

  /* прячем встроенный таббар внутри SVG:
     чуть увеличиваем и сдвигаем карточку вверх, чтобы низ ушёл за пределы клипа */
  transform: translateY(-6%) scale(1.30);
  transform-origin: center;

  user-select: none;
  -webkit-user-drag: none;
}

  user-select: none;
  -webkit-user-drag: none;
}

/* ВАЖНО: убираем маску снизу — она давала ощущение лишних слоёв */
.detailsCardClip::after{ display:none; }

/* мелкие экраны */
@media (max-width: 360px){
  .logo__word{ font-size: 30px; }
  .glass--copy{ margin-top: 120px; }
  .copy{ font-size: 17px; }
  .chips{ gap: 10px; }
}

/* ============ PACKAGE (список ассистентов пакета) ============ */

.package{
  margin-top: 18px;
  padding: 16px;
}

.package__head{
  display:flex;
  justify-content: space-between;
  align-items:center;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,.10);
}

.package__title{
  font-family: var(--font);
  font-size: 22px;
  color: rgba(255,255,255,.92);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.package__back{
  border: 0;
  background: transparent;
  color: rgba(255,255,255,.92);
  font-size: 26px;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  cursor: pointer;
}

.package__list{
  margin-top: 12px;
  display:flex;
  flex-direction: column;
  gap: 12px;
}

.packageItem{
  border-radius: 18px;
  padding: 14px 14px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.10);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.packageItem:active{ transform: translateY(1px); }

.packageItem__title{
  font-family: var(--font);
  font-size: 22px;
  line-height: 1.15;
  color: rgba(255,255,255,.94);
}

.packageItem__sub{
  margin-top: 6px;
  font-size: 15px;
  opacity: .82;
}

.package__hint{
  margin-top: 12px;
  font-size: 13px;
  opacity: .8;
}

/* ============ CHAT ============ */

.chat{
  margin-top: 18px;
  padding: 16px;
}

/* полноэкранный чат (заказчик): чат занимает весь экран, таббар остаётся снизу */
.app.app--fullscreen{
  width: 100vw;
  margin: 0;
  padding: 0 0 calc(var(--tab) + env(safe-area-inset-bottom));
  overflow: hidden;
}

.app.app--fullscreen #screen-chat{
  padding: 0;
}

.app.app--fullscreen .chat{
  margin: 0;
  height: calc(100dvh - var(--tab));
  border-radius: 0;
}

.app.app--fullscreen .chat__messages{
  height: calc(100dvh - var(--tab) - 140px);
}

.chat__head{
  display:flex;
  justify-content: space-between;
  align-items:center;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,.10);
}

.chat__title{
  font-family: var(--font);
  font-size: 22px;
  color: rgba(255,255,255,.92);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat__back{
  border: 0;
  background: transparent;
  color: rgba(255,255,255,.92);
  font-size: 26px;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  cursor: pointer;
}

.chat__messages{
  margin-top: 12px;
  height: min(56vh, 520px);
  overflow: auto;
  padding: 10px;
  border-radius: 18px;
  background: rgba(0,0,0,.10);
  border: 1px solid rgba(255,255,255,.10);
}

.chat__msg{
  display:flex;
  margin: 10px 0;
}

.chat__bubble{
  max-width: 85%;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.10);
  line-height: 1.35;
  font-size: 18px;
  color: rgba(255,255,255,.92);
  background: rgba(255,255,255,.08);
  white-space: pre-wrap;
  word-break: break-word;
}

.chat__msg--me{ justify-content: flex-end; }
.chat__msg--me .chat__bubble{
  background: rgba(237, 198, 208, 0.35);
  color: rgba(255,255,255,.95);
}

.chat__composer{
  margin-top: 12px;
  display:flex;
  gap: 10px;
  align-items:center;
}

.chat__input{
  flex: 1;
  height: 46px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,.92);
  font-family: var(--font);
  font-size: 18px;
  padding: 0 12px;
  outline: none;
}

.chat__input::placeholder{ color: rgba(255,255,255,.55); }

.chat__send{
  height: 46px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(237, 198, 208, 0.65);
  color: rgba(10, 70, 72, 0.95);
  font-family: var(--font);
  font-size: 18px;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.chat__send:active{ transform: translateY(1px); }

.chat__status{
  margin-top: 8px;
  font-size: 13px;
  opacity: .8;
  min-height: 16px;
}

/* ============ ONBOARDING ============ */

/* tabbar visibility (JS toggles .tabbar--hidden) */
#tabbar.tabbar--hidden { display: none !important; }

.onb {
  position: relative;
  min-height: 100vh;
  padding: 28px 18px calc(24px + env(safe-area-inset-bottom));
  color: rgba(255,255,255,.9);
}

.onb__girl {
  position: absolute;
  left: -18px;
  top: 40px;
  width: 62vw;
  max-width: 360px;
  height: auto;
  opacity: 0.95;
  pointer-events: none;
  user-select: none;
}

.onb__head { position: relative; margin-top: 120px; text-align: center; }
.onb__brand { display: inline-flex; align-items: baseline; gap: 6px; }
.onb__name { font-size: 44px; letter-spacing: .04em; font-weight: 600; }
.onb__mark { width: 34px; height: 34px; transform: translateY(3px); }
.onb__tagline { margin-top: 6px; font-size: 14px; letter-spacing: .08em; opacity: .85; }

.onb__card {
  position: relative;
  margin: 26px auto 0;
  max-width: 420px;
  padding: 16px 14px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.06);
}

.onb__card p {
  margin: 0 0 12px 0;
  font-size: 16px;
  line-height: 1.5;
}

.onb__card p:last-child {
  margin-bottom: 0;
}

.onb__cta { position: relative; margin-top: 26px; text-align: center; }
.onb__cta h2 { font-size: 14px; letter-spacing: .08em; margin: 0 0 12px; font-weight: 600; }

.onb__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  max-width: 420px;
  margin: 0 auto;
}

/* shared button */
.pill {
  padding: 12px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.9);
  font-family: var(--font);
  font-size: 14px;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
}

.pill:active {
  opacity: .85;
  transform: translateY(1px);
}

/* ============ CARDS DECK ============ */
.deck {
  position: relative;
  width: min(360px, calc(100vw - 32px));
  margin: 24px auto;
  height: calc(100vh - var(--tabbar-h) - env(safe-area-inset-bottom) - 48px);
}

.card {
  position: absolute;
  left: 0; right: 0;
  margin: 0 auto;
  width: 100%;
  height: 72%;
  border-radius: 26px;
  border: 2px solid var(--card-border, rgba(255,255,255,.6));
  background: var(--card-bg, #fff);
  box-shadow: 0 12px 28px rgba(0,0,0,.18);
}

.card.front { z-index: 2; padding: 18px 16px; display: flex; flex-direction: column; }
.card.next  { z-index: 1; pointer-events: none; transform: translateY(14px) scale(0.99); opacity: 0.95; }

.card__header {
  flex-shrink: 0;
}

.brand { font-size: 12px; opacity: .7; letter-spacing: .12em; font-weight: 600; }
.title { font-size: 16px; margin: 8px 0 0; font-weight: 600; }
.card__body { 
  margin-top: 12px; 
  color: rgba(0,0,0,.8); 
  flex: 1;
  overflow-y: auto;
  font-size: 15px;
  line-height: 1.5;
}

.card__body p {
  margin: 0 0 12px 0;
}

.card__body p:last-child {
  margin-bottom: 0;
}

.cardsNav {
  position: absolute;
  left: 16px; right: 16px; bottom: 14px;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}