/* assets/css/platform.css — shared styles for platform (non-customer) pages */

* { box-sizing: border-box; margin: 0; padding: 0; }

body.platform {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    background: #101418; color: #eef1f4;
    min-height: 100vh; display: flex; flex-direction: column;
}

/* top bar, shared by every platform page */
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 20px 32px; }
.brand { font-weight: 700; font-size: 20px; letter-spacing: 0.5px; color: #eef1f4; text-decoration: none; }
.topbar nav { display: flex; gap: 8px; align-items: center; font-size: 15px; }
.topbar nav a { color: #aeb8c2; text-decoration: none; padding: 8px 14px; font-weight: 500; }
.topbar nav a:hover { color: #eef1f4; }

/* buttons */
.btn {
    display: inline-block; background: #3b82f6; color: #fff;
    padding: 8px 18px; border-radius: 8px; font-weight: 600; font-size: 15px;
    text-decoration: none; border: none; cursor: pointer; font-family: inherit;
}
.btn:hover { background: #2f6fe0; color: #fff; }
.btn-secondary { background: transparent; color: #aeb8c2; border: 1px solid #2a3340; }
.btn-secondary:hover { background: #171d24; color: #eef1f4; }
.btn-block { width: 100%; text-align: center; padding: 12px; font-size: 16px; }

/* centred card layout (auth pages, dashboard) */
body.platform { min-height: 100vh; display: flex; flex-direction: column; }
main.auth { flex: 1; display: flex; justify-content: center; padding: 40px 20px; }
/* safe centring: auto margins centre the card while it fits and release
   (top-anchor) once it's taller than the viewport — align-items:center
   would overflow it through both ends, unreachable by scroll */
main.auth > .card { margin: auto 0; }
.card { background: #171d24; border: 1px solid #2a3340; border-radius: 12px; padding: 36px; width: 100%; max-width: 420px; }
.card h1 { font-size: 24px; margin-bottom: 6px; }
.card a { color: #7fb3ff; }

/* forms */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: #aeb8c2; margin-bottom: 6px; letter-spacing: 0.3px; }
.field input { width: 100%; background: #0c1015; color: #eef1f4; border: 1px solid #2a3340; border-radius: 8px; padding: 10px 12px; font-size: 15px; }
.field input:focus { outline: none; border-color: #3b82f6; }

/* messages */
.errors { background: rgba(255,99,99,.08); border: 1px solid rgba(255,99,99,.35); color: #ff9c9c; border-radius: 8px; padding: 12px 14px; margin-bottom: 18px; font-size: 14px; }
.errors ul { list-style: none; }
.errors li { padding: 2px 0; }
.flash-success { background: rgba(123,216,143,.08); border: 1px solid rgba(123,216,143,.35); color: #7bd88f; border-radius: 8px; padding: 12px 14px; margin-bottom: 18px; font-size: 14px; }

.card p.sub { color: #8fa0b0; font-size: 15px; margin-bottom: 24px; line-height: 1.5; }
.alt-link { text-align: center; margin-top: 18px; font-size: 14px; color: #8fa0b0; }
.alt-link a { color: #7fb3ff; }

/* ---- wizard ---- */
.card.wide { max-width: 760px; }
.stepper { display: flex; list-style: none; gap: 4px; margin-bottom: 28px; flex-wrap: wrap; padding: 0; }
.stepper li { flex: 1; min-width: 90px; text-align: center; font-size: 12.5px; padding: 10px 4px; border-bottom: 3px solid #2a3340; color: #8fa0b0; }
.stepper li a { color: #7bd88f; text-decoration: none; }
.stepper li.done { border-bottom-color: #7bd88f; }
.stepper li.current { color: #eef1f4; border-bottom-color: #3b82f6; font-weight: 600; }
fieldset { border: none; margin-bottom: 26px; padding: 0; }
fieldset legend { font-size: 13px; font-weight: 600; color: #8fa0b0; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px; }
.optional { color: #5b6672; font-weight: 400; text-transform: none; letter-spacing: 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 12px; }
.slug-wrap { display: flex; align-items: stretch; }
.slug-wrap .prefix, .slug-wrap .suffix { background: #0c1015; border: 1px solid #2a3340; color: #8fa0b0; padding: 10px 12px; font-size: 14px; white-space: nowrap; display: flex; align-items: center; }
.slug-wrap .prefix { border-radius: 8px 0 0 8px; border-right: none; }
.slug-wrap .suffix { border-radius: 0 8px 8px 0; border-left: none; }
.slug-wrap input { border-radius: 0; flex: 1; min-width: 0; }
.slug-status { min-height: 20px; font-size: 13px; margin-top: 6px; }
.slug-status.ok { color: #7bd88f; }
.slug-status.bad { color: #ff9c9c; }
.stub h2 { font-size: 20px; margin-bottom: 6px; }
@media (max-width: 600px) {
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

/* ---- profession picker (wizard step 2) ---- */

/* fieldsets refuse to shrink below their widest child by default (min-width: min-content)
   — one over-wide row inside a fieldset stretches the entire page sideways. This kills that. */
fieldset { min-width: 0; }

/* re-asserted here so this section stands on its own even if the earlier rule went missing */
.card.wide { max-width: 760px; }

.prof-search { width: 100%; background: #0c1015; color: #eef1f4; border: 1px solid #2a3340; border-radius: 8px; padding: 12px 14px; font-size: 16px; margin-bottom: 12px; font-family: inherit; }
.prof-search:focus { outline: none; border-color: #3b82f6; }

/* chips scroll sideways WITHIN their own strip — they must never widen the page */
.chip-row { display: flex; gap: 8px; overflow-x: auto; max-width: 100%; padding-bottom: 10px; margin-bottom: 12px; scrollbar-width: thin; }
.chip { flex-shrink: 0; white-space: nowrap; background: #171d24; border: 1px solid #2a3340; color: #aeb8c2; border-radius: 999px; padding: 7px 14px; font-size: 13.5px; cursor: pointer; font-family: inherit; }
.chip:hover { color: #eef1f4; }
.chip.active { background: #3b82f6; border-color: #3b82f6; color: #fff; font-weight: 600; }

.prof-count { font-size: 13px; color: #8fa0b0; margin-bottom: 10px; }

/* the trade list lives in its own fixed-height, internally-scrolling box —
   the page itself never becomes a mile long */
.results-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; max-height: 420px; overflow-y: auto; scrollbar-width: thin; padding-right: 4px; }
.prof-card { background: #171d24; border: 1px solid #2a3340; border-radius: 10px; padding: 14px; text-align: left; cursor: pointer; font-family: inherit; color: #eef1f4; display: flex; flex-direction: column; gap: 6px; transition: border-color .15s; min-width: 0; }
.prof-card:hover { border-color: #3b82f6; }
.prof-card.selected { border-color: #7bd88f; background: #14211a; box-shadow: 0 0 0 1px #7bd88f; }
.prof-name { font-weight: 600; font-size: 15px; }
.prof-cat { font-size: 12px; color: #8fa0b0; }
.prof-empty { grid-column: 1 / -1; color: #8fa0b0; font-size: 14px; padding: 10px 0; }

.picked-line { font-size: 15px; margin-bottom: 18px; color: #aeb8c2; }
.picked-line strong { color: #7bd88f; }

.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn:disabled:hover { background: #3b82f6; }

@media (max-width: 600px) {
    .results-grid { grid-template-columns: repeat(2, 1fr); max-height: 340px; }
}

/* ---- layout picker (wizard step 3) ---- */
.tpl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tpl-grid-scroll { max-height: 380px; overflow-y: auto; scrollbar-width: thin; padding-right: 6px; }
.tpl-grid.dense { grid-template-columns: repeat(4, 1fr); }

/* ---- icon family picker (design page) ---- */
.icon-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 10px; }
.icon-card { position: relative; display: block; background: #171d24; border: 1px solid #2a3340; border-radius: 10px; padding: 14px; cursor: pointer; transition: border-color .15s; text-align: center; }
.icon-card:hover { border-color: #3b82f6; }
.icon-card:has(input:checked) { border-color: #7bd88f; background: #14211a; box-shadow: 0 0 0 1px #7bd88f; }
.icon-card input { position: absolute; opacity: 0; pointer-events: none; }
.icon-demo { display: flex; justify-content: center; gap: 12px; color: #aeb8c2; min-height: 22px; margin-bottom: 8px; }
.icon-demo .nav-ico { width: 20px; height: 20px; }
.icon-name { font-size: 13px; font-weight: 600; color: #aeb8c2; }
.icon-card:has(input:checked) .icon-name { color: #7bd88f; }
@media (max-width: 600px) {
    .icon-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---- frame picker (design page) ---- */
.frame-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-bottom: 10px; }
.frame-card { position: relative; display: block; background: #171d24; border: 1px solid #2a3340; border-radius: 10px; padding: 12px 8px; cursor: pointer; transition: border-color .15s; text-align: center; }
.frame-card:hover { border-color: #3b82f6; }
.frame-card:has(input:checked) { border-color: #7bd88f; background: #14211a; box-shadow: 0 0 0 1px #7bd88f; }
.frame-card input { position: absolute; opacity: 0; pointer-events: none; }
.frame-demo { width: 34px; height: 34px; display: inline-block; background: #3b82f6; margin-bottom: 8px; }
.frame-demo-square { border-radius: 2px; }
.frame-demo-circle { border-radius: 50%; }
.frame-demo-arch { border-radius: 14px 14px 2px 2px; }
.frame-demo-rounded { border-radius: 9px; }
.frame-demo-hexagon { clip-path: polygon(25% 2%, 75% 2%, 98% 50%, 75% 98%, 25% 98%, 2% 50%); }
.frame-demo-star { clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
.frame-demo-heart { clip-path: polygon(50% 88%, 11% 58%, 2% 30%, 12% 12%, 30% 8%, 50% 20%, 70% 8%, 88% 12%, 98% 30%, 89% 58%); }
.frame-demo-blob { border-radius: 46% 54% 38% 62% / 55% 42% 58% 45%; }
.frame-demo-leaf { border-radius: 50% 2px 50% 2px; }
.frame-demo-ticket { clip-path: polygon(0 0, 44% 0, 44% 14%, 56% 14%, 56% 0, 100% 0, 100% 100%, 56% 100%, 56% 86%, 44% 86%, 44% 100%, 0 100%); }
.frame-demo-diamond { clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%); }
@media (max-width: 600px) {
    .frame-grid { grid-template-columns: repeat(4, 1fr); }
}
.tpl-card { position: relative; display: block; background: #171d24; border: 1px solid #2a3340; border-radius: 10px; padding: 12px; cursor: pointer; transition: border-color .15s; }
.tpl-card:hover { border-color: #3b82f6; }
.tpl-card:has(input:checked) { border-color: #7bd88f; background: #14211a; box-shadow: 0 0 0 1px #7bd88f; }
.tpl-card input { position: absolute; opacity: 0; pointer-events: none; }
.tpl-name { display: block; font-size: 13.5px; color: #aeb8c2; margin-top: 8px; font-weight: 600; }
.tpl-card:has(input:checked) .tpl-name { color: #7bd88f; }
.tpl-hint { display: block; font-size: 11.5px; color: #5b6672; margin-top: 2px; line-height: 1.4; }

/* wireframe building blocks */
.wire { background: #0c1015; border: 1px solid #2a3340; border-radius: 8px; height: 72px; padding: 10px; display: flex; gap: 6px; align-items: center; }
.wire.col { flex-direction: column; justify-content: center; align-items: stretch; gap: 5px; }
.wire.col.inner { border: none; background: transparent; padding: 0; height: auto; }
.wire.grid2 { display: grid; grid-template-columns: 1.1fr .9fr; }
.wr { background: #2a3340; border-radius: 3px; height: 10px; display: block; }
.wr.a { flex: 1; } .wr.b { flex: 2; } .wr.c { flex: 3; }
.wr.h3 { height: 3px; } .wr.h4 { height: 4px; } .wr.h6 { height: 6px; }
.wr.w25 { width: 25%; } .wr.w40 { width: 40%; } .wr.w50 { width: 50%; } .wr.w55 { width: 55%; }
.wr.w60 { width: 60%; } .wr.w70 { width: 70%; } .wr.w80 { width: 80%; } .wr.w90 { width: 90%; }
.wr.center { margin: 0 auto; }
.wr.pill { width: 30px; border-radius: 99px; background: #3b82f6; flex: none; }
.wr.line { height: 3px; width: 100%; background: #3b82f6; border-radius: 2px; flex: none; }
.wr.rule { height: 2px; width: 100%; background: #1c242e; flex: none; }
.wr.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.wr.panel { background: linear-gradient(135deg, #3b82f6, #0ea5e9); border-radius: 5px; height: 100%; }
.wr-row { display: flex; gap: 6px; align-items: center; width: 100%; }
.wr-row.c { justify-content: center; }
.cells { display: flex; flex-direction: column; gap: 4px; flex: 1; }
@media (max-width: 600px) {
    .tpl-grid, .tpl-grid.dense { grid-template-columns: 1fr; }
}

/* ---- style picker + live preview (wizard step 4) ---- */
.wiz-step-3 .card.wide, .wiz-step-4 .card.wide { max-width: 1280px; }
.theme-split { display: grid; grid-template-columns: minmax(330px, 420px) minmax(0, 1fr); gap: 26px; align-items: start; }
.theme-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.theme-card { min-width: 0; overflow: hidden; }
.theme-hint { overflow-wrap: break-word; }
.theme-card { position: relative; display: block; background: #171d24; border: 1px solid #2a3340; border-radius: 10px; padding: 10px; cursor: pointer; transition: border-color .15s; }
.theme-card:hover { border-color: #3b82f6; }
.theme-card:has(input:checked) { border-color: #7bd88f; background: #14211a; box-shadow: 0 0 0 1px #7bd88f; }
.theme-card input { position: absolute; opacity: 0; pointer-events: none; }
.theme-swatch { display: flex; height: 40px; border-radius: 7px; overflow: hidden; border: 1px solid #2a3340; }
.theme-swatch .sw { flex: 1; }
.theme-name { display: block; font-size: 13.5px; font-weight: 600; color: #aeb8c2; margin-top: 8px; }
.theme-card:has(input:checked) .theme-name { color: #7bd88f; }
.theme-hint { display: block; font-size: 11.5px; color: #5b6672; margin-top: 2px; line-height: 1.4; }
.autosave-note { min-height: 18px; font-size: 13px; color: #7bd88f; margin: 10px 0 0; }
.preview-pane { position: sticky; top: 16px; align-self: start; max-height: calc(100vh - 32px); overflow: hidden; display: flex; flex-direction: column; }
.preview-url { font-size: 13px; color: #8fa0b0; margin: 0 0 8px; }
.preview-url a { color: #7fb3ff; }
.preview-scale-wrap { position: relative; width: 100%; height: 78vh; max-height: calc(100vh - 60px); border: 1px solid #2a3340; border-radius: 10px; background: transparent; overflow: hidden; flex: none; }
.preview-frame { width: 100%; height: 78vh; transform-origin: top left; border: none; background: transparent; }
@media (max-width: 900px) {
    .theme-split { grid-template-columns: 1fr; }
    .preview-pane { position: static; order: -1; max-height: none; }
    /* mobile: native-width preview, no scaling — real phone rendering,
       really scrollable */
    .preview-scale-wrap { height: 55vh; }
    .preview-frame { width: 100%; height: 100%; transform: none; }
}

/* ---- pages step (wizard step 5) ---- */
/* step 5 needs the wide card too — the services editor was crammed into a
   760px card next to the page list (the squashed price/mins bug) */
.wiz-step-5 .card.wide { max-width: 1280px; }
.step5-split { display: grid; grid-template-columns: 250px 1fr; gap: 22px; align-items: start; }
.page-list { background: #171d24; border: 1px solid #2a3340; border-radius: 10px; padding: 16px; }
.page-list h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .8px; color: #8fa0b0; margin: 0 0 10px; }
.page-list ul { list-style: none; padding: 0; margin: 0 0 18px; }
.page-list li { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 8px; }
.page-list li.active { background: #14211a; }
.page-list li a { color: #aeb8c2; text-decoration: none; font-size: 14.5px; flex: 1; }
.page-list li a:hover { color: #eef1f4; }
.page-list li.active a { color: #7bd88f; font-weight: 600; }
.badge-home { font-size: 10px; background: #2a3340; color: #8fa0b0; padding: 2px 6px; border-radius: 4px; }
.mini-btn { background: transparent; border: 1px solid #2a3340; color: #8fa0b0; border-radius: 6px; padding: 3px 9px; font-size: 12px; cursor: pointer; font-family: inherit; }
.mini-btn:hover { color: #ff9c9c; border-color: #ff9c9c; }
.mini-note { font-size: 11.5px; color: #5b6672; margin: 0 0 10px; line-height: 1.5; }
.mini-note a { color: #7fb3ff; }
.add-page .field { margin-bottom: 10px; }
.add-page select { width: 100%; background: #0c1015; color: #eef1f4; border: 1px solid #2a3340; border-radius: 8px; padding: 10px 12px; font-size: 14px; font-family: inherit; }

.sec-edit { background: #171d24; border: 1px solid #2a3340; border-radius: 10px; padding: 16px; margin-bottom: 14px; }
.struct-note { background: #14211a; border: 1px solid #2a4a33; color: #7bd88f; font-size: 13px; border-radius: 8px; padding: 10px 12px; margin: 0 0 12px; line-height: 1.5; }
.sec-edit-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.sec-edit-head strong { font-size: 12.5px; text-transform: uppercase; letter-spacing: .8px; color: #8fa0b0; }
.sec-edit textarea { width: 100%; background: #0c1015; color: #eef1f4; border: 1px solid #2a3340; border-radius: 8px; padding: 10px 12px; font-size: 15px; font-family: inherit; min-height: 90px; resize: vertical; }
.sec-edit textarea:focus { outline: none; border-color: #3b82f6; }
.add-section-row { display: flex; gap: 10px; margin: 14px 0 16px; align-items: center; }
.add-section-row select { flex: 1; background: #0c1015; color: #eef1f4; border: 1px solid #2a3340; border-radius: 8px; padding: 10px 12px; font-size: 14px; font-family: inherit; }

.svc-edit-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 2fr) minmax(84px, 110px) minmax(150px, 190px) auto; gap: 10px; align-items: end; background: #171d24; border: 1px solid #2a3340; border-radius: 10px; padding: 14px; margin-bottom: 10px; }
.svc-edit-row .field { margin-bottom: 0; }
.svc-edit-row .mini-btn { height: 38px; }
.svc-time { display: flex; gap: 6px; }
.svc-time input { flex: 1 1 0; min-width: 0; width: auto; }
.svc-time select { flex: 0 0 auto; background: #0c1015; color: #eef1f4; border: 1px solid #2a3340; border-radius: 8px; padding: 10px 8px; font-size: 14px; }
.step5-continue { margin-top: 22px; text-align: right; }
@media (max-width: 860px) {
    .step5-split { grid-template-columns: minmax(0, 1fr); }
    .step5-split > * { min-width: 0; max-width: 100%; }
    .page-list li { flex-wrap: wrap; }
    .svc-edit-row { grid-template-columns: 1fr 1fr; }
    .svc-edit-row .field input { width: 100%; }
    /* the add-section row: select and button stack on phones — the select's
       content width + button can't share one line */
    .add-section-row { flex-wrap: wrap; }
    .add-section-row select { flex: 1 1 100%; min-width: 0; }
    .add-section-row .btn { flex: 1 1 100%; }
    /* the image thumb + its button wrap instead of overflowing */
    .cur-img-wrap { flex-wrap: wrap; }
    .cur-img-wrap img { max-width: 100%; }
}

/* ---- image upload fields ---- */
.cur-img-wrap { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 8px; }
.cur-img { max-width: 100%; max-height: 140px; border-radius: 8px; border: 1px solid #2a3340; display: block; }
input[type="file"] { color: #aeb8c2; font-size: 14px; width: 100%; }
input[type="file"]::file-selector-button { background: #171d24; border: 1px solid #2a3340; color: #aeb8c2; border-radius: 8px; padding: 8px 14px; cursor: pointer; font-family: inherit; margin-right: 10px; }
input[type="file"]::file-selector-button:hover { color: #eef1f4; }
.flash-error { background: rgba(255,99,99,.08); border: 1px solid rgba(255,99,99,.35); color: #ff9c9c; border-radius: 8px; padding: 12px 14px; margin-bottom: 18px; font-size: 14px; }

/* ---- plan picker (wizard step 6) ---- */
.wiz-step-6 .card.wide { max-width: 860px; }
.plan-card { position: relative; display: grid; grid-template-columns: 1fr 150px; gap: 16px; background: #171d24; border: 1px solid #2a3340; border-radius: 10px; padding: 18px; margin-bottom: 12px; cursor: pointer; transition: border-color .15s; }
.plan-card:hover { border-color: #3b82f6; }
.plan-card:has(input:checked) { border-color: #7bd88f; background: #14211a; box-shadow: 0 0 0 1px #7bd88f; }
.plan-card > input { position: absolute; opacity: 0; pointer-events: none; }
.plan-name { display: block; font-size: 16px; color: #eef1f4; }
.plan-card:has(input:checked) .plan-name { color: #7bd88f; }
.plan-blurb { display: block; font-size: 13.5px; color: #8fa0b0; margin: 4px 0 0; }
.plan-price { text-align: right; display: flex; flex-direction: column; justify-content: center; }
.plan-price strong { font-size: 24px; color: #eef1f4; }
.plan-price span { font-size: 12.5px; color: #8fa0b0; }
.plan-trial { color: #7bd88f; font-weight: 600; }
.domain-search { display: flex; gap: 8px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.domain-search input { background: #0c1015; color: #eef1f4; border: 1px solid #2a3340; border-radius: 8px; padding: 10px 12px; font-size: 15px; flex: 1; min-width: 140px; font-family: inherit; }
.domain-suffix { color: #8fa0b0; font-size: 15px; }
.domain-search .slug-status { width: 100%; min-height: 18px; }
@media (max-width: 640px) {
    .plan-card { grid-template-columns: 1fr; }
    .plan-price { text-align: left; flex-direction: row; align-items: baseline; gap: 8px; }
}

/* ---- gallery editor ---- */
.gal-edit { display: flex; flex-direction: column; gap: 12px; }
.gal-item { background: #0c1015; border: 1px solid #2a3340; border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.gal-thumbs { display: flex; gap: 10px; flex-wrap: wrap; }
.gal-thumb { display: flex; flex-direction: column; gap: 4px; font-size: 11px; color: #8fa0b0; }
.gal-thumb img { width: 110px; height: 84px; object-fit: cover; border-radius: 6px; }
.gal-add { display: flex; flex-direction: column; gap: 8px; }
.gal-add label { font-size: 13px; color: #aeb8c2; display: flex; flex-direction: column; gap: 4px; }
/* business type picker (wizard step 1) — scoped under .biztype-grid so it
   beats the generic ".field label" / ".field input" rules */
.field-label { display: block; font-size: 13px; font-weight: 600; color: #aeb8c2; margin-bottom: 6px; letter-spacing: 0.3px; }
.biztype-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.biztype-grid .biztype-card { position: relative; display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 12px 14px; background: #171d24; border: 1px solid #2a3340; border-radius: 10px; cursor: pointer; transition: border-color .15s; font-size: 13px; font-weight: 400; letter-spacing: 0; }
.biztype-grid .biztype-card:hover { border-color: #3b82f6; }
.biztype-grid .biztype-card:has(input:checked) { border-color: #7bd88f; background: #14211a; box-shadow: 0 0 0 1px #7bd88f; }
.biztype-grid .biztype-card:has(input:focus-visible) { outline: 2px solid #3b82f6; outline-offset: 2px; }
.biztype-grid .biztype-card input { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; padding: 0; border: 0; }
.biztype-grid .biztype-name { display: block; font-size: 15px; font-weight: 600; color: #eef1f4; letter-spacing: 0; }
.biztype-grid .biztype-card:has(input:checked) .biztype-name { color: #7bd88f; }
.biztype-grid .biztype-blurb { display: block; font-size: 13px; font-weight: 400; line-height: 1.35; color: #8fa0b0; }
.biztype-grid + .mini-note { margin-top: 10px; }
@media (max-width: 560px) { .biztype-grid { grid-template-columns: 1fr; } }

/* shop item editor */
.shop-edit { display: flex; flex-direction: column; gap: 12px; }
.shop-item, .shop-add { background: #0c1015; border: 1px solid #2a3340; border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.shop-add { border-style: dashed; }
.shop-item-photo { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.shop-item-photo img, .shop-photo-empty { width: 96px; height: 96px; object-fit: cover; border-radius: 8px; background: #1a212b; flex: none; }
.shop-photo-empty { display: flex; align-items: center; justify-content: center; font-size: 11px; color: #8fa0b0; text-align: center; padding: 6px; }
.shop-item-photo input[type=file], .shop-add input[type=file] { font-size: 13px; color: #aeb8c2; max-width: 100%; }
.shop-row { display: grid; grid-template-columns: 1fr 130px; gap: 10px; }
@media (max-width: 560px) { .shop-row { grid-template-columns: 1fr; } }

/* ---- nav style toggle (design page) ---- */
.navstyle-card { margin-bottom: 10px; }
.navstyle-card input { position: absolute; opacity: 0; pointer-events: none; }
.navstyle-card:has(input:checked) { border-color: #7bd88f; background: #14211a; box-shadow: 0 0 0 1px #7bd88f; }
.navstyle-card:has(input:checked) .plan-name { color: #7bd88f; }

/* ---- nav toggle (page list) ---- */
.mini-btn.navtoggle { font-size: 13px; }
.mini-btn.navtoggle.on { color: #7bd88f; border-color: #2a4a33; }
.mini-btn.navtoggle.off { color: #8fa0b0; opacity: .6; }
.page-list li { flex-wrap: wrap; }

@media (max-width: 900px) {
    .matrix-frame-wrap.preview-scale-wrap { height: 80vh; }
    .matrix-frame-wrap .preview-frame { width: 100%; height: 100%; transform: none; }
}

/* ---- hero picker (wizard step 2) ---- */
.hero-picker { border-top: 1px solid #2a3340; margin-top: 18px; padding-top: 14px; }
.hero-stock-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin: 12px 0; }
.hero-stock-card { padding: 0; border: 2px solid #2a3340; border-radius: 10px; overflow: hidden; cursor: pointer; background: #0c1015; max-height: 110px; }
.hero-stock-card img { width: 100%; height: 96px; object-fit: cover; display: block; }
.hero-stock-card.selected { border-color: #7bd88f; box-shadow: 0 0 0 1px #7bd88f; }
.hero-upload-label { display: block; font-size: 13.5px; color: #aeb8c2; margin-top: 10px; }

/* ---- layout picker split (wizard step 3) ---- */
.layout-split { grid-template-columns: minmax(330px, 480px) minmax(0, 1fr); }
.layout-picker-col fieldset { margin-bottom: 18px; }
/* mobile: single column — .layout-split's rule above sits after the
   theme-split media query in the file, so it needs its own override to
   yield on phones (later-in-file wins at equal specificity) */
@media (max-width: 900px) {
    .layout-split { grid-template-columns: 1fr; }
    .layout-picker-col { order: 1; }
    .layout-split .preview-pane { order: 2; max-height: none; }
}

/* ---- full template picker (design page) ---- */
.full-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 10px; }
.full-card { position: relative; display: block; background: #171d24; border: 1px solid #2a3340; border-radius: 10px; padding: 14px; cursor: pointer; transition: border-color .15s; }
.full-card:hover { border-color: #3b82f6; }
.full-card.selected { border-color: #7bd88f; background: #14211a; box-shadow: 0 0 0 1px #7bd88f; }
.full-card input { position: absolute; opacity: 0; pointer-events: none; }
.full-name { display: block; font-size: 14.5px; font-weight: 600; color: #aeb8c2; }
.full-card.selected .full-name { color: #7bd88f; }
.full-hint { display: block; font-size: 11.5px; color: #5b6672; margin-top: 3px; line-height: 1.4; }
@media (max-width: 600px) {
    .full-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---- template drawers (wizard step 3 + design page) ---- */
.drawer { border: 1px solid #2a3340; border-radius: 10px; margin-bottom: 10px; background: #171d24; overflow: hidden; }
.drawer-head { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; background: transparent; border: none; color: #eef1f4; font-family: inherit; font-size: 15px; font-weight: 600; cursor: pointer; text-align: left; }
.drawer-head:hover { background: #1b2330; }
.drawer-head .drawer-title { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.drawer-head .drawer-summary { font-size: 12.5px; font-weight: 400; color: #8fa0b0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drawer-head .drawer-arrow { flex: none; width: 12px; height: 12px; color: #8fa0b0; transition: transform .25s ease; }
.drawer.open .drawer-arrow { transform: rotate(180deg); color: #7bd88f; }
.drawer-body { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.drawer.open .drawer-body { max-height: 1400px; }
/* icon families grid: 2 columns at all sizes inside drawers — 4-across
   clipped the last row past the drawer body's height on large screens */
.drawer .icon-grid { grid-template-columns: repeat(2, 1fr); }
.drawer-inner { padding: 16px; border-top: 1px solid #232b36; }
/* the pickers inside keep their existing grids; just spacing */
.drawer-inner fieldset { margin-bottom: 0; }
.drawer-note { font-size: 12px; color: #5b6672; margin: 0 0 10px; line-height: 1.5; }

/* wizard reassurance note (step 3) */
.wizard-note { background: #14211a; border: 1px solid #2a4a33; color: #a8d5b3; border-radius: 10px; padding: 14px 16px; margin-bottom: 16px; font-size: 14px; line-height: 1.6; }
.wizard-note strong { color: #7bd88f; }

/* mode switch: complete website vs mix and match */
.mode-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mode-btn { padding: 14px 12px; border: 1px solid #2a3340; border-radius: 10px; background: #171d24; color: #aeb8c2; font-family: inherit; font-size: 14.5px; font-weight: 600; cursor: pointer; transition: border-color .15s, background .15s; }
.mode-btn:hover { border-color: #3b82f6; }
.mode-btn.active { border-color: #7bd88f; background: #14211a; color: #7bd88f; box-shadow: 0 0 0 1px #7bd88f; }

/* ---- typeface picker ---- */
.typeface-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 10px; }
.typeface-card { position: relative; display: block; background: #171d24; border: 1px solid #2a3340; border-radius: 10px; padding: 12px; cursor: pointer; text-align: center; transition: border-color .15s; }
.typeface-card:hover { border-color: #3b82f6; }
.typeface-card.selected, .typeface-card:has(input:checked) { border-color: #7bd88f; background: #14211a; box-shadow: 0 0 0 1px #7bd88f; }
.typeface-card input { position: absolute; opacity: 0; pointer-events: none; }
.tf-demo { display: flex; gap: 8px; justify-content: center; margin-bottom: 6px; }
.tf-display { font-size: 22px; font-weight: 700; color: #eef1f4; }
.tf-body { font-size: 22px; color: #8fa0b0; }
.tf-name { font-size: 12px; color: #aeb8c2; font-weight: 600; }
.tf-default .tf-display, .tf-default .tf-body { font-family: Georgia, serif; }
.tf-elegant .tf-display { font-family: 'Cormorant Garamond', serif; } .tf-elegant .tf-body { font-family: 'Jost', sans-serif; }
.tf-modern .tf-display { font-family: 'Space Grotesk', sans-serif; } .tf-modern .tf-body { font-family: 'Inter', sans-serif; }
.tf-editorial .tf-display { font-family: 'Roboto Slab', serif; } .tf-editorial .tf-body { font-family: 'Source Sans 3', sans-serif; }
.tf-soft .tf-display { font-family: 'Quicksand', sans-serif; } .tf-soft .tf-body { font-family: 'Nunito', sans-serif; }
.tf-classic .tf-display { font-family: 'Playfair Display', serif; } .tf-classic .tf-body { font-family: 'Lora', serif; }
.tf-bold .tf-display { font-family: 'Archivo Black', sans-serif; } .tf-bold .tf-body { font-family: 'Archivo', sans-serif; }
.tf-condensed .tf-display { font-family: 'Oswald', sans-serif; } .tf-condensed .tf-body { font-family: 'PT Sans', sans-serif; }
@media (max-width: 600px) { .typeface-grid { grid-template-columns: repeat(2, 1fr); } }