/* FlameBirds Digital Arc I — neutral studio UI: the only strong colours on screen are the materials. */
:root {
  --paper: #F4F3EF; --surface: #FFFFFF; --ink: #16181D; --muted: #5B6070; --line: #E2E0DA;
  --soft: #EEECE6; --warn-bg: #FDF3E2; --warn-line: #F0D9AE; --ok: #2E7D4F; --err: #B42318;
  --r-s: 10px; --r-m: 12px; --r-l: 20px;
  --head: "Space Grotesk", system-ui, sans-serif; --body: "IBM Plex Sans", system-ui, sans-serif; --mono: "IBM Plex Mono", ui-monospace, monospace;
}
* { box-sizing: border-box; min-width: 0; }
html, body { height: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.5 var(--body); }
button, input { font: inherit; color: inherit; }
h2, h3 { font-family: var(--head); margin: 0; }
[hidden] { display: none !important; }

/* top bar */
.top { display: flex; align-items: center; gap: 16px; padding: 12px 24px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.brand { display: flex; align-items: center; gap: 10px; flex: 1; }
.brand strong { font-family: var(--head); font-size: 18px; }
.crumb { color: var(--muted); font-size: 13px; }
.logo { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; width: 22px; height: 22px; }
.logo i { border-radius: 3px; } .logo i:nth-child(1){background:#FFC400} .logo i:nth-child(2){background:#1E3CFF} .logo i:nth-child(3){background:#E0129A} .logo i:nth-child(4){background:#16A34A}
.logo.big { width: 40px; height: 40px; gap: 3px; margin-bottom: 8px; }
.steps { display: flex; gap: 6px; }
.steps button { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--surface); padding: 6px 14px 6px 6px; border-radius: 999px; cursor: pointer; font-size: 14px; color: var(--muted); }
.steps button b { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--soft); font: 600 12px var(--head); color: var(--ink); }
.steps button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.steps button.on b { background: #fff; }
.steps button.done b { background: var(--ok); color: #fff; }
.steps button:disabled { cursor: default; opacity: .55; }
.top-right { flex: 1; display: flex; justify-content: flex-end; align-items: center; gap: 12px; }
.quota { font: 13px var(--mono); color: var(--muted); }

/* layout */
.layout { display: grid; grid-template-columns: 220px minmax(0, 1fr) 340px; gap: 24px; padding: 24px; align-items: start; }
.left h3, .label { font: 600 11px var(--body); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 0 0 6px; }
.hint { font-size: 13px; color: var(--muted); margin: 0 0 12px; }
.palette { list-style: none; margin: 0 0 14px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 2px 8px; }
.palette li { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 8px; font-size: 13px; cursor: pointer; }
.palette li:hover { background: var(--soft); }
.palette li.found { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-weight: 600; }
.palette li small { display: none; }
.palette li:hover small { display: inline; font: 11px var(--mono); color: var(--muted); margin-left: auto; }
.sw { width: 14px; height: 14px; border-radius: 4px; flex: none; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.sw.lg { width: 28px; height: 28px; border-radius: 7px; }
.link { background: none; border: 0; padding: 0; text-decoration: underline; color: var(--ink); cursor: pointer; font-size: 13px; }

/* stage */
.stage-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; gap: 12px; flex-wrap: wrap; }
.tabs { display: flex; background: var(--soft); border-radius: var(--r-s); padding: 3px; }
.tabs button { border: 0; background: none; padding: 6px 14px; border-radius: 8px; cursor: pointer; font-size: 14px; color: var(--muted); }
.tabs button.on { background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1px var(--line); }
.tabs button:disabled { opacity: .45; cursor: default; }
.tools { display: flex; gap: 8px; }
.canvas-box { background: #E9E7E1; border-radius: var(--r-l); min-height: 520px; display: grid; place-items: center; position: relative; overflow: hidden; }
.drop { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 48px; color: var(--muted); cursor: pointer; border: 2px dashed #CFCBC2; border-radius: var(--r-l); margin: 24px; width: calc(100% - 48px); min-height: 472px; justify-content: center; }
.drop strong { font: 600 20px var(--head); color: var(--ink); }
.drop.over { border-color: var(--ink); background: #F1EFEA; }
.drop-icon { width: 64px; height: 64px; border-radius: 14px; background: conic-gradient(#FFC400 0 25%, #1E3CFF 0 50%, #16A34A 0 75%, #E0129A 0); margin-bottom: 8px; }
.viewer { position: relative; width: 100%; height: 100%; min-height: 520px; display: grid; place-items: center; padding: 48px 24px 24px; }
.viewer canvas#paintedCanvas, .result-wrap { max-width: 100%; max-height: 72vh; }
#paintedCanvas { display: block; border-radius: 6px; cursor: crosshair; }
.result-wrap { position: relative; line-height: 0; }
.result-wrap img { max-width: 100%; max-height: 72vh; border-radius: 6px; display: block; }
.before { position: absolute; inset: 0; overflow: hidden; clip-path: inset(0 50% 0 0); }
.before img { width: 100%; height: 100%; object-fit: fill; }
#compareRange { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; }
.result-wrap .divider { position: absolute; top: 0; bottom: 0; width: 2px; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.2); pointer-events: none; }
#outlineCanvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.tag { position: absolute; top: 14px; left: 14px; background: var(--surface); border-radius: 999px; padding: 4px 12px; font-size: 12px; line-height: 1.5; box-shadow: 0 0 0 1px var(--line); }
.tag.right { left: auto; right: 14px; }
.tag.test { background: var(--warn-bg); box-shadow: 0 0 0 1px var(--warn-line); }
.busy { position: absolute; inset: 0; background: rgba(244,243,239,.86); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; color: var(--muted); }
.busy strong { font: 600 18px var(--head); color: var(--ink); }
.spinner { width: 40px; height: 40px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--ink); animation: spin 1s linear infinite; margin-bottom: 8px; }
@keyframes spin { to { transform: rotate(1turn); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }
.history { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 4px 12px; font-size: 13px; cursor: pointer; }
.chip b { font: 500 12px var(--mono); color: var(--muted); margin-right: 6px; }
.chip.on { border-color: var(--ink); }

/* right panel */
.panel { background: var(--surface); border-radius: var(--r-l); padding: 22px; box-shadow: 0 0 0 1px var(--line); position: sticky; top: 84px; }
.panel .kicker { font: 500 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.panel h2 { font-size: 24px; line-height: 1.15; margin: 6px 0 6px; }
.panel .sub { color: var(--muted); font-size: 14px; margin: 0 0 16px; }
.rows { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.row { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: var(--r-m); padding: 8px 10px; background: var(--surface); }
.row.click { cursor: pointer; } .row.click:hover, .row.sel { border-color: var(--ink); }
.row .name { flex: 1; font-weight: 500; }
.row .meta { font: 12px var(--mono); color: var(--muted); }
.slot { width: 64px; height: 48px; border-radius: 8px; border: 1.5px dashed #CFCBC2; display: grid; place-items: center; font-size: 12px; color: var(--muted); cursor: pointer; overflow: hidden; position: relative; flex: none; background: #FAF9F6; }
.slot.filled { border: 0; }
.slot img { width: 100%; height: 100%; object-fit: cover; }
.slot.over { border-color: var(--ink); }
.x { position: absolute; top: 2px; right: 2px; width: 18px; height: 18px; border-radius: 50%; border: 0; background: rgba(22,24,29,.8); color: #fff; font-size: 12px; line-height: 18px; cursor: pointer; padding: 0; }
.ref-row .name small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }
.progress { height: 6px; background: var(--soft); border-radius: 99px; overflow: hidden; margin: -4px 0 14px; }
.progress i { display: block; height: 100%; background: var(--ok); border-radius: 99px; transition: width .3s; }
.note { border-radius: var(--r-m); padding: 10px 12px; font-size: 13px; margin-bottom: 14px; }
.note.warn { background: var(--warn-bg); border: 1px solid var(--warn-line); }
.row .name small.warn-text { color: #8A5A00; }
html[data-theme="dark"] .row .name small.warn-text { color: #F3D79B; }
.note.info { background: var(--soft); }
.note.err { background: #FDECEA; border: 1px solid #F5C2BC; color: var(--err); }
.group { margin-bottom: 14px; }
.group > span { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 12px; cursor: pointer; font-size: 13px; }
.seg button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.seg button:disabled { opacity: .4; cursor: default; }
.mood-slot { display: flex; align-items: center; gap: 10px; border: 1px dashed #CFCBC2; border-radius: var(--r-m); padding: 8px; cursor: pointer; font-size: 13px; color: var(--muted); }
.mood-slot .slot { width: 72px; height: 54px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; background: var(--ink); color: #fff; border-radius: var(--r-s); padding: 12px 18px; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn.block { width: 100%; }
.btn.ghost { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); font-weight: 500; }
.btn.small { padding: 6px 12px; font-size: 13px; }
.btn:disabled { opacity: .4; cursor: default; }
.btn.on { box-shadow: inset 0 0 0 1.5px var(--ink); }
.stack-btns { display: flex; flex-direction: column; gap: 8px; }
.fine { font-size: 12px; color: var(--muted); margin: 10px 0 0; }

/* dialogs */
dialog { border: 0; border-radius: var(--r-l); padding: 0; max-width: 560px; width: calc(100% - 32px); box-shadow: 0 20px 60px rgba(0,0,0,.25); }
dialog::backdrop { background: rgba(22,24,29,.45); }
.dialog { padding: 28px; }
.dialog.narrow { max-width: 380px; margin: auto; text-align: left; }
.dialog h2 { font-size: 22px; margin-bottom: 12px; }
.dialog ol { padding-left: 20px; margin: 0; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.dialog input { width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-s); font-size: 16px; margin: 8px 0; }
.dialog-actions { display: flex; justify-content: flex-end; margin-top: 18px; }
.error { color: var(--err); font-size: 13px; }

@media (max-width: 1100px) {
  .layout { grid-template-columns: minmax(0, 1fr) 320px; }
  .left { grid-column: 1 / -1; order: 3; }
  .palette { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .layout { grid-template-columns: 1fr; padding: 14px; }
  .steps button { font-size: 0; padding: 4px; } .steps button b { font-size: 12px; }
  .panel { position: static; }
  .palette { grid-template-columns: repeat(2, 1fr); }
  .crumb, .quota { display: none; }
}

/* ---------- accounts, pages, admin ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(1200px 600px at 80% -10%, #E9E4D6 0, transparent 60%), var(--paper); }
.auth-card { width: min(420px, 100%); background: var(--surface); border-radius: var(--r-l); padding: 32px; box-shadow: 0 0 0 1px var(--line), 0 24px 60px rgba(22,24,29,.08); }
.auth-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.auth-brand .logo.big { margin: 0; width: 32px; height: 32px; }
.auth-brand strong { font: 700 22px var(--head); }
.auth h1, .page h1 { font: 600 28px/1.15 var(--head); margin: 0 0 6px; }
.auth-tabs { margin: 6px 0 18px; width: 100%; }
.auth-tabs button { flex: 1; }
.form { display: flex; flex-direction: column; gap: 12px; }
.form label, .dialog label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; }
.form label small, .dialog label small { font-weight: 400; color: var(--muted); }
.form input, .dialog label input { padding: 11px 12px; border: 1px solid var(--line); border-radius: var(--r-s); font-size: 16px; background: #fff; font-weight: 400; }
.form input:focus, .dialog input:focus, .users input:focus { outline: 2px solid var(--ink); outline-offset: 1px; }
.ok { color: var(--ok); font-size: 13px; }
.home { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }

.menu { display: flex; gap: 4px; }
.menu a { color: var(--muted); text-decoration: none; font-size: 14px; padding: 6px 10px; border-radius: 8px; }
.menu a:hover { background: var(--soft); color: var(--ink); }
.menu a.on { color: var(--ink); font-weight: 600; background: var(--soft); }
.avatar { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--ink); color: #fff; font: 600 13px var(--head); cursor: pointer; flex: none; }
.top-right { position: relative; }
.dropdown { position: absolute; right: 0; top: 46px; background: var(--surface); border-radius: var(--r-m); box-shadow: 0 0 0 1px var(--line), 0 12px 30px rgba(0,0,0,.12); padding: 6px; min-width: 220px; z-index: 20; display: flex; flex-direction: column; }
.dropdown .who { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; display: flex; flex-direction: column; font-size: 13px; }
.dropdown .who span { color: var(--muted); overflow-wrap: anywhere; }
.dropdown button { text-align: left; border: 0; background: none; padding: 9px 10px; border-radius: 8px; cursor: pointer; font-size: 14px; }
.dropdown button:hover { background: var(--soft); }

.page { max-width: 1240px; margin: 0 auto; padding: 32px 24px 64px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head .sub { color: var(--muted); margin: 0; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.card { background: var(--surface); border-radius: var(--r-l); overflow: hidden; box-shadow: 0 0 0 1px var(--line); display: flex; flex-direction: column; }
.card .thumb { aspect-ratio: 4 / 3; background: #E9E7E1; display: block; }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card .meta { padding: 12px 14px 4px; display: flex; flex-direction: column; gap: 6px; }
.card .meta b { font: 600 15px var(--head); }
.card .meta span { color: var(--muted); font-size: 13px; }
.card .swatches { display: flex; gap: 4px; flex-wrap: wrap; }
.card .actions { display: flex; gap: 8px; padding: 10px 14px 14px; }
.card .actions .btn { flex: 1; }
.empty { grid-column: 1 / -1; background: var(--surface); border-radius: var(--r-l); padding: 48px; text-align: center; color: var(--muted); box-shadow: 0 0 0 1px var(--line); }
.empty b { display: block; color: var(--ink); font: 600 18px var(--head); margin-bottom: 6px; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { background: var(--surface); border-radius: var(--r-m); padding: 14px 16px; box-shadow: 0 0 0 1px var(--line); }
.stat b { display: block; font: 600 26px var(--head); }
.stat span { color: var(--muted); font-size: 13px; }
.table-wrap { background: var(--surface); border-radius: var(--r-l); box-shadow: 0 0 0 1px var(--line); overflow-x: auto; }
.users { width: 100%; border-collapse: collapse; font-size: 14px; }
.users th { text-align: left; font: 600 11px var(--body); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.users td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.users tr:last-child td { border-bottom: 0; }
.users td.num { text-align: right; font-family: var(--mono); white-space: nowrap; }
.users th.num { text-align: right; }
.users .person b { display: block; } .users .person span { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.users input { width: 74px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; font: 14px var(--mono); text-align: right; }
.users .acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge.active { background: #E3F2E8; color: var(--ok); }
.badge.pending { background: var(--warn-bg); color: #8A5A00; }
.badge.disabled { background: #F1F0EC; color: var(--muted); }
.badge.admin { background: var(--ink); color: #fff; margin-left: 6px; }
.temp { display: block; font: 500 20px var(--mono); background: var(--soft); padding: 14px; border-radius: var(--r-s); text-align: center; margin: 10px 0; user-select: all; }
.dialog-actions.gap { gap: 8px; }
.dialog p { font-size: 14px; }

@media (max-width: 1100px) { .menu a { padding: 6px 6px; } }
@media (max-width: 760px) {
  .menu { display: none; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .users thead { display: none; }
  .users tr { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 12px; border-bottom: 1px solid var(--line); }
  .users td { border: 0; padding: 2px 0; }
  .users td.person, .users td.actcell { grid-column: 1 / -1; }
  .users td.num { text-align: left; }
  .users .acts { justify-content: flex-start; }
}
.menu a, .quota, .btn, .steps button { white-space: nowrap; }
.logo { flex: none; }
.card .actions .btn { padding: 8px 10px; }
@media (max-width: 760px) {
  .users td[data-l]::before { content: attr(data-l) ": "; color: var(--muted); font-family: var(--body); }
}

.used { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; }
.palette li .pn { flex: 1; }
.palette li small { display: inline !important; font: 10px var(--mono); color: var(--muted); margin-left: auto; white-space: nowrap; }
.palette { grid-template-columns: 1fr; }
.palette-rows { max-height: 52vh; overflow-y: auto; padding-right: 4px; }
.ref-row.off { opacity: .45; padding-block: 5px; }
.ref-row.off .sw.lg { width: 20px; height: 20px; }
.ref-row.need { border-color: var(--ink); }
.ref-row.done { border-color: #BFE0CB; background: #F6FBF8; }
@media (max-width: 1100px) { .palette { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 760px) { .palette { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.sw.strip { width: 34px; height: 12px; border-radius: 3px; }
.palette { grid-template-columns: 1fr !important; }
@media (max-width: 1100px) { .palette { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; } }
@media (max-width: 760px) { .palette { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }
.sw.lg.shade { width: 34px; border-radius: 7px; }
.row .name small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }
.link.mini { font-size: 12px; color: var(--muted); margin-top: 2px; display: inline-block; }
.ref-row.ign { background: #F7F6F2; border-style: dashed; }
#pickBtn svg { margin-right: 2px; }
#paintedCanvas.picking { cursor: copy; outline: 2px dashed var(--ink); outline-offset: 4px; }

/* credits */
.quota a { color: inherit; text-decoration: none; border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; }
.quota a:hover { border-color: var(--ink); color: var(--ink); }
.models { display: grid; gap: 8px; }
.model { text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-m); padding: 10px 12px; cursor: pointer; display: grid; gap: 2px; font: inherit; }
.model b { font: 600 14px var(--head); } .model small { color: var(--muted); font-size: 12px; }
.model span { font-size: 12.5px; } .model em { font: normal 12px var(--mono); color: var(--muted); margin-top: 4px; }
.model.on { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.h2 { font: 600 18px var(--head); margin: 28px 0 10px; }
.plans { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.plan { background: var(--surface); border-radius: var(--r-l); box-shadow: 0 0 0 1px var(--line); padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.plan.on { box-shadow: 0 0 0 2px var(--ink); }
.plan b { font: 600 16px var(--head); } .plan .price { font: 600 26px var(--head); } .plan .price small { font-size: 13px; color: var(--muted); font-weight: 400; }
.plan .cr { font-weight: 600; font-size: 14px; } .plan span { color: var(--muted); font-size: 13px; } .plan em { font-style: normal; font-size: 12px; font-weight: 600; color: var(--ok); }
.users td.plus { color: var(--ok); }
.users select { padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; font: 13px var(--body); background: var(--surface); }
.users small.muted { display: block; color: var(--muted); font-size: 12px; }
.addcr { display: flex; gap: 6px; align-items: center; }
@media (max-width: 900px) { .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.model-select { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-m); font: 500 14px var(--body); background: var(--surface); color: var(--ink); cursor: pointer; }
.model-select:focus { outline: 2px solid var(--ink); outline-offset: 1px; }
.model-note { font-size: 12.5px; margin: 8px 2px 0; color: var(--ink); }
.model-note span { font: 12px var(--mono); color: var(--muted); }
.users td.num small.muted { font-family: var(--body); }

/* output dropdown */
.output { border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); overflow: hidden; }
.output.open { border-color: var(--ink); }
.output-head { width: 100%; display: flex; align-items: center; gap: 8px; padding: 11px 12px; background: none; border: 0; cursor: pointer; font: inherit; text-align: left; }
.output-head span { font-weight: 600; font-size: 14px; }
.output-head em { font-style: normal; color: var(--muted); font: 12.5px var(--mono); margin-left: auto; }
.output-head b { transition: transform .15s; font-size: 12px; }
.output.open .output-head b { transform: rotate(180deg); }
.output-body { padding: 4px 12px 12px; border-top: 1px solid var(--line); }
.olabel { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin: 10px 0 6px; }
.aspects { display: grid; grid-template-columns: repeat(auto-fill, minmax(50px, 1fr)); gap: 4px; }
.aspects button { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 8px 2px 6px; border: 1px solid transparent; border-radius: 8px; background: var(--soft); cursor: pointer; font: 11px var(--mono); color: var(--muted); }
.aspects button span { line-height: 1; }
.aspects button.on { background: var(--ink); color: #fff; }
.aspects .ar { display: block; border: 1.6px solid currentColor; border-radius: 3px; }
.aspects .ar.auto { width: 16px; height: 16px; border-style: dashed; }
.aspects button:not(.on) .ar { color: var(--ink); }
.seg.levels { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); }
.seg.levels button { border-radius: 8px; padding: 9px 6px; }

/* aspect grid: 6 per row everywhere */
.aspects { grid-template-columns: repeat(6, minmax(0, 1fr)); }

/* ---------- phones ---------- */
.tabbar { display: none; }
@media (max-width: 760px) {
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .top { padding: 10px 14px; gap: 10px; }
  .brand { flex: none; }
  .brand strong { display: none; }
  .steps { flex: 1; justify-content: center; gap: 6px; }
  .steps button { min-width: 36px; min-height: 36px; justify-content: center; }
  .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; background: var(--surface);
    border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--muted);
    text-decoration: none; padding: 4px 0; border-radius: 10px; min-height: 44px; justify-content: center; }
  .tabbar a.on { color: var(--ink); font-weight: 600; }
  .tabbar svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .tabbar a[hidden] { display: none; }
  /* studio */
  .layout { gap: 14px; }
  .canvas-box { min-height: 0; }
  .viewer { min-height: 0; padding: 40px 10px 12px; }
  .viewer canvas#paintedCanvas, .result-wrap, .result-wrap img { max-height: 55vh; }
  .drop { min-height: 260px; margin: 12px; width: calc(100% - 24px); padding: 24px; }
  .stage-bar { gap: 8px; }
  .tools { flex-wrap: wrap; gap: 6px; }
  .tools .btn { padding: 6px 10px; font-size: 13px; }
  .panel { padding: 18px; }
  .seg button { padding: 8px 12px; }
  .btn, .seg button, .aspects button, .model-select { min-height: 40px; }
  .left .hint { font-size: 13px; }
  /* pages */
  .page { padding: 18px 14px 32px; }
  .page-head .btn { display: none; }
  .gallery { grid-template-columns: 1fr; }
  .plans { grid-template-columns: 1fr; }
  .card .actions { flex-wrap: wrap; }
  .dropdown { right: 8px; left: auto; }
}

.users small.muted.inline { display: none; }
@media (max-width: 760px) {
  .users.costs tr { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .users.costs td.co { display: none; }
  .users.costs small.muted.inline { display: inline; font-weight: 400; }
  .users.costs td.num { background: var(--soft); border-radius: 8px; padding: 6px 8px; text-align: center; }
  .tag.right { top: 46px; left: 14px; right: auto; }
}

/* ---------- My renders (v2) ---------- */
.gallery2 .day { font: 600 12px var(--body); color: var(--muted); text-transform: uppercase; letter-spacing: .07em; margin: 24px 0 10px; }
.gallery2 .day:first-child { margin-top: 0; }
.gallery2 .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.tile { background: var(--surface); border-radius: var(--r-l); overflow: hidden; box-shadow: 0 0 0 1px var(--line); }
.tile .pic { display: block; width: 100%; aspect-ratio: 4 / 3; padding: 0; border: 0; background: #E9E7E1; cursor: zoom-in; position: relative; overflow: hidden; }
.tile .pic img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s; }
.tile:hover .pic img { transform: scale(1.03); }
.tile .flag { position: absolute; top: 8px; left: 8px; background: var(--warn-bg); border: 1px solid var(--warn-line); border-radius: 999px; font-size: 11px; padding: 1px 8px; }
.tile .bar { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 12px; }
.when { font-size: 12.5px; color: var(--muted); flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ib { display: flex; gap: 4px; align-items: center; flex: none; }
.icon { display: inline-flex; align-items: center; justify-content: center; gap: 5px; height: 34px; min-width: 34px; padding: 0 8px; border-radius: 9px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; font: 600 13px var(--body); text-decoration: none; white-space: nowrap; }
.icon:hover { border-color: var(--ink); }
.icon svg, .vbot .btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.vbot .btn svg { margin-right: 6px; vertical-align: -3px; }
.icon.primary { background: var(--ink); color: #fff; border-color: var(--ink); padding: 0 12px; }
.icon.wait { opacity: .5; }
.icon.confirm { background: var(--err); color: #fff; border-color: var(--err); font-size: 12px; }
.gallery2 .empty .btn { margin-top: 12px; }
.viewer-dlg { border: 0; padding: 0; background: transparent; max-width: min(1200px, 96vw); width: 100%; }
.viewer-dlg::backdrop { background: rgba(16,17,20,.82); }
.vwrap { background: var(--surface); border-radius: var(--r-l); overflow: hidden; display: flex; flex-direction: column; max-height: 94vh; }
.vtop, .vbot { display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.vtop { justify-content: space-between; }
.vimg { background: #1d1f24; display: grid; place-items: center; min-height: 0; flex: 1; }
.vimg img { max-width: 100%; max-height: 74vh; display: block; }
@media (max-width: 760px) {
  .gallery2 .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tile .bar { flex-wrap: wrap; padding: 8px; }
  .tile .when { flex-basis: 100%; }
  .tile .ib { width: 100%; }
  .tile .icon.primary { flex: 1; }
  .icon { height: 38px; min-width: 38px; }
  .vbot { flex-wrap: wrap; } .vbot .ib { width: 100%; } .vbot .btn { flex: 1; }
  .vimg img { max-height: 62vh; }
}

/* =====================================================================
   DARK THEME (30 Nov) — overrides the light colours above
   ===================================================================== */
html[data-theme="dark"] {
  --paper: #0F1115; --surface: #181B21; --ink: #ECEEF2; --muted: #9AA1AE; --line: #2A2F38;
  --soft: #22262E; --warn-bg: #33290F; --warn-line: #5A4614; --ok: #4CC38A; --err: #F2766B;
  color-scheme: dark;
}
html[data-theme="dark"] body { background: var(--paper); }
html[data-theme="dark"] ::selection { background: #3B4A6B; }
html[data-theme="dark"] * { scrollbar-width: thin; scrollbar-color: #3A404B transparent; }
/* primary controls: light button, dark text */
html[data-theme="dark"] .btn, html[data-theme="dark"] .steps button.on, html[data-theme="dark"] .seg button.on, html[data-theme="dark"] .aspects button.on, html[data-theme="dark"] .icon.primary, html[data-theme="dark"] .avatar, html[data-theme="dark"] .badge.admin, html[data-theme="dark"] .tabs button.on.inv { background: var(--ink); color: #111318; border-color: var(--ink); }
html[data-theme="dark"] .btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
html[data-theme="dark"] .btn.ghost:hover { box-shadow: inset 0 0 0 1px var(--ink); }
html[data-theme="dark"] .btn:disabled { opacity: .45; }
html[data-theme="dark"] .steps button.on b { background: #111318; color: var(--ink); }
html[data-theme="dark"] .steps button.done b { background: var(--ok); color: #0F1115; }
html[data-theme="dark"] .tabs button.on { background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1px var(--line); }
html[data-theme="dark"] .aspects button:not(.on) .ar { color: var(--ink); }
/* surfaces that had fixed light colours */
html[data-theme="dark"] .canvas-box, html[data-theme="dark"] .card .thumb, html[data-theme="dark"] .tile .pic { background: #0B0D10; }
html[data-theme="dark"] .drop { border-color: #343A45; }
html[data-theme="dark"] .drop.over { background: #1C2027; border-color: var(--ink); }
html[data-theme="dark"] .busy { background: rgba(15,17,21,.88); }
html[data-theme="dark"] .slot { background: #12151A; border-color: #3A404B; }
html[data-theme="dark"] .mood-slot { border-color: #3A404B; }
html[data-theme="dark"] .note.err { background: #3A1D1B; border-color: #5E2A26; color: #FFB4AC; }
html[data-theme="dark"] .note.warn { color: #F3D79B; }
html[data-theme="dark"] .note.info { background: var(--soft); color: var(--ink); }
html[data-theme="dark"] .ref-row.done { background: #14261C; border-color: #2B5A3F; }
html[data-theme="dark"] .ref-row.ign { background: #14171C; }
html[data-theme="dark"] .x { background: rgba(0,0,0,.75); }
html[data-theme="dark"] .auth { background: radial-gradient(1200px 600px at 80% -10%, #1D2330 0, transparent 60%), var(--paper); }
html[data-theme="dark"] .auth-card { box-shadow: 0 0 0 1px var(--line), 0 24px 60px rgba(0,0,0,.5); }
html[data-theme="dark"] .form input, html[data-theme="dark"] .dialog label input, html[data-theme="dark"] .users input, html[data-theme="dark"] .users select, html[data-theme="dark"] .model-select { background: var(--soft); color: var(--ink); border-color: var(--line); }
html[data-theme="dark"] dialog { background: var(--surface); color: var(--ink); box-shadow: 0 20px 60px rgba(0,0,0,.6); }
html[data-theme="dark"] dialog::backdrop { background: rgba(0,0,0,.65); }
html[data-theme="dark"] .dropdown { box-shadow: 0 0 0 1px var(--line), 0 12px 30px rgba(0,0,0,.5); }
html[data-theme="dark"] .badge.active { background: #14261C; color: var(--ok); }
html[data-theme="dark"] .badge.pending { background: var(--warn-bg); color: #F3D79B; }
html[data-theme="dark"] .badge.disabled { background: var(--soft); color: var(--muted); }
html[data-theme="dark"] .tag { background: var(--surface); color: var(--ink); }
html[data-theme="dark"] .tag.test, html[data-theme="dark"] .tile .flag { background: var(--warn-bg); border-color: var(--warn-line); color: #F3D79B; box-shadow: 0 0 0 1px var(--warn-line); }
html[data-theme="dark"] .icon { background: var(--surface); }
html[data-theme="dark"] .icon.confirm { background: var(--err); color: #111318; border-color: var(--err); }
html[data-theme="dark"] .top, html[data-theme="dark"] .tabbar { background: #14171C; }
html[data-theme="dark"] .vimg { background: #0B0D10; }

/* =====================================================================
   Right panel scrolls on its own; the image stays where it is
   ===================================================================== */
@media (min-width: 761px) {
  .stage { position: sticky; top: 84px; }
  .panel { position: sticky; top: 84px; max-height: calc(100vh - 108px); overflow-y: auto; overscroll-behavior: contain; }
  .left { position: sticky; top: 84px; max-height: calc(100vh - 108px); overflow-y: auto; }
  .palette-rows { max-height: none; overflow: visible; }
}

/* =====================================================================
   Before / after: a handle you can see and grab
   ===================================================================== */
.result-wrap .divider { width: 3px; margin-left: -1.5px; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.35), 0 0 12px rgba(0,0,0,.35); }
.result-wrap .divider .knob { position: absolute; top: 50%; left: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%;
  background: #fff; color: #111318; display: grid; place-items: center; box-shadow: 0 2px 12px rgba(0,0,0,.45); animation: knobHint 1.6s ease-in-out 2; }
.result-wrap .divider .knob svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.result-wrap .cmp-tag { position: absolute; top: 12px; font: 600 11px var(--body); font-style: normal; letter-spacing: .04em; text-transform: uppercase;
  background: rgba(0,0,0,.6); color: #fff; padding: 4px 8px; border-radius: 6px; white-space: nowrap; }
.result-wrap .cmp-tag.l { right: 12px; } .result-wrap .cmp-tag.r { left: 12px; }
@keyframes knobHint { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-10px); } 75% { transform: translateX(10px); } }
@media (prefers-reduced-motion: reduce) { .result-wrap .divider .knob { animation: none; } }

/* =====================================================================
   Credits page: cost table centred
   ===================================================================== */
.users.costs th, .users.costs td, .users.costs td.num { text-align: center; }
.users.costs td.person b, .users.costs td.person span { text-align: center; }
.users.costs td.num small.muted { display: block; }

/* theme switch button */
.theme-btn { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  display: grid; place-items: center; cursor: pointer; flex: none; padding: 0; }
.theme-btn:hover { border-color: var(--ink); }
.theme-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.theme-btn .sun { display: none; }
html[data-theme="dark"] .theme-btn .sun { display: block; }
html[data-theme="dark"] .theme-btn .moon { display: none; }
.auth .theme-btn { position: fixed; top: 16px; right: 16px; z-index: 5; }
/* long file names never overflow */
.mood-slot { min-width: 0; }
.mood-slot .mname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crumb { display: none !important; }
/* header fits on laptops: only the current step shows its name */
.top-right { flex: none; gap: 10px; }
.brand { flex: 1; }
.menu a { white-space: nowrap; }
@media (max-width: 1500px) {
  .steps button:not(.on) { font-size: 0; padding: 4px; gap: 0; }
  .steps button:not(.on) b { font-size: 12px; }
  .menu a { padding: 6px 8px; }
}

/* auto-detected SketchUp ground in step 1 */
.ground-sw { background: repeating-linear-gradient(135deg, #6B5A2E 0 5px, #4A3F22 5px 10px); }
.ground-row small { white-space: normal; }

/* ---------- FlameBirds Digital Arc I brand ---------- */
:root { --brand: #DFB52D; }
.brand-lockup { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-lockup .fb-icon { width: 34px; height: 34px; object-fit: contain; flex: none; }
.brand-lockup .wordmark { display: flex; flex-direction: column; line-height: 1; }
.brand-lockup .wordmark b { font: 500 15px var(--head); letter-spacing: .28em; color: var(--brand); }
.brand-lockup .wordmark em { font: 400 11.5px var(--body); font-style: normal; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.brand-lockup.big { gap: 14px; margin-bottom: 22px; }
.brand-lockup.big .fb-icon { width: 52px; height: 52px; }
.brand-lockup.big .wordmark b { font-size: 21px; }
.brand-lockup.big .wordmark em { font-size: 13px; }
html:not([data-theme="dark"]) .brand-lockup .wordmark b { color: #B8901A; }
@media (max-width: 760px) { .top .brand-lockup .wordmark { display: none; } }

/* ---------- tool buttons clearly show when they are ON (click again to turn off) ---------- */
.tools .btn.on, .tools .btn.on:hover { background: var(--brand); color: #15130C; box-shadow: none; font-weight: 600; }
.tools .btn.on::after { content: "✕"; margin-left: 8px; font-size: 11px; opacity: .75; }
html .tools .btn.ghost.on, html .tools .btn.ghost.on:hover { background: var(--brand); color: #15130C; box-shadow: 0 0 0 2px rgba(223,181,45,.35); font-weight: 600; }

/* ---------- zoom & pan ---------- */
.zoom-layer { position: relative; line-height: 0; will-change: transform; }
.viewer.zoomed, .vimg.zoomed { cursor: grab; }
.viewer.panning, .vimg.panning { cursor: grabbing; }
.viewer.zoomed #paintedCanvas { cursor: grab; }
.viewer.zoomed #paintedCanvas.picking { cursor: copy; }
#compareRange { pointer-events: none; }
.result-wrap .divider .knob { pointer-events: auto; cursor: ew-resize; }
.result-wrap { touch-action: none; }
.zoombar { position: absolute; right: 12px; bottom: 12px; display: flex; align-items: center; gap: 2px; background: rgba(15,17,21,.78);
  color: #fff; border-radius: 10px; padding: 3px; font: 12px var(--mono); z-index: 2; backdrop-filter: blur(4px); }
.zoombar button { border: 0; background: transparent; color: #fff; min-width: 28px; height: 28px; border-radius: 7px; cursor: pointer; font: 600 15px var(--body); }
.zoombar button:hover { background: rgba(255,255,255,.14); }
.zoombar button.fit { font-size: 12px; padding: 0 8px; }
.zoombar #zoomPct { min-width: 44px; text-align: center; }
.zhint { font: 11px var(--body); color: rgba(255,255,255,.65); padding: 0 8px; white-space: nowrap; }
.zhint.solo { position: absolute; right: 10px; bottom: 8px; background: rgba(0,0,0,.55); border-radius: 6px; padding: 3px 8px; }
.vimg { position: relative; overflow: hidden; }
.vimg .zl { line-height: 0; }
.viewer { overflow: hidden; }
@media (max-width: 760px) { .zhint { display: none; } }

/* ---------- accounts & checklist features ---------- */
.google-btn { gap: 10px; margin-bottom: 4px; }
.google-btn svg { width: 18px; height: 18px; }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; margin: 12px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.form .check { flex-direction: row; align-items: flex-start; gap: 8px; font-weight: 400; font-size: 13px; }
.form .check input { width: 16px; height: 16px; margin-top: 2px; flex: none; }
.legal-links { text-align: center; font-size: 12px; color: var(--muted); margin: 18px 0 0; }
.legal-links a, .form .check a { color: inherit; }
.dropdown a { display: block; padding: 8px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: 14px; }
.dropdown a:hover { background: var(--soft); }
.dropdown .danger, .btn.danger { color: var(--err); }
.btn.danger { background: var(--err); color: #fff; }
html[data-theme="dark"] .btn.danger { background: var(--err); color: #1a0d0c; }
.legal { max-width: 760px; }
.legal h2 { font-size: 19px; margin: 26px 0 8px; }
.legal p, .legal li { line-height: 1.6; }
.legal ul { padding-left: 20px; }
.tour .dialog { max-width: 460px; text-align: left; }
.tour-dots { display: flex; gap: 6px; margin: 14px 0 4px; }
.tour-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.tour-dots i.on { background: var(--brand); }
.stats .stat.chart { grid-column: 1 / -1; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 90px; margin-top: 10px; }
.bars > .bar { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; }
.bars > .bar i { width: 100%; max-width: 26px; background: var(--brand); border-radius: 4px 4px 0 0; min-height: 2px; }
.bars > .bar em { position: absolute; top: 0; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.bars > .bar small { font: 10px var(--mono); color: var(--muted); margin-top: 3px; }

/* ---------- no accidental selecting / dragging of images while comparing or panning ---------- */
.viewer, .viewer *, .vimg, .vimg * { -webkit-user-select: none; user-select: none; -webkit-user-drag: none; }
.viewer img, .vimg img { pointer-events: none; }
.result-wrap { cursor: ew-resize; }
.viewer.zoomed .result-wrap { cursor: grab; }

/* ---------- step progress lives in the studio panel, not the top bar ---------- */
.stepper { display: grid; grid-template-columns: repeat(4, 1fr); position: relative; margin: -4px -4px 18px; padding: 0 0 16px; border-bottom: 1px solid var(--line); }
/* one connector per step, drawn from the previous circle's centre to this one: always exactly through the middle */
.stepper button + button::before { content: ""; position: absolute; top: 15px; right: 50%; width: 100%; height: 2px; background: var(--line); z-index: 0; }
.stepper button.done + button::before, .stepper button.done + button.done::before { background: var(--brand); }
.stepper button { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; background: none; border: 0; padding: 0; cursor: pointer;
  font: 500 12px var(--body); color: var(--muted); min-width: 0; }
.stepper button b { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font: 600 13px/1 var(--head); position: relative; z-index: 1;
  background: var(--surface); color: var(--muted); box-shadow: 0 0 0 2px var(--line); transition: all .15s; }
.stepper button.done b { background: var(--brand); color: #15130C; box-shadow: 0 0 0 2px var(--brand); font-size: 0; }
.stepper button.done b::after { content: ""; position: absolute; inset: 0; margin: auto; width: 18px; height: 18px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.4l4.4 4.4L19 7.2' fill='none' stroke='%2315130C' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }
.stepper button.on b { background: var(--ink); color: var(--surface); box-shadow: 0 0 0 2px var(--ink), 0 0 0 6px color-mix(in srgb, var(--brand) 30%, transparent); }
.stepper button.on, .stepper button.done { color: var(--ink); }
.stepper button.on span { font-weight: 700; }
.stepper button:disabled { cursor: default; }
.stepper button:disabled b, .stepper button:disabled span { opacity: .5; }
.stepper button:not(:disabled):hover b { box-shadow: 0 0 0 2px var(--ink); }
html[data-theme="dark"] .stepper button.on b { color: #111318; }
.panel { padding-top: 20px; }
@media (min-width: 761px) { .stepper { position: sticky; top: -20px; z-index: 2; background: var(--surface); padding-top: 4px; margin-top: -8px; } }

/* ---------- profile ---------- */
.profile { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; max-width: 980px; }
.pcard { background: var(--surface); border-radius: var(--r-l); box-shadow: 0 0 0 1px var(--line); padding: 22px; }
.pcard h3 { font: 600 16px var(--head); margin: 0 0 14px; }
.pcard.who { grid-column: 1 / -1; display: flex; align-items: center; gap: 18px; }
.pcard.who h2 { font-size: 22px; margin: 0 0 2px; } .pcard.who p { margin: 0; }
.big-avatar { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font: 600 22px var(--head); background: var(--brand); color: #15130C; flex: none; }
.muted { color: var(--muted); }
.pcard .form label small.muted { font-weight: 400; font-size: 12px; }
.pcard .form input:disabled { opacity: .7; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0 0 18px; font-size: 14px; }
.facts dt { color: var(--muted); } .facts dd { margin: 0; } .facts a { color: inherit; }
.row-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.danger-zone { grid-column: 1 / -1; border-left: 3px solid var(--err); }
.danger-zone p { margin: 0 0 14px; }
@media (max-width: 760px) { .profile { grid-template-columns: 1fr; } }
/* profile page centred */
#profileView { max-width: 980px; }
#profileView .profile { margin: 0 auto; }
/* user menu: even rows + dividers */
.dropdown button, .dropdown a { display: block; width: 100%; text-align: left; padding: 9px 12px; border-radius: 8px; font: 14px/1.3 var(--body, inherit); color: var(--ink); }
.dropdown hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }
/* how it works dialog */
.help .help-card { display: flex; flex-direction: column; gap: 4px; width: 100%; text-align: left; margin-top: 10px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); color: var(--ink); cursor: pointer; }
.help .help-card:hover { border-color: #DFB52D; }
.help .help-card b { font-size: 15px; }
.help .help-card span { color: var(--muted); font-size: 13px; }
.help p.muted { margin: 0 0 6px; }
/* single provider: column headers already say 1K/2K/4K on desktop; phones still label each cell */
@media (min-width: 761px) { .users.costs.one small.lv { display: none; } }
/* admin: Google key check */
.aicheck { display: flex; align-items: center; justify-content: space-between; gap: 16px; background: var(--surface); box-shadow: 0 0 0 1px var(--line); border-left: 4px solid var(--line); border-radius: var(--r-m); padding: 12px 16px; margin-bottom: 12px; }
.aicheck div { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.aicheck span { color: var(--muted); font-size: 13px; }
.aicheck.good { border-left-color: var(--ok); } .aicheck.warn { border-left-color: #DFB52D; } .aicheck.bad { border-left-color: var(--err); }
#aiCheckList .table-wrap { margin-bottom: 12px; }

/* ---- v32: issues-list additions ---- */
.users td.minus { color: var(--err); }
.palette li button { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 8px; width: 100%; cursor: pointer; border-radius: 8px; }
.palette li button:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.palette li .copy { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 2; margin-left: 4px; vertical-align: -1px; opacity: .7; }
.presets { display: grid; gap: 8px; }
.preset { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; text-align: left; padding: 10px 12px; border-radius: var(--r-m); border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; font: inherit; }
.preset b { font-weight: 600; }
.preset span { grid-column: 1; color: var(--muted); font-size: 12px; }
.preset em { grid-column: 2; grid-row: 1 / span 2; align-self: center; font: 600 12px var(--mono); font-style: normal; color: var(--muted); }
.preset:hover { border-color: var(--ink); }
.preset.on { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.preset.on em { color: var(--ink); }
.adv-toggle { display: inline-block; margin: 10px 0 4px; color: var(--muted); }
.advanced { border-top: 1px dashed var(--line); margin-top: 6px; padding-top: 10px; }
.busy-bar { width: min(260px, 70%); height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; margin-top: 6px; }
.busy-bar i { display: block; height: 100%; width: 0; background: var(--brand); transition: width .8s linear; }
.busy-time { font: 12px var(--mono); color: var(--muted); }
#busyStop { margin-top: 6px; }
html[data-theme="dark"] .busy { background: rgba(20,22,26,.86); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 1000; background: var(--ink); color: var(--surface); padding: 10px 16px; border-radius: 999px; font-size: 14px; box-shadow: 0 6px 24px rgba(0,0,0,.25); max-width: calc(100vw - 32px); }
.note.draft { background: var(--soft); display: grid; gap: 4px; }
.note.draft span { color: var(--muted); font-size: 12px; }
.note.draft .row-btns { display: flex; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.unclear-sw { background: repeating-linear-gradient(45deg, #999 0 4px, #ddd 4px 8px); }
.try-example { display: inline-block; margin-top: 8px; position: relative; z-index: 1; }
.admin-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 18px 0 10px; }
.admin-tools input[type=search] { flex: 1 1 260px; max-width: 420px; }
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin: 10px 0; font-size: 13px; color: var(--muted); }
.pager:empty { display: none; }
.dialog.wide { max-width: 820px; width: calc(100vw - 48px); margin: auto; text-align: left; }
.dialog.wide .table-wrap { max-height: 60vh; overflow: auto; }
.err-text { font: 12px var(--mono); white-space: pre-wrap; word-break: break-word; max-width: 520px; }
.link-stat { text-align: left; cursor: pointer; border: 0; font: inherit; color: inherit; }
.link-stat:hover { box-shadow: 0 0 0 1px var(--ink); }
.link-stat u { text-underline-offset: 2px; }
.danger-text { color: var(--err); }
#confirmDialog .btn.danger { background: var(--err); color: #fff; }
.pw-wrap { position: relative; display: block; }
.pw-wrap input { width: 100%; padding-right: 40px; }
.pw-wrap .eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); background: none; border: 0; padding: 6px; color: var(--muted); cursor: pointer; border-radius: 6px; display: grid; }
.pw-wrap .eye:hover, .pw-wrap .eye.on { color: var(--ink); }
.pw-wrap .eye.on svg path { stroke-dasharray: 2 2; }
#viewer, .vimg { touch-action: pan-y; }
#viewer.zoomed, .vimg.zoomed { touch-action: none; }
@media (max-width: 640px) { .dialog.wide { width: calc(100vw - 24px); padding: 18px; } .admin-tools input[type=search] { max-width: none; } }
.nbadge { display: inline-grid; place-items: center; min-width: 17px; height: 17px; padding: 0 5px; margin-left: 6px; border-radius: 999px; background: var(--err); color: #fff; font: 600 11px var(--mono); vertical-align: 1px; }
.nbadge[hidden] { display: none; }

/* ---- welcome guide: animated mini studio (sizes follow the box width, so it also fits phones) ---- */
dialog.tour { max-width: 860px; }
.tour .dialog { max-width: none; padding: 18px 18px 16px; }
.tour .dialog h2 { margin: 14px 0 4px; font-size: 20px; }
.tour .dialog p.tour-text { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; min-height: 42px; }
.tour .tour-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.tour .tour-dots { margin: 0; }
.tour-dots i { cursor: pointer; }
.tp-wrap { container-type: inline-size; }
.tp { --u: 1cqw; position: relative; display: grid; grid-template-columns: 1.35fr 1fr; gap: calc(var(--u) * 2); padding: calc(var(--u) * 2); border-radius: 12px; overflow: hidden;
  background: #0E1014; box-shadow: inset 0 0 0 1px rgba(255,255,255,.07); color: #E9E7E1; font: 500 calc(var(--u) * 2.1) var(--body); user-select: none; cursor: default; }
html[data-theme="light"] .tp { background: #E9E7E1; color: #16181D; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.tp-img { position: relative; aspect-ratio: 5 / 4; border-radius: 8px; background: #16181D; overflow: hidden; }
html[data-theme="light"] .tp-img { background: #F7F6F2; }
.tp-pic, .tp-l, .tp-before, .tp-before img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tp-pic { opacity: 0; transition: opacity .4s; }
.tp-l { opacity: 0; transition: opacity .55s ease; }
.tp-pic.show, .tp-l.show { opacity: 1; }
.tp-before { opacity: 0; clip-path: inset(0 50% 0 0); }
.tp-before.show { opacity: 1; }
.tp-split { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; margin-left: -1px; background: #fff; opacity: 0; box-shadow: 0 0 6px rgba(0,0,0,.4); }
.tp-split.show { opacity: 1; }
.tp-split i { position: absolute; top: 50%; left: 50%; width: calc(var(--u) * 4.4); height: calc(var(--u) * 4.4); transform: translate(-50%, -50%); border-radius: 50%; background: #fff; box-shadow: 0 1px 6px rgba(0,0,0,.35); }
.tp-split i::before { content: "‹ ›"; position: absolute; inset: 0; display: grid; place-items: center; color: #16181D; font: 700 calc(var(--u) * 2.2)/1 var(--body); }
.tp.sliding .tp-before, .tp.sliding .tp-split { transition: clip-path 1.1s ease-in-out, left 1.1s ease-in-out; }
.tp-drop { position: absolute; inset: calc(var(--u) * 1.6); border: 2px dashed rgba(255,255,255,.25); border-radius: 8px; display: grid; place-content: center; justify-items: center; gap: calc(var(--u) * 1.2); opacity: 0; transition: opacity .3s, background .25s, border-color .25s; }
html[data-theme="light"] .tp-drop { border-color: rgba(0,0,0,.2); }
.tp-drop.show { opacity: 1; }
.tp-drop.hot { background: rgba(232,185,49,.12); border-color: var(--brand); }
.tp-drop-ic { width: calc(var(--u) * 6); height: calc(var(--u) * 6); border-radius: 22%; background: conic-gradient(#FF00D4 0 25%, #FFFF00 0 50%, #00FF00 0 75%, #00FFFF 0); }
.tp-drop b { font: 600 calc(var(--u) * 2.4) var(--head); }
.tp-tag { position: absolute; left: calc(var(--u) * 1.4); top: calc(var(--u) * 1.4); padding: calc(var(--u) * .5) calc(var(--u) * 1.2); border-radius: 999px; background: rgba(14,16,20,.78); color: #fff; font-size: calc(var(--u) * 1.8); }
.tp-tag:empty, .tp-tag[hidden] { display: none; }
.tp-busy { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: calc(var(--u) * 1.2); background: rgba(14,16,20,.72); color: #fff; opacity: 0; transition: opacity .3s; }
.tp-busy.show { opacity: 1; }
.tp-busy b { font: 600 calc(var(--u) * 2.5) var(--head); }
.tp-spin { width: calc(var(--u) * 4); height: calc(var(--u) * 4); border-radius: 50%; border: 2px solid rgba(255,255,255,.25); border-top-color: #fff; animation: tpspin .8s linear infinite; }
@keyframes tpspin { to { transform: rotate(360deg); } }
.tp-bar { width: calc(var(--u) * 22); height: 3px; border-radius: 3px; background: rgba(255,255,255,.2); overflow: hidden; }
.tp-bar i { display: block; height: 100%; width: 0; background: var(--brand); transition: width 2.1s linear; }
.tp-panel { contain: size; display: flex; flex-direction: column; gap: calc(var(--u) * 1.6); min-width: 0; overflow: hidden; padding: calc(var(--u) * 1.4); border-radius: 8px; background: #16181D; }
html[data-theme="light"] .tp-panel { background: #fff; }
.tp-steps { display: grid; grid-template-columns: repeat(4, 1fr); position: relative; padding-bottom: calc(var(--u) * 1.4); border-bottom: 1px solid rgba(127,127,127,.25); }
.tp-steps span { position: relative; display: flex; flex-direction: column; align-items: center; gap: calc(var(--u) * .5); font-size: calc(var(--u) * 1.55); color: rgba(127,127,127,.95); }
.tp-steps span + span::before { content: ""; position: absolute; top: calc(var(--u) * 1.6 - 1px); right: 50%; width: 100%; height: 2px; background: rgba(127,127,127,.3); }
.tp-steps span.done + span::before { background: var(--brand); }
.tp-steps b { position: relative; z-index: 1; width: calc(var(--u) * 3.2); height: calc(var(--u) * 3.2); border-radius: 50%; display: grid; place-items: center; font: 600 calc(var(--u) * 1.6)/1 var(--head); background: inherit; box-shadow: 0 0 0 1.5px rgba(127,127,127,.45); background: #16181D; transition: all .3s; }
html[data-theme="light"] .tp-steps b { background: #fff; }
.tp-steps span.on { color: inherit; } .tp-steps span.on b { background: #E9E7E1; color: #16181D; box-shadow: 0 0 0 1.5px #E9E7E1, 0 0 0 calc(var(--u) * .9) rgba(232,185,49,.35); }
html[data-theme="light"] .tp-steps span.on b { background: #16181D; color: #fff; box-shadow: 0 0 0 1.5px #16181D, 0 0 0 calc(var(--u) * .9) rgba(232,185,49,.35); }
.tp-steps span.done b { background: var(--brand); color: transparent; box-shadow: 0 0 0 1.5px var(--brand); }
.tp-steps span.done b::after { content: ""; position: absolute; inset: 22%; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.4l4.4 4.4L19 7.2' fill='none' stroke='%2315130C' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }
.tp-body { display: flex; flex-direction: column; gap: calc(var(--u) * 1); min-height: 0; }
.tp .tp-h { margin: 0; font: 600 calc(var(--u) * 2.5)/1.2 var(--head); }
.tp .tp-s { margin: 0; font-size: calc(var(--u) * 1.75); opacity: .65; }
.tp-tight { display: flex; flex-direction: column; gap: calc(var(--u) * .55); }
.tp .tp-tight .tp-k { margin: 0; }
.tp .tp-k { margin: calc(var(--u) * .4) 0 0; font-size: calc(var(--u) * 1.6); opacity: .65; }
.tp-btn { display: block; text-align: center; padding: calc(var(--u) * 1.2); border-radius: calc(var(--u) * 1.4); background: #E9E7E1; color: #16181D; font-weight: 600; transition: transform .15s; margin-top: calc(var(--u) * .4); }
html[data-theme="light"] .tp-btn { background: #16181D; color: #fff; }
.tp-btn.ghost, html[data-theme="light"] .tp-btn.ghost { background: transparent; color: inherit; box-shadow: inset 0 0 0 1px rgba(127,127,127,.45); }
.tp .pressed { transform: scale(.95); }
.tp-rows { display: flex; flex-direction: column; gap: calc(var(--u) * .7); }
.tp-row { display: flex; align-items: center; gap: calc(var(--u) * 1); padding: calc(var(--u) * .45) calc(var(--u) * .6); border-radius: calc(var(--u) * 1); box-shadow: inset 0 0 0 1px rgba(127,127,127,.25); transition: box-shadow .2s, transform .15s; animation: tpin .3s ease; }
.tp-row.ok { box-shadow: inset 0 0 0 1px rgba(76,195,138,.6); }
@keyframes tpin { from { opacity: 0; transform: translateY(4px); } }
.tp-sw { width: calc(var(--u) * 2.6); height: calc(var(--u) * 2.6); border-radius: 25%; flex: none; }
.tp-name { flex: 1; display: flex; flex-direction: column; line-height: 1.15; font-size: calc(var(--u) * 1.75); font-weight: 600; }
.tp-name small { font-weight: 400; font-size: calc(var(--u) * 1.45); opacity: .6; }
.tp-slot { width: calc(var(--u) * 4.4); height: calc(var(--u) * 2.9); border-radius: calc(var(--u) * .6); display: grid; place-items: center; box-shadow: inset 0 0 0 1px rgba(127,127,127,.45); overflow: hidden; opacity: .8; }
.tp-slot img { width: 100%; height: 100%; object-fit: cover; animation: tpin .3s ease; }
.tp-chips { display: flex; flex-wrap: wrap; gap: calc(var(--u) * .6); }
.tp-chips span, .tp-presets span { padding: calc(var(--u) * .5) calc(var(--u) * 1.1); border-radius: 999px; box-shadow: inset 0 0 0 1px rgba(127,127,127,.45); font-size: calc(var(--u) * 1.6); transition: all .2s; }
.tp-presets { display: grid; grid-template-columns: 1fr 1fr; gap: calc(var(--u) * .6); }
.tp-presets span { border-radius: calc(var(--u) * 1); text-align: center; }
.tp-chips span.on, .tp-presets span.on { background: #E9E7E1; color: #16181D; box-shadow: none; }
html[data-theme="light"] .tp-chips span.on, html[data-theme="light"] .tp-presets span.on { background: #16181D; color: #fff; }
.tp-presets span.on { box-shadow: 0 0 0 1.5px var(--brand); }
.tp-file { position: absolute; left: calc(var(--u) * 3); bottom: calc(var(--u) * 3); display: flex; align-items: center; gap: calc(var(--u) * .8); padding: calc(var(--u) * .8) calc(var(--u) * 1.2); border-radius: calc(var(--u) * 1); background: #fff; color: #16181D; font: 600 calc(var(--u) * 1.7) var(--mono); box-shadow: 0 4px 14px rgba(0,0,0,.35); opacity: 0; z-index: 3; }
.tp-file.show { opacity: 1; }
.tp-file span { width: calc(var(--u) * 2.8); height: calc(var(--u) * 2.8); border-radius: 3px; background: conic-gradient(#FF00D4 0 25%, #FFFF00 0 50%, #00FF00 0 75%, #00FFFF 0); }
.tp.dragging .tp-file { box-shadow: 0 10px 24px rgba(0,0,0,.45); }
.tp-toast { position: absolute; left: 30%; bottom: calc(var(--u) * 3); transform: translate(-50%, 8px); padding: calc(var(--u) * .9) calc(var(--u) * 2); border-radius: 999px; background: #E9E7E1; color: #16181D; font-weight: 600; opacity: 0; transition: all .3s; z-index: 3; }
.tp-toast.show { opacity: 1; transform: translate(-50%, 0); }
.tp-cursor { position: absolute; left: 0; top: 0; z-index: 5; pointer-events: none; filter: drop-shadow(0 2px 3px rgba(0,0,0,.45)); transition: opacity .3s; }
.tp-cursor svg { display: block; width: calc(var(--u) * 3.8); height: auto; transition: transform .15s; transform-origin: 20% 10%; }
.tp-cursor.down svg { transform: scale(.82); }
.tp-ripple { position: absolute; z-index: 4; width: calc(var(--u) * 6); height: calc(var(--u) * 6); margin: calc(var(--u) * -3) 0 0 calc(var(--u) * -3); border-radius: 50%; border: 2px solid var(--brand); pointer-events: none; animation: tpripple .55s ease-out forwards; }
@keyframes tpripple { from { transform: scale(.2); opacity: 1; } to { transform: scale(1); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .tp *, .tp { transition: none !important; animation: none !important; } }

/* phones: picture on top, panel underneath */
@container (max-width: 480px) {
  .tp { --u: 1.75cqw; grid-template-columns: 1fr; }
  .tp-panel { contain: none; height: calc(var(--u) * 42); }
  .tp-steps span { font-size: calc(var(--u) * 1.45); }
}
.tour .dialog-actions { margin-top: 0; }
.tour .dialog p.tour-text { min-height: 0; }
.seg.levels button { display: flex; flex-direction: column; align-items: center; gap: 1px; line-height: 1.2; }
.seg.levels button small { font: 11px var(--mono); opacity: .7; }
/* recent errors: use the whole screen, wrap long text instead of scrolling sideways */
#errorsDialog { max-width: min(1200px, calc(100vw - 48px)); width: 100%; }
#errorsDialog .dialog.wide { max-width: none; width: auto; display: flex; flex-direction: column; max-height: calc(100vh - 64px); }
#errorsDialog .table-wrap { max-height: none; flex: 1; min-height: 0; overflow: auto; }
#errorsTable { table-layout: fixed; min-width: 0; }
#errorsTable th:nth-child(1) { width: 170px; } #errorsTable th:nth-child(2) { width: 110px; }
#errorsTable td { vertical-align: top; }
#errorsTable .err-text { max-width: none; white-space: pre-wrap; word-break: break-word; }
#errorsTable th { position: sticky; top: 0; background: var(--surface); z-index: 1; }

.tp.tp-reset *, .tp.tp-reset { transition: none !important; }
.mood-slot.need, html[data-theme] .mood-slot.need { border-color: var(--brand); color: var(--ink); }
/* rating + prompt log */
.rate { display: grid; gap: 8px; margin: 4px 0 14px; padding: 12px; border-radius: var(--r-m); background: var(--soft); }
.rate .label { margin: 0; }
.rate-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.rate-btns .on.good { background: var(--ok, #4CC38A); color: #0E1014; border-color: transparent; }
.rate-btns .on.bad { background: var(--err); color: #fff; border-color: transparent; }
.rate-note { width: 100%; font: inherit; font-size: 13px; padding: 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); resize: vertical; }
.rate [data-rate-save] { justify-self: start; }
.vrate { padding: 0 16px 12px; }
.vrate .rate { margin: 0; }
#promptDialog { max-width: min(900px, calc(100vw - 48px)); width: 100%; }
#promptDialog .dialog.wide { max-width: none; width: auto; }
.prompt-text { white-space: pre-wrap; word-break: break-word; font: 13px/1.55 var(--mono); background: var(--soft); padding: 14px; border-radius: 10px; max-height: 60vh; overflow: auto; margin: 0 0 12px; }
.rlog .rthumb { width: 72px; height: 54px; object-fit: cover; border-radius: 6px; display: block; }
.rlog td { vertical-align: top; }
.pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.pill.good { background: rgba(76,195,138,.18); color: #4CC38A; }
.pill.bad { background: rgba(229,83,75,.18); color: var(--err); }
/* logo: "Digital Arc" centred under FLAMEBIRDS (letter-spacing adds space after the last letter, so take it back) */
.brand-lockup .wordmark { align-items: center; text-align: center; }
.brand-lockup .wordmark b { margin-right: -.28em; }
.brand-lockup .wordmark em { margin-right: -.14em; }
.brand-lockup .wordmark em { margin-top: 1px; }
.brand-lockup .wordmark b { line-height: 1.05; }

/* ===== PREVIEW: 3ds Max dark palette (colours only) ===== */
html[data-theme="dark"] {
  --paper: #444444; --surface: #4D4D4D; --ink: #E1E1E1; --muted: #C4C4C4; --line: #2B2B2B;
  --soft: #3A3A3A; --warn-bg: #4A3F22; --warn-line: #6B5A2E; --ok: #7CC596; --err: #F08A80;
  --accent: #5294E2;
}
html[data-theme="dark"] ::selection { background: #5294E2; }
html[data-theme="dark"] * { scrollbar-color: #5A5A5A transparent; }
html[data-theme="dark"] .btn, html[data-theme="dark"] .steps button.on, html[data-theme="dark"] .seg button.on, html[data-theme="dark"] .aspects button.on, html[data-theme="dark"] .icon.primary, html[data-theme="dark"] .avatar, html[data-theme="dark"] .badge.admin, html[data-theme="dark"] .tabs button.on.inv, html[data-theme="dark"] .stepper button.on b { background: var(--accent); color: #FFFFFF; border-color: var(--accent); }
html[data-theme="dark"] .steps button.on b { background: #FFFFFF; color: #2F6FB8; }
html[data-theme="dark"] .btn.ghost { background: #5A5A5A; color: #FFFFFF; box-shadow: inset 0 0 0 1px #2B2B2B; }
html[data-theme="dark"] .canvas-box, html[data-theme="dark"] .card .thumb, html[data-theme="dark"] .tile .pic, html[data-theme="dark"] .vimg { background: #2B2B2B; }
html[data-theme="dark"] .drop { border-color: #5E5E5E; }
html[data-theme="dark"] .drop.over { background: #4A4A4A; border-color: var(--accent); }
html[data-theme="dark"] .slot { background: #3A3A3A; border-color: #5E5E5E; }
html[data-theme="dark"] .mood-slot { border-color: #5E5E5E; }
html[data-theme="dark"] .ref-row.done { background: #3E4A42; border-color: #5C7A66; }
html[data-theme="dark"] .ref-row.ign { background: #3E3E3E; }
html[data-theme="dark"] .auth { background: var(--paper); }
html[data-theme="dark"] .top, html[data-theme="dark"] .tabbar { background: #2B2B2B; }
html[data-theme="dark"] .busy { background: rgba(50,50,50,.88); }
html[data-theme="dark"] .form input, html[data-theme="dark"] .dialog label input, html[data-theme="dark"] .users input, html[data-theme="dark"] .users select, html[data-theme="dark"] .model-select { background: #2E2E2E; color: #FFFFFF; border-color: #2B2B2B; }
.theme-btn { display: none !important; }

/* ---------- Logo line "Digital Arc I" in Gotham (4 Dec) ----------
   Gotham is a paid font (Hoefler&Co). It is used when installed on the computer or when a
   licensed web file is added as /brand/gotham.woff2; until then Montserrat (free, very close) shows. */
@font-face { font-family: "Gotham Web"; src: local("Gotham Medium"), local("Gotham-Medium"), local("Gotham Book"), local("Gotham"), url("/brand/gotham.woff2") format("woff2"); font-weight: 500; font-display: swap; }
.brand-lockup .wordmark em { font-family: "Gotham Web", "Gotham", "Montserrat", var(--body); font-weight: 500; }

/* ---------- Step 2: floors per colour (4 Dec) ---------- */
.floors-box { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: -2px 0 10px; padding: 10px; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--r-s) var(--r-s); background: var(--soft); }
.floors-box label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); min-width: 0; }
.floors-box label.wide { grid-column: 1 / -1; }
.floors-box input { font: inherit; font-size: 13px; color: var(--ink); background: #2E2E2E; border: 1px solid var(--line); border-radius: 6px; padding: 7px 8px; min-width: 0; }
.floors-box input:focus { outline: 2px solid var(--accent, #5294E2); outline-offset: 0; }
.floors-box input::placeholder { color: #8C8C8C; }
/* ---------- Step 4: material photos open big ---------- */
.slot.matview { padding: 0; border-style: solid; }
.slot.matview:hover, .slot.matview:focus-visible { outline: 2px solid var(--accent, #5294E2); outline-offset: 1px; }
#matDialog .vtop .when { display: inline-flex; align-items: center; gap: 8px; }
#matDialog .vtop .sw { width: 14px; height: 14px; border-radius: 3px; display: inline-block; }
/* ---------- My renders: projects ---------- */
.proj-bar { display: flex; flex-direction: column; gap: 10px; margin: 0 0 18px; }
.proj-bar .chips { align-items: center; }
.proj-bar .olabel { margin-right: 4px; }
.proj-bar .chip { color: var(--ink); padding: 6px 12px; display: inline-flex; gap: 8px; align-items: center; }
.proj-bar .chip span { font: 500 12px var(--mono); color: var(--muted); }
.proj-bar .chip.on { background: var(--accent, #5294E2); border-color: var(--accent, #5294E2); color: #FFFFFF; }
.proj-bar .chip.on span { color: #FFFFFF; }
.proj-acts { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.proj-acts b { margin-right: 6px; }
.tile .when .ptag { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 4px; background: var(--soft); color: var(--ink); font-size: 11px; }
.vproj { padding: 0 16px 8px; }
.vproj label { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.vproj select { width: auto; min-width: 220px; }
.proj-bar .olabel { display: inline; margin: 0 4px 0 0; }

/* ---------- Admin: its own interface (4 Dec) ---------- */
body.in-admin #appView > .top, body.in-admin .tabbar { display: none !important; }
.admin-shell { min-height: 100vh; display: flex; flex-direction: column; background: var(--paper); }
.admin-top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px; padding: 10px 20px; background: #232323; border-bottom: 1px solid #1A1A1A; }
.admin-badge { background: #C8553D; color: #FFFFFF; font: 700 11px var(--body); letter-spacing: .12em; padding: 4px 8px; border-radius: 4px; }
.admin-who { margin-left: auto; color: var(--muted); font-size: 13px; }
.admin-body { flex: 1; display: flex; flex-wrap: wrap; min-height: 0; }
.admin-nav { flex: 0 0 210px; display: flex; flex-direction: column; gap: 2px; padding: 14px 10px; background: #3A3A3A; border-right: 1px solid var(--line); }
.admin-nav button { display: flex; align-items: center; justify-content: space-between; text-align: left; border: 0; background: none; color: var(--ink); font: 500 14px var(--body); padding: 11px 12px; border-radius: 6px; cursor: pointer; }
.admin-nav button:hover { background: #474747; }
.admin-nav button.on { background: var(--accent, #5294E2); color: #FFFFFF; }
.admin-main { flex: 999 1 560px; min-width: 0; padding: 24px 28px 64px; }
.admin-main .stats { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.admin-tools select.model-select { width: auto; min-width: 180px; margin: 0; }
.admin-tools { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.users.money th.c, .users.money td.c { text-align: center; white-space: nowrap; font-family: var(--mono); }
.users.money th.c { font-family: var(--body); }
.users.money td.neg { color: var(--err); }
.users.money tfoot td { border-top: 1px solid var(--line); font-weight: 600; }
.users tr.click { cursor: pointer; }
.users tr.click:hover td, .users tr.click:focus-visible td { background: #4A4A4A; }
.users tr.is-test td { opacity: .65; }
.udetail { margin-top: 24px; padding: 18px; border-radius: var(--r-m); background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
.udetail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.gen-detail { max-width: 1100px; }
.gen-body { padding: 16px; overflow: auto; max-height: calc(100vh - 140px); }
.gen-facts { display: grid; grid-template-columns: 150px 1fr; gap: 6px 14px; margin: 0 0 16px; font-size: 14px; }
.gen-facts dt { color: var(--muted); }
.gen-facts dd { margin: 0; }
.gen-imgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-bottom: 16px; }
.gen-imgs figure { margin: 0; }
.gen-imgs img { width: 100%; height: 170px; object-fit: contain; background: #2B2B2B; border-radius: 6px; }
.gen-imgs figcaption { font-size: 12px; color: var(--muted); margin-top: 4px; }
.gen-prompt { white-space: pre-wrap; font: 12.5px/1.5 var(--mono); background: #2E2E2E; padding: 12px; border-radius: 6px; max-height: 320px; overflow: auto; }
@media (max-width: 760px) { .admin-nav { flex: 1 1 100%; flex-direction: row; overflow-x: auto; } .admin-main { padding: 16px; } .admin-who { display: none; } }
.admin-tools input[type="search"] { flex: 1 1 260px; max-width: 420px; font: inherit; font-size: 14px; color: var(--ink); background: #2E2E2E; border: 1px solid var(--line); border-radius: var(--r-s); padding: 10px 12px; }
.admin-tools label.fine { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- Sign-up: wide, side-by-side layout with no scrolling (5 Dec) ----------
   Sign in keeps its narrow card. Create account opens wide: brand, Google button and the key points on
   the left, the form on the right in two columns. On phones it stacks back into one column. */
.auth-card { transition: width .2s ease; }
.auth-card.wide { width: min(940px, 100%); display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 36px; padding: 32px 36px; }
.auth-card.wide .auth-side { display: flex; flex-direction: column; padding-right: 36px; border-right: 1px solid var(--line); }
.auth-card.wide .auth-side .google-btn { margin-top: 18px; }
.auth-card.wide .auth-tabs { margin-top: 0; }
.auth-card.wide #signupForm { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; align-content: start; }
.auth-card.wide #signupForm[hidden] { display: none; }
.auth-card.wide #signupForm .span2 { grid-column: 1 / -1; }
.auth-card.wide #signupForm .fine { margin: 0; }
.auth-card.wide .legal-links { margin-bottom: 0; }
.auth-points { list-style: none; margin: 22px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; font-size: 14px; color: var(--muted); }
.auth-points li { position: relative; padding-left: 22px; }
.auth-points li::before { content: ""; position: absolute; left: 0; top: 6px; width: 10px; height: 10px; border-radius: 3px; background: var(--accent, #5294E2); }
@media (max-width: 760px) {
  .auth-card.wide { grid-template-columns: 1fr; gap: 18px; padding: 24px 20px; }
  .auth-card.wide .auth-side { padding-right: 0; border-right: 0; }
  .auth-card.wide .auth-points { display: none; }
  .auth-card.wide #signupForm { grid-template-columns: 1fr; }
}
.auth-card.wide #signupForm label:not(.check) { display: grid; grid-template-columns: auto 1fr; column-gap: 8px; align-items: baseline; }
.auth-card.wide #signupForm label:not(.check) > :last-child { grid-column: 1 / -1; }
/* sign-in uses the same landscape card (5 Dec) */
.auth-card.wide #loginForm, .auth-card.wide #forgotForm, .auth-card.wide #resetForm { align-content: start; }
.auth-card.wide .auth-main { display: flex; flex-direction: column; justify-content: center; }

/* ---------- Logo (5 Dec, option D approved): gold line between the bird and the words;
   "DIGITAL ARC" in white with the Roman numeral I in gold; "by" always lowercase; FLAMEBIRDS in gold. Gotham for both lines
   (licensed file at /brand/gotham-*.woff2; Montserrat shows until then). ---------- */
@font-face { font-family: "Gotham Web"; src: local("Gotham Book"), local("Gotham-Book"), url("/brand/gotham-book.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Gotham Web"; src: local("Gotham Medium"), local("Gotham-Medium"), url("/brand/gotham-medium.woff2") format("woff2"); font-weight: 500 600; font-display: swap; }
.brand-lockup { gap: 12px; }
.brand-lockup .wordmark { align-items: flex-start; text-align: left; border-left: 1px solid rgba(232,180,22,.75); padding-left: 12px; }
.brand-lockup .wordmark em { order: 1; font: 600 15px "Gotham Web", "Gotham", "Montserrat", var(--body); font-style: normal; letter-spacing: .14em; text-transform: uppercase; color: #E1E1E1; margin: 0; line-height: 1.05; }
.brand-lockup .wordmark em .ri { color: var(--brand, #E8B416); }
.brand-lockup .wordmark b { order: 2; font: 600 9px "Gotham Web", "Gotham", "Montserrat", var(--body); letter-spacing: .24em; color: var(--brand, #E8B416); margin: 6px 0 0; line-height: 1; }
.brand-lockup .wordmark b i { font-style: normal; font-weight: 400; text-transform: none; letter-spacing: .06em; color: #C4C4C4; margin-right: .35em; }
.brand-lockup.big { gap: 16px; }
.brand-lockup.big .wordmark { padding-left: 16px; }
.brand-lockup.big .wordmark em { font-size: 22px; }
.brand-lockup.big .wordmark b { font-size: 12px; margin-top: 8px; }
html[data-theme="dark"] .brand-lockup .wordmark em { color: #E1E1E1; }

/* logo words as an image drawn in Gotham (desktop font licence allows images; no font file on the website) */
.brand-lockup .wordmark img.wm { height: 32px; width: auto; display: block; }
.brand-lockup.big .wordmark img.wm { height: 46px; }

/* =====================================================================
   Round 2 (5 Dec 2026): right panel, Help & FAQ, assistant, tour close,
   My renders, credits. Uses the 3ds Max palette above.
   ===================================================================== */

/* ---- right panel: scrolls inside, main button pinned at the bottom ---- */
.layout > .panel { display: flex; flex-direction: column; max-height: calc(100vh - 176px); padding: 18px 18px 0; overflow: hidden; } /* leaves room for the assistant button below */
.panel .stepper { flex: none; }
#panelBody { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.pb-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 2px 10px 14px 0; margin-right: -10px; scrollbar-width: thin; }
.pb-foot { flex: none; display: grid; gap: 8px; padding: 14px 0 18px; border-top: 1px solid var(--line); background: var(--surface); position: relative; }
.pb-foot::before { content: ""; position: absolute; left: 0; right: 0; top: -25px; height: 24px; background: linear-gradient(transparent, var(--surface)); pointer-events: none; }
.pb-foot .note { margin: 0; }
.panel .kicker { display: inline-block; font: 600 10.5px var(--body); letter-spacing: .14em; color: var(--brand); margin-bottom: 2px; }
.panel h2 { font-size: 22px; margin: 2px 0 12px; }
.panel .sub { margin: -6px 0 14px; font-size: 13.5px; }

/* Step 1: the 6 colours as a strip, three short rules */
.pal-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 4px 0 16px; }
.pal-strip span { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 10px; background: var(--soft); font-size: 13px; font-weight: 500; }
.pal-strip i { width: 16px; height: 16px; border-radius: 5px; background: var(--c); box-shadow: 0 0 0 2px rgba(0,0,0,.25), 0 0 14px color-mix(in srgb, var(--c) 45%, transparent); }
.checks { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 8px; }
.checks li { position: relative; padding: 10px 12px 10px 40px; border-radius: 10px; background: color-mix(in srgb, var(--accent) 9%, var(--surface)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 22%, transparent); font-size: 13.5px; color: var(--muted); }
.checks li b { color: var(--ink); font-weight: 600; }
.checks li::before { content: ""; position: absolute; left: 12px; top: 50%; width: 18px; height: 18px; margin-top: -9px; border-radius: 50%; background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12 4 4 8-8'/%3E%3C/svg%3E") center/12px no-repeat; }

/* rows as soft cards */
.panel .rows { gap: 6px; margin-bottom: 14px; }
.panel .row { border: 0; background: var(--soft); border-radius: 12px; padding: 9px 10px; box-shadow: inset 0 0 0 1px transparent; transition: box-shadow .15s, background .15s; }
.panel .row.click:hover { background: #404040; }
.panel .row.sel { box-shadow: inset 0 0 0 1.5px var(--accent); }
.panel .row .name { display: flex; flex-direction: column; gap: 1px; font-size: 14px; }
.panel .row .name small { font-size: 12px; color: var(--muted); font-weight: 400; }
.panel .row.ref-row.need { box-shadow: inset 3px 0 0 var(--brand); }
.panel .row.ref-row.done { box-shadow: inset 3px 0 0 var(--ok); }
.panel em.req { font-style: normal; font-weight: 600; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); }
.panel .ok-text { color: var(--ok) !important; }
.panel .slot { width: 60px; height: 46px; border-radius: 9px; border: 1.5px dashed #6A6A6A; background: #444; display: grid; place-items: center; align-content: center; gap: 0; font-size: 11px; line-height: 1; }
.panel .slot b { font-size: 16px; font-weight: 400; color: var(--ink); }
.panel .slot:hover { border-color: var(--accent); }
.panel .floors-box { margin: -10px 0 4px; border: 0; border-radius: 0 0 12px 12px; background: #3F3F3F; }
.panel .group > span { font: 600 10.5px var(--body); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.panel .group em.opt { font-style: normal; font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--muted); opacity: .8; }

/* Step 2: progress meter */
.meter { padding: 12px 14px; border-radius: 12px; background: var(--soft); margin: 0 0 12px; }
.meter-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 8px; font-size: 12.5px; color: var(--muted); }
.meter-top b { font: 600 22px var(--head); color: var(--ink); }
.meter-top b span { font-size: 14px; color: var(--muted); font-weight: 500; }
.meter .progress { margin: 0; height: 5px; background: #2E2E2E; }

/* tips, folded at the bottom of each step */
.tips { margin: 6px 0 0; border-radius: 12px; background: color-mix(in srgb, var(--brand) 8%, var(--surface)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 24%, transparent); }
.tips summary { display: flex; align-items: center; gap: 8px; padding: 10px 12px; cursor: pointer; list-style: none; font: 600 12.5px var(--body); color: var(--brand); }
.tips summary::-webkit-details-marker { display: none; }
.tips summary::after { content: ""; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .2s; }
.tips[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.tips summary svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tips ul { margin: 0; padding: 0 14px 12px 30px; display: grid; gap: 6px; font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.tips .link { font-size: 12.5px; }

/* Step 4 */
.facts-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: -2px 0 14px; }
.facts-chips span { padding: 5px 10px; border-radius: 99px; background: var(--soft); font-size: 12px; color: var(--muted); }
.quick-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.quick-acts button, .quick-acts a { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px; border: 0; border-radius: 12px; background: var(--soft); color: var(--ink); font: 500 13px var(--body); text-decoration: none; cursor: pointer; text-align: left; transition: background .15s, transform .15s; }
.quick-acts button:hover, .quick-acts a:hover { background: #404040; transform: translateY(-1px); }
.quick-acts svg { width: 20px; height: 20px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 1100px) { .layout > .panel { max-height: none; overflow: visible; } .pb-scroll { overflow: visible; margin-right: 0; } .pb-foot { position: sticky; bottom: 64px; z-index: 5; } }

/* ---- tour: close button, fly into the profile button ---- */
.tour .dialog { position: relative; }
.tour-x { position: absolute; top: 10px; right: 10px; z-index: 3; width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(43,43,43,.75); color: #fff; display: grid; place-items: center; cursor: pointer; backdrop-filter: blur(4px); }
.tour-x svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.tour-x:hover { background: var(--accent); }
dialog.tour.flying::backdrop { opacity: 0; transition: opacity .45s; }
.avatar.ping { animation: ping 1.1s ease-out 2; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand) 70%, transparent); } 100% { box-shadow: 0 0 0 16px transparent; } }
#menuHowto.glow { background: color-mix(in srgb, var(--brand) 22%, transparent); box-shadow: inset 3px 0 0 var(--brand); font-weight: 600; }

/* ---- Help & FAQ ---- */
.help-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding: 28px 30px; border-radius: 18px; margin-bottom: 22px;
  background: radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 55%), radial-gradient(90% 120% at 0% 100%, color-mix(in srgb, var(--brand) 14%, transparent), transparent 60%), var(--surface); box-shadow: 0 0 0 1px var(--line); }
.help-hero h1 { margin: 4px 0 6px; font-size: 30px; }
.help-hero .sub { margin: 0; max-width: 520px; }
.eyebrow { font: 600 11px var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--brand); }
.faq-search { display: flex; align-items: center; gap: 10px; flex: 0 1 380px; padding: 0 14px; border-radius: 12px; background: #3A3A3A; box-shadow: inset 0 0 0 1px var(--line); }
.faq-search svg { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2; flex: none; }
.faq-search input { flex: 1; border: 0; background: none; color: var(--ink); font: 15px var(--body); padding: 13px 0; outline: none; }
.faq-search:focus-within { box-shadow: inset 0 0 0 2px var(--accent); }
.faq-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px; align-items: start; }
.faq-nav { display: grid; gap: 4px; position: sticky; top: 84px; }
.faq-nav button { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border: 0; border-radius: 10px; background: none; color: var(--muted); font: 500 14px var(--body); cursor: pointer; text-align: left; }
.faq-nav button span { font: 12px var(--mono); opacity: .8; }
.faq-nav button:hover { background: var(--soft); color: var(--ink); }
.faq-nav button.on { background: var(--surface); color: var(--ink); box-shadow: inset 3px 0 0 var(--accent), 0 0 0 1px var(--line); }
.faq-group { margin-bottom: 22px; }
.faq-group h2 { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.faq-item { background: var(--surface); border-radius: 12px; box-shadow: 0 0 0 1px var(--line); margin-bottom: 8px; overflow: hidden; }
.faq-item summary { display: flex; align-items: center; gap: 14px; padding: 16px 18px; cursor: pointer; list-style: none; font: 600 15px var(--body); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item .plus { margin-left: auto; width: 26px; height: 26px; border-radius: 50%; background: var(--soft); position: relative; flex: none; transition: transform .25s, background .2s; }
.faq-item .plus::before, .faq-item .plus::after { content: ""; position: absolute; left: 50%; top: 50%; width: 11px; height: 2px; margin: -1px 0 0 -5.5px; background: var(--ink); border-radius: 2px; }
.faq-item .plus::after { transform: rotate(90deg); transition: transform .25s; }
.faq-item[open] .plus { background: var(--accent); }
.faq-item[open] .plus::after { transform: rotate(0deg); }
.faq-item p { margin: 0; padding: 0 18px 18px; color: var(--muted); line-height: 1.6; font-size: 14.5px; max-width: 760px; }
.faq-cta { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 10px; padding: 20px 24px; border-radius: 16px; background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
.faq-cta div:first-child { display: flex; flex-direction: column; gap: 2px; } .faq-cta span { color: var(--muted); font-size: 14px; }
@media (max-width: 800px) { .faq-layout { grid-template-columns: 1fr; } .faq-nav { position: static; display: flex; overflow-x: auto; } .faq-nav button { white-space: nowrap; } .help-hero { padding: 22px; } }

/* ---- AI assistant ---- */
.ai-fab { position: fixed; right: 22px; bottom: 22px; z-index: 60; width: 56px; height: 56px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center; color: #fff;
  background: linear-gradient(140deg, #6AA6EC, var(--accent) 55%, #3F7FCB); box-shadow: 0 10px 28px rgba(0,0,0,.35), 0 0 0 1px rgba(255,255,255,.08) inset; transition: transform .2s; }
.ai-fab:hover { transform: translateY(-2px) scale(1.03); }
.ai-fab::after { content: ""; position: absolute; top: 9px; right: 9px; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 2px #4D4D4D; }
.ai-fab.open::after { display: none; }
.ai-fab svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ai-fab .i-close { display: none; } .ai-fab.open .i-chat { display: none; } .ai-fab.open .i-close { display: block; }
.ai-panel { position: fixed; right: 22px; bottom: 90px; z-index: 60; width: min(380px, calc(100vw - 28px)); height: min(560px, calc(100vh - 130px)); display: flex; flex-direction: column;
  background: #3E3E3E; border-radius: 18px; box-shadow: 0 24px 60px rgba(0,0,0,.45), 0 0 0 1px #2B2B2B; overflow: hidden; animation: aiIn .22s ease-out; }
@keyframes aiIn { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.ai-panel[hidden] { display: none; }
.ai-head { display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 16px; background: #2B2B2B; }
.ai-head div { display: flex; flex-direction: column; flex: 1; } .ai-head b { font-size: 14.5px; } .ai-head span { font-size: 12px; color: var(--muted); }
.ai-dot { width: 34px; height: 34px; border-radius: 50%; flex: none; background: radial-gradient(circle at 35% 30%, #8FC0F5, var(--accent) 60%, #2F6FB8); box-shadow: 0 0 0 3px rgba(82,148,226,.25); }
.ai-head .icon { border: 0; background: none; color: var(--muted); cursor: pointer; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 8px; }
.ai-head .icon:hover { background: #3A3A3A; color: #fff; }
.ai-head .icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.ai-log { flex: 1; overflow-y: auto; padding: 16px 14px 8px; display: flex; flex-direction: column; gap: 10px; }
.ai-msg { max-width: 86%; padding: 10px 13px; border-radius: 14px; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.ai-msg.assistant { align-self: flex-start; background: #4D4D4D; border-bottom-left-radius: 4px; }
.ai-msg.user { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 4px; }
.ai-msg.typing { display: flex; gap: 4px; padding: 14px; } .ai-msg.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; } .ai-msg.typing i:nth-child(2) { animation-delay: .2s; } .ai-msg.typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.ai-fb { display: flex; align-items: center; gap: 6px; margin-top: 8px; padding-top: 8px; border-top: 1px solid #5A5A5A; font-size: 12px; color: var(--muted); }
.ai-fb button { border: 0; background: #444; border-radius: 8px; padding: 3px 7px; cursor: pointer; font-size: 13px; }
.ai-fb button:hover { background: #5A5A5A; }
.ai-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 10px; }
.ai-chips button { border: 0; border-radius: 99px; padding: 7px 11px; background: #4D4D4D; color: var(--ink); font: 12.5px var(--body); cursor: pointer; box-shadow: inset 0 0 0 1px #5A5A5A; }
.ai-chips button:hover { box-shadow: inset 0 0 0 1px var(--accent); }
.ai-form { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px 12px; border-top: 1px solid #2B2B2B; }
.ai-form textarea { flex: 1; resize: none; border: 0; border-radius: 12px; background: #2E2E2E; color: var(--ink); font: 14px/1.4 var(--body); padding: 11px 12px; max-height: 120px; outline: none; }
.ai-form textarea:focus { box-shadow: inset 0 0 0 1.5px var(--accent); }
.ai-send { width: 42px; height: 42px; border-radius: 12px; border: 0; background: var(--accent); color: #fff; display: grid; place-items: center; cursor: pointer; flex: none; }
.ai-send svg { width: 18px; height: 18px; fill: currentColor; }
@media (max-width: 760px) { .ai-fab { bottom: 78px; right: 14px; width: 50px; height: 50px; } .ai-panel { right: 10px; left: 10px; width: auto; bottom: 138px; height: min(520px, calc(100vh - 200px)); } }
@media (prefers-reduced-motion: reduce) { .ai-panel { animation: none; } .avatar.ping { animation: none; } }

/* admin: assistant page */
.ai-card { background: var(--surface); border-radius: 12px; box-shadow: 0 0 0 1px var(--line); padding: 14px 16px; margin-bottom: 10px; display: grid; gap: 6px; }
.ai-card.open { box-shadow: inset 3px 0 0 var(--brand), 0 0 0 1px var(--line); }
.ai-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.ai-meta .btn { margin-left: auto; }
.ai-q { font-weight: 600; font-size: 15px; }
.ai-a { color: var(--muted); font-size: 14px; line-height: 1.5; } .ai-a small { font-weight: 600; color: var(--ink); } .ai-a.team small { color: var(--ok); }
.ai-answer { display: grid; gap: 8px; margin-top: 6px; }
.ai-answer textarea, .ai-teach input, .ai-teach textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; background: #3A3A3A; color: var(--ink); font: 14px var(--body); padding: 10px 12px; box-sizing: border-box; }
.ai-teach { display: grid; gap: 8px; padding: 14px 16px; border-radius: 12px; background: var(--soft); margin-bottom: 14px; } .ai-teach .btn { justify-self: start; }
code.uid { font: 600 11.5px var(--mono); padding: 2px 6px; border-radius: 6px; background: #3A3A3A; color: var(--brand); letter-spacing: .04em; }

/* profile: user ID */
.pcard.who { align-items: center; }
.uid-card { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; padding: 10px 14px; border-radius: 12px; background: var(--soft); }
.uid-card span { font: 600 10.5px var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.uid-card code { font: 600 18px var(--mono); color: var(--brand); letter-spacing: .06em; }

/* ---- My renders (5 Dec): left panel, real shapes, Grid / List ---- */
.page.renders-page { max-width: none; padding: 0; }
.rv-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: calc(100vh - 60px); }
.rv-side { position: sticky; top: 60px; align-self: start; height: calc(100vh - 60px); overflow-y: auto; padding: 22px 16px; border-right: 1px solid var(--line); background: #3F3F3F; display: flex; flex-direction: column; gap: 4px; }
.rv-side > .btn { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 18px; }
.rv-side > .btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.rv-side .olabel { display: block; font: 600 10.5px var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 10px 8px 6px; }
.rv-sub { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; } .rv-sub .olabel { margin: 0 8px; }
.rv-add { width: 26px; height: 26px; border-radius: 8px; border: 0; background: none; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.rv-add:hover { background: var(--soft); color: var(--ink); }
.rv-add svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.rv-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 10px; background: none; color: var(--muted); font: 500 14px var(--body); cursor: pointer; text-align: left; }
.rv-item svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.rv-item span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rv-item em { font: 11.5px var(--mono); font-style: normal; padding: 2px 7px; border-radius: 99px; background: #4A4A4A; color: var(--muted); }
.rv-item:hover { background: #474747; color: var(--ink); }
.rv-item.on { background: color-mix(in srgb, var(--accent) 22%, #3F3F3F); color: #fff; box-shadow: inset 3px 0 0 var(--accent); }
.rv-item.on svg { stroke: var(--accent); } .rv-item.on em { background: var(--accent); color: #fff; }
.rv-empty { margin: 2px 10px 6px; }
.rv-new { margin-top: 6px; padding: 9px 10px; border: 1px dashed #5E5E5E; border-radius: 10px; background: none; color: var(--muted); font: 500 13px var(--body); cursor: pointer; text-align: left; }
.rv-new:hover { border-color: var(--accent); color: var(--ink); }
.rv-main { padding: 26px 32px 60px; min-width: 0; position: relative; }
.rv-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.rv-head h1 { margin: 2px 0 2px; font-size: 30px; } .rv-head .muted { font-size: 13px; }
.view-switch { position: sticky; top: 72px; z-index: 15; width: max-content; margin: 0 auto 6px; display: flex; gap: 2px; padding: 4px; border-radius: 99px; background: rgba(43,43,43,.88); backdrop-filter: blur(8px); box-shadow: 0 8px 24px rgba(0,0,0,.35), inset 0 0 0 1px #555; }
.view-switch button { display: flex; align-items: center; gap: 7px; padding: 8px 16px; border: 0; border-radius: 99px; background: none; color: var(--muted); font: 600 13px var(--body); cursor: pointer; }
.view-switch button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.view-switch button.on { background: var(--accent); color: #fff; }
.gallery2 .day { font: 600 11px var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 22px 0 12px; }

/* grid: justified rows; each tile is as wide as its picture's shape needs, nothing is cropped */
.jgrid { display: flex; flex-wrap: wrap; gap: 14px; }
.jgrid .tile { flex: calc(var(--ar) * 100) 1 calc(var(--ar) * 190px); max-width: calc(var(--ar) * 340px); position: relative; border-radius: 14px; overflow: hidden; background: #2B2B2B; box-shadow: 0 0 0 1px var(--line); }
.jgrid .jfill { flex: 1000 1 0; }
.jgrid .tile .pic { display: block; width: 100%; aspect-ratio: var(--ar); padding: 0; border: 0; background: #2B2B2B; cursor: zoom-in; position: relative; }
.jgrid .tile .pic img { width: 100%; height: 100%; object-fit: contain; display: block; transition: transform .4s ease; }
.jgrid .tile:hover .pic img { transform: scale(1.025); }
.jgrid .tile .bar { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; padding: 34px 10px 10px; background: linear-gradient(transparent, rgba(20,20,20,.88)); opacity: 0; transform: translateY(6px); transition: opacity .2s, transform .2s; pointer-events: none; }
.jgrid .tile:hover .bar, .jgrid .tile:focus-within .bar { opacity: 1; transform: none; pointer-events: auto; }
.jgrid .tile .when { color: #EEE; font-size: 12.5px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.jgrid .tile .ptag { align-self: flex-start; }
@media (hover: none) { .jgrid .tile .bar { opacity: 1; transform: none; pointer-events: auto; } }

/* list: big pictures, one after another, details beside */
.gallery2.list .lcard { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 0; margin-bottom: 22px; border-radius: 16px; overflow: hidden; background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
.lcard .lpic { display: grid; place-items: center; padding: 0; border: 0; background: #2B2B2B; cursor: zoom-in; position: relative; min-height: 260px; }
.lcard .lpic img { display: block; width: 100%; max-height: 76vh; aspect-ratio: var(--ar); object-fit: contain; }
.lcard .linfo { display: flex; flex-direction: column; gap: 14px; padding: 20px; }
.lcard .when { font-weight: 600; }
.lcard dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 0; font-size: 13.5px; } .lcard dt { color: var(--muted); } .lcard dd { margin: 0; }
.lcard .ib { margin-top: auto; display: flex; gap: 6px; }
.gallery2 .flag { position: absolute; top: 10px; left: 10px; }
@media (max-width: 900px) {
  .rv-layout { grid-template-columns: 1fr; }
  .rv-side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; border-right: 0; border-bottom: 1px solid var(--line); padding: 14px; }
  .rv-side > .btn, .rv-side .olabel, .rv-sub, .rv-empty { display: none; }
  .rv-item { width: auto; } .rv-new { margin: 0; }
  .rv-main { padding: 18px 14px 90px; }
  .gallery2.list .lcard { grid-template-columns: 1fr; }
}

/* ---- Credits (5 Dec): balance card, bronze / silver / gold plans, top-ups ---- */
.tier-bronze, .tier.bronze { --t1: #E7B48A; --t2: #B4713F; --t3: #7A4522; }
.tier-silver, .tier.silver { --t1: #F1F3F6; --t2: #B9C0CA; --t3: #7D8591; }
.tier-gold, .tier.gold { --t1: #FBE7A1; --t2: #DFB52D; --t3: #9C7714; }
.tier-trial { --t1: #9CC4F2; --t2: #5294E2; --t3: #2F6FB8; }
.medal { width: 40px; height: 40px; flex: none; }
.medal .rib { fill: var(--t3); opacity: .85; }
.medal circle { fill: var(--t2); stroke: var(--t1); stroke-width: 1.5; }
.medal .star { fill: var(--t1); }

.bal { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 20px; padding: 26px 28px; border-radius: 20px; margin-bottom: 34px; position: relative; overflow: hidden;
  background: radial-gradient(90% 140% at 0% 0%, color-mix(in srgb, var(--t2) 26%, transparent), transparent 60%), linear-gradient(135deg, #4F4F4F, #3E3E3E); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--t2) 40%, #2B2B2B); }
.bal-main { display: flex; flex-direction: column; gap: 6px; }
.bal-n { font: 600 56px/1 var(--head); letter-spacing: -.02em; color: #fff; }
.bal-plan { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--t1); } .bal-plan .medal { width: 26px; height: 26px; }
.bal-side { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.bal-side > div { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: 14px; background: rgba(30,30,30,.35); }
.bal-side span { font: 600 10.5px var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.bal-side b { font: 600 24px var(--head); } .bal-side b small { font-size: 14px; color: var(--muted); font-weight: 500; }
.bal-side small { font-size: 12px; color: var(--muted); }
.bal-bar { height: 5px; border-radius: 99px; background: rgba(0,0,0,.35); overflow: hidden; margin: 2px 0; } .bal-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--t2), var(--t1)); border-radius: 99px; }

.sec-head { margin: 8px 0 16px; } .sec-head h2 { margin: 4px 0 4px; font-size: 24px; } .sec-head .sub { margin: 0; color: var(--muted); }
.tiers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-bottom: 38px; }
.tier { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 24px 22px 22px; border-radius: 20px; overflow: hidden;
  background: linear-gradient(160deg, color-mix(in srgb, var(--t2) 20%, #4D4D4D) 0%, #474747 38%, #404040 100%);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--t2) 45%, #2B2B2B), 0 18px 40px rgba(0,0,0,.25); transition: transform .25s, box-shadow .25s; }
.tier::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: linear-gradient(90deg, var(--t3), var(--t1), var(--t2)); }
.tier::after { content: ""; position: absolute; top: -60%; left: -30%; width: 60%; height: 220%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.07), transparent); transform: rotate(18deg) translateX(-120%); transition: transform .9s ease; pointer-events: none; }
.tier:hover { transform: translateY(-4px); box-shadow: inset 0 0 0 1px var(--t2), 0 26px 50px rgba(0,0,0,.32); }
.tier:hover::after { transform: rotate(18deg) translateX(320%); }
.tier.on { box-shadow: inset 0 0 0 2px var(--t2), 0 18px 40px rgba(0,0,0,.3); }
.tier-top { display: flex; align-items: center; gap: 12px; }
.tier-medal { font: 600 10.5px var(--body); letter-spacing: .16em; text-transform: uppercase; color: var(--t1); }
.tier h3 { margin: 2px 0 0; font-size: 20px; }
.tier-price b { font: 600 40px/1 var(--head); letter-spacing: -.02em; background: linear-gradient(180deg, #fff, var(--t1)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tier-price span { color: var(--muted); margin-left: 4px; }
.tier-cr { font-size: 14px; color: var(--muted); } .tier-cr b { color: var(--ink); font-size: 16px; }
.tier-list { list-style: none; margin: 0; padding: 14px 0 0; border-top: 1px solid rgba(255,255,255,.08); display: grid; gap: 8px; font-size: 13.5px; color: var(--muted); }
.tier-list li { position: relative; padding-left: 22px; } .tier-list b { color: var(--ink); }
.tier-list li::before { content: ""; position: absolute; left: 0; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--t2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--t2) 25%, transparent); }
.tier-btn { margin-top: auto; padding: 12px; border-radius: 12px; border: 0; font: 600 14px var(--body); text-align: center; background: rgba(30,30,30,.4); color: var(--muted); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.tier-btn:disabled { cursor: not-allowed; }
.tier-btn.current { background: linear-gradient(90deg, var(--t3), var(--t2)); color: #1E1E1E; box-shadow: none; }
.ribbon { position: absolute; top: 16px; right: -1px; padding: 5px 12px 5px 14px; border-radius: 99px 0 0 99px; background: linear-gradient(90deg, var(--t2), var(--t1)); color: #2A2208; font: 700 11px var(--body); letter-spacing: .03em; }

.topups { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin-bottom: 12px; }
.topup { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px; padding: 18px 20px; border-radius: 16px; background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
.tu-cr { display: flex; align-items: baseline; gap: 6px; } .tu-cr svg { width: 24px; height: 24px; align-self: center; fill: none; stroke: var(--brand); stroke-width: 1.7; stroke-linecap: round; }
.tu-cr b { font: 600 28px var(--head); } .tu-cr span { color: var(--muted); font-size: 13px; }
.tu-price { display: flex; flex-direction: column; } .tu-price b { font: 600 18px var(--head); } .tu-price span { font-size: 12px; color: var(--muted); }
.pay-note { margin: 4px 0 34px; }
.costs-box { margin-bottom: 30px; border-radius: 16px; background: var(--surface); box-shadow: 0 0 0 1px var(--line); overflow: hidden; }
.costs-box summary { display: flex; flex-direction: column; gap: 2px; padding: 16px 20px; cursor: pointer; list-style: none; } .costs-box summary::-webkit-details-marker { display: none; }
.costs-box summary span { color: var(--muted); font-size: 13px; }
.costs-box .table-wrap { margin: 0; border-radius: 0; box-shadow: none; border-top: 1px solid var(--line); }
@media (max-width: 900px) { .tiers { grid-template-columns: 1fr; } .bal { grid-template-columns: 1fr; } .bal-n { font-size: 44px; } .topup { grid-template-columns: 1fr auto; } .topup .btn { grid-column: 1 / -1; } }
@media (prefers-reduced-motion: reduce) { .tier, .tier::after { transition: none; } }
@media (max-width: 760px) {
  .ai-fab:not(.open) { display: none; } /* on phones the assistant opens from Help (tab bar), so it never covers the studio buttons */
  .ai-fab.open { bottom: 78px; }
  .ai-panel { bottom: 76px; top: 70px; height: auto; }
  .jgrid .tile { max-width: none; flex-basis: 100%; }
}
.hero-ask { display: none; align-items: center; gap: 8px; } .hero-ask svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
@media (max-width: 760px) { .hero-ask { display: inline-flex; } }
.panel .slot.filled { border: 0; background: none; }
.jgrid .tile .bar { flex-wrap: wrap; }
.jgrid .tile .when { flex: 1 1 150px; } .jgrid .tile .when b { font-weight: 600; color: #fff; }

/* =====================================================================
   Round 3 (5 Dec 2026, evening): owner's review of round 2
   ===================================================================== */

/* ---- quick tour: fixed size (buttons never move), title bar, caption under the picture ---- */
dialog.tour { width: min(860px, 94vw); max-width: none; }
.tour .dialog { width: 100%; box-sizing: border-box; padding: 16px 18px 16px; }
.tour-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 12px; }
.tour-head > div { display: flex; flex-direction: column; gap: 2px; }
.tour-head b { font: 600 17px var(--head); }
.tour-head .tour-x { position: static; flex: none; background: var(--soft); }
.tour-copy { height: 104px; overflow: hidden; }
.tour .dialog .tour-copy h2 { margin: 14px 0 4px; }
.tour .tour-foot { min-height: 40px; }
.tour-prog { display: flex; align-items: center; gap: 12px; min-width: 0; }
.tour-step { font: 600 13px var(--body); color: var(--ink); white-space: nowrap; } .tour-step small { font-size: 13px; font-weight: 400; color: var(--muted); }
.tour .tour-dots { display: flex; gap: 6px; margin: 0; }
.tour .tour-dots i { width: 22px; height: 6px; border-radius: 99px; background: #5A5A5A; cursor: pointer; transition: background .2s, width .2s; }
.tour .tour-dots i.past { background: color-mix(in srgb, var(--brand) 55%, #5A5A5A); }
.tour .tour-dots i.on { background: var(--brand); width: 34px; }
.tp { grid-template-areas: "img panel" "cap panel"; grid-template-rows: auto auto; row-gap: calc(var(--u) * 1.2); }
.tp-img { grid-area: img; } .tp-panel { grid-area: panel; } 
.tp-tag { grid-area: cap; position: static; justify-self: center; padding: 0; background: none; border-radius: 0; color: rgba(233,231,225,.8); font: 500 calc(var(--u) * 1.9)/1.3 var(--body); text-align: center; letter-spacing: .01em; }
.tp-tag:empty { display: block; }
.tp-floors { display: flex; flex-direction: column; gap: calc(var(--u) * .5); animation: tpin .3s ease; }
.tp-floors .tp-k em { font-style: normal; opacity: .7; }
.tp-fields { display: grid; grid-template-columns: 1fr 1.3fr; gap: calc(var(--u) * .6); }
.tp-fields span { display: flex; flex-direction: column; gap: calc(var(--u) * .25); padding: calc(var(--u) * .5) calc(var(--u) * .8); border-radius: calc(var(--u) * .8); background: rgba(255,255,255,.05); box-shadow: inset 0 0 0 1px rgba(127,127,127,.35); transition: box-shadow .2s; }
.tp-fields span.focus { box-shadow: inset 0 0 0 1.5px var(--accent); }
.tp-fields small { font-size: calc(var(--u) * 1.3); opacity: .6; }
.tp-fields b { font: 600 calc(var(--u) * 1.8)/1.2 var(--mono); min-height: 1.2em; }
.tp-fields span.focus b::after { content: ""; display: inline-block; width: 1px; height: 1em; margin-left: 1px; vertical-align: -2px; background: currentColor; animation: blink 1s infinite; }
@container (max-width: 480px) { .tp { grid-template-areas: "img" "cap" "panel"; grid-template-rows: auto auto auto; } }
@media (max-width: 600px) { .tour-copy { height: 128px; } .tour-step small { display: none; } .tour .tour-dots i { width: 14px; } .tour .tour-dots i.on { width: 22px; } }

/* ---- stepper: the line is gold between every step already reached ---- */
.stepper { border-bottom: 0; padding-bottom: 12px; margin-bottom: 10px; }
.stepper button:is(.done, .on) + button:is(.done, .on)::before { background: var(--brand); }

/* ---- the panel's own scrollbar: thin, no arrows ---- */
.pb-scroll { scrollbar-width: thin; scrollbar-color: #5E5E5E transparent; }
.pb-scroll::-webkit-scrollbar { width: 6px; } .pb-scroll::-webkit-scrollbar-button { display: none; height: 0; }
.pb-scroll::-webkit-scrollbar-thumb { background: #5E5E5E; border-radius: 6px; } .pb-scroll::-webkit-scrollbar-track { background: transparent; }

/* ---- Step 1: the 6 colours, flat and calm (no glow) ---- */
.pal-lab { margin: 2px 0 8px; font: 600 10.5px var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.pal-strip { grid-template-columns: repeat(6, 1fr); gap: 6px; margin: 0 0 18px; }
.pal-strip span { flex-direction: column; gap: 7px; padding: 0; background: none; font-size: 11.5px; font-weight: 500; color: var(--muted); }
.pal-strip i { width: 100%; height: 30px; border-radius: 8px; background: var(--c); box-shadow: inset 0 0 0 1px rgba(255,255,255,.14), inset 0 -10px 16px rgba(0,0,0,.18); }

/* ---- Step 2: one clean card per colour ---- */
.mcards { display: grid; gap: 10px; margin-bottom: 14px; }
.mcard { border-radius: 14px; background: var(--soft); padding: 12px; display: grid; gap: 10px; box-shadow: inset 0 0 0 1px transparent; transition: box-shadow .15s; }
.mcard.sel { box-shadow: inset 0 0 0 1.5px var(--accent); }
.mc-top { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.mc-top .sw.lg { width: 30px; height: 30px; border-radius: 8px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.14); }
.mc-name { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.mc-name b { font-size: 14.5px; }
.mcard em.st { font-style: normal; font: 600 10.5px var(--body); letter-spacing: .06em; text-transform: uppercase; padding: 3px 8px; border-radius: 99px; }
.mcard em.st.req { color: var(--brand); background: color-mix(in srgb, var(--brand) 14%, transparent); }
.mcard em.st.ok { color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, transparent); }
.mcard em.st.warn { color: #F0B860; background: rgba(240,184,96,.14); }
.mc-photo { width: 74px; height: 56px; border-radius: 10px; overflow: hidden; display: grid; place-items: center; align-content: center; gap: 2px; cursor: pointer; background: #3A3A3A; box-shadow: inset 0 0 0 1.5px #5E5E5E; color: var(--muted); transition: box-shadow .15s, color .15s; }
.mc-photo svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.mc-photo small { font-size: 10.5px; }
.mc-photo:hover, .mc-photo.over { box-shadow: inset 0 0 0 1.5px var(--accent); color: var(--ink); }
.mc-photo.filled { box-shadow: none; } .mc-photo.filled img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mc-photo.filled:hover { box-shadow: 0 0 0 2px var(--accent); }
.mc-warn { margin: -2px 0 0; font-size: 12px; color: #F0B860; line-height: 1.4; }
.mcard .floors-box { margin: 0; padding: 10px; border: 0; border-radius: 10px; background: #3A3A3A; }
.mcard .floors-box .fb-lab { grid-column: 1 / -1; font: 600 10.5px var(--body); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.mcard .floors-box .fb-lab em { font-style: normal; font-weight: 400; text-transform: none; letter-spacing: 0; opacity: .8; }
.mcard .floors-box input { background: #2E2E2E; border-color: transparent; }
.mc-acts { display: flex; gap: 16px; margin-top: -2px; }
.mc-acts .link.mini { font-size: 12.5px; color: var(--muted); text-decoration: none; padding: 0; } .mc-acts .link.mini:hover { color: var(--ink); text-decoration: underline; }

/* ---- Step 3: option buttons that look like buttons ---- */
.panel .group { margin-bottom: 16px; }
.seg.mtiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.seg.mt-surroundings { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.seg.mtiles button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; min-height: 0; padding: 10px 6px 9px; border-radius: 12px; border: 0;
  background: linear-gradient(180deg, #555, #4A4A4A); color: var(--ink); font: 500 12px/1.2 var(--body); text-align: center; cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 1px 0 rgba(0,0,0,.35), 0 2px 6px rgba(0,0,0,.18); transition: transform .12s, box-shadow .15s, background .15s; }
.seg.mtiles button:hover:not(:disabled) { transform: translateY(-1px); background: linear-gradient(180deg, #5C5C5C, #505050); }
.seg.mtiles button:active:not(:disabled) { transform: translateY(1px); box-shadow: inset 0 1px 3px rgba(0,0,0,.35); }
.seg.mtiles.mtiles button.on { background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 30%, #4F4F4F), color-mix(in srgb, var(--accent) 18%, #474747)); box-shadow: inset 0 0 0 1.5px var(--accent), 0 4px 14px rgba(82,148,226,.22); color: #fff; }
.seg.mtiles button:disabled { opacity: .4; cursor: not-allowed; }
.seg.mtiles svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; opacity: .85; }
.seg.mtiles button.on svg { stroke: #fff; opacity: 1; }
.tsky { display: grid; place-items: center; width: 100%; height: 30px; border-radius: 8px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.1); position: relative; overflow: hidden; }
.tsky::after { content: ""; position: absolute; width: 12px; height: 12px; border-radius: 50%; }
.t-morning { background: linear-gradient(180deg, #8DB7E6 0%, #F4C9A6 100%); } .t-morning::after { left: 18%; bottom: 3px; background: #FFE3B0; box-shadow: 0 0 10px #FFD58A; }
.t-midday { background: linear-gradient(180deg, #3E86D9, #8EC3F2); } .t-midday::after { right: 20%; top: 4px; background: #FFF6D8; box-shadow: 0 0 12px #FFF1B8; }
.t-golden { background: linear-gradient(180deg, #F29A4A, #F6D27A); } .t-golden::after { left: 45%; bottom: -3px; background: #FFE08A; box-shadow: 0 0 12px #FFC152; }
.t-overcast { background: linear-gradient(180deg, #9BA3AD, #C9CED4); } .t-overcast::after { display: none; }
.t-bluehour { background: linear-gradient(180deg, #1C2C5E, #4E6BB0); } .t-bluehour::after { right: 22%; top: 5px; width: 3px; height: 3px; background: #fff; box-shadow: -14px 6px 0 #DDE6FF, -30px 2px 0 #fff; }
.t-night { background: linear-gradient(180deg, #0B1022, #1E2950); } .t-night::after { right: 20%; top: 5px; width: 10px; height: 10px; background: transparent; box-shadow: 3px 2px 0 0 #F2EBC8; }
.t-frommood { background: #3A3A3A; color: var(--muted); } .t-frommood::after { display: none; } .t-frommood svg { width: 18px; height: 18px; }
.group.pc-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.group.pc-row > div { display: flex; flex-direction: column; gap: 8px; }
.group.pc-row > div > span { font: 600 10.5px var(--body); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.seg.mswitch { display: grid; grid-template-columns: 1fr 1fr; gap: 0; padding: 3px; border-radius: 11px; background: #383838; box-shadow: inset 0 1px 3px rgba(0,0,0,.35); }
.seg.mswitch button { border: 0; border-radius: 8px; padding: 8px 6px; background: none; color: var(--muted); font: 600 12.5px var(--body); cursor: pointer; min-height: 0; transition: background .15s, color .15s; }
.seg.mswitch.mswitch button.on { background: var(--accent); color: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.seg.mswitch button:hover:not(.on) { color: var(--ink); }

/* ---- My renders: bigger pictures, whole picture opens it, buttons never overlap, drag to a project ---- */
.view-switch { top: 66px; margin: 4px auto 22px; background: rgba(43,43,43,.55); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); box-shadow: 0 6px 20px rgba(0,0,0,.25), inset 0 0 0 1px rgba(255,255,255,.08); }
.rv-head { margin-bottom: 0; }
.jgrid { gap: 16px; }
.jgrid .tile { flex: calc(var(--ar) * 100) 1 calc(var(--ar) * 250px); max-width: calc(var(--ar) * 440px); cursor: pointer; transition: transform .2s, box-shadow .2s; }
.jgrid .tile:hover { box-shadow: 0 0 0 1px #6A6A6A, 0 14px 30px rgba(0,0,0,.3); }
.jgrid .tile .pic { cursor: pointer; }
.jgrid .tile .bar { pointer-events: none !important; padding: 40px 12px 11px; }
.jgrid .tile .bar .when { pointer-events: none; }
.tacts { position: absolute; top: 8px; right: 8px; display: flex; gap: 6px; opacity: 0; transform: translateY(-4px); transition: opacity .18s, transform .18s; z-index: 2; }
.jgrid .tile:hover .tacts, .jgrid .tile:focus-within .tacts { opacity: 1; transform: none; }
.tacts .ti { width: 32px; height: 32px; border-radius: 50%; border: 0; display: grid; place-items: center; background: rgba(30,30,30,.72); backdrop-filter: blur(6px); color: #fff; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.3); }
.tacts .ti:first-child { background: var(--accent); }
.tacts .ti:hover { transform: scale(1.08); } .tacts .ti[data-del]:hover { background: #C0504D; }
.tacts .ti svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: none) { .tacts { opacity: 1; transform: none; } }
.tile.dragging, .lcard.dragging { opacity: .45; }
.rv-dragging .rv-item[data-gfilter]:not([data-gfilter="all"]) { box-shadow: inset 0 0 0 1px dashed; outline: 1px dashed #6A6A6A; outline-offset: -1px; }
.rv-item.drop { background: color-mix(in srgb, var(--accent) 30%, #3F3F3F) !important; color: #fff; outline: 2px solid var(--accent) !important; }
.rv-stats { margin-top: 22px; padding: 14px; border-radius: 14px; background: #474747; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 10px; }
.rv-stats .olabel { grid-column: 1 / -1; margin: 0 !important; }
.rv-stats div { display: flex; flex-direction: column; gap: 1px; } .rv-stats b { font: 600 22px var(--head); } .rv-stats span { font-size: 12px; color: var(--muted); }
.rv-tip { display: flex; gap: 8px; align-items: flex-start; margin: 14px 6px 0; font-size: 12.5px; line-height: 1.45; color: var(--muted); }
.rv-tip svg { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--brand); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* list: picture and details side by side, details fill the rest of the width */
.gallery2.list .lcard { grid-template-columns: auto minmax(300px, 1fr); max-width: 1500px; cursor: default; }
.lcard .lpic { height: min(560px, 68vh); width: auto; aspect-ratio: var(--ar); max-width: min(980px, 62vw); min-height: 0; cursor: pointer; }
.lcard .lpic img { width: 100%; height: 100%; max-height: none; object-fit: contain; }
.lcard .linfo { gap: 18px; padding: 22px 24px; min-width: 0; }
.lhead { display: flex; flex-direction: column; gap: 2px; } .lhead b { font: 600 20px var(--head); } .lhead span { color: var(--muted); font-size: 13.5px; }
.lsrc { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.lin { display: flex; flex-direction: column; gap: 6px; padding: 0; border: 0; background: none; color: var(--muted); font: 12px var(--body); cursor: pointer; text-align: left; }
.lin img { width: 150px; height: 104px; object-fit: cover; border-radius: 10px; display: block; background: #2B2B2B; box-shadow: 0 0 0 1px var(--line); }
.lin:hover img { box-shadow: 0 0 0 2px var(--accent); }
.lmats { display: flex; flex-direction: column; gap: 6px; } .lmats .olabel { margin: 0; font: 600 10.5px var(--body); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.lmats > div { display: flex; flex-wrap: wrap; gap: 8px; }
.lmats i { position: relative; width: 52px; height: 52px; border-radius: 9px; overflow: hidden; box-shadow: 0 0 0 1px var(--line); }
.lmats i img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lmats i b { position: absolute; left: 4px; bottom: 4px; width: 12px; height: 12px; border-radius: 4px; box-shadow: 0 0 0 1.5px rgba(0,0,0,.5); }
.lcard dl { font-size: 14px; }
@media (max-width: 1200px) { .gallery2.list .lcard { grid-template-columns: 1fr; } .lcard .lpic { width: 100%; height: auto; max-width: none; } }

/* ---- assistant: a little glass robot instead of a round chat button ---- */
.ai-fab, .ai-fab.open { width: 66px; height: 66px; border-radius: 50%; background: radial-gradient(circle at 50% 55%, rgba(82,148,226,.28), rgba(82,148,226,0) 68%); box-shadow: none; padding: 0; overflow: visible; }
.ai-fab::after { display: none !important; }
.ai-bot { display: block; width: 66px; height: 66px; filter: drop-shadow(0 10px 14px rgba(0,0,0,.45)); animation: botFloat 4.5s ease-in-out infinite; }
.ai-bot svg.bot, .ai-dot svg.bot { width: 100%; height: 100%; display: block; overflow: visible; }
.bot-eyes { transform-origin: 32px 32px; animation: botBlink 5s infinite; }
@keyframes botFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes botBlink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.12); } }
.ai-fab:hover .ai-bot { filter: drop-shadow(0 12px 18px rgba(0,0,0,.5)) drop-shadow(0 0 10px rgba(127,211,255,.45)); }
.ai-fab:hover { transform: none; }
.ai-hint { position: absolute; right: 74px; top: 50%; transform: translate(6px, -50%); white-space: nowrap; padding: 7px 12px; border-radius: 99px; background: rgba(30,30,30,.85); color: #fff; font: 600 12.5px var(--body); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; box-shadow: 0 6px 18px rgba(0,0,0,.3); }
.ai-fab:hover .ai-hint { opacity: 1; transform: translate(0, -50%); }
.ai-fab.open .ai-hint { display: none; }
.ai-fab.open .ai-bot { animation: none; transform: scale(.92); }
.ai-dot { width: 40px; height: 40px; background: none; box-shadow: none; border-radius: 0; }
.ai-head { padding: 10px 12px 10px 12px; }
@media (prefers-reduced-motion: reduce) { .ai-bot, .bot-eyes { animation: none; } }
.tour #tourBtns .btn { min-width: 150px; justify-content: center; }
.mcard .floors-box { gap: 8px 10px; padding: 10px 10px 11px; }
.mcard .floors-box label { font-size: 11.5px; gap: 5px; } .mcard .floors-box label em.opt { font-style: normal; opacity: .7; }
.mcard .floors-box input { padding: 7px 9px; font-size: 13px; }
.seg.mt-surroundings { grid-template-columns: 1fr 1fr; }
.seg.mt-surroundings button { flex-direction: row; justify-content: flex-start; gap: 10px; padding: 11px 12px; text-align: left; }
.seg.mt-surroundings svg { width: 20px; height: 20px; flex: none; }
.ai-fab:hover .ai-bot { filter: drop-shadow(0 12px 16px rgba(0,0,0,.5)); transform: scale(1.06); animation-play-state: paused; }
.ai-bot { transition: transform .2s; }
svg.bot { stroke: none; fill: none; stroke-width: 0; }
.stepper button:not(:disabled) + button:not(:disabled)::before { background: var(--brand); }
@media (max-width: 900px) { .rv-stats, .rv-tip { display: none; } }

/* ---- round 3b (owner, 18:20): calmer Step 1 colours, icons on every Step 3 option ---- */
.pal-dots { list-style: none; margin: 0 0 18px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 8px; }
.pal-dots li { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink); }
.pal-dots i { width: 12px; height: 12px; border-radius: 50%; flex: none; box-shadow: 0 0 0 2px rgba(255,255,255,.08); }
.seg.mt-people, .seg.mt-cars { grid-template-columns: 1fr 1fr; }
/* Resolution in the same button style */
.seg.levels button { border: 0; border-radius: 12px; background: linear-gradient(180deg, #555, #4A4A4A); color: var(--ink); box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 1px 0 rgba(0,0,0,.35), 0 2px 6px rgba(0,0,0,.18); transition: transform .12s, background .15s; }
.seg.levels button:hover:not(:disabled) { transform: translateY(-1px); background: linear-gradient(180deg, #5C5C5C, #505050); }
.seg.levels.levels button.on { background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 30%, #4F4F4F), color-mix(in srgb, var(--accent) 18%, #474747)); box-shadow: inset 0 0 0 1.5px var(--accent), 0 4px 14px rgba(82,148,226,.22); color: #fff; }
/* the render: an ordinary pointer; the left-right cursor only while Before / after is on */
.result-wrap { cursor: default; }
.result-wrap:has(#compareRange:not([hidden])) { cursor: ew-resize; }
.checks { gap: 10px; margin: 0 0 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.checks li { padding: 0 0 0 28px; background: none; box-shadow: none; border-radius: 0; font-size: 13.5px; color: var(--muted); line-height: 1.4; }
.checks li::before { left: 0; width: 16px; height: 16px; margin-top: -8px; }
