/* Booking Shop Creation · portal styles. Tokens first, then shell, form, preview, library, overlays, responsive. */
:root { --app:#f4f5fa; --surface:#fff; --surface-2:#f3f4f9; --surface-3:#eceef6; --brand:#5147ce; --brand-2:#6c5ff0; --brand-wash:#efedff; --brand-soft:#d9d4fd; --on-brand:#fff; --t-strong:#1c1f33; --t-moderate:#5f6479; --t-subtle:#8a8fa5; --border:#dfe2ec; --border-2:#eaecf3; --danger:#c8364a; --danger-wash:#fdecee; --ok:#178a54; --ok-wash:#e4f5ec; --warn:#9a6212; --warn-wash:#fdf3e2; --shadow-sm:0 1px 2px #1417280d; --shadow:0 1px 2px #1417280a,0 8px 24px #1417280d; --shadow-lg:0 28px 80px #1417282e; --f:'IBM Plex Sans',system-ui,sans-serif; --m:'IBM Plex Mono',ui-monospace,monospace; --r:14px; --r-sm:10px; color-scheme:light; }
:root[data-theme=dark] { --app:#11131d; --surface:#1a1d2b; --surface-2:#222636; --surface-3:#2a2f42; --brand:#a99fff; --brand-2:#c2b9ff; --brand-wash:#2c2850; --brand-soft:#4b437f; --on-brand:#14121f; --t-strong:#f1f1f8; --t-moderate:#b3b7cc; --t-subtle:#878ca5; --border:#363b52; --border-2:#2b3044; --danger:#ff8a98; --danger-wash:#3a1d25; --ok:#6fd6a3; --ok-wash:#173327; --warn:#f0c37a; --warn-wash:#372b17; --shadow-sm:0 1px 2px #0005; --shadow:0 1px 2px #0005,0 8px 24px #0004; --shadow-lg:0 28px 80px #000a; color-scheme:dark; }

* { box-sizing:border-box; }
[hidden] { display:none !important; }
html { -webkit-text-size-adjust:100%; }
body { margin:0; background:var(--app); color:var(--t-strong); font:14px/1.55 var(--f); -webkit-font-smoothing:antialiased; }
button,input,textarea,select { font:inherit; color:inherit; }
button { cursor:pointer; }
button:disabled { cursor:not-allowed; opacity:.5; }
a { color:var(--brand); }
:focus-visible { outline:3px solid var(--brand-soft); outline-offset:2px; }
.i { width:18px; height:18px; flex:0 0 auto; display:inline-block; vertical-align:middle; }
[data-icon] { display:inline-flex; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0; }

/* Buttons */
.btn { display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:40px; padding:0 14px; border:1px solid var(--border); border-radius:var(--r-sm); background:var(--surface); color:var(--t-strong); text-decoration:none; font-size:13.5px; font-weight:500; line-height:1.2; white-space:nowrap; transition:background .15s, border-color .15s, box-shadow .15s, transform .05s; }
.btn:hover:not(:disabled) { background:var(--surface-2); border-color:color-mix(in srgb,var(--border) 70%,var(--t-subtle)); }
.btn:active:not(:disabled) { transform:translateY(1px); }
.btn .i { width:17px; height:17px; color:var(--t-moderate); }
.btn-primary { background:var(--brand); border-color:var(--brand); color:var(--on-brand); box-shadow:0 1px 2px #5147ce33,0 4px 12px #5147ce24; }
.btn-primary .i { color:currentColor; }
.btn-primary:hover:not(:disabled) { background:color-mix(in srgb,var(--brand) 88%,#000); border-color:color-mix(in srgb,var(--brand) 88%,#000); }
.btn-ghost { background:transparent; border-color:transparent; }
.btn-ghost:hover:not(:disabled) { background:var(--surface-2); border-color:transparent; }
.btn-icon { width:40px; padding:0; }
.btn-block { width:100%; }
.lnk { display:inline-flex; align-items:center; gap:6px; border:0; background:transparent; color:var(--brand); padding:6px 0; font-size:12.5px; font-weight:500; }
.lnk .i { width:15px; height:15px; }
.lnk.danger { color:var(--danger); }

/* Environment banner */
.envbar { display:flex; align-items:center; gap:10px; padding:8px 24px; font-size:12.5px; color:var(--t-moderate); background:linear-gradient(90deg,var(--brand-wash),color-mix(in srgb,var(--brand-wash) 40%,var(--app))); border-bottom:1px solid var(--border-2); }
.envbar .pill { display:inline-flex; align-items:center; gap:6px; padding:3px 9px; border-radius:99px; background:var(--surface); color:var(--brand); font-weight:600; font-size:11.5px; letter-spacing:.3px; text-transform:uppercase; box-shadow:var(--shadow-sm); }
.envbar .pill .i { width:14px; height:14px; }
.envbar.env-test { background:linear-gradient(90deg,var(--ok-wash),color-mix(in srgb,var(--ok-wash) 40%,var(--app))); }
.envbar.env-test .pill { color:var(--ok); }
.envbar.env-production { background:linear-gradient(90deg,var(--danger-wash),color-mix(in srgb,var(--danger-wash) 40%,var(--app))); color:var(--t-strong); }
.envbar.env-production .pill { background:var(--danger); color:#fff; }
.envbar .pill { letter-spacing:.6px; }

/* Top bar */
.top { display:flex; align-items:center; gap:16px; padding:12px 24px; background:var(--surface); border-bottom:1px solid var(--border-2); }
.brandmark { display:flex; align-items:center; gap:12px; margin-right:auto; min-width:0; }
.logo { display:grid; place-items:center; width:38px; height:38px; flex:0 0 38px; border-radius:11px; background:linear-gradient(135deg,var(--brand),var(--brand-2)); color:#fff; box-shadow:0 4px 12px #5147ce40; }
.logo .i { width:20px; height:20px; }
.brandmark h1 { margin:0; font-size:16px; letter-spacing:-.3px; line-height:1.2; }
.brandmark span:not(.logo) { display:block; font-size:12px; color:var(--t-subtle); }
.top-nav { display:flex; align-items:center; gap:8px; }
.who { display:inline-flex; align-items:center; gap:8px; padding:5px 12px 5px 5px; margin-left:4px; border:1px solid var(--border-2); border-radius:99px; font-size:12.5px; color:var(--t-moderate); max-width:200px; }
.who:empty { display:none; }
.who .i { width:26px; height:26px; padding:5px; border-radius:50%; background:var(--brand-wash); color:var(--brand); }
.tools { position:relative; }
.tools summary { list-style:none; }
.tools summary::-webkit-details-marker { display:none; }
.tools[open] summary { background:var(--surface-2); }
.tools-menu { position:absolute; right:0; top:calc(100% + 8px); z-index:40; display:grid; gap:2px; width:270px; padding:8px; background:var(--surface); border:1px solid var(--border); border-radius:var(--r); box-shadow:var(--shadow-lg); }
.tools-menu .btn { justify-content:flex-start; border:0; min-height:40px; padding:0 10px; font-weight:450; }
.tools-menu .btn .i { color:var(--t-subtle); }
.tools-menu .btn.danger, .tools-menu .btn.danger .i { color:var(--danger); }
.tools-menu .btn.danger:hover { background:var(--danger-wash); }
.tools-sep { display:block; height:1px; margin:4px 6px; background:var(--border-2); }

/* Workspace header */
.workspace-head { display:flex; align-items:flex-end; gap:16px; margin:22px 24px 18px; }
.workspace-title { margin-right:auto; min-width:0; }
.workspace-head h2 { margin:0; font-size:25px; line-height:1.2; letter-spacing:-.7px; }
.workspace-head p { margin:4px 0 0; color:var(--t-moderate); }
.workspace-meta { display:flex; flex-direction:column; align-items:flex-end; gap:8px; }
.workspace-chips { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:8px; }
.context-chip { display:inline-flex; align-items:center; gap:6px; padding:5px 10px; border-radius:99px; background:var(--surface); border:1px solid var(--border-2); color:var(--t-moderate); font-size:12.5px; font-weight:500; }
.context-chip .i { width:15px; height:15px; color:var(--brand); }
.draft-status { display:flex; align-items:center; gap:7px; margin:0; color:var(--t-subtle); font-size:12px; overflow-wrap:anywhere; }
.draft-status::before { content:''; width:7px; height:7px; flex:0 0 7px; border-radius:50%; background:var(--ok); box-shadow:0 0 0 3px var(--ok-wash); }
.seg.mobile-tabs { display:none; }

/* Three-column workspace */
.shell { display:grid; grid-template-columns:240px minmax(420px,580px) minmax(0,1fr); align-items:start; gap:20px; padding:0 24px 112px; max-width:1920px; margin:0 auto; }
.rail { position:sticky; top:16px; min-width:0; max-height:calc(100dvh - 116px); overflow-y:auto; overscroll-behavior:contain; scrollbar-width:thin; padding:16px 12px 12px; background:var(--surface); border:1px solid var(--border-2); border-radius:18px; box-shadow:var(--shadow-sm); }
.rail-head { display:flex; align-items:center; justify-content:space-between; padding:0 6px; }
.rail-t { color:var(--t-subtle); font-size:11.5px; text-transform:uppercase; letter-spacing:1.2px; font-weight:600; }
.rail-count { font-size:12px; font-weight:600; color:var(--brand); }
.rail-progress { height:6px; margin:10px 6px 14px; background:var(--surface-3); border-radius:99px; overflow:hidden; }
.rail-progress span { display:block; height:100%; border-radius:99px; background:linear-gradient(90deg,var(--brand),var(--brand-2)); transition:width .25s; }
.steps { position:relative; display:grid; gap:2px; }
.steps::before { content:''; position:absolute; left:23px; top:18px; bottom:18px; width:2px; border-radius:2px; background:var(--border-2); }
.step { position:relative; display:flex; align-items:center; gap:12px; width:100%; padding:7px 8px; border:0; border-radius:12px; background:transparent; color:var(--t-moderate); text-align:left; font-size:13.5px; line-height:1.3; }
.step:hover { background:var(--surface-2); color:var(--t-strong); }
.step-n { position:relative; z-index:1; display:grid; place-items:center; width:32px; height:32px; flex:0 0 32px; border-radius:10px; background:var(--surface); border:1px solid var(--border); color:var(--t-subtle); }
.step-n .i { width:17px; height:17px; }
.step.done .step-n { background:var(--ok-wash); border-color:transparent; color:var(--ok); }
.step[aria-current=true] { background:var(--brand-wash); color:var(--brand); font-weight:600; }
.step[aria-current=true] .step-n { background:var(--brand); border-color:var(--brand); color:var(--on-brand); box-shadow:0 0 0 4px var(--brand-soft); }
.step-invalid .step-n, .step-invalid[aria-current=true] .step-n { background:var(--danger); border-color:var(--danger); color:#fff; box-shadow:none; }
.step-l { min-width:0; }

/* Main form card */
.main { min-width:0; container-type:inline-size; background:var(--surface); border:1px solid var(--border-2); border-radius:20px; box-shadow:var(--shadow); }
.step-head { display:flex; gap:14px; align-items:flex-start; padding:22px 26px 18px; border-bottom:1px solid var(--border-2); }
.step-icon { display:grid; place-items:center; width:46px; height:46px; flex:0 0 46px; border-radius:14px; background:var(--brand-wash); color:var(--brand); }
.step-icon .i { width:22px; height:22px; }
.step-eyebrow { display:block; font-size:12px; font-weight:600; color:var(--brand); letter-spacing:.2px; }
.sec-h { margin:2px 0 4px; font-size:21px; line-height:1.25; letter-spacing:-.5px; }
.sec-d { margin:0; color:var(--t-moderate); font-size:13.5px; }
.step-meta { display:flex; flex-wrap:wrap; gap:6px; margin-top:10px; }
.step-meta span { display:inline-flex; align-items:center; gap:5px; padding:3px 9px; border-radius:99px; background:var(--surface-2); color:var(--t-moderate); font-size:12px; }
.step-body { padding:22px 26px 26px; }
.step-body > .callout, .step-body > .validation-summary { margin-bottom:18px; }
.main.library-main { padding:26px; }

/* Fields */
.grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px 14px; }
@container (max-width:460px) { .grid { grid-template-columns:minmax(0,1fr); } }
.full { grid-column:1/-1; }
.field { display:grid; align-content:start; gap:6px; min-width:0; }
.field label, .field-label { display:block; font-weight:600; font-size:12.5px; line-height:1.4; color:var(--t-strong); }
.field .req { margin-left:3px; color:var(--brand); font-weight:600; }
.field .opt { margin-left:4px; color:var(--t-subtle); font-weight:400; }
input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=file]), textarea, select { width:100%; min-width:0; min-height:42px; padding:10px 12px; border:1px solid var(--border); border-radius:var(--r-sm); background:var(--surface); color:var(--t-strong); font-size:14px; outline:none; transition:border-color .15s, box-shadow .15s; }
input::placeholder, textarea::placeholder { color:var(--t-subtle); }
input:hover:not([readonly]):not(:disabled), textarea:hover, select:hover:not(:disabled) { border-color:color-mix(in srgb,var(--border) 60%,var(--t-subtle)); }
input:focus, textarea:focus, select:focus { border-color:var(--brand); box-shadow:0 0 0 4px var(--brand-wash); }
input[readonly], select:disabled { background:var(--surface-2); color:var(--t-moderate); }
textarea { resize:vertical; min-height:100px; line-height:1.5; }
input[type=checkbox] { width:18px; height:18px; margin:0; accent-color:var(--brand); flex-shrink:0; }
.hint { font-size:12px; color:var(--t-subtle); line-height:1.5; overflow-wrap:anywhere; }
.hint:empty { display:none; }
.section-hint { margin:0 0 16px; }
.field-error { color:var(--danger); font-size:12px; font-weight:500; }
.field [aria-invalid=true] { border-color:var(--danger) !important; box-shadow:0 0 0 4px var(--danger-wash) !important; }
.color-control { display:flex; align-items:center; gap:8px; min-width:0; }
.color-control input[type=color] { flex:0 0 44px; width:44px; height:42px; padding:4px; border:1px solid var(--border); border-radius:var(--r-sm); background:var(--surface); cursor:pointer; }
.color-control input[data-path] { flex:1; font-family:var(--m); font-size:13px; }

/* Toggles: the checkbox of a .switch row is drawn as a switch */
.switch { display:flex; align-items:center; gap:12px; padding:12px 14px; border:1px solid var(--border-2); border-radius:12px; background:var(--surface); transition:border-color .15s, background .15s; }
.switch:has(input:checked) { border-color:color-mix(in srgb,var(--brand) 35%,var(--border-2)); background:color-mix(in srgb,var(--brand-wash) 45%,var(--surface)); }
.switch > input[type=checkbox] { appearance:none; -webkit-appearance:none; position:relative; width:38px; height:22px; flex:0 0 38px; border-radius:99px; background:var(--surface-3); border:1px solid var(--border); cursor:pointer; transition:background .15s, border-color .15s; }
.switch > input[type=checkbox]::before { content:''; position:absolute; top:2px; left:2px; width:16px; height:16px; border-radius:50%; background:#fff; box-shadow:0 1px 3px #0003; transition:transform .18s; }
.switch > input[type=checkbox]:checked { background:var(--brand); border-color:var(--brand); }
.switch > input[type=checkbox]:checked::before { transform:translateX(16px); }
.switch-b { flex:1; cursor:pointer; }
.switch-b b { display:block; font-size:13px; font-weight:500; }
.switch-b span { display:block; font-size:12px; color:var(--t-subtle); }
.switch-b span:empty { display:none; }

/* Callouts and validation */
.callout { position:relative; padding:12px 14px 12px 42px; border-radius:12px; background:var(--brand-wash); color:var(--t-moderate); font-size:12.5px; line-height:1.6; }
.callout::before { content:''; position:absolute; left:14px; top:12px; width:18px; height:18px; background:var(--brand); -webkit-mask:var(--icon-info) center/contain no-repeat; mask:var(--icon-info) center/contain no-repeat; }
.callout b { color:var(--t-strong); }
.callout.warn { background:var(--warn-wash); color:var(--warn); }
.callout.warn::before { background:var(--warn); -webkit-mask-image:var(--icon-alert); mask-image:var(--icon-alert); }
.validation-summary { position:relative; padding:14px 16px 14px 44px; border:1px solid color-mix(in srgb,var(--danger) 35%,transparent); border-radius:12px; background:var(--danger-wash); color:var(--danger); font-size:12.5px; }
.validation-summary::before { content:''; position:absolute; left:15px; top:14px; width:18px; height:18px; background:var(--danger); -webkit-mask:var(--icon-alert) center/contain no-repeat; mask:var(--icon-alert) center/contain no-repeat; }
.validation-summary > b { font-size:13px; }
.validation-summary ul { margin:6px 0 0; padding-left:16px; }
.validation-summary li { margin:2px 0; }
.validation-summary li button { all:unset; cursor:pointer; text-decoration:underline; text-underline-offset:2px; }
.validation-summary li b { font-weight:600; }
:root { --icon-info:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 11v5M12 8v.01'/%3E%3C/svg%3E"); --icon-alert:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4 2.8 19.5h18.4z'/%3E%3Cpath d='M12 10v4M12 17v.01'/%3E%3C/svg%3E"); --icon-chevron:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); }
.err { color:var(--danger); }
.ok { color:var(--ok); }

/* Theme choice */
.template-options { display:grid; gap:14px; }
@container (min-width:540px) { .template-options { grid-template-columns:1fr 1fr; } }
.template-card { position:relative; display:grid; grid-template-columns:1fr auto; align-content:start; gap:4px 10px; padding:10px 10px 14px; text-align:left; background:var(--surface); border:1px solid var(--border); border-radius:16px; color:var(--t-strong); transition:border-color .15s, box-shadow .15s, transform .15s; }
.template-card:hover { border-color:color-mix(in srgb,var(--brand) 40%,var(--border)); box-shadow:var(--shadow); }
.template-card.selected { border-color:var(--brand); box-shadow:0 0 0 3px var(--brand-wash),var(--shadow); }
.template-card b { padding:0 4px; font-size:14px; }
.template-card > span:last-child { grid-column:1/-1; padding:0 4px; color:var(--t-moderate); font-size:12.5px; }
.template-check { display:grid; place-items:center; width:22px; height:22px; margin-right:4px; border:1px solid var(--border); border-radius:50%; }
.template-check .i { width:14px; height:14px; }
.template-card.selected .template-check { background:var(--brand); border-color:var(--brand); color:var(--on-brand); }
.template-thumbnail { position:relative; grid-column:1/-1; height:150px; margin-bottom:8px; border-radius:11px; overflow:hidden; background:var(--surface-2); pointer-events:none; }
.template-thumbnail iframe { width:400%; height:400%; transform:scale(.25); transform-origin:0 0; border:0; pointer-events:none; }
.env-choice { margin-top:20px; }
.env-choice .field { grid-column:1/-1; max-width:440px; }

/* Folded sections, collections and repeated cards */
.advanced { margin-top:18px; padding-top:14px; border-top:1px solid var(--border-2); }
.grid > .advanced { margin-top:0; }
.advanced > summary, .tech > summary { display:flex; align-items:center; gap:8px; list-style:none; cursor:pointer; font-size:13px; font-weight:600; color:var(--t-moderate); }
.advanced > summary::-webkit-details-marker, .tech > summary::-webkit-details-marker, .repeat > summary::-webkit-details-marker { display:none; }
.advanced > summary::after, .tech > summary::after { content:''; width:16px; height:16px; margin-left:auto; background:var(--t-subtle); -webkit-mask:var(--icon-chevron) center/contain no-repeat; mask:var(--icon-chevron) center/contain no-repeat; transition:transform .2s; }
.advanced[open] > summary::after, .tech[open] > summary::after { transform:rotate(180deg); }
.advanced > summary:hover { color:var(--t-strong); }
.advanced > div, .advanced > .field { padding-top:16px; }
.operations-collection + .operations-collection, .grid + .operations-collection, details + .operations-collection { margin-top:28px; }
.form-group ~ .form-group { margin-top:26px; padding-top:22px; border-top:1px solid var(--border-2); }
.form-group > .section-hint { margin:-4px 0 16px; }
.collection-h { display:flex; align-items:center; gap:10px; margin:0 0 12px; font-size:15px; letter-spacing:-.2px; }
.collection-h .icon-tile { display:grid; place-items:center; width:30px; height:30px; border-radius:9px; background:var(--surface-2); color:var(--t-moderate); }
.collection-h .icon-tile .i { width:16px; height:16px; }
.count { min-width:22px; padding:1px 8px; border-radius:99px; background:var(--surface-2); color:var(--t-moderate); font-size:12px; font-weight:600; text-align:center; }
.empty { display:flex; align-items:center; gap:12px; padding:14px 16px; margin-bottom:10px; border:1px dashed var(--border); border-radius:12px; color:var(--t-subtle); font-size:12.5px; }
.empty .i { color:var(--t-subtle); }
.repeat { border:1px solid var(--border-2); border-radius:14px; background:var(--surface); }
div.repeat { padding:16px; }
details.repeat { margin-bottom:10px; overflow:hidden; }
details.repeat > summary { display:flex; align-items:center; gap:10px; padding:13px 16px; list-style:none; cursor:pointer; font-weight:600; background:var(--surface-2); }
details.repeat > summary::after { content:''; width:16px; height:16px; margin-left:auto; background:var(--t-subtle); -webkit-mask:var(--icon-chevron) center/contain no-repeat; mask:var(--icon-chevron) center/contain no-repeat; transition:transform .2s; }
details.repeat[open] > summary { border-bottom:1px solid var(--border-2); }
details.repeat[open] > summary::after { transform:rotate(180deg); }
details.repeat > .grid { padding:16px; }
details.repeat > .lnk, details.repeat > .hint { display:flex; margin:0 16px 14px; }
.repeat-title { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.badge { display:inline-flex; align-items:center; padding:2px 8px; border-radius:99px; font-size:11.5px; font-weight:600; background:var(--surface-3); color:var(--t-moderate); white-space:nowrap; }
.badge.new { background:var(--brand-wash); color:var(--brand); }
.badge.studio { background:#f6e9ef; color:#7a3a57; }
.badge.classic { background:#e6f1ec; color:#2c6b52; }
:root[data-theme=dark] .badge.studio { background:#3a2430; color:#f0b9cf; }
:root[data-theme=dark] .badge.classic { background:#1d332a; color:#9fe0c2; }
.repeat-h { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:14px; }
.repeat-h b { display:flex; align-items:center; gap:8px; }
.grid > .lnk { justify-self:start; }
.menu-row { display:grid; grid-template-columns:minmax(0,1.2fr) minmax(0,1fr) minmax(0,1fr) 40px; gap:12px; align-items:end; margin-bottom:10px; padding:12px 14px 14px; border:1px solid var(--border-2); border-radius:12px; }
.menu-row .hint:empty { display:none; }
.menu-remove .i { color:var(--danger, #c2410c); }
@container (max-width:460px) { .menu-row { grid-template-columns:minmax(0,1fr) minmax(0,1fr); } .menu-row > .field:nth-child(3) { grid-column:1; } .menu-row > .menu-remove { grid-column:2; justify-self:end; } }
.progress-bar { height:10px; overflow:hidden; border-radius:99px; background:var(--surface-2); }
.progress-bar > span { display:block; width:0; height:100%; border-radius:inherit; background:linear-gradient(90deg,var(--brand),var(--brand-2)); transition:width .35s ease; }
.progress-modal.failed .progress-bar > span { background:var(--danger); }
.progress-meta { display:flex; align-items:baseline; justify-content:space-between; gap:12px; margin:10px 0 16px; font-size:13px; color:var(--t-subtle); }
.progress-meta b { font-size:22px; color:var(--t-strong); font-variant-numeric:tabular-nums; }
.progress-steps { display:grid; gap:11px; margin:0; padding:0; list-style:none; }
.progress-steps li { display:flex; align-items:center; gap:10px; font-size:14px; color:var(--t-subtle); }
.progress-steps li .i { flex:none; width:18px; height:18px; }
.progress-steps li.active { color:var(--t-strong); font-weight:600; }
.progress-steps li.active .i { color:var(--brand); animation:progress-spin 1s linear infinite; }
.progress-steps li.done { color:var(--t-moderate); }
.progress-steps li.done .i { color:var(--ok); }
.progress-steps li.failed { color:var(--danger); font-weight:600; }
#progress-text { white-space:pre-line; }
@keyframes progress-spin { to { transform:rotate(360deg); } }
@media (prefers-reduced-motion:reduce) { .progress-steps li.active .i { animation:none; } .progress-bar > span { transition:none; } }
.run-progress { margin:14px 0 6px; }
.run-progress .progress-meta { margin:8px 0 0; }
.run-progress .progress-meta b { font-size:18px; }
.recap { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin:0 0 14px; }
.recap-item { display:flex; align-items:flex-start; gap:10px; min-width:0; padding:11px 12px; border:1px solid var(--border-2); border-radius:12px; background:var(--surface); }
.recap-item > .i { flex:none; width:17px; height:17px; margin-top:2px; color:var(--brand); }
.recap-item dt { font-size:11.5px; color:var(--t-subtle); }
.recap-item dd { margin:2px 0 0; font-size:13.5px; font-weight:600; color:var(--t-strong); overflow-wrap:anywhere; }
@container (max-width:460px) { .recap { grid-template-columns:minmax(0,1fr); } }
.step-body > .callout + .collection-h, .step-body > .repeat + .collection-h { margin-top:20px; }
.price-card { display:grid; gap:10px; margin-bottom:10px; padding:12px 14px 14px; border:1px solid var(--border-2); border-radius:12px; background:var(--surface); }
.price-card-h { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.price-card-h b { display:inline-flex; align-items:center; gap:7px; font-size:13px; }
.price-card-h b .i { width:15px; height:15px; color:var(--t-subtle); }
.price-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
@container (max-width:460px) { .price-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } .price-grid > .field:last-child { grid-column:1 / -1; } }
.media-field { display:grid; grid-template-columns:72px minmax(0,1fr); gap:14px; align-items:start; }
.media-thumb { display:grid; place-items:center; width:72px; height:72px; margin-top:27px; overflow:hidden; border:1px solid var(--border); border-radius:12px; background:var(--surface-2); color:var(--t-subtle); }
.media-thumb.empty { border-style:dashed; background:transparent; }
.media-thumb .i { width:22px; height:22px; }
.media-thumb img, .media-thumb video { width:100%; height:100%; object-fit:contain; }
.media-main { display:grid; gap:8px; min-width:0; }
.media-actions { display:flex; flex-wrap:wrap; align-items:center; gap:8px 12px; }
@container (max-width:460px) { .media-field { grid-template-columns:56px minmax(0,1fr); gap:12px; } .media-thumb { width:56px; height:56px; } }
.upload-control { position:relative; justify-self:start; overflow:hidden; }
.upload-control input[type=file] { position:absolute; inset:0; opacity:0; cursor:pointer; }
.upload-status:empty { display:none; }
.field-label + .choice-chips { margin-top:2px; }
.choice-chips { display:flex; flex-wrap:wrap; gap:8px; }
.field .choice-chip { position:relative; display:inline-flex; align-items:center; gap:8px; min-height:38px; padding:7px 13px; border:1px solid var(--border); border-radius:99px; background:var(--surface); font-size:13px; font-weight:400; line-height:1.3; cursor:pointer; user-select:none; }
.field .choice-chip:hover { background:var(--surface-2); }
.choice-chip input { width:16px; height:16px; }
.field .choice-chip:has(input:checked) { border-color:var(--brand); background:var(--brand-wash); color:var(--brand); font-weight:500; }
.choice-chip:has(input:focus-visible) { outline:3px solid var(--brand-soft); outline-offset:2px; }
.choice-chips:has([aria-invalid=true]) .choice-chip { border-color:var(--danger); }

/* Opening hours */
.hours-grid { display:grid; gap:6px; padding:14px; border:1px solid var(--border-2); border-radius:14px; background:var(--surface); container-type:inline-size; }
.hours-day .day-short { display:none; }
/* Narrow grids (phones, nested agendas): short day names and flexible time columns. */
@container (max-width:380px) {
  .hours-day { grid-template-columns:52px minmax(0,1fr) 10px minmax(0,1fr) !important; gap:4px !important; }
  .hours-day .day-full { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
  .hours-day .day-short { display:inline; }
  .hours-day input[type=time] { padding:6px 4px; font-size:12.5px; }
  .hours-day input[type=time]::-webkit-calendar-picker-indicator { display:none; }
}
.hours-grid h4 { display:flex; align-items:center; gap:8px; margin:0 0 6px; font-size:13.5px; }
.hours-day { display:grid; grid-template-columns:minmax(96px,1fr) 126px 14px 126px; gap:6px; align-items:center; }
.hours-day label { display:flex; align-items:center; gap:8px; font-size:13px; }
.hours-day input[type=time] { min-height:38px; padding:6px 8px; font-size:13px; }
.hours-day > span { text-align:center; color:var(--t-subtle); font-size:12px; }
.hours-day:has(input[type=checkbox]:not(:checked)) input[type=time] { opacity:.45; }
.hours-grid > .hint { margin-top:6px; }
h3, h4 { letter-spacing:-.2px; }
.step-body h3 { font-size:15px; }
.step-body h4 { font-size:13.5px; margin:16px 0 8px; }

/* Step navigation (fixed bar) */
.footbar { position:fixed; left:0; right:0; bottom:0; z-index:30; display:flex; align-items:center; gap:16px; padding:12px 24px max(12px,env(safe-area-inset-bottom)); background:color-mix(in srgb,var(--surface) 92%,transparent); backdrop-filter:blur(10px); border-top:1px solid var(--border-2); box-shadow:0 -6px 20px #14172808; }
.step-nav { display:flex; align-items:center; gap:10px; }
.step-count { min-width:56px; padding:5px 10px; border-radius:99px; background:var(--surface-2); color:var(--t-moderate); font-size:12.5px; font-weight:600; text-align:center; }
.status { flex:1; min-width:0; color:var(--t-subtle); font-size:12.5px; text-align:right; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.foot-actions { display:flex; gap:10px; }

/* Preview and side panels */
.aside { min-width:0; position:sticky; top:16px; display:grid; grid-template-columns:minmax(0,1fr); gap:14px; }
.panel { min-width:0; padding:14px; border:1px solid var(--border-2); border-radius:18px; background:var(--surface); box-shadow:var(--shadow-sm); }
.pv-head { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin-bottom:12px; }
.aside-t { display:flex; align-items:center; gap:8px; margin:0; font-size:13.5px; font-weight:600; color:var(--t-strong); }
.aside-t .i { color:var(--brand); }
.pv-head .aside-t { margin-right:auto; }
.seg { display:inline-flex; gap:2px; padding:3px; border-radius:11px; background:var(--surface-2); }
.seg button { display:inline-flex; align-items:center; gap:6px; min-height:32px; padding:0 10px; border:0; border-radius:8px; background:transparent; color:var(--t-moderate); font-size:12.5px; font-weight:500; }
.seg button .i { width:16px; height:16px; }
.seg button[aria-pressed=true] { background:var(--surface); color:var(--t-strong); box-shadow:0 1px 3px #1417281f; }
.seg button[aria-pressed=true] .i { color:var(--brand); }
.chrome { border:1px solid var(--border); border-radius:14px; overflow:hidden; background:#fff; }
.chrome-bar { display:flex; align-items:center; gap:6px; padding:9px 12px; background:var(--surface-2); border-bottom:1px solid var(--border-2); color:var(--t-moderate); font-size:12px; }
.chrome-bar i { width:9px; height:9px; border-radius:50%; background:#ff6058; }
.chrome-bar i:nth-child(2) { background:#ffbd2e; }
.chrome-bar i:nth-child(3) { background:#27c840; }
.chrome-tab { display:none; }
.chrome-url { flex:1; min-width:0; margin-left:8px; padding:4px 10px; border-radius:99px; background:var(--surface); color:var(--t-moderate); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-family:var(--m); font-size:11.5px; }
.viewport { display:flex; justify-content:center; background:var(--surface-3); overflow:hidden; }
.stage { position:relative; overflow:hidden; flex-shrink:0; }
.stage iframe { display:block; border:0; transform-origin:0 0; background:#fff; }
.preview-nav { display:flex; align-items:center; gap:6px; padding:10px 0 0; }
.preview-caption { display:flex; gap:10px; margin:12px 0 0; padding:10px 12px; border-radius:12px; background:var(--surface-2); color:var(--t-moderate); font-size:12px; line-height:1.55; }
.preview-caption > .i, .preview-caption > [data-icon] { color:var(--brand); }
.preview-caption strong { display:block; margin-bottom:2px; color:var(--t-strong); font-size:12.5px; }
.preview-notice { min-height:0; margin:8px 0 0; color:var(--brand); font-size:12px; }
.preview-notice:empty { display:none; }
.chk { display:grid; gap:8px; margin:12px 0 0; padding:0; list-style:none; }
.chk li { display:flex; align-items:center; gap:10px; font-size:13px; color:var(--t-moderate); }
.chk li .i { width:18px; height:18px; color:var(--t-subtle); }
.chk li.done .i { color:var(--ok); }
.json { max-height:260px; margin:12px 0 0; padding:12px; overflow:auto; border-radius:12px; background:var(--surface-2); font:12px/1.65 var(--m); }

/* Run tracking */
.run-card { display:grid; gap:4px; margin-top:16px; }
.run-card p { margin:0; }
.run-card .run-title { display:flex; align-items:center; gap:8px; font-size:14.5px; }
.run-card .run-id { margin-bottom:8px; color:var(--t-subtle); font:12px/1.5 var(--m); overflow-wrap:anywhere; }
.run-card .run-line { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:9px 0; border-top:1px solid var(--border-2); font-size:13px; }
.run-card .btn, .run-card .callout, .run-card .ok, .run-card .err { margin-top:10px; justify-self:start; }
.run-status { display:inline-flex; align-items:center; gap:5px; padding:3px 10px; border-radius:99px; font-size:12px; font-weight:600; white-space:nowrap; }
.run-status::before { content:''; width:6px; height:6px; border-radius:50%; background:currentColor; }
.run-status.ok { background:var(--ok-wash); color:var(--ok); }
.run-status.fail { background:var(--danger-wash); color:var(--danger); }
.run-status.wait { background:var(--surface-2); color:var(--t-moderate); }
.connections p { display:flex; justify-content:space-between; gap:12px; margin:8px 0 0; font-size:13px; }

/* Library */
.shell.library { grid-template-columns:minmax(0,1fr); }
.shell.library .rail, .shell.library .aside, .shell.library .footbar { display:none; }
.library-head { display:flex; flex-wrap:wrap; align-items:flex-end; gap:14px; margin-bottom:20px; }
.library-head > div:first-child { margin-right:auto; }
.library-head .sec-h { margin:0 0 4px; }
.library-toolbar { display:flex; align-items:center; gap:8px; }
.library-toolbar label { display:flex; align-items:center; gap:8px; font-size:12.5px; font-weight:600; color:var(--t-moderate); }
.library-toolbar select { width:auto; min-width:210px; }
#library-error:empty { display:none; }
#library-error { margin:0 0 16px; }
.shop-list { display:grid; grid-template-columns:repeat(auto-fill,minmax(300px,1fr)); gap:16px; }
.shop-card { display:flex; flex-direction:column; gap:14px; padding:18px; border:1px solid var(--border-2); border-radius:18px; background:var(--surface); box-shadow:var(--shadow-sm); transition:box-shadow .15s, border-color .15s; }
.shop-card:hover { box-shadow:var(--shadow); border-color:var(--border); }
.shop-card-head { display:flex; align-items:center; gap:12px; min-width:0; }
.avatar { display:grid; place-items:center; width:44px; height:44px; flex:0 0 44px; border-radius:13px; background:linear-gradient(135deg,var(--brand-wash),var(--brand-soft)); color:var(--brand); font-size:18px; font-weight:700; }
.shop-card-head b { display:block; font-size:16px; letter-spacing:-.2px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.shop-card-head small { display:flex; align-items:center; gap:6px; color:var(--t-subtle); font-size:12px; }
.shop-card-head > div { min-width:0; }
.shop-backend { margin:-6px 0 0; color:var(--t-subtle); font-size:12px; }
.shop-envs { display:grid; gap:8px; }
.shop-env { display:flex; align-items:center; gap:8px; padding:8px 8px 8px 12px; border:1px solid var(--border-2); border-radius:12px; background:var(--surface-2); }
.env-pill { display:inline-flex; align-items:center; gap:6px; margin-right:auto; font-size:12.5px; font-weight:600; text-transform:capitalize; }
.env-pill::before { content:''; width:8px; height:8px; border-radius:50%; background:var(--t-subtle); }
.env-pill.production::before { background:var(--ok); }
.env-pill.test::before { background:var(--brand); }
.env-pill.staging::before { background:var(--warn); }
.shop-env .btn { min-height:34px; padding:0 10px; font-size:12.5px; }
.shop-actions { display:flex; flex-wrap:wrap; gap:8px; }
.new-card { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:14px; min-height:200px; padding:18px; border:1.5px dashed var(--border); border-radius:18px; background:transparent; color:var(--t-moderate); font-weight:600; cursor:pointer; text-align:center; transition:border-color .15s, background .15s, color .15s; }
.new-card:hover { border-color:var(--brand); color:var(--brand); background:var(--brand-wash); }
.new-card .icon-tile { display:grid; place-items:center; width:46px; height:46px; border-radius:14px; background:var(--brand-wash); color:var(--brand); }
.new-card small { display:block; margin-top:4px; color:var(--t-subtle); font-weight:400; font-size:12.5px; }

/* Overlays */
.modal { position:fixed; inset:0; z-index:50; display:grid; place-items:center; padding:20px; background:#11132299; backdrop-filter:blur(6px); }
.modal-c { width:100%; max-width:480px; max-height:92dvh; overflow:auto; background:var(--surface); border:1px solid var(--border); border-radius:22px; box-shadow:var(--shadow-lg); }
.modal-h { display:flex; align-items:flex-start; gap:14px; padding:22px 24px 18px; border-bottom:1px solid var(--border-2); }
.modal-h h2 { margin:0 0 4px; font-size:19px; letter-spacing:-.4px; }
.modal-h p { margin:0; color:var(--t-moderate); font-size:12.5px; white-space:pre-line; }
.modal-h > div { min-width:0; flex:1; }
.modal-icon { display:grid; place-items:center; width:42px; height:42px; flex:0 0 42px; border-radius:13px; background:var(--brand-wash); color:var(--brand); }
.modal-icon .i { width:21px; height:21px; }
.modal-icon.success { background:var(--ok-wash); color:var(--ok); }
.modal-icon.warning { background:var(--danger-wash); color:var(--danger); }
.modal-b { padding:20px 24px; }
.modal-b:has(> .pipe:empty) { display:none; }
.modal-f { display:flex; justify-content:flex-end; gap:10px; padding:14px 24px; border-top:1px solid var(--border-2); }
.pipe { margin:0; padding:0; list-style:none; }
.draft-row { display:flex; align-items:center; justify-content:space-between; gap:14px; padding:12px 0; border-bottom:1px solid var(--border-2); }
.draft-row:last-child { border-bottom:0; }
.draft-row > div { display:flex; align-items:center; gap:12px; min-width:0; }
.draft-row .avatar { width:36px; height:36px; flex-basis:36px; border-radius:10px; font-size:15px; }
.draft-row p { margin:2px 0 0; color:var(--t-subtle); font-size:12px; }

/* Sign-in */
.gate { position:fixed; inset:0; z-index:60; display:grid; place-items:center; padding:20px; overflow:auto; background:radial-gradient(1200px 600px at 10% -10%,color-mix(in srgb,var(--brand) 22%,transparent),transparent 60%),radial-gradient(900px 500px at 110% 110%,color-mix(in srgb,var(--brand-2) 18%,transparent),transparent 60%),var(--app); }
.gate-card { width:100%; max-width:410px; padding:30px; background:var(--surface); border:1px solid var(--border-2); border-radius:24px; box-shadow:var(--shadow-lg); }
.gate-brand { display:flex; align-items:center; gap:10px; margin-bottom:22px; font-size:13px; font-weight:600; color:var(--t-moderate); }
.gate-card h2 { margin:0 0 6px; font-size:24px; letter-spacing:-.6px; }
.gate-card > p { margin:0 0 22px; color:var(--t-moderate); }
.gate-card form { display:grid; gap:16px; }
.input-icon { position:relative; }
.input-icon > .i, .input-icon > [data-icon] { position:absolute; left:12px; top:50%; transform:translateY(-50%); color:var(--t-subtle); pointer-events:none; }
.input-icon input { padding-left:40px !important; }
.import-source { display:flex; align-items:center; flex-wrap:wrap; gap:10px 14px; margin-bottom:12px; }
.import-source .hint { margin:0; }
.input-action { position:relative; }
.input-action input { padding-right:46px !important; }
.input-action .btn-icon { position:absolute; right:3px; top:50%; transform:translateY(-50%); width:36px; min-height:36px; height:36px; border-color:transparent; background:transparent; box-shadow:none; }
.input-action .btn-icon:hover:not(:disabled) { background:var(--surface-2); }
.input-action .btn-icon:active:not(:disabled) { transform:translateY(-50%); }
.gate-card .err:empty { display:none; }
.gate-card .err { padding:10px 12px; border-radius:10px; background:var(--danger-wash); font-size:12.5px; }
.gate-card .btn-primary { min-height:46px; font-size:14.5px; }

/* Responsive: tablet */
@media (min-width:1600px) { .shell { grid-template-columns:256px minmax(460px,620px) minmax(0,1fr); gap:24px; } }
@media (max-width:1280px) { .shell { grid-template-columns:212px minmax(380px,500px) minmax(0,1fr); gap:16px; padding-left:18px; padding-right:18px; } .step { gap:10px; font-size:13px; } }
@media (max-height:780px) { .step { padding-top:5px; padding-bottom:5px; } .step-n { width:28px; height:28px; flex-basis:28px; } .steps::before { left:21px; } }
@media (max-width:1060px) {
  .shell { grid-template-columns:minmax(0,1fr) minmax(0,.9fr); }
  .rail { grid-column:1/-1; position:static; max-height:none; padding:10px; }
  .rail-head, .rail-progress { display:none; }
  .steps { display:flex; gap:6px; overflow-x:auto; scrollbar-width:none; padding:2px; }
  .steps::-webkit-scrollbar { display:none; }
  .steps::before { display:none; }
  .step { flex-shrink:0; width:auto; padding:5px 12px 5px 5px; border:1px solid var(--border-2); border-radius:99px; background:var(--surface); font-size:12.5px; }
  .step-n { width:28px; height:28px; flex-basis:28px; border-radius:99px; }
  .step[aria-current=true] .step-n { box-shadow:none; }
}

/* Responsive: phone */
@media (max-width:760px) {
  body { font-size:14px; }
  .envbar { padding:8px 14px; font-size:11.5px; }
  .envbar span:not(.pill) { display:none; }
  .top { gap:8px; padding:10px 14px; }
  .brandmark { gap:10px; }
  .logo { width:34px; height:34px; flex-basis:34px; border-radius:10px; }
  .brandmark h1 { font-size:15px; }
  .brandmark span:not(.logo) { display:none; }
  .top-nav { gap:6px; }
  .top-nav .btn { width:40px; padding:0; }
  .top-nav .btn .label { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
  .who { display:none; }
  .tools-menu { position:fixed; left:12px; right:12px; top:auto; bottom:12px; width:auto; padding:10px; border-radius:20px; }
  .workspace-head { flex-direction:column; align-items:flex-start; gap:10px; margin:16px 14px 12px; }
  .workspace-head h2 { font-size:21px; }
  .workspace-head p { display:none; }
  .workspace-meta { align-items:flex-start; }
  .workspace-chips { justify-content:flex-start; }
  .seg.mobile-tabs { position:sticky; top:0; z-index:20; display:flex; margin:0 14px 12px; padding:4px; box-shadow:var(--shadow-sm); background:var(--surface-2); }
  .mobile-tabs button { flex:1; justify-content:center; min-height:38px; font-size:13.5px; }
  .library-view .seg.mobile-tabs { display:none; }
  .shell { grid-template-columns:minmax(0,1fr); gap:12px; padding:0 14px 150px; }
  .shell[data-pane=preview] .main, .shell[data-pane=preview] .rail { display:none; }
  .aside { position:static; display:none; }
  .shell[data-pane=preview] .aside { display:grid; }
  .rail { padding:8px; border-radius:16px; }
  .main { border-radius:18px; }
  .step-head { gap:12px; padding:16px 16px 14px; }
  .step-icon { width:40px; height:40px; flex-basis:40px; border-radius:12px; }
  .sec-h { font-size:19px; }
  .step-body { padding:16px 16px 20px; }
  .main.library-main { padding:18px 16px; }
  .grid { gap:16px 12px; }
  .hours-grid { padding:12px 10px; }
  .hours-day { grid-template-columns:minmax(66px,1fr) 104px 8px 104px; gap:4px; }
  .hours-day input[type=time] { padding:6px 4px; font-size:12.5px; }
  .hours-day input[type=time]::-webkit-calendar-picker-indicator { display:none; }
  .footbar { flex-wrap:wrap; gap:8px; padding:10px 14px max(10px,env(safe-area-inset-bottom)); }
  .status { display:none; }
  .step-nav { flex:1 1 100%; }
  .step-nav #step-prev { width:42px; padding:0; }
  .step-nav #step-prev .label { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
  .step-nav #step-next, .step-nav #finish-shops { flex:1; }
  .foot-actions { display:none; flex:1 1 100%; }
  .foot-actions .btn { flex:1; }
  .footbar.at-end .foot-actions { display:flex; }
  .library-head { align-items:stretch; }
  .library-toolbar { width:100%; }
  .library-toolbar label { flex:1; min-width:0; }
  .step-meta { display:none; }
  .library-toolbar select { min-width:0; flex:1; }
  .shop-list { grid-template-columns:minmax(0,1fr); }
  .modal { place-items:end center; padding:0; }
  .modal-c { max-width:none !important; max-height:90dvh; border-radius:22px 22px 0 0; }
  .modal-h { padding:18px 18px 14px; }
  .modal-b { padding:16px 18px; }
  .modal-f { padding:12px 18px max(12px,env(safe-area-inset-bottom)); }
  .modal-f .btn { flex:1; }
  .gate { padding:16px; }
  .gate-card { padding:24px 20px; border-radius:22px; }
}
@media (max-width:370px) { .hours-day { grid-template-columns:minmax(60px,1fr) 96px 6px 96px; } }
@media (prefers-reduced-motion:reduce) { *, *::before, *::after { transition:none !important; scroll-behavior:auto !important; } }
