:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --forest-950: #10271d;
  --forest-900: #173126;
  --forest-800: #234538;
  --forest-100: #e1e9e3;
  --forest-50: #edf2ee;
  --paper: #f7f5ef;
  --surface: #fffefa;
  --ink: #17231c;
  --muted: #69756d;
  --line: #dde3dd;
  --gold: #b68a47;
  --gold-soft: #f0e4ce;
  --shadow: 0 14px 34px rgba(16, 39, 29, .09);
  background: var(--tg-theme-bg-color, var(--paper));
  color: var(--tg-theme-text-color, var(--ink));
}

* { box-sizing: border-box; }

html { min-height: 100%; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(circle at 88% 2%, rgba(182, 138, 71, .14), transparent 28%),
    var(--tg-theme-bg-color, var(--paper));
  color: var(--tg-theme-text-color, var(--ink));
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }

.app-shell {
  width: min(100%, 540px);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding:
    max(14px, env(safe-area-inset-top))
    16px
    calc(112px + env(safe-area-inset-bottom));
}

.app-header {
  display: flex;
  align-items: center;
  min-height: 48px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  background: var(--forest-900);
  color: #faf4e8;
  box-shadow: 0 8px 18px rgba(16, 39, 29, .18);
  font: 700 23px/1 Georgia, serif;
}

.brand-copy strong, .brand-copy small { display: block; }
.brand-copy strong { font-size: 16px; letter-spacing: .01em; }
.brand-copy small { margin-top: 2px; color: var(--muted); font-size: 11px; }

.preview-badge {
  margin-left: auto;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.content { padding-top: 22px; }

.hero {
  position: relative;
  overflow: hidden;
  padding: 25px 23px;
  border-radius: 28px;
  background: var(--forest-900);
  color: #fffaf0;
  box-shadow: 0 20px 48px rgba(16, 39, 29, .18);
}

.hero::after {
  position: absolute;
  right: -45px;
  bottom: -70px;
  width: 180px;
  height: 180px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 50%;
  box-shadow: 0 0 0 28px rgba(255, 255, 255, .035), 0 0 0 58px rgba(255, 255, 255, .025);
  content: "";
}

.eyebrow {
  margin: 0 0 9px;
  color: #d3b476;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 390px;
  margin: 0;
  font: 700 clamp(29px, 8vw, 39px)/1.04 Georgia, "Times New Roman", serif;
  letter-spacing: -.025em;
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 350px;
  margin: 14px 0 0;
  color: #cbd7cf;
  font-size: 14px;
  line-height: 1.5;
}

.primary-action {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  padding: 12px 16px;
  border: 0;
  border-radius: 15px;
  background: #f5ead7;
  color: var(--forest-950);
  font-weight: 750;
}

.section { margin-top: 27px; }

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin: 0 2px 13px;
}

.section-heading h2 { margin: 0; font-size: 20px; letter-spacing: -.02em; }
.section-heading p { margin: 0; color: var(--muted); font-size: 12px; }

.surface-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.surface-card {
  display: flex;
  min-height: 105px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--tg-theme-secondary-bg-color, var(--surface));
  color: inherit;
  text-align: left;
  box-shadow: 0 7px 18px rgba(16, 39, 29, .045);
}

.surface-card:active, .link-card:active, .primary-action:active { transform: scale(.985); }

.surface-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 11px;
  background: var(--forest-50);
  color: var(--forest-800);
  font-size: 17px;
}

.surface-card strong { font-size: 14px; line-height: 1.2; }

.link-list { display: grid; gap: 9px; }

.link-card {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: var(--tg-theme-secondary-bg-color, var(--surface));
  color: inherit;
  text-align: left;
}

.link-icon {
  display: grid;
  flex: 0 0 43px;
  width: 43px;
  height: 43px;
  place-items: center;
  border-radius: 14px;
  background: var(--gold-soft);
  color: #765525;
  font-size: 19px;
}

.link-copy { min-width: 0; }
.link-copy strong, .link-copy small { display: block; }
.link-copy strong { font-size: 14px; }
.link-copy small { margin-top: 3px; overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.chevron { margin-left: auto; color: var(--gold); font-size: 25px; line-height: 1; }

.steps { display: grid; gap: 10px; }

.step {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 13px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--tg-theme-secondary-bg-color, var(--surface));
}

.step-number {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  background: var(--forest-50);
  color: var(--forest-800);
  font-size: 12px;
  font-weight: 800;
}

.step strong, .step small { display: block; }
.step small { margin-top: 3px; color: var(--muted); font-size: 12px; line-height: 1.35; }

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.search-box span { color: var(--muted); font-size: 18px; }
.search-box input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); }
.search-box input::placeholder { color: #929c95; }

.city-list { display: flex; flex-wrap: wrap; gap: 8px; }
.city-chip { padding: 9px 13px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: inherit; font-size: 12px; }

.map-card {
  min-height: 180px;
  padding: 18px;
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(225, 233, 227, .92), rgba(240, 228, 206, .82)),
    var(--forest-50);
}

.map-pin {
  display: grid;
  width: 52px;
  height: 52px;
  margin: 34px auto 16px;
  place-items: center;
  border-radius: 18px 18px 18px 4px;
  transform: rotate(-45deg);
  background: var(--forest-900);
  color: white;
  box-shadow: 0 14px 25px rgba(16, 39, 29, .22);
}

.map-pin span { transform: rotate(45deg); font-size: 20px; }
.map-card p { margin: 0; text-align: center; color: var(--forest-800); font-size: 13px; font-weight: 700; }

.tabbar {
  position: fixed;
  z-index: 20;
  right: 12px;
  bottom: max(12px, env(safe-area-inset-bottom));
  left: 12px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: min(calc(100% - 24px), 516px);
  margin: auto;
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 24px;
  background: rgba(16, 39, 29, .96);
  box-shadow: 0 18px 42px rgba(16, 39, 29, .28);
  backdrop-filter: blur(16px);
}

.tab {
  display: grid;
  min-height: 57px;
  gap: 3px;
  place-items: center;
  padding: 7px 4px;
  border: 0;
  border-radius: 17px;
  background: transparent;
  color: #a9b5ad;
  font-size: 10px;
  font-weight: 650;
}

.tab svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.tab:first-child svg { fill: currentColor; stroke: none; }
.tab.active { background: #f4ecdd; color: var(--forest-950); }

.toast {
  position: fixed;
  z-index: 30;
  right: 20px;
  bottom: calc(92px + env(safe-area-inset-bottom));
  left: 20px;
  width: min(calc(100% - 40px), 480px);
  margin: auto;
  padding: 12px 15px;
  border-radius: 15px;
  transform: translateY(18px);
  background: rgba(16, 39, 29, .94);
  color: white;
  opacity: 0;
  pointer-events: none;
  text-align: center;
  transition: opacity .2s ease, transform .2s ease;
  font-size: 12px;
}

.toast.visible { transform: translateY(0); opacity: 1; }

noscript { display: block; padding: 20px; text-align: center; }

@media (max-width: 360px) {
  .app-shell { padding-right: 13px; padding-left: 13px; }
  .hero { padding: 22px 19px; }
  .surface-card { min-height: 98px; padding: 13px; }
  .preview-badge { display: none; }
}

@media (min-width: 700px) {
  .app-shell { padding-top: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
