:root {
  --rail: #1e1f22;
  --sidebar: #2b2d31;
  --panel: #232428;
  --chat: #313338;
  --input: #383a40;
  --hover: #35373c;
  --active: #404249;
  --msg-hover: #2e3035;
  --float: #111214;
  --line: rgba(255,255,255,.06);
  --text: #dbdee1;
  --muted: #949ba4;
  --faint: #80848e;
  --header: #f2f3f5;
  --accent: #5865f2;
  --green: #23a55a;
  --red: #f23f43;
  --yellow: #f0b232;
  --link: #00a8fc;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--chat);
  color: var(--text);
  font: 16px/1.375 "gg sans", "Noto Sans", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  display: flex;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

/* Thin dark scrollbars */
.scroller { overflow-y: auto; scrollbar-width: thin; scrollbar-color: #1a1b1e transparent; }
.scroller::-webkit-scrollbar { width: 8px; }
.scroller::-webkit-scrollbar-thumb { background: #1a1b1e; border-radius: 4px; border: 2px solid transparent; background-clip: padding-box; }
.messages.scroller::-webkit-scrollbar { width: 14px; }
.messages.scroller::-webkit-scrollbar-thumb { border-width: 3px; border-radius: 8px; }
.messages.scroller::-webkit-scrollbar-track { background: #2b2d31; border: 3px solid var(--chat); border-radius: 8px; }

/* ---- Server rail ---- */
.rail { width: 72px; background: var(--rail); padding: 12px 0; display: flex; flex-direction: column; align-items: center; gap: 8px; flex-shrink: 0; }
.rail-item { position: relative; width: 100%; display: flex; justify-content: center; }
.rail-item .pill { position: absolute; left: 0; top: 50%; width: 4px; height: 8px; margin-top: -4px; border-radius: 0 4px 4px 0; background: var(--header); transition: height .15s, margin .15s; opacity: 0; }
.rail-item:hover .pill { opacity: 1; height: 20px; margin-top: -10px; }
.rail-item.active .pill { opacity: 1; height: 40px; margin-top: -20px; }
.server { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: 18px; background: var(--chat); color: var(--text); transition: border-radius .15s, background .15s, color .15s; }
.rail-item:hover .server, .rail-item.active .server { border-radius: 16px; background: var(--accent); color: #fff; }
.rail-item .tip { position: absolute; left: 70px; top: 50%; transform: translateY(-50%); background: var(--float); color: var(--header); font-weight: 600; font-size: 15px; padding: 7px 12px; border-radius: 6px; white-space: nowrap; pointer-events: none; opacity: 0; z-index: 20; box-shadow: 0 8px 16px rgba(0,0,0,.24); }
.rail-item:hover .tip { opacity: 1; }

/* ---- Channel sidebar ---- */
.sidebar { width: 240px; background: var(--sidebar); display: flex; flex-direction: column; flex-shrink: 0; position: relative; }
.server-name { height: 48px; padding: 0 16px; display: flex; align-items: center; font-weight: 600; color: var(--header); box-shadow: 0 1px 0 rgba(4,4,5,.2), 0 1.5px 0 rgba(6,6,7,.05), 0 2px 0 rgba(4,4,5,.05); flex-shrink: 0; }
.channels { flex: 1; padding: 16px 8px 8px; }
.cat-row { display: flex; align-items: center; }
.category { display: flex; align-items: center; gap: 2px; flex: 1; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .02em; color: var(--muted); padding: 0 0 4px; }
button.category:hover { color: var(--text); }
.category .ic { width: 12px; height: 12px; stroke-width: 3; transition: transform .15s; }
.category.closed .ic { transform: rotate(-90deg); }
.cat-add { color: var(--muted); padding: 0 4px 4px; }
.cat-add:hover { color: var(--text); }
.cat-add .ic { width: 16px; height: 16px; }
.apps-head { margin-top: 16px; cursor: default; }
.apps-head.fold { cursor: pointer; width: 100%; }
.category:hover { color: var(--text); }
.channel { position: relative; width: 100%; display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 4px; color: var(--muted); text-align: left; margin-bottom: 2px; font-weight: 500; min-height: 34px; }
.channel:hover { background: var(--hover); color: var(--text); }
.channel.active { background: var(--active); color: var(--header); }
.channel.unread { color: var(--header); }
.channel .ic { color: var(--faint); }
.channel .label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.channel.unread::before { content: ""; position: absolute; left: -8px; top: 50%; width: 4px; height: 8px; margin-top: -4px; border-radius: 0 4px 4px 0; background: var(--header); }
.channel .avatar.xs { width: 24px; height: 24px; font-size: 11px; }
.channel .avatar.xs .dot { width: 12px; height: 12px; border-width: 2px; right: -3px; bottom: -3px; }
.badge { background: var(--red); color: #fff; font-size: 12px; font-weight: 700; min-width: 16px; height: 16px; line-height: 16px; border-radius: 8px; padding: 0 4px; text-align: center; }

/* ---- User panel ---- */
.me { height: 52px; background: var(--panel); padding: 0 8px; display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.me .who { flex: 1; min-width: 0; line-height: 1.2; }
.me .name { font-weight: 600; color: var(--header); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me .status { font-size: 12px; color: var(--muted); }
.icon-btn { width: 32px; height: 32px; border-radius: 4px; display: grid; place-items: center; color: #b5bac1; flex-shrink: 0; }
.icon-btn:hover { background: var(--hover); color: var(--text); }
.icon-btn.sm { width: 24px; height: 24px; }
.icon-btn.sm .ic { width: 16px; height: 16px; }

/* ---- Avatars ---- */
.avatar { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; position: relative; display: grid; place-items: center; color: #fff; font-weight: 600; }
.avatar.sm { width: 32px; height: 32px; font-size: 13px; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.avatar .dot { position: absolute; right: -3px; bottom: -3px; width: 16px; height: 16px; border-radius: 50%; background: var(--green); border: 3px solid var(--sidebar); z-index: 1; }
.me .avatar .dot { border-color: var(--panel); }
.avatar .dot.offline { background: var(--faint); }
.avatar .dot.connecting { background: var(--yellow); }

/* ---- Popovers ---- */
.popover { position: absolute; background: var(--float); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.4); z-index: 30; }
.popover[hidden] { display: none; }
.user-menu { left: 8px; right: 8px; bottom: 60px; padding: 8px; }
.user-menu .um-head { padding: 8px; font-weight: 600; color: var(--header); border-bottom: 1px solid var(--line); margin-bottom: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-item { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px; border-radius: 4px; font-size: 14px; font-weight: 500; text-align: left; }
.menu-item:hover { background: var(--accent); color: #fff; }
.menu-item.danger { color: #fa777c; }
.menu-item.danger:hover { background: #da373c; color: #fff; }
.menu-item .ic { width: 18px; height: 18px; }
.menu-item span { color: var(--muted); font-size: 12px; }
.menu-item:hover span { color: #fff; }

/* ---- Main chat ---- */
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; position: relative; }
.topbar { height: 48px; padding: 0 16px; display: flex; align-items: center; gap: 8px; color: var(--header); flex-shrink: 0; box-shadow: 0 1px 0 rgba(4,4,5,.2), 0 1.5px 0 rgba(6,6,7,.05), 0 2px 0 rgba(4,4,5,.05); z-index: 2; }
.topbar .head-icon { width: 24px; height: 24px; color: var(--faint); }
.topbar .title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .divider { width: 1px; height: 24px; background: #3f4147; margin: 0 8px; flex-shrink: 0; }
.topbar .topic { flex: 1; min-width: 0; font-size: 14px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-toggle { display: none; }
.conn { font-size: 12px; font-weight: 600; display: flex; align-items: center; gap: 6px; color: var(--muted); white-space: nowrap; }
.conn i { width: 8px; height: 8px; border-radius: 50%; background: var(--yellow); }
.conn.online { display: none; }
.conn.offline i { background: var(--red); }
.topbar .icon-btn.on { color: var(--header); }
.search { position: relative; flex-shrink: 0; }
.search input { width: 144px; height: 24px; background: var(--rail); border: 0; border-radius: 4px; color: var(--text); font: inherit; font-size: 14px; padding: 0 26px 0 6px; outline: 0; transition: width .2s; }
.search input:focus, .search input:not(:placeholder-shown) { width: 220px; }
.search input::placeholder { color: var(--muted); }
.search .ic { position: absolute; right: 5px; top: 4px; width: 16px; height: 16px; color: var(--muted); pointer-events: none; }

.messages { flex: 1; padding: 16px 0 24px; position: relative; }
.welcome { padding: 16px 16px 8px; }
.welcome .big { width: 68px; height: 68px; border-radius: 50%; background: #41434a; display: grid; place-items: center; color: #fff; margin-bottom: 8px; }
.welcome .big .ic { width: 42px; height: 42px; }
.welcome h1 { margin: 8px 0; color: var(--header); font-size: 32px; font-weight: 700; line-height: 1.25; }
.welcome p { margin: 0; color: var(--muted); }
.loading-older, .no-results { padding: 16px; text-align: center; color: var(--muted); font-size: 14px; }

.day { display: flex; align-items: center; margin: 24px 14px 8px 16px; height: 0; border-top: 1px solid #3f4147; justify-content: center; }
.day span { background: var(--chat); padding: 2px 4px; font-size: 12px; font-weight: 600; color: var(--muted); margin-top: -1px; line-height: 13px; }
.newline { display: flex; align-items: center; margin: 8px 14px 0 16px; height: 0; border-top: 1px solid var(--red); justify-content: flex-end; }
.newline span { background: var(--red); color: #fff; font-size: 10px; font-weight: 700; padding: 0 4px; border-radius: 4px 0 0 4px; line-height: 13px; margin-top: -1px; margin-right: -14px; }

.msg { position: relative; padding: 2px 48px 2px 72px; margin-top: 17px; min-height: 44px; }
.msg.cont { margin-top: 0; min-height: 22px; }
.msg:hover, .msg.flash { background: var(--msg-hover); }
.msg.flash { transition: background 1.2s; background: rgba(88,101,242,.18); }
.msg .main-row { position: relative; }
.msg .avatar { position: absolute; left: -56px; top: 2px; cursor: pointer; }
.msg .avatar:hover { opacity: .85; }
.msg .gutter-time { position: absolute; left: -64px; width: 56px; text-align: right; display: none; font-size: 11px; color: var(--muted); line-height: 22px; white-space: nowrap; }
.msg.cont .avatar { display: none; }
.msg.cont:hover .gutter-time { display: block; }
.msg .head { display: flex; align-items: baseline; gap: 8px; line-height: 22px; }
.msg.cont .head { display: none; }
.msg .author { font-weight: 500; }
.msg .author:hover { text-decoration: underline; cursor: pointer; }
.msg .time { font-size: 12px; color: var(--muted); font-weight: 500; }
.tag { background: var(--accent); color: #fff; font-size: 10px; font-weight: 600; line-height: 15px; height: 15px; padding: 0 4px; border-radius: 3px; text-transform: uppercase; flex-shrink: 0; align-self: center; }
.only-you { font-size: 12px; color: var(--muted); margin-top: 2px; }
.msg .text { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 22px; }
.msg .text a { color: var(--link); text-decoration: none; }
.msg .text a:hover { text-decoration: underline; }
.msg .text code { background: var(--sidebar); border: 1px solid var(--rail); border-radius: 4px; padding: 0 3px; font: 14px/1.2 Consolas, "Andale Mono", Menlo, monospace; }
.msg .text pre { margin: 4px 0; background: var(--sidebar); border: 1px solid var(--rail); border-radius: 4px; padding: 8px; overflow-x: auto; max-width: 720px; }
.msg .text pre code { background: none; border: 0; padding: 0; font-size: 14px; line-height: 1.3; white-space: pre; }
.msg .edited { font-size: 10px; color: var(--muted); margin-left: 4px; user-select: none; }
.msg.kind-me .text, .msg.kind-roll .text { font-style: italic; color: #c7c9cc; }
.mention { background: rgba(88,101,242,.3); color: #c9cdfb; border-radius: 3px; padding: 0 2px; font-weight: 500; }
.mention:hover { background: var(--accent); color: #fff; }
.cmd { background: rgba(88,101,242,.3); color: #c9cdfb; border-radius: 3px; padding: 0 2px; font-weight: 500; }
.msg.mentioned { background: rgba(240,178,50,.1); }
.msg.mentioned::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--yellow); }
.msg.mentioned:hover { background: rgba(240,178,50,.08); }
.msg.editing { background: rgba(88,101,242,.12); }

/* Reply reference above a message */
.reply-ref { display: flex; align-items: center; gap: 4px; font-size: 14px; color: var(--muted); line-height: 18px; margin-bottom: 2px; cursor: pointer; position: relative; min-width: 0; }
.reply-ref::before { content: ""; position: absolute; left: -36px; top: 9px; width: 28px; height: 10px; border-left: 2px solid #4e5058; border-top: 2px solid #4e5058; border-top-left-radius: 6px; }
.reply-ref .who { font-weight: 500; flex-shrink: 0; }
.reply-ref .what { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reply-ref:hover .what { color: var(--text); }
.reply-ref.gone { font-style: italic; cursor: default; }

/* Reactions */
.reactions { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0 2px; }
.rx { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 6px; border-radius: 8px; background: var(--sidebar); border: 1px solid transparent; font-size: 14px; }
.rx:hover { border-color: #4e5058; }
.rx.mine { background: rgba(88,101,242,.15); border-color: var(--accent); }
.rx .n { font-size: 13px; font-weight: 600; color: #b5bac1; min-width: 9px; text-align: center; }
.rx.mine .n { color: #dee0fc; }
.rx.add { color: var(--muted); visibility: hidden; }
.msg:hover .rx.add { visibility: visible; }
.rx.add .ic { width: 16px; height: 16px; }

/* While searching, every hit shows its author */
.searching .msg.cont { margin-top: 17px; min-height: 44px; }
.searching .msg.cont .avatar { display: grid; }
.searching .msg.cont .head { display: flex; }
.searching .msg.cont .gutter-time { display: none !important; }

.actions { position: absolute; right: 16px; top: -16px; display: none; background: var(--chat); border: 1px solid #26282c; border-radius: 8px; padding: 2px; box-shadow: 0 2px 6px rgba(0,0,0,.2); z-index: 1; }
.msg:hover .actions, .msg:focus-within .actions { display: flex; }
.actions button { width: 28px; height: 28px; border-radius: 4px; display: grid; place-items: center; color: #b5bac1; }
.actions button:hover { background: var(--active); color: var(--text); }
.actions button.danger:hover, .actions button.armed { background: #da373c; color: #fff; }
.actions .ic { width: 18px; height: 18px; }

.sys { display: flex; align-items: center; gap: 16px; padding: 2px 48px 2px 16px; margin-top: 17px; color: var(--muted); min-height: 22px; }
.sys .arrow { width: 40px; display: flex; justify-content: center; color: var(--green); flex-shrink: 0; }
.sys .arrow.out { color: var(--red); transform: scaleX(-1); }
.sys .arrow .ic { width: 16px; height: 16px; stroke-width: 2.5; }
.sys .time { font-size: 12px; margin-left: 4px; }
.sys:hover { background: var(--msg-hover); }

.help { margin: 16px 16px 0; padding: 12px 16px; background: var(--sidebar); border-radius: 8px; border-left: 3px solid var(--accent); font-size: 14px; }
.help h3 { margin: 0 0 6px; font-size: 14px; color: var(--header); }
.help dl { margin: 0 0 8px; display: grid; grid-template-columns: max-content 1fr; gap: 2px 16px; }
.help dt { color: var(--header); font-weight: 500; font-family: Consolas, Menlo, monospace; font-size: 13px; }
.help dd { margin: 0; color: #b5bac1; }
.help .only-you { margin: 0; }

.jump { position: absolute; right: 24px; bottom: 84px; z-index: 3; display: flex; align-items: center; gap: 6px; background: var(--accent); color: #fff; font-size: 13px; font-weight: 600; padding: 6px 10px 6px 12px; border-radius: 16px; box-shadow: 0 4px 12px rgba(0,0,0,.35); }
.jump[hidden] { display: none; }
.jump:hover { background: #4752c4; }
.jump .ic { width: 16px; height: 16px; }

/* ---- Composer ---- */
.composer { padding: 0 16px 0; flex-shrink: 0; position: relative; }
.composer form { background: var(--input); border-radius: 8px; display: flex; align-items: flex-end; padding-right: 8px; }
.context-bar + form { border-top-left-radius: 0; border-top-right-radius: 0; }
.composer textarea { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--text); padding: 11px 0 11px 16px; font: inherit; line-height: 22px; height: 44px; max-height: 198px; resize: none; overflow-y: auto; scrollbar-width: thin; }
.composer textarea::placeholder { color: #6d6f78; }
.composer textarea:disabled { cursor: not-allowed; }
.composer form .icon-btn { margin-bottom: 6px; }
.context-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: var(--sidebar); border-radius: 8px 8px 0 0; padding: 6px 8px 6px 16px; font-size: 14px; color: #b5bac1; }
.context-bar[hidden] { display: none; }
.context-bar b { color: var(--header); font-weight: 600; }
.context-bar span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.typing { height: 24px; font-size: 14px; color: var(--text); padding: 0 4px; display: flex; align-items: center; gap: 6px; }
.typing b { font-weight: 600; }
.dots { display: inline-flex; gap: 3px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--text); animation: bounce 1.2s infinite ease-in-out; }
.dots i:nth-child(2) { animation-delay: .15s; }
.dots i:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 0%, 60%, 100% { opacity: .3; transform: scale(.8); } 30% { opacity: 1; transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .dots i, .bload { animation: none; } }

.suggest { left: 16px; right: 16px; bottom: 76px; padding: 8px; background: var(--sidebar); border: 1px solid var(--rail); max-height: min(420px, 60vh); overflow-y: auto; scrollbar-width: thin; }
.suggest .s-title { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .02em; color: var(--muted); padding: 4px 8px 8px; }
.s-item { width: 100%; display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 4px; text-align: left; min-height: 36px; }
.s-item.sel, .s-item:hover { background: var(--active); }
.s-item .s-name { font-weight: 600; color: var(--header); white-space: nowrap; }
.s-item .s-arg { font-size: 13px; color: var(--muted); border: 1px solid #4e5058; border-radius: 4px; padding: 0 6px; white-space: nowrap; }
.s-item .s-desc { margin-left: auto; font-size: 14px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s-item .avatar.xs { width: 24px; height: 24px; font-size: 11px; }

.emoji-pop { position: fixed; padding: 10px; display: grid; grid-template-columns: repeat(8, 36px); gap: 2px; z-index: 40; }
.emoji-pop button { width: 36px; height: 36px; border-radius: 4px; font-size: 22px; line-height: 1; }
.emoji-pop button:hover { background: var(--active); }

.toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); background: var(--float); color: var(--header); padding: 10px 16px; border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.4); z-index: 60; font-size: 14px; max-width: min(480px, calc(100vw - 32px)); border-left: 3px solid var(--yellow); }
.toast[hidden] { display: none; }

/* ---- Shared browser channel ---- */
.browser { display: none; flex: 1; flex-direction: column; min-height: 0; background: var(--rail); }
body.view-browser .browser { display: flex; }
body.view-browser .messages, body.view-browser .composer, body.view-browser .search, body.view-browser .jump { display: none; }
.bbar { display: flex; align-items: center; gap: 4px; padding: 8px 12px; background: var(--sidebar); flex-shrink: 0; }
.bbar form { flex: 1; display: flex; min-width: 0; margin: 0 4px; }
.bbar .addr { flex: 1; min-width: 0; height: 32px; background: var(--rail); border: 0; border-radius: 16px; color: var(--text); padding: 0 14px; font: inherit; font-size: 14px; outline: 0; }
.bbar .addr:focus { box-shadow: 0 0 0 2px var(--accent); }
.bbar .addr::placeholder { color: var(--muted); }
.bbar .ask { height: 32px; padding: 0 12px; border-radius: 4px; background: var(--accent); color: #fff; font-size: 14px; font-weight: 500; white-space: nowrap; }
.bbar .ask:hover { background: #4752c4; }
/* Phones: the buttons on one row, the address box on its own row under them. */
@media (max-width: 640px) {
  .bbar { flex-wrap: wrap; row-gap: 6px; column-gap: 0; padding: 6px 8px; }
  .bbar .icon-btn { width: 36px; min-width: 0; padding: 0; }
  .bbar form { order: 10; flex-basis: 100%; margin: 0; }
  .bbar .ask { margin-left: auto; padding: 0 10px; font-size: 13px; }
}
.bload { height: 2px; flex-shrink: 0; background: linear-gradient(90deg, transparent, var(--accent), transparent); background-size: 40% 100%; background-repeat: no-repeat; animation: bload 1s linear infinite; }
.bload[hidden] { display: block; visibility: hidden; animation: none; }
@keyframes bload { from { background-position: -40% 0; } to { background-position: 140% 0; } }
.bstage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; position: relative; padding: 8px 12px; outline: 0; overflow: hidden; }
.bstage img { max-width: 100%; max-height: 100%; background: #fff; border-radius: 4px; box-shadow: 0 4px 16px rgba(0,0,0,.4); user-select: none; -webkit-user-drag: none; cursor: default; }
.bstage img:not([src]) { visibility: hidden; }
.bstage img { touch-action: none; } /* taps and swipes go to the shared page, not to Hangout's scrolling */
/* Off screen, but focusable, so phones show their keyboard for typing into the page. */
.btype { position: fixed; left: -1000px; top: 0; width: 10px; height: 10px; opacity: 0; font-size: 16px; }
.bstage:focus img, .bstage.typing img { box-shadow: 0 0 0 2px var(--accent), 0 4px 16px rgba(0,0,0,.4); }
.bmsg { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 24px; color: var(--muted); pointer-events: none; }
.bmsg[hidden] { display: none; }
.bnote { font-size: 12px; color: var(--muted); padding: 0 12px 8px; text-align: center; flex-shrink: 0; }
.bnote.warn { color: var(--yellow); }

/* ---- Members ---- */
.members { width: 240px; background: var(--sidebar); padding: 0 8px 20px; flex-shrink: 0; }
body.members-closed .members { display: none; }
.group { padding: 24px 8px 4px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .02em; color: var(--muted); }
.member { width: 100%; display: flex; align-items: center; gap: 12px; padding: 5px 8px; border-radius: 4px; height: 42px; text-align: left; }
.member:hover { background: var(--hover); }
.member .name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member .you { font-size: 11px; color: var(--muted); margin-left: -6px; flex-shrink: 0; }
.member.off { opacity: .3; }
.member.off:hover { opacity: 1; }
.member.off .name { color: var(--muted) !important; }

/* ---- Dialogs ---- */
.overlay { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px;
  background: radial-gradient(1200px 600px at 20% 10%, #4752c4 0%, transparent 60%), radial-gradient(900px 600px at 90% 90%, #3c45a5 0%, transparent 55%), #1e1f22; }
.overlay.modal { background: rgba(0,0,0,.7); }
.overlay[hidden] { display: none; }
.dialog { background: var(--chat); border-radius: 8px; padding: 32px; width: 100%; max-width: 480px; box-shadow: 0 2px 10px rgba(0,0,0,.2); text-align: center; }
.dialog h2 { margin: 0 0 8px; color: var(--header); font-size: 24px; font-weight: 600; }
.dialog p { margin: 0 0 20px; color: #b5bac1; }
.modal .dialog { text-align: left; padding: 24px; }
.dialog label { display: block; font-size: 12px; font-weight: 700; text-transform: uppercase; color: #b5bac1; margin-bottom: 8px; }
.dialog label .optional { text-transform: none; font-weight: 400; color: var(--muted); }
.dialog input { width: 100%; background: var(--rail); border: 0; border-radius: 4px; padding: 10px; color: var(--text); font: inherit; outline: 0; margin-bottom: 16px; }
.dialog input:focus { box-shadow: 0 0 0 2px var(--accent); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.btn { height: 38px; padding: 0 16px; border-radius: 4px; font-size: 14px; font-weight: 500; }
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:hover { background: #4752c4; }
.btn.ghost:hover { text-decoration: underline; }
.gbtn { display: flex; justify-content: center; min-height: 44px; }
.login-error { margin: 16px 0 0 !important; color: #fa777c !important; font-size: 14px; }

/* ---- Attachments ---- */
.composer form .attach-btn { margin-left: 8px; }
.composer form .attach-btn .ic { background: #b5bac1; color: var(--input); border-radius: 50%; padding: 2px; width: 22px; height: 22px; stroke-width: 3; }
.composer form .attach-btn:hover .ic { background: var(--header); }
.composer textarea { padding-left: 8px; }
#voiceBtn.recording { color: var(--red); animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .5; } }
.rec-time { align-self: center; font-size: 13px; color: var(--red); font-variant-numeric: tabular-nums; margin-right: 4px; }
.rec-time[hidden] { display: none; }
.attach-list { display: flex; gap: 8px; flex-wrap: wrap; background: var(--input); border-radius: 8px 8px 0 0; padding: 10px 12px 4px; }
.attach-list[hidden] { display: none; }
.attach-list + form { border-top-left-radius: 0; border-top-right-radius: 0; }
.context-bar + .attach-list { border-radius: 0; }
.chip { position: relative; display: flex; align-items: center; gap: 8px; background: var(--sidebar); border-radius: 6px; padding: 6px 30px 6px 6px; max-width: 240px; min-height: 48px; }
.chip img { width: 40px; height: 40px; object-fit: cover; border-radius: 4px; flex-shrink: 0; }
.chip .ic { width: 28px; height: 28px; color: var(--muted); flex-shrink: 0; }
.chip .c-name { font-size: 13px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip .c-size { font-size: 11px; color: var(--muted); }
.chip .c-bar { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--accent); border-radius: 0 0 0 6px; transition: width .2s; }
.chip.error { outline: 1px solid var(--red); }
.chip .c-x { position: absolute; top: 4px; right: 4px; }
.attachments { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 2px; align-items: flex-start; }
.att-img { display: block; max-width: min(420px, 100%); max-height: 320px; border-radius: 6px; cursor: zoom-in; background: var(--sidebar); }
.att-video { max-width: min(480px, 100%); max-height: 320px; border-radius: 6px; background: #000; }
.att-audio { display: flex; flex-direction: column; gap: 4px; background: var(--sidebar); border: 1px solid var(--rail); border-radius: 8px; padding: 8px 10px; max-width: min(420px, 100%); }
.att-audio .a-head { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text); }
.att-audio .a-head .ic { width: 16px; height: 16px; color: var(--muted); }
.att-audio audio { width: min(380px, 100%); height: 36px; }
.att-file { display: flex; align-items: center; gap: 10px; background: var(--sidebar); border: 1px solid var(--rail); border-radius: 8px; padding: 10px 12px; max-width: min(420px, 100%); text-decoration: none; }
.att-file .ic { width: 28px; height: 28px; color: var(--muted); flex-shrink: 0; }
.att-file .f-name { color: var(--link); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-file .f-size { color: var(--muted); font-size: 12px; }
.att-file:hover .f-name { text-decoration: underline; }
.drop-overlay { position: fixed; inset: 0; z-index: 70; background: rgba(88,101,242,.35); display: grid; place-items: center; pointer-events: none; }
.drop-overlay[hidden] { display: none; }
.drop-overlay div { background: var(--accent); color: #fff; font-size: 20px; font-weight: 700; padding: 24px 40px; border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.4); }
.lightbox { position: fixed; inset: 0; z-index: 65; background: rgba(0,0,0,.85); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 24px; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: calc(100% - 40px); object-fit: contain; }
.lightbox a { color: #dbdee1; font-size: 14px; }

/* ---- Custom emoji ---- */
.emoji { width: 22px; height: 22px; object-fit: contain; vertical-align: -5px; }
.emoji.big { width: 48px; height: 48px; }
.rx .emoji { width: 16px; height: 16px; vertical-align: -3px; }
.emoji-pop .ep-title { grid-column: 1 / -1; font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--muted); padding: 4px 2px 2px; }
.emoji-pop button img { width: 26px; height: 26px; object-fit: contain; }
.emoji-form { display: flex; gap: 16px; align-items: stretch; margin-bottom: 24px; }
.emoji-drop { width: 120px; min-height: 100px; border: 2px dashed #4e5058; border-radius: 8px; display: grid; place-items: center; text-align: center; color: var(--muted); font-size: 13px; cursor: pointer; padding: 8px; flex-shrink: 0; }
.emoji-drop:hover { border-color: var(--accent); color: var(--text); }
.emoji-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.emoji-drop img { width: 64px; height: 64px; object-fit: contain; }
.emoji-fields { flex: 1; display: flex; flex-direction: column; gap: 8px; justify-content: center; max-width: 320px; }
.emoji-fields label { font-size: 12px; font-weight: 700; text-transform: uppercase; color: #b5bac1; }
.emoji-fields input { background: var(--sidebar); border: 0; border-radius: 4px; padding: 9px 10px; color: var(--text); font: inherit; outline: 0; }
.emoji-fields input:focus { box-shadow: 0 0 0 2px var(--accent); }
.emoji-fields .btn { align-self: flex-start; }
.emoji-fields .btn:disabled { opacity: .5; cursor: default; }
.emoji-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.emoji-cell { display: flex; align-items: center; gap: 8px; background: var(--sidebar); border-radius: 8px; padding: 8px 6px 8px 10px; min-width: 0; }
.emoji-cell img { width: 32px; height: 32px; object-fit: contain; flex-shrink: 0; }
.emoji-cell span { flex: 1; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.set-panel code { background: var(--sidebar); padding: 1px 4px; border-radius: 3px; font-size: 13px; }

/* ---- Pins ---- */
.pins-pop { right: 16px; top: 52px; width: min(440px, calc(100% - 32px)); max-height: 70vh; display: flex; flex-direction: column; background: var(--sidebar); border: 1px solid var(--rail); }
.pp-head { padding: 14px 16px; font-weight: 600; color: var(--header); border-bottom: 1px solid var(--line); flex-shrink: 0; }
.pp-list { padding: 8px; overflow-y: auto; display: grid; gap: 8px; }
.pp-item { background: var(--chat); border-radius: 6px; padding: 10px 12px; }
.pp-item .pp-top { display: flex; align-items: baseline; gap: 8px; margin-bottom: 2px; }
.pp-item .pp-author { font-weight: 600; }
.pp-item .pp-time { font-size: 12px; color: var(--muted); }
.pp-item .pp-text { font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 6.5em; overflow: hidden; }
.pp-item .pp-actions { display: flex; gap: 12px; margin-top: 6px; }
.pp-empty { padding: 24px 16px; text-align: center; color: var(--muted); font-size: 14px; }
.pp-sub { font-size: 12px; font-weight: 500; color: var(--muted); margin-left: 6px; }
.pp-item .pp-where { font-size: 12px; color: var(--muted); }
.pp-item.reply .pp-where::before { content: "↩ "; }
.inbox-btn { position: relative; }
.inbox-btn .badge { position: absolute; right: -2px; bottom: -2px; font-size: 10px; min-width: 15px; height: 15px; line-height: 15px; border: 2px solid var(--chat); box-sizing: content-box; }
.inbox-btn .badge[hidden] { display: none; }
#inboxBtn.on { color: var(--header); }
.bio-row { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 24px; }
.bio-row textarea { flex: 1; min-height: 44px; background: var(--sidebar); border: 0; border-radius: 6px; padding: 10px 12px; color: var(--text); font: inherit; font-size: 14px; resize: vertical; outline: 0; }
.bio-row textarea:focus { box-shadow: 0 0 0 2px var(--accent); }
.bio-row .btn:disabled { opacity: .5; cursor: default; }
.bio-count { font-size: 12px; color: var(--muted); }
.pc-bio { font-size: 13px; color: var(--text); margin: -4px 0 10px; white-space: pre-wrap; overflow-wrap: anywhere; }
.pin-mark { width: 13px; height: 13px; color: var(--muted); vertical-align: -1px; margin-left: 2px; }
#pinsBtn.on { color: var(--header); }

/* ---- Role-only channels and role pings ---- */
.channel .lock { width: 12px; height: 12px; color: var(--faint); margin-left: -2px; }
.new-roles { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.new-roles label { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--text); text-transform: none; font-weight: 500; margin: 0; cursor: pointer; background: var(--rail); border-radius: 6px; padding: 6px 10px; }
.new-roles input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.new-roles-hint { font-size: 12px; color: var(--muted); margin-bottom: 12px; }
.mention.role { background: color-mix(in srgb, var(--role) 22%, transparent); color: var(--role); }
.mention.role:hover { background: color-mix(in srgb, var(--role) 40%, transparent); color: #fff; }

/* ---- Owner ---- */
.crown { width: 14px; height: 14px; color: #f0b232; flex-shrink: 0; align-self: center; stroke: none; }
.crown use { stroke: none; }
.crown.co { color: #c4cbd6; }
.pc-owner.co { color: #c4cbd6; background: rgba(196,203,214,.1); }
.owner-note.co { background: rgba(196,203,214,.06); border-color: rgba(196,203,214,.3); }
.owner-note.co .ic { color: #c4cbd6; }
.owner-note { display: flex; gap: 12px; align-items: flex-start; background: rgba(240,178,50,.08); border: 1px solid rgba(240,178,50,.35); border-radius: 8px; padding: 12px 16px; margin: -8px 0 24px; font-size: 14px; color: #b5bac1; }
.owner-note[hidden] { display: none; }
.owner-note .ic { width: 20px; height: 20px; color: #f0b232; stroke: none; margin-top: 1px; }
.owner-note b { color: var(--header); }
.channel-row { position: relative; }
.channel-row .ch-del { position: absolute; right: 4px; top: 5px; width: 24px; height: 24px; display: none; }
.channel-row:hover .ch-del, .channel-row .ch-del:focus-visible { display: grid; }
.channel-row:hover .channel .badge { visibility: hidden; }
.ch-del:hover { color: #fa777c; }
.btn.danger { background: #da373c; color: #fff; }
.btn.small { height: 32px; padding: 0 12px; }
.btn.ghost-line { border: 1px solid #4e5058; color: var(--text); }
.btn.ghost-line:hover { background: var(--hover); }
.confirm-body { color: #b5bac1; margin-bottom: 16px; }
.confirm-body p { margin: 0 0 12px; }
.confirm-body label { display: block; font-size: 12px; font-weight: 700; text-transform: uppercase; color: #b5bac1; margin: 12px 0 6px; }
.confirm-body select, .confirm-body input { width: 100%; background: var(--rail); border: 0; border-radius: 4px; padding: 10px; color: var(--text); font: inherit; outline: 0; margin: 0; }
.confirm-body select:focus, .confirm-body input:focus { box-shadow: 0 0 0 2px var(--accent); }

/* Moderation buttons on the profile card */
.pc-mod { display: flex; gap: 6px; margin-top: 10px; }
.pc-mod .btn { flex: 1; height: 30px; padding: 0 8px; font-size: 13px; }
.pc-flag { font-size: 12px; font-weight: 600; border-radius: 4px; padding: 4px 8px; margin-bottom: 10px; }
.pc-flag.timeout { color: var(--yellow); background: rgba(240,178,50,.1); }
.pc-flag.banned { color: #fa777c; background: rgba(242,63,67,.12); }

/* Settings: Team, Moderation, Audit log */
.set-hint { font-size: 13px; color: #b5bac1; background: var(--sidebar); border-radius: 8px; padding: 10px 14px; margin: -8px 0 20px; }
.set-hint a { color: var(--link); }
.admin-list { display: grid; gap: 8px; margin-bottom: 24px; }
.admin-row { display: flex; align-items: center; gap: 12px; background: var(--sidebar); border-radius: 8px; padding: 10px 12px 10px 16px; min-height: 56px; }
.admin-row .ar-main { flex: 1; min-width: 0; }
.admin-row .ar-title { display: flex; align-items: center; gap: 6px; font-weight: 600; color: var(--header); min-width: 0; }
.admin-row .ar-title > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-row .ar-sub { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-row .ar-sub.warn { color: var(--yellow); }
.admin-row .ar-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.admin-row .ar-actions { display: flex; gap: 6px; flex-shrink: 0; }
.admin-empty { font-size: 14px; color: var(--muted); padding: 4px 0 8px; }
.team-form { background: var(--sidebar); border: 1px solid var(--accent); border-radius: 8px; padding: 16px; display: grid; gap: 12px; }
.team-form .tf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.team-form label { display: block; font-size: 12px; font-weight: 700; text-transform: uppercase; color: #b5bac1; margin-bottom: 6px; }
.team-form input[type=text], .team-form input[type=email] { width: 100%; background: var(--rail); border: 0; border-radius: 4px; padding: 9px 10px; color: var(--text); font: inherit; outline: 0; }
.team-form input:focus { box-shadow: 0 0 0 2px var(--accent); }
.team-form .tf-roles { display: flex; flex-wrap: wrap; gap: 8px; }
.team-form .tf-check { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--text); text-transform: none; font-weight: 500; margin: 0; cursor: pointer; background: var(--rail); border-radius: 6px; padding: 6px 10px; }
.team-form .tf-check input { accent-color: var(--accent); width: 16px; height: 16px; margin: 0; }
.team-form .tf-actions { display: flex; justify-content: flex-end; gap: 8px; }
.audit-list { display: grid; gap: 2px; }
.audit-row { display: flex; gap: 12px; padding: 8px 12px; border-radius: 6px; font-size: 14px; }
.audit-row:nth-child(odd) { background: var(--sidebar); }
.audit-row .au-time { color: var(--muted); font-size: 12px; white-space: nowrap; min-width: 128px; padding-top: 2px; }
.audit-row .au-text { color: var(--text); min-width: 0; overflow-wrap: anywhere; }
.audit-row .au-text b { color: var(--header); font-weight: 600; }
.audit-row .au-detail { color: var(--muted); }
@media (max-width: 700px) {
  .team-form .tf-row { grid-template-columns: 1fr; }
  .admin-row { flex-wrap: wrap; }
  .audit-row { flex-direction: column; gap: 2px; }
}
.btn.danger:hover { background: #a12828; }
.modal .dialog p b { color: var(--header); }

/* ---- Role tags ---- */
.role-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; line-height: 16px; height: 18px; padding: 0 7px 0 5px; border-radius: 9px; border: 1px solid; white-space: nowrap; flex-shrink: 0; align-self: center; }
.role-tag::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.member .m-text { flex: 1; min-width: 0; line-height: 1.25; }
.member .m-line { display: flex; align-items: center; gap: 6px; min-width: 0; }
.member .m-line .you { margin-left: 0; }
.member .m-role { font-size: 12px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- Settings ---- */
.settings { position: fixed; inset: 0; z-index: 48; display: flex; background: var(--chat); }
.settings[hidden] { display: none; }
.set-nav { width: 280px; flex-shrink: 0; background: var(--sidebar); padding: 60px 8px 20px 20px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.set-head { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; color: var(--muted); padding: 6px 10px; }
.set-tab { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 4px; color: #b5bac1; font-weight: 500; text-align: left; }
.set-tab:hover { background: var(--hover); color: var(--text); }
.set-tab.active { background: var(--active); color: var(--header); }
.set-tab[hidden], .set-head[hidden] { display: none; }
.set-nav .set-head.staff-only { margin-top: 12px; }
.set-tab.danger { color: #fa777c; }
.set-tab.danger:hover { background: #da373c; color: #fff; }
.set-tab .ic { width: 16px; height: 16px; }
.set-sep { height: 1px; background: #3f4147; margin: 8px 10px; }
.set-body { flex: 1; min-width: 0; padding: 60px 40px 40px; position: relative; }
.set-panel { max-width: 660px; }
.set-panel[hidden] { display: none; }
.set-panel h2 { margin: 0 0 8px; font-size: 20px; font-weight: 600; color: var(--header); }
.set-panel > p { margin: 0 0 24px; color: #b5bac1; }
.set-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; color: #b5bac1; margin: 0 0 8px; }
.set-close { position: absolute; top: 60px; right: 40px; display: flex; flex-direction: column; align-items: center; gap: 4px; color: #b5bac1; font-size: 12px; font-weight: 600; }
.set-close .ic { width: 36px; height: 36px; padding: 8px; border: 2px solid #4e5058; border-radius: 50%; }
.set-close:hover { color: var(--header); }
.set-close:hover .ic { border-color: var(--header); }

.role-preview { margin-bottom: 24px; }
.role-preview .head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; line-height: 22px; }
.role-preview .author { font-weight: 500; }
.role-preview .time { font-size: 12px; color: var(--muted); }
.role-preview .text { color: var(--text); }
.role-options { display: grid; gap: 8px; }
.role-option { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 0 16px; border-radius: 8px; background: var(--sidebar); border: 1px solid transparent; text-align: left; font-weight: 500; color: var(--text); }
.role-option:hover { background: var(--hover); }
.role-option.selected { border-color: var(--accent); background: rgba(88,101,242,.12); color: var(--header); }
.role-option .check { width: 20px; height: 20px; border-radius: 4px; border: 2px solid #b5bac1; flex-shrink: 0; display: grid; place-items: center; }
.role-option.selected .check { border-color: var(--accent); background: var(--accent); }
.role-option.selected .check::after { content: ""; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: translateY(-1px) rotate(45deg); }
.set-label-row { display: flex; align-items: baseline; justify-content: space-between; }
.link-btn { color: var(--link); font-size: 13px; font-weight: 500; }
.link-btn:hover { text-decoration: underline; }
.link-btn[hidden] { display: none; }
.role-preview .head .role-tag { margin-left: 0; }
/* ---- Profile card (hover a name or picture) ---- */
.profile-card { width: 300px; background: var(--float); border-radius: 8px; overflow: hidden; position: relative; }
.profile-card.floating { position: fixed; z-index: 55; box-shadow: 0 8px 24px rgba(0,0,0,.5); }
.profile-card[hidden] { display: none; }
.profile-card.static { box-shadow: 0 2px 10px rgba(0,0,0,.25); }
.pc-banner { height: 60px; }
.profile-card .pc-avatar { width: 80px; height: 80px; font-size: 30px; margin: -40px 0 0 16px; border: 6px solid var(--float); box-sizing: content-box; }
.profile-card .pc-avatar img { inset: 0; }
.profile-card .pc-avatar .dot { width: 18px; height: 18px; right: -2px; bottom: -2px; border: 4px solid var(--float); }
.pc-body { padding: 8px 16px 16px; }
.pc-name { display: flex; align-items: center; gap: 6px; font-size: 20px; font-weight: 700; color: var(--header); min-width: 0; }
.pc-name > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-name .crown { width: 18px; height: 18px; }
.pc-name .you { font-size: 12px; font-weight: 500; color: var(--muted); }
.pc-status { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.pc-owner { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: #f0b232; background: rgba(240,178,50,.1); border-radius: 4px; padding: 4px 8px; margin-bottom: 10px; }
.pc-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; color: #b5bac1; margin: 8px 0 6px; padding-top: 10px; border-top: 1px solid var(--line); }
.pc-roles { display: flex; flex-wrap: wrap; gap: 6px; }
.pc-roles .role-tag { height: 22px; font-size: 12px; padding: 0 8px 0 6px; border-radius: 11px; }
.pc-muted { font-size: 13px; color: var(--muted); }
.pc-message { width: 100%; margin-top: 14px; }
.role-option .role-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.role-option .role-name { flex: 1; }

.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; min-height: 48px; padding: 0 16px; border-radius: 8px; background: var(--sidebar); font-weight: 500; text-align: left; }
.switch { width: 40px; height: 24px; border-radius: 12px; background: #80848e; position: relative; flex-shrink: 0; transition: background .15s; }
.switch i { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: left .15s; }
.switch-row[aria-checked="true"] .switch { background: var(--green); }
.switch-row[aria-checked="true"] .switch i { left: 19px; }
#shortcutList .help { margin: 0; border-left: 0; }

.set-h2 { margin-top: 32px; }

/* ---- Threads ---- */
.thread-chip { display: inline-flex; align-items: center; gap: 6px; margin: 4px 0 2px; padding: 3px 10px 3px 8px; border-radius: 6px; background: var(--sidebar); color: var(--link); font-size: 13px; font-weight: 600; }
.thread-chip:hover { background: var(--active); }
.thread-chip .ic { width: 14px; height: 14px; }
.thread-chip .last { color: var(--muted); font-weight: 400; }
.thread-panel { width: 400px; flex-shrink: 0; background: var(--chat); border-left: 1px solid var(--rail); display: flex; flex-direction: column; min-width: 0; }
.thread-panel[hidden] { display: none; }
body.thread-open .members { display: none; }
.tp-head { height: 48px; flex-shrink: 0; display: flex; align-items: center; gap: 8px; padding: 0 8px 0 16px; box-shadow: 0 1px 0 rgba(0,0,0,.25); font-weight: 600; color: var(--header); }
.tp-head > .ic { width: 20px; height: 20px; color: var(--muted); flex-shrink: 0; }
.tp-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-title span { color: var(--muted); font-weight: 400; font-size: 14px; margin-left: 4px; }
.tp-messages { flex: 1; overflow-y: auto; padding: 0 0 16px; min-height: 0; }
.tp-messages .msg { padding-right: 16px; }
.tp-messages .actions { right: 8px; }
.tp-count { display: flex; align-items: center; gap: 8px; margin: 12px 16px 0; font-size: 12px; font-weight: 600; color: var(--muted); }
.tp-count::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.tp-empty { padding: 12px 16px; color: var(--muted); font-size: 14px; }
.tp-form { margin: 0 16px; background: var(--input); border-radius: 8px; display: flex; flex-shrink: 0; }
.tp-form textarea { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--text); padding: 11px 16px; font: inherit; line-height: 22px; height: 44px; max-height: 198px; resize: none; overflow-y: auto; scrollbar-width: thin; }
.tp-form textarea::placeholder { color: #6d6f78; }
.thread-panel .typing { padding: 0 20px; flex-shrink: 0; }

/* ---- A reply that is still being written ---- */
.msg.live .text::after { content: ""; display: inline-block; width: 7px; height: 16px; margin-left: 2px; vertical-align: text-bottom; background: var(--text); animation: caret 1s steps(2) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.live-status { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; line-height: 22px; }
.live-status .dots i { background: var(--muted); }
@media (prefers-reduced-motion: reduce) { .msg.live .text::after { animation: none; } }

/* ---- Read aloud ---- */
.voice-row { display: flex; align-items: flex-end; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.voice-row > div:first-child { flex: 1; min-width: 200px; }
.voice-row select { width: 100%; height: 40px; background: var(--rail); border: 0; border-radius: 4px; padding: 0 10px; color: var(--text); font: inherit; outline: 0; }
.voice-row select:focus { box-shadow: 0 0 0 2px var(--accent); }
.voice-row .btn { height: 40px; }
.voice-row + .set-hint { margin-top: 10px; }
.voice-row label { display: block; }
.set-hint:empty { display: none; }
.msg.speaking { background: rgba(35,165,90,.1); }
.msg.speaking::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--green); }
.actions button.on { color: var(--green); }
.read-stop { position: absolute; left: 24px; bottom: 84px; z-index: 3; display: flex; align-items: center; gap: 8px; background: var(--float); color: var(--text); font-size: 13px; padding: 6px 12px; border-radius: 16px; box-shadow: 0 4px 12px rgba(0,0,0,.35); border: 1px solid var(--green); }
.read-stop[hidden] { display: none; }
.read-stop .ic { width: 16px; height: 16px; color: var(--green); }
.read-stop b { color: var(--header); font-weight: 600; }
.read-stop:hover b { text-decoration: underline; }

/* ---- Tap-to-answer options under a bot's message ---- */
.options { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 2px; }
.options button { padding: 5px 12px; border-radius: 14px; background: var(--sidebar); border: 1px solid #4e5058; color: var(--header); font-size: 14px; font-weight: 500; }
.options button:hover:not(:disabled) { background: var(--accent); border-color: var(--accent); color: #fff; }
.options button:disabled { opacity: .5; cursor: default; }

/* ---- Suggestions while you type ---- */
.assist-bar { display: flex; align-items: center; gap: 6px; padding: 0 2px 6px; overflow-x: auto; scrollbar-width: none; }
.assist-bar[hidden] { display: none; }
.assist-bar > .ic { width: 16px; height: 16px; color: var(--yellow); flex-shrink: 0; }
.assist-bar button { flex-shrink: 0; max-width: 100%; padding: 4px 12px; border-radius: 14px; background: var(--sidebar); border: 1px solid #4e5058; color: var(--text); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.assist-bar button:hover { background: var(--active); color: var(--header); border-color: var(--accent); }
.assist-bar button kbd { font: inherit; font-size: 11px; color: var(--muted); margin-right: 6px; }

.channel .count { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--muted); background: var(--rail); border-radius: 9px; padding: 0 6px; line-height: 18px; }

/* ---- Task board ---- */
.tasks-view { display: none; flex: 1; flex-direction: column; min-height: 0; }
body.view-tasks .tasks-view { display: flex; }
body.view-tasks .messages, body.view-tasks .composer, body.view-tasks .search, body.view-tasks .jump, body.view-tasks #pinsBtn { display: none; }
.tv-bar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; flex-shrink: 0; }
.tv-filters { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; min-width: 0; }
.tv-filters button { padding: 4px 12px; border-radius: 14px; background: var(--sidebar); color: var(--muted); font-size: 14px; font-weight: 500; border: 1px solid transparent; }
.tv-filters button:hover { color: var(--text); }
.tv-filters button.on { background: var(--active); color: var(--header); border-color: var(--accent); }
.tv-cols { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 0 16px 16px; }
.tv-col { background: var(--sidebar); border-radius: 8px; display: flex; flex-direction: column; min-height: 0; border: 2px solid transparent; }
.tv-col.over { border-color: var(--accent); }
.tv-col h3 { margin: 0; padding: 12px 14px 8px; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.tv-col h3 .n { background: var(--rail); color: var(--text); border-radius: 10px; padding: 0 7px; font-size: 12px; }
.tv-list { flex: 1; overflow-y: auto; padding: 0 8px 8px; display: flex; flex-direction: column; gap: 8px; scrollbar-width: thin; }
.tv-empty { color: var(--faint); font-size: 14px; padding: 8px 6px; }
.task { background: var(--chat); border-radius: 6px; padding: 10px 12px; border-left: 3px solid var(--faint); cursor: grab; }
.task.mine { border-left-color: var(--accent); }
.task.dragging { opacity: .4; }
.task .t-title { color: var(--header); font-weight: 500; overflow-wrap: anywhere; }
.task.done .t-title { text-decoration: line-through; color: var(--muted); }
.task .t-notes { font-size: 13px; color: var(--muted); margin-top: 2px; white-space: pre-wrap; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.task .t-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; font-size: 12px; color: var(--muted); }
.task .t-who { display: inline-flex; align-items: center; gap: 5px; color: var(--text); font-weight: 500; }
.task .t-who .avatar { width: 18px; height: 18px; font-size: 10px; }
.task .t-due.late { color: var(--red); font-weight: 600; }
.task .t-by { margin-left: auto; }
.task .t-actions { display: flex; gap: 4px; margin-top: 8px; }
.task .t-actions button { height: 26px; padding: 0 8px; border-radius: 4px; background: var(--sidebar); color: var(--muted); font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.task .t-actions button:hover { background: var(--active); color: var(--header); }
.task .t-actions .ic { width: 14px; height: 14px; }
.task .t-actions .flip { transform: scaleX(-1); }
.task .t-actions .spacer { flex: 1; }
.task-dialog { text-align: left; max-width: 520px; }
.task-dialog h2 { text-align: center; margin-bottom: 20px; }
.task-dialog textarea, .task-dialog select { width: 100%; background: var(--rail); border: 0; border-radius: 4px; padding: 10px; color: var(--text); font: inherit; outline: 0; margin-bottom: 16px; resize: vertical; }
.task-dialog textarea:focus, .task-dialog select:focus { box-shadow: 0 0 0 2px var(--accent); }
.task-dialog input[type="date"] { color-scheme: dark; }
.td-row { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 12px; }
.task-dialog .new-roles { margin-bottom: 16px; }
.td-delete { margin-right: auto; }

/* ---- Owner's overview ---- */
.ov-attention { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.ov-alert { display: flex; align-items: flex-start; gap: 10px; padding: 10px 14px; border-radius: 8px; background: var(--sidebar); border-left: 3px solid var(--faint); }
.ov-alert i { width: 10px; height: 10px; border-radius: 50%; background: var(--faint); margin-top: 6px; flex-shrink: 0; }
.ov-alert.bad { border-left-color: var(--red); } .ov-alert.bad i { background: var(--red); }
.ov-alert.warn { border-left-color: var(--yellow); } .ov-alert.warn i { background: var(--yellow); }
.ov-alert.good { border-left-color: var(--green); } .ov-alert.good i { background: var(--green); }
.ov-section h3 { margin: 26px 0 10px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; color: #b5bac1; }
.ov-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.ov-fact { background: var(--sidebar); border-radius: 8px; padding: 12px 14px; }
.ov-value { font-size: 24px; font-weight: 700; color: var(--header); line-height: 1.2; }
.ov-label { font-size: 13px; color: #b5bac1; }
.ov-note { font-size: 12px; color: var(--yellow); margin-top: 2px; }
.ov-line { margin: 6px 0; color: var(--text); }
.ov-chart { display: flex; align-items: flex-end; gap: 4px; height: 120px; margin: 12px 0 8px; padding: 0 2px; }
.ov-bar { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 3px; }
.ov-bar i { width: 100%; max-width: 34px; min-height: 2px; background: var(--accent); border-radius: 3px 3px 0 0; opacity: .65; }
.ov-bar.today i { opacity: 1; }
.ov-bar .n { font-size: 11px; color: var(--muted); height: 14px; }
.ov-bar .d { font-size: 11px; color: var(--faint); }
.ov-person { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 6px; background: var(--sidebar); }
.ov-person .avatar { position: relative; flex-shrink: 0; }
.ov-ptext { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ov-ptext span { font-size: 13px; color: var(--muted); }
.ov-pstat { font-size: 13px; color: #b5bac1; text-align: right; }
.ov-table { width: 100%; border-collapse: collapse; background: var(--sidebar); border-radius: 8px; overflow: hidden; font-size: 14px; }
.ov-table th, .ov-table td { padding: 8px 12px; text-align: left; }
.ov-table th { font-size: 12px; font-weight: 700; text-transform: uppercase; color: #b5bac1; background: var(--rail); }
.ov-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ov-table tr.total td { border-top: 1px solid var(--line); font-weight: 600; color: var(--header); }
.ov-section .set-hint { margin: 10px 0 0; }
.ov-path { font: 12px/1.5 Consolas, Menlo, monospace; color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 6px; }
.ov-stamp { margin-top: 20px; font-size: 12px; color: var(--faint); }
.admin-list .ov-person + .ov-person { margin-top: 6px; }

/* Buttons the owner's permissions take away are hidden, even though their class sets a display. */
.icon-btn[hidden], .cat-add[hidden], .btn[hidden], .set-label[hidden], .admin-list[hidden], .new-roles[hidden], .set-hint[hidden] { display: none; }
.ov-section .ar-sub { margin: -4px 0 10px; }

/* ---- Permissions (owner) ---- */
.perm-presets { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 4px; }
.perm-presets span { color: var(--muted); font-size: 14px; }
.perm-row { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 6px; background: var(--sidebar); margin-bottom: 6px; flex-wrap: wrap; }
.perm-row .p-label { flex: 1; min-width: 200px; }
.perm-row select, .perm-row input.num { height: 34px; background: var(--rail); border: 0; border-radius: 4px; padding: 0 10px; color: var(--text); font: inherit; font-size: 14px; outline: 0; }
.perm-row select:focus, .perm-row input:focus { box-shadow: 0 0 0 2px var(--accent); }
.perm-row input.num { width: 90px; }
.perm-row .new-roles { flex-basis: 100%; margin: 0; }
.perm-row .p-note { flex-basis: 100%; font-size: 13px; color: var(--muted); }

/* ---- Bug board extras ---- */
.sev { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; padding: 1px 6px; border-radius: 4px; background: var(--rail); color: var(--muted); }
.sev.high { color: #fff; background: #c9772c; }
.sev.blocker { color: #fff; background: var(--red); }
.sev.low { color: var(--faint); }
.task.dup { opacity: .6; }
.task .t-dup { color: var(--yellow); font-weight: 600; }
.task .t-shots { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.task .t-shots img { width: 72px; height: 54px; object-fit: cover; border-radius: 4px; cursor: zoom-in; background: var(--rail); }
.task-dialog input[type="file"] { padding: 7px; font-size: 13px; }
.td-row.bug-only { grid-template-columns: 1fr 1.4fr; }
.td-row[hidden], #taskRolesWrap[hidden], #bugShotWrap[hidden] { display: none; }

/* ---- Studio tools: voice lines, cast, port tracker ---- */
.app-view { display: none; flex: 1; flex-direction: column; min-height: 0; }
body.view-app .app-view { display: flex; }
body.view-app .messages, body.view-app .composer, body.view-app .search, body.view-app .jump, body.view-app #pinsBtn, body.view-app .missed, body.view-tasks .missed { display: none; }
.app-body { flex: 1; min-height: 0; overflow-y: auto; padding: 0 16px 24px; }
.tv-bar select { height: 32px; background: var(--sidebar); border: 0; border-radius: 4px; padding: 0 10px; color: var(--text); font: inherit; font-size: 14px; outline: 0; max-width: 100%; min-width: 0; }
.tv-bar select:focus { box-shadow: 0 0 0 2px var(--accent); }
.tv-bar .grow { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; }
.app-empty { color: var(--muted); padding: 32px 8px; text-align: center; max-width: 520px; margin: 0 auto; }
.app-empty b { color: var(--header); display: block; font-size: 18px; margin-bottom: 6px; }
.progress { height: 8px; border-radius: 4px; background: var(--rail); overflow: hidden; flex: 1; min-width: 80px; max-width: 320px; }
.progress i { display: block; height: 100%; background: var(--green); border-radius: 4px; transition: width .2s; }
.progress-row { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 14px; margin: 0 0 14px; flex-wrap: wrap; }
.sc-scene { color: var(--text); font-style: italic; margin: 0 0 12px; }
.vline { display: grid; grid-template-columns: 34px 1fr; gap: 0 10px; padding: 12px; border-radius: 8px; background: var(--sidebar); margin-bottom: 8px; border-left: 3px solid var(--faint); }
.vline.recorded { border-left-color: var(--yellow); }
.vline.picked { border-left-color: var(--green); }
.vline .v-n { color: var(--muted); font-weight: 700; text-align: right; line-height: 22px; }
.vline .v-who { font-weight: 700; color: var(--header); letter-spacing: .02em; }
.vline .v-actor { color: var(--muted); font-weight: 400; font-size: 13px; margin-left: 6px; }
.vline .v-dir { color: var(--muted); font-style: italic; font-size: 14px; }
.vline .v-text { font-size: 17px; line-height: 24px; margin: 2px 0 8px; overflow-wrap: anywhere; }
.vline .v-takes { display: flex; flex-direction: column; gap: 6px; }
.take { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: var(--chat); border-radius: 6px; padding: 6px 8px; border: 1px solid transparent; }
.take.picked { border-color: var(--green); }
.take audio { height: 32px; flex: 1; min-width: 180px; max-width: 360px; }
.take .tk-who { font-size: 13px; color: var(--muted); white-space: nowrap; }
.take .tk-pick { height: 28px; padding: 0 10px; border-radius: 4px; background: var(--sidebar); color: var(--muted); font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.take .tk-pick .ic { width: 14px; height: 14px; }
.take .tk-pick:hover { color: var(--header); background: var(--active); }
.take.picked .tk-pick { background: var(--green); color: #fff; }
.v-rec { margin-top: 8px; height: 30px; padding: 0 12px; border-radius: 15px; background: var(--chat); border: 1px solid #4e5058; color: var(--text); font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.v-rec .ic { width: 15px; height: 15px; }
.v-rec:hover { border-color: var(--accent); color: var(--header); }
.v-rec.recording { background: var(--red); border-color: var(--red); color: #fff; }
.v-rec:disabled { opacity: .5; cursor: default; }
.cast-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.cast-card { background: var(--sidebar); border-radius: 8px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.cast-card h3 { margin: 0; font-size: 18px; color: var(--header); display: flex; align-items: center; gap: 8px; }
.cast-card h3 button { margin-left: auto; }
.cast-card .cc-actor { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.cast-card .cc-actor.none { color: var(--muted); font-weight: 400; font-style: italic; }
.cast-card .cc-actor .avatar { width: 24px; height: 24px; font-size: 11px; }
.cast-card .cc-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; color: var(--muted); }
.cast-card .cc-text { font-size: 14px; color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.cast-card .progress-row { margin: 2px 0 0; font-size: 13px; }
.port-group h3 { margin: 18px 0 8px; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; color: var(--muted); }
.port-row { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 6px; background: var(--sidebar); margin-bottom: 6px; border-left: 3px solid var(--faint); }
.port-row.doing { border-left-color: var(--yellow); }
.port-row.done { border-left-color: var(--green); }
.port-row select { height: 30px; background: var(--chat); border: 0; border-radius: 4px; padding: 0 8px; color: var(--text); font: inherit; font-size: 13px; outline: 0; flex-shrink: 0; }
.port-row .pr-main { flex: 1; min-width: 0; }
.port-row .pr-name { font-weight: 500; color: var(--header); overflow-wrap: anywhere; }
.port-row.done .pr-name { color: var(--muted); }
.port-row .pr-notes { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.port-row .pr-owner { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; flex-shrink: 0; }
.port-row .pr-owner .avatar { width: 20px; height: 20px; font-size: 10px; }
.small-btn { height: 28px; padding: 0 10px; border-radius: 4px; background: var(--chat); color: var(--muted); font-size: 12px; font-weight: 600; flex-shrink: 0; }
.small-btn:hover { background: var(--active); color: var(--header); }
#formFields label { margin-top: 0; }
#formFields textarea.tall { min-height: 220px; font: 14px/1.4 Consolas, Menlo, monospace; }
#formFields .hint { font-size: 12px; color: var(--muted); margin: -10px 0 14px; }

/* ---- Search everywhere, and "while you were away" ---- */
.search-pop .pp-section { padding: 10px 16px 4px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; color: var(--muted); }
.search-pop .so-kind { font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--link); margin-right: 6px; }
.search-pop mark { background: rgba(240,178,50,.35); color: inherit; border-radius: 2px; }
.missed { margin: 8px 16px 0; background: var(--sidebar); border-radius: 8px; border-left: 3px solid var(--yellow); padding: 8px 8px 8px 14px; flex-shrink: 0; max-height: 40vh; overflow-y: auto; }
.missed[hidden] { display: none; }
.ms-head { display: flex; align-items: center; gap: 8px; color: var(--header); }
.ms-head > .ic { width: 16px; height: 16px; color: var(--yellow); }
.ms-head button { margin-left: auto; }
.ms-row { display: flex; gap: 10px; align-items: baseline; padding: 4px 0; font-size: 14px; }
.ms-row button { color: var(--link); font-weight: 600; white-space: nowrap; }
.ms-row button:hover { text-decoration: underline; }
.ms-row .ms-n { color: var(--muted); font-size: 12px; white-space: nowrap; }
.msg.kind-build { border-left: 3px solid var(--accent); background: rgba(88,101,242,.06); }

.scrim { display: none; }

/* ---- Smaller screens ---- */
@media (max-width: 1200px) {
  .thread-panel { position: fixed; right: 0; top: 0; bottom: 0; z-index: 6; width: min(420px, 100vw); box-shadow: -4px 0 16px rgba(0,0,0,.4); padding-bottom: 4px; }
}
@media (max-width: 800px) {
  .tv-cols { grid-template-columns: 1fr; overflow-y: auto; }
  .tv-col { min-height: 140px; }
  .tv-list { overflow: visible; }
  .td-row { grid-template-columns: 1fr; gap: 0; }
}
@media (max-width: 1000px) {
  .topbar .topic, .topbar .divider { display: none; }
  .topbar .title { flex: 1; }
}
/* Between 901 and 1000px the member list drops in over the chat (there is room beside the sidebar). */
@media (min-width: 901px) and (max-width: 1000px) {
  .members { display: none; position: fixed; right: 0; top: 48px; bottom: 0; z-index: 5; box-shadow: -4px 0 12px rgba(0,0,0,.3); }
  body.members-open .members { display: block; }
}
/* Phones and small tablets: the channel list and the member list are panels that slide over
   the chat, with a dark scrim behind them. The chat itself always keeps the full width. */
@media (max-width: 900px) {
  .rail { display: none; }
  .nav-toggle { display: grid; }
  .main { width: 100%; min-width: 0; }
  .sidebar, .members {
    position: fixed; top: 0; bottom: 0; z-index: 45; display: flex; flex-direction: column;
    transition: transform .35s cubic-bezier(.22, 1.2, .36, 1); will-change: transform;
    padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom);
  }
  .sidebar { left: 0; width: min(300px, 85vw); transform: translateX(-105%); }
  .members { right: 0; width: min(300px, 82vw); transform: translateX(105%); display: block; overflow-y: auto; }
  body.members-closed .members, body.thread-open .members { display: block; }
  body.nav-open .sidebar { transform: none; box-shadow: 4px 0 16px rgba(0,0,0,.4); }
  body.members-open .members { transform: none; box-shadow: -4px 0 16px rgba(0,0,0,.4); }
  .scrim { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 44; opacity: 0; pointer-events: none; transition: opacity .25s ease; }
  body.nav-open .scrim, body.members-open .scrim { opacity: 1; pointer-events: auto; }
  /* While a finger is dragging a panel it follows the finger exactly. */
  .sidebar.dragging, .members.dragging { transition: none; }
  /* Comfortable tap targets. */
  .sidebar .channel, .members .member, .icon-btn { min-height: 44px; }
  .icon-btn { min-width: 44px; }
}
@media (max-width: 700px) {
  .search { display: none; }
  .msg { padding-right: 16px; }
  .sys { padding-right: 16px; }
  .topbar { padding: 0 8px; }
  .composer { padding: 0 8px; }
  .jump { right: 12px; }
  .emoji-pop { grid-template-columns: repeat(6, 36px); }
  .actions { right: 8px; }

  /* Settings on a phone: first a stacked menu (You / Server / Staff), then the page you
     picked, each under a bar that stays on top with Back and Close in it. */
  .settings { flex-direction: column; }
  .set-bar {
    display: flex; align-items: center; gap: 4px; flex-shrink: 0; position: sticky; top: 0; z-index: 2;
    padding: 4px 8px; padding-top: calc(4px + env(safe-area-inset-top));
    background: var(--sidebar); border-bottom: 1px solid rgba(255,255,255,.06);
  }
  .set-bar-title { flex: 1; font-weight: 600; font-size: 17px; color: var(--header); padding-left: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .settings.at-menu #settingsBack { visibility: hidden; }
  .set-close { display: none; }
  .set-nav { width: auto; flex: 1; padding: 8px 12px calc(24px + env(safe-area-inset-bottom)); gap: 2px; }
  .set-tab { min-height: 48px; padding: 0 14px; font-size: 16px; border-radius: 8px; }
  .set-head { padding: 16px 14px 6px; }
  .set-nav .set-head.staff-only { margin-top: 0; }
  .set-tab.danger { margin-top: 8px; }
  .settings.at-menu .set-body { display: none; }
  .settings.at-page .set-nav { display: none; }
  .settings.at-menu .set-tab.active { background: none; color: #b5bac1; }
  .set-body { padding: 16px 16px calc(32px + env(safe-area-inset-bottom)); }

  /* Team cards: details on their own lines, then Edit and Remove as one full-width row. */
  .admin-row { flex-direction: column; align-items: stretch; gap: 10px; }
  .admin-row .ar-title { flex-wrap: wrap; row-gap: 4px; }
  .admin-row .ar-actions { display: flex; gap: 8px; }
  .admin-row .ar-actions .btn { flex: 1; min-height: 44px; }
  /* Commands: the command on one line, what it does dimmed underneath. */
  .help dl { display: block; }
  .help dt { margin-top: 12px; }
  .help dd { margin: 2px 0 0; color: var(--muted); }
  .audit-filters { flex-direction: column; }
  .audit-filters select, .audit-filters input { width: 100%; min-height: 44px; }
}
.set-bar { display: none; }
@media (max-width: 700px) { .set-bar { display: flex; } }

/* Long words, links and wide tables never push a message off the side of the screen. */
.msg .text, .msg .text * { overflow-wrap: anywhere; max-width: 100%; }
.table-wrap { display: block; overflow-x: auto; max-width: 100%; margin: 6px 0; border: 1px solid rgba(255,255,255,.08); border-radius: 8px; -webkit-overflow-scrolling: touch; }
.msg .text .table-wrap table { border-collapse: collapse; font-size: 14px; max-width: none; white-space: normal; }
.msg .text .table-wrap th, .msg .text .table-wrap td { padding: 6px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid rgba(255,255,255,.06); overflow-wrap: normal; white-space: nowrap; max-width: none; }
.msg .text .table-wrap td.wide { white-space: normal; min-width: 220px; max-width: 360px; }
.table-wrap th { background: var(--sidebar); color: var(--header); font-weight: 600; position: sticky; top: 0; }
.table-wrap tr:last-child td { border-bottom: none; }

/* Channel groups in the sidebar, and the project switcher. */
.cat-head { display: flex; align-items: center; gap: 4px; width: 100%; margin-top: 14px; padding: 4px 4px 4px 0; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); text-align: left; }
.cat-head:first-child { margin-top: 2px; }
.cat-head .ic { width: 12px; height: 12px; transition: transform .15s ease; }
.cat-head.closed .ic { transform: rotate(-90deg); }
.cat-head:hover { color: var(--text); }
.cat-head.static { cursor: default; padding-left: 16px; }
.cat-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--header); margin-left: auto; margin-right: 6px; }
.project-pick { width: 100%; margin: 2px 0 4px; background: var(--rail); color: var(--text); border: 1px solid rgba(255,255,255,.08); border-radius: 6px; padding: 6px 8px; font: inherit; font-size: 13px; }

/* Open threads along the top of a channel, and the jump back to where you stopped reading. */
.thread-strip { display: flex; align-items: center; gap: 6px; padding: 6px 16px; overflow-x: auto; flex-shrink: 0; border-bottom: 1px solid rgba(255,255,255,.06); scrollbar-width: none; }
.thread-strip[hidden] { display: none; }
.ts-label { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.ts-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 260px; padding: 4px 10px; border-radius: 999px; background: var(--sidebar); color: var(--text); font-size: 13px; white-space: nowrap; flex-shrink: 0; }
.ts-chip span:first-of-type { overflow: hidden; text-overflow: ellipsis; }
.ts-chip:hover { background: var(--hover); }
.ts-chip .ic { width: 14px; height: 14px; color: var(--muted); flex-shrink: 0; }
.ts-n { color: var(--muted); font-size: 12px; }
.jump.unread { top: 64px; bottom: auto; left: 50%; right: auto; transform: translateX(-50%); z-index: 4; }
.jump.unread[hidden] { display: none; }
body.view-browser .thread-strip, body.view-tasks .thread-strip, body.view-app .thread-strip,
body.view-browser .jump.unread, body.view-tasks .jump.unread, body.view-app .jump.unread { display: none; }

/* Forum channels, decisions, answers. */
.msg.forum-post { border-left: 3px solid rgba(255,255,255,.12); margin-top: 6px; }
.msg.forum-post .text::first-line { font-weight: 600; color: var(--header); }
.msg.kind-decision { border-left: 3px solid #3ba55d; background: rgba(59,165,93,.07); }
.tag.answer { background: #3ba55d; color: #fff; }
.saved-item { background: var(--sidebar); border: 1px solid rgba(255,255,255,.06); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; max-width: 760px; }
.saved-item .text { white-space: pre-wrap; overflow-wrap: anywhere; margin: 6px 0; line-height: 1.5; }
.saved-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px; font-size: 14px; }
.saved-where { color: var(--muted); font-size: 12px; }
.search-filters { padding: 8px 12px 0; margin-bottom: 4px; }
.search-filters select, .search-filters input { font-size: 13px; padding: 4px 8px; min-width: 0; flex: 1 1 110px; }

/* Staff button by the gear, the wide owner page, and rows that open a person. */
.staff-btn { position: relative; }
.staff-btn[hidden] { display: none; }
.staff-btn .badge { position: absolute; top: 0; right: 0; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: #ef4b4b; color: #fff; font-size: 10px; font-weight: 700; line-height: 16px; text-align: center; }
.set-panel.wide { max-width: 900px; }
.ov-person.as-button { width: 100%; text-align: left; border-radius: 6px; }
.ov-person.as-button:hover { background: var(--hover); }
.pc-flag.lead { color: #f0b232; }

/* The team agreement: the sign screen, and the copy in Settings. */
.agree-dialog { max-width: 640px; max-height: calc(100vh - 32px); display: flex; flex-direction: column; overflow-y: auto; }
.agreement-text { background: var(--sidebar); border: 1px solid rgba(255,255,255,.08); border-radius: 8px; padding: 14px 16px; margin-bottom: 12px; color: var(--text); line-height: 1.55; }
.agree-dialog .agreement-text { max-height: 38vh; min-height: 140px; overflow-y: auto; }
.agreement-text p { margin: 0 0 10px; color: var(--text); }
.agreement-text ol { margin: 0; padding-left: 22px; }
.agreement-text li { margin-bottom: 10px; }
.agreement-text b { color: var(--header); }
.agree-check { display: flex !important; align-items: center; gap: 10px; text-transform: none !important; font-size: 15px !important; font-weight: 500 !important; color: var(--text) !important; min-height: 44px; margin-bottom: 4px !important; }
.agree-check[hidden] { display: none !important; }
.agree-check input { width: 20px !important; height: 20px; margin: 0 !important; flex-shrink: 0; padding: 0 !important; accent-color: var(--accent); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.tour-dots { margin-right: auto; align-self: center; color: var(--muted); font-size: 13px; }

/* Invites and join requests. */
.join-card { background: var(--sidebar); border: 1px solid rgba(255,255,255,.08); border-left: 4px solid #80848e; border-radius: 8px; padding: 14px; margin-bottom: 12px; }
.join-card.green { border-left-color: #3ba55d; }
.join-card.amber { border-left-color: #f0b232; }
.join-card.red { border-left-color: #ef4b4b; }
.join-card .jc-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.join-card .jc-head b { color: var(--header); font-size: 16px; }
.join-card .jc-line { font-size: 14px; color: #c9ccd3; margin: 2px 0; overflow-wrap: anywhere; }
.join-card .jc-line span { color: var(--muted); }
.join-card .jc-answer { margin: 8px 0; padding: 8px 10px; background: var(--chat); border-radius: 6px; font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.join-card .jc-hint { font-size: 13px; margin: 6px 0; }
.join-card.green .jc-hint { color: #3ba55d; }
.join-card.amber .jc-hint { color: #f0b232; }
.join-card.red .jc-hint { color: #fa777c; }
.join-card .jc-roles { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.join-card .jc-roles label { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 10px; border-radius: 999px; background: var(--chat); font-size: 13px; cursor: pointer; }
.join-card .jc-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.join-card .jc-actions .btn { min-height: 40px; }
.invite-form { background: var(--sidebar); border-radius: 8px; padding: 14px; margin-bottom: 12px; display: grid; gap: 10px; }
.invite-form input[type="text"], .invite-form select { width: 100%; background: var(--chat); color: var(--text); border: 1px solid rgba(255,255,255,.08); border-radius: 6px; padding: 9px 10px; font: inherit; min-height: 40px; }
.invite-form .if-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.invite-link { font: 13px/1.4 Consolas, Menlo, monospace; color: var(--muted); overflow-wrap: anywhere; user-select: all; }
.pill { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: rgba(255,255,255,.08); color: var(--muted); }
.pill.good { background: rgba(59,165,93,.18); color: #3ba55d; }
.pill.warn { background: rgba(240,178,50,.18); color: #f0b232; }
.pill.bad { background: rgba(239,75,75,.18); color: #fa777c; }
.btn.outline-danger { background: transparent; border: 1px solid rgba(239,75,75,.45); color: #fa777c; }
.btn.outline-danger:hover { background: rgba(239,75,75,.12); }
@media (max-width: 700px) { .invite-form .if-row { grid-template-columns: 1fr; } }

/* Audit log: filters, and repeats folded into one row. */
.audit-filters { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.audit-filters select, .audit-filters input { background: var(--sidebar); color: var(--text); border: 1px solid rgba(255,255,255,.08); border-radius: 6px; padding: 6px 10px; font: inherit; }
.audit-row.group { cursor: pointer; }
.audit-row.group .au-text::after { content: " (tap to expand)"; color: var(--muted); font-size: 12px; }
.audit-row.group.open .au-text::after { content: " (tap to fold)"; }
.audit-row.child { padding-left: 28px; opacity: .9; }

/* New messages fade in, buttons answer a touch. All of it is off for people who ask for less motion. */
@keyframes msg-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.msg.new { animation: msg-in .22s ease-out; }
.btn, .icon-btn, .channel, .member, .set-tab { transition: transform .12s ease, background .15s ease; }
.btn:active, .icon-btn:active, .set-tab:active { transform: scale(.96); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Invite QR code: always dark on white so phones can scan it in any theme. */
.qr-img { display: block; width: min(260px, 70vw); height: auto; margin: 12px auto; background: #fff; border-radius: 8px; padding: 8px; }


/* ---------- Hangout Radio and Watch Together ---------- */
.radio-stage { position: fixed; right: 16px; bottom: 96px; width: 300px; z-index: 40; background: #000; border-radius: 10px; overflow: hidden; box-shadow: 0 8px 28px rgba(0,0,0,.45); display: flex; flex-direction: column; }
.radio-stage[hidden] { display: none; }
.radio-stage .rs-video { position: relative; aspect-ratio: 16 / 9; background: #000; }
.radio-stage .rs-video > iframe, .radio-stage .rs-video > #radioYt, .radio-stage .rs-video > video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.radio-stage .rs-video > video { display: block; }
.radio-stage .rs-video.show-yt > video, .radio-stage .rs-video:not(.show-yt) > iframe, .radio-stage .rs-video:not(.show-yt) > #radioYt { display: none; }
.radio-stage.audio-only .rs-video { aspect-ratio: auto; height: 0; }
.radio-stage .rs-bar { display: flex; align-items: center; gap: 4px; background: var(--panel, #1e1f22); padding: 4px 4px 4px 10px; }
.radio-stage .rs-title { flex: 1; min-width: 0; text-align: left; background: none; border: 0; color: var(--text, #ddd); font: inherit; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; min-height: 36px; }
.radio-stage.big { right: auto; bottom: auto; border-radius: 10px; box-shadow: none; }
.radio-stage.big .rs-video { aspect-ratio: auto; flex: 1; }
.radio-stage.big .rs-bar { display: none; }
.radio-stage.big.audio-only { display: none; }
.rs-reactions { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.rs-float { position: absolute; bottom: 8px; font-size: 28px; animation: rs-rise 2.6s ease-out forwards; }
@keyframes rs-rise { 0% { transform: translateY(0) scale(.8); opacity: 0; } 15% { opacity: 1; } 100% { transform: translateY(-220px) scale(1.2); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .rs-float { animation: none; bottom: 40%; } }

.radio-page { max-width: 900px; margin: 0 auto; padding: 12px 16px 40px; display: flex; flex-direction: column; gap: 10px; }
.radio-slot { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: 10px; display: grid; place-items: center; }
.radio-slot.empty, .radio-slot.audio { aspect-ratio: auto; min-height: 90px; background: var(--panel-2, #2b2d31); }
.radio-slot .rs-note { color: #bbb; padding: 16px; text-align: center; }
.radio-now { display: flex; flex-direction: column; gap: 6px; }
.rn-title { font-size: 18px; font-weight: 600; overflow-wrap: anywhere; }
.rn-meta, .rn-sub, .rn-clock { color: var(--muted); font-size: 13px; }
.radio-seek { cursor: default; height: 8px; }
.radio-seek.can { cursor: pointer; }
.rn-controls, .rn-reacts { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rn-controls .icon-btn, .rn-controls .btn { min-height: 44px; min-width: 44px; }
.react-btn { font-size: 20px; min-width: 44px; min-height: 44px; border-radius: 8px; border: 1px solid var(--border, #3a3c42); background: none; cursor: pointer; }
.react-btn:disabled { opacity: .4; cursor: default; }
.radio-add { display: flex; gap: 8px; }
.radio-add input { flex: 1; min-width: 0; min-height: 40px; }
.radio-page h3 { margin: 14px 0 4px; font-size: 14px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.radio-list { display: flex; flex-direction: column; gap: 6px; }
.radio-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; background: var(--panel-2, #2b2d31); }
.rr-main { flex: 1; min-width: 0; }
.rr-title { overflow-wrap: anywhere; }
.rr-sub, .rr-log { color: var(--muted); font-size: 12px; }
.rr-acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 700px) {
  .radio-stage:not(.big) { right: 8px; left: 8px; width: auto; bottom: 84px; }
  .radio-row { flex-direction: column; align-items: stretch; }
  .rr-acts { justify-content: flex-start; }
}

.radio-page [hidden] { display: none !important; }


/* ---- Calls ---- */
.topbar .call-btn.live { color: var(--green); }
.call-stage { flex-shrink: 0; background: #1a1b1e; border-bottom: 1px solid var(--line); padding: 10px 16px 12px; display: flex; flex-direction: column; gap: 10px; max-height: 62vh; overflow-y: auto; }
.call-stage[hidden] { display: none; }
.call-stage [hidden] { display: none !important; }
.cs-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--header); font-weight: 600; font-size: 14px; }
.cs-top > .ic { width: 18px; height: 18px; color: var(--green); }
.cs-top .grow { flex: 1; }
.cs-badge { font-size: 12px; font-weight: 600; color: #fff; background: #a12828; border-radius: 10px; padding: 2px 9px; cursor: help; }
.cs-status { font-size: 13px; color: var(--yellow); font-weight: 500; }
.cs-top .icon-btn.on { color: var(--yellow); }
.cs-top .icon-btn.danger:hover { background: #da373c; color: #fff; }
.cs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.cs-tile { position: relative; background: var(--chat); border-radius: 8px; aspect-ratio: 16 / 10; display: grid; place-items: center; overflow: hidden; outline: 3px solid transparent; outline-offset: -3px; transition: outline-color .12s; }
.cs-tile.speaking { outline-color: var(--green); }
.cs-tile .avatar.lg { width: 56px; height: 56px; font-size: 22px; }
.cs-tile.speaking .avatar.lg { box-shadow: 0 0 0 3px var(--green); }
.cs-tile.has-video { background: #000; }
.cs-tile.screen { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
.cs-tile video { width: 100%; height: 100%; object-fit: cover; display: block; }
.cs-tile.screen video { object-fit: contain; }
.cs-name { position: absolute; left: 6px; bottom: 6px; max-width: calc(100% - 12px); display: flex; align-items: center; gap: 4px; background: rgba(0,0,0,.6); color: #fff; font-size: 12px; padding: 2px 7px; border-radius: 4px; }
.cs-name > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-name .ic { width: 14px; height: 14px; color: #fa777c; flex-shrink: 0; }
.cs-away { color: var(--yellow); }
.cs-mod { position: absolute; top: 4px; right: 4px; display: flex; gap: 2px; opacity: 0; transition: opacity .12s; }
.cs-tile:hover .cs-mod, .cs-tile:focus-within .cs-mod { opacity: 1; }
.cs-mod .icon-btn { background: rgba(0,0,0,.65); color: #fff; }
.cs-mod .icon-btn.danger:hover { background: #da373c; }
.cs-captions { background: rgba(0,0,0,.45); border-radius: 6px; padding: 6px 10px; font-size: 15px; line-height: 1.4; color: #fff; }
.cs-captions .cap b { color: var(--header); }
.cs-controls { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; }
.cs-btn { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--input); color: var(--text); }
.cs-btn .ic { width: 20px; height: 20px; }
.cs-btn:hover { background: var(--active); }
.cs-btn.off { background: #4e2a2c; color: #fa777c; }
.cs-btn.on { background: var(--accent); color: #fff; }
.cs-btn.leave { background: #da373c; color: #fff; }
.cs-btn.leave:hover { background: #a12828; }
.cs-ptt { font-size: 12px; color: var(--muted); border: 1px solid var(--line); border-radius: 10px; padding: 3px 9px; }
.cs-ptt.on { color: #fff; background: var(--green); border-color: transparent; }
.cs-note { font-size: 12px; color: var(--muted); text-align: center; }
.cs-settings { align-self: center; background: var(--panel); border-radius: 8px; padding: 10px 14px; display: flex; flex-direction: column; gap: 8px; min-width: min(320px, 100%); }
.cs-field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .02em; }
.cs-field select { background: var(--input); color: var(--text); border: 0; border-radius: 4px; padding: 8px; font: inherit; text-transform: none; letter-spacing: 0; font-weight: 400; font-size: 14px; }
.cs-check { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--text); cursor: pointer; }

.call-bar { flex-shrink: 0; display: flex; align-items: center; gap: 2px; padding: 6px 8px; background: var(--panel); border-bottom: 1px solid var(--line); }
.call-bar[hidden] { display: none; }
.cb-info { flex: 1; min-width: 0; text-align: left; display: flex; flex-direction: column; padding: 2px 4px; border-radius: 4px; }
.cb-info:hover { background: var(--hover); }
.cb-state { font-size: 13px; color: var(--green); }
.cb-state.connecting, .cb-state.reconnecting { color: var(--yellow); }
.cb-where { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.call-bar .icon-btn.off { color: #fa777c; }
.call-bar .icon-btn.leave:hover { background: #da373c; color: #fff; }

.channel .ic.ch-live { width: 14px; height: 14px; color: var(--green); flex-shrink: 0; }
.ch-call-people { padding: 0 0 4px 30px; display: flex; flex-direction: column; gap: 2px; }
.ch-call-who { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); min-height: 26px; }
.ch-call-who .avatar.xs { width: 20px; height: 20px; font-size: 10px; transition: box-shadow .12s; }
.ch-call-who.speaking .avatar.xs { box-shadow: 0 0 0 2px var(--green); }
.ch-call-who.speaking { color: var(--header); }
.ch-call-who > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-call-who .ic { width: 14px; height: 14px; color: #fa777c; flex-shrink: 0; }

.ring-pop { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 70; display: flex; align-items: center; gap: 12px; background: var(--float); color: var(--header); border-radius: 12px; padding: 12px 14px; box-shadow: 0 10px 32px rgba(0,0,0,.5); width: min(420px, calc(100vw - 32px)); border-left: 4px solid var(--green); }
.ring-pop[hidden] { display: none; }
.ring-pop .avatar { animation: ring-pulse 1.4s ease-out infinite; }
.ring-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ring-text b { font-size: 15px; overflow-wrap: anywhere; }
.ring-text span { font-size: 13px; color: var(--muted); }
.ring-btn { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: #fff; flex-shrink: 0; }
.ring-btn .ic { width: 20px; height: 20px; }
.ring-btn.yes { background: var(--green); }
.ring-btn.no { background: #da373c; }
@keyframes ring-pulse { 0% { box-shadow: 0 0 0 0 rgba(35,165,90,.7); } 100% { box-shadow: 0 0 0 14px rgba(35,165,90,0); } }
@media (prefers-reduced-motion: reduce) { .ring-pop .avatar { animation: none; } .cs-tile, .ch-call-who .avatar.xs { transition: none; } }
.new-voice { display: flex; align-items: center; gap: 8px; font-size: 14px; margin-top: 10px; cursor: pointer; text-transform: none; }

@media (max-width: 700px) {
  .call-stage { padding: 8px 12px 10px; max-height: 70vh; }
  .cs-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
  .cs-mod { opacity: 1; }
  .cs-btn { width: 48px; height: 48px; }
}

/* ---- The guide (Apps → help); its own styles come from help.html, all under .guide ---- */
.help-page { padding: 8px 8px 48px; }
.help-page .guide { margin: 0 auto; }
.login-help { margin: 14px 0 0; font-size: 14px; }
.login-help a { color: var(--link); }
.help-tab { display: inline-flex; align-items: center; text-decoration: none; }

/* ---- Hangout Radio: Spotify's player, and playlists in groups ---- */
.radio-stage .rs-video > #radioSpWrap { position: absolute; inset: 0; display: none; background: #000; }
.radio-stage .rs-video.show-sp > #radioSpWrap { display: block; }
.radio-stage .rs-video.show-sp > video { display: none; }
#radioSpWrap iframe { width: 100%; height: 100%; border: 0; display: block; }
.rn-note { background: #2b2d31; border-left: 3px solid var(--yellow); border-radius: 4px; padding: 8px 12px; font-size: 13px; margin: 8px 0; }
.rn-note[hidden] { display: none; }
.rn-note a { color: var(--link); }
.radio-list-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.radio-list-tools input[type="search"] { flex: 1; min-width: 200px; background: var(--input); color: var(--text); border: 0; border-radius: 4px; padding: 8px 10px; font: inherit; font-size: 14px; }
.radio-lists { display: flex; flex-direction: column; gap: 12px; }
.radio-group { background: #2b2d31; border-radius: 8px; padding: 6px 10px 4px; }
.rg-head { margin: 4px 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.rg-count { background: var(--input); color: var(--text); border-radius: 8px; padding: 0 6px; font-size: 11px; }
.rr-songs { color: var(--text); opacity: .8; }

/* ==== Hangout Radio, music-app style (overrides the plainer rules above) ==== */
.app-body:has(.radio-page) { background: #121212; }
.radio-page { max-width: 1040px; padding: 0 20px 48px; gap: 12px; color: #e8e8e8; }
.radio-page .rn-sub, .radio-page .rn-meta { color: #a7a7a7; }

/* The top: player on the left, what's playing on the right (stacked on narrow screens). */
.rp-hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(260px, 1fr); gap: 24px; align-items: end; margin: 0 -20px; padding: 24px 20px 20px; background: linear-gradient(180deg, #1f3b2b 0%, #18241d 55%, #121212 100%); }
.radio-slot { border-radius: 8px; overflow: hidden; background: #000; box-shadow: 0 10px 32px rgba(0,0,0,.5); }
.radio-slot.empty, .radio-slot.audio { aspect-ratio: 16 / 9; min-height: 0; background: #282828; }
.radio-slot .rs-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(.55); }
.radio-slot .rs-note { position: relative; color: #fff; font-weight: 600; text-shadow: 0 1px 6px rgba(0,0,0,.7); }
.radio-now { gap: 8px; min-width: 0; }
.rp-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: #fff; }
.radio-page .rn-title { font-size: clamp(22px, 3.2vw, 34px); font-weight: 800; line-height: 1.15; color: #fff; letter-spacing: -.01em; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.radio-page .rn-meta { font-size: 14px; }
.rp-progress { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.rp-time { font-size: 12px; color: #a7a7a7; min-width: 36px; font-variant-numeric: tabular-nums; }
.rp-time.end { text-align: right; }
.radio-page .radio-seek { height: 4px; max-width: none; background: #4d4d4d; border-radius: 2px; overflow: visible; position: relative; }
.radio-page .radio-seek i { background: #fff; border-radius: 2px; transition: width .9s linear; }
.radio-page .radio-seek.can:hover i { background: var(--green); }
.radio-page .radio-seek.can { cursor: pointer; padding: 6px 0; background-clip: content-box; }
.radio-page .rn-controls { gap: 16px; margin: 4px 0; }
.rp-ctl { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #b3b3b3; background: none; }
.rp-ctl .ic { width: 22px; height: 22px; }
.rp-ctl:hover:not(:disabled) { color: #fff; transform: scale(1.06); }
.rp-ctl:disabled { opacity: .35; }
.rp-play { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--green); color: #000; box-shadow: 0 8px 20px rgba(0,0,0,.35); transition: transform .1s, background .1s; }
.rp-play .ic { width: 26px; height: 26px; }
.rp-play:hover:not(:disabled) { transform: scale(1.05); background: #2bc56b; }
.rp-play:disabled { background: #535353; color: #121212; box-shadow: none; }
.rp-vote { border-radius: 20px; }
.radio-page .rn-reacts { gap: 6px; }
.radio-page .react-btn { font-size: 18px; min-width: 40px; min-height: 40px; border-radius: 20px; border: 0; background: rgba(255,255,255,.08); }
.radio-page .react-btn:hover:not(:disabled) { background: rgba(255,255,255,.16); }
.rp-listen { border-radius: 20px; padding: 0 18px; font-weight: 700; }
.rp-listen.on { background: var(--green); color: #000; }
.rp-mode { background: #2a2a2a; color: #fff; border: 0; border-radius: 20px; padding: 6px 12px; font: inherit; font-size: 13px; }

/* Adding a link: one rounded bar. */
.radio-page .radio-add { align-items: center; background: #242424; border-radius: 24px; padding: 4px 4px 4px 14px; gap: 8px; }
.radio-page .radio-add:focus-within { box-shadow: 0 0 0 2px #fff; }
.radio-page .radio-add input { background: none; border: 0; color: #fff; font: inherit; font-size: 14px; outline: none; min-height: 36px; padding: 0; }
.radio-page .radio-add .btn { border-radius: 20px; font-weight: 700; background: var(--green); color: #000; }
.rp-add-ic { width: 18px; height: 18px; color: #a7a7a7; flex-shrink: 0; }
.rp-help { font-size: 12px; }

/* Section headings. */
.rp-h { font-size: 22px; font-weight: 800; color: #fff; margin: 22px 0 4px; letter-spacing: -.01em; }

/* The queue: a track list. */
.rp-tracks { display: flex; flex-direction: column; }
.rp-track { display: grid; grid-template-columns: 32px minmax(0, 1fr) minmax(0, 160px) 64px 112px; align-items: center; gap: 12px; padding: 6px 12px; border-radius: 6px; background: none; min-height: 56px; }
.rp-track:hover { background: #2a2a2a; }
.rp-track-head { min-height: 32px; font-size: 12px; color: #a7a7a7; text-transform: uppercase; letter-spacing: .06em; border-bottom: 1px solid #2a2a2a; border-radius: 0; margin-bottom: 6px; }
.rp-track-head:hover { background: none; }
.rt-num { color: #a7a7a7; text-align: center; font-variant-numeric: tabular-nums; }
.rt-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.rt-text { min-width: 0; }
.rt-title { color: #fff; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-track.playing .rt-title { color: var(--green); }
.rt-sub { font-size: 13px; color: #a7a7a7; }
.rt-by { color: #a7a7a7; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rt-dur { color: #a7a7a7; font-size: 14px; text-align: right; font-variant-numeric: tabular-nums; }
.rt-acts { display: flex; justify-content: flex-end; gap: 2px; opacity: 0; transition: opacity .1s; }
.rp-track:hover .rt-acts, .rp-track:focus-within .rt-acts { opacity: 1; }
.rt-acts .icon-btn { color: #b3b3b3; }
.rt-acts .icon-btn:hover { color: #fff; background: rgba(255,255,255,.1); }
.rt-acts .flip .ic { transform: rotate(180deg); }
.rp-cover { width: 48px; height: 48px; border-radius: 4px; overflow: hidden; flex-shrink: 0; background: #282828; display: grid; place-items: center; }
.rp-cover.sm { width: 40px; height: 40px; }
.rp-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rp-cover.blank .ic { width: 45%; height: 45%; color: #7f7f7f; }
.rp-eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; }
.rp-eq i { width: 3px; height: 4px; background: var(--green); border-radius: 1px; }
.rp-eq.on i { animation: rp-eq 1s ease-in-out infinite; }
.rp-eq.on i:nth-child(2) { animation-delay: -.4s; }
.rp-eq.on i:nth-child(3) { animation-delay: -.7s; }
@keyframes rp-eq { 0%, 100% { height: 4px; } 50% { height: 14px; } }
.rp-empty { color: #a7a7a7; padding: 16px 12px; font-size: 14px; }
.rp-clear { align-self: flex-start; border-radius: 20px; }

/* Playlists: a search bar, then shelves of cards. */
.radio-page .radio-list-tools { gap: 10px; }
.rp-find { flex: 1; min-width: 220px; display: flex; align-items: center; gap: 8px; background: #242424; border-radius: 24px; padding: 0 14px; }
.rp-find:focus-within { box-shadow: 0 0 0 2px #fff; }
.rp-find .ic { width: 18px; height: 18px; color: #a7a7a7; flex-shrink: 0; }
.radio-page .rp-find input[type="search"] { background: none; border: 0; outline: none; color: #fff; padding: 10px 0; min-width: 0; flex: 1; border-radius: 0; }
.radio-list-tools .btn { border-radius: 20px; }
.radio-page .radio-lists { gap: 22px; }
.radio-page .radio-group { background: none; padding: 0; }
.radio-page .rg-head { font-size: 18px; font-weight: 800; color: #fff; text-transform: none; letter-spacing: 0; margin: 0 0 10px; }
.radio-page .rg-count { background: #2a2a2a; color: #a7a7a7; font-weight: 600; }
.pl-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; }
.pl-card { background: #181818; border-radius: 8px; padding: 12px; transition: background .15s; min-width: 0; }
.pl-card:hover { background: #282828; }
.pl-cover { position: relative; aspect-ratio: 1; border-radius: 6px; overflow: hidden; margin-bottom: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.5); background: #282828; display: grid; place-items: center; }
.pl-cover > .rp-cover { width: 100%; height: 100%; border-radius: 0; }
.pl-cover.mosaic { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.pl-cover.blank { background: linear-gradient(135deg, hsl(var(--hue, 140) 55% 42%), hsl(calc(var(--hue, 140) + 40) 50% 22%)); }
.pl-cover.blank > .ic { width: 40%; height: 40%; color: rgba(255,255,255,.85); }
.pl-play { position: absolute; right: 8px; bottom: 8px; width: 48px; height: 48px; border-radius: 50%; background: var(--green); color: #000; display: grid; place-items: center; box-shadow: 0 8px 16px rgba(0,0,0,.4); opacity: 0; transform: translateY(8px); transition: opacity .15s, transform .15s; }
.pl-play .ic { width: 22px; height: 22px; }
.pl-remove { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; border-radius: 50%; background: rgba(0,0,0,.65); color: #fff; display: grid; place-items: center; opacity: 0; transition: opacity .15s; }
.pl-remove .ic { width: 14px; height: 14px; }
.pl-remove:hover { background: #da373c; }
.pl-card:hover .pl-play, .pl-card:focus-within .pl-play { opacity: 1; transform: none; }
.pl-card:hover .pl-remove, .pl-card:focus-within .pl-remove { opacity: 1; }
.pl-play:hover { transform: scale(1.06) !important; background: #2bc56b; }
.pl-name { color: #fff; font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-sub { color: #a7a7a7; font-size: 13px; margin-top: 2px; }
.radio-page .rr-songs { font-size: 12px; color: var(--green); opacity: 1; margin-top: 4px; }

/* What happened, folded away. */
.rp-log { margin-top: 18px; color: #a7a7a7; }
.rp-log summary { cursor: pointer; font-weight: 700; color: #fff; font-size: 15px; }
.rp-log .radio-list { margin-top: 8px; gap: 2px; }

.radio-page .rn-note { background: #282828; border-left-color: var(--green); }

/* The small player in the corner while you chat. */
.radio-stage:not(.big) { background: #181818; border-radius: 8px; box-shadow: 0 12px 32px rgba(0,0,0,.6); }
.radio-stage:not(.big) .rs-bar { background: #181818; padding: 6px 6px 6px 12px; }
.radio-stage:not(.big) .rs-title { color: #fff; font-weight: 600; }
.radio-stage:not(.big) .rs-bar .icon-btn { color: #b3b3b3; border-radius: 50%; }
.radio-stage:not(.big) .rs-bar .icon-btn:hover { color: #fff; background: #2a2a2a; }

@media (hover: none) { .rt-acts, .pl-play, .pl-remove { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .rp-eq.on i { animation: none; height: 10px; } .pl-play, .pl-card, .rp-play { transition: none; } }
@media (max-width: 760px) {
  .rp-hero { grid-template-columns: 1fr; gap: 16px; padding-top: 16px; }
  .rp-track { grid-template-columns: 24px minmax(0, 1fr) 88px; }
  .rp-track .rt-by, .rp-track .rt-dur { display: none; }
  .pl-cards { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
}

/* ==== Hangout Radio: the player bar along the bottom, lyrics, search, autoplay ==== */
body.has-player { padding-bottom: 76px; box-sizing: border-box; }
.player-bar { position: fixed; left: 0; right: 0; bottom: 0; height: 76px; z-index: 45; background: #181818; border-top: 1px solid #282828; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) minmax(0, 1fr); align-items: center; gap: 12px; padding: 0 16px; color: #fff; }
.player-bar[hidden] { display: none; }
.pb-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pb-cover .rp-cover.pb { width: 52px; height: 52px; }
.pb-text { min-width: 0; text-align: left; background: none; border: 0; padding: 0; color: inherit; cursor: pointer; font: inherit; }
.pb-title { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pb-text:hover .pb-title { text-decoration: underline; }
.pb-artist { font-size: 12px; color: #a7a7a7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pb-mid { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.pb-controls { display: flex; align-items: center; gap: 14px; }
.pb-btn { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: #b3b3b3; background: none; }
.pb-btn .ic { width: 18px; height: 18px; }
.pb-btn:hover:not(:disabled) { color: #fff; }
.pb-btn:disabled { opacity: .35; }
.pb-btn.on { color: var(--green); }
.pb-play { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: #000; transition: transform .1s; }
.pb-play .ic { width: 16px; height: 16px; }
.pb-play:hover:not(:disabled) { transform: scale(1.06); }
.pb-play:disabled { background: #535353; }
.pb-progress { display: flex; align-items: center; gap: 8px; width: 100%; max-width: 560px; }
.pb-time { font-size: 11px; color: #a7a7a7; min-width: 34px; font-variant-numeric: tabular-nums; }
.pb-time.end { text-align: right; }
.pb-seek { flex: 1; height: 4px; background: #4d4d4d; border-radius: 2px; position: relative; }
.pb-seek.can { cursor: pointer; }
.pb-seek i { display: block; height: 100%; background: #fff; border-radius: 2px; transition: width .9s linear; }
.pb-seek.can:hover i { background: var(--green); }
.pb-right { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.pb-volume { display: flex; align-items: center; gap: 6px; color: #b3b3b3; }
.pb-volume .ic { width: 18px; height: 18px; }
.pb-volume input[type="range"] { width: 96px; height: 4px; -webkit-appearance: none; appearance: none; border-radius: 2px; background: linear-gradient(90deg, #fff var(--v, 80%), #4d4d4d var(--v, 80%)); cursor: pointer; }
.pb-volume input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%; background: #fff; }
.pb-volume input[type="range"]::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: #fff; }
body.has-player .radio-stage:not(.big) { bottom: 88px; }
body.has-player .toast { bottom: 96px; }

.lyrics-panel { position: fixed; right: 16px; bottom: 88px; width: min(380px, calc(100vw - 32px)); height: min(60vh, 520px); z-index: 44; background: linear-gradient(180deg, #2d6b46, #1b3d29); color: #fff; border-radius: 10px; box-shadow: 0 16px 40px rgba(0,0,0,.55); display: flex; flex-direction: column; overflow: hidden; }
.lyrics-panel[hidden] { display: none; }
.ly-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px 6px; }
.ly-head b { font-size: 16px; }
.ly-head .icon-btn { color: #fff; }
.ly-body { flex: 1; overflow-y: auto; padding: 8px 18px 40px; scroll-behavior: auto; }
.ly-line { font-size: 21px; font-weight: 800; line-height: 1.35; margin: 0 0 10px; color: rgba(0,0,0,.55); transition: color .2s; }
.ly-line.past { color: rgba(255,255,255,.75); }
.ly-line.lit { color: #fff; }
.ly-line.plain { font-size: 17px; font-weight: 700; color: #fff; margin-bottom: 4px; }
.ly-note { color: rgba(255,255,255,.85); font-size: 15px; padding: 12px 0; }
.ly-source { font-size: 11px; color: rgba(255,255,255,.6); margin-top: 18px; }

.rp-results { background: #181818; border-radius: 10px; padding: 8px; }
.rs-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 8px 8px; color: #fff; font-size: 14px; }
.rs-list { display: flex; flex-direction: column; max-height: 420px; overflow-y: auto; }
.rp-track.rs-row { grid-template-columns: minmax(0, 1fr) auto; }
.rs-add { border-radius: 16px; font-weight: 700; }
.rs-add.primary { background: var(--green); color: #000; }

.rp-auto { display: flex; align-items: center; gap: 12px; margin: 2px 0 8px; }
.rp-auto[hidden] { display: none; }
.rp-switch { width: 40px; height: 22px; border-radius: 11px; background: #535353; position: relative; flex-shrink: 0; transition: background .15s; }
.rp-switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.rp-switch.on { background: var(--green); }
.rp-switch.on::after { transform: translateX(18px); }
.rp-switch:disabled { opacity: .5; }
.rp-switch-text { display: flex; flex-direction: column; font-size: 13px; color: #a7a7a7; }
.rp-switch-text b { color: #fff; font-size: 14px; }

@media (prefers-reduced-motion: reduce) { .pb-seek i, .ly-line, .rp-switch, .rp-switch::after { transition: none; } }
@media (max-width: 760px) {
  body.has-player { padding-bottom: 64px; }
  .player-bar { height: 64px; grid-template-columns: minmax(0, 1fr) auto; padding: 0 10px; }
  .pb-progress, .pb-volume, .pb-right .pb-btn:not(.pb-lyrics-keep) { display: none; }
  .pb-mid { flex-direction: row; }
  .pb-controls { gap: 6px; }
  .pb-controls .pb-btn:first-child { display: none; }
  .player-bar::after { content: ''; position: absolute; left: 0; right: 0; top: -1px; height: 2px; background: #4d4d4d; }
  .pb-right { display: none; }
  .lyrics-panel { bottom: 72px; right: 8px; left: 8px; width: auto; }
  body.has-player .radio-stage:not(.big) { bottom: 76px; }
}
.rp-ctl.on { color: var(--green); }

/* ==== Hangout Dev (Apps → dev) ==== */
.dev-page { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 0; height: 100%; min-height: 420px; }
.dv-side { border-right: 1px solid var(--line); padding: 12px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.dv-h { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-top: 8px; }
.dv-projects, .dv-files { display: flex; flex-direction: column; gap: 2px; }
.dv-proj, .dv-file { text-align: left; border-radius: 6px; padding: 6px 8px; color: var(--text); background: none; display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.dv-proj { flex-direction: column; align-items: flex-start; gap: 0; }
.dv-proj span { font-size: 12px; color: var(--muted); }
.dv-proj:hover, .dv-file:hover { background: var(--hover); }
.dv-proj.on, .dv-file.on { background: var(--active); }
.dv-file b { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dv-dir { color: var(--muted); font-size: 12px; white-space: nowrap; }
.dv-ver { margin-left: auto; font-size: 11px; color: var(--faint); }
.dv-desc { font-size: 12px; color: var(--muted); padding: 0 8px 4px; }
.dv-who { font-size: 12px; color: var(--muted); padding: 4px 2px; }
.dv-filetools { display: flex; gap: 6px; flex-wrap: wrap; }
.dv-filetools[hidden] { display: none; }
.dv-note { color: var(--muted); font-size: 13px; padding: 6px 8px; }
.dv-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; padding: 10px 14px; gap: 8px; }
.dv-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dv-path { flex: 1; min-width: 0; font-size: 14px; overflow-wrap: anywhere; }
.dv-path span { color: var(--muted); font-size: 13px; }
.dv-tools { display: flex; gap: 6px; flex-wrap: wrap; }
.dv-empty { color: var(--muted); padding: 40px 0; text-align: center; }
.dv-empty[hidden], .dv-binary[hidden], .dv-editor[hidden], .dv-history[hidden] { display: none; }
.dv-editor { flex: 1; display: flex; flex-direction: column; min-height: 300px; }
.dv-text { flex: 1; min-height: 300px; resize: vertical; width: 100%; box-sizing: border-box; background: #1e1f22; color: #e3e5e8; border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; font: 13px/1.5 Consolas, "Cascadia Code", "Courier New", monospace; tab-size: 4; white-space: pre; overflow: auto; }
.dv-text:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.dv-text.ro { color: #c4c9ce; }
.dv-lines { font-size: 11px; color: var(--faint); padding-top: 4px; }
.dv-img { max-width: 100%; max-height: 420px; border-radius: 6px; margin-top: 8px; }
.dv-history { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: var(--panel); max-height: 45vh; overflow-y: auto; }
.dv-hhead { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.dv-hrow { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); }
.dv-hinfo { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dv-hinfo span { font-size: 12px; color: var(--muted); }
.dv-hacts { display: flex; gap: 6px; }
.dv-diff { margin-top: 8px; background: #1e1f22; border-radius: 6px; padding: 8px; font: 12px/1.45 Consolas, "Courier New", monospace; overflow-x: auto; }
.dv-dhead { color: var(--muted); font-family: inherit; margin-bottom: 6px; }
.dv-dl { white-space: pre; color: #c4c9ce; }
.dv-dl.add { background: rgba(35,165,90,.18); color: #b8f0c9; }
.dv-dl.del { background: rgba(242,63,67,.16); color: #ffc2c4; }
.dv-dl.gap { color: var(--faint); }
/* A message that is only a picture link */
.link-pic { display: block; max-width: min(420px, 100%); max-height: 320px; border-radius: 8px; margin-top: 4px; grid-column: 2; }

/* A name someone has in this room only (#rubber-room) */
.author.nicked { font-style: italic; }
.author.nicked::after { content: '✎'; font-style: normal; font-size: 11px; opacity: .55; margin-left: 4px; }

/* Bot accounts on the Run tab */
.dv-bots { grid-column: 2; display: flex; flex-direction: column; gap: 6px; }
.dv-bot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; }
.dv-bot .avatar { width: 28px; height: 28px; font-size: 13px; flex: none; }
.dv-bot-info { flex: 1 1 160px; min-width: 0; display: flex; flex-direction: column; }
.dv-bot-info b { font-size: 13px; }
.dv-bot-info span { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.dv-bot-info code { font: 11px Consolas, "Courier New", monospace; background: var(--hover); padding: 1px 5px; border-radius: 4px; }
.dv-bot .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint, #80848e); display: inline-block; margin-right: 4px; }
.dv-bot .dot.on { background: #3ad07a; }
.dv-bot .btn { padding: 3px 10px; }
.dv-run-row > .dv-bots + .btn { grid-column: 2; justify-self: start; }

/* Files / Run switch in the bar, and the Run tab */
.dv-tabs { display: inline-flex; background: var(--hover); border-radius: 8px; padding: 2px; gap: 2px; }
.dv-tab { background: none; color: var(--muted); border-radius: 6px; padding: 4px 12px; font-size: 13px; font-weight: 600; }
.dv-tab.on { background: var(--panel); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.dv-run { display: flex; flex-direction: column; gap: 10px; min-height: 0; flex: 1; }
.dv-run[hidden] { display: none; }
.dv-run-off { background: rgba(240,178,50,.12); color: var(--text); border-radius: 8px; padding: 8px 12px; font-size: 13px; }
.dv-run-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.dv-run-pill { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--hover); color: var(--muted); white-space: nowrap; }
.dv-run-pill::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: currentColor; margin-right: 6px; vertical-align: 1px; }
.dv-run-pill.ok { background: rgba(35,165,90,.16); color: #3ad07a; }
.dv-run-pill.warn { background: rgba(240,178,50,.16); color: #f0b232; }
.dv-run-pill.bad { background: rgba(242,63,67,.16); color: #ff6b6f; }
.dv-run-facts { flex: 1; min-width: 160px; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.dv-run-acts { display: flex; gap: 6px; }
.dv-run-row { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; gap: 4px 12px; align-items: start; padding: 8px 2px; border-top: 1px solid var(--line); font-size: 13px; }
.dv-run-row > b { padding-top: 2px; }
.dv-run-row > span { color: var(--muted); }
.dv-run-select { grid-column: 2; justify-self: start; max-width: 100%; background: var(--input, #1e1f22); color: var(--text); border: 1px solid var(--line); border-radius: 6px; padding: 5px 8px; font: inherit; }
.dv-run-hint { grid-column: 2; font-size: 12px; }
.dv-run-secrets > .btn { grid-column: 2; justify-self: start; }
.dv-secret-list { grid-column: 2; display: flex; flex-direction: column; gap: 4px; }
.dv-secret { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dv-secret code { font: 12px Consolas, "Courier New", monospace; background: var(--hover); padding: 2px 6px; border-radius: 4px; }
.dv-secret span { color: var(--muted); font-size: 12px; flex: 1 1 110px; }
.dv-secret .btn { padding: 3px 10px; }
.dv-run-loghead { display: flex; align-items: baseline; gap: 10px; border-top: 1px solid var(--line); padding-top: 8px; font-size: 13px; }
.dv-run-loghead span { color: var(--muted); font-size: 12px; }
.dv-log { flex: 1; min-height: 220px; max-height: 55vh; overflow: auto; background: #1e1f22; color: #dfe1e5; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font: 12px/1.5 Consolas, "Cascadia Code", "Courier New", monospace; }
.dv-logl { display: grid; grid-template-columns: 6.5em minmax(0, 1fr); gap: 10px; }
.dv-logl span { white-space: pre-wrap; overflow-wrap: anywhere; grid-column: 2; }
.dv-logl time { color: #80848e; white-space: nowrap; text-align: right; }
.dv-logl.sys span { color: #f0b232; }
.dv-log .dv-note { font-family: inherit; }
@media (max-width: 760px) {
  .dev-page { grid-template-columns: 1fr; height: auto; }
  .dv-side { border-right: 0; border-bottom: 1px solid var(--line); max-height: 40vh; }
  .dv-text { min-height: 50vh; font-size: 12px; }
  .dv-run-row { grid-template-columns: 1fr; }
  .dv-run-row > *, .dv-run-select, .dv-run-hint, .dv-secret-list, .dv-run-secrets > .btn { grid-column: 1; }
  .dv-log { max-height: 50vh; }
}

/* ---- Server page (owner only) ---- */
.srv-page { max-width: 980px; margin: 0 auto; padding-top: 4px; }
.srv-title { display: flex; align-items: center; gap: 8px; }
.srv-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.srv-tab { padding: 10px 12px; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; white-space: nowrap; }
.srv-tab:hover { color: var(--text); }
.srv-tab.on { color: var(--header); border-bottom-color: var(--accent); }
.srv-project h2 { margin: 0 0 4px; font-size: 22px; color: var(--header); }
.srv-h { margin: 22px 0 10px; font-size: 13px; text-transform: uppercase; letter-spacing: .02em; color: var(--muted); font-weight: 700; }
.srv-card .srv-h:first-child, .srv-row .srv-h { margin: 0; }
.srv-muted { color: var(--muted); font-size: 13px; }
.srv-foot { margin-top: 10px; display: inline; }
.srv-error { background: rgba(239,75,75,.12); color: #fa777c; border-radius: 8px; padding: 12px 14px; margin: 8px 0; }
.srv-card { background: var(--sidebar); border-radius: 10px; padding: 14px 16px; margin-bottom: 14px; }
.srv-drop { background: var(--sidebar); border-radius: 10px; padding: 14px 16px; margin-bottom: 12px; border: 1px solid transparent; }
.srv-drop.open { border-color: var(--active); }
.srv-drop-top { display: grid; gap: 4px; }
.srv-drop-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.srv-drop-name b { font-size: 16px; color: var(--header); }
.srv-ip { display: flex; gap: 6px; flex-wrap: wrap; }
.srv-copy { font-family: ui-monospace, Consolas, monospace; background: var(--panel); border-radius: 6px; padding: 3px 8px; font-size: 13px; color: var(--text); }
.srv-copy:hover { background: var(--active); }
.srv-acts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.srv-back { margin-top: 10px; }
.srv-details { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 6px; }
.srv-details h4 { margin: 14px 0 6px; font-size: 12px; text-transform: uppercase; color: var(--muted); }
.srv-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; flex-wrap: wrap; }
.srv-row + .srv-row { border-top: 1px solid var(--line); }
.srv-row .grow, .srv-input.grow { flex: 1; min-width: 140px; }
.srv-select, .srv-input { background: var(--panel); color: var(--text); border: 0; border-radius: 6px; padding: 8px 10px; font: inherit; max-width: 100%; }
.srv-input:focus, .srv-select:focus { outline: 2px solid var(--accent); }
.srv-create { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.srv-create-card { display: grid; gap: 2px; background: var(--sidebar); border-radius: 8px; padding: 12px; color: var(--text); text-decoration: none; }
.srv-create-card:hover { background: var(--hover); }
.srv-create-card b { color: var(--link); font-weight: 600; }
.srv-create-card span { color: var(--muted); font-size: 13px; }
.srv-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin-bottom: 14px; }
.srv-stat { background: var(--sidebar); border-radius: 10px; padding: 12px 14px; display: grid; gap: 2px; align-content: start; }
.srv-stat b { font-size: 24px; color: var(--header); font-weight: 700; }
.srv-spark { width: 100%; height: 32px; margin-top: 6px; }
.srv-bar { height: 8px; border-radius: 4px; background: var(--panel); margin-top: 10px; overflow: hidden; }
.srv-bar-fill { height: 100%; background: var(--green); }
.srv-bar-fill.warn { background: var(--yellow); }
.srv-bar-fill.bad { background: var(--red); }
.srv-kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin-top: 10px; font-size: 14px; }
.srv-log { background: var(--float); border-radius: 8px; padding: 10px; max-height: 340px; overflow: auto; font-family: ui-monospace, Consolas, monospace; font-size: 12px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.srv-log-line.error { color: #fa777c; }
.srv-log-line.warn { color: var(--yellow); }
.srv-steps { margin: 10px 0 12px; padding-left: 20px; line-height: 1.6; }
.srv-steps a, .srv-page a { color: var(--link); }
@media (max-width: 600px) { .srv-kv { grid-template-columns: 1fr; gap: 0 0; } .srv-kv .srv-muted { margin-top: 8px; } }
/* ---- Apps → AI ---- */
.ai-page { display: grid; grid-template-columns: 230px 1fr; gap: 14px; height: 100%; min-height: 0; padding-top: 4px; }
.ai-list { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; min-height: 0; border-right: 1px solid var(--line); padding-right: 10px; }
.ai-new { margin-bottom: 8px; }
.ai-chat-row { display: flex; align-items: center; border-radius: 6px; }
.ai-chat-row:hover, .ai-chat-row.on { background: var(--hover); }
.ai-chat-row.on .ai-chat-title { color: var(--header); }
.ai-chat-title { flex: 1; min-width: 0; text-align: left; padding: 7px 8px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.ai-chat-row .icon-btn { opacity: 0; }
.ai-chat-row:hover .icon-btn { opacity: 1; }
.ai-main { display: flex; flex-direction: column; min-height: 0; }
.ai-msgs { flex: 1; overflow-y: auto; min-height: 0; padding: 4px 4px 12px; display: flex; flex-direction: column; gap: 12px; }
.ai-hello { margin: auto; text-align: center; max-width: 560px; padding: 24px 8px; }
.ai-hello h2 { color: var(--header); margin: 0 0 8px; }
.ai-ideas { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 16px; }
.ai-idea { background: var(--sidebar); border-radius: 999px; padding: 8px 14px; color: var(--text); font-size: 13px; }
.ai-idea:hover { background: var(--hover); }
.ai-msg { max-width: 820px; }
.ai-msg.user { align-self: flex-end; background: var(--accent); color: #fff; border-radius: 14px 14px 4px 14px; padding: 9px 13px; max-width: min(640px, 85%); }
.ai-msg.user .ai-body { white-space: pre-wrap; word-break: break-word; }
.ai-msg.assistant { align-self: flex-start; width: 100%; }
.ai-who { font-size: 12px; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.ai-body { line-height: 1.55; word-break: break-word; }
.ai-dots { color: var(--muted); font-style: italic; }
.md-p, .md-li { min-height: 1em; }
.md-li { padding-left: 14px; text-indent: -12px; }
.md-h { font-weight: 700; color: var(--header); margin-top: 6px; }
.md-gap { height: 8px; }
.md-code { position: relative; background: var(--float); border-radius: 8px; padding: 12px; overflow-x: auto; font-size: 13px; margin: 6px 0; white-space: pre; }
.md-copy { position: absolute; top: 6px; right: 6px; font-size: 11px; color: var(--muted); background: var(--panel); border-radius: 4px; padding: 2px 8px; }
.ai-files { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.ai-thumb { max-width: 160px; max-height: 120px; border-radius: 8px; }
.ai-file { color: #fff; text-decoration: underline; font-size: 13px; }
.ai-pic img { max-width: min(512px, 100%); border-radius: 10px; margin-top: 8px; display: block; }
.ai-cites { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 8px; font-size: 12px; }
.ai-cite { color: var(--link); }
.ai-cost { margin-top: 4px; font-size: 11px; }
.ai-compose { background: var(--input); border-radius: 12px; padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.ai-input { background: transparent; border: 0; color: var(--text); font: inherit; resize: none; outline: 0; min-height: 44px; max-height: 200px; }
.ai-tools { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ai-tools .grow { flex: 1; }
.ai-toggle { font-size: 12px; padding: 5px 10px; border-radius: 999px; background: var(--panel); color: var(--muted); }
.ai-toggle.on { background: rgba(88,101,242,.25); color: #c9cdfb; }
.ai-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ai-chips:empty { display: none; }
.ai-chip { background: var(--panel); border-radius: 6px; padding: 3px 4px 3px 8px; font-size: 12px; display: inline-flex; align-items: center; gap: 4px; }
.ai-chip-x { color: var(--muted); padding: 0 4px; }
.ai-model-btn { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-picker-wrap, .m3d-viewer-wrap { position: fixed; inset: 0; background: rgba(0,0,0,.7); z-index: 50; display: grid; place-items: center; padding: 16px; }
.ai-picker { background: var(--chat); border-radius: 12px; width: min(620px, 100%); max-height: 86vh; display: flex; flex-direction: column; padding: 16px; gap: 10px; }
.ai-search { width: 100%; }
.ai-picker-list { overflow-y: auto; min-height: 0; display: flex; flex-direction: column; gap: 2px; }
.ai-prov { font-size: 12px; font-weight: 700; text-transform: uppercase; color: var(--muted); margin: 10px 0 4px; }
.ai-pick { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; text-align: left; padding: 8px 10px; border-radius: 8px; color: var(--text); }
.ai-pick:hover, .ai-pick.on { background: var(--hover); }
.ai-pick .srv-muted { grid-column: 1 / -1; font-size: 12px; }
.ai-badges { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.ai-cap { width: 90px; }
.ai-use-h { margin: 12px 0 2px; font-size: 12px; color: var(--muted); text-transform: uppercase; }
@media (max-width: 760px) { .ai-page { grid-template-columns: 1fr; grid-template-rows: auto 1fr; } .ai-list { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 0 0 8px; } .ai-new { margin: 0; flex-shrink: 0; } .ai-chat-row { flex-shrink: 0; max-width: 180px; } }

/* ---- Apps → 3D ---- */
.m3d-prompt { width: 100%; resize: vertical; margin-bottom: 8px; }
.m3d-opt { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); }
.m3d-preview { max-width: 120px; max-height: 90px; border-radius: 8px; object-fit: cover; margin-top: 8px; }
.m3d-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.m3d-card { margin: 0; }
.m3d-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m3d-viewer { background: var(--chat); border-radius: 12px; width: min(900px, 100%); padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.m3d-stage { height: min(70vh, 600px); background: radial-gradient(circle at 50% 40%, #3a3d44, #1e1f22); border-radius: 10px; display: grid; place-items: center; color: var(--muted); }
.m3d-mv { width: 100%; height: 100%; --poster-color: transparent; }

/* ---- Apps → Unreal ---- */
.ue-action { width: 200px; }
.ue-args { width: 100%; font-family: ui-monospace, Consolas, monospace; font-size: 13px; resize: vertical; }
.ue-code { font-family: ui-monospace, Consolas, monospace; letter-spacing: .1em; color: var(--header); }
.ue-desc { margin: 8px 0; font-size: 13px; }
.ue-desc summary { cursor: pointer; color: var(--muted); }
.ue-desc-text { white-space: pre-wrap; max-height: 220px; overflow: auto; color: var(--muted); margin-top: 6px; }
.ue-text { max-height: 420px; }
.ue-shot { max-width: 100%; border-radius: 8px; margin: 6px 0; }
/* ---- Apps → Steam ---- */
.steam-nav { display: flex; align-items: center; gap: 2px; flex: 1; overflow-x: auto; }
.steam-tab { padding: 8px 12px; font-weight: 700; font-size: 13px; letter-spacing: .04em; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; }
.steam-tab:hover { color: var(--text); }
.steam-tab.on { color: #66c0f4; border-bottom-color: #66c0f4; }
.steam-who { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--header); white-space: nowrap; padding-left: 10px; }
.steam-who img { width: 24px; height: 24px; border-radius: 4px; }
.steam-page { max-width: 1060px; margin: 0 auto; padding-top: 8px; }
.steam-searchbar { display: flex; gap: 8px; margin-bottom: 8px; }
.steam-h { margin: 22px 0 10px; font-size: 13px; text-transform: uppercase; letter-spacing: .03em; color: #c7d5e0; font-weight: 700; }
.steam-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 230px); gap: 10px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x proximity; }
.steam-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.steam-tile { background: #16202d; border-radius: 6px; overflow: hidden; color: #c7d5e0; text-decoration: none; display: flex; flex-direction: column; scroll-snap-align: start; transition: transform .12s; }
.steam-tile:hover { transform: translateY(-2px); background: #1d2a3a; }
.steam-tile img { width: 100%; aspect-ratio: 460 / 215; object-fit: cover; background: #0e141b; }
.steam-tile-info { padding: 8px 10px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.steam-tile-name { font-weight: 600; font-size: 14px; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.steam-price { display: flex; align-items: center; gap: 6px; margin-top: auto; font-size: 13px; justify-content: flex-end; }
.steam-price s { font-size: 11px; }
.steam-price b { color: #beee11; font-weight: 600; }
.steam-off { background: #4c6b22; color: #beee11; font-weight: 700; padding: 1px 5px; border-radius: 3px; font-size: 12px; }
.steam-cats { display: flex; flex-wrap: wrap; gap: 8px; }
.steam-cat { background: linear-gradient(135deg, #2a475e, #1b2838); color: #c7d5e0; padding: 10px 14px; border-radius: 6px; text-decoration: none; font-weight: 600; font-size: 13px; }
.steam-cat:hover { color: #fff; filter: brightness(1.2); }
.steam-foot, .steam-note { margin: 14px 0; }
.steam-mini { width: 92px; height: 34px; object-fit: cover; border-radius: 3px; background: #0e141b; }
.steam-icon { width: 32px; height: 32px; border-radius: 4px; background: #0e141b; }
.steam-profile { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.steam-profile h2 { margin: 0 0 4px; color: var(--header); }
.steam-avatar { width: 96px; height: 96px; border-radius: 6px; }
.steam-offline { opacity: .55; }
.steam-locked { opacity: .6; }
.steam-ach { margin: 6px 0 12px; }
.m-activity { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.steam-card { display: flex; gap: 12px; background: #16202d; border-radius: 8px; overflow: hidden; max-width: 520px; margin-top: 6px; text-decoration: none; color: #c7d5e0; border-left: 3px solid #66c0f4; }
.steam-card img { width: 184px; object-fit: cover; flex-shrink: 0; }
.steam-card-body { padding: 8px 10px 8px 0; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.steam-card-title { font-weight: 700; color: #fff; }
.steam-card-short { font-size: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.steam-card .steam-price { justify-content: flex-start; }
.steam-open { align-self: flex-start; }
@media (max-width: 600px) { .steam-card { flex-direction: column; } .steam-card img { width: 100%; } .steam-card-body { padding: 8px 10px; } }
/* ---- Apps → games ---- */
.game-notes { font-size: 13px; margin-top: 4px; white-space: pre-wrap; }
.game-player { width: min(1280px, 100%); }
.game-frame { width: 100%; height: min(75vh, 720px); border: 0; border-radius: 8px; background: #000; }.game-drop { flex: 1; display: flex; align-items: center; gap: 12px; border: 2px dashed #4e5058; border-radius: 10px; padding: 18px 16px; cursor: pointer; color: var(--muted); transition: border-color .12s, background .12s; }
.game-drop:hover, .game-drop:focus-visible { border-color: var(--accent); color: var(--text); outline: none; }
.game-drop.over { border-color: var(--accent); background: rgba(88,101,242,.12); color: var(--text); }
.game-drop .ic { width: 26px; height: 26px; flex-shrink: 0; }
.game-drop-text b { color: var(--header); word-break: break-all; }.game-controls { flex-wrap: wrap; }
.game-pad { font-size: 13px; color: var(--muted); }
.game-pad.on { color: var(--green); font-weight: 600; }
.game-controls .btn.on { border-color: var(--green); color: var(--green); }
/* ---- Game night banner ---- */
.game-night-bar { position: fixed; left: 50%; top: 58px; transform: translateX(-50%); z-index: 45; display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  background: linear-gradient(135deg, #2a2f6b, #1e1f22); border: 1px solid var(--accent); border-radius: 12px; padding: 8px 12px; box-shadow: 0 8px 24px rgba(0,0,0,.45); width: min(720px, calc(100vw - 32px)); }
.game-night-title { font-weight: 700; color: var(--header); }
.game-night-bar .grow { flex: 1; }

/* ---- Lifelines (Apps → life) ---- */
.life-page { max-width: 880px; }
.life-head-top { display: flex; align-items: center; gap: 12px; }
.life-face { font-size: 40px; line-height: 1; }
.life-name { font-size: 18px; font-weight: 700; }
.life-status { font-size: 13px; margin-top: 2px; }
.life-cash { text-align: right; }
.life-cash b { font-size: 18px; color: #3ba55d; display: block; }
.life-cash b.neg { color: #ed4245; }
.life-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 2px; }
.life-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; margin-top: 8px; }
.life-stat { font-size: 12px; }
.life-stat-top { display: flex; justify-content: space-between; margin-bottom: 3px; }
.life-barbg { height: 7px; border-radius: 99px; background: var(--rail); overflow: hidden; }
.life-bar { height: 100%; background: var(--accent); transition: width .3s ease; }
.life-bar.happy { background: #3ba55d; } .life-bar.health { background: #ed4245; } .life-bar.smarts { background: #5865f2; } .life-bar.looks { background: #faa61a; }
.life-age-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; align-items: center; }
.life-age { font-size: 16px; padding: 10px 28px; border-radius: 99px; font-weight: 700; }
.life-tabs { display: flex; gap: 4px; overflow-x: auto; margin: 12px 0 8px; padding-bottom: 2px; scrollbar-width: thin; }
.life-tab { white-space: nowrap; padding: 7px 12px; border-radius: 99px; background: var(--rail); color: var(--text); font-size: 13px; font-weight: 600; }
.life-tab.on { background: var(--accent); color: #fff; }
.life-sec { margin-bottom: 10px; }
.life-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 0; border-top: 1px solid var(--rail); }
.life-row:first-of-type { border-top: 0; }
.life-row > .life-stat { flex-basis: 100%; }
.life-row-main { font-weight: 600; font-size: 14px; }
.life-acts { display: flex; gap: 6px; flex-wrap: wrap; }
.life-select { background: var(--rail); color: var(--text); border: 0; border-radius: 6px; padding: 6px 8px; font: inherit; font-size: 13px; max-width: 100%; }
.life-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.life-log { max-height: 60vh; overflow-y: auto; }
.life-year { padding: 8px 0 8px 10px; border-left: 3px solid var(--accent); margin-bottom: 8px; }
.life-year-title { font-weight: 700; font-size: 12px; color: var(--muted); margin-bottom: 3px; text-transform: uppercase; letter-spacing: .04em; }
.life-line { font-size: 14px; line-height: 1.45; padding: 1px 0; }
.life-line.good { color: #3ba55d; } .life-line.bad { color: #ed4245; } .life-line.big { font-weight: 700; }
.life-line.jail { color: #faa61a; } .life-line.death { font-weight: 700; color: #b9bbbe; } .life-line.act { color: var(--muted); }
.life-start-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0; }
.life-check { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; cursor: pointer; }
/* The death screen: slides in, then the parts appear one after another (transform and opacity only). */
.life-death { background: var(--sidebar); border: 1px solid var(--rail); border-radius: 14px; overflow: hidden; margin-bottom: 10px; contain: content;
  animation: lifeDeathIn .5s cubic-bezier(.22,1,.36,1) both; }
.life-death > * { animation: lifeFadeUp .45s ease-out both; }
.life-death > :nth-child(2) { animation-delay: .08s; } .life-death > :nth-child(3) { animation-delay: .16s; }
.life-death > :nth-child(4) { animation-delay: .24s; } .life-death > :nth-child(5), .life-death > :nth-child(6) { animation-delay: .32s; }
@keyframes lifeDeathIn { from { opacity: 0; transform: translateY(30px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes lifeFadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.life-death-head { padding: 22px 18px 14px; text-align: center; border-bottom: 1px solid var(--rail); }
.life-death-title { font-size: 24px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 4px; }
.life-death-stats { margin: 14px 16px 6px; padding: 12px 14px; border-radius: 10px; background: var(--rail); display: flex; flex-direction: column; gap: 8px; }
.life-death-line { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; }
.life-death-line b { font-size: 18px; font-variant-numeric: tabular-nums; }
.life-death-line.pts b { color: #3ba55d; font-size: 21px; }
.life-death-line.muted { color: var(--muted); } .life-death-line.muted b { font-size: 15px; }
.life-death-sec { padding: 6px 16px 10px; }
.life-death-label { font-size: 11px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }
.life-death-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.life-badge { display: inline-flex; align-items: center; gap: 2px; padding: 5px 11px; border-radius: 99px; border: 1px solid var(--muted); font-size: 13px; font-weight: 700;
  animation: lifeBadgePop .4s cubic-bezier(.34,1.56,.64,1) both; }
.life-badge small { color: var(--muted); font-weight: 600; } .life-badge em { color: #faa61a; font-style: normal; font-size: 11px; }
.life-badge.gold { border-color: #faa61a; color: #faa61a; } .life-badge.red { border-color: #ed4245; color: #f58a8c; }
.life-badge.purple { border-color: #9b59b6; color: #c39bd3; } .life-badge.cyan { border-color: #1abc9c; color: #48dbbb; } .life-badge.green { border-color: #3ba55d; color: #6fd08f; }
.life-badge.top { position: relative; }
.life-badge.top::after { content: ''; position: absolute; inset: -4px; border-radius: 99px; background: radial-gradient(circle, rgba(250,166,26,.35), transparent 70%); opacity: 0;
  animation: lifeGlow 2.4s ease-in-out .8s infinite; pointer-events: none; z-index: -1; }
@keyframes lifeBadgePop { from { opacity: 0; transform: scale(.6) translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes lifeGlow { 0%, 100% { opacity: 0; transform: scale(.95); } 50% { opacity: 1; transform: scale(1.05); } }
.life-death-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; font-size: 13px; }
.life-death-grid div { display: flex; flex-direction: column; gap: 1px; } .life-death-grid span { color: var(--muted); font-size: 12px; }
.life-death-note { padding: 0 16px 6px; }
.life-death-acts { padding: 12px 16px 16px; display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--rail); }
.life-death-acts .btn { width: 100%; justify-content: center; padding: 11px; }
@media (prefers-reduced-motion: reduce) { .life-death, .life-death > *, .life-badge, .life-badge.top::after { animation: none !important; } }
/* The Legacy shop */
.life-legacy-top { display: flex; gap: 14px; align-items: center; }
.life-legacy-pts { text-align: right; } .life-legacy-pts span { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.life-legacy-pts b { font-size: 24px; color: #3ba55d; font-variant-numeric: tabular-nums; }
.life-cost { color: #faa61a; font-weight: 800; font-size: 13px; }
.life-row.owned { opacity: .65; }
.life-god { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.life-god-f { display: flex; flex-direction: column; gap: 2px; width: 90px; font-size: 12px; }
.life-god .srv-input { min-width: 0; }
.life-event-wrap { display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 60; }
.life-event { background: var(--sidebar); border-radius: 10px; padding: 18px; max-width: 460px; width: 100%; display: flex; flex-direction: column; gap: 8px; box-shadow: 0 8px 30px rgba(0,0,0,.5); }
.life-event-text { font-size: 15px; line-height: 1.5; margin-bottom: 6px; }
.life-choice { text-align: left; padding: 10px 12px; border-radius: 8px; background: var(--rail); color: var(--text); font-size: 14px; }
.life-choice:hover { background: var(--accent); color: #fff; }
.life-say { display: flex; gap: 6px; margin-top: 4px; padding-top: 8px; border-top: 1px solid var(--rail); }
.life-line.talk { font-style: italic; }
.life-tags { display: flex; flex-wrap: wrap; gap: 4px; flex-basis: 100%; }
.life-tag { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 11px; font-weight: 700; background: var(--rail); color: var(--muted); align-self: flex-start; }
.life-tag.good { color: #3ee07f; } .life-tag.bad { color: #ff5d73; }

/* ---- Lifelines look: deep navy panels, soft cards, one green accent. Scoped so the rest of Hangout is untouched. ---- */
.life-page, .life-event-wrap {
  --lf-bg: #0c0f17; --lf-elev: #131825; --lf-panel: #1a2030; --lf-card: #212838; --lf-card-hover: #283044; --lf-border: #2e374a;
  --lf-accent: #3ee07f; --lf-accent-hover: #2ecf6e; --lf-danger: #ff5d73; --lf-warn: #ffb020; --lf-info: #4dabf7; --lf-purple: #b197fc;
  --lf-text: #f1f3f9; --lf-dim: #9aa3b8; --lf-muted: #6b7590; --lf-r: 14px; --lf-rs: 10px; --lf-shadow: 0 8px 32px rgba(0,0,0,.45);
  /* Hangout's own variables, re-pointed inside Lifelines so shared cards, buttons and inputs follow along. */
  --rail: var(--lf-card); --sidebar: var(--lf-panel); --accent: var(--lf-accent); --text: var(--lf-text); --muted: var(--lf-dim);
  color: var(--lf-text);
}
.life-page { background: var(--lf-elev); border: 1px solid var(--lf-border); border-radius: var(--lf-r); padding: 14px 16px; box-shadow: var(--lf-shadow); }
.life-page .srv-card { background: var(--lf-panel); border: 1px solid var(--lf-border); border-radius: var(--lf-r); }
.life-page .srv-muted { color: var(--lf-dim); }
.life-page .btn { border-radius: 8px; font-weight: 700; transition: background .12s ease, filter .12s ease; }
.life-page .btn:hover { filter: brightness(1.1); }
.life-page .btn.primary, .life-event-wrap .btn.primary { background: var(--lf-accent); color: #06210f; }
.life-page .btn.primary:hover, .life-event-wrap .btn.primary:hover { background: var(--lf-accent-hover); }
.life-page .btn.outline-danger { border-color: var(--lf-danger); color: var(--lf-danger); }
.life-page .srv-input, .life-event-wrap .srv-input, .life-select { background: var(--lf-bg); border: 1px solid var(--lf-border); border-radius: 8px; color: var(--lf-text); }
.life-page .srv-input:focus, .life-event-wrap .srv-input:focus, .life-select:focus { outline: none; border-color: var(--lf-info); }
/* Header: name on the left, money on the right */
.life-name { font-size: 1.15rem; font-weight: 700; letter-spacing: -.02em; }
.life-status { color: var(--lf-dim); font-size: .8rem; }
.life-cash b { color: var(--lf-accent); font-size: 1.25rem; font-weight: 800; }
.life-cash b.neg { color: var(--lf-danger); }
/* Stat bars */
.life-stat-top { color: var(--lf-dim); }
.life-barbg { height: 6px; background: #2a3142; }
.life-bar.happy { background: var(--lf-accent); } .life-bar.health { background: var(--lf-danger); } .life-bar.smarts { background: var(--lf-info); } .life-bar.looks { background: var(--lf-warn); }
/* The big Age button */
.life-age { background: var(--lf-accent); color: #06210f; font-size: .95rem; box-shadow: 0 4px 14px rgba(62,224,127,.3); }
.life-age:hover { background: var(--lf-accent-hover); }
/* Tabs as pills */
.life-tab { background: var(--lf-card); color: var(--lf-dim); border: 1px solid var(--lf-border); font-size: .75rem; font-weight: 700; }
.life-tab:hover { background: var(--lf-card-hover); }
.life-tab.on { background: var(--lf-info); border-color: var(--lf-info); color: #fff; }
/* Rows become cards */
.life-row { background: var(--lf-card); border: 1px solid var(--lf-border); border-radius: var(--lf-rs); padding: 10px 12px; margin-top: 8px; transition: border-color .15s; }
.life-row:first-of-type { border-top: 1px solid var(--lf-border); }
.life-row:hover { border-color: #3d4860; }
.life-row-main { font-size: .9rem; }
/* Life log: one card per year */
.life-log { display: flex; flex-direction: column; gap: 10px; scroll-behavior: smooth; }
.life-year { background: var(--lf-card); border: 1px solid var(--lf-border); border-left: 3px solid var(--lf-info); border-radius: var(--lf-rs); padding: 12px 14px; margin: 0; }
.life-year:has(.life-line.jail) { border-left-color: var(--lf-danger); }
.life-year:has(.life-line.death) { border-left-color: var(--lf-purple); background: #1e1630; }
.life-year-title { color: var(--lf-info); font-size: .78rem; }
.life-line { font-size: .88rem; }
.life-line.good { color: #6ee7a0; } .life-line.bad { color: #ff8597; } .life-line.jail { color: var(--lf-warn); }
/* Event popup */
.life-event-wrap { background: rgba(0,0,0,.75); }
.life-event { background: var(--lf-panel); border: 1px solid var(--lf-border); border-radius: var(--lf-r); box-shadow: var(--lf-shadow); }
.life-choice { background: var(--lf-card); border: 1px solid var(--lf-border); font-size: .86rem; padding: 12px; }
.life-choice:hover { background: var(--lf-card-hover); border-color: var(--lf-info); color: var(--lf-text); }
.life-say { border-top-color: var(--lf-border); }
.life-tag { background: var(--lf-bg); color: var(--lf-info); }
/* Death screen and legacy pick up the same panels */
.life-death { background: var(--lf-panel); border-color: var(--lf-border); }
.life-death-stats { background: var(--lf-card); }
.life-death-line.pts b, .life-legacy-pts b { color: var(--lf-accent); }
.life-year.life-moments { border-left-color: #f0c030; background: linear-gradient(90deg, rgba(240,192,48,.08), transparent); }
.life-year.life-moments .life-year-title { color: #f0c030; }
/* Mechanic shop */
.life-sub { font-size: 11px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 14px 0 0; }
.life-bay { position: relative; height: 92px; margin-top: 8px; border-radius: var(--lf-rs, 10px); background: linear-gradient(#2a2118, #2a2118 70%, #2b2f38 70%); border: 1px solid var(--lf-border, #2e374a); overflow: hidden; }
.life-bay-post { position: absolute; bottom: 0; width: 8px; height: 62px; background: #6b7280; border-radius: 2px; }
.life-bay-post:first-child { left: 26%; } .life-bay-post:last-child { right: 26%; }
.life-bay-arm { position: absolute; left: 24%; right: 24%; bottom: 14px; height: 5px; background: #9aa3b8; border-radius: 2px; transition: transform .6s ease; }
.life-bay-car { position: absolute; left: 50%; bottom: 17px; font-size: 40px; line-height: 1; transform: translateX(-50%) scaleX(-1); transition: transform .6s ease; }
.life-bay.busy .life-bay-car { animation: lifeCarIn .7s ease-out both; }
.life-bay.up .life-bay-arm { transform: translateY(-26px); }
.life-bay.up .life-bay-car { transform: translate(-50%, -26px) scaleX(-1); animation: none; }
@keyframes lifeCarIn { from { left: 110%; } to { left: 50%; } }
@media (prefers-reduced-motion: reduce) { .life-bay-arm, .life-bay-car { transition: none; } .life-bay.busy .life-bay-car { animation: none; } }
.life-parts { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 6px; margin-top: 8px; }
.life-part { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 8px; background: var(--lf-card, var(--rail)); border: 1px solid var(--lf-border, transparent); font-size: 13px; }
.life-tag.warn { color: #ffb020; }
.life-part .life-tag, .life-part .btn { white-space: nowrap; flex-shrink: 0; }
/* The walkable town (life-walk.js) */
.lw { position: fixed; inset: 0; z-index: 80; background: #08090d; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 8px; }
.lw-bar { width: min(100%, 1080px); display: flex; align-items: center; gap: 8px; color: #9aa3b8; font-size: 12px; }
.lw-hint { flex: 1; }
.lw-top { background: #1a2030; color: #f1f3f9; border: 1px solid #2e374a; border-radius: 8px; padding: 6px 10px; font-weight: 700; font-size: 12px; }
.lw-top:hover { background: #283044; }
.lw-screen { width: min(100%, 1080px, calc((100vh - 60px) * 1.5)); aspect-ratio: 3 / 2; image-rendering: pixelated; border-radius: 6px; box-shadow: 0 0 0 3px #202028, 0 12px 40px rgba(0,0,0,.6); background: #000; }
.lw-pad { display: none; width: min(100%, 520px); justify-content: space-between; align-items: center; user-select: none; touch-action: none; }
.lw-dpad { position: relative; width: 132px; height: 132px; }
.lw-btn { position: absolute; width: 44px; height: 44px; border-radius: 10px; background: #2a3142; color: #f1f3f9; border: 0; font-size: 16px; font-weight: 800; touch-action: none; }
.lw-btn:active { background: #3d4860; }
.lw-btn.u { left: 44px; top: 0; } .lw-btn.d { left: 44px; bottom: 0; } .lw-btn.l { left: 0; top: 44px; } .lw-btn.r { right: 0; top: 44px; }
.lw-ab { position: relative; width: 170px; height: 110px; }
.lw-btn.a, .lw-btn.b { width: 56px; height: 56px; border-radius: 50%; background: #c83838; }
.lw-btn.a { right: 0; top: 10px; } .lw-btn.b { right: 70px; top: 40px; }
.lw-btn.st { left: 0; bottom: 0; width: 64px; height: 26px; border-radius: 13px; font-size: 10px; background: #3d4860; }
@media (pointer: coarse), (max-width: 700px) { .lw-pad { display: flex; } .lw-hint { display: none; } .lw-screen { width: min(100%, calc((100vh - 230px) * 1.5)); } }
/* Loading bar */
.life-loading { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; min-height: 50vh; }
.life-loading-name { font-size: 22px; font-weight: 800; letter-spacing: -.02em; color: #f1f3f9; }
.life-loading-bar { width: min(320px, 70vw); height: 4px; border-radius: 30px; background: rgba(255,255,255,.08); position: relative; overflow: hidden; }
.life-loading-bar::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 30px; background: #3ee07f; animation: lifeLoad 1.5s ease-in-out infinite; }
@keyframes lifeLoad { 50% { width: 100%; } 100% { width: 0; left: auto; right: 0; } }
@media (prefers-reduced-motion: reduce) { .life-loading-bar::before { animation: none; width: 40%; } }
/* Full screen: the game covers the window; a small floating menu gets you back */
body.life-full #appBody { position: fixed; inset: 0; z-index: 50; overflow-y: auto; background: #0c0f17; padding: 16px; }
body.life-full .life-page { max-width: 760px; margin: 0 auto; }
.life-float { position: fixed; left: 12px; bottom: 12px; z-index: 55; display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: rgba(19,24,37,.85); border: 1px solid var(--lf-border); backdrop-filter: blur(6px); }
.life-float-btn { background: transparent; color: var(--lf-dim); padding: 6px 10px; border-radius: 10px; font-weight: 700; font-size: 13px; }
.life-float-btn:hover { color: var(--lf-text); background: var(--lf-card); }
.life-page ::-webkit-scrollbar { width: 6px; } .life-page ::-webkit-scrollbar-thumb { background: #3d4860; border-radius: 99px; }
@media (max-width: 640px) {
  .life-page { padding: 12px; border-radius: 0; border-left: 0; border-right: 0; }
  .life-stats, .life-start-grid { grid-template-columns: 1fr; }
  .life-head-top { flex-wrap: wrap; }
  .life-cash { text-align: left; flex-basis: 100%; }
}
@media (max-width: 600px) { .game-night-bar { top: 54px; } }