:root {
  font-family: Inter, Manrope, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #181c23;
  background: #cae7f9;
  color-scheme: light;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-width: 0; min-height: 100%; background: #cae7f9; }
button, select, input { font: inherit; }
button, select { touch-action: manipulation; }

.shell {
  width: 100%;
  max-width: 650px;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0 auto;
  padding: max(20px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left));
  background: linear-gradient(160deg, #e5f5ff, #e3f5fb 70%, #f0f8ff);
  overflow-x: clip;
  scroll-padding-bottom: 190px;
}

header { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; font-size: clamp(17px, 5vw, 22px); font-weight: 900; line-height: 1; white-space: nowrap; }
.brand small { display: block; margin-top: 3px; font-size: 10px; color: #ef6a42; }
.logo { flex: 0 0 46px; width: 46px; height: 46px; display: grid; place-items: center; background: linear-gradient(135deg, #ff965b, #fc592b); color: #fff; border-radius: 14px; font-size: 31px; box-shadow: 0 6px 12px #e75a2c35; }
.languages { flex: 0 0 auto; display: flex; padding: 3px; background: #fff; border-radius: 24px; }
.languages button { min-width: 48px; min-height: 42px; padding: 8px 12px; border: 0; border-radius: 21px; background: none; color: #777; font-weight: 800; cursor: pointer; }
.languages .active { background: #ff733f; color: #fff; }

.intro { margin: clamp(26px, 7vw, 33px) 0 24px; }
.eyebrow { color: #c95529; font-size: 11px; font-weight: 900; letter-spacing: .12em; }
.intro h1 { max-width: 12ch; margin: 10px 0 12px; font-size: clamp(34px, 9vw, 56px); line-height: 1.08; letter-spacing: -.05em; overflow-wrap: break-word; }
.intro em { font-style: normal; color: #ff713d; }
.intro p { margin: 0; color: #68737c; line-height: 1.55; }
.chips { display: flex; gap: 8px; margin-top: 20px; padding-bottom: 3px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips span { flex: 0 0 auto; padding: 9px 12px; border-radius: 30px; background: #fff; color: #b95332; font-size: 12px; font-weight: 750; white-space: nowrap; }

.card { width: 100%; min-width: 0; margin-bottom: 16px; padding: clamp(18px, 5vw, 24px) clamp(15px, 5vw, 21px); border-radius: 24px; background: #fff; box-shadow: 0 10px 26px #415c7521; }
.product-field { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px; margin-bottom: 22px; }
.product-field label { color: #71767c; font-size: 13px; font-weight: 700; }
.product-field select { width: 100%; min-width: 0; min-height: 44px; padding: 8px 34px 8px 12px; border: 1px solid #ffd4c5; border-radius: 13px; background-color: #fff7f3; color: #9e3f24; font-size: 14px; font-weight: 800; }
.sub { color: #71767c; font-size: 14px; font-weight: 650; }
.amount { min-width: 0; margin: 16px 0 12px; font-size: clamp(26px, 8.3vw, 48px); font-weight: 900; line-height: 1.08; letter-spacing: -.05em; white-space: nowrap; }
.amount output { display: block; max-width: 100%; }

input[type="range"] { -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 8px; margin: 18px 0; border: 0; border-radius: 999px; outline: none; background: linear-gradient(to right, #ff713d 0%, #ff713d var(--progress, 50%), #ffd6c7 var(--progress, 50%), #ffd6c7 100%); cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 8px; border-radius: 999px; background: transparent; }
input[type="range"]::-moz-range-track { height: 8px; border-radius: 999px; background: transparent; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 28px; height: 28px; margin-top: -10px; border: 5px solid #ff713d; border-radius: 50%; background: #fff; box-shadow: 0 2px 8px #e95b3a55; }
input[type="range"]::-moz-range-thumb { width: 18px; height: 18px; border: 5px solid #ff713d; border-radius: 50%; background: #fff; box-shadow: 0 2px 8px #e95b3a55; }
input[type="range"]:focus-visible { outline: 3px solid #ff713d44; outline-offset: 6px; }
input[type="range"]:disabled { opacity: .5; }

.limits { display: flex; justify-content: space-between; gap: 12px; margin: 7px 0 16px; color: #90969d; font-size: 12px; }
.limits span { min-width: 0; }
.limits span:last-child { text-align: right; }
.presets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.presets button { min-width: 0; min-height: 44px; padding: 8px 2px; border: 0; border-radius: 14px; background: #fff1ea; color: #b44a2b; font-size: clamp(9px, 2.8vw, 13px); font-weight: 800; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.presets .chosen { background: #ff713d; color: #fff; }
.separator { height: 1px; margin: 23px 0; background: #f0f1f3; }
.term { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; color: #70757e; font-size: 14px; }
.term span { min-width: 0; }
.term strong { flex: 0 0 auto; color: #f46a3b; font-size: 17px; }

.info h3 { margin: 0 0 13px; font-size: 17px; }
.info p { margin: 0 0 12px; color: #676e76; font-size: 12px; line-height: 1.65; overflow-wrap: anywhere; }
.info p:last-child { margin-bottom: 0; }
a { color: #c94b25; font-size: 13px; font-weight: 800; text-decoration: none; }
.bottom-space { height: calc(178px + env(safe-area-inset-bottom)); }

footer { position: fixed; z-index: 5; right: 0; bottom: 0; left: 0; width: 100%; max-width: 650px; margin: 0 auto; padding: 16px max(16px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); background: linear-gradient(0deg, #e9f7ff 88%, transparent); }
footer button { width: 100%; min-height: 56px; padding: 11px 14px; border: 0; border-radius: 18px; background: linear-gradient(100deg, #ff9061, #ef5223); box-shadow: 0 8px 20px #e95b3566; color: #fff; font-size: clamp(14px, 4vw, 16px); font-weight: 850; line-height: 1.25; cursor: pointer; }
footer button:disabled { opacity: .65; cursor: not-allowed; }
footer p { margin: 8px 0 0; color: #6f7780; font-size: 11px; line-height: 1.3; text-align: center; }
#error { color: #bd3522; font-weight: 600; }

@media (max-width: 355px) {
  .shell { padding-right: max(12px, env(safe-area-inset-right)); padding-left: max(12px, env(safe-area-inset-left)); }
  .logo { flex-basis: 42px; width: 42px; height: 42px; font-size: 28px; }
  .languages button { min-width: 43px; padding-right: 9px; padding-left: 9px; }
  .intro h1 { font-size: 33px; }
  .product-field { grid-template-columns: 1fr; gap: 7px; }
  .amount { font-size: clamp(25px, 8.1vw, 29px); }
  footer { padding-right: max(12px, env(safe-area-inset-right)); padding-left: max(12px, env(safe-area-inset-left)); }
}

@media (min-width: 651px) { .shell, footer { border-right: 1px solid #b8d9ec; border-left: 1px solid #b8d9ec; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }
