:root {
  --bg-deep: #0b1220;
  --bg-surface: #111b2e;
  --bg-card: #ffffff;
  --bg-soft: #f5f7fb;
  --primary: #c8551f;
  --primary-hover: #a84214;
  --primary-soft: #fff3ec;
  --accent-teal: #0f766e;
  --accent-gold: #d4a353;
  --accent-gold-light: #f3d79b;
  --text-main: #182230;
  --text-sub: #475467;
  --text-muted: #667085;
  --border: #e4e7ec;
  --border-focus: #c8551f;
  --danger: #d92d20;
  --danger-bg: #fef3f2;
  --success: #067647;
  --success-bg: #ecfdf3;
  --warning: #b54708;
  --warning-bg: #fffaeb;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-card: 0 8px 30px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 20px 50px rgba(11, 18, 32, 0.25);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  background: #f2f4f8;
  color: var(--text-main);
  line-height: 1.65;
  min-height: 100vh;
}

/* Top Hero Banner */
.hero {
  background: radial-gradient(circle at 85% 15%, rgba(200, 85, 31, 0.28), transparent 45%),
              radial-gradient(circle at 15% 85%, rgba(15, 118, 110, 0.25), transparent 45%),
              linear-gradient(135deg, #09111f 0%, #13223b 60%, #1a1f35 100%);
  color: #fff;
  padding: 28px 20px 64px;
  position: relative;
  overflow: hidden;
}
.hero-inner {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}
.hero-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}
.badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 12px;
  letter-spacing: 0.6px;
  color: #e2e8f0;
}
.badge-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #f97316;
  box-shadow: 0 0 8px #f97316;
}
.top-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.btn-ghost-light {
  background: rgba(255,255,255,0.1);
  color: #f8fafc;
  border: 1px solid rgba(255,255,255,0.2);
  padding: 6px 13px;
  border-radius: 999px;
  font-size: 12.5px;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-ghost-light:hover {
  background: rgba(255,255,255,0.2);
  border-color: var(--accent-gold);
  color: var(--accent-gold-light);
}

.hero h1 {
  font-size: clamp(24px, 4vw, 34px);
  font-weight: 800;
  letter-spacing: -0.3px;
  line-height: 1.28;
  margin-bottom: 12px;
}
.hero-sub {
  color: #cbd5e1;
  font-size: 14px;
  margin-bottom: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.hero-sub span {
  background: rgba(255,255,255,0.07);
  padding: 3px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.1);
}
.reward-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(90deg, rgba(212, 163, 83, 0.2), rgba(200, 85, 31, 0.16));
  border: 1px solid rgba(243, 215, 155, 0.35);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  backdrop-filter: blur(8px);
}
.reward-icon {
  font-size: 28px;
  flex-shrink: 0;
}
.reward-text strong {
  color: var(--accent-gold-light);
  font-size: 15px;
  display: block;
  margin-bottom: 2px;
}
.reward-text p {
  color: #e2e8f0;
  font-size: 13px;
  margin: 0;
}

/* Main Container */
.container {
  max-width: 900px;
  margin: -36px auto 60px;
  padding: 0 16px;
  position: relative;
  z-index: 5;
}

/* Sticky Progress Bar */
.progress-bar-wrap {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 10px 18px;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.05);
}
.progress-bar-wrap.show { display: flex; }
.progress-inner {
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 14px;
}
.progress-track {
  flex: 1;
  height: 8px;
  background: #eaecf0;
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), #f59e0b);
  border-radius: 999px;
  transition: width 0.35s ease;
}
.progress-meta {
  font-size: 12.5px;
  color: var(--text-sub);
  white-space: nowrap;
  display: flex;
  gap: 12px;
  align-items: center;
}
.timer-pill {
  background: #f2f4f7;
  padding: 3px 9px;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--text-main);
}

/* Cards */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(228, 231, 236, 0.9);
  padding: 26px 28px;
  margin-bottom: 20px;
}
@media (max-width: 640px) {
  .card { padding: 20px 16px; }
}

.intro-card {
  border-left: 4px solid var(--primary);
  background: #fffdfb;
}
.intro-card p {
  font-size: 14.5px;
  color: var(--text-sub);
  margin-bottom: 8px;
}
.intro-card p:last-child { margin-bottom: 0; }

/* Gate / Registration Card */
.gate-card {
  border-top: 4px solid var(--accent-teal);
}
.gate-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}
.gate-header h2 {
  font-size: 19px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}
.gate-badge {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #047857;
  font-weight: 600;
  border: 1px solid #a7f3d0;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
}
.field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field-group label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-main);
}
.req { color: var(--danger); margin-left: 2px; }
.input-ctrl, .textarea-ctrl {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid #d0d5dd;
  border-radius: var(--radius-sm);
  font-size: 14.5px;
  color: var(--text-main);
  background: #fff;
  transition: all 0.2s;
  font-family: inherit;
}
.input-ctrl:focus, .textarea-ctrl:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(200, 85, 31, 0.14);
}
.code-row {
  display: flex;
  gap: 10px;
}
.code-row .input-ctrl { flex: 1; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  font-family: inherit;
}
.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), #df6b24);
  color: #fff;
  box-shadow: 0 6px 18px rgba(200, 85, 31, 0.28);
}
.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(200, 85, 31, 0.36);
}
.btn-secondary {
  background: #f2f4f7;
  color: var(--text-main);
  border: 1px solid #d0d5dd;
}
.btn-secondary:hover:not(:disabled) { background: #e4e7ec; }
.btn-teal {
  background: var(--accent-teal);
  color: #fff;
}
.btn-teal:hover:not(:disabled) { background: #0d5e58; }
.btn-gold {
  background: linear-gradient(135deg, #d4a353, #b9822e);
  color: #111827;
  font-weight: 700;
}
.btn-gold:hover:not(:disabled) { filter: brightness(1.06); }
.btn-sm { padding: 6px 12px; font-size: 12.5px; }

.user-verified-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 16px;
  background: #f0fdf9;
  border: 1px solid #99f6e4;
  border-radius: var(--radius-md);
  margin-bottom: 18px;
  font-size: 13.5px;
  color: #115e59;
}

/* Section Header */
.module-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 14px;
  margin-bottom: 22px;
  border-bottom: 2px solid #f2f4f7;
}
.module-num {
  background: var(--bg-deep);
  color: var(--accent-gold-light);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  letter-spacing: 0.5px;
  white-space: nowrap;
}
.module-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
}

/* Question Block */
.q-block {
  padding: 18px 0;
  border-bottom: 1px dashed #e4e7ec;
}
.q-block:last-child { border-bottom: none; padding-bottom: 4px; }
.q-block.q-error {
  background: #fff8f7;
  border-radius: var(--radius-md);
  padding: 16px;
  border: 1px solid #fecdca;
  margin: 8px 0;
}
.q-title {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 12px;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
}
.q-type {
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  background: #eef2ff;
  color: #3730a3;
  white-space: nowrap;
}
.q-type.multi { background: #fff3ec; color: #b54708; }
.q-type.qc { background: #fef3f2; color: #b42318; }
.q-counter {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  margin-left: auto;
}

.options-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.options-grid.single-col {
  grid-template-columns: 1fr;
}
@media (max-width: 680px) {
  .options-grid { grid-template-columns: 1fr; }
}

.opt-item {
  display: flex;
  flex-direction: column;
}
.opt-item.full-span {
  grid-column: 1 / -1;
}
.opt-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.18s;
  background: #fff;
  font-size: 14px;
  color: var(--text-main);
  user-select: none;
}
.opt-label:hover {
  border-color: #f3a67d;
  background: #fffaf7;
}
.opt-label input {
  margin-top: 3px;
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  cursor: pointer;
}
.opt-label.selected {
  border-color: var(--primary);
  background: var(--primary-soft);
  font-weight: 500;
}
.opt-label.other-opt {
  border-style: dashed;
}
.opt-label.other-opt.selected {
  border-style: solid;
}

.other-input-wrap {
  display: none;
  margin-top: 8px;
  padding: 10px 12px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius-sm);
  animation: fadeSlide 0.2s ease;
}
.other-input-wrap.show { display: block; }
.other-input-wrap .other-hint {
  font-size: 12px;
  color: #92400e;
  margin-bottom: 6px;
}
@keyframes fadeSlide {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Q5 Stage Cards */
.stage-panel {
  border: 1.5px solid #e4e7ec;
  border-radius: var(--radius-md);
  margin-bottom: 14px;
  overflow: hidden;
  background: #fff;
  transition: all 0.2s;
}
.stage-panel.hidden { display: none; }
.stage-head {
  background: linear-gradient(90deg, #f8fafc, #f1f5f9);
  padding: 11px 16px;
  font-weight: 700;
  font-size: 14.5px;
  color: var(--bg-deep);
  border-bottom: 1px solid #e4e7ec;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.stage-body {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.q5-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  padding: 10px 14px;
  background: #f8fafc;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-sub);
}

/* Textarea count */
.char-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  margin-top: 6px;
  color: var(--text-muted);
}
.char-meta .ok { color: var(--success); font-weight: 600; }
.char-meta .warn { color: var(--warning); font-weight: 600; }

/* Error / Alert box */
.alert-box {
  padding: 12px 15px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  margin: 12px 0;
  display: none;
}
.alert-box.show { display: block; }
.alert-danger { background: var(--danger-bg); color: var(--danger); border: 1px solid #fecdca; }
.alert-warning { background: var(--warning-bg); color: var(--warning); border: 1px solid #fedf89; }
.alert-success { background: var(--success-bg); color: var(--success); border: 1px solid #abefc6; }

/* Submit Footer */
.submit-zone {
  text-align: center;
  padding: 12px 0 4px;
}
.submit-zone .btn-primary {
  width: 100%;
  max-width: 420px;
  padding: 14px 28px;
  font-size: 16px;
  border-radius: 12px;
}
.submit-note {
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--text-muted);
}

/* Toast SMS Notification */
.toast-box {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 9999;
  max-width: 350px;
  background: #101828;
  color: #fff;
  border: 1px solid rgba(243, 215, 155, 0.45);
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: var(--shadow-lg);
  display: none;
  animation: slideIn 0.28s ease;
}
.toast-box.show { display: block; }
@keyframes slideIn {
  from { opacity: 0; transform: translateX(24px); }
  to { opacity: 1; transform: translateX(0); }
}
.toast-title {
  font-size: 13px;
  color: var(--accent-gold-light);
  font-weight: 700;
  margin-bottom: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.toast-body { font-size: 13.5px; color: #e2e8f0; margin-bottom: 8px; }

/* Modal Backdrop */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(9, 17, 31, 0.72);
  backdrop-filter: blur(5px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow-y: auto;
}
.modal-backdrop.show { display: flex; }
.modal-dialog {
  background: #fff;
  border-radius: 18px;
  max-width: 680px;
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  position: relative;
}
.modal-dialog.wide { max-width: 1060px; }
.modal-head {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 5;
}
.modal-head h3 { font-size: 17px; font-weight: 700; }
.close-btn {
  background: #f2f4f7;
  border: none;
  width: 32px; height: 32px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  color: #475467;
}
.close-btn:hover { background: #e4e7ec; }
.modal-body { padding: 22px; }

/* Black-Gold Voucher Card */
.voucher-card {
  background: radial-gradient(circle at 88% 12%, rgba(212,163,83,0.28), transparent 45%),
              linear-gradient(135deg, #0d1321 0%, #192236 55%, #0f172a 100%);
  color: #f8fafc;
  border-radius: 18px;
  border: 1.5px solid rgba(212, 163, 83, 0.65);
  padding: 26px 26px 22px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.35);
}
.voucher-card::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px dashed rgba(243, 215, 155, 0.25);
  border-radius: 12px;
  pointer-events: none;
}
.voucher-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
  position: relative;
  z-index: 2;
}
.voucher-brand {
  font-size: 11.5px;
  letter-spacing: 1.8px;
  color: var(--accent-gold);
  font-weight: 700;
  text-transform: uppercase;
}
.voucher-status-pill {
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  background: rgba(212, 163, 83, 0.18);
  border: 1px solid rgba(243, 215, 155, 0.55);
  color: var(--accent-gold-light);
}
.voucher-status-pill.approved {
  background: rgba(16, 185, 129, 0.2);
  border-color: #34d399;
  color: #6ee7b7;
}
.voucher-status-pill.voided {
  background: rgba(239, 68, 68, 0.2);
  border-color: #f87171;
  color: #fca5a5;
}
.voucher-title {
  font-size: clamp(20px, 3.5vw, 26px);
  font-weight: 800;
  background: linear-gradient(90deg, #fff5dc, #e7bc6c, #fff2cc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 6px;
  position: relative;
  z-index: 2;
}
.voucher-sub {
  font-size: 13px;
  color: #cbd5e1;
  margin-bottom: 18px;
  position: relative;
  z-index: 2;
}
.voucher-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: end;
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 16px;
  position: relative;
  z-index: 2;
}
@media (max-width: 520px) {
  .voucher-grid { grid-template-columns: 1fr; }
}
.voucher-info-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
  font-size: 12.5px;
}
.v-field span {
  display: block;
  color: #94a3b8;
  font-size: 11px;
}
.v-field strong {
  color: #f8fafc;
  font-size: 13.5px;
  word-break: break-all;
}
.v-code-box {
  grid-column: 1 / -1;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(243, 215, 155, 0.35);
  padding: 8px 12px;
  border-radius: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
  color: var(--accent-gold-light);
  letter-spacing: 0.8px;
}
.voucher-qr-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  background: #fff;
  padding: 8px;
  border-radius: 10px;
}
.voucher-qr-wrap span {
  font-size: 10px;
  color: #334155;
  font-weight: 700;
}
.voucher-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 18px;
}

/* Admin Dashboard */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}
@media (max-width: 720px) {
  .stats-row { grid-template-columns: repeat(2, 1fr); }
}
.stat-card {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
}
.stat-card .s-label { font-size: 12px; color: var(--text-muted); }
.stat-card .s-val { font-size: 24px; font-weight: 800; color: var(--bg-deep); margin-top: 4px; }

.bar-chart {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 18px;
}
.bar-row {
  display: grid;
  grid-template-columns: 180px 1fr 48px;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 12.5px;
}
@media (max-width: 600px) {
  .bar-row { grid-template-columns: 120px 1fr 38px; }
}
.bar-track { height: 10px; background: #e2e8f0; border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(90deg, var(--accent-teal), var(--primary)); border-radius: 999px; }

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding: 12px;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
th, td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #eaecf0;
}
th { background: #f9fafb; font-weight: 700; color: #344054; white-space: nowrap; }
.status-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}
.st-pending { background: #fffaeb; color: #b54708; }
.st-approved { background: #ecfdf3; color: #067647; }
.st-voided { background: #fef3f2; color: #b42318; }

.detail-box {
  background: #fafafa;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid #e4e7ec;
  font-size: 13px;
  line-height: 1.7;
}
.other-highlight {
  display: inline-block;
  background: #fef3c7;
  border: 1px solid #f59e0b;
  color: #92400e;
  padding: 1px 7px;
  border-radius: 5px;
  font-weight: 600;
  margin: 2px 0;
}

/* Footer */
.footer {
  text-align: center;
  padding: 24px 16px 40px;
  color: var(--text-muted);
  font-size: 13px;
}
.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 10px;
}
.footer-btn {
  background: none;
  border: 1px solid #d0d5dd;
  color: #475467;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  cursor: pointer;
}
.footer-btn:hover { background: #fff; border-color: var(--primary); color: var(--primary); }

#confettiCanvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2000;
}
.hidden { display: none !important; }

.captcha-row { align-items: stretch; }
.captcha-row .input-ctrl { min-width: 0; }
.captcha-refresh { min-width: 116px; padding: 2px 5px; line-height: 1.2; }
.captcha-refresh img { width: 104px; height: 38px; object-fit: contain; display: block; }
.voucher-qr-wrap { text-decoration: none; justify-self: start; }
.voucher-qr-wrap img { display: block; width: 112px; height: 112px; background: white; }
.voucher-preview { width: 100%; height: auto; display: block; margin: 10px 0 16px; -webkit-touch-callout: default; }
.preview-tip { text-align: center; margin-bottom: 10px; }
.stage-instruction { font-size: 12px; font-weight: 500; color: var(--text-muted); }
.stage-head { flex-wrap: wrap; gap: 5px 10px; }
.stage-panel.stage-preview .opt-label { cursor: default; }
.stage-panel.stage-preview input, .stage-panel.stage-preview textarea { opacity: .65; }
.v-field strong, .v-code-box, .detail-box { overflow-wrap: anywhere; }
.code-row .input-ctrl { min-width: 0; }
.btn:focus-visible, .close-btn:focus-visible, .footer-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.success-message { color: var(--success); }
.logic-flag, .question-error { color: var(--danger); font-size: 13px; }
.question-error { margin-bottom: 8px; }
.mode-demo { color: #fde68a; border-color: #fbbf2480; }
.mode-live { color: #a7f3d0; border-color: #34d39980; }
.toast-box { pointer-events: none; }
.toast-box button { pointer-events: auto; }
@media (max-width: 520px) {
  .toast-box { top: auto; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); left: 12px; max-width: none; }
  .modal-backdrop { padding: 8px; }
  .modal-head, .modal-body { padding: 14px; }
  .voucher-card { padding: 18px; }
  .voucher-top { flex-wrap: wrap; }
  .v-code-box { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
