/* artificial.garden early access: the warm honey-amber of the garden's control panel (web/ui/panel.css). */
@font-face {
  font-family: 'AG Fraunces';
  src: url('/static/fonts/fraunces-latin-600-normal.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}

:root {
  --bg: #24170d;
  --panel: rgba(40, 26, 16, 0.86);
  --panel-solid: #2c1d11;
  --bg-2: rgba(70, 46, 26, 0.62);
  --bg-3: rgba(96, 64, 34, 0.55);
  --line: rgba(246, 200, 120, 0.16);
  --line-2: rgba(246, 200, 120, 0.3);
  --ink: #f8ecd6;
  --ink-2: #e2cba6;
  --muted: #b39a76;
  --amber: #f4b942;
  --honey: #e8952f;
  --moss: #9cc06f;
  --lilac: #c9b1ef;
  --rose: #ef9a86;
  --sky: #9fcbe0;
  --head: 'AG Fraunces', 'Cooper Black', Georgia, 'DejaVu Serif', serif;
  --body: 'Nunito', 'Segoe UI', system-ui, -apple-system, 'Noto Sans', sans-serif;
  --radius: 18px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh; color: var(--ink); font: 15px/1.5 var(--body);
  background: var(--bg);
}
a { color: var(--amber); text-decoration-color: rgba(244, 185, 66, .4); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--amber); }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; border-radius: 8px; }
h1, h2, h3 { font-family: var(--head); font-weight: 600; line-height: 1.15; margin: 0; }
img, video { max-width: 100%; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* the garden behind everything, softly out of focus, like looking past the panel */
.backdrop { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: var(--bg); }
.backdrop img { width: 100%; height: 100%; object-fit: cover; filter: blur(14px) saturate(1.1) brightness(.5); transform: scale(1.08); }
.backdrop::after { content: ''; position: absolute; inset: 0;
  background: radial-gradient(120% 80% at 20% 0%, rgba(244, 185, 66, .14), transparent 60%),
              linear-gradient(180deg, rgba(36, 23, 13, .35), rgba(36, 23, 13, .8)); }

/* panels and cards (same recipe as .ag-panel / .ag-card) */
.panel {
  background:
    radial-gradient(120% 60% at 0% 0%, rgba(244, 185, 66, 0.16), transparent 60%),
    radial-gradient(90% 50% at 100% 100%, rgba(201, 177, 239, 0.08), transparent 60%),
    var(--panel);
  border: 1px solid var(--line-2); border-radius: var(--radius);
  box-shadow: 0 18px 50px rgba(20, 10, 2, 0.45), inset 0 1px 0 rgba(255, 230, 180, 0.12);
  backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2);
}
.card { padding: 14px 16px; border-radius: 14px; background: linear-gradient(180deg, rgba(110, 72, 36, 0.42), rgba(70, 46, 26, 0.34)); border: 1px solid var(--line-2); }
.card + .card { margin-top: 12px; }
.kicker { font-size: 11px; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); }
.brand { font: 600 22px/1 var(--head); color: var(--amber); letter-spacing: .01em; white-space: nowrap; text-decoration: none; }
.brand span { color: var(--ink-2); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; padding: 2px 9px; border-radius: 99px; background: rgba(20, 12, 6, .35); border: 1px solid var(--line); color: var(--ink-2); white-space: nowrap; }
.chip.warm { color: #3a2208; background: var(--amber); border-color: transparent; font-weight: 700; }
.chip.moss { color: #1e2a10; background: var(--moss); border-color: transparent; font-weight: 700; }
.chip.rose { color: #3a130b; background: var(--rose); border-color: transparent; font-weight: 700; }
.chip.lilac { color: #24163d; background: var(--lilac); border-color: transparent; font-weight: 700; }
.chip.sky { color: #10232c; background: var(--sky); border-color: transparent; font-weight: 700; }
.dot { width: 7px; height: 7px; border-radius: 9px; background: currentColor; display: inline-block; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; font: 700 14px/1 var(--body); padding: 11px 16px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--ink); cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--bg-3); }
.btn.honey { background: linear-gradient(180deg, #f6c35a, #e39a33); color: #3a2208; border-color: transparent; box-shadow: 0 1px 0 rgba(255,255,255,.35) inset, 0 3px 10px rgba(0,0,0,.25); }
.btn.honey:hover { background: linear-gradient(180deg, #f8cc6b, #e9a43d); }
.btn.small { padding: 6px 10px; font-size: 12.5px; border-radius: 10px; font-weight: 600; }
.btn.ghost { background: none; }
.btn.danger { border-color: rgba(239, 154, 134, .45); color: var(--rose); }
.btn.danger:hover { background: rgba(239, 154, 134, .12); }
.btn[disabled] { opacity: .5; cursor: default; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--amber); text-decoration: underline; text-decoration-color: rgba(244,185,66,.4); text-underline-offset: 3px; cursor: pointer; }

/* forms */
label { display: block; font-size: 13px; color: var(--ink-2); margin: 12px 0 5px; }
label .muted { font-size: 12px; }
input[type=text], input[type=password], input[type=number], input[type=search], select, textarea {
  width: 100%; font: 15px/1.4 var(--body); color: var(--ink); background: rgba(20, 12, 6, 0.45); border: 1px solid var(--line-2);
  border-radius: 12px; padding: 10px 12px; }
textarea { min-height: 260px; resize: vertical; font-family: ui-monospace, 'DejaVu Sans Mono', monospace; font-size: 13.5px; }
input::placeholder, textarea::placeholder { color: rgba(226, 203, 166, .45); }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(244, 185, 66, .6); outline-offset: 0; border-color: transparent; }
input[type=checkbox] { accent-color: var(--amber); width: 16px; height: 16px; vertical-align: -3px; }
.check { display: flex; gap: 8px; align-items: center; color: var(--ink-2); margin: 10px 0; font-size: 14px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row > .grow { flex: 1; min-width: 160px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; align-items: center; }
.error { margin: 12px 0 0; padding: 9px 12px; border-radius: 12px; background: rgba(239, 154, 134, .14); border: 1px solid rgba(239, 154, 134, .4); color: #ffd9cf; font-size: 14px; }
.ok { margin: 0 0 12px; padding: 9px 12px; border-radius: 12px; background: rgba(156, 192, 111, .14); border: 1px solid rgba(156, 192, 111, .4); color: #e2f2cf; font-size: 14px; }
form.inline { display: inline; }

/* ---------------------------------------------------------------- front page */
.front { min-height: 100vh; min-height: 100dvh; position: relative; display: flex; align-items: flex-end; padding: 28px; }
.front-pic { position: fixed; inset: 0; z-index: -1; }
.front-pic img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; display: block; }
.front-pic::after { content: ''; position: absolute; inset: 0;
  background: radial-gradient(70% 70% at 0% 100%, rgba(30, 18, 8, .75), transparent 70%),
              linear-gradient(180deg, rgba(30, 18, 8, .15), transparent 30%, transparent 55%, rgba(30, 18, 8, .5)); }
.hello { width: min(468px, 100%); padding: 22px 24px 20px; }
.hello h1 { font-size: 38px; color: var(--amber); letter-spacing: .005em; }
.hello h1 span { color: var(--ink-2); }
.hello .line { font-size: 17px; line-height: 1.45; color: var(--ink); margin: 12px 0 0; }
.hello .sub { color: var(--ink-2); font-size: 14px; margin: 8px 0 0; }
.hello .actions { margin-top: 18px; }
.hello .chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.bee { width: 26px; height: 26px; flex: none; }
.front-foot { position: fixed; right: 18px; bottom: 14px; font-size: 12px; color: rgba(248, 236, 214, .7); text-shadow: 0 1px 3px rgba(0,0,0,.6); }

/* ---------------------------------------------------------------- small centred pages (sign in, join, messages) */
.narrow { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.narrow .panel { width: min(430px, 100%); padding: 22px 22px 20px; }
.narrow h1 { font-size: 26px; margin: 14px 0 4px; }
.narrow p { color: var(--ink-2); margin: 6px 0 0; }
.narrow .top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.narrow .foot { margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.code-show { font: 600 26px/1.2 var(--head); color: var(--amber); letter-spacing: .03em; padding: 12px 14px; border-radius: 12px; background: rgba(20, 12, 6, .45); border: 1px dashed var(--line-2); user-select: all; overflow-wrap: anywhere; }

/* ---------------------------------------------------------------- members + admin layout */
.shell { width: min(980px, 100%); margin: 0 auto; padding: 18px 16px 40px; }
.top-bar { display: flex; align-items: center; gap: 12px; padding: 12px 14px 12px 16px; }
.top-bar .brand { flex: 1; font-size: 20px; }
.who { display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: 13.5px; min-width: 0; }
.who b { color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 140px; }
.tabs { display: flex; gap: 2px; margin: 12px 0 14px; padding: 4px; border-radius: 14px; background: rgba(20, 12, 6, 0.45); border: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { flex: 1; text-align: center; text-decoration: none; padding: 8px 12px; border-radius: 10px; font-size: 14px; color: var(--ink-2); white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; justify-content: center; }
.tabs a:hover { background: rgba(96, 64, 34, .35); }
.tabs a[aria-current="page"] { background: var(--bg-3); color: var(--ink); font-weight: 700; box-shadow: inset 0 0 0 1px var(--line-2); }
.tabs svg { width: 15px; height: 15px; flex: none; }
.tabs .short { display: none; }
.main { padding: 18px; }
.h2 { font: 600 21px/1.2 var(--head); margin: 0 0 4px; }
.h3 { font: 600 16px/1.2 var(--head); margin: 22px 2px 8px; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.h3:first-child { margin-top: 0; }
.h3 small { font: 12.5px var(--body); color: var(--muted); }
.lede { color: var(--ink-2); margin: 0 0 14px; }

/* progress */
.phases { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.phase { border: 1px solid var(--line); border-radius: 13px; padding: 9px 11px; background: rgba(70, 46, 26, 0.35); display: grid; grid-template-columns: 34px 1fr; gap: 2px 9px; align-items: start; }
.phase .n { grid-row: span 2; width: 34px; height: 34px; border-radius: 10px; background: rgba(20,12,6,.4); display: grid; place-items: center; font: 600 14px var(--head); color: var(--amber); }
.phase .what { font-size: 13px; color: var(--ink); line-height: 1.35; }
.phase .st { font-size: 11.5px; color: var(--muted); }
.phase.in-progress { border-color: rgba(244, 185, 66, .5); background: linear-gradient(90deg, rgba(244,185,66,.14), rgba(70,46,26,.35)); }
.phase.in-progress .st { color: var(--amber); font-weight: 700; }
.phase.done .st { color: var(--moss); font-weight: 700; }
.phase.done .n { color: var(--moss); }
.entry { padding: 16px 18px; }
.entry + .entry { margin-top: 12px; }
.entry header { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.entry h3 { font-size: 20px; }
.entry .when { font-size: 12.5px; color: var(--muted); }
.prose { color: var(--ink); font-size: 15px; line-height: 1.6; overflow-wrap: anywhere; }
.prose p { margin: 10px 0; }
.prose h1, .prose h2, .prose h3 { font-size: 17px; margin: 16px 0 6px; }
.prose img, .prose video { display: block; border-radius: 12px; border: 1px solid var(--line-2); margin: 12px 0; max-height: 560px; width: auto; }
.prose code { background: rgba(20,12,6,.45); padding: 1px 5px; border-radius: 6px; font-size: 13.5px; }
.prose pre { background: rgba(20,12,6,.45); padding: 10px 12px; border-radius: 10px; overflow-x: auto; }
.prose blockquote { margin: 10px 0; padding: 4px 12px; border-left: 3px solid var(--line-2); color: var(--ink-2); }
.prose ul, .prose ol { padding-left: 22px; }
.prose table { border-collapse: collapse; font-size: 14px; }
.prose td, .prose th { border: 1px solid var(--line); padding: 4px 8px; }
.empty { color: var(--muted); padding: 18px 4px; text-align: center; }
.empty .bee { width: 40px; height: 40px; display: block; margin: 0 auto 8px; opacity: .85; }

/* garden */
.garden-frame { position: relative; border-radius: 16px; overflow: hidden; border: 1px solid var(--line-2); aspect-ratio: 16 / 9; background: #1d140b; }
.garden-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.garden-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.garden-frame .over { position: absolute; inset: 0; display: grid; place-items: center; background: radial-gradient(60% 60% at 50% 50%, rgba(30,18,8,.25), rgba(30,18,8,.55)); }
.garden-frame .over .btn { font-size: 15px; padding: 13px 20px; }

/* ---------------------------------------------------------------- chat */
.chat { display: flex; flex-direction: column; height: calc(100vh - 170px); height: calc(100dvh - 170px); min-height: 420px; padding: 0; overflow: hidden; }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.chat-head h2 { font-size: 17px; flex: 1; }
.chat-head .chip.narrator { color: #3a2208; background: linear-gradient(180deg, #f6c35a, #e39a33); border: 0; font-weight: 700; max-width: 100%; }
.chat-head .chip.narrator .dot { animation: breathe 2.4s ease-in-out infinite; }
.chat-head .chip.narrator .av:not(:empty) + .dot { display: none; }
.chat-head .chip.narrator #narrator-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.chip .ai, .badge-ai { font-size: 10px; padding: 0 5px; border-radius: 99px; background: rgba(58, 34, 8, .85); color: var(--amber); font-weight: 700; letter-spacing: .03em; }
.badge-ai { background: var(--lilac); color: #24163d; }
.msg .av { margin-right: -2px; }
@keyframes breathe { 50% { opacity: .35; } }
.chat-banner { margin: 10px 14px 0; padding: 8px 12px; border-radius: 12px; background: rgba(239, 154, 134, .14); border: 1px solid rgba(239, 154, 134, .4); color: #ffd9cf; font-size: 13.5px; }
.chat-banner[hidden] { display: none; }
.msgs { flex: 1; overflow-y: auto; padding: 10px 12px; list-style: none; margin: 0; scrollbar-width: thin; scrollbar-color: rgba(244,185,66,.35) transparent; }
.msg { display: grid; grid-template-columns: 1fr auto; gap: 0 6px; padding: 6px 8px; border-radius: 12px; margin: 0 0 3px; }
.msg:hover { background: rgba(96, 64, 34, .22); }
.msg .meta { font-size: 12px; color: var(--muted); display: flex; gap: 7px; align-items: baseline; min-width: 0; }
.msg .nick { font-weight: 700; color: var(--ink-2); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg .text { grid-column: 1; font-size: 14.5px; color: var(--ink); overflow-wrap: anywhere; white-space: pre-wrap; }
.msg.mine .nick { color: var(--amber); }
.msg.staff .nick::after { content: 'skizy'; display: none; }
.msg .badge { font-size: 10.5px; padding: 0 6px; border-radius: 99px; background: var(--lilac); color: #24163d; font-weight: 700; }
.msg.bot { background: linear-gradient(90deg, rgba(244,185,66,.13), rgba(70,46,26,.2)); border: 1px solid rgba(244,185,66,.25); }
.msg.bot .nick { color: var(--amber); }
.msg.caption { background: none; border: 0; text-align: center; grid-template-columns: 1fr; }
.msg.caption .meta { display: none; }
.msg.caption .text { font: italic 600 15px/1.4 var(--head); color: var(--amber); }
.msg.caption .by { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.msg.gone { grid-template-columns: 1fr; }
.msg.gone .text { font-size: 12.5px; color: var(--muted); font-style: italic; }
.msg .more { grid-row: 1 / 3; grid-column: 2; align-self: start; opacity: 0; width: 28px; height: 28px; border-radius: 9px; border: 1px solid transparent; background: none; color: var(--ink-2); cursor: pointer; display: grid; place-items: center; padding: 0; }
.msg:hover .more, .msg .more:focus-visible, .msg .more[aria-expanded="true"] { opacity: 1; border-color: var(--line); background: var(--bg-2); }
@media (hover: none) { .msg .more { opacity: .7; } }
.msg .more svg { width: 15px; height: 15px; }
.menu { grid-column: 1 / 3; display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 2px; }
.menu[hidden] { display: none; }
.day { text-align: center; font-size: 11.5px; color: var(--muted); margin: 10px 0 6px; }
.composer { display: flex; gap: 8px; padding: 10px 12px 12px; border-top: 1px solid var(--line); align-items: flex-end; }
.composer textarea { min-height: 44px; height: 44px; max-height: 120px; resize: none; font: 15px/1.4 var(--body); padding: 11px 12px; }
.composer .btn { height: 44px; }
.chat-note { padding: 0 14px 10px; font-size: 12.5px; color: var(--muted); min-height: 0; }
.chat-note.err { color: #ffcabd; }
.chat-note:empty { display: none; }
.conn { font-size: 11.5px; color: var(--muted); }

/* ---------------------------------------------------------------- admin */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 14px; }
.stat { border: 1px solid var(--line); border-radius: 12px; padding: 9px 11px; background: rgba(70, 46, 26, 0.3); min-width: 0; }
.stat small { display: block; font-size: 11.5px; color: var(--muted); }
.stat b { font: 600 22px/1.2 var(--head); }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.switch:last-child { border-bottom: 0; }
.switch b { display: block; font-size: 14.5px; }
.switch small { color: var(--muted); font-size: 12.5px; }
.seg { display: inline-flex; padding: 3px; border-radius: 12px; background: rgba(20, 12, 6, 0.4); border: 1px solid var(--line); flex: none; }
.seg button { border: 0; background: none; padding: 6px 12px; border-radius: 9px; font: 13px var(--body); color: var(--ink-2); cursor: pointer; }
.seg button[aria-pressed="true"] { background: linear-gradient(180deg, #f6c35a, #e39a33); color: #3a2208; font-weight: 700; box-shadow: 0 1px 0 rgba(255,255,255,.35) inset, 0 2px 6px rgba(0,0,0,.25); }
.seg button.off[aria-pressed="true"] { background: linear-gradient(180deg, #f2ae9c, #d97f69); color: #3a130b; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-weight: 600; color: var(--muted); font-size: 12px; padding: 6px 8px; border-bottom: 1px solid var(--line-2); }
.table td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
.table tr:last-child td { border-bottom: 0; }
.table .acts { display: flex; gap: 5px; flex-wrap: wrap; }
.scroll-x { overflow-x: auto; }
.words { display: flex; flex-wrap: wrap; gap: 6px; }
.word { display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px 3px 10px; border-radius: 99px; background: rgba(20,12,6,.4); border: 1px solid var(--line); font-size: 13px; }
.word.whole { border-style: dashed; }
.word button { border: 0; background: none; color: var(--muted); cursor: pointer; width: 20px; height: 20px; border-radius: 99px; padding: 0; font-size: 14px; line-height: 1; }
.word button:hover { background: rgba(239,154,134,.2); color: var(--rose); }
.spoil { filter: blur(4px); transition: filter .2s; }
.spoil:hover, .spoil:focus-within, .reveal .spoil { filter: none; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.media-grid figure { margin: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: rgba(20,12,6,.35); }
.media-grid img, .media-grid video { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
.media-grid figcaption { font: 11px ui-monospace, monospace; padding: 5px 7px; color: var(--ink-2); overflow-wrap: anywhere; user-select: all; }
.logline { font-size: 13px; padding: 7px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; }
.logline:last-child { border-bottom: 0; }
.logline .who { font-size: 13px; }
.logline .snip { grid-column: 1; color: var(--muted); font-size: 12.5px; overflow-wrap: anywhere; }
.actor-narrator { color: var(--amber); font-weight: 700; }
.actor-auto { color: var(--sky); font-weight: 700; }
.actor-admin { color: var(--lilac); font-weight: 700; }

/* ---------------------------------------------------------------- phones */
@media (max-width: 720px) {
  .front { padding: 0; align-items: flex-end; }
  .front-pic img { object-position: 38% 50%; }
  .front-pic { bottom: 34vh; }
  .front-pic::after { background: linear-gradient(180deg, transparent 55%, var(--bg) 100%); }
  .hello { width: 100%; border-radius: 22px 22px 0 0; border-bottom: 0; padding: 22px 18px 26px; }
  .hello h1 { font-size: 32px; }
  .hello .actions .btn { flex: 1; }
  .front-foot { display: none; }
  .shell { padding: 10px 10px 24px; }
  .top-bar { padding: 10px 12px; }
  .top-bar .brand { font-size: 18px; }
  .who .nickwrap { display: none; }
  .tabs a { padding: 8px 9px; font-size: 13.5px; }
  .tabs a .long { display: none; }
  .tabs a .short { display: inline; }
  .admin-tabs a { padding: 8px 5px; font-size: 13px; }
  .main { padding: 14px; }
  .entry { padding: 14px; }
  .chat { height: calc(100dvh - 150px); min-height: 380px; border-radius: 16px; }
  .grid2 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .table.cards thead { display: none; }
  .table.cards tr { display: block; border-bottom: 1px solid var(--line-2); padding: 6px 0; }
  .table.cards td { display: block; border: 0; padding: 3px 4px; }
}
.gap { height: 12px; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 0; font-size: 14px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.small-code { font: 13px ui-monospace, 'DejaVu Sans Mono', monospace; letter-spacing: 0; color: var(--ink-2); display: block; padding: 8px 10px; }
.switch select { width: auto; min-width: 140px; }
.logline .acts { display: flex; gap: 5px; flex-wrap: wrap; justify-content: flex-end; }
