/* ════════════════════════════════════════════════════════════════
   webmsg — styled after svmp-lqm: monochrome terminal, bracketed
   links, ascii box headers, dashed rules, hard drop shadows.
   ════════════════════════════════════════════════════════════════ */

@font-face {
    font-family: 'Source Code Pro';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: local('Source Code Pro'), url('/fonts/source-code-pro-latin-400-normal.woff2') format('woff2');
}
@font-face {
    font-family: 'Source Code Pro';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: local('Source Code Pro Bold'), url('/fonts/source-code-pro-latin-700-normal.woff2') format('woff2');
}

:root {
    --bg-color: #050505;
    --text-color: #d4d4d4;
    --prompt-color: #888888;
    --ok: #55ff55;
    --bad: #ff5555;
    --warn: #ffb000;
    --panel: rgba(5, 5, 5, 0.86);
    --mono: 'Source Code Pro', ui-monospace, 'DejaVu Sans Mono', Menlo, Consolas, monospace;
}

/* FX themes (from svmp-lqm) */
html.theme-amber     { --text-color: #ffb000; --prompt-color: #aa7700; }
html.theme-green     { --text-color: #55ff55; --prompt-color: #22aa22; }
html.theme-cyan      { --text-color: #55ffff; --prompt-color: #00aaaa; }
html.theme-red       { --text-color: #ff5555; --prompt-color: #aa2222; }
html.theme-blue      { --text-color: #7777ff; --prompt-color: #4444bb; }
html.theme-magenta   { --text-color: #ff55ff; --prompt-color: #aa22aa; }
html.theme-synthwave { --text-color: #ff00ff; --prompt-color: #00ffff; }
html.theme-sunset    { --text-color: #ffaa00; --prompt-color: #ff00aa; }
html.theme-monokai   { --text-color: #a6e22e; --prompt-color: #f92672; }
html.theme-dracula   { --text-color: #ff79c6; --prompt-color: #50fa7b; }
html.theme-gruvbox   { --text-color: #fabd2f; --prompt-color: #fe8019; }
html.theme-nord      { --text-color: #88c0d0; --prompt-color: #81a1c1; }
html.theme-neon      { --text-color: #00ffcc; --prompt-color: #ff00ff; }
html.theme-kawaii    { --bg-color: #1a0a13; --text-color: #ff99cc; --prompt-color: #ff4da6; --panel: rgba(26, 10, 19, 0.88); }

* { box-sizing: border-box; }

html {
    background-color: var(--bg-color);
    min-height: 100%;
}

body {
    background-color: transparent;
    color: var(--text-color);
    font-family: var(--mono);
    font-size: 15px;
    line-height: 1.6;
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    transition: color 0.3s ease;
    -webkit-font-smoothing: antialiased;
}

::selection { background: var(--text-color); color: var(--bg-color); }

[hidden] { display: none !important; }

pre { font-family: var(--mono); margin: 0; }

a {
    color: var(--text-color);
    text-decoration: underline;
    text-decoration-style: dashed;
    text-underline-offset: 4px;
    transition: all 0.2s ease;
    cursor: pointer;
    white-space: nowrap;
}
a:hover, a:focus-visible { text-decoration-style: solid; outline: none; }
a.plain { text-decoration: none; }
a.danger:hover, a.danger:focus-visible { color: var(--bad); }
a.disabled { color: var(--prompt-color); pointer-events: none; text-decoration: none; opacity: 0.6; }

.dim { color: var(--prompt-color); }
.ok { color: var(--ok); }
.bad { color: var(--bad); }
.warn { color: var(--warn); }

input[type="text"], input[type="password"], textarea {
    background: transparent;
    border: none;
    border-bottom: 1px dashed var(--prompt-color);
    color: var(--text-color);
    font-family: var(--mono);
    font-size: 1em;
    outline: none;
    width: 100%;
    border-radius: 0;
    padding: 2px 0;
}
input:focus, textarea:focus { border-bottom: 1px solid var(--text-color); }
input::placeholder, textarea::placeholder { color: var(--prompt-color); opacity: 0.7; }

/* ── Background FX ─────────────────────────────────────────────── */
#ascii-bg {
    position: fixed; inset: 0;
    z-index: -2; color: var(--prompt-color); opacity: 0.15;
    font-family: var(--mono);
    font-size: 14px; line-height: 14px; overflow: hidden;
    user-select: none; white-space: pre; pointer-events: none;
}

.star {
    position: fixed;
    background-color: var(--text-color);
    border-radius: 50%;
    z-index: -1;
    animation: twinkle linear infinite;
    pointer-events: none;
}
html.theme-kawaii .star { background-color: #ffb3d9; box-shadow: 0 0 5px #ffb3d9; }

@keyframes twinkle {
    0%   { opacity: 0.1; }
    50%  { opacity: 0.8; }
    100% { opacity: 0.1; }
}

body.crt-mode::after {
    content: " "; display: block; position: fixed; inset: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%),
                linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    background-size: 100% 3px, 3px 100%; z-index: 99999; pointer-events: none;
}
html.invert-mode { filter: invert(1); }

/* ── Shared box bits ───────────────────────────────────────────── */
.box-head {
    display: flex; align-items: baseline; gap: 0;
    color: var(--prompt-color); font-size: 0.9em;
    white-space: nowrap; overflow: hidden;
}
.box-head .fill {
    flex: 1; overflow: hidden; height: 1em;
    position: relative; margin-right: 6px;
}
.box-head .fill::before {
    content: '--------------------------------------------------------------------------------------------------------------------------------';
    position: absolute; left: 0; top: -0.3em; white-space: nowrap;
}
.box-head a { font-size: 1em; margin-right: 6px; }

.hint { font-size: 0.78em; color: var(--prompt-color); margin: 0.2em 0 0.8em; line-height: 1.5; }
.hint.indent { padding-left: 11ch; }
.form-error { color: var(--bad); font-size: 0.85em; min-height: 0; margin: 0.4em 0; }
.form-error:empty { display: none; }

.field-row { display: flex; align-items: center; gap: 10px; margin: 6px 0; flex-wrap: wrap; }
.field-row input { flex: 1; min-width: 120px; margin: 0; }
.field-row .lbl { color: var(--text-color); display: inline-block; min-width: 10ch; font-weight: 700; }

.opt { text-decoration: none; }

.menu-box {
    display: none; font-size: 0.9em; color: var(--prompt-color);
    margin-top: 0.8em; line-height: 1.6; text-align: left; position: relative;
}
.menu-box.open { display: block; }

.modal-close-x {
    position: absolute; top: 15px; right: 18px;
    color: var(--text-color); text-decoration: none;
    font-size: 0.9em; line-height: 1; z-index: 2;
}
.modal-close-x:hover { color: var(--bad); text-decoration: none; }
.menu-box .modal-close-x { top: 2px; right: 4px; }

.banner-warn {
    border: 1px dashed var(--warn); color: var(--warn);
    padding: 10px 14px; font-size: 0.85em; text-align: left;
}

/* ── Lobby ─────────────────────────────────────────────────────── */
#lobby {
    display: flex; justify-content: center; align-items: flex-start;
    padding: 6vh 20px 40px;
    min-height: 100vh; min-height: 100dvh;
}
.lobby-container { width: 100%; max-width: 680px; position: relative; z-index: 1; }

.logo {
    color: var(--text-color);
    font-size: 13px; line-height: 1.15;
    text-align: left; width: max-content; margin: 0 auto;
    user-select: none;
}
.tagline {
    text-align: center; color: var(--prompt-color);
    font-size: 0.85em; margin: 0.8em 0 2.2em;
}
.nick-row { max-width: 420px; margin: 0 auto; }
.nick-row label { font-size: 0.95em; }
#nick-hint { text-align: center; margin-bottom: 2em; }
#nick-hint.bad { color: var(--bad); }

.section { margin-bottom: 1.8em; }

.room-list { margin-top: 0.6em; font-size: 0.92em; min-height: 2em; }
.room-list .empty { color: var(--prompt-color); }
.room-row {
    display: flex; align-items: baseline; gap: 10px;
    padding: 2px 0;
}
.room-row .rname { color: var(--text-color); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 55%; }
.room-row .leader {
    flex: 1; overflow: hidden; white-space: nowrap; color: var(--prompt-color); opacity: 0.6;
    position: relative; height: 1em;
}
.room-row .leader::before {
    content: '. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .';
    position: absolute; left: 0; top: -0.35em;
}
.room-row .rcount { color: var(--prompt-color); white-space: nowrap; }
.room-row .rlock { white-space: nowrap; font-size: 0.9em; }
.room-row:hover .rname { text-decoration: underline dashed; text-underline-offset: 4px; }

.user-row {
    display: flex; align-items: baseline; gap: 10px;
    padding: 2px 0;
}
.user-row .uname { color: var(--text-color); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 55%; }
.user-row .leader {
    flex: 1; overflow: hidden; white-space: nowrap; color: var(--prompt-color); opacity: 0.6;
    position: relative; height: 1em;
}
.user-row .leader::before {
    content: '. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .';
    position: absolute; left: 0; top: -0.35em;
}
.user-row .ustatus { color: var(--prompt-color); white-space: nowrap; font-size: 0.9em; }
.user-row .you { color: var(--prompt-color); font-size: 0.85em; }
.dm-link { text-decoration: none; font-size: 0.9em; }
.dm-link:hover { text-decoration: underline dashed; }

.lobby-footer {
    display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; align-items: center;
    font-size: 0.85em; margin-top: 2.5em; color: var(--prompt-color);
}
.status .dot {
    display: inline-block; width: 7px; height: 7px; border-radius: 50%;
    background: var(--prompt-color); vertical-align: middle; margin-top: -2px;
}
.status.on .dot { background: var(--ok); box-shadow: 0 0 6px var(--ok); }
.status.off .dot { background: var(--bad); }

#create-box { border: 1px dashed var(--prompt-color); padding: 15px; background: var(--panel); }
#create-box form { color: var(--text-color); margin-top: 0.6em; }
#create-box .actions { margin: 0.8em 0 0; text-align: right; }
#join-form input { flex: 1; }

/* ── Chat ──────────────────────────────────────────────────────── */
#chat {
    height: 100vh; height: 100dvh;
    padding: 18px;
    display: flex; justify-content: center;
}
.chat-container {
    width: 100%; max-width: 1180px; height: 100%;
    display: flex; flex-direction: column;
    border: 1px dashed var(--prompt-color);
    background: var(--panel);
    position: relative;
    min-height: 0;
}

.chat-top {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 10px 16px;
    border-bottom: 1px dashed var(--prompt-color);
    flex-wrap: wrap;
}
.room-id { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.room-name { font-weight: 700; font-size: 1.05em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.room-meta { font-size: 0.78em; color: var(--prompt-color); white-space: nowrap; }
.chat-nav { display: flex; gap: 12px; flex-wrap: wrap; font-size: 0.9em; align-items: center; }

.lock-btn { text-decoration: none; display: inline-flex; align-items: center; }
.lock-btn:hover #lock-label { text-decoration: underline dashed; text-underline-offset: 4px; }
.lock-icon {
    width: 13px; height: 13px; margin: 0 5px 0 1px;
    fill: none; stroke: currentColor; stroke-width: 1.4;
}
.lock-icon .keyhole { fill: currentColor; stroke: none; }
.lock-icon .shackle { transition: transform 0.25s ease; }
.lock-btn.unlocked .shackle { transform: translate(2.8px, -1.2px) rotate(18deg); transform-origin: 11.5px 7px; }
.lock-btn.on { color: var(--ok); }
.lock-btn.on.unverified { color: var(--bad); }

/* lock dropdown */
.dropdown {
    position: absolute; top: 46px; right: 16px;
    width: min(440px, calc(100% - 32px));
    background: var(--bg-color);
    border: 1px solid var(--text-color);
    box-shadow: 4px 4px 0 var(--text-color);
    padding: 14px 16px; z-index: 50;
    margin: 0;
}
.dropdown pre { margin: 6px 0; overflow: hidden; }
.dropdown pre:first-of-type { margin-top: 0; }
.kv { display: flex; gap: 10px; font-size: 0.95em; }
.kv .k { min-width: 8ch; color: var(--prompt-color); }
.kv .v { color: var(--text-color); }
.lm-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 8px 0 4px; }
.lm-actions.col { flex-direction: column; gap: 4px; align-items: flex-start; }
.lm-actions:empty { display: none; }
#lm-listed { text-decoration: none; }

.chat-body { flex: 1; display: flex; min-height: 0; }

.log-wrap { flex: 1; position: relative; min-width: 0; display: flex; }
.log {
    flex: 1; overflow-y: auto; overflow-x: hidden;
    padding: 12px 16px 6px;
    font-size: 0.92em;
    scrollbar-width: thin;
    scrollbar-color: var(--prompt-color) transparent;
}
.log::-webkit-scrollbar, .userlist::-webkit-scrollbar { width: 6px; }
.log::-webkit-scrollbar-thumb, .userlist::-webkit-scrollbar-thumb { background: var(--prompt-color); border-radius: 4px; }

.line {
    display: grid;
    grid-template-columns: 6ch 16ch 1ch 1fr;
    column-gap: 1ch;
    padding: 1px 0;
    line-height: 1.55;
}
.line .ts { color: var(--prompt-color); opacity: 0.75; font-size: 0.92em; padding-top: 0.06em; user-select: none; }
.line .who {
    text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    color: var(--text-color);
}
.line .sep { color: var(--prompt-color); opacity: 0.6; user-select: none; }
.line .body { white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; min-width: 0; }
.line .body a { white-space: normal; overflow-wrap: anywhere; }

.line.self .who { font-weight: 700; }
.line.cont .who, .line.cont .ts { visibility: hidden; }
.line.cont:hover .ts { visibility: visible; }

.line.sys .who, .line.sys .body { color: var(--prompt-color); }
.line.sys.join .who { color: var(--ok); opacity: 0.8; }
.line.sys.part .who { color: var(--bad); opacity: 0.8; }
.line.sys.warn .body, .line.sys.warn .who { color: var(--warn); }
.line.sys.mode .body { color: var(--text-color); opacity: 0.85; }
.line.sys.err .body, .line.sys.err .who { color: var(--bad); }

.line.action .body { font-style: italic; }
.line.mention {
    background: linear-gradient(90deg, color-mix(in srgb, var(--text-color) 14%, transparent), transparent 70%);
    box-shadow: inset 2px 0 0 var(--text-color);
}
.line.locked .body { color: var(--prompt-color); font-style: italic; }
.line.locked .body a { font-style: normal; }
.line.pending { opacity: 0.5; }

.e2e-mark {
    display: inline-block; width: 10px; height: 10px; margin-right: 6px; vertical-align: -1px;
    fill: none; stroke: var(--ok); stroke-width: 1.6; opacity: 0.7;
}
.e2e-mark .keyhole { fill: var(--ok); stroke: none; }

.motd {
    color: var(--prompt-color); font-size: 0.85em; margin: 0 0 12px;
    border-bottom: 1px dashed var(--prompt-color); padding-bottom: 10px;
}
.motd pre { color: var(--text-color); white-space: pre-wrap; }

.jump-new {
    position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%);
    background: var(--bg-color); padding: 2px 10px;
    border: 1px solid var(--text-color); box-shadow: 2px 2px 0 var(--text-color);
    text-decoration: none; font-size: 0.85em;
}

/* user list */
.userlist {
    width: 230px; flex-shrink: 0;
    border-left: 1px dashed var(--prompt-color);
    padding: 12px 14px; overflow-y: auto; font-size: 0.9em;
}
.ul-head { color: var(--prompt-color); margin-bottom: 6px; overflow: hidden; }
#users { list-style: none; margin: 0; padding: 0; }
#users li {
    display: flex; align-items: baseline; gap: 4px;
    padding: 1px 0; white-space: nowrap;
}
#users .mode { width: 1ch; color: var(--prompt-color); flex-shrink: 0; }
#users .nick { overflow: hidden; text-overflow: ellipsis; }
#users .nick.ok { color: var(--ok); }
#users .nick.bad { color: var(--bad); }
#users .you { color: var(--prompt-color); font-size: 0.85em; }
#users .user-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
#users .dm-btn { font-size: 0.8em; text-decoration: none; color: var(--prompt-color); }
#users .dm-btn:hover { color: var(--text-color); text-decoration: underline dashed; }
#users .kick { font-size: 0.8em; text-decoration: none; color: var(--prompt-color); visibility: hidden; }
#users li:hover .kick, #users .kick:focus-visible { visibility: visible; }
#users .kick:hover { color: var(--bad); }
#users .typing-dot { color: var(--prompt-color); font-size: 0.8em; }
.ul-legend { font-size: 0.75em; color: var(--prompt-color); margin-top: 14px; border-top: 1px dashed var(--prompt-color); padding-top: 8px; }

.typing {
    min-height: 1.5em; padding: 0 16px; font-size: 0.78em; color: var(--prompt-color);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.typing .dots::after { content: ''; animation: dots 1.2s steps(4, end) infinite; }
@keyframes dots {
    0% { content: ''; } 25% { content: '.'; } 50% { content: '..'; } 75% { content: '...'; }
}

.composer {
    display: flex; align-items: flex-end; gap: 10px;
    padding: 10px 16px 12px;
    border-top: 1px dashed var(--prompt-color);
}
.composer .prompt { color: var(--text-color); font-weight: 700; line-height: 1.6; padding-bottom: 3px; }
.composer.locked .prompt { color: var(--prompt-color); }
.composer textarea {
    flex: 1; resize: none; max-height: 30vh; line-height: 1.6;
    overflow-y: auto; min-height: calc(1.6em + 6px);
    border-bottom-style: dashed;
}
.composer #file-btn { padding-bottom: 4px; color: var(--prompt-color); text-decoration: none; }
.composer #file-btn:hover { color: var(--text-color); text-decoration: underline dashed; }
.composer #send-btn { padding-bottom: 4px; }

.chat-container.drag-over { outline: 2px dashed var(--ok); outline-offset: -2px; }

/* ── File / Image displays ─────────────────────────────────────── */
.file-card {
    display: inline-flex; flex-direction: column; gap: 6px;
    padding: 6px 10px; border: 1px dashed var(--prompt-color);
    background: rgba(255, 255, 255, 0.03); max-width: 100%; margin-top: 4px;
}
.file-meta { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-size: 0.9em; }
.file-icon { color: var(--ok); font-weight: bold; }
.file-name { color: var(--text-color); word-break: break-all; }
.file-size { color: var(--prompt-color); font-size: 0.85em; }
.file-dl { font-size: 0.85em; text-decoration: none; color: var(--text-color); }
.file-dl:hover { text-decoration: underline dashed; }
.chat-img {
    max-width: min(450px, 100%); max-height: 400px;
    object-fit: contain; border: 1px solid var(--prompt-color);
    margin-top: 4px; display: block; background: #000;
    cursor: pointer; transition: opacity 0.2s;
}
.chat-img:hover { opacity: 0.9; }
.chat-video {
    max-width: min(480px, 100%); max-height: 400px;
    border: 1px solid var(--prompt-color);
    margin-top: 4px; display: block; background: #000;
    outline: none;
}
.media-unsupported {
    font-size: 0.85em; color: var(--prompt-color);
    margin-top: 4px; font-style: italic;
}

.composer-lock {
    display: flex; gap: 12px; align-items: center; justify-content: center; flex-wrap: wrap;
    padding: 12px 16px; border-top: 1px dashed var(--bad); color: var(--bad); font-size: 0.88em;
}
.composer-lock a { color: var(--text-color); }

/* ── Modals ────────────────────────────────────────────────────── */
.modal-backdrop {
    position: fixed; inset: 0; background: rgba(0, 0, 0, 0.55);
    z-index: 9990;
}
.overlay-modal {
    display: none; position: fixed; top: 50%; left: 50%;
    transform: translate(-50%, -50%); background: rgba(5, 5, 5, 0.98);
    border: 1px solid var(--prompt-color); padding: 30px;
    z-index: 10000; box-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
    max-width: 92vw; max-height: 90vh; overflow-y: auto;
    text-align: left;
}
html.theme-kawaii .overlay-modal { background: rgba(26, 10, 19, 0.98); }
.overlay-modal.open { display: flex; flex-direction: column; }
.overlay-modal pre { color: var(--text-color); }

.box-modal {
    padding: 20px; background: var(--bg-color);
    border: 1px solid var(--text-color);
    box-shadow: 4px 4px 0 var(--text-color);
    width: 400px;
}
.box-modal strong { font-size: 1.15em; padding-right: 40px; }
.box-modal p { margin: 12px 0 4px; }
.box-modal input { margin: 12px 0 0; }
.modal-actions { display: flex; gap: 15px; justify-content: flex-end; margin-top: 16px; }

/* fx grid */
.fx-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 15px; margin-top: 0.8em; font-size: 0.9em; }
.fx-col { display: flex; flex-direction: column; gap: 3px; color: var(--prompt-color); }
.fx-col strong { color: var(--text-color); margin-bottom: 2px; }
.fx-toggle { text-decoration: none; }
#fx-modal { min-width: min(520px, 92vw); }

/* ── Notifications (from svmp-lqm) ─────────────────────────────── */
#notification-container {
    position: fixed; z-index: 10010;
    display: flex; flex-direction: column; gap: 10px;
    pointer-events: none;
    max-width: min(380px, calc(100vw - 40px));
}
#notification-container.pos-tr { top: 20px; right: 20px; align-items: flex-end; }

.notification-item {
    background-color: var(--bg-color);
    color: var(--text-color);
    border: 1px solid var(--text-color);
    padding: 10px 15px;
    font-size: 0.85rem;
    box-shadow: 2px 2px 0 var(--text-color);
    opacity: 0;
    pointer-events: auto;
    cursor: pointer;
    transform: translateX(30px);
    animation: notify-slide-in-right 0.3s forwards ease-out;
}
.notification-item.err { border-color: var(--bad); box-shadow: 2px 2px 0 var(--bad); color: var(--bad); }
.notification-item.ok { border-color: var(--ok); box-shadow: 2px 2px 0 var(--ok); }
.notification-item.fade-out { animation: notify-slide-out-right 0.4s forwards ease-in; }

@keyframes notify-slide-in-right {
    0% { opacity: 0; transform: translateX(30px); }
    100% { opacity: 1; transform: translateX(0); }
}
@keyframes notify-slide-out-right {
    0% { opacity: 1; transform: translateX(0); }
    100% { opacity: 0; transform: translateX(30px); }
}

/* ── Responsive ────────────────────────────────────────────────── */
.only-mobile { display: none; }

@media (max-width: 820px) {
    #chat { padding: 0; }
    .chat-container { border: none; }
    .only-mobile { display: inline; }
    .userlist {
        position: absolute; right: 0; top: 0; bottom: 0; z-index: 20;
        background: var(--bg-color);
        border-left: 1px solid var(--text-color);
        box-shadow: -4px 0 0 var(--text-color);
        transform: translateX(110%); transition: transform 0.2s ease;
    }
    .chat-body { position: relative; }
    .userlist.open { transform: translateX(0); }
    .line { grid-template-columns: 5.5ch auto 1fr; }
    .line .sep { display: none; }
    .line .who { text-align: left; max-width: 16ch; }
    .line .who::after { content: ':'; color: var(--prompt-color); }
    .line.sys .who::after, .line.action .who::after { content: ''; }
}

@media (max-width: 560px) {
    body { font-size: 14px; }
    .logo { font-size: 8.5px; }
    .hide-xs { display: none; }
    .hint.indent { padding-left: 0; }
    .chat-top { padding: 8px 10px; }
    .log { padding: 10px; }
    .composer { padding: 8px 10px 10px; }
    .line { grid-template-columns: auto 1fr; }
    .line .ts { display: none; }
    .box-modal { width: 92vw; }
}

@media (prefers-reduced-motion: reduce) {
    .star { animation: none; opacity: 0.4; }
    * { transition: none !important; }
}
