:root { --radius-l: 20px; --radius-m: 12px; --text-3: #a4a29b; }
:where(a, button, input, select, textarea, [tabindex]):focus-visible { outline: 2px solid #e6c880; outline-offset: 3px; }
html { scroll-padding-top: 84px; }
body { line-height: 1.5; }
.theme-toggle { display: inline-grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px; border: 1px solid var(--line-strong); border-radius: 50%; background: var(--bg-2); color: var(--text-1); font: 22px/1 system-ui; cursor: pointer; }
.editor-product-summary { max-width: 600px; font-size: 12px !important; }
.editor-product-summary span { color: var(--gold); }
.card-starter > h2 { margin-top: 10px; }
.card-starter .field small { color: var(--text-3); font-weight: 400; }
.starter-more { margin: 18px 0; }
.starter-more summary { cursor: pointer; padding: 10px 0; min-height: 44px; color: var(--text-2); font-size: 13px; }
.starter-more[open] .form-grid { margin-top: 12px; }
#starterGenerate { min-height: 50px; gap: 18px; }
.starter-privacy { font-size: 11px; color: var(--text-3); line-height: 1.6; max-width: 440px; }
.starter-status { margin: 18px 0; font-size: 13px; color: var(--text-2); line-height: 1.6; }
.starter-results { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin: 24px 0; }
.starter-results[hidden], #starterContinue[hidden] { display: none; }
.starter-option { min-width: 0; padding: 12px; background: var(--bg-0); border: 1px solid var(--line-strong); border-radius: 16px; }
.starter-option:has([aria-pressed="true"]) { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.starter-artwork { position: relative; padding-bottom: 35px; }
.starter-artwork > img { display: block; width: 100%; aspect-ratio: 85 / 55; border-radius: 5px; box-shadow: 0 6px 14px #0002; }
.starter-artwork > .starter-back { position: absolute; width: 55%; right: 0; bottom: 0; border: 1px solid #8885; }
.starter-option h3 { font-size: 16px; margin: 16px 0 5px; }
.starter-option p { min-height: 36px; margin: 0 0 12px; font-size: 11px; line-height: 1.5; color: var(--text-2); }
.starter-option .btn { width: 100%; min-height: 46px; justify-content: center; padding: 8px; font-size: 12px; }
.starter-option .btn[aria-pressed="true"] { background: var(--gold); color: var(--bg-0); }
.artwork-tools > .panel { padding-top: 10px; }
.advanced-options { margin: 18px 0; border: 1px solid var(--line-strong); border-radius: 16px; padding: 0 18px 12px; background: var(--bg-1); }
.advanced-options:not([open]) { padding-bottom: 0; }
.advanced-options summary { cursor: pointer; padding: 18px 0; min-height: 56px; color: var(--text-1); }
.advanced-options summary strong { font-size: 14px; }
.advanced-options summary small { display: block; margin: 5px 0 0 16px; color: var(--text-2); font-size: 12px; line-height: 1.5; }
.advanced-options > .panel { margin: 0; padding: 12px 0; border: 0; background: transparent; box-shadow: none; }
/* The legacy plugin positioned a zero-width editor against the viewport. */
.colorPallette .emoji-wrap { min-width: 150px; max-width: 100%; }
.emoji-wrap .emojionearea.emojionearea-inline { position: relative; inset: auto; width: 100%; height: 44px; }
.emoji-wrap .emojionearea.emojionearea-inline > .emojionearea-editor { left: 0; right: 38px; height: 42px; }
.emoji-wrap .emojionearea.emojionearea-inline > .emojionearea-button { top: 9px; right: 9px; }
.emoji-wrap .emojionearea .emojionearea-picker { max-width: min(316px, calc(100vw - 68px)); }
button, a { -webkit-tap-highlight-color: transparent; }
.topbar { height: 68px; padding: 12px 28px; }
.topbar .brand img { width: 23px; }
.topbar .menu a { min-height: 44px; }
.buy-layout { grid-template-rows: auto 1fr; gap: 22px 28px; }
.editor-intro { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.editor-eyebrow { display: block; color: var(--gold); font-size: 10px; letter-spacing: .18em; font-weight: 600; }
.editor-intro h1 { margin: 5px 0; font-size: 36px; letter-spacing: -1px; line-height: 1.1; }
.editor-intro h1 em { color: var(--gold-light); font-style: normal; }
.editor-intro p { margin: 8px 0 0; color: var(--text-2); font-size: 14px; }
.editor-save-status { max-width: 340px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; font-size: 12px !important; }
.editor-save-status[data-state="error"] { color: #ffc4a6; border-color: #e69f6844; }
.editor-step-status { color: var(--text-2); margin: 0 0 12px; font-size: 13px; }
.preview-collapse { display: none; }
.preview-pane { top: 86px; }
.wizard-pane { min-width: 0; scroll-margin-top: 84px; }
.steps-nav { margin-bottom: 20px; }
.step-chip { min-height: 48px; }
.panel h2 { font-size: 21px; }
.panel .sub { font-size: 14px; line-height: 1.6; }
.wizard-nav .btn { min-height: 48px; }
.print-approval { display: flex; gap: 12px; align-items: flex-start; padding: 16px; margin-top: 20px; border: 1px solid var(--line-strong); border-radius: 12px; color: var(--text-2); font-size: 14px; cursor: pointer; }
.print-approval input { width: 20px; height: 20px; flex: 0 0 20px; accent-color: var(--gold); }
.checkout-availability { color: var(--text-2); font-size: 13px; margin-top: 14px; }
#payment-message:not(.hidden) { padding: 14px; margin-top: 12px; background: #e69f6810; border: 1px solid #e69f6844; border-radius: 12px; color: #ffccad; }
.reality-toggle { cursor: pointer; }
#toast-root { width: min(420px, calc(100% - 32px)); }
#toast-root .toast { width: 100%; border-radius: 12px; padding: 14px 18px; font-size: 13px; text-align: left; }
.print-proof-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 20px 0; }
.print-proof-grid[hidden] { display: none; }
.print-proof-grid figure { margin: 0; min-width: 0; }
.print-proof-grid img { width: 100%; border-radius: 8px; border: 1px solid var(--line); }
.print-proof-grid figcaption { font-size: 12px; color: var(--text-2); padding-top: 6px; }
.studio-brand, .studio-actions { display: none; }
.has-draft-banner .buy-layout { padding-top: 94px; }
.draft-claim-banner { position: relative; top: auto; left: auto; transform: none; margin: 82px auto -70px; box-shadow: none; border-radius: 12px; }
.quick-save-fab { z-index: 700; }
@media (max-width: 1080px) {
    .buy-layout { padding: 88px 20px 32px; gap: 18px; }
    .preview-pane { position: relative; top: 0; height: 280px; min-height: 0; z-index: 1; }
    .preview-collapse { display: flex; justify-content: space-between; align-items: center; position: absolute; inset: 0 0 auto; z-index: 12; height: 42px; padding: 0 16px; width: 100%; border: 0; background: var(--bg-2); color: var(--text-1); font: 500 12px Outfit, sans-serif; cursor: pointer; }
    #previewCollapseLabel { color: var(--gold-light); }
    #cardSimulation { top: 42px; bottom: 68px; }
    .preview-pane.is-collapsed { height: 44px; }
    .preview-pane.is-collapsed #cardSimulation, .preview-pane.is-collapsed .preview-toolbar, .preview-pane.is-collapsed .preview-hint { visibility: hidden; }
    .preview-hint { top: 50px; }
    .steps-nav { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; padding: 6px; background: var(--bg-1); border: 1px solid var(--line); border-radius: 14px; }
    .steps-nav .connector { display: none; }
    .steps-nav .step-chip { display: flex; flex-direction: column; justify-content: center; gap: 5px; min-width: 0; padding: 8px 2px; border-radius: 9px; }
    .steps-nav .step-chip.active { background: #c5a05918; }
    .steps-nav .step-chip .dot { width: 24px; height: 24px; font-size: 12px; }
    .steps-nav .step-chip .lbl { display: block; font-size: 10px; }
    .steps-nav .step-chip .dot .material-icons { font-size: 16px; }
    .wizard-pane { scroll-margin-top: 80px; }
    .wizard-step.active > .wizard-nav:last-child { position: sticky; bottom: 0; z-index: 15; margin-top: 16px; padding: 12px 0 max(12px, env(safe-area-inset-bottom)); background: var(--bg-0); border-top: 1px solid var(--line); }
    .wizard-step.active > .wizard-nav:last-child .wizard-next { flex: 1; }
    .draft-claim-banner { margin: 80px 20px -70px; width: calc(100% - 40px); padding: 12px; grid-template-columns: minmax(0, 1fr) auto; }
    .draft-claim-banner > div:nth-child(2) { grid-column: 1; }
    .draft-claim-banner .draft-claim-icon, .draft-claim-banner code, .draft-new-link { display: none; }
    #draftClaimDismiss { grid-column: 2; width: 36px; height: 36px; }
    .draft-claim-banner .btn { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
    html { scroll-padding-top: 80px; }
    body { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
    .topbar .brand { display: none; }
    .studio-brand { display: flex; gap: 10px; align-items: center; color: var(--text-1); text-decoration: none; font-size: 15px; font-weight: 600; }
    .studio-brand small { display: block; font-size: 9px; color: var(--text-3); font-weight: 400; letter-spacing: .02em; }
    .studio-logo { display: grid; place-items: center; width: 36px; height: 36px; background: linear-gradient(145deg, #e4c47e, #9d7632); color: #16120a; border-radius: 11px; font-size: 21px; font-weight: 600; }
    .studio-actions { display: flex; position: fixed; inset: auto 0 0; z-index: 800; gap: 12px; align-items: center; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line-strong); background: #111218f5; backdrop-filter: blur(18px); }
    .studio-actions .btn { margin-left: auto; min-height: 48px; font-size: 14px; padding: 12px 22px; border-radius: 14px; box-shadow: 0 4px 18px #c5a05918; }
    .studio-back { width: 44px; height: 44px; display: grid; place-items: center; background: var(--bg-2); border: 1px solid var(--line); border-radius: 13px; color: var(--text-1); }
    .studio-back:disabled { opacity: .3; }
    .studio-action-context { min-width: 0; }
    .studio-action-context small { display: block; color: var(--text-3); font-size: 8px; letter-spacing: .12em; }
    .studio-action-context strong { display: block; font-size: 11px; color: var(--text-2); font-weight: 500; }
    .wizard-step.active > .wizard-nav:last-child { display: none; }
    .quick-save-fab { display: none; }
    #toast-root { bottom: calc(92px + env(safe-area-inset-bottom)); }
    .topbar { padding-inline: 18px; height: 64px; }
    .topbar .brand { gap: 7px; }
    .topbar .brand strong { font-size: 12px; }
    .topbar .brand img { width: 22px; }
    .topbar .menu { gap: 12px; }
    .topbar .menu a[data-account-link] { display: none; }
    .topbar .menu a span { display: none; }
    .topbar .menu a { font-size: 12px; }
    .topbar .menu a:first-child { display: none; }
    .buy-layout { padding: 84px 16px 24px; }
    .editor-intro { display: block; }
    .editor-intro h1 { font-size: 31px; }
    .editor-intro p { font-size: 13px; }
    .editor-save-status { max-width: none; padding: 8px 10px; }
    .preview-pane { height: 280px; border-radius: 16px; }
    .preview-toolbar { left: 10px; right: 10px; bottom: 10px; padding: 6px 8px; gap: 8px; flex-wrap: nowrap; }
    .preview-toolbar .icon-btn { width: 44px; height: 44px; }
    .preview-toolbar .reelBtn { display: none; }
    .reality-toggle { min-width: 0; }
    .reality-toggle span { font-size: 12px; padding: 8px 10px; }
    .panel { padding: 18px 16px; border-radius: 16px; }
    .panel h2 { font-size: 19px; gap: 8px; }
    .panel .sub { font-size: 13px; }
    .print-side-tab { min-height: 44px; padding: 10px; font-size: 13px; }
    .single-side-dropzone { min-height: 106px; }
    .single-side-dropzone .dz-inner { padding: 16px; }
    .dropzone .dz-inner > .material-icons { font-size: 25px; }
    .field input, .field select, .field textarea { font-size: 16px; min-height: 46px; }
    .form-grid { gap: 16px; }
    .fx-chip, .target-points-toggle, .info-btn { min-height: 44px; }
    .info-btn { min-width: 44px; }
    .side-analysis-head { flex-wrap: wrap; }
    .target-card-frame { max-width: 100%; }
    .wizard-nav { gap: 10px; }
    .wizard-nav .btn { font-size: 13px; padding: 12px 16px; }
    .site-footer { padding: 28px 20px 90px; }
    .quick-save-fab { bottom: 12px; right: 16px; min-height: 44px; font-size: 12px; }
    .preview-flex { flex-wrap: wrap; }
    .print-proof-grid { grid-template-columns: 1fr; }
    .previewCardCard .wizard-nav { flex-wrap: wrap; }
    .previewCardCard .wizard-nav .btn { flex: 1 1 150px; }
}

/* App chrome only: the selected card artwork and digital colour scheme stay untouched. */
:root[data-theme="light"] {
    --bg-0: #f7f5ee; --bg-1: #ffffff; --bg-2: #efeee6; --bg-3: #e4e6dc;
    --glass: rgba(36, 57, 44, .025); --glass-strong: rgba(36, 57, 44, .045);
    --line: rgba(31, 49, 39, .12); --line-strong: rgba(31, 49, 39, .23);
    --gold: #7a5a20; --gold-light: #6d501b; --gold-glow: rgba(147, 112, 43, .12);
    --text-1: #1c2d25; --text-2: #536258; --text-3: #657267;
    --danger: #b33535; --success: #247450;
    --shadow-1: 0 8px 30px rgba(32, 48, 37, .07);
}
:root[data-theme="light"] body { background: radial-gradient(ellipse at 85% 0, #e6ebdd, transparent 45%), var(--bg-0); }
:root[data-theme="light"] .topbar,
:root[data-theme="light"] .studio-actions,
:root[data-theme="light"] .preview-toolbar { background: rgba(250, 249, 244, .96); }
:root[data-theme="light"] .brand img { filter: none; }
:root[data-theme="light"] .panel { background: #ffffff; }
:root[data-theme="light"] .advanced-options > .panel { background: transparent; }
:root[data-theme="light"] .btn.primary,
:root[data-theme="light"] .steps-nav .step-chip.active .dot,
:root[data-theme="light"] .reality-toggle .thumb { background: linear-gradient(135deg, #ead199, #caa45d); color: #263021; }
:root[data-theme="light"] .editor-save-status[data-state="error"],
:root[data-theme="light"] #payment-message:not(.hidden) { color: #8e431e; border-color: #bb703f66; background: #fff7ec; }
:root[data-theme="light"] #toast-root .toast,
:root[data-theme="light"] .swal2-popup { background: #fffef9; color: var(--text-1); border: 1px solid var(--line-strong); }
:root[data-theme="light"] .draft-claim-banner { background: #f1f3e8; color: var(--text-1); }
:root[data-theme="light"] .live-call-config,
:root[data-theme="light"] .live-call-card { background: #f1efe7; color: var(--text-1); }
:root[data-theme="light"] .previewCardCard { background: #ffffff; }
