:root {
  --bg: #eef2f7;
  --card: #ffffff;
  --line: #dbe3ec;
  --field: #f5f8fb;
  --ink: #1b2a6b;        /* navy headings */
  --text: #2c3a47;
  --muted: #6b7c8c;
  --accent: #2f6bff;
  --accent2: #18b6c9;
  --warn: #c77700;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: linear-gradient(160deg, #f3f7fc 0%, #e9eff6 100%);
  color: var(--text);
  min-height: 100vh;
  padding: 48px 24px;
}

/* Hero layout */
.hero {
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.hero-right { display: flex; justify-content: center; }
.artWrap { position: relative; width: 100%; max-width: 480px; }
.art { width: 100%; height: auto; display: block; }
.priceBadge {
  position: absolute; bottom: 6%; right: 6%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 92px; height: 100px; color: #fff; text-align: center;
  background: linear-gradient(150deg, var(--accent2), var(--accent));
  clip-path: polygon(50% 0, 100% 18%, 100% 62%, 50% 100%, 0 62%, 0 18%);
  box-shadow: 0 12px 26px -12px rgba(47, 107, 255, 0.7);
}
.priceBadge span { font-size: 0.78rem; opacity: 0.9; }
.priceBadge strong { font-size: 1.5rem; line-height: 1; }

.badge {
  display: inline-block;
  background: rgba(47, 107, 255, 0.1);
  color: var(--accent);
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.04em;
  padding: 4px 10px; border-radius: 999px; margin-bottom: 18px;
}
h1 {
  font-size: clamp(2rem, 4vw, 3rem); line-height: 1.1; margin: 0 0 14px;
  font-weight: 800;
  background: linear-gradient(100deg, var(--ink), var(--accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.sub { color: var(--muted); margin: 0 0 26px; font-size: 1.02rem; max-width: 34ch; }

/* Card */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 26px;
  box-shadow: 0 18px 40px -24px rgba(27, 42, 107, 0.35);
}
label { display: block; font-size: 0.85rem; color: var(--muted); margin: 14px 0 6px; font-weight: 500; }
.card > label:first-child { margin-top: 0; }
select, input {
  width: 100%;
  padding: 12px 14px;
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  font-size: 1rem;
}
select:focus, input:focus { outline: none; border-color: var(--accent); background: #fff; }
.hint { color: var(--warn); font-size: 0.78rem; margin: 6px 0 0; min-height: 0; }
.hidden { display: none; }

/* Route */
.route > div { display: grid; grid-template-columns: 24px 1fr 1fr; gap: 8px; align-items: center; margin-bottom: 8px; }
.route .leg { color: var(--muted); font-size: 0.85rem; }
.route select, .route input { margin: 0; }
.cityField { position: relative; }
.cityField input { width: 100%; padding-right: 30px; }
.clearCity {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  border: none; background: transparent; color: var(--muted);
  font-size: 1.25rem; line-height: 1; cursor: pointer; padding: 2px 6px; width: auto;
}
.clearCity:hover { color: var(--accent); }

/* Results */
#result:empty { display: none; }
#result { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.muted { color: var(--muted); }
.resultLead { color: var(--muted); font-size: 0.86rem; margin: 0 0 10px; }
.variants { display: flex; flex-direction: column; gap: 10px; }
.variant {
  width: 100%; text-align: left; cursor: pointer;
  background: var(--field); border: 1.5px solid var(--line); border-radius: 12px;
  padding: 14px 16px; color: var(--text); transition: border-color .12s, box-shadow .12s;
}
.variant:hover { border-color: var(--accent); }
.variant.sel { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(47,107,255,0.15); background: #fff; }
.vrow { display: flex; justify-content: space-between; align-items: center; }
.vrow + .vrow { margin-top: 4px; }
.vrow span { color: var(--muted); font-size: 0.85rem; }
.vrow strong { font-size: 1.1rem; color: var(--ink); }
.demo-note { color: var(--warn); font-size: 0.78rem; margin: 12px 0 0; }

/* Manual block */
.manual { border: 1.5px solid #f0c878; border-radius: 12px; padding: 16px; background: #fff8ec; }
.manual strong { color: var(--warn); }
.manual p { margin: 8px 0 0; font-size: 0.9rem; }
.manual a { color: var(--accent); }

/* Confirm pill */
button#confirm {
  width: 100%; margin-top: 18px; padding: 14px; border: none; border-radius: 999px;
  background: linear-gradient(100deg, var(--accent2), var(--accent));
  color: #fff; font-size: 1.02rem; font-weight: 600; cursor: pointer;
  box-shadow: 0 10px 24px -10px rgba(47, 107, 255, 0.6);
}
button#confirm:disabled { background: #cdd7e2; color: #fff; cursor: not-allowed; box-shadow: none; }

.finePrint { color: var(--muted); font-size: 0.74rem; margin: 14px 2px 0; }

/* Confirmation screen */
.payload {
  background: var(--field); border: 1px solid var(--line); border-radius: 10px;
  padding: 14px; overflow-x: auto; font-size: 0.8rem; color: var(--text);
}

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; gap: 24px; }
  .hero-right { order: -1; }
  .art { max-width: 320px; }
}
