        /* ============================================================
           Gift Registry v2 — Editorial wizard
           Palette + type inherited from builder-v2 / landing-premium
           (silk / cream / onyx / gold, Inter + Cormorant Garamond).
           ============================================================ */
        :root {
            --onyx: #121212;
            --charcoal: #2A2A2A;
            --ink: #2C2C2C;
            --muted: #6B6B6B;
            --faint: #9A9A9A;
            --silk: #FBF9F6;
            --cream: #F5EFE9;
            --blush: #F5EFEB;
            --line: rgba(18, 18, 18, 0.08);
            --line-soft: rgba(18, 18, 18, 0.05);
            --gold: #BC9B5D;
            --gold-soft: #D4AF37;
            --gold-pale: rgba(188, 155, 93, 0.10);
            --green: #4F9E86;
            --green-dark: #3D7A66;
            --card: #FFFFFF;
            --shadow-sm: 0 1px 2px rgba(18, 18, 18, 0.04), 0 1px 3px rgba(18, 18, 18, 0.04);
            --shadow-md: 0 4px 10px rgba(18, 18, 18, 0.04), 0 12px 30px rgba(18, 18, 18, 0.06);
            --shadow-lg: 0 20px 50px rgba(18, 18, 18, 0.10);
            --radius: 16px;
            --radius-sm: 11px;
            --ease: cubic-bezier(0.16, 1, 0.3, 1);
            --font-ui: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
            --font-display: 'Cormorant Garamond', Georgia, serif;
        }

        * { box-sizing: border-box; }

        html, body { margin: 0; padding: 0; }

        body {
            font-family: var(--font-ui);
            /* Page sits a touch deeper than the white navbar + white cards so the
               chrome reads as distinct layers (warm off-white page, white surfaces). */
            background: var(--cream);
            color: var(--ink);
            font-size: 15px;
            line-height: 1.55;
            -webkit-font-smoothing: antialiased;
            min-height: 100vh;
        }

        a { color: inherit; }

        /* ---------- Header ---------- */
        .app-header {
            position: sticky;
            top: 0;
            z-index: 40;
            background: #fff;
            border-bottom: 1px solid var(--line);
            box-shadow: 0 2px 16px rgba(18, 18, 18, 0.05);
        }
        .app-header-row {
            max-width: 1240px;
            margin: 0 auto;
            padding: 0.85rem 1.5rem;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 1rem;
        }
        .brand {
            display: flex;
            align-items: center;
            text-decoration: none;
        }
        .brand img { height: 30px; width: auto; display: block; }
        .brand .wordmark {
            font-family: var(--font-display);
            font-weight: 600;
            font-size: 1.35rem;
            color: var(--onyx);
            margin-left: -3px;
            letter-spacing: 0.01em;
        }
        .brand .divider {
            width: 1px;
            height: 22px;
            background: var(--line);
            margin: 0 0.9rem;
        }
        .brand .context {
            font-size: 0.82rem;
            font-weight: 500;
            color: var(--muted);
            letter-spacing: 0.02em;
        }
        .brand { flex-shrink: 0; }
        .view-toggle { flex-shrink: 0; }

        /* Floating save/status pill (bottom-right of the viewport) */
        .save-pill {
            position: fixed;
            right: 1.25rem;
            bottom: 1.25rem;
            z-index: 60;
            display: inline-flex;
            align-items: center;
            background: #fff;
            border: 1px solid var(--line);
            border-radius: 999px;
            box-shadow: var(--shadow-md);
            padding: 0.45rem 0.95rem;
        }
        .sp-status {
            display: inline-flex;
            align-items: center;
            gap: 0.45rem;
            font-size: 0.78rem;
            font-weight: 500;
            color: var(--muted);
            white-space: nowrap;
        }
        .sp-status .dot {
            width: 7px; height: 7px; border-radius: 50%;
            background: var(--green);
            box-shadow: 0 0 0 3px rgba(79, 158, 134, 0.15);
            transition: background 0.2s var(--ease), box-shadow 0.2s var(--ease);
        }
        .sp-status.saving .dot { background: var(--gold); box-shadow: 0 0 0 3px rgba(188, 155, 93, 0.15); }
        .sp-status.dirty .dot { background: var(--gold); box-shadow: 0 0 0 3px rgba(188, 155, 93, 0.15); }
        .sp-status.live .dot { background: var(--green); animation: pulse 2s infinite; }

        /* Task #403 — the pill moves into the top navbar (gift-registry-v2.js
           relocateSavePillToTopbar), where it sits flat next to Undo/Redo
           instead of floating over the page. */
        .save-pill.in-topbar {
            position: static;
            z-index: auto;
            background: transparent;
            border: none;
            box-shadow: none;
            padding: 0;
            flex-shrink: 0;
            gap: 0.25rem;
        }
        .save-pill.in-topbar .sp-status { padding-left: 0.15rem; }

        /* Phones: trim the brand chrome so the single navbar never overflows 375px. */
        @media (max-width: 575px) {
            .app-header-row { padding-left: 1rem; padding-right: 1rem; gap: 0.5rem; }
            .brand .divider, .brand .context { display: none; }
            .save-pill { right: 0.9rem; bottom: 0.9rem; }
            /* Phone navbar is already tight — keep Undo/Redo + the status dot,
               drop the status words (the dot colour still says saved vs. not). */
            .save-pill.in-topbar .sp-status { font-size: 0; gap: 0; }
            .save-pill.in-topbar .sp-status .dot { font-size: 0.78rem; }
        }

        /* ---------- Stepper (inline, centered in the navbar) ---------- */
        .stepper {
            flex: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.3rem;
            min-width: 0;
        }
        .step-btn {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            background: transparent;
            border: none;
            color: var(--muted);
            border-radius: 999px;
            padding: 0.4rem 0.9rem;
            font-size: 0.86rem;
            font-weight: 500;
            font-family: var(--font-ui);
            cursor: pointer;
            transition: color 0.3s var(--ease), background 0.3s var(--ease), box-shadow 0.3s var(--ease);
        }
        .step-btn[disabled] { cursor: not-allowed; opacity: 0.55; }
        .step-btn:not([disabled]):hover { background: rgba(18, 18, 18, 0.04); color: var(--onyx); }
        .step-btn.active {
            background: var(--onyx);
            color: #fff;
            box-shadow: 0 4px 12px rgba(18, 18, 18, 0.18);
        }
        .step-btn.done { color: var(--gold); }
        .step-circle {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 20px; height: 20px;
            border-radius: 50%;
            font-size: 0.68rem;
            font-weight: 600;
            background: rgba(18, 18, 18, 0.08);
            color: var(--charcoal);
            flex-shrink: 0;
        }
        .step-btn.active .step-circle { background: rgba(255, 255, 255, 0.20); color: #fff; }
        .step-btn.done .step-circle { background: var(--gold-pale); color: var(--gold); }
        .step-sep { color: var(--line); font-size: 0.7rem; }
        @media (max-width: 640px) {
            /* Stepper collapses to compact numbered dots so brand + steps + toggle
               fit one row on phones. The full step name still shows in the card. */
            .step-btn .step-label { display: none; }
            .step-sep { display: none; }
            .step-btn { padding: 0.25rem; gap: 0; }
            .stepper { gap: 0.4rem; }
        }
        /* Tightest phones: drop the wordmark to the logo mark alone. */
        @media (max-width: 480px) {
            .brand .wordmark { display: none; }
        }

        /* ---------- Layout ---------- */
        .canvas {
            max-width: 1180px;
            margin: 0 auto;
            padding: 2.25rem 1.5rem 4rem;
            display: grid;
            grid-template-columns: minmax(0, 1fr) 400px;
            gap: 2.75rem;
            align-items: start;
        }
        @media (max-width: 991px) {
            .canvas { grid-template-columns: 1fr; gap: 2rem; max-width: 760px; }
            .preview-rail { display: none; }
            /* Below the two-column breakpoint the card is full-width and the primary
               CTA reaches the right edge, where the floating pill sits — reserve
               clearance so the pill never covers the Continue / last row. */
            #setupView, #overviewView { padding-bottom: 88px; }
        }

        /* ---------- Wizard card ---------- */
        .wizard-card {
            background: var(--card);
            border: 1px solid var(--line);
            border-radius: var(--radius);
            box-shadow: var(--shadow-md);
            overflow: hidden;
        }
        .step-progress {
            height: 3px;
            background: var(--line-soft);
        }
        .step-progress-fill {
            height: 100%;
            background: linear-gradient(90deg, var(--gold) 0%, var(--gold-soft) 100%);
            width: 25%;
            transition: width 0.5s var(--ease);
        }
        .step-body { padding: 2.5rem 2.5rem 1.5rem; }
        @media (max-width: 575px) { .step-body { padding: 1.75rem 1.35rem 1.25rem; } }

        .eyebrow {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            font-size: 0.72rem;
            font-weight: 600;
            letter-spacing: 0.14em;
            text-transform: uppercase;
            color: var(--gold);
            margin-bottom: 0.85rem;
        }
        .eyebrow .bi { font-size: 0.85rem; }
        .step-title {
            font-family: var(--font-display);
            font-weight: 600;
            font-size: 2.1rem;
            line-height: 1.12;
            letter-spacing: -0.01em;
            color: var(--onyx);
            margin: 0 0 0.5rem;
        }
        .step-lead {
            color: var(--muted);
            font-size: 0.98rem;
            margin: 0 0 1.9rem;
            max-width: 46ch;
        }

        /* ---------- Form controls ---------- */
        .field { margin-bottom: 1.4rem; }
        .field:last-child { margin-bottom: 0; }
        .label {
            display: flex;
            align-items: baseline;
            justify-content: space-between;
            gap: 0.5rem;
            font-size: 0.82rem;
            font-weight: 600;
            color: var(--charcoal);
            margin-bottom: 0.45rem;
        }
        .label .opt { font-weight: 500; color: var(--faint); font-size: 0.76rem; text-transform: none; letter-spacing: 0; }
        .input, .textarea, .select {
            width: 100%;
            font-family: var(--font-ui);
            font-size: 0.95rem;
            color: var(--ink);
            background: var(--silk);
            border: 1px solid var(--line);
            border-radius: var(--radius-sm);
            padding: 0.7rem 0.85rem;
            transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease);
            outline: none;
        }
        .textarea { resize: vertical; min-height: 84px; line-height: 1.5; }
        .input:focus, .textarea:focus, .select:focus {
            border-color: var(--gold);
            background: #fff;
            box-shadow: 0 0 0 3px var(--gold-pale);
        }
        .input::placeholder, .textarea::placeholder { color: var(--faint); }
        .hint { font-size: 0.78rem; color: var(--faint); margin-top: 0.4rem; }

        /* ---------- Buttons ---------- */
        .btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
            font-family: var(--font-ui);
            font-size: 0.9rem;
            font-weight: 600;
            border-radius: 999px;
            padding: 0.7rem 1.4rem;
            border: 1px solid transparent;
            cursor: pointer;
            transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
            text-decoration: none;
            white-space: nowrap;
        }
        .btn-primary { background: var(--onyx); color: #fff; box-shadow: 0 4px 14px rgba(18, 18, 18, 0.16); }
        .btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(18, 18, 18, 0.22); }
        .btn-primary:disabled { background: #d8d2ca; color: #fff; box-shadow: none; cursor: not-allowed; transform: none; }
        .btn-ghost { background: transparent; color: var(--muted); border-color: var(--line); }
        .btn-ghost:hover { background: rgba(18, 18, 18, 0.03); color: var(--onyx); }
        .btn-gold { background: var(--gold); color: #fff; box-shadow: 0 4px 14px rgba(188, 155, 93, 0.28); }
        .btn-gold:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(188, 155, 93, 0.34); }
        .btn-green { background: var(--green); color: #fff; box-shadow: 0 4px 14px rgba(79, 158, 134, 0.26); }
        .btn-green:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(79, 158, 134, 0.32); }
        .btn-sm { padding: 0.5rem 1rem; font-size: 0.82rem; }
        .btn-link { background: none; border: none; color: var(--muted); font-weight: 500; cursor: pointer; padding: 0.5rem 0.75rem; font-size: 0.85rem; border-radius: 999px; }
        .btn-link:hover { color: var(--onyx); background: rgba(18,18,18,0.04); }

        /* ---------- Footer nav ---------- */
        .step-footer {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 0.75rem;
            padding: 1.25rem 2.5rem 2rem;
            border-top: 1px solid var(--line-soft);
            margin-top: 1.75rem;
        }
        @media (max-width: 575px) { .step-footer { padding: 1.1rem 1.35rem 1.5rem; } }
        .step-footer .spacer { flex: 1; }
        .footer-right { display: flex; align-items: center; gap: 0.6rem; }

        /* ---------- Cover uploader ---------- */
        .cover-drop {
            position: relative;
            border: 1.5px dashed var(--line);
            border-radius: var(--radius-sm);
            background: var(--silk);
            aspect-ratio: 24 / 10;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 0.35rem;
            text-align: center;
            color: var(--muted);
            cursor: pointer;
            overflow: hidden;
            transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
        }
        .cover-drop:hover { border-color: var(--gold); background: var(--gold-pale); }
        .cover-drop .bi { font-size: 1.5rem; color: var(--gold); }
        .cover-drop .cover-cap { font-size: 0.82rem; font-weight: 500; }
        .cover-drop .cover-sub { font-size: 0.74rem; color: var(--faint); }
        .cover-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
        .cover-remove {
            position: absolute; top: 0.5rem; right: 0.5rem;
            background: rgba(18,18,18,0.6); color: #fff; border: none;
            width: 30px; height: 30px; border-radius: 50%; cursor: pointer;
            display: none; align-items: center; justify-content: center;
            backdrop-filter: blur(4px);
        }
        .cover-swatches { display: flex; gap: 0.5rem; margin-top: 0.75rem; flex-wrap: wrap; align-items: center; }
        .cover-swatches .lbl { font-size: 0.76rem; color: var(--faint); margin-right: 0.15rem; }
        .swatch {
            width: 46px; height: 30px; border-radius: 7px; cursor: pointer;
            border: 1px solid var(--line); background-size: cover; background-position: center;
            transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
        }
        .swatch:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }

        /* ---------- Toggle rows ---------- */
        .toggle-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 1rem;
            padding: 0.85rem 0;
            border-bottom: 1px solid var(--line-soft);
        }
        .toggle-row:last-child { border-bottom: none; }
        .toggle-row .tr-title { font-size: 0.9rem; font-weight: 600; color: var(--charcoal); }
        .toggle-row .tr-sub { font-size: 0.78rem; color: var(--faint); }
        .switch { position: relative; width: 42px; height: 24px; flex-shrink: 0; }
        .switch input { opacity: 0; width: 0; height: 0; }
        .slider {
            position: absolute; cursor: pointer; inset: 0;
            background: #d9d3cb; border-radius: 999px; transition: 0.3s var(--ease);
        }
        .slider::before {
            content: ""; position: absolute; height: 18px; width: 18px; left: 3px; top: 3px;
            background: #fff; border-radius: 50%; transition: 0.3s var(--ease); box-shadow: var(--shadow-sm);
        }
        .switch input:checked + .slider { background: var(--onyx); }
        .switch input:checked + .slider::before { transform: translateX(18px); }

        /* ---------- Gift block (fund + items) ---------- */
        .block {
            border: 1px solid var(--line);
            border-radius: var(--radius-sm);
            overflow: hidden;
            margin-bottom: 1.5rem;
        }
        .block-head {
            display: flex; align-items: center; gap: 0.9rem;
            padding: 1.1rem 1.25rem;
            background: var(--silk);
        }
        .block-ico {
            width: 40px; height: 40px; border-radius: 11px; flex-shrink: 0;
            display: inline-flex; align-items: center; justify-content: center;
            font-size: 1.15rem;
        }
        .block-ico.gold { background: var(--gold-pale); color: var(--gold); }
        .block-ico.green { background: rgba(79,158,134,0.12); color: var(--green); }
        .block-head .bh-title { font-size: 0.98rem; font-weight: 600; color: var(--onyx); }
        .block-head .bh-sub { font-size: 0.8rem; color: var(--muted); }
        .block-head .spacer { flex: 1; }
        .block-body { padding: 1.25rem; border-top: 1px solid var(--line-soft); }

        .amount-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.6rem; }
        @media (max-width: 575px) { .amount-grid { grid-template-columns: repeat(2, 1fr); } }
        .amount-cell { position: relative; }
        .amount-cell .cur {
            position: absolute; left: 0.7rem; top: 50%; transform: translateY(-50%);
            color: var(--faint); font-size: 0.9rem; pointer-events: none;
        }
        .amount-cell .input { padding-left: 1.5rem; text-align: left; font-weight: 600; }

        /* Catalog */
        .catalog { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.7rem; margin-bottom: 1.1rem; }
        @media (max-width: 575px) { .catalog { grid-template-columns: repeat(2, 1fr); } }
        .cat-item {
            border: 1px solid var(--line); border-radius: 12px; background: #fff;
            padding: 0.85rem 0.75rem; text-align: center; cursor: pointer;
            transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), transform 0.2s var(--ease);
        }
        .cat-item:hover { border-color: var(--gold); box-shadow: var(--shadow-sm); transform: translateY(-2px); }
        .cat-item .emoji { font-size: 1.5rem; display: block; margin-bottom: 0.3rem; }
        .cat-item .nm { font-size: 0.8rem; font-weight: 600; color: var(--charcoal); line-height: 1.2; }
        .cat-item .pr { font-size: 0.78rem; color: var(--gold); font-weight: 600; margin-top: 0.15rem; }
        .cat-item.added { border-color: var(--green); background: rgba(79,158,134,0.06); }
        .cat-item.added .pr { color: var(--green); }

        .items-list { display: flex; flex-direction: column; gap: 0.55rem; }
        .li-row {
            display: flex; align-items: center; gap: 0.8rem;
            border: 1px solid var(--line); border-radius: 11px; padding: 0.6rem 0.8rem; background: #fff;
            animation: pop 0.35s var(--ease);
        }
        @keyframes pop { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
        .li-emoji { font-size: 1.25rem; width: 34px; height: 34px; border-radius: 9px; background: var(--silk); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
        .li-name { font-size: 0.88rem; font-weight: 600; color: var(--charcoal); }
        .li-price { font-size: 0.8rem; color: var(--muted); }
        .li-row .spacer { flex: 1; }
        /* "Allow partial gifts" per item (task #405). Deliberately quiet — the
           default (give it in full) is right for most gifts, so this is an
           exception a host opts into, not a decision every row demands. */
        .li-partial {
            display: inline-flex; align-items: center; gap: 0.35rem; flex-shrink: 0;
            font-size: 0.74rem; color: var(--muted); cursor: pointer; user-select: none;
            white-space: nowrap;
        }
        .li-partial input { margin: 0; cursor: pointer; accent-color: var(--gold, #b8892b); }
        .li-partial:hover { color: var(--charcoal); }
        /* On a phone the row wraps; the toggle drops to its own line under the
           gift rather than squeezing the name to nothing. */
        @media (max-width: 560px) {
            .li-row { flex-wrap: wrap; }
            /* Indent with PADDING inside a border-box basis, not margin: a margin
               sits outside the 100% basis and pushed the row wider than its own
               container (measured — the row overflowed by exactly the indent). */
            .li-partial {
                order: 10; flex-basis: 100%; box-sizing: border-box;
                padding-inline-start: 2.9rem;
            }
        }
        .li-del { background: none; border: none; color: var(--faint); cursor: pointer; font-size: 1rem; padding: 0.25rem; border-radius: 7px; }
        .li-del:hover { color: #c0392b; background: rgba(192,57,43,0.08); }
        .li-drag { display: inline-flex; align-items: center; color: var(--faint); cursor: grab; font-size: 1rem; flex-shrink: 0; margin: -0.2rem -0.2rem -0.2rem -0.2rem; padding: 0.2rem; touch-action: none; }
        .li-drag:hover { color: var(--muted); }
        .li-row.li-ghost { opacity: 0.4; background: var(--gold-pale); border-color: var(--gold); }
        .li-row.li-drag-active { box-shadow: var(--shadow-md); }

        .add-custom-toggle { margin-top: 0.4rem; }
        .custom-form { display: none; gap: 0.6rem; margin-top: 0.9rem; padding-top: 0.9rem; border-top: 1px dashed var(--line); }
        .custom-form.open { display: flex; flex-wrap: wrap; align-items: flex-end; }
        .custom-form .field { margin: 0; }
        .custom-form .grow { flex: 1 1 180px; }

        /* ---------- Payouts ---------- */
        .payout-hero {
            display: flex; align-items: center; gap: 1rem;
            background: linear-gradient(135deg, var(--cream) 0%, var(--blush) 100%);
            border: 1px solid var(--line); border-radius: var(--radius-sm);
            padding: 1.25rem; margin-bottom: 1.5rem;
        }
        .payout-hero .ph-ico { width: 52px; height: 52px; border-radius: 14px; background: #fff; color: var(--gold); display: inline-flex; align-items: center; justify-content: center; font-size: 1.5rem; box-shadow: var(--shadow-sm); flex-shrink: 0; }
        .payout-hero .ph-title { font-size: 1.05rem; font-weight: 600; color: var(--onyx); }
        .payout-hero .ph-sub { font-size: 0.84rem; color: var(--muted); }
        .assure-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; margin-bottom: 1.5rem; }
        @media (max-width: 575px) { .assure-grid { grid-template-columns: 1fr; } }
        .assure {
            border: 1px solid var(--line); border-radius: 12px; padding: 0.95rem; background: #fff; text-align: center;
        }
        .assure .bi { font-size: 1.2rem; color: var(--green); }
        .assure .as-t { font-size: 0.82rem; font-weight: 600; color: var(--charcoal); margin-top: 0.3rem; }
        .assure .as-s { font-size: 0.74rem; color: var(--faint); }
        .fee-note {
            font-size: 0.8rem; color: var(--muted); text-align: center;
            background: rgba(79,158,134,0.07); border: 1px solid rgba(79,158,134,0.2);
            border-radius: 10px; padding: 0.7rem 0.9rem;
        }
        .fee-note strong { color: var(--green-dark); }
        .connected-banner {
            display: none; align-items: center; gap: 0.85rem;
            background: rgba(79,158,134,0.08); border: 1px solid rgba(79,158,134,0.28);
            border-radius: var(--radius-sm); padding: 1.1rem 1.25rem; margin-bottom: 1.5rem;
        }
        .connected-banner.show { display: flex; animation: pop 0.4s var(--ease); }
        .connected-banner .cb-ico { width: 44px; height: 44px; border-radius: 12px; background: var(--green); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 1.3rem; flex-shrink: 0; }
        .connected-banner .cb-t { font-weight: 600; color: var(--green-dark); }
        .connected-banner .cb-s { font-size: 0.82rem; color: var(--muted); }

        /* ---------- Review / Share ---------- */
        .review-grid { display: flex; flex-direction: column; gap: 0.9rem; margin-bottom: 1.6rem; }
        .rev-card {
            display: flex; align-items: center; gap: 1rem;
            border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 1rem 1.1rem; background: #fff;
        }
        .rev-thumb { width: 64px; height: 48px; border-radius: 9px; background: var(--cream); background-size: cover; background-position: center; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; color: var(--gold); font-size: 1.2rem; }
        .rev-main { flex: 1; min-width: 0; }
        .rev-t { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--faint); font-weight: 600; }
        .rev-v { font-size: 0.95rem; font-weight: 600; color: var(--onyx); overflow: hidden; text-overflow: ellipsis; }
        .rev-v .muted { font-weight: 400; color: var(--muted); }
        .rev-edit { background: none; border: 1px solid var(--line); color: var(--muted); border-radius: 999px; padding: 0.35rem 0.8rem; font-size: 0.78rem; font-weight: 500; cursor: pointer; }
        .rev-edit:hover { border-color: var(--gold); color: var(--onyx); }
        .rev-badge { font-size: 0.72rem; font-weight: 600; padding: 0.25rem 0.65rem; border-radius: 999px; }
        .rev-badge.ok { background: rgba(79,158,134,0.12); color: var(--green-dark); }
        .rev-badge.warn { background: var(--gold-pale); color: var(--gold); }

        .golive {
            border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 1.25rem; margin-bottom: 1.5rem;
            background: var(--silk);
        }
        .golive.ready { background: linear-gradient(135deg, rgba(79,158,134,0.06), rgba(188,155,93,0.05)); border-color: rgba(79,158,134,0.28); }
        .share-box {
            display: flex; align-items: center; gap: 0.5rem;
            background: #fff; border: 1px solid var(--line); border-radius: 11px; padding: 0.45rem 0.5rem 0.45rem 0.9rem;
            margin: 0.9rem 0;
        }
        .share-box input { flex: 1; border: none; outline: none; background: transparent; font-family: var(--font-ui); font-size: 0.85rem; color: var(--charcoal); min-width: 0; }
        .share-cta { display: flex; gap: 0.6rem; flex-wrap: wrap; }

        /* ---------- Live preview rail (desktop) ---------- */
        .preview-rail { position: sticky; top: 118px; }
        .preview-cap { display: flex; align-items: center; gap: 0.5rem; font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); font-weight: 600; margin-bottom: 0.85rem; justify-content: center; }
        .preview-cap .dotpulse { width: 7px; height: 7px; border-radius: 50%; background: var(--green); animation: pulse 2s infinite; }
        @keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }
        .phone {
            width: 100%; max-width: 340px; margin: 0 auto;
            background: #fff; border: 1px solid var(--line);
            border-radius: 30px; box-shadow: var(--shadow-lg); overflow: hidden;
        }
        .phone-notch { height: 26px; display: flex; align-items: center; justify-content: center; }
        .phone-notch::after { content: ""; width: 90px; height: 5px; border-radius: 999px; background: rgba(18,18,18,0.12); }
        .phone-scroll { height: 560px; overflow-y: auto; }
        .phone-scroll::-webkit-scrollbar { width: 0; }
        .pv-hero {
            position: relative; height: 150px; background: linear-gradient(135deg, #C9B79A 0%, #A996CC 120%);
            background-size: cover; background-position: center;
            display: flex; align-items: flex-end;
        }
        .pv-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(18,18,18,0.5), transparent 60%); }
        .pv-hero-txt { position: relative; z-index: 1; padding: 1rem 1.1rem; color: #fff; }
        .pv-title { font-family: var(--font-display); font-weight: 600; font-size: 1.4rem; line-height: 1.1; text-shadow: 0 1px 8px rgba(0,0,0,0.3); }
        .pv-body { padding: 1.1rem; }
        .pv-msg { font-size: 0.82rem; color: var(--muted); text-align: center; font-style: italic; margin-bottom: 1rem; font-family: var(--font-display); font-size: 0.95rem; }
        .pv-stats { display: flex; justify-content: space-around; text-align: center; padding: 0.75rem 0; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); margin-bottom: 1rem; }
        .pv-stats .sv { font-size: 1rem; font-weight: 700; color: var(--onyx); }
        .pv-stats .sl { font-size: 0.62rem; color: var(--faint); text-transform: uppercase; letter-spacing: 0.05em; }
        .pv-fund {
            border: 1px solid var(--gold); background: var(--gold-pale); border-radius: 12px; padding: 0.85rem; margin-bottom: 0.9rem;
        }
        .pv-fund-t { font-weight: 600; font-size: 0.88rem; color: var(--onyx); display: flex; align-items: center; gap: 0.4rem; }
        .pv-chips { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.6rem; }
        .pv-chip { font-size: 0.72rem; font-weight: 600; border: 1px solid var(--gold); color: var(--gold); border-radius: 999px; padding: 0.25rem 0.6rem; background: #fff; }
        .pv-chip.custom { background: var(--gold); color: #fff; }
        .pv-item { display: flex; align-items: center; gap: 0.6rem; padding: 0.55rem 0; border-bottom: 1px solid var(--line-soft); }
        .pv-item .pe { width: 32px; height: 32px; border-radius: 8px; background: var(--silk); display: inline-flex; align-items: center; justify-content: center; font-size: 1rem; flex-shrink: 0; }
        .pv-item .pn { font-size: 0.8rem; font-weight: 600; color: var(--charcoal); }
        .pv-item .pp { font-size: 0.72rem; color: var(--muted); }
        .pv-item .spacer { flex: 1; }
        .pv-give { font-size: 0.68rem; font-weight: 600; color: #fff; background: var(--onyx); border-radius: 999px; padding: 0.2rem 0.6rem; }
        .pv-prog { height: 4px; background: var(--line); border-radius: 999px; margin-top: 0.35rem; overflow: hidden; }
        .pv-prog span { display: block; height: 100%; background: linear-gradient(90deg, var(--green), var(--green-dark)); border-radius: 999px; }
        .pv-empty { text-align: center; color: var(--faint); font-size: 0.78rem; padding: 1.5rem 0; }

        /* ---------- Toast ---------- */
        .toast {
            position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%) translateY(20px);
            background: var(--onyx); color: #fff; padding: 0.8rem 1.3rem; border-radius: 999px;
            font-size: 0.85rem; font-weight: 500; box-shadow: var(--shadow-lg); z-index: 90;
            opacity: 0; pointer-events: none; transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
            display: inline-flex; align-items: center; gap: 0.5rem;
        }
        .toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
        .toast .bi { color: var(--gold-soft); }

        .step-panel { display: none; }
        .step-panel.active { display: block; animation: stepIn 0.45s var(--ease); }
        @keyframes stepIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

        /* ---------- View toggle (Setup / Overview) ---------- */
        .view-toggle {
            display: inline-flex;
            gap: 0.2rem;
            background: rgba(18, 18, 18, 0.05);
            border: 1px solid var(--line-soft);
            border-radius: 999px;
            padding: 0.2rem;
        }
        .view-toggle button {
            border: none;
            background: transparent;
            color: var(--muted);
            font-family: var(--font-ui);
            font-size: 0.82rem;
            font-weight: 600;
            padding: 0.4rem 0.9rem;
            border-radius: 999px;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 0.4rem;
            transition: background 0.25s var(--ease), color 0.25s var(--ease);
        }
        .view-toggle button.active { background: var(--onyx); color: #fff; }
        .view-toggle button:not(.active):hover { color: var(--onyx); }
        @media (max-width: 640px) { .view-toggle button .vt-label { display: none; } .view-toggle button { padding: 0.4rem 0.6rem; } }

        /* ---------- Rich catalog gallery (real product photos + categories) ---------- */
        .cat-filters { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1rem; }
        .cat-pill {
            font-size: 0.8rem; font-weight: 500; padding: 0.35rem 0.85rem; border-radius: 999px;
            border: 1px solid var(--line); background: #fff; color: var(--muted); cursor: pointer;
            transition: border-color 0.2s var(--ease), color 0.2s var(--ease), background 0.2s var(--ease);
        }
        .cat-pill:hover { border-color: var(--gold); color: var(--onyx); }
        .cat-pill.active { background: var(--onyx); color: #fff; border-color: var(--onyx); }
        .catalog {
            display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem;
            max-height: 430px; overflow-y: auto; padding: 0.15rem; margin-bottom: 1.25rem;
        }
        @media (max-width: 575px) { .catalog { grid-template-columns: repeat(2, 1fr); } }
        .cat-item {
            border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff;
            display: flex; flex-direction: column;
            transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), transform 0.2s var(--ease);
        }
        .cat-item:hover { border-color: var(--gold); box-shadow: var(--shadow-sm); transform: translateY(-2px); }
        .cat-thumb { height: 104px; background: var(--silk); overflow: hidden; }
        .cat-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
        .cat-meta { padding: 0.55rem 0.65rem 0.35rem; flex: 1; }
        .cat-meta .nm {
            font-size: 0.78rem; font-weight: 600; color: var(--charcoal); line-height: 1.2;
            display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
        }
        .cat-meta .pr { font-size: 0.8rem; font-weight: 700; color: var(--gold); margin-top: 0.15rem; }
        .cat-add {
            margin: 0 0.55rem 0.55rem; border: 1px solid var(--onyx); background: #fff; color: var(--onyx);
            border-radius: 8px; padding: 0.35rem; font-size: 0.75rem; font-weight: 600; cursor: pointer;
            display: inline-flex; align-items: center; justify-content: center; gap: 0.3rem;
            transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
        }
        .cat-add:hover { background: var(--onyx); color: #fff; }
        .cat-item.added .cat-add { background: var(--green); border-color: var(--green); color: #fff; cursor: default; }
        .li-thumb { width: 40px; height: 40px; border-radius: 9px; object-fit: cover; background: var(--silk); flex-shrink: 0; }

        /* ---------- Overview / management dashboard ---------- */
        .overview { max-width: 1040px; margin: 0 auto; padding: 2.25rem 1.5rem 4rem; }
        .ov-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.6rem; }
        .ov-eyebrow { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); margin-bottom: 0.5rem; }
        .ov-title { font-family: var(--font-display); font-weight: 600; font-size: 2rem; line-height: 1.1; color: var(--onyx); margin: 0; }
        .ov-status { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.78rem; font-weight: 600; color: var(--green-dark); margin-top: 0.4rem; }
        .ov-status .ld { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(79,158,134,0.18); }
        .ov-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
        .ov-note { font-size: 0.76rem; color: var(--faint); background: var(--gold-pale); border: 1px solid rgba(188,155,93,0.25); border-radius: 8px; padding: 0.5rem 0.8rem; margin-bottom: 1.4rem; display: inline-flex; align-items: center; gap: 0.45rem; }
        .stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1.6rem; }
        @media (max-width: 767px) { .stat-cards { grid-template-columns: repeat(2, 1fr); } }
        .stat-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); padding: 1.2rem 1.25rem; }
        .stat-card .sv { font-family: var(--font-display); font-weight: 600; font-size: 1.9rem; line-height: 1; color: var(--onyx); }
        .stat-card .sl { font-size: 0.75rem; color: var(--muted); margin-top: 0.35rem; display: flex; align-items: center; gap: 0.35rem; }
        .stat-card .sl .bi { color: var(--gold); }
        .ov-grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: 1.25rem; align-items: start; }
        @media (max-width: 900px) { .ov-grid { grid-template-columns: 1fr; } }
        .ov-panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
        .ov-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 1.1rem 1.25rem; border-bottom: 1px solid var(--line-soft); }
        .ov-panel-head h3 { font-size: 0.95rem; font-weight: 600; color: var(--onyx); margin: 0; display: flex; align-items: center; gap: 0.5rem; }
        .ov-panel-body { padding: 0.5rem 1.25rem 1.1rem; }
        .ov-gift { padding: 0.8rem 0; border-bottom: 1px solid var(--line-soft); }
        .ov-gift:last-child { border-bottom: none; }
        .ov-gift-top { display: flex; align-items: center; gap: 0.7rem; }
        .ov-gift .gt { width: 36px; height: 36px; border-radius: 9px; object-fit: cover; background: var(--silk); flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; font-size: 1.05rem; }
        .ov-gift .gn { font-size: 0.85rem; font-weight: 600; color: var(--charcoal); }
        .ov-gift .gv { font-size: 0.76rem; color: var(--muted); }
        .ov-gift .spacer { flex: 1; }
        .ov-gift .gfull { font-size: 0.68rem; font-weight: 700; color: var(--green-dark); background: rgba(79,158,134,0.12); padding: 0.15rem 0.5rem; border-radius: 999px; }
        .ov-bar { height: 5px; background: var(--line); border-radius: 999px; margin-top: 0.55rem; overflow: hidden; }
        .ov-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--green), var(--green-dark)); border-radius: 999px; }
        .ov-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
        .ov-table th { text-align: left; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--faint); font-weight: 600; padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--line-soft); }
        .ov-table td { padding: 0.65rem 0.6rem; border-bottom: 1px solid var(--line-soft); color: var(--charcoal); vertical-align: middle; }
        .ov-table tr:last-child td { border-bottom: none; }
        .ov-table .amt { font-weight: 700; color: var(--onyx); white-space: nowrap; }
        .ov-table .amt .amt-note { display: block; font-weight: 400; font-size: 0.68rem; color: var(--faint); line-height: 1.3; margin-top: 0.1rem; }
        .ov-table .msg { color: var(--muted); }

        /* ---------- Payouts panel (JS-injected; see gift-registry-v2.js ensurePayoutsPanel) ----------
           Placed explicitly rather than by source order: money answer sits above
           gift funding in the narrow column, and the contributions log — which
           carries guest messages and needs the width — spans both rows. */
        .ov-panel--payouts  { grid-column: 1; grid-row: 1; }
        .ov-panel--gifts    { grid-column: 1; grid-row: 2; }
        .ov-panel--contribs { grid-column: 2; grid-row: 1 / span 2; }
        @media (max-width: 900px) {
            .ov-panel--payouts, .ov-panel--gifts, .ov-panel--contribs { grid-column: 1; grid-row: auto; }
        }
        .ov-pay-total { font-family: var(--font-display); font-weight: 600; font-size: 1.75rem; line-height: 1.1; color: var(--onyx); }
        .ov-pay-sub { font-size: 0.76rem; color: var(--muted); margin-top: 0.2rem; }
        .ov-pay-note { font-size: 0.76rem; margin: 0.7rem 0 0; }
        .ov-pay-note--ok { color: #1a7f4b; }
        .ov-pay-note--warn { color: #8a5a00; background: #fdf6e3; border: 1px solid #f0e0b6; border-radius: 8px; padding: 0.5rem 0.6rem; }
        /* A real registry can have dozens of payouts — bound the list instead of
           letting it run the page. */
        .ov-pay-list { margin-top: 0.7rem; max-height: 210px; overflow-y: auto; }
        .ov-pay-row { display: flex; align-items: center; gap: 0.6rem; padding: 0.45rem 0; border-bottom: 1px solid var(--line-soft); font-size: 0.8rem; }
        .ov-pay-row:last-child { border-bottom: none; }
        .ov-pay-row .d { color: var(--muted); white-space: nowrap; }
        .ov-pay-row .a { font-weight: 600; color: var(--charcoal); white-space: nowrap; margin-inline-start: auto; }
        .ov-pay-empty { font-size: 0.78rem; color: var(--faint); padding: 0.6rem 0; }
        .ov-pay-foot { font-size: 0.7rem; color: var(--faint); line-height: 1.45; margin-top: 0.7rem; }
        .ov-pill { font-size: 0.66rem; font-weight: 700; padding: 0.15rem 0.5rem; border-radius: 999px; white-space: nowrap; }
        .ov-pill--ok { background: #e7f5ec; color: #1a7f4b; }
        .ov-pill--info { background: var(--gold-pale); color: var(--gold); }
        .ov-pill--bad { background: #fdeaea; color: #b3261e; }
        /* Both lists must be bounded: a real registry is not the sample. Rena &
           Akiva have 47 gifts and 74 contributions, which uncapped rendered a
           ~11,900px contributions panel and buried the page. */
        .ov-panel--gifts .ov-panel-body { max-height: 340px; overflow-y: auto; }
        .ov-panel--contribs .ov-panel-body { max-height: 700px; overflow-y: auto; }
        /* Keep the column headers readable while scrolling that list. */
        .ov-panel--contribs .ov-table thead th { position: sticky; top: 0; background: var(--card); z-index: 1; }
        .ov-av { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: var(--gold-pale); color: var(--gold); font-size: 0.72rem; font-weight: 700; margin-right: 0.5rem; }

        /* ---------- Connected-banner actions ---------- */
        .cb-actions { display: flex; align-items: center; gap: 0.4rem; flex-shrink: 0; }
        @media (max-width: 575px) { .cb-actions { flex-direction: column; align-items: stretch; } }

        /* ---------- Country-banking / IBAN helper (engine-injected, Bootstrap-classed) ----------
           v2 doesn't load Bootstrap CSS, so give the injected help markup a clean editorial look. */
        .banking-help {
            margin-top: 0.85rem; padding: 1rem 1.1rem;
            background: var(--gold-pale); border: 1px solid rgba(188, 155, 93, 0.28);
            border-radius: var(--radius-sm); font-size: 0.85rem; color: var(--charcoal); line-height: 1.5;
        }
        .banking-help strong { color: var(--onyx); }
        .banking-help .bg-light, .banking-help .p-3 { background: #fff; border-radius: 10px; padding: 0.85rem; }
        .banking-help .rounded { border-radius: 10px; }
        .banking-help .row { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 0.5rem 0; }
        .banking-help .row.g-2 { gap: 0.6rem; }
        .banking-help [class*="col-"] { flex: 1 1 0; min-width: 90px; }
        .banking-help .form-label { display: block; font-size: 0.72rem; font-weight: 600; color: var(--muted); margin-bottom: 0.25rem; }
        .banking-help .form-control, .banking-help input[type="text"], .banking-help input[type="number"] {
            width: 100%; font-family: var(--font-ui); font-size: 0.9rem; color: var(--ink);
            background: var(--silk); border: 1px solid var(--line); border-radius: 8px; padding: 0.5rem 0.6rem; outline: none;
        }
        .banking-help .form-control:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-pale); background: #fff; }
        .banking-help .btn { display: inline-flex; align-items: center; gap: 0.35rem; font-family: var(--font-ui); font-size: 0.82rem; font-weight: 600; border: 1px solid var(--onyx); background: var(--onyx); color: #fff; border-radius: 8px; padding: 0.4rem 0.75rem; cursor: pointer; }
        .banking-help .btn-outline-secondary, .banking-help .btn-outline-primary { background: #fff; color: var(--onyx); }
        .banking-help .mt-3 { margin-top: 0.75rem; } .banking-help .mt-2 { margin-top: 0.5rem; } .banking-help .mb-1 { margin-bottom: 0.25rem; }
        .banking-help .small { font-size: 0.78rem; } .banking-help .text-success { color: var(--green-dark); font-weight: 600; }
        .banking-help .text-muted { color: var(--muted); } .banking-help code, .banking-help .font-monospace { font-family: monospace; }

        /* ---------- Manage-accounts modal (v2 custom overlay) ---------- */
        .gr-modal { position: fixed; inset: 0; z-index: 80; display: none; align-items: center; justify-content: center; padding: 1rem; background: rgba(18, 18, 18, 0.45); }
        .gr-modal.show { display: flex; }
        .gr-modal-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg); width: 100%; max-width: 460px; max-height: 85vh; overflow-y: auto; }
        .gr-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 1.1rem 1.25rem; border-bottom: 1px solid var(--line-soft); }
        .gr-modal-head h3 { margin: 0; font-size: 1rem; font-weight: 600; color: var(--onyx); display: flex; align-items: center; gap: 0.5rem; }
        .gr-modal-close { background: none; border: none; font-size: 1.1rem; color: var(--muted); cursor: pointer; border-radius: 7px; padding: 0.2rem 0.4rem; }
        .gr-modal-close:hover { background: rgba(18,18,18,0.05); color: var(--onyx); }
        .gr-modal-body { padding: 1.25rem; }
        .gr-modal-body .acct { border: 1px solid var(--line); border-radius: 11px; padding: 0.85rem 1rem; margin-bottom: 0.65rem; }
        .gr-modal-body .acct-label { font-weight: 600; color: var(--charcoal); font-size: 0.9rem; }
        .gr-modal-body .acct-badge { font-size: 0.72rem; font-weight: 600; padding: 0.15rem 0.55rem; border-radius: 999px; display: inline-block; margin-top: 0.35rem; }
        .gr-modal-body .acct-badge.active { background: rgba(79,158,134,0.12); color: var(--green-dark); }
        .gr-modal-body .acct-badge.pending { background: var(--gold-pale); color: var(--gold); }
        .gr-modal-body .acct-note { font-size: 0.76rem; color: var(--muted); margin-top: 0.35rem; }
        .gr-modal-foot { padding: 1rem 1.25rem 1.25rem; border-top: 1px solid var(--line-soft); }

        /* Currency selector (mounted by registry-currency-manager.js) sits inline in the Overview head. */
        #registry-currency-selector { display: inline-flex; align-items: center; }

        /* v2 loads Bootstrap JS (for the engine's modal helpers) but not Bootstrap
           CSS, so any Bootstrap .modal a shared module injects would otherwise show
           inline. Keep them hidden until Bootstrap explicitly opens one (it sets an
           inline display:block on show). v2's own overlays use .gr-modal, not .modal. */
        .modal.fade:not(.show) { display: none !important; }

        /* Cover "Crop" button (top-left of the cover preview, mirrors .cover-remove) */
        .cover-crop {
            position: absolute; top: 0.5rem; left: 0.5rem; z-index: 2;
            display: inline-flex; align-items: center; gap: 0.3rem;
            background: rgba(18,18,18,0.6); color: #fff; border: none;
            padding: 0.3rem 0.6rem; border-radius: 999px; font-size: 0.74rem; font-weight: 600;
            cursor: pointer; backdrop-filter: blur(4px);
        }
        .cover-crop:hover { background: rgba(18,18,18,0.78); }

        /* ---------- Bootstrap-modal compat for the shared image cropper ----------
           v2 has no Bootstrap CSS, so give #imageCropperModal a proper dialog look.
           (v2's own overlays use .gr-modal; only the cropper uses .modal here.) */
        .modal { position: fixed; inset: 0; z-index: 1055; overflow-x: hidden; overflow-y: auto; }
        .modal-backdrop { position: fixed; inset: 0; z-index: 1050; background: rgba(18, 18, 18, 0.5); }
        body.modal-open { overflow: hidden; }
        .modal-dialog { max-width: 720px; margin: 1.75rem auto; }
        .modal-lg { max-width: 820px; }
        .modal-content { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg); overflow: hidden; }
        .modal-header { display: flex; align-items: center; justify-content: space-between; padding: 1.1rem 1.35rem; border-bottom: 1px solid var(--line-soft); }
        .modal-title { font-family: var(--font-ui); font-size: 1rem; font-weight: 600; color: var(--onyx); margin: 0; display: flex; align-items: center; }
        .modal-body { padding: 1.35rem; }
        .modal-footer { display: flex; align-items: center; justify-content: flex-end; gap: 0.6rem; padding: 1rem 1.35rem; border-top: 1px solid var(--line-soft); }
        .modal .btn-close { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border: none; background: none; border-radius: 8px; color: var(--muted); cursor: pointer; padding: 0; }
        .modal .btn-close::before { content: "\00d7"; font-size: 1.4rem; line-height: 1; }
        .modal .btn-close:hover { background: rgba(18, 18, 18, 0.05); color: var(--onyx); }
        .modal .btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; font-family: var(--font-ui); font-size: 0.88rem; font-weight: 600; border-radius: 999px; padding: 0.55rem 1.15rem; border: 1px solid transparent; cursor: pointer; }
        .modal .btn-primary { background: var(--onyx); color: #fff; }
        .modal .btn-secondary { background: transparent; color: var(--muted); border-color: var(--line); }
        .modal .btn-outline-secondary { background: #fff; color: var(--charcoal); border: 1px solid var(--line); border-radius: 9px; padding: 0.4rem 0.6rem; }
        .modal .btn-outline-secondary:hover { border-color: var(--gold); color: var(--onyx); }
        .modal .form-range { width: 100%; accent-color: var(--onyx); }
        .modal .cropper-controls { margin-top: 1rem; }
        .modal .row { display: flex; flex-wrap: wrap; gap: 0.75rem; }
        .modal [class*="col-"] { flex: 1 1 0; min-width: 0; }
        .modal .col-12 { flex: 0 0 100%; }
        .modal .d-flex { display: flex; } .modal .align-items-center { align-items: center; }
        .modal .gap-2 { gap: 0.5rem; } .modal .flex-grow-1 { flex: 1; }
        .modal .mb-1 { margin-bottom: 0.25rem; } .modal .mb-2 { margin-bottom: 0.5rem; } .modal .mb-3 { margin-bottom: 0.75rem; }
        .modal .text-muted { color: var(--muted); } .modal .small { font-size: 0.82rem; } .modal .fw-semibold { font-weight: 600; }
        .modal .spinner-border { width: 2rem; height: 2rem; border: 3px solid var(--line); border-right-color: var(--gold); border-radius: 50%; animation: spin 0.7s linear infinite; display: inline-block; }
        @keyframes spin { to { transform: rotate(360deg); } }
        .modal .visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

        [hidden] { display: none !important; }
    
/* ============================================================
   RTL — Hebrew / Arabic (pages set <html dir="rtl">). The editorial layout is
   mostly flexbox + CSS grid, which mirror automatically under dir="rtl"; these
   rules flip the remaining physically-positioned bits, mirror directional icons,
   and drop letter-spacing (which breaks Arabic's connected script). The brand
   wordmark keeps dir="ltr" in the HTML, so it stays a Latin logotype.
   ============================================================ */
[dir="rtl"] .save-pill { right: auto; left: 1.25rem; }
[dir="rtl"] .cover-remove { right: auto; left: 0.5rem; }
[dir="rtl"] .cover-crop { left: auto; right: 0.5rem; }
[dir="rtl"] .cover-swatches .lbl { margin-right: 0; margin-left: 0.15rem; }
[dir="rtl"] .amount-cell .cur { left: auto; right: 0.7rem; }
[dir="rtl"] .amount-cell .input { padding-left: 0.85rem; padding-right: 1.5rem; text-align: right; }
[dir="rtl"] .ov-table th { text-align: right; }
[dir="rtl"] .ov-av { margin-right: 0; margin-left: 0.5rem; }

/* Toggle switch mirrors: knob rests on the right, slides left when on. */
[dir="rtl"] .slider::before { left: auto; right: 3px; }
[dir="rtl"] .switch input:checked + .slider::before { transform: translateX(-18px); }

/* Directional icons point the other way in RTL. */
[dir="rtl"] .bi-arrow-right,
[dir="rtl"] .bi-arrow-left,
[dir="rtl"] .step-sep .bi-chevron-right { display: inline-block; transform: scaleX(-1); }

/* Letter-spacing breaks Arabic's connected script; drop it on the tracked labels. */
[dir="rtl"] .eyebrow,
[dir="rtl"] .ov-eyebrow,
[dir="rtl"] .rev-t,
[dir="rtl"] .sl,
[dir="rtl"] .preview-cap { letter-spacing: normal; }

@media (max-width: 575px) {
  [dir="rtl"] .save-pill { right: auto; left: 0.9rem; }
}
