/*
 * KVIXA backoffice.
 *
 * The product's own chrome, in KVIXA's brand: navy ink, one blue accent,
 * white. Neutral surfaces carry the content; the blue marks the one thing to
 * do on a view, the link, the selection - never a status. A status is a dot
 * and a word. Red is for destroying and for failing, nothing else.
 *
 * The mental model is Stripe's: a list whose rows open a page, a page header
 * with one primary action, sections on the page, quiet chrome, few type sizes,
 * a regular weight for reading and a heavier one only for emphasis.
 * (docs/BACKOFFICE-AUDIT.md, section 6.)
 */
:root {
  /* brand */
  --kv-navy: #011844;
  --kv-blue: #006AFE;
  --kv-blue-hover: #0052C8;
  --kv-blue-subtle: #EEF4FF;

  /* surfaces */
  --bg-page: #F7F8FA;
  --bg-surface: #FFFFFF;
  --bg-sunken: #F2F4F7;
  --row-hover: #F7F9FC;
  --border: #E3E7EE;
  --border-strong: #C9D0DB;

  /* text */
  --text-1: #011844;
  --text-2: #45506A;
  --text-3: #6B7488;
  --text-on-accent: #FFFFFF;

  /* status: dots and icons only, never a fill behind text */
  --dot-ok: #16A34A;
  --dot-warn: #D97706;
  --dot-bad: #DC2626;
  --dot-idle: #A0A8B8;
  --dot-busy: var(--kv-blue);
  --danger: #B42318;
  --danger-hover: #912018;

  /* type: four levels and a mono */
  --font: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  --fs-title: 24px; --lh-title: 32px;
  --fs-heading: 16px; --lh-heading: 24px;
  --fs-body: 14px; --lh-body: 20px;
  --fs-meta: 12px; --lh-meta: 16px;

  /* space, shape, depth */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px; --sp-6: 32px; --sp-7: 48px;
  --radius: 6px;
  --shadow-menu: 0 4px 16px rgba(1, 24, 68, .12);
  --shadow-card: 0 1px 2px rgba(1, 24, 68, .04);
  --focus: 0 0 0 3px rgba(0, 106, 254, .3);
  --nav-w: 236px;
  --content-max: 1160px;
  --row-h: 48px;
  --control-h: 36px;

  /* the older names, for the pieces not moved yet */
  --bg: var(--bg-page); --surface: var(--bg-surface); --surface-2: var(--bg-sunken);
  --ink: var(--text-1); --ink-2: var(--text-2); --line: var(--border); --line-2: var(--border);
  --blue: var(--kv-blue); --blue-dk: var(--kv-blue-hover); --blue-soft: var(--kv-blue-subtle); --blue-softer: var(--row-hover);
  --ok: #15803D; --ok-soft: #F0FDF4; --warn: #B45309; --warn-soft: #FFFBEB; --bad: var(--danger); --bad-soft: #FEF2F2;
}

* { box-sizing: border-box; margin: 0; padding: 0 }
html, body { height: 100% }
body { background: var(--bg-page); color: var(--text-1); font: 400 var(--fs-body)/var(--lh-body) var(--font); -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100% }
button, input, select, textarea { font: inherit; color: inherit }
button { cursor: pointer; border: none; background: none }
a { color: var(--kv-blue); text-decoration: none }
a:hover { color: var(--kv-blue-hover) }
img { display: block; max-width: 100% }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--radius) }
b, strong { font-weight: 600 }
code, .mono { font-family: var(--mono); font-size: 13px }
.ic { flex: none; vertical-align: middle }
.spacer { flex: 1 }
.row { display: flex; gap: var(--sp-2); align-items: center; flex-wrap: wrap }
.muted { color: var(--text-2) }
.hidden { display: none !important }

/* -------------------------------- shell -------------------------------- */
#root { min-height: 100vh }
.shell { display: flex; min-height: 100vh }
nav.side { width: var(--nav-w); flex: none; background: var(--bg-surface); border-right: 1px solid var(--border); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; z-index: 40 }
.brand { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-4) var(--sp-4) var(--sp-3) }
.brand img { width: 32px; height: 32px; object-fit: contain }
.brand b { font-weight: 800; letter-spacing: .04em; font-size: 15px }
.brand small { display: block; color: var(--text-2); font-size: var(--fs-meta); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px }
.setup-pill { margin: 0 var(--sp-3) var(--sp-2); display: flex; align-items: center; gap: var(--sp-2); padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius); color: var(--text-1); font-weight: 500 }
.setup-pill:hover { background: var(--row-hover); color: var(--text-1) }
.setup-pill .ring { width: 18px; height: 18px; flex: none }
.setup-pill small { margin-left: auto; color: var(--text-2) }
nav.side .links { flex: 1; overflow-y: auto; padding: var(--sp-1) var(--sp-2) var(--sp-3) }
.nav-group { margin-top: var(--sp-3) }
.nav-group > span { display: block; padding: 0 10px 4px; font-size: var(--fs-meta); color: var(--text-3); font-weight: 500 }
nav.side a.link { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: var(--radius); color: var(--text-2); font-weight: 500 }
nav.side a.link .ic { color: var(--text-3) }
nav.side a.link:hover { background: var(--row-hover); color: var(--text-1) }
nav.side a.link.on { background: var(--kv-blue-subtle); color: var(--kv-blue-hover); font-weight: 600 }
nav.side a.link.on .ic { color: var(--kv-blue) }
.account { border-top: 1px solid var(--border); padding: var(--sp-2); position: relative }
.account > button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius); text-align: left }
.account > button:hover { background: var(--row-hover) }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--kv-navy); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 600; flex: none }
.account .who { min-width: 0; flex: 1 }
.account .who b { display: block; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.account .who small { color: var(--text-2); font-size: var(--fs-meta) }
.menu-pop { position: absolute; bottom: calc(100% + 4px); left: var(--sp-2); right: var(--sp-2); background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-menu); padding: var(--sp-1); z-index: 60 }
.menu-pop button, .menu-pop a { display: flex; width: 100%; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 4px; color: var(--text-1); text-align: left }
.menu-pop button:hover, .menu-pop a:hover { background: var(--row-hover) }
.menu-pop .sep { height: 1px; background: var(--border); margin: 4px 0 }
.menu-pop .lang { display: flex; gap: 4px; padding: 4px 6px }
.menu-pop .lang button { justify-content: center; border: 1px solid var(--border) }
.menu-pop .lang button.on { border-color: var(--kv-blue); color: var(--kv-blue-hover); background: var(--kv-blue-subtle) }

main { flex: 1; min-width: 0; display: flex; flex-direction: column }
.env-strip { display: flex; align-items: center; gap: var(--sp-2); justify-content: center; padding: 6px var(--sp-4); background: var(--kv-navy); color: #fff; font-size: 13px }
.env-strip a { color: #fff; text-decoration: underline }
.env-strip .dot { width: 8px; height: 8px; border-radius: 50%; background: #F59E0B }
.page { flex: 1; width: 100%; max-width: var(--content-max); margin: 0 auto; padding: var(--sp-6) var(--sp-6) var(--sp-7) }
/* The licence has run out: one red line above every page (core.js licenceBanner). */
.lic-banner { width: 100%; max-width: var(--content-max); margin: 0 auto; padding: var(--sp-5) var(--sp-6) 0 }
.lic-banner .notice { margin: 0 }
.lic-banner + .page { padding-top: var(--sp-5) }
.topbar { display: none }

/* page header */
.ph { margin-bottom: var(--sp-5) }
.crumbs { display: flex; align-items: center; gap: 4px; font-size: 13px; color: var(--text-2); margin-bottom: var(--sp-2); flex-wrap: wrap }
.crumbs .ic { color: var(--text-3) }
.crumbs span { color: var(--text-2) }
.ph-row { display: flex; align-items: flex-start; gap: var(--sp-4); flex-wrap: wrap }
.ph-text { flex: 1; min-width: 240px }
.ph h1 { font-size: var(--fs-title); line-height: var(--lh-title); font-weight: 600; letter-spacing: -.01em }
.ph-meta { display: flex; align-items: center; gap: var(--sp-3); margin-top: 4px; color: var(--text-2); flex-wrap: wrap }
.ph-desc { color: var(--text-2); margin-top: 4px; max-width: 640px }
.ph-actions { display: flex; gap: var(--sp-2); align-items: center; flex-wrap: wrap }

/* sections */
.sec { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: var(--sp-4); box-shadow: var(--shadow-card) }
.sec-head { display: flex; align-items: flex-start; gap: var(--sp-3); padding: var(--sp-4) var(--sp-5) 0 }
.sec-head > div:first-child { flex: 1 }
.sec-head h2 { font-size: var(--fs-heading); line-height: var(--lh-heading); font-weight: 600 }
.sec-head p { color: var(--text-2); margin-top: 2px }
.sec-actions { display: flex; gap: var(--sp-2); align-items: center; flex-wrap: wrap }
.sec-body { padding: var(--sp-4) var(--sp-5) var(--sp-5) }
.sec-body.flush { padding: var(--sp-3) 0 0 }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: var(--sp-4); align-items: start }
.cols { margin-bottom: var(--sp-4) }
.cols > .sec { margin-bottom: 0 }
.stack > * + * { margin-top: var(--sp-4) }

/* buttons */
.b { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: var(--control-h); padding: 0 14px; border-radius: var(--radius); font-weight: 500; white-space: nowrap; border: 1px solid transparent; transition: background .12s, border-color .12s }
.b-primary { background: var(--kv-blue); color: var(--text-on-accent) }
.b-primary:hover { background: var(--kv-blue-hover); color: #fff }
.b-secondary { background: var(--bg-surface); border-color: var(--border-strong); color: var(--text-1); box-shadow: var(--shadow-card) }
.b-secondary:hover { background: var(--row-hover); color: var(--text-1) }
.b-quiet { color: var(--text-2) }
.b-quiet:hover { background: var(--row-hover); color: var(--text-1) }
.b-danger { background: var(--danger); color: #fff }
.b-danger:hover { background: var(--danger-hover); color: #fff }
.b-danger-quiet { color: var(--danger); border-color: var(--border-strong); background: var(--bg-surface) }
.b-danger-quiet:hover { background: #FEF2F2 }
.b-sm { height: 30px; padding: 0 10px; font-size: 13px }
.b-icon { padding: 0; width: var(--control-h) }
.b-icon.b-sm { width: 30px }
.b:disabled { opacity: .45; cursor: not-allowed }

/* status: a dot and a word */
.status { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--dot-idle); flex: none }
.status.s-ok::before { background: var(--dot-ok) }
.status.s-warn::before { background: var(--dot-warn) }
.status.s-bad::before { background: var(--dot-bad) }
.status.s-busy::before { background: var(--dot-busy) }
.status.s-idle::before { background: transparent; border: 1.5px solid var(--dot-idle); width: 7px; height: 7px }

/* tables: rows are links */
.tbl-wrap { overflow-x: auto }
.tbl { width: 100%; border-collapse: collapse }
.tbl th { text-align: left; font-size: var(--fs-meta); line-height: var(--lh-meta); font-weight: 500; color: var(--text-2); padding: 8px var(--sp-5); border-bottom: 1px solid var(--border); white-space: nowrap }
.tbl td { height: var(--row-h); padding: 6px var(--sp-5); border-bottom: 1px solid var(--border); vertical-align: middle }
.tbl tr:last-child td { border-bottom: none }
.tbl tr[data-href] { cursor: pointer }
.tbl tbody tr:hover td { background: var(--row-hover) }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap }
.tbl .chev { width: 40px; padding-left: 0; color: var(--text-3); text-align: right }
.tbl tr[data-href]:hover .chev { color: var(--text-1) }
.two { display: flex; flex-direction: column; min-width: 0 }
.two > span { font-weight: 500; overflow: hidden; text-overflow: ellipsis }
.two small { color: var(--text-2); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 460px }
.thumb { width: 40px; height: 40px; border-radius: 4px; object-fit: contain; background: var(--bg-sunken); flex: none }
.cell-item { display: flex; align-items: center; gap: var(--sp-3); min-width: 0 }
.group-row td { height: auto; padding: 18px var(--sp-5) 6px; font-weight: 600; background: var(--bg-surface) !important; cursor: default; border-bottom: 1px solid var(--border) }
.group-row small { color: var(--text-2); font-weight: 400; margin-left: 6px }

/* toolbar above a list */
.toolbar { display: flex; gap: var(--sp-2); align-items: center; flex-wrap: wrap; padding: 0 var(--sp-5) var(--sp-3) }
.search { position: relative; flex: 1; min-width: 200px; max-width: 360px }
.search .ic { position: absolute; left: 10px; top: 10px; color: var(--text-3) }
.search input { padding-left: 32px }

/* forms */
.inp, .fld input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=range]), .fld select, .fld textarea, select.inp, textarea.inp {
  width: 100%; height: var(--control-h); padding: 0 10px; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--bg-surface); color: var(--text-1) }
/* One chevron in every browser, not each browser's own. */
select.inp, .fld select, .toolbar select { -webkit-appearance: none; appearance: none; padding-right: 32px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2345506A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 16px }
textarea.inp, .fld textarea { height: auto; padding: 8px 10px; resize: vertical }
.inp:focus, .fld input:focus, .fld select:focus, .fld textarea:focus { outline: none; border-color: var(--kv-blue); box-shadow: var(--focus) }
.fld { display: block; margin-bottom: var(--sp-4) }
.fld-l { display: block; font-weight: 500; margin-bottom: 6px }
.fld-h { display: block; color: var(--text-2); font-size: 13px; margin-top: 4px }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); column-gap: var(--sp-4) }
.checks { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-4) }
.checks label, label.ck { display: inline-flex; align-items: center; gap: 8px; cursor: pointer }
.checks input, label.ck input { width: 16px; height: 16px; accent-color: var(--kv-blue) }
/* Prices read as prices - "52 kr" - and become a field on hover and focus. No spinner arrows anywhere. */
input[type=number] { -moz-appearance: textfield; appearance: textfield }
input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0 }
.price-cell { display: inline-flex; align-items: center; justify-content: flex-end; gap: 4px; height: 32px; padding: 0 8px; border: 1px solid transparent; border-radius: var(--radius); cursor: text; transition: border-color .12s, background .12s }
.price-cell:hover { border-color: var(--border); background: var(--bg-surface) }
.price-cell:focus-within { border-color: var(--kv-blue); box-shadow: var(--focus); background: #fff }
input.price { width: 52px; height: 30px; text-align: right; padding: 0; border: 0; background: transparent; font-weight: 500; color: var(--text-1); font-variant-numeric: tabular-nums }
input.price:focus { outline: none }
.price-cell .cur { color: var(--text-3); font-size: 13px }
.inp-suffix { position: relative } .inp-suffix input { padding-right: 36px !important; font-variant-numeric: tabular-nums }
.inp-suffix > span { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none }

/* The dish photo: the picture, and one clear way to change it. */
.photo-pick { display: flex; align-items: center; gap: var(--sp-4); padding: var(--sp-3); border: 1.5px dashed var(--border-strong); border-radius: 8px; background: var(--bg-surface); cursor: pointer; transition: border-color .12s, background .12s }
.photo-pick:hover, .photo-pick.over { border-color: var(--kv-blue); background: var(--kv-blue-subtle) }
.photo-thumb { flex: none; display: grid; place-items: center; width: 120px; height: 120px; border-radius: 6px; background: #fff; border: 1px solid var(--border); color: var(--text-3); overflow: hidden }
.photo-thumb img { width: 100%; height: 100%; object-fit: contain }
.photo-txt { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0 }
.photo-txt b { color: var(--text-1); font-weight: 600 }
.photo-txt small { color: var(--text-2); font-size: 13px; line-height: 18px }
.photo-txt .b { margin-top: 6px }
@media (max-width: 520px) { .photo-pick { flex-direction: column; align-items: flex-start } .photo-thumb { width: 100%; height: 160px } }
.saved-tick { color: var(--dot-ok); margin-left: 4px; opacity: 0; transition: opacity .2s }
.saved-tick.on { opacity: 1 }

/* a switch */
.tgl { position: relative; display: flex; align-items: flex-start; gap: var(--sp-3); cursor: pointer; padding: 4px 0 }
.tgl input { position: absolute; left: 0; top: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none }
.tgl-track { width: 34px; height: 20px; border-radius: 999px; background: var(--border-strong); position: relative; flex: none; margin-top: 1px; transition: background .15s }
.tgl-track::after { content: ""; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: transform .15s }
.tgl input:checked + .tgl-track { background: var(--kv-blue) }
.tgl input:checked + .tgl-track::after { transform: translateX(14px) }
.tgl input:focus-visible + .tgl-track { box-shadow: var(--focus) }
.tgl-text b { display: block; font-weight: 500 }
.tgl-text small { display: block; color: var(--text-2); font-size: 13px }

/* segmented choice */
.seg { display: inline-flex; border: 1px solid var(--border-strong); border-radius: var(--radius); overflow: hidden; background: var(--bg-surface) }
.seg button { height: 34px; padding: 0 12px; color: var(--text-2); font-weight: 500 }
.seg button + button { border-left: 1px solid var(--border) }
.seg button.on { background: var(--kv-blue-subtle); color: var(--kv-blue-hover) }

/* tabs */
.tabs { display: flex; gap: var(--sp-5); border-bottom: 1px solid var(--border); margin-bottom: var(--sp-5); overflow-x: auto }
.tabs a { display: inline-flex; align-items: center; gap: 6px; padding: 8px 0 10px; color: var(--text-2); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; font-weight: 500 }
.tabs a.on { color: var(--text-1); border-bottom-color: var(--kv-blue) }

/* facts on a detail page */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--sp-4) var(--sp-5) }
.facts dt { color: var(--text-2); font-size: 13px; margin-bottom: 2px }
.facts dd { font-weight: 500; overflow-wrap: anywhere }
.figs { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--sp-4); margin-bottom: var(--sp-4) }
.fig { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--sp-4) var(--sp-5); box-shadow: var(--shadow-card) }
.fig-k { color: var(--text-2) }
.fig-v { font-size: 26px; line-height: 34px; font-weight: 600; margin-top: 2px; font-variant-numeric: tabular-nums }
.fig-s { color: var(--text-2); font-size: 13px }

/* notices, empty, loading */
.notice { display: flex; align-items: center; gap: var(--sp-3); padding: 10px var(--sp-4); border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-sunken); color: var(--text-1); margin-bottom: var(--sp-4) }
.notice > .ic { color: var(--text-2); flex: none }
.notice > span:first-of-type { flex: 1 }
.notice.n-info { background: var(--kv-blue-subtle); border-color: #D4E3FF }
.notice.n-info > .ic { color: var(--kv-blue) }
.notice.n-warn { background: #FFF8EC; border-color: #F6E1B9 }
.notice.n-warn > .ic { color: var(--dot-warn) }
.notice.n-bad { background: #FEF3F2; border-color: #F8D3CF }
.notice.n-bad > .ic { color: var(--dot-bad) }
.notice.n-ok { background: #F0FAF3; border-color: #CDEBD6 }
.notice.n-ok > .ic { color: var(--dot-ok) }
.notice-act { flex: none }
.empty-state { text-align: center; padding: var(--sp-7) var(--sp-5); color: var(--text-2) }
.empty-state > .ic { color: var(--text-3); margin: 0 auto var(--sp-3); display: block }
.empty-state h3 { color: var(--text-1); font-size: var(--fs-heading); font-weight: 600 }
.empty-state p { max-width: 420px; margin: 4px auto 0 }
.empty-state > div { margin-top: var(--sp-4); display: flex; gap: var(--sp-2); justify-content: center; flex-wrap: wrap }
.skel { padding: var(--sp-4) var(--sp-5) }
.skel div { height: 14px; border-radius: 4px; margin: 18px 0; background: linear-gradient(90deg, var(--bg-sunken) 25%, #E9ECF1 50%, var(--bg-sunken) 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite }
.skel div:nth-child(3n+2) { width: 70% }
.skel div:nth-child(3n) { width: 85% }
@keyframes shimmer { to { background-position: -200% 0 } }
.error-line { display: flex; align-items: center; gap: var(--sp-2); color: var(--text-1) }
.error-line::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--dot-bad) }

/* values to copy: ids, codes, passwords */
.copyable { display: inline-flex; align-items: center; gap: 4px; background: var(--bg-sunken); border-radius: 4px; padding: 0 0 0 8px; max-width: 100% }
.copyable code { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0 }
.copyable.big { padding-left: 14px }
.copyable.big code { font-size: 20px; letter-spacing: .04em; font-weight: 600; line-height: 36px }
/* A login shown once is read off the screen and written down: never cut short. */
.copyable.big code { white-space: normal; overflow-wrap: anywhere; overflow: visible }
.facts.wide { grid-template-columns: 1fr; gap: var(--sp-3) }
.facts.wide > div { display: grid; grid-template-columns: 140px minmax(0, 1fr); align-items: center; gap: var(--sp-3) }
.facts.wide dt { margin: 0 }

/* the setup checklist */
.checklist { list-style: none }
.checklist li a { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-3) var(--sp-5); border-top: 1px solid var(--border); color: var(--text-1) }
.checklist li:first-child a { border-top: none }
.checklist li a:hover { background: var(--row-hover) }
.checklist .n { width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--border-strong); display: grid; place-items: center; font-size: 12px; color: var(--text-2); flex: none }
.checklist li.done .n { background: var(--dot-ok); border-color: var(--dot-ok); color: #fff }
.checklist li.next .n { border-color: var(--kv-blue); color: var(--kv-blue) }
.checklist .t { flex: 1 }
.checklist .t b { display: block; font-weight: 500 }
.checklist li.done .t b { color: var(--text-2) }
.checklist .t small { color: var(--text-2) }
.progress { height: 6px; background: var(--bg-sunken); border-radius: 999px; overflow: hidden }
.progress > div { height: 100%; background: var(--kv-blue); border-radius: 999px }

/* a step flow: a page with numbered steps down the left */
.steps { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: var(--sp-5); align-items: start }
.steps ol { list-style: none; position: sticky; top: var(--sp-4) }
.steps ol li { display: flex; gap: 10px; align-items: center; padding: 8px 0; color: var(--text-2) }
.steps ol li .n { width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--border-strong); display: grid; place-items: center; font-size: 12px; flex: none }
.steps ol li.on { color: var(--text-1); font-weight: 500 }
.steps ol li.on .n { border-color: var(--kv-blue); color: var(--kv-blue) }
.steps ol li.done .n { background: var(--dot-ok); border-color: var(--dot-ok); color: #fff }

/* the choice tiles (device type, template) */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--sp-3) }
.tile { display: flex; flex-direction: column; align-items: flex-start; gap: var(--sp-2); padding: var(--sp-4); border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--bg-surface); text-align: left; color: var(--text-1) }
.tile:hover { border-color: var(--kv-blue); background: var(--row-hover) }
.tile.on { border-color: var(--kv-blue); box-shadow: var(--focus) }
.tile .ic { color: var(--kv-blue) }
.tile b { font-weight: 600 }
.tile small { color: var(--text-2) }

/* the bar that appears when a form has unsaved changes */
.savebar { position: sticky; bottom: var(--sp-4); z-index: 30; display: flex; align-items: center; gap: var(--sp-3); padding: 10px var(--sp-4); background: var(--kv-navy); color: #fff; border-radius: var(--radius); box-shadow: var(--shadow-menu); margin-top: var(--sp-4) }
.savebar span { flex: 1 }
.savebar .b-quiet { color: #fff }
.savebar .b-quiet:hover { background: rgba(255, 255, 255, .1); color: #fff }

/* settings: a sub-navigation on the left */
.subnav-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: var(--sp-6); align-items: start }
.subnav { display: flex; flex-direction: column; gap: 2px; position: sticky; top: var(--sp-4) }
.subnav a { padding: 7px 10px; border-radius: var(--radius); color: var(--text-2) }
.subnav a:hover { background: var(--row-hover); color: var(--text-1) }
.subnav a.on { background: var(--kv-blue-subtle); color: var(--kv-blue-hover); font-weight: 500 }

/* the danger zone at the end of a detail page */
.danger-zone { border-color: #F3C5C1 }
.danger-zone .sec-head h2 { color: var(--danger) }
.danger-row { display: flex; align-items: center; gap: var(--sp-4); padding: var(--sp-3) 0; border-top: 1px solid var(--border) }
.danger-row:first-child { border-top: none; padding-top: 0 }
.danger-row > div { flex: 1 }
.danger-row small { display: block; color: var(--text-2) }

/* order timeline */
.timeline { list-style: none }
.timeline li { display: grid; grid-template-columns: 64px 12px 1fr; gap: var(--sp-3); padding: 6px 0; align-items: start }
.timeline time { color: var(--text-2); font-variant-numeric: tabular-nums }
.timeline i { width: 8px; height: 8px; border-radius: 50%; background: var(--border-strong); margin-top: 6px }
.timeline li.ok i { background: var(--dot-ok) }
.timeline li.bad i { background: var(--dot-bad) }
.timeline li.warn i { background: var(--dot-warn) }

/* toasts */
#toasts { position: fixed; right: var(--sp-4); bottom: var(--sp-4); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; pointer-events: none }
.toast { display: flex; align-items: center; gap: 10px; background: var(--kv-navy); color: #fff; padding: 10px 14px; border-radius: var(--radius); box-shadow: var(--shadow-menu); max-width: 420px; animation: rise .15s ease-out; pointer-events: auto }
.toast::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--kv-blue); flex: none }
.toast.good::before { background: var(--dot-ok) }
.toast.bad::before { background: var(--dot-bad) }
@keyframes rise { from { opacity: 0; transform: translateY(6px) } to { opacity: 1; transform: none } }

/* sign in, welcome, choose a password */
.gate { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: var(--sp-5); background: var(--bg-page) }
.gate-box { width: 100%; max-width: 400px; background: var(--bg-surface); border: 1px solid var(--border); border-radius: 10px; padding: var(--sp-6); box-shadow: var(--shadow-card) }
.gate-box.wide { max-width: 560px }
.gate-box .mark { width: 56px; height: 56px; margin: 0 auto var(--sp-3); object-fit: contain }
.gate-box h1 { text-align: center; font-size: 20px; line-height: 28px; font-weight: 600 }
.gate-box .sub { text-align: center; color: var(--text-2); margin: 4px 0 var(--sp-5) }
.gate-box .b-primary { width: 100%; height: 40px }
.gate-lang { display: flex; justify-content: center; margin-top: var(--sp-4) }

/* the older pieces, drawn in the new language until every page has moved */
.card { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: var(--sp-4) }
.card > h2 { font-size: var(--fs-heading); font-weight: 600; padding: var(--sp-4) var(--sp-5) 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap }
.card > .body { padding: var(--sp-4) var(--sp-5) }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: var(--control-h); padding: 0 14px; border-radius: var(--radius); font-weight: 500; border: 1px solid var(--border-strong); background: var(--bg-surface); color: var(--text-1) }
.btn:hover { background: var(--row-hover) }
.btn.pri { background: var(--kv-blue); border-color: var(--kv-blue); color: #fff }
.btn.pri:hover { background: var(--kv-blue-hover) }
.btn.bad { background: var(--danger); border-color: var(--danger); color: #fff }
.btn.quiet { border-color: transparent; color: var(--text-2) }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px }
.btn:disabled { opacity: .45; cursor: not-allowed }
.tag { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-size: 13px }
.bar { display: flex; align-items: center; gap: var(--sp-3); padding: 10px var(--sp-4); border: 1px solid #D4E3FF; border-radius: var(--radius); background: var(--kv-blue-subtle); margin-bottom: var(--sp-3) }
.bar.bad { background: #FEF3F2; border-color: #F8D3CF } .bar.warn { background: #FFF8EC; border-color: #F6E1B9 } .bar.ok { background: #F0FAF3; border-color: #CDEBD6 }
.grid { display: grid; gap: var(--sp-3) }
.grid.c2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)) }
.grid.c4 { grid-template-columns: repeat(auto-fit, minmax(176px, 1fr)) }
label.f { display: block; margin-bottom: var(--sp-3) }
label.f > .l { display: block; font-weight: 500; margin-bottom: 6px }
label.f > .hint, .hint { display: block; color: var(--text-2); font-size: 13px; margin-top: 4px }
h3.step { font-size: 13px; font-weight: 600; color: var(--text-2); margin: var(--sp-4) 0 var(--sp-2) }
.empty { padding: var(--sp-6); text-align: center; color: var(--text-2) }
.wrapscroll { overflow-x: auto }
table:not(.tbl) { width: 100%; border-collapse: collapse }
table:not(.tbl) th { text-align: left; font-size: var(--fs-meta); font-weight: 500; color: var(--text-2); padding: 8px 12px; border-bottom: 1px solid var(--border) }
table:not(.tbl) td { padding: 8px 12px; border-bottom: 1px solid var(--border) }
.sheet { position: fixed; inset: 0; background: rgba(1, 24, 68, .35); z-index: 80; display: flex; justify-content: flex-end }
.sheet > * { background: var(--bg-surface) }
.sheet > header, .sheet > .body, .sheet > footer { width: min(900px, 100%) }
.sheet { flex-direction: column; align-items: flex-end }
.sheet > header { display: flex; align-items: center; gap: 12px; padding: var(--sp-4) var(--sp-5); border-bottom: 1px solid var(--border) }
.sheet > header h2 { font-size: 18px; font-weight: 600 }
.sheet > .body { flex: 1; overflow-y: auto; padding: var(--sp-5) }

/* phone: the side nav becomes a drawer behind a top bar */
@media (max-width: 860px) {
  .shell { display: block }
  .topbar { display: flex; align-items: center; gap: var(--sp-3); padding: 10px var(--sp-4); background: var(--bg-surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 35 }
  .topbar img { width: 28px; height: 28px }
  .topbar b { flex: 1; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
  nav.side { position: fixed; left: 0; top: 0; bottom: 0; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow-menu) }
  body.nav-open nav.side { transform: none }
  body.nav-open::after { content: ""; position: fixed; inset: 0; background: rgba(1, 24, 68, .3); z-index: 30 }
  .page { padding: var(--sp-5) var(--sp-4) var(--sp-7) }
  .lic-banner { padding: var(--sp-4) var(--sp-4) 0 }
  .ph h1 { font-size: 20px; line-height: 28px }
  .tbl th, .tbl td { padding-left: var(--sp-3); padding-right: var(--sp-3) }
  .tbl .hide-sm { display: none }
  .sec-head, .toolbar { padding-left: var(--sp-4); padding-right: var(--sp-4) }
  .sec-body { padding: var(--sp-3) var(--sp-4) var(--sp-4) }
  .subnav-layout, .steps { grid-template-columns: 1fr }
  /* The sub-navigation scrolls sideways inside its column; it must not widen the page. */
  .subnav-layout { grid-template-columns: minmax(0, 1fr) }
  .subnav { flex-direction: row; overflow-x: auto; position: static }
  .steps ol { position: static; display: flex; gap: var(--sp-3); overflow-x: auto }
}

/* --------------------------- the theme simulator --------------------------- */
/* Full window: the side nav and the environment strip fold away while the simulator is open. */
body.simfull nav.side, body.simfull .topbar, body.simfull .env-strip { display: none }
body.simfull .page { padding: 0; max-width: none; height: 100vh }
.sim { display: flex; flex-direction: column; height: 100vh; background: var(--bg-page) }
.sim-top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; height: 52px; padding: 0 12px; background: var(--bg-surface); border-bottom: 1px solid var(--border) }
.sim-zone { display: flex; align-items: center; gap: 8px; min-width: 0 }
.sim-zone.mid { justify-content: center }
.sim-zone.end { justify-content: flex-end }
.sim-title { font-weight: 600; margin-right: 4px; white-space: nowrap }
.sim-top .seg button { height: 30px; padding: 0 10px; font-size: 13px }
.sim-top select.inp { width: auto; height: 30px; padding: 0 28px 0 8px; font-size: 13px }
.sim-top .b.on { background: var(--kv-blue-subtle); color: var(--kv-blue-hover) }
.sim-top .b:disabled { opacity: .4; cursor: default }
.sim-sep { width: 1px; height: 20px; background: var(--border) }
.sim-state-word { font-size: 13px; white-space: nowrap }
.sim-body { flex: 1; display: grid; grid-template-columns: 200px minmax(0, 1fr) 340px; min-height: 0 }
.sim-states { border-right: 1px solid var(--border); background: var(--bg-surface); padding: 12px 8px; overflow-y: auto }
.sim-h { font-size: var(--fs-meta); font-weight: 500; color: var(--text-3); margin: 4px 4px 8px; display: flex; align-items: center; gap: 8px }
.sim-state { display: flex; width: 100%; align-items: center; justify-content: space-between; text-align: left; padding: 7px 10px; border-radius: 4px; color: var(--text-2) }
.sim-state:hover { background: var(--row-hover); color: var(--text-1) }
.sim-state.on { background: var(--kv-blue-subtle); color: var(--kv-blue-hover); font-weight: 600 }
.sim-states select.inp { margin: 0 4px; width: calc(100% - 8px) }
.sim-stage { position: relative; overflow: auto; display: grid; place-items: center; padding: 24px; background: var(--bg-sunken) radial-gradient(circle, #D5DAE3 1px, transparent 1px) 0 0 / 16px 16px }
.sim-fit { position: relative; flex: none; box-shadow: 0 12px 40px rgba(1, 24, 68, .18), 0 0 0 1px rgba(1, 24, 68, .06); background: #fff; border-radius: 4px }
#simscreen { position: absolute; left: 0; top: 0; transform-origin: 0 0; overflow: hidden }
#simscreen [data-tok] { cursor: pointer }
#simscreen [data-tok]:hover { outline: 3px solid rgba(0, 106, 254, .45); outline-offset: -2px }
#simscreen .sim-sel, #simscreen .sim-sel:hover { outline: 5px solid var(--kv-blue); outline-offset: -3px }
#simscreen [data-kind="cat"], #simscreen [data-kind="card"] { cursor: grab }
/* The handles are always there, faint, so the owner can see what can be pulled; stronger on hover. */
.sim-handle { position: absolute; z-index: 5; background: var(--kv-blue); border: 3px solid #fff; box-shadow: 0 1px 4px rgba(1, 24, 68, .35); opacity: .55; transition: opacity .15s, transform .15s; touch-action: none }
#simscreen:hover .sim-handle { opacity: .9 }
.sim-handle:hover { opacity: 1 !important; transform: scale(1.1) }
.sim-handle.corner { right: -6px; bottom: -6px; width: 30px; height: 30px; border-radius: 50%; cursor: nwse-resize }
.sim-handle.photo { left: 30%; right: 30%; height: 14px; border-radius: 7px; cursor: ns-resize }
.sim-handle.cols { right: 30px; top: 50%; width: 14px; height: 160px; margin-top: -80px; border-radius: 7px; cursor: ew-resize }
.sim-drop { position: absolute; display: none; place-items: center; background: rgba(0, 106, 254, .08); border: 2px dashed var(--kv-blue); border-radius: var(--radius); color: var(--kv-blue-hover); font-weight: 600; z-index: 10 }
.sim-drop.top { left: 24px; right: 24px; top: 8px; height: 64px }
.sim-drop.left { left: 8px; top: 88px; bottom: 24px; width: 80px; writing-mode: vertical-rl }
.sim-stage.dropping .sim-drop { display: grid }
.sim-drop.over { background: rgba(0, 106, 254, .2) }
.sim-note { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); max-width: 420px; background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-card); padding: 20px; text-align: center; z-index: 20 }
.sim-insp { border-left: 1px solid var(--border); background: var(--bg-surface); padding: 16px; overflow-y: auto }
.sim-insp .hint { font-size: 13px; color: var(--text-2); margin: 4px 0 12px }
.sim-insp .selname { font-weight: 600; font-size: 15px; margin-bottom: 4px }
.sim-insp .wordedit { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; margin-bottom: 8px }
.sim-insp textarea.inp { resize: vertical; height: auto; padding: 6px 8px }
.sim-insp h3.step { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border) }
.sim-insp .seg { flex-wrap: wrap }
.sim-insp .seg button { height: 30px; font-size: 13px }
.sim-insp input[type=range] { accent-color: var(--kv-blue) }
.colour-grid { display: grid; gap: 6px }
label.colour { display: flex; gap: 10px; align-items: center; padding: 6px 8px; border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer }
label.colour:hover { background: var(--row-hover) }
label.colour input[type=color] { width: 32px; height: 32px; border: 1px solid var(--border-strong); border-radius: 4px; padding: 0; background: none; cursor: pointer; flex: none }
label.colour input[type=color]::-webkit-color-swatch-wrapper { padding: 2px }
label.colour input[type=color]::-webkit-color-swatch { border: 0; border-radius: 2px }
label.colour > span { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; flex: 1 }
label.colour b { font-weight: 500; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
label.colour .hex { height: 28px; flex: none }
.swatches { display: flex; flex-wrap: wrap; gap: 6px }
.swatch { width: 26px; height: 26px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); display: inline-block; cursor: grab; vertical-align: middle; transition: transform .12s }
.swatch:hover { transform: scale(1.15) }
.swatch:active { cursor: grabbing }
.swatch.sm { width: 14px; height: 14px; cursor: default }
.swatch.sm:hover { transform: none }
.sim-foot { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 12px; background: var(--bg-surface); border-top: 1px solid var(--border); font-size: 13px }
.sim-foot > #history { min-width: 0 }
.sim-foot .tag { border: 1px solid var(--border); border-radius: 4px; padding: 2px 8px }
.sim-foot .tag.ok { border-color: var(--dot-ok) }
.spin { animation: sim-spin 1s linear infinite }
@keyframes sim-spin { to { transform: rotate(360deg) } }
/* The kiosk's entrances (Bits.kt Modifier.enter): fade, slide in from the right by 12 %, grow from 94 %. */
@keyframes ksim-fade { from { opacity: 0 } to { opacity: 1 } }
@keyframes ksim-slide { from { opacity: 0; transform: translateX(12%) } to { opacity: 1; transform: none } }
@keyframes ksim-scale { from { opacity: 0; transform: scale(.94) } to { opacity: 1; transform: none } }
@media (max-width: 1280px) {
  .sim-top { grid-template-columns: auto 1fr auto }
  .sim-zone.mid span:not(.sim-sep) { display: none }
}
@media (max-width: 1100px) {
  .sim-body { grid-template-columns: 150px minmax(0, 1fr) 290px }
  .sim-title { display: none }
}
@media (max-width: 860px) {
  .sim-top { display: flex; flex-wrap: wrap; height: auto; padding: 8px 12px }
  .sim-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(420px, 1fr) auto }
  .sim-top { max-width: 100vw }
  .sim-zone { flex-wrap: wrap }
  .sim-foot { flex-wrap: wrap; height: auto; padding: 6px 12px }
  .sim-foot #simchecks { white-space: normal; height: auto; min-height: 30px; text-align: left; flex: 1 1 100%; min-width: 0; max-width: 100% }
  .sim-foot #simchecks .status { white-space: normal }
  .sim-states { border-right: 0; border-bottom: 1px solid var(--border); display: flex; gap: 4px; overflow-x: auto; white-space: nowrap }
  .sim-state { width: auto }
  .sim-insp { border-left: 0; border-top: 1px solid var(--border); max-height: 45vh }
}

/* ---------------------------- redesign additions ---------------------------- */
.tabs a small { color: var(--text-3); font-size: var(--fs-meta); font-variant-numeric: tabular-nums }
.tabs a small:empty { display: none }

/* "More" menu: a details element, so it opens without script and closes on a second press. */
details.more { position: relative; display: inline-block }
details.more > summary { list-style: none; cursor: pointer }
details.more > summary::-webkit-details-marker { display: none }
details.more > div.menu-pop { position: absolute; left: auto; right: 0; bottom: auto; top: calc(100% + 4px); z-index: 30; min-width: 200px; background: var(--bg-surface);
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(1, 24, 68, .12); padding: 4px }
details.more a, details.more button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; border-radius: 4px; color: var(--text-1); text-align: left; background: none; border: 0; font: inherit; cursor: pointer }
details.more a:hover, details.more button:hover { background: var(--row-hover) }
details.more .danger { color: var(--dot-bad) }
/* The sold-out question (pages-menu.js askSoldOut): the menu pop, fixed under the switch that opened it. */
.menu-pop.ask-pop { position: fixed; bottom: auto; right: auto; min-width: 280px; z-index: 80 }
.ask-pop .ask-q { margin: 6px 10px 4px; font-weight: 600; color: var(--text-1) }

/* A list the owner puts in order by dragging. The whole row is the handle; the grip says so. */
ul.draglist { list-style: none; margin: 0; padding: 0 }
ul.draglist li { display: flex; align-items: center; gap: 12px; padding: 8px 20px; border-top: 1px solid var(--border); background: var(--bg-surface); cursor: grab;
  transition: background .12s, box-shadow .12s, transform .12s }
ul.draglist li:first-child { border-top: 0 }
ul.draglist li:hover { background: var(--row-hover) }
ul.draglist li:hover .grip { color: var(--text-1) }
ul.draglist li.dragging { opacity: .9; cursor: grabbing; box-shadow: 0 8px 24px rgba(1, 24, 68, .16); transform: scale(1.01); position: relative; z-index: 2 }
ul.draglist li.over { box-shadow: inset 0 2px 0 var(--kv-blue) }
ul.draglist .grip { color: var(--text-3); display: grid; place-items: center; width: 20px; flex: none }
ul.draglist .name { flex: 1; max-width: 420px }

ul.plain { list-style: none; margin: 0; padding: 0 }
ul.plain li { padding: 6px 0 }
ol.howto { margin: 0; padding: 0; list-style: none; counter-reset: how }
ol.howto li { counter-increment: how; position: relative; padding: 4px 0 12px 36px; max-width: 640px }
ol.howto li::before { content: counter(how); position: absolute; left: 0; top: 2px; width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--border-strong);
  display: grid; place-items: center; font-size: 12px; font-weight: 600; color: var(--text-2) }

button.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--kv-blue); cursor: pointer }
button.linkbtn:hover { color: var(--kv-blue-hover); text-decoration: underline }

/* The shop's pictures, each on the background it is meant for. */
.brandpics { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px }
.brandpic { height: 120px; border: 1px dashed var(--border-strong); border-radius: var(--radius); display: grid; place-items: center; padding: 12px; background: var(--bg-sunken) }
.brandpic img { max-width: 100%; max-height: 96px; object-fit: contain }
.brandpic:has(img.on-dark) { background: var(--kv-navy); border-style: solid; border-color: var(--kv-navy) }

.inp.hex { width: 90px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px }
.langsw button { height: 28px; padding: 0 10px; font-size: var(--fs-meta) }

/* Wording: what the customer reads on the left, the shop's own words on the right. */
.words { display: grid }
.word { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: center; padding: 10px 20px; border-top: 1px solid var(--border) }
.word.changed .word-std > span { color: var(--text-2); text-decoration: line-through; text-decoration-color: var(--border-strong) }
.word-std { display: grid; gap: 2px; cursor: help }
.word-std small { color: var(--text-3); font-size: var(--fs-meta) }
.word-own { display: flex; align-items: center; gap: 8px }
.word-own .inp { flex: 1 }
.word.changed .word-own .inp { border-color: var(--kv-blue) }
.word-st { color: var(--text-2); font-size: var(--fs-meta); display: inline-flex; align-items: center; gap: 4px; white-space: nowrap }
.word-st.bad { color: var(--dot-bad) }
@media (max-width: 720px) { .word { grid-template-columns: 1fr; gap: 6px } }

/* ------------------------ theme simulator: the simple side ------------------------ */
.insp-intro { font-size: 13px; color: var(--text-2); margin-bottom: 4px }
.insp-sec { padding: 16px 0; border-bottom: 1px solid var(--border) }
.insp-sec .insp-sec { padding: 12px 0 0; border: 0 }
.insp-h { font-weight: 600; margin-bottom: 10px }
.insp-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; font-size: 13px; color: var(--text-2) }
.insp-row input[type=range] { width: 140px; accent-color: var(--kv-blue) }
.insp-row input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--kv-blue) }
.seg.wide { display: flex } .seg.wide button { flex: 1 }
.tiles { display: grid; gap: 8px }
.tiles.four { grid-template-columns: repeat(4, 1fr) } .tiles.three { grid-template-columns: repeat(3, 1fr) } .tiles.two { grid-template-columns: repeat(2, 1fr) }
.tile { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 4px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-surface); color: var(--text-2); cursor: pointer; transition: border-color .12s, box-shadow .12s }
.tile:hover { border-color: var(--border-strong); color: var(--text-1) }
.tile.on { border-color: var(--kv-blue); box-shadow: 0 0 0 1px var(--kv-blue); color: var(--text-1) }
.tile small { font-size: 12px; line-height: 1.2; text-align: center }
.look-pv { width: 100%; height: 44px; border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); display: grid; grid-template-columns: 30% 1fr; align-items: end; overflow: hidden }
.look-pv i { height: 100%; display: block }
.look-pv b { height: 12px; margin: 0 8px 8px; display: block }
.corner-pv { width: 44px; height: 30px; border: 2px solid var(--text-1); background: var(--bg-sunken) }
.lay-pv { width: 64px; height: 40px; border: 1px solid var(--border-strong); border-radius: 3px; display: grid; gap: 3px; padding: 3px; background: var(--bg-surface) }
.lay-pv i { background: var(--text-3); border-radius: 1px }
.lay-pv b { background: var(--kv-blue-subtle); border: 1px solid #BFD6FF; border-radius: 1px }
.lay-pv.left { grid-template-columns: 12px 1fr 1fr; grid-template-rows: 1fr 1fr } .lay-pv.left i { grid-row: 1 / 3 }
.lay-pv.top { grid-template-columns: 1fr 1fr; grid-template-rows: 6px 1fr 1fr } .lay-pv.top i { grid-column: 1 / 3 } .lay-pv.top b:nth-of-type(n+3) { display: none }
.font-pv { font-size: 24px; line-height: 30px; font-weight: 700; color: var(--text-1) }
label.pick { display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 10px; padding: 8px 0; cursor: pointer }
label.pick input[type=color] { width: 36px; height: 36px; border: 1px solid var(--border-strong); border-radius: 50%; padding: 0; background: none; cursor: pointer; overflow: hidden }
label.pick input[type=color]::-webkit-color-swatch-wrapper { padding: 0 }
label.pick input[type=color]::-webkit-color-swatch { border: 0; border-radius: 50% }
label.pick input[type=color]::-moz-color-swatch { border: 0; border-radius: 50% }
label.pick b { display: block; font-weight: 500 }
label.pick small { display: block; font-size: 12px; color: var(--text-2) }
label.pick code { font-size: 12px; color: var(--text-2) }
.bgrow { display: flex; align-items: center; gap: 8px; padding: 8px 0 0; font-size: 13px; color: var(--text-2) }
.bgrow > span { flex: 1 }
.bgtile { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--border-strong); cursor: pointer; display: grid; place-items: center; color: var(--text-2); position: relative }
.bgtile.on { box-shadow: 0 0 0 2px var(--bg-surface), 0 0 0 4px var(--kv-blue) }
.bgtile.custom input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100% }
details.adv { margin-top: 16px; border: 1px solid var(--border); border-radius: var(--radius); padding: 0 12px }
details.adv > summary { display: flex; align-items: center; gap: 8px; padding: 10px 0; cursor: pointer; list-style: none; font-weight: 500 }
details.adv > summary::-webkit-details-marker { display: none }
details.adv > summary span { flex: 1 }
details.adv[open] > summary .ic:last-child { transform: rotate(180deg) }
details.adv[open] { padding-bottom: 12px }
#simscreen .sim-editing { outline: 3px dashed var(--kv-blue) !important; outline-offset: 4px; cursor: text }
.sim-note { display: grid; gap: 6px; justify-items: center; color: var(--text-2) }
.sim-note b { color: var(--text-1); font-weight: 600 }
.sim-note[hidden] { display: none }
/* Publishing: before and after, then one button. */
.pub-back { position: fixed; inset: 0; background: rgba(1, 24, 68, .45); display: grid; place-items: center; z-index: 100; padding: 16px }
.pub { background: var(--bg-surface); border-radius: 8px; box-shadow: 0 24px 64px rgba(1, 24, 68, .3); padding: 24px; width: min(640px, 100%); max-height: calc(100vh - 32px); overflow: auto }
.pub h2 { font-size: 20px; font-weight: 600 }
.pub-pair { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 20px 0 12px }
.pub-pair figure { margin: 0; display: grid; gap: 8px; justify-items: center }
.pub-pair figcaption { font-size: 13px; color: var(--text-2) }
.pub-thumb { width: 216px; height: 384px; overflow: hidden; border-radius: 6px; box-shadow: 0 0 0 1px var(--border), 0 4px 16px rgba(1, 24, 68, .12) }
.pub-arrow { color: var(--text-3) }
@media (max-width: 560px) { .pub-thumb { width: 130px; height: 231px } .pub-thumb > div { transform: scale(.12) !important } }

/* ------------------------------ first login: the wizard ------------------------------ */
body.startfull nav.side, body.startfull .topbar { display: none }
body.startfull .page { max-width: none; padding: 0 }
.wiz { min-height: 100vh; background: var(--bg-page); display: flex; flex-direction: column; align-items: center; padding-bottom: 48px }
.wiz-top { width: 100%; display: flex; align-items: center; gap: 10px; padding: 12px 20px; background: var(--bg-surface); border-bottom: 1px solid var(--border) }
.wiz-top img { width: 28px; height: 28px }
.wiz-steps { list-style: none; display: flex; gap: 8px; margin: 28px 16px 20px; padding: 0; flex-wrap: wrap; justify-content: center }
.wiz-steps li a { display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; color: var(--text-2); font-weight: 500 }
.wiz-steps li .n { width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--border-strong); display: grid; place-items: center; font-size: 12px }
.wiz-steps li.on a { background: var(--bg-surface); color: var(--text-1); box-shadow: var(--shadow-card) }
.wiz-steps li.on .n { border-color: var(--kv-blue); background: var(--kv-blue); color: #fff }
.wiz-steps li.done .n { border-color: var(--dot-ok); background: var(--dot-ok); color: #fff }
.wiz-card { width: min(760px, calc(100% - 32px)); background: var(--bg-surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-card); padding: 32px 36px }
.wiz-card h1 { font-size: 24px; line-height: 32px; font-weight: 600 }
.wiz-card .sub { color: var(--text-2); margin: 6px 0 24px; max-width: 560px }
.wiz-card .fld { margin-bottom: 16px }
.wiz-card .fld input.bad { border-color: var(--dot-bad) }
.fld-err { color: var(--dot-bad); font-size: 13px }
.fld-err:empty { display: none }
.wiz-grid { display: grid; grid-template-columns: 140px 1fr; gap: 0 16px }
.wiz-grid .span2 { grid-column: 1 / 3 }
.wiz-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--border) }
.wiz-foot .b-primary { height: 40px; padding: 0 18px }
.wiz-look { display: grid; grid-template-columns: minmax(0, 1fr) 452px; gap: 28px; align-items: start }
.wiz-pv { display: flex; gap: 12px; margin-top: 8px }
.wiz-shot { width: 216px; height: 384px; overflow: hidden; border-radius: 8px; box-shadow: 0 0 0 1px var(--border), 0 8px 24px rgba(1, 24, 68, .12); flex: none }
.drop { display: grid; place-items: center; gap: 6px; height: 120px; margin-top: 8px; border: 1.5px dashed var(--border-strong); border-radius: 8px; background: var(--bg-sunken); color: var(--text-2); cursor: pointer; text-align: center; padding: 12px; transition: border-color .12s, background .12s }
.drop:hover, .drop.over { border-color: var(--kv-blue); background: var(--kv-blue-subtle) }
.drop img { max-height: 60px; max-width: 220px; object-fit: contain; background: var(--kv-navy); padding: 8px 12px; border-radius: 6px }
.drop b { color: var(--text-1); font-weight: 500 }
.drop small { font-size: 12px }
.wiz-part { display: grid; grid-template-columns: 28px 1fr; gap: 12px; margin-bottom: 24px }
.wiz-part > .n { width: 28px; height: 28px; border-radius: 50%; background: var(--kv-blue-subtle); color: var(--kv-blue-hover); display: grid; place-items: center; font-weight: 600; font-size: 13px }
.wiz-part.off { opacity: .45; pointer-events: none }
.chips { display: flex; flex-wrap: wrap; gap: 6px }
.chip { padding: 4px 10px; border: 1px solid var(--border-strong); border-radius: 999px; font-size: 13px; background: var(--bg-surface) }
.wiz-dish { display: grid; grid-template-columns: minmax(0, 1fr) 110px 170px auto auto; gap: 8px; margin: 8px 0 12px }
.wiz-dish .price { position: relative } .wiz-dish .price span { position: absolute; right: 10px; top: 9px; color: var(--text-2); font-size: 13px }
.wiz-dish .b.on { border-color: var(--kv-blue); color: var(--kv-blue) }
.wiz-dishes { list-style: none; padding: 0; margin: 0; border: 1px solid var(--border); border-radius: 6px }
.wiz-dishes li { display: grid; grid-template-columns: 36px 1fr auto; gap: 12px; align-items: center; padding: 8px 12px; border-top: 1px solid var(--border) }
.wiz-dishes li:first-child { border-top: 0 }
.wiz-dishes img, .wiz-dishes .noimg { width: 36px; height: 36px; border-radius: 4px; object-fit: cover; background: var(--bg-sunken); display: grid; place-items: center; color: var(--text-3) }
.wiz-dishes small { display: block; color: var(--text-2); font-size: 12px }
.wiz-have { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border-radius: 8px; background: #F0FDF4; margin: 16px 0; color: var(--dot-ok) }
.wiz-have b { color: var(--text-1); font-weight: 500 }
.wiz-end { width: 56px; height: 56px; border-radius: 50%; background: var(--dot-ok); color: #fff; display: grid; place-items: center; margin-bottom: 16px }
.wiz-h2 { font-size: 17px; font-weight: 600; margin-top: 28px }
.wiz-tech { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px }
.wiz-techcard { display: flex; flex-direction: column; gap: 6px; padding: 16px; border: 1px solid var(--border); border-radius: 8px; color: var(--text-1); background: var(--bg-surface) }
.wiz-techcard:hover { border-color: var(--kv-blue); color: var(--text-1) }
.wiz-techcard > .ic { color: var(--kv-blue) }
.wiz-techcard b { font-weight: 600 }
.wiz-techcard small { color: var(--text-2); font-size: 13px; min-height: 54px }
.wiz-techcard > span { margin-top: auto; color: var(--kv-blue); font-weight: 500; display: inline-flex; align-items: center; gap: 4px }
@media (max-width: 800px) {
  .wiz-card { padding: 24px 20px }
  .wiz-look { grid-template-columns: 1fr } .wiz-shot { width: 150px; height: 267px } .wiz-shot > div { transform: scale(.139) !important }
  .wiz-dish { grid-template-columns: 1fr 100px; } .wiz-dish select { grid-column: 1 / 3 }
  .wiz-tech { grid-template-columns: 1fr } .wiz-steps li a span:last-child { display: none } .wiz-steps li.on a span:last-child { display: inline }
}

/* Readiness: one sentence, then three groups. */
.ready-head { padding-bottom: 16px; border-bottom: 1px solid var(--border); margin-bottom: 16px }
.ready-head .status { font-size: 17px; font-weight: 600 }
.ready-sub { color: var(--text-2); margin-top: 4px }
.ready-groups { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px }
.ready-gh { display: flex; justify-content: space-between; gap: 8px; align-items: baseline }
.ready-gh .muted { font-size: 13px }
.ready-group .fld-h { margin: 2px 0 8px; min-height: 36px }
.ready-steps { list-style: none; margin: 8px 0 0; padding: 0 }
.ready-steps a { display: grid; grid-template-columns: 26px 1fr 16px; gap: 10px; align-items: center; padding: 8px 6px; border-radius: 6px; color: var(--text-1) }
.ready-steps a:hover { background: var(--row-hover) }
.ready-steps .n { width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--border-strong); display: grid; place-items: center; color: var(--text-2) }
.ready-steps li.done .n { border-color: var(--dot-ok); background: var(--dot-ok); color: #fff }
.ready-steps .t b { display: block; font-weight: 500 }
.ready-steps .t small { display: block; color: var(--text-2); font-size: 12px }
.ready-steps li.done .t b { color: var(--text-2) }
.ready-group.complete .ready-gh b { color: var(--text-2) }
@media (max-width: 900px) { .ready-groups { grid-template-columns: 1fr } .ready-group .fld-h { min-height: 0 } }

/* Welcome, after the first password. */
.welcome { max-width: 680px; margin: 48px auto; text-align: center; padding: 0 16px }
.welcome .mark { width: 56px; height: 56px; margin: 0 auto 16px }
.welcome h1 { font-size: 26px; line-height: 34px; font-weight: 600 }
.welcome .sub { color: var(--text-2); margin: 8px auto 28px; max-width: 520px }
.welcome-steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; text-align: left }
.welcome-steps li { position: relative; display: grid; gap: 6px; padding: 20px 16px 16px; background: var(--bg-surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-card) }
.welcome-steps li .n { position: absolute; top: 12px; right: 14px; color: var(--text-3); font-size: 13px }
.welcome-steps li > .ic { color: var(--kv-blue) }
.welcome-steps b { font-weight: 600 }
.welcome-steps small { color: var(--text-2); font-size: 13px }
.welcome-later { display: flex; gap: 8px; align-items: flex-start; text-align: left; color: var(--text-2); font-size: 14px; margin: 20px 0 24px; padding: 12px 14px; border-radius: 8px; background: var(--bg-sunken) }
.welcome-later .ic { flex: none; margin-top: 2px }
.welcome-go { display: flex; gap: 8px; justify-content: center; align-items: center }
.welcome-go .b-primary { height: 42px; padding: 0 22px }
@media (max-width: 700px) { .welcome-steps { grid-template-columns: 1fr } }
.spin-dot { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--kv-blue); border-right-color: transparent; animation: sim-spin 1s linear infinite; flex: none }

/* Long names without spaces (a URL, an e-mail, a shop called "Aaaa…") wrap instead of pushing the page sideways. */
.env-strip, .ph h1, .ph-desc, .two > span, .two small, .facts dd, .sec-head h2, .brand small { overflow-wrap: anywhere; min-width: 0 }
.env-strip { flex-wrap: wrap; text-align: center }
ul.plain .status { white-space: normal; align-items: flex-start } ul.plain .status::before { margin-top: 6px; flex: none }
/* Allergen chips on the dish page: a checkbox each, the word in both languages. */
.chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: var(--sp-2) }
.chip { display: flex; align-items: flex-start; gap: var(--sp-2); padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius); cursor: pointer; min-height: 48px; background: var(--bg-surface) }
.chip:hover { background: var(--row-hover) }
.chip input { width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--kv-blue); flex: none }
.chip span { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere }
.chip b { font-weight: var(--fw-strong, 600) }
.chip small { color: var(--text-2); font-size: var(--fs-meta, 12px) }
.chip:has(input:checked) { border-color: var(--kv-blue); background: var(--kv-blue-subtle) }
.chip:has(input:focus-visible) { box-shadow: var(--focus) }

/* Opening hours: one row per weekday. */
.hours-row { display: grid; grid-template-columns: 120px auto 1fr; align-items: center; gap: var(--sp-3); padding: 10px 0; border-top: 1px solid var(--border) }
.hours-row:first-child { border-top: none }
.hours-row .times { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap }
.hours-row .times input { width: 120px }
.hours-row .times.off { opacity: .45 }
.hours-row small { color: var(--text-2) }
@media (max-width: 600px) {
  .hours-row { grid-template-columns: 1fr auto; }
  .hours-row .times { grid-column: 1 / -1 }
}
.hours-time { display: inline-flex; align-items: center; gap: 6px }
