/* B9-CHAT: BibVid / DivineTok chat pages (server-rendered; the tok chat engine) */
:root{color-scheme:dark;--line:#ffffff26;--panel:#ffffff0a;--accent:#e9c977}
.b-divinetok{--accent:#b9a2ff}
*{box-sizing:border-box}
body.chat-body{margin:0;min-height:100vh;background:#0b0b0e;color:#f1ebdf;font:16px/1.5 system-ui,-apple-system,"Segoe UI",sans-serif}
body.b-divinetok{background:#0d0a1a}
a{color:var(--accent)}
.chat-top{display:flex;justify-content:space-between;gap:10px;padding:calc(10px + env(safe-area-inset-top)) 16px 10px;border-bottom:1px solid var(--line)}
.chat-home{display:inline-flex;align-items:center;min-height:44px;padding:0 6px;text-decoration:none;font-weight:700}
.chat-main{max-width:800px;margin:0 auto;padding:12px 16px 24px}
.page-h1{font-size:28px;margin:10px 0 4px}.page-lead{margin:0 0 8px;opacity:.9}
.small{font-size:14px}.muted{opacity:.75}
.chip{display:inline-flex;align-items:center;min-height:44px;padding:0 16px;border-radius:999px;border:1px solid var(--line);color:inherit;text-decoration:none}
.chip.on{background:var(--accent);color:#16120b;border-color:var(--accent)}
.card{padding:14px;border-radius:16px;border:1px solid var(--line);background:var(--panel)}
.btn{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:0 18px;border-radius:999px;border:0;background:var(--accent);color:#16120b;font:inherit;font-weight:700;cursor:pointer}
.btn.ghost{background:transparent;color:inherit;border:1px solid var(--line)}.btn.sm{min-height:44px}
.linkbtn{background:none;border:0;color:inherit;opacity:.75;cursor:pointer;min-height:32px;padding:0 4px;font:inherit}
.stack>*+*{margin-top:8px}
[hidden]{display:none!important}
.chat-foot{display:flex;flex-wrap:wrap;justify-content:center;gap:4px 14px;padding:16px 16px calc(16px + env(safe-area-inset-bottom));border-top:1px solid var(--line);font-size:14px}
.chat-foot a{display:inline-flex;align-items:center;min-height:44px;color:inherit;opacity:.85}
/* the chat box (same as the tok sites) */
.chat-page .rooms{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0}
.chat{display:flex;flex-direction:column;gap:10px;max-width:760px;margin:12px 0 30px;padding:14px;border-radius:18px;border:1px solid var(--line);background:var(--panel)}
.chat-h{display:flex;justify-content:space-between;align-items:baseline;gap:10px}
.chat-log{min-height:260px;max-height:55vh;overflow:auto;display:flex;flex-direction:column;gap:6px;padding:6px 2px}
.chat .msg{padding:8px 10px;border-radius:12px;background:#ffffff0d;line-height:1.45;word-wrap:break-word;display:flex;gap:8px}
.chat .msg .av{flex:none;width:28px;height:28px;border-radius:50%;display:grid;place-items:center;background:#ffffff1a;font-weight:700}
.chat .msg.sys{background:transparent;opacity:.8;font-size:14px}
.chat .who{font-weight:700;font-size:14px}
.chat-f{display:flex;gap:8px}.chat-f input{flex:1;min-width:0;min-height:44px;border-radius:999px;padding:0 14px;border:1px solid var(--line);background:transparent;color:inherit;font:inherit}
.chat .sr,.chat .hp{position:absolute;left:-9999px}
.chat .signin .chk{display:flex;gap:8px;align-items:flex-start;min-height:44px}.chat .signin .chk input{width:20px;height:20px;margin-top:2px;flex:none}
.badge-v{font-size:.72em;padding:1px 6px;border-radius:999px;border:1px solid currentColor;opacity:.8;margin-left:4px}
.chat .signin form{display:flex;flex-direction:column;gap:8px}.chat .signin input[name=nick],.chat .signin input[type=email]{min-height:44px;border-radius:12px;padding:0 12px;border:1px solid var(--line);background:transparent;color:inherit;font:inherit}
.chat-rules ul{margin:6px 0 0 18px;font-size:14px}.modbar{display:flex;flex-wrap:wrap;gap:6px}
/* B9-SPONSOR (same as the tok sites) */
.sponsor-page{max-width:640px}.sp-chips{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}.sp-chips .chip[aria-pressed=true]{background:var(--accent);color:#16120b}
.sp-custom{display:flex;flex-direction:column;gap:6px;margin:8px 0}.sp-custom input{min-height:44px;max-width:220px;border-radius:12px;padding:0 12px;border:1px solid var(--line);background:transparent;color:inherit;font:inherit}
.sp-month{display:flex;gap:8px;align-items:center;min-height:44px}.sp-disc{margin:14px 0;padding:12px 14px;border-radius:14px;border:1px solid var(--line);font-size:14px}.sp-disc p{margin:2px 0}#checkout{margin-top:16px}
