/* ── Ant Design 5 design tokens ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --ant-primary:        #1677ff;
  --ant-primary-hover:  #4096ff;
  --ant-color-text:           rgba(0,0,0,.88);
  --ant-color-text-secondary: rgba(0,0,0,.45);
  --ant-color-text-desc:      rgba(0,0,0,.25);
  --ant-color-border:         #d9d9d9;
  --ant-color-bg-container:   #ffffff;
  --ant-color-bg-layout:      #f5f5f5;
  --ant-color-bg-elevated:    #ffffff;
  --ant-border-radius:        6px;
  --ant-border-radius-lg:     8px;
  --ant-font-size:            14px;
  --ant-line-height:          1.5714;
  --ant-shadow-1: 0 1px 2px 0 rgba(0,0,0,.03), 0 1px 6px -1px rgba(0,0,0,.02), 0 2px 4px 0 rgba(0,0,0,.02);
  --ant-shadow-2: 0 6px 16px 0 rgba(0,0,0,.08), 0 3px 6px -4px rgba(0,0,0,.12), 0 9px 28px 8px rgba(0,0,0,.05);

  /* Aiwifi brand */
  --aw-green: #2BC474;
  --aw-teal:  #1B546E;
  --aw-dark:  #0d1821;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
}

html, body {
  font-family: var(--font);
  font-size: var(--ant-font-size);
  line-height: var(--ant-line-height);
  color: var(--ant-color-text);
}

/* ── ANT LAYOUT.CONTENT ───────────────────────────────────────────────────── */
.page { max-width: 1200px; margin: 0 auto; padding: 48px 24px 80px; }

/* ── ANT TYPOGRAPHY + INPUT STAGE ────────────────────────────────────────── */
#st-input { }

.eyebrow {
  font-size: 12px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase;
  color: var(--aw-green); margin-bottom: 8px;
}
.headline {
  font-size: 38px; font-weight: 600;
  color: var(--ant-color-text); line-height: 1.2; margin-bottom: 12px;
}
.headline em { color: var(--ant-primary); font-style: normal; }
.subline {
  font-size: 16px; color: var(--ant-color-text-secondary);
  line-height: 1.6; max-width: 480px; margin-bottom: 32px;
}

/* Ant Input.Search style */
.url-row { display: flex; gap: 0; max-width: 520px; }
.url-box { flex: 1; }
.url-input {
  width: 100%; height: 40px;
  padding: 0 11px 0 36px;
  font-size: var(--ant-font-size); font-family: var(--font);
  border: 1px solid var(--ant-color-border);
  border-right: none;
  border-radius: var(--ant-border-radius) 0 0 var(--ant-border-radius);
  background: var(--ant-color-bg-container);
  color: var(--ant-color-text); outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.url-input:focus {
  border-color: var(--ant-primary);
  box-shadow: 0 0 0 2px rgba(22,119,255,.1);
}
.url-input::placeholder { color: var(--ant-color-text-desc); }
.url-icon {
  position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  font-size: 14px; pointer-events: none; color: var(--ant-color-text-desc);
}
.url-box { position: relative; }
/* Ant Button primary */
.go-btn {
  height: 40px; padding: 0 20px;
  font-size: var(--ant-font-size); font-weight: 500; font-family: var(--font);
  background: var(--ant-primary); color: #fff;
  border: 1px solid var(--ant-primary);
  border-radius: 0 var(--ant-border-radius) var(--ant-border-radius) 0;
  cursor: pointer; white-space: nowrap;
  transition: background .2s, border-color .2s;
}
.go-btn:hover { background: var(--ant-primary-hover); border-color: var(--ant-primary-hover); }
.go-btn:active { background: #0958d9; }

/* Ant Tag style for hints */
.hints { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.hint {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 0 8px; height: 22px;
  font-size: 12px; color: var(--ant-color-text-secondary);
  background: var(--ant-color-bg-container);
  border: 1px solid var(--ant-color-border);
  border-radius: 4px;
  cursor: pointer; transition: all .2s;
  white-space: nowrap;
}
.hint:hover { color: var(--ant-primary); border-color: var(--ant-primary); background: #e6f4ff; }

/* ── ANT SPIN (loading) ───────────────────────────────────────────────────── */
#st-loading { display: none; text-align: center; padding: 80px 0; }
.spinner {
  width: 40px; height: 40px; margin: 0 auto 20px;
  border: 3px solid rgba(22,119,255,.15);
  border-top-color: var(--ant-primary);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.ld-msg {
  font-size: var(--ant-font-size);
  color: var(--ant-color-text-secondary);
  margin-bottom: 16px;
}
.ld-bar-bg {
  width: 180px; height: 4px;
  background: #f0f0f0; border-radius: 100px;
  margin: 0 auto; overflow: hidden;
}
.ld-bar-fill {
  height: 100%; width: 0%;
  background: var(--ant-primary);
  border-radius: 100px;
  transition: width 1.6s ease;
}

/* ── PREVIEW STAGE ────────────────────────────────────────────────────────── */
#st-preview { display: none; }

/* Ant Descriptions / page header style for brand bar */
.brand-bar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px; flex-wrap: wrap; gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f0f0f0;
}
.brand-id { display: flex; align-items: center; gap: 12px; }
.brand-badge {
  width: 40px; height: 40px;
  border-radius: var(--ant-border-radius-lg);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 600; color: #fff; flex-shrink: 0;
}
.brand-nm { font-size: 18px; font-weight: 600; color: var(--ant-color-text); line-height: 1.3; }
.brand-ind { font-size: 12px; color: var(--ant-color-text-secondary); margin-top: 2px; }
.reset-lnk {
  font-size: var(--ant-font-size); color: var(--ant-primary);
  cursor: pointer; background: none; border: none; padding: 0;
  transition: color .2s;
}
.reset-lnk:hover { color: var(--ant-primary-hover); }

/* ── ANT TABS ─────────────────────────────────────────────────────────────── */
.tabs {
  display: flex; gap: 0; flex-wrap: nowrap; overflow-x: auto;
  margin-bottom: 28px;
  border-bottom: 1px solid #f0f0f0;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  padding: 8px 16px; font-size: var(--ant-font-size); font-weight: 400;
  font-family: var(--font); white-space: nowrap;
  border: none; border-bottom: 2px solid transparent;
  background: none; color: var(--ant-color-text-secondary);
  cursor: pointer; transition: color .2s;
  margin-bottom: -1px;
}
.tab:hover { color: var(--ant-primary); }
.tab.on { color: var(--ant-primary); border-bottom-color: var(--ant-primary); font-weight: 500; }

/* ── BANNER STORIES ────────────────────────────────────────────────────────── */
.bn-wrap {
  position: relative; width: 100%; height: 100%;
  overflow: hidden; border-radius: 0;
}
.bn-bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.bn-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,.45) 0%, transparent 35%, transparent 55%, rgba(0,0,0,.6) 100%);
}
.bn-progress-row {
  position: absolute; top: 40px; left: 10px; right: 10px;
  display: flex; gap: 3px; z-index: 10;
}
.bn-progress-track {
  flex: 1; height: 2px; border-radius: 1px; background: rgba(255,255,255,.35); overflow: hidden;
}
.bn-progress-fill {
  height: 100%; background: #fff; border-radius: 1px;
  animation: bn-fill 5s linear forwards;
}
@keyframes bn-fill { from { width: 0% } to { width: 100% } }
.bn-close-btn {
  position: absolute; top: 52px; right: 10px; z-index: 20;
  width: 24px; height: 24px; border-radius: 50%;
  background: rgba(0,0,0,.4); border: none; color: #fff;
  font-size: 13px; line-height: 24px; text-align: center;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .3s;
}
.bn-close-btn.visible { opacity: 1; }
.bn-countdown { position: absolute; top: 52px; right: 10px; z-index: 20; width: 24px; height: 24px; }
.bn-countdown svg { transform: rotate(-90deg); }
.bn-countdown-txt {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 700; color: #fff;
}
.bn-content { position: absolute; bottom: 36px; left: 14px; right: 14px; z-index: 10; color: #fff; }
.bn-logo-sm {
  width: 36px; height: 36px; border-radius: 8px;
  background-size: contain; background-position: center; background-repeat: no-repeat;
  background-color: rgba(255,255,255,.15); margin-bottom: 8px;
}
.bn-logo-fallback {
  width: 36px; height: 36px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700; margin-bottom: 8px;
  background: rgba(255,255,255,.2); color: #fff;
}
.bn-headline {
  font-size: 15px; font-weight: 700; line-height: 1.25;
  margin: 0 0 5px; color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,.4);
}
.bn-tagline { font-size: 11px; line-height: 1.4; color: rgba(255,255,255,.85); margin: 0 0 10px; }
.bn-cta-btn {
  display: inline-block; padding: 6px 14px; border-radius: 20px; border: none;
  font-size: 11px; font-weight: 600; font-family: var(--font); cursor: pointer; color: #fff;
}
.bn-ai-badge {
  position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%);
  font-size: 8px; color: rgba(255,255,255,.5); white-space: nowrap; z-index: 10; letter-spacing: .3px;
}

/* ── PREVIEW BODY ──────────────────────────────────────────────────────────── */
.preview-body {
  display: flex; align-items: flex-start; gap: 32px; justify-content: center;
}
.phone-outer { flex-shrink: 0; display: flex; align-items: center; gap: 0; position: relative; }

/* ── FLOW ANIMATIONS ──────────────────────────────────────────────────────── */
#flow-exit { display: none; }
#flow-exit.flow-visible { display: flex; animation: fade-slide-in .5s ease forwards; }
#flow-entry.flow-hiding { animation: fade-slide-out .4s ease forwards; }
@keyframes fade-slide-in {
  from { opacity: 0; transform: translateX(24px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes fade-slide-out {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(-24px); }
}
.flow-svg { position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;overflow:visible;z-index:10; }
.flow-exit-webhook {
  font-size: 11px; color: var(--ant-color-text-secondary); text-align: center;
  margin: 0 0 4px; letter-spacing: .01em;
}
.flow-col { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 140px; flex-shrink: 0; }
#flow-entry { width: 130px; }
#flow-exit { width: 172px; gap: 6px; margin-left: 20px; align-items: flex-start; }
.flow-arrow { display: flex; align-items: center; flex-shrink: 0; position: relative; width: 36px; height: 40px; }
.flow-pipe {
  position: relative; flex-shrink: 0;
  width: 36px; height: 3px;
  background: linear-gradient(90deg, #dce8f0 0%, #c2d8e8 100%);
  border-radius: 2px; overflow: visible;
}
.flow-pipe::after {
  content: ''; position: absolute; right: -5px; top: 50%; transform: translateY(-50%);
  width: 0; height: 0;
  border-left: 6px solid #c2d8e8; border-top: 4px solid transparent; border-bottom: 4px solid transparent;
}
.flow-dot {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 7px; height: 7px; border-radius: 50%;
  background: #1677ff; opacity: 0;
  animation: flow-travel 1.8s ease-in-out infinite;
}
.flow-dot:nth-child(2) { animation-delay: .6s; }
.flow-dot:nth-child(3) { animation-delay: 1.2s; }
@keyframes flow-travel {
  0%   { left: 0%;   opacity: 0; }
  10%  { opacity: 1; }
  85%  { opacity: 1; }
  100% { left: calc(100% - 7px); opacity: 0; }
}
.flow-node {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: #fff; border: 1.5px solid #e6edf2; border-radius: 10px;
  padding: 10px 12px; width: 100%; box-sizing: border-box; text-align: center; cursor: default;
}
.flow-node-icon {
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; background: #f5f8fa;
}
.flow-node-icon svg { display: block; }
.flow-node-label { font-size: 10px; color: #555; font-weight: 500; line-height: 1.3; }
.flow-entry-title, .flow-exit-title {
  font-size: 13px; font-weight: 700; color: var(--ant-color-text);
  letter-spacing: -.01em; margin-bottom: 2px; text-align: center;
}
.flow-int-cloud { position: relative; width: 172px; height: 290px; flex-shrink: 0; }
.flow-int-bubble {
  position: absolute; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 14px rgba(0,0,0,.16);
  animation: bubble-float 3s ease-in-out infinite;
  transition: opacity .4s ease, transform .4s ease; overflow: hidden;
}
.flow-int-bubble.int-out { opacity: 0 !important; transform: scale(.7) !important; }
.flow-int-bubble.int-in  { animation: int-pop .45s ease forwards, bubble-float 3s ease-in-out var(--bdelay, 0s) infinite; }
@keyframes bubble-float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50%       { transform: translateY(var(--fly, -6px)) rotate(var(--rot, 1deg)); }
}
@keyframes int-pop {
  0%   { opacity: 0; transform: scale(.55); }
  65%  { transform: scale(1.1); }
  100% { opacity: 1; transform: scale(1); }
}

/* ── SIDE PANEL ───────────────────────────────────────────────────────────── */
.side-panel { width: 280px; flex-shrink: 0; display: flex; flex-direction: column; gap: 16px; padding-top: 4px; }
.sp-card {
  border: 1px solid #f0f0f0; border-radius: var(--ant-border-radius-lg);
  background: #fff; padding: 16px; box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.sp-title {
  font-size: 10px; font-weight: 600; letter-spacing: .6px;
  color: var(--ant-color-text-secondary); text-transform: uppercase;
  margin: 0 0 12px; display: flex; align-items: center; gap: 6px;
}
.sp-title-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--aw-green); flex-shrink: 0; }
.sp-row { font-size: 12px; color: #555; line-height: 1.5; margin: 0 0 6px; }
.sp-row:last-child { margin-bottom: 0; }
.sp-chip {
  display: inline-block; font-size: 11px; padding: 2px 8px;
  border-radius: 4px; background: #fafafa; border: 1px solid #f0f0f0; color: #555; margin: 2px 2px 2px 0;
}
.sp-chip.green  { background: #f6ffed; border-color: #b7eb8f; color: #389e0d; }
.sp-chip.orange { background: #fff7e6; border-color: #ffd591; color: #d46b08; }
.sp-chip.red    { background: #fff1f0; border-color: #ffa39e; color: #cf1322; }
.sp-divider { border: none; border-top: 1px solid #f5f5f5; margin: 12px 0; }
.sp-switch-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 0; cursor: pointer; user-select: none;
}
.sp-switch-label { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ant-color-text); font-family: var(--font); }
.sp-switch-icon { font-size: 13px; }
.sp-switch {
  position: relative; display: inline-block;
  width: 36px; height: 20px; flex-shrink: 0;
  border-radius: 10px; background: rgba(0,0,0,.25); transition: background .2s; cursor: pointer;
}
.sp-switch.on { background: var(--ant-primary); }
.sp-switch::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px; border-radius: 50%; background: #fff;
  box-shadow: 0 2px 4px rgba(0,35,11,.2); transition: left .2s;
}
.sp-switch.on::after { left: 18px; }

/* ── PHONE COLUMN + CONTEXT LABEL ─────────────────────────────────────────── */
.phone-col { display: flex; flex-direction: column; align-items: center; gap: 10px; flex-shrink: 0; }
.phone-ctx-label {
  display: flex; align-items: center; gap: 6px;
  background: #fff; border: 1px solid var(--ant-color-border);
  border-radius: 999px; padding: 4px 12px;
  font-size: 11px; font-weight: 500; color: var(--ant-color-text-secondary);
  box-shadow: var(--ant-shadow-1); max-width: 300px; text-align: center; transition: all .3s ease;
}
.phone-ctx-label.redirect { border-color: #b7eb8f; background: #f6ffed; color: #389e0d; }
.phone-ctx-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--ant-primary); flex-shrink: 0; transition: background .3s;
}
.phone-ctx-label.redirect .phone-ctx-dot { background: #52c41a; }

/* ── iPHONE FRAME ──────────────────────────────────────────────────────────── */
.iphone {
  position: relative; width: 300px; background: #1a1a1c; border-radius: 50px; padding: 0;
  box-shadow: inset 0 0 0 1.5px rgba(255,255,255,0.13), 0 0 0 1px #000,
    0 50px 100px rgba(0,0,0,0.45), 0 20px 40px rgba(0,0,0,0.25);
}
.iphone::before {
  content: ''; position: absolute; left: -3px; top: 130px;
  width: 3px; height: 34px; background: #2a2a2c; border-radius: 2px 0 0 2px;
  box-shadow: 0 44px 0 #2a2a2c, 0 80px 0 #2a2a2c;
}
.iphone::after {
  content: ''; position: absolute; right: -3px; top: 160px;
  width: 3px; height: 70px; background: #2a2a2c; border-radius: 0 2px 2px 0;
}
.iphone-inner { margin: 11px 9px; border-radius: 40px; overflow: hidden; position: relative; background: #000; }
.status-bar {
  position: absolute; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 22px 0; height: 44px; background: transparent; pointer-events: none;
}
.sb-time { font-size: 13px; font-weight: 700; color: #fff; letter-spacing: -0.3px; }
.sb-icons { display: flex; align-items: center; gap: 5px; }
.sb-icons svg { fill: #fff; }
.dyn-island {
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
  width: 100px; height: 30px; background: #000; border-radius: 18px; z-index: 100;
}
.iphone-screen { width: 100%; height: 580px; overflow-y: auto; scrollbar-width: none; position: relative; }
.iphone-screen::-webkit-scrollbar { display: none; }
.home-bar { height: 28px; display: flex; align-items: center; justify-content: center; background: #000; flex-shrink: 0; }
.home-bar-pill { width: 120px; height: 4px; background: rgba(255,255,255,0.5); border-radius: 2px; }

/* ── PORTAL STYLES ─────────────────────────────────────────────────────────── */
.portal-holder {
  min-height: 100%; display: flex; align-items: center; justify-content: center;
  padding: 52px 16px 16px; background-size: cover; background-position: center;
}
.portal-card {
  width: 100%; background: #fff; border-radius: 4px; padding: 16px;
  display: flex; flex-direction: column; align-items: center; gap: 0;
  box-shadow: 0 2px 1px -1px rgba(0,0,0,.2), 0 1px 1px 0 rgba(0,0,0,.14), 0 1px 3px 0 rgba(0,0,0,.12);
}
.portal-logo {
  width: 100px; height: 100px; border-radius: 50%;
  background-size: contain; background-position: center; background-repeat: no-repeat;
  margin-bottom: 8px; flex-shrink: 0;
}
.portal-logo-fallback {
  width: 100px; height: 100px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 36px; font-weight: 900; color: #fff; margin-bottom: 8px; flex-shrink: 0;
}
.portal-logo-full {
  width: 100%; height: 80px; border-radius: 4px;
  background-size: contain; background-position: center; background-repeat: no-repeat; margin-bottom: 8px;
}
.portal-title {
  font-size: 16px; font-weight: 700; text-align: center; color: #1a1a1a;
  line-height: 1.3; margin-bottom: 10px; width: 100%;
}
.portal-body { width: 100%; margin-bottom: 12px; }
.portal-input {
  width: 100%; border: 2px solid #fff; border-radius: 0;
  padding: 10px 14px; font-size: 12px; color: #709fbb;
  background: #e8eef4; margin-bottom: 10px; font-family: var(--font);
}
.portal-input:last-child { margin-bottom: 0; }
.portal-phone-row { display: flex; gap: 8px; margin-bottom: 10px; }
.portal-phone-cc {
  width: 68px; flex-shrink: 0; border: 2px solid #fff; border-radius: 0;
  padding: 10px 8px; font-size: 12px; color: #709fbb; background: #e8eef4; font-family: var(--font);
  display: flex; align-items: center; justify-content: space-between; gap: 4px;
}
.portal-phone-num {
  flex: 1; border: 2px solid #fff; border-radius: 0;
  padding: 10px 12px; font-size: 12px; color: #709fbb; background: #e8eef4; font-family: var(--font);
}
.portal-terms-row {
  display: flex; align-items: flex-start; gap: 8px; width: 100%; margin-bottom: 10px; margin-top: 6px;
}
.portal-terms-chk { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; accent-color: #2BC474; cursor: pointer; }
.portal-terms-lbl { font-size: 11px; color: #555; line-height: 1.4; cursor: pointer; }
.portal-terms-link { color: #1B546E; text-decoration: underline; }
.portal-btn {
  width: 100%; padding: 12px 16px; border: none; border-radius: 4px;
  font-size: 14px; font-weight: 600; font-family: var(--font);
  background: #2BC474; color: #fff; cursor: pointer;
  transition: opacity 0.15s, transform 0.1s; margin-top: 8px; margin-bottom: 6px;
}
.portal-btn:active { transform: scale(0.98); opacity: 0.9; }
.portal-btn-wrap {
  position: relative; width: 100%; margin-top: 14px;
  display: flex; flex-direction: column; align-items: center;
}
.portal-btn-wrap .portal-btn { position: relative; z-index: 2; margin-top: 0; width: 100%; }
.tap-indicator {
  position: absolute; top: 50%; left: -18px; transform: translateY(-50%);
  width: 44px; height: 44px; pointer-events: none; z-index: 3; color: #2BC474 !important;
}
.tap-dot { position: absolute; inset: 0; margin: auto; width: 14px; height: 14px; border-radius: 50%; background: currentColor; opacity: .9; }
.tap-wave {
  position: absolute; inset: 0; margin: auto; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid currentColor; animation: tap-expand 1.8s ease-out infinite;
}
.tap-wave:nth-child(2) { animation-delay: .6s; }
.tap-wave:nth-child(3) { animation-delay: 1.2s; }
@keyframes tap-expand {
  0%   { width: 14px; height: 14px; opacity: .8; }
  100% { width: 72px; height: 72px; opacity: 0;  }
}
.tap-tooltip {
  position: absolute; bottom: calc(100% + 10px); left: 50%; transform: translateX(-50%);
  background: rgba(0,0,0,.75); color: #fff; font-size: 10px; font-weight: 600; white-space: nowrap;
  padding: 4px 10px; border-radius: 999px; pointer-events: none; z-index: 10;
  animation: tip-bounce .9s ease-in-out infinite;
}
.tap-tooltip::after {
  content: ''; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  border: 4px solid transparent; border-top-color: rgba(0,0,0,.75);
}
@keyframes tip-bounce {
  0%,100% { transform: translateX(-50%) translateY(0); }
  50%      { transform: translateX(-50%) translateY(-3px); }
}
.portal-footer-txt {
  font-size: 11px; color: #1B546E; text-align: center;
  text-decoration: underline; cursor: pointer; margin-top: 4px;
}

/* ── CAMPAIGN-SPECIFIC ─────────────────────────────────────────────────────── */
.star-row { display: flex; justify-content: center; gap: 6px; margin: 6px 0 10px; }
.star { font-size: 30px; cursor: pointer; transition: transform 0.1s; line-height: 1; }
.star:hover { transform: scale(1.15); }
.nps-grid { display: grid; gap: 4px; width: 100%; margin: 6px 0 4px; }
.nps-num {
  background: #f0f2f4; border-radius: 7px; padding: 7px 2px; text-align: center;
  font-size: 11px; font-weight: 700; color: #555; cursor: pointer; transition: all 0.12s;
}
.nps-num:hover { background: #e0e4e8; }
.nps-scale { display: flex; justify-content: space-between; font-size: 8px; color: #aaa; width: 100%; margin-bottom: 8px; }
.survey-progress-lbl { font-size: 9px; color: #aaa; text-align: right; margin-bottom: 3px; }
.survey-bar-bg { height: 3px; background: #eee; border-radius: 2px; margin-bottom: 10px; }
.survey-bar-fill { height: 3px; border-radius: 2px; }
.survey-q { font-size: 12px; font-weight: 700; text-align: center; color: #333; margin-bottom: 10px; line-height: 1.4; }
.survey-opts { display: flex; flex-direction: column; gap: 6px; }
.survey-opt { border: 1.5px solid #e5e8ec; border-radius: 8px; padding: 8px 10px; font-size: 11px; color: #555; cursor: pointer; transition: all 0.12s; }
.survey-opt:hover { border-color: #bbb; }
.survey-opt.picked { border-width: 2px; color: #fff; }
.dc-visit-badge {
  font-size: 9px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: #aaa; text-align: right; width: 100%; margin-bottom: 10px;
}
.birthday-row { display: flex; gap: 6px; width: 100%; margin-bottom: 8px; }
.birthday-row .portal-input { flex: 1; margin-bottom: 0; text-align: center; padding: 10px 4px; }

/* Progressive capture panel */
.sp-card .prog-visits { flex-direction: column; gap: 4px; }
.sp-card .prog-visit { flex: none; padding: 8px 10px; }
.sp-card .prog-connector { width: auto; height: 1px; margin: 0; background: #f0f0f0; }
.sp-card .prog-field-chip { font-size: 10px; height: 18px; }
.prog-visits { display: flex; gap: 0; align-items: stretch; }
.prog-visit {
  flex: 1; position: relative; padding: 12px 14px;
  border-radius: var(--ant-border-radius); transition: background .15s; cursor: pointer;
}
.prog-visit:hover { background: #fafafa; }
.prog-visit.active { background: #e6f4ff; }
.prog-visit-num { font-size: 11px; font-weight: 500; margin-bottom: 8px; display: flex; align-items: center; gap: 6px; color: var(--ant-color-text); }
.prog-visit-dot {
  width: 20px; height: 20px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 600; color: #fff; flex-shrink: 0;
}
.prog-connector { width: 1px; background: #f0f0f0; margin: 12px 0; flex-shrink: 0; }
.prog-field-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 0 7px; height: 20px; border-radius: 4px;
  font-size: 11px; color: var(--ant-color-text-secondary);
  background: #fafafa; border: 1px solid #f0f0f0; margin: 2px 4px 2px 0;
}
.prog-field-chip.done { background: #f6ffed; border-color: #b7eb8f; color: #389e0d; }
.prog-field-chip svg { width: 9px; height: 9px; flex-shrink: 0; }
.int-title { font-size: 11px; color: #777; text-align: center; margin-bottom: 10px; }
.int-tags { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.int-tag { border: 1.5px solid #e5e8ec; border-radius: 999px; padding: 5px 12px; font-size: 10px; color: #555; cursor: pointer; transition: all 0.12s; }
.int-tag.on { color: #fff; }
.display-sub { font-size: 11px; color: #999; text-align: center; line-height: 1.5; margin-bottom: 10px; }

/* ── CONNECTION SIMULATION ─────────────────────────────────────────────────── */
.connecting-overlay {
  position: absolute; inset: 0; z-index: 200;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
}
.conn-spinner {
  width: 44px; height: 44px; border: 3px solid rgba(255,255,255,0.3);
  border-top-color: #fff; border-radius: 50%; animation: spin 0.7s linear infinite;
}
.conn-msg { font-size: 13px; font-weight: 600; color: #fff; }

/* ── REDIRECT PAGE ─────────────────────────────────────────────────────────── */
.redirect-wrap {
  position: absolute; inset: 0; z-index: 200; display: flex; flex-direction: column;
  align-items: center; overflow-y: auto; background: #fff;
  animation: fade-slide-in 0.35s ease forwards;
}
.redirect-logo-img { height: 54px; width: auto; margin-top: 28px; margin-bottom: 10px; object-fit: contain; }
.redirect-logo-initial {
  height: 54px; width: 54px; margin-top: 28px; margin-bottom: 10px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 900; color: #fff;
}
.redirect-green-banner {
  width: 100%; padding: 10px 12px; background: #2BC474; color: #fff;
  font-size: 13px; font-weight: 700; letter-spacing: 0.2px;
  border-bottom: 5px solid #1e1e1e; text-align: center;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin-bottom: 10px; flex-shrink: 0;
}
.redirect-title {
  color: #383c41; text-align: center; font-size: 14px; font-weight: 700;
  line-height: 1.4; letter-spacing: 0.2px; margin: 0 12px 4px; padding: 0;
}
.redirect-subtitle {
  color: #383c41; text-align: center; font-size: 11px; font-weight: 600;
  line-height: 1.4; letter-spacing: 0.1px; margin: 0 12px 6px;
}
.redirect-link-item {
  padding: 10px 12px; margin-top: 10px; width: calc(100% - 32px); max-width: 220px;
  border: 2.5px solid #1e1e1e; text-align: center; cursor: pointer;
  font-size: 11px; font-weight: 700; line-height: 1.5; letter-spacing: 0.2px; transition: opacity 0.15s;
}
.redirect-link-item:hover { opacity: 0.85; }
.redirect-btn-tooltip {
  font-size: 10px; color: #888; text-align: center; padding: 4px 8px;
  margin-top: -6px; margin-bottom: 4px; background: #f9f9f9; border: 1px dashed #ddd;
  border-radius: 4px; line-height: 1.4; animation: fade-slide-in .2s ease forwards;
  width: calc(100% - 32px); max-width: 220px;
}
.redirect-socials {
  display: flex; flex-direction: row; flex-wrap: wrap; justify-content: space-between;
  margin-top: 14px; width: calc(100% - 32px); max-width: 220px;
}
.redirect-socials > span {
  flex: 1; flex-basis: 25%; display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.redirect-socials svg { display: block; width: 24px; height: 24px; }
.redirect-back { font-size: 9px; color: #bbb; cursor: pointer; padding: 10px 6px 6px; text-align: center; margin-top: auto; }
.redirect-back:hover { color: #888; }

/* ── RESPONSIVE ────────────────────────────────────────────────────────────── */
@media (max-width: 960px) {
  #flow-entry, #flow-exit, .flow-arrow { display: none !important; }
}
@media (max-width: 780px) {
  .preview-body { flex-direction: column; align-items: center; }
  .side-panel { width: 100%; max-width: 500px; }
  .sp-card .prog-visits { flex-direction: row; }
  .sp-card .prog-visit { flex: 1; padding: 10px 12px; }
  .sp-card .prog-connector { width: 1px; height: auto; margin: 12px 0; }
}
@media (max-width: 480px) {
  .page { padding: 24px 16px 60px; }
  .headline { font-size: 26px; }
  .url-row { flex-direction: column; }
  .iphone { width: 100%; max-width: 300px; }
  .iphone-screen { height: 520px; }
  .tabs { gap: 0; }
  .tab { padding: 8px 10px; font-size: 12px; }
  .brand-bar { flex-direction: column; align-items: flex-start; gap: 8px; }
  .side-panel { max-width: 100%; }
  .sp-card .prog-visits { flex-direction: column; }
  .sp-card .prog-connector { width: auto; height: 1px; margin: 0; }
}
