/* =====================================================================
   Popup Wireframe — faithful, non-functional replica of the extension
   popup (Pro / premium state). All selectors are scoped under
   .popup-wireframe so they never collide with the marketing site CSS.
   Animation + design tokens mirror extension/popup/popup.css.
   ===================================================================== */

.popup-wireframe {
  /* spring easings (match the Figma motion spec used in the extension) */
  --ease-snap:   cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth: cubic-bezier(0.22, 1,    0.36, 1);
  --ease-soft:   cubic-bezier(0.16, 1,    0.3,  1);

  /* dark palette (popup default) */
  --m-bg:           #17171d;
  --m-surface:      #1e1e26;
  --m-surface-2:    #2a2a36;
  --m-accent:       #7c6af7;
  --m-accent-hover: #6b59e8;
  --m-accent-tint:  rgba(124,106,247,0.12);
  --m-accent-ring:  rgba(124,106,247,0.30);
  --m-accent-glow:  rgba(124,106,247,0.35);
  --m-green:        #34d399;
  --m-text:         #f0f0f4;
  --m-text-2:       #9898a8;
  --m-text-3:       #5c5c70;
  --m-border:       rgba(255,255,255,0.08);
  --m-border-2:     rgba(255,255,255,0.16);
  --m-divider:      rgba(255,255,255,0.10);
  --m-divider-soft: rgba(255,255,255,0.06);
  --m-track:        rgba(255,255,255,0.05);
  --m-hover:        rgba(255,255,255,0.06);
  --m-card-hover-shadow: 0 8px 24px rgba(0,0,0,0.35);
  --logo-chip:        #101014;
  --logo-ring:        rgba(255,255,255,0.10);
  --logo-mono-filter: brightness(0) invert(1);

  --pw-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  width: 100%;
  max-width: 400px;
  min-width: 0;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-glow, 0 0 80px rgba(124,106,247,0.25)), 0 20px 60px rgba(0,0,0,0.55);
  border: 1px solid var(--m-border);
  animation: pw-float-hero 6s ease-in-out infinite;
}

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

@keyframes pw-float-hero {
  0%,100% { transform: translateY(0) rotate(0deg); }
  50%     { transform: translateY(-12px) rotate(0.4deg); }
}

/* ── keyframes (mirrored from the extension) ─────────────────────── */
@keyframes pw-ModalIn  { from { opacity:0; transform:scale(.94) translateY(14px);} to { opacity:1; transform:scale(1) translateY(0);} }
@keyframes pw-BrandIn  { from { opacity:0; transform:translateX(-8px);} to { opacity:1; transform:translateX(0);} }
@keyframes pw-ActionsIn{ from { opacity:0; transform:translateX(8px);}  to { opacity:1; transform:translateX(0);} }
@keyframes pw-TablistIn{ from { opacity:0; transform:translateY(6px);}  to { opacity:1; transform:translateY(0);} }
@keyframes pw-FooterIn { from { opacity:0;} to { opacity:1;} }
@keyframes pw-PanelIn  { from { opacity:0; transform:translateY(10px);} to { opacity:1; transform:translateY(0);} }
@keyframes pw-PanelOut { from { opacity:1; transform:translateY(0);}    to { opacity:0; transform:translateY(-6px);} }
@keyframes pw-MainIn   { from { opacity:0; transform:translateX(-22px);} to { opacity:1; transform:translateX(0);} }
@keyframes pw-MainOut  { from { opacity:1; transform:translateX(0);}    to { opacity:0; transform:translateX(-28px);} }
@keyframes pw-HistoryIn{ from { opacity:0; transform:translateX(28px);} to { opacity:1; transform:translateX(0);} }
@keyframes pw-HistoryOut{from { opacity:1; transform:translateX(0);}    to { opacity:0; transform:translateX(28px);} }
@keyframes pw-GridIn   { from { opacity:0; transform:scale(.88) translateY(10px);} to { opacity:1; transform:scale(1) translateY(0);} }
@keyframes pw-ListIn   { from { opacity:0; transform:translateX(12px);} to { opacity:1; transform:translateX(0);} }
@keyframes pw-PulseDot { 0%,100% { opacity:1;} 50% { opacity:.3;} }

/* ── shell ───────────────────────────────────────────────────────── */
.popup-wireframe .modal {
  width: 100%;
  background: var(--m-bg);
  color: var(--m-text);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: var(--pw-font);
  text-align: left;
  animation: pw-ModalIn .48s var(--ease-soft) both;
}

/* ── header ──────────────────────────────────────────────────────── */
.popup-wireframe .m-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px 16px;
  border-bottom: 1px solid var(--m-divider);
}
.popup-wireframe .brand { display:flex; align-items:center; gap:12px; animation: pw-BrandIn .42s var(--ease-smooth) .1s both; }
.popup-wireframe .brand-logo { flex-shrink:0; width:40px; height:40px; border-radius:10px; object-fit:contain; }
.popup-wireframe .brand-text h1 { font-size:15px; font-weight:600; line-height:1.2; letter-spacing:-.01em; color:var(--m-text); margin:0; }
.popup-wireframe .brand-status { display:flex; align-items:center; gap:6px; margin-top:2px; }
.popup-wireframe .brand-status span:last-child { font-size:11px; color:var(--m-text-2); }
.popup-wireframe .status-dot { width:6px; height:6px; border-radius:50%; background:var(--m-text-3); display:inline-block; flex-shrink:0; }
.popup-wireframe .status-dot.online { background:var(--m-green); animation: pw-PulseDot 2s ease-in-out infinite; }
.popup-wireframe .header-actions { display:flex; align-items:center; gap:4px; animation: pw-ActionsIn .42s var(--ease-smooth) .12s both; }

.popup-wireframe .icon-btn {
  width:32px; height:32px; display:flex; align-items:center; justify-content:center;
  border:none; background:transparent; color:var(--m-text-3); border-radius:8px; cursor:pointer;
  transition: color .15s, background .15s, transform .25s var(--ease-snap), box-shadow .15s;
}
.popup-wireframe .icon-btn:hover { color:var(--m-text); background:var(--m-hover); transform:scale(1.12); }
.popup-wireframe .icon-btn[data-hover-rotate="-8"]:hover { transform:scale(1.12) rotate(-8deg); }
.popup-wireframe .icon-btn[data-hover-rotate="20"]:hover { transform:scale(1.12) rotate(20deg); }
.popup-wireframe .icon-btn:active { transform:scale(.88); }
.popup-wireframe .icon-btn.is-active { color:#a89af7; background:var(--m-accent-tint); }

.popup-wireframe .icon    { width:17px; height:17px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; flex-shrink:0; }
.popup-wireframe .icon-sm { width:14px; height:14px; }

/* ── body / views ────────────────────────────────────────────────── */
.popup-wireframe .m-body { position:relative; overflow:hidden; height:404px; }
.popup-wireframe .view { display:flex; flex-direction:column; height:100%; }
.popup-wireframe .view[hidden] { display:none; }
.popup-wireframe .view-main { animation: pw-MainIn .32s var(--ease-smooth) both; }
.popup-wireframe .view-main.is-exiting { animation: pw-MainOut .16s ease both; }
.popup-wireframe .view-history { animation: pw-HistoryIn .32s var(--ease-smooth) both; }
.popup-wireframe .view-history.is-exiting { animation: pw-HistoryOut .16s ease both; }

/* ── tabs ────────────────────────────────────────────────────────── */
.popup-wireframe .tablist {
  display:flex; gap:4px; margin:12px 16px 0; padding:4px;
  background:var(--m-track); border-radius:12px;
  animation: pw-TablistIn .4s var(--ease-smooth) .16s both;
}
.popup-wireframe .tab {
  flex:1; display:flex; align-items:center; justify-content:center; gap:5px;
  padding:7px 6px; font-size:12px; font-weight:500; font-family:var(--pw-font);
  color:var(--m-text-2); background:transparent; border:none; border-radius:8px;
  cursor:pointer; white-space:nowrap;
  transition: color .15s, background .2s var(--ease-snap), transform .2s var(--ease-snap);
}
.popup-wireframe .tab:hover:not(.is-active) { color:var(--m-text); }
.popup-wireframe .tab:active { transform:scale(.96); }
.popup-wireframe .tab.is-active { background:var(--m-accent); color:#fff; }

/* ── panels ──────────────────────────────────────────────────────── */
.popup-wireframe .tabpanel {
  padding:16px; flex:1; min-height:0; overflow-y:auto;
  display:flex; flex-direction:column; gap:12px;
  animation: pw-PanelIn .22s var(--ease-smooth) both;
}
.popup-wireframe .tabpanel::-webkit-scrollbar { width:0; }
.popup-wireframe .tabpanel[hidden] { display:none; }
.popup-wireframe .tabpanel.is-exiting { animation: pw-PanelOut .14s ease both; pointer-events:none; }

.popup-wireframe .section-label {
  font-size:10px; font-weight:600; text-transform:uppercase; letter-spacing:.08em;
  color:var(--m-text-3); margin:0;
}

/* ── platform grid (Continue On) ─────────────────────────────────── */
.popup-wireframe .platform-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:8px; }
.popup-wireframe .plat-card {
  position:relative; display:flex; flex-direction:column; align-items:center; gap:8px;
  padding:12px 4px; background:var(--m-surface); border:2px solid var(--m-border);
  border-radius:12px; cursor:pointer; opacity:0;
  transition: border-color .15s, background .15s, transform .25s var(--ease-snap), box-shadow .25s var(--ease-snap);
}
.popup-wireframe .plat-card.is-visible { animation: pw-GridIn .32s var(--ease-smooth) both; opacity:1; }
.popup-wireframe .plat-card:hover { border-color:var(--m-border-2); transform:translateY(-3px); box-shadow:var(--m-card-hover-shadow); }
.popup-wireframe .plat-card:active { transform:scale(.95); box-shadow:none; }
.popup-wireframe .plat-card.is-selected { border-color:var(--m-accent); background:var(--m-accent-tint); }
.popup-wireframe .plat-avatar {
  position:relative; width:36px; height:36px; border-radius:11px;
  display:flex; align-items:center; justify-content:center; overflow:hidden;
  background:var(--logo-chip); box-shadow:inset 0 0 0 1px var(--logo-ring);
}
.popup-wireframe .plat-avatar img { width:22px; height:22px; object-fit:contain; }
.popup-wireframe .plat-avatar .logo-mono { filter:var(--logo-mono-filter); }
.popup-wireframe .plat-check {
  position:absolute; inset:0; display:flex; align-items:center; justify-content:center;
  background:rgba(124,106,247,.9); opacity:0; transform:scale(.4);
  transition: opacity .18s var(--ease-snap), transform .18s var(--ease-snap);
}
.popup-wireframe .plat-card.is-selected .plat-check { opacity:1; transform:scale(1); }
.popup-wireframe .plat-check .icon { color:#fff; width:16px; height:16px; }
.popup-wireframe .plat-name { font-size:10px; font-weight:500; text-align:center; line-height:1.2; color:var(--m-text-2); transition:color .15s; }
.popup-wireframe .plat-card.is-selected .plat-name { color:#a89af7; }
.popup-wireframe .plat-live-dot {
  position:absolute; top:6px; right:6px; width:6px; height:6px; border-radius:50%;
  background:var(--m-green); animation: pw-PulseDot 2s ease-in-out infinite;
}

/* ── scope cards (Export) ────────────────────────────────────────── */
.popup-wireframe .scope-grid { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.popup-wireframe .scope-card {
  position:relative; display:flex; flex-direction:column; align-items:flex-start; text-align:left;
  padding:14px; background:var(--m-surface); border:2px solid var(--m-border); border-radius:12px;
  cursor:pointer; opacity:0;
  transition: border-color .15s, background .15s, transform .28s var(--ease-smooth), box-shadow .28s var(--ease-smooth);
}
.popup-wireframe .scope-card.is-visible { animation: pw-GridIn .32s var(--ease-smooth) both; opacity:1; }
.popup-wireframe .scope-card:hover { background:var(--m-surface-2); transform:scale(1.02); }
.popup-wireframe .scope-card:active { transform:scale(.97); }
.popup-wireframe .scope-card.is-selected { border-color:var(--m-accent); background:var(--m-accent-tint); }
.popup-wireframe .scope-card .icon { width:20px; height:20px; margin-bottom:8px; color:var(--m-text-2); transition:color .15s; }
.popup-wireframe .scope-card.is-selected .icon { color:var(--m-accent); }
.popup-wireframe .scope-title { font-size:13px; font-weight:500; color:var(--m-text); }
.popup-wireframe .scope-sub { font-size:11px; color:var(--m-text-3); margin-top:2px; }

/* ── format grid (Export) ────────────────────────────────────────── */
.popup-wireframe .format-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:8px; }
.popup-wireframe .fmt-card {
  position:relative; display:flex; flex-direction:column; align-items:center; gap:6px;
  padding:12px 4px; background:var(--m-surface); border:2px solid var(--m-border); border-radius:12px;
  cursor:pointer; color:var(--m-text); opacity:0;
  transition: border-color .15s, background .15s, transform .22s var(--ease-snap), box-shadow .22s var(--ease-snap);
}
.popup-wireframe .fmt-card.is-visible { animation: pw-GridIn .32s var(--ease-smooth) both; opacity:1; }
.popup-wireframe .fmt-card:hover { border-color:var(--m-border-2); transform:scale(1.05) translateY(-2px); }
.popup-wireframe .fmt-card:active { transform:scale(.94); }
.popup-wireframe .fmt-card.is-selected { border-color:var(--m-accent); background:var(--m-accent-tint); }
.popup-wireframe .fmt-card .icon { width:20px; height:20px; color:var(--m-text-2); transition:color .15s; }
.popup-wireframe .fmt-card.is-selected .icon { color:var(--m-accent); }
.popup-wireframe .fmt-card span:not(.pro-tag) { font-size:11px; font-weight:500; }

/* ── destination grid (Send To) ──────────────────────────────────── */
.popup-wireframe .dest-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; }
.popup-wireframe .dest-card {
  position:relative; display:flex; flex-direction:column; align-items:center; gap:8px;
  padding:12px 6px; background:var(--m-surface); border:2px solid var(--m-border); border-radius:12px;
  cursor:pointer; opacity:0;
  transition: border-color .15s, background .15s, transform .25s var(--ease-snap), box-shadow .25s var(--ease-snap);
}
.popup-wireframe .dest-card.is-visible { animation: pw-GridIn .32s var(--ease-smooth) both; opacity:1; }
.popup-wireframe .dest-card:hover { border-color:var(--m-border-2); transform:translateY(-3px); box-shadow:var(--m-card-hover-shadow); }
.popup-wireframe .dest-card:active { transform:scale(.95); box-shadow:none; }
.popup-wireframe .dest-card.is-selected { border-color:var(--m-accent); background:var(--m-accent-tint); }
.popup-wireframe .dest-card.dest-add { background:transparent; border-style:dashed; border-color:var(--m-border-2); }
.popup-wireframe .dest-card.dest-add:hover { background:var(--m-surface); }
.popup-wireframe .dest-avatar { width:36px; height:36px; border-radius:11px; display:flex; align-items:center; justify-content:center; color:#fff; font-weight:700; font-size:14px; }
.popup-wireframe .dest-avatar-empty { background:var(--m-surface-2); color:var(--m-text-3); }
.popup-wireframe .dest-avatar-logo { background:var(--logo-chip); box-shadow:inset 0 0 0 1px var(--logo-ring); }
.popup-wireframe .dest-avatar-logo img { width:22px; height:22px; object-fit:contain; }
.popup-wireframe .dest-avatar-logo .logo-mono { filter:var(--logo-mono-filter); }
.popup-wireframe .dest-name { font-size:12px; font-weight:500; color:var(--m-text); }
.popup-wireframe .dest-name.muted { color:var(--m-text-3); }
.popup-wireframe .dest-sub { font-size:10px; color:var(--m-text-3); text-align:center; }

/* ── PRO tag (hidden in Pro state, kept for fidelity) ────────────── */
.popup-wireframe .pro-tag {
  position:absolute; top:6px; right:6px; font-size:8px; font-weight:700; letter-spacing:.04em;
  padding:1px 5px; border-radius:999px; background:var(--m-accent-tint); color:#a89af7;
  border:1px solid var(--m-accent-ring);
}

/* ── CTA ─────────────────────────────────────────────────────────── */
.popup-wireframe .cta {
  margin-top:auto; width:100%; display:flex; align-items:center; justify-content:center; gap:8px;
  padding:11px; font-size:14px; font-weight:500; font-family:var(--pw-font); color:#fff;
  background:var(--m-accent); border:none; border-radius:12px; cursor:pointer; white-space:nowrap;
  transition: background .15s, transform .28s var(--ease-smooth), box-shadow .28s var(--ease-smooth), opacity .15s;
}
.popup-wireframe .cta:hover:not(:disabled) { background:var(--m-accent-hover); transform:scale(1.015); box-shadow:0 0 20px var(--m-accent-glow); }
.popup-wireframe .cta:active:not(:disabled) { transform:scale(.985); box-shadow:none; }
.popup-wireframe .cta:disabled { opacity:.4; cursor:not-allowed; }
.popup-wireframe .export-cta-group { margin-top:auto; display:flex; gap:8px; }
.popup-wireframe .export-cta-group .cta { margin-top:0; width:auto; min-width:0; }
.popup-wireframe .export-cta-group .cta-main { flex:1 1 auto; }
.popup-wireframe .cta-ghost { flex:0 1 auto; background:var(--m-surface-2); color:var(--m-text); white-space:nowrap; padding-left:16px; padding-right:16px; }
.popup-wireframe .cta-ghost:hover:not(:disabled) { background:var(--m-hover); box-shadow:none; }

/* ── footer ──────────────────────────────────────────────────────── */
.popup-wireframe .m-footer {
  display:flex; align-items:center; justify-content:space-between;
  padding:12px 20px; border-top:1px solid var(--m-divider);
  animation: pw-FooterIn .36s var(--ease-smooth) .28s both;
}
.popup-wireframe .usage { display:flex; align-items:center; gap:8px; }
.popup-wireframe .usage-dot { width:6px; height:6px; border-radius:50%; background:var(--m-text-3); transition:background .3s; }
.popup-wireframe .usage-dot.pro { background:var(--m-accent); }
.popup-wireframe .usage-text { font-size:11px; font-weight:500; color:var(--m-text-3); }
.popup-wireframe .usage-text.pro { color:#a89af7; }
.popup-wireframe .footer-btn {
  display:flex; align-items:center; gap:6px; height:28px; padding:0 10px;
  font-size:11px; font-weight:500; font-family:var(--pw-font); color:var(--m-text-2);
  background:transparent; border:none; border-radius:6px; cursor:pointer;
  transition: color .15s, background .15s, transform .2s var(--ease-snap);
}
.popup-wireframe .footer-btn:hover { color:var(--m-text); background:var(--m-hover); }
.popup-wireframe .footer-btn:active { transform:scale(.94); }

/* ── history view ────────────────────────────────────────────────── */
.popup-wireframe .history-header {
  display:flex; align-items:center; gap:10px; padding:16px 16px 12px;
  border-bottom:1px solid var(--m-divider-soft);
}
.popup-wireframe .history-title { flex:1; min-width:0; }
.popup-wireframe .ht-main { font-size:13px; font-weight:600; color:var(--m-text); margin:0; }
.popup-wireframe .ht-sub { font-size:11px; color:var(--m-text-3); margin:0; }
.popup-wireframe .history-count {
  display:flex; align-items:center; gap:5px; padding:3px 9px;
  background:var(--m-track); border-radius:999px; color:var(--m-text-3); font-size:10px; font-weight:500;
}
.popup-wireframe .history-count .icon { width:12px; height:12px; }
.popup-wireframe .history-search { padding:12px 16px 8px; }
.popup-wireframe .history-search input {
  width:100%; background:var(--m-surface); border:1px solid var(--m-border); color:var(--m-text);
  border-radius:10px; font-size:13px; padding:10px 12px; font-family:var(--pw-font); outline:none;
}
.popup-wireframe .history-search input::placeholder { color:var(--m-text-3); }
.popup-wireframe .history-search input:focus { border-color:var(--m-accent); box-shadow:0 0 0 2px var(--m-accent-tint); }
.popup-wireframe .recent-list { display:flex; flex-direction:column; gap:2px; padding:4px 10px 12px; flex:1; overflow-y:auto; min-height:0; }
.popup-wireframe .recent-list::-webkit-scrollbar { width:0; }
.popup-wireframe .recent-item {
  display:flex; align-items:center; gap:12px; padding:10px 8px; border-radius:12px; cursor:pointer; opacity:0;
  transition: background .12s, transform .22s var(--ease-snap);
}
.popup-wireframe .recent-item.is-visible { animation: pw-ListIn .3s var(--ease-smooth) both; opacity:1; }
.popup-wireframe .recent-item:hover { background:var(--m-hover); transform:translateX(2px); }
.popup-wireframe .recent-item:active { transform:scale(.98) translateX(0); }
.popup-wireframe .recent-icon { width:32px; height:32px; border-radius:9px; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.popup-wireframe .recent-icon-logo { background:var(--logo-chip); box-shadow:inset 0 0 0 1px var(--logo-ring); }
.popup-wireframe .recent-logo { width:18px; height:18px; object-fit:contain; }
.popup-wireframe .recent-logo.logo-mono { filter:var(--logo-mono-filter); }
.popup-wireframe .recent-item-info { flex:1; min-width:0; }
.popup-wireframe .recent-item-title { display:block; font-size:12px; font-weight:500; color:var(--m-text); line-height:1.2; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.popup-wireframe .recent-item-meta { display:block; font-size:10px; color:var(--m-text-3); margin-top:2px; }
.popup-wireframe .recent-actions { display:flex; gap:4px; flex-shrink:0; }
.popup-wireframe .recent-actions button {
  padding:5px 9px; font-size:11px; font-weight:500; font-family:var(--pw-font);
  border:1px solid var(--m-border); background:var(--m-surface); color:var(--m-text-2);
  border-radius:7px; cursor:pointer; transition: background .12s, color .12s, transform .15s var(--ease-snap);
}
.popup-wireframe .recent-actions button:hover { background:var(--m-surface-2); color:var(--m-text); }
.popup-wireframe .recent-actions button:active { transform:scale(.93); }
.popup-wireframe .recent-actions .ra-inject { background:var(--m-accent); border-color:var(--m-accent); color:#fff; }
.popup-wireframe .recent-actions .ra-inject:hover { background:var(--m-accent-hover); }

/* ── wireframe ribbon (subtle "preview" hint) ────────────────────── */
.popup-wireframe-stage { position:relative; display:flex; flex-direction:column; align-items:center; justify-content:center; width:100%; max-width:400px; min-width:0; }
.pw-preview-tag {
  z-index:3; font-size:11px; font-weight:600; letter-spacing:.04em;
  padding:6px 16px; border-radius:999px; white-space:nowrap;
  background:rgba(124,106,247,0.14); color:#b9aef9; border:1px solid rgba(124,106,247,0.35);
  backdrop-filter:blur(8px); margin-bottom:22px;
}

/* ── custom / bulk export config view ────────────────────────────── */
.popup-wireframe .view-bulk-config { display:flex; flex-direction:column; height:100%; }
.popup-wireframe .view-bulk-config[hidden] { display:none; }
.popup-wireframe .bc-header {
  display:flex; align-items:center; gap:8px; padding:10px 16px 8px;
  border-bottom:1px solid var(--m-divider-soft); flex-shrink:0;
}
.popup-wireframe .bc-title { font-size:13px; font-weight:700; color:var(--m-text); margin:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; min-width:0; }
.popup-wireframe .bulk-setup {
  flex:1 1 0; min-height:0; overflow-y:auto; overscroll-behavior:contain;
  padding:14px 16px; display:flex; flex-direction:column; gap:14px;
  animation: pw-PanelIn .22s var(--ease-smooth) both;
}
.popup-wireframe .bulk-setup::-webkit-scrollbar { width:0; }
.popup-wireframe .bulk-setup-end { height:4px; flex-shrink:0; }

.popup-wireframe .chip-row { display:flex; flex-wrap:wrap; gap:6px; margin:0; }
.popup-wireframe .chip {
  padding:4px 10px; font-size:11px; font-weight:600; font-family:var(--pw-font);
  border-radius:999px; background:var(--m-track); color:var(--m-text-2);
  border:1px solid var(--m-border); cursor:pointer; white-space:nowrap;
  transition: color .18s var(--ease-smooth), background .18s var(--ease-smooth), border-color .18s var(--ease-smooth), box-shadow .18s var(--ease-smooth);
}
.popup-wireframe .chip:hover { border-color:var(--m-border-2); color:var(--m-text); background:var(--m-hover); }
.popup-wireframe .chip.is-selected { background:var(--m-accent); border-color:var(--m-accent); color:#fff; box-shadow:0 0 12px var(--m-accent-glow); }

.popup-wireframe .range-card {
  display:flex; align-items:flex-end; gap:12px; margin:0; padding:12px;
  background:var(--m-surface); border:1px solid var(--m-border); border-radius:16px;
}
.popup-wireframe .range-card[hidden] { display:none; }
.popup-wireframe .range-field { flex:1; min-width:0; display:flex; flex-direction:column; gap:5px; }
.popup-wireframe .range-field label { font-size:11px; font-weight:600; color:var(--m-text-3); }
.popup-wireframe .date-input {
  flex:1; width:100%; padding:9px 10px; font-size:13px; font-family:var(--pw-font);
  background:var(--m-bg); border:1px solid var(--m-border); border-radius:12px;
  color:var(--m-text); color-scheme:dark; outline:none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.popup-wireframe .date-input:focus { border-color:var(--m-accent); box-shadow:0 0 0 3px var(--m-accent-ring); }
.popup-wireframe .cr-sep { color:var(--m-text-3); display:inline-flex; align-items:center; padding-bottom:9px; }
.popup-wireframe .cr-sep .icon { width:16px; height:16px; stroke:var(--m-text-3); }

.popup-wireframe .chats-bar { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.popup-wireframe .chats-title { display:inline-flex; align-items:center; gap:7px; font-size:13px; font-weight:700; color:var(--m-text); }
.popup-wireframe .chats-count {
  font-size:10px; font-weight:600; color:var(--m-accent);
  background:var(--m-accent-tint); border:1px solid var(--m-accent-ring);
  border-radius:999px; padding:2px 8px;
}
.popup-wireframe .chats-actions { display:flex; gap:14px; align-items:center; }
.popup-wireframe .chats-action {
  display:inline-flex; align-items:center; gap:4px; background:none; border:none; cursor:pointer;
  font-size:12px; font-weight:600; font-family:var(--pw-font); color:var(--m-text-2); padding:3px 0;
  transition: color .15s ease;
}
.popup-wireframe .chats-action.accent { color:var(--m-accent); }
.popup-wireframe .chats-action:hover { color:var(--m-text); }
.popup-wireframe .chats-action.accent:hover { color:var(--m-accent-hover); }

.popup-wireframe .chats-list { overflow:visible; border:1px solid var(--m-border); border-radius:16px; background:var(--m-surface); }
.popup-wireframe .chat-row {
  display:flex; align-items:center; gap:10px; padding:10px 12px;
  border-bottom:1px solid var(--m-divider-soft); cursor:pointer;
  transition: background .15s ease;
}
.popup-wireframe .chat-row:last-child { border-bottom:none; }
.popup-wireframe .chat-row:hover { background:var(--m-hover); }
.popup-wireframe .chat-check {
  flex:0 0 auto; width:0; height:18px; border-radius:5px; border:1.5px solid var(--m-border-2);
  display:flex; align-items:center; justify-content:center; overflow:hidden;
  opacity:0; margin-right:-10px;
  transition: background .15s ease, border-color .15s ease, opacity .15s ease, width .15s ease, margin-right .15s ease;
}
.popup-wireframe .chats-list.is-select-mode .chat-check { opacity:1; width:18px; margin-right:0; }
.popup-wireframe .chat-row.is-checked .chat-check { background:var(--m-accent); border-color:var(--m-accent); }
.popup-wireframe .chat-check svg { width:11px; height:11px; stroke:#fff; opacity:0; transition: opacity .1s ease; }
.popup-wireframe .chat-row.is-checked .chat-check svg { opacity:1; }
.popup-wireframe .chat-row .row-icon { flex:0 0 auto; width:15px; height:15px; stroke:var(--m-text-3); }
.popup-wireframe .chat-info { flex:1; min-width:0; }
.popup-wireframe .chat-name { font-size:13px; color:var(--m-text); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.popup-wireframe .chat-date { font-size:11px; color:var(--m-text-3); white-space:nowrap; }

.popup-wireframe .bulk-footer { flex-shrink:0; padding:10px 16px 0; border-top:1px solid var(--m-divider-soft); }
.popup-wireframe .bulk-footer #pw-bulk-start { margin-top:0; }
.popup-wireframe .bulk-footer .m-footer { padding:9px 4px 11px; border-top:none; animation:none; }

/* Keep the wireframe visible on mobile (the old static hero image was hidden). */
@media (max-width: 968px) {
  .hero .hero-visual.hero-visual-wireframe { display:flex; margin-top:48px; width:100%; min-width:0; }
  .hero-visual-wireframe .hero-float-badge { display:none; }
  .popup-wireframe { animation:none; }
}

/* Phones — enlarge the small glyphs so they read clearly at finger scale. */
@media (max-width: 480px) {
  .popup-wireframe .scope-card .icon,
  .popup-wireframe .fmt-card .icon { width:24px; height:24px; }
  .popup-wireframe .cta .icon { width:17px; height:17px; }
  .popup-wireframe .chat-row .row-icon { width:18px; height:18px; }
  .popup-wireframe .cr-sep .icon { width:18px; height:18px; }
  .popup-wireframe .scope-card { padding:14px 12px; }
  .popup-wireframe .fmt-card { padding:14px 4px; gap:8px; }
}

/* Narrow phones — tighten internal spacing so nothing crowds or clips. */
@media (max-width: 380px) {
  .popup-wireframe .tablist { margin:12px 12px 0; gap:3px; }
  .popup-wireframe .tab { padding:7px 4px; font-size:11px; gap:3px; }
  .popup-wireframe .tabpanel { padding:14px 12px; }
  .popup-wireframe .m-header { padding:16px 14px 14px; }
  .popup-wireframe .m-footer { padding:12px 14px; }
  .popup-wireframe .platform-grid,
  .popup-wireframe .format-grid { gap:6px; }
  .popup-wireframe .plat-name { font-size:9px; }
}
