/* Persona — design system v3.
   Themes: light · dark · cyber (neon; the admin surface always uses it). Accent: one hue, any theme.
   Tokens, base, controls, layout, sheets, home, chat, forms, auth, admin. Mobile first, iOS PWA safe areas. */

/* ================================================================= tokens */
:root {
  --ah: 165;
  --sans: ui-sans-serif, system-ui, -apple-system, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --r: 10px; --r-lg: 18px; --r-xl: 24px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --sat: env(safe-area-inset-top, 0px); --sab: env(safe-area-inset-bottom, 0px); --sal: env(safe-area-inset-left, 0px); --sar: env(safe-area-inset-right, 0px);
  --tabbar-h: 58px;
  color-scheme: light;
  --bg: #f3f5f2; --panel: #ffffff; --panel-2: #eff2ee; --line: #d5dcd3; --line-soft: #e3e8e1;
  --text: #17211d; --muted: #546159; --faint: #86918a;
  --sage: hsl(var(--ah) 52% 33%); --accent-ink: #ffffff; --focus: hsl(var(--ah) 60% 32%);
  --rose: #bb4256; --amber: #9b6410; --ok: #2c8a58;
  --me-bg: hsl(var(--ah) 52% 33%); --me-fg: #fff; --them-bg: #ffffff; --them-fg: var(--text);
  --shadow: 0 1px 2px #1a2a2210, 0 8px 24px #1a2a2214; --glow: transparent;
}
:root[data-accent="blue"] { --ah: 215; } :root[data-accent="violet"] { --ah: 262; } :root[data-accent="rose"] { --ah: 340; }
:root[data-accent="amber"] { --ah: 36; } :root[data-accent="cyan"] { --ah: 188; } :root[data-accent="sage"] { --ah: 165; }

@media (prefers-color-scheme: dark) { :root:not([data-theme]) { color-scheme: dark;
  --bg: #0f1514; --panel: #161e1c; --panel-2: #1d2724; --line: #2b3935; --line-soft: #222e2b;
  --text: #e9efec; --muted: #9aa8a2; --faint: #67756f;
  --sage: hsl(var(--ah) 48% 65%); --accent-ink: #08110e; --focus: hsl(var(--ah) 70% 76%);
  --rose: #f08aa0; --amber: #f0bf7a; --ok: #62d09a;
  --me-bg: hsl(var(--ah) 44% 38%); --me-fg: #f4fffb; --them-bg: #1f2a27; --them-fg: var(--text);
  --shadow: 0 1px 2px #0006, 0 10px 30px #0005; --glow: transparent; } }
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark;
  --bg: #0f1514; --panel: #161e1c; --panel-2: #1d2724; --line: #2b3935; --line-soft: #222e2b;
  --text: #e9efec; --muted: #9aa8a2; --faint: #67756f;
  --sage: hsl(var(--ah) 48% 65%); --accent-ink: #08110e; --focus: hsl(var(--ah) 70% 76%);
  --rose: #f08aa0; --amber: #f0bf7a; --ok: #62d09a;
  --me-bg: hsl(var(--ah) 44% 38%); --me-fg: #f4fffb; --them-bg: #1f2a27; --them-fg: var(--text);
  --shadow: 0 1px 2px #0006, 0 10px 30px #0005; --glow: transparent; }
:root[data-theme="cyber"] { color-scheme: dark;
  --bg: #05080d; --panel: #0b121b; --panel-2: #101a26; --line: #1c3a4a; --line-soft: #12273a;
  --text: #d6f3ff; --muted: #7fa8bd; --faint: #4d7388;
  --sage: hsl(var(--ah) 100% 60%); --accent-ink: #00130d; --focus: hsl(var(--ah) 100% 72%);
  --rose: #ff4d7a; --amber: #ffc83d; --ok: #29ff9a;
  --me-bg: hsl(var(--ah) 100% 22%); --me-fg: #dcfff2; --them-bg: #0f1c2a; --them-fg: var(--text);
  --shadow: 0 0 0 1px #1c3a4a, 0 10px 40px #000a; --glow: hsl(var(--ah) 100% 60% / .35); }

/* ================================================================= base */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; margin: 0; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body { background: var(--bg); color: var(--text); font: 16px/1.5 var(--sans); -webkit-font-smoothing: antialiased; overscroll-behavior-y: none; }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(800px 380px at 88% -8%, color-mix(in srgb, var(--sage) 13%, transparent), transparent 70%); }
button, input, select, textarea { font: inherit; color: inherit; }
button { -webkit-appearance: none; appearance: none; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
a { color: var(--sage); }
h1, h2, h3, h4 { font-family: var(--sans); font-weight: 700; letter-spacing: -.01em; margin: 0; }
h1 { font-size: clamp(24px, 5vw, 32px); } h2 { font-size: 20px; } h3 { font-size: 17px; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .mono { font-family: var(--mono); font-size: 12.5px; }
.row { display: flex; gap: 10px; align-items: center; } .row.wrap { flex-wrap: wrap; } .grow { flex: 1; min-width: 0; } .spacer { flex: 1; }
.warn { color: var(--rose); } .okc { color: var(--ok); }
[hidden] { display: none !important; }
::selection { background: color-mix(in srgb, var(--sage) 35%, transparent); }
* { scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

/* ================================================================= controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r); padding: 8px 16px; min-height: 40px; cursor: pointer; text-decoration: none; color: var(--text); transition: border-color .15s var(--ease), background .15s var(--ease), transform .1s var(--ease), box-shadow .15s var(--ease); }
.btn:hover { border-color: var(--sage); }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--sage); border-color: var(--sage); color: var(--accent-ink); font-weight: 650; box-shadow: 0 4px 16px color-mix(in srgb, var(--sage) 25%, transparent), 0 0 18px var(--glow); }
.btn.primary:hover { filter: brightness(1.07); }
.btn.danger { color: var(--rose); } .btn.danger:hover { border-color: var(--rose); background: color-mix(in srgb, var(--rose) 12%, var(--panel-2)); }
.btn.danger.primary { background: var(--rose); border-color: var(--rose); color: #fff; box-shadow: none; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); padding: 6px 12px; }
.btn.ghost:hover { color: var(--text); background: var(--panel-2); border-color: transparent; }
.btn.small { min-height: 34px; padding: 4px 12px; font-size: 14px; }
.btn.big { width: 100%; min-height: 48px; font-size: 16px; }
.btn.icon { width: 40px; padding: 0; border-radius: 50%; } .btn.icon.small { width: 34px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; pointer-events: none; }
input[type=text], input[type=number], input[type=password], input[type=date], input[type=time], input[type=search], input[type=email], select, textarea {
  width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 13px; font-size: 16px; transition: border-color .15s var(--ease), box-shadow .15s var(--ease); }
textarea { resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--sage); box-shadow: 0 0 0 3px color-mix(in srgb, var(--sage) 20%, transparent); }
input::placeholder, textarea::placeholder { color: var(--faint); }
input[type=range] { width: 100%; accent-color: var(--sage); height: 28px; }
input[type=checkbox], input[type=radio] { accent-color: var(--sage); width: 18px; height: 18px; }
input.otp { font-family: var(--mono); font-size: 22px; letter-spacing: .3em; text-align: center; }
label.field { display: block; margin-bottom: 14px; }
label.field > .lbl { display: block; font-size: 13px; color: var(--muted); margin-bottom: 5px; }
span.hint { font-size: 12.5px; color: var(--faint); display: block; margin-top: 4px; line-height: 1.4; }
label.field > .hint { display: block; font-size: 12.5px; color: var(--faint); margin-top: 4px; }
.check { display: inline-flex; gap: 8px; align-items: center; font-size: 14px; color: var(--muted); cursor: pointer; }
.pill { display: inline-block; padding: 2px 10px; border: 1px solid var(--line); border-radius: 99px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.pill.first { border-color: var(--amber); color: var(--amber); }
.badge { display: inline-block; margin-left: 8px; padding: 1px 9px; border-radius: 99px; background: var(--amber); color: #1b1408; font: 600 12px var(--sans); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 99px; overflow: hidden; background: var(--bg); max-width: 100%; }
.seg button { background: none; border: 0; padding: 7px 14px; font-size: 14px; cursor: pointer; color: var(--muted); white-space: nowrap; transition: background .15s var(--ease), color .15s; }
.seg button.on { background: var(--sage); color: var(--accent-ink); font-weight: 600; }
.seg.full { display: flex; } .seg.full button { flex: 1; padding-inline: 6px; }
.avatar { display: block; border-radius: 50%; flex: none; }
.switch { position: relative; flex: none; width: 46px; height: 28px; border-radius: 99px; border: 0; background: var(--line); cursor: pointer; transition: background .2s var(--ease); padding: 0; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px #0005; transition: transform .2s var(--ease); }
.switch[aria-checked="true"] { background: var(--sage); box-shadow: 0 0 12px var(--glow); } .switch[aria-checked="true"]::after { transform: translateX(18px); }

/* ================================================================= layout */
.page { max-width: 880px; margin: 0 auto; padding: 20px 18px calc(var(--tabbar-h) + var(--sab) + 40px); }
.page.wide { max-width: 1100px; }
.page > * { animation: rise .35s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.page-title { margin: 6px 0 16px; }
.empty { padding: 32px 22px; border: 1px dashed var(--line); border-radius: var(--r-lg); color: var(--muted); text-align: center; }
.card { background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--r-lg); padding: 18px; margin-bottom: 16px; box-shadow: var(--shadow); }
.card h2 { font-size: 18px; margin-bottom: 10px; }
.card label { display: block; font-size: 13px; color: var(--muted); margin: 10px 0 4px; }
.card label.check, .card label.field { margin: 0 0 10px; }
.card input[type=text], .card input[type=password], .card input[type=number], .card input[type=search], .card select, .card textarea { padding: 9px 12px; }
.card textarea { min-height: 64px; }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 3px 10px; font-size: 13px; } .kv dt { color: var(--faint); } .kv dd { margin: 0; overflow-wrap: anywhere; }
.card .kv { grid-template-columns: 1fr auto; }
.notice, .note-card { border: 1px solid var(--line); border-left: 3px solid var(--sage); border-radius: var(--r); padding: 10px 14px; background: color-mix(in srgb, var(--sage) 10%, transparent); margin: 8px 0 14px; font-size: 14px; }
.note-card.warn, .notice.warn { border-left-color: var(--amber); background: color-mix(in srgb, var(--amber) 12%, transparent); }
.note-card .bullets { margin: 6px 0 4px 18px; padding: 0; } .note-card .faint { margin-top: 4px; font-size: 12.5px; }
.secret { padding: 12px 14px; border: 1px dashed var(--sage); border-radius: var(--r); font-size: 17px; letter-spacing: .12em; word-break: break-all; margin: 8px 0; user-select: all; }
.codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 10px; background: var(--panel-2); font-size: 15px; user-select: all; }
.meter { height: 6px; border-radius: 99px; background: var(--line-soft); overflow: hidden; margin: 8px 0 10px; } .meter .fill { height: 100%; background: linear-gradient(90deg, var(--sage), var(--amber)); border-radius: inherit; transition: width .4s var(--ease); }
.mode-box { margin: 4px 0 14px; }

.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; padding: calc(8px + var(--sat)) calc(16px + var(--sar)) 8px calc(16px + var(--sal)); backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3); background: color-mix(in srgb, var(--panel) 82%, transparent); border-bottom: 1px solid var(--line-soft); }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 700 19px var(--sans); cursor: pointer; letter-spacing: -.01em; }
.logo { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; background: linear-gradient(135deg, var(--sage), color-mix(in srgb, var(--sage) 45%, var(--amber))); color: var(--accent-ink); font-size: 17px; box-shadow: 0 0 16px var(--glow); }
.topbar .nav { display: flex; gap: 4px; } .topbar .nav .btn.on { color: var(--text); background: var(--panel-2); }
.who-me { color: var(--muted); font-size: 14px; }
.tabbar { display: none; }
@media (max-width: 720px) {
  .topbar .nav, .topbar .who-me, .topbar .hide-m { display: none; }
  .tabbar { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 6px calc(8px + var(--sar)) calc(6px + var(--sab)) calc(8px + var(--sal)); background: color-mix(in srgb, var(--panel) 88%, transparent); backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3); border-top: 1px solid var(--line-soft); }
  .tabbar a { display: grid; justify-items: center; gap: 2px; padding: 5px 0; border-radius: 12px; text-decoration: none; color: var(--faint); font-size: 11px; position: relative; }
  .tabbar a svg { width: 24px; height: 24px; } .tabbar a.on { color: var(--sage); }
  .tabbar a .cnt { position: absolute; top: 1px; left: calc(50% + 6px); min-width: 17px; height: 17px; padding: 0 5px; border-radius: 9px; background: var(--rose); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
  .page { padding-inline: 14px; }
}
#toasts { position: fixed; z-index: 90; left: 50%; transform: translateX(-50%); bottom: calc(var(--sab) + 84px); display: grid; gap: 8px; width: min(92vw, 380px); pointer-events: none; }
.toast { background: var(--panel-2); border: 1px solid var(--line); border-left: 3px solid var(--sage); padding: 11px 14px; border-radius: var(--r); box-shadow: var(--shadow); font-size: 14.5px; animation: pop .22s var(--ease) both; pointer-events: auto; }
.toast.err { border-left-color: var(--rose); }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }

/* ================================================================= sheets and modals */
.sheet-back, .modal-back { position: fixed; inset: 0; z-index: 60; background: #000a; display: flex; align-items: flex-end; justify-content: center; animation: fade .18s var(--ease) both; }
.modal-back { align-items: center; padding: 16px; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.sheet { width: min(100%, 560px); max-height: min(88dvh, 820px); display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-bottom: 0; border-radius: var(--r-xl) var(--r-xl) 0 0; box-shadow: var(--shadow); animation: slide .26s var(--ease) both; padding-bottom: var(--sab); }
@keyframes slide { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet-grab { width: 40px; height: 4px; border-radius: 4px; background: var(--line); margin: 8px auto 2px; flex: none; }
.sheet-head { display: flex; align-items: center; gap: 10px; padding: 8px 16px 8px 20px; flex: none; }
.sheet-head h3 { flex: 1; font-size: 18px; }
.sheet-body { overflow-y: auto; overscroll-behavior: contain; padding: 4px 20px 20px; -webkit-overflow-scrolling: touch; }
@media (min-width: 721px) { .sheet-back { align-items: center; padding: 20px; } .sheet { border-bottom: 1px solid var(--line); border-radius: var(--r-xl); } .sheet-grab { display: none; } }
.modal { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; max-width: 420px; width: 100%; box-shadow: var(--shadow); animation: pop .2s var(--ease) both; }
.modal h3 { margin: 0 0 8px; } .modal p { margin: 0; color: var(--muted); } .modal input { margin-top: 12px; }
.actions-list { display: grid; gap: 2px; } .actions-list .sep { height: 1px; background: var(--line-soft); margin: 6px 4px; }
.act-item { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 12px 10px; background: none; border: 0; border-radius: 12px; color: var(--text); cursor: pointer; font-size: 16px; text-decoration: none; }
.act-item:hover, .act-item:active { background: var(--panel-2); } .act-item.danger { color: var(--rose); }
.act-item .ic { width: 22px; text-align: center; flex: none; color: var(--muted); font-size: 18px; } .act-item.danger .ic { color: var(--rose); }
.act-section { font: 700 11.5px var(--sans); text-transform: uppercase; letter-spacing: .08em; color: var(--faint); margin: 12px 10px 2px; } .act-section:first-child { margin-top: 2px; }
.act-item small { display: block; color: var(--faint); font-size: 12.5px; }
.sgroup { margin: 20px 0 0; } .sgroup:first-child { margin-top: 4px; }
.sgroup > h4 { font: 700 12px var(--sans); text-transform: uppercase; letter-spacing: .08em; color: var(--faint); margin: 0 0 4px 2px; }
.srow { display: flex; align-items: center; gap: 12px; padding: 11px 2px; border-bottom: 1px solid var(--line-soft); } .srow:last-child { border-bottom: 0; }
.srow .lab { flex: 1; min-width: 0; } .srow .lab b { display: block; font-weight: 550; font-size: 15.5px; } .srow .lab small { display: block; color: var(--faint); font-size: 12.5px; line-height: 1.35; margin-top: 1px; }
.srow.col { display: block; } .srow.col .lab { margin-bottom: 8px; }
.srow .val { color: var(--sage); font-family: var(--mono); font-size: 13px; margin-left: 6px; font-weight: 400; }

/* ================================================================= home */
.home-head { display: flex; align-items: center; gap: 10px; margin: 4px 0 12px; } .home-head h1 { flex: 1; font-size: 28px; }
.search { position: relative; margin-bottom: 12px; } .search input { padding-left: 40px; border-radius: 99px; background: var(--panel); }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--faint); pointer-events: none; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 12px; scrollbar-width: none; } .chips::-webkit-scrollbar { display: none; }
.chip-f { flex: none; padding: 6px 14px; border-radius: 99px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); font-size: 14px; cursor: pointer; }
.chip-f.on { background: color-mix(in srgb, var(--sage) 18%, var(--panel)); border-color: var(--sage); color: var(--text); }
.chat-list { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow); }
.list-title { font: 700 12px var(--sans); text-transform: uppercase; letter-spacing: .08em; color: var(--faint); margin: 18px 4px 8px; }
.chat-row { position: relative; overflow: hidden; background: var(--panel); touch-action: pan-y; border-bottom: 1px solid var(--line-soft); } .chat-row:last-child { border-bottom: 0; }
.chat-row .actions { position: absolute; inset: 0 0 0 auto; display: flex; }
.chat-row .actions button { width: 72px; border: 0; color: #fff; font-size: 13px; cursor: pointer; } .chat-row .actions .arch { background: #5d7280; } .chat-row .actions .del { background: var(--rose); }
.chat-row .face { position: relative; display: flex; gap: 13px; align-items: center; padding: 12px 8px 12px 14px; background: var(--panel); transition: transform .2s var(--ease), background .15s; cursor: pointer; }
.chat-row.dragging .face { transition: none; } .chat-row .face:hover { background: var(--panel-2); }
.chat-row .avwrap { position: relative; flex: none; }
.chat-row .dot { position: absolute; right: -1px; bottom: -1px; width: 14px; height: 14px; border-radius: 50%; border: 2.5px solid var(--panel); background: var(--faint); }
.dot.online { background: var(--ok); box-shadow: 0 0 8px var(--glow); } .dot.busy { background: var(--amber); } .dot.sleeping { background: #6c8ebf; } .dot.offline { background: var(--faint); }
.chat-row .mid { min-width: 0; flex: 1; } .chat-row .top { display: flex; gap: 8px; align-items: baseline; }
.chat-row .nm { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16.5px; } .chat-row .pin { color: var(--faint); font-size: 12px; }
.chat-row .tm { margin-left: auto; font-size: 12px; color: var(--faint); flex: none; } .chat-row.unread .tm { color: var(--sage); }
.chat-row .st { font-size: 12.5px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .chat-row .st.on { color: var(--ok); }
.chat-row .last { display: flex; gap: 8px; align-items: center; margin-top: 1px; }
.chat-row .last .tx { color: var(--muted); font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; } .chat-row.unread .last .tx { color: var(--text); font-weight: 500; }
.chat-row .cnt { flex: none; min-width: 21px; height: 21px; padding: 0 6px; border-radius: 11px; background: var(--sage); color: var(--accent-ink); font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.new-fab { position: fixed; z-index: 25; right: calc(18px + var(--sar)); bottom: calc(var(--sab) + 18px); height: 54px; padding: 0 22px; border-radius: 27px; box-shadow: 0 8px 28px color-mix(in srgb, var(--sage) 35%, #000a), 0 0 22px var(--glow); font-size: 16px; }
@media (max-width: 720px) { .new-fab { bottom: calc(var(--sab) + var(--tabbar-h) + 14px); } }
.install-hint { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; margin-bottom: 14px; border-radius: var(--r-lg); background: color-mix(in srgb, var(--sage) 11%, var(--panel)); border: 1px solid var(--line); font-size: 14px; } .install-hint b { display: block; margin-bottom: 2px; }
.new-grid { display: grid; gap: 10px; }
.new-card { display: flex; gap: 14px; align-items: center; text-align: left; padding: 14px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--panel-2); cursor: pointer; color: var(--text); } .new-card:hover { border-color: var(--sage); }
.new-card .ic { font-size: 26px; width: 40px; text-align: center; flex: none; } .new-card b { display: block; } .new-card small { color: var(--muted); font-size: 13.5px; }

/* ================================================================= chat */
.chat-shell { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); height: 100dvh; background: var(--bg); overflow: hidden; overscroll-behavior: none; }
.chat-shell.kb .composer { padding-bottom: 8px; }   /* the keyboard covers the home-indicator area */
.chat-shell.with-console { grid-template-columns: minmax(0, 1fr) 400px; }
.chat-main { display: flex; flex-direction: column; min-width: 0; height: 100%; min-height: 0; position: relative; }
.chat-head { display: flex; gap: 8px; align-items: center; padding: calc(8px + var(--sat)) calc(10px + var(--sar)) 8px calc(6px + var(--sal)); background: color-mix(in srgb, var(--panel) 90%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line-soft); flex: none; z-index: 5; }
.chat-head .peer { display: flex; gap: 11px; align-items: center; flex: 1; min-width: 0; cursor: pointer; padding: 2px 6px; border-radius: 12px; border: 0; background: none; text-align: left; } .chat-head .peer:hover { background: var(--panel-2); }
.chat-head .avwrap { position: relative; flex: none; } .chat-head .dot { position: absolute; right: -1px; bottom: -1px; width: 13px; height: 13px; border-radius: 50%; border: 2.5px solid var(--panel); }
.chat-head .pn { min-width: 0; } .chat-head .title { font-weight: 650; font-size: 17px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.chat-head .sub { font-size: 12.5px; color: var(--faint); line-height: 1.25; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .chat-head .sub.on { color: var(--ok); } .chat-head .sub.typing { color: var(--sage); }
.scene-line { padding: 5px 16px; border-bottom: 1px solid var(--line-soft); color: var(--muted); font-size: 13px; background: var(--panel); flex: none; }
.placebar { display: flex; gap: 6px; overflow-x: auto; align-items: center; padding: 6px 14px; border-bottom: 1px solid var(--line-soft); font-size: 13px; flex: none; scrollbar-width: none; }
.placebar .chip { flex: none; padding: 4px 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font-size: 13px; cursor: pointer; }
.placebar .chip.cur { background: var(--sage); color: var(--accent-ink); border-color: var(--sage); cursor: default; } .placebar .chip.far { opacity: .45; cursor: not-allowed; }
.log { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 14px calc(12px + var(--sar)) 8px calc(12px + var(--sal)); }
.log-inner { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; }
.day-sep { align-self: center; margin: 14px 0 10px; padding: 3px 12px; border-radius: 99px; background: var(--panel-2); color: var(--muted); font-size: 12px; }
.new-sep { align-self: stretch; display: flex; align-items: center; gap: 10px; margin: 12px 0 8px; color: var(--sage); font-size: 12px; font-weight: 600; } .new-sep::before, .new-sep::after { content: ""; flex: 1; height: 1px; background: color-mix(in srgb, var(--sage) 40%, transparent); }
.mrow { display: flex; margin: 0 0 2px; max-width: 100%; } .mrow.user { justify-content: flex-end; } .mrow.assistant { justify-content: flex-start; } .mrow.gap { margin-top: 10px; }
.bubble { position: relative; max-width: min(80%, 540px); padding: 8px 12px 7px; border-radius: 19px; font: 16px/1.38 var(--sans); white-space: pre-wrap; overflow-wrap: anywhere; box-shadow: 0 1px 1px #0002; animation: pop .22s var(--ease) both; -webkit-touch-callout: none; }
.mrow.assistant .bubble { background: var(--them-bg); color: var(--them-fg); border: 1px solid var(--line-soft); border-bottom-left-radius: 6px; }
.mrow.user .bubble { background: var(--me-bg); color: var(--me-fg); border-bottom-right-radius: 6px; box-shadow: 0 1px 1px #0002, 0 0 14px var(--glow); }
.mrow.assistant:not(.first) .bubble { border-top-left-radius: 8px; } .mrow.user:not(.first) .bubble { border-top-right-radius: 8px; }
.mrow.noanim .bubble { animation: none; }
.bubble .meta { display: inline-flex; gap: 4px; align-items: center; float: right; margin: 8px 0 -3px 10px; font-size: 11px; opacity: .75; line-height: 1; white-space: nowrap; }
.bubble em { opacity: .78; }
.ticks { letter-spacing: -.22em; font-size: 12px; margin-right: .22em; } .ticks.read { color: #8ff0ff; opacity: 1; text-shadow: 0 0 6px #7fe9ff66; } .ticks.sending { letter-spacing: 0; opacity: .6; } .ticks.failed { color: #ffb4c0; letter-spacing: 0; font-weight: 800; }
.fail-bar { align-self: flex-end; display: flex; gap: 8px; align-items: center; font-size: 12.5px; color: var(--rose); margin: 2px 4px 6px; } .fail-bar button { background: none; border: 0; color: var(--rose); text-decoration: underline; cursor: pointer; font-size: 12.5px; padding: 2px; }
.mrow.typing .bubble { display: inline-flex; gap: 5px; padding: 13px 15px; } .mrow.typing .bubble i { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); animation: blink 1.1s infinite; }
.mrow.typing .bubble i:nth-child(2) { animation-delay: .18s; } .mrow.typing .bubble i:nth-child(3) { animation-delay: .36s; }
@keyframes blink { 0%, 60%, 100% { opacity: .25; transform: none; } 30% { opacity: 1; transform: translateY(-2px); } }
.read-silent { align-self: flex-end; color: var(--faint); font-size: 12px; margin: 2px 6px 8px; }
.proposal { margin: 6px 0 8px; padding: 12px 14px; border: 1px solid var(--line); border-left: 3px solid var(--amber); border-radius: var(--r); background: var(--panel); max-width: min(86%, 520px); } .proposal .ptitle { font-weight: 650; } .proposal .row { margin-top: 10px; }
.regen { align-self: flex-start; margin: 2px 0 6px 4px; }
.msg { margin: 0 0 22px; position: relative; }
.msg .who { display: flex; gap: 8px; align-items: baseline; font-size: 13px; margin-bottom: 3px; color: var(--muted); } .msg .who b { font-size: 15px; color: var(--amber); font-weight: 650; } .msg.user .who b { color: var(--sage); }
.msg .text { font-family: var(--serif); font-size: 17px; line-height: 1.62; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.user .text { padding-left: 14px; border-left: 2px solid var(--line); color: var(--muted); } .msg .text em { color: var(--muted); font-style: italic; }
.msg.ooc .text { font-family: var(--sans); font-size: 14px; color: var(--muted); border-left: 2px dashed var(--faint); padding-left: 14px; } .msg.opening .text { font-style: italic; }
.msg .acts { display: flex; gap: 2px; margin-top: 4px; opacity: 0; transition: opacity .12s; flex-wrap: wrap; } .msg:hover .acts, .msg:focus-within .acts { opacity: 1; } @media (hover: none) { .msg .acts { opacity: 1; } }
.ledger { margin-top: 8px; padding: 6px 0 0 14px; border-left: 2px solid var(--line-soft); display: flex; flex-wrap: wrap; gap: 4px 12px; font-family: var(--mono); font-size: 12px; color: var(--faint); } .ledger .up { color: var(--ok); } .ledger .down { color: var(--rose); } .ledger .k { color: var(--muted); }
.live-steps { margin: 6px 0 10px; padding: 8px 12px; border-left: 2px solid var(--sage); font-family: var(--mono); font-size: 12px; color: var(--muted); } .live-steps div:last-child { color: var(--sage); }
.composer { flex: none; padding: 8px calc(10px + var(--sar)) calc(8px + var(--sab)) calc(10px + var(--sal)); background: color-mix(in srgb, var(--panel) 92%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line-soft); }
.composer-inner { max-width: 760px; margin: 0 auto; display: flex; gap: 8px; align-items: flex-end; }
.composer textarea { min-height: 44px; max-height: 160px; padding: 11px 16px; border-radius: 22px; resize: none; background: var(--bg); line-height: 1.35; display: block; } .composer .grow { display: flex; }
.send { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--sage); color: var(--accent-ink); display: grid; place-items: center; cursor: pointer; box-shadow: 0 4px 14px color-mix(in srgb, var(--sage) 30%, transparent), 0 0 16px var(--glow); transition: transform .1s var(--ease), opacity .15s; }
.send:active { transform: scale(.92); } .send[disabled] { opacity: .35; box-shadow: none; } .send svg { width: 22px; height: 22px; }
.composer .hint { max-width: 760px; margin: 4px auto 0; font-size: 12px; color: var(--faint); padding: 0 8px; }
.jump { position: absolute; right: 16px; bottom: calc(76px + var(--sab)); z-index: 4; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel); box-shadow: var(--shadow); display: grid; place-items: center; cursor: pointer; color: var(--text); }
.jump .cnt { position: absolute; top: -6px; right: -4px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: var(--sage); color: var(--accent-ink); font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.chat-shell.simple .scene-line, .chat-shell.simple .placebar, .chat-shell.simple .ledger, .chat-shell.simple .composer .hint, .chat-shell.simple .only-full { display: none !important; }
.console { border-left: 1px solid var(--line); background: var(--panel); height: 100%; overflow-y: auto; }
.console-head { position: sticky; top: 0; background: var(--panel); border-bottom: 1px solid var(--line); display: flex; align-items: center; padding: var(--sat) 6px 0; z-index: 2; overflow-x: auto; } .console-head .tab { white-space: nowrap; }
.console-body { padding: 14px 16px 40px; }
.console h4 { margin: 18px 0 6px; font: 600 13px var(--sans); color: var(--muted); } .console h4:first-child { margin-top: 0; }
.bar { display: grid; grid-template-columns: 82px 1fr 34px; gap: 8px; align-items: center; font-size: 13px; margin: 3px 0; } .bar .track { height: 6px; background: var(--bg); border-radius: 3px; overflow: hidden; } .bar .fill { height: 100%; background: var(--sage); } .bar.neg .fill { background: var(--rose); }
.bullets { margin: 0; padding-left: 18px; font-size: 13px; } .bullets li { margin: 2px 0; } .bullets.blind li { color: var(--rose); }
.kvedit { display: grid; grid-template-columns: 1fr 1fr auto; gap: 6px; margin-bottom: 6px; }
.drive { height: 8px; background: var(--bg); border-radius: 4px; position: relative; margin: 6px 0 2px; } .drive .fill { height: 100%; background: var(--sage); border-radius: 4px; } .drive .mark { position: absolute; top: -3px; width: 2px; height: 14px; background: var(--amber); }
@media (max-width: 860px) { .chat-shell.with-console { grid-template-columns: minmax(0, 1fr); } .console { position: fixed; inset: 0; z-index: 40; width: 100%; } }

/* ================================================================= tabs, editor, forms */
.editor { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 28px; }
.tabs { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 70px; align-self: start; }
.tab { text-align: left; background: none; border: 0; border-left: 2px solid var(--line); padding: 9px 12px; color: var(--muted); cursor: pointer; font-size: 15px; } .tab:hover { color: var(--text); } .tab.active { color: var(--text); border-left-color: var(--sage); background: var(--panel); }
.form h2 { font-size: 24px; margin-bottom: 4px; } .form .sub { color: var(--muted); margin: 0 0 20px; }
.group { margin: 22px 0 6px; padding-top: 14px; border-top: 1px solid var(--line-soft); font-weight: 650; font-size: 17px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; } .grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 18px; }
.checks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 18px; margin-bottom: 14px; }
.savebar { position: sticky; bottom: var(--sab); display: flex; gap: 10px; align-items: center; padding: 12px 0; background: linear-gradient(transparent, var(--bg) 35%); margin-top: 20px; z-index: 3; }
.fact-row { display: grid; grid-template-columns: 1fr auto auto auto; gap: 10px; align-items: center; margin-bottom: 8px; }
.fact-line { display: grid; grid-template-columns: 74px 1fr auto; gap: 8px; align-items: start; padding: 6px 0; border-bottom: 1px solid var(--line-soft); font-size: 14px; }
.ev-row { display: grid; grid-template-columns: 54px 1fr auto; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line-soft); font-size: 14px; }
pre.preview { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; overflow: auto; max-height: 280px; font-family: var(--mono); font-size: 12.5px; }
.time { width: auto !important; }
@media (max-width: 860px) {
  .editor { grid-template-columns: 1fr; gap: 14px; }
  .tabs { flex-direction: row; overflow-x: auto; position: static; margin: 0 -14px; padding: 0 14px; scrollbar-width: none; } .tabs::-webkit-scrollbar { display: none; }
  .tab { border-left: 0; border-bottom: 2px solid var(--line); white-space: nowrap; } .tab.active { border-bottom-color: var(--sage); background: none; }
  .grid2, .grid3, .checks { grid-template-columns: 1fr; } .fact-row { grid-template-columns: 1fr 1fr; }
}
.mem-item { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0; border-top: 1px solid var(--line-soft); } .mem-item:first-of-type { border-top: 0; }
.mem-item .txt { flex: 1; min-width: 0; } .mem-item .meta { font-size: 12px; color: var(--muted); } .mem-item .stars { color: var(--amber); letter-spacing: 1px; font-size: 12px; } .mem-item.replaced .txt { text-decoration: line-through; color: var(--faint); }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch { width: 38px; height: 38px; border-radius: 50%; border: 3px solid var(--panel); outline: 2px solid transparent; cursor: pointer; padding: 0; } .swatch.on { outline-color: var(--text); }
.theme-opts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.theme-opt { border: 2px solid var(--line); border-radius: var(--r); background: var(--panel-2); padding: 8px; cursor: pointer; text-align: center; font-size: 13px; color: var(--text); } .theme-opt.on { border-color: var(--sage); }
.theme-opt .pv { display: block; height: 38px; border-radius: 7px; margin-bottom: 6px; border: 1px solid #0003; }
.pv.light { background: linear-gradient(135deg, #f3f5f2 50%, #fff 50%); } .pv.dark { background: linear-gradient(135deg, #0f1514 50%, #1d2724 50%); } .pv.cyber { background: linear-gradient(135deg, #05080d 50%, #29ffb0 50%); } .pv.system { background: linear-gradient(135deg, #f3f5f2 50%, #0f1514 50%); }
@media (max-width: 480px) { .theme-opts { grid-template-columns: repeat(2, 1fr); } }

/* ================================================================= auth (sign-in look of v2.3: violet, pill buttons, soft card) */
.auth-wrap { --bg: #12111a; --panel: #1b1a26; --panel-2: #24233a; --line: #323050; --line-soft: #2a2942; --text: #f1eefb; --muted: #a6a2c4; --faint: #77739a;
  --sage: #9b8cff; --accent-ink: #14112b; --rose: #ff8aa1; --amber: #ffc27a; --focus: #c9c1ff; --ok: #62d09a; --glow: transparent; --shadow: 0 1px 2px #0006, 0 10px 30px #0005; color-scheme: dark;
  min-height: 100dvh; display: grid; place-items: center; padding: calc(20px + var(--sat)) 18px calc(20px + var(--sab)); background: var(--bg); color: var(--text); }
@media (prefers-color-scheme: light) { .auth-wrap { --bg: #f6f4ff; --panel: #ffffff; --panel-2: #efecfb; --line: #dcd8f2; --line-soft: #e8e5f6; --text: #231f3d; --muted: #5f5a85; --faint: #8f8bb0;
  --sage: #6a55e8; --accent-ink: #ffffff; --rose: #d9455f; --amber: #a8651a; --focus: #4d3bc4; --ok: #2c8a58; --shadow: 0 1px 2px #1a1a4010, 0 8px 24px #1a1a4018; color-scheme: light; } }
.auth-card { width: min(100%, 420px); background: var(--panel); border: 1px solid var(--line-soft); border-radius: 24px; padding: 28px 24px; display: grid; gap: 12px; box-shadow: var(--shadow), 0 30px 80px #0003; animation: rise .4s var(--ease) both; }
.auth-card h1 { font-size: 26px; } .auth-card p { margin: 0 0 4px; }
.auth-card .btn { border-radius: 999px; padding: 9px 18px; }
.auth-card .btn.small { padding: 5px 14px; }
.auth-card input[type=text], .auth-card input[type=password], .auth-card input[type=date] { border-radius: 12px; padding: 11px 14px; }
.auth-logo { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 17px; background: linear-gradient(135deg, var(--sage), color-mix(in srgb, var(--sage) 40%, var(--amber))); color: #0d1a17; font-size: 28px; margin-bottom: 4px; }
.auth-err { color: var(--rose); min-height: 18px; font-size: 13.5px; }
.pw-wrap { position: relative; } .pw-wrap input { padding-right: 78px; } .pw-wrap .eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font-size: 12.5px; min-height: 0; }
.consent { align-items: flex-start; line-height: 1.4; text-align: left; }

/* ================================================================= audit, admin */
.audit-list { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; max-height: 420px; overflow-y: auto; }
.audit-row { display: grid; grid-template-columns: 128px 84px minmax(0, 1fr) minmax(0, 1fr); gap: 10px; padding: 7px 12px; border-bottom: 1px solid var(--line-soft); font-size: 13px; align-items: baseline; }
.audit-row:last-child { border-bottom: 0; } .audit-row.bad { background: color-mix(in srgb, var(--rose) 12%, transparent); } .audit-row .mono { font-size: 12px; overflow-wrap: anywhere; }
.card .audit-row { grid-template-columns: 150px 1fr auto; }
@media (max-width: 700px) { .audit-row, .card .audit-row { grid-template-columns: 1fr 1fr; } .audit-row > :last-child { grid-column: 1 / -1; } .codes { grid-template-columns: 1fr; } }
.admin-grid { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr) 300px; align-items: start; } .admin-grid > * { min-width: 0; }
@media (max-width: 860px) { .admin-grid { grid-template-columns: minmax(0, 1fr); } .admin-side { position: static; } }
.admin-users { display: grid; gap: 12px; margin: 12px 0 18px; }
.ucard { background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--r-lg); padding: 14px 16px; } .ucard.off { opacity: .6; }
.uhead { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; flex-wrap: wrap; }
.admin-side { background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--r-lg); padding: 16px; position: sticky; top: 70px; } .admin-detail { margin-top: 8px; }
.admin-log { display: grid; gap: 10px; max-height: 60vh; overflow: auto; padding: 12px; background: var(--panel); border-radius: var(--r-lg); border: 1px solid var(--line-soft); }
.alog { padding: 8px 12px; border-radius: 12px; background: var(--panel-2); white-space: pre-wrap; overflow-wrap: anywhere; } .alog.user { background: color-mix(in srgb, var(--sage) 16%, var(--panel)); } .alog b { font-size: 13px; }
/* admin surface: the user's own theme, with a quiet "console" accent (no overlays, no fixed backgrounds) */
body[data-surface="admin"] h1 { font-family: var(--mono); font-size: 22px; font-weight: 650; color: var(--sage); letter-spacing: 0; }
body[data-surface="admin"] h1::before { content: "› "; opacity: .55; }
body[data-surface="admin"] h2 { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); margin-bottom: 4px; }
body[data-surface="admin"] .ucard { border-left: 3px solid color-mix(in srgb, var(--sage) 60%, var(--line)); }
body[data-surface="admin"] .ucard.off { border-left-color: var(--line); }
body[data-surface="admin"] .uhead b { font-family: var(--mono); font-weight: 600; }
.pulse-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); margin-right: 6px; animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 var(--ok); } 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

/* ================================================================= presets (new chat) */
.preset-bar { display: grid; gap: 10px; margin-bottom: 12px; }
.preset-list { display: grid; gap: 8px; }
.preset-card { display: flex; gap: 13px; align-items: center; text-align: left; width: 100%; padding: 12px 14px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--panel-2); cursor: pointer; color: var(--text); }
.preset-card:hover { border-color: var(--sage); }
.preset-card .pt { min-width: 0; } .preset-card b { display: block; font-size: 16px; } .preset-card .tag { color: var(--sage); font-size: 12.5px; }
.preset-card small { display: block; color: var(--muted); font-size: 13.5px; line-height: 1.38; margin-top: 2px; }
.sheet-back-link { margin: 0 0 8px -8px; }
.btn.icon.on { color: var(--sage); background: var(--panel-2); }
.reset-box { margin-top: 24px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.console-head .tab { border-left: 0; border-bottom: 2px solid transparent; padding: 11px 12px; background: none; } .console-head .tab.active { border-bottom-color: var(--sage); background: none; }

/* ---- v2.5.4: AI scenario assembly (sheet + editor box) */
.ai-box { display: flex; gap: 14px; align-items: center; justify-content: space-between; padding: 12px 14px; margin-bottom: 16px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel-2); }
.ai-box .muted { font-size: 13.5px; }
.assist-idea { width: 100%; min-height: 110px; resize: vertical; }
.assist-lead { margin-top: 0; }
.assist-opts { display: grid; gap: 12px; margin: 4px 0 12px; } .assist-opts .lbl { display: block; font-size: 13px; color: var(--muted); margin-bottom: 5px; }
.assist-parts { margin-bottom: 8px; }
.assist-actions { margin-top: 14px; gap: 8px; }
.assist-wait { display: flex; gap: 14px; align-items: center; padding: 28px 4px; }
.assist-spin { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--sage); animation: assist-spin .9s linear infinite; }
@keyframes assist-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .assist-spin { animation: none; } }
.assist-grid { display: grid; gap: 10px; margin: 8px 0 4px; }
.assist-sec { border: 1px solid var(--line); border-radius: var(--r); padding: 10px 14px; background: var(--panel-2); overflow-wrap: anywhere; }
.assist-sec .hd { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 4px; }
.assist-badge { font-size: 12px; padding: 1px 9px; border-radius: 99px; border: 1px solid var(--line); color: var(--muted); }
.assist-badge.ok { border-color: var(--sage); color: var(--text); } .assist-badge.warn { background: var(--amber); color: #1b1408; border-color: var(--amber); }
.assist-quote { margin-top: 4px; padding-left: 10px; border-left: 3px solid var(--line); color: var(--muted); font-style: italic; }
.assist-rel { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 14px; } .assist-rel label { display: flex; align-items: center; gap: 6px; font-size: 13px; } .assist-rel progress { flex: 1; min-width: 0; height: 8px; }
@media (min-width: 721px) { .assist-opts { grid-template-columns: 1fr 1fr; } .assist-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .ai-box { flex-direction: column; align-items: stretch; } .assist-rel { grid-template-columns: 1fr; } .assist-actions .btn { flex: 1 1 100%; } }
