:root{color-scheme:dark;--bg:#111214;--panel:#191b1e;--edge:#303238;--muted:#a5a8af;--text:#f5f5f6;--accent:#e63b44;--viewport-height:100dvh;--viewport-top:0px;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font-size:16px;line-height:1.45}button,input,textarea{font:inherit}button{cursor:pointer;touch-action:manipulation;min-height:44px;border:1px solid var(--edge);border-radius:10px;background:#24262b;color:var(--text);padding:10px 15px;font-weight:600}button:hover{background:#32353b}button:disabled{opacity:.45;cursor:default}button:focus-visible,input:focus-visible,textarea:focus-visible,summary:focus-visible{outline:2px solid #ff747b;outline-offset:3px}input,textarea{border:1px solid #40434b;border-radius:10px;background:#141517;color:var(--text);padding:11px 13px;min-width:0;font-size:16px}textarea{resize:none;width:100%;display:block;line-height:1.4}input::placeholder,textarea::placeholder{color:#91959e}h1,h2,p{margin:0}h1{font-size:29px;line-height:1.15;font-weight:650;letter-spacing:-.8px}h2{font-size:16px;margin:16px 0 10px}[hidden]{display:none!important}.app{height:var(--viewport-height);top:var(--viewport-top);position:fixed;left:0;right:0;max-width:960px;margin:auto;display:flex;flex-direction:column;padding:env(safe-area-inset-top) 32px env(safe-area-inset-bottom)}.header{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:96px;border-bottom:1px solid var(--edge);flex-shrink:0}.identity{display:flex;flex-direction:column;gap:7px}.brand{font-weight:800;letter-spacing:.5px;font-size:21px;display:flex;align-items:center;gap:12px}.brand i{width:1px;height:19px;background:#646770}.edition,.eyebrow{font-size:10px;letter-spacing:1.8px;font-weight:650;color:var(--muted)}.connection{font-size:12px;color:#c5c8ce;white-space:nowrap;display:flex;gap:7px;align-items:center}.connection:before{content:"";width:7px;height:7px;flex:0 0 7px;border-radius:50%;background:#d8a558}.connection.online:before{background:#70d6a1}.workspace{display:flex;flex-direction:column;flex:1;min-height:0;padding-top:23px;gap:12px}.heading{display:flex;align-items:center;justify-content:space-between;gap:10px}.eyebrow{color:#ee626a;margin-bottom:7px}.intro{color:var(--muted);font-size:14px;max-width:540px}.quiet{background:transparent;font-size:13px}.chat-area{display:flex;flex-direction:column;flex:1;min-height:0;position:relative}.toolbar{display:flex;align-items:center;justify-content:space-between;gap:10px;border-bottom:1px solid var(--edge);padding:10px 0;color:var(--muted);font-size:12px;flex-shrink:0}.filter{display:flex;align-items:center;gap:6px}.filter input{accent-color:var(--accent);width:18px;height:18px}.messages{flex:1;min-height:60px;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;scrollbar-width:thin;padding:15px 2px}.message{padding:14px 16px;border:1px solid var(--edge);border-radius:12px;background:var(--panel);margin-bottom:10px;overflow-wrap:anywhere}.message:last-child{margin-bottom:0}.message-meta{display:flex;justify-content:space-between;gap:12px;font-size:12px;color:var(--muted);margin-bottom:7px}.message-name{font-weight:650;color:#e1e2e5}.message-text{font-size:17px;line-height:1.5;white-space:pre-wrap}.message.answered{opacity:.65}.badge{font-size:11px;color:#87d7ac;display:block;margin-top:8px}.actions{display:flex;gap:7px;flex-wrap:wrap;margin-top:13px}.actions button{font-size:12px;padding:8px 10px}.pinned{border-bottom:1px solid var(--edge);max-height:35%;overflow:auto;padding:10px 0}.pinned .message{border-color:#a74950;background:#2a1c1f}.pin-label{color:#ff9197;font-size:11px;letter-spacing:1.3px;margin-bottom:7px;font-weight:700}.empty{min-height:140px;height:100%;display:flex;align-items:center;justify-content:center;text-align:center;color:var(--muted);font-size:15px;padding:24px}.composer{border-top:1px solid var(--edge);padding-top:13px;flex-shrink:0}.name-row{display:flex;align-items:center;gap:15px;margin-bottom:10px}.name-row label{font-size:13px;color:var(--muted);white-space:nowrap}.name-row input{flex:1;padding:8px 11px}.send-row{display:flex;justify-content:space-between;align-items:center;margin-top:10px}.primary{background:var(--accent);border-color:var(--accent);color:white;min-width:150px}.primary:hover{background:#f04a53}.primary span{margin-left:20px;font-size:19px}.hint{font-size:12px;color:var(--muted)}.hint.over{color:#ff9197}.policy{font-size:11px;margin-top:8px}.footer{display:flex;justify-content:space-between;gap:12px;padding:16px 0;font-size:9px;color:#9a9da5;letter-spacing:1px;flex-shrink:0}.notice{padding:10px 13px;border-radius:9px;border:1px solid #865057;background:#2c1e21;color:#ffd2d5;font-size:13px;flex-shrink:0}.login{display:grid;gap:13px;max-width:400px;margin:24px 0}.login label{font-size:14px}.login button{margin-top:4px}.login .hint{text-align:center}.jump{position:absolute;bottom:0;left:50%;transform:translate(-50%,-8px);background:#41454f;box-shadow:0 3px 20px #0008;font-size:12px;white-space:nowrap}.viewer .jump{bottom:235px}.host .message-text{font-size:23px;line-height:1.5}.host .message-name{font-size:16px}.host .actions button{font-size:14px;flex:1}.host .messages{padding-top:15px}.admin-tools{border-top:1px solid var(--edge);font-size:14px;max-height:35%;overflow:auto;padding:10px 0;flex-shrink:0}.admin-tools summary{cursor:pointer;min-height:38px;padding:6px 0}.danger{color:#ffadb1;border-color:#79454a}.ban-row{display:flex;justify-content:space-between;align-items:center;gap:10px;margin:8px 0;overflow-wrap:anywhere}.ban-row span{min-width:0}.ban-row small{display:block;color:var(--muted);font-size:10px}.ban-row button{flex-shrink:0}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(min-width:900px){.app{max-width:820px;padding:0 40px}.messages{padding-right:8px}.composer textarea{min-height:86px}}
@media(max-width:600px){.app{padding-left:18px;padding-right:18px}.header{min-height:78px}.brand{font-size:17px;gap:9px}.edition{font-size:8px;letter-spacing:1.25px}.connection{font-size:10px;gap:5px}.workspace{padding-top:17px;gap:10px}h1{font-size:25px}.intro{font-size:13px}.eyebrow{font-size:9px}.message{padding:12px 13px}.footer{padding:11px 0;font-size:8px}.host .message-text{font-size:22px}.toolbar{font-size:11px}.policy{font-size:10px}.primary{min-width:140px}}
@media(max-height:590px){.header{min-height:52px}.edition,.intro,.eyebrow,.footer,.policy{display:none}.workspace{padding-top:8px;gap:7px}h1{font-size:21px}.composer{padding-top:8px}.name-row{margin-bottom:7px}.name-row input{padding:5px 9px}.composer textarea{min-height:54px}.send-row{margin-top:6px}.toolbar{padding:6px 0}.pinned{max-height:25%}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}
.compact .header{min-height:52px}.compact .edition,.compact .intro,.compact .eyebrow,.compact .footer,.compact .policy{display:none}.compact .workspace{padding-top:8px;gap:7px}.compact h1{font-size:21px}.compact .composer{padding-top:8px}.compact .name-row{margin-bottom:7px}.compact .name-row input{padding:5px 9px}.compact .composer textarea{min-height:54px}.compact .send-row{margin-top:6px}.compact .toolbar{padding:6px 0}.compact .pinned{max-height:25%;min-height:0}.compact .messages{min-height:0}.compact .jump{bottom:190px}
.compact .empty{min-height:0;padding:6px;font-size:12px}

/* Host v2: every override is scoped to /host. */
.host .app{padding-left:max(18px,env(safe-area-inset-left));padding-right:max(18px,env(safe-area-inset-right));padding-bottom:max(10px,env(safe-area-inset-bottom))}
.host .header{display:grid;grid-template-columns:minmax(0,1fr) 44px;gap:4px 12px;min-height:76px;padding:10px 0;position:relative}
.host .identity{grid-column:1;grid-row:1;min-width:0}.host .edition{display:none}
.host .host-status{grid-column:1;grid-row:2;display:flex;align-items:center;gap:14px;flex-wrap:wrap;font-size:12px;color:var(--muted)}
.host #host-unanswered{color:var(--text);font-weight:600;font-variant-numeric:tabular-nums}
.host .host-menu{grid-column:2;grid-row:1 / span 2;align-self:center;position:relative;z-index:5}
.host .host-menu summary{display:flex;align-items:center;justify-content:center;list-style:none;width:44px;height:44px;border:1px solid var(--edge);border-radius:10px;background:var(--panel);cursor:pointer;touch-action:manipulation;letter-spacing:2px}
.host .host-menu summary::-webkit-details-marker{display:none}
.host .host-menu-panel{position:absolute;right:0;top:calc(100% + 8px);width:min(260px,calc(100vw - 36px));padding:8px;background:#202226;border:1px solid #44474f;border-radius:12px;box-shadow:0 10px 30px #0009}
.host .host-menu-panel .filter{min-height:48px;padding:8px;gap:10px;font-size:14px;cursor:pointer}
.host .host-menu-panel input{flex:0 0 22px;width:22px;height:22px;margin:0}
.host .host-menu-panel #logout{width:100%;min-height:44px;text-align:left;padding-left:8px}
.host .workspace{padding-top:12px;gap:8px}.host .toolbar{display:none}
.host .messages{padding:10px 2px 64px;min-height:0;overflow-anchor:none;scroll-padding:12px 0 64px;touch-action:pan-y}
.host .message{padding:12px 13px;margin-bottom:9px}.host .message-meta{align-items:baseline;margin-bottom:6px;gap:8px}
.host .message-name{font-size:15px;min-width:0}.host .message-meta time{flex-shrink:0;font-size:12px}
.host .message-text{font-size:23px;line-height:1.45}.host .actions{gap:8px;margin-top:10px;flex-wrap:wrap}
.host .actions button{min-height:48px;flex:1 1 100px;font-size:14px;padding:10px 8px;line-height:1.3}
.host .actions .host-answer{flex-grow:1.2;background:var(--accent);border-color:var(--accent);color:#fff}
.host .actions .host-answer:hover{background:#f04a53}.host .message.answered{opacity:.75}
.host .messages > .pinned{max-height:none;overflow:visible;padding:0;border:0}
.host .pinned .message{margin-bottom:9px}.host .pin-label{font-size:10px;margin-bottom:6px;letter-spacing:1px}
.host .empty{height:auto;min-height:120px;padding:24px 12px;font-size:15px}
.host .jump{bottom:10px;right:4px;left:auto;transform:none;max-width:calc(100% - 8px);min-height:44px;font-size:13px;background:#34373e;border-color:#5e636d}
.host .login{overflow-y:auto;min-height:0;flex-shrink:1;margin:16px 0;padding:4px}
@media(max-width:600px){
  .host .header{min-height:72px;padding:9px 0}.host .brand{font-size:17px;letter-spacing:.2px;gap:9px}
  .host .connection{font-size:11px}.host .host-status{font-size:11px;gap:12px}
  .host .heading,.host .intro,.host .footer{display:none}.host .workspace{padding-top:0;gap:8px}
  .host .message-text{font-size:22px}.host .notice{margin-top:8px}
}
@media(min-width:900px){.host .app{padding-left:max(32px,env(safe-area-inset-left));padding-right:max(32px,env(safe-area-inset-right))}}

/* Host v2.1: one main action, moderation in the top-layer dialog, stable Undo slot. */
.host .actions{flex-wrap:nowrap;gap:12px}.host .actions .host-answer{min-width:0;flex:1 1 auto}
.host .actions .host-more{flex:0 0 48px;width:48px;padding:8px;font-size:25px;background:transparent;color:var(--muted);border-color:var(--edge)}
.host #host-feedback{flex:0 0 76px;min-height:76px;padding-top:8px}
.host #host-undo{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:64px;padding:6px 10px;border:1px solid #49574f;border-radius:10px;background:#1b2822;color:#c6edda;font-size:12px;line-height:1.35}
.host #host-undo span{min-width:0;overflow-wrap:anywhere}.host #host-undo-button{flex-shrink:0;min-height:48px;padding:9px 10px;color:#e2ffed;background:#263b30;border-color:#577461;font-size:13px}
.host .jump{bottom:86px}
.host .host-dialog{position:fixed;width:min(380px,calc(100vw - 32px));max-height:calc(var(--viewport-height) - 40px);overflow:auto;margin:auto;padding:20px;border:1px solid #484b54;border-radius:16px;background:#1b1d21;color:var(--text);box-shadow:0 20px 80px #0009;overflow-wrap:anywhere}
.host .host-dialog::backdrop{background:#000a}.host .host-dialog h2{font-size:19px;line-height:1.35;margin:0 0 12px}
.host .host-dialog .hint{margin-bottom:12px}.host .host-dialog-actions{display:grid;gap:10px}.host .host-dialog-actions button{min-height:48px;text-align:left;font-size:15px}
