/* ============================================================
   QR Studio – Modern Minimal (Mobile First)
   ============================================================ */

*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  color-scheme: dark;

  --bg: #16161d;
  --bg-elev: #1b1c24;
  --panel: #1f2029;
  --panel-soft: #1a1b23;
  --panel-strong: #232532;

  --line: #2f3343;
  --line-soft: #3b4054;

  --text: #eceef7;
  --text-sub: #b9bfd3;
  --text-dim: #8e95ad;

  --accent: #7aa2ff;
  --accent-hover: #90b3ff;
  --accent-soft: rgba(122, 162, 255, 0.18);

  --success: #34d399;
  --danger: #f87171;

  --radius-xs: 10px;
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 20px;

  --shadow: 0 10px 28px rgba(0, 0, 0, 0.32);
  --focus: 0 0 0 3px rgba(122, 162, 255, 0.22);
  --transition: 180ms ease;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: 'Manrope', sans-serif;
  color: var(--text);
  letter-spacing: 0.01em;
  background:
    radial-gradient(900px 560px at 18% -12%, rgba(122, 162, 255, 0.12), transparent 58%),
    radial-gradient(860px 580px at 86% 108%, rgba(122, 162, 255, 0.08), transparent 58%),
    var(--bg);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  backdrop-filter: blur(8px);
  background: rgba(22, 22, 29, 0.88);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: 1600px;
  margin: 0 auto;
  height: 68px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.logo span {
  color: var(--text);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.logo svg {
  color: var(--accent);
  flex-shrink: 0;
}

.header-nav {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: var(--panel-soft);
  border: 1px solid var(--line);
}

.nav-tab {
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-dim);
  padding: 7px 13px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
}

.nav-tab:hover {
  color: var(--text-sub);
}

.nav-tab.active {
  color: #0f1220;
  background: var(--accent);
}

.app-main {
  padding-bottom: 20px;
}

.workspace {
  max-width: 1600px;
  margin: 0 auto;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 12px;
}

.panel-center {
  display: flex;
  align-items: stretch;
}

.panel-section {
  margin-bottom: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--panel-soft);
}

.panel-section:last-child {
  margin-bottom: 0;
}

.panel-section.is-collapsible {
  padding: 0;
  overflow: hidden;
}

.section-title {
  margin: 0 0 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 700;
}

.section-toggle {
  margin: 0;
  padding: 13px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.section-toggle-icon {
  margin-left: auto;
  color: var(--text-dim);
  transform: rotate(-90deg);
  transition: transform var(--transition);
}

.panel-section.is-open .section-toggle-icon {
  transform: rotate(0deg);
}

.panel-section-body {
  padding: 0 12px 12px;
  display: grid;
  gap: 8px;
  max-height: 2600px;
  opacity: 1;
  overflow: hidden;
  transition: max-height 240ms ease, opacity 180ms ease, padding 180ms ease;
}

.panel-section.is-collapsible:not(.is-open) .panel-section-body {
  max-height: 0;
  opacity: 0;
  padding-top: 0;
  padding-bottom: 0;
  pointer-events: none;
}

.panel-section.is-open .section-toggle {
  border-bottom: 1px solid var(--line);
  margin-bottom: 10px;
}

.type-pills,
.ec-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.colour-type-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.gradient-type-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.pill,
.ec-pill,
.colour-tab,
.small-pill {
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: var(--panel-strong);
  color: var(--text-sub);
  padding: 7px 12px;
  font-size: 0.79rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
}

.colour-tab,
.small-pill {
  width: 100%;
  text-align: center;
}

.pill:hover,
.ec-pill:hover,
.colour-tab:hover,
.small-pill:hover {
  border-color: var(--accent);
}

.pill.active,
.ec-pill.active,
.colour-tab.active,
.small-pill.active {
  color: #0f1220;
  border-color: transparent;
  background: var(--accent);
}

.input-form {
  display: none;
  flex-direction: column;
  gap: 6px;
}

.input-form.active {
  display: flex;
}

.field-label {
  display: inline-block;
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-sub);
}

.field-label.mt,
.mt {
  margin-top: 10px;
}

.field-input {
  width: 100%;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-xs);
  background: #191b24;
  color: var(--text);
  padding: 10px 12px;
  font-size: 0.89rem;
  font-family: inherit;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.field-input::placeholder {
  color: #767f99;
}

.field-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--focus);
}

.field-textarea {
  min-height: 90px;
  resize: vertical;
}

.field-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23c4cbe0' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 34px;
}

.field-select option {
  background: #202431;
  color: var(--text);
}

.field-hint {
  margin: 0;
  font-size: 0.76rem;
  color: var(--text-dim);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  user-select: none;
  color: var(--text-sub);
  font-weight: 600;
  font-size: 0.92rem;
}

.checkbox-row input[type='checkbox'] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.upload-zone {
  position: relative;
  border: 1.5px dashed var(--line-soft);
  border-radius: var(--radius-sm);
  background: #1b1d27;
  min-height: 108px;
  overflow: hidden;
  transition: all var(--transition);
}

.upload-zone.small {
  min-height: 82px;
}

.upload-zone:hover,
.upload-zone.drag-over {
  border-color: var(--accent);
  background: #1f2230;
}

.upload-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.upload-prompt {
  min-height: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.81rem;
  gap: 8px;
  padding: 10px;
}

.upload-preview {
  padding: 12px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--success);
}

.preview-wrapper {
  width: 100%;
  display: grid;
  gap: 12px;
}

.preview-container {
  width: 100%;
  margin: 0 auto;
  max-width: 560px;
  aspect-ratio: 1 / 1;
  border-radius: 18px;
  border: 1px solid var(--line-soft);
  background: #14161d;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#qrCanvas {
  display: none;
  width: min(100%, 96%);
  height: auto;
  border-radius: 10px;
}

.preview-empty {
  color: var(--text-dim);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.preview-empty p {
  margin: 0;
  font-weight: 700;
}

.preview-actions {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  display: grid;
  gap: 10px;
}

.generate-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 8px;
}

.download-group {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr;
}

.btn-primary,
.btn-download,
.btn-reset,
.btn-secondary {
  border: none;
  border-radius: var(--radius-xs);
  font-family: inherit;
  font-weight: 700;
  transition: all var(--transition);
}

.btn-primary {
  padding: 11px 16px;
  color: #0f1220;
  background: var(--accent);
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 15px;
  color: #10211d;
  background: var(--success);
}

.btn-download:hover:not(:disabled) {
  filter: brightness(1.04);
}

.btn-download:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-reset {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 14px;
  font-size: 0.85rem;
  color: var(--text-dim);
  background: var(--panel-strong);
  border: 1px solid var(--line-soft);
}

.btn-reset:hover {
  color: var(--danger);
  border-color: rgba(248, 113, 113, 0.5);
  background: #2a2631;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 14px;
  font-size: 0.82rem;
  color: #dce5ff;
  background: var(--panel-strong);
  border: 1px solid var(--line-soft);
}

.btn-secondary:hover {
  border-color: var(--accent);
}

.style-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.style-btn {
  border: 1px solid var(--line-soft);
  background: var(--panel-strong);
  border-radius: var(--radius-xs);
  min-height: 72px;
  padding: 8px 6px;
  display: grid;
  place-items: center;
  gap: 4px;
  color: #d0d8ec;
  transition: all var(--transition);
}

.style-btn svg {
  width: 30px;
  height: 30px;
  fill: currentColor;
}

.style-btn span {
  font-size: 0.66rem;
  font-weight: 700;
  color: var(--text-sub);
}

.style-btn:hover {
  border-color: var(--accent);
}

.style-btn.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: #e7efff;
}

.colour-group {
  margin-bottom: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(37, 40, 53, 0.5);
}

.colour-group:last-child {
  margin-bottom: 0;
}

.colour-group-title {
  margin: 0 0 8px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-sub);
  display: flex;
  align-items: center;
  gap: 8px;
}

.optional-tag {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.65rem;
  color: var(--text-dim);
  background: var(--panel-strong);
  border: 1px solid var(--line-soft);
}

.colour-controls,
.colour-row,
.range-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.gradient-controls {
  width: 100%;
  display: grid;
  gap: 10px;
}

.gradient-row {
  display: grid;
  grid-template-columns: auto auto auto;
  justify-content: start;
  align-items: center;
  gap: 10px;
}

.gradient-dir-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.gradient-dir-row .field-label {
  white-space: nowrap;
}

.colour-picker {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: #1f2331;
  padding: 2px;
}

.colour-hex,
.range-row > span,
.gradient-dir-row > span {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.79rem;
  letter-spacing: 0.03em;
  color: var(--text-dim);
  min-width: 44px;
  text-align: right;
}

.range-input {
  flex: 1;
  accent-color: var(--accent);
}

.logo-controls {
  display: grid;
  gap: 8px;
}

.logo-src-panel {
  display: none;
}

.logo-src-panel.active {
  display: block;
}

.preset-grid {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 6px;
}

.preset-group-header {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.preset-group-header:first-child {
  margin-top: 0;
}

.preset-group-label {
  margin: 0;
  font-size: 0.67rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 700;
}

.social-color-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.social-color-row .field-label {
  font-size: 0.72rem;
}

.social-color-row .colour-picker {
  width: 26px;
  height: 26px;
  border-radius: 8px;
}

.social-icon-btn img {
  filter: invert(1) brightness(1.9);
}

.preset-subgrid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.preset-logo-btn {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-xs);
  background: var(--panel-strong);
  min-height: 66px;
  padding: 6px 4px;
  display: grid;
  justify-items: center;
  gap: 3px;
  cursor: pointer;
  transition: all var(--transition);
}

.preset-logo-btn img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.preset-logo-btn span {
  font-size: 0.58rem;
  color: var(--text-dim);
  font-weight: 700;
}

.preset-logo-btn:hover {
  border-color: var(--accent);
}

.preset-logo-btn.active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

#logoPreviewImg {
  width: 100%;
  max-height: 92px;
  object-fit: contain;
  border-radius: 10px;
}

.finder-override-controls {
  margin-top: 8px;
}

.frame-controls {
  display: grid;
  gap: 8px;
}

/* ── Quality Badges ────────────────────────────────────────── */
.preview-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  min-height: 0;
}

.quality-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  border: 1px solid;
  white-space: nowrap;
}

.badge-pass {
  color: var(--success);
  border-color: rgba(52, 211, 153, 0.35);
  background: rgba(52, 211, 153, 0.1);
}

.badge-warn {
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.35);
  background: rgba(251, 191, 36, 0.1);
}

.badge-fail {
  color: var(--danger);
  border-color: rgba(248, 113, 113, 0.35);
  background: rgba(248, 113, 113, 0.1);
}

.badge-info {
  color: var(--accent);
  border-color: rgba(122, 162, 255, 0.3);
  background: rgba(122, 162, 255, 0.08);
}

/* ── Logo Brand Palette ──────────────────────────────────────── */
.logo-palette {
  padding-top: 4px;
}

.palette-swatches {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.palette-swatch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.swatch-color {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--line-soft);
  cursor: default;
  flex-shrink: 0;
}

.swatch-btn {
  width: 34px;
  padding: 3px 0;
  font-size: 0.6rem;
  font-weight: 800;
  font-family: 'Space Grotesk', sans-serif;
  letter-spacing: 0.04em;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: var(--panel-strong);
  color: var(--text-dim);
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}

.swatch-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ── QR Art Mode ─────────────────────────────────────────────── */
.art-controls {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.art-src-panel {
  display: none;
}

.art-src-panel.active {
  display: block;
}

/* ── Style Templates ───────────────────────────────────────── */
.template-save-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.template-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

.template-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  background: var(--panel-strong);
}

.template-name {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-sub);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.template-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.btn-tpl-delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-xs);
  background: transparent;
  color: var(--text-dim);
  transition: all var(--transition);
}

.btn-tpl-delete:hover {
  color: var(--danger);
  border-color: rgba(248, 113, 113, 0.4);
}

.download-buttons {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
}

.btn-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 14px;
  border: none;
  border-radius: var(--radius-xs);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-sub);
  background: var(--panel-strong);
  border: 1px solid var(--line-soft);
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-copy:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-copy:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.hidden {
  display: none !important;
}

@media (max-width: 480px) {
  .header-inner {
    padding: 0 10px;
  }

  .logo span {
    display: none;
  }

  .gradient-dir-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .gradient-dir-row > span {
    text-align: left;
    min-width: 0;
  }

  .colour-group {
    padding: 9px;
  }
}

@media (min-width: 576px) {
  .download-group {
    grid-template-columns: 1fr 1fr auto;
  }

  .download-buttons {
    grid-column: 1 / -1;
  }

  .style-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .field-row {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 768px) {
  .header-inner {
    padding: 0 20px;
  }

  .panel {
    padding: 16px;
  }

  .section-toggle {
    padding: 14px 14px;
  }

  .panel-section-body {
    padding: 0 14px 14px;
  }

  .preview-actions {
    gap: 12px;
  }

  .generate-row .btn-primary {
    padding: 12px 18px;
  }
}

@media (min-width: 1200px) {
  .app-main {
    min-height: calc(100vh - 68px);
  }

  .panel-left,
  .panel-right {
    max-height: calc(100vh - 106px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #3a3f52 transparent;
  }

  .panel-left::-webkit-scrollbar,
  .panel-right::-webkit-scrollbar {
    width: 7px;
  }

  .panel-left::-webkit-scrollbar-thumb,
  .panel-right::-webkit-scrollbar-thumb {
    background: #3a3f52;
    border-radius: 10px;
  }

  .panel-center {
    position: sticky;
    top: 84px;
  }
}

/* ── Undo / Redo buttons ──────────────────────────────────── */
.btn-history {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-xs);
  background: var(--panel-strong);
  color: var(--text-dim);
  flex-shrink: 0;
  transition: all var(--transition);
}

.btn-history:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-history:disabled {
  opacity: 0.32;
  cursor: not-allowed;
}

/* ── Verify output ────────────────────────────────────────── */
.verify-output {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  padding: 7px 10px;
  border-radius: var(--radius-xs);
  background: rgba(122, 162, 255, 0.07);
  border: 1px solid rgba(122, 162, 255, 0.2);
  font-size: 0.78rem;
}

.verify-output svg {
  flex-shrink: 0;
  margin-top: 1px;
  color: var(--accent);
}

.verify-label {
  font-weight: 700;
  color: var(--text-dim);
  white-space: nowrap;
  flex-shrink: 0;
}

.verify-text {
  word-break: break-all;
  color: var(--text-sub);
}

/* ── Batch Generator ──────────────────────────────────────── */
.batch-meta {
  margin-top: 4px;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-dim);
  min-height: 16px;
}

.batch-format-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}

.btn-batch {
  width: 100%;
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 16px;
  border: none;
  border-radius: var(--radius-xs);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.88rem;
  color: #0a1a14;
  background: var(--success);
  cursor: pointer;
  transition: all var(--transition);
}

.btn-batch:hover:not(:disabled) {
  filter: brightness(1.06);
}

.btn-batch:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.batch-progress {
  width: 100%;
  height: 4px;
  background: var(--line);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 10px;
}

.batch-bar {
  height: 100%;
  width: 0%;
  background: var(--success);
  border-radius: 999px;
  transition: width 100ms ease;
}

/* ============================================================
   About Panel
   ============================================================ */

.about-panel {
  max-width: 860px;
  margin: 0 auto;
  padding: 40px 20px 80px;
}

.about-panel.hidden {
  display: none;
}

#generator-panel.hidden {
  display: none;
}

/* Hero */
.about-hero {
  text-align: center;
  padding: 56px 20px 48px;
}

.about-hero-badge {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid rgba(122, 162, 255, 0.3);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 14px;
  margin-bottom: 22px;
}

.about-hero-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  font-weight: 700;
  color: var(--text);
  margin: 0 0 18px;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.about-hero-sub {
  font-size: clamp(1rem, 2vw, 1.18rem);
  color: var(--text-sub);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.65;
}

/* Body */
.about-body {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

/* Privacy callout */
.about-callout {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  background: var(--panel);
  border: 1px solid rgba(122, 162, 255, 0.22);
  border-radius: var(--radius-lg);
  padding: 26px 28px;
  box-shadow: 0 0 40px rgba(122, 162, 255, 0.06);
}

.about-callout-icon {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-callout h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 8px;
}

.about-callout p {
  font-size: 0.88rem;
  color: var(--text-sub);
  line-height: 1.7;
  margin: 0;
}

/* Sections */
.about-section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 16px;
  letter-spacing: -0.01em;
}

.about-section-body {
  font-size: 0.9rem;
  color: var(--text-sub);
  line-height: 1.75;
  margin: 0;
}

/* Feature grid */
.about-features {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.about-feature {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  transition: border-color var(--transition);
}

.about-feature:hover {
  border-color: var(--line-soft);
}

.about-feature-icon {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--panel-strong);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-feature strong {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 5px;
}

.about-feature span {
  font-size: 0.8rem;
  color: var(--text-sub);
  line-height: 1.6;
}

/* Tech stack */
.about-techstack {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
}

.about-tech-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.about-tech-pill {
  display: inline-block;
  background: var(--panel-strong);
  color: var(--text-sub);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 14px;
  text-decoration: none;
  transition: all var(--transition);
}

.about-tech-pill:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.about-tech-note {
  font-size: 0.82rem;
  color: var(--text-dim);
  line-height: 1.65;
  margin: 0;
}

/* ============================================================
   QR Error Modal
   ============================================================ */

.qr-error-modal {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.qr-error-modal[hidden] {
  display: none;
}

.qr-error-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 16, 0.72);
  backdrop-filter: blur(4px);
}

.qr-error-dialog {
  position: relative;
  z-index: 1;
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: 32px 30px 28px;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
  animation: errSlideIn 160ms cubic-bezier(0.2, 0, 0.2, 1);
}

@keyframes errSlideIn {
  from { opacity: 0; transform: translateY(10px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)   scale(1);    }
}

.qr-error-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.25);
  color: var(--danger);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.qr-error-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 10px;
}

.qr-error-body {
  font-size: 0.875rem;
  color: var(--text-sub);
  line-height: 1.7;
  margin: 0 0 20px;
}

.qr-error-limits {
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.qr-error-limit-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
}

.qr-error-limit-label {
  color: var(--text-sub);
}

.qr-error-limit-val {
  color: var(--text);
  font-weight: 600;
}

.qr-error-tip {
  font-size: 0.83rem;
  color: var(--text-sub);
  line-height: 1.65;
  margin: 0 0 8px;
}

.qr-error-tip strong {
  color: var(--text);
}

.qr-error-detail {
  font-size: 0.72rem;
  color: var(--text-dim);
  font-family: monospace;
  margin: 0 0 22px;
  min-height: 0;
}

.qr-error-detail:empty {
  margin-bottom: 14px;
}

.qr-error-close {
  display: block;
  width: 100%;
  padding: 11px;
  background: var(--accent);
  color: #0f1220;
  font-size: 0.875rem;
  font-weight: 700;
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition);
}

.qr-error-close:hover {
  background: var(--accent-hover);
}
