/* Pitboss admin — same palette as the site, denser layout */
:root {
  --bg: #11141f;
  --bg-2: #171b2b;
  --bg-3: #1f2438;
  --bg-4: #2a3049;
  --line: #2a3050;
  --text: #e8eaf4;
  --muted: #959cba;
  --gold: #e8b04b;
  --gold-hi: #f3c56a;
  --gold-ink: #1d1505;
  --felt: #2fa877;
  --danger: #e4606a;
  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --body: "Figtree", "Segoe UI", system-ui, -apple-system, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 15px/1.5 var(--body); -webkit-font-smoothing: antialiased; }
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-hi); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
h1, h2 { font-family: var(--display); margin: 0; line-height: 1.2; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* ---------- Shell */
.shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--bg-2); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 20px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side-brand { display: flex; align-items: center; gap: 10px; color: var(--text); font: 800 1.2rem/1 var(--display); padding: 4px 10px 22px; }
.side-brand:hover { color: var(--text); }
.side-brand svg { width: 30px; height: 30px; color: var(--gold); }
.side-nav { display: grid; gap: 2px; }
.side-nav a { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 10px; color: var(--muted); font-weight: 600; }
.side-nav a:hover { background: var(--bg-3); color: var(--text); }
.side-nav a[aria-current="page"] { background: var(--bg-3); color: var(--text); box-shadow: inset 3px 0 0 var(--gold); }
.side-nav svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.side-nav span { flex: 1; }
.nav-badge { background: var(--danger); color: #fff; font-size: .72rem; min-width: 20px; height: 20px; border-radius: 10px; padding: 0 6px; display: grid; place-items: center; }
.side-foot { margin-top: auto; display: grid; gap: 2px; border-top: 1px solid var(--line); padding-top: 14px; }
.side-foot a { color: var(--muted); padding: 8px 12px; border-radius: 8px; font-size: .92rem; }
.side-foot a:hover { color: var(--text); background: var(--bg-3); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 22px 32px; border-bottom: 1px solid var(--line); }
.topbar h1 { font-size: 1.55rem; font-weight: 800; letter-spacing: -.01em; margin-right: auto; }
.content { padding: 28px 32px 48px; flex: 1; min-height: 0; }

.flash { margin: 18px 32px 0; padding: 12px 16px; border-radius: 10px; font-weight: 600; font-size: .92rem; background: rgba(47, 168, 119, .12); border: 1px solid rgba(47, 168, 119, .4); color: #8fe0bd; }
.flash.is-error { background: rgba(228, 96, 106, .1); border-color: rgba(228, 96, 106, .45); color: #f3a3a9; }
.content > .flash { margin: 0 0 18px; }
.notice { padding: 14px 18px; border-radius: 12px; margin-bottom: 22px; font-size: .93rem; }
.notice.is-warn { background: rgba(232, 176, 75, .1); border: 1px solid rgba(232, 176, 75, .45); }
.notice strong { color: var(--gold-hi); margin-right: 6px; }
.notice a { font-weight: 700; margin-left: 6px; }

/* ---------- Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 16px; border-radius: 10px; font: 700 .9rem/1 var(--body); border: 1px solid var(--line); background: var(--bg-3); color: var(--text); cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--bg-4); color: var(--text); }
.btn-gold { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); }
.btn-gold:hover { background: var(--gold-hi); color: var(--gold-ink); }
.btn-danger { color: #f3a3a9; }
.btn-danger:hover { background: rgba(228, 96, 106, .15); color: #f7b8bd; border-color: rgba(228, 96, 106, .5); }
.btn-small { padding: 7px 12px; font-size: .82rem; }
.icon-btn { background: var(--bg-3); border: 1px solid var(--line); color: var(--muted); width: 26px; height: 22px; border-radius: 6px; cursor: pointer; font-size: .6rem; display: grid; place-items: center; }
.icon-btn:hover:not(:disabled) { color: var(--text); border-color: var(--muted); }
.icon-btn:disabled { opacity: .3; cursor: default; }
.pill-btn { border: 1px solid var(--line); background: var(--bg-3); color: var(--muted); padding: 5px 12px; border-radius: 999px; font: 600 .8rem/1 var(--body); cursor: pointer; }
.pill-btn.is-on { color: #8fe0bd; border-color: rgba(47, 168, 119, .5); background: rgba(47, 168, 119, .1); }
.pill { font-style: normal; font-size: .7rem; font-weight: 600; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; }

/* ---------- Dashboard */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat { background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; color: var(--text); display: grid; gap: 4px; }
a.stat:hover { border-color: var(--muted); color: var(--text); }
.stat span { color: var(--muted); font-size: .88rem; font-weight: 600; }
.stat b { font: 800 2.1rem/1.1 var(--display); }
.stat small { color: var(--muted); font-size: .8rem; }
.stat.is-alert { border-color: rgba(228, 96, 106, .5); }
.stat.is-alert b { color: #f3a3a9; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.panel { background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; padding: 22px; }
.panel.flush { padding: 0; overflow: hidden; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.panel-head h2, .panel-title { font-size: 1.1rem; font-weight: 700; }
.panel-title { margin-bottom: 16px; }
.panel-head a { font-size: .88rem; font-weight: 600; }
.empty-note { color: var(--muted); font-size: .92rem; margin: 6px 0; padding: 0 4px; }
.list { list-style: none; margin: 0; padding: 0; }
.list > li + li { border-top: 1px solid var(--line); }
.list-row { display: flex; align-items: center; gap: 12px; padding: 11px 4px; color: var(--text); }
a.list-row:hover { background: var(--bg-3); color: var(--text); border-radius: 8px; }
.list-main { flex: 1; min-width: 0; display: grid; }
.list-main strong { font-weight: 600; display: flex; gap: 8px; align-items: center; }
.list-main small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.list-meta small { color: var(--muted); font-size: .78rem; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--bg-4); display: grid; place-items: center; font: 700 .95rem/1 var(--display); flex: none; position: relative; color: var(--text); }
.avatar.is-online::after { content: ""; position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%; background: var(--felt); box-shadow: 0 0 0 2px var(--bg-2); }
.count { background: var(--danger); color: #fff; min-width: 20px; height: 20px; border-radius: 10px; padding: 0 6px; font-size: .72rem; display: grid; place-items: center; }
.tile { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: #fff; font: 800 .82rem/1 var(--display); background: var(--brand, #3b4a8c); flex: none; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); }
.rank-num { font: 800 1.15rem/1 var(--display); color: var(--muted); width: 22px; text-align: center; }
.score { color: var(--gold); font-weight: 700; }

/* ---------- Table */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; color: var(--muted); font-weight: 600; font-size: .82rem; padding: 12px 16px; border-bottom: 1px solid var(--line); background: rgba(0, 0, 0, .15); }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr.is-muted td { opacity: .55; }
.table tr.is-muted td:last-child, .table tr.is-muted td:nth-last-child(2) { opacity: 1; }
.rank-cell { display: flex; align-items: center; gap: 10px; }
.move { display: grid; gap: 3px; }
.move form { margin: 0; }
.name-cell { display: flex; align-items: center; gap: 12px; }
.name-cell a { color: var(--text); }
.name-cell a:hover { color: var(--gold); }
.name-cell small { display: block; color: var(--muted); font-size: .78rem; }
.clip { max-width: 280px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #c9cde0; }
.row-actions { display: flex; gap: 8px; justify-content: flex-end; }
.row-actions form, .table td form { margin: 0; }
.hint { color: var(--muted); font-size: .85rem; margin-top: 14px; }

/* ---------- Forms */
.form-grid { display: grid; gap: 20px; max-width: 920px; }
.settings { display: grid; gap: 20px; max-width: 760px; }
label { display: grid; gap: 6px; font-weight: 600; font-size: .9rem; margin-bottom: 16px; }
.help { color: var(--muted); font-weight: 400; font-size: .8rem; }
.help.inline { display: block; margin-top: 2px; }
input:not([type="checkbox"]):not([type="color"]), textarea, select {
  width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; color: var(--text);
  padding: 10px 12px; font: 400 .95rem/1.4 var(--body);
}
textarea { resize: vertical; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--gold); }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; align-items: start; }
.row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 16px; }
.color-input { display: flex; gap: 8px; }
.color-input input[type="color"] { width: 44px; height: 42px; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); cursor: pointer; flex: none; }
.field-error { color: #f3a3a9; font-weight: 500; font-size: .82rem; }
.form-error { color: #f3a3a9; background: rgba(228, 96, 106, .1); border: 1px solid rgba(228, 96, 106, .4); padding: 10px 12px; border-radius: 10px; font-size: .88rem; margin: 0 0 16px; }
.form-actions { display: flex; gap: 10px; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.check input { width: 17px; height: 17px; accent-color: var(--gold); }

/* switch: see “Toggle switches” at the end of this file */
.availability { margin: 0; align-items: center; }
.availability em { font-style: normal; font-weight: 600; }

/* ---------- Login */
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 20px;
  background: radial-gradient(700px 400px at 50% 0, rgba(232, 176, 75, .09), transparent 70%), var(--bg); }
.login-card { width: min(380px, 100%); background: var(--bg-2); border: 1px solid var(--line); border-radius: 18px; padding: 32px; }
.login-chip { width: 44px; height: 44px; color: var(--gold); margin-bottom: 14px; }
.login-card h1 { font-size: 1.5rem; font-weight: 800; margin-bottom: 22px; }
.login-card .btn { width: 100%; padding: 13px; margin-top: 4px; }
.back-link { display: block; text-align: center; margin-top: 16px; color: var(--muted); font-size: .88rem; }

/* ---------- Live chat console */
.chat-app { display: grid; grid-template-columns: 320px minmax(0, 1fr); height: calc(100vh - 170px); min-height: 460px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.chat-list-pane { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.seg { display: flex; gap: 4px; padding: 12px; border-bottom: 1px solid var(--line); }
.seg button { flex: 1; background: none; border: 0; color: var(--muted); padding: 8px; border-radius: 8px; font: 600 .85rem/1 var(--body); cursor: pointer; }
.seg button:hover { color: var(--text); }
.seg button[aria-selected="true"] { background: var(--bg-3); color: var(--text); }
.chat-list { list-style: none; margin: 0; padding: 6px; overflow-y: auto; flex: 1; }
.chat-list-pane .empty-note { padding: 16px; }
.chat-item { width: 100%; display: flex; gap: 12px; align-items: center; text-align: left; background: none; border: 0; padding: 11px 10px; border-radius: 10px; cursor: pointer; color: var(--text); font: inherit; }
.chat-item:hover { background: var(--bg-3); }
.chat-item.is-active { background: var(--bg-4); }
.chat-item-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.chat-item-top { display: flex; justify-content: space-between; gap: 8px; }
.chat-item-top strong { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-item-top small { color: var(--muted); font-size: .75rem; flex: none; }
.chat-item-bottom { display: flex; align-items: center; gap: 8px; }
.snippet { flex: 1; min-width: 0; color: var(--muted); font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.snippet.is-typing { color: var(--felt); }
.chat-item.is-unread .chat-item-top strong { color: #fff; font-weight: 700; }
.chat-item.is-unread .snippet { color: var(--text); }

.chat-thread { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.chat-placeholder { display: grid; place-items: center; color: var(--muted); }
.thread-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); background: var(--bg-3); }
.thread-who { flex: 1; min-width: 0; display: grid; }
.thread-who small { color: var(--muted); font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread-actions { display: flex; gap: 8px; }
.back-btn { display: none; width: 32px; height: 32px; font-size: 1.3rem; }
.thread-log { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.tmsg { display: flex; flex-direction: column; max-width: 70%; }
.tmsg time { font-size: .7rem; color: var(--muted); margin-top: 3px; padding: 0 4px; }
.tbubble { padding: 10px 14px; border-radius: 16px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .93rem; }
.tmsg.is-visitor { align-self: flex-start; }
.tmsg.is-visitor .tbubble { background: var(--bg-4); border-bottom-left-radius: 5px; }
.tmsg.is-admin { align-self: flex-end; align-items: flex-end; }
.tmsg.is-admin .tbubble { background: var(--gold); color: var(--gold-ink); border-bottom-right-radius: 5px; }
.tmsg.is-system { align-self: center; align-items: center; max-width: 90%; }
.tmsg.is-system .tbubble { background: none; border: 1px dashed var(--line); color: var(--muted); font-size: .8rem; padding: 4px 10px; }
.thread-typing { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: .8rem; padding: 0 20px 8px; }
.thread-typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: dot 1s infinite; }
.thread-typing span:nth-child(2) { animation-delay: .15s; }
.thread-typing span:nth-child(3) { animation-delay: .3s; margin-right: 6px; }
@keyframes dot { 0%, 60%, 100% { opacity: .3; } 30% { opacity: 1; } }
.thread-compose { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 14px 18px; border-top: 1px solid var(--line); align-items: end; }
.thread-compose select { grid-column: 1 / -1; width: auto; justify-self: start; padding: 7px 10px; font-size: .85rem; color: var(--muted); }
.thread-compose textarea { min-height: 46px; max-height: 160px; }
.thread-compose .btn { height: 46px; padding: 0 22px; }
.thread-error { padding: 0 18px 12px; margin: 0; }

/* ---------- Responsive */
@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; align-items: center; padding: 10px 14px; gap: 8px; overflow-x: auto; }
  .side-brand { padding: 0 8px 0 0; }
  .side-brand span { display: none; }
  .side-nav { display: flex; }
  .side-nav a { padding: 8px 10px; }
  .side-nav a span { display: none; }
  .side-nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--gold); }
  .side-foot { margin: 0 0 0 auto; border: 0; padding: 0; display: flex; }
  .topbar, .content { padding-left: 18px; padding-right: 18px; }
  .flash { margin-left: 18px; margin-right: 18px; }
  .row-2, .row-3 { grid-template-columns: 1fr; }
  .chat-app { grid-template-columns: 1fr; height: calc(100vh - 150px); }
  .chat-app .chat-placeholder { display: none; }
  .chat-app.show-thread .chat-list-pane { display: none; }
  .chat-app:not(.show-thread) .chat-thread { display: none; }
  .back-btn { display: grid; }
  .tmsg { max-width: 88%; }
}
@media (max-width: 520px) {
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat b { font-size: 1.6rem; }
  .thread-actions .btn { padding: 6px 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* =========================================================
   v2 additions
   ========================================================= */
code { font: 500 .85em ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--bg-3); border: 1px solid var(--line); padding: 1px 6px; border-radius: 5px; }
code.code { color: var(--gold-hi); }
.muted { color: var(--muted); }
.block { display: block; }
.pad { padding: 18px 22px 0; }
p.empty-note.pad { padding: 22px; }
.side-group { margin: 14px 12px 4px; font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #6f7695; }
.side-user { padding: 4px 12px 8px; font-weight: 700; font-size: .9rem; display: grid; }
.side-user small { color: var(--muted); font-weight: 500; font-size: .75rem; }
.pill.is-on { color: #8fe0bd; border-color: rgba(47, 168, 119, .5); }
.pill.is-warn { color: #f5c07a; border-color: rgba(240, 162, 74, .5); }
.pill.is-gold { color: var(--gold); border-color: rgba(232, 176, 75, .5); }
.tile.img { object-fit: contain; background: #fff; padding: 3px; }
.cell-link { color: var(--text); display: block; }
.cell-link:hover { color: var(--text); }
.cell-link:hover strong { color: var(--gold); }
.check-col { width: 36px; }
.check-col input, .table input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--gold); }
.move-col { width: 40px; }
.table small.block { margin-top: 2px; }
.grid-2 { margin-top: 20px; }
.grid-2.top { margin-top: 0; align-items: start; }
.panel + .grid-2, .stats + .panel { margin-top: 0; }
.stats + .panel { margin-bottom: 20px; }

/* List screen */
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.filters input[type=search] { width: 280px; }
.filters select { width: auto; }
.filters-count { margin-left: auto; color: var(--muted); font-size: .88rem; }
.bulk-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--line); background: rgba(0, 0, 0, .12); }
.bulk-bar select { width: auto; padding: 7px 10px; font-size: .88rem; }
.bulk-bar .help { margin-left: auto; }
.admin-pages { display: flex; gap: 4px; }
.admin-pages a, .admin-pages span { min-width: 30px; height: 30px; display: grid; place-items: center; border-radius: 7px; border: 1px solid var(--line); font-size: .85rem; color: var(--text); padding: 0 8px; }
.admin-pages [aria-current] { background: var(--gold); color: var(--gold-ink); border-color: var(--gold); }
.more-menu { position: relative; }
.more-menu summary { list-style: none; }
.more-menu summary::-webkit-details-marker { display: none; }
.more-menu > div { position: absolute; right: 0; top: calc(100% + 4px); z-index: 5; background: var(--bg-3); border: 1px solid var(--line); border-radius: 10px; padding: 4px; min-width: 140px; box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .7); }
.more-menu button { display: block; width: 100%; text-align: left; background: none; border: 0; color: var(--text); padding: 8px 10px; border-radius: 7px; font: 600 .85rem/1.2 var(--body); cursor: pointer; }
.more-menu button:hover { background: var(--bg-4); }
.more-menu button.danger { color: #f3a3a9; }
.table td { vertical-align: middle; }
.table .stars { font-size: 13px; letter-spacing: 1px; position: relative; display: inline-block; line-height: 1; }
.stars::before { content: "★★★★★"; color: var(--bg-4); }
.stars > span { position: absolute; inset: 0 auto 0 0; overflow: hidden; white-space: nowrap; }
.stars > span::before { content: "★★★★★"; color: var(--gold); }

/* Edit screen */
.edit-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 20px; align-items: start; }
.edit-main { display: grid; gap: 20px; min-width: 0; }
.edit-side { display: grid; gap: 16px; position: sticky; top: 16px; }
.sticky-save { display: grid; gap: 8px; }
.btn.block { width: 100%; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.fg-wide, .fg-check { grid-column: 1 / -1; }
.fg-check { margin-bottom: 12px; }
.field-wrap { display: grid; gap: 6px; margin-bottom: 16px; }
.field-wrap > label { margin: 0; display: block; }
.field-wrap label { margin-bottom: 0; }
.field-wrap.has-error input, .field-wrap.has-error textarea, .field-wrap.has-error select { border-color: var(--danger); }
.field-wrap.was-filled input, .field-wrap.was-filled textarea { border-color: var(--felt); }
.req { color: var(--gold); }
.switch { margin-bottom: 0; }
.help.indent { display: block; margin: 2px 0 0 52px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace !important; font-size: .85rem !important; }
.rich { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--bg); }
.rich textarea { border: 0; border-radius: 0; min-height: 140px; }
.rich-bar { display: flex; flex-wrap: wrap; gap: 2px; padding: 6px; border-bottom: 1px solid var(--line); background: var(--bg-3); }
.rich-bar button { background: none; border: 1px solid transparent; color: var(--muted); padding: 5px 9px; border-radius: 6px; font: 600 .8rem/1 var(--body); cursor: pointer; }
.rich-bar button:hover { color: var(--text); background: var(--bg-4); }
.rich-preview-btn { margin-left: auto; }
.rich-preview { padding: 12px 16px; min-height: 140px; }
.rich-preview h2 { font-size: 1.2rem; margin: 12px 0 8px; }
.rich-preview img { max-width: 100%; }
.image-field { display: flex; gap: 14px; align-items: flex-start; }
.image-preview { width: 96px; height: 96px; flex: none; border-radius: 12px; border: 1px dashed var(--line); background: repeating-conic-gradient(#1c2133 0% 25%, #232842 0% 50%) 50% / 16px 16px; display: grid; place-items: center; overflow: hidden; }
.image-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.image-preview span { color: var(--muted); font-size: .75rem; }
.image-inputs { flex: 1; display: grid; gap: 8px; min-width: 0; }
.image-inputs input[type=file], .field-wrap input[type=file] { font-size: .85rem; color: var(--muted); }
.image-inputs .check { margin: 0; font-size: .85rem; }
.thumbs { display: flex; flex-wrap: wrap; gap: 6px; }
.thumbs img { width: 72px; height: 48px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
.slug-input { display: flex; align-items: center; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.slug-input span { color: var(--muted); font-size: .8rem; padding-left: 12px; white-space: nowrap; max-width: 45%; overflow: hidden; text-overflow: ellipsis; }
.slug-input input { border: 0 !important; padding-left: 2px !important; }
.slug-input:focus-within { border-color: var(--gold); }
.tag-suggest { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; font-size: .78rem; color: var(--muted); }
.tag-suggest button { background: var(--bg-3); border: 1px solid var(--line); color: var(--text); border-radius: 999px; padding: 3px 9px; font: 500 .75rem/1.2 var(--body); cursor: pointer; }
.tag-suggest button:hover { border-color: var(--gold); }
.meta-list { margin: 8px 0 0; display: grid; gap: 6px; font-size: .85rem; }
.meta-list div { display: flex; justify-content: space-between; gap: 10px; }
.meta-list dt { color: var(--muted); }
.meta-list dd { margin: 0; font-weight: 600; text-align: right; }
.plain-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-weight: 600; font-size: .92rem; }
.danger-zone { margin-top: 24px; }

/* Fetch panel */
.fetch-panel { border-color: rgba(232, 176, 75, .45); background: radial-gradient(400px 160px at 100% 0, rgba(232, 176, 75, .08), transparent 70%), var(--bg-2); }
.fetch-panel .panel-title { margin-bottom: 4px; }
.fetch-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 14px; }
.fetch-row input[type=text] { flex: 1 1 260px; width: auto; }
.fetch-row .check { margin: 0; font-size: .85rem; }
#fetch-results { margin-top: 16px; }
.fetch-list { display: grid; gap: 6px; margin: 10px 0 14px; }
.fetch-item { display: grid; grid-template-columns: 20px 170px minmax(0, 1fr); gap: 10px; align-items: center; margin: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); font-weight: 500; cursor: pointer; }
.fetch-item.is-same { opacity: .55; cursor: default; }
.fetch-item input { width: 16px; height: 16px; accent-color: var(--gold); }
.fetch-label { font-weight: 700; font-size: .85rem; }
.fetch-label em { display: block; font-style: normal; font-weight: 500; color: #f5c07a; font-size: .72rem; }
.fetch-value { font-size: .85rem; color: #c9cde0; overflow-wrap: anywhere; display: flex; align-items: center; gap: 8px; }
.fetch-value img { max-height: 48px; max-width: 140px; border-radius: 6px; background: #fff; padding: 2px; }
.swatch { width: 18px; height: 18px; border-radius: 5px; display: inline-block; border: 1px solid var(--line); }
.ok-note { color: #8fe0bd; font-weight: 600; margin: 0; }

/* Settings */
.settings { max-width: 820px; }
.tabbar { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.tabbar a { padding: 10px 14px; color: var(--muted); font-weight: 600; font-size: .92rem; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabbar a:hover { color: var(--text); }
.tabbar a[aria-current] { color: var(--text); border-bottom-color: var(--gold); }
.theme-pick { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.theme-pick legend { font-weight: 600; font-size: .9rem; margin-bottom: 10px; }
.theme-opt { margin: 0; cursor: pointer; border: 1px solid var(--line); border-radius: 12px; padding: 10px; gap: 8px; font-size: .85rem; }
.theme-opt input { position: absolute; opacity: 0; }
.theme-opt:has(input:checked) { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.theme-opt:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: 2px; }
.theme-swatch { display: flex; gap: 6px; align-items: flex-end; height: 56px; padding: 10px; border-radius: 8px; background: var(--sw-bg); border: 1px solid rgba(255, 255, 255, .08); }
.theme-swatch i { display: block; border-radius: 4px; background: var(--sw-ac); width: 18px; height: 100%; opacity: .95; }
.theme-swatch i:nth-child(2) { height: 60%; opacity: .6; }
.theme-swatch i:nth-child(3) { height: 35%; opacity: .35; }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 18px; }
.info-grid div { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: grid; gap: 4px; font-size: .85rem; min-width: 0; }
.info-grid span { color: var(--muted); font-size: .75rem; font-weight: 600; }
.info-grid a, .info-grid code { overflow-wrap: anywhere; }
.ok { color: #8fe0bd; }
.warn { color: #f5c07a; }
.rewrite-test { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 20px; }
.color-input input[type=text], .color-input input:not([type]) { width: 160px; }

/* Charts */
.bars { display: flex; align-items: flex-end; gap: 3px; height: 180px; padding-top: 10px; }
.bar-col { flex: 1; height: 100%; display: flex; flex-direction: column-reverse; border-radius: 4px 4px 0 0; overflow: hidden; min-width: 2px; }
.bar-col i { display: block; background: var(--gold); border-radius: 3px 3px 0 0; min-height: 0; }
.bars:not(.stacked) .bar-col i { background: linear-gradient(180deg, var(--gold-hi), var(--gold)); }
.bars.stacked .bar-col i { border-radius: 0; }
.bar-col:hover i { filter: brightness(1.15); }
.bars-axis { display: flex; justify-content: space-between; color: var(--muted); font-size: .78rem; margin-top: 8px; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.seg-links { display: flex; gap: 4px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.seg-links a { padding: 6px 12px; border-radius: 7px; color: var(--muted); font-weight: 600; font-size: .85rem; }
.seg-links a[aria-current] { background: var(--bg-4); color: var(--text); }
.tool-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: .92rem; }
.tool-row:first-of-type { border-top: 0; }
.tool-row select { width: auto; padding: 5px 8px; font-size: .85rem; }
.role-list { margin: 0; display: grid; gap: 12px; }
.role-list dt { font-weight: 700; }
.role-list dd { margin: 2px 0 0; color: var(--muted); font-size: .9rem; }

/* Installer */
.install-page { min-height: 100vh; display: grid; place-items: start center; padding: 40px 20px; background: radial-gradient(700px 400px at 50% 0, rgba(232, 176, 75, .09), transparent 70%), var(--bg); }
.install-card { width: min(640px, 100%); background: var(--bg-2); border: 1px solid var(--line); border-radius: 20px; padding: 34px; }
.install-card h1 { font-size: 1.7rem; font-weight: 800; margin: 8px 0 6px; }
.install-card > p { color: var(--muted); margin: 0 0 22px; }
.steps { display: flex; gap: 6px; margin-bottom: 26px; list-style: none; padding: 0; counter-reset: s; }
.steps li { flex: 1; font-size: .78rem; font-weight: 700; color: var(--muted); border-top: 3px solid var(--bg-4); padding-top: 8px; }
.steps li.is-done { border-color: var(--felt); color: var(--text); }
.steps li.is-now { border-color: var(--gold); color: var(--text); }
.req-list { list-style: none; margin: 0 0 22px; padding: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.req-list li { display: flex; justify-content: space-between; gap: 12px; padding: 11px 14px; border-top: 1px solid var(--line); font-size: .92rem; }
.req-list li:first-child { border-top: 0; }
.req-list b { font-weight: 700; white-space: nowrap; }
.req-list .is-ok b { color: #8fe0bd; }
.req-list .is-warn b { color: #f5c07a; }
.req-list .is-bad b { color: #f3a3a9; }
.req-list small { display: block; color: var(--muted); font-size: .8rem; }
.install-card .form-actions { margin-top: 8px; }
.install-card fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px 4px; margin: 0 0 18px; }
.install-card legend { font-weight: 700; padding: 0 6px; }
.install-card .switch { margin-bottom: 14px; }
.done-box { text-align: center; }
.done-box .big-check { width: 64px; height: 64px; border-radius: 50%; background: rgba(47, 168, 119, .15); color: var(--felt); display: grid; place-items: center; margin: 0 auto 10px; font-size: 2rem; }

@media (max-width: 1100px) {
  .edit-layout { grid-template-columns: 1fr; }
  .edit-side { position: static; }
}
@media (max-width: 860px) {
  .side-group, .side-user { display: none; }
  .field-grid, .info-grid { grid-template-columns: 1fr; }
  .fetch-item { grid-template-columns: 20px 1fr; }
  .fetch-value { grid-column: 2; }
  .filters input[type=search] { width: 100%; }
  .filters-count { margin-left: 0; }
}
.tabbar a { display: inline-flex; align-items: center; gap: 6px; }
.tabbar .nav-badge { margin-left: 0; }
.mail-head .row-actions, .row-actions { align-items: center; align-self: flex-start; }
.row-actions form { align-items: center; }
.mail-frame { height: 380px; }

/* =========================================================
   v2.1: email center, group chat, security
   ========================================================= */
.stack { display: grid; gap: 20px; align-content: start; }
.stack-sm { display: grid; gap: 10px; }
.stack-sm > label:not(.check) { margin-bottom: -4px; }
.push-right { margin-left: auto; }
.filters.inline { margin: 0; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; font-size: .9rem; margin: 0; }
.check input { width: 16px; height: 16px; accent-color: var(--gold); }
.small-b { font-size: 1.3rem !important; overflow-wrap: anywhere; }
.inline-form { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.inline-form input { width: 160px; letter-spacing: .15em; font-size: 1.1rem; text-align: center; }
.radio-row { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); font-weight: 500; font-size: .9rem; margin: 0; cursor: pointer; }
.radio-row:first-of-type { border-top: 0; }
.radio-row input { accent-color: var(--gold); margin-top: 3px; }
.radio-row b { color: var(--gold); margin-left: 4px; }
.js-custom-list { margin-top: 8px; }
.test-row { display: flex; gap: 6px; margin-top: 6px; }
.test-row input { flex: 1; min-width: 0; padding: 7px 10px; font-size: .85rem; }
.tabbar a { display: inline-flex; align-items: center; gap: 6px; }
.mail-list { list-style: none; margin: 0; padding: 0; }
.mail-list li { display: flex; align-items: center; gap: 12px; border-top: 1px solid var(--line); padding: 0 16px; }
.mail-list li:first-child { border-top: 0; }
.mail-list li input { width: 16px; height: 16px; accent-color: var(--gold); flex: none; }
.mail-list a { flex: 1; display: grid; grid-template-columns: 180px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 13px 0; color: var(--text); min-width: 0; }
.mail-list a:hover .ml-subject strong { color: var(--gold); }
.mail-list .ml-from { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
.mail-list .ml-subject { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mail-list .ml-subject strong { font-weight: 600; }
.mail-list .ml-meta { display: flex; gap: 6px; align-items: center; color: var(--muted); }
.mail-list li.is-unread { background: rgba(232, 176, 75, .05); }
.mail-list li.is-unread .ml-from, .mail-list li.is-unread .ml-subject strong { color: var(--text); font-weight: 800; }
.mail-view { margin-bottom: 20px; }
.mail-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.mail-head h2 { font-size: 1.3rem; margin: 0 0 6px; }
.mail-head p { margin: 0 0 4px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row-actions { align-items: center; align-self: flex-start; }
.row-actions form { display: inline-flex; gap: 6px; align-items: center; }
.mail-frame { width: 100%; height: 380px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.mail-text { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; line-height: 1.6; overflow-wrap: anywhere; max-height: 560px; overflow-y: auto; }
.prose-lite img { max-width: 100%; }
.progress { height: 12px; background: var(--bg-4); border-radius: 99px; overflow: hidden; margin: 8px 0 12px; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-hi)); border-radius: inherit; transition: width .3s; }
.progress-stats { display: flex; flex-wrap: wrap; gap: 18px; font-size: .92rem; color: var(--muted); margin-bottom: 14px; }
.progress-stats b { color: var(--text); font-size: 1.05rem; }
.failed-list { margin-bottom: 16px; }
.failed-list summary { cursor: pointer; color: #f3a3a9; font-weight: 600; }
.failed-list ul { margin: 8px 0 0; padding-left: 18px; font-size: .88rem; display: grid; gap: 4px; }
.room-admin-list { list-style: none; margin: 0; padding: 0; max-height: 720px; overflow-y: auto; }
.room-admin-list li { padding: 14px 20px; border-top: 1px solid var(--line); }
.room-admin-list li.is-pinned { background: rgba(232, 176, 75, .06); }
.room-admin-list p { margin: 6px 0 8px; font-size: .94rem; overflow-wrap: anywhere; }
.ram-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ram-head small { color: var(--muted); margin-left: auto; }
.setup-steps { padding-left: 20px; display: grid; gap: 12px; margin: 0 0 14px; }
.qr-wrap { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
#qr { background: #fff; padding: 10px; border-radius: 10px; line-height: 0; }
#qr img, #qr canvas { display: block; }
code.secret { font-size: 1rem; letter-spacing: .08em; padding: 8px 12px; user-select: all; }
.table tr.is-warn-row td { background: rgba(228, 96, 106, .05); }
@media (max-width: 860px) {
  .mail-list a { grid-template-columns: 1fr; gap: 2px; }
  .mail-frame { height: 320px; }
}

/* =========================================================
   Toggle switches (v2.2): explicit on/off colours, never overlaps text
   ========================================================= */
label.switch, .field-wrap > label.switch, .settings label.switch, .install-card label.switch {
  display: flex; align-items: center; gap: 12px; margin: 0; font-weight: 500; font-size: .92rem;
  cursor: pointer; position: relative; min-height: 28px; line-height: 1.35;
}
label.switch > input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
label.switch .sw-track {
  display: block; position: relative; flex: 0 0 46px; width: 46px; height: 26px; border-radius: 999px;
  background: #3b4260; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); transition: background .18s ease;
}
label.switch .sw-track::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: #aab0c8; box-shadow: 0 1px 3px rgba(0, 0, 0, .45); transition: transform .18s ease, background .18s ease;
}
label.switch > input:checked + .sw-track { background: var(--felt); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18); }
label.switch > input:checked + .sw-track::after { transform: translateX(20px); background: #fff; }
label.switch > input:focus-visible + .sw-track { outline: 2px solid var(--gold); outline-offset: 3px; }
label.switch > input:disabled + .sw-track { opacity: .45; }
label.switch:has(> input:disabled) { cursor: not-allowed; color: var(--muted); }
label.switch .sw-text { flex: 1 1 auto; min-width: 0; }
label.switch .sw-state {
  flex: none; margin-left: auto; font: 800 .66rem/1 var(--body); letter-spacing: .08em; text-transform: uppercase;
  padding: 5px 8px; border-radius: 6px; background: rgba(228, 96, 106, .14); color: #f19ba3; min-width: 34px; text-align: center;
}
label.switch .sw-state::before { content: "Off"; }
label.switch > input:checked ~ .sw-state { background: rgba(47, 168, 119, .16); color: #63d6a6; }
label.switch > input:checked ~ .sw-state::before { content: "On"; }
.help.indent { margin-left: 58px; display: block; }
.topbar label.switch { min-height: 0; }
.install-card label.switch { margin-bottom: 14px; }

/* =========================================================
   Header & footer editor (v2.2)
   ========================================================= */
.layout-grid { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.mb-list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.mb-empty { color: var(--muted); font-size: .9rem; padding: 14px; border: 1px dashed var(--line); border-radius: 10px; text-align: center; }
.mb-row { display: grid; grid-template-columns: minmax(110px, 1fr) minmax(0, 1.5fr) auto auto; gap: 8px; align-items: center; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 8px; }
.mb-row.is-child { margin-left: 34px; position: relative; border-style: dashed; }
.mb-row.is-child::before { content: ""; position: absolute; left: -22px; top: -9px; width: 14px; height: 30px; border-left: 2px solid var(--line); border-bottom: 2px solid var(--line); border-bottom-left-radius: 8px; }
.mb-row input, .mb-row select, .link-picker select, .link-picker input { padding: 8px 10px; font-size: .88rem; min-width: 0; }
.link-picker { display: grid; gap: 6px; }
.mb-new { display: flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 500; color: var(--muted); margin: 0; white-space: nowrap; }
.mb-new input { width: 15px; height: 15px; accent-color: var(--gold); }
.mb-tools { display: flex; gap: 4px; }
.mb-btn { min-width: 30px; height: 30px; border-radius: 7px; border: 1px solid var(--line); background: var(--bg-3); color: var(--text); cursor: pointer; font: 700 .85rem/1 var(--body); padding: 0 8px; }
.mb-btn:hover { border-color: var(--gold); color: var(--gold); }
.mb-btn.is-danger:hover { border-color: var(--danger); color: #f3a3a9; }
.mb-btn.is-text { padding: 0 12px; font-weight: 600; }
.mb-add { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.mb-add select { flex: 1 1 240px; padding: 9px 10px; font-size: .88rem; }
.fb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; margin-top: 12px; align-items: start; }
.fb-col { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: rgba(255, 255, 255, .015); }
.fb-col .mb-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); }
.fb-col .mb-new, .fb-col .mb-tools { grid-column: span 1; }
.fb-head { display: flex; gap: 6px; align-items: center; }
.fb-title { flex: 1; font-weight: 700; padding: 8px 10px; }
.fb-add { min-height: 120px; border-style: dashed; font-size: .95rem; }
.social-fields { display: grid; gap: 10px; margin-top: 10px; }
.social-field { display: grid; grid-template-columns: 38px 110px minmax(0, 1fr); gap: 10px; align-items: center; }
.social-field label { margin: 0; font-size: .88rem; }
.social-field input { padding: 8px 10px; font-size: .88rem; }
.social-field .field-error { grid-column: 3; }
.social-prev { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: #fff; }
.social-prev i { font-size: 16px; }
.social-prev svg { width: 18px; height: 18px; }
.style-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.style-opt { display: grid; justify-items: center; gap: 8px; padding: 12px 8px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; font-weight: 500; font-size: .85rem; margin: 0; text-align: center; }
.style-opt:has(input:checked) { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.style-opt input { position: absolute; opacity: 0; }
.style-demo { display: flex; gap: 6px; list-style: none; padding: 0; margin: 0; }
.style-demo > span { width: 30px; height: 30px; display: grid; place-items: center; background: var(--bg-4); border: 1px solid var(--line); color: var(--text); }
.style-demo > span svg { width: 15px; height: 15px; }
.style-demo.social-round > span { border-radius: 50%; }
.style-demo.social-square > span { border-radius: 8px; }
.style-demo.social-plain > span { background: none; border-color: transparent; }
.tb-demo { width: 100%; padding: 8px; border-radius: 8px; font-weight: 700; }
.tb-accent { background: var(--gold); color: #1a1405; }
.tb-dark { background: #0b0e19; color: #e8eaf4; border: 1px solid #262c45; }
.tb-subtle { background: var(--bg-4); color: var(--text); }
.sticky-actions { position: sticky; bottom: 0; background: linear-gradient(transparent, var(--bg) 35%); padding: 18px 0 12px; margin-top: 8px; z-index: 5; }
@media (max-width: 1100px) {
  .layout-grid { grid-template-columns: 1fr; }
  .mb-row { grid-template-columns: 1fr 1fr; }
}
.cache-form { margin: 0; }
.btn-cache { display: inline-flex; align-items: center; gap: 7px; }
.btn-cache svg { width: 16px; height: 16px; color: var(--gold); }
.cache-panel { margin-bottom: 20px; }
.cache-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.cache-head .panel-title { display: flex; align-items: center; gap: 10px; }
.cache-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 14px 0; }
@media (max-width: 800px) { .cache-stats { grid-template-columns: 1fr 1fr; } }
.fetch-pages { margin: 0 0 12px; font-size: .85rem; color: var(--muted); } .fetch-pages summary { cursor: pointer; } .fetch-pages ul { margin: 6px 0; padding-left: 18px; overflow-wrap: anywhere; }
.social-prev i:empty::before { content: attr(data-i); font: 800 14px/1 var(--body); font-style: normal; }
.mb-row { grid-template-columns: minmax(110px, 1fr) minmax(0, 1.5fr) 84px 134px; }
.mb-tools { justify-content: flex-end; }
.fb-col .mb-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); }
.fb-col .mb-new { width: auto; }
.fb-col .mb-tools { justify-content: flex-end; }
@media (max-width: 1100px) { .mb-row { grid-template-columns: 1fr 1fr; } }
.mb-btn.is-text { height: auto; min-height: 36px; white-space: nowrap; padding: 0 14px; flex: none; }
.fb-grid > .fb-add { width: 100%; height: auto; min-height: 140px; white-space: nowrap; font-size: .95rem; }

.mb-btn { width: auto; display: inline-flex; align-items: center; justify-content: center; }
.mb-labels, .fb-titles { display: grid; gap: 6px; min-width: 0; flex: 1; }
.mb-label-de, .fb-title-de { border-style: dashed !important; }
.field-wrap.is-de input, .field-wrap.is-de textarea { border-style: dashed; }
.field-wrap.is-de > label::before { content: '🇩🇪 '; }
