:root {
  color-scheme: light;
  --navy: #10243e;
  --blue: #1769aa;
  --sky: #eaf5ff;
  --yellow: #f2c94c;
  --green: #16845b;
  --red: #b53939;
  --ink: #172230;
  --muted: #627184;
  --line: #d8e1ea;
  --paper: #ffffff;
  --background: #eef3f7;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }
body {
  background: var(--background);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.5;
}
button, input { font: inherit; }
[hidden] { display: none !important; }

.display-shell { width: min(1180px, calc(100% - 48px)); margin: 24px auto; }
.brand-bar, .phone-header {
  display: flex; align-items: center; gap: 14px; color: var(--navy); font-weight: 800;
}
.brand-bar { font-size: 1.15rem; margin-bottom: 20px; }
.brand-mark {
  display: inline-grid; place-items: center; width: 56px; height: 46px;
  border-radius: 8px 8px 16px 8px; background: var(--yellow); color: var(--navy);
  font-weight: 950; letter-spacing: -.04em;
}
.display-card {
  min-height: calc(100vh - 116px); display: grid; grid-template-columns: 1fr minmax(360px, 480px);
  gap: 64px; align-items: center; padding: clamp(36px, 6vw, 82px);
  background: var(--paper); border: 1px solid var(--line); border-radius: 28px;
  box-shadow: 0 18px 55px rgba(16, 36, 62, .09);
}
.instruction h1, .phone-card h1 { margin: 8px 0 18px; color: var(--navy); line-height: 1.06; letter-spacing: -.035em; }
.instruction h1 { font-size: clamp(2.8rem, 6vw, 5.5rem); }
.instruction p:not(.step-label) { max-width: 560px; font-size: clamp(1.1rem, 2vw, 1.4rem); color: var(--muted); }
.step-label {
  display: inline-block; margin: 0; padding: 7px 13px; border-radius: 999px;
  background: var(--sky); color: var(--blue); font-size: .9rem; font-weight: 850; letter-spacing: .06em; text-transform: uppercase;
}
.step-label.success { background: #e4f6ee; color: var(--green); }
.step-label.error { background: #fdecec; color: var(--red); }
.small-note { font-size: .95rem !important; color: var(--muted); }
.qr-frame, .preview-frame {
  overflow: hidden; width: 100%; aspect-ratio: 1; border: 12px solid var(--navy); border-radius: 26px; background: white;
  box-shadow: 14px 14px 0 var(--yellow);
}
.qr-frame { display: grid; place-items: center; padding: 18px; }
.qr-frame img { width: 100%; height: 100%; object-fit: contain; }
.preview-frame img { width: 100%; height: 100%; object-fit: contain; display: block; }

.phone-shell { width: min(100% - 28px, 520px); margin: 0 auto; padding: 20px 0 36px; }
.phone-header { margin-bottom: 18px; }
.phone-card {
  padding: 28px 22px; background: var(--paper); border: 1px solid var(--line); border-radius: 22px;
  box-shadow: 0 12px 34px rgba(16, 36, 62, .08);
}
.phone-card h1 { font-size: 2.15rem; }
.phone-card > p { color: var(--muted); }
.file-picker {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 160px; margin: 26px 0 14px; padding: 24px; border: 2px dashed var(--blue);
  border-radius: 18px; background: var(--sky); color: var(--blue); font-weight: 800; text-align: center; cursor: pointer;
}
.file-picker input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.camera-icon { font-size: 2.8rem; line-height: 1; margin-bottom: 10px; }
.local-preview { width: 100%; max-height: 300px; object-fit: contain; border-radius: 14px; background: #e8edf2; }
.centered { text-align: center; }
.primary-button, .secondary-button {
  min-height: 54px; padding: 13px 20px; border: 0; border-radius: 13px; font-weight: 850; cursor: pointer;
}
.primary-button { background: var(--blue); color: white; }
.primary-button:disabled { background: #a7b5c2; cursor: not-allowed; }
.secondary-button { margin-top: 22px; background: var(--navy); color: white; }
.full-button { width: 100%; }
.form-message, .status-card { padding: 16px; border-radius: 14px; }
.error-box { background: #fdecec; color: var(--red) !important; }
.success-box { background: #e4f6ee; color: #0c6645; text-align: center; }
.success-box p { color: #276b54; }
.checkmark { display: grid; place-items: center; width: 76px; height: 76px; margin: 0 auto 20px; border-radius: 50%; background: var(--green); color: white; font-size: 3rem; font-weight: 900; }

@media (max-width: 760px) {
  .display-shell { width: min(100% - 24px, 640px); margin: 12px auto; }
  .display-card { min-height: auto; grid-template-columns: 1fr; gap: 34px; padding: 28px; }
  .instruction h1 { font-size: 3rem; }
  .qr-frame, .preview-frame { max-width: 420px; margin: 0 auto; }
}

