/* ============================================
   Anyverse - Dark Premium Theme
   Layout inspired by Jimeng / Kling / LibTV
   Left sidebar + main content area
   Zero Chinese characters.
   ============================================ */

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

:root {
    --bg-base: #0A0A0F;
    --bg-sidebar: #0D0D14;
    --bg-card: #14141F;
    --bg-card-hover: #1A1A2E;
    --bg-input: #0F0F18;
    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);
    --text-1: #FFFFFF;
    --text-2: #9CA3AF;
    --text-3: #6B7280;
    --grad: linear-gradient(135deg, #7C3AED, #8B5CF6 50%, #06B6D4);
    --grad-hover: linear-gradient(135deg, #8B5CF6, #A78BFA 50%, #22D3EE);
    --grad-text: linear-gradient(135deg, #8B5CF6, #06B6D4);
    --primary: #8B5CF6;
    --accent: #06B6D4;
    --glow: 0 0 40px rgba(124, 58, 237, 0.25);
    --glow-sm: 0 0 20px rgba(124, 58, 237, 0.12);
    --c-success: #10B981;
    --c-danger: #EF4444;
    --c-warning: #F59E0B;
    --c-info: #3B82F6;
    --radius: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --sidebar-w: 240px;
    --topbar-h: 56px;
}

html { font-size: 15px; }
body {
    font-family: var(--font);
    background: var(--bg-base);
    color: var(--text-1);
    margin: 0; padding: 0;
    overflow-x: hidden;
    min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; }
img { max-width: 100%; display: block; }

/* ---- App Shell: Sidebar + Main ---- */
.app-shell { display: flex; min-height: 100vh; }

/* ---- Sidebar (Desktop) ---- */
.sidebar {
    width: var(--sidebar-w);
    flex-shrink: 0;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    display: flex; flex-direction: column;
    position: fixed; top: 0; bottom: 0; left: 0; z-index: 200;
    transition: transform var(--transition);
}
.sidebar-brand {
    padding: 18px 20px;
    display: flex; align-items: center; gap: 8px;
    border-bottom: 1px solid var(--border);
}
.sidebar-brand .logo-icon {
    width: 32px; height: 32px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}
.sidebar-brand .logo-icon img {
    width: 100%; height: 100%; object-fit: contain; display: block;
}
.sidebar-brand .logo-text {
    font-size: 17px; font-weight: 700;
    background: var(--grad-text);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.sidebar-nav { flex: 1; padding: 10px 10px; overflow-y: auto; }
.sidebar-section-label {
    font-size: 10px; font-weight: 600; text-transform: uppercase;
    letter-spacing: 1px; color: var(--text-3);
    padding: 16px 12px 6px;
}
.sidebar-item {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 12px; border-radius: var(--radius);
    color: var(--text-2); font-size: 14px; font-weight: 500;
    transition: var(--transition); margin-bottom: 2px; cursor: pointer;
}
.sidebar-item i { font-size: 17px; width: 20px; text-align: center; }
.sidebar-item:hover { background: rgba(255,255,255,0.04); color: var(--text-1); }
.sidebar-item.active {
    background: rgba(124, 58, 237, 0.12);
    color: var(--text-1);
}
.sidebar-item.active i { color: #8B5CF6; }
.sidebar-item.sidebar-sub { padding-left: 46px; font-size: 13.5px; opacity: .88; }
.sidebar-item.sidebar-sub i { font-size: 14px; opacity: .9; }
.sidebar-item.sidebar-sub:hover { opacity: 1; }
.sidebar-item.sidebar-sub.active { opacity: 1; }
.sidebar-item.sidebar-parent { user-select: none; }
.sidebar-item.sidebar-parent .sb-chevron { margin-left: auto; font-size: 11px; opacity: .55; transition: transform .2s ease; }
.sidebar-item.sidebar-parent.collapsed .sb-chevron { transform: rotate(-90deg); }
.sidebar-item.sidebar-parent.active { background: transparent; color: var(--text-1); }
.sidebar-item.sidebar-parent.active i { color: #8B5CF6; }
/* v65: submenu max-height widened to fit the 6 Toolbox items (~42px each) */
.sidebar-submenu { overflow: hidden; max-height: 340px; transition: max-height .25s ease; }
.sidebar-submenu.collapsed { max-height: 0; }

/* v85: Toolbox popover mode - collapsed by default, opens as a floating panel instead of inline expansion */
.sidebar-submenu.popover-mode {
    position: fixed;
    max-height: none;
    overflow: visible;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55);
    padding: 6px;
    min-width: 224px;
    z-index: 260;
    display: none;
}
.sidebar-submenu.popover-mode.open { display: block; }
.sidebar-submenu.popover-mode .sidebar-item.sidebar-sub {
    padding-left: 12px;
    border-radius: 8px;
    white-space: nowrap;
}
.sidebar-footer {
    padding: 12px 16px; border-top: 1px solid var(--border);
    display: flex; align-items: center; gap: 10px;
}
.sidebar-footer .sf-avatar {
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--grad);
    display: flex; align-items: center; justify-content: center;
    color: white; font-weight: 600; font-size: 13px;
    flex-shrink: 0;
}
.sidebar-footer .sf-info { flex: 1; min-width: 0; }
.sidebar-footer .sf-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-footer .sf-credits { font-size: 11px; color: var(--text-3); }
.sidebar-footer .sf-credits b { color: #F59E0B; }
/* v86: sidebar footer card is a clickable link (Guest -> login, signed-in -> credits) */
.sidebar-footer .sf-link {
    flex: 1;
    display: flex; align-items: center; gap: 10px;
    min-width: 0;
    text-decoration: none;
    color: inherit;
    border-radius: var(--radius);
    padding: 4px 6px;
    margin: -4px -6px;
    transition: background var(--transition);
}
.sidebar-footer .sf-link:hover { background: rgba(255, 255, 255, 0.05); }

/* ---- Mobile sidebar toggle ---- */
.sidebar-overlay {
    position: fixed; inset: 0; z-index: 199;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    display: none;
}
.sidebar-overlay.show { display: block; }
@media (max-width: 991px) {
    .sidebar { transform: translateX(-100%); z-index: 201; }
    .sidebar.show { transform: translateX(0); }
}

/* ---- Main Content ---- */
.main {
    flex: 1; margin-left: var(--sidebar-w);
    display: flex; flex-direction: column; min-height: 100vh;
    transition: margin var(--transition);
}
@media (max-width: 991px) { .main { margin-left: 0; } }

/* ---- Top Bar (in main area) ---- */
.topbar {
    height: var(--topbar-h);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 24px;
    border-bottom: 1px solid var(--border);
    background: rgba(10, 10, 15, 0.7);
    backdrop-filter: blur(16px);
    position: sticky; top: 0; z-index: 100;
}
.topbar-left { display: flex; align-items: center; gap: 12px; }
.topbar-mobile-toggle {
    display: none; font-size: 20px; color: var(--text-2);
    padding: 4px 8px;
}
@media (max-width: 991px) { .topbar-mobile-toggle { display: block; } }
.topbar-title { font-size: 16px; font-weight: 600; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.topbar-credits {
    display: flex; align-items: center; gap: 5px;
    padding: 5px 12px; border-radius: 20px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    font-size: 13px; font-weight: 600; cursor: pointer;
    transition: var(--transition);
}
.topbar-credits:hover { border-color: var(--border-hover); }
.topbar-credits i { color: #F59E0B; }
.topbar-credits .val { background: var(--grad-text); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.topbar-avatar {
    width: 32px; height: 32px; border-radius: 50%;
    border: 2px solid var(--border-hover); cursor: pointer; object-fit: cover;
}
.topbar-avatar-ph {
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--grad);
    display: flex; align-items: center; justify-content: center;
    color: white; font-weight: 600; font-size: 13px; cursor: pointer;
}

/* ---- Content Area ---- */
.content { flex: 1; padding: 24px; }
@media (max-width: 767px) { .content { padding: 16px; } }

/* ---- Loader ---- */
.app-loader { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100vh; gap: 14px; }
.app-loader p { color: var(--text-2); font-size: 14px; }
.loader-spinner { width: 36px; height: 36px; border: 3px solid var(--bg-card); border-top-color: #8B5CF6; border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Buttons ---- */
.btn-grad {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 10px 22px; border-radius: var(--radius);
    background: var(--grad); color: white;
    font-weight: 600; font-size: 14px; transition: var(--transition); white-space: nowrap;
}
.btn-grad:hover { background: var(--grad-hover); transform: translateY(-1px); box-shadow: var(--glow); }
.btn-grad:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-ghost {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 10px 22px; border-radius: var(--radius);
    background: rgba(255,255,255,0.04); border: 1px solid var(--border);
    color: var(--text-1); font-weight: 500; font-size: 14px; transition: var(--transition);
}
.btn-ghost:hover { background: rgba(255,255,255,0.08); border-color: var(--border-hover); }
.btn-sm { padding: 6px 14px; font-size: 12px; }
.btn-lg { padding: 14px 36px; font-size: 16px; }
.btn-danger { background: rgba(239,68,68,0.12); color: var(--c-danger); padding: 6px 14px; border-radius: var(--radius); font-size: 12px; font-weight: 600; }
.btn-danger:hover { background: rgba(239,68,68,0.2); }
.btn-success { background: rgba(16,185,129,0.12); color: var(--c-success); padding: 6px 14px; border-radius: var(--radius); font-size: 12px; font-weight: 600; }

/* ---- Glass Card ---- */
.card-glass {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: var(--transition);
}
.card-glass:hover { border-color: var(--border-hover); }

/* ---- Gradient Text ---- */
.grad-text { background: var(--grad-text); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

/* ---- Section ---- */
.section { margin-bottom: 40px; }
.section-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.section-title { font-size: 18px; font-weight: 700; letter-spacing: -0.3px; }
h2.section-title, h3.section-title { margin: 0; }
@media (min-width: 768px) { .section-title { font-size: 22px; } }
.section-more { font-size: 13px; color: var(--text-2); cursor: pointer; }
.section-more:hover { color: var(--text-1); }

/* ---- Feature Cards (3-step) ---- */
.feature-row { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 768px) { .feature-row { grid-template-columns: repeat(3, 1fr); } }
.feature-card {
    padding: 28px 22px; text-align: center;
    border: 1px solid var(--border); border-radius: var(--radius-lg);
    background: var(--bg-card); transition: var(--transition);
    position: relative; overflow: hidden;
}
.feature-card:hover { border-color: var(--border-hover); transform: translateY(-3px); }
.feature-card .fc-num {
    position: absolute; top: 12px; right: 16px;
    font-size: 36px; font-weight: 800; opacity: 0.05;
}
.feature-card .fc-icon {
    width: 48px; height: 48px; margin: 0 auto 14px;
    border-radius: 12px; background: var(--grad);
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; color: white; box-shadow: var(--glow-sm);
}
.feature-card h5, .feature-card h3 { font-size: 15px; font-weight: 600; margin: 0 0 6px; }
.feature-card p { font-size: 12px; color: var(--text-2); margin: 0; line-height: 1.6; }

/* ---- Modal ---- */
.modal-bg { position: fixed; inset: 0; z-index: 1000; background: rgba(0,0,0,0.8); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal-box { width: 100%; max-width: 560px; max-height: 85vh; overflow-y: auto; border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--bg-card); padding: 24px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.modal-title { font-size: 16px; font-weight: 600; }
.modal-close { font-size: 22px; color: var(--text-3); cursor: pointer; line-height: 1; }
.modal-close:hover { color: var(--text-1); }

/* ---- Bootstrap modal dark override (works page detail dialog) ---- */
.modal-content { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); color: var(--text-1); }
.modal-header { border-bottom: 1px solid var(--border); padding: 16px 20px; }
.modal-body { padding: 20px; }
.modal-footer { border-top: 1px solid var(--border); }
.modal-content .modal-title { font-size: 16px; font-weight: 600; }
.btn-close { filter: invert(1) grayscale(100%); opacity: .55; }
.btn-close:hover { opacity: 1; }
.modal-content .form-control, .modal-content .form-select {
    background: var(--bg-input); border: 1px solid var(--border); color: var(--text-1);
}
.modal-content .form-control:focus { background: var(--bg-input); color: var(--text-1); box-shadow: 0 0 0 3px rgba(124,58,237,0.15); border-color: var(--border-hover); }

/* ---- Dark-theme Bootstrap overrides ---- */
.text-muted { color: var(--text-3) !important; }
.form-control, .form-select {
    background-color: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text-1);
}
.form-control:focus, .form-select:focus {
    background-color: var(--bg-input);
    border-color: #8B5CF6;
    color: var(--text-1);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}
.form-control::placeholder { color: var(--text-3); }
.btn-dark-outline {
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    color: var(--text-2);
}
.btn-dark-outline:hover {
    background: rgba(255,255,255,0.08);
    border-color: var(--border-hover);
    color: var(--text-1);
}
.t-warning { color: var(--c-warning); }
.t-info { color: var(--c-info); }
.t-success { color: var(--c-success); }
.t-danger { color: var(--c-danger); }
.progress { background: rgba(255,255,255,0.08); border-radius: 4px; }
.progress-bar { background: var(--grad); }

/* ---- Toast (f-toast prefix avoids conflict with the Bootstrap .toast component class) ---- */
.toast-wrap { position: fixed; top: 70px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; }
.f-toast { display: block; padding: 10px 18px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--bg-card); font-size: 13px; max-width: 340px; box-shadow: 0 8px 32px rgba(0,0,0,0.4); animation: slideIn 0.3s ease; }
.f-toast-success { border-left: 3px solid var(--c-success); }
.f-toast-error, .f-toast-danger { border-left: 3px solid var(--c-danger); }
.f-toast-warning { border-left: 3px solid var(--c-warning); }
.f-toast-info { border-left: 3px solid var(--c-info); }
@keyframes slideIn { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: translateX(0); } }

/* ---- Empty ---- */
.empty { text-align: center; padding: 50px 20px; color: var(--text-3); }
.empty i { font-size: 40px; margin-bottom: 12px; display: block; }

/* ---- Pagination ---- */
.pager { display: flex; justify-content: center; gap: 4px; margin-top: 20px; }
.pager button { padding: 6px 12px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--bg-card); color: var(--text-2); font-size: 13px; transition: var(--transition); }
.pager button:hover { color: var(--text-1); border-color: var(--border-hover); }
.pager button.active { background: var(--grad); color: white; border-color: transparent; }
.pager button:disabled { opacity: 0.4; cursor: not-allowed; }

/* ---- Bottom Nav (mobile only) ---- */
.bottom-nav {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
    background: rgba(10,10,15,0.9); backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    display: flex; justify-content: space-around; align-items: center;
    height: 56px; padding-bottom: env(safe-area-inset-bottom);
}
@media (min-width: 992px) { .bottom-nav { display: none; } }
.bn-item { display: flex; flex-direction: column; align-items: center; gap: 1px; color: var(--text-3); font-size: 10px; padding: 4px 10px; cursor: pointer; text-decoration: none; }
.bn-item.active { color: white; }
.bn-item i { font-size: 18px; }

/* ---- Form ---- */
.form-label { font-size: 12px; color: var(--text-2); margin-bottom: 4px; display: block; }
.form-input {
    width: 100%; padding: 9px 12px;
    background: var(--bg-input); border: 1px solid var(--border);
    border-radius: var(--radius); color: white; font-size: 14px;
    transition: var(--transition);
}
.form-input:focus { outline: none; border-color: #8B5CF6; box-shadow: 0 0 0 3px rgba(139,92,246,0.1); }

/* ---- Utility ---- */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-5 { margin-top: 20px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-5 { margin-bottom: 20px; }
.text-2 { color: var(--text-2); }
.text-3 { color: var(--text-3); }
.small { font-size: 12px; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.text-center { text-align: center; }
.w-full { width: 100%; }
.d-none { display: none; }

/* ===== AI scan-detect modal (v44) ===== */
.scan-modal { position: fixed; inset: 0; z-index: 1800; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(10,10,18,.72); backdrop-filter: blur(6px); }
.scan-dialog { width: min(460px, 100%); background: #16161f; border: 1px solid rgba(255,255,255,.09); border-radius: 16px; box-shadow: 0 24px 70px rgba(0,0,0,.5); overflow: hidden; animation: scanIn .22s ease; }
@keyframes scanIn { from { transform: translateY(14px) scale(.97); opacity: 0; } }
.scan-head { display: flex; align-items: center; justify-content: space-between; padding: 13px 16px 11px; }
.scan-title { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14.5px; color: #fff; }
.scan-title i { color: var(--accent); }
.scan-x { border: 0; background: transparent; color: #9aa0ae; font-size: 15px; padding: 4px 6px; border-radius: 8px; cursor: pointer; }
.scan-x:hover { color: #fff; background: rgba(255,255,255,.08); }
.scan-stage { position: relative; margin: 0 16px; border-radius: 12px; overflow: hidden; background: #0b0b12; display: flex; align-items: center; justify-content: center; }
.scan-img { display: block; max-width: 100%; max-height: 52vh; margin: 0 auto; }
.scan-beam { position: absolute; left: 0; right: 0; height: 74px; top: -74px; pointer-events: none; opacity: 0; background: linear-gradient(180deg, rgba(6,182,212,0) 0%, rgba(6,182,212,.16) 55%, rgba(6,182,212,.5) 82%, rgba(6,182,212,.95) 100%); }
.scan-beam::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: #22d3ee; box-shadow: 0 0 14px 3px rgba(34,211,238,.75); }
.scan-stage.is-scan .scan-beam { opacity: 1; animation: scanBeam 1.9s linear infinite; }
@keyframes scanBeam { 0% { top: -74px; } 100% { top: 100%; } }
.scan-c { position: absolute; width: 20px; height: 20px; border: 2px solid rgba(34,211,238,.85); pointer-events: none; opacity: 0; transition: opacity .2s; }
.scan-c.tl { left: 8px; top: 8px; border-right: 0; border-bottom: 0; border-radius: 6px 0 0 0; }
.scan-c.tr { right: 8px; top: 8px; border-left: 0; border-bottom: 0; border-radius: 0 6px 0 0; }
.scan-c.bl { left: 8px; bottom: 8px; border-right: 0; border-top: 0; border-radius: 0 0 0 6px; }
.scan-c.br { right: 8px; bottom: 8px; border-left: 0; border-top: 0; border-radius: 0 0 6px 0; }
.scan-stage.is-scan .scan-c { opacity: 1; animation: scanPulse 1.6s ease-in-out infinite; }
@keyframes scanPulse { 50% { border-color: rgba(34,211,238,.35); } }
.scan-stage.is-ok::after, .scan-stage.is-warn::after, .scan-stage.is-err::after { content: ''; position: absolute; inset: 0; pointer-events: none; }
.scan-stage.is-ok::after { box-shadow: inset 0 0 0 2px rgba(52,211,153,.8), inset 0 0 60px rgba(52,211,153,.14); }
.scan-stage.is-warn::after { box-shadow: inset 0 0 0 2px rgba(251,191,36,.8), inset 0 0 60px rgba(251,191,36,.12); }
.scan-stage.is-err::after { box-shadow: inset 0 0 0 2px rgba(248,113,113,.7), inset 0 0 60px rgba(248,113,113,.12); }
.scan-status { display: flex; align-items: center; gap: 9px; padding: 13px 18px 4px; font-size: 13px; color: #cfd3dc; }
.scan-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px rgba(6,182,212,.9); animation: scanBlink 1s ease-in-out infinite; flex: 0 0 auto; }
@keyframes scanBlink { 50% { opacity: .25; } }
.scan-status.s-ok .scan-dot { background: #34d399; box-shadow: 0 0 10px rgba(52,211,153,.9); animation: none; }
.scan-status.s-warn .scan-dot { background: #fbbf24; box-shadow: 0 0 10px rgba(251,191,36,.9); animation: none; }
.scan-status.s-err .scan-dot { background: #f87171; box-shadow: 0 0 10px rgba(248,113,113,.9); animation: none; }
.scan-result { padding: 8px 18px 2px; min-height: 30px; }
.scan-line { font-size: 13.5px; font-weight: 600; color: #fff; display: flex; align-items: center; gap: 7px; }
.scan-line i { font-size: 15px; }
.scan-line.ok { color: #34d399; }
.scan-line.warn { color: #fbbf24; }
.scan-line.err { color: #f87171; }
.scan-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.scan-chip { font-size: 11.5px; padding: 3px 10px; border-radius: 99px; background: rgba(139,92,246,.12); border: 1px solid rgba(139,92,246,.3); color: #ddd0ff; }
.scan-chip b { color: #fff; font-weight: 600; }
.scan-foot { display: flex; justify-content: flex-end; padding: 14px 16px 16px; }
.scan-btn { border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.06); color: #e8eaef; border-radius: 10px; padding: 8px 22px; font-size: 13px; font-weight: 600; cursor: pointer; }
.scan-btn:hover { background: rgba(255,255,255,.1); }
.scan-btn.primary { border: 0; background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; }
.scan-btn.primary:hover { filter: brightness(1.1); }
@media (max-width: 480px) { .scan-img { max-height: 44vh; } }

/* ===== SEO feature landing pages + homepage AI tools grid (v58) ===== */
.fp-hero { text-align: center; padding: 34px 10px 10px; }
.fp-hero h1 { font-size: clamp(30px, 5vw, 46px); font-weight: 800; letter-spacing: -.5px; margin: 0 0 12px; }
.fp-hero p { max-width: 760px; margin: 0 auto; color: var(--text-2); font-size: 15.5px; line-height: 1.65; }
.fp-crumb { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-3); margin-bottom: 18px; flex-wrap: wrap; justify-content: center; }
.fp-crumb a { color: var(--text-2); text-decoration: none; }
.fp-crumb a:hover { color: var(--text-1); }
.fp-crumb i { font-size: 10px; opacity: .7; }
.fp-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 24px; }
.fp-faq { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.fp-faq details { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 15px 18px; transition: var(--transition); }
.fp-faq details[open] { border-color: var(--border-hover); }
.fp-faq summary { cursor: pointer; font-weight: 700; font-size: 14.5px; color: var(--text-1); list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.fp-faq summary::-webkit-details-marker { display: none; }
.fp-faq summary::after { content: '+'; font-size: 20px; font-weight: 400; color: var(--text-3); flex: 0 0 auto; transition: var(--transition); }
.fp-faq details[open] summary::after { content: '−'; color: var(--primary); }
.fp-faq .fp-a { margin-top: 10px; color: var(--text-2); font-size: 13.8px; line-height: 1.65; }
/* v60: FAQ two-column grid (Contact page has 6 items; falls back to one column on narrow screens) */
.fp-faq-cols { max-width: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.fp-faq-cols details { min-width: 0; }
.fp-faq-cols .fp-a { overflow-wrap: break-word; }
@media (max-width: 768px) { .fp-faq-cols { grid-template-columns: 1fr; } }
.fp-cta-band { text-align: center; padding: 36px 18px; margin: 8px 0; border-radius: var(--radius-lg); background: linear-gradient(180deg, rgba(139,92,246,.10), transparent 75%), var(--bg-card); border: 1px solid var(--border); }
.fp-cta-band h3 { font-size: 22px; font-weight: 800; margin-bottom: 8px; }
.fp-cta-band p { color: var(--text-2); font-size: 14px; max-width: 560px; margin: 0 auto 18px; }
/* Homepage AI tools grid */
.fp-tool-card { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; height: 100%; padding: 16px 15px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); text-decoration: none; transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition); }
.fp-tool-card:hover { transform: translateY(-3px); border-color: var(--border-hover); box-shadow: var(--glow-sm); }
.fp-tool-ico { width: 38px; height: 38px; border-radius: 11px; display: flex; align-items: center; justify-content: center; font-size: 18px; color: var(--primary); background: rgba(139,92,246,.12); border: 1px solid rgba(139,92,246,.22); }
.fp-tool-card b { color: var(--text-1); font-size: 14.5px; line-height: 1.25; }
.fp-tool-card .text-sub { font-size: 12.3px; line-height: 1.45; }
.fp-tool-go { margin-top: auto; padding-top: 8px; font-size: 12.5px; font-weight: 600; color: var(--primary); display: inline-flex; align-items: center; gap: 5px; }
.fp-tool-card:hover .fp-tool-go { text-decoration: underline; }

/* ===== v59: footer nav + blog ===== */
.foot-nav { border-top: 1px solid var(--border); padding: 18px 22px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.foot-nav-links { display: flex; gap: 16px; flex-wrap: wrap; }
.foot-nav-links a { color: var(--text-3); font-size: 12.5px; text-decoration: none; }
.foot-nav-links a:hover { color: var(--text-1); }
.foot-copy { color: var(--text-3); font-size: 12px; }

/* ---- Shared demo / edit-aid components (feature pages + blog embeds + edit pages) ---- */
/* Video clip slot */
.ie-clip { margin-bottom: 10px; }
.ie-clip.drag .ie-clip-empty,
.ie-clip.drag .ie-clip-view { border-color: rgba(139,92,246,.55); box-shadow: var(--glow-sm); }
.ie-clip-empty,
.ie-upload-empty {
    width: 100%; display: flex; flex-direction: column; align-items: center; gap: 6px;
    padding: 30px 16px; border-radius: var(--radius-lg);
    border: 1.5px dashed rgba(255,255,255,.14); background: var(--bg-input);
    color: var(--text-1); transition: var(--transition);
}
.ie-clip-empty i,
.ie-upload-empty i { font-size: 26px; color: var(--primary); }
.ie-clip-empty b,
.ie-upload-empty b { font-size: 14.5px; }
.ie-clip-empty:hover,
.ie-upload-empty:hover { border-color: rgba(139,92,246,.45); background: rgba(139,92,246,.05); }
.ie-clip-view {
    position: relative; border-radius: var(--radius-lg); overflow: hidden;
    border: 1px solid var(--border); background: #000;
}
.ie-clip-view video { width: 100%; max-height: 240px; display: block; }
.ie-clip-up {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 8px;
    background: rgba(10,10,15,.62); backdrop-filter: blur(2px);
    font-size: 13px; color: #fff;
}
.ie-clip-x {
    position: absolute; top: 8px; right: 8px; width: 28px; height: 28px;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    background: rgba(10,10,15,.72); color: #fff; font-size: 13px;
    transition: var(--transition);
}
.ie-clip-x:hover { background: var(--c-danger); }

/* Instruction box */
.ie-prompt {
    background: var(--bg-input); border: 1px solid var(--border);
    color: var(--text-1); border-radius: var(--radius); font-size: 13.5px;
    line-height: 1.6; resize: vertical; min-height: 130px;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.ie-prompt:focus {
    outline: none; border-color: rgba(139,92,246,.5);
    box-shadow: 0 0 0 3px rgba(139,92,246,.12);
}
.ie-prompt-meta { text-align: right; font-size: 11.5px; color: var(--text-3); margin: 5px 2px 10px; }

/* Cost box */
.ie-cost {
    border: 1px solid var(--border); border-radius: var(--radius);
    background: var(--bg-input); padding: 10px 14px; margin-bottom: 12px;
    display: flex; flex-direction: column; gap: 5px;
}
.ie-cost-row { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: var(--text-2); }
.ie-cost-row b { color: var(--text-1); font-size: 13.5px; }
.ie-cost-row i { color: var(--primary); margin-right: 5px; }
/* ---- Hero (shared page title: Create / Custom Make / edit pages / contact) ---- */
.ie-hero { text-align: center; padding: 26px 10px 4px; }
.ie-hero h1 { font-size: clamp(30px, 5vw, 44px); font-weight: 800; letter-spacing: -.5px; margin: 0 0 10px; }
.ie-hero p { max-width: 620px; margin: 0 auto; color: var(--text-2); font-size: 15px; line-height: 1.6; }
.ie-hero-chips { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.ie-chip {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 12.5px; color: var(--text-2);
    padding: 5px 13px; border-radius: 99px;
    background: rgba(255,255,255,.04); border: 1px solid var(--border);
    transition: var(--transition);
}
.ie-chip i { color: var(--accent); }
.ie-chip:hover { border-color: var(--border-hover); color: var(--text-1); }

/* Feature-off banner */
.ie-off {
    display: flex; align-items: center; gap: 8px; justify-content: center;
    margin: 18px auto 0; padding: 10px 16px; max-width: 560px;
    border-radius: var(--radius); font-size: 13.5px; color: var(--c-warning);
    background: rgba(245, 158, 11, .07); border: 1px solid rgba(245, 158, 11, .25);
}
.ie-off i { font-size: 16px; }

.ie-link { color: var(--primary); }
.ie-link:hover { color: var(--accent); }

/* Demo panel */
.ie-demo {
    position: relative; border-radius: var(--radius-lg); overflow: hidden;
    border: 1px solid var(--border); background: var(--bg-card);
    min-height: 200px;
}
.ie-demo-media { position: relative; width: 100%; max-width: 880px; margin: 14px auto; aspect-ratio: 16/7; max-height: 460px; background: #05060a; }
.ie-demo-media img, .ie-demo-media video {
    position: absolute; inset: 0; margin: auto;
    max-width: 100%; max-height: 100%;
    object-fit: contain; display: block;
}
.ie-demo-media::after {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(180deg, transparent 60%, rgba(10,10,15,.5));
}
.ie-demo-sound {
    position: absolute; right: 14px; bottom: 14px; z-index: 3;
    width: 40px; height: 40px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid rgba(255,255,255,.25); background: rgba(10,10,15,.6);
    color: #fff; font-size: 17px; cursor: pointer;
    backdrop-filter: blur(4px); transition: background .15s, border-color .15s;
}
.ie-demo-sound:hover { background: rgba(10,10,15,.85); border-color: rgba(255,255,255,.5); }
.ie-demo-empty {
    aspect-ratio: 16/7; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 8px; text-align: center; padding: 30px 20px;
    border: 1.5px dashed rgba(255,255,255,.1); border-radius: var(--radius-lg);
    margin: 14px; color: var(--text-2);
    background: repeating-linear-gradient(-45deg, rgba(255,255,255,.012) 0 14px, transparent 14px 28px);
}
.ie-demo-empty i { font-size: 34px; color: var(--primary); opacity: .75; }
.ie-demo-empty p { margin: 0; font-size: 14.5px; color: var(--text-1); }
.ie-demo-empty .small { max-width: 460px; }
.ie-demo-broken .ie-demo-media { display: none; }
.ie-demo.ie-demo-broken { border: none; background: transparent; }

/* Cross-link cards */
.ie-links { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 760px) { .ie-links { grid-template-columns: 1fr; } }
.ie-nav-card {
    display: flex; align-items: center; gap: 14px;
    padding: 16px 18px; border-radius: var(--radius-lg);
    background: var(--bg-card); border: 1px solid var(--border);
    transition: var(--transition);
}
.ie-nav-card:hover { transform: translateY(-2px); border-color: var(--border-hover); box-shadow: var(--glow-sm); }
.ie-nav-ico {
    flex: 0 0 auto; width: 42px; height: 42px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center; font-size: 20px;
    color: var(--accent); background: rgba(6,182,212,.1); border: 1px solid rgba(6,182,212,.2);
}
.ie-nav-card b { font-size: 14px; color: var(--text-1); }
.ie-nav-go { margin-left: auto; color: var(--text-3); transition: var(--transition); }
.ie-nav-card:hover .ie-nav-go { color: var(--primary); transform: translateX(3px); }

/* v76→v77: limited-time offer bar under the page title (admin toggle promo_label_on) */
.promo-bar {
    display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px;
    max-width: 860px; margin: 0 auto 18px; padding: 9px 18px;
    border-radius: 12px; border: 1px solid rgba(255,203,107,0.35);
    background:
        radial-gradient(90% 140% at 50% -30%, rgba(255,203,107,0.14), transparent 60%),
        linear-gradient(135deg, rgba(255,203,107,0.10), rgba(255,122,69,0.07));
    color: #FFCB6B; font-size: 13px; text-decoration: none; transition: var(--transition);
}
.promo-bar > i { color: #FFB020; animation: promoBolt 2.2s ease-in-out infinite; }
.promo-bar b { font-weight: 800; letter-spacing: 0.3px; }
.promo-bar .pb-text { color: var(--text-2); }
.promo-bar .pb-cta { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; white-space: nowrap; }
.promo-bar .pb-cta i { color: #FFB020; transition: var(--transition); }
.promo-bar:hover { border-color: rgba(255,203,107,0.7); box-shadow: 0 0 26px rgba(255,176,32,0.14); }
.promo-bar:hover .pb-cta i { transform: translateX(3px); }
@media (max-width: 560px) {
    .promo-bar .pb-text { display: none; }
}

/* ============================================
   Promotion modal (v68 black-gold redesign; v69 items grid; v71 3-col + compact no-scroll) + credits banner
   ============================================ */
.promo-overlay {
    position: fixed; inset: 0; z-index: 2100;
    display: flex; align-items: center; justify-content: center; padding: 12px 20px;
    background: radial-gradient(120% 120% at 50% 0%, rgba(124,58,237,0.16), transparent 55%), rgba(5,5,10,0.82);
    backdrop-filter: blur(10px);
    opacity: 0; transition: opacity .28s cubic-bezier(.4,0,.2,1);
}
.promo-overlay.show { opacity: 1; }
.promo-dialog {
    position: relative; width: 100%; max-width: 660px; max-height: calc(100vh - 24px);
    display: flex; flex-direction: column; overflow: hidden;
    border-radius: 22px; border: 1px solid rgba(255,190,92,0.22);
    background: linear-gradient(180deg, #13111e 0%, #0d0c15 58%, #0b0a12 100%);
    box-shadow: 0 30px 90px rgba(0,0,0,0.65), 0 0 0 1px rgba(255,190,92,0.05), 0 0 70px rgba(124,58,237,0.12);
    transform: translateY(22px) scale(0.96); opacity: 0;
    transition: transform .32s cubic-bezier(.3,1.35,.55,1), opacity .28s ease;
}
.promo-overlay.show .promo-dialog { transform: translateY(0) scale(1); opacity: 1; }
.promo-dialog::before {
    content: ''; position: absolute; top: 0; left: 26px; right: 26px; height: 2px; z-index: 4;
    border-radius: 2px;
    background: linear-gradient(90deg, transparent, rgba(255,203,107,0.95) 30%, rgba(255,122,69,0.95) 50%, rgba(255,203,107,0.95) 70%, transparent);
}
.promo-close {
    position: absolute; top: 14px; right: 14px; z-index: 6;
    width: 34px; height: 34px; border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(10,9,16,0.55); backdrop-filter: blur(6px);
    color: var(--text-2); display: flex; align-items: center; justify-content: center;
    font-size: 14px; cursor: pointer; transition: all .2s ease;
}
.promo-close:hover { color: #fff; border-color: rgba(255,71,87,0.55); background: rgba(239,68,68,0.22); transform: rotate(90deg); }

/* ---- hero: glow + sparks + headline + flip countdown ---- */
.promo-top { position: relative; flex-shrink: 0; padding: 20px 26px 10px; text-align: center; overflow: hidden; }
.promo-top::after {
    content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 46px;
    background: linear-gradient(180deg, transparent, #0e0d16); pointer-events: none;
}
.promo-glow {
    position: absolute; inset: -30% -10%;
    background:
        radial-gradient(34% 42% at 22% 30%, rgba(124,58,237,0.30), transparent 68%),
        radial-gradient(30% 38% at 78% 26%, rgba(255,176,32,0.20), transparent 66%),
        radial-gradient(42% 52% at 50% 96%, rgba(255,90,200,0.15), transparent 70%);
    filter: blur(4px);
    animation: promoDrift 9s ease-in-out infinite alternate;
    pointer-events: none;
}
@keyframes promoDrift {
    from { transform: translate3d(-2.5%, -1%, 0) rotate(-1.2deg) scale(1.02); }
    to   { transform: translate3d(2.5%, 1.5%, 0) rotate(1.2deg) scale(1.05); }
}
.promo-sparks { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.promo-sparks i {
    position: absolute; width: 4px; height: 4px; border-radius: 50%;
    background: #FFCB6B; box-shadow: 0 0 8px 2px rgba(255,203,107,0.6);
    opacity: 0; animation: promoSpark linear infinite;
}
.promo-sparks i:nth-child(1) { left: 16%; top: 58%; animation-duration: 3.6s; animation-delay: .4s; }
.promo-sparks i:nth-child(2) { left: 32%; top: 76%; animation-duration: 4.4s; animation-delay: 1.8s; }
.promo-sparks i:nth-child(3) { left: 52%; top: 64%; animation-duration: 3.2s; animation-delay: 2.6s; }
.promo-sparks i:nth-child(4) { left: 70%; top: 74%; animation-duration: 4.8s; animation-delay: 1.1s; }
.promo-sparks i:nth-child(5) { left: 84%; top: 56%; animation-duration: 3.9s; animation-delay: .2s; }
@keyframes promoSpark {
    0% { transform: translateY(0) scale(0.6); opacity: 0; }
    25% { opacity: .9; }
    100% { transform: translateY(-74px) scale(0.15); opacity: 0; }
}
.promo-eyebrow {
    position: relative; display: inline-flex; align-items: center; gap: 7px;
    padding: 6px 16px; border-radius: 999px;
    background: linear-gradient(135deg, rgba(255,203,107,0.14), rgba(255,122,69,0.10));
    border: 1px solid rgba(255,203,107,0.38);
    color: #FFCB6B; font-size: 10.5px; font-weight: 800; letter-spacing: 2.2px; text-transform: uppercase;
}
.promo-eyebrow i { color: #FFB020; animation: promoBolt 2.2s ease-in-out infinite; }
@keyframes promoBolt {
    0%, 100% { transform: scale(1); text-shadow: none; }
    50% { transform: scale(1.18); text-shadow: 0 0 12px rgba(255,176,32,0.9); }
}
.promo-headline {
    position: relative; margin-top: 8px;
    font-size: clamp(19px, 3vw, 23px); font-weight: 800; line-height: 1.22; letter-spacing: -0.3px;
    background: linear-gradient(180deg, #FFFFFF 12%, #FFE7B8 55%, #FFB020 100%);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 6px 24px rgba(255,176,32,0.22));
}
.promo-desc { position: relative; margin: 5px auto 0; max-width: 88%; font-size: 12px; color: var(--text-2); line-height: 1.5; }
.promo-cdcap {
    position: relative; margin-top: 9px;
    display: flex; align-items: center; justify-content: center; gap: 7px;
    font-size: 10px; font-weight: 800; letter-spacing: 2.6px; color: #FDA4AF; text-transform: uppercase;
}
.pc-dot {
    width: 6px; height: 6px; border-radius: 50%; background: #FF4757;
    box-shadow: 0 0 8px rgba(255,71,87,0.9);
    animation: promoPulse 1.1s ease-in-out infinite;
}
@keyframes promoPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 6px rgba(255,71,87,0.7); }
    50% { transform: scale(1.35); box-shadow: 0 0 14px rgba(255,71,87,1); }
}
.promo-flip {
    position: relative; display: flex; justify-content: center; align-items: stretch; gap: 6px;
    margin-top: 7px;
}
.pf-cell {
    min-width: 46px; padding: 4px 7px 3px; border-radius: 11px; text-align: center;
    background: linear-gradient(180deg, rgba(255,255,255,0.055), rgba(255,255,255,0.015));
    border: 1px solid rgba(255,255,255,0.10);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.07), 0 6px 16px rgba(0,0,0,0.35);
}
.pf-cell b {
    display: block; line-height: 1.1;
    font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace;
    font-size: 16px; font-weight: 700; color: #FFD98E;
    text-shadow: 0 0 14px rgba(255,176,32,0.35);
}
.pf-cell span {
    display: block; margin-top: 2px;
    font-size: 8px; font-weight: 700; letter-spacing: 1.4px; color: var(--text-3); text-transform: uppercase;
}
.pf-cell.sec { border-color: rgba(255,71,87,0.22); }
.pf-cell.sec b { color: #FF9AA5; text-shadow: 0 0 14px rgba(255,71,87,0.35); }
.pf-sep { align-self: center; padding-bottom: 11px; font-size: 14px; font-weight: 800; color: var(--text-3); }
.pf-cell b.pop { animation: pfPop .4s cubic-bezier(.3,1.4,.6,1); }
@keyframes pfPop {
    0% { transform: translateY(-46%) scale(.8); opacity: .1; filter: blur(3px); }
    100% { transform: none; opacity: 1; filter: none; }
}

/* ---- item cards ---- */
.promo-body { position: relative; flex: 1; min-height: 0; overflow-y: auto; padding: 6px 18px 10px; }
.promo-list-head {
    display: flex; align-items: center; gap: 12px; margin: 0 2px 9px;
    color: var(--text-3); font-size: 10.5px; font-weight: 800; letter-spacing: 2.4px; text-transform: uppercase;
    white-space: nowrap;
}
.promo-list-head::before, .promo-list-head::after {
    content: ''; flex: 1; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.14), transparent);
}
.promo-items { display: flex; flex-direction: column; gap: 10px; }
.promo-item {
    position: relative; display: flex; align-items: center; gap: 13px;
    padding: 13px 16px 13px 18px; border-radius: 16px;
    border: 1.5px solid rgba(255,255,255,0.09);
    background: linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.012));
    cursor: pointer;
    transition: transform .2s ease, border-color .2s ease, box-shadow .25s ease, background .2s ease;
}
.promo-item:hover { transform: translateY(-2px); border-color: rgba(255,203,107,0.32); }
.promo-item.selected {
    border-color: rgba(255,203,107,0.75);
    background: linear-gradient(120deg, rgba(255,176,32,0.10), rgba(255,122,69,0.05) 60%, rgba(124,58,237,0.07));
    box-shadow: 0 0 0 1px rgba(255,203,107,0.28), 0 10px 30px rgba(255,150,32,0.13);
}
.pi-bar {
    position: absolute; left: 0; top: 18%; bottom: 18%; width: 3px; border-radius: 3px;
    background: linear-gradient(180deg, #FFCB6B, #FF7A45);
    opacity: 0; transition: opacity .2s ease, box-shadow .2s ease;
}
.promo-item.selected .pi-bar { opacity: 1; box-shadow: 0 0 10px rgba(255,176,32,0.7); }
.pi-radio {
    flex: 0 0 22px; width: 22px; height: 22px; border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.22); display: flex; align-items: center; justify-content: center;
    color: transparent; font-size: 12px; transition: all .2s ease;
}
.promo-item:hover .pi-radio { border-color: rgba(255,203,107,0.5); }
.promo-item.selected .pi-radio {
    border-color: transparent;
    background: linear-gradient(135deg, #FFCB6B, #FF7A45); color: #1a1206;
    box-shadow: 0 0 12px rgba(255,176,32,0.45);
}
.pi-main { flex: 1; min-width: 0; }
.pi-title { font-size: 14.5px; font-weight: 700; color: var(--text-1); }
.pi-goal {
    display: inline-flex; align-items: baseline; gap: 5px;
    margin-top: 5px; padding: 3px 9px; border-radius: 9px;
    background: linear-gradient(120deg, rgba(255,176,32,0.18), rgba(255,122,69,0.10));
    border: 1px solid rgba(255,203,107,0.35);
}
.pi-goal b { font-size: 19px; font-weight: 900; color: #FFE7B8; letter-spacing: .3px; }
.pi-goal span { font-size: 10.5px; font-weight: 700; color: #FFCB6B; text-transform: uppercase; letter-spacing: .4px; }
.pi-meta { margin-top: 4px; font-size: 11.5px; color: var(--text-3); }
.pi-right { text-align: right; flex-shrink: 0; }
.pi-price { font-size: 17px; font-weight: 800; color: #FFE7B8; }
.pi-was { margin-right: 5px; font-size: 12px; font-weight: 500; color: var(--text-3); text-decoration: line-through; opacity: .8; }
.promo-item.selected .pi-goal { border-color: rgba(255,203,107,0.6); background: linear-gradient(120deg, rgba(255,176,32,0.26), rgba(255,122,69,0.16)); }
.pi-sticker {
    position: absolute; top: -8px; right: 10px; z-index: 2;
    padding: 4px 10px; border-radius: 9px; transform: rotate(-6deg);
    font-size: 10.5px; font-weight: 900; letter-spacing: 0.6px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.4);
    animation: piWiggle 3.4s ease-in-out infinite;
}
.pi-sticker.st-gold {
    background: linear-gradient(135deg, #FFE29A, #FFB020 60%, #FF8A3C);
    color: #241503;
}
.pi-sticker.st-red {
    background: linear-gradient(135deg, #FF8A9B, #FF4757 65%, #E8323F);
    color: #fff;
}
@keyframes piWiggle {
    0%, 84%, 100% { transform: rotate(-6deg); }
    88% { transform: rotate(-2deg) scale(1.07); }
    93% { transform: rotate(-9deg) scale(1.04); }
}
/* multi-column item grid; card stacks vertically (radio+title / meta / price row) */
@media (min-width: 430px) {
    .promo-items { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
    .promo-item:last-child:nth-child(odd) { grid-column: 1 / -1; }
    .promo-item {
        display: grid;
        grid-template-columns: 18px 1fr;
        grid-template-areas:
            "radio title"
            "radio goal"
            "radio meta"
            "right right";
        gap: 1px 8px;
        align-items: center;
        padding: 9px 11px 7px 12px;
    }
    .pi-radio { grid-area: radio; align-self: start; margin-top: 1px; flex: 0 0 18px; width: 18px; height: 18px; font-size: 10.5px; }
    .pi-main { display: contents; }
    .pi-title { grid-area: title; font-size: 13px; }
    .pi-goal { grid-area: goal; margin-top: 4px; padding: 2px 8px; }
    .pi-goal b { font-size: 16px; }
    .pi-goal span { font-size: 9.5px; }
    .pi-meta { grid-area: meta; margin-top: 0; font-size: 11px; }
    .pi-right {
        grid-area: right;
        display: flex; align-items: center; justify-content: space-between; gap: 8px;
        text-align: left; margin-top: 3px; padding-top: 4px;
        border-top: 1px dashed rgba(255,255,255,0.12);
    }
    .pi-price { font-size: 15px; }
    .promo-item:last-child:nth-child(odd) .pi-right { justify-content: flex-start; gap: 22px; }
}
/* three columns on desktop (dialog widened to 660px) */
@media (min-width: 720px) {
    .promo-items { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
    .promo-item:last-child:nth-child(3n) { grid-column: auto; }
    .promo-item:last-child:nth-child(3n+1) { grid-column: 1 / -1; }
    .promo-item:last-child:nth-child(3n+2) { grid-column: span 2; }
    .promo-item { padding: 10px 10px 8px 12px; }
    .pi-title { font-size: 12.5px; line-height: 1.25; }
    .pi-goal { margin-top: 4px; padding: 3px 8px; }
    .pi-goal b { font-size: 17px; }
    .pi-goal span { font-size: 10px; }
    .pi-meta { font-size: 10px; line-height: 1.3; }
    .pi-price { font-size: 14.5px; }
    .promo-item:last-child:nth-child(3n+2) .pi-right { justify-content: flex-start; gap: 22px; }
}

/* ---- pay foot ---- */
.promo-foot {
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    margin-top: 8px; padding: 8px 12px; border-radius: 14px;
    background: linear-gradient(120deg, rgba(255,176,32,0.09), rgba(124,58,237,0.08));
    border: 1px solid rgba(255,203,107,0.28);
}
.pft-label { font-size: 9.5px; font-weight: 800; letter-spacing: 2px; color: var(--text-3); text-transform: uppercase; }
.pft-amount {
    margin-top: 2px; font-size: 20px; font-weight: 800; line-height: 1;
    background: linear-gradient(135deg, #FFE7B8, #FFB020);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.pft-sub { margin-top: 5px; font-size: 11.5px; color: var(--text-2); }
.pft-sub b { color: #7EE2A8; }
.promo-cta {
    position: relative; overflow: hidden;
    display: inline-flex; align-items: center; gap: 9px;
    padding: 11px 22px; border: none; border-radius: 12px;
    background: linear-gradient(135deg, #FFDD8A 0%, #FFB020 45%, #FF7A45 100%);
    color: #241503; font-size: 14px; font-weight: 800; letter-spacing: 0.2px;
    cursor: pointer; white-space: nowrap;
    box-shadow: 0 8px 24px rgba(255,150,32,0.28);
    transition: transform .18s ease, box-shadow .22s ease, filter .18s ease;
}
.promo-cta::after {
    content: ''; position: absolute; top: 0; bottom: 0; left: -70%; width: 45%;
    background: linear-gradient(100deg, transparent, rgba(255,255,255,0.55), transparent);
    transform: skewX(-18deg);
    animation: ctaShine 3.2s ease-in-out infinite;
}
@keyframes ctaShine { 0%, 55% { left: -70%; } 100% { left: 130%; } }
.promo-cta:hover:not(:disabled) { transform: translateY(-2px); filter: brightness(1.06); box-shadow: 0 12px 30px rgba(255,150,32,0.4); }
.promo-cta:active:not(:disabled) { transform: translateY(0); }
.promo-cta:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; }
.promo-spin {
    width: 14px; height: 14px; border-radius: 50%;
    border: 2px solid rgba(36,21,3,0.35); border-top-color: #241503;
    animation: promoSpin .7s linear infinite;
}
@keyframes promoSpin { to { transform: rotate(360deg); } }
.promo-ppbox {
    margin-top: 12px; padding: 14px; border-radius: 14px;
    border: 1px dashed rgba(255,203,107,0.35); background: rgba(255,255,255,0.02);
}
.promo-tail {
    display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px 14px;
    margin-top: 9px;
}
.promo-note { text-align: center; font-size: 11px; color: var(--text-3); }
.promo-note i { color: #7EE2A8; margin-right: 3px; }
.promo-later {
    display: inline-block; padding: 2px 8px;
    border: none; background: none; color: var(--text-3);
    font-size: 11.5px; cursor: pointer; transition: var(--transition);
}
.promo-later:hover { color: var(--text-2); text-decoration: underline; }

/* ---- mobile: bottom sheet ---- */
@media (max-width: 560px) {
    .promo-overlay { align-items: flex-end; padding: 0; }
    .promo-dialog { max-width: 100%; border-radius: 22px 22px 0 0; max-height: 94vh; }
    .promo-dialog::before { left: 14px; right: 14px; }
    .promo-top { padding: 30px 18px 20px; }
    .pf-cell { min-width: 47px; }
    .pf-cell b { font-size: 18px; }
    .promo-foot { flex-direction: column; align-items: stretch; text-align: center; }
    .promo-cta { justify-content: center; width: 100%; }
    .pi-sticker { top: -7px; right: 8px; font-size: 9.5px; padding: 3px 8px; }
    .credits-promo-banner { flex-wrap: wrap; }
    .cpb-btn { width: 100%; justify-content: center; }
}


