:root {
  --bg: #f7f8fa;
  --ink: #12151c;
  --muted: #4d515b;
  /* --brand + --accent are injected by index.php from booth-config.php.
     If this stylesheet is loaded standalone (no index.php shim), the
     fallback below applies. */
  --brand: #0c2c5a;
  --brand-ink: #ffffff;
  --accent: #f5a623;
  --line: #e3e6ec;
  --card: #ffffff;
  --err: #b3261e;
  --radius: 14px;
  --shadow: 0 2px 6px rgba(0,0,0,0.06), 0 8px 24px rgba(0,0,0,0.06);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

.app {
  max-width: 520px;
  margin: 0 auto;
  padding: 28px 20px 48px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.brand {
  text-align: center;
  margin-bottom: 28px;
}
.brand-name {
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.04em;
  color: var(--brand);
}
.brand-tag {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
  letter-spacing: 0.02em;
}

.screen { animation: fade .25s ease-out; }
@keyframes fade {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

h1 { font-size: 26px; margin: 4px 0 6px; }
h2 { font-size: 22px; margin: 4px 0 6px; }
.lead { color: var(--muted); margin-bottom: 24px; font-size: 16px; }
.muted { color: var(--muted); }

/* Big buttons */
.big-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 18px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  box-shadow: var(--shadow);
  margin-bottom: 14px;
  min-height: 76px;
  transition: transform .05s ease;
}
.big-btn:active { transform: scale(0.99); }
.big-btn.primary {
  background: var(--brand);
  color: var(--brand-ink);
  border-color: var(--brand);
}
.big-btn.secondary { background: var(--card); }
.big-btn-icon { font-size: 28px; flex: 0 0 36px; text-align: center; }
.big-btn-text { display: flex; flex-direction: column; gap: 2px; }
.big-btn-title { font-size: 17px; font-weight: 600; }
.big-btn-sub { font-size: 13px; opacity: 0.85; }

/* Form */
.field { display: block; margin-bottom: 14px; }
.field-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}
.field-label em {
  color: var(--err);
  font-style: normal;
  margin-left: 2px;
}
.field input,
.field textarea {
  width: 100%;
  font: inherit;
  font-size: 17px; /* prevent iOS zoom */
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  color: var(--ink);
}
.field input:focus,
.field textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}

.submit-btn { justify-content: center; margin-top: 12px; }

.form-err {
  background: #fdecea;
  border: 1px solid #f5c2c0;
  color: var(--err);
  padding: 10px 12px;
  border-radius: 10px;
  margin: 8px 0 4px;
  font-size: 14px;
}

.link-btn {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 12px;
  background: transparent;
  border: none;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
  text-align: center;
}
.link-btn:hover { color: var(--ink); }

/* Reading screen */
.spinner {
  width: 44px; height: 44px;
  margin: 30px auto 18px;
  border: 4px solid var(--line);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
#screen-reading { text-align: center; padding-top: 30px; }
#screen-success { text-align: center; padding-top: 30px; }
.check {
  width: 72px; height: 72px; line-height: 72px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--brand);
  color: var(--brand-ink);
  font-size: 34px;
  text-align: center;
}
