/* =========================================================
   QRIS Studio — dark fintech shell
   ========================================================= */

:root {
  --bg: #05080b;
  --bg-soft: #081015;
  --card: rgba(11, 19, 24, 0.72);
  --card-solid: #0a1217;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #eafff7;
  --muted: #8fa5a3;
  --dim: #5c7271;
  --mint: #22e6a1;
  --mint-soft: #7cffc9;
  --teal: #0fbf83;
  --cyan: #49c8ff;
  --danger: #ff7373;
  --amber: #ffd479;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 11px;
  --font: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

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

html {
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

::selection {
  background: rgba(34, 230, 161, 0.28);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 3px;
  border-radius: 6px;
}

[hidden] {
  display: none !important;
}

/* ---------- ambient background ---------- */

.ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(900px 500px at 78% -12%, rgba(34, 230, 161, 0.1), transparent 60%),
    radial-gradient(700px 420px at 4% 8%, rgba(73, 200, 255, 0.06), transparent 62%),
    linear-gradient(180deg, #060b0f 0%, #05080b 55%, #04070a 100%);
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.55;
}

.orb-a {
  width: 480px;
  height: 480px;
  top: -220px;
  right: -80px;
  background: rgba(34, 230, 161, 0.18);
}

.orb-b {
  width: 420px;
  height: 420px;
  top: 420px;
  left: -220px;
  background: rgba(20, 120, 110, 0.16);
}

.grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 35%, transparent 100%);
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 22px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 18px 28px;
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(5, 8, 11, 0.72);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex-shrink: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(34, 230, 161, 0.18), rgba(34, 230, 161, 0.02));
  border: 1px solid rgba(34, 230, 161, 0.35);
  color: var(--mint);
  box-shadow: 0 0 26px rgba(34, 230, 161, 0.15);
}

.brand-mark svg {
  width: 21px;
  height: 21px;
}

.brand-text {
  font-size: 1.06rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand-text span {
  color: var(--mint);
}

.brand-pill {
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: 99px;
  color: var(--dim);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.tabs {
  display: flex;
  align-items: center;
  gap: 3px;
  margin: 0 auto;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.025);
}

.tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border: 0;
  border-radius: 99px;
  background: transparent;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  transition: color 0.18s ease, background 0.18s ease;
}

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

.tab.is-active {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.count-badge {
  min-width: 18px;
  padding: 1px 5px;
  border-radius: 99px;
  background: rgba(34, 230, 161, 0.14);
  color: var(--mint);
  font-size: 0.64rem;
  font-weight: 700;
  text-align: center;
}

.header-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  padding: 9px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 99px;
  background: transparent;
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 600;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.header-cta:hover {
  border-color: rgba(34, 230, 161, 0.45);
  background: rgba(34, 230, 161, 0.07);
}

.header-cta svg {
  width: 15px;
  height: 15px;
  color: var(--mint);
}

/* ---------- layout ---------- */

.shell {
  max-width: 1240px;
  margin: 0 auto;
  padding: 28px 28px 72px;
}

.panel {
  animation: fadeUp 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 0.75fr);
  gap: 44px;
  align-items: end;
  padding: 34px 4px 38px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--mint);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 0 rgba(34, 230, 161, 0.5);
  animation: pulse 2.2s infinite;
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(2.2rem, 4.6vw, 3.9rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.045em;
  word-spacing: 0.08em;
}

.hero h1 em {
  font-style: normal;
  background: linear-gradient(100deg, var(--mint) 15%, var(--mint-soft) 48%, var(--cyan) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-copy > p {
  max-width: 590px;
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.7;
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.hero-points li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--dim);
  font-size: 0.78rem;
  font-weight: 600;
}

.hero-points svg {
  width: 14px;
  height: 14px;
  color: var(--mint);
}

.free-note {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 590px;
  margin-top: 18px;
  padding: 10px 13px;
  border: 1px solid rgba(34, 230, 161, 0.18);
  border-radius: 12px;
  background: rgba(34, 230, 161, 0.035);
}

.free-badge {
  flex-shrink: 0;
  padding: 4px 9px;
  border: 1px solid rgba(34, 230, 161, 0.28);
  border-radius: 99px;
  background: rgba(34, 230, 161, 0.1);
  color: var(--mint);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.free-note p {
  margin: 0;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.5;
}

.free-note strong {
  color: var(--text);
  font-weight: 700;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 16px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.008));
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.05em;
}

.stat-value span {
  color: var(--mint);
  font-size: 0.9rem;
}

.stat-label {
  color: var(--dim);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr);
  gap: 20px;
  align-items: start;
}

.steps {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  min-width: 0;
}

.steps > *,
.workspace > *,
.api-grid > *,
.integration-card > * {
  min-width: 0;
}

/* ---------- cards ---------- */

.card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.028), transparent 55%),
    var(--card);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(12px);
}

.step-card {
  min-width: 0;
  padding: 26px;
  overflow: hidden;
  animation: fadeUp 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.steps .step-card:nth-child(2) {
  animation-delay: 0.08s;
}

.step-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 22px;
}

.step-num {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(34, 230, 161, 0.3);
  border-radius: 10px;
  background: rgba(34, 230, 161, 0.07);
  color: var(--mint);
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 600;
}

.step-head h2 {
  margin: 1px 0 3px;
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.step-head p {
  margin: 0;
  color: var(--dim);
  font-size: 0.8rem;
}

/* ---------- segmented / source ---------- */

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-bottom: 14px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.24);
}

.segment {
  padding: 9px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--dim);
  font-size: 0.79rem;
  font-weight: 600;
  transition: background 0.18s ease, color 0.18s ease;
}

.segment:hover {
  color: var(--muted);
}

.segment.is-active {
  background: rgba(255, 255, 255, 0.075);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.dropzone {
  display: flex;
  align-items: center;
  gap: 15px;
  width: 100%;
  padding: 22px 18px;
  border: 1.5px dashed rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-md);
  background:
    radial-gradient(300px 120px at 50% 0%, rgba(34, 230, 161, 0.05), transparent 70%),
    rgba(255, 255, 255, 0.012);
  text-align: left;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.dropzone:hover,
.dropzone.is-drag {
  border-color: rgba(34, 230, 161, 0.55);
  background:
    radial-gradient(300px 130px at 50% 0%, rgba(34, 230, 161, 0.12), transparent 70%),
    rgba(34, 230, 161, 0.035);
}

.dropzone.is-drag {
  transform: scale(1.005);
}

.dz-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--mint);
}

.dz-icon svg {
  width: 22px;
  height: 22px;
}

.dz-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.dz-copy strong {
  font-size: 0.88rem;
  font-weight: 700;
}

.dz-copy span {
  color: var(--dim);
  font-size: 0.76rem;
}

.dz-chip {
  margin-left: auto;
  flex-shrink: 0;
  padding: 4px 8px;
  border: 1px solid rgba(34, 230, 161, 0.22);
  border-radius: 99px;
  color: rgba(34, 230, 161, 0.75);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.micro-hint {
  margin: 9px 2px 0;
  color: var(--dim);
  font-size: 0.72rem;
}

/* ---------- paste ---------- */

.field-label {
  display: block;
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 600;
}

.code-input {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.3);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.74rem;
  line-height: 1.6;
  resize: vertical;
  transition: border-color 0.18s ease;
}

.code-input:focus {
  border-color: rgba(34, 230, 161, 0.45);
  outline: none;
}

.code-input::placeholder {
  color: #425452;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: 11px;
  font-size: 0.83rem;
  font-weight: 700;
  line-height: 1.2;
  transition: transform 0.15s ease, background 0.18s ease, border-color 0.18s ease, opacity 0.18s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn svg {
  width: 16px;
  height: 16px;
}

.btn-primary {
  background: linear-gradient(100deg, var(--mint) 0%, #6ef0bd 70%, #9dffd7 100%);
  color: #03130d;
  box-shadow: 0 10px 30px rgba(34, 230, 161, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.btn-primary:hover {
  background: linear-gradient(100deg, #35f0b0, #85ffd0);
}

.btn-primary:disabled {
  cursor: not-allowed;
  opacity: 0.36;
  box-shadow: none;
}

.btn-secondary {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.btn-secondary:hover {
  border-color: rgba(34, 230, 161, 0.4);
  background: rgba(34, 230, 161, 0.06);
}

.btn-ghost {
  border-color: var(--line);
  background: transparent;
  color: var(--muted);
}

.btn-ghost:hover {
  border-color: var(--line-strong);
  color: var(--text);
}

.btn-sm {
  padding: 8px 13px;
  font-size: 0.76rem;
}

.btn-block {
  width: 100%;
  padding: 14px 18px;
  font-size: 0.9rem;
}

.btn-spinner {
  width: 15px;
  height: 15px;
  border: 2px solid rgba(3, 19, 13, 0.25);
  border-top-color: #03130d;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.text-btn {
  border: 0;
  background: transparent;
  color: var(--mint);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 0;
}

.text-btn:hover {
  color: var(--mint-soft);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.icon-btn:hover {
  color: var(--mint);
  border-color: rgba(34, 230, 161, 0.35);
  background: rgba(34, 230, 161, 0.06);
}

.icon-btn svg {
  width: 15px;
  height: 15px;
}

.icon-btn:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

.icon-btn.is-saved {
  color: var(--mint);
  border-color: rgba(34, 230, 161, 0.4);
  background: rgba(34, 230, 161, 0.1);
}

.dropzone[aria-busy="true"] {
  opacity: 0.65;
  pointer-events: none;
}

.danger {
  color: var(--danger) !important;
}

.danger:hover {
  border-color: rgba(255, 115, 115, 0.35) !important;
  background: rgba(255, 115, 115, 0.06) !important;
}

/* ---------- merchant ---------- */

.merchant-card {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-top: 14px;
  padding: 13px;
  border: 1px solid rgba(34, 230, 161, 0.2);
  border-radius: var(--radius-md);
  background: linear-gradient(100deg, rgba(34, 230, 161, 0.075), rgba(34, 230, 161, 0.012));
  animation: fadeUp 0.3s ease both;
}

.merchant-avatar {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--mint), #0c8f66);
  color: #02120c;
  font-size: 1rem;
  font-weight: 800;
}

.merchant-body {
  min-width: 0;
  flex: 1;
}

.merchant-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.merchant-title strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.88rem;
  font-weight: 700;
}

.method-badge {
  flex-shrink: 0;
  padding: 2px 7px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.09);
  color: var(--muted);
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.method-badge.is-dynamic {
  background: rgba(73, 200, 255, 0.13);
  color: var(--cyan);
}

.merchant-meta {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 0.73rem;
}

.merchant-nmid {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 0.62rem;
}

.merchant-actions {
  display: flex;
  gap: 5px;
  flex-shrink: 0;
}

.save-code {
  min-width: 0;
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.25);
  animation: fadeUp 0.3s ease both;
  overflow: hidden;
}

.save-code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.save-code-head span {
  color: var(--dim);
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.save-code code {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(34, 230, 161, 0.8);
  font-family: var(--mono);
  font-size: 0.67rem;
}

.inline-error {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 115, 115, 0.25);
  border-radius: var(--radius-sm);
  background: rgba(255, 115, 115, 0.06);
  color: #ffaaaa;
  font-size: 0.75rem;
}

/* ---------- amount ---------- */

.amount-field {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 17px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.28);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.amount-field:focus-within {
  border-color: rgba(34, 230, 161, 0.55);
  box-shadow: 0 0 0 3px rgba(34, 230, 161, 0.08);
}

.amount-prefix {
  color: var(--mint);
  font-family: var(--mono);
  font-size: 0.95rem;
  font-weight: 600;
}

.amount-field input {
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  outline: none;
}

.amount-field input::placeholder {
  color: #344642;
}

.amount-suffix {
  flex-shrink: 0;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 0.63rem;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.quick-amounts {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 14px 0 20px;
}

.quick {
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: transparent;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}

.quick:hover {
  border-color: rgba(34, 230, 161, 0.4);
  color: var(--text);
}

.quick.is-active {
  border-color: rgba(34, 230, 161, 0.5);
  background: rgba(34, 230, 161, 0.1);
  color: var(--mint);
}

.secure-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 13px 0 0;
  color: var(--dim);
  font-size: 0.68rem;
  text-align: center;
}

.secure-note svg {
  width: 13px;
  height: 13px;
  color: rgba(34, 230, 161, 0.6);
}

/* ---------- result ---------- */

.result-card {
  position: sticky;
  top: 92px;
  min-height: 520px;
  padding: 26px;
  overflow: hidden;
  scroll-margin-top: 92px;
  animation: fadeUp 0.55s 0.16s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.result-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(160deg, rgba(34, 230, 161, 0.24), transparent 35%, transparent 65%, rgba(73, 200, 255, 0.16));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.result-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 466px;
  text-align: center;
}

.ghost-qr {
  position: relative;
  width: 160px;
  height: 160px;
  margin-bottom: 22px;
  color: var(--mint);
  overflow: hidden;
}

.ghost-qr svg {
  width: 100%;
  height: 100%;
}

.scan-line {
  position: absolute;
  left: 8px;
  right: 8px;
  top: 15px;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(34, 230, 161, 0.85), transparent);
  box-shadow: 0 0 16px rgba(34, 230, 161, 0.55);
  animation: scan 3s ease-in-out infinite;
}

.result-empty h3 {
  margin: 0 0 8px;
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.result-empty p {
  max-width: 300px;
  margin: 0;
  color: var(--dim);
  font-size: 0.79rem;
  line-height: 1.65;
}

.empty-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.empty-list li {
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 99px;
  color: var(--dim);
  font-size: 0.64rem;
  font-weight: 600;
}

.result-content {
  animation: fadeUp 0.4s ease both;
}

.result-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 15px;
  color: var(--mint);
  font-family: var(--mono);
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 10px rgba(34, 230, 161, 0.8);
  animation: pulse 2s infinite;
}

.qr-frame {
  position: relative;
  padding: 13px;
  border-radius: 19px;
  background: #fff;
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.4);
}

.qr-frame img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 7px;
}

.corner {
  position: absolute;
  width: 16px;
  height: 16px;
  border-color: var(--mint);
  border-style: solid;
  border-width: 0;
}

.corner.tl { top: -5px; left: -5px; border-top-width: 2px; border-left-width: 2px; border-radius: 8px 0 0 0; }
.corner.tr { top: -5px; right: -5px; border-top-width: 2px; border-right-width: 2px; border-radius: 0 8px 0 0; }
.corner.bl { bottom: -5px; left: -5px; border-bottom-width: 2px; border-left-width: 2px; border-radius: 0 0 0 8px; }
.corner.br { bottom: -5px; right: -5px; border-bottom-width: 2px; border-right-width: 2px; border-radius: 0 0 8px 0; }

.result-amount {
  margin: 20px 0 2px;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.05em;
  text-align: center;
}

.result-merchant {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
}

.result-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 3px;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 0.64rem;
}

.dot-sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--dim);
}

.result-actions {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 8px;
  margin-top: 20px;
}

.result-note {
  margin: 15px 0 0;
  color: var(--dim);
  font-size: 0.68rem;
  line-height: 1.6;
  text-align: center;
}

.payload-details {
  margin-top: 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.18);
}

.payload-details summary {
  padding: 10px 12px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.payload-details summary::-webkit-details-marker {
  display: none;
}

.payload-details summary::before {
  content: "+";
  display: inline-block;
  width: 14px;
  color: var(--mint);
  font-family: var(--mono);
}

.payload-details[open] summary::before {
  content: "−";
}

.payload-block {
  padding: 0 12px 11px;
}

.payload-label {
  display: block;
  margin-bottom: 3px;
  color: var(--dim);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.payload-block code {
  display: block;
  margin-bottom: 5px;
  color: rgba(34, 230, 161, 0.72);
  font-family: var(--mono);
  font-size: 0.62rem;
  line-height: 1.55;
  word-break: break-all;
}

/* ---------- saved ---------- */

.panel-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 38px 4px 26px;
}

.panel-heading .eyebrow {
  margin-bottom: 10px;
}

.panel-heading h1,
.panel-heading h2 {
  margin: 0 0 6px;
  font-size: clamp(1.7rem, 3.5vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.045em;
}

.panel-heading-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.panel-heading p {
  max-width: 560px;
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

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

.saved-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--card);
  animation: fadeUp 0.35s ease both;
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.saved-card:hover {
  border-color: rgba(34, 230, 161, 0.28);
  transform: translateY(-2px);
}

.saved-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.saved-avatar {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(34, 230, 161, 0.9), rgba(14, 120, 90, 0.9));
  color: #03130d;
  font-size: 1rem;
  font-weight: 800;
}

.saved-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.9rem;
  font-weight: 700;
}

.saved-meta {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--dim);
  font-size: 0.71rem;
}

.saved-code-preview {
  overflow: hidden;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.24);
  color: rgba(34, 230, 161, 0.65);
  font-family: var(--mono);
  font-size: 0.63rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.saved-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.saved-actions .btn-primary {
  flex: 1;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px 24px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  text-align: center;
}

.empty-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 15px;
  color: var(--mint);
  background: rgba(34, 230, 161, 0.05);
}

.empty-icon svg {
  width: 24px;
  height: 24px;
}

.empty-state h3 {
  margin: 0 0 6px;
  font-size: 1rem;
}

.empty-state p {
  max-width: 380px;
  margin: 0 0 18px;
  color: var(--dim);
  font-size: 0.8rem;
}

/* ---------- api ---------- */

.api-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.api-card {
  padding: 22px;
}

.api-endpoint-card {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  background:
    radial-gradient(500px 160px at 0% 0%, rgba(34, 230, 161, 0.08), transparent 65%),
    var(--card);
}

.api-label {
  display: block;
  color: var(--dim);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.endpoint {
  display: block;
  overflow-x: auto;
  color: var(--mint);
  font-family: var(--mono);
  font-size: clamp(1.05rem, 2.6vw, 1.5rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.api-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 99px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 500;
}

.api-note {
  margin: 12px 0 0;
  color: var(--dim);
  font-size: 0.72rem;
  line-height: 1.65;
}

.api-note code,
.integration-copy p code {
  padding: 1px 5px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.25);
  color: rgba(34, 230, 161, 0.85);
  font-family: var(--mono);
  font-size: 0.68rem;
}

.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}

.code-head + .code-block {
  margin-top: 8px;
}

.code-hint {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.02em;
}

.code-block {
  margin: 12px 0 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.3);
  overflow-x: auto;
}

.code-block code {
  color: #b8d6cc;
  font-family: var(--mono);
  font-size: 0.68rem;
  line-height: 1.7;
  white-space: pre;
}

.code-block-json code,
.code-block-curl code,
.platform-example .code-block code {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.code-block span {
  color: var(--mint);
}

.api-playground {
  grid-column: 1 / -1;
  background:
    radial-gradient(650px 220px at 0% 0%, rgba(73, 200, 255, 0.055), transparent 60%),
    radial-gradient(600px 200px at 100% 100%, rgba(34, 230, 161, 0.05), transparent 65%),
    var(--card);
}

.playground-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 28px;
  align-items: start;
}

.playground-main h2 {
  margin: 8px 0;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.035em;
}

.playground-lead {
  max-width: 560px;
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.7;
}

.playground-form {
  display: flex;
  align-items: stretch;
  gap: 9px;
  margin-top: 16px;
}

.test-amount {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: rgba(0, 0, 0, 0.25);
  transition: border-color 0.18s ease;
}

.test-amount:focus-within {
  border-color: rgba(34, 230, 161, 0.5);
}

.test-amount > span {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 0.72rem;
}

.test-amount input {
  width: 128px;
  padding: 11px 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.86rem;
  font-weight: 600;
  outline: none;
}

.api-test-result {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid rgba(34, 230, 161, 0.18);
  border-radius: 12px;
  background: rgba(34, 230, 161, 0.035);
}

.test-status {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.75rem;
}

.test-status strong {
  color: var(--mint);
  font-family: var(--mono);
  font-size: 0.72rem;
}

.test-status span:last-child {
  margin-left: auto;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 0.65rem;
}

.test-body {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin-top: 12px;
}

.test-qr {
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  padding: 6px;
  border-radius: 10px;
  background: #fff;
}

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

.test-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
  min-width: 0;
}

.test-facts div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.test-facts span {
  color: var(--dim);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.test-facts strong {
  overflow: hidden;
  color: var(--text);
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.test-facts code {
  display: block;
  overflow: hidden;
  color: rgba(34, 230, 161, 0.85);
  font-family: var(--mono);
  font-size: 0.62rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.test-payload {
  grid-column: 1 / -1;
}

.test-error {
  margin: 10px 0 0;
  padding: 8px 10px;
  border: 1px solid rgba(255, 115, 115, 0.2);
  border-radius: 8px;
  background: rgba(255, 115, 115, 0.06);
  color: #ffc4c4;
  font-size: 0.72rem;
  line-height: 1.5;
}

.api-test-result.is-error {
  border-color: rgba(255, 115, 115, 0.25);
  background: rgba(255, 115, 115, 0.035);
}

.api-test-result.is-error .test-status strong {
  color: var(--danger);
}

.api-test-result.is-error .live-dot {
  background: var(--danger);
  box-shadow: none;
  animation: none;
}

.api-test-result.is-error .test-body {
  display: none;
}

.playground-side {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.18);
}

.playground-side .code-head {
  margin-top: 0;
}

.code-block-curl {
  max-height: 248px;
  overflow: auto;
}

.demo-payload {
  margin-top: 12px;
}

.demo-payload summary {
  color: var(--dim);
  font-size: 0.68rem;
  font-weight: 600;
  cursor: pointer;
}

.demo-payload summary:hover {
  color: var(--mint);
}

.demo-payload-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 8px;
}

.demo-payload-row code {
  flex: 1;
  min-width: 0;
  max-height: 68px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.3);
  color: #b8d6cc;
  font-family: var(--mono);
  font-size: 0.58rem;
  line-height: 1.6;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

.api-more {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.055);
}

.api-more summary {
  color: var(--dim);
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
}

.api-more summary:hover {
  color: var(--mint);
}

.param-table {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 12px;
}

.param-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
  padding-bottom: 9px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
}

.param-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.param-row > code {
  color: var(--mint);
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
}

.param-row > span {
  color: var(--dim);
  font-size: 0.73rem;
  line-height: 1.55;
}

.param-row span code {
  padding: 0 3px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.66rem;
}

.api-platforms {
  grid-column: 1 / -1;
  background:
    radial-gradient(700px 220px at 100% 0%, rgba(34, 230, 161, 0.06), transparent 65%),
    var(--card);
}

.platform-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.platform-head h2 {
  margin: 8px 0;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.035em;
}

.platform-head p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.7;
}

.platform-free {
  flex-shrink: 0;
  padding: 6px 12px;
  border: 1px solid rgba(34, 230, 161, 0.3);
  border-radius: 99px;
  background: rgba(34, 230, 161, 0.06);
  color: var(--mint);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.platform-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 16px;
}

.platform-chips span {
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.65rem;
}

.platform-examples {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
  margin-top: 18px;
}

.platform-example {
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.18);
}

.platform-example summary {
  color: var(--text);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
}

.platform-example summary:hover,
.platform-example[open] summary {
  color: var(--mint);
}

.platform-example .code-block {
  max-height: 300px;
  margin-top: 10px;
  overflow: auto;
}

.integration-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 30px;
  margin-top: 14px;
  padding: 28px;
  background:
    radial-gradient(650px 220px at 8% 0%, rgba(34, 230, 161, 0.09), transparent 65%),
    var(--card);
}

.integration-copy h2 {
  margin: 8px 0 8px;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.035em;
}

.integration-copy > p {
  max-width: 600px;
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.7;
}

.integration-side {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 9px;
  padding: 20px;
  border: 1px solid rgba(34, 230, 161, 0.16);
  border-radius: var(--radius-md);
  background: rgba(34, 230, 161, 0.035);
}

.integration-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 5px;
  border: 1px solid rgba(34, 230, 161, 0.24);
  border-radius: 12px;
  color: var(--mint);
}

.integration-icon svg {
  width: 21px;
  height: 21px;
}

.status-line {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.78rem;
  font-weight: 700;
}

.integration-small {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 0.63rem;
}

/* ---------- 404 ---------- */

.notfound-shell {
  display: grid;
  place-items: center;
  min-height: 66vh;
}

.notfound {
  max-width: 560px;
  padding: 40px 20px;
  text-align: center;
}

.notfound h1 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.05em;
}

.notfound p {
  margin: 0 auto;
  max-width: 430px;
  color: var(--muted);
  font-size: 0.87rem;
  line-height: 1.75;
}

.notfound-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
  margin-top: 24px;
}

/* ---------- seo content ---------- */

.seo-section {
  margin-top: 46px;
  padding: 44px 4px 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.seo-head {
  max-width: 780px;
}

.seo-head .eyebrow {
  margin-bottom: 10px;
}

.seo-head h2 {
  margin: 0 0 12px;
  font-size: clamp(1.55rem, 3vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.12;
}

.seo-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.75;
}

.seo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 26px;
}

.seo-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 60%),
    rgba(0, 0, 0, 0.16);
}

.seo-card h3 {
  margin: 0 0 8px;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.seo-card p,
.seo-card li {
  color: var(--dim);
  font-size: 0.76rem;
  line-height: 1.7;
}

.seo-card p {
  margin: 0;
}

.seo-card ul {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding-left: 17px;
}

.seo-card .text-link {
  display: inline-block;
  margin-top: 13px;
  color: var(--mint);
  font-size: 0.74rem;
  font-weight: 700;
}

.seo-card .text-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.seo-faq {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
  margin-top: 30px;
}

.seo-faq h3 {
  grid-column: 1 / -1;
  margin: 0 0 4px;
  font-size: 1rem;
  font-weight: 700;
}

.seo-faq details {
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.16);
}

.seo-faq summary {
  color: var(--text);
  font-size: 0.77rem;
  font-weight: 700;
  cursor: pointer;
}

.seo-faq summary:hover {
  color: var(--mint);
}

.seo-faq p {
  margin: 8px 0 0;
  color: var(--dim);
  font-size: 0.73rem;
  line-height: 1.7;
}

.seo-faq a {
  color: var(--mint);
  font-weight: 600;
}

/* ---------- footer / toast ---------- */

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 26px 28px 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--dim);
  font-size: 0.7rem;
}

.footer-dot {
  color: rgba(34, 230, 161, 0.5);
}

.site-footer a {
  color: var(--muted);
  font-weight: 600;
}

.site-footer a:hover {
  color: var(--mint);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 80;
  max-width: min(92vw, 420px);
  padding: 12px 18px;
  border: 1px solid rgba(34, 230, 161, 0.28);
  border-radius: 12px;
  background: rgba(8, 20, 16, 0.96);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
  color: var(--text);
  font-size: 0.79rem;
  font-weight: 600;
  text-align: center;
  transform: translate(-50%, 16px);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
  pointer-events: none;
  backdrop-filter: blur(16px);
}

.toast.is-visible {
  transform: translate(-50%, 0);
  opacity: 1;
}

.toast.is-error {
  border-color: rgba(255, 115, 115, 0.3);
  color: #ffc4c4;
}

.noscript {
  padding: 30px;
  color: var(--danger);
  text-align: center;
}

/* Netlify injects its badge iframe on free sites; keep the UI clean. */
#nl-badge-frame,
#nl-hud-frame {
  display: none !important;
}

/* ---------- animations ---------- */

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 230, 161, 0.45); }
  70% { box-shadow: 0 0 0 7px rgba(34, 230, 161, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 230, 161, 0); }
}

@keyframes scan {
  0%, 100% { transform: translateY(0); opacity: 0.2; }
  50% { transform: translateY(128px); opacity: 1; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes shake {
  10%, 90% { transform: translateX(-1px); }
  20%, 80% { transform: translateX(2px); }
  30%, 50%, 70% { transform: translateX(-4px); }
  40%, 60% { transform: translateX(4px); }
}

.shake {
  animation: shake 0.45s ease;
}

/* ---------- responsive ---------- */

@media (max-width: 1020px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 26px;
    align-items: start;
  }

  .hero-stats {
    max-width: 430px;
  }

  .workspace {
    grid-template-columns: 1fr;
  }

  .result-card {
    position: static;
    min-height: 0;
    scroll-margin-top: 96px;
  }

  .result-empty {
    min-height: 380px;
  }

  .result-content {
    max-width: 460px;
    margin: 0 auto;
  }
}

@media (max-width: 820px) {
  .result-card {
    scroll-margin-top: 138px;
  }

  .site-header {
    flex-wrap: wrap;
    gap: 12px;
    padding: 14px 18px;
  }

  .tabs {
    order: 3;
    width: 100%;
    justify-content: space-between;
    margin: 0;
  }

  .tab {
    flex: 1;
    justify-content: center;
    padding: 8px 10px;
  }

  .header-cta {
    margin-left: auto;
  }

  .shell {
    padding: 18px 18px 60px;
  }

  .hero {
    padding: 22px 2px 30px;
  }

  .api-grid {
    grid-template-columns: 1fr;
  }

  .playground-grid,
  .platform-examples,
  .seo-grid {
    grid-template-columns: 1fr;
  }

  .integration-card {
    grid-template-columns: 1fr;
  }

  .integration-side {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }

  .integration-icon {
    margin-bottom: 0;
  }
}

@media (max-width: 600px) {
  body {
    font-size: 14px;
  }

  .brand-pill,
  .header-cta span {
    display: none;
  }

  .header-cta {
    padding: 9px;
    border-radius: 10px;
  }

  .panel-heading {
    flex-direction: column;
    align-items: flex-start;
    padding: 26px 2px 20px;
  }

  .step-card,
  .result-card,
  .api-card,
  .integration-card {
    padding: 19px;
    border-radius: 18px;
  }

  .dropzone {
    flex-wrap: wrap;
    padding: 18px 15px;
  }

  .dz-chip {
    display: none;
  }

  .hero-stats {
    gap: 7px;
  }

  .stat {
    padding: 12px 10px;
  }

  .stat-value {
    font-size: 1.2rem;
  }

  .result-actions {
    grid-template-columns: 1fr;
  }

  .result-amount {
    font-size: 1.75rem;
  }

  .param-row {
    grid-template-columns: 95px 1fr;
  }

  .free-note {
    flex-direction: column;
    align-items: flex-start;
    gap: 7px;
  }

  .playground-form {
    flex-wrap: wrap;
  }

  .test-amount {
    flex: 1;
  }

  .test-amount input {
    width: 100%;
  }

  .test-body {
    grid-template-columns: 78px minmax(0, 1fr);
  }

  .test-qr {
    width: 78px;
    height: 78px;
  }

  .test-facts {
    grid-template-columns: 1fr;
  }

  .test-payload {
    grid-column: auto;
  }

  .platform-head {
    flex-direction: column;
  }

  .seo-faq {
    grid-template-columns: 1fr;
  }

  .panel-heading h1,
  .panel-heading h2 {
    font-size: 1.6rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
