*,
*::before,
*::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body { max-width: 100%; overflow-x: hidden; }

body {
  font-family: Manrope, system-ui, sans-serif;
  background: #F2F2F0;
  color: #1A1D21;
  min-height: 100dvh;
  line-height: 1.5;
}

a { color: #0D7A74; text-decoration: none; }
button, input { font: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid #0D7A74; outline-offset: 2px; }

.top {
  background: #0D7A74;
  color: #fff;
}

.bar, main, footer {
  width: min(430px, 100%);
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
}

.bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: calc(16px + env(safe-area-inset-top));
  padding-bottom: 16px;
}

.bar span {
  font-size: 11px;
  font-weight: 800;
  border: 1px solid rgba(255, 255, 255, 0.5);
  padding: 4px 8px;
  border-radius: 8px;
}

h1 {
  margin: 20px 0 6px;
  font-size: 1.75rem;
  letter-spacing: -0.03em;
}

.lead, .note, footer { color: #667078; font-size: 0.92rem; }

.stage { margin: 16px 0 24px; }

.box {
  margin-bottom: 12px;
  padding: 16px;
  background: #fff;
  border-radius: 14px;
  border: 1px solid #E2E4E0;
}

.lbl {
  font-size: 12px;
  font-weight: 800;
  color: #0D7A74;
}

.num {
  margin: 4px 0 12px;
  font-size: clamp(1.5rem, 7vw, 1.9rem);
  font-weight: 800;
  white-space: nowrap;
}

.num.sm { font-size: 1.25rem; }

.row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 8px;
}

.chip {
  min-height: 42px;
  border: 1px solid #E2E4E0;
  background: #F2F2F0;
  border-radius: 10px;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
}

.chip.is-on {
  background: #0D7A74;
  border-color: #0D7A74;
  color: #fff;
}

.chip:disabled { opacity: 0.45; }

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 28px;
  background: transparent;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 99px;
  background: linear-gradient(90deg, #0D7A74 var(--progress, 16%), #E2E4E0 var(--progress, 16%));
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  margin-top: -7px;
  border-radius: 50%;
  background: #1A1D21;
  border: 3px solid #fff;
}

input[type="range"]::-moz-range-track {
  height: 6px;
  background: #E2E4E0;
  border-radius: 99px;
}

input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border: 3px solid #fff;
  background: #1A1D21;
  border-radius: 50%;
}

.ends {
  display: flex;
  justify-content: space-between;
  font-size: 0.74rem;
  color: #667078;
}

.note { margin: 8px 0 14px; }

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  border: 0;
  border-radius: 12px;
  background: #0D7A74;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.btn.ghost {
  margin-top: 8px;
  background: #fff;
  border: 1px solid #E2E4E0;
  color: #1A1D21;
}

.btn:disabled { opacity: 0.5; }

.wait { text-align: center; padding: 32px 0; font-weight: 800; }

.out { text-align: center; padding: 8px 0; }

.k {
  font-size: 12px;
  font-weight: 800;
  color: #0D7A74;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.code {
  margin: 10px 0 12px;
  padding: 12px;
  background: #fff;
  border: 1px solid #E2E4E0;
  border-radius: 14px;
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  padding-left: calc(12px + 0.16em);
}

.faq-item {
  margin-bottom: 8px;
  background: #fff;
  border: 1px solid #E2E4E0;
  border-radius: 12px;
}

.faq-q {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 0;
  background: transparent;
  text-align: left;
  font-weight: 700;
  cursor: pointer;
}

.faq-a { display: none; padding: 0 14px 12px; color: #667078; font-size: 0.9rem; }
.faq-item.is-open .faq-a { display: block; }

footer {
  padding: 24px 16px calc(32px + env(safe-area-inset-bottom));
  text-align: center;
}

footer nav {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 10px;
}

.legal { padding-top: 18px; }
.legal h1 { font-size: 1.5rem; }
.paper {
  margin: 16px 0 32px;
  padding: 18px 16px;
  background: #fff;
  border: 1px solid #E2E4E0;
  border-radius: 14px;
}
.paper h2 { margin: 18px 0 8px; font-size: 1rem; color: #0D7A74; }
.paper p, .paper li { color: #667078; }
.paper ul { padding-left: 18px; margin-top: 8px; }
.back { display: inline-block; margin-bottom: 10px; }

body > header.bar {
  background: transparent;
  color: #1A1D21;
}

body > header.bar span {
  border-color: #E2E4E0;
  color: #0D7A74;
}
