:root {
  --ink: #1c1917;
  --ink-soft: #57534e;
  --line: #e7e5e4;
  --paper: #ffffff;
  --sand: #faf7f2;
  --sea: #0f766e;
  --sea-deep: #115e59;
  --coral: #ea580c;
  --coral-hot: #c2410c;
  --ok: #15803d;
  --warn: #a16207;
  --bad: #b91c1c;
  --shadow: 0 18px 50px -28px rgba(28, 25, 23, 0.45);
  --radius: 22px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
body {
  font-family: Manrope, system-ui, sans-serif;
  color: var(--ink);
  background: var(--sand);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: Fraunces, Georgia, serif; margin: 0; font-weight: 700; letter-spacing: -0.02em; }
p { margin: 0; }
a { color: inherit; }
button, input, select { font: inherit; }

.shell {
  width: min(1480px, calc(100% - 40px));
  margin-inline: auto;
}
@media (max-width: 767px) {
  .shell { width: calc(100% - 24px); }
}

.top {
  position: sticky; top: 0; z-index: 40;
  background: rgba(250, 247, 242, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.top-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 14px 0;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--ink);
}
.brand-mark {
  width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center;
  background: linear-gradient(145deg, #14b8a6, #0f766e);
  font-size: 20px;
}
.brand-name {
  font-weight: 800; font-size: 1.15rem; letter-spacing: -0.03em;
}
.brand-name span { color: var(--coral); }
.top-nav { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.linkish {
  background: none; border: none; cursor: pointer; color: var(--ink-soft);
  font-weight: 600; font-size: 14px; padding: 0;
}
.linkish:hover { color: var(--ink); }
.linkish b {
  display: inline-grid; place-items: center; min-width: 1.4em;
  margin-left: 4px; padding: 0 6px; border-radius: 999px;
  background: var(--coral); color: #fff; font-size: 12px;
}

.hero {
  background:
    radial-gradient(900px 420px at 15% -10%, rgba(20, 184, 166, 0.28), transparent 60%),
    radial-gradient(700px 380px at 90% 0%, rgba(234, 88, 12, 0.18), transparent 55%),
    linear-gradient(165deg, #ecfdf8 0%, #f8fafc 45%, #fff7ed 100%);
  padding: 36px 0 28px;
  border-bottom: 1px solid var(--line);
}
.hero-inner { display: grid; gap: 18px; }
.hero h1 {
  font-size: clamp(1.8rem, 4.2vw, 3rem);
  line-height: 1.08;
  max-width: 16ch;
  animation: rise 0.7s ease both;
}
.hero-sub {
  color: var(--ink-soft); max-width: 54ch; line-height: 1.5;
  font-size: 1.05rem; animation: rise 0.7s ease 0.08s both;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.search-bar {
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.7fr 0.7fr 1fr auto;
  gap: 0;
  background: var(--paper);
  border-radius: 999px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  overflow: hidden;
  animation: rise 0.7s ease 0.14s both;
}
@media (max-width: 980px) {
  .search-bar {
    grid-template-columns: 1fr 1fr;
    border-radius: 24px;
  }
  .btn-find { grid-column: 1 / -1; border-radius: 0 0 24px 24px !important; }
}
.seg {
  display: flex; flex-direction: column; gap: 4px;
  padding: 12px 16px; border-right: 1px solid var(--line);
  min-width: 0;
}
@media (max-width: 980px) {
  .seg:nth-child(2n) { border-right: none; }
  .seg { border-bottom: 1px solid var(--line); }
}
.seg span {
  font-size: 11px; font-weight: 700; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--ink-soft);
}
.seg input, .seg select {
  border: none; outline: none; background: transparent;
  font-weight: 700; font-size: 15px; color: var(--ink);
  width: 100%; min-width: 0;
}
.btn-find {
  border: none; cursor: pointer;
  background: linear-gradient(135deg, var(--coral), var(--coral-hot));
  color: #fff; font-weight: 800; font-size: 16px;
  padding: 0 28px; min-height: 64px;
  transition: filter 0.15s ease, transform 0.15s ease;
}
.btn-find:hover { filter: brightness(1.05); transform: translateY(-1px); }

.partners {
  display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center;
  color: var(--ink-soft); font-size: 13px; font-weight: 600;
}
.partners b {
  background: rgba(255,255,255,0.7); border: 1px solid var(--line);
  border-radius: 999px; padding: 5px 10px; font-size: 12px; color: var(--ink);
}

.main { padding: 28px 0 56px; }
.results-head {
  display: flex; justify-content: space-between; align-items: end;
  gap: 12px; flex-wrap: wrap; margin-bottom: 16px;
}
.results-head h2 { font-size: clamp(1.35rem, 2vw, 1.75rem); }
.meta { color: var(--ink-soft); font-size: 14px; line-height: 1.45; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 14px;
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  display: flex; flex-direction: column; gap: 10px;
  box-shadow: 0 10px 30px -24px rgba(28,25,23,0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px -24px rgba(28,25,23,0.4);
}
.card.fav { outline: 2px solid rgba(234, 88, 12, 0.35); }
.card-top { display: flex; justify-content: space-between; gap: 10px; }
.region {
  font-size: 11px; font-weight: 800; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--ink-soft); margin-bottom: 4px;
}
.price { font-weight: 800; font-size: 1.25rem; color: var(--sea-deep); white-space: nowrap; }
.price-block { text-align: right; }
.badge-row { display: flex; flex-wrap: wrap; gap: 6px; }
.badge {
  display: inline-flex; align-items: center;
  border-radius: 999px; padding: 4px 10px;
  font-size: 12px; font-weight: 700;
}
.badge-ok { background: #dcfce7; color: var(--ok); }
.badge-warn { background: #fef3c7; color: var(--warn); }
.badge-bad { background: #fee2e2; color: var(--bad); }
.badge-muted { background: #f5f5f4; color: var(--ink-soft); }
.season-hint {
  background: #f0fdfa; border-radius: 12px; padding: 8px 10px; font-size: 13.5px;
}
.cost-break {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px;
  background: var(--sand); border-radius: 14px; padding: 10px;
}
.cost-break span { display: block; font-size: 11px; color: var(--ink-soft); font-weight: 700; }
.cost-break strong { font-size: 13px; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; padding: 9px 14px; font-weight: 700; font-size: 13.5px;
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  background: #fff; color: var(--ink);
}
.btn-primary {
  background: linear-gradient(135deg, var(--coral), var(--coral-hot));
  color: #fff;
}
.btn-ghost { border-color: var(--line); background: #fff; }
.btn-sea {
  background: linear-gradient(135deg, var(--sea), var(--sea-deep));
  color: #fff;
}
.btn-danger { background: transparent; color: var(--bad); border: none; }
.btn-small { padding: 8px 12px; font-size: 13px; }

.empty, .loading {
  padding: 28px; text-align: center; color: var(--ink-soft);
  border: 1px dashed var(--line); border-radius: 16px; background: #fff;
}
.loading::after {
  content: '';
  display: inline-block; width: 1.1em; height: 1.1em; margin-left: 8px;
  border: 2px solid var(--line); border-top-color: var(--coral);
  border-radius: 50%; vertical-align: -0.15em;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.tour-list { display: grid; gap: 10px; }
.tour-item {
  display: grid; grid-template-columns: 1fr auto; gap: 12px;
  padding: 14px; border-radius: 16px; border: 1px solid var(--line);
  background: #fff;
}
.tour-item h3 { font-size: 1.05rem; line-height: 1.25; }
.tour-price { font-weight: 800; font-size: 1.2rem; color: var(--coral-hot); text-align: right; }
.tour-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; grid-column: 1 / -1; }

.drawer-backdrop {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(28, 25, 23, 0.4);
}
.drawer {
  position: fixed; top: 0; right: 0; z-index: 60;
  width: min(560px, 100%); height: 100%;
  background: var(--sand); border-left: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 20px; overflow: auto;
  animation: slide 0.25s ease;
}
@keyframes slide {
  from { transform: translateX(24px); opacity: 0.6; }
  to { transform: none; opacity: 1; }
}
.drawer-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.drawer-kicker {
  font-size: 11px; font-weight: 800; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--coral);
}
.btn-close {
  width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line);
  background: #fff; font-size: 22px; cursor: pointer; line-height: 1;
}
.drawer-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.drawer-links { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.drawer-body { padding-bottom: 40px; }

.foot {
  padding: 0 0 40px; color: var(--ink-soft); font-size: 13.5px; line-height: 1.5;
}
