:root {
  --navy: #0b1f3a;
  --navy-mid: #143056;
  --blue: #2f6bff;
  --blue-soft: #e8efff;
  --mint: #14b8a6;
  --mint-soft: #e6faf6;
  --bg: #f4f6fb;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --danger: #e11d48;
  --success: #059669;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); font-family: "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif; }
a { color: inherit; text-decoration: none; }
.page { max-width: 760px; margin: 0 auto; padding: 24px 16px 48px; }
.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.page-head h1 { margin: 0; font-size: 24px; }
.back { font-size: 14px; font-weight: 700; color: var(--blue); }
.card { background: var(--card); border-radius: 16px; padding: 20px; box-shadow: 0 8px 24px rgba(11,31,58,.06); }
.btn { display: inline-flex; align-items: center; justify-content: center; height: 48px; width: 100%; border-radius: 16px; border: 0; font-weight: 700; font-size: 14px; cursor: pointer; }
.btn:disabled { opacity: .45; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-secondary { background: #fff; border: 1px solid var(--line); }
.btn-danger { background: #fff; border: 1px solid #fecdd3; color: var(--danger); }
.field { display: block; margin-bottom: 14px; }
.field span { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 600; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; height: 48px; border-radius: 16px; border: 1px solid var(--line); padding: 0 16px; font: inherit; outline: none;
}
.field textarea { height: auto; min-height: 160px; padding: 14px 16px; }
.field input:focus, .field textarea:focus, .field select:focus { box-shadow: 0 0 0 2px var(--blue); }
.error { color: var(--danger); font-size: 14px; font-weight: 600; }
.muted { color: var(--muted); }
.grid-2 { display: grid; gap: 12px; }
.grid-4 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (min-width: 768px) {
  .grid-2, .grid-4 { grid-template-columns: 1fr 1fr; }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}
.hero { background: linear-gradient(135deg, var(--navy), var(--navy-mid)); color: #fff; padding: 24px 20px 32px; }
.hero .sub { color: #bae6fd; font-size: 14px; }
.chip { display: inline-block; background: var(--blue-soft); color: var(--navy); border-radius: 999px; padding: 4px 12px; font-size: 13px; font-weight: 700; margin: 0 8px 8px 0; }
.shell { min-height: 100vh; }
.sidebar { display: none; }
.bottom-nav { position: fixed; inset: auto 0 0 0; background: #fff; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(4, 1fr); }
.bottom-nav a, .sidebar a { padding: 12px; text-align: center; font-size: 12px; font-weight: 800; color: var(--muted); }
.bottom-nav a.active, .sidebar a.active { color: var(--blue); background: var(--blue-soft); }
.shell-main { padding-bottom: 80px; }
.brand { font-size: 18px; font-weight: 800; color: var(--navy); padding: 20px; }
@media (min-width: 768px) {
  .shell { display: flex; }
  .sidebar { display: flex; width: 240px; flex-direction: column; background: #fff; border-right: 1px solid var(--line); }
  .sidebar nav { display: flex; flex-direction: column; padding: 0 12px; gap: 4px; }
  .sidebar a { text-align: left; border-radius: 12px; font-size: 14px; }
  .bottom-nav { display: none; }
  .shell-main { flex: 1; padding-bottom: 0; }
}
.code { letter-spacing: .28em; font-weight: 800; }
.file-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.progress { height: 12px; background: var(--line); border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--blue); width: 0; }
.drop { display: flex; height: 112px; align-items: center; justify-content: center; border: 1px dashed var(--blue); border-radius: 16px; background: var(--blue-soft); color: var(--blue); font-weight: 800; cursor: pointer; }
.stack { display: grid; gap: 16px; }
.center { text-align: center; }
.welcome { max-width: 1040px; margin: 0 auto; padding: 32px 24px; display: grid; gap: 32px; }
@media (min-width: 1024px) { .welcome { grid-template-columns: 1fr 380px; align-items: center; min-height: 100vh; } }
.qr { width: 224px; height: 224px; background: #fff; }
.hidden { display: none; }
.success { color: var(--success); font-size: 14px; }
.navy-card { background: var(--navy); color: #fff; }
.navy-card .sub { color: #bae6fd; }
.badge { background: var(--mint-soft); color: var(--success); border-radius: 999px; padding: 4px 8px; font-size: 12px; font-weight: 800; }
#sf-reader { background: #fff; border-radius: 16px; overflow: hidden; padding: 8px; }
