/* Cocos Tour — палитра из логотипа: закат (коралл → оранжевый → солнце), кремовый фон, тёмная слива. */
:root {
  --coral: #f0555e;
  --orange: #f5814a;
  --sun: #f7b84b;
  --cream: #fff7ec;
  --sand: #f6ead9;
  --plum: #2c1a2e;
  --cocoa: #5a2f22;
  --ink: #2c1a2e;
  --muted: #7a6a72;
  --line: #eadccb;
  --card: #ffffff;
  --ok: #1f9d6b;
  --warn: #d98a1c;
  --bad: #d64545;
  --sunset: linear-gradient(135deg, var(--coral) 0%, var(--orange) 55%, var(--sun) 100%);
  --radius: 20px;
  --shadow: 0 1px 2px rgba(44, 26, 46, .06), 0 8px 24px rgba(44, 26, 46, .08);
  --shadow-lg: 0 18px 50px rgba(240, 85, 94, .18);
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Unbounded", "Manrope", system-ui, sans-serif;
  --gutter: 16px;
  --bar-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.5;
  color: var(--ink); background: var(--cream);
  /* clip, не hidden: hidden делает body отдельным скроллером и ломает прокрутку окна */
  overflow-x: clip;
}
img { max-width: 100%; display: block; }
a { color: var(--coral); text-decoration-thickness: 1px; text-underline-offset: 3px; }
h1, h2, h3 { margin: 0; line-height: 1.15; }
p { margin: 0; }
[hidden] { display: none !important; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter); }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
.cap::first-letter { text-transform: uppercase; }
.accent { background: var(--sunset); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* --- кнопки --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 999px; border: 0; cursor: pointer;
  font: 700 1rem var(--font); text-decoration: none; color: #fff; background: var(--plum);
  transition: transform .15s ease, box-shadow .2s ease, opacity .2s;
}
.btn:active { transform: scale(.98); }
.btn--primary { background: var(--sunset); box-shadow: var(--shadow-lg); }
.btn--ghost { background: rgba(255, 255, 255, .7); color: var(--plum); border: 1px solid var(--line); }
.btn--sm { min-height: 38px; padding: 0 14px; font-size: .9rem; }
.btn--block { width: 100%; }
.btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }

/* --- шапка --- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: rgba(255, 247, 236, .82); backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid rgba(234, 220, 203, .7);
}
.topbar__in { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--plum); }
.brand img { width: 40px; height: 40px; }
.brand__name { font: 600 1.05rem var(--display); letter-spacing: -.01em; }
.brand__name b { font-weight: 700; color: var(--orange); margin-left: 3px; }

/* --- hero --- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background: linear-gradient(180deg, #f0555e 0%, #f5814a 52%, #f7b84b 100%);
  padding: 44px 0 40px; border-radius: 0 0 32px 32px;
}
.hero__sun {
  position: absolute; width: 520px; height: 520px; right: -180px; top: -160px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 236, 190, .55) 0%, rgba(255, 236, 190, 0) 65%);
  pointer-events: none;
}
.hero__in { position: relative; }
.eyebrow { font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .9; }
.hero__title { font: 700 clamp(1.9rem, 7.4vw, 3.4rem) / 1.08 var(--display); letter-spacing: -.02em; margin: 10px 0 12px; }
.hero__title .accent { background: linear-gradient(90deg, #fff6d6, #fff); -webkit-background-clip: text; background-clip: text; }
.hero__lead { max-width: 560px; font-size: 1.02rem; opacity: .95; }

.ai-search {
  display: flex; align-items: center; gap: 8px; margin-top: 22px; max-width: 640px;
  background: rgba(255, 255, 255, .95); border-radius: 999px; padding: 6px 6px 6px 16px;
  box-shadow: 0 12px 40px rgba(44, 26, 46, .18);
}
.ai-search__icon { font-size: 1.15rem; }
.ai-search__input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink);
  font: 500 1rem var(--font); padding: 10px 0;
}
.ai-search__input::placeholder { color: #9b8b92; }
.ai-search__btn {
  flex: none; width: 46px; height: 46px; border-radius: 50%; border: 0; cursor: pointer;
  color: #fff; background: var(--plum); display: grid; place-items: center;
}
.ai-hints { display: flex; gap: 8px; margin-top: 12px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.ai-hints::-webkit-scrollbar { display: none; }
.hint {
  flex: none; border: 1px solid rgba(255, 255, 255, .55); background: rgba(255, 255, 255, .16);
  color: #fff; border-radius: 999px; padding: 8px 14px; font: 600 .88rem var(--font); cursor: pointer;
}

/* --- секции --- */
.section { padding: 34px var(--gutter) 8px; }
.section__head { margin-bottom: 14px; }
.section__title { font: 700 1.5rem var(--display); letter-spacing: -.02em; margin-bottom: 4px; }

.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--gutter)) 16px; padding: 2px var(--gutter); }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; border: 1px solid var(--line); background: #fff; color: var(--plum); border-radius: 999px;
  padding: 8px 14px; font: 600 .9rem var(--font); cursor: pointer; transition: all .15s;
}
.chip.is-active { background: var(--plum); color: #fff; border-color: var(--plum); }

/* --- карточки --- */
.cards { display: grid; grid-template-columns: 1fr; gap: 16px; }
.card {
  display: flex; flex-direction: column; background: var(--card); border-radius: var(--radius);
  overflow: hidden; text-decoration: none; color: inherit; box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 14px 36px rgba(44, 26, 46, .14); }
.card__media { position: relative; aspect-ratio: 16 / 10; background: var(--sand); }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__noimg { display: grid; place-items: center; height: 100%; font-size: 3rem; }
.card__country {
  position: absolute; left: 12px; bottom: 12px; background: rgba(44, 26, 46, .72); color: #fff;
  backdrop-filter: blur(6px); padding: 5px 11px; border-radius: 999px; font-size: .82rem; font-weight: 700;
}
.badge { display: inline-block; padding: 5px 10px; border-radius: 999px; font-weight: 800; font-size: .82rem; }
.badge--hot { background: var(--sunset); color: #fff; }
.card__media .badge { position: absolute; right: 12px; top: 12px; }
.card__body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card__title { font-size: 1.05rem; font-weight: 800; letter-spacing: -.01em; }
.card__meta { display: flex; gap: 10px; color: var(--muted); font-size: .88rem; align-items: center; flex-wrap: wrap; }
.stars { color: #f5a623; letter-spacing: 1px; }
.card__facts { display: flex; gap: 12px; flex-wrap: wrap; font-size: .88rem; color: var(--plum); }
.card__price { margin-top: auto; padding-top: 8px; display: flex; align-items: baseline; gap: 6px; }
.card__price b { font: 700 1.35rem var(--display); }
.card__go {
  margin-left: auto; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: var(--cream); color: var(--coral); font-weight: 800; align-self: center;
}

.empty { text-align: center; padding: 32px 16px; display: grid; gap: 12px; justify-items: center; }
.empty--page { padding: 72px 16px; }
.empty__icon { font-size: 3rem; }

.how .steps { list-style: none; margin: 14px 0 24px; padding: 0; display: grid; gap: 12px; counter-reset: s; }
.steps li { background: #fff; border-radius: var(--radius); padding: 16px 16px 16px 60px; position: relative; box-shadow: var(--shadow); display: grid; gap: 2px; }
.steps li::before {
  counter-increment: s; content: counter(s); position: absolute; left: 16px; top: 16px; width: 30px; height: 30px;
  border-radius: 50%; background: var(--sunset); color: #fff; font: 700 .95rem var(--display); display: grid; place-items: center;
}
.steps span { color: var(--muted); font-size: .92rem; }

/* --- страница тура --- */
.tour-hero { position: relative; min-height: 340px; color: #fff; display: flex; align-items: flex-end; }
.tour-hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tour-hero__img--empty { display: grid; place-items: center; font-size: 5rem; background: var(--sunset); }
.tour-hero__shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(44, 26, 46, .05) 30%, rgba(44, 26, 46, .82) 100%); }
.tour-hero__in { position: relative; padding-top: 70px; padding-bottom: 22px; }
.back {
  position: absolute; top: 14px; left: var(--gutter); width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(255, 255, 255, .92); color: var(--plum);
  text-decoration: none; font-weight: 800; font-size: 1.2rem;
}
.back--inline { position: static; width: auto; height: auto; background: none; display: inline-block; margin: 16px 0 6px; font-size: .95rem; color: var(--muted); }
.tour-hero__place { font-weight: 700; font-size: .92rem; opacity: .95; }
.tour-hero__title { font: 700 clamp(1.6rem, 6.5vw, 2.6rem) / 1.1 var(--display); letter-spacing: -.02em; margin: 6px 0 8px; }
.tour-hero__meta { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; font-weight: 700; }
.rating small { opacity: .75; font-weight: 600; }

.tour-layout { display: grid; gap: 16px; padding-top: 16px; padding-bottom: calc(var(--bar-h) + 28px); }
.panel { background: #fff; border-radius: var(--radius); padding: 18px 16px; box-shadow: var(--shadow); border: 0; margin: 0; min-width: 0; }
.panel + .panel { margin-top: 14px; }
.panel__title { font: 700 1.1rem var(--display); letter-spacing: -.01em; margin-bottom: 12px; padding: 0; }
.panel__head { display: flex; justify-content: space-between; align-items: center; }
.rating--big { font: 700 1.1rem var(--display); }

.price-panel { position: relative; }
.price-panel__row { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-top: 12px; }
.price-panel__total { font-size: 1.1rem; font-weight: 700; }
.price-panel__total b { font: 700 2.2rem var(--display); letter-spacing: -.02em; transition: color .3s; }
.price-panel__changed { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: #fff4e0; color: #8a5a10; font-size: .92rem; }
.flash { animation: flash 1.2s ease; }
@keyframes flash { 0% { color: var(--orange); } 100% { color: inherit; } }

.check {
  display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px; border-radius: 999px;
  font-weight: 700; font-size: .9rem; background: var(--sand); color: var(--plum);
}
.check__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--orange); flex: none; }
.check[data-state="checking"] .check__dot { animation: pulse 1.1s ease-in-out infinite; }
.check[data-state="ok"] { background: #e3f6ee; color: var(--ok); }
.check[data-state="ok"] .check__dot { background: var(--ok); }
.check[data-state="sold"] { background: #fde7e7; color: var(--bad); }
.check[data-state="sold"] .check__dot { background: var(--bad); }
.check[data-state="unknown"] { background: #fff4e0; color: var(--warn); }
.check[data-state="unknown"] .check__dot { background: var(--warn); }
@keyframes pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.7); opacity: .35; } }

.params { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; margin: 0; }
.params div { display: grid; gap: 2px; }
.params dt { font-size: .8rem; color: var(--muted); font-weight: 600; }
.params dd { margin: 0; font-weight: 700; }
.includes { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.includes li { padding: 6px 12px; border-radius: 999px; font-size: .85rem; font-weight: 700; background: #e3f6ee; color: var(--ok); }
.includes li.no { background: #f6efe8; color: var(--muted); text-decoration: line-through; }

.leg { display: grid; gap: 10px; }
.leg + .leg { margin-top: 16px; padding-top: 16px; border-top: 1px dashed var(--line); }
.leg__head { font-weight: 800; font-size: .92rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.seg { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; }
.seg__time { font: 700 1.25rem var(--display); }
.seg__port { font-size: .85rem; color: var(--muted); font-weight: 600; }
.seg__line { position: relative; height: 2px; background: var(--line); margin: 0 4px; }
.seg__line::after { content: "✈"; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -55%); background: #fff; padding: 0 6px; color: var(--orange); font-size: .9rem; }
.seg__end { text-align: right; }
.seg__info { grid-column: 1 / -1; font-size: .85rem; color: var(--muted); }

.prose { white-space: pre-line; }
.amenities { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.amenity { padding: 6px 12px; border-radius: 999px; background: var(--cream); font-size: .85rem; font-weight: 600; }
.is-soon { opacity: .55; }
.reviews { display: grid; gap: 12px; }
.review { display: flex; gap: 12px; align-items: center; }
.review__body { flex: 1; display: grid; gap: 8px; }
.skeleton { background: linear-gradient(90deg, #f3e9dd 25%, #faf3ea 50%, #f3e9dd 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 8px; }
.skeleton--line { height: 12px; }
.skeleton--line.short { width: 60%; }
.skeleton--avatar { width: 40px; height: 40px; border-radius: 50%; flex: none; }
#flights .skeleton { margin-bottom: 10px; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.fineprint { font-size: .8rem; color: var(--muted); margin-top: 14px; }

.bookbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; display: flex; align-items: center;
  justify-content: space-between; gap: 12px; padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .96); backdrop-filter: blur(12px); border-top: 1px solid var(--line);
  box-shadow: 0 -8px 30px rgba(44, 26, 46, .08);
}
.bookbar__price { display: grid; line-height: 1.2; }
.bookbar__price b { font: 700 1.3rem var(--display); }

/* --- бронирование --- */
.page-title { font: 700 1.7rem var(--display); letter-spacing: -.02em; margin: 6px 0 14px; }
.book { padding-bottom: 40px; }
#book-flow, .done { margin-top: 14px; }
.summary { display: flex; gap: 12px; align-items: center; }
.summary__img { width: 76px; height: 76px; border-radius: 14px; object-fit: cover; flex: none; }
.summary__title { font-weight: 800; }
.summary__price { margin-top: 4px; }
.mrz-help__in { display: grid; gap: 14px; }
.mrz-pic { width: 100%; max-width: 380px; height: auto; }
.mrz-pic__zone { fill: rgba(245, 129, 74, .12); stroke: var(--orange); stroke-width: 3; stroke-dasharray: 8 6; animation: dash 1.6s linear infinite; }
.mrz-pic__txt { font: 700 12.5px ui-monospace, "SF Mono", Menlo, monospace; fill: var(--plum); letter-spacing: .5px; }
@keyframes dash { to { stroke-dashoffset: -28; } }
.tips { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: .93rem; }
.tips mark { background: #ffe6cf; padding: 0 3px; border-radius: 4px; }

.tourist { display: grid; gap: 14px; }
.upload { display: block; cursor: pointer; }
.upload__input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.upload__box {
  display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 16px;
  border: 2px dashed #f0b48d; background: #fff8f1; transition: background .2s;
}
.upload:focus-within .upload__box { outline: 3px solid rgba(245, 129, 74, .35); }
.upload__icon { font-size: 1.8rem; }
.upload__text { display: grid; }
.upload__preview { margin-top: 10px; border-radius: 14px; max-height: 220px; width: 100%; object-fit: contain; background: var(--sand); }
.upload.is-done .upload__box { border-style: solid; border-color: var(--ok); background: #effaf5; }

.grid2 { display: grid; grid-template-columns: 1fr; gap: 12px; }
.field { display: grid; gap: 6px; font-size: .88rem; font-weight: 700; color: var(--plum); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line);
  background: #fffdfa; font: 500 16px var(--font); color: var(--ink); appearance: none;
}
.field textarea { min-height: 72px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 0; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(245, 129, 74, .2); }
.field.is-invalid input, .field.is-invalid select { border-color: var(--bad); box-shadow: 0 0 0 3px rgba(214, 69, 69, .12); }
.field__err { color: var(--bad); font-weight: 600; font-size: .8rem; }
.consent { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; font-size: .88rem; color: var(--muted); }
.consent input { width: 22px; height: 22px; accent-color: var(--orange); flex: none; margin-top: 1px; }
.consent.is-invalid span { color: var(--bad); }
.book-submit { margin-top: 16px; display: grid; gap: 10px; }

.modal {
  border: 0; border-radius: 24px; padding: 26px 22px; max-width: 420px; width: calc(100% - 32px);
  box-shadow: 0 30px 80px rgba(44, 26, 46, .3); text-align: center; color: var(--ink);
}
.modal::backdrop { background: rgba(44, 26, 46, .45); backdrop-filter: blur(3px); }
.modal h2 { font: 700 1.25rem var(--display); margin: 6px 0 10px; }
.modal p { color: var(--muted); margin-bottom: 8px; }
.modal__icon { font-size: 2.6rem; }
.modal__actions { display: grid; gap: 10px; margin-top: 16px; }

/* --- подвал, тост --- */
.footer { background: var(--plum); color: #f3e6ee; margin-top: 30px; padding: 30px 0 calc(36px + env(safe-area-inset-bottom)); }
.page-tour .footer { padding-bottom: calc(var(--bar-h) + 30px); }
.footer__in { display: flex; gap: 18px; align-items: center; }
.footer__logo { width: 96px; height: 96px; border-radius: 22px; background: #fff; padding: 6px; }
.footer__title { font: 700 1.1rem var(--display); color: #fff; }
.footer .muted { color: #c9b6c2; }
.footer a { color: var(--sun); }
.footer p + p { margin-top: 6px; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); z-index: 50;
  opacity: 0; visibility: hidden;
  background: var(--plum); color: #fff; padding: 12px 18px; border-radius: 14px; font-weight: 600;
  max-width: calc(100% - 32px); box-shadow: 0 12px 40px rgba(44, 26, 46, .3); transition: transform .3s ease, opacity .3s, visibility .3s;
}
.toast.is-on { transform: translate(-50%, 0); opacity: 1; visibility: visible; }
.page-tour .toast { bottom: calc(var(--bar-h) + 16px); }

/* --- шире телефона --- */
@media (min-width: 600px) {
  :root { --gutter: 24px; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .grid2 { grid-template-columns: 1fr 1fr; }
  .field--wide { grid-column: 1 / -1; }
  .params { grid-template-columns: repeat(4, 1fr); }
  .mrz-help__in { grid-template-columns: minmax(0, 380px) 1fr; align-items: center; }
  .hero { padding: 64px 0 56px; }
  .tour-hero { min-height: 420px; }
}
@media (min-width: 960px) {
  .cards { grid-template-columns: repeat(3, 1fr); }
  .tour-layout { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; padding-bottom: 40px; }
  .bookbar {
    position: sticky; top: 76px; display: grid; gap: 14px; padding: 20px; border-radius: var(--radius);
    border: 0; box-shadow: var(--shadow); background: #fff;
  }
  .page-tour .footer { padding-bottom: 36px; }
  .page-tour .toast { bottom: 24px; }
  .book { max-width: 760px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* --- автозаполнение по фото паспорта --- */
.upload__status { margin-top: -4px; }
.upload__status.is-busy::before {
  content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 8px; vertical-align: -1px;
  border-radius: 50%; border: 2px solid var(--orange); border-right-color: transparent; animation: spin .8s linear infinite;
}
.upload__status.is-ok { color: var(--ok); font-weight: 700; }
.upload__status.is-warn { color: var(--warn); font-weight: 700; }
.field.is-filled input, .field.is-filled select { background: #f2fbf6; border-color: #9fd9bd; }
.field.is-doubt input, .field.is-doubt select { background: #fff7e8; border-color: var(--warn); }
@keyframes spin { to { transform: rotate(360deg); } }

/* --- отправка заявки --- */
.form-error { margin-top: 14px; padding: 12px 14px; border-radius: 14px; background: #fde7e7; color: var(--bad); font-weight: 600; }
.soon-note { margin: 4px 4px 14px; }
.done { text-align: center; display: grid; gap: 10px; justify-items: center; padding: 30px 20px; outline: 0; }
.done__icon { font-size: 3rem; animation: pop .5s ease; }
.done__title { font: 700 1.6rem var(--display); letter-spacing: -.02em; }
.done__code { font-size: 1.05rem; }
.done__code b { font: 700 1.2rem var(--display); letter-spacing: .04em; color: var(--coral); }
.done__price { font-weight: 700; }
.done__actions { display: grid; gap: 10px; width: 100%; max-width: 360px; margin-top: 8px; }
@keyframes pop { 0% { transform: scale(.4); opacity: 0; } 70% { transform: scale(1.15); } 100% { transform: scale(1); opacity: 1; } }
