/* ============================================================
   AugmentedBusiness.Cards | /buy 2026 redesign
   Dark premium design system. Gold accent, glass surfaces.
   ============================================================ */

:root {
    --bg-0: #0b0c10;
    --bg-1: #111218;
    --bg-2: #171922;
    --bg-3: #1e212c;
    --glass: rgba(255, 255, 255, 0.04);
    --glass-strong: rgba(255, 255, 255, 0.07);
    --line: rgba(255, 255, 255, 0.09);
    --line-strong: rgba(255, 255, 255, 0.16);
    --gold: #c5a059;
    --gold-light: #e2c99d;
    --gold-glow: rgba(197, 160, 89, 0.35);
    --text-1: #f4f1e9;
    --text-2: #b3afa4;
    --text-3: #78756c;
    --danger: #ff6b6b;
    --success: #5ad598;
    --radius-s: 10px;
    --radius-m: 16px;
    --radius-l: 24px;
    --shadow-1: 0 8px 30px rgba(0, 0, 0, 0.45);
    --shadow-glow: 0 0 30px var(--gold-glow);
    --wizard-max: 720px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'Outfit', system-ui, sans-serif;
    background:
        radial-gradient(1000px 500px at 80% -10%, rgba(197, 160, 89, 0.12), transparent 60%),
        radial-gradient(800px 600px at -10% 30%, rgba(80, 90, 190, 0.08), transparent 60%),
        var(--bg-0);
    color: var(--text-1);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

::selection {
    background: var(--gold);
    color: #0b0c10;
}

.hidden {
    display: none !important;
}

/* ---------- Topbar ---------- */
.topbar {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 28px;
    background: rgba(11, 12, 16, 0.75);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
}

.topbar .brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-1);
}

.topbar .brand img {
    width: 32px;
    filter: invert(1) brightness(1.4);
}

.topbar .brand strong {
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: -0.3px;
}

.topbar .brand strong span {
    color: var(--gold);
}

.topbar .menu {
    display: flex;
    align-items: center;
    gap: 22px;
}

.topbar .menu a {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--text-2);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.92rem;
    transition: color 0.2s ease;
}

.topbar .menu a:hover {
    color: var(--gold-light);
}

.topbar .menu a i {
    font-size: 1.15rem;
}

/* ---------- Layout ---------- */
.buy-layout {
    display: grid;
    grid-template-columns: minmax(420px, 44%) 1fr;
    gap: 28px;
    padding: 88px 28px 60px 28px;
    max-width: 1700px;
    margin: 0 auto;
    align-items: start;
}

/* ---------- Preview pane ---------- */
.preview-pane {
    position: sticky;
    top: 88px;
    height: calc(100vh - 116px);
    min-height: 480px;
    border-radius: var(--radius-l);
    background:
        radial-gradient(600px 400px at 50% 0%, rgba(197, 160, 89, 0.10), transparent 70%),
        linear-gradient(180deg, var(--bg-2), var(--bg-1));
    border: 1px solid var(--line);
    box-shadow: var(--shadow-1);
    overflow: hidden;
}

#cardSimulation {
    position: absolute;
    inset: 0;
    z-index: 1;
}

#cardSimulation canvas {
    outline: none;
}

.preview-pane .loading {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 44px;
    height: 44px;
    margin: -22px 0 0 -22px;
    border: 3px solid var(--line-strong);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
    z-index: 2;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.preview-hint {
    position: absolute;
    top: 18px;
    left: 0;
    right: 0;
    text-align: center;
    z-index: 5;
    color: var(--text-3);
    font-size: 0.85rem;
    letter-spacing: 0.4px;
    pointer-events: none;
}

/* Toolbar floating at bottom of the preview */
.preview-toolbar {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    flex-wrap: wrap;
    padding: 12px 18px;
    border-radius: var(--radius-m);
    background: rgba(17, 18, 24, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--line);
}

/* Real / Augmented segmented toggle. Two equal halves so the 50% wide
   thumb always covers exactly one label. */
.reality-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    position: relative;
    background: var(--bg-0);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 4px;
    cursor: pointer;
    user-select: none;
}

.reality-toggle span {
    position: relative;
    z-index: 2;
    padding: 7px 18px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-2);
    transition: color 0.25s ease;
    text-align: center;
    white-space: nowrap;
}

.reality-toggle .thumb {
    position: absolute;
    top: 4px;
    bottom: 4px;
    left: 4px;
    width: calc(50% - 4px);
    border-radius: 999px;
    background: linear-gradient(135deg, var(--gold), #a8843e);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.reality-toggle.augmented .thumb {
    transform: translateX(100%);
}

.reality-toggle.augmented span.aug,
.reality-toggle:not(.augmented) span.real {
    color: #0b0c10;
}

/* Round icon buttons */
.icon-btn {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: var(--glass);
    color: var(--text-2);
    cursor: pointer;
    transition: all 0.2s ease;
}

.icon-btn:hover {
    color: var(--gold-light);
    border-color: var(--gold);
    box-shadow: 0 0 14px var(--gold-glow);
}

.icon-btn i {
    font-size: 1.25rem;
}

.toolbar-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.toolbar-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-3);
    margin-right: 2px;
}

/* ---------- Wizard pane ---------- */
.wizard-pane {
    max-width: var(--wizard-max);
    width: 100%;
    justify-self: start;
    min-width: 0;
    scroll-margin-top: 96px;
}

.wizard-header h1 {
    font-size: clamp(1.6rem, 2.6vw, 2.3rem);
    font-weight: 700;
    letter-spacing: -0.8px;
    margin: 6px 0 4px 0;
}

.wizard-header h1 em {
    font-style: normal;
    color: var(--gold);
}

.wizard-header p {
    color: var(--text-2);
    margin: 0 0 26px 0;
    font-weight: 300;
}

/* Step progress */
.steps-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 30px;
}

.steps-nav .step-chip {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 10px 4px;
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--text-3);
    font-family: inherit;
    transition: color 0.2s ease;
    position: relative;
}

.steps-nav .step-chip .dot {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    background: var(--bg-2);
    border: 1px solid var(--line);
    transition: all 0.25s ease;
}

.steps-nav .step-chip .dot i {
    font-size: 1rem;
    display: none;
}

.steps-nav .step-chip .lbl {
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    white-space: nowrap;
}

.steps-nav .step-chip:not(.locked):hover {
    color: var(--gold-light);
}

.steps-nav .step-chip.active {
    color: var(--gold);
}

.steps-nav .step-chip.active .dot {
    background: linear-gradient(135deg, var(--gold), #a8843e);
    color: #0b0c10;
    border-color: transparent;
    box-shadow: 0 0 18px var(--gold-glow);
}

.steps-nav .step-chip.done {
    color: var(--text-2);
}

.steps-nav .step-chip.done .dot {
    border-color: var(--gold);
    color: var(--gold);
}

.steps-nav .step-chip.done .dot .num {
    display: none;
}

.steps-nav .step-chip.done .dot i {
    display: block;
}

.steps-nav .step-chip.locked {
    cursor: not-allowed;
    opacity: 0.45;
}

.steps-nav .connector {
    height: 1px;
    flex: 0 0 14px;
    background: var(--line-strong);
    margin-top: -22px;
}

/* Step panels */
.wizard-step {
    display: none;
    animation: stepIn 0.35s ease;
}

.wizard-step.active {
    display: block;
}

@keyframes stepIn {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.panel {
    background: linear-gradient(180deg, var(--glass-strong), var(--glass));
    border: 1px solid var(--line);
    border-radius: var(--radius-l);
    padding: 30px;
    margin-bottom: 22px;
}

.panel h2 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.3px;
    margin: 0 0 6px 0;
}

.panel h2 i {
    color: var(--gold);
    font-size: 1.35rem;
}

.panel .sub {
    color: var(--text-2);
    font-size: 0.95rem;
    font-weight: 300;
    margin: 0 0 24px 0;
    line-height: 1.55;
}

.panel h3 {
    font-size: 0.98rem;
    font-weight: 600;
    margin: 26px 0 12px 0;
    color: var(--text-1);
}

/* Info button */
.info-btn {
    width: 26px;
    height: 26px;
    min-width: 26px;
    border-radius: 50%;
    border: 1px solid var(--line-strong);
    background: transparent;
    color: var(--text-3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.info-btn:hover {
    color: var(--gold);
    border-color: var(--gold);
}

.info-btn i {
    font-size: 0.95rem;
}

/* ---------- AR layout template picker ---------- */
.tpl-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.tpl-card svg text {
    fill: currentColor;
}

.tpl-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 14px 8px 12px 8px;
    border-radius: var(--radius-m);
    border: 1px solid var(--line);
    background: var(--bg-1);
    color: var(--text-2);
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tpl-card svg {
    width: 100%;
    max-width: 70px;
    height: auto;
    stroke: currentColor;
    fill: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
}

.tpl-card svg rect {
    fill: none;
}

.tpl-card svg ellipse {
    fill: none;
    stroke-width: 1.4;
    opacity: 0.6;
}

.tpl-card span {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.tpl-card:hover {
    color: var(--gold-light);
    border-color: var(--line-strong);
    transform: translateY(-2px);
}

.tpl-card.active {
    color: var(--gold);
    border-color: var(--gold);
    background: rgba(197, 160, 89, 0.07);
    box-shadow: 0 0 18px var(--gold-glow);
}

/* Effect chips */
.fx-chips {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.fx-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--bg-1);
    color: var(--text-2);
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.fx-chip i {
    font-size: 1.05rem;
}

.fx-chip:hover {
    border-color: var(--line-strong);
    color: var(--gold-light);
}

.fx-chip.active {
    color: var(--gold);
    border-color: var(--gold);
    background: rgba(197, 160, 89, 0.08);
}

/* Reel button recording state */
.icon-btn.recording {
    color: #ff5252;
    border-color: #ff5252;
    animation: recPulse 1.1s ease-in-out infinite;
}

@keyframes recPulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(255, 82, 82, 0.5);
    }

    50% {
        box-shadow: 0 0 0 8px rgba(255, 82, 82, 0);
    }
}

/* ---------- Step 2 tabs (Front | Back) ---------- */
.s2tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
}

.s2tab {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 18px;
    border-radius: var(--radius-m);
    border: 1px solid var(--line);
    background: var(--bg-1);
    color: var(--text-2);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.s2tab.active {
    color: var(--gold);
    border-color: var(--gold);
    background: rgba(197, 160, 89, 0.07);
    box-shadow: 0 0 16px var(--gold-glow);
}

/* Collapsible panels */
.panel.collapsible>h2 {
    cursor: pointer;
    user-select: none;
}

.panel.collapsible>h2::after {
    content: "expand_less";
    font-family: 'Material Icons';
    margin-left: auto;
    color: var(--text-3);
    transition: transform 0.25s ease;
}

.panel.collapsible.collapsed>h2 {
    margin-bottom: 0;
}

.panel.collapsible.collapsed>h2::after {
    transform: rotate(180deg);
}

.panel.collapsible.collapsed>*:not(h2) {
    display: none;
}

/* Per-field icon button */
.field .field-icon-btn {
    position: absolute;
    right: 4px;
    top: -8px;
    min-width: 34px;
    height: 30px;
    padding: 0 8px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--bg-1);
    color: var(--text-2);
    font-family: inherit;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.field .field-icon-btn:hover {
    border-color: var(--gold);
    color: var(--gold);
}

/* Emoji popover */
.emoji-popover {
    position: absolute;
    z-index: 3000;
    display: grid;
    grid-template-columns: repeat(7, 40px);
    gap: 4px;
    padding: 12px;
    border-radius: var(--radius-m);
    background: var(--bg-2);
    border: 1px solid var(--line-strong);
    box-shadow: var(--shadow-1);
}

.emoji-cell {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: none;
    background: transparent;
    font-size: 1.35rem;
    cursor: pointer;
}

.emoji-cell:hover {
    background: var(--bg-1);
}

.emoji-cell.none {
    font-size: 0.7rem;
    color: var(--text-3);
    grid-column: span 2;
    width: auto;
}

/* Custom fields */
.custom-fields-block {
    margin-top: 24px;
}

.custom-field-row {
    margin-bottom: 14px;
}

.custom-field-row .remove-field-btn {
    position: absolute;
    right: 46px;
    top: -8px;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: 1px solid rgba(255, 107, 107, 0.4);
    background: transparent;
    color: var(--danger);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.custom-field-row .remove-field-btn i {
    font-size: 1rem;
}

#addCustomFieldBtn {
    height: 44px;
    padding: 0 20px;
    font-size: 0.9rem;
    margin-top: 4px;
}

/* ---------- Forms ---------- */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-grid .full {
    grid-column: 1 / -1;
}

.field {
    position: relative;
}

.field label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: var(--text-3);
    margin: 0 0 7px 4px;
}

.field input,
.field select {
    width: 100%;
    height: 52px;
    padding: 0 16px;
    border-radius: var(--radius-s);
    border: 1px solid var(--line);
    background: var(--bg-1);
    color: var(--text-1);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    appearance: none;
    outline: none;
}

.field select {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8'><path d='M1 1l5 5 5-5' fill='none' stroke='%23b3afa4' stroke-width='2'/></svg>");
    background-repeat: no-repeat;
    background-position: right 16px center;
    cursor: pointer;
}

.field input:focus,
.field select:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.18);
}

.field input::placeholder {
    color: var(--text-3);
    font-weight: 300;
}

.field .hint {
    font-size: 0.78rem;
    color: var(--text-3);
    margin: 6px 0 0 4px;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 52px;
    padding: 0 26px;
    border-radius: 999px;
    border: 1px solid var(--line-strong);
    background: var(--glass);
    color: var(--text-1);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
}

.btn:hover {
    border-color: var(--gold);
    color: var(--gold-light);
}

.btn.primary {
    background: linear-gradient(135deg, var(--gold-light), var(--gold) 55%, #9a7a3a);
    border: none;
    color: #17130a;
}

.btn.primary:hover {
    color: #17130a;
    box-shadow: 0 6px 26px var(--gold-glow);
    transform: translateY(-1px);
}

.btn.ghost {
    background: transparent;
    border-color: transparent;
    color: var(--text-2);
}

.btn.ghost:hover {
    color: var(--gold-light);
}

.btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.btn i {
    font-size: 1.2rem;
}

.wizard-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 6px;
    gap: 14px;
}

/* ---------- Upload zones ---------- */
.dropzone-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.dropzone {
    position: relative;
    border: 1.5px dashed var(--line-strong);
    border-radius: var(--radius-m);
    background: var(--bg-1);
    padding: 26px 18px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    overflow: hidden;
    min-height: 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.dropzone:hover,
.dropzone.dragover {
    border-color: var(--gold);
    background: rgba(197, 160, 89, 0.06);
}

.dropzone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.dropzone i {
    font-size: 2rem;
    color: var(--gold);
}

.dropzone .dz-title {
    font-weight: 600;
    font-size: 0.98rem;
}

.dropzone .dz-sub {
    font-size: 0.8rem;
    color: var(--text-3);
}

.dropzone .dz-thumb {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.dropzone.has-file .dz-thumb {
    opacity: 1;
}

.dropzone.has-file .dz-inner {
    position: relative;
    z-index: 2;
    background: rgba(11, 12, 16, 0.75);
    backdrop-filter: blur(4px);
    border-radius: var(--radius-s);
    padding: 8px 14px;
}

.dropzone.has-file .dz-inner i,
.dropzone.has-file .dz-inner .dz-sub {
    display: none;
}

.dropzone.has-file {
    border-style: solid;
    border-color: var(--gold);
}

/* ---------- Composed image target + movable QR ---------- */
.target-composer {
    margin-top: 18px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-m);
    background: rgba(255, 255, 255, 0.025);
}

.target-composer-head,
.product-models-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 14px;
}

.target-composer h3,
.product-models h3 {
    margin: 0 0 3px;
    font-size: 1rem;
}

.target-composer-head .sub,
.product-models-head .sub {
    margin: 0;
}

.tracking-score {
    flex: 0 0 auto;
    min-width: 104px;
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 8px;
    padding: 8px 11px;
    border: 1px solid rgba(90, 213, 152, 0.4);
    border-radius: 999px;
    background: rgba(90, 213, 152, 0.1);
    color: var(--success);
}

.tracking-score strong {
    font-size: 1.15rem;
    line-height: 1;
}

.tracking-score span {
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
}

.tracking-score.is-waiting {
    color: var(--text-3);
    border-color: var(--line);
    background: var(--bg-1);
}

.tracking-score.is-fair {
    color: #f0c060;
    border-color: rgba(240, 192, 96, 0.42);
    background: rgba(240, 192, 96, 0.1);
}

.tracking-score.is-poor {
    color: var(--danger);
    border-color: rgba(255, 107, 107, 0.42);
    background: rgba(255, 107, 107, 0.1);
}

.target-card {
    position: relative;
    width: 100%;
    aspect-ratio: 85 / 55;
    overflow: hidden;
    touch-action: none;
    border: 1px solid var(--line-strong);
    border-radius: 13px;
    background:
        linear-gradient(rgba(12, 13, 18, 0.12), rgba(12, 13, 18, 0.12)),
        url("../textures/cardHero.jpg") center / 100% 100% no-repeat;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04), var(--shadow-1);
}

.target-card-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 91 / 61;
    padding: 3.2967%;
    border: 2px dashed #67d7e8;
    border-radius: 16px;
    background:
        linear-gradient(135deg, rgba(103, 215, 232, 0.24), rgba(183, 116, 198, 0.2)),
        repeating-linear-gradient(
            -45deg,
            rgba(255, 255, 255, 0.035) 0 5px,
            transparent 5px 10px
        ),
        var(--bg-1);
}

.front-target-frame {
    background:
        linear-gradient(rgba(12, 13, 18, 0.06), rgba(12, 13, 18, 0.06)),
        url("../textures/cardHero.jpg") center / 100% 100% no-repeat;
}

.back-target-frame {
    background:
        linear-gradient(rgba(12, 13, 18, 0.06), rgba(12, 13, 18, 0.06)),
        url("../textures/CardBack.jpg") center / 100% 100% no-repeat;
}

.target-card-frame > .target-card {
    height: 100%;
    aspect-ratio: auto;
    background: transparent;
}

.bleed-frame-label {
    position: absolute;
    z-index: 7;
    right: 1.1%;
    bottom: 0.55%;
    padding: 2px 5px;
    border-radius: 4px;
    background: #12333a;
    color: #8feaf5;
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1;
    text-transform: uppercase;
}

.print-boundary {
    position: absolute;
    z-index: 6;
    pointer-events: none;
}

.print-boundary span {
    position: absolute;
    padding: 2px 5px;
    border-radius: 4px;
    background: rgba(11, 12, 16, 0.76);
    font-size: 0.55rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.045em;
    text-transform: uppercase;
    white-space: nowrap;
}

.trim-boundary {
    inset: 0;
    border: 3px solid #ff5c98;
    border-radius: 11px;
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.72),
        0 0 12px rgba(255, 92, 152, 0.38);
}

.trim-boundary span {
    left: 7px;
    top: 6px;
    background: #8f2453;
    color: #fff;
}

.qr-safe-boundary {
    inset: 5.4545% 3.5294%;
    border: 3px dashed #ffd166;
    border-radius: 7px;
    box-shadow:
        inset 0 0 0 1px rgba(0, 0, 0, 0.28),
        0 0 14px rgba(255, 209, 102, 0.38);
}

.qr-safe-boundary span {
    right: 5px;
    bottom: 5px;
    background: #6b5118;
    color: #ffe7ab;
}

#trackingPointsCanvas,
#backTrackingPointsCanvas {
    position: absolute;
    inset: 0;
    /* Above the QR as well: its feature points are part of the composed
       target and must remain visible in the diagnostic overlay. */
    z-index: 4;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

#trackingPointsCanvas.hidden-points,
#backTrackingPointsCanvas.hidden-points {
    opacity: 0;
}

.back-target-card {
    background: transparent;
}

.print-side-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
}

.print-side-tab {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-s);
    background: var(--bg-1);
    color: var(--text-2);
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.print-side-tab.active {
    color: var(--gold);
    border-color: var(--gold);
    background: rgba(197, 160, 89, 0.07);
    box-shadow: 0 0 16px var(--gold-glow);
}

.print-side-tab:focus-visible {
    outline: 2px solid var(--gold-light);
    outline-offset: 2px;
}

.print-side-panel[hidden] {
    display: none;
}

.single-side-dropzone {
    min-height: 132px;
}

.qr-side-checkbox {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
    padding: 13px 15px;
    border: 1px solid var(--line);
    border-radius: var(--radius-s);
    background: var(--bg-1);
    cursor: pointer;
}

.qr-side-checkbox input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.qr-side-checkbox > span:last-child {
    display: grid;
    gap: 2px;
}

.qr-side-checkbox strong {
    color: var(--text-1);
    font-size: 0.88rem;
}

.qr-side-checkbox small {
    color: var(--text-3);
    font-size: 0.75rem;
}

.qr-checkmark {
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line-strong);
    border-radius: 7px;
    background: var(--bg-2);
    color: transparent;
    transition: all 0.2s ease;
}

.qr-checkmark i {
    font-size: 1rem;
}

.qr-side-checkbox input:checked + .qr-checkmark {
    border-color: var(--gold);
    background: var(--gold);
    color: #111217;
    box-shadow: 0 0 14px var(--gold-glow);
}

.qr-side-checkbox input:focus-visible + .qr-checkmark {
    outline: 2px solid var(--gold-light);
    outline-offset: 2px;
}

.qr-options-slot:not(:empty) {
    margin-top: 10px;
}

.side-analysis-head {
    margin-top: 0;
}

.qr-size-control {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-s);
    background: rgba(255, 255, 255, 0.018);
}

.qr-size-control label {
    flex: 1;
    display: grid;
    grid-template-columns: auto minmax(100px, 1fr) 42px;
    align-items: center;
    gap: 10px;
    color: var(--text-2);
    font-size: 0.82rem;
}

.qr-size-control input[type="range"] {
    width: 100%;
    accent-color: var(--gold);
}

.qr-size-control output {
    color: var(--text-1);
    font-variant-numeric: tabular-nums;
}

.qr-size-control small {
    color: var(--text-3);
    font-size: 0.75rem;
}

.side-target-controls {
    display: flex;
    justify-content: flex-end;
    margin-top: 12px;
}

.qr-placement {
    position: absolute;
    z-index: 3;
    left: 69%;
    top: 50%;
    width: 23%;
    aspect-ratio: 1;
    cursor: grab;
    touch-action: none;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.32));
}

.qr-placement:active {
    cursor: grabbing;
}

.qr-placement:focus-visible {
    outline: 2px solid var(--gold-light);
    outline-offset: 4px;
}

#qrEditorCode,
#qrEditorCode canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
    border-radius: 5px;
}

.qr-resize-handle {
    position: absolute;
    right: -7px;
    bottom: -7px;
    width: 20px;
    height: 20px;
    padding: 0;
    border: 2px solid #0b0c10;
    border-radius: 50%;
    background: var(--gold-light);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.38);
    cursor: nwse-resize;
}

.target-points-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    padding: 8px 11px;
    background: var(--bg-1);
    color: var(--text-2);
    cursor: pointer;
}

.target-points-toggle.active {
    color: var(--gold-light);
    border-color: rgba(197, 160, 89, 0.45);
}

.target-points-toggle i {
    font-size: 1rem;
}

.tracking-advice {
    margin-top: 10px;
    color: var(--text-3);
    font-size: 0.78rem;
    line-height: 1.45;
}

/* ---------- User product models ---------- */
.product-models {
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}

.product-models[hidden] {
    display: none;
}

.back-website-options {
    margin: 14px 0 20px;
    padding: 14px;
    border: 1px solid rgba(197, 160, 89, 0.32);
    border-radius: var(--radius-s);
    background: rgba(197, 160, 89, 0.055);
}

.back-website-options[hidden] {
    display: none;
}

.back-website-options label {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 12px;
}

.back-website-options label span {
    color: var(--gold-light);
    font-weight: 700;
}

.back-website-options input {
    min-width: 0;
    width: 100%;
    padding: 11px 13px;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    background: var(--bg-1);
    color: var(--text-1);
    font: inherit;
}

.back-website-options small {
    display: block;
    margin-top: 8px;
    color: var(--text-3);
}

.product-upload-btn {
    position: relative;
    flex: 0 0 auto;
    overflow: hidden;
    cursor: pointer;
    min-height: 46px;
    padding: 10px 18px;
    border: 1px solid rgba(255, 229, 166, 0.86) !important;
    font-weight: 800;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.58),
        inset 0 -8px 16px rgba(101, 65, 10, 0.2),
        0 8px 22px rgba(197, 160, 89, 0.28);
}

.product-upload-btn::after {
    content: "";
    position: absolute;
    z-index: 0;
    inset: 2px 8px auto;
    height: 42%;
    border-radius: 999px 999px 55% 55%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.48), rgba(255, 255, 255, 0));
    pointer-events: none;
}

.product-upload-btn {
    isolation: isolate;
}

.product-upload-btn > i,
.product-upload-btn > span {
    position: relative;
    z-index: 1;
}

.product-upload-btn > i {
    padding: 4px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.34);
    font-size: 1.1rem;
}

.product-upload-btn:hover {
    transform: translateY(-2px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.68),
        inset 0 -8px 16px rgba(101, 65, 10, 0.18),
        0 12px 28px rgba(197, 160, 89, 0.4);
}

.product-upload-btn input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.product-model-list {
    display: grid;
    gap: 10px;
}

.model-upload-empty {
    padding: 15px;
    border: 1px dashed var(--line-strong);
    border-radius: 12px;
    color: var(--text-3);
    text-align: center;
    font-size: 0.8rem;
}

.product-model-item {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) minmax(100px, 0.7fr) minmax(84px, 0.45fr) 34px;
    align-items: center;
    gap: 10px;
    padding: 9px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: var(--bg-1);
}

.product-model-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    color: var(--gold-light);
    background: linear-gradient(145deg, rgba(197, 160, 89, 0.18), rgba(255, 255, 255, 0.025));
}

.product-model-name {
    min-width: 0;
    color: var(--text-2);
    font-size: 0.76rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-model-item input {
    width: 100%;
    min-width: 0;
    border: 1px solid var(--line-strong);
    border-radius: 9px;
    padding: 9px 10px;
    background: var(--bg-2);
    color: var(--text-1);
    font: inherit;
}

.product-scale {
    grid-column: 2 / 5;
    display: grid;
    grid-template-columns: auto minmax(100px, 1fr) 48px;
    align-items: center;
    gap: 9px;
    color: var(--text-3);
    font-size: 0.72rem;
}

.product-model-item .product-scale-range {
    height: auto;
    padding: 0;
    border: 0;
    background: transparent;
    accent-color: var(--gold);
}

.product-scale output {
    color: var(--gold-light);
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.product-model-remove {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--text-3);
    cursor: pointer;
}

.product-model-remove:hover {
    color: var(--danger);
    background: rgba(255, 107, 107, 0.1);
}

.product-model-remove i {
    font-size: 1.05rem;
}

.model-upload-note {
    margin: 9px 0 0;
    color: var(--text-3);
    font-size: 0.75rem;
}

/* Spec list */
.spec-list {
    list-style: none;
    margin: 18px 0 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.spec-list li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    color: var(--text-2);
    font-size: 0.88rem;
    font-weight: 300;
    line-height: 1.5;
}

.spec-list li i {
    color: var(--gold);
    font-size: 1rem;
    margin-top: 1px;
}

/* Template accordion */
details.template-details {
    margin-top: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-m);
    overflow: hidden;
}

details.template-details summary {
    padding: 14px 18px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--text-2);
    background: var(--bg-1);
    list-style: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

details.template-details summary i {
    color: var(--gold);
    font-size: 1.1rem;
    transition: transform 0.25s ease;
}

details.template-details[open] summary i {
    transform: rotate(180deg);
}

details.template-details .template-body {
    padding: 18px;
    display: grid;
    gap: 12px;
}

details.template-details .template-body img {
    max-width: 100%;
    border-radius: var(--radius-s);
    border: 1px solid var(--line);
}

details.template-details .template-body span {
    font-size: 0.85rem;
    color: var(--text-3);
}

.print-template-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.print-template-grid > div > strong {
    display: block;
    margin: 0 0 7px 2px;
    color: var(--text-2);
    font-size: 0.78rem;
}

.print-template-live {
    position: relative;
    aspect-ratio: 91 / 61;
    overflow: hidden;
    border: 1px solid rgba(197, 160, 89, 0.42);
    border-radius: 10px;
    background:
        linear-gradient(135deg, rgba(197, 160, 89, 0.2), rgba(174, 123, 211, 0.16)),
        var(--bg-1);
}

.print-template-card {
    position: absolute;
    left: 3.2967%;
    top: 4.918%;
    width: 93.4066%;
    height: 90.164%;
    overflow: hidden;
    border: 1px solid var(--line-strong);
    border-radius: 7px;
    background:
        radial-gradient(circle at 78% 22%, rgba(197, 160, 89, 0.13), transparent 30%),
        linear-gradient(145deg, var(--bg-2), var(--bg-1));
}

.print-template-card::after {
    content: "";
    position: absolute;
    inset: 5.45% 3.53%;
    border: 1px dashed rgba(197, 160, 89, 0.58);
    border-radius: 4px;
    pointer-events: none;
}

.bleed-label,
.safe-label {
    position: absolute;
    z-index: 1;
    padding: 2px 5px;
    border-radius: 4px;
    background: rgba(11, 12, 16, 0.68);
    color: rgba(255, 255, 255, 0.78) !important;
    font-size: 0.55rem !important;
    line-height: 1.2;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.bleed-label {
    right: 7px;
    bottom: 4px;
}

.safe-label {
    left: 5%;
    top: 7%;
}

.template-qr {
    position: absolute;
    z-index: 2;
    left: 69%;
    top: 50%;
    width: 23%;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 2px solid #f2f0e9;
    border-radius: 3px;
    background: #f2f0e9;
    color: #343244;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.28);
}

.template-qr i {
    width: 100%;
    height: 100%;
    font-size: clamp(24px, 5vw, 66px);
    line-height: 1;
}

.template-current-size strong {
    color: var(--gold-light);
    font-variant-numeric: tabular-nums;
}

@media (max-width: 680px) {
    .qr-size-control {
        align-items: stretch;
        flex-direction: column;
        gap: 8px;
    }

    .print-template-grid {
        grid-template-columns: 1fr;
    }
}

/* ---------- Field styling panel (colorOptions) ---------- */
.colorOptions {
    display: none;
    margin-top: 18px;
    border: 1px solid var(--gold);
    border-radius: var(--radius-m);
    background: rgba(197, 160, 89, 0.05);
    padding: 18px 20px;
    animation: stepIn 0.3s ease;
}

.colorOptions.visible {
    display: block;
}

#optionLegend {
    display: block;
    font-weight: 700;
    color: var(--gold);
    text-transform: capitalize;
    margin-bottom: 14px;
    font-size: 0.9rem;
    letter-spacing: 0.4px;
}

.colorPallette {
    display: flex;
    align-items: center;
    gap: 22px;
    flex-wrap: wrap;
}

.colorPallette .swatch {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-2);
}

.colorPallette input[type="color"] {
    width: 38px;
    height: 38px;
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    padding: 2px;
}

.colorPallette input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

.colorPallette input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 50%;
}

.colorPallette .emoji-wrap {
    flex: 1;
    min-width: 150px;
}

#emoji {
    width: 100%;
    height: 40px;
    border-radius: var(--radius-s);
    border: 1px solid var(--line);
    background: var(--bg-1);
    color: var(--text-1);
    padding: 0 14px;
    font-family: inherit;
    outline: none;
}

/* EmojiOne area dark overrides */
.emojionearea {
    background: var(--bg-1) !important;
    border: 1px solid var(--line) !important;
    border-radius: var(--radius-s) !important;
    box-shadow: none !important;
}

.emojionearea .emojionearea-editor {
    color: var(--text-1) !important;
    min-height: 40px !important;
    padding: 8px 14px !important;
}

/* ---------- Social buttons ---------- */
.socialContainer {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}

.social_icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--bg-1);
    border: 1px solid var(--line);
    padding: 7px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.social_icon:hover {
    transform: translateY(-3px);
    border-color: var(--gold);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.socialInput {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    border: 1px solid var(--line);
    border-radius: var(--radius-m);
    background: var(--bg-1);
    padding: 14px 16px;
}

.socialInput .selectedIcon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: var(--bg-2);
    border: 1px solid var(--line);
    object-fit: contain;
    padding: 5px;
}

.socialInput .field {
    margin: 0;
}

.socialInput .field.url {
    flex: 1;
    min-width: 170px;
}

.socialInput .field.pos {
    width: 110px;
}

.socialInput .field input,
.socialInput .field select {
    height: 44px;
}

.socialInput .btn {
    height: 44px;
    padding: 0 18px;
    font-size: 0.9rem;
}

.socialInput .btn.danger {
    color: var(--danger);
    border-color: rgba(255, 107, 107, 0.35);
}

.socialInput .btn.danger:hover {
    border-color: var(--danger);
}

/* ---------- AR video step ---------- */
.video-step-grid {
    display: flex;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
}

.video-step-grid .dropzone {
    flex: 1;
    min-width: 220px;
    min-height: 190px;
}

.circleVideoDom {
    width: 190px;
    height: 190px;
    border-radius: 50%;
    border: 1px solid var(--gold);
    box-shadow: 0 0 34px var(--gold-glow), inset 0 0 0 6px var(--bg-0);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-1);
    margin: 0 auto;
    cursor: pointer;
    position: relative;
}

.circleVideoDom video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.circleVideoDom .placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--text-3);
    font-size: 0.78rem;
    pointer-events: none;
}

.circleVideoDom .placeholder i {
    font-size: 1.8rem;
    color: var(--gold);
}

.circleVideoDom.playing .placeholder {
    display: none;
}

/* ---------- Account / register ---------- */
.spinner {
    display: none;
    align-items: center;
    gap: 12px;
    color: var(--gold);
    font-weight: 600;
    font-size: 0.92rem;
}

.spinner::before {
    content: "";
    width: 22px;
    height: 22px;
    border: 2.5px solid var(--line-strong);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}

/* ---------- Checkout ---------- */
.cardPreviewer {
    position: relative;
    width: 455px;
    max-width: 100%;
    aspect-ratio: 91 / 61;
    height: auto;
    display: block;
    padding: 3.2967%;
    border-radius: var(--radius-s);
    background: linear-gradient(120deg, #23252e, #14151b);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-1);
    overflow: hidden;
}

#qrcode {
    position: absolute;
    left: 69%;
    top: 50%;
    width: 23%;
    aspect-ratio: 1 / 1;
    height: auto;
    border-radius: 6px;
    overflow: hidden;
}

#qrcode canvas {
    width: 100%;
    height: 100%;
    display: block;
}

@media (max-width: 620px) {
    .target-composer-head,
    .product-models-head {
        align-items: stretch;
        flex-direction: column;
    }

    .tracking-score {
        align-self: flex-start;
    }

    .product-model-item {
        grid-template-columns: 38px minmax(0, 1fr) 34px;
    }

    .product-model-item input {
        grid-column: 2 / -1;
    }

    .product-scale {
        grid-column: 2 / -1;
    }
}

.previewCardCard .preview-flex {
    display: flex;
    gap: 28px;
    flex-wrap: wrap;
    align-items: center;
}

.previewCardCard .preview-flex>div {
    flex: 1;
    min-width: 260px;
}

.previewCardCard p {
    color: var(--text-2);
    line-height: 1.6;
    font-weight: 300;
}

.previewCardCard p strong {
    color: var(--gold);
    font-weight: 600;
}

#progress {
    color: var(--gold);
    font-size: 0.88rem;
    font-weight: 600;
    min-height: 1.2em;
    margin: 14px 0;
}

/* Price boxes */
.priceBoxWrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.priceBox {
    position: relative;
    border: 1px solid var(--line);
    border-radius: var(--radius-m);
    background: var(--bg-1);
    cursor: pointer;
    transition: all 0.2s ease;
    overflow: hidden;
}

.priceBox:hover {
    border-color: var(--line-strong);
    transform: translateY(-2px);
}

.priceBox label {
    display: block;
    cursor: pointer;
    padding: 26px 20px;
    text-align: center;
}

.priceBox input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.priceBox .amount {
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--text-1);
    letter-spacing: -1px;
    line-height: 1;
}

.priceBox .unit {
    display: block;
    color: var(--text-3);
    font-size: 0.88rem;
    margin: 8px 0 14px 0;
}

.priceBox .cost {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--gold);
}

.priceBox .per-card {
    display: block;
    font-size: 0.75rem;
    color: var(--text-3);
    margin-top: 4px;
}

.priceBox .badge {
    position: absolute;
    top: 12px;
    right: -34px;
    transform: rotate(38deg);
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    color: #17130a;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.6px;
    padding: 4px 38px;
}

.priceBox.animatedBackground,
.priceBox:has(input:checked) {
    border-color: var(--gold);
    box-shadow: 0 0 22px var(--gold-glow);
    background: rgba(197, 160, 89, 0.06);
}

/* Payment */
#payment-form .btn {
    width: 100%;
    margin-top: 18px;
}

#payment-message {
    margin-top: 14px;
    color: var(--danger);
    text-align: center;
    font-size: 0.9rem;
}

#spinner.spinner {
    display: inline-flex;
}

.trust-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 26px;
    flex-wrap: wrap;
    margin-top: 20px;
    color: var(--text-3);
    font-size: 0.8rem;
}

.trust-row span {
    display: flex;
    align-items: center;
    gap: 7px;
}

.trust-row i {
    font-size: 1rem;
    color: var(--gold);
}

/* ---------- Quick save (edit mode) ---------- */
.quick-save-fab {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 2000;
    box-shadow: 0 10px 34px rgba(0, 0, 0, 0.5), 0 0 24px var(--gold-glow);
}

/* ---------- Toast ---------- */
#toast-root {
    position: fixed;
    bottom: 26px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(23, 25, 34, 0.92);
    backdrop-filter: blur(10px);
    border: 1px solid var(--gold);
    color: var(--text-1);
    border-radius: 999px;
    padding: 12px 22px;
    font-size: 0.92rem;
    font-weight: 500;
    box-shadow: var(--shadow-1);
    animation: toastIn 0.3s ease;
}

.toast.leaving {
    animation: toastOut 0.3s ease forwards;
}

.toast i.material-icons {
    font-size: 1.1rem;
    color: var(--gold);
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes toastOut {
    to {
        opacity: 0;
        transform: translateY(16px);
    }
}

/* ---------- Footer ---------- */
.site-footer {
    border-top: 1px solid var(--line);
    padding: 34px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    color: var(--text-3);
    font-size: 0.85rem;
    max-width: 1700px;
    margin: 0 auto;
}

.site-footer a {
    color: var(--text-2);
    text-decoration: none;
}

.site-footer a:hover {
    color: var(--gold-light);
}

.site-footer .foot-links {
    display: flex;
    gap: 22px;
    flex-wrap: wrap;
}

/* ---------- SweetAlert dark tuning ---------- */
div:where(.swal2-container) div:where(.swal2-popup) {
    background: var(--bg-2) !important;
    color: var(--text-1) !important;
    border-radius: var(--radius-l) !important;
}

div:where(.swal2-container) .swal2-title {
    color: var(--text-1) !important;
}

div:where(.swal2-container) .swal2-html-container {
    color: var(--text-2) !important;
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
    .buy-layout {
        grid-template-columns: 1fr;
        padding: 76px 14px 40px 14px;
        gap: 18px;
    }

    .preview-pane {
        position: sticky;
        top: 64px;
        height: 320px;
        min-height: 320px;
        z-index: 500;
    }

    .preview-toolbar {
        gap: 10px;
        padding: 8px 12px;
    }

    .toolbar-label {
        display: none;
    }

    .icon-btn {
        width: 38px;
        height: 38px;
    }

    .wizard-pane {
        max-width: none;
    }

    .steps-nav .step-chip .lbl {
        display: none;
    }
}

@media (max-width: 640px) {
    .topbar .menu a span {
        display: none;
    }

    .topbar .brand strong {
        font-size: 0.92rem;
    }

    .preview-hint {
        display: none;
    }

    .toolbar-group.advanced {
        display: none;
    }

    .form-grid,
    .dropzone-grid,
    .priceBoxWrapper {
        grid-template-columns: 1fr;
    }

    .tpl-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .panel {
        padding: 22px 18px;
    }

    .preview-pane {
        height: 250px;
        min-height: 250px;
    }

}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.001s !important;
        transition-duration: 0.001s !important;
    }
}

.draft-claim-banner {
    position: fixed;
    top: 76px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1100;
    display: grid;
    grid-template-columns: 44px minmax(220px, 1fr) auto auto auto 34px;
    align-items: center;
    gap: 12px;
    width: min(1120px, calc(100% - 32px));
    margin: 0;
    padding: 11px 12px;
    border: 1px solid rgba(230, 198, 124, .46);
    border-radius: 24px 30px 20px 28px;
    color: var(--text-1);
    background:
        linear-gradient(110deg, rgba(255,255,255,.13), transparent 42%),
        rgba(17, 17, 22, .86);
    box-shadow: inset 0 1px rgba(255,255,255,.2), 0 16px 45px rgba(0,0,0,.24);
    backdrop-filter: blur(22px) saturate(1.25);
}
.has-draft-banner .buy-layout { padding-top: 168px; }
.draft-claim-banner[hidden] { display: none; }
.draft-claim-banner strong, .draft-claim-banner span { display: block; }
.draft-claim-banner span { margin-top: 2px; color: var(--text-2); font-size: .82rem; }
.draft-claim-banner code { color: #dbc27e; font: 700 .75rem/1 Outfit, sans-serif; }
.draft-new-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--text-2);
    font-size: .78rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}
.draft-new-link:hover { color: var(--text-1); }
.draft-new-link .material-icons { font-size: 17px; }
.draft-claim-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 46% 54% 55% 45%;
    color: #1a1207;
    background: linear-gradient(145deg,#ffe7a4,#bd8133);
    box-shadow: inset 4px 5px 9px #fff7,0 8px 18px #0004;
}
.draft-claim-banner .btn { min-height: 40px; padding: 9px 15px; white-space: nowrap; }
#draftClaimDismiss { border: 0; color: var(--text-2); background: transparent; cursor: pointer; }

@media (max-width: 760px) {
    .draft-claim-banner {
        top: 70px;
        grid-template-columns: 40px 1fr 32px;
    }
    .has-draft-banner .buy-layout { padding-top: 232px; }
    .draft-claim-icon { grid-column: 1; grid-row: 1; }
    .draft-claim-banner > div:nth-child(2) { grid-column: 2; grid-row: 1; }
    .draft-claim-banner code { display: none; }
    .draft-new-link { grid-column: 1 / -1; justify-self: end; }
    .draft-claim-banner .btn { grid-column: 1 / -1; width: 100%; }
    #draftClaimDismiss { grid-column: 3; grid-row: 1; }
}

.live-call-card {
    position: relative;
    margin-top: 24px;
    padding: 18px 20px 14px;
    overflow: hidden;
    border: 1px solid rgba(222, 190, 119, .32);
    border-radius: 25px 31px 24px 29px;
    background:
        linear-gradient(128deg, rgba(255, 255, 255, .08), transparent 38%),
        radial-gradient(circle at 92% -20%, rgba(170, 126, 255, .14), transparent 38%),
        rgba(12, 12, 16, .78);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .14),
        inset 0 -18px 34px rgba(0, 0, 0, .12),
        0 16px 34px rgba(0, 0, 0, .16);
    backdrop-filter: blur(20px) saturate(1.18);
}

.live-call-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(110deg, rgba(255, 236, 190, .08), transparent 22%, transparent 76%, rgba(195, 127, 216, .06));
    pointer-events: none;
}

.live-call-card > * { position: relative; }
.live-call-card [hidden] { display: none !important; }

.live-call-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, .09);
}

.live-call-title {
    display: flex;
    align-items: center;
    gap: 13px;
    min-width: 0;
}

.live-call-orb {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(255, 235, 185, .72);
    border-radius: 46% 54% 58% 42% / 48% 42% 58% 52%;
    color: #19151b;
    background:
        linear-gradient(145deg, rgba(255,255,255,.85), transparent 35%),
        linear-gradient(145deg, #f9dc8c, #bc792c 57%, #efc86a);
    box-shadow:
        inset 4px 5px 8px rgba(255, 255, 255, .42),
        inset -3px -5px 9px rgba(83, 42, 3, .22),
        0 8px 20px rgba(197, 160, 89, .2);
}

.live-call-orb i { font-size: 23px; }
.live-call-heading h3 {
    margin: 1px 0 2px;
    font-size: 1.02rem;
    line-height: 1.2;
}
.live-call-title small {
    display: block;
    color: var(--text-3);
    font-size: .72rem;
    line-height: 1.35;
}
.live-call-kicker {
    display: block;
    color: #d7b76c;
    font-size: .61rem;
    font-weight: 700;
    letter-spacing: .16em;
}

.live-call-editor {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(220px, .88fr);
    gap: 18px;
    padding: 15px 0 13px;
}

.live-call-settings,
.live-call-placement {
    min-width: 0;
}

.live-call-section-label {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}
.live-call-section-label > span {
    color: var(--text-1);
    font-size: .77rem;
    font-weight: 700;
}
.live-call-section-label small {
    color: var(--text-3);
    font-size: .65rem;
}

.live-call-appearance-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}
.live-call-appearance-option {
    position: relative;
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) 17px;
    align-items: center;
    gap: 9px;
    min-height: 56px;
    padding: 7px 9px 7px 7px;
    border: 1px solid rgba(255,255,255,.11);
    border-radius: 17px 19px 16px 20px;
    color: var(--text-2);
    text-align: left;
    cursor: pointer;
    background:
        linear-gradient(145deg, rgba(255,255,255,.055), transparent 62%),
        rgba(7,7,10,.3);
    box-shadow: inset 0 1px rgba(255,255,255,.08);
    font-family: inherit;
    transition: border-color .18s ease, color .18s ease, background .18s ease, box-shadow .18s ease;
}
.live-call-appearance-option:hover {
    color: var(--text-1);
    border-color: rgba(224,192,119,.34);
}
.live-call-appearance-option.active {
    color: var(--text-1);
    border-color: rgba(246,213,142,.58);
    background:
        linear-gradient(145deg, rgba(255,234,184,.11), transparent 62%),
        rgba(64,47,28,.2);
    box-shadow:
        inset 0 1px rgba(255,255,255,.15),
        0 7px 18px rgba(181,128,47,.12);
}
.live-call-appearance-option:focus-visible {
    outline: 3px solid rgba(197,160,89,.34);
    outline-offset: 2px;
}
.live-call-appearance-option strong,
.live-call-appearance-option small {
    display: block;
}
.live-call-appearance-option strong {
    color: inherit;
    font-size: .75rem;
    line-height: 1.1;
}
.live-call-appearance-option small {
    margin-top: 3px;
    color: var(--text-3);
    font-size: .61rem;
    line-height: 1.15;
}
.live-call-check {
    color: #e1bd6c;
    font-size: 17px;
    opacity: 0;
    transform: scale(.75);
    transition: opacity .18s ease, transform .18s ease;
}
.live-call-appearance-option.active .live-call-check {
    opacity: 1;
    transform: scale(1);
}
.live-call-appearance-preview {
    --call-surface: #c5a059;
    --call-light: #ffe7a0;
    --call-dark: #8d5b1f;
    --call-ink: #14130a;
    --call-rim: #fff0bd;
    position: relative;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--call-rim);
    border-radius: 50%;
    color: var(--call-ink);
    background:
        linear-gradient(155deg, rgba(255,255,255,.82) 1%, transparent 34%),
        radial-gradient(circle at 40% 28%, var(--call-light), var(--call-surface) 48%, var(--call-dark) 100%);
    box-shadow:
        inset 3px 3px 6px rgba(255,255,255,.46),
        inset -3px -4px 7px rgba(101,52,6,.25),
        0 5px 11px rgba(0,0,0,.28);
}
.live-call-appearance-preview i { font-size: 19px; }
.live-call-appearance-preview.is-3d {
    transform: perspective(120px) rotateX(-8deg) rotateY(-12deg);
    border-radius: 44% 56% 52% 48% / 47% 44% 56% 53%;
    box-shadow:
        inset 4px 5px 8px rgba(255,255,255,.5),
        inset -4px -5px 8px rgba(87,43,4,.3),
        5px 6px 10px rgba(0,0,0,.3);
}
.live-call-label {
    display: grid;
    gap: 5px;
    margin-top: 9px;
    color: var(--text-2);
    font-size: .7rem;
    font-weight: 700;
}
.live-call-label input {
    width: 100%;
    min-height: 40px;
    padding: 8px 12px;
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 13px;
    color: var(--text-1);
    background: rgba(4,4,7,.42);
    font: 500 .78rem inherit;
    box-shadow: inset 0 2px 8px rgba(0,0,0,.2);
}
.live-call-position-pad {
    position: relative;
    aspect-ratio: 85 / 55;
    width: 100%;
    min-height: 116px;
    overflow: hidden;
    border: 1px solid rgba(226, 201, 157, .34);
    border-radius: 16px 19px 15px 20px;
    outline: none;
    cursor: crosshair;
    touch-action: none;
    background:
        linear-gradient(160deg, transparent 49.5%, rgba(255,255,255,.025) 50%, transparent 50.5%),
        radial-gradient(circle at 72% 24%, rgba(201, 121, 194, .2), transparent 34%),
        linear-gradient(145deg, rgba(197, 160, 89, .09), rgba(89, 68, 128, .2)),
        #101015;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.12),
        inset 0 -14px 24px rgba(0,0,0,.22);
}
.live-call-position-pad:focus-visible {
    box-shadow: 0 0 0 3px rgba(197,160,89,.35), inset 0 1px 0 rgba(255,255,255,.18);
}
.live-call-position-safe {
    position: absolute;
    inset: 16.6667%;
    border: 1px solid rgba(226, 201, 157, .38);
    border-radius: 10px;
    pointer-events: none;
    background:
        linear-gradient(145deg, rgba(255,255,255,.035), rgba(197,160,89,.055)),
        rgba(8,8,12,.28);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}
.live-call-position-safe::after {
    content: "";
    position: absolute;
    inset: 7%;
    border: 1px dashed rgba(226, 201, 157, .2);
    border-radius: 7px;
}
.live-call-card-hint {
    position: absolute;
    left: 20%;
    bottom: 19%;
    color: rgba(255,255,255,.19);
    font-size: .52rem;
    font-weight: 800;
    letter-spacing: .14em;
    pointer-events: none;
}
.live-call-position-handle {
    --call-surface: #c5a059;
    --call-light: #ffe7a0;
    --call-dark: #8d5b1f;
    --call-ink: #14130a;
    --call-rim: #fff0bd;
    position: absolute;
    left: 78%;
    top: 76%;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    transform: translate(-50%, -50%);
    border: 1px solid var(--call-rim);
    border-radius: 48% 52% 55% 45% / 45% 43% 57% 55%;
    color: var(--call-ink);
    cursor: grab;
    touch-action: none;
    background:
        linear-gradient(160deg, rgba(255,255,255,.82), transparent 42%),
        radial-gradient(circle at 38% 25%, var(--call-light), var(--call-surface) 52%, var(--call-dark));
    box-shadow:
        inset 2px 3px 5px rgba(255,255,255,.58),
        0 7px 15px rgba(0,0,0,.38),
        0 0 18px rgba(201, 139, 58, .2);
}
.live-call-position-handle:active { cursor: grabbing; transform: translate(-50%, -50%) scale(.95); }
.live-call-position-handle i { font-size: 18px; }

.live-call-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 44px;
    padding-top: 11px;
    border-top: 1px solid rgba(255,255,255,.08);
}
.live-call-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 7px;
}
.live-call-actions .btn {
    min-height: 36px;
    padding: 7px 11px;
    border-radius: 12px;
    font-size: .7rem;
}
.live-call-inbox {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 36px;
    padding: 7px 9px;
    border-radius: 11px;
    color: #d9bd78;
    font-size: .7rem;
    font-weight: 700;
    text-decoration: none;
}
.live-call-inbox:hover { background: rgba(216,185,111,.08); }
.live-call-inbox i,
.live-call-actions i { font-size: 17px; }
#live_call_status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    margin: 0;
    color: var(--text-3);
    font-size: .65rem;
    line-height: 1.25;
}
#live_call_status i { flex: 0 0 auto; font-size: 15px; }
#live_call_status.ok { color: #72dda6; }
#live_call_status.error { color: #ff9c95; }

.live-call-switch { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px; cursor: pointer; }
.live-call-switch input { position: absolute; opacity: 0; pointer-events: none; }
.live-call-switch span {
    position: relative;
    width: 43px;
    height: 24px;
    border: 1px solid rgba(255,255,255,.24);
    border-radius: 999px;
    background: rgba(0,0,0,.35);
    box-shadow: inset 0 3px 8px rgba(0,0,0,.35);
}
.live-call-switch span::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #e6e1d8;
    box-shadow: 0 3px 8px rgba(0,0,0,.35);
    transition: transform .22s ease, background .22s ease;
}
.live-call-switch input:checked + span { background: linear-gradient(90deg, #9674e5, #cf6fa6); }
.live-call-switch input:checked + span::after { transform: translateX(19px); background: #fff7de; }
.live-call-switch em { min-width: 20px; color: var(--text-3); font-size: .68rem; font-style: normal; font-weight: 700; }
.live-call-card.is-enabled { border-color: rgba(222, 190, 119, .52); }
.live-call-card.is-enabled .live-call-switch em { color: #e6cc8d; }

@media (max-width: 760px) {
    .live-call-card { padding: 15px 14px 12px; border-radius: 22px; }
    .live-call-title { align-items: flex-start; }
    .live-call-orb { width: 42px; height: 42px; }
    .live-call-heading h3 { font-size: .92rem; }
    .live-call-title small { display: none; }
    .live-call-switch em { display: none; }
    .live-call-editor { grid-template-columns: 1fr; gap: 14px; padding: 13px 0; }
    .live-call-appearance-option {
        grid-template-columns: 38px minmax(0, 1fr) 16px;
        min-height: 54px;
        padding: 7px;
    }
    .live-call-footer { align-items: flex-start; flex-direction: column; }
    .live-call-actions { width: 100%; justify-content: flex-start; }
}

@media (max-width: 430px) {
    .live-call-appearance-options { grid-template-columns: 1fr; }
    .live-call-footer .btn { flex: 1 1 auto; }
}

.scan-presence-card {
    position: absolute;
    z-index: 8;
    top: 22px;
    left: 50%;
    width: min(620px, calc(100% - 36px));
    display: grid;
    grid-template-columns: 54px 1fr;
    gap: 14px;
    align-items: start;
    transform: translate(-50%, -12px);
    padding: 14px 17px;
    border: 1px solid rgba(121, 230, 183, .55);
    border-radius: 24px 29px 22px 28px;
    opacity: 0;
    pointer-events: none;
    color: #f4fff9;
    background:
        linear-gradient(135deg, rgba(255,255,255,.15), transparent 42%),
        rgba(12, 35, 28, .88);
    box-shadow: 0 18px 42px rgba(0,0,0,.34), inset 0 1px 0 rgba(255,255,255,.2);
    backdrop-filter: blur(18px) saturate(1.2);
    transition: opacity .28s ease, transform .28s ease;
}
.scan-presence-card.active {
    transform: translate(-50%, 0);
    opacity: 1;
}
.scan-presence-card[hidden] { display: none; }
.scan-presence-pulse {
    position: relative;
    width: 50px;
    height: 50px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #102a21;
    background: linear-gradient(145deg, #99f0c8, #42ba86);
    box-shadow: 0 0 0 0 rgba(103, 222, 170, .46);
    animation: scan-presence-pulse 1.8s infinite;
}
.scan-presence-card strong,
.scan-presence-card span,
.scan-presence-card small { display: block; }
.scan-presence-card strong { font-size: 1rem; }
.scan-presence-card span { color: #9ee9c7; font-size: .8rem; margin-top: 2px; }
.scan-presence-card small { color: rgba(242,255,249,.72); line-height: 1.35; margin-top: 5px; }
@keyframes scan-presence-pulse {
    70% { box-shadow: 0 0 0 14px rgba(103, 222, 170, 0); }
    100% { box-shadow: 0 0 0 0 rgba(103, 222, 170, 0); }
}
