/* =====================================================================
 * studio.css — shared component styles (customer studio + admin console)
 * Plain CSS so it works with the Tailwind Play CDN or a compiled build.
 * ===================================================================== */
:where(:root) {   /* defaults — theme_head() (Brand settings) overrides them */
    --ink: #141f36;
    --muted: #64748b;
    --line: #e7e5ee;
    --brand: #ec4899; --brand-50: #fdf2f8; --brand-100: #fce7f3; --brand-200: #fbcfe8; --brand-400: #f472b6; --brand-600: #db2777; --brand-700: #be185d;
    --brand-rgb: 236, 72, 153; --accent: #8b5cf6; --accent-400: #a78bfa; --accent-rgb: 139, 92, 246;
    --rose: #e8487f;
    --rose-600: #d63a70;
    --rose-50: var(--brand-50);
    --lilac: #8b7cf6;
    --mint: #34c3a0;
    --cream: #fbf8f4;
    --radius: 14px;
}

html, body { height: 100%; }
body { font-family: 'Plus Jakarta Sans', system-ui, sans-serif; color: var(--ink); background: var(--cream); }
.font-display { font-family: 'Playfair Display', Georgia, serif; letter-spacing: -.01em; }
.font-script { font-family: 'Great Vibes', cursive; font-weight: 400; }
.font-mono, .tabular { font-family: 'JetBrains Mono', ui-monospace, monospace; font-variant-numeric: tabular-nums; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(100, 116, 139, .28); border-radius: 99px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- Buttons ---------- */
.btn-primary, .btn-soft, .btn-danger, .btn-ghost, .btn-dark, .btn-outline {
    display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
    font-weight: 600; font-size: .8125rem; line-height: 1; border-radius: 12px;
    padding: .7rem 1.05rem; transition: background .15s, box-shadow .15s, transform .05s, opacity .15s, color .15s;
    white-space: nowrap; cursor: pointer; border: 1px solid transparent; user-select: none;
}
.btn-primary { background: linear-gradient(135deg, var(--brand-400), var(--brand-600)); color: #fff; box-shadow: 0 6px 16px -6px rgba(var(--brand-rgb), .55); }
.btn-primary:hover { background: linear-gradient(135deg, #e94c84, #d2336b); }
.btn-dark { background: #141f36; color: #fff; }
.btn-dark:hover { background: #312d46; }
.btn-soft { background: #f3f1f7; color: #3f3a52; }
.btn-soft:hover { background: #e9e6f0; }
.btn-outline { background: #fff; color: #3f3a52; border-color: var(--line); }
.btn-outline:hover { border-color: #cfcbe0; background: #faf9fc; }
.btn-danger { background: #fff1f2; color: #e11d48; border-color: #fecdd3; }
.btn-danger:hover { background: #ffe4e6; }
.btn-ghost { background: transparent; color: var(--muted); padding: .55rem .7rem; }
.btn-ghost:hover { background: #f3f1f7; color: var(--ink); }
.btn-primary:active, .btn-soft:active, .btn-dark:active, .btn-outline:active { transform: translateY(1px); }
.btn-primary:disabled, .btn-dark:disabled, .btn-soft:disabled, .btn-outline:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.btn-sm { padding: .5rem .75rem; font-size: .75rem; border-radius: 10px; }
.btn-lg { padding: .9rem 1.4rem; font-size: .9rem; border-radius: 14px; }

.icon-btn {
    width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center;
    border-radius: 10px; color: #4b4662; transition: background .15s, color .15s; font-size: 17px;
}
.icon-btn:hover { background: #f1eff6; color: var(--ink); }
.icon-btn.is-on { background: var(--rose-50); color: var(--rose); }
.icon-btn:disabled { opacity: .35; cursor: not-allowed; background: transparent; }

/* ---------- Form fields ---------- */
.field {
    width: 100%; background: #fff; border: 1px solid var(--line); border-radius: 11px;
    padding: .62rem .8rem; font-size: .85rem; color: var(--ink); transition: border-color .15s, box-shadow .15s;
}
.field:focus { outline: none; border-color: var(--brand-200); box-shadow: 0 0 0 4px rgba(var(--brand-rgb), .12); }
.field[readonly] { background: #f8f7fb; color: var(--muted); }
.field.is-invalid { border-color: #f43f5e; box-shadow: 0 0 0 4px rgba(244, 63, 94, .1); }
.field.is-limit { border-color: #f59e0b; box-shadow: 0 0 0 4px rgba(245, 158, 11, .14); }
.field-label { display: block; font-size: .7rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #8a84a0; margin-bottom: .35rem; }
.field-unit { position: relative; }
.field-unit .field { padding-right: 2.4rem; }
.field-unit > span { position: absolute; right: .75rem; top: 50%; transform: translateY(-50%); font-size: .72rem; color: #a29db5; font-weight: 600; pointer-events: none; }
.field-error { font-size: .72rem; color: #e11d48; margin-top: .3rem; }

input[type=range].range { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 99px; background: #ebe8f2; outline: none; }
input[type=range].range::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 3px solid var(--rose); box-shadow: 0 2px 6px rgba(0, 0, 0, .15); cursor: pointer; }
input[type=range].range::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--rose); cursor: pointer; }

/* ---------- Cards / chips ---------- */
.panel { background: #fff; border: 1px solid var(--line); border-radius: 18px; }
.sub-card { background: #faf9fc; border: 1px solid #efedf4; border-radius: 14px; padding: .9rem; }
.chip {
    display: inline-flex; align-items: center; gap: .35rem; padding: .42rem .75rem; border-radius: 99px;
    font-size: .74rem; font-weight: 600; color: #57516b; background: #f4f2f8; border: 1px solid transparent; white-space: nowrap; transition: all .15s;
}
.chip:hover { background: #ebe8f2; }
.chip.is-active { background: var(--ink); color: #fff; }
.badge { display: inline-flex; align-items: center; gap: .25rem; padding: .18rem .5rem; border-radius: 99px; font-size: .66rem; font-weight: 700; }

.checker {
    background-color: #fff;
    background-image: linear-gradient(45deg, #f3f1f7 25%, transparent 25%), linear-gradient(-45deg, #f3f1f7 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #f3f1f7 75%), linear-gradient(-45deg, transparent 75%, #f3f1f7 75%);
    background-size: 14px 14px; background-position: 0 0, 0 7px, 7px -7px, -7px 0;
}

.sticker-card { cursor: grab; transition: transform .12s, box-shadow .15s, border-color .15s; }
.sticker-card:hover { transform: translateY(-2px); box-shadow: 0 10px 22px -12px rgba(30, 27, 46, .35); border-color: var(--brand-200); }
.sticker-card:active { cursor: grabbing; }

.wall-card.is-active { border-color: var(--rose); box-shadow: 0 0 0 3px rgba(var(--brand-rgb), .15); }
.sheet-row.is-active { border-color: var(--rose); background: var(--rose-50); }

.drop-target::after {
    content: 'Drop to place on the wall'; position: absolute; inset: 12px; border: 2px dashed var(--rose); border-radius: 18px;
    display: flex; align-items: center; justify-content: center; color: var(--rose); font-weight: 700; background: rgba(255, 241, 246, .4); pointer-events: none;
}

/* ---------- Stepper ---------- */
.step-pill { display: flex; align-items: center; gap: .5rem; padding: .45rem .85rem .45rem .5rem; border-radius: 12px; font-size: .78rem; font-weight: 600; color: #6b6580; }
.step-pill .num { width: 22px; height: 22px; border-radius: 99px; display: inline-flex; align-items: center; justify-content: center; font-size: .7rem; background: #ebe8f2; color: #57516b; }
.step-pill.is-active { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(30, 27, 46, .1); }
.step-pill.is-active .num { background: var(--rose); color: #fff; }
.step-pill.is-done .num { background: #d1fae5; color: #047857; }

/* ---------- OTP ---------- */
.otp-box { width: 48px; height: 58px; text-align: center; font-size: 1.5rem; font-weight: 700; border-radius: 14px; border: 1.5px solid var(--line); background: #fff; font-family: 'JetBrains Mono', monospace; }
.otp-box:focus { outline: none; border-color: var(--rose); box-shadow: 0 0 0 4px rgba(var(--brand-rgb), .14); }
@media (max-width: 380px) { .otp-box { width: 40px; height: 50px; } }

.gate-bg {
    background:
        radial-gradient(circle at 15% 15%, rgba(var(--accent-rgb), .16), transparent 34%),
        radial-gradient(circle at 85% 85%, rgba(var(--brand-rgb), .14), transparent 36%),
        radial-gradient(circle at 85% 10%, rgba(var(--brand-rgb), .07), transparent 28%),
        #f7f1e8;
}
.float-blob { position: absolute; border-radius: 999px; filter: blur(.3px); animation: floaty 9s ease-in-out infinite; }
@keyframes floaty { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-14px) rotate(6deg); } }

/* ---------- Toasts ---------- */
.toast { opacity: 0; transform: translateY(10px) scale(.98); transition: opacity .22s, transform .22s; }
.toast.toast-in { opacity: 1; transform: none; }

/* ---------- Modals ---------- */
.modal { position: fixed; inset: 0; z-index: 80; display: none; align-items: flex-start; justify-content: center; padding: 1rem; overflow-y: auto; background: rgba(30, 27, 46, .45); backdrop-filter: blur(4px); }
.modal.is-open { display: flex; }
.modal-card { background: #fff; border-radius: 24px; width: 100%; box-shadow: 0 30px 60px -20px rgba(30, 27, 46, .45); margin: auto 0; }

.radio-card { display: flex; gap: .7rem; align-items: flex-start; padding: .8rem .9rem; border: 1.5px solid var(--line); border-radius: 14px; cursor: pointer; transition: border-color .15s, background .15s; }
.radio-card:has(input:checked) { border-color: var(--rose); background: var(--rose-50); }
.radio-card input { accent-color: var(--rose); margin-top: 2px; }

.progress-track { height: 10px; border-radius: 99px; background: #f1eff6; overflow: hidden; }
.progress-bar { height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--brand-400), var(--accent-400)); transition: width .2s; }

.kbd { font-family: 'JetBrains Mono', monospace; font-size: .65rem; padding: .1rem .35rem; border-radius: 6px; background: #f1eff6; border: 1px solid #e3e0ea; color: #57516b; }

/* ---------- Admin ---------- */
.adm-nav a { display: flex; align-items: center; gap: .7rem; padding: .62rem .8rem; border-radius: 12px; font-size: .84rem; font-weight: 600; color: #cbc6dc; transition: background .15s, color .15s; }
.adm-nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.adm-nav a.is-active { background: rgba(var(--brand-rgb), .16); color: #fff; }
.adm-nav a.is-active i { color: var(--brand-400); }
/* Admin menu in categories (v3.2) */
.adm-nav-search { display: flex; align-items: center; gap: .5rem; margin: 0 0 .6rem; padding: .45rem .7rem; border-radius: 12px; background: rgba(255, 255, 255, .06); color: #8f89a8; }
.adm-nav-search input { flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; color: #fff; font-size: .8rem; }
.adm-nav-search input::placeholder { color: #8f89a8; }
.adm-nav-search:focus-within { background: rgba(255, 255, 255, .1); box-shadow: 0 0 0 2px rgba(var(--brand-rgb), .45); }
.adm-nav a.lvl-0 { margin-bottom: .35rem; }
.adm-nav-group { margin-top: .15rem; }
.adm-nav-group > summary { list-style: none; display: flex; align-items: center; gap: .6rem; padding: .55rem .8rem; border-radius: 12px; cursor: pointer; user-select: none;
    font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #8f89a8; transition: background .15s, color .15s; }
.adm-nav-group > summary::-webkit-details-marker { display: none; }
.adm-nav-group > summary:hover { background: rgba(255, 255, 255, .05); color: #fff; }
.adm-nav-group[open] > summary { color: #e9e6f3; }
.adm-nav-group > summary > i:first-child { font-size: 1rem; }
.adm-nav-caret { font-size: .7rem; transition: transform .2s; }
.adm-nav-group[open] .adm-nav-caret { transform: rotate(180deg); }
.adm-nav-dot { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--brand); color: #fff; font-size: 10px; display: grid; place-items: center; letter-spacing: 0; }
.adm-nav-group[open] .adm-nav-dot { display: none; }
.adm-nav-items { margin: .1rem 0 .45rem .9rem; padding-left: .55rem; border-left: 1px solid rgba(255, 255, 255, .08); display: flex; flex-direction: column; gap: 1px; }
.adm-nav-items a { padding: .5rem .7rem; font-size: .82rem; }
.adm-nav-items a.lvl-2 { padding-left: .9rem; }
.adm-nav-sub { padding: .55rem .7rem .2rem; font-size: .66rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #6f6988; }
.adm-nav-sections { display: flex; flex-direction: column; margin: .1rem 0 .3rem 1.6rem; }
.adm-nav .adm-nav-section { padding: .32rem .7rem; font-size: .76rem; font-weight: 500; color: #a9a3bf; border-radius: 9px; }
.adm-nav .adm-nav-section.is-on { color: #fff; background: rgba(255, 255, 255, .06); }
[id^="set-"] { scroll-margin-top: 84px; }
.adm-nav .is-filtered, .adm-nav-sections.hidden { display: none !important; }
.table { width: 100%; font-size: .82rem; border-collapse: separate; border-spacing: 0; }
.table th { text-align: left; font-size: .68rem; text-transform: uppercase; letter-spacing: .05em; color: #8a84a0; font-weight: 700; padding: .7rem .9rem; background: #faf9fc; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: .7rem .9rem; border-bottom: 1px solid #f1eff6; vertical-align: middle; }
.table tr:hover td { background: #fdfcfe; }
.table .field { padding: .42rem .5rem; font-size: .8rem; border-radius: 9px; }
.table .field-unit .field { padding-right: 2.9rem; }   /* keep room for the unit / currency (e.g. "Rs.", "USD") */
.table .field-unit > span { right: .6rem; }

.status-Pending { background: #fef3c7; color: #92400e; }
.status-In-Production { background: #dbeafe; color: #1e40af; }
.status-Completed { background: #d1fae5; color: #065f46; }
.status-Cancelled { background: #f1f5f9; color: #64748b; }

[x-cloak], .is-hidden { display: none !important; }

/* ---------- v2: guide pins, hints, tooltips ---------- */
.guide-pin {
    position: absolute; transform: translate(-50%, -50%); width: 26px; height: 26px; border-radius: 99px;
    background: var(--brand-600); color: #fff; font-weight: 700; font-size: 12px; display: inline-flex; align-items: center; justify-content: center;
    box-shadow: 0 0 0 4px rgba(var(--brand-rgb), .25), 0 4px 10px rgba(0, 0, 0, .2); cursor: help; z-index: 2;
}
.guide-pin.\!static { position: static; transform: none; box-shadow: none; width: 22px; height: 22px; font-size: 11px; }
.hint { display: flex; gap: .4rem; align-items: flex-start; font-size: .72rem; line-height: 1.35; color: #8a84a0; margin-top: .35rem; }
.hint i { color: #f59e0b; margin-top: 1px; }
[data-tip] { position: relative; }
[data-tip]:hover::after, [data-tip]:focus-visible::after {
    content: attr(data-tip); position: absolute; left: 50%; top: calc(100% + 8px); transform: translateX(-50%);
    background: #141f36; color: #fff; font-size: 11px; font-weight: 500; line-height: 1.35; padding: 6px 9px; border-radius: 8px;
    width: max-content; max-width: 220px; white-space: normal; text-align: left; z-index: 60; pointer-events: none;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .18);
}
.step-card { position: relative; }
.step-num { width: 44px; height: 44px; border-radius: 16px; display: grid; place-items: center; font-family: 'Playfair Display', Georgia, serif; font-weight: 700; font-size: 1.25rem; color: #fff; }
.timeline-dot { width: 12px; height: 12px; border-radius: 99px; border: 3px solid #fff; box-shadow: 0 0 0 2px var(--brand-600); background: var(--brand-600); }
.pw-toggle { position: absolute; right: .55rem; top: 50%; transform: translateY(-50%); color: #a29db5; }
.status-Pending-Review { background: #e0f2fe; color: #075985; }
.status-Quotation-Sent { background: #fef3c7; color: #92400e; }
.status-Changes-Proposed { background: #ede9fe; color: #5b21b6; }
.status-Confirmed { background: #ede9fe; color: #5b21b6; }
.status-Shipped { background: #ccfbf1; color: #115e59; }
.status-Production-Completed { background: #e0e7ff; color: #3730a3; }
.status-Ready-for-Collection { background: #fce7f3; color: #9d174d; }
.status-In-Cart { background: #fdf2f8; color: #be185d; }
.status-Expired { background: #f1f5f9; color: #64748b; }

/* Sticker artwork protection: no long-press "save image" on mobile, no drag-out */
#app img { -webkit-touch-callout: none; -webkit-user-drag: none; user-select: none; }

/* ---------- Text tool ---------- */
.swatch-btn { width: 34px; height: 34px; border-radius: 10px; border: 2px solid #fff; box-shadow: 0 0 0 1px #d9d5e3; background: var(--brand-600); cursor: pointer; flex-shrink: 0; transition: transform .1s; }
.swatch-btn:hover { transform: scale(1.06); }
.swatch-btn.swatch-sm { width: 22px; height: 22px; border-radius: 7px; }
.cp-sw { aspect-ratio: 1; border-radius: 5px; cursor: pointer; border: 1px solid rgba(0,0,0,.06); }
.cp-sw:hover { transform: scale(1.25); box-shadow: 0 2px 6px rgba(0,0,0,.25); position: relative; z-index: 1; }
.cp-sw.is-on { outline: 2px solid #141f36; outline-offset: 1px; }
.fx-row { border-top: 1px solid #efedf4; padding-top: .6rem; }
.fx-row .fx-body { display: none; padding-top: .5rem; }
.fx-row.is-on .fx-body { display: grid; gap: .4rem; }
.font-item { width: 100%; text-align: left; padding: .45rem .6rem; border-radius: 9px; display: flex; align-items: center; gap: .5rem; }
.font-item:hover { background: #f6f4fa; }
.font-item.is-on { background: var(--brand-50); box-shadow: inset 0 0 0 1px var(--brand-200); }
.preset-card { border: 1px solid #ece9f2; border-radius: 14px; background: #fff; padding: .4rem; display: grid; place-items: center; min-height: 70px; transition: box-shadow .15s, transform .1s; }
.preset-card:hover { box-shadow: 0 8px 18px -10px rgba(30,27,46,.4); transform: translateY(-1px); }
.preset-card canvas { max-width: 100%; height: auto; }
.t-align.is-on, #t-bold.is-on, #t-italic.is-on { background: var(--brand-50); color: var(--brand-600); border-color: var(--brand-200); }
.t-filltype.is-on { background: #141f36; color: #fff; }

/* Ready-made designs (v2.5) */
.chip-designs { background: linear-gradient(135deg, #ffe4ef, #ede9fe); color: #9d174d; }
.chip-designs.is-active { background: linear-gradient(135deg, var(--brand), var(--accent)); color: #fff; }
.design-card { transition: border-color .15s, box-shadow .15s, transform .15s; }
.design-card:hover { box-shadow: 0 8px 24px -12px rgba(var(--brand-rgb), .45); transform: translateY(-1px); }
/* Admin building a ready-made design: no print sheets / ordering */
body.template-mode .step-pill[data-step="2"], body.template-mode .step-pill[data-step="3"], body.template-mode #btn-proceed, body.template-mode #btn-new-design { display: none !important; }

/* Shapes tab (v2.6) */
.shape-btn { display: flex; flex-direction: column; align-items: center; gap: .15rem; padding: .45rem .25rem .4rem; border-radius: 14px; border: 1px solid var(--line); background: #fff; font-size: .68rem; font-weight: 600; color: #5b5670; transition: border-color .15s, box-shadow .15s; }
.shape-btn canvas { width: 64px; height: 48px; }
.shape-btn:hover { border-color: #f5a9c6; }
.shape-btn.is-on { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(var(--brand-rgb), .15); color: var(--brand-700); }

/* ---------- Your own wall photo: crop box ---------- */
#wu-stage { position: relative; margin: 0 auto; touch-action: none; user-select: none; overflow: hidden; border-radius: 12px; background: #0f172a; }
#wu-stage img { width: 100%; height: 100%; display: block; pointer-events: none; }
#wu-box { position: absolute; cursor: move; outline: 2px solid #fff; box-shadow: 0 0 0 9999px rgba(15, 23, 42, .55); }
#wu-box::before, #wu-box::after { content: ""; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(90deg, transparent calc(33.3% - .5px), rgba(255,255,255,.45) 33.3%, transparent calc(33.3% + .5px), transparent calc(66.6% - .5px), rgba(255,255,255,.45) 66.6%, transparent calc(66.6% + .5px)); }
#wu-box::after { background: linear-gradient(180deg, transparent calc(33.3% - .5px), rgba(255,255,255,.45) 33.3%, transparent calc(33.3% + .5px), transparent calc(66.6% - .5px), rgba(255,255,255,.45) 66.6%, transparent calc(66.6% + .5px)); }
#wu-box [data-corner] { position: absolute; width: 18px; height: 18px; background: #fff; border: 2px solid var(--brand); border-radius: 50%; }
#wu-box [data-corner="nw"] { left: -3px; top: -3px; cursor: nwse-resize; }
#wu-box [data-corner="ne"] { right: -3px; top: -3px; cursor: nesw-resize; }
#wu-box [data-corner="se"] { right: -3px; bottom: -3px; cursor: nwse-resize; }
#wu-box [data-corner="sw"] { left: -3px; bottom: -3px; cursor: nesw-resize; }
.wall-card .wall-del { opacity: .85; }
.wall-card:hover .wall-del { opacity: 1; }

/* ---------- Reviewing the team's proposed changes (view only) ---------- */
.review-mode #view-wall > aside { pointer-events: none; opacity: .5; }
.review-mode .step-pill[data-step="2"], .review-mode .step-pill[data-step="3"], .review-mode #btn-proceed,
.review-mode #w-undo, .review-mode #w-redo, .review-mode #w-addtext, .review-mode #w-group, .review-mode #w-ungroup,
.review-mode #w-slice, .review-mode #w-clear { display: none !important; }

/* Order images in My account: small watermarked copies; no long-press save / drag-out */
img[draggable="false"] { -webkit-touch-callout: none; -webkit-user-drag: none; user-select: none; }

/* ======================= Start your design (v3.2) ======================= */
/* Guide face (includes/customer_ui.php guide_avatar_svg) */
.guide-av { display: block; overflow: visible; }
.guide-av .g-head { animation: g-bob 3.4s ease-in-out infinite; transform-origin: 60px 100px; }
.guide-av .g-eye { transform-box: fill-box; transform-origin: center; animation: g-blink 4.6s infinite; }
.guide-av .g-spark { transform-box: fill-box; transform-origin: center; animation: g-twinkle 2.2s ease-in-out infinite; }
.is-talking .guide-av .g-mouth, .guide-av.is-talking .g-mouth { transform-box: fill-box; transform-origin: center top; animation: g-talk .22s ease-in-out infinite alternate; }
@keyframes g-bob { 0%, 100% { transform: translateY(0) rotate(0); } 30% { transform: translateY(-1.6px) rotate(-2deg); } 65% { transform: translateY(.6px) rotate(1.6deg); } }
@keyframes g-blink { 0%, 90%, 100% { transform: scaleY(1); } 93% { transform: scaleY(.08); } 96% { transform: scaleY(1); } }
@keyframes g-twinkle { 0%, 100% { transform: scale(.6) rotate(0); opacity: .5; } 50% { transform: scale(1.15) rotate(45deg); opacity: 1; } }
@keyframes g-talk { from { transform: scaleY(.55); } to { transform: scaleY(1.25); } }
@media (prefers-reduced-motion: reduce) { .guide-av *, .tour-card, .tour-spot, .dc-card { animation: none !important; transition: none !important; } }

/* "Start your design" menu */
.sd-btn { display: inline-flex; align-items: center; gap: .4rem; padding: .55rem .9rem; border-radius: 14px; font-size: .875rem; font-weight: 700; color: #fff;
    background: linear-gradient(135deg, var(--brand-400), var(--brand-600)); box-shadow: 0 6px 16px -6px rgba(var(--brand-rgb), .55); transition: transform .15s, box-shadow .15s; white-space: nowrap; }
.sd-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 22px -8px rgba(var(--brand-rgb), .6); }
.sd-panel { position: absolute; right: 0; top: 100%; padding-top: .5rem; z-index: 60; opacity: 0; visibility: hidden; transform: translateY(4px); transition: opacity .15s, transform .15s, visibility .15s; }
.sd-menu.is-open .sd-panel { opacity: 1; visibility: visible; transform: none; }
@media (hover: hover) { .sd-menu:hover .sd-panel, .sd-menu:focus-within .sd-panel { opacity: 1; visibility: visible; transform: none; } }

/* The chooser dialog */
.dc-modal { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.dc-modal[hidden] { display: none; }
.dc-backdrop { position: absolute; inset: 0; background: rgba(30, 27, 46, .5); backdrop-filter: blur(6px); opacity: 0; transition: opacity .25s; }
.dc-card { position: relative; width: 100%; max-width: 980px; max-height: calc(100vh - 2rem); overflow: hidden; display: grid; grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); background: #fff; border-radius: 28px;
    box-shadow: 0 40px 80px -30px rgba(30, 27, 46, .55); opacity: 0; transform: translateY(16px) scale(.98); transition: opacity .25s, transform .3s cubic-bezier(.2, .9, .3, 1.2); }
.dc-modal.is-open .dc-backdrop { opacity: 1; }
.dc-modal.is-open .dc-card { opacity: 1; transform: none; }
@media (min-width: 768px) { .dc-card { grid-template-columns: 1.05fr 1fr; grid-template-rows: none; min-height: 560px; } }
.dc-visual { position: relative; min-height: 170px; background: linear-gradient(135deg, var(--brand-100), #ede9fe); overflow: hidden; }
.dc-visual img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.06); transition: opacity .5s, transform 1.2s ease; }
.dc-visual img.is-on { opacity: 1; transform: scale(1); }
.dc-visual img.is-dim { opacity: .35; filter: saturate(.7) blur(1px); transform: scale(1.02); }
.dc-visual-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15, 23, 42, 0) 50%, rgba(15, 23, 42, .6)); pointer-events: none; }
.dc-visual-caption { position: absolute; left: 1.25rem; right: 1.25rem; bottom: 1.1rem; color: #fff; display: flex; flex-direction: column; gap: .35rem; align-items: flex-start; }
.dc-visual-caption strong { font-family: 'Playfair Display', Georgia, serif; font-weight: 600; font-size: 1.35rem; line-height: 1.15; text-shadow: 0 2px 10px rgba(0, 0, 0, .3); }
.dc-sample-chip { font-size: .7rem; font-weight: 700; background: rgba(255, 255, 255, .92); color: var(--brand-700); padding: .2rem .55rem; border-radius: 999px; }
.dc-body { position: relative; display: flex; flex-direction: column; padding: 1.5rem 1.25rem 1.25rem; overflow-y: auto; }
@media (min-width: 640px) { .dc-body { padding: 2.25rem 2.25rem 2rem; } }
.dc-x { position: absolute; top: .9rem; right: .9rem; width: 2.25rem; height: 2.25rem; border-radius: 12px; display: grid; place-items: center; color: #64748b; }
.dc-x:hover { background: #f1f5f9; color: #0f172a; }
.dc-avatar { width: 64px; height: 64px; flex-shrink: 0; filter: drop-shadow(0 6px 10px rgba(var(--brand-rgb), .25)); }
.dc-option { width: 100%; display: flex; align-items: center; gap: .85rem; padding: .9rem 1rem; border-radius: 20px; border: 2px solid #ece9f2; background: #fff; text-align: left;
    transition: border-color .15s, box-shadow .2s, transform .15s, background .2s; }
.dc-option:hover { border-color: var(--brand-200); transform: translateY(-1px); box-shadow: 0 10px 24px -14px rgba(var(--brand-rgb), .45); }
.dc-option[aria-checked="true"] { border-color: var(--brand); background: linear-gradient(135deg, #fff, var(--brand-50)); box-shadow: 0 0 0 4px rgba(var(--brand-rgb), .12); }
.dc-num { font-family: 'JetBrains Mono', monospace; font-size: .7rem; font-weight: 600; color: #94a3b8; }
.dc-icon { width: 3rem; height: 3rem; flex-shrink: 0; border-radius: 16px; display: grid; place-items: center; color: #fff; font-size: 1.45rem; box-shadow: 0 8px 16px -8px rgba(30, 27, 46, .4); }
.dc-check { width: 1.6rem; height: 1.6rem; flex-shrink: 0; border-radius: 999px; border: 2px solid #e2e8f0; display: grid; place-items: center; color: transparent; font-size: .8rem; transition: all .15s; }
.dc-option[aria-checked="true"] .dc-check { background: var(--brand); border-color: var(--brand); color: #fff; }
.dc-foot { position: sticky; bottom: -1.25rem; margin-bottom: -1.25rem; padding-bottom: 1.25rem; background: linear-gradient(180deg, rgba(255,255,255,0), #fff 30%); }
@media (min-width: 640px) { .dc-foot { bottom: -2rem; margin-bottom: -2rem; padding-bottom: 2rem; } }
@media (max-width: 767px) { .dc-visual { min-height: 140px; } .dc-option { padding: .75rem .8rem; gap: .65rem; } .dc-icon { width: 2.6rem; height: 2.6rem; font-size: 1.25rem; } }
.dc-open { transition: opacity .2s, transform .25s; }
.dc-open:disabled { opacity: 0; transform: translateX(10px); pointer-events: none; }

/* ======================= Studio guided tour (v3.2) ======================= */
.tour-root { position: fixed; inset: 0; z-index: 150; pointer-events: none; }
.tour-shade { position: absolute; inset: 0; background: rgba(15, 23, 42, .5); opacity: 0; transition: opacity .3s; pointer-events: auto; }
.tour-root.has-spot .tour-shade { background: transparent; }
.tour-root.is-on .tour-shade { opacity: 1; }
.tour-spot { position: absolute; border-radius: 16px; pointer-events: none; box-shadow: 0 0 0 9999px rgba(15, 23, 42, .5), 0 0 0 3px rgba(255, 255, 255, .95), 0 0 0 7px rgba(var(--brand-rgb), .55);
    transition: top .45s cubic-bezier(.2, .8, .2, 1), left .45s cubic-bezier(.2, .8, .2, 1), width .45s cubic-bezier(.2, .8, .2, 1), height .45s cubic-bezier(.2, .8, .2, 1), opacity .25s; opacity: 0; }
.tour-root.has-spot .tour-spot { opacity: 1; animation: tour-pulse 2s ease-in-out infinite; }
@keyframes tour-pulse { 50% { box-shadow: 0 0 0 9999px rgba(15, 23, 42, .5), 0 0 0 3px rgba(255, 255, 255, .95), 0 0 0 12px rgba(var(--brand-rgb), .28); } }
.tour-card { position: absolute; width: 360px; max-width: calc(100vw - 24px); pointer-events: auto; background: #fff; border-radius: 24px; padding: 1.1rem 1.15rem 1rem;
    box-shadow: 0 30px 60px -20px rgba(30, 27, 46, .5), 0 0 0 1px rgba(30, 27, 46, .04);
    transition: top .45s cubic-bezier(.2, .8, .2, 1), left .45s cubic-bezier(.2, .8, .2, 1), opacity .25s, transform .25s; opacity: 0; transform: translateY(8px); }
.tour-root.is-on .tour-card { opacity: 1; transform: none; }
.tour-card .tour-av { width: 72px; height: 72px; flex-shrink: 0; margin-top: -2.4rem; filter: drop-shadow(0 8px 12px rgba(var(--brand-rgb), .3)); }
.tour-card h3 { font-family: 'Playfair Display', Georgia, serif; font-weight: 600; font-size: 1.15rem; line-height: 1.2; color: #141f36; }
.tour-text { font-size: .86rem; line-height: 1.55; color: #475569; }
.tour-text strong { color: #141f36; }
.tour-text.is-in { animation: tour-in .35s ease; }
@keyframes tour-in { from { opacity: 0; transform: translateY(4px); } }
.tour-dots { display: flex; gap: 4px; flex-wrap: wrap; }
.tour-dots span { width: 6px; height: 6px; border-radius: 99px; background: #e2e8f0; transition: all .25s; }
.tour-dots span.is-on { width: 18px; background: var(--brand); }
.tour-dots span.is-done { background: var(--brand-200); }
.tour-fab { position: fixed; z-index: 70; left: 14px; bottom: 14px; display: flex; align-items: center; gap: .45rem; padding: .25rem .85rem .25rem .25rem; border-radius: 999px; background: #fff;
    box-shadow: 0 12px 28px -12px rgba(30, 27, 46, .45), 0 0 0 1px rgba(30, 27, 46, .06); font-size: .78rem; font-weight: 700; color: #3f3a52; transition: transform .15s, color .15s; }
.tour-fab:hover { transform: translateY(-2px); color: var(--brand-600); }
.tour-fab .guide-av { width: 36px; height: 36px; }

/* Studio header: the guide button */
.tour-hdr { display: inline-flex; align-items: center; gap: .35rem; padding: .15rem; border-radius: 999px; font-size: .78rem; font-weight: 700; color: #5b5670; background: var(--brand-50); border: 1px solid var(--brand-100); transition: background .15s, color .15s; }
.tour-hdr:hover { background: var(--brand-100); color: var(--brand-700); }
.tour-hdr-av { width: 30px; height: 30px; display: block; }
.tour-hdr .tour-hdr-label { display: none; }
@media (min-width: 1536px) { .tour-hdr .tour-hdr-label { display: inline; padding-right: .45rem; } }
