:root {
  --bg: #eef3f9; --text: #0b1220; --text-2: #3b4757; --text-3: #5f6b7a;
  --accent: #0060e0; --line: rgba(15, 30, 55, 0.1);
  --glass: rgba(255, 255, 255, 0.6); --edge: rgba(255, 255, 255, 0.9);
  --shadow: 0 1px 1px rgba(16, 32, 64, 0.04), 0 10px 30px rgba(16, 32, 64, 0.08);
  color-scheme: light;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--text);
  font: 400 16px/1.45 -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, sans-serif; }
main { max-width: 560px; margin: 0 auto; padding: 16px 14px 40px; display: grid; gap: 12px; }
h1 { font-size: 24px; letter-spacing: -0.02em; margin: 0; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }

.sky { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.sky span { position: absolute; border-radius: 50%; }
.sky .a { width: 90vmax; height: 90vmax; left: -35vmax; top: -40vmax; background: radial-gradient(closest-side, #a6cdff, rgba(166, 205, 255, 0)); }
.sky .b { width: 80vmax; height: 80vmax; right: -40vmax; top: 20vmax; background: radial-gradient(closest-side, #d4caff, rgba(212, 202, 255, 0)); }
.sky .c { width: 70vmax; height: 70vmax; left: -10vmax; bottom: -40vmax; background: radial-gradient(closest-side, #bfeee2, rgba(191, 238, 226, 0)); }

.glass { background: var(--glass); border: 1px solid var(--edge); border-radius: 22px; box-shadow: var(--shadow), inset 0 1px 0 #fff;
  -webkit-backdrop-filter: blur(22px) saturate(180%); backdrop-filter: blur(22px) saturate(180%); }
.card { padding: 16px; display: grid; gap: 10px; position: relative; }
/* backdrop-filter makes each card a stacking context: lift the one with an open dropdown. */
.card:focus-within { z-index: 10; }
.top { display: flex; gap: 12px; align-items: center; padding: 4px 2px 6px; }
.mark { width: 34px; height: 34px; flex: none; border-radius: 11px; background: var(--accent); box-shadow: inset 0 -12px 0 rgba(255, 255, 255, 0.35); }
.muted { color: var(--text-3); font-size: 14px; }
.fine { color: var(--text-3); font-size: 12px; }
.center { text-align: center; }
.lbl { font-size: 13px; font-weight: 600; color: var(--text-2); margin-top: 4px; }

.seg { display: grid; grid-template-columns: repeat(3, 1fr); background: rgba(15, 30, 55, 0.06); border-radius: 12px; padding: 3px; }
.seg button { border: 0; background: none; min-height: 36px; border-radius: 10px; font-size: 14px; font-weight: 500; }
.seg button.on { background: #fff; box-shadow: 0 1px 3px rgba(16, 32, 64, 0.12); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button { min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--edge); background: rgba(255, 255, 255, 0.7); font-size: 14px; }
.chips button.on { background: var(--accent); border-color: var(--accent); color: #fff; }

input, select, textarea { width: 100%; min-height: 46px; padding: 11px 14px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.85); outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0, 96, 224, 0.15); }
textarea { resize: vertical; }
.row { display: grid; grid-template-columns: 1.3fr 1fr; gap: 8px; }
.row .lbl { display: block; margin-bottom: 6px; }
.pax-row { display: flex; align-items: center; justify-content: space-between; }

.leg { display: grid; gap: 8px; padding-top: 6px; }
.leg + .leg { border-top: 1px solid var(--line); padding-top: 12px; }
.leg-title { font-size: 13px; font-weight: 600; color: var(--text-3); }
.ac { position: relative; }
.ac input.ok { border-color: rgba(47, 160, 90, 0.6); }
.sugg { position: absolute; z-index: 5; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 4px; list-style: none;
  background: rgba(255, 255, 255, 0.97); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); max-height: 280px; overflow: auto; }
.sugg li { padding: 9px 10px; border-radius: 10px; cursor: pointer; display: flex; justify-content: space-between; gap: 10px; }
.sugg li:hover, .sugg li.on { background: rgba(0, 96, 224, 0.08); }
.sugg .code { font-weight: 600; color: var(--accent); white-space: nowrap; }
.sugg .sub { color: var(--text-3); font-size: 13px; }

.stepper { display: flex; align-items: center; gap: 14px; }
.stepper button { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--edge); background: #fff; font-size: 22px; box-shadow: var(--shadow); }
.stepper output { min-width: 28px; text-align: center; font-size: 20px; font-weight: 600; }

.link { border: 0; background: none; color: var(--accent); padding: 6px 0; text-align: left; font-weight: 500; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--text-2); margin-top: 4px; }
.check input { width: 20px; min-height: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--accent); }

.estimate .big { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; }
.banner { padding: 12px 16px; font-size: 14px; }

.btn-primary { min-height: 52px; border: 0; border-radius: 999px; background: var(--accent); color: #fff; font-weight: 600; font-size: 16px;
  box-shadow: 0 8px 24px rgba(0, 96, 224, 0.28); }
.btn-primary:disabled { opacity: 0.5; }
.tg #submit { display: none; } /* inside Telegram the native MainButton is used */

.done { padding: 32px 20px; gap: 14px; justify-items: center; }
.big-mark { width: 56px; height: 56px; border-radius: 18px; }
