:root {
  --bg0: #f7f4ff;
  --indigo: #5b5bf0;
  --pink:   #ff4fa8;
  --cyan:   #33c9e6;
  --mint:   #26d0a7;
  --gold:   #f2a93b;
  --ink:    #20213d;
  --mute:   #6e6f95;
  --line:   rgba(30,30,70,0.08);
  --flame:  #ff6a3d;
  --flame2: #ffb56a;
}
* { box-sizing: border-box; -webkit-font-smoothing: antialiased; }
html, body { margin: 0; height: 100%; }
body {
  font-family: 'Heebo', 'Segoe UI', Arial, sans-serif;
  background: var(--bg0);
  color: var(--ink);
  min-height: 100vh;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 28px 16px 60px;
  overflow-x: hidden; position: relative;
}
body::before, body::after, .orb {
  content: ""; position: fixed; border-radius: 50%;
  filter: blur(90px); opacity: 0.55; pointer-events: none; z-index: 0;
  animation: float 18s ease-in-out infinite;
}
body::before { width: 520px; height: 520px; background: radial-gradient(circle, #ffc6e0, transparent 70%); top: -140px; right: -140px; }
body::after  { width: 620px; height: 620px; background: radial-gradient(circle, #c5d6ff, transparent 70%); bottom: -200px; left: -180px; animation-delay: -9s; }
.orb { width: 420px; height: 420px; background: radial-gradient(circle, #d6f8ee, transparent 70%); top: 30%; left: 55%; animation-delay: -4s; opacity: 0.6; }
@keyframes float {
  0%,100% { transform: translate(0,0) scale(1); }
  33%     { transform: translate(40px,-30px) scale(1.08); }
  66%     { transform: translate(-30px,50px) scale(0.95); }
}
.noise {
  position: fixed; inset: 0; pointer-events: none; z-index: 1; opacity: 0.45;
  background-image: radial-gradient(circle at 1px 1px, rgba(91,91,240,0.07) 1px, transparent 0);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse at center, #000 10%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 10%, transparent 75%);
}

/* Cards */
[hidden] { display: none !important; }
.screen { position: relative; z-index: 2; display: block; }
.card {
  width: 100%; max-width: 820px;
  padding: 38px 36px 32px;
  border-radius: 28px;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.95), rgba(255,255,255,0.82));
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  border: 1px solid rgba(255,255,255,0.9);
  box-shadow:
    0 40px 120px -40px rgba(91,91,240,0.45),
    0 14px 44px -14px rgba(255,79,168,0.22),
    inset 0 1px 0 rgba(255,255,255,1);
  position: relative;
  margin: 0 auto;
}
.card::before {
  content: ""; position: absolute; inset: -1px; border-radius: 24px; padding: 1.5px;
  background: linear-gradient(135deg, var(--pink), var(--indigo), var(--cyan), var(--mint), var(--gold));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0.55; pointer-events: none;
}
.login-card {
  max-width: 440px;
  padding: 44px 36px 32px;
  margin-top: 6vh;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.login-card::after {
  content: ""; position: absolute; inset: -40% 50% auto -20%;
  height: 260px;
  background:
    radial-gradient(circle at 50% 50%, rgba(91,91,240,0.18), transparent 60%);
  pointer-events: none;
}

/* Animated gradient badge */
.login-badge {
  position: relative; width: 84px; height: 84px;
  margin: 0 auto 18px;
  display: inline-flex; align-items: center; justify-content: center;
}
.login-badge-ring {
  position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid transparent;
  background: linear-gradient(135deg, var(--pink), var(--indigo) 50%, var(--cyan)) border-box;
  -webkit-mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: badge-spin 14s linear infinite;
}
.login-badge-ring:nth-child(2) {
  inset: 8px; opacity: 0.55; animation-duration: 22s; animation-direction: reverse;
}
@keyframes badge-spin { to { transform: rotate(360deg); } }
.login-badge-core {
  width: 54px; height: 54px; border-radius: 50%;
  background: linear-gradient(135deg, var(--pink) 0%, var(--indigo) 55%, var(--cyan) 100%);
  color: #fff; font-size: 24px; font-weight: 900;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow:
    0 14px 32px -10px rgba(91,91,240,0.55),
    inset 0 1px 0 rgba(255,255,255,0.4);
  position: relative; z-index: 1;
}

.login-card .brand-title { font-size: 36px; }
.login-lede {
  margin: 8px auto 28px;
  font-size: 13.5px; color: var(--mute);
  max-width: 320px; line-height: 1.5;
}

/* Password input wrap — icon + input */
.login-pwd-wrap {
  position: relative;
}
.login-pwd-wrap input {
  padding-right: 44px !important;
}
.login-pwd-icon {
  position: absolute; right: 14px; top: 50%;
  transform: translateY(-50%);
  font-size: 16px; opacity: 0.6;
  pointer-events: none;
}

/* Login button arrow */
.login-card .btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 10px;
}
.login-arrow {
  display: inline-block;
  transition: transform .25s ease;
}
.login-card .btn:hover:not(:disabled) .login-arrow {
  transform: translateX(-4px);
}

/* Credit footer inside login card */
.login-credit {
  margin-top: 18px;
  font-size: 11.5px; color: var(--mute);
  letter-spacing: 0.2px;
}
.login-credit b {
  background: linear-gradient(120deg, var(--pink), var(--indigo) 55%, var(--cyan));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  font-weight: 800;
}

/* Brand + title */
.brand { display: flex; align-items: center; gap: 10px; justify-content: center; margin-bottom: 6px; }
.brand .chip {
  display: inline-block; padding: 6px 16px; border-radius: 999px;
  font-family: 'Space Grotesk', sans-serif; font-size: 10.5px; letter-spacing: 2.5px;
  color: var(--indigo); border: 1px solid rgba(91,91,240,0.32);
  background:
    linear-gradient(135deg, rgba(91,91,240,0.1), rgba(255,79,168,0.08));
  text-transform: uppercase; font-weight: 700;
  box-shadow: 0 6px 18px -10px rgba(91,91,240,0.4), inset 0 1px 0 rgba(255,255,255,0.6);
}
h1.brand-title {
  margin: 0; text-align: center;
  font-weight: 900; font-size: 44px; line-height: 1.05;
  background: linear-gradient(120deg, var(--pink) 0%, var(--indigo) 35%, var(--cyan) 70%, var(--mint) 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  letter-spacing: -0.8px;
  animation: brand-shimmer 8s ease-in-out infinite;
  filter: drop-shadow(0 3px 18px rgba(91,91,240,0.18));
}
@keyframes brand-shimmer {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}
.subtitle { text-align: center; color: var(--mute); margin: 10px 0 24px; font-size: 13.5px; letter-spacing: 0.2px; }
.app-tagline {
  margin-top: 8px; text-align: right;
  font-size: 13.5px; color: var(--mute); font-weight: 500;
  letter-spacing: 0.1px;
}

/* App header */
.app-head {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 16px;
  margin-bottom: 16px;
}
.app-head > div { text-align: right; flex: 1; }
.app-head h1.brand-title { text-align: right; font-size: 32px; }

/* Privacy */
.privacy-banner {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 11px 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(38,208,167,0.08), rgba(51,201,230,0.08));
  border: 1px solid rgba(38,208,167,0.28);
  color: #0c6a52;
  font-size: 12.5px; line-height: 1.55;
  margin-bottom: 18px;
}
.privacy-banner .shield { font-size: 16px; line-height: 1; flex-shrink: 0; margin-top: 1px; }
.privacy-banner b { color: #0c6a52; font-weight: 700; }

.privacy-notice {
  margin-top: 24px; padding: 12px 14px;
  border-radius: 14px; text-align: right;
  background: linear-gradient(135deg, rgba(91,91,240,0.06), rgba(51,201,230,0.06));
  border: 1px solid rgba(91,91,240,0.2);
  color: var(--ink); font-size: 12.5px; line-height: 1.6;
  display: flex; gap: 10px; align-items: flex-start;
}
.privacy-notice .shield { font-size: 18px; line-height: 1; }
.privacy-notice b { color: var(--indigo); }

/* Login form */
.field { text-align: right; margin-bottom: 14px; }
.field label {
  display: block; font-size: 12px; font-weight: 600;
  color: var(--mute); margin-bottom: 6px; letter-spacing: 0.3px;
}
.field input, .field textarea {
  width: 100%; padding: 12px 14px;
  border: 1.5px solid rgba(91,91,240,0.2);
  border-radius: 12px;
  background: #fff;
  font-family: inherit; font-size: 14.5px; color: var(--ink);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--indigo);
  box-shadow: 0 0 0 4px rgba(91,91,240,0.12);
}
.field textarea { resize: vertical; min-height: 70px; line-height: 1.6; }

/* Dropzone */
.dropzone {
  position: relative; display: block;
  border: 2px dashed rgba(91,91,240,0.35); border-radius: 20px;
  padding: 42px 20px; text-align: center; cursor: pointer;
  background: linear-gradient(145deg, rgba(91,91,240,0.06), rgba(255,79,168,0.04));
  transition: transform .25s ease, border-color .2s ease, background .2s ease, box-shadow .25s ease;
  overflow: hidden;
}
.dropzone::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 50% -10%, rgba(91,91,240,0.16), transparent 55%);
  pointer-events: none; opacity: 0; transition: opacity .3s ease;
}
.dropzone:hover::after { opacity: 1; }
.dropzone:hover { border-color: var(--indigo); box-shadow: 0 0 0 6px rgba(91,91,240,0.08), 0 20px 40px -20px rgba(91,91,240,0.35); }
.dropzone.drag { transform: scale(1.02); border-color: var(--pink); box-shadow: 0 0 0 6px rgba(255,79,168,0.1); }
.dropzone input { display: none; }
.dropzone .icon {
  font-size: 44px; display: inline-block; line-height: 1;
  filter: drop-shadow(0 6px 14px rgba(91,91,240,0.35));
  animation: pulse 2.6s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.dropzone .text { margin-top: 12px; font-size: 16.5px; font-weight: 700; color: var(--ink); letter-spacing: 0.2px; }
.dropzone .hint { margin-top: 5px; font-size: 11px; color: var(--mute); letter-spacing: 0.6px; text-transform: uppercase; font-weight: 600; }
.dropzone.dropzone-slim { padding: 20px 16px; border-radius: 14px; }
.dropzone.dropzone-slim .icon { font-size: 28px; }
.dropzone.dropzone-slim .text { margin-top: 6px; font-size: 14px; }
.dropzone.dropzone-slim .hint { margin-top: 3px; font-size: 10px; }
.dropzone.dropzone-slim.magenta { border-color: rgba(255,79,168,0.35); background: linear-gradient(145deg, rgba(255,79,168,0.06), rgba(242,169,59,0.04)); }
.dropzone.dropzone-slim.magenta:hover { border-color: var(--pink); box-shadow: 0 0 0 6px rgba(255,79,168,0.08), 0 20px 40px -20px rgba(255,79,168,0.35); }
.dropzone.filled { background: linear-gradient(145deg, rgba(38,208,167,0.12), rgba(51,201,230,0.10)); border-color: rgba(38,208,167,0.55); border-style: solid; }
.dropzone.filled .icon { font-size: 22px; filter: hue-rotate(-40deg); }
.dropzone.filled .text { color: #0c7a5f; font-weight: 700; }
.dropzone.filled .hint { color: #0c7a5f; text-transform: none; letter-spacing: 0; font-family: 'Space Grotesk', monospace; }
.dropzone-clear {
  position: absolute; top: 8px; left: 8px;
  width: 24px; height: 24px; border-radius: 50%;
  border: 0; background: rgba(255,79,168,0.15); color: var(--pink);
  font-size: 16px; font-weight: 700; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .18s ease, transform .18s ease;
}
.dropzone.filled .dropzone-clear { opacity: 1; }
.dropzone-clear:hover { background: var(--pink); color: #fff; transform: scale(1.08); }

/* Upload grid — 3 identical slots side by side */
.upload-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  margin-top: 4px;
}
.upload-slot { margin-top: 0; padding: 14px 14px 12px; }
.upload-slot h3 {
  font-size: 12.5px; gap: 8px; margin-bottom: 10px;
  line-height: 1.35;
}
.upload-slot h3::before { display: none; }
.slot-num {
  width: 22px; height: 22px; border-radius: 7px;
  background: linear-gradient(135deg, var(--indigo), var(--cyan));
  color: #fff; font-family: 'Space Grotesk', sans-serif;
  font-size: 12px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.slot-num.magenta { background: linear-gradient(135deg, var(--pink), var(--gold)); }
.upload-slot .hint-text {
  margin-top: 10px; font-size: 11px; padding-right: 8px;
  border-right-width: 2px;
}

@media (max-width: 820px) {
  .upload-grid { grid-template-columns: 1fr; }
}

/* File info */
.file-info {
  margin-top: 14px; padding: 11px 16px; border-radius: 12px;
  background: linear-gradient(135deg, rgba(38,208,167,0.12), rgba(51,201,230,0.12));
  color: #0c7a5f; border: 1px solid rgba(38,208,167,0.35);
  font-size: 13.5px; display: none; font-weight: 600;
}
.file-info.show { display: block; }
.file-info::before { content: "✓ "; font-weight: 900; }

/* Mode picker */
.mode-picker {
  margin-top: 18px; display: none;
  grid-template-columns: 1fr 1fr; gap: 12px;
}
.mode-picker.show { display: grid; }
.mode-card {
  position: relative; padding: 16px; border: 1.5px solid var(--line); border-radius: 18px;
  background: rgba(255,255,255,0.55);
  cursor: pointer; text-align: right;
  transition: all .22s cubic-bezier(.2,.7,.2,1);
  display: flex; flex-direction: column; gap: 6px;
}
.mode-card:hover { border-color: rgba(91,91,240,0.35); transform: translateY(-2px); box-shadow: 0 16px 32px -22px rgba(91,91,240,0.45); }
.mode-card.active {
  border-color: var(--indigo);
  background: linear-gradient(145deg, rgba(91,91,240,0.08), rgba(51,201,230,0.06));
  box-shadow: 0 0 0 3px rgba(91,91,240,0.12), 0 14px 28px -18px rgba(91,91,240,0.5);
}
.mode-card .mode-num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 10.5px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--indigo); font-weight: 700;
}
.mode-card .mode-title { font-size: 15px; font-weight: 800; color: var(--ink); line-height: 1.3; }
.mode-card .mode-desc  { font-size: 12px; color: var(--mute); line-height: 1.5; }
.mode-card .check {
  position: absolute; top: 12px; left: 12px;
  width: 20px; height: 20px; border-radius: 50%;
  border: 1.5px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  transition: all .2s ease;
}
.mode-card.active .check { background: var(--indigo); border-color: var(--indigo); color: #fff; }
.mode-card.active .check::after { content: "✓"; font-size: 12px; font-weight: 700; }

/* Section */
.section {
  margin-top: 16px; padding: 16px 18px 14px;
  border: 1px solid var(--line); border-radius: 18px;
  background: rgba(255,255,255,0.55);
  transition: border-color .22s ease, box-shadow .25s ease, transform .25s ease;
}
.section:hover {
  border-color: rgba(91,91,240,0.25);
  box-shadow: 0 14px 36px -22px rgba(91,91,240,0.28);
}
.section h3 {
  margin: 0 0 12px; font-size: 13.5px; font-weight: 700; color: var(--ink);
  display: flex; align-items: center; gap: 10px;
}
.section h3::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--indigo); box-shadow: 0 0 0 4px rgba(91,91,240,0.15);
}
.section.magenta h3::before { background: var(--pink); box-shadow: 0 0 0 4px rgba(255,79,168,0.15); }

.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.muted-mono { font-family: 'Space Grotesk', monospace; font-size: 12px; color: var(--mute); }
.hint-text {
  font-size: 12px; color: var(--mute); margin-top: 10px;
  padding-right: 12px; border-right: 2px solid rgba(91,91,240,0.22);
  line-height: 1.55;
}
.warn { color: var(--pink); font-weight: 700; }

/* Buttons */
.btn {
  position: relative; display: block; width: 100%;
  margin-top: 22px; padding: 18px 24px;
  border: 0; border-radius: 999px;
  font-family: inherit; font-size: 16px; font-weight: 800;
  letter-spacing: 0.3px; color: #fff;
  background:
    linear-gradient(120deg, var(--indigo) 0%, var(--pink) 40%, var(--cyan) 80%, var(--mint) 100%);
  background-size: 220% 100%;
  cursor: pointer;
  transition: transform .25s cubic-bezier(.2,.7,.2,1), box-shadow .3s ease, filter .2s ease, background-position .6s ease;
  box-shadow: 0 18px 40px -14px rgba(91,91,240,0.55);
  overflow: hidden;
}
.btn::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.25) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform .9s ease;
}
.btn:hover:not(:disabled) {
  transform: translateY(-2px);
  filter: saturate(1.15) brightness(1.05);
  box-shadow: 0 26px 52px -14px rgba(91,91,240,0.7);
  background-position: 100% 0%;
}
.btn:hover:not(:disabled)::before { transform: translateX(100%); }
.btn:disabled { background: #eaebf4; color: #b4b6cd; cursor: not-allowed; box-shadow: none; }
.btn > * { position: relative; }

.btn-small {
  padding: 8px 16px; border-radius: 999px; cursor: pointer;
  font-family: inherit; font-size: 13px; font-weight: 600; letter-spacing: 0.2px;
  color: var(--indigo); border: 1px solid rgba(91,91,240,0.28);
  background: rgba(255,255,255,0.7);
  transition: all .22s ease; display: inline-flex; align-items: center; gap: 7px;
}
.btn-small:hover { color: #fff; background: var(--indigo); border-color: var(--indigo); transform: translateY(-1px); box-shadow: 0 8px 20px -10px rgba(91,91,240,0.55); }
.btn-small.ghost { color: var(--mute); border-color: var(--line); background: transparent; }
.btn-small.ghost:hover { color: #fff; background: var(--ink); border-color: var(--ink); }

.btn-tiny {
  padding: 5px 10px; border-radius: 999px; cursor: pointer;
  font-family: inherit; font-size: 12px; font-weight: 700;
  border: 1px solid rgba(91,91,240,0.3);
  background: transparent; color: var(--indigo);
}
.btn-tiny:hover { background: rgba(91,91,240,0.08); }
.btn-tiny.danger { color: var(--pink); border-color: rgba(255,79,168,0.45); }
.btn-tiny.danger:hover { background: rgba(255,79,168,0.1); }

/* Status box */
.status {
  margin-top: 18px; padding: 12px 14px; border-radius: 14px;
  font-size: 13.5px; line-height: 1.65; display: none; border: 1px solid transparent;
}
.status.info    { background: rgba(91,91,240,0.08); color: var(--indigo); border-color: rgba(91,91,240,0.25); display: block; }
.status.success { background: linear-gradient(135deg, rgba(38,208,167,0.12), rgba(51,201,230,0.1)); color: #0c7a5f; border-color: rgba(38,208,167,0.4); display: block; }
.status.error   { background: rgba(255,79,168,0.08); color: #c42e80; border-color: rgba(255,79,168,0.35); display: block; }
.manual-dl {
  margin-top: 12px;
  padding: 10px 14px;
  background: rgba(255,255,255,0.6);
  border: 1px dashed rgba(91,91,240,0.35);
  border-radius: 10px;
  text-align: center;
}
.manual-dl a {
  color: var(--indigo); font-weight: 700; font-size: 13.5px;
  text-decoration: none;
  transition: color .2s ease, transform .2s ease;
  display: inline-block;
}
.manual-dl a:hover { color: var(--pink); transform: translateY(-1px); }

.spinner {
  display: inline-block; width: 12px; height: 12px; margin-left: 8px;
  border: 2px solid currentColor; border-top-color: transparent;
  border-radius: 50%; animation: spin 0.8s linear infinite;
  vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* IDs textarea + counter */
.ids-input {
  width: 100%; min-height: 130px; padding: 12px 14px;
  border: 1.5px solid rgba(91,91,240,0.2); border-radius: 12px;
  background: #fff;
  font-family: 'Space Grotesk', monospace;
  font-size: 14px; line-height: 1.7; color: var(--ink);
  resize: vertical; direction: ltr; text-align: left;
  transition: all .2s;
}
.ids-input:focus { outline: none; border-color: var(--indigo); box-shadow: 0 0 0 4px rgba(91,91,240,0.12); }
.ids-counter {
  display: flex; justify-content: space-between; align-items: center; margin-top: 8px;
  font-family: 'Space Grotesk', sans-serif; font-size: 12px; color: var(--mute);
}
.ids-counter b { color: var(--indigo); font-weight: 700; }
.not-found-box {
  margin-top: 14px; padding: 10px 14px; border-radius: 12px;
  background: rgba(255,79,168,0.08); border: 1px solid rgba(255,79,168,0.35);
  font-size: 12.5px; color: #c42e80;
}
.not-found-box h4 { margin: 0 0 6px; font-size: 13px; font-weight: 700; }
.not-found-box .list { font-family: 'Space Grotesk', monospace; direction: ltr; text-align: left; line-height: 1.6; }

/* Stamp creator */
.ttl-tag {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  background: linear-gradient(135deg, var(--mint), var(--cyan));
  color: #fff; font-size: 10px; font-weight: 700; letter-spacing: 0.6px;
  margin-right: 8px; text-transform: uppercase;
}

.stamp-section {
  padding-top: 20px;
  background:
    radial-gradient(ellipse at 85% -10%, rgba(38,208,167,0.08), transparent 55%),
    radial-gradient(ellipse at 10% 120%, rgba(91,91,240,0.08), transparent 55%),
    rgba(255,255,255,0.62);
}
.stamp-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 10px; margin-bottom: 14px;
}
h3.stamp-title {
  margin: 0; font-size: 16px; font-weight: 800; color: var(--ink);
  display: flex; align-items: center; gap: 10px;
}
/* Override the default .section h3::before dot for the stamp title */
.section h3.stamp-title::before {
  content: "✍";
  width: auto; height: auto; border-radius: 0; background: none;
  box-shadow: none; font-size: 18px;
  background-image: linear-gradient(135deg, var(--indigo), var(--cyan));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 6px rgba(91,91,240,0.3));
}
.stamp-sub {
  margin-top: 4px; font-size: 12px; color: var(--mute);
  font-weight: 500;
}

.stamp-builder {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
  align-items: start;
}
.stamp-canvas-frame {
  grid-column: 2;          /* LEFT visually in RTL */
  grid-row: 1 / span 2;
  position: relative;
  padding: 10px;
  background:
    linear-gradient(145deg, rgba(91,91,240,0.08), rgba(38,208,167,0.06));
  border-radius: 18px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.8),
    0 10px 28px -14px rgba(91,91,240,0.4);
}
.stamp-fields {
  grid-column: 1;          /* RIGHT visually in RTL */
}
.canvas-chip {
  position: absolute; top: -10px; right: 14px;
  padding: 4px 12px; border-radius: 999px;
  background: linear-gradient(135deg, var(--indigo), var(--cyan));
  color: #fff; font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.3px;
  box-shadow: 0 8px 16px -8px rgba(91,91,240,0.55);
  z-index: 2;
}
.canvas-hint {
  margin-top: 8px;
  display: flex; align-items: center; gap: 8px;
  font-size: 11.5px; color: var(--mute);
  line-height: 1.45; padding: 0 6px;
}
.canvas-hint .pen {
  color: var(--indigo); font-size: 14px; flex-shrink: 0;
}
.stamp-canvas-wrap {
  position: relative;
  width: 100%; aspect-ratio: 520 / 300;
  border-radius: 12px; overflow: hidden;
  background: #fff;
  border: 1.5px solid rgba(91,91,240,0.22);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.6),
    0 6px 20px -10px rgba(91,91,240,0.35);
}
.stamp-canvas-wrap canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  display: block; cursor: crosshair;
  touch-action: none;
}
.stamp-canvas-wrap canvas#stampBase { z-index: 1; cursor: default; pointer-events: none; }
.stamp-canvas-wrap canvas#stampInk  { z-index: 2; pointer-events: auto; }
.stamp-fields { display: flex; flex-direction: column; gap: 10px; }
.stamp-fields .field { margin-bottom: 0; }
.stamp-actions {
  display: flex; gap: 8px; flex-wrap: wrap; grid-column: 1 / -1;
  padding-top: 4px;
}
.saved-indicator { margin-inline-start: auto; }
.saved-tag {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  background: linear-gradient(135deg, var(--mint), var(--cyan));
  color: #fff; font-size: 10px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase;
}

/* FAQ accordion */
.faq { margin-top: 22px; display: flex; flex-direction: column; gap: 10px; }
.faq details {
  border: 1px solid var(--line); border-radius: 14px;
  background: rgba(255,255,255,0.55); overflow: hidden;
  transition: border-color .2s ease, background .2s ease, box-shadow .25s ease;
}
.faq details:hover { border-color: rgba(91,91,240,0.25); }
.faq details[open] {
  background: rgba(255,255,255,0.82);
  border-color: rgba(91,91,240,0.28);
  box-shadow: 0 10px 30px -22px rgba(91,91,240,0.45);
}
.faq summary {
  list-style: none; cursor: pointer; user-select: none;
  padding: 13px 18px; font-size: 13.5px; font-weight: 600; color: var(--ink);
  display: flex; align-items: center; gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .caret {
  margin-right: auto;
  width: 22px; height: 22px; border-radius: 50%;
  background: rgba(91,91,240,0.1); color: var(--indigo);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; line-height: 1;
  transition: transform .3s cubic-bezier(.2,.7,.2,1), background .2s ease;
}
.faq details[open] summary .caret { transform: rotate(45deg); background: rgba(91,91,240,0.18); }
.faq summary .dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--indigo);
  box-shadow: 0 0 0 4px rgba(91,91,240,0.12); flex-shrink: 0;
}
.faq details.cyan summary .dot { background: var(--cyan); box-shadow: 0 0 0 4px rgba(51,201,230,0.15); }
.faq details.mint summary .dot { background: var(--mint); box-shadow: 0 0 0 4px rgba(38,208,167,0.15); }
.faq .body-in {
  padding: 2px 20px 16px; font-size: 13px; line-height: 1.7; color: var(--ink);
}
.faq .body-in ul { margin: 8px 0 0; padding: 0; list-style: none; }
.faq .body-in ul li { position: relative; padding-right: 22px; margin-bottom: 7px; opacity: 0.88; }
.faq .body-in ul li::before { content: "◆"; position: absolute; right: 0; top: 1px; color: var(--pink); font-size: 10px; }
.faq .body-in b { color: var(--indigo); font-weight: 700; }
.faq .body-in .path {
  background: rgba(91,91,240,0.08); color: var(--indigo);
  padding: 1px 8px; border-radius: 6px;
  font-family: 'Space Grotesk', monospace; font-size: 12px; font-weight: 600;
  display: inline-block; margin: 0 2px;
}
.faq .body-in a { color: var(--indigo); text-decoration: none; border-bottom: 1px dashed rgba(91,91,240,0.4); }
.faq .body-in a:hover { border-bottom-style: solid; }
.faq .body-in ol { margin: 8px 0 0; padding-right: 20px; counter-reset: faq-step; list-style: none; }
.faq .body-in ol li { counter-increment: faq-step; padding-right: 32px; margin-bottom: 8px; position: relative; }
.faq .body-in ol li::before {
  content: counter(faq-step);
  position: absolute; right: 0; top: 0;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--indigo); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; line-height: 1;
}

/* Nimblewick footer */
.nimblewick {
  margin-top: 26px; padding: 26px 24px; border-radius: 20px;
  background: linear-gradient(135deg, #1a1a2e 0%, #2a1a3e 100%);
  color: #fff; position: relative; overflow: hidden; text-align: center;
}
.nimblewick::before {
  content: ""; position: absolute; inset: -50%;
  background: radial-gradient(circle at 50% 0%, rgba(255,106,61,0.25), transparent 60%);
  pointer-events: none;
}
.nw-spark {
  display: inline-block; width: 8px; height: 8px;
  background: var(--flame); border-radius: 50%;
  box-shadow: 0 0 18px var(--flame);
  animation: flicker 1.8s ease-in-out infinite;
}
@keyframes flicker { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.7; transform: scale(0.9); } }
.nw-flicker {
  font-family: 'Heebo', sans-serif;
  font-weight: 900; font-size: 22px; letter-spacing: -0.3px;
  margin: 10px 0 8px;
  background: linear-gradient(120deg, var(--flame2), var(--flame), var(--pink));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  transition: opacity 0.35s ease;
  min-height: 30px;
}
.nw-pitch {
  font-size: 13.5px; line-height: 1.75;
  color: rgba(255,255,255,0.82);
  margin: 0 auto 18px; max-width: 520px;
  position: relative;
}
.nw-cta {
  display: flex; gap: 10px; justify-content: center; flex-wrap: wrap;
  margin-bottom: 14px; position: relative;
}
.nw-btn {
  padding: 10px 18px; border-radius: 999px;
  font-size: 13px; font-weight: 700;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.2); color: #fff;
  background: rgba(255,255,255,0.04);
  transition: all 0.2s;
}
.nw-btn:hover { background: rgba(255,255,255,0.1); transform: translateY(-1px); }
.nw-btn.primary {
  background: linear-gradient(135deg, var(--flame), var(--pink));
  border-color: transparent;
}
.nw-btn.primary:hover { box-shadow: 0 12px 28px -10px rgba(255,106,61,0.55); }
.nw-signature {
  font-size: 11.5px; color: rgba(255,255,255,0.5); letter-spacing: 0.3px;
  position: relative;
}
.nw-signature b { color: var(--flame2); font-weight: 800; }

/* App footer — credit + privacy + contact */
.app-footer {
  margin-top: 28px;
  padding: 26px 28px;
  border-radius: 22px;
  background:
    linear-gradient(160deg, rgba(91,91,240,0.06), rgba(255,79,168,0.04) 50%, rgba(38,208,167,0.06));
  border: 1px solid rgba(91,91,240,0.18);
  box-shadow: 0 18px 60px -30px rgba(91,91,240,0.35);
  position: relative; overflow: hidden;
}
.app-footer::before {
  content: ""; position: absolute; inset: -40% -10% auto auto;
  width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,106,61,0.22), transparent 70%);
  pointer-events: none;
}
.brand-credit {
  display: flex; align-items: center; gap: 14px;
  position: relative; z-index: 1;
}
.credit-spark {
  width: 44px; height: 44px; border-radius: 14px;
  background: linear-gradient(135deg, var(--pink), var(--indigo) 60%, var(--cyan));
  box-shadow: 0 10px 28px -10px rgba(91,91,240,0.55), inset 0 1px 0 rgba(255,255,255,0.35);
  position: relative; flex-shrink: 0;
}
.credit-spark::after {
  content: "✦"; position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 22px; font-weight: 900;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.18));
}
.credit-title {
  font-size: 16px; font-weight: 700; color: var(--ink); letter-spacing: -0.2px;
}
.credit-title b {
  background: linear-gradient(120deg, var(--pink), var(--indigo) 55%, var(--cyan));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  font-weight: 900;
}
.credit-sub {
  margin-top: 2px; font-size: 12.5px; color: var(--mute);
}
.privacy-footer,
.disclaimer-footer {
  margin-top: 12px;
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px;
  background: rgba(255,255,255,0.6);
  border-radius: 14px;
  font-size: 12.5px; line-height: 1.65; color: var(--ink);
  position: relative; z-index: 1;
}
.privacy-footer { border: 1px solid rgba(38,208,167,0.28); }
.disclaimer-footer { border: 1px solid rgba(242,169,59,0.32); background: linear-gradient(135deg, rgba(242,169,59,0.06), rgba(255,79,168,0.04)); }
.privacy-footer .shield,
.disclaimer-footer .gift { font-size: 16px; line-height: 1; flex-shrink: 0; margin-top: 1px; }
.privacy-footer b,
.disclaimer-footer b { color: var(--indigo); font-weight: 700; }
.disclaimer-footer b:last-child { color: #b55a0c; }
.cta-row {
  margin-top: 14px; display: flex; justify-content: center;
  position: relative; z-index: 1;
}
.cta-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 14px; font-weight: 700; letter-spacing: 0.2px;
  text-decoration: none;
  transition: transform .22s cubic-bezier(.2,.7,.2,1), box-shadow .3s ease, filter .2s ease;
}
.cta-btn.primary {
  color: #fff;
  background: linear-gradient(120deg, var(--pink) 0%, var(--indigo) 55%, var(--cyan) 100%);
  box-shadow: 0 14px 34px -14px rgba(91,91,240,0.55);
}
.cta-btn.primary:hover {
  transform: translateY(-2px); filter: saturate(1.1) brightness(1.03);
  box-shadow: 0 20px 44px -14px rgba(91,91,240,0.7);
}

.contact-panel {
  margin-top: 14px; position: relative; z-index: 1;
  border: 1px solid rgba(91,91,240,0.22); border-radius: 16px;
  background: rgba(255,255,255,0.55); overflow: hidden;
  transition: border-color .2s ease, box-shadow .25s ease;
}
.contact-panel[open] {
  border-color: rgba(91,91,240,0.4);
  box-shadow: 0 18px 44px -22px rgba(91,91,240,0.5);
}
.contact-summary {
  list-style: none; cursor: pointer; user-select: none;
  padding: 14px 20px;
  display: flex; align-items: center; gap: 12px;
  font-size: 14px; font-weight: 700; color: var(--ink);
}
.contact-summary::-webkit-details-marker { display: none; }
.contact-summary::before {
  content: "✉"; width: 26px; height: 26px; border-radius: 8px;
  background: linear-gradient(135deg, var(--pink), var(--indigo));
  color: #fff; font-size: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.contact-summary .caret {
  margin-right: auto;
  width: 22px; height: 22px; border-radius: 50%;
  background: rgba(91,91,240,0.1); color: var(--indigo);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; line-height: 1;
  transition: transform .3s cubic-bezier(.2,.7,.2,1), background .2s ease;
}
.contact-panel[open] .contact-summary .caret {
  transform: rotate(45deg); background: rgba(91,91,240,0.18);
}

.contact-form { padding: 4px 20px 18px; }
.contact-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  margin-bottom: 4px;
}
.contact-form .field { margin-bottom: 10px; }
.contact-form .cta-btn { width: 100%; justify-content: center; margin-top: 10px; }
.contact-form .status { margin-top: 12px; }

@media (max-width: 620px) {
  .contact-grid { grid-template-columns: 1fr; }
}

/* Responsive */
@media (max-width: 620px) {
  .card { padding: 26px 20px; }
  h1.brand-title { font-size: 28px; }
  .mode-picker.show { grid-template-columns: 1fr; }
  .stamp-builder { grid-template-columns: 1fr; }
  .stamp-canvas-wrap { grid-row: auto; }
}
