/* WoxPop Console — shell and components for the admin back-office and the
   partner portal. Tokens live in tokens.css; nothing here hard-codes a colour.

   Breakpoints
     < 600     phone   — drawer nav, tables become cards, sticky action bar
     600–899   tablet  — drawer nav
     900–1199  laptop / tablet landscape — 72 px icon rail
     ≥ 1200    desktop — full 248 px sidebar

   Rule for pages: no inline style for layout or colour. If a page needs a
   pattern this file does not have, add it here so the other console gets it
   too. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--canvas);
  color: var(--ink);
  font: 400 var(--fs-md)/var(--lh) var(--font);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "tnum" 1;
}
img, svg, video { max-width: 100%; }
img { height: auto; } /* art is sized by width; it keeps its shape unless a rule sets a height */
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; font-weight: 600; text-wrap: balance; }
p { margin: 0; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--r-sm); }
::selection { background: var(--primary-soft); }
[hidden] { display: none !important; }
.mono { font-family: var(--mono); font-size: .95em; }
.num { font-variant-numeric: tabular-nums; text-align: right; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.nowrap { white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--primary); color: var(--primary-ink); padding: 8px 14px; border-radius: var(--r-md); }
.skip:focus { top: 8px; }

/* ------------------------------------------------------------------ shell */
.app { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); grid-template-rows: var(--topbar-h) minmax(0, 1fr); min-height: 100%; }
.topbar {
  grid-column: 1 / -1; position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: var(--s3);
  padding: 0 var(--s4) 0 var(--s3);
  padding-top: env(safe-area-inset-top, 0px);
  height: calc(var(--topbar-h) + env(safe-area-inset-top, 0px));
  background: var(--surface); border-bottom: 1px solid var(--line);
}
.topbar .menu-btn { display: none; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--ink); text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand .wordmark { height: 26px; width: auto; display: block; }
.brand .tile { width: 32px; height: 32px; border-radius: 8px; display: none; }
.brand .area { font-size: var(--fs-sm); font-weight: 600; color: var(--muted); letter-spacing: .02em; padding-left: 10px; border-left: 1px solid var(--line); }
.topbar .spacer { flex: 1; }
.topbar .search {
  flex: 0 1 420px; display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px;
  background: var(--surface-2); border: 1px solid transparent; border-radius: var(--r-md); color: var(--muted); cursor: text;
}
.topbar .search:hover { border-color: var(--line-strong); }
.topbar .search input { border: 0; background: none; outline: none; flex: 1; min-width: 0; color: var(--ink); }
.topbar .search kbd { font: 500 11px var(--mono); color: var(--faint); border: 1px solid var(--line-strong); border-radius: 4px; padding: 0 5px; }
.topbar .search-btn { display: none; }
.topbar .tools { display: flex; align-items: center; gap: 4px; }

.side {
  grid-row: 2; position: sticky; top: calc(var(--topbar-h) + env(safe-area-inset-top, 0px));
  height: calc(100vh - var(--topbar-h) - env(safe-area-inset-top, 0px));
  overflow-y: auto; overscroll-behavior: contain;
  background: var(--surface); border-right: 1px solid var(--line);
  padding: var(--s3) var(--s2) var(--s6);
  display: flex; flex-direction: column; gap: 2px;
}
.nav-group { margin-top: var(--s3); }
.nav-group:first-child { margin-top: 0; }
.nav-group > .label {
  font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--faint);
  padding: 6px 12px 4px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 6px 10px; border-radius: var(--r-md);
  color: var(--ink-2); font-weight: 500; text-decoration: none; position: relative;
}
.nav-item:hover { background: var(--surface-2); text-decoration: none; }
.nav-item[aria-current="page"] { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.nav-item .ic { width: 28px; height: 28px; flex: none; display: block; }
.nav-item .count { margin-left: auto; font-size: 11px; font-weight: 600; min-width: 20px; text-align: center; padding: 1px 6px; border-radius: var(--r-pill); background: var(--bad); color: #fff; }
.side .foot { margin-top: auto; padding: var(--s4) 12px 0; font-size: 11.5px; color: var(--faint); }

.main { grid-row: 2; min-width: 0; display: flex; flex-direction: column; }
.content { width: 100%; max-width: var(--content-max); margin: 0 auto; padding: var(--s6) var(--s6) var(--s10); flex: 1; }
.footer { padding: var(--s4) var(--s6) calc(var(--s4) + env(safe-area-inset-bottom, 0px)); font-size: 12px; color: var(--faint); text-align: center; }

/* rail */
@media (max-width: 1199px) and (min-width: 900px) {
  .app { grid-template-columns: var(--rail-w) minmax(0, 1fr); }
  .side { padding: var(--s3) 8px; align-items: stretch; }
  .nav-group > .label { font-size: 0; height: 1px; margin: 6px 10px; background: var(--line); padding: 0; }
  .nav-group:first-child > .label { display: none; }
  .nav-item { justify-content: center; padding: 6px; }
  .nav-item .txt { position: absolute; left: calc(100% + 10px); top: 50%; transform: translateY(-50%); background: var(--ink); color: var(--surface); font-size: 12px; font-weight: 500; padding: 4px 8px; border-radius: var(--r-sm); white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .12s; z-index: 50; }
  .nav-item:hover .txt, .nav-item:focus-visible .txt { opacity: 1; }
  .nav-item .count { position: absolute; top: 2px; right: 2px; margin: 0; padding: 0 5px; min-width: 16px; font-size: 10px; }
  .side .foot { display: none; }
  .content { padding: var(--s5) var(--s5) var(--s10); }
}

/* drawer nav */
@media (max-width: 899px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .topbar { padding-left: var(--s2); }
  .topbar .menu-btn { display: inline-flex; }
  .side {
    position: fixed; z-index: 60; left: 0; top: 0; bottom: 0; height: auto; width: min(300px, 86vw);
    padding-top: calc(var(--s4) + env(safe-area-inset-top, 0px)); transform: translateX(-102%);
    transition: transform .22s var(--ease); box-shadow: var(--shadow-3);
  }
  .app.nav-open .side { transform: none; }
  .scrim { position: fixed; inset: 0; z-index: 55; background: var(--overlay); opacity: 0; pointer-events: none; transition: opacity .2s; }
  .app.nav-open .scrim { opacity: 1; pointer-events: auto; }
  .topbar .search { display: none; }
  .topbar .search-btn { display: inline-flex; }
  .content { padding: var(--s4) var(--s4) var(--s10); }
}
@media (max-width: 599px) {
  .brand .wordmark { display: none; }
  .brand .tile { display: block; }
  .brand .area { border-left: 0; padding-left: 0; }
  .app.has-tabs .content { padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
}
@media (min-width: 900px) { .scrim { display: none; } }

/* phone bottom tabs (partner portal) */
.tabbar { display: none; }
@media (max-width: 599px) {
  .app.has-tabs .tabbar {
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    background: var(--surface); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
  }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; font-weight: 500; color: var(--muted); text-decoration: none; padding: 2px 0; }
  .tabbar a img { width: 26px; height: 26px; }
  .tabbar a[aria-current="page"] { color: var(--primary); font-weight: 600; }
}

/* search overlay (phone/tablet, and ⌘K everywhere) */
.palette { position: fixed; inset: 0; z-index: 90; background: var(--overlay); display: flex; justify-content: center; align-items: flex-start; padding: calc(10vh + env(safe-area-inset-top, 0px)) var(--s4) var(--s4); }
.palette .box { width: min(640px, 100%); background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-3); overflow: hidden; }
.palette input { width: 100%; border: 0; border-bottom: 1px solid var(--line); padding: 16px 18px; font-size: var(--fs-lg); background: none; outline: none; }
.palette .results { max-height: 60vh; overflow-y: auto; padding: 6px; }
.palette .hit { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--r-md); color: var(--ink); cursor: pointer; }
.palette .hit img { width: 24px; height: 24px; }
.palette .hit .sub { margin-left: auto; font-size: var(--fs-xs); color: var(--faint); }
.palette .hit[aria-selected="true"], .palette .hit:hover { background: var(--primary-soft); text-decoration: none; }

/* ------------------------------------------------------------ page header */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--s3) var(--s4); margin-bottom: var(--s5); }
.page-head .titles { flex: 1 1 320px; min-width: 0; display: flex; gap: var(--s3); align-items: center; }
.page-head .titles .hic { width: 44px; height: 44px; flex: none; }
.page-head h1 { font-size: var(--fs-2xl); font-weight: 600; letter-spacing: -.01em; }
.page-head .desc { color: var(--muted); margin-top: 2px; max-width: 72ch; }
.page-head .actions { display: flex; flex-wrap: wrap; gap: var(--s2); }
.crumbs { font-size: var(--fs-sm); color: var(--muted); margin-bottom: 6px; display: flex; gap: 6px; flex-wrap: wrap; }
.crumbs a { color: var(--muted); }
.crumbs span[aria-hidden] { color: var(--faint); }
@media (max-width: 599px) {
  .page-head { align-items: stretch; }
  .page-head .titles .hic { width: 36px; height: 36px; }
  .page-head h1 { font-size: var(--fs-xl); }
  .page-head .actions { width: 100%; }
  .page-head .actions .btn { flex: 1; }
}

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: var(--s5); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a, .tabs button { flex: none; padding: 10px 14px; border: 0; background: none; color: var(--muted); font-weight: 500; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; text-decoration: none; white-space: nowrap; }
.tabs [aria-selected="true"] { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.tabs .count { margin-left: 6px; font-size: 11px; background: var(--surface-2); color: var(--muted); border-radius: var(--r-pill); padding: 1px 7px; }

/* ----------------------------------------------------------------- layout */
.stack { display: flex; flex-direction: column; gap: var(--s4); }
.stack.sm { gap: var(--s2); }
.stack.lg { gap: var(--s6); }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); }
.row.between { justify-content: space-between; }
.row.end { justify-content: flex-end; }
.row .grow { flex: 1; min-width: 0; }
.grid { display: grid; gap: var(--s4); }
.grid.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.auto { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
@media (max-width: 1199px) { .grid.c4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid.c3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 899px) { .grid.c2, .grid.c3 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 599px) { .grid.c4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--s5); align-items: start; }
@media (max-width: 1199px) { .split { grid-template-columns: minmax(0, 1fr); } }

/* ------------------------------------------------------------------ cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.card > .card-head { display: flex; align-items: center; gap: var(--s3); padding: var(--s4) var(--s5) 0; }
.card > .card-head h2, .card > .card-head h3 { font-size: var(--fs-lg); font-weight: 600; flex: 1; min-width: 0; }
.card > .card-head .sub { color: var(--muted); font-size: var(--fs-sm); }
.card > .card-body { padding: var(--s4) var(--s5) var(--s5); }
.card > .card-foot { padding: var(--s3) var(--s5); border-top: 1px solid var(--line); display: flex; gap: var(--s2); justify-content: flex-end; flex-wrap: wrap; }
.card.flush > .card-body { padding: 0; }
.card.pad { padding: var(--s5); }
@media (max-width: 599px) {
  .card > .card-head { padding: var(--s4) var(--s4) 0; }
  .card > .card-body { padding: var(--s3) var(--s4) var(--s4); }
  .card.pad { padding: var(--s4); }
}
.section-title { font-size: var(--fs-lg); font-weight: 600; margin: var(--s2) 0 var(--s3); }
.divider { height: 1px; background: var(--line); margin: var(--s4) 0; border: 0; }

/* KPI tiles */
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s4) var(--s5); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.kpi .k-label { font-size: var(--fs-sm); color: var(--muted); display: flex; align-items: center; gap: 8px; }
.kpi .k-label img { width: 22px; height: 22px; }
.kpi .k-value { font: 600 var(--fs-3xl)/1.15 var(--font); letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.kpi .k-delta { font-size: var(--fs-sm); font-weight: 500; }
.kpi .k-delta.up { color: var(--ok); }
.kpi .k-delta.down { color: var(--bad); }
.kpi .k-delta.flat { color: var(--muted); }
@media (max-width: 599px) { .kpi { padding: var(--s3) var(--s4); } .kpi .k-value { font-size: var(--fs-2xl); } }

/* chart card */
.chart { width: 100%; height: 280px; }
.chart.sm { height: 200px; }
.chart.lg { height: 360px; }
@media (max-width: 599px) { .chart { height: 220px; } .chart.lg { height: 280px; } }

/* -------------------------------------------------------------- buttons */
.btn {
  --b-bg: var(--surface); --b-fg: var(--ink); --b-line: var(--line-strong);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 16px;
  border-radius: var(--r-md); border: 1px solid var(--b-line); background: var(--b-bg); color: var(--b-fg);
  font-weight: 600; font-size: var(--fs-md); cursor: pointer; white-space: nowrap; text-decoration: none; user-select: none;
  transition: background .12s, border-color .12s, color .12s;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn.primary { --b-bg: var(--primary); --b-fg: var(--primary-ink); --b-line: var(--primary); }
.btn.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn.danger { --b-bg: var(--bad); --b-fg: #fff; --b-line: var(--bad); }
.btn.danger:hover { filter: brightness(.94); background: var(--bad); }
.btn.ghost { --b-bg: transparent; --b-line: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.link { --b-bg: transparent; --b-line: transparent; color: var(--primary); padding: 0 4px; height: auto; }
.btn.sm { height: 32px; padding: 0 12px; font-size: var(--fs-sm); }
.btn.lg { height: 44px; padding: 0 20px; font-size: var(--fs-lg); }
.btn.block { width: 100%; }
.btn.icon { width: 38px; padding: 0; }
.btn.icon.sm { width: 32px; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn img { width: 20px; height: 20px; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; pointer-events: none; }
.btn.busy { position: relative; color: transparent !important; pointer-events: none; }
.btn.busy::after { content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--b-fg); border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn-group { display: inline-flex; }
.btn-group .btn { border-radius: 0; margin-left: -1px; }
.btn-group .btn:first-child { border-radius: var(--r-md) 0 0 var(--r-md); margin-left: 0; }
.btn-group .btn:last-child { border-radius: 0 var(--r-md) var(--r-md) 0; }
.btn-group .btn[aria-pressed="true"] { background: var(--primary-soft); color: var(--primary); border-color: var(--primary-line); z-index: 1; }

/* --------------------------------------------------------------- forms */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .field > .label { font-size: var(--fs-sm); font-weight: 600; color: var(--ink-2); }
.field .req { color: var(--bad); margin-left: 2px; }
.field .help { font-size: var(--fs-xs); color: var(--muted); }
.field .err { font-size: var(--fs-xs); color: var(--bad); font-weight: 500; }
.input, .select, .textarea {
  width: 100%; min-height: 40px; padding: 8px 12px; border-radius: var(--r-md);
  background: var(--surface); border: 1px solid var(--line-strong); color: var(--ink); outline: none;
  transition: border-color .12s, box-shadow .12s;
}
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--muted); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--primary); box-shadow: var(--focus); }
.input[aria-invalid="true"], .select[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--bad); }
.input:disabled, .select:disabled, .textarea:disabled { background: var(--surface-2); color: var(--muted); }
.textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.textarea.code { font-family: var(--mono); font-size: var(--fs-sm); }
.select { appearance: none; padding-right: 34px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.input.sm, .select.sm { min-height: 32px; padding-top: 4px; padding-bottom: 4px; font-size: var(--fs-sm); }
.input-group { display: flex; }
.input-group .input { border-radius: var(--r-md) 0 0 var(--r-md); }
.input-group .btn { border-radius: 0 var(--r-md) var(--r-md) 0; margin-left: -1px; height: auto; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4); }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 599px) { .form-grid { grid-template-columns: minmax(0, 1fr); } }
.check { display: inline-flex; align-items: flex-start; gap: 10px; cursor: pointer; line-height: 1.45; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--primary); flex: none; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { width: 40px; height: 22px; border-radius: 11px; background: var(--line-strong); position: relative; transition: background .15s; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-1); transition: transform .15s var(--ease); }
.switch input:checked + .track { background: var(--primary); }
.switch input:checked + .track::after { transform: translateX(18px); }
.switch input:focus-visible + .track { box-shadow: var(--focus); }
.savebar { position: sticky; bottom: 0; z-index: 20; display: flex; align-items: center; gap: var(--s3); margin-top: var(--s5); padding: var(--s3) var(--s4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-2); }
.savebar .grow { flex: 1; color: var(--muted); }
/* Phones: the note takes its own line and the buttons share the next one, so a
   long label (Thai, Malay) never pushes a button past the screen edge. */
@media (max-width: 599px) {
  .savebar { flex-wrap: wrap; }
  .savebar .grow { flex-basis: 100%; }
  .savebar > .btn { flex: 1 1 auto; justify-content: center; }
}

/* ------------------------------------------------------- filters + bulk */
.filterbar { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; margin-bottom: var(--s3); }
.filterbar .search-field { flex: 1 1 240px; position: relative; }
.filterbar .search-field .input { padding-left: 36px; }
.filterbar .search-field svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--faint); pointer-events: none; }
.filterbar .select, .filterbar .input { width: auto; }
@media (max-width: 599px) { .filterbar > * { flex: 1 1 100%; } .filterbar .select, .filterbar .input { width: 100%; } }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: var(--r-pill); border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-2); font-size: var(--fs-sm); font-weight: 500; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--primary-soft); border-color: var(--primary-line); color: var(--primary); font-weight: 600; }
.bulkbar { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s2) var(--s3); padding: 10px var(--s4); margin-bottom: var(--s3); background: var(--primary-soft); border: 1px solid var(--primary-line); border-radius: var(--r-md); }
.bulkbar .grow { flex: 1; font-weight: 600; color: var(--primary); }
@media (max-width: 599px) { .bulkbar { position: sticky; bottom: calc(env(safe-area-inset-bottom, 0px) + 8px); z-index: 25; box-shadow: var(--shadow-2); } }

/* ---------------------------------------------------------------- table */
.table-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow-x: auto; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--fs-md); }
.table th { position: sticky; top: 0; z-index: 1; text-align: left; font-size: var(--fs-xs); font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); background: var(--surface-2); padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table th.sortable { cursor: pointer; user-select: none; }
.table th.sortable:hover { color: var(--ink); }
.table th[aria-sort="ascending"]::after { content: " ▲"; font-size: 9px; }
.table th[aria-sort="descending"]::after { content: " ▼"; font-size: 9px; }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--canvas); }
.table tbody tr.clickable { cursor: pointer; }
.table tbody tr[aria-selected="true"] td { background: var(--primary-soft); }
.table .num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table td.wrap { white-space: normal; min-width: 200px; }
.table .sel { width: 44px; padding-right: 0; }
.table .sel input { width: 18px; height: 18px; accent-color: var(--primary); }
.table .cell-main { display: flex; align-items: center; gap: 10px; min-width: 0; }
.table .cell-main img.thumb { width: 40px; height: 40px; border-radius: var(--r-md); object-fit: cover; background: var(--surface-2); flex: none; }
.table .cell-main .t { font-weight: 600; }
.table .cell-main .s { font-size: var(--fs-xs); color: var(--muted); }
.table-foot { display: flex; align-items: center; gap: var(--s3); justify-content: space-between; flex-wrap: wrap; padding: 10px 14px; border-top: 1px solid var(--line); font-size: var(--fs-sm); color: var(--muted); }
/* phone: rows become cards; low-priority columns hide earlier */
@media (max-width: 1199px) { .table .p3 { display: none; } }
@media (max-width: 899px) { .table .p2 { display: none; } }
@media (max-width: 599px) {
  .table-wrap.cards { background: none; border: 0; overflow: visible; }
  .table-wrap.cards .table, .table-wrap.cards .table tbody { display: block; }
  .table-wrap.cards .table thead { display: none; }
  .table-wrap.cards .table tr { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px 14px; margin-bottom: 10px; }
  .table-wrap.cards .table td { display: block; padding: 0; border: 0; background: none !important; text-align: left; }
  .table-wrap.cards .table td.sel { grid-row: span 3; align-self: start; padding-top: 2px; }
  .table-wrap.cards .table td.primary-cell { grid-column: 2 / 3; }
  .table-wrap.cards .table td.status-cell { grid-column: 3; grid-row: 1; }
  .table-wrap.cards .table td:not(.sel):not(.primary-cell):not(.status-cell) { grid-column: 2 / -1; font-size: var(--fs-sm); color: var(--muted); }
  .table-wrap.cards .table td[data-label]:not(.primary-cell):not(.status-cell)::before { content: attr(data-label) ": "; color: var(--faint); }
  .table-wrap.cards .table .p2, .table-wrap.cards .table .p3 { display: none; }
  .table-wrap.cards .table-foot { border: 0; padding: 4px 2px; }
}

/* ------------------------------------------------------------- badges */
.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: var(--r-pill); font-size: var(--fs-xs); font-weight: 600; white-space: nowrap; border: 1px solid transparent; background: var(--surface-2); color: var(--ink-2); }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.badge.plain::before { display: none; }
.badge.ok { background: var(--ok-bg); color: var(--ok); border-color: var(--ok-line); }
.badge.warn { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-line); }
.badge.bad { background: var(--bad-bg); color: var(--bad); border-color: var(--bad-line); }
.badge.info { background: var(--info-bg); color: var(--info); border-color: var(--info-line); }
.badge.brand { background: var(--primary-soft); color: var(--primary); border-color: var(--primary-line); }
.tag { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: var(--r-sm); background: var(--surface-2); color: var(--muted); }

/* ------------------------------------------------------------- alerts */
.alert { display: flex; gap: var(--s3); align-items: flex-start; padding: 12px var(--s4); border-radius: var(--r-md); border: 1px solid var(--info-line); background: var(--info-bg); color: var(--ink); }
.alert .a-body { flex: 1; min-width: 0; }
.alert .a-title { font-weight: 600; }
.alert.ok { border-color: var(--ok-line); background: var(--ok-bg); }
.alert.warn { border-color: var(--warn-line); background: var(--warn-bg); }
.alert.bad { border-color: var(--bad-line); background: var(--bad-bg); }
.alert .a-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; flex: none; background: var(--info); }
.alert.ok .a-dot { background: var(--ok); } .alert.warn .a-dot { background: var(--warn); } .alert.bad .a-dot { background: var(--bad); }

/* ------------------------------------------------------- empty / error */
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--s3); padding: var(--s10) var(--s5); }
.empty img { width: min(320px, 80%); height: auto; }
.empty h3 { font-size: var(--fs-lg); }
.empty p { color: var(--muted); max-width: 46ch; }
.empty.sm { padding: var(--s6) var(--s4); }
.empty.sm img { width: 180px; }
.skel { background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 37%, var(--surface-2) 63%); background-size: 400% 100%; animation: skel 1.4s ease infinite; border-radius: var(--r-sm); min-height: 14px; }
@keyframes skel { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.skel-rows { display: flex; flex-direction: column; gap: 12px; padding: var(--s4); }

/* ------------------------------------------------- drawer / modal / toast */
.layer { position: fixed; inset: 0; z-index: 80; background: var(--overlay); display: flex; animation: fade .15s ease; }
@keyframes fade { from { opacity: 0; } }
.drawer { margin-left: auto; width: min(var(--drawer-w), 100%); height: 100%; background: var(--surface); box-shadow: var(--shadow-3); display: flex; flex-direction: column; animation: slidein .22s var(--ease); }
.drawer.wide { width: min(860px, 100%); }
@keyframes slidein { from { transform: translateX(40px); opacity: .4; } }
.drawer-head { display: flex; align-items: center; gap: var(--s3); padding: calc(var(--s4) + env(safe-area-inset-top, 0px)) var(--s5) var(--s4); border-bottom: 1px solid var(--line); }
.drawer-head h2 { font-size: var(--fs-xl); flex: 1; min-width: 0; }
.drawer-body { flex: 1; overflow-y: auto; padding: var(--s5); overscroll-behavior: contain; }
.drawer-foot { padding: var(--s3) var(--s5) calc(var(--s3) + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); display: flex; gap: var(--s2); justify-content: flex-end; flex-wrap: wrap; }
@media (max-width: 599px) { .drawer-body { padding: var(--s4); } .drawer-head, .drawer-foot { padding-left: var(--s4); padding-right: var(--s4); } }
.modal-layer { align-items: center; justify-content: center; padding: var(--s4); }
.modal { width: min(480px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--shadow-3); animation: pop .18s var(--ease); }
.modal.lg { width: min(720px, 100%); }
@keyframes pop { from { transform: scale(.97); opacity: .5; } }
.modal-head { padding: var(--s5) var(--s5) 0; display: flex; gap: var(--s3); align-items: flex-start; }
.modal-head h2 { font-size: var(--fs-xl); flex: 1; }
.modal-body { padding: var(--s3) var(--s5) var(--s5); color: var(--ink-2); }
.modal-foot { padding: 0 var(--s5) var(--s5); display: flex; gap: var(--s2); justify-content: flex-end; flex-wrap: wrap; }
@media (max-width: 599px) {
  .modal-layer { align-items: flex-end; padding: 0; }
  .modal { width: 100%; border-radius: var(--r-xl) var(--r-xl) 0 0; padding-bottom: env(safe-area-inset-bottom, 0px); }
  .modal-foot .btn { flex: 1; }
}
.toasts { position: fixed; z-index: 95; right: var(--s5); bottom: calc(var(--s5) + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 8px; align-items: flex-end; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; max-width: min(420px, calc(100vw - 32px)); padding: 11px 14px; border-radius: var(--r-md); background: var(--ink); color: var(--surface); box-shadow: var(--shadow-3); font-weight: 500; animation: pop .18s var(--ease); }
.toast.bad { background: var(--bad); color: #fff; }
.toast.ok::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex: none; }
@media (max-width: 599px) { .toasts { left: var(--s4); right: var(--s4); align-items: stretch; } .app.has-tabs ~ .toasts { bottom: calc(80px + env(safe-area-inset-bottom, 0px)); } }

/* menus */
.menu { position: fixed; z-index: 85; min-width: 200px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-3); padding: 6px; animation: pop .12s var(--ease); }
.menu .mi { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; background: none; border-radius: var(--r-sm); text-align: left; cursor: pointer; color: var(--ink); text-decoration: none; }
.menu .mi:hover, .menu .mi:focus-visible { background: var(--surface-2); text-decoration: none; }
.menu .mi.danger { color: var(--bad); }
.menu .sep { height: 1px; background: var(--line); margin: 6px 0; }
.menu .mh { padding: 8px 10px 6px; font-size: var(--fs-sm); color: var(--muted); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: var(--fs-sm); overflow: hidden; flex: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.lg { width: 56px; height: 56px; font-size: var(--fs-xl); }
.user-btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 6px 0 4px; border-radius: var(--r-pill); border: 0; background: none; cursor: pointer; }
.user-btn:hover { background: var(--surface-2); }
.user-btn .nm { font-weight: 500; max-width: 160px; }
@media (max-width: 899px) { .user-btn .nm { display: none; } }

/* key-value lists (detail drawers) */
.kv { display: grid; grid-template-columns: minmax(120px, 34%) minmax(0, 1fr); gap: 8px var(--s4); margin: 0; }
.kv dt { color: var(--muted); font-size: var(--fs-sm); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 599px) { .kv { grid-template-columns: minmax(0, 1fr); gap: 2px; } .kv dd { margin-bottom: 8px; } }

/* progress */
.meter { height: 8px; border-radius: var(--r-pill); background: var(--surface-2); overflow: hidden; }
.meter > i { display: block; height: 100%; border-radius: inherit; background: var(--primary); transition: width .4s var(--ease); }
.meter.warn > i { background: var(--warn); } .meter.bad > i { background: var(--bad); } .meter.ok > i { background: var(--ok); }

/* stepper (onboarding, verification) */
.steps { display: flex; gap: var(--s2); counter-reset: step; margin-bottom: var(--s5); overflow-x: auto; }
.steps .st { flex: 1 0 120px; display: flex; flex-direction: column; gap: 6px; font-size: var(--fs-sm); color: var(--muted); }
.steps .st::before { counter-increment: step; content: counter(step); width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line-strong); }
.steps .st.done::before { content: "✓"; background: var(--ok); color: #fff; border-color: var(--ok); }
.steps .st.now { color: var(--ink); font-weight: 600; }
.steps .st.now::before { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }

/* checklist (onboarding card) */
.checklist { display: flex; flex-direction: column; }
.checklist .ci { display: flex; align-items: center; gap: var(--s3); padding: 12px 0; border-top: 1px solid var(--line); }
.checklist .ci:first-child { border-top: 0; }
.checklist .ci img { width: 40px; height: 40px; }
.checklist .ci .t { font-weight: 600; }
.checklist .ci.done .t { color: var(--muted); text-decoration: line-through; }

/* code blocks */
.code { font: var(--fs-sm)/1.6 var(--mono); background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 14px; overflow-x: auto; white-space: pre; color: var(--ink); }
.copyable { display: flex; align-items: center; gap: 8px; }
.copyable code { font-family: var(--mono); font-size: var(--fs-sm); background: var(--surface-2); padding: 6px 10px; border-radius: var(--r-sm); overflow-x: auto; white-space: nowrap; flex: 1; min-width: 0; }

/* auth screens */
.auth { min-height: 100%; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); background: var(--canvas); }
.auth .auth-art { background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; justify-content: center; align-items: center; padding: var(--s10); gap: var(--s5); }
.auth .auth-art img.hero { width: min(520px, 100%); }
.auth .auth-art .pitch { max-width: 44ch; text-align: center; color: var(--muted); }
.auth .auth-form { display: flex; flex-direction: column; justify-content: center; padding: var(--s10) var(--s6); }
.auth .auth-card { width: min(420px, 100%); margin: 0 auto; display: flex; flex-direction: column; gap: var(--s4); }
.auth .auth-card .wordmark { height: 30px; width: auto; align-self: flex-start; }
.auth .auth-card h1 { font-size: var(--fs-2xl); }
.auth .auth-foot { margin-top: var(--s6); font-size: 12px; color: var(--faint); text-align: center; }
@media (max-width: 899px) { .auth { grid-template-columns: minmax(0, 1fr); } .auth .auth-art { display: none; } .auth .auth-form { padding: calc(var(--s8) + env(safe-area-inset-top, 0px)) var(--s4) var(--s8); } }

/* Sign-in scene: a Qwen-drawn soft-3D background behind the art panel
   (tools/gen_login_art.py), one picture per theme, chosen per console below.
   URLs are relative so they carry the deploy's /v/<version>/ like this file. */
.auth.auth-partner { --auth-bg: url(art/bg-partner-login.webp); --auth-bg-dark: url(art/bg-partner-login-dark.webp); }
.auth.auth-admin { --auth-bg: url(art/bg-admin-login.webp); --auth-bg-dark: url(art/bg-admin-login-dark.webp); }
.auth.auth-scene {
  --auth-scene: var(--auth-bg);
  --auth-glass: rgba(255, 255, 255, .74);
  --auth-glass-line: rgba(255, 255, 255, .9);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .auth.auth-scene {
    --auth-scene: var(--auth-bg-dark);
    --auth-glass: rgba(13, 21, 32, .62);
    --auth-glass-line: rgba(63, 196, 234, .22);
  }
}
:root[data-theme="dark"] .auth.auth-scene {
  --auth-scene: var(--auth-bg-dark);
  --auth-glass: rgba(13, 21, 32, .62);
  --auth-glass-line: rgba(63, 196, 234, .22);
}
.auth.auth-scene .auth-art {
  background: var(--canvas) var(--auth-scene) center / cover no-repeat;
  border-right: 0;
}
.auth.auth-scene .auth-art img.hero { width: min(440px, 78%); }
/* A keyed (transparent) hero floats on the scene; a scene-style hero drawn on
   white stays a rounded card, lifted the same way. */
.auth.auth-scene .auth-art img.hero.cutout { border-radius: 0; filter: drop-shadow(0 22px 34px rgba(4, 40, 60, .22)); }
.auth.auth-scene .auth-art img.hero:not(.cutout) { box-shadow: var(--shadow-3); }
.auth.auth-scene .auth-art .pitch {
  color: var(--ink-2);
  font-size: var(--fs-lg);
  line-height: 1.6;
  padding: var(--s4) var(--s5);
  border-radius: var(--r-xl);
  background: var(--auth-glass);
  border: 1px solid var(--auth-glass-line);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
/* Phones and narrow tablets: the scene goes behind the whole page and the
   form sits on a card, instead of the scene disappearing. */
@media (max-width: 899px) {
  .auth.auth-scene { background: var(--canvas) var(--auth-scene) center top / cover no-repeat; }
  .auth.auth-scene .auth-card {
    padding: var(--s6) var(--s5);
    border-radius: var(--r-xl);
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-3);
  }
}

/* full-page system states (404/500/maintenance/expired) */
.sys { min-height: 70vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: var(--s4); padding: var(--s8) var(--s4); }
.sys img { width: min(420px, 90%); }
.sys h1 { font-size: var(--fs-2xl); }
.sys p { color: var(--muted); max-width: 52ch; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
.skel.short { width: 60%; }
.qr { width: 200px; max-width: 100%; background: #fff; border-radius: var(--r-md); padding: 4px; border: 1px solid var(--line); }
.qr svg { display: block; width: 100%; height: auto; }
.code.wrap-text { white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--font); font-size: var(--fs-md); }
img.evidence { max-width: 220px; max-height: 220px; border-radius: var(--r-md); border: 1px solid var(--line); object-fit: contain; background: var(--surface-2); }
svg.ico { width: 18px; height: 18px; flex: none; }
.btn.sm svg.ico { width: 16px; height: 16px; }
.topbar .search svg.ico { width: 16px; height: 16px; color: var(--faint); }
img.onb-art { width: 96px; height: auto; flex: none; }
img.help-art { width: min(200px, 70%); }
details { border-top: 1px solid var(--line); padding: var(--s3) 0; }
details:first-child { border-top: 0; }
details > summary { cursor: pointer; list-style: none; margin: 0; }
details > summary::-webkit-details-marker { display: none; }
details > summary::before { content: "+"; display: inline-block; width: 18px; color: var(--primary); font-weight: 700; }
details[open] > summary::before { content: "–"; }
details > p { margin-top: var(--s2); padding-left: 18px; }
/* Tall chart / map / graph surfaces (network topology, user map). */
.chart.xl { height: min(60vh, 560px); min-height: 320px; }
@media (max-width: 599px) { .chart.xl { height: 380px; } }
/* A KPI tile nested inside a card (node cards). */
.card .kpi { border: 0; padding: 0; background: none; }
.card .kpi .k-value { font-size: var(--fs-2xl); }
/* Colour key next to a chart. */
.legend-key { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); color: var(--muted); }
.legend-key i { width: 10px; height: 10px; border-radius: 3px; background: var(--c1); display: inline-block; }
.legend-key.c2 i { background: var(--c2); } .legend-key.c3 i { background: var(--c3); } .legend-key.ok i { background: var(--ok); } .legend-key.bad i { background: var(--bad); } .legend-key.faint i { background: var(--faint); }
.content.banner-slot { flex: none; padding-bottom: 0; }
.drawer-foot .grow { flex: 1; }
/* Packs: Content Studio shelf + builders, admin content review. */
.pack-grid { display: grid; gap: var(--s4); grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.pack-card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); overflow: hidden; }
.pack-card.add { align-items: center; justify-content: center; gap: var(--s2); border-style: dashed; cursor: pointer; padding: var(--s5); min-height: 240px; }
.pack-card.add img { width: 72px; }
.pack-link { color: inherit; text-decoration: none; }
.pack-link:hover { text-decoration: none; }
.pack-art { position: relative; aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; background: var(--surface-2); }
.pack-art img { width: 60%; height: 60%; object-fit: contain; }
.pack-badges { position: absolute; top: 8px; left: 8px; display: flex; gap: 4px; }
.pack-body { padding: var(--s3) var(--s4); display: flex; flex-direction: column; gap: 4px; }
.pack-body .t, .sticker .t { font-weight: 600; }
.pack-body .s, .sticker .s, .pack-card.add .s { font-size: var(--fs-xs); color: var(--muted); }
.pack-body .s.bad { color: var(--bad); }
.pack-foot { display: flex; gap: var(--s2); padding: 0 var(--s4) var(--s4); }
.sticker-grid { display: grid; gap: var(--s3); grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.sticker-grid.sm, .sticker-grid.mini { grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); }
.sticker { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; padding: var(--s2); border: 1px solid var(--line); border-radius: var(--r-lg); text-align: center; font-size: var(--fs-xs); }
.sticker.add { border-style: dashed; justify-content: center; min-height: 150px; cursor: pointer; background: none; color: var(--muted); }
.sticker.add.drop { border-color: var(--primary); background: var(--primary-soft); }
.sticker-img, .sticker img.evidence { width: 96px; height: 96px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--r-md); border: 0; object-fit: contain; background: repeating-conic-gradient(var(--surface-2) 0 25%, transparent 0 50%) 0 0 / 16px 16px; }
.sticker-img.sm, .sticker-grid.mini .sticker img.evidence { width: 72px; height: 72px; }
.sticker-img.lg { width: 84px; height: 84px; }
.sticker-img img { max-width: 92%; max-height: 92%; object-fit: contain; }
.tone-thumb { width: 64px; height: 64px; border-radius: var(--r-md); object-fit: cover; }
.preview-media { max-width: 100%; max-height: 360px; border-radius: var(--r-md); background: var(--surface-2); }
audio.player, .drawer audio { width: 100%; max-width: 360px; }
input[type="range"] { width: 100%; accent-color: var(--primary); }
.thumb-grid { display: flex; flex-wrap: wrap; gap: var(--s2); }
.thumb-grid img { width: 96px; height: 96px; object-fit: cover; border-radius: var(--r-md); border: 1px solid var(--line); }
.help { font-size: var(--fs-xs); color: var(--muted); }
.chart.spark { height: 64px; }
img.preview { max-width: 220px; max-height: 220px; border-radius: var(--r-md); border: 1px solid var(--line); object-fit: contain; background: var(--surface-2); }
.place-search { position: relative; }
.place-search .place-results { position: absolute; left: 0; right: 0; top: calc(100% + 4px); max-height: 280px; overflow-y: auto; z-index: 500; }

/* Shop profile builder (partner portal). */
/* shop profile builder (partner portal pages/shop.js) */
.builder { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--s5); align-items: start; }
.builder-side { position: sticky; top: calc(var(--topbar-h) + env(safe-area-inset-top, 0px) + var(--s4)); }
.preview-toggle { display: none; }
@media (max-width: 1199px) { .builder { grid-template-columns: minmax(0, 1fr); } .builder-side { display: none; } .preview-toggle { display: inline-flex; } }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--s2); }
.tpl-opt { display: flex; align-items: center; gap: var(--s3); padding: var(--s3); text-align: left; border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--surface); color: var(--ink); cursor: pointer; }
.tpl-opt:hover { background: var(--surface-2); }
.tpl-opt[aria-pressed="true"] { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 1px var(--primary); }
.tpl-opt img { width: 48px; height: 48px; flex: none; object-fit: contain; }
.tpl-opt .tpl-tx { display: flex; flex-direction: column; min-width: 0; }
input.swatch { width: 44px; height: 40px; padding: 2px; flex: none; border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--surface); cursor: pointer; }
.pb-item { display: grid; grid-template-columns: 56px minmax(0, 1fr) 110px auto; gap: var(--s2); align-items: center; }
.pb-item.list { grid-template-columns: 56px minmax(0, 1fr) minmax(0, 1fr) 110px auto; }
.pb-item > .input:first-child { text-align: center; }
@media (max-width: 599px) { .pb-item, .pb-item.list { grid-template-columns: 48px minmax(0, 1fr); } .pb-item > :not(:first-child) { grid-column: 2; } .pb-item > .btn { justify-self: end; } }
.chatbg-stage { position: relative; height: 160px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-2); }
.chatbg-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.chatbg-bubble { position: absolute; max-width: 60%; padding: 7px 11px; border-radius: 16px; font-size: var(--fs-sm); }
.chatbg-bubble.in { left: 10px; top: 16px; background: #e2e8f0; color: #0f172a; }
.chatbg-bubble.out { right: 10px; top: 64px; background: #ccefff; color: #000; }
.chatbg-stage.dark .chatbg-bubble.in { background: #334155; color: #f1f5f9; }
.chatbg-stage.dark .chatbg-bubble.out { background: #0e4f6b; color: #fff; }
/* phone preview: an in-app mock, so it keeps the app's own light colours in both themes */
.phone { --pp-accent: #ff5a3b; position: relative; width: 288px; max-width: 100%; margin: 0 auto; overflow: hidden; border: 9px solid #0f1726; border-radius: 34px; background: #fff; color: #0f1726; box-shadow: var(--shadow-2); }
.phone-notch { position: absolute; top: 0; left: 50%; z-index: 3; width: 116px; height: 21px; transform: translateX(-50%); background: #0f1726; border-radius: 0 0 14px 14px; }
.phone-screen { height: 530px; overflow-y: auto; scrollbar-width: none; font-size: 12px; line-height: 1.4; }
.pp-banner { position: relative; height: 94px; overflow: hidden; background: var(--pp-accent); background: linear-gradient(120deg, var(--pp-accent), color-mix(in srgb, var(--pp-accent) 68%, #111)); }
.pp-banner.tall { height: 110px; }
.pp-banner img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pp-badge { position: absolute; top: 10px; right: 10px; padding: 4px 7px; border-radius: 6px; background: rgba(255, 255, 255, .22); color: #fff; font: 600 8.5px/1 var(--mono); letter-spacing: .1em; }
.pp-logo { position: relative; z-index: 2; display: grid; place-items: center; width: 60px; height: 60px; margin: -30px 0 0 16px; overflow: hidden; border: 3px solid #fff; border-radius: 17px; background: #fff; color: var(--pp-accent); font-size: 22px; font-weight: 800; box-shadow: 0 1px 3px rgba(15, 23, 38, .2); }
.pp-logo img { width: 100%; height: 100%; object-fit: cover; }
.pp-head { padding: 6px 16px 0; }
.pp-head b { display: flex; align-items: center; gap: 6px; font-size: 15px; }
.pp-head p { margin-top: 2px; color: #5b6880; font-size: 11px; white-space: pre-wrap; }
.pp-verified { display: inline-grid; place-items: center; width: 14px; height: 14px; border-radius: 50%; background: #3b82f6; color: #fff; font-size: 9px; }
.pp-btns { display: flex; gap: 8px; padding: 12px 16px 0; }
.pp-btn { flex: 1; padding: 8px; border-radius: 9px; background: #eef1f6; color: #0f1726; font-weight: 600; text-align: center; }
.pp-btn.primary { background: var(--pp-accent); color: #fff; }
.pp-sec { padding: 0 16px 14px; }
.pp-lbl { margin: 12px 0 8px; color: #8a94a6; font: 600 9px var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.pp-ph { color: #9aa3b2; font-style: italic; font-weight: 400; }
.pp-about { color: #3c4659; line-height: 1.5; white-space: pre-wrap; }
.pp-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pp-card, .pp-li, .pp-web, .pp-post { border: 1px solid #e3e7ee; border-radius: 12px; overflow: hidden; }
.pp-thumb { display: grid; place-items: center; height: 64px; font-size: 26px; background: #f3f5f9; background: color-mix(in srgb, var(--pp-accent) 10%, #fff); }
.pp-cc { padding: 7px 9px; }
.pp-price { margin-top: 2px; font-weight: 600; color: var(--pp-accent); }
.pp-list { display: flex; flex-direction: column; gap: 7px; }
.pp-li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; }
.pp-li > .grow { flex: 1; min-width: 0; }
.pp-li small { display: block; color: #5b6880; }
.pp-ic { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 9px; background: #f3f5f9; font-size: 16px; }
.pp-end { font-weight: 600; color: var(--pp-accent); }
.pp-shelf { display: flex; flex-wrap: wrap; gap: 8px; }
.pp-it { display: grid; place-items: center; width: 50px; height: 50px; border: 1px solid #e3e7ee; border-radius: 13px; background: #f3f5f9; font-size: 23px; }
.pp-web-bar { display: flex; align-items: center; gap: 4px; padding: 6px 9px; background: #f3f5f9; color: #5b6880; font: 10px var(--mono); }
.pp-sandbox { margin-left: auto; font-size: 8px; letter-spacing: .1em; text-transform: uppercase; }
.pp-web-body { display: flex; flex-direction: column; gap: 8px; padding: 10px; }
.pp-web-field { height: 22px; border-radius: 6px; background: #f3f5f9; }
.pp-game { display: flex; align-items: center; gap: 11px; padding: 11px; border: 1px solid #e3e7ee; border-radius: 13px; background: #f3f5f9; background: color-mix(in srgb, var(--pp-accent) 12%, #fff); }
.pp-g { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 9px; background: var(--pp-accent); color: #fff; }
.pp-game b { display: block; }
.pp-game small { color: #5b6880; font: 10px var(--mono); }
.pp-post-img { display: grid; place-items: center; height: 82px; font-size: 30px; background: linear-gradient(135deg, #ffe3db, #ffd0c4); }
.pp-cap { padding: 9px 11px; }

/* Team Inbox (partner portal). */
/* ---------------------------------------------------------------- inbox */
/* Workspace: one card, list (340px) | thread. Below 900px one pane at a time
   via [data-pane]; the page head steps aside while a thread is open. */
.ib { display: grid; grid-template-columns: 340px minmax(0, 1fr); height: calc(100dvh - var(--topbar-h) - 190px); min-height: 480px; overflow: hidden; padding: 0; }
.ib-list { display: flex; flex-direction: column; min-width: 0; min-height: 0; border-right: 1px solid var(--line); background: var(--surface); }
.ib-list-head.filterbar { margin: 0; padding: var(--s3); border-bottom: 1px solid var(--line); }
.ib-list-head .search-field { flex: 1 1 100%; }
.ib-filters { gap: 4px; }
.ib-filters .chip { height: 26px; padding: 0 10px; font-size: var(--fs-xs); }
.ib-chip-n { color: var(--muted); font-weight: 500; }
.ib-filters .chip[aria-pressed="true"] .ib-chip-n { color: var(--primary); }
.ib-convs { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.ib-conv { display: flex; align-items: center; gap: var(--s3); width: 100%; padding: 10px var(--s3); border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.ib-conv:hover { background: var(--surface-2); }
.ib-conv:focus-visible { outline: none; box-shadow: inset var(--focus); }
.ib-conv[aria-current="true"] { background: var(--primary-soft); box-shadow: inset 3px 0 0 var(--primary); }
.ib-conv .avatar, .ib-thread-head .avatar { width: 40px; height: 40px; }
.ib-conv-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ib-conv-top, .ib-conv-bottom { display: flex; align-items: center; gap: 6px; min-width: 0; }
.ib-conv-name { font-weight: 600; }
.ib-conv-peer { flex: none; font-size: 11px; color: var(--faint); }
.ib-conv-time { flex: none; margin-left: auto; font-size: var(--fs-xs); color: var(--muted); }
.ib-conv-last { flex: 1; font-size: var(--fs-sm); color: var(--muted); }
.ib-conv.unread .ib-conv-last { color: var(--ink); font-weight: 500; }
.ib-conv-bottom .badge { flex: none; height: 18px; padding: 0 6px; font-size: 10px; }
.ib-conv-bottom .tag { flex: none; max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ib-unread { flex: none; display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--r-pill); background: var(--primary); color: var(--primary-ink); font-size: 11px; font-weight: 700; }

.ib-thread { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--canvas); }
.ib-thread-in { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.ib-none { flex: 1; display: flex; align-items: center; justify-content: center; }
.ib-thread-head { display: flex; align-items: center; gap: var(--s3); padding: 10px var(--s4); border-bottom: 1px solid var(--line); background: var(--surface); }
.ib-back { display: none; }
.ib-thread-title { flex: 1; min-width: 0; }
.ib-thread-name { display: flex; align-items: baseline; gap: 6px; min-width: 0; font-weight: 600; }
.ib-thread-sub { display: flex; align-items: center; gap: var(--s2); min-width: 0; margin-top: 2px; font-size: var(--fs-xs); color: var(--muted); }
.ib-thread-actions { display: flex; align-items: center; gap: var(--s1); flex: none; }
.ib-msgs-wrap { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; }
.ib-msgs { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 6px; padding: var(--s4); }
.ib-msgs:focus-visible { outline: none; box-shadow: inset var(--focus); }
.ib-tobottom { position: absolute; right: var(--s4); bottom: var(--s3); z-index: 2; border-radius: var(--r-pill); box-shadow: var(--shadow-2); }
.ib-tobottom-n { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--r-pill); background: var(--primary); color: var(--primary-ink); font-size: 11px; font-weight: 700; }

.ib-compose { position: relative; padding: var(--s2) var(--s3); border-top: 1px solid var(--line); background: var(--surface); }
.ib-compose-row { display: flex; align-items: flex-end; gap: var(--s1); }
.ib-tool { flex: none; }
.ib-tool-art { width: 22px; height: 22px; }
.ib-input { flex: 1; min-width: 0; min-height: 40px; max-height: 160px; resize: none; field-sizing: content; }
.ib-send { flex: none; }
.ib-pending { display: flex; flex-wrap: wrap; gap: 6px; padding-bottom: var(--s2); }
.ib-pending-tile { position: relative; display: flex; align-items: center; justify-content: center; width: 56px; height: 56px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-2); }
.ib-pending-tile img { width: 100%; height: 100%; object-fit: cover; }
.ib-pending-name { padding: 0 4px; font-size: 10px; color: var(--muted); }
.ib-pending-x { position: absolute; top: 2px; right: 2px; display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; padding: 0; border: 0; border-radius: 50%; background: var(--ink); color: var(--surface); cursor: pointer; }
.ib-pending-x svg.ico { width: 12px; height: 12px; }

@media (max-width: 899px) {
  .ib { grid-template-columns: minmax(0, 1fr); height: calc(100dvh - var(--topbar-h) - 170px); min-height: 420px; }
  .ib[data-pane="thread"] .ib-list, .ib[data-pane="list"] .ib-thread { display: none; }
  .ib[data-pane="thread"] { height: calc(100dvh - var(--topbar-h) - 48px); }
  .content:has(.ib[data-pane="thread"]) .page-head { display: none; }
  .ib-list { border-right: 0; }
  .ib-back { display: inline-flex; }
  .ib-hide-sm { display: none; }
  .msg-row { max-width: 88%; }
}
@media (max-width: 599px) {
  .app.has-tabs .ib { height: calc(100dvh - var(--topbar-h) - 230px - env(safe-area-inset-bottom, 0px)); }
  .app.has-tabs .ib[data-pane="thread"] { height: calc(100dvh - var(--topbar-h) - 112px - env(safe-area-inset-bottom, 0px)); }
  .ib-thread-head { padding: 8px var(--s2); gap: var(--s2); }
  .ib-msgs { padding: var(--s3); }
  .ib-compose { padding: var(--s2); }
}

/* ------------------------------------------------------------- messages */
.msg { display: flex; flex-direction: column; max-width: 100%; }
.msg.out { align-items: flex-end; }
.msg.in { align-items: flex-start; }
.msg-row { display: flex; align-items: flex-end; gap: 6px; max-width: min(78%, 560px); }
.bubble { display: flex; flex-direction: column; gap: 6px; min-width: 0; max-width: 100%; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--r-xl); background: var(--surface); color: var(--ink); overflow-wrap: anywhere; }
.bubble.in { border-bottom-left-radius: var(--r-sm); }
.bubble.out { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); border-bottom-right-radius: var(--r-sm); }
.bubble.out a { color: inherit; text-decoration: underline; }
.bubble.sticker { padding: 0; border: 0; background: none; }
.bubble.flash, .msg-sys.flash { animation: msgflash 1.4s var(--ease); }
@keyframes msgflash { 0%, 60% { box-shadow: 0 0 0 3px var(--brand); } 100% { box-shadow: 0 0 0 3px transparent; } }
.msg-text { white-space: pre-wrap; line-height: 1.45; }
.msg-text.md { white-space: normal; }
.msg-meta { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 1px; padding-bottom: 2px; font-size: 11px; color: var(--muted); }
.msg.in .msg-meta { align-items: flex-start; }
.msg-time { white-space: nowrap; }
.msg-tick { white-space: nowrap; }
.msg-tick.read { color: var(--primary); font-weight: 600; }
.msg-tick.bad { color: var(--bad); font-weight: 700; }
.msg-unsend { flex: none; align-self: center; padding: 4px 6px; border: 0; border-radius: var(--r-sm); background: none; color: var(--faint); cursor: pointer; opacity: 0; transition: opacity .12s; }
.msg-row:hover .msg-unsend, .msg-unsend:focus-visible { opacity: 1; }
.msg-unsend:hover { background: var(--surface-2); color: var(--bad); }
@media (hover: none) { .msg-unsend { opacity: .6; } }
.msg-sys { align-self: center; max-width: 90%; margin: 4px 0; padding: 3px 10px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--muted); font-size: var(--fs-xs); text-align: center; }
.msg-day { font-weight: 600; }
.msg-unsent { font-style: italic; }
.msg-quote { display: flex; flex-direction: column; gap: 1px; max-width: 100%; padding: 4px 8px; border: 0; border-left: 3px solid currentColor; border-radius: var(--r-sm); background: var(--surface-2); color: var(--ink-2); font: inherit; font-size: var(--fs-xs); text-align: left; cursor: pointer; }
.bubble.out .msg-quote { background: var(--primary-hover); color: var(--primary-ink); }
.msg-quote span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-rx { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.msg-rx-chip { display: inline-flex; align-items: center; gap: 3px; height: 22px; padding: 0 7px; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--surface); font-size: var(--fs-sm); }
.msg-rx-chip b { font-size: 11px; color: var(--muted); }

/* attachments */
.msg-media { display: block; padding: 0; overflow: hidden; border: 0; border-radius: var(--r-md); background: none; cursor: zoom-in; }
.msg-media img, img.msg-video, video.msg-video { display: block; max-width: min(280px, 100%); max-height: 320px; border-radius: var(--r-md); object-fit: cover; background: var(--surface-2); }
.msg-sticker { display: block; width: 140px; height: 140px; object-fit: contain; }
.msg-audio { width: 260px; max-width: 100%; }
.msg-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; width: min(300px, 100%); overflow: hidden; border-radius: var(--r-md); }
.msg-grid-tile { position: relative; aspect-ratio: 1; padding: 0; overflow: hidden; border: 0; background: var(--surface-2); cursor: zoom-in; }
.msg-grid-tile img { display: block; width: 100%; height: 100%; object-fit: cover; }
.msg-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: var(--surface); color: var(--ink); font-size: 12px; opacity: .9; box-shadow: var(--shadow-1); pointer-events: none; }
.msg-file, .msg-loc { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 6px 10px; border-radius: var(--r-md); background: var(--surface-2); color: var(--ink); font-size: var(--fs-sm); text-decoration: none; }
.msg-file:hover, .msg-loc:hover { background: var(--surface-3); text-decoration: none; }
.msg-card { display: flex; flex-direction: column; gap: 4px; min-width: 220px; max-width: 280px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); color: var(--ink); }
.msg-card a { color: var(--primary); }
.msg-card-head { display: flex; align-items: center; gap: var(--s2); margin-bottom: 2px; }
.msg-card-row { font-size: var(--fs-sm); overflow-wrap: anywhere; }
.msg-card .btn { align-self: flex-start; margin-top: 4px; }
.msg-envelope { display: flex; align-items: center; gap: 10px; min-width: 220px; padding: 10px 12px; border: 1px solid var(--warn-line); border-radius: var(--r-md); background: var(--warn-bg); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.msg-envelope:hover:not(:disabled) { border-color: var(--warn); }
.msg-envelope:disabled { opacity: .6; cursor: not-allowed; }
.msg-env-mark { font-size: 22px; line-height: 1; }
.msg-env-t { flex: 1; display: flex; flex-direction: column; font-size: var(--fs-sm); }
.msg-env-t span { color: var(--muted); font-size: var(--fs-xs); }
.msg-letter { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.55; }
.msg-env-items { display: flex; flex-wrap: wrap; gap: var(--s2); }
.msg-lightbox { display: block; max-width: 100%; max-height: 75vh; margin: 0 auto; border-radius: var(--r-md); }
img.ww-emoji { display: inline-block; width: 1.2em; height: 1.2em; margin: 0 .05em; vertical-align: -.2em; }

/* chat markdown */
.md-code { padding: 1px 5px; border-radius: var(--r-sm); background: var(--surface-2); color: var(--ink); font-family: var(--mono); font-size: .92em; }
.md-pre { margin: 4px 0; padding: 8px 10px; overflow-x: auto; border-radius: var(--r-md); background: var(--surface-2); color: var(--ink); font-family: var(--mono); font-size: .92em; white-space: pre-wrap; overflow-wrap: anywhere; }
.md-pre.ansi { display: inline-block; width: max-content; max-width: 100%; padding: 0; overflow: hidden; background: transparent; color: inherit; font-size: 10px; line-height: 1; white-space: pre; }
.md-h1, .md-h2, .md-h3 { margin: 4px 0 2px; font-weight: 700; }
.md-h1 { font-size: 1.3em; }
.md-h2 { font-size: 1.15em; }
.md-h3 { font-size: 1.05em; }
.md-quote { margin: 2px 0; padding-left: 8px; border-left: 3px solid currentColor; opacity: .85; }
.md-list { margin: 2px 0; padding-left: 20px; }
.md-gap { height: 6px; }
.md-color { border-radius: 2px; }
.md-table-wrap { max-width: 100%; margin: 4px 0; overflow-x: auto; }
.md-table { border-collapse: collapse; font-size: .95em; }
.md-table th, .md-table td { padding: 4px 10px; border: 1px solid var(--line-strong); text-align: left; }
.md-table th { background: var(--surface-2); color: var(--ink); }

/* sticker picker (popover above the composer) */
.stk-pop { position: absolute; left: var(--s2); bottom: calc(100% + 6px); z-index: 30; display: flex; flex-direction: column; width: min(360px, calc(100% - 16px)); max-height: min(380px, 60vh); overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-3); }
.stk-head { padding: var(--s2); border-bottom: 1px solid var(--line); }
.stk-head .input { width: 100%; }
.stk-body { flex: 1; min-height: 120px; padding: var(--s2); overflow-y: auto; overscroll-behavior: contain; }
.stk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 4px; }
.stk-tile { aspect-ratio: 1; padding: 4px; border: 0; border-radius: var(--r-md); background: none; cursor: pointer; }
.stk-tile:hover, .stk-tile:focus-visible { background: var(--surface-2); }
.stk-tile img { width: 100%; height: 100%; object-fit: contain; }
.stk-empty { display: flex; flex-direction: column; align-items: center; gap: var(--s2); padding: var(--s5) var(--s3); color: var(--muted); font-size: var(--fs-sm); text-align: center; }
.stk-tabs { flex: none; display: flex; gap: 2px; padding: 4px; overflow-x: auto; border-top: 1px solid var(--line); scrollbar-width: none; }
.stk-tabs::-webkit-scrollbar { display: none; }
.stk-tab { flex: none; width: 40px; height: 40px; padding: 4px; border: 0; border-radius: var(--r-md); background: none; color: var(--muted); cursor: pointer; }
.stk-tab.text { width: auto; padding: 0 10px; font-size: var(--fs-xs); font-weight: 600; }
.stk-tab:hover { background: var(--surface-2); }
.stk-tab[aria-selected="true"] { background: var(--primary-soft); color: var(--primary); }
.stk-tab img { width: 100%; height: 100%; object-fit: contain; }
.drawer .grid.c3, .drawer .grid.c4 { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
/* The banner above a page is never the scrolling content: no tab-bar room. */
.app .content.banner-slot, .app.has-tabs .content.banner-slot { padding-bottom: 0; }
/* On phones an alert's action drops under its text instead of squeezing it. */
@media (max-width: 599px) {
  .alert { flex-wrap: wrap; }
  .alert .a-body { flex: 1 1 calc(100% - 24px); }
  .alert > .btn, .alert > a.btn { margin-left: 20px; }
}
.empty img, .sys img, .auth .auth-art img.hero, .help-art { border-radius: var(--r-lg); }
