/* Base reset + dark theme, responsive 320px → 4K */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  height: 100%;
  background: #0F1115;
  color: #E7ECF2;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
body {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 3vw, 48px);
}

.card {
  width: 100%;
  max-width: clamp(320px, 60vw, 720px);
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 3vh, 48px);
}

.row {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(180px, 1.4fr);
  align-items: center;
  gap: clamp(16px, 3vw, 36px);
}

.lbl {
  font-size: clamp(20px, 3.2vw, 44px);
  font-weight: 700;
  color: #C8D1DC;
  letter-spacing: 0.02em;
  text-align: right;
}

.cell {
  width: 100%;
  background: #1A1E25;
  color: #FFFFFF;
  border: 2px solid #2C323C;
  border-radius: 14px;
  padding: clamp(10px, 1.6vh, 22px) clamp(12px, 2vw, 24px);
  font-size: clamp(28px, 5.5vw, 72px);
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.08em;
  outline: none;
  transition: border-color .12s ease, background-color .12s ease;
  caret-color: #4DA3FF;
  font-variant-numeric: tabular-nums;
}
.cell:focus { border-color: #4DA3FF; background: #20262F; }
.cell::placeholder { color: #5A6573; }

.status {
  min-height: 1.4em;
  text-align: center;
  font-size: clamp(13px, 1.4vw, 18px);
  color: #8B95A2;
}
.status.error { color: #FF6B6B; }
.status.ok    { color: #5BD27D; }

/* Mobile portrait: stack label above input for breathing room */
@media (max-width: 520px) {
  .row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .lbl { text-align: left; }
}

/* Confirmation page */
.done {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.done .tick {
  width: 96px; height: 96px;
  border-radius: 50%;
  background: #1F2933;
  display: grid; place-items: center;
  border: 2px solid #5BD27D;
}
.done .tick svg { width: 48px; height: 48px; stroke: #5BD27D; }
.done h1 { font-size: clamp(22px, 3vw, 36px); font-weight: 700; }
.done p  { color: #8B95A2; font-size: clamp(14px, 1.4vw, 18px); }
