:root {
  --bg: #0a0a0a;
  --bg-card: #161616;
  --bg-card-hover: #1e1e1e;
  --border: #2a2a2a;
  --text: #f5f5f5;
  --text-dim: #8a8a8a;
  --text-muted: #555;
  --accent: #ff6b1a;
  --accent-dim: #a84510;
  --green: #4ade80;
  --yellow: #fbbf24;
  --red: #f87171;
  --radius: 10px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
  line-height: 1.5;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: calc(20px + env(safe-area-inset-top)) calc(24px + env(safe-area-inset-right)) 16px calc(24px + env(safe-area-inset-left));
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  max-width: 1400px;
  margin: 0 auto 14px;
  flex-wrap: wrap;
}

h1 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

h1 .accent {
  color: var(--accent);
  font-weight: 500;
}

.subtitle {
  font-size: 13px;
  color: var(--text-dim);
  margin-top: 4px;
}

.header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.toggles-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.lang-toggle {
  display: inline-flex;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}
.lang-toggle button {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 5px 11px;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
  min-width: 36px;
}
.lang-toggle button:hover { color: var(--text); }
.lang-toggle button.active {
  background: var(--accent);
  color: #fff;
}

.stats {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  color: var(--text-dim);
  white-space: nowrap;
}

.currency-toggle {
  display: inline-flex;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}
.currency-toggle button {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
  min-width: 44px;
}
.currency-toggle button:hover { color: var(--text); }
.currency-toggle button.active {
  background: var(--accent);
  color: #fff;
}

#search {
  display: block;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto 14px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
}

#search:focus {
  outline: none;
  border-color: var(--accent);
}

.filters-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 11px 16px;
  border-radius: var(--radius);
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  transition: all 0.15s ease;
}
.filters-toggle:hover { border-color: var(--accent-dim); }
.filters-toggle.open { border-color: var(--accent-dim); border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.filters-toggle-icon {
  font-size: 16px;
  color: var(--accent);
  flex-shrink: 0;
}
.filters-toggle-label {
  flex: 1 1 auto;
  letter-spacing: 0.3px;
}
.filters-active-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
}
.filters-active-badge[hidden] { display: none; }
.filters-caret {
  color: var(--text-dim);
  font-size: 12px;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
.filters-toggle.open .filters-caret { transform: rotate(180deg); }

.filters {
  max-width: 1400px;
  margin: 6px auto 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 14px 16px;
}
.filters[hidden] { display: none; }

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.chip {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.chip:hover {
  border-color: var(--accent-dim);
  color: var(--text);
}

.chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.sort-chip {
  margin-left: auto;
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-dim);
  cursor: pointer;
  padding: 6px 0;
}

.switch input {
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
}

.switch:hover { color: var(--text); }

main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px;
}

/* --- Hint banner para crear pack --- */
.pack-hint {
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, rgba(255, 107, 26, 0.14), rgba(255, 107, 26, 0.04));
  border: 1px solid var(--accent-dim);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 20px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
}
.pack-hint strong { color: var(--accent); font-size: 15px; }
.pack-hint em {
  color: var(--accent);
  font-style: normal;
  font-weight: 700;
  background: rgba(255, 107, 26, 0.15);
  padding: 1px 6px;
  border-radius: 4px;
}
.pack-hint-icon {
  font-size: 26px;
  flex-shrink: 0;
}

.section-heading {
  grid-column: 1 / -1;
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
  margin: 20px 0 4px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.section-heading:first-child { margin-top: 0; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.card:hover {
  border-color: var(--accent-dim);
  transform: translateY(-2px);
  background: var(--bg-card-hover);
}

.card-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.card-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.card-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.card-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  background: #222;
  color: var(--text-dim);
  border: 1px solid var(--border);
}

.badge.cat { color: var(--accent); border-color: var(--accent-dim); }
.badge.cal { color: var(--text); }

.card-price {
  margin-top: auto;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.price-main {
  font-size: 24px;
  font-weight: 800;
  color: var(--green);
  letter-spacing: -0.5px;
}

.price-main .asterisk {
  color: var(--yellow);
  font-size: 16px;
  vertical-align: super;
  margin-left: 2px;
}
.price-main .price-unit {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-dim);
  margin-left: 4px;
  letter-spacing: 0;
}

.card.inferred .price-main { color: var(--yellow); }
.card.no-price .price-main, .price-main.no-data { color: var(--text-muted); font-size: 14px; font-weight: 500; }

/* --- Controles de añadir al pack en cada card --- */
.card-pack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.card-pack-shots {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
}
.card-pack input[type="number"] {
  width: 68px;
  background: #0b0b0b;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 8px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  font-family: inherit;
  -moz-appearance: textfield;
}
.card-pack input[type="number"]::-webkit-outer-spin-button,
.card-pack input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.card-pack input[type="number"]:focus { outline: none; border-color: var(--accent); }
.card-pack-label {
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 500;
}
.btn-pack {
  display: block;
  width: 100%;
  background: var(--accent);
  border: none;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition: all 0.15s ease;
  letter-spacing: 0.2px;
  box-shadow: 0 2px 10px rgba(255, 107, 26, 0.25);
}
.btn-pack:hover {
  background: #ff7d35;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(255, 107, 26, 0.4);
}
.btn-pack.btn-remove {
  background: transparent;
  border: 1.5px solid var(--green);
  color: var(--green);
  box-shadow: none;
}
.btn-pack.btn-remove:hover {
  background: rgba(74, 222, 128, 0.1);
  transform: none;
  box-shadow: none;
}
.card.in-pack {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-dim) inset, 0 4px 20px rgba(255, 107, 26, 0.15);
}

.empty {
  text-align: center;
  color: var(--text-dim);
  padding: 60px 20px;
  font-size: 15px;
}

.hidden { display: none !important; }

/* --- Pack flotante --- */
.pack {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 50;
  width: min(440px, calc(100vw - 32px));
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  overflow: hidden;
  background: #0d0d0d;
  border: 1px solid var(--accent-dim);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6), 0 2px 10px rgba(255, 107, 26, 0.15);
}

.pack-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  background: linear-gradient(135deg, #1a1a1a, #0d0d0d);
  border: none;
  color: var(--text);
  padding: 14px 18px;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  min-width: 0;
}
.pack-toggle:hover { background: linear-gradient(135deg, #222, #111); }

.pack-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  flex-shrink: 0;
}

.pack-toggle-text {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pack-toggle-total {
  color: var(--green);
  font-size: 15px;
  font-weight: 800;
  flex-shrink: 0;
  white-space: nowrap;
}

.pack-caret {
  color: var(--text-dim);
  font-size: 12px;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
.pack.open .pack-caret { transform: rotate(180deg); }

.pack-body {
  border-top: 1px solid var(--border);
  max-height: min(60vh, 520px);
  display: flex;
  flex-direction: column;
}
.pack-body[hidden] { display: none; }

.pack-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
}
.pack-header h3 {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.3px;
}
.pack-header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.pack-clear {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
}
.pack-clear:hover { color: var(--red); border-color: var(--red); }

.pack-copy {
  background: transparent;
  border: 1px solid var(--accent-dim);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.pack-copy:hover {
  background: rgba(255, 107, 26, 0.12);
  border-color: var(--accent);
}
.pack-copy.copied {
  background: var(--green);
  border-color: var(--green);
  color: #0a0a0a;
}

.pack-list {
  list-style: none;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 4px 0;
  flex: 1 1 auto;
  min-height: 0;
}

.pack-item {
  display: grid;
  grid-template-columns: 44px 1fr auto auto auto;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid #1a1a1a;
}
.pack-item:last-child { border-bottom: none; }

.pack-item-img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  background: #fff;
  border-radius: 6px;
}

.pack-item-info { min-width: 0; }
.pack-item-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pack-item-meta {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 2px;
}

.pack-item-shots {
  display: flex;
  align-items: center;
  gap: 4px;
}
.pack-item-shots input {
  width: 52px;
  background: #0b0b0b;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 4px 6px;
  border-radius: 5px;
  font-size: 12px;
  font-family: inherit;
  -moz-appearance: textfield;
}
.pack-item-shots input::-webkit-outer-spin-button,
.pack-item-shots input::-webkit-inner-spin-button {
  -webkit-appearance: none; margin: 0;
}
.pack-item-shots input:focus { outline: none; border-color: var(--accent); }
.pack-item-shots span {
  font-size: 10px;
  color: var(--text-muted);
}

.pack-item-total {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 70px;
}
.pack-item-total strong {
  font-size: 15px;
  color: var(--green);
  font-weight: 800;
}

.pack-item-remove {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  line-height: 1;
  padding: 4px 6px;
  cursor: pointer;
  border-radius: 4px;
}
.pack-item-remove:hover { color: var(--red); background: #1a1a1a; }

.pack-footer {
  padding: 14px 18px;
  border-top: 1px solid var(--border);
  background: #0a0a0a;
}
.pack-totals {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.pack-totals strong {
  font-size: 24px;
  color: var(--green);
  font-weight: 800;
  letter-spacing: -0.5px;
}
#packTotalShots {
  font-size: 12px;
  color: var(--text-dim);
}

footer {
  max-width: 1400px;
  margin: 40px auto 0;
  padding: 24px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.7;
}
footer p + p { margin-top: 6px; }

@media (max-width: 700px) {
  .site-header {
    padding: calc(14px + env(safe-area-inset-top)) calc(16px + env(safe-area-inset-right)) 12px calc(16px + env(safe-area-inset-left));
  }
  h1 { font-size: 22px; }
  main {
    padding: 16px;
    padding-bottom: 120px;
    padding-left: calc(16px + env(safe-area-inset-left));
    padding-right: calc(16px + env(safe-area-inset-right));
  }
  .sort-chip { margin-left: 0; }
  .pack-hint { padding: 12px 14px; font-size: 13px; gap: 10px; margin-bottom: 14px; }
  .pack-hint strong { font-size: 14px; }
  .pack-hint-icon { font-size: 22px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
  .card-name { font-size: 13px; }
  .price-main { font-size: 20px; }
  .stats { display: none; }
  .header-right { align-items: flex-start; }

  .pack {
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    border-radius: 14px 14px 0 0;
    border-bottom: none;
    border-left: none;
    border-right: none;
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }
  .pack-body { max-height: 70vh; }
  .pack-item {
    grid-template-columns: 36px 1fr auto;
    grid-template-areas:
      "img info remove"
      "img shots total";
    gap: 6px 10px;
    padding: 10px 12px;
  }
  .pack-item-img { grid-area: img; width: 36px; height: 36px; }
  .pack-item-info { grid-area: info; }
  .pack-item-shots { grid-area: shots; justify-self: start; }
  .pack-item-total { grid-area: total; }
  .pack-item-remove { grid-area: remove; justify-self: end; }

  .card-pack input[type="number"] { width: 56px; padding: 6px; font-size: 14px; }
  .card-pack-label { font-size: 11px; }
  .btn-pack { font-size: 13px; padding: 9px 10px; }
}

/* --- Card specs row --- */
.card-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0;
}
.card-specs .spec {
  font-size: 11px;
  color: var(--text-dim);
  background: rgba(255,255,255,0.06);
  border-radius: 4px;
  padding: 2px 6px;
  white-space: nowrap;
}

/* --- Min shots notice --- */
.card-min-shots {
  display: block;
  font-size: 11px;
  color: var(--accent);
  margin-top: 3px;
  font-weight: 500;
}

/* --- Card image clickable --- */
.card-img {
  cursor: pointer;
}
.card-name {
  cursor: pointer;
}
.card-name:hover {
  color: var(--accent);
}

/* --- Weapon detail modal --- */
.weapon-detail-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.15s ease;
}
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }

.weapon-detail-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
  position: relative;
}
.detail-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 22px;
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}
.detail-close:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}
.detail-header {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 20px;
}
.detail-img {
  width: 120px;
  height: 90px;
  object-fit: contain;
  border-radius: 6px;
  background: rgba(0,0,0,0.3);
  flex-shrink: 0;
}
.detail-title-block {
  flex: 1;
  min-width: 0;
}
.detail-name {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 8px 0;
  line-height: 1.2;
}
.detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.detail-badges .badge.section {
  background: rgba(255,107,26,0.15);
  color: var(--accent);
}
.detail-price {
  font-size: 16px;
  font-weight: 600;
  color: var(--accent);
}
.detail-specs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}
.detail-spec-item {
  background: rgba(255,255,255,0.05);
  border-radius: 6px;
  padding: 10px 12px;
}
.detail-spec-label {
  display: block;
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.detail-spec-value {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
}
.detail-official-link {
  display: inline-block;
  color: var(--accent);
  font-size: 14px;
  text-decoration: none;
  padding: 8px 0;
  font-weight: 500;
}
.detail-official-link:hover {
  text-decoration: underline;
}

@media (max-width: 600px) {
  .weapon-detail-panel { padding: 18px; }
  .detail-header { flex-direction: column; align-items: center; text-align: center; }
  .detail-img { width: 160px; height: 120px; }
  .detail-badges { justify-content: center; }
  .detail-specs-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
}

/* --- Botón compartir QR/enlace en el pack --- */
.pack-share {
  background: var(--accent);
  border: 1px solid var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition: all 0.15s ease;
  box-shadow: 0 2px 8px rgba(255, 107, 26, 0.3);
}
.pack-share:hover { background: #ff7d35; transform: translateY(-1px); }

/* --- Modal QR / enlace --- */
.qr-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.15s ease;
}
.qr-panel {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 30px 24px 22px;
  max-width: 380px;
  width: 100%;
  text-align: center;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.6);
}
.qr-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 20px;
  cursor: pointer;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}
.qr-close:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.qr-title {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  line-height: 1.25;
  margin: 0 8px 6px;
}
.qr-subtitle {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.45;
  margin: 0 0 18px;
}
.qr-code-slot {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}
.qr-canvas {
  width: min(260px, 62vw);
  height: auto;
  background: #fff;
  border-radius: 10px;
  padding: 8px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
  image-rendering: pixelated;
}
.qr-toobig {
  color: var(--yellow);
  font-size: 14px;
  line-height: 1.5;
  padding: 30px 16px;
}
.qr-link-row {
  display: flex;
  gap: 8px;
}
.qr-link-input {
  flex: 1 1 auto;
  min-width: 0;
  background: #0b0b0b;
  border: 1px solid var(--border);
  color: var(--text-dim);
  border-radius: 8px;
  padding: 9px 10px;
  font-size: 12px;
  font-family: inherit;
}
.qr-link-input:focus { outline: none; border-color: var(--accent); }
.qr-copy-link {
  flex-shrink: 0;
  background: var(--accent);
  border: none;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 9px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.qr-copy-link:hover { background: #ff7d35; }
.qr-copy-link.copied { background: var(--green); color: #0a0a0a; }
