:root {
  --bg: #090a0c;
  --panel: #111317;
  --panel-2: #171a20;
  --line: rgba(229, 231, 235, 0.14);
  --text: #f4f6f8;
  --muted: #9aa3af;
  --green: #37d67a;
  --cyan: #38bdf8;
  --violet: #7c3aed;
  --warning: #f5c451;
  --danger: #f87171;
  --max: 1180px;
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
}

a {
  color: inherit;
  text-decoration: none;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(9, 10, 12, 0.9);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 760;
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 8px;
}

.nav {
  display: flex;
  justify-content: center;
  gap: 18px;
  color: var(--muted);
  font-size: 14px;
}

.nav a:hover,
.app-link:hover,
.secondary-action:hover {
  color: var(--text);
}

.app-link,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
}

main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 24px 20px 48px;
}

.booking-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 460px);
  gap: 24px;
  align-items: start;
  min-height: calc(100vh - 86px);
  padding-top: 18px;
}

.booking-copy {
  padding: 14px 0 0;
}

.eyebrow,
.section-label {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  color: var(--green);
  font-size: 12px;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 720px;
  margin-bottom: 14px;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 0.96;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 12px;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.08;
  letter-spacing: 0;
}

p {
  max-width: 660px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.62;
}

.market-panel {
  width: min(100%, 680px);
  margin-top: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #171a20, #0d0f13);
  overflow: hidden;
}

.market-head {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.market-head span,
.market-grid small,
.field label,
.form-status,
.footer {
  color: var(--muted);
}

.market-head em {
  color: var(--green);
  font-style: normal;
  font-weight: 700;
}

.chart-bars {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  align-items: end;
  gap: 10px;
  height: 210px;
  padding: 24px 16px 10px;
}

.chart-bars span {
  min-height: 34px;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, var(--green), rgba(56, 189, 248, 0.22));
  box-shadow: 0 0 22px rgba(55, 214, 122, 0.14);
}

.market-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
}

.market-grid div {
  display: grid;
  gap: 6px;
  padding: 16px;
  border-right: 1px solid var(--line);
}

.market-grid div:last-child {
  border-right: 0;
}

.checkout,
.result-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
}

.checkout-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.checkout-head h2 {
  margin-bottom: 0;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
}

.status-pill.ready {
  color: var(--green);
  border-color: rgba(55, 214, 122, 0.35);
}

.status-pill.error {
  color: var(--warning);
  border-color: rgba(245, 196, 81, 0.38);
}

.field {
  display: grid;
  gap: 7px;
  margin-bottom: 13px;
}

.split-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

input,
select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #0d0f13;
  color: var(--text);
  padding: 0 12px;
  font: inherit;
  outline: none;
}

input:focus,
select:focus {
  border-color: rgba(56, 189, 248, 0.72);
}

.selected-product {
  min-height: 72px;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-2);
}

.selected-product strong {
  display: block;
  margin-bottom: 6px;
}

.selected-product span {
  color: var(--muted);
  font-size: 14px;
}

.payment-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.payment-options label,
.checkline {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #0d0f13;
  color: var(--muted);
  font-size: 14px;
}

.payment-options input,
.checkline input {
  width: 16px;
  min-height: 16px;
  accent-color: var(--green);
}

.checkline {
  margin-bottom: 14px;
}

.primary-action {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--green), var(--cyan));
  color: #051006;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.primary-action:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.form-status {
  min-height: 24px;
  margin-top: 10px;
  font-size: 14px;
}

.form-status.error {
  color: var(--danger);
}

.result-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 460px) auto;
  gap: 18px;
  align-items: center;
  margin: 12px 0 28px;
  background: linear-gradient(135deg, rgba(55, 214, 122, 0.1), rgba(56, 189, 248, 0.08));
}

.result-panel[hidden] {
  display: none;
}

.instructions {
  display: grid;
  gap: 8px;
}

.instructions div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(9, 10, 12, 0.42);
}

.band,
.info-grid,
.support-band {
  padding: 38px 0;
  border-top: 1px solid var(--line);
}

.band-head,
.support-band {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.product-card {
  min-height: 158px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  cursor: pointer;
}

.product-card:hover,
.product-card.active {
  border-color: rgba(55, 214, 122, 0.55);
}

.product-card strong,
.product-card span {
  display: block;
}

.product-card .price {
  margin-top: 16px;
  font-size: 24px;
  font-weight: 820;
}

.product-card small {
  color: var(--muted);
}

.info-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
  gap: 28px;
}

.rule-list {
  display: grid;
  gap: 10px;
}

.rule-list div {
  display: grid;
  gap: 5px;
  min-height: 78px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.rule-list span {
  color: var(--muted);
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 22px 20px 34px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

@media (max-width: 980px) {
  .booking-shell,
  .info-grid,
  .result-panel {
    grid-template-columns: 1fr;
  }

  .catalog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 680px) {
  .topbar {
    grid-template-columns: 1fr auto;
  }

  .nav {
    display: none;
  }

  main {
    padding-inline: 14px;
  }

  .booking-shell {
    min-height: auto;
  }

  .market-head,
  .split-fields,
  .payment-options,
  .market-grid,
  .catalog-grid {
    grid-template-columns: 1fr;
  }

  .chart-bars {
    height: 150px;
    gap: 7px;
  }

  .band-head,
  .support-band,
  .footer {
    align-items: flex-start;
    flex-direction: column;
  }
}
