/* ---------- font (Inter, bundled; OFL license in /fonts) ---------- */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(fonts/inter-latin-wght-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(fonts/inter-latin-ext-wght-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ---------- themes ---------- */
:root {
  --bg0: #111214; --bg1: #17181b; --bg2: #1e2024; --bg3: #26292e; --bg4: #30343a;
  --line: #2c2f35; --text: #e8e6e3; --text-2: #c9c7c3; --muted: #8e939b;
  --hover: rgba(255,255,255,.035); --shadow: rgba(0,0,0,.45); --scrim: rgba(0,0,0,.6);
  --accent: #ff8a3d; --on-accent: #1a1006;
  --accent-2: color-mix(in srgb, var(--accent) 70%, white);
  --accent-soft: color-mix(in srgb, var(--accent) 16%, transparent);
  --green: #3ecf8e; --red: #f05d5e; --yellow: #f2c14e; --blue: #61afef;
  /* text in these colors (4.9): the same on dark themes, darker on the light theme so it can be read */
  --green-t: var(--green); --yellow-t: var(--yellow); --red-t: var(--red); --accent-t: var(--accent);
  --mention-bg: rgba(242,193,78,.08); --code-bg: var(--bg0);
  --radius: 10px; --chat-fs: 15px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Consolas, monospace;
  color-scheme: dark;
}
:root[data-theme="darker"] {
  --bg0: #000000; --bg1: #0b0b0d; --bg2: #111214; --bg3: #1b1d20; --bg4: #262a2f; --line: #1f2125;
}
:root[data-theme="light"] {
  --bg0: #e3e5e8; --bg1: #f2f3f5; --bg2: #ffffff; --bg3: #e8e9ec; --bg4: #d5d7db;
  --line: #dadce0; --text: #1e2023; --text-2: #3a3d42; --muted: #585d65;
  --green-t: #178050; --yellow-t: #8a5f00; --red-t: #b83536; --accent-t: var(--accent-2);
  --hover: rgba(0,0,0,.035); --shadow: rgba(0,0,0,.16); --scrim: rgba(20,22,26,.45);
  --accent-2: color-mix(in srgb, var(--accent) 60%, black); /* 4.9: was 78%, links and @mentions were hard to read */
  --mention-bg: rgba(242,193,78,.16); --code-bg: #f1f2f4;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg0); color: var(--text); font: 15px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: var(--accent-2); }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.spacer { flex: 1; }
.grow { flex: 1; min-width: 0; }
.pad { padding: 8px 10px; }
.col { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.warn { color: var(--yellow-t); }
.ic { flex: none; display: block; }
::selection { background: var(--accent-soft); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--bg4); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- buttons & inputs ---------- */
.btn { border: 0; border-radius: 8px; padding: 9px 14px; background: var(--bg4); cursor: pointer; font-weight: 600; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: filter .12s, background .12s, transform .06s; }
.btn:hover { filter: brightness(1.1); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); color: var(--on-accent); }
.btn.danger { background: var(--red); color: #fff; }
.btn.ghost { background: transparent; border: 1px solid var(--line); }
.btn.ghost:hover { background: var(--hover); filter: none; }
.btn.xs { padding: 4px 10px; font-size: 12.5px; }
.btn.small-btn { padding: 5px 10px; font-size: 12.5px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.icon-btn { border: 0; background: transparent; width: 32px; height: 32px; border-radius: 8px; cursor: pointer; color: var(--muted); display: grid; place-items: center; flex: none; text-decoration: none; transition: background .12s, color .12s; padding: 0; }
.icon-btn:hover { background: var(--bg3); color: var(--text); }
.icon-btn.on { color: var(--red-t); background: color-mix(in srgb, var(--red) 13%, transparent); }
.icon-btn.on-live { color: var(--red-t); background: color-mix(in srgb, var(--red) 14%, transparent); }
.icon-btn.on-green { color: var(--green-t); background: color-mix(in srgb, var(--green) 13%, transparent); }
.icon-btn.danger:hover { color: var(--red-t); }
label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 600; }
label .hint { font-weight: 400; font-size: 12px; }
.field { display: grid; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 600; }
.field .hint { font-weight: 400; font-size: 12px; }
input, textarea, select { background: var(--bg0); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; outline: none; color: var(--text); transition: border-color .12s, box-shadow .12s; }
input:focus, textarea:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea { resize: vertical; }
input[type=range] { padding: 0; border: 0; accent-color: var(--accent); background: transparent; box-shadow: none; }
input[type=color] { width: 36px; height: 30px; padding: 0; border: 0; background: none; cursor: pointer; box-shadow: none; }
input[type=checkbox] { accent-color: var(--accent); width: 16px; height: 16px; }
.error { color: var(--red-t); font-size: 13px; min-height: 1em; }

/* ---------- auth ---------- */
.auth { min-height: 100%; display: grid; place-items: center; padding: 16px; background: radial-gradient(900px 500px at 20% 0%, var(--accent-soft), transparent 60%), var(--bg0); }
.auth-card { width: 100%; max-width: 380px; background: var(--bg1); border: 1px solid var(--line); border-radius: 18px; padding: 28px; display: grid; gap: 12px; box-shadow: 0 20px 60px var(--shadow); animation: pop-in .25s ease-out; }
.brand { font-size: 22px; font-weight: 800; letter-spacing: -.02em; display: flex; align-items: center; gap: 8px; }
.logo { color: var(--accent-t); flex: none; }
.invite-card { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; background: var(--bg2); border: 1px solid var(--line); }
.invite-card .sicon { width: 48px; height: 48px; border-radius: 14px; background: var(--bg3); font-size: 15px; }
.invite-card b { display: block; font-size: 16px; }
.dotline { display: inline-flex; align-items: center; gap: 6px; }
.dotline .dot { width: 8px; height: 8px; }

/* ---------- layout ---------- */
.app { display: grid; grid-template-columns: 72px 248px 1fr 240px; height: 100dvh; overflow: hidden; }
.app.no-panel { grid-template-columns: 72px 248px 1fr 0; }
.app.no-panel .side-panel { display: none; }
.app.no-side { grid-template-columns: 72px 248px 1fr 0; }
.app.no-side .side-panel { display: none; }

/* rail */
.rail { background: var(--bg0); padding: 12px 0; display: flex; flex-direction: column; align-items: center; gap: 8px; overflow-y: auto; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
#serverIcons { display: flex; flex-direction: column; gap: 8px; }
.rail-sep { width: 30px; height: 2px; border-radius: 2px; background: var(--bg3); flex: none; }
.rail-btn { width: 48px; height: 48px; border-radius: 16px; border: 0; background: var(--bg2); cursor: pointer; position: relative; padding: 0; display: grid; place-items: center; transition: border-radius .18s, background .15s, color .15s; flex: none; color: var(--text); }
.rail-btn:hover { background: var(--bg3); border-radius: 13px; }
.rail-btn.active { border-radius: 13px; box-shadow: 0 0 0 2px var(--accent); background: var(--bg3); }
.rail-btn.home { color: var(--muted); }
.rail-btn.home.active, .rail-btn.home:hover { color: var(--accent-t); }
.rail-btn::before { content: ""; position: absolute; left: -12px; top: 50%; width: 5px; height: 0; margin-top: 0; border-radius: 0 4px 4px 0; background: var(--text); transition: height .15s, margin-top .15s; }
.rail-btn.unread::before { height: 10px; margin-top: -5px; }
.rail-btn:hover::before { height: 20px; margin-top: -10px; }
.rail-btn.active::before { height: 36px; margin-top: -18px; background: var(--accent); }
.rail-btn .badge { position: absolute; right: -6px; bottom: -4px; border: 3px solid var(--bg0); }
.rail-btn .rail-voice { position: absolute; left: -4px; bottom: -4px; color: #0b1f14; background: var(--green); border-radius: 50%; width: 18px; height: 18px; display: grid; place-items: center; border: 2px solid var(--bg0); }
.rail-btn.muted-srv { opacity: .55; }
.rail-btn.add { color: var(--green-t); background: var(--bg2); }
.rail-btn.add:hover { background: var(--green); color: #0b1f14; }
.sicon { width: 100%; height: 100%; border-radius: inherit; display: grid; place-items: center; font-weight: 800; font-size: 13px; letter-spacing: .02em; overflow: hidden; }
.rail-btn .sicon { border-radius: inherit; }
.sicon img { width: 100%; height: 100%; object-fit: cover; }
.sicon.xs { width: 18px; height: 18px; border-radius: 5px; font-size: 8px; background: var(--bg3); }
.sicon.xl { width: 88px; height: 88px; border-radius: 22px; font-size: 26px; background: var(--bg3); }
.badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red); color: #fff; font-size: 11px; font-weight: 800; line-height: 1; flex: none; }

/* sidebar */
.sidebar { background: var(--bg1); display: flex; flex-direction: column; min-width: 0; }
.sidebar-head { height: 52px; padding: 0 8px 0 16px; display: flex; align-items: center; justify-content: space-between; gap: 6px; border-bottom: 1px solid var(--line); font-weight: 700; flex: none; position: relative; }
.sidebar-head.has-banner { height: 120px; align-items: flex-end; padding-bottom: 10px; border-bottom: 0; background-size: cover; background-position: center; color: #fff; }
.sidebar-head.has-banner::before { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, transparent 30%, rgba(0,0,0,.7)); }
.sidebar-head.has-banner > * { position: relative; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.sidebar-head.has-banner .icon-btn { color: #fff; }
.sh-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }
.sh-name.click { cursor: pointer; display: flex; align-items: center; gap: 4px; }
.channels { flex: 1; overflow-y: auto; padding: 8px 8px 12px; }
.side-link { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; color: var(--muted); cursor: pointer; font-weight: 600; font-size: 14px; }
.side-link:hover { background: var(--hover); color: var(--text); }
.side-link .badge { margin-left: auto; background: var(--accent); color: var(--on-accent); }
.cat { display: flex; align-items: center; gap: 2px; padding: 14px 4px 4px 4px; font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); user-select: none; }
.cat.click { cursor: pointer; }
.cat.click:hover { color: var(--text); }
.cat .cat-name { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cat .chev { transition: transform .15s; }
.cat.collapsed .chev { transform: rotate(-90deg); }
.cat .icon-btn { width: 22px; height: 22px; visibility: hidden; }
.cat:hover .icon-btn { visibility: visible; }
.chan { display: flex; align-items: center; gap: 8px; padding: 6px 8px; margin: 1px 0; border-radius: 8px; color: var(--muted); cursor: pointer; user-select: none; position: relative; }
.chan:hover { background: var(--hover); color: var(--text); }
.chan.active { background: var(--bg3); color: var(--text); }
.chan.unread { color: var(--text); font-weight: 700; }
.chan.unread::before { content: ""; position: absolute; left: -8px; top: 50%; margin-top: -4px; width: 4px; height: 8px; border-radius: 0 4px 4px 0; background: var(--text); }
.chan.muted-ch { opacity: .5; }
.chan .ico { display: grid; place-items: center; opacity: .85; }
.chan .name { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.chan .cog { visibility: hidden; width: 22px; height: 22px; }
.chan:hover .cog, .chan.active .cog { visibility: visible; }
.chan .lock { opacity: .6; }
.chan.thread-row { margin-left: 22px; padding-top: 4px; padding-bottom: 4px; font-size: 13.5px; }
.chan.thread-row::after { content: ""; position: absolute; left: -12px; top: -6px; width: 10px; height: 18px; border-left: 2px solid var(--bg4); border-bottom: 2px solid var(--bg4); border-bottom-left-radius: 6px; }
.vusers { padding: 2px 0 6px 26px; display: grid; gap: 1px; }
.vuser { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); padding: 3px 6px; border-radius: 6px; cursor: pointer; min-width: 0; }
.vuser:hover { background: var(--hover); color: var(--text); }
.vuser .flags { margin-left: auto; display: flex; gap: 4px; align-items: center; flex: none; color: var(--muted); }
.dm-row { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px; color: var(--muted); cursor: pointer; position: relative; margin: 1px 0; }
.dm-row:hover { background: var(--hover); color: var(--text); }
.dm-row.active { background: var(--bg3); color: var(--text); }
.dm-row.unread { color: var(--text); }
.dm-row.unread .dm-name { font-weight: 700; }
.dm-txt { flex: 1; min-width: 0; }
.dm-name, .dm-sub { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.dm-sub { font-size: 12px; color: var(--muted); }
.dm-x { visibility: hidden; width: 22px; height: 22px; }
.dm-row:hover .dm-x { visibility: visible; }
.dm-call { color: var(--green-t); }

/* voice bar */
.voice-bar { padding: 8px 10px; border-top: 1px solid var(--line); background: var(--bg1); display: grid; gap: 6px; }
.vb-top { display: flex; align-items: center; gap: 8px; }
.vb-info { flex: 1; min-width: 0; }
.vb-status { color: var(--green-t); font-weight: 700; font-size: 13.5px; display: flex; align-items: center; gap: 6px; }
.vb-chan { cursor: pointer; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.vb-chan:hover { color: var(--text); text-decoration: underline; }
.vb-btns { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; }
.vb-btns .icon-btn { width: 100%; background: var(--bg2); }
.vb-btns .icon-btn:hover { background: var(--bg3); }
#hangupBtn { color: var(--red-t); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); display: inline-block; }
.dot.live { background: var(--green); box-shadow: 0 0 8px var(--green); }

/* user panel */
.me { display: flex; align-items: center; gap: 2px; padding: 8px; background: var(--bg0); }
:root[data-theme="light"] .me { background: var(--bg3); }
.me-wrap { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; padding: 4px; border-radius: 8px; cursor: pointer; }
.me-wrap:hover { background: var(--hover); }
.me-txt { min-width: 0; }
.me-name { font-weight: 700; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-sub { font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* avatars */
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #111; flex: none; font-size: 14px; position: relative; user-select: none; }
.avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.avatar.xxs { width: 16px; height: 16px; font-size: 9px; }
.avatar.xs { width: 22px; height: 22px; font-size: 11px; }
.avatar.sm { width: 32px; height: 32px; font-size: 13px; }
.avatar.md { width: 40px; height: 40px; }
.avatar.lg { width: 56px; height: 56px; font-size: 22px; }
.avatar.xl { width: 80px; height: 80px; font-size: 30px; }
.avatar.xxl { width: 92px; height: 92px; font-size: 34px; }
.avatar.group { color: #fff; }
.avatar.speaking { box-shadow: 0 0 0 2px var(--bg1), 0 0 0 4px var(--green); }
.avatar .status { position: absolute; right: -2px; bottom: -2px; width: 34%; height: 34%; min-width: 10px; min-height: 10px; border-radius: 50%; border: 3px solid var(--bg1); background: var(--muted); box-sizing: content-box; }
.status.s-online { background: var(--green); }
.status.s-idle { background: var(--yellow); }
.status.s-dnd { background: var(--red); }
.status.s-offline { background: #6b6f76; }
.menu .status, .menu-item > .status { position: static; width: 10px; height: 10px; min-width: 0; min-height: 0; border: 0; display: inline-block; }

/* ---------- chat column ---------- */
.chat { display: flex; flex-direction: column; background: var(--bg2); min-width: 0; min-height: 0; position: relative; }
.chat-head { height: 52px; display: flex; align-items: center; gap: 8px; padding: 0 10px 0 16px; border-bottom: 1px solid var(--line); flex: none; min-width: 0; box-shadow: 0 1px 0 var(--hover); }
.ch-title { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: none; max-width: 40%; }
.ch-title.click { cursor: pointer; }
.ch-title.click:hover { text-decoration: underline; }
.ch-crumb { color: var(--muted); font-weight: 600; cursor: pointer; white-space: nowrap; }
.ch-crumb:hover { color: var(--text); }
.ch-topic { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-left: 1px solid var(--line); padding-left: 10px; min-width: 0; flex: 1; cursor: default; }
.hash { color: var(--muted); display: grid; place-items: center; }
.chat-head .icon-btn.on { color: var(--text); background: var(--bg3); }
.search-box { display: flex; align-items: center; gap: 4px; background: var(--bg0); border-radius: 8px; padding: 0 8px; width: 170px; transition: width .2s; flex: none; color: var(--muted); }
.search-box:focus-within { width: 230px; }
.search-box input { border: 0; background: transparent; padding: 6px 2px; width: 100%; font-size: 13.5px; box-shadow: none; }
.messages { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 8px 0; overflow-anchor: none; }
.msg-list { padding-bottom: 8px; }
.empty { height: 100%; display: grid; place-content: center; text-align: center; padding: 24px; }
.empty h2 { margin: 0 0 6px; }
.empty-card { padding: 22px; text-align: center; border: 1px dashed var(--line); border-radius: 12px; }
.intro { padding: 24px 20px 8px; }
.intro h2 { margin: 10px 0 4px; }
.intro p { margin: 0; }
.intro-hash { width: 64px; height: 64px; border-radius: 50%; background: var(--bg3); display: grid; place-items: center; color: var(--muted); }

/* skeleton while a channel loads */
.skeleton { padding: 16px 20px; display: grid; gap: 22px; }
.sk-row { display: grid; grid-template-columns: 40px 1fr; gap: 14px; }
.sk-av { width: 40px; height: 40px; border-radius: 50%; }
.sk-lines { display: grid; gap: 8px; }
.sk-line { height: 11px; border-radius: 6px; }
.sk-av, .sk-line { background: linear-gradient(90deg, var(--bg3) 25%, var(--bg4) 50%, var(--bg3) 75%); background-size: 300% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -200% 0; } }

/* messages */
.msg { display: grid; grid-template-columns: 40px 1fr; gap: 0 14px; padding: 2px 56px 2px 20px; position: relative; }
.msg.first { margin-top: 14px; }
.msg:hover { background: var(--hover); }
.msg.mentioned { background: var(--mention-bg); box-shadow: inset 3px 0 0 var(--yellow); }
.msg.flash { animation: flash 2s ease-out; }
@keyframes flash { 0%, 30% { background: var(--accent-soft); } 100% { background: transparent; } }
.msg .m-av { width: 40px; height: 40px; grid-row: span 2; cursor: pointer; margin-top: 2px; }
.msg .meta { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.msg .author { font-weight: 700; cursor: pointer; font-size: var(--chat-fs); }
.msg .author:hover .utext { text-decoration: underline; }
.msg .time { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.msg .side-time { font-size: 10.5px; color: var(--muted); visibility: hidden; text-align: right; padding-top: 4px; white-space: nowrap; }
.msg:hover .side-time { visibility: visible; }
.msg .body { grid-column: 2; min-width: 0; }
.msg .text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: var(--chat-fs); line-height: 1.45; }
.msg .edited { font-size: 11px; color: var(--muted); }
.msg .pin-flag { position: absolute; right: 22px; top: 6px; color: var(--muted); opacity: .7; }
.reply-line { grid-column: 1 / -1; display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); padding-left: 20px; position: relative; cursor: pointer; min-width: 0; margin-bottom: 2px; }
.reply-line::before { content: ""; position: absolute; left: 18px; top: 50%; width: 22px; height: 10px; border-left: 2px solid var(--bg4); border-top: 2px solid var(--bg4); border-top-left-radius: 6px; }
.reply-line > * { position: relative; left: 26px; }
.reply-line .rname { font-weight: 600; flex: none; }
.reply-line .rtext { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; max-width: 60%; }
.reply-line:hover .rtext { color: var(--text); }
.text code, .tr-text code { background: var(--code-bg); padding: 1px 5px; border-radius: 5px; font-size: .9em; font-family: var(--mono); }
.text pre, .tr-text pre { background: var(--code-bg); padding: 10px 12px; border-radius: 8px; overflow-x: auto; white-space: pre; margin: 4px 0; border: 1px solid var(--line); }
.text pre code, .tr-text pre code { background: none; padding: 0; }
.text .quote, .tr-text .quote { display: block; border-left: 3px solid var(--bg4); padding-left: 10px; color: var(--text-2); }
.text .spoiler, .tr-text .spoiler { background: var(--bg4); color: transparent; border-radius: 4px; cursor: pointer; padding: 0 2px; transition: color .1s; }
.text .spoiler:hover, .text .spoiler:focus, .tr-text .spoiler:hover, .tr-text .spoiler:focus { color: var(--text); background: var(--bg3); }
.mention { background: var(--accent-soft); color: var(--accent-2); border-radius: 4px; padding: 0 3px; font-weight: 600; cursor: pointer; }
.mention:hover { background: color-mix(in srgb, var(--accent) 30%, transparent); }
img.emoji { width: 1.45em; height: 1.45em; object-fit: contain; vertical-align: -.35em; }
img.emoji.lg { width: 32px; height: 32px; }
.jumbo { font-size: 2.5em; line-height: 1.2; }
.tools { position: absolute; right: 16px; top: -16px; display: none; background: var(--bg1); border: 1px solid var(--line); border-radius: 8px; z-index: 2; box-shadow: 0 4px 14px var(--shadow); padding: 2px; }
.msg:hover .tools { display: flex; }
.tools .icon-btn { width: 30px; height: 30px; }
.day { display: flex; align-items: center; gap: 10px; margin: 18px 20px 4px; font-size: 12px; color: var(--muted); font-weight: 600; }
.day::before, .day::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.new-line { display: flex; align-items: center; gap: 8px; margin: 10px 20px 0; font-size: 10.5px; font-weight: 800; color: var(--red-t); }
.new-line::before { content: ""; flex: 1; height: 1px; background: var(--red); }
.load-more { display: flex; margin: 8px auto; }

/* compact mode */
.app.compact .msg { display: block; padding: 2px 56px 2px 20px; }
.app.compact .msg.first { margin-top: 4px; }
.app.compact .msg .m-av, .app.compact .msg .side-time { display: none; }
.app.compact .msg .meta { display: inline-flex; flex-direction: row-reverse; gap: 8px; margin-right: 6px; vertical-align: baseline; }
.app.compact .msg .body { display: inline; }
.app.compact .msg .body > .text { display: inline; }
.app.compact .msg .body > :not(.text) { display: grid; margin-left: 0; }
.app.compact .reply-line { padding-left: 0; }
.app.compact .reply-line::before { display: none; }
.app.compact .reply-line > * { left: 0; }

/* attachments */
.atts { display: grid; gap: 6px; margin-top: 4px; justify-items: start; }
.img-grid { display: grid; gap: 4px; max-width: min(520px, 100%); border-radius: 10px; overflow: hidden; }
.img-grid img { display: block; max-width: 100%; max-height: 320px; object-fit: cover; cursor: zoom-in; background: var(--bg3); }
.img-grid.n1 img { width: auto; height: auto; border-radius: 10px; object-fit: contain; }
.img-grid.n2 { grid-template-columns: 1fr 1fr; }
.img-grid.n3, .img-grid.n4 { grid-template-columns: 1fr 1fr; }
.img-grid.n2 img, .img-grid.n3 img, .img-grid.n4 img { width: 100%; height: 200px; }
.att-video { max-width: min(480px, 100%); max-height: 320px; border-radius: 10px; background: #000; }
.file-card { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; background: var(--bg1); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; max-width: min(420px, 100%); width: 100%; }
.file-card audio { grid-column: 1 / -1; width: 100%; height: 36px; }
.fc-icon { color: var(--accent-t); }
.fc-txt { min-width: 0; display: grid; }
.fc-txt a { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: 600; }

/* link previews */
.embed { position: relative; display: grid; gap: 8px; background: var(--bg1); border-left: 4px solid var(--bg4); border-radius: 6px; padding: 10px 14px 12px; margin-top: 6px; max-width: min(460px, 100%); }
.embed.has-thumb { grid-template-columns: 1fr 80px; }
.em-txt { display: grid; gap: 4px; min-width: 0; }
.em-site { font-size: 12px; color: var(--muted); }
.em-title { font-weight: 700; color: var(--accent-2); text-decoration: none; }
.em-title:hover { text-decoration: underline; }
.em-desc { font-size: 13.5px; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.em-img { width: 100%; max-height: 260px; object-fit: cover; border-radius: 6px; cursor: zoom-in; }
.em-thumb { width: 80px; height: 80px; object-fit: cover; border-radius: 6px; cursor: zoom-in; }
.em-x { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; visibility: hidden; }
.embed:hover .em-x { visibility: visible; }
.yt-thumb { position: relative; cursor: pointer; border-radius: 6px; overflow: hidden; aspect-ratio: 16/9; background: #000; }
.yt-thumb img { width: 100%; height: 100%; object-fit: cover; }
.yt-play { position: absolute; inset: 0; margin: auto; width: 64px; height: 44px; border-radius: 12px; border: 0; background: rgba(255,0,51,.9); color: #fff; cursor: pointer; display: grid; place-items: center; }
.yt-frame { width: 100%; aspect-ratio: 16/9; border: 0; border-radius: 6px; }

/* polls */
.poll { margin-top: 6px; background: var(--bg1); border: 1px solid var(--line); border-radius: 12px; padding: 14px; max-width: min(460px, 100%); display: grid; gap: 8px; }
.poll-q { font-weight: 700; font-size: 16px; display: flex; gap: 8px; align-items: flex-start; }
.poll-q .ic { color: var(--accent-t); margin-top: 2px; }
.poll-sub { font-size: 12px; color: var(--muted); }
.poll-opt { position: relative; display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; cursor: pointer; overflow: hidden; background: var(--bg2); text-align: left; width: 100%; }
.poll-opt:hover { border-color: var(--bg4); }
.poll-opt.mine { border-color: var(--accent); }
.poll-opt .bar { position: absolute; inset: 0 auto 0 0; background: var(--accent-soft); width: 0; transition: width .4s ease; }
.poll-opt.mine .bar { background: color-mix(in srgb, var(--accent) 26%, transparent); }
.poll-opt > :not(.bar) { position: relative; }
.poll-opt .po-text { flex: 1; font-weight: 600; }
.poll-opt .po-n { font-size: 12.5px; color: var(--muted); font-weight: 700; }
.poll-opt .po-check { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--bg4); display: grid; place-items: center; flex: none; }
.poll.multi .poll-opt .po-check { border-radius: 5px; }
.poll-opt.mine .po-check { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.poll.ended .poll-opt { cursor: default; }
.poll-foot { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; color: var(--muted); }

/* thread chip under a starter message */
.thread-chip { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; padding: 7px 12px; background: var(--bg1); border: 1px solid var(--line); border-radius: 10px; cursor: pointer; max-width: min(460px, 100%); }
.thread-chip:hover { border-color: var(--accent); }
.thread-chip .ic { color: var(--accent-t); }
.thread-chip b { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.thread-chip .tc-n { color: var(--accent-2); font-weight: 700; font-size: 13px; white-space: nowrap; }
.thread-chip .tc-t { color: var(--muted); font-size: 12px; white-space: nowrap; }

/* reactions */
.reactions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.react { display: inline-flex; align-items: center; gap: 5px; background: var(--bg1); border: 1px solid var(--line); border-radius: 8px; padding: 2px 8px; cursor: pointer; font-size: 14px; transition: border-color .12s, transform .08s; }
.react:hover { border-color: var(--bg4); }
.react:active { transform: scale(.94); }
.react.mine { background: var(--accent-soft); border-color: var(--accent); }
.react .rc { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.react.mine .rc { color: var(--accent-2); }
.react img.emoji { width: 18px; height: 18px; vertical-align: middle; }
.react.add { visibility: hidden; color: var(--muted); padding: 2px 6px; }
.msg:hover .react.add { visibility: visible; }

/* composer */
.jump-bar { margin: 0 16px 4px; border: 0; border-radius: 8px; padding: 6px; background: var(--bg4); cursor: pointer; font-size: 13px; font-weight: 600; }
.typing { height: 20px; padding: 0 20px; display: flex; align-items: center; gap: 6px; font-size: 12.5px; }
/* speed (4.8): the dots slide with transform (done by the graphics chip, no repainting every frame) */
.typing .dots { width: 18px; height: 6px; position: relative; overflow: hidden; display: inline-block; }
.typing .dots::before { content: ''; position: absolute; top: 0; bottom: 0; left: -18px; width: 36px; background: radial-gradient(circle, var(--muted) 2px, transparent 2.5px) 0 0 / 6px 6px repeat-x; animation: typing 1s steps(3) infinite; will-change: transform; }
@keyframes typing { to { transform: translateX(18px); } }
.composer { padding: 0 16px 16px; flex: none; position: relative; }
.composer.disabled .composer-row { opacity: .5; pointer-events: none; }
.composer-row { display: flex; align-items: flex-end; gap: 4px; background: var(--bg3); border-radius: var(--radius); padding: 4px 6px; border: 1px solid transparent; transition: border-color .12s; }
.composer-row:focus-within { border-color: var(--bg4); }
.composer-row textarea { flex: 1; resize: none; max-height: 260px; background: transparent; border: 0; padding: 9px 6px; min-height: 40px; box-shadow: none; font-size: var(--chat-fs); }
.composer-row .icon-btn { margin-bottom: 4px; }
.composer .send { padding: 0 12px; height: 34px; margin-bottom: 3px; }
.composer-note { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); padding: 4px 4px 0; }
.composer-note.warn { color: var(--yellow-t); }
.reply-bar { display: flex; align-items: center; gap: 6px; background: var(--bg1); border-radius: var(--radius) var(--radius) 0 0; padding: 6px 8px 6px 14px; font-size: 13px; color: var(--muted); }
.reply-bar b { color: var(--text); }
.reply-bar:not(.hidden) ~ .composer-row, .tray:not(.hidden) ~ .composer-row { border-top-left-radius: 0; border-top-right-radius: 0; }
.ping-toggle { border: 0; background: transparent; color: var(--muted); font-weight: 800; font-size: 12px; cursor: pointer; padding: 2px 6px; border-radius: 6px; }
.ping-toggle.on { color: var(--accent-2); }
.tray { display: flex; gap: 8px; overflow-x: auto; background: var(--bg1); padding: 10px; border-radius: var(--radius) var(--radius) 0 0; }
.reply-bar:not(.hidden) + .tray { border-radius: 0; }
.tray-item { position: relative; width: 120px; flex: none; background: var(--bg2); border-radius: 8px; padding: 6px; display: grid; gap: 4px; }
.tray-item img { width: 100%; height: 80px; object-fit: cover; border-radius: 6px; }
.tray-icon { height: 80px; display: grid; place-items: center; background: var(--bg3); border-radius: 6px; color: var(--muted); }
.tray-name { font-size: 12px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.tray-bar { height: 4px; border-radius: 2px; background: var(--bg4); position: relative; overflow: hidden; --p: 0; }
.tray-bar::after { content: ""; position: absolute; inset: 0; width: calc(var(--p) * 100%); background: var(--accent); transition: width .2s; }
.tray-item.done .tray-bar::after { background: var(--green); }
.tray-item.err .tray-bar::after { background: var(--red); width: 100%; }
.tray-x { position: absolute; top: 2px; right: 2px; width: 24px; height: 24px; background: rgba(0,0,0,.6); color: #fff; }
.autocomplete { position: absolute; left: 16px; right: 16px; bottom: calc(100% - 8px); background: var(--bg1); border: 1px solid var(--line); border-radius: 10px; padding: 6px; z-index: 5; box-shadow: 0 -6px 20px var(--shadow); max-height: 320px; overflow-y: auto; animation: pop-in .12s ease-out; }
.ac-item { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 6px; cursor: pointer; }
.ac-item.on { background: var(--bg3); }
.ac-label { font-weight: 600; }
.ac-sub { margin-left: auto; font-size: 12px; color: var(--muted); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ac-emo { width: 22px; text-align: center; font-size: 17px; }
.drop-overlay { position: absolute; inset: 0; background: color-mix(in srgb, var(--bg0) 85%, transparent); display: grid; place-items: center; z-index: 10; pointer-events: none; }
.drop-overlay div { border: 2px dashed var(--accent); border-radius: 16px; padding: 40px 60px; font-size: 18px; font-weight: 700; color: var(--accent-2); display: flex; gap: 10px; align-items: center; }
.edit-box { display: grid; gap: 4px; }
.edit-box textarea { width: 100%; background: var(--bg3); border: 0; font-size: var(--chat-fs); }

/* People page */
.people { padding: 20px 24px; max-width: 760px; }
.people-top { display: flex; align-items: center; justify-content: space-between; }
.people-top h2 { margin: 0; }
.person { display: flex; align-items: center; gap: 12px; padding: 10px; border-top: 1px solid var(--line); cursor: pointer; border-radius: 8px; }
.person:hover { background: var(--hover); }
.person .icon-btn { background: var(--bg1); border-radius: 50%; width: 36px; height: 36px; }

/* side panel */
.side-panel { background: var(--bg1); overflow-y: auto; min-width: 0; }
#members { padding: 8px; }
.member { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px; cursor: pointer; min-width: 0; }
.member:hover { background: var(--hover); }
.member.offline { opacity: .45; }
.m-txt { min-width: 0; display: grid; }
.m-sub { font-size: 11.5px; color: var(--muted); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.mname { font-weight: 600; }
.member .crown { color: var(--yellow-t); margin-left: auto; }
.member .to-flag { color: var(--red-t); margin-left: auto; }
.side-profile { display: grid; justify-items: start; gap: 6px; padding-bottom: 12px; }
.sp-banner { height: 80px; width: calc(100% + 16px); margin: -8px -8px 0; background-size: cover; background-position: center; }
.side-profile .avatar.xl { margin: -42px 0 0 8px; border: 6px solid var(--bg1); box-sizing: content-box; }
.sp-name { font-size: 20px; font-weight: 800; padding: 0 8px; }
.sp-status, .sp-bio { padding: 0 8px; font-size: 13.5px; white-space: pre-wrap; }
.side-profile .btn { margin: 6px 8px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 12px 8px; position: sticky; top: 0; background: var(--bg1); z-index: 1; }
.panel-head b { display: flex; align-items: center; gap: 6px; }
.panel-list { display: grid; gap: 8px; padding: 0 10px 14px; }
.mini-msg { background: var(--bg2); border-radius: 10px; padding: 10px; display: grid; gap: 4px; }
.mm-top { display: flex; align-items: center; gap: 6px; font-size: 13px; min-width: 0; }
.mm-top .time { font-size: 11px; color: var(--muted); margin-left: auto; white-space: nowrap; }
.mm-text { font-size: 13.5px; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 140px; overflow: hidden; }
.mm-acts { display: flex; gap: 6px; justify-content: flex-end; }
.mm-chan { font-size: 11.5px; font-weight: 700; color: var(--muted); padding: 4px 2px 0; }
.thread-item { display: grid; gap: 2px; padding: 10px 12px; border-radius: 10px; background: var(--bg2); cursor: pointer; }
.thread-item:hover { background: var(--bg3); }
.thread-item b { display: flex; align-items: center; gap: 6px; }
.thread-item .muted { font-size: 12px; }

/* ---------- voice stage ---------- */
.stage { min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: 24px; }
.stage.has-streams { justify-content: flex-start; }
.stage.compact { min-height: 0; padding: 14px; gap: 12px; }
.call-panel { background: var(--bg0); border-bottom: 1px solid var(--line); max-height: 55%; overflow-y: auto; flex: none; }
.tiles { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; max-width: 980px; }
.tile { width: 170px; min-height: 150px; background: var(--bg1); border-radius: 16px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; border: 2px solid transparent; transition: border-color .1s; position: relative; cursor: pointer; padding: 12px 6px; overflow: hidden; }
.stage.compact .tile { width: 140px; min-height: 120px; }
.tile.has-cam { width: 300px; padding: 0; aspect-ratio: 16/9; min-height: 0; justify-content: flex-end; }
.stage.compact .tile.has-cam { width: 220px; }
.tile.speaking { border-color: var(--green); }
.tile .tname { font-weight: 600; font-size: 14px; max-width: 100%; display: flex; align-items: center; gap: 4px; padding: 0 6px; }
.tile .tname .ic { color: var(--muted); }
.tile.has-cam .tname { position: absolute; left: 8px; bottom: 8px; background: rgba(0,0,0,.6); color: #fff; padding: 2px 8px; border-radius: 6px; font-size: 13px; }
.cam-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }
.cam-video.self { transform: scaleX(-1); }
.tile .live-badge { position: absolute; top: 8px; right: 8px; }
.tile .btn { position: relative; }
.sound-pop { position: absolute; top: 10px; left: 50%; font-size: 30px; animation: pop-up 1.6s ease-out forwards; pointer-events: none; }
@keyframes pop-up { 0% { transform: translate(-50%, 20px) scale(.5); opacity: 0; } 20% { transform: translate(-50%, 0) scale(1.2); opacity: 1; } 100% { transform: translate(-50%, -40px) scale(1); opacity: 0; } }
.stage-ctr { display: flex; gap: 10px; align-items: center; justify-content: center; }
.ctl { width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--bg3); cursor: pointer; display: grid; place-items: center; color: var(--text); transition: background .12s, transform .08s; }
.ctl:hover { background: var(--bg4); }
.ctl:active { transform: scale(.94); }
.ctl.on { background: var(--text); color: var(--bg1); }
.ctl.cam.on, .ctl.share.on { background: var(--accent); color: var(--on-accent); }
.ctl.hang { background: var(--red); color: #fff; }
.ctl.accept { background: var(--green); color: #0b1f14; }
.streams { width: 100%; max-width: 1100px; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.stream-card { background: var(--bg0); border-radius: 14px; overflow: hidden; border: 1px solid var(--line); display: flex; flex-direction: column; }
.stream-card.loading { min-height: 200px; display: grid; place-items: center; }
.stream-video { width: 100%; aspect-ratio: 16 / 9; background: #000; display: block; object-fit: contain; }
.stream-top, .stream-ctr { display: flex; align-items: center; gap: 10px; padding: 8px 12px; }
.stream-who { display: flex; align-items: center; gap: 8px; font-weight: 700; flex: 1; min-width: 0; }
.stream-ctr input[type=range] { width: 120px; }
.stream-ctr .btn { padding: 6px 12px; }
.live-badge { background: var(--red); color: #fff; font-size: 10.5px; font-weight: 800; letter-spacing: .06em; padding: 2px 6px; border-radius: 4px; }
.live-badge.sm { font-size: 9px; padding: 1px 4px; }

/* soundboard */
.soundboard { width: 340px; max-height: 420px; overflow-y: auto; padding: 10px; }
.sb-head { font-weight: 800; padding: 2px 4px 4px; display: flex; align-items: center; gap: 6px; }
.sb-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.sb-btn { position: relative; display: grid; justify-items: center; gap: 2px; padding: 10px 4px 8px; border: 1px solid var(--line); background: var(--bg2); border-radius: 10px; cursor: pointer; transition: border-color .12s, transform .08s; }
.sb-btn:hover { border-color: var(--accent); background: var(--bg3); }
.sb-btn:active { transform: scale(.96); }
.sb-emo { font-size: 22px; }
.sb-name { font-size: 12px; font-weight: 600; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; max-width: 100%; }
.sb-preview { position: absolute; top: 4px; right: 4px; opacity: 0; color: var(--muted); }
.sb-btn:hover .sb-preview { opacity: 1; }

/* incoming call, event toasts */
.call-toast { position: fixed; right: 20px; top: 64px; z-index: 70; background: var(--bg1); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; display: flex; align-items: center; gap: 12px; box-shadow: 0 12px 40px var(--shadow); animation: ring-in .3s ease-out; }
.ct-txt { min-width: 120px; }
@keyframes ring-in { from { transform: translateY(-16px); opacity: 0; } }

/* ---------- popovers / menus / emoji picker ---------- */
.popover { position: fixed; z-index: 80; background: var(--bg1); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 40px var(--shadow); animation: pop-in .12s ease-out; }
@keyframes pop-in { from { opacity: 0; transform: scale(.97) translateY(4px); } }
.menu { padding: 6px; min-width: 210px; display: grid; }
.menu-item { display: flex; align-items: center; gap: 10px; border: 0; background: transparent; padding: 8px 10px; border-radius: 6px; cursor: pointer; text-align: left; font-size: 14px; color: var(--text); }
.menu-item:hover { background: var(--accent); color: var(--on-accent); }
.menu-item.danger { color: var(--red-t); }
.menu-item.danger:hover { background: var(--red); color: #fff; }
.menu-item.on { background: var(--bg3); }
.mi-icon { width: 18px; display: grid; place-items: center; }
.mi-sub { margin-left: auto; font-size: 11.5px; opacity: .7; }
.menu-sep { height: 1px; background: var(--line); margin: 4px 2px; }
.menu-title { font-weight: 700; padding: 6px 10px; }
.menu-range { display: flex; align-items: center; gap: 8px; padding: 4px 10px 8px; grid-template-columns: none; }
.menu-profile { display: flex; align-items: center; gap: 10px; padding: 8px 10px; }
.emoji-picker { width: 352px; height: 400px; display: grid; grid-template-rows: auto auto 1fr auto; overflow: hidden; }
.ep-search { margin: 10px 10px 6px; }
.ep-nav { display: flex; gap: 2px; padding: 0 8px 6px; overflow-x: auto; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.ep-tab { border: 0; background: transparent; width: 32px; height: 30px; border-radius: 6px; cursor: pointer; font-size: 17px; flex: none; display: grid; place-items: center; }
.ep-tab:hover { background: var(--bg3); }
.ep-sicon { width: 22px; height: 22px; border-radius: 6px; background: var(--bg3); font-size: 9px; font-weight: 800; display: grid; place-items: center; overflow: hidden; }
.ep-sicon img { width: 100%; height: 100%; object-fit: cover; }
.ep-body { overflow-y: auto; padding: 4px 8px 8px; }
.ep-group { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 10px 4px 4px; position: sticky; top: -4px; background: var(--bg1); }
.ep-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; }
.ep-cell { border: 0; background: transparent; height: 38px; border-radius: 6px; cursor: pointer; font-size: 24px; display: grid; place-items: center; padding: 0; transition: transform .08s; }
.ep-cell:hover { background: var(--bg3); transform: scale(1.12); }
.ep-cell img { width: 28px; height: 28px; object-fit: contain; }
.ep-foot { border-top: 1px solid var(--line); padding: 8px 12px; font-size: 13px; color: var(--muted); min-height: 36px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ep-empty { padding: 30px; text-align: center; }

/* quick switcher */
.qs-card { max-width: 560px !important; padding: 16px !important; }
.qs-input { font-size: 18px; padding: 12px 14px; }
.qs-list { display: grid; gap: 2px; max-height: 50vh; overflow-y: auto; }
.qs-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; cursor: pointer; min-width: 0; }
.qs-item.on { background: var(--bg3); }
.qs-item .qs-name { font-weight: 600; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.qs-item .qs-where { margin-left: auto; font-size: 12px; color: var(--muted); white-space: nowrap; }
.qs-item .ic { color: var(--muted); }
.kbd { display: inline-block; font-family: var(--mono); font-size: 11px; padding: 1px 6px; border-radius: 5px; border: 1px solid var(--line); border-bottom-width: 2px; color: var(--muted); }

/* ---------- modals ---------- */
.modal { position: fixed; inset: 0; background: var(--scrim); display: grid; place-items: center; padding: 16px; z-index: 50; animation: fade-in .15s ease-out; }
@keyframes fade-in { from { opacity: 0; } }
.modal-card { width: 100%; max-width: 440px; max-height: calc(100dvh - 32px); overflow-y: auto; background: var(--bg1); border: 1px solid var(--line); border-radius: 16px; padding: 22px; display: grid; gap: 12px; align-content: start; box-shadow: 0 24px 70px var(--shadow); animation: pop-in .18s ease-out; }
.modal-card.wide { max-width: 680px; }
.modal-card h3 { margin: 0; }
.modal-card .head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.modal-card .head h3 { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; align-items: center; }
.seg { display: flex; background: var(--bg0); border-radius: 8px; padding: 3px; flex-wrap: wrap; }
.seg button { flex: 1; border: 0; background: transparent; padding: 7px 10px; border-radius: 6px; cursor: pointer; color: var(--muted); font-weight: 600; white-space: nowrap; }
.seg button.on { background: var(--bg3); color: var(--text); box-shadow: 0 1px 3px var(--shadow); }
.invite { display: flex; gap: 8px; }
.invite input { flex: 1; font-family: var(--mono); }
.divider { height: 1px; background: var(--line); margin: 4px 0; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
@media (max-width: 640px) { .tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; } }
.tabs button { border: 0; background: transparent; padding: 8px 11px; cursor: pointer; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.tabs button:hover { color: var(--text); }
.tabs button.on { color: var(--text); border-bottom-color: var(--accent); }
.list { display: grid; gap: 4px; }
.list-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; background: var(--bg2); min-width: 0; }
.list-row.click { cursor: pointer; }
.list-row.click:hover { background: var(--bg3); }
.list-row.picked { outline: 2px solid var(--accent); }
.list-row .grow { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-row input[type=range] { width: 90px; }
.list-row .sub { font-size: 12px; color: var(--muted); }
.inline-input { padding: 6px 8px; background: var(--bg1); }
.emo-input { width: 52px; text-align: center; }
.pick-list { max-height: 300px; overflow-y: auto; }
.pick-list label.list-row { display: flex; grid-template-columns: none; color: var(--text); font-weight: 500; font-size: 14px; }
.role-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--muted); flex: none; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; background: var(--bg2); font-size: 12.5px; border: 1px solid var(--line); }
.chip.click { cursor: pointer; }
.chip.click:hover { border-color: var(--accent); }
.chip.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--bg2)); color: var(--text); }
.link-roles .chip { font-weight: 500; }
.chip.red { color: var(--red-t); border-color: color-mix(in srgb, var(--red) 40%, transparent); }
.perm { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.perm .txt { flex: 1; min-width: 0; }
.perm .txt b { display: block; font-size: 14px; }
.perm .txt span { font-size: 12.5px; color: var(--muted); }
.perm-group { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-top: 10px; }
.switch { position: relative; width: 40px; height: 24px; flex: none; display: block; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--bg4); transition: background .15s; cursor: pointer; }
.switch span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(16px); }
.switch input:disabled + span { opacity: .4; cursor: not-allowed; }
.tri { display: flex; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); flex: none; }
.tri button { border: 0; background: var(--bg0); width: 34px; height: 28px; cursor: pointer; color: var(--muted); font-weight: 700; }
.tri button.on.deny { background: var(--red); color: #fff; }
.tri button.on.inherit { background: var(--bg4); color: var(--text); }
.tri button.on.allow { background: var(--green); color: #0b1f14; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.swatch { width: 28px; height: 28px; border-radius: 8px; border: 2px solid transparent; cursor: pointer; padding: 0; transition: transform .08s; }
.swatch:hover { transform: scale(1.08); }
.swatch.on { border-color: var(--text); }
.inline-label { display: flex; flex-direction: row; align-items: center; gap: 10px; }
.acct-top { display: flex; align-items: center; gap: 18px; }
.banner-edit { height: 120px; border-radius: 12px; background: var(--bg3) center / cover; position: relative; display: flex; align-items: flex-end; justify-content: flex-end; gap: 6px; padding: 8px; border: 1px dashed var(--line); }
.meter-box { display: grid; gap: 8px; }
.meter { position: relative; height: 12px; border-radius: 6px; background: var(--bg0); overflow: hidden; }
.meter-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--bg4); transition: width .05s linear; }
.meter-fill.on { background: var(--green); }
.meter-mark { position: absolute; top: -2px; bottom: -2px; width: 2px; background: var(--accent); }
.theme-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.theme-card { border: 2px solid var(--line); border-radius: 12px; padding: 0; overflow: hidden; cursor: pointer; background: none; display: grid; text-align: left; }
.theme-card.on { border-color: var(--accent); }
.theme-card .tc-preview { height: 64px; display: grid; grid-template-columns: 18px 40px 1fr; }
.theme-card .tc-preview i { display: block; }
.theme-card .tc-label { padding: 8px 10px; font-weight: 600; font-size: 13px; background: var(--bg2); }
.preview-msg { background: var(--bg2); border-radius: 10px; padding: 8px 0; border: 1px solid var(--line); }
.audit-row { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: start; padding: 10px; border-radius: 8px; background: var(--bg2); }
.audit-row .ic { color: var(--muted); margin-top: 2px; }
.audit-row .ar-txt { font-size: 14px; }
.audit-row .ar-det { font-size: 12.5px; color: var(--muted); }
.audit-row .ar-time { font-size: 12px; color: var(--muted); white-space: nowrap; }
.event-card { display: grid; gap: 6px; padding: 14px; border-radius: 12px; background: var(--bg2); border: 1px solid var(--line); }
.event-card.live { border-color: var(--green); }
.ev-when { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--accent-2); }
.event-card.live .ev-when { color: var(--green-t); }
.ev-name { font-size: 17px; font-weight: 800; }
.ev-where { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.ev-desc { font-size: 14px; color: var(--text-2); white-space: pre-wrap; }
.ev-foot { display: flex; align-items: center; gap: 8px; }
.poll-opts { display: grid; gap: 6px; }
.poll-opts .po-row { display: flex; gap: 6px; }
.poll-opts input { flex: 1; }

/* profile card */
.modal-card.profile-card { padding: 0; gap: 0; overflow-x: hidden; }
.pc-banner { height: 110px; position: relative; border-radius: 16px 16px 0 0; background-size: cover; background-position: center; }
.pc-x, .pc-back { position: absolute; top: 8px; background: rgba(0,0,0,.4); color: #fff; }
.pc-x:hover, .pc-back:hover { background: rgba(0,0,0,.6); color: #fff; }
.pc-x { right: 8px; } .pc-back { left: 8px; }
.pc-av { margin: -48px 0 0 18px; border: 6px solid var(--bg1); box-sizing: content-box; }
.pc-av .status { border-color: var(--bg1); }
.pc-body { padding: 8px 20px 20px; display: grid; gap: 10px; }
.pc-body .row { justify-content: flex-start; }
.pc-name { font-size: 22px; font-weight: 800; }
.pc-status { font-size: 14px; }
.pc-bio { white-space: pre-wrap; font-size: 14px; }
.pc-roles summary { cursor: pointer; color: var(--muted); font-size: 13px; font-weight: 600; padding: 6px 0; }

/* role styling */
.uname { display: inline-flex; align-items: center; gap: 4px; min-width: 0; max-width: 100%; }
.uname .utext { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ricon { width: 18px; height: 18px; font-size: 14px; line-height: 18px; text-align: center; object-fit: contain; flex: none; border-radius: 4px; }
.fx-gradient, .fx-shimmer, .fx-rainbow { -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; background-size: 200% auto; }
.fx-gradient { background-image: linear-gradient(90deg, var(--c1), var(--c2), var(--c1)); animation: fx-pan 3s linear infinite; }
.fx-shimmer { background-image: linear-gradient(110deg, var(--c1) 35%, #fff 50%, var(--c1) 65%); background-size: 250% auto; animation: fx-pan 2.6s linear infinite; }
.fx-rainbow { background-image: linear-gradient(90deg, #ff5e5e, #ffb35e, #f9f871, #6bf28c, #5ec8ff, #9b7bff, #ff5ec4, #ff5e5e); animation: fx-pan 4s linear infinite; }
.fx-glow { animation: fx-glow 2s ease-in-out infinite; }
@keyframes fx-pan { to { background-position: -200% center; } }
@keyframes fx-glow { 0%, 100% { text-shadow: 0 0 2px transparent; } 50% { text-shadow: 0 0 10px var(--c1), 0 0 2px var(--c1); } }
.emoji-pick { width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg0); cursor: pointer; font-size: 17px; padding: 0; }
.emoji-pick:hover { border-color: var(--accent); }
.role-preview { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 10px; background: var(--bg2); font-weight: 700; margin-top: 4px; }
.role-preview .muted { margin-left: auto; font-weight: 400; }
.fx-seg { flex-wrap: wrap; }

/* lightbox, toast */
.lightbox { position: fixed; inset: 0; z-index: 90; background: rgba(0,0,0,.95); animation: fade-in .15s; outline: none; overscroll-behavior: contain; }
.lb-stage { position: absolute; inset: 56px 16px 16px; display: flex; align-items: center; justify-content: center; overflow: hidden; touch-action: none; cursor: zoom-out; }
.lb-many .lb-stage { left: 76px; right: 76px; }
.lb-stage img { max-width: 100%; max-height: 100%; min-width: 0; min-height: 0; object-fit: contain; border-radius: 8px; animation: pop-in .2s ease-out; cursor: zoom-in; user-select: none; -webkit-user-select: none; will-change: transform; }
.lb-zoomed .lb-stage img { cursor: grab; border-radius: 0; }
.lb-zoomed .lb-stage img:active { cursor: grabbing; }
.lb-loading .lb-stage::after { content: ''; width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(255,255,255,.2); border-top-color: var(--accent); animation: up-spin .8s linear infinite; position: absolute; }
.lb-top { position: absolute; top: 0; left: 0; right: 0; height: 56px; display: flex; align-items: center; gap: 6px; padding: 0 10px 0 16px; color: #ddd; font-size: 13px; background: linear-gradient(rgba(0,0,0,.55), transparent); z-index: 2; }
.lb-count { font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; }
.lb-count:empty { display: none; }
.lb-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; color: #bbb; }
.lb-gap { flex: 1; }
.lb-btn { display: inline-flex; align-items: center; gap: 6px; height: 36px; min-width: 36px; padding: 0 9px; justify-content: center; border-radius: 10px; border: 0; background: rgba(255,255,255,.08); color: #eee; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: none; flex: none; }
.lb-btn:hover { background: rgba(255,255,255,.18); color: #fff; }
.lb-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.lb-btn[disabled] { opacity: .5; cursor: progress; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%; background: rgba(0,0,0,.45); z-index: 2; }
.lb-nav:hover { background: var(--accent); color: var(--on-accent); }
.lb-prev { left: 14px; } .lb-next { right: 14px; }
.lb-zoomed .lb-nav { opacity: 0; pointer-events: none; }
.lb-in-r { animation: lb-in-r .2s ease-out !important; } .lb-in-l { animation: lb-in-l .2s ease-out !important; }
@keyframes lb-in-r { from { opacity: 0; translate: 40px 0; } }
@keyframes lb-in-l { from { opacity: 0; translate: -40px 0; } }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--bg4); color: var(--text); padding: 10px 16px; border-radius: 10px; z-index: 95; box-shadow: 0 8px 30px var(--shadow); max-width: calc(100% - 32px); animation: toast-in .2s ease-out; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 10px); } }
.reconnect { position: fixed; top: 0; left: 50%; transform: translateX(-50%); background: var(--yellow); color: #1a1406; font-weight: 700; font-size: 13px; padding: 4px 14px; border-radius: 0 0 10px 10px; z-index: 96; }
.scrim { display: none; }
.only-mobile { display: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ---------- phones ---------- */
@media (max-width: 860px) {
  .app, .app.no-panel, .app.no-side { grid-template-columns: 1fr; }
  .rail, .sidebar { position: fixed; top: 0; bottom: 0; z-index: 30; transition: transform .2s; }
  .rail { left: 0; width: 72px; }
  .sidebar { left: 72px; width: min(290px, calc(100vw - 72px)); }
  .app:not(.drawer) .rail { transform: translateX(-100%); }
  .app:not(.drawer) .sidebar { transform: translateX(calc(-100% - 72px)); }
  .side-panel, .app.no-panel .side-panel, .app.no-side .side-panel { position: fixed; right: 0; top: 0; bottom: 0; width: min(300px, 86vw); z-index: 30; transform: translateX(100%); transition: transform .2s; display: block; }
  .app.show-panel .side-panel { transform: none; }
  .app.drawer .scrim, .app.show-panel .scrim { display: block; position: fixed; inset: 0; background: var(--scrim); z-index: 20; }
  .only-mobile { display: grid; }
  .msg { padding: 2px 12px; gap: 0 10px; grid-template-columns: 36px 1fr; }
  .msg .m-av { width: 36px; height: 36px; }
  .tools { right: 8px; }
  .composer { padding: 0 8px max(8px, calc(env(safe-area-inset-bottom) - 14px)); }
  .search-box { width: 36px; padding: 0 9px; }
  .search-box input { width: 0; padding: 6px 0; }
  .search-box:focus-within { width: 160px; }
  .search-box:focus-within input { width: 100%; padding: 6px; }
  .ch-topic { display: none; }
  .ch-title { max-width: 55%; }
  .tile { width: 140px; }
  .tile.has-cam { width: 100%; max-width: 340px; }
  .people { padding: 14px; }
  .emoji-picker { width: min(352px, calc(100vw - 16px)); }
  .call-toast { left: 12px; right: 12px; top: 60px; }
  .theme-cards { grid-template-columns: 1fr 1fr; }
}

/* ---------- v3 small pieces ---------- */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 560px) { .two-col { grid-template-columns: 1fr; } }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent-2); font: inherit; font-weight: 600; cursor: pointer; }
.link-btn:hover { text-decoration: underline; }
.unread-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text); flex: none; }
.poll-opt.winner { border-color: var(--yellow); }
.poll-opt .po-win { color: var(--yellow-t); }
.tflag { color: var(--muted); margin-left: 2px; }
.tflag.danger { color: var(--red-t); }
.viewers { display: inline-flex; align-items: center; gap: 4px; }
.sb-head { display: flex; align-items: center; gap: 6px; }
.btn .ic { flex: none; }
.ctl .ic { pointer-events: none; }
.events-modal .event-card + .event-card { margin-top: 2px; }
.accent-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.accent-row .swatch { border-radius: 50%; width: 30px; height: 30px; }
.font-row { display: flex; align-items: center; gap: 12px; }
.font-row input { flex: 1; }
.admin-row { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 8px; background: var(--bg2); }
.admin-row .ar-btns { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.reset-out { display: grid; gap: 6px; padding: 10px; border-radius: 10px; background: var(--bg2); border: 1px solid var(--line); }
.inv-row { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 8px; background: var(--bg2); }
.inv-row code { font-size: 13px; }
.inv-row .muted { font-size: 12px; }
.badge-new { font-size: 10px; font-weight: 800; padding: 2px 6px; border-radius: 6px; background: var(--accent); color: var(--on-accent); }
.app.compact .msg .body > .thread-chip { display: flex; width: fit-content; }
.avatar { display: flex; align-items: center; justify-content: center; }
.accent-row input[type=color] { width: 30px; height: 30px; border-radius: 50%; padding: 0; border: 2px solid var(--line); overflow: hidden; cursor: pointer; }
.accent-row input[type=color]::-webkit-color-swatch-wrapper { padding: 0; }
.accent-row input[type=color]::-webkit-color-swatch { border: 0; border-radius: 50%; }

/* friends */
.friend-tabs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ftab { border: 0; background: transparent; color: var(--muted); font-weight: 600; padding: 6px 12px; border-radius: 8px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.ftab:hover { background: var(--hover); color: var(--text); }
.ftab.on { background: var(--bg3); color: var(--text); }
.ftab.add { background: var(--green); color: #0b1f14; }
.ftab.add.on { background: transparent; color: var(--green-t); box-shadow: inset 0 0 0 1px var(--green); }
.people-top h2 { display: flex; align-items: center; gap: 8px; }
.people-top { flex-wrap: wrap; gap: 12px; }
.friend-list { display: grid; gap: 2px; margin-top: 10px; }
.add-friend { display: flex; gap: 8px; padding: 8px; border-radius: 12px; background: var(--bg1); border: 1px solid var(--line); }
.add-friend input { flex: 1; border: 0; background: transparent; font-size: 15px; }
.add-friend input:focus { outline: none; box-shadow: none; }
.person .icon-btn.accept { color: var(--green-t); }
.blocked-msg { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; padding: 6px 20px 6px 72px; }
.app.compact .blocked-msg { padding-left: 20px; }

/* voice messages */
.composer.recording .composer-row { display: none; }
.recorder { display: flex; align-items: center; gap: 10px; background: var(--bg1); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--red); animation: rec-pulse 1s ease-in-out infinite; flex: none; }
@keyframes rec-pulse { 50% { opacity: .35; } }
.rec-time { font-variant-numeric: tabular-nums; font-weight: 700; min-width: 40px; }
.rec-bars { flex: 1; height: 30px; display: flex; align-items: center; justify-content: flex-end; gap: 2px; overflow: hidden; }
.rec-bars i { width: 3px; border-radius: 2px; background: var(--accent); flex: none; }
.rec-send { background: var(--accent) !important; color: var(--on-accent) !important; border-radius: 50%; }
.rec-cancel:hover { color: var(--red-t); }
.voice-msg { display: flex; align-items: center; gap: 10px; background: var(--bg1); border: 1px solid var(--line); border-radius: 24px; padding: 6px 12px 6px 6px; width: min(340px, 100%); margin-top: 4px; }
.vm-play { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; cursor: pointer; flex: none; }
.vm-wave { flex: 1; height: 28px; display: flex; align-items: center; gap: 2px; cursor: pointer; }
.vm-wave i { flex: 1; min-width: 2px; border-radius: 2px; background: var(--bg4); transition: background .1s; }
.vm-wave i.on { background: var(--accent); }
.vm-time { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 32px; text-align: right; }
.vm-speed { border: 0; background: var(--bg3); color: var(--text-2); font-size: 11px; font-weight: 800; border-radius: 6px; padding: 3px 6px; cursor: pointer; }

/* GIFs */
.gif-picker { width: min(420px, calc(100vw - 24px)); padding: 10px; display: grid; gap: 8px; }
.gif-search { width: 100%; }
.gif-grid { columns: 2; column-gap: 6px; max-height: 360px; overflow-y: auto; }
.gif-cell { display: block; width: 100%; margin: 0 0 6px; padding: 0; border: 0; border-radius: 8px; overflow: hidden; background: var(--bg3); cursor: pointer; break-inside: avoid; min-height: 60px; }
.gif-cell img, .gif-cell video { width: 100%; height: 100%; display: block; object-fit: cover; }
.gif-cell:hover { outline: 2px solid var(--accent); }
.gif-foot { font-size: 11px; color: var(--muted); text-align: right; font-weight: 700; letter-spacing: .02em; }
.gif-embed { margin-top: 4px; max-width: min(320px, 100%); }
.gif-embed img { max-width: 100%; max-height: 300px; border-radius: 8px; display: block; cursor: zoom-in; }
.vm-wave i, .rec-bars i { display: block; }
.gif-grid { height: 360px; max-height: 50vh; }

/* ---------- Windows app ---------- */
#titlebar { display: none; }
html.desktop #titlebar { display: flex; position: fixed; inset: 0 0 auto 0; height: 32px; align-items: center; gap: 8px; padding-left: 14px; -webkit-app-region: drag; z-index: 45; background: var(--bg0); color: var(--muted); font-size: 12.5px; font-weight: 700; user-select: none; }
html.desktop #titlebar svg { color: var(--accent-t); }
html.desktop body { padding-top: 32px; box-sizing: border-box; }
html.desktop .app { height: calc(100dvh - 32px); }
html.desktop .reconnect { top: 32px; }
html.desktop .call-toast { top: 80px; }
.src-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.src-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; max-height: 52vh; overflow-y: auto; padding: 2px; }
.src-card { display: grid; gap: 6px; padding: 8px; border-radius: 10px; border: 2px solid var(--line); background: var(--bg2); cursor: pointer; text-align: left; color: var(--text); font: inherit; }
.src-card:hover { border-color: var(--accent); }
.src-card > img { width: 100%; aspect-ratio: 16 / 9; object-fit: contain; background: #000; border-radius: 6px; }
.src-name { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; min-width: 0; }
.src-name span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.src-icon { width: 16px; height: 16px; flex: none; }
.dl-link { display: inline-flex; align-items: center; gap: 6px; }

/* invite cards in messages */
.invite-embed { margin-top: 6px; width: min(430px, 100%); border-radius: 12px; background: var(--bg1); border: 1px solid var(--line); padding: 12px 14px 14px; display: grid; gap: 10px; position: relative; overflow: hidden; }
.invite-embed.has-banner::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 46px; background: var(--ie-banner) center / cover; opacity: .35; }
.invite-embed > * { position: relative; }
.ie-label { font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.ie-row { display: flex; align-items: center; gap: 12px; }
.ie-icon { width: 50px; height: 50px; border-radius: 15px; background: var(--bg3); font-size: 15px; flex: none; color: var(--muted); }
.ie-icon img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.ie-txt { display: grid; gap: 2px; min-width: 0; flex: 1; }
.ie-txt b { font-size: 16px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ie-sub { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 4px; white-space: pre; }
.ie-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); display: inline-block; }
.ie-dot.on { background: var(--green); }
.ie-btn { flex: none; min-width: 84px; }
.invite-embed.bad .ie-txt b { color: var(--red-t); }

/* Lodge's update button (bottom of the server list) */
.rail-btn.upd { margin-top: auto; color: var(--accent-t); background: var(--accent-soft); }
.rail-btn.upd:hover { background: color-mix(in srgb, var(--accent) 24%, transparent); }
.rail-btn.upd::after { content: ''; position: absolute; inset: -4px; border-radius: 19px; border: 2px solid var(--accent); opacity: 0; animation: upd-glow 2.8s ease-in-out infinite; pointer-events: none; }
.rail-btn.upd .ic { animation: upd-bob 2.8s ease-in-out infinite; }
@keyframes upd-glow { 0%, 100% { opacity: 0; transform: scale(.92); } 50% { opacity: .55; transform: scale(1); } }
@keyframes upd-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2px); } }
@media (prefers-reduced-motion: reduce) { .rail-btn.upd::after, .rail-btn.upd .ic { animation: none; } }
.upd-card { width: 300px; padding: 14px; display: grid; gap: 10px; }
.upd-head { display: flex; align-items: center; gap: 10px; }
.upd-head b { font-size: 15px; }
.upd-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-t); flex: none; }
.upd-text { margin: 0; font-size: 13.5px; }
.upd-note { margin: 0; font-size: 12px; color: var(--muted); }
.upd-btns { display: flex; justify-content: flex-end; gap: 8px; }
.rail-btn.upd::before { display: none; }

/* right-click menu for people */
.user-menu { min-width: 230px; }
.um-head { display: flex; align-items: center; gap: 10px; padding: 8px 10px 6px; }
.um-head b { font-size: 14px; }
.user-menu .menu-range .ic { color: var(--muted); flex: none; }
.user-menu .menu-range input { flex: 1; }

/* moderation panel in profile cards */
.mod-panel { display: grid; gap: 8px; }
.mod-banner { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; font-size: 13px; font-weight: 600; color: var(--red-t); background: color-mix(in srgb, var(--red) 12%, transparent); border: 1px solid color-mix(in srgb, var(--red) 30%, transparent); }
.mod-title { font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin-top: 2px; }
.mod-list { display: grid; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--bg2); }
.mod-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 0; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: background .12s; }
.mod-item + .mod-item { border-top: 1px solid var(--line); }
.mod-item:hover { background: var(--hover); }
.mod-ic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex: none; background: var(--bg3); color: var(--muted); }
.mod-item:hover .mod-ic { color: var(--text); }
.mod-txt { display: grid; gap: 1px; flex: 1; min-width: 0; }
.mod-txt b { font-size: 14px; font-weight: 600; }
.mod-txt span { font-size: 12px; color: var(--muted); }
.mod-chev { color: var(--muted); flex: none; }
.mod-item.danger .mod-txt b { color: var(--red-t); }
.mod-item.danger .mod-ic { color: var(--red-t); background: color-mix(in srgb, var(--red) 12%, transparent); }
.mod-item.danger:hover { background: color-mix(in srgb, var(--red) 9%, transparent); }

/* What's new */
.wn-card { position: fixed; right: 20px; bottom: 20px; z-index: 60; width: min(340px, calc(100vw - 32px)); background: var(--bg1); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 14px 40px var(--shadow); padding: 12px 12px 12px 14px; display: grid; gap: 8px; animation: toast-in .25s ease-out; }
.wn-card::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 3px; border-radius: 14px 14px 0 0; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.wn-top { display: flex; align-items: flex-start; gap: 10px; }
.wn-ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-t); flex: none; }
.wn-t { display: grid; flex: 1; min-width: 0; }
.wn-kicker { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--accent-2); }
.wn-t b { font-size: 14.5px; }
.wn-prev { font-size: 13px; color: var(--text-2); white-space: pre-wrap; max-height: 62px; overflow: hidden; -webkit-mask-image: linear-gradient(#000 60%, transparent); mask-image: linear-gradient(#000 60%, transparent); }
.wn-card .btn { justify-self: start; }
.wn-note { padding: 12px 14px; border-radius: 12px; background: var(--bg2); border: 1px solid var(--line); display: grid; gap: 4px; }
.wn-note.big { background: none; border: 0; padding: 0; }
.wn-date { font-size: 12px; color: var(--muted); }
.wn-title { margin: 0; font-size: 17px; }
.wn-body { font-size: 14px; white-space: pre-wrap; line-height: 1.55; }
html.desktop .wn-card { bottom: 20px; }

/* Lodge Staff: badge next to staff names, and the hover tag on every name */
.staff-badge { flex: none; color: var(--accent-t); filter: drop-shadow(0 0 4px color-mix(in srgb, var(--accent) 55%, transparent)); animation: staff-glow 3s ease-in-out infinite; }
@keyframes staff-glow { 0%, 100% { filter: drop-shadow(0 0 2px color-mix(in srgb, var(--accent) 40%, transparent)); } 50% { filter: drop-shadow(0 0 6px color-mix(in srgb, var(--accent) 80%, transparent)); } }
.staff-tip { position: fixed; z-index: 99; pointer-events: none; display: flex; align-items: center; gap: 7px; padding: 6px 11px; border-radius: 9px; font-size: 12.5px; font-weight: 600; background: var(--bg4); color: var(--muted); box-shadow: 0 8px 24px var(--shadow); animation: pop-in .12s ease-out; white-space: nowrap; }
.staff-tip.is-staff { color: #fff; font-weight: 800; letter-spacing: .02em; background: linear-gradient(120deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #ffd36b) 50%, var(--accent)); background-size: 220% 100%; animation: pop-in .12s ease-out, staff-shine 2.4s linear infinite; box-shadow: 0 8px 26px color-mix(in srgb, var(--accent) 45%, transparent); text-shadow: 0 1px 2px rgba(0,0,0,.35); }
.staff-tip .st-ic { display: grid; place-items: center; }
@keyframes staff-shine { from { background-position: 0% 0; } to { background-position: 220% 0; } }
@media (prefers-reduced-motion: reduce) { .staff-badge, .staff-tip.is-staff { animation: none; } }

/* search filters */
.search-tips { min-width: 260px; }
.search-tips .menu-item { gap: 10px; }
.search-tips code { font-size: 12.5px; background: var(--bg3); padding: 1px 6px; border-radius: 5px; color: var(--accent-t); }
.search-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 8px; }
.search-chips .chip { font-size: 12px; padding: 2px 9px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--text); }

/* stickers */
.sticker { margin-top: 4px; }
.sticker img { width: 160px; height: 160px; object-fit: contain; display: block; user-select: none; }
.sticker.small img { width: 72px; height: 72px; }
.sticker-picker { width: 340px; max-width: calc(100vw - 24px); display: flex; flex-direction: column; gap: 8px; padding: 10px; }
.sticker-picker .sp-body { max-height: 340px; overflow-y: auto; }
.sp-head { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 8px 2px 6px; }
.sp-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.sp-cell { aspect-ratio: 1; border-radius: 10px; background: var(--bg2); border: 1px solid transparent; padding: 6px; cursor: pointer; transition: transform .12s, border-color .12s; }
.sp-cell:hover { border-color: var(--accent); transform: translateY(-1px) rotate(-2deg); }
.sp-cell img { width: 100%; height: 100%; object-fit: contain; }
.sticker-admin { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-top: 10px; }
.sa-card { background: var(--bg2); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.sa-card img { width: 96px; height: 96px; object-fit: contain; }
.sa-row { display: flex; gap: 4px; width: 100%; align-items: center; }
.sa-row input { flex: 1; min-width: 0; }
.sa-name { font-size: 13px; }

/* watch together */
.watch-dock { background: var(--bg1); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; position: relative; flex: 0 0 auto; }
.watch-dock:not(.mini) .wd-player { height: min(52vh, calc((100vw - 560px) * 0.5625)); min-height: 200px; }
.wd-head { display: flex; align-items: center; gap: 4px; padding: 6px 10px; }
.wd-title { display: flex; align-items: center; gap: 6px; color: var(--accent-t); min-width: 0; white-space: nowrap; overflow: hidden; }
.wd-title b { color: var(--text); font-size: 13.5px; }
.wd-player { background: #000; display: flex; align-items: stretch; justify-content: center; }
.wd-player > iframe, .wd-player > div, .wd-player > video { width: 100%; height: 100%; border: 0; }
.wd-player.audio { flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 18px; height: auto !important; min-height: 0 !important; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 22%, var(--bg2)), var(--bg1)); }
.wd-player.audio > audio { width: min(520px, 100%); height: 40px; }
.wd-audio { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 600; }
.wd-tap { position: absolute; left: 50%; top: 55%; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 8px; padding: 12px 18px; border-radius: 999px; border: 0; background: var(--accent); color: var(--on-accent); font-weight: 700; cursor: pointer; box-shadow: 0 8px 30px #0008; z-index: 2; }
.watch-dock.mini { position: fixed; right: 16px; bottom: 16px; width: 360px; max-width: calc(100vw - 32px); z-index: 60; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: 0 16px 50px #000a; }
.watch-dock.mini .wd-player { aspect-ratio: 16 / 9; }
.watch-dock.mini .wd-player.audio { aspect-ratio: auto; }
@media (max-width: 760px) { .watch-dock:not(.mini) .wd-player { height: 56vw; min-height: 0; } .watch-dock.mini { width: 220px; bottom: 76px; } }

/* clips */
.clip-btn { display: inline-flex; align-items: center; gap: 4px; margin-right: 4px; }
.clip-preview { width: 100%; max-height: 60vh; background: #000; border-radius: 10px; }
.key-pick { display: flex; align-items: center; gap: 4px; }

/* Keeper + webhook authors */
.bot-tag { display: inline-flex; align-items: center; gap: 3px; font-size: 10.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; padding: 1px 6px 1px 5px; border-radius: 6px; background: color-mix(in srgb, var(--muted) 22%, transparent); color: var(--text); vertical-align: 2px; margin-right: 2px; }
.bot-tag.keeper { background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 85%, #ffd27a), var(--accent)); color: #1b1410; box-shadow: 0 0 10px color-mix(in srgb, var(--accent) 35%, transparent); }
.bot-name .utext { color: var(--text); font-weight: 650; }
.avatar.bot-av { box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 30%, transparent); }

/* corner notices (reminders, group-ups, warnings) */
.notice-stack { position: fixed; right: 18px; bottom: 18px; z-index: 80; display: flex; flex-direction: column; gap: 10px; width: 330px; max-width: calc(100vw - 24px); }
html.desktop .notice-stack { bottom: 20px; }
.notice-card { background: var(--bg1); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 12px; padding: 10px 10px 10px 12px; box-shadow: 0 14px 40px #0009; animation: nc-in .25s ease-out; transition: opacity .4s; }
.notice-card.fade { opacity: .55; }
.notice-card:hover { opacity: 1; }
@keyframes nc-in { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }
.nc-top { display: flex; align-items: flex-start; gap: 10px; }
.nc-ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent-t); flex: 0 0 30px; }
.nc-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.nc-kicker { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; }
.nc-t b { font-size: 14.5px; overflow-wrap: anywhere; }
.nc-body { font-size: 13px; color: var(--muted); margin: 6px 0 0 40px; overflow-wrap: anywhere; }
.nc-acts { display: flex; gap: 6px; margin: 8px 0 0 40px; flex-wrap: wrap; }

/* group-ups */
.lfg-card { margin-top: 6px; max-width: 440px; border-radius: 14px; padding: 12px 14px; background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 13%, var(--bg2)), var(--bg2) 60%); border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line)); display: flex; flex-direction: column; gap: 8px; }
.lfg-card.closed, .lfg-card.fired { background: var(--bg2); border-color: var(--line); }
.lfg-card.closed { opacity: .7; }
.lfg-head { display: flex; align-items: center; gap: 10px; }
.lfg-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); flex: 0 0 34px; }
.lfg-t { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.lfg-kicker { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--accent-t); }
.lfg-card.closed .lfg-kicker, .lfg-card.fired .lfg-kicker { color: var(--muted); }
.lfg-t b { font-size: 16px; overflow-wrap: anywhere; }
.lfg-count { font-weight: 800; font-size: 15px; font-variant-numeric: tabular-nums; padding: 3px 9px; border-radius: 999px; background: var(--bg3); }
.lfg-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.lfg-meta svg:not(:first-child) { margin-left: 8px; }
.lfg-note { font-size: 13.5px; }
.lfg-slots { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.lfg-slots .avatar { width: 30px; height: 30px; }
.lfg-empty { width: 30px; height: 30px; border-radius: 50%; border: 2px dashed color-mix(in srgb, var(--muted) 55%, transparent); }
.lfg-acts { display: flex; gap: 6px; flex-wrap: wrap; }

/* role pickers */
.picker-card { margin-top: 6px; max-width: 520px; padding: 12px 14px; border-radius: 14px; background: var(--bg2); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.pk-title { font-size: 15px; }
.pk-roles { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.pk-role { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg1); color: var(--text); font: inherit; font-size: 13.5px; cursor: pointer; transition: border-color .12s, background .12s; }
.pk-role:hover { border-color: var(--accent); }
.pk-role .pk-check { display: none; color: var(--accent-t); }
.pk-role.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--bg1)); }
.pk-role.on .pk-check { display: inline; }
.pick-list { display: flex; flex-direction: column; gap: 2px; max-height: 260px; overflow-y: auto; margin-bottom: 8px; }
.pick-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; cursor: pointer; flex-direction: row !important; }
.pick-row:hover { background: var(--bg2); }

/* Keeper settings */
.keeper-intro { display: flex; gap: 14px; align-items: center; padding: 12px; border-radius: 14px; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 14%, var(--bg2)), var(--bg2)); margin-bottom: 8px; }
.keeper-av { width: 56px; height: 56px; flex: 0 0 56px; }
.keeper-intro b { font-size: 16px; }
.keeper-text { width: 100%; resize: vertical; min-height: 44px; font: inherit; }
.keeper-reply { white-space: pre-wrap; font: inherit; background: var(--bg2); padding: 12px; border-radius: 10px; margin: 0 0 10px; }
.cmd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 4px 12px; }
.cmd-row { display: flex !important; flex-direction: row !important; align-items: center; gap: 8px; padding: 5px 4px; cursor: pointer; }
.cmd-row code { color: var(--accent-t); font-size: 13px; }
.join-roles .jr-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 10px; }
.jr-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 10px; border-radius: 999px; background: var(--bg2); font-size: 13px; }
.jr-x { border: 0; background: none; color: var(--muted); cursor: pointer; display: grid; place-items: center; padding: 2px; border-radius: 50%; }
.jr-x:hover { color: var(--text); background: var(--bg3); }
.jr-add { display: inline-flex; align-items: center; gap: 4px; border: 1px dashed var(--line); background: none; color: var(--muted); padding: 4px 10px; border-radius: 999px; cursor: pointer; font: inherit; font-size: 13px; }
.jr-add:hover { color: var(--text); border-color: var(--accent); }
.ac-cmd { color: var(--accent-t); }

/* webhooks */
.hook-card { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 12px; background: var(--bg2); margin-bottom: 8px; flex-wrap: wrap; }
.hook-av { border: 0; background: none; padding: 0; cursor: pointer; border-radius: 50%; }
.hook-av:hover { outline: 2px solid var(--accent); }
.hook-mid { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 160px; }
.hook-btns { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12.5px; }

/* media gallery */
.media-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 0 10px 10px; }
.media-cell { position: relative; aspect-ratio: 1; border: 0; padding: 0; border-radius: 8px; overflow: hidden; background: var(--bg2); cursor: pointer; }
.media-cell img, .media-cell video { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }
.media-cell:hover img, .media-cell:hover video { transform: scale(1.05); }
.media-play { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; background: #0004; }
.media-empty { grid-column: 1 / -1; }
.media-more { margin: 0 auto 12px; display: block; }

/* two-step login */
.tf-on { font-weight: 700; color: var(--green, #3ba55d); }
.tf-qr { width: 200px; height: 200px; margin: 6px auto 10px; border-radius: 12px; overflow: hidden; background: #fff; display: grid; place-items: center; color: #333; font-size: 12px; text-align: center; }
.tf-qr svg { width: 100%; height: 100%; }
.tf-key { text-align: center; margin-bottom: 10px; }
.tf-key code { font-size: 13px; letter-spacing: .04em; user-select: all; }
.tf-code { font-size: 22px; letter-spacing: .3em; text-align: center; width: 100%; }
.tf-backup { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin: 4px 0 12px; }
.tf-backup code { background: var(--bg2); padding: 8px; border-radius: 8px; text-align: center; font-size: 14px; letter-spacing: .05em; user-select: all; }

/* playing now */
.activity { display: flex; align-items: center; gap: 4px; font-size: 13px; margin-top: 6px; color: var(--text); flex-wrap: wrap; }
.activity svg { color: var(--accent-t); }
.m-sub.m-playing { color: var(--text); }
.m-sub.m-playing svg { color: var(--accent-t); vertical-align: -2px; }
.keeper-member .mname { display: inline-flex; align-items: center; gap: 5px; }
.keeper-member .bot-tag { vertical-align: 0; }
.keeper-pop { width: 300px; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.kp-top { display: flex; gap: 12px; align-items: center; }
.kp-top b { font-size: 16px; margin-right: 6px; }
.kp-h { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-top: 4px; }
.kp-cmds { display: flex; flex-direction: column; gap: 3px; max-height: 220px; overflow-y: auto; }
.kp-cmds code { color: var(--accent-t); font-size: 12.5px; }

/* drag channels / categories into place */
#channels .chan[draggable="true"], #channels .cat[draggable="true"] { -webkit-user-drag: element; }
#channels .dragging { opacity: .35; }
#channels .drop-before, #channels .drop-after { position: relative; }
#channels .drop-before::before, #channels .drop-after::after { content: ''; position: absolute; left: 6px; right: 6px; height: 3px; border-radius: 3px; background: var(--accent); box-shadow: 0 0 8px color-mix(in srgb, var(--accent) 60%, transparent); pointer-events: none; z-index: 2; }
#channels .drop-before::before { top: -2px; }
#channels .drop-after::after { bottom: -2px; }
#channels .cat.drop-into { background: color-mix(in srgb, var(--accent) 16%, transparent); border-radius: 6px; outline: 1px dashed var(--accent); }
#channels.dnd-on .chan:hover { background: none; }

/* view server as role */
.pv-banner { margin: 4px 6px 10px; padding: 10px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 16%, var(--bg2)); border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); display: flex; flex-direction: column; gap: 8px; }
.pv-t { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; }
.pv-t svg { color: var(--accent-t); }
.pv-banner .row { margin: 0; justify-content: flex-start; }
.pv-flag { margin-left: auto; font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); border: 1px solid var(--line); padding: 0 5px; border-radius: 5px; }
.chan.pv-hidden { opacity: .5; }
.pv-bar { padding: 8px 16px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--accent) 8%, var(--bg1)); display: flex; flex-direction: column; gap: 6px; flex: 0 0 auto; }
.pv-line { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.pv-line svg { color: var(--accent-t); }
.pv-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.pv-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; padding: 2px 8px; border-radius: 999px; }
.pv-chip.yes { background: color-mix(in srgb, var(--green) 18%, transparent); color: var(--text); }
.pv-chip.yes svg { color: var(--green-t); }
.pv-chip.no { background: color-mix(in srgb, var(--red) 14%, transparent); color: var(--muted); }
.pv-chip.no svg { color: var(--red-t); }

/* voice sensitivity */
.meter-bg { position: absolute; top: 0; bottom: 0; width: 2px; background: color-mix(in srgb, var(--text) 45%, transparent); }
.meter-legend { margin: 4px 0 8px; }
.sens-ends { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); margin-top: -2px; }

/* inbox */
.inbox-btn { color: var(--muted); }
.inbox-btn:hover { color: var(--accent-t); }
.inbox-pop { width: 420px; max-width: calc(100vw - 24px); max-height: min(560px, 80vh); display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.ib-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.ib-head svg { color: var(--accent-t); }
.ib-head b { font-size: 15px; }
.ib-list { overflow-y: auto; padding: 6px; display: flex; flex-direction: column; gap: 4px; }
.ib-item { text-align: left; border: 0; background: none; color: var(--text); font: inherit; padding: 8px 10px; border-radius: 10px; cursor: pointer; display: flex; flex-direction: column; gap: 5px; }
.ib-item:hover { background: var(--bg2); }
.ib-top { display: flex; gap: 8px; align-items: center; font-size: 12px; flex-wrap: wrap; }
.ib-where { font-weight: 650; color: var(--muted); }
.ib-why { color: var(--accent-t); font-weight: 650; }
.ib-top .muted { margin-left: auto; }
.ib-body { display: flex; gap: 8px; align-items: flex-start; }
.ib-txt { font-size: 13.5px; overflow-wrap: anywhere; line-height: 1.35; }
.ib-more { margin: 6px auto; display: block; }

/* voice channel status */
.chan.has-status { flex-wrap: wrap; }
.vstatus { flex-basis: 100%; order: 10; font-size: 12px; color: var(--muted); margin: -2px 0 0 30px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* rules screen */
.rules-text { background: var(--bg2); border-radius: 12px; padding: 12px 14px; max-height: 50vh; overflow-y: auto; margin-bottom: 12px; line-height: 1.5; }

/* site admin */
.admin-sect { margin-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.modal-card .seg { flex-wrap: wrap; }
.health-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.h-tile { background: var(--bg2); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 2px; border: 1px solid transparent; }
.h-tile.warn { border-color: color-mix(in srgb, var(--red) 55%, transparent); background: color-mix(in srgb, var(--red) 9%, var(--bg2)); }
.h-label { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; }
.h-value { font-size: 19px; font-variant-numeric: tabular-nums; }
.h-sub { font-size: 12px; color: var(--muted); }
.person .p-name { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.p-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 650; line-height: 1; padding: 4px 8px 4px 6px; border-radius: 999px; background: var(--bg3); color: var(--text-2); border: 1px solid var(--line); white-space: nowrap; }
.p-chip svg { flex: none; }
.p-chip.admin { background: color-mix(in srgb, var(--accent) 14%, var(--bg1)); border-color: color-mix(in srgb, var(--accent) 45%, transparent); color: var(--text); }
.p-chip.admin svg { color: var(--accent-t); }
.p-chip.bad { background: color-mix(in srgb, var(--red) 14%, var(--bg1)); border-color: color-mix(in srgb, var(--red) 45%, transparent); color: var(--text); }
.p-chip.bad svg { color: var(--red-t); }
.p-chip.good { background: color-mix(in srgb, var(--green) 12%, var(--bg1)); border-color: color-mix(in srgb, var(--green) 40%, transparent); color: var(--text); }
.p-chip.good svg { color: var(--green-t); }
.person.suspended { opacity: .6; }
.small-code { max-width: 220px; font-size: 18px; }
.err-list { display: flex; flex-direction: column; gap: 4px; max-height: 55vh; overflow-y: auto; }
.err-item { background: var(--bg2); border-radius: 8px; padding: 6px 10px; border-left: 3px solid var(--yellow); }
.err-item.error { border-left-color: var(--red); }
.err-item summary { cursor: pointer; display: flex; gap: 8px; align-items: baseline; font-size: 12.5px; list-style: none; }
.err-lvl { font-weight: 800; text-transform: uppercase; font-size: 10.5px; color: var(--muted); }
.err-time { color: var(--muted); white-space: nowrap; }
.err-first { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; font-family: ui-monospace, Consolas, monospace; }
.err-text { white-space: pre-wrap; font-size: 12px; margin: 8px 0 2px; max-height: 300px; overflow: auto; font-family: ui-monospace, Consolas, monospace; }
.meter-box input[type=range] { width: 100%; }
.cal-box { margin-top: 12px; padding: 12px; border-radius: 12px; background: var(--bg2); display: flex; flex-direction: column; gap: 8px; }
.cal-t { display: flex; flex-direction: column; gap: 2px; }
.cal-res { padding: 10px 12px; border-radius: 10px; font-size: 13.5px; line-height: 1.45; }
.cal-res.good { background: color-mix(in srgb, var(--green) 14%, transparent); }
.cal-res.bad { background: color-mix(in srgb, var(--yellow) 14%, transparent); }
.cal-res .row { margin-top: 8px; justify-content: flex-start; }
.ai-status.err { color: var(--red-t); }

/* ---------- landing page (signed-out visitors) ---------- */
@font-face { font-family: "Bricolage"; font-style: normal; font-weight: 200 800; font-stretch: 75% 100%; font-display: swap; src: url(fonts/bricolage-latin.woff2) format("woff2"); }
.landing {
  --lp-night: #13213a; --lp-ridge: #1b2b45; --lp-pine: #102521; --lp-lantern: #ffb35c; --lp-ember: #ff8a3d; --lp-snow: #eef2f7; --lp-mist: #a9b6cb;
  position: fixed; inset: 0; overflow-y: auto; z-index: 50; background: var(--lp-pine); color: var(--lp-snow);
  font-family: Inter, system-ui, sans-serif; -webkit-font-smoothing: antialiased;
}
.landing.hidden { display: none; }
.lp-bar { position: absolute; top: 0; left: 0; right: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; padding: 22px clamp(18px, 5vw, 64px); }
.lp-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--lp-snow); text-decoration: none; font-family: Bricolage, Inter, sans-serif; font-weight: 700; font-size: 22px; letter-spacing: -.01em; }
.lp-brand svg { color: var(--lp-lantern); }
.lp-link { background: none; border: 0; color: var(--lp-snow); font: 600 15px Inter, sans-serif; padding: 8px 12px; border-radius: 8px; cursor: pointer; }
.lp-link:hover { background: rgba(255, 255, 255, .08); }
.lp-hero { position: relative; min-height: min(92vh, 760px); display: flex; align-items: center; overflow: hidden; background: var(--lp-night); }
.lp-scene { position: absolute; inset: 0; width: 100%; height: 100%; }
.lp-win { fill: #2c3b57; animation: lp-light .9s ease-out forwards; animation-delay: calc(.6s + var(--i) * .45s); }
@keyframes lp-light { 0% { fill: #2c3b57; } 35% { fill: #ffd08f; } 50% { fill: #c99a62; } 100% { fill: var(--lp-lantern); } }
.lp-copy { position: relative; z-index: 1; max-width: 46rem; margin-left: clamp(18px, 7vw, 120px); padding: 120px 0 180px; }
.lp-copy h1 { font-family: Bricolage, Inter, sans-serif; font-weight: 720; font-stretch: 96%; font-size: clamp(46px, 7.2vw, 92px); line-height: 1; letter-spacing: -.012em; margin: 0 0 22px; color: var(--lp-snow); }
.lp-lead { font-size: clamp(17px, 1.6vw, 19px); line-height: 1.6; color: #d3dbe8; margin: 0 0 30px; max-width: 32rem; }
.lp-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.lp-btn { display: inline-flex; align-items: center; gap: 8px; border-radius: 12px; padding: 13px 22px; font: 650 16px Inter, sans-serif; cursor: pointer; text-decoration: none; border: 1px solid transparent; transition: transform .12s, background .12s; }
.lp-btn.primary { background: var(--lp-lantern); color: #2a1604; }
.lp-btn.primary:hover { background: #ffc27a; transform: translateY(-1px); }
.lp-btn.ghost { color: var(--lp-snow); border-color: rgba(238, 242, 247, .35); background: rgba(19, 33, 58, .45); }
.lp-btn.ghost:hover { border-color: var(--lp-snow); }
.lp-btn.hidden { display: none; }
.lp-note { margin: 18px 0 0; font-size: 14.5px; color: var(--lp-mist); }
.lp-shot { position: relative; z-index: 1; margin: -120px auto 0; padding: 0 clamp(14px, 5vw, 64px); max-width: 1180px; }
.lp-shot img { display: block; width: 100%; height: auto; border-radius: 14px; border: 1px solid rgba(238, 242, 247, .12); box-shadow: 0 30px 80px rgba(3, 10, 8, .6); }
.lp-features { max-width: 1060px; margin: 0 auto; padding: 96px clamp(18px, 5vw, 64px) 72px; }
.lp-features h2 { font-family: Bricolage, Inter, sans-serif; font-weight: 700; font-stretch: 96%; font-size: clamp(30px, 3.6vw, 44px); letter-spacing: -.02em; margin: 0 0 40px; }
.lp-features ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 34px 56px; }
.lp-features li { display: flex; gap: 16px; align-items: flex-start; }
.lp-features li > span { flex: 0 0 auto; color: var(--lp-lantern); margin-top: 2px; }
.lp-features b { display: block; font-size: 17.5px; margin-bottom: 6px; }
.lp-features p { margin: 0; line-height: 1.6; color: var(--lp-mist); font-size: 15.5px; max-width: 36ch; }
.lp-foot { border-top: 1px solid rgba(238, 242, 247, .1); max-width: 1060px; margin: 0 auto; padding: 40px clamp(18px, 5vw, 64px) 64px; display: flex; flex-wrap: wrap; gap: 18px 28px; align-items: center; justify-content: space-between; }
.lp-foot p { margin: 0; font-size: 16px; color: #d3dbe8; max-width: 44ch; line-height: 1.55; }
.landing :focus-visible { outline: 3px solid var(--lp-lantern); outline-offset: 3px; }
@media (max-width: 760px) {
  .lp-hero { min-height: 780px; align-items: flex-start; }
  .lp-copy { padding: 110px 0 300px; margin-right: 18px; }
  .lp-shot { margin-top: -24px; }
}
@media (prefers-reduced-motion: reduce) { .lp-win { animation: none; fill: var(--lp-lantern); } .lp-btn { transition: none; } }
html:not(.desktop) .auth .brand { cursor: pointer; }
#twoStepSection.flash { animation: flash 2s ease-out; border-radius: 8px; }
.seg.admin-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; }
@media (max-width: 560px) { .seg.admin-tabs { grid-template-columns: repeat(2, 1fr); } }
/* signed-in devices */
.dev-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dev-info b { display: flex; align-items: center; gap: 8px; }
.dev-tag { font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 99px; background: var(--bg3); color: var(--muted); }
.dev-online { color: var(--green-t); }
/* site admin: locked until two-step login is on */
.admin-lock { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 28px 20px; }
.admin-lock p { max-width: 420px; margin: 0; }
.seg.small-seg { display: inline-flex; margin-bottom: 10px; }
.seg.small-seg button { flex: 0 0 auto; padding: 5px 14px; }
.admin-log .log-row { align-items: flex-start; }
.log-target { font-weight: 600; }
.nowrap { white-space: nowrap; }
/* voice channel user limit */
.chan .vlimit { margin-left: auto; font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--muted); background: var(--bg0); border-radius: 6px; padding: 1px 6px; }
.chan .vlimit.full { color: var(--red-t); }
.chan .vlimit + .cog { margin-left: 4px; }
.voice-embed .ve-faces { display: flex; }
.voice-embed .ve-faces > * { margin-left: -6px; border: 2px solid var(--bg2); border-radius: 50%; }
.msg.is-saved { box-shadow: inset 2px 0 0 var(--yellow); }
.ib-head .ib-tabs { margin: 0 0 0 auto; }
.ib-sub { display: block; padding: 8px 14px 0; }
.ib-item .ib-rm { width: 22px; height: 22px; margin-left: 2px; opacity: 0; }
.ib-item:hover .ib-rm, .ib-item:focus-within .ib-rm { opacity: 1; }
@media (hover: none) { .ib-item .ib-rm { opacity: 1; } }
/* spoilers */
.spoiler-media { position: relative; display: inline-block; overflow: hidden; border-radius: 8px; max-width: 100%; }
.spoiler-media.hidden-spoiler > img, .spoiler-media.hidden-spoiler > video { filter: blur(44px) brightness(.7); transform: scale(1.04); cursor: pointer; }
.spoiler-media > img, .spoiler-media > video { display: block; transition: filter .25s ease; }
.spoiler-label { position: absolute; inset: 0; margin: auto; width: max-content; height: max-content; padding: 6px 14px; border-radius: 99px; border: 0; background: rgba(0,0,0,.72); color: #fff; font-weight: 700; letter-spacing: .02em; cursor: pointer; }
.spoiler-label:hover { background: rgba(0,0,0,.86); }
.img-grid .spoiler-media { display: block; }
.img-grid .spoiler-media img { width: 100%; height: 100%; object-fit: cover; }
.tray-item.spoiler img { filter: blur(8px); }
.tray-item .tray-sp { position: absolute; top: 2px; left: 2px; width: 24px; height: 24px; background: rgba(0,0,0,.6); color: #fff; }
.tray-item .tray-sp.on { color: var(--accent-t); }
@media (prefers-reduced-motion: reduce) { .spoiler-media > img, .spoiler-media > video { transition: none; } }
.media-cell.spoiler-cell img, .media-cell.spoiler-cell video { filter: blur(24px) brightness(.7); }
.media-cell .spoiler-label { font-size: 11px; padding: 4px 10px; }
.media-cell { position: relative; }
.restore-note { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--green) 10%, var(--bg2)); font-size: 13px; margin: 6px 0 10px; }
.restore-note svg { color: var(--green-t); flex: none; margin-top: 1px; }
.restore-note.bad { background: color-mix(in srgb, var(--red) 10%, var(--bg2)); }
.restore-note.bad svg { color: var(--red-t); }
.spoiler-media { min-width: 160px; min-height: 90px; background: var(--bg3); }
.seg.small-seg { width: max-content; max-width: 100%; }
/* edit history */
.edited.clickable { cursor: pointer; }
.edited.clickable:hover { text-decoration: underline; }
.edit-versions { display: flex; flex-direction: column; gap: 8px; max-height: 60vh; overflow: auto; }
.ev-item { background: var(--bg2); border-radius: 10px; padding: 10px 12px; }
.ev-item.current { box-shadow: inset 2px 0 0 var(--accent); }
.ev-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
/* quick reactions on hover */
.tools .quick-react { font-size: 17px; line-height: 1; }
.tools .quick-react .emoji { width: 18px; height: 18px; }
/* site-wide notice bar */
.site-notice { flex: none; display: flex; align-items: center; gap: 10px; margin: 8px 16px 0; padding: 7px 8px 7px 14px; border-radius: 10px; font-weight: 600; font-size: 14px; background: var(--blue); color: #08131f; }
.site-notice.warning { background: var(--yellow); color: #231a02; }
.site-notice.good { background: var(--green); color: #04170e; }
.site-notice .sn-text { flex: 1; }
.site-notice .sn-x { border: 0; background: rgba(0,0,0,.12); color: inherit; width: 26px; height: 26px; border-radius: 8px; cursor: pointer; font-size: 18px; line-height: 1; flex: none; }
.site-notice .sn-x:hover { background: rgba(0,0,0,.22); }
.site-notice-preview { padding: 8px 14px; border-radius: 10px; font-weight: 600; margin: 6px 0; background: var(--blue); color: #08131f; }
.site-notice-preview.warning { background: var(--yellow); color: #231a02; }
.site-notice-preview.good { background: var(--green); color: #04170e; }
.notice-opts { justify-content: flex-start; gap: 12px; }
.notice-opts > * { flex: 1; }
/* code blocks: highlighting, language label, copy */
:root { --hl-k: #c792ea; --hl-s: #a5d6a7; --hl-n: #f7a35c; --hl-c: #6b7280; --hl-f: #82aaff; --hl-t: #ffcb6b; --hl-a: #7fdbca; }
:root[data-theme="light"] { --hl-k: #8e2fbd; --hl-s: #2e7d32; --hl-n: #c2410c; --hl-c: #8a8f98; --hl-f: #1d5fd1; --hl-t: #a16207; --hl-a: #0f766e; }
.text .code-block { position: relative; margin: 4px 0; max-width: 100%; }
.text .code-block pre { margin: 0; padding-top: 26px; }
.text .code-block .cb-lang { position: absolute; top: 6px; left: 12px; font: 600 11px var(--mono); color: var(--muted); }
.text .code-block .cb-copy { position: absolute; top: 4px; right: 6px; border: 0; background: var(--bg3); color: var(--muted); font-size: 11px; font-weight: 600; font-family: inherit; padding: 3px 8px; border-radius: 6px; cursor: pointer; opacity: 0; transition: opacity .15s; }
.text .code-block:hover .cb-copy, .text .code-block .cb-copy:focus-visible { opacity: 1; }
@media (hover: none) { .text .code-block .cb-copy { opacity: 1; } }
.text .code-block .cb-copy:hover { color: var(--text); }
.hl-k { color: var(--hl-k); } .hl-s { color: var(--hl-s); } .hl-n { color: var(--hl-n); } .hl-c { color: var(--hl-c); font-style: italic; }
.hl-f { color: var(--hl-f); } .hl-t { color: var(--hl-t); } .hl-a { color: var(--hl-a); }
.hl-add { color: var(--green-t); } .hl-del { color: var(--red-t); } .hl-meta { color: var(--blue); }
.status-input { display: flex; gap: 8px; align-items: center; }
.status-input input { flex: 1; }
.status-emoji-btn { flex: none; width: 42px; height: 42px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg2); color: var(--muted); font-size: 22px; display: grid; place-items: center; cursor: pointer; }
.status-emoji-btn:hover { background: var(--bg3); }
.bday-pick { justify-content: flex-start; gap: 8px; }
.bday-pick select { width: auto; min-width: 120px; }
.pc-bday { margin-top: 8px; font-size: 14px; color: var(--text-2); }
.pc-bday.today { color: var(--accent-t); font-weight: 600; }
.btn.status-btn { justify-content: flex-start; text-align: left; width: 100%; }
/* scheduled messages */
.sched-chip { align-self: flex-start; display: inline-flex; align-items: center; gap: 4px; margin: 0 0 6px 4px; padding: 3px 10px; border-radius: 99px; border: 0; background: var(--bg3); color: var(--muted); font-size: 12px; font-weight: 600; font-family: inherit; cursor: pointer; }
.sched-chip:hover { color: var(--text); }
.sched-text { width: 100%; resize: vertical; }
.sched-picks { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.sched-picks .btn.on { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.sched-row .grow { min-width: 0; }
.sched-preview { color: var(--text-2); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* maintenance screen */
.maint-screen { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(ellipse at 50% 0%, color-mix(in srgb, var(--accent) 14%, var(--bg0)), var(--bg0) 60%); }
.maint-card { max-width: 440px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.maint-card .maint-logo { color: var(--accent-t); }
.maint-card h1 { margin: 6px 0 0; font-size: 34px; letter-spacing: -.01em; }
.maint-card .maint-text { font-size: 17px; color: var(--text-2); margin: 0; white-space: pre-wrap; }
.maint-admin { margin-top: 18px; border: 0; background: none; color: var(--muted); font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer; }
.maint-admin:hover { color: var(--text); }
.site-notice .sn-off { border: 0; background: rgba(0,0,0,.14); color: inherit; font: inherit; font-weight: 700; padding: 4px 10px; border-radius: 8px; cursor: pointer; }
.site-notice .sn-off:hover { background: rgba(0,0,0,.24); }
.notice-admin > input, .maint-admin-box input { width: 100%; }
/* health: busiest + storage cleanup */
.busy-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 640px) { .busy-cols { grid-template-columns: 1fr; } }
.busy-title { padding: 0 4px 4px; }
.busy-row { position: relative; overflow: hidden; }
.busy-row .grow { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.busy-bar { position: absolute; left: 0; bottom: 0; height: 2px; background: var(--accent); opacity: .7; }
.storage-filters { justify-content: flex-start; gap: 8px; margin-bottom: 6px; }
.storage-filters select { width: auto; }
.storage-list { max-height: 52vh; overflow: auto; margin: 6px 0 10px; }
.storage-row { cursor: pointer; }
.storage-row .grow { min-width: 0; }
.storage-row a { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.signup-make { justify-content: flex-start; gap: 8px; flex-wrap: wrap; }
.signup-make input { flex: 1; min-width: 180px; }
.signup-make select { width: auto; }
.site-notice.danger { background: var(--red); color: #1d0505; }
.admin-alerts { display: flex; flex-direction: column; flex: none; }
.file-card.removed { opacity: .7; border-style: dashed; }
.search-scope { margin: 0 12px 8px; }
.follow-btn.on { color: var(--accent-t); }
.follow-btn { margin-left: 6px; }
/* custom commands (Keeper) */
.custom-cmds { display: flex; flex-direction: column; gap: 8px; margin-bottom: 6px; }
.cc-card { background: var(--bg2); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.cc-top { display: flex; gap: 6px; align-items: center; }
.cc-slash { font: 700 16px var(--mono); color: var(--muted); }
.cc-top .cc-name { width: 130px; flex: none; font-family: var(--mono); }
.cc-top input:not(.cc-name) { flex: 1; min-width: 0; }
/* giveaways */
.giveaway-card { margin-top: 4px; max-width: 460px; border-radius: 12px; padding: 12px 14px; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 16%, var(--bg2)), var(--bg2) 70%); border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line)); display: flex; flex-direction: column; gap: 8px; }
.giveaway-card.done { background: var(--bg2); border-color: var(--line); }
.gw-head { display: flex; gap: 12px; align-items: center; }
.gw-icon { font-size: 30px; line-height: 1; }
.gw-title { display: flex; flex-direction: column; }
.gw-label { font-size: 12px; font-weight: 700; color: var(--accent-t); }
.giveaway-card.done .gw-label { color: var(--muted); }
.gw-prize { font-size: 17px; }
.gw-time { font-variant-numeric: tabular-nums; }
.gw-acts { justify-content: flex-start; gap: 6px; }
/* reports */
.reports-list { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; max-height: 60vh; overflow: auto; }
.report-card { background: var(--bg2); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.rc-top { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.rc-text { white-space: pre-wrap; overflow-wrap: anywhere; padding: 6px 10px; border-left: 3px solid var(--red); background: var(--bg1); border-radius: 0 6px 6px 0; }
.rc-acts { justify-content: flex-start; gap: 6px; }
.report-quote { background: var(--bg2); border-left: 3px solid var(--red); border-radius: 0 8px 8px 0; padding: 8px 12px; margin-bottom: 10px; display: flex; flex-direction: column; gap: 2px; overflow-wrap: anywhere; }
.gw-info { display: flex; flex-direction: column; gap: 2px; }
.signup-admin { margin-bottom: 8px; }
/* settings window: sections down the left, the page on the right */
.modal-card.settings-shell { max-width: 1000px; height: min(780px, calc(100dvh - 32px)); padding: 0; gap: 0; display: grid; grid-template-columns: 228px minmax(0, 1fr); overflow: hidden; align-content: stretch; }
.set-nav { background: var(--bg0); border-right: 1px solid var(--line); padding: 18px 10px 14px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.set-title { font-weight: 800; font-size: 17px; padding: 2px 10px 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.set-group { font-size: 12px; font-weight: 700; color: var(--muted); padding: 14px 10px 4px; }
.set-item { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; color: var(--text-2); font: inherit; font-weight: 600; font-size: 14px; text-align: left; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.set-item svg { color: var(--muted); flex: none; }
.set-item:hover { background: var(--hover); color: var(--text); }
.set-item.on { background: var(--bg3); color: var(--text); }
.set-item.on svg { color: var(--accent-t); }
.set-item:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.set-sep { flex: 1; min-height: 14px; }
.set-nav .set-logout { justify-content: flex-start; gap: 10px; color: var(--red-t); border-color: transparent; }
.set-main { overflow-y: auto; min-width: 0; padding: 0 28px 28px; display: flex; flex-direction: column; }
.set-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 0 12px; margin-bottom: 4px; background: var(--bg1); border-bottom: 1px solid var(--line); }
.set-head h3 { margin: 0; font-size: 20px; }
.set-body { display: grid; gap: 12px; align-content: start; padding-top: 10px; max-width: 760px; }
@media (max-width: 760px) {
  .modal-card.settings-shell { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); height: calc(100dvh - 16px); }
  .set-nav { flex-direction: row; align-items: center; border-right: 0; border-bottom: 1px solid var(--line); padding: 8px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
  .set-title, .set-group, .set-sep { display: none; }
  .set-item { width: auto; flex: none; white-space: nowrap; }
  .set-nav .set-logout { flex: none; }
  .set-main { padding: 0 16px 20px; }
}
/* settings: a calmer, more compact size */
.settings-shell { font-size: 14px; }
.settings-shell .set-nav { padding: 14px 8px 12px; }
.settings-shell .set-title { font-size: 15px; padding-bottom: 6px; }
.settings-shell .set-group { font-size: 11.5px; padding: 12px 10px 3px; }
.settings-shell .set-item { font-size: 13.5px; padding: 6px 10px; gap: 9px; }
.settings-shell .set-item svg { width: 16px; height: 16px; }
.settings-shell .set-head { padding: 14px 0 10px; }
.settings-shell .set-head h3 { font-size: 16px; }
.settings-shell .set-main { padding: 0 24px 22px; }
.settings-shell .set-body { gap: 10px; }
.settings-shell .btn { padding: 7px 12px; font-size: 13.5px; }
.settings-shell .btn.xs { padding: 3px 9px; font-size: 12px; }
.settings-shell input:not([type=checkbox]):not([type=range]):not([type=color]), .settings-shell textarea, .settings-shell select { padding: 7px 10px; font-size: 13.5px; }
.settings-shell label { font-size: 12.5px; gap: 5px; }
.settings-shell .avatar.xxl { width: 72px; height: 72px; font-size: 28px; }
.settings-shell .perm { padding: 8px 0; }
.settings-shell .perm .txt b { font-size: 13.5px; }
.settings-shell .perm .txt span { font-size: 12px; }
.settings-shell .seg button { padding: 5px 9px; font-size: 13px; }
.settings-shell .cat { padding-top: 10px; font-size: 11px; }
.settings-shell .h-tile b, .settings-shell .h-value { font-size: 18px; }
.settings-shell .modal-card, .settings-shell .muted.small, .settings-shell .hint { font-size: 12px; }
/* settings nav: Lodge's own look (warm accent edge on the open section, lantern-glow profile card) */
.set-nav { gap: 0; }
.set-me { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; margin-bottom: 10px; border-radius: 12px; border: 1px solid var(--line); background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 12%, var(--bg1)), var(--bg1)); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
button.set-me:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.set-me.set-server { cursor: default; }
.set-me .sicon.sm { width: 36px; height: 36px; border-radius: 10px; font-size: 12px; background: var(--bg3); display: grid; place-items: center; overflow: hidden; flex: none; }
.set-me .sicon.sm img { width: 100%; height: 100%; object-fit: cover; }
.set-me-txt { display: flex; flex-direction: column; min-width: 0; }
.set-me-txt b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.set-me-txt span { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 4px; }
.set-search { display: flex; align-items: center; gap: 6px; padding: 0 10px; margin-bottom: 6px; border-radius: 9px; background: var(--bg1); border: 1px solid var(--line); color: var(--muted); }
.set-search input { border: 0; background: none; padding: 7px 0 !important; box-shadow: none !important; flex: 1; min-width: 0; font-size: 13px; }
.set-list { display: flex; flex-direction: column; }
.set-rule { height: 1px; background: var(--line); margin: 8px 6px 2px; }
.set-grp { display: flex; flex-direction: column; gap: 1px; }
.set-item { position: relative; }
.set-item.on::before { content: ''; position: absolute; left: -8px; top: 7px; bottom: 7px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.set-item .set-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.set-badge { font-size: 10.5px; font-weight: 800; padding: 1px 7px; border-radius: 99px; background: var(--accent); color: var(--on-accent); }
.set-sub { display: flex; flex-direction: column; gap: 1px; margin: 4px 0 8px 14px; padding: 2px 0 4px 10px; border-left: 1px solid var(--line); }
.set-subgroup { font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); opacity: .75; padding: 9px 10px 3px; }
.set-subgroup:first-child { padding-top: 4px; }
.set-subitem { position: relative; display: flex; align-items: center; gap: 9px; border: 0; background: none; color: var(--text-2); font: inherit; font-weight: 600; font-size: 13px; text-align: left; padding: 6px 10px; border-radius: 8px; cursor: pointer; }
.set-subitem svg { color: var(--muted); flex: none; }
.set-subitem .set-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.set-subitem:hover { color: var(--text); background: var(--hover); }
.set-subitem.on { color: var(--text); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.set-subitem.on svg { color: var(--accent-t); }
.set-subitem.on::before { content: ''; position: absolute; left: -11px; top: 6px; bottom: 6px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.set-subbar { display: none; }
@media (max-width: 760px) {
  .set-me, .set-search, .set-rule { display: none; }
  .set-list, .set-grp { flex-direction: row; }
  .set-sub { display: none; }
  .set-item.on::before { display: none; }
  .set-subbar { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -24px 6px; padding: 10px 24px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--accent) 5%, var(--bg1)); flex: none; }
  .set-subbar::-webkit-scrollbar { display: none; }
  .set-subchip { flex: none; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; border: 1px solid var(--line); background: var(--bg2); color: var(--text-2); font: 600 13px/1 inherit; padding: 8px 12px; border-radius: 999px; cursor: pointer; }
  .set-subchip svg { color: var(--muted); }
  .set-subchip.on { background: color-mix(in srgb, var(--accent) 18%, transparent); border-color: color-mix(in srgb, var(--accent) 55%, transparent); color: var(--text); }
  .set-subchip.on svg { color: var(--accent-t); }
}

/* ---------- forwarded / starboard / quote cards, countdowns, silent messages, notes ---------- */
.msg-card { margin-top: 4px; max-width: 560px; border-left: 3px solid var(--bg4); background: var(--bg2); border-radius: 0 10px 10px 0; padding: 8px 12px 10px; display: grid; gap: 4px; }
.msg-card.mck-star { border-left-color: #f2c14e; }
.msg-card.mck-quote { border-left-color: var(--accent); background: linear-gradient(90deg, var(--accent-soft, rgba(255,138,61,.08)), var(--bg2) 60%); }
.msg-card .text { font-size: calc(var(--chat-fs) - 1px); }
.mc-head { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); font-weight: 600; min-width: 0; }
.mc-kind { text-transform: none; }
.mc-star { color: #f2c14e; font-weight: 800; font-size: 13px; }
.mc-where { border: 0; background: none; padding: 0; color: var(--muted); font: inherit; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.mc-where:hover { color: var(--text); text-decoration: underline; }
.mc-by { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.mc-by .avatar { cursor: pointer; }
.mc-by .mc-name { font-weight: 700; cursor: pointer; }
.mc-by .time { color: var(--muted); font-size: 11px; }
.silent-flag { color: var(--muted); display: inline-flex; margin-left: 4px; vertical-align: -1px; opacity: .8; }
.countdown-card { margin-top: 4px; max-width: 340px; background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: grid; gap: 2px; }
.cd-top { display: flex; align-items: center; gap: 6px; font-weight: 700; color: var(--text-2); }
.cd-top svg { color: var(--accent-t); }
.cd-left { font-size: 26px; font-weight: 800; letter-spacing: -.5px; font-variant-numeric: tabular-nums; color: var(--accent-t); }
.countdown-card.done .cd-left { color: var(--green, #3ba55d); font-size: 22px; }
.forward-modal { max-width: 460px; }
.fw-preview { background: var(--bg2); border-left: 3px solid var(--bg4); border-radius: 0 8px 8px 0; padding: 8px 10px; display: grid; gap: 2px; font-size: 13px; }
.fw-text { color: var(--text-2); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.fw-list { max-height: 300px; overflow-y: auto; display: grid; gap: 2px; margin: 4px 0; }
.fw-row { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border: 0; border-radius: 8px; background: transparent; cursor: pointer; text-align: left; color: var(--text); }
.fw-row:hover { background: var(--bg3); }
.fw-row.on { background: var(--accent-soft, rgba(255,138,61,.12)); box-shadow: inset 0 0 0 1px var(--accent); }
.fw-ic { width: 24px; height: 24px; border-radius: 50%; background: var(--bg3); display: grid; place-items: center; color: var(--muted); flex: none; }
.fw-t { display: grid; flex: 1; min-width: 0; }
.fw-t b, .fw-t span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fw-tick { width: 18px; color: var(--accent-t); display: grid; place-items: center; }
.fw-note { width: 100%; resize: vertical; min-height: 44px; box-sizing: border-box; }
.pc-note .cat { display: flex; gap: 4px; align-items: baseline; }
.pc-note-text { width: 100%; box-sizing: border-box; resize: vertical; min-height: 36px; font-size: 13px; background: transparent; border-color: transparent; padding: 6px 8px; }
.pc-note-text:hover { border-color: var(--line); }
.pc-note-text:focus { background: var(--bg0); border-color: var(--accent); }
.sb-emoji { width: 80px; text-align: center; font-size: 18px; }
.sb-row { display: flex; gap: 14px; align-items: end; flex-wrap: wrap; }

/* ---------- tooltips ---------- */
.lodge-tip { position: fixed; z-index: 9999; pointer-events: none; display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 8px; background: var(--bg0); color: var(--text); border: 1px solid var(--line); box-shadow: 0 8px 24px rgba(0,0,0,.35); font-size: 12.5px; font-weight: 700; letter-spacing: .1px; white-space: nowrap; animation: tip-in .12s ease-out; }
.lodge-tip::after { content: ""; position: absolute; left: calc(var(--arrow-x, 50%) - 5px); width: 8px; height: 8px; background: inherit; border: inherit; border-width: 0 1px 1px 0; transform: rotate(45deg); }
.lodge-tip.above::after { bottom: -5px; }
.lodge-tip.below::after { top: -5px; transform: rotate(-135deg); }
.lodge-tip .lt-ic { display: inline-flex; color: var(--yellow-t); }
@keyframes tip-in { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
:root[data-theme="light"] .lodge-tip { background: #1e2023; color: #f2f3f5; border-color: #1e2023; }

/* ---------- lockdown, auto-delete, word filter, voice history, scheduled maintenance ---------- */
.head-flag { color: var(--muted); cursor: default; }
.head-flag.locked-flag { color: var(--yellow-t); }
.filtered-msg { opacity: .85; }
.invited-by { font-weight: 500; margin-top: 1px; }
.vh-modal { max-width: 560px; }
.vh-pick { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.vh-pick input[type=date] { padding: 7px 10px; }
.vh-body { display: grid; gap: 12px; margin-top: 4px; max-height: 60vh; overflow-y: auto; }
.vh-chan { background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: grid; gap: 8px; }
.vh-head { display: flex; align-items: center; gap: 8px; }
.vh-head svg { color: var(--muted); }
.vh-head .muted { margin-left: auto; }
.vh-row { display: grid; grid-template-columns: auto minmax(0, 1.3fr) minmax(60px, 1fr) auto; align-items: center; gap: 10px; }
.vh-row:has(.vh-live) { grid-template-columns: auto minmax(0, 1.3fr) minmax(60px, 1fr) auto auto; }
.vh-name { display: grid; min-width: 0; }
.vh-name b, .vh-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vh-bar { height: 6px; border-radius: 6px; background: var(--bg4); overflow: hidden; }
.vh-bar span { display: block; height: 100%; border-radius: 6px; background: var(--accent); }
.vh-time { font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums; }
.vh-live { font-size: 11px; font-weight: 700; color: var(--green-t); background: color-mix(in srgb, var(--green) 14%, transparent); padding: 2px 7px; border-radius: 10px; white-space: nowrap; }
.maint-sched { display: grid; gap: 8px; }
.sched-card { display: flex; gap: 10px; align-items: flex-start; background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.sched-card svg { color: var(--accent-t); margin-top: 2px; }
@media (max-width: 600px) { .vh-row { grid-template-columns: auto minmax(0, 1fr) auto; } .vh-row .vh-bar { display: none; } .vh-row:has(.vh-live) { grid-template-columns: auto minmax(0, 1fr) auto auto; } }
.mm-name { min-width: 0; } .mm-line { display: flex; align-items: center; gap: 6px; min-width: 0; } .mm-line .crown { color: var(--yellow-t); flex: none; }
.status-admin-top { display: flex; gap: 14px; align-items: center; justify-content: space-between; background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.status-admin-top .btn { text-decoration: none; flex: none; }
.sa-inc { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: grid; gap: 6px; margin-bottom: 8px; background: var(--bg2); }
.sa-inc.done { opacity: .75; }
.sa-inc-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sa-inc-top b { flex: 1; min-width: 160px; }
.sa-inc-top .chip { text-transform: capitalize; }
.sa-upd { display: flex; gap: 8px; flex-wrap: wrap; }
.sa-upd input { flex: 1; min-width: 160px; }
.lp-foot-r { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.lp-status { color: #d3dbe8; text-decoration: none; font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; gap: 8px; }
.lp-status:hover { color: #fff; }
.lp-dot { width: 8px; height: 8px; border-radius: 50%; background: #3ecf8e; box-shadow: 0 0 0 3px rgba(62,207,142,.2); }

/* ---------- saving CPU: animated names and the staff glow only move when you look at them ----------
   Repainting every animated name in the member list and chat, 60 times a second, was most of Lodge's idle CPU.
   They now show a still version of the effect, and animate on hover and in profile cards. */
.fx-gradient, .fx-shimmer, .fx-rainbow, .fx-glow { animation-play-state: paused; }
.fx-glow { text-shadow: 0 0 6px color-mix(in srgb, var(--c1) 70%, transparent); }
:is(.member, .msg, .list-row, .vc-user, .vuser, .pc-name, .mm-line, .meta, .author):hover :is(.fx-gradient, .fx-shimmer, .fx-rainbow, .fx-glow),
:is(.fx-gradient, .fx-shimmer, .fx-rainbow, .fx-glow):hover,
.profile-card .pc-name :is(.fx-gradient, .fx-shimmer, .fx-rainbow, .fx-glow) { animation-play-state: running; }
.staff-badge { animation: none; filter: drop-shadow(0 0 4px color-mix(in srgb, var(--accent) 60%, transparent)); }
:is(.member, .msg, .list-row, .pc-name, .meta):hover .staff-badge, .profile-card .staff-badge { animation: staff-glow 3s ease-in-out infinite; }
/* while Lodge isn't the window you're using (playing a game, another app on top), nothing decorative moves */
html.app-away *, html.app-away *::before, html.app-away *::after { animation-play-state: paused !important; }
@media (prefers-reduced-motion: reduce) { .fx-gradient, .fx-shimmer, .fx-rainbow, .fx-glow, .staff-badge { animation: none !important; } }

/* ---------- King's Cup ---------- */
.kc { margin-top: 4px; max-width: 520px; border-radius: 16px; padding: 14px 16px 14px; color: #f4efe6; display: grid; gap: 12px;
  background: radial-gradient(120% 90% at 50% 0%, #1f5a43, #133b2d 60%, #0f2f24); border: 1px solid #2b6b52; box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 8px 24px rgba(0,0,0,.25); }
.kc.over { filter: saturate(.8); }
.kc-top { display: flex; align-items: center; gap: 12px; }
.kc-title { display: flex; align-items: center; gap: 8px; font-size: 16px; flex: 1; }
.kc-title b { font-family: Bricolage, Inter, sans-serif; letter-spacing: -.01em; font-size: 18px; }
.kc-cup { font-size: 20px; }
.kc-kings { display: flex; gap: 2px; font-size: 15px; }
.kc-kings span { opacity: .25; filter: grayscale(1); }
.kc-kings span.on { opacity: 1; filter: none; }
.kc-left { font-size: 12px; font-weight: 700; color: #cfe3d8; background: rgba(0,0,0,.22); padding: 3px 9px; border-radius: 999px; font-variant-numeric: tabular-nums; }
.kc-table { display: flex; gap: 16px; align-items: center; }
.pcard { position: relative; flex: none; background: #fbfaf7; color: #1d2230; border-radius: 10px; box-shadow: 0 6px 18px rgba(0,0,0,.35), inset 0 0 0 1px rgba(0,0,0,.08); font-family: Bricolage, Inter, sans-serif; }
.pcard.red { color: #c8343b; }
.pcard.big { width: 92px; height: 128px; animation: kc-deal .35s cubic-bezier(.2,.9,.3,1.2); }
.pcard.big .pc-mid { position: absolute; inset: 0; display: grid; place-items: center; font-size: 40px; }
.pcard .pc-corner { position: absolute; display: grid; justify-items: center; line-height: 1; font-size: 13px; }
.pcard .pc-corner b { font-size: 17px; font-weight: 800; }
.pcard.big .pc-corner.tl { top: 7px; left: 8px; } .pcard.big .pc-corner.br { bottom: 7px; right: 8px; transform: rotate(180deg); }
.pcard.back { background: repeating-linear-gradient(45deg, #b8432c 0 6px, #c9573d 6px 12px); display: grid; place-items: center; font-size: 30px; box-shadow: 0 6px 18px rgba(0,0,0,.35), inset 0 0 0 4px #fbfaf7; }
.pcard.mini { width: 26px; height: 36px; border-radius: 5px; box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.pcard.mini .pc-mid, .pcard.mini .pc-corner.br { display: none; }
.pcard.mini .pc-corner.tl { inset: 0; display: grid; place-content: center; font-size: 10px; }
.pcard.mini .pc-corner.tl b { font-size: 12px; }
@keyframes kc-deal { from { transform: translateY(-14px) rotate(-8deg) scale(.9); opacity: 0; } to { transform: none; opacity: 1; } }
.kc-rule { min-width: 0; }
.kc-rule-title { font-family: Bricolage, Inter, sans-serif; font-size: 22px; font-weight: 750; letter-spacing: -.01em; color: #ffd36b; }
.kc-rule-text { font-size: 14px; color: #e8efe9; margin-top: 2px; }
.kc-by { font-size: 12px; color: #a9c9b8; margin-top: 6px; }
.kc-hist { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.kc-hist .muted { color: #a9c9b8; }
.kc-players { display: flex; flex-wrap: wrap; gap: 6px; }
.kc-p { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; padding: 3px 9px 3px 4px; border-radius: 999px; background: rgba(0,0,0,.2); color: #dfeae4; }
.kc-p.up { background: #ffd36b; color: #2a1d05; box-shadow: 0 0 0 2px rgba(255,211,107,.35); }
.kc-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.kc-actions .btn.ghost { color: #eef5f0; border-color: rgba(238,245,240,.25); }
.kc-actions .btn.ghost:hover { background: rgba(255,255,255,.08); }
.kc-actions .btn.primary:disabled { opacity: .55; cursor: default; }
.kc-over { color: #cfe3d8; }
.kc-rules-edit summary { cursor: pointer; font-weight: 600; margin: 6px 0; }
.kc-rules-grid { display: grid; gap: 6px; margin: 6px 0 10px; }
.kc-rule-row { display: grid; grid-template-columns: 28px 140px 1fr; gap: 8px; align-items: center; }
.kc-rank { text-align: center; font-family: Bricolage, Inter, sans-serif; font-size: 16px; }
@media (max-width: 560px) { .kc-table { align-items: flex-start; } .pcard.big { width: 74px; height: 104px; } .kc-rule-title { font-size: 19px; } .kc-rule-row { grid-template-columns: 24px 1fr; } .kc-rule-row input.grow { grid-column: 1 / -1; } }

/* ---------- new Steam game ---------- */
.steam-card { margin-top: 4px; display: grid; grid-template-columns: 230px 1fr; max-width: 640px; border-radius: 12px; overflow: hidden; text-decoration: none; color: var(--text); background: var(--bg2); border: 1px solid var(--line); transition: border-color .15s, transform .15s; }
.steam-card:hover { border-color: color-mix(in srgb, #66c0f4 60%, var(--line)); }
.steam-card img { width: 100%; height: 100%; object-fit: cover; display: block; aspect-ratio: 460 / 215; }
.sc-body { padding: 10px 14px; display: grid; gap: 6px; align-content: start; min-width: 0; }
.sc-kicker { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: #66c0f4; }
.sc-name { font-size: 16px; line-height: 1.25; }
.sc-desc { font-size: 13px; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sc-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12px; }
.sc-price { font-weight: 700; padding: 2px 8px; border-radius: 6px; background: var(--bg3); display: inline-flex; gap: 6px; align-items: center; }
.sc-price.sale { background: color-mix(in srgb, #a4d007 18%, var(--bg3)); }
.sc-off { color: #beee11; } .sc-price s { color: var(--muted); font-weight: 500; }
.sc-tag { color: var(--muted); background: var(--bg3); padding: 2px 7px; border-radius: 6px; }
.sc-date { color: var(--muted); }
@media (max-width: 600px) { .steam-card { grid-template-columns: 1fr; } }
.kc-title b { white-space: nowrap; } @media (max-width: 560px) { .kc-top { flex-wrap: wrap; gap: 8px; } }

/* King's Cup: a server's own cards */
.pcard.custom { background: linear-gradient(150deg, #ffb070, #ff8a3d 55%, #e2662a); color: #3a1a06; }
.pcard.custom .pc-corner span { font-size: 14px; }
.pcard.big.custom .pc-mid { font-size: 44px; }
.pcard.mini.custom { display: grid; place-items: center; font-size: 15px; }
.pcard.mini.custom .pc-mid { display: block; position: static; }
.pcard.mini.custom .pc-corner { display: none; }
.kc-house { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #3a1a06; background: #ff8a3d; padding: 2px 8px; border-radius: 999px; margin-bottom: 4px; }
.kc-custom-row { display: grid; grid-template-columns: 52px 160px 1fr 62px 34px; gap: 8px; align-items: center; }
.kc-custom-row .kc-emoji { text-align: center; font-size: 17px; }
@media (max-width: 640px) { .kc-custom-row { grid-template-columns: 48px 1fr 62px 34px; } .kc-custom-row .grow { grid-column: 1 / -1; grid-row: 2; } }
.kc-own-head { margin: 4px 0 2px; } .kc-rules-edit > .btn.ghost { margin: 2px 0 8px; }
.kc-rule-row > *, .kc-custom-row > * { min-width: 0; width: 100%; box-sizing: border-box; }
.kc-custom-row .btn { width: 34px; padding: 0; height: 34px; }
@media (max-width: 640px) { .kc-rule-row { grid-template-columns: 28px 1fr; } .kc-rule-row .grow { grid-column: 2; } .kc-custom-row { grid-template-columns: 48px 1fr 62px 34px; } }

/* Keeper settings: one panel per section */
.kp { margin-top: 14px; padding: 4px 16px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg2); }
.kp-head { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0 8px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.kp-icon { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-t); }
.kp-words { min-width: 0; padding-top: 1px; }
.kp-title { font-weight: 700; font-size: 15px; color: var(--text); }
.kp-words .kp-sub { margin: 2px 0 0; }
.kp > .perm:last-child { border-bottom: 0; }
.kp .join-roles { margin: 0; }
.kp .kc-rules-edit { margin-top: 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg1); }
.kp .kc-rules-edit > summary { margin: 0; padding: 11px 14px; list-style: none; display: flex; align-items: center; gap: 8px; }
.kp .kc-rules-edit > summary::-webkit-details-marker { display: none; }
.kp .kc-rules-edit > summary::before { content: '›'; font-size: 18px; line-height: 1; color: var(--muted); transition: transform .15s; }
.kp .kc-rules-edit[open] > summary::before { transform: rotate(90deg); }
.kp .kc-rules-edit[open] > summary { border-bottom: 1px solid var(--line); }
.kp .kc-rules-edit > :not(summary) { margin-left: 14px; margin-right: 14px; }
.kp .kc-rules-edit > .row:last-child { margin-bottom: 12px; }
@media (max-width: 640px) { .kp { padding: 2px 12px 10px; } .kp .kc-rules-edit > :not(summary) { margin-left: 10px; margin-right: 10px; } }
.kc-sub { display: grid; gap: 1px; padding-top: 12px; margin-top: 4px; }
.kc-sub + .kc-rules-grid { margin-top: 8px; }
.kc-rules-grid + .kc-sub { border-top: 1px solid var(--line); margin-top: 6px; }
.kc-own-head { display: none; }

/* /drinks card */
.dk { margin-top: 4px; max-width: 560px; border-radius: 16px; padding: 14px 16px; display: grid; gap: 10px; color: #f6eee4;
  background: radial-gradient(120% 90% at 100% 0%, rgba(255,138,61,.28), transparent 60%), linear-gradient(160deg, #3a2318, #24170f); box-shadow: inset 0 0 0 1px rgba(255,180,120,.14); }
.dk-top { display: flex; align-items: center; gap: 10px; }
.dk-title { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.dk-title b { font-family: Bricolage, Inter, sans-serif; font-size: 18px; letter-spacing: -.01em; }
.dk-cup { font-size: 20px; }
.dk-for { font-size: 12px; color: #d9bfa6; }
.dk-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.dk-chip { font-size: 12.5px; font-weight: 650; padding: 3px 10px; border-radius: 999px; background: rgba(255,138,61,.2); color: #ffd2ad; box-shadow: inset 0 0 0 1px rgba(255,138,61,.35); }
.dk-chip.unknown { background: transparent; color: #b59c86; box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); text-decoration: line-through; }
.dk-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.dk-drink { background: rgba(0,0,0,.24); border-radius: 12px; padding: 10px 12px; display: grid; gap: 7px; align-content: start; box-shadow: inset 0 0 0 1px rgba(255,255,255,.05); }
.dk-head { display: flex; align-items: center; gap: 10px; }
.dk-emoji { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: 19px; background: rgba(255,255,255,.07); flex: none; }
.dk-name { display: grid; min-width: 0; }
.dk-name b { font-size: 15px; color: #fff4e8; }
.dk-glass { font-size: 11.5px; color: #c7ab92; }
.dk-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; font-size: 13px; color: #eadccd; }
.dk-items li { display: flex; gap: 8px; }
.dk-items li.yours { color: #ffc38f; font-weight: 600; }
.dk-items li.opt { color: #ad9580; }
.dk-amt { flex: none; min-width: 64px; color: #c7ab92; font-variant-numeric: tabular-nums; font-weight: 500; }
.dk-how { font-size: 12.5px; color: #cdb69f; line-height: 1.4; }
.dk .dk-more { justify-self: start; color: #f6eee4; border-color: rgba(255,255,255,.2); }
.dk-note { font-size: 12px; color: #c7ab92; }
.dk-amt { max-width: 40%; }

.dk-near { display: grid; gap: 6px; }
.dk-near-title { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #d9bfa6; margin-top: 2px; }
.dk-near-item { border-radius: 10px; background: rgba(0,0,0,.18); box-shadow: inset 0 0 0 1px rgba(255,255,255,.05); }
.dk-near-item.open { background: rgba(0,0,0,.26); }
.dk-near-row { all: unset; box-sizing: border-box; width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 12px; cursor: pointer; border-radius: 10px; }
.dk-near-row:hover { background: rgba(255,255,255,.04); }
.dk-near-row:focus-visible { outline: 2px solid #ff8a3d; outline-offset: -2px; }
.dk-near-name { display: flex; align-items: baseline; gap: 8px; flex: 1; min-width: 0; flex-wrap: wrap; }
.dk-near-name b { font-size: 14px; color: #fff4e8; }
.dk-near-emoji { font-size: 16px; align-self: center; }
.dk-need { flex: none; font-size: 12px; font-weight: 700; color: #2a1406; background: #ff9f5a; padding: 2px 9px; border-radius: 999px; }
.dk-chev { color: #c7ab92; font-size: 18px; line-height: 1; transition: transform .15s; }
.dk-near-item.open .dk-chev { transform: rotate(90deg); }
.dk-near-recipe { background: transparent; box-shadow: none; padding-top: 0; }
.dk-near-recipe .dk-head { display: none; }
.dk-items li.needed { color: #ff9f5a; font-weight: 700; }
@media (max-width: 480px) { .dk-need { max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } }
.dk-near-name { display: grid; gap: 0; flex: 1; min-width: 0; }
.dk-near-name b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dk-near-emoji { flex: none; font-size: 18px; width: 24px; text-align: center; }
@media (min-width: 481px) { .dk-near-name { display: flex; align-items: baseline; gap: 8px; } }

/* phones: a tap shows the message toolbar, a long-press opens its menu */
.msg.tools-on .tools { display: flex; }
@media (hover: none) { .msg { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; } .msg .tools { top: -20px; } }

/* ---------- Music player ---------- */
.avatar.mp-bot { background: linear-gradient(140deg, #ffb070, #ff8a3d 55%, #d9572a); color: #2a1406; display: grid; place-items: center; }
.music-row .dm-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-art { flex: none; display: grid; place-items: center; overflow: hidden; background: var(--bg3); color: var(--muted); border-radius: 8px; }
.mp-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mp-art.sm { width: 36px; height: 36px; border-radius: 7px; }
.mp-art.lg { width: 100%; aspect-ratio: 1; border-radius: 14px; box-shadow: 0 14px 34px rgba(0,0,0,.35); }
.mp-art.src-youtube.lg img { transform: scale(1.34); } /* YouTube pictures are 16:9 with bars */
.mp-src { display: inline-flex; align-items: center; font-size: 10.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: 2px 7px; border-radius: 999px; }
.mp-src.src-youtube { background: rgba(255,60,60,.16); color: #ff7b7b; }
.mp-src.src-spotify { background: rgba(30,215,96,.16); color: #4fe08a; }
.mp-src.src-apple { background: rgba(250,70,110,.16); color: #ff7aa0; }

/* mini player above your name */
.music-dock { border-top: 1px solid var(--line); background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 9%, var(--bg1)), var(--bg1)); padding: 8px 8px 6px; display: grid; gap: 6px; }
.md-top { display: flex; align-items: center; gap: 6px; min-width: 0; }
.md-info { all: unset; cursor: pointer; display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; border-radius: 8px; padding: 2px; }
.md-info:hover { background: var(--hover); }
.md-info:focus-visible { outline: 2px solid var(--accent); }
.md-txt { min-width: 0; display: grid; }
.md-title { font-size: 13px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.md-sub { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.md-ctr { display: flex; align-items: center; gap: 0; flex: none; }
.md-ctr .icon-btn { width: 28px; height: 28px; }
.md-ctr .md-vid.on { color: var(--accent-t); }
.mp-play { background: var(--accent) !important; color: var(--on-accent) !important; border-radius: 50% !important; }
.mp-play:disabled { opacity: .45; }
.md-ctr .mp-play { width: 30px !important; height: 30px !important; }
.md-frame { height: 0; overflow: hidden; border-radius: 10px; }
.md-frame.show { height: auto; }
.md-frame[data-src="youtube"].show .md-host, .md-frame[data-src="youtube"] .md-host { aspect-ratio: 16 / 9; width: 100%; }
.md-frame[data-src="youtube"]:not(.show) .md-host { width: 320px; height: 180px; } /* keeps playing while hidden */
.md-frame iframe { width: 100%; border: 0; display: block; border-radius: 10px; }
.md-frame[data-src="youtube"] iframe { height: 100%; }
.md-frame[data-src="apple"] iframe { height: 175px; }

/* phones: a small bar above the message box */
.music-mini { flex: none; display: flex; align-items: center; gap: 4px; margin: 0 8px 6px; padding: 3px 4px 3px 6px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 10%, var(--bg2)); box-shadow: inset 0 0 0 1px var(--line); }
.music-mini .mp-art.sm { width: 28px; height: 28px; }
.mm-info { all: unset; flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; cursor: pointer; }
.mm-title { font-size: 13px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.music-mini.folded { padding: 0; background: transparent; box-shadow: none; margin-bottom: 2px; }
.mm-line { all: unset; flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; padding: 2px 10px; font-size: 12px; color: var(--muted); cursor: pointer; }
.mm-line .mm-title { font-size: 12px; font-weight: 600; flex: 1; }
.mm-eq { color: var(--accent-t); font-size: 12px; }
.mm-eq.on { animation: mm-pulse 1.6s ease-in-out infinite; }
@keyframes mm-pulse { 50% { opacity: .45; } }
.music-mini .mp-play { width: 32px !important; height: 32px !important; }

/* the page */
.mp-page { display: grid; grid-template-columns: minmax(240px, 300px) 1fr; gap: 20px; padding: 18px 20px 8px; align-items: start; min-height: calc(100% - 70px); }
.mp-side { position: sticky; top: 12px; display: grid; gap: 14px; }
.mp-hero { display: grid; gap: 8px; padding: 14px; border-radius: 18px; background: radial-gradient(120% 80% at 0% 0%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 60%), var(--bg2); box-shadow: inset 0 0 0 1px var(--line); }
.mp-hero.empty { place-items: center; text-align: center; padding: 30px 14px; }
.mp-hero-empty { font-weight: 700; font-size: 15px; }
.mp-hero-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mp-kicker { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-t); }
.mp-hero-title { font-family: Bricolage, Inter, sans-serif; font-size: 18px; font-weight: 750; letter-spacing: -.01em; line-height: 1.25; margin-top: 4px; }
.mp-hero-by { font-size: 13px; color: var(--muted); margin-top: -4px; }
.mp-ctr { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 4px 0; }
.mp-ctr .icon-btn { width: 40px; height: 40px; }
.mp-ctr .mp-play.big { width: 52px !important; height: 52px !important; box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 40%, transparent); }
.mp-hero-extra { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.mp-note { font-size: 12px; color: var(--muted); background: var(--bg1); border-radius: 10px; padding: 8px 10px; }
.mp-queue { display: grid; gap: 4px; padding: 12px; border-radius: 16px; background: var(--bg2); box-shadow: inset 0 0 0 1px var(--line); }
.mp-q-head { display: flex; align-items: center; gap: 6px; padding: 0 2px 4px; flex-wrap: wrap; }
.mp-q-head b { white-space: nowrap; }
.mp-q-head b { flex: 1; font-size: 13.5px; }
.mp-q-empty { padding: 4px 2px; }
.mp-q-row { display: flex; align-items: center; gap: 2px; }
.mp-q-go { all: unset; box-sizing: border-box; cursor: pointer; flex: 1; min-width: 0; display: flex; align-items: center; gap: 9px; padding: 5px 6px; border-radius: 9px; }
.mp-q-go:hover { background: var(--hover); }
.mp-q-go:focus-visible { outline: 2px solid var(--accent); }
.mp-q-n { width: 16px; text-align: center; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.mp-q-txt { display: grid; min-width: 0; }
.mp-q-title { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-q-sub { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-q-x { width: 26px; height: 26px; opacity: .6; }
.mp-q-row:hover .mp-q-x { opacity: 1; }
.mp-played summary { cursor: pointer; font-size: 12.5px; color: var(--muted); padding: 6px 2px 2px; }
.mp-main { min-width: 0; }
.mp-log { display: grid; gap: 14px; padding-bottom: 6px; }
.mp-msg { display: flex; gap: 12px; align-items: flex-start; }
.mp-msg-body { min-width: 0; flex: 1; display: grid; gap: 4px; }
.mp-msg-name { display: flex; align-items: center; gap: 7px; }
.mp-msg-name b { font-size: 14.5px; }
.mp-tag { font-size: 9.5px; font-weight: 800; letter-spacing: .06em; padding: 2px 6px; border-radius: 5px; background: var(--accent); color: var(--on-accent); }
.mp-time { font-size: 11.5px; color: var(--muted); }
.mp-text { white-space: pre-wrap; color: var(--text-2); line-height: 1.45; }
.mp-card { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 12px; background: var(--bg2); box-shadow: inset 0 0 0 1px var(--line); max-width: 560px; }
.mp-card .mp-art { width: 48px; height: 48px; }
.mp-card-txt { flex: 1; min-width: 0; display: grid; gap: 3px; }
.mp-card-title { font-weight: 650; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-card-sub { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); min-width: 0; white-space: nowrap; overflow: hidden; }
.mp-card-btns { display: flex; gap: 6px; flex: none; }
.mp-bar { position: sticky; bottom: 0; display: flex; gap: 8px; padding: 10px 20px 14px; background: linear-gradient(180deg, transparent, var(--bg2) 30%); z-index: 2; }
.mp-input { flex: 1; min-width: 0; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg3); color: var(--text); font: inherit; }
.mp-input:focus { outline: none; border-color: var(--accent); }
.mp-send { padding: 0 14px; }
@media (max-width: 860px) {
  .mp-page { grid-template-columns: 1fr; padding: 12px 12px 4px; gap: 12px; }
  .mp-side { position: static; }
  .mp-hero { grid-template-columns: 96px 1fr; align-items: center; column-gap: 12px; }
  .mp-hero > .mp-hero-head, .mp-hero > .mp-ctr, .mp-hero > .mp-hero-extra, .mp-hero > .mp-note { grid-column: 1 / -1; }
  .mp-hero > .mp-art.lg { grid-row: span 2; }
  .mp-hero.empty { grid-template-columns: 1fr; }
  .mp-card { flex-wrap: wrap; }
  .mp-card-btns { width: 100%; justify-content: flex-end; }
  .mp-bar { padding: 8px 12px 12px; }
}
.mp-text { overflow-wrap: anywhere; }
.mp-page > *, .mp-main, .mp-log, .mp-msg-body { min-width: 0; }

@media (max-width: 860px) {
  .mp-page { grid-template-columns: minmax(0, 1fr); }
  .mp-card { max-width: 100%; }
  .mp-card-btns .btn { flex: 1; }
}
/* Music player: volume, and pointing at Apple's own player */
.mp-vol { display: flex; align-items: center; gap: 6px; }
.mp-vol .icon-btn { width: 28px; height: 28px; flex: none; }
.mp-vol input[type=range] { flex: 1; min-width: 0; accent-color: var(--accent); height: 4px; cursor: pointer; }
.mp-vol.off { opacity: .45; }
.mp-vol.off input { cursor: not-allowed; }
.mp-vol.hero { padding: 0 6px; }
.md-volrow:empty { display: none; }
.md-volrow .mp-vol { padding: 0 2px; }
.mp-play.apple { box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 45%, transparent); }
.md-frame[data-src="apple"]:not([data-kind="song"]) iframe { height: 175px; }
.md-frame.md-flash { animation: md-flash 1.1s ease-out 2; }
@keyframes md-flash { 0% { box-shadow: 0 0 0 0 var(--accent); } 40% { box-shadow: 0 0 0 4px var(--accent); } 100% { box-shadow: 0 0 0 0 transparent; } }
html.app-away .md-frame.md-flash { animation: md-flash 1.1s ease-out 2 !important; }
.mp-vol-note { font-size: 12px; color: var(--muted); text-align: center; margin-top: -4px; }
/* the sidebar never grows past the window: the channel list shrinks and scrolls, your account bar stays visible */
.app { grid-template-rows: minmax(0, 1fr); }
.sidebar { min-height: 0; overflow: hidden; }
.channels { min-height: 0; }
.sidebar > .voice-bar, .sidebar > .music-dock, .sidebar > footer.me { flex: none; }
.md-frame.show { max-height: 34vh; overflow-y: auto; }
/* seek bar */
.mp-seek { display: flex; align-items: center; gap: 8px; }
.mp-seek.hidden { display: none; }
.mp-seek input[type=range] { flex: 1; min-width: 0; accent-color: var(--accent); height: 4px; cursor: pointer; }
.ms-t { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 32px; }
.ms-t.ms-dur { text-align: right; }
.mp-seek.dock { padding: 0 4px; gap: 6px; }
.mp-seek.dock .ms-t { font-size: 10.5px; min-width: 28px; }
.mp-seek.hero { margin: 2px 0 -2px; }
/* voice channels: text chat button lights up when there's something new */
.voice-chat-btn { position: relative; }
.voice-chat-btn.unread::after { content: ''; position: absolute; top: 5px; right: 5px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--bg2); }
/* Twitch links play in chat */
.tw-thumb { background: radial-gradient(120% 120% at 0% 0%, #9146ff, #2b1660 70%); }
.tw-thumb img { opacity: .9; }
.tw-live { position: absolute; left: 10px; top: 10px; font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: #fff; background: #9146ff; padding: 3px 8px; border-radius: 6px; }

/* ---------- Trivia ---------- */
.tv { margin-top: 4px; max-width: 560px; border-radius: 16px; padding: 14px 16px; display: grid; gap: 12px; color: #eef0ff;
  background: radial-gradient(120% 90% at 100% 0%, rgba(255,138,61,.22), transparent 55%), linear-gradient(160deg, #2a2350, #18152e); box-shadow: inset 0 0 0 1px rgba(170,160,255,.16); }
.tv-top { display: flex; align-items: center; gap: 10px; }
.tv-title { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.tv-title b { font-family: Bricolage, Inter, sans-serif; font-size: 18px; letter-spacing: -.01em; }
.tv-icon { font-size: 20px; }
.tv-cat { font-size: 12px; font-weight: 700; color: #c9c4ff; background: rgba(255,255,255,.08); padding: 2px 9px; border-radius: 999px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-count { font-size: 12px; font-weight: 800; color: #ffd36b; font-variant-numeric: tabular-nums; }
.tv .tv-end { color: #e6e6ff; border-color: rgba(255,255,255,.2); }
.tv-time { height: 6px; border-radius: 999px; background: rgba(255,255,255,.1); overflow: hidden; }
.tv-fill { height: 100%; background: linear-gradient(90deg, #ff8a3d, #ffd36b); border-radius: 999px; }
.tv-reveal .tv-fill { background: rgba(255,255,255,.35); }
.tv-ready { font-family: Bricolage, Inter, sans-serif; font-size: 20px; font-weight: 750; }
.tv-q { font-family: Bricolage, Inter, sans-serif; font-size: 19px; font-weight: 700; line-height: 1.3; }
.tv-answers { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tv-a { all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 12px; background: rgba(255,255,255,.08); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); font-size: 14px; font-weight: 600; color: #f2f2ff; position: relative; transition: background .12s, transform .08s; }
.tv-a:hover:not(:disabled) { background: rgba(255,255,255,.14); }
.tv-a:active:not(:disabled) { transform: scale(.98); }
.tv-a:focus-visible { outline: 2px solid #ffd36b; }
.tv-a:disabled { cursor: default; }
.tv-letter { flex: none; width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; font-size: 12px; font-weight: 800; background: rgba(255,255,255,.12); }
.tv-text { min-width: 0; overflow-wrap: anywhere; }
.tv-a.picked { background: #ff8a3d; color: #2a1406; box-shadow: none; }
.tv-a.picked .tv-letter { background: rgba(0,0,0,.15); }
.tv-a.right { background: #2fbf71; color: #062312; box-shadow: none; }
.tv-a.right .tv-letter { background: rgba(0,0,0,.15); }
.tv-a.wrong { background: #e5484d; color: #fff; box-shadow: none; }
.tv-a.dim { opacity: .5; }
.tv-picks { margin-left: auto; font-size: 12px; font-weight: 800; background: rgba(0,0,0,.2); padding: 1px 8px; border-radius: 999px; }
.tv-foot { display: flex; align-items: center; gap: 8px; }
.tv-answered { flex: 1; font-size: 13px; color: #c9c4ff; }
.tv .btn.ghost { color: #eef0ff; border-color: rgba(255,255,255,.2); }
.tv-result { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; color: #d6d3ff; }
.tv-you.right { color: #4fe08a; } .tv-you.wrong { color: #ff8a8a; }
.tv-board { display: grid; gap: 4px; }
.tv-row { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 9px; background: rgba(0,0,0,.18); font-size: 13.5px; }
.tv-row.me { box-shadow: inset 0 0 0 1px rgba(255,211,107,.5); }
.tv-rank { width: 24px; text-align: center; }
.tv-name { flex: 1; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-pts { font-weight: 800; color: #ffd36b; font-variant-numeric: tabular-nums; }
.tv-hint { font-size: 12.5px; color: #b9b5e8; }
.tv-champ { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: linear-gradient(90deg, rgba(255,211,107,.18), transparent); }
.tv-champ b { font-family: Bricolage, Inter, sans-serif; font-size: 18px; }
.tv-crown { font-size: 26px; }
@media (max-width: 520px) { .tv-answers { grid-template-columns: 1fr; } }
.voice-chat-btn { display: inline-flex; align-items: center; gap: 6px; margin-right: 4px; }
.voice-chat-btn.unread { border-color: var(--accent); color: var(--accent-t); }
.voice-chat-btn.unread::after { top: -3px; right: -3px; }

/* What's new: the full note looks like the corner card, only bigger */
.modal-card.wn-modal { position: relative; overflow: hidden; padding: 0; display: grid; gap: 0; max-height: min(86vh, 760px); }
.modal-card.wn-modal::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 4px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); z-index: 1; }
.wn-hero { position: relative; display: flex; align-items: flex-start; gap: 14px; padding: 24px 22px 16px; background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 60%); border-bottom: 1px solid var(--line); }
.wn-ic.big { width: 46px; height: 46px; border-radius: 13px; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent); }
.wn-h { margin: 2px 0 0; font-family: Bricolage, Inter, sans-serif; font-size: 21px; line-height: 1.25; letter-spacing: -.01em; }
.wn-by { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.wn-x { position: absolute; top: 14px; right: 12px; }
.wn-hero .wn-t { padding-right: 28px; }
.wn-body.big { padding: 18px 22px 6px; font-size: 15px; line-height: 1.65; color: var(--text-2); overflow-y: auto; }
.wn-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px 18px; }
/* the list of every update: a timeline */
.wn-timeline { position: relative; display: grid; gap: 10px; padding: 16px 22px 4px 40px; overflow-y: auto; }
.wn-timeline::before { content: ''; position: absolute; left: 25px; top: 24px; bottom: 12px; width: 2px; background: var(--line); border-radius: 2px; }
.wn-timeline .wn-note { position: relative; }
.wn-timeline .wn-note::before { content: ''; position: absolute; left: -20px; top: 16px; width: 10px; height: 10px; border-radius: 50%; background: var(--bg4); box-shadow: 0 0 0 3px var(--bg1); }
.wn-timeline .wn-note.latest::before { background: var(--accent); box-shadow: 0 0 0 3px var(--bg1), 0 0 0 6px var(--accent-soft); }
.wn-timeline .wn-note.latest { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.wn-note-head { display: flex; align-items: center; gap: 8px; }
.wn-new { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--on-accent); background: var(--accent); padding: 2px 7px; border-radius: 999px; }
.settings-body .wn-timeline, .set-body .wn-timeline { padding-right: 0; }
@media (max-width: 600px) { .wn-hero { padding: 20px 16px 14px; } .wn-body.big, .wn-foot { padding-left: 16px; padding-right: 16px; } .wn-timeline { padding-left: 34px; padding-right: 14px; } .wn-timeline::before { left: 19px; } }
.modal-card.wn-modal { grid-template-rows: auto minmax(0, 1fr) auto; }
.wn-body { white-space: normal; display: grid; gap: 10px; }
.wn-p { white-space: pre-wrap; }
.wn-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.wn-list li { position: relative; padding-left: 20px; }
.wn-list li::before { content: ''; position: absolute; left: 4px; top: .62em; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

/* ---------- settings pages: header card + panels (same look as Keeper) ---------- */
.st-hero { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 16px; margin-bottom: 4px;
  background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 60%), var(--bg2); box-shadow: inset 0 0 0 1px var(--line); }
.st-hero-icon { flex: none; width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-t); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent); }
.st-hero-words { min-width: 0; display: grid; gap: 3px; }
.st-hero-title { font-family: Bricolage, Inter, sans-serif; font-size: 18px; font-weight: 750; letter-spacing: -.01em; }
.st-hero-desc { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.45; }
.kp:first-child { margin-top: 0; }
.st-hero + .kp { margin-top: 12px; }
.kp > .list, .kp > .list-row:first-of-type { margin-top: 6px; }
.kp > .empty-card { margin: 8px 0 2px; }
.kp > .row:last-child { margin-bottom: 0; }
.kp .acct-top { padding-top: 8px; }
.kp .join-roles .cat { display: none; }
.kp.kp-danger { border-color: color-mix(in srgb, var(--red) 35%, var(--line)); }
.kp.kp-danger .kp-icon { background: color-mix(in srgb, var(--red) 16%, transparent); color: var(--red-t); }
.kp.kp-danger > .row, .kp.kp-danger > .btn { margin-top: 8px; }
.st-hero + .wn-timeline { margin-top: 10px; padding-left: 30px; padding-right: 0; }
.st-hero + .wn-timeline::before { left: 13px; }

/* ---------- music queue in voice (watch dock) ---------- */
.wd-qbtn { position: relative; }
.wd-qbtn.on { color: var(--accent-t); background: var(--accent-soft); }
.wd-qcount { position: absolute; top: -2px; right: -3px; min-width: 15px; height: 15px; padding: 0 4px; border-radius: 8px; background: var(--accent); color: var(--on-accent); font-size: 10px; font-weight: 800; line-height: 15px; text-align: center; }
.wd-title b { overflow: hidden; text-overflow: ellipsis; }
.wd-queue { border-top: 1px solid var(--line); padding: 10px 12px 12px; display: grid; gap: 8px; max-height: 34vh; overflow-y: auto; }
.watch-dock.mini .wd-queue { display: none; }
.wq-add { display: grid; gap: 4px; }
.wq-add-line { display: flex; align-items: center; gap: 6px; background: var(--bg0); border: 1px solid var(--line); border-radius: 10px; padding: 4px 4px 4px 10px; color: var(--muted); }
.wq-add-line:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.wq-add-line input { border: 0; background: transparent; box-shadow: none !important; padding: 6px 2px; min-width: 0; }
.wq-add-line .btn { padding: 6px 12px; }
.wq-list { display: grid; gap: 2px; }
.wq-row { display: flex; align-items: center; gap: 10px; padding: 5px 6px; border-radius: 8px; }
.wq-row:hover { background: var(--hover); }
.wq-num { width: 18px; text-align: right; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.wq-thumb { width: 64px; height: 36px; border-radius: 5px; object-fit: cover; flex: none; background: var(--bg3); }
.wq-thumb.ph { display: grid; place-items: center; color: var(--muted); }
.wq-txt { min-width: 0; flex: 1; display: grid; }
.wq-txt b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wq-empty { padding: 6px 4px; }
.wd-queue .row { justify-content: flex-start; }
.modal-card .wq-add { margin-top: 4px; }

/* ---------- levels ---------- */
.lv-card { margin-top: 4px; display: grid; grid-template-columns: auto auto 1fr; gap: 14px; align-items: center; max-width: 560px; padding: 14px 16px; border-radius: 14px; background: linear-gradient(120deg, color-mix(in srgb, var(--accent) 14%, var(--bg2)), var(--bg2) 60%); border: 1px solid var(--line); }
.lv-level { display: grid; justify-items: center; line-height: 1; padding-right: 2px; }
.lv-big { font-size: 34px; font-weight: 800; color: var(--accent-t); font-variant-numeric: tabular-nums; }
.lv-word { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-top: 3px; }
.lv-mid { min-width: 0; display: grid; gap: 6px; }
.lv-top { display: flex; align-items: baseline; gap: 8px; }
.lv-name { font-weight: 700; font-size: 15px; }
.lv-rank { font-weight: 800; color: var(--text-2); font-size: 13px; padding: 1px 7px; border-radius: 6px; background: var(--bg3); }
.lv-bar { height: 8px; border-radius: 99px; background: var(--bg3); overflow: hidden; }
.lv-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.lv-prog { display: grid; gap: 3px; }
.lv-xp { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.lv-facts { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12.5px; color: var(--text-2); }
.lv-next { font-size: 12.5px; color: var(--accent-2); font-weight: 600; }
.click { cursor: pointer; }
.lv-board { margin-top: 4px; max-width: 560px; border-radius: 14px; background: var(--bg2); border: 1px solid var(--line); padding: 6px 8px 8px; display: grid; gap: 1px; }
.lv-board.flat { max-width: none; max-height: 52vh; overflow-y: auto; }
.lv-board-head { display: flex; align-items: center; gap: 8px; padding: 6px 6px 8px; color: var(--accent-t); }
.lv-board-head b { color: var(--text); }
.lv-row { display: grid; grid-template-columns: 28px auto 1fr auto auto; gap: 10px; align-items: center; padding: 6px; border-radius: 9px; }
.lv-row:hover { background: var(--hover); }
.lv-row.me { background: var(--accent-soft); }
.lv-place { text-align: center; font-weight: 800; color: var(--muted); font-variant-numeric: tabular-nums; }
.lv-row.podium .lv-place { font-size: 17px; }
.lv-row-mid { min-width: 0; display: grid; gap: 4px; }
.lv-row-mid .lv-name { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lv-row-mid .lv-bar { height: 5px; }
.lv-row-lvl { font-weight: 800; font-size: 13px; }
.lv-row-xp { min-width: 64px; text-align: right; font-variant-numeric: tabular-nums; }
.lv-mine { display: grid; gap: 4px; padding: 10px 12px; border-radius: 12px; background: var(--accent-soft); margin-bottom: 8px; }
.pc-level { text-align: left; display: grid; gap: 6px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg2); cursor: pointer; color: var(--text); }
.pc-level:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.pc-level-top { display: flex; align-items: center; gap: 7px; color: var(--accent-t); }
.pc-level-top b { color: var(--text); }
.lv-rewards { display: grid; gap: 6px; margin: 6px 0; }
.lv-reward { display: flex; align-items: center; gap: 8px; }
.lv-reward-lvl { width: 76px; }
.lv-reward select { flex: 1; min-width: 0; }
.lv-arrow { color: var(--muted); }
.lv-noxp { margin: 8px 0; }
.lv-noxp > summary { cursor: pointer; color: var(--text-2); font-weight: 600; font-size: 13.5px; padding: 6px 0; }
.lv-noxp .cmd-row svg { color: var(--muted); }
.btn.danger-text { color: var(--red-t); }
@media (max-width: 560px) { .lv-card { grid-template-columns: auto 1fr; } .lv-card .avatar { display: none; } .lv-row { grid-template-columns: 24px auto 1fr auto; } .lv-row-xp { display: none; } }

/* ---------- live alerts ---------- */
.live-card { margin-top: 4px; display: grid; grid-template-columns: 280px 1fr; max-width: 640px; border-radius: 12px; overflow: hidden; background: var(--bg2); border: 1px solid var(--line); }
.live-card.twitch { border-color: color-mix(in srgb, #9146ff 45%, var(--line)); }
.live-card.youtube { border-color: color-mix(in srgb, #ff0033 40%, var(--line)); }
.live-card.ended { border-color: var(--line); }
.live-card > .yt-frame { border-radius: 0; grid-column: 1 / -1; }
.lc-thumb { position: relative; aspect-ratio: 16 / 9; background: #000; cursor: pointer; overflow: hidden; }
.live-card.ended .lc-thumb { cursor: default; }
.lc-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lc-ph { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); background: var(--bg3); }
.lc-badge { position: absolute; top: 8px; left: 8px; padding: 2px 7px; border-radius: 5px; background: #e91916; color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .06em; }
.live-card.ended .lc-badge { background: var(--bg4); color: var(--text-2); }
.live-card.twitch .yt-play { background: rgba(145,70,255,.92); }
.lc-body { padding: 10px 14px 12px; display: grid; gap: 6px; align-content: start; min-width: 0; }
.lc-who { display: flex; align-items: center; gap: 7px; min-width: 0; }
.lc-who b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lc-plat { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 700; color: var(--muted); }
.live-card.twitch .lc-plat { color: #a970ff; } .live-card.youtube .lc-plat { color: #ff4e45; }
.live-card.ended .lc-plat { color: var(--muted); }
.lc-title { color: var(--text); font-weight: 600; font-size: 14px; text-decoration: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lc-title:hover { text-decoration: underline; }
.lc-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.lc-game { background: var(--bg3); color: var(--text-2); padding: 1px 7px; border-radius: 6px; }
.lc-go { justify-self: start; text-decoration: none; margin-top: 2px; }
@media (max-width: 640px) { .live-card { grid-template-columns: 1fr; } }
.live-list { display: grid; gap: 6px; margin: 6px 0; }
.live-row { display: flex; gap: 6px; align-items: center; }
.live-row select { width: 110px; flex: none; }
.live-row input:not(.grow) { width: 180px; flex: none; }
@media (max-width: 640px) { .live-row { flex-wrap: wrap; } .live-row input:not(.grow) { flex: 1; width: auto; } }
.live-report { display: grid; gap: 4px; margin-top: 8px; }
.live-rep-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; background: var(--bg1); }
.live-rep-row .grow { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: right; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--muted); }
.live-dot.on { background: #e91916; box-shadow: 0 0 0 3px rgba(233,25,22,.2); }
.live-dot.unk { background: var(--yellow); }

/* ---------- profile themes ---------- */
.profile-card.themed { --pt-mix: color-mix(in srgb, var(--pt1) 34%, var(--bg1)); background: linear-gradient(180deg, color-mix(in srgb, var(--pt1) 30%, var(--bg1)) 0%, color-mix(in srgb, var(--pt2) 30%, var(--bg1)) 100%); }
.profile-card.themed .pc-av { border-color: color-mix(in srgb, var(--pt1) 30%, var(--bg1)); }
.profile-card.themed .pc-av .status { border-color: color-mix(in srgb, var(--pt1) 30%, var(--bg1)); }
.profile-card.themed .pc-body .cat { color: color-mix(in srgb, var(--pt1) 45%, var(--text)); }
.profile-card.themed .pc-level, .profile-card.themed .pc-note-text:focus { background: color-mix(in srgb, var(--bg1) 70%, transparent); }
.profile-card.pt-none { background: color-mix(in srgb, var(--pt1) 22%, var(--bg1)); }
.profile-card.pt-glow { box-shadow: 0 0 0 1px color-mix(in srgb, var(--pt1) 60%, transparent), 0 0 40px -6px var(--pt1), 0 0 80px -20px var(--pt2); }
.profile-card.pt-shimmer, .profile-card.pt-aurora, .profile-card.pt-sparkle { position: relative; isolation: isolate; }
.profile-card.pt-shimmer::after { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; border-radius: inherit; background: linear-gradient(105deg, transparent 35%, color-mix(in srgb, white 14%, transparent) 50%, transparent 65%); background-size: 250% 100%; animation: pt-shimmer 4.5s ease-in-out infinite; }
@keyframes pt-shimmer { 0% { background-position: 130% 0; } 60%, 100% { background-position: -30% 0; } }
.profile-card.pt-aurora::after { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; border-radius: inherit; background: radial-gradient(60% 40% at 20% 30%, color-mix(in srgb, var(--pt1) 45%, transparent), transparent 70%), radial-gradient(55% 45% at 80% 70%, color-mix(in srgb, var(--pt2) 45%, transparent), transparent 70%); background-size: 160% 160%; animation: pt-aurora 12s ease-in-out infinite alternate; opacity: .9; }
@keyframes pt-aurora { 0% { background-position: 0% 0%, 100% 100%; } 100% { background-position: 100% 60%, 0% 30%; } }
.profile-card.pt-sparkle::after { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; border-radius: inherit; background-image: radial-gradient(1.6px 1.6px at 12% 22%, #fff, transparent), radial-gradient(1.2px 1.2px at 78% 14%, #fff, transparent), radial-gradient(1.8px 1.8px at 64% 58%, #fff, transparent), radial-gradient(1.2px 1.2px at 30% 74%, #fff, transparent), radial-gradient(1.5px 1.5px at 88% 82%, #fff, transparent), radial-gradient(1.1px 1.1px at 46% 36%, #fff, transparent), radial-gradient(1.4px 1.4px at 8% 90%, #fff, transparent); animation: pt-twinkle 3.2s ease-in-out infinite alternate; }
@keyframes pt-twinkle { 0% { opacity: .25; } 100% { opacity: .9; } }
@media (prefers-reduced-motion: reduce) { .profile-card.themed::after { animation: none; } }
.pt-wrap { display: grid; grid-template-columns: 1fr 260px; gap: 16px; align-items: start; margin: 8px 0; }
.pt-controls { display: grid; gap: 8px; }
.pt-controls.off { opacity: .55; }
.pt-colors { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.pt-color { display: grid; justify-items: center; gap: 2px; color: var(--muted); cursor: pointer; }
.pt-color input { width: 44px; height: 34px; padding: 2px; border-radius: 8px; cursor: pointer; }
.pt-swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.pt-swatch { width: 26px; height: 26px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; padding: 0; box-shadow: inset 0 0 0 1px rgba(255,255,255,.15); }
.pt-swatch.on { border-color: var(--text); }
.pt-fx { display: flex; flex-wrap: wrap; gap: 6px; }
.pt-fx-btn { border: 1px solid var(--line); background: var(--bg1); color: var(--text-2); padding: 6px 12px; border-radius: 999px; cursor: pointer; font-weight: 600; font-size: 13px; }
.pt-fx-btn.on { border-color: var(--accent); color: var(--accent-t); background: var(--accent-soft); }
.pt-preview { border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: var(--bg1); padding: 0; }
.pt-preview .pc-banner { height: 70px; }
.pt-preview .pc-av { margin-top: -36px; border-width: 5px; }
.pt-preview .pc-body { padding: 4px 14px 14px; gap: 2px; }
.pt-preview .pc-name { font-size: 17px; }
@media (max-width: 640px) { .pt-wrap { grid-template-columns: 1fr; } }

/* ---------- server stats ---------- */
.stats-top { display: flex; justify-content: flex-start; margin-bottom: 4px; }
.stats-top .seg { flex: none; }
.stats { display: grid; gap: 0; }
.st-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-top: 12px; }
.st-tile { padding: 12px 14px; border-radius: 14px; background: var(--bg2); border: 1px solid var(--line); display: grid; gap: 2px; }
.st-tile-label { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.st-tile-value { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; }
.st-tile-sub { font-size: 12px; color: var(--muted); }
.sc-chart { position: relative; display: grid; grid-template-columns: 44px 1fr; grid-template-rows: auto 150px auto; padding-top: 8px; }
.sc-chart .sc-legend { grid-column: 1 / -1; display: flex; gap: 14px; font-size: 12.5px; color: var(--text-2); margin-bottom: 8px; }
.sc-legend .lg { display: inline-flex; align-items: center; gap: 6px; }
.sc-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.sc-legend .up i { background: var(--accent); } .sc-legend .down i { background: var(--muted); }
.sc-grid { grid-row: 2; display: flex; flex-direction: column; justify-content: space-between; font-size: 11px; color: var(--muted); text-align: right; padding-right: 8px; font-variant-numeric: tabular-nums; }
.sc-cols { grid-row: 2; grid-column: 2; display: flex; align-items: flex-end; gap: 2px; border-bottom: 1px solid var(--line); background: linear-gradient(var(--line), var(--line)) top / 100% 1px no-repeat; }
.sc-col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; min-width: 0; cursor: default; border-radius: 4px 4px 0 0; }
.sc-col:hover { background: var(--hover); }
.sc-bar { width: 100%; max-width: 26px; margin: 0 auto; border-radius: 4px 4px 0 0; min-height: 0; }
.sc-bar.up { background: var(--accent); }
.sc-bar.zero { height: 0 !important; }
.sc-col:hover .sc-bar.up { background: var(--accent-2); }
.sc-chart.two .sc-cols { align-items: stretch; }
.sc-chart.two .sc-col { flex-direction: row; align-items: flex-end; gap: 1px; justify-content: center; }
.sc-chart.two .sc-bar { max-width: 12px; margin: 0; }
.sc-bar.down { background: var(--muted); }
.sc-axis { grid-row: 3; grid-column: 2; display: flex; gap: 2px; font-size: 11px; color: var(--muted); padding-top: 5px; }
.sc-axis span { flex: 1; min-width: 0; white-space: nowrap; overflow: visible; }
.hm { display: grid; grid-template-columns: 38px repeat(24, minmax(0, 1fr)); gap: 3px; padding-top: 10px; font-size: 11px; color: var(--muted); }
.hm-hour { white-space: nowrap; overflow: visible; width: 0; }
.hm-day { display: flex; align-items: center; }
.hm-cell { aspect-ratio: 1; border-radius: 4px; background: color-mix(in srgb, var(--accent) calc(var(--a, 0) * 100%), var(--bg3)); min-width: 0; }
.hm-cell.zero { background: var(--bg3); opacity: .55; }
.st-two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; align-items: start; }
.st-two > .kp { margin-top: 14px; }
.sc-axis span:last-child { text-align: right; direction: rtl; }
.st-rank { display: grid; gap: 6px; padding-top: 8px; }
.st-rank-row { display: grid; grid-template-columns: minmax(0, 150px) 1fr auto; gap: 10px; align-items: center; font-size: 13.5px; }
.st-rank-label { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--text-2); }
.st-rank-label > span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-rank-bar { height: 8px; border-radius: 99px; background: var(--bg3); overflow: hidden; }
.st-rank-bar span { display: block; height: 100%; border-radius: 99px; background: var(--accent); }
.st-rank-n { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 12.5px; min-width: 32px; text-align: right; }
@media (max-width: 760px) { .st-two { grid-template-columns: 1fr; } .hm { grid-template-columns: 30px repeat(24, minmax(0, 1fr)); gap: 2px; } .hm-hour { font-size: 9.5px; } }

/* ---------- tickets ---------- */
.tk-panel { margin-top: 4px; max-width: 560px; border-radius: 16px; border: 1px solid var(--line); background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 12%, var(--bg2)), var(--bg2) 55%); padding: 16px; display: grid; gap: 12px; }
.tk-panel-head { display: flex; gap: 12px; align-items: flex-start; }
.tk-tile { flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); box-shadow: 0 6px 18px -8px var(--accent); }
.tk-title { display: block; font-family: Bricolage, Inter, sans-serif; font-size: 18px; letter-spacing: -.01em; }
.tk-desc { color: var(--text-2); font-size: 13.5px; margin-top: 2px; }
.tk-types { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; }
.tk-type { display: flex; align-items: center; gap: 10px; text-align: left; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg1); color: var(--text); cursor: pointer; transition: border-color .12s, transform .12s, background .12s; }
.tk-type:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--bg1)); transform: translateY(-1px); }
.tk-type > svg { color: var(--muted); flex: none; }
.tk-type:hover > svg { color: var(--accent-t); }
.tk-type-emoji { font-size: 22px; width: 30px; text-align: center; flex: none; }
.tk-type-words { display: grid; min-width: 0; flex: 1; }
.tk-type-words b { font-size: 14px; }
.tk-type-words span { font-size: 12px; color: var(--muted); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; } /* 5.0: two lines before it cuts off */
.tk-foot { font-size: 12px; color: var(--muted); }
.tk-form .tk-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.tk-chip { border: 1px solid var(--line); background: var(--bg1); color: var(--text-2); padding: 7px 12px; border-radius: 999px; cursor: pointer; font-weight: 600; font-size: 13.5px; }
.tk-chip.on { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
.tk-qs { display: grid; gap: 8px; }
.tk-answer { width: 100%; resize: vertical; min-height: 84px; }
.tk-card { margin-top: 4px; max-width: 600px; border-radius: 16px; border: 1px solid var(--line); background: var(--bg2); overflow: hidden; border-top: 3px solid var(--accent); }
.tk-card.st-claimed { border-top-color: var(--blue); }
.tk-card.st-closed { border-top-color: var(--muted); }
.tk-card-top { display: flex; align-items: center; gap: 10px; padding: 12px 16px 0; }
.tk-card-title { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; flex-wrap: wrap; }
.tk-num { font-family: Bricolage, Inter, sans-serif; font-weight: 800; font-size: 18px; letter-spacing: -.01em; }
.tk-type-pill { font-size: 12.5px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--bg3); color: var(--text-2); }
.tk-pill { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; padding: 3px 8px; border-radius: 6px; flex: none; }
.tk-pill.open { background: color-mix(in srgb, var(--green) 18%, transparent); color: var(--green-t); }
.tk-pill.claimed { background: color-mix(in srgb, var(--blue) 18%, transparent); color: var(--blue); }
.tk-pill.closed { background: var(--bg3); color: var(--muted); }
.tk-pill.deleted { background: color-mix(in srgb, var(--red) 14%, transparent); color: var(--red-t); }
.tk-by { display: flex; align-items: center; gap: 10px; padding: 10px 16px 4px; }
.tk-name { font-weight: 700; }
.tk-qa { display: grid; gap: 8px; padding: 8px 16px 4px; }
.tk-q { border-radius: 10px; background: var(--bg1); padding: 9px 12px; border-left: 3px solid color-mix(in srgb, var(--accent) 60%, transparent); }
.tk-q-label { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 3px; }
.tk-q-answer { white-space: pre-wrap; font-size: 14px; overflow-wrap: anywhere; }
.tk-facts { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 8px 16px 0; font-size: 13px; color: var(--text-2); }
.tk-fact { display: inline-flex; align-items: center; gap: 4px; }
.tk-fact .tk-name { font-weight: 600; }
.tk-stars-small { color: var(--yellow-t); letter-spacing: 1px; }
.tk-btns { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 16px 14px; margin-top: 8px; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--bg1) 50%, transparent); }
.tk-btns .btn { display: inline-flex; align-items: center; gap: 6px; }
.tk-close:hover { color: var(--red-t); }
.tk-closed { margin-top: 4px; max-width: 600px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg2); padding: 12px 14px; display: grid; gap: 10px; }
.tk-closed-head { display: flex; align-items: center; gap: 10px; }
.tk-lock { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--bg3); color: var(--muted); flex: none; }
.tk-rate { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tk-stars { display: inline-flex; gap: 2px; }
.tk-star { border: 0; background: transparent; font-size: 24px; line-height: 1; color: var(--bg4); cursor: pointer; padding: 2px; transition: transform .1s, color .1s; }
.tk-star:disabled { cursor: default; }
.tk-star.on, .tk-star.hover { color: var(--yellow-t); }
.tk-star:not(:disabled):hover { transform: scale(1.15); }
.tk-closed .row { justify-content: flex-start; }
.tk-people { display: grid; gap: 2px; max-height: 50vh; overflow-y: auto; margin: 8px 0; }
.tk-person { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px; }
.tk-person:hover { background: var(--hover); }
.tk-pre { white-space: pre-wrap; font: 12.5px/1.5 var(--mono); background: var(--bg0); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; max-height: 60vh; overflow: auto; margin: 0; }
.chan.tk-closed-ch { opacity: .55; }
.tk-edit { display: grid; gap: 8px; margin: 6px 0; }
.tk-edit-card { border: 1px solid var(--line); border-radius: 12px; background: var(--bg1); padding: 10px; display: grid; gap: 6px; }
.tk-edit-top { display: flex; gap: 6px; align-items: center; }
.tk-edit-top input:nth-child(2) { width: 150px; flex: none; }
.tk-emoji { width: 52px; text-align: center; flex: none; }
.tk-edit-q { display: flex; gap: 6px; align-items: center; padding-left: 8px; }
.tk-qn { width: 18px; color: var(--muted); font-size: 12px; text-align: center; }
.tk-long { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--text-2); white-space: nowrap; cursor: pointer; }
.tk-addq { justify-self: start; margin-left: 32px; }
.tk-list { display: grid; gap: 6px; margin-top: 14px; }
.tk-row { display: grid; grid-template-columns: 50px 130px minmax(0, 1fr) minmax(0, 1.4fr) auto auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--bg2); border: 1px solid var(--line); }
.tk-row-num { font-weight: 800; font-variant-numeric: tabular-nums; }
.tk-row-type { font-size: 13px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk-row-who { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tk-row-who .tk-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk-row-meta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk-row-acts { display: flex; gap: 4px; }
.tk-row-right { display: flex; align-items: center; gap: 8px; }
@media (max-width: 760px) { .tk-row { grid-template-columns: 44px 1fr auto; } .tk-row-type, .tk-row-meta { display: none; } .tk-row-acts { grid-column: 1 / -1; } .tk-edit-top { flex-wrap: wrap; } .tk-edit-top input:nth-child(2) { flex: 1; } .tk-edit-q { flex-wrap: wrap; } }

/* ---------- seasonal looks ---------- */
.season-fx { position: fixed; inset: 0; pointer-events: none; z-index: 5; overflow: hidden; }
/* Halloween: a moon behind everything, a cobweb in the corner, bats now and then */
:root[data-season="halloween"] .rail { background: linear-gradient(180deg, var(--bg0) 40%, color-mix(in srgb, #6b2bd9 22%, var(--bg0))); }
:root[data-season="halloween"] .rail-btn.home { box-shadow: 0 0 0 2px color-mix(in srgb, #ff7518 45%, transparent); }
:root[data-season="halloween"] .rail-btn.home::after { content: "🎃"; position: absolute; left: -5px; top: -5px; font-size: 15px; line-height: 1; filter: drop-shadow(0 1px 2px #000); }
:root[data-season="halloween"] .chat-head, :root[data-season="halloween"] .side-head { background-image: linear-gradient(90deg, transparent, color-mix(in srgb, #ff7518 7%, transparent), transparent); }
.season-halloween .sf-moon { position: absolute; top: 64px; right: 270px; width: 54px; height: 54px; border-radius: 50%; background: radial-gradient(circle at 38% 38%, #fff6d8, #f2d58a 60%, #c99b45); box-shadow: 0 0 40px 8px rgba(255, 220, 140, .18); opacity: .16; }
.season-halloween .sf-moon::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle at 70% 60%, rgba(0,0,0,.18) 0 6px, transparent 7px), radial-gradient(circle at 35% 70%, rgba(0,0,0,.14) 0 4px, transparent 5px); }
.season-halloween .sf-web { position: absolute; top: 48px; right: 240px; width: 110px; color: #d8d2e6; opacity: .1; transform: scaleX(1); }
.season-halloween .sf-web svg { width: 100%; display: block; }
.season-halloween .sf-bat { position: absolute; left: -80px; width: 38px; color: #120c18; opacity: 0; animation: sf-bat 34s linear infinite; filter: drop-shadow(0 0 1px rgba(255,255,255,.25)); }
.season-halloween .sf-bat svg { width: 100%; display: block; animation: sf-flap .28s ease-in-out infinite alternate; transform-origin: 50% 40%; }
.season-halloween .sf-bat.b0 { top: 18%; animation-delay: 4s; }
.season-halloween .sf-bat.b1 { top: 30%; width: 26px; animation-delay: 6s; animation-duration: 38s; }
.season-halloween .sf-bat.b2 { top: 12%; width: 30px; animation-delay: 21s; animation-duration: 41s; }
:root[data-theme="light"] .season-halloween .sf-bat { color: #2a1d35; }
@keyframes sf-bat { 0% { transform: translate(0, 0); opacity: 0; } 2% { opacity: .55; } 14% { transform: translate(55vw, -40px); } 24% { transform: translate(112vw, 30px); opacity: .55; } 25%, 100% { transform: translate(112vw, 30px); opacity: 0; } }
@keyframes sf-flap { from { transform: scaleY(1); } to { transform: scaleY(.45); } }
/* Winter: slow snow, a frosty edge on the top bars */
:root[data-season="winter"] .rail { background: linear-gradient(180deg, var(--bg0) 40%, color-mix(in srgb, #7cc4ff 14%, var(--bg0))); }
:root[data-season="winter"] .rail-btn.home::after { content: "❄️"; position: absolute; left: -4px; top: -4px; font-size: 13px; line-height: 1; }
:root[data-season="winter"] .chat-head, :root[data-season="winter"] .side-head { box-shadow: inset 0 -1px 0 color-mix(in srgb, #bfe3ff 18%, transparent); }
.season-fx .sf-flake { position: absolute; top: -10px; border-radius: 50%; background: #fff; opacity: .5; animation: sf-snow linear infinite; }
:root[data-theme="light"] .season-fx .sf-flake { background: #9cc9ec; opacity: .7; }
@keyframes sf-snow { 0% { transform: translate(0, -10px); } 50% { transform: translate(var(--drift, 0), 50vh); } 100% { transform: translate(0, 105vh); } }
/* still for people who want less motion, and while Lodge isn't the window you're using */
:root.app-away .season-fx *, :root.app-away .season-fx { animation-play-state: paused !important; }
@media (prefers-reduced-motion: reduce) { .season-fx .sf-bat, .season-fx i, .season-fx .sf-fw { animation: none; opacity: 0; } }
@media (max-width: 860px) { .season-halloween .sf-moon, .season-halloween .sf-web { right: 16px; } .season-fx > i:nth-child(n+16) { display: none; } }

/* ---------- join-to-create voice ---------- */
.chan.hub-ch .ico { color: var(--accent-t); }
.chan.hub-ch .name { font-weight: 600; }
/* a room's gear only takes space while you point at it, so its name has room */
.chan.room-ch .cog { display: none; }
.chan.room-ch:hover .cog { display: grid; }
.chan.room-ch .vlimit { font-size: 11px; padding: 1px 5px; }
.chan.room-ch .ico { opacity: .8; }
.room-owner { display: flex; align-items: center; gap: 8px; color: var(--text-2); margin-bottom: 4px; }
.ts-chip { background: var(--bg3); border-radius: 5px; padding: 0 5px; font-weight: 600; }

/* ---------- free games ---------- */
.fg-card { margin-top: 4px; display: grid; grid-template-columns: 260px 1fr; max-width: 640px; border-radius: 14px; overflow: hidden; text-decoration: none; color: var(--text); background: var(--bg2); border: 1px solid var(--line); transition: border-color .12s; }
.fg-card:hover { border-color: color-mix(in srgb, var(--green) 50%, var(--line)); }
.fg-pic { position: relative; background: var(--bg3); aspect-ratio: 16 / 9; }
.fg-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fg-free { position: absolute; top: 8px; left: 8px; background: var(--green); color: #06210f; font-weight: 900; font-size: 12px; letter-spacing: .08em; padding: 3px 8px; border-radius: 6px; }
.fg-body { padding: 10px 14px 12px; display: grid; gap: 5px; align-content: start; min-width: 0; }
.fg-stores { display: flex; gap: 5px; flex-wrap: wrap; }
.fg-store { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 5px; background: var(--bg3); color: var(--text-2); }
.fg-store.epic { background: #2a2a2a; color: #fff; } .fg-store.steam { background: #1b2838; color: #66c0f4; } .fg-store.gog { background: #3d1a5b; color: #d9b8ff; }
.fg-title { font-size: 16px; line-height: 1.25; }
.fg-desc { font-size: 13px; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fg-meta { display: flex; gap: 10px; flex-wrap: wrap; font-size: 12.5px; align-items: center; }
.fg-worth s { color: var(--muted); } .fg-worth { font-weight: 700; color: var(--green-t); }
.fg-ends { color: var(--muted); } .fg-ends.soon { color: var(--yellow-t); font-weight: 600; }
.fg-get { justify-self: start; margin-top: 2px; }
@media (max-width: 640px) { .fg-card { grid-template-columns: 1fr; } }

/* ---------- game night planner ---------- */
.plan-card { margin-top: 4px; max-width: 600px; border-radius: 16px; border: 1px solid var(--line); background: var(--bg2); padding: 14px 16px; display: grid; gap: 10px; }
.plan-card.st-set { border-color: color-mix(in srgb, var(--green) 45%, var(--line)); }
.plan-head { display: flex; gap: 12px; align-items: center; }
.plan-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-t); flex: none; }
.plan-title { font-family: Bricolage, Inter, sans-serif; font-size: 17px; letter-spacing: -.01em; }
.plan-on { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--green) 12%, var(--bg1)); }
.plan-on-kicker { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--green-t); }
.plan-on b { font-size: 18px; }
.plan-note { padding: 4px 2px; }
.plan-slots { display: grid; gap: 6px; }
.plan-slot { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--bg1); border: 1px solid transparent; }
.plan-slot.best { border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.plan-slot.picked { border-color: var(--green); background: color-mix(in srgb, var(--green) 8%, var(--bg1)); }
.plan-time { display: grid; gap: 5px; min-width: 0; }
.plan-time b { font-size: 14px; }
.plan-best { font-size: 11.5px; font-weight: 700; color: var(--accent-t); }
.plan-bar { height: 6px; border-radius: 99px; background: var(--bg3); overflow: hidden; }
.plan-bar span { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width .2s; }
.plan-who { display: flex; align-items: center; gap: 2px; }
.plan-who .avatar { margin-right: -6px; border: 2px solid var(--bg1); }
.plan-who .muted { margin-left: 12px; white-space: nowrap; }
.plan-btns { grid-column: 1 / -1; display: flex; gap: 6px; flex-wrap: wrap; }
.plan-vote { border: 1px solid var(--line); background: var(--bg2); color: var(--text-2); border-radius: 999px; padding: 5px 12px; font-weight: 600; font-size: 13px; cursor: pointer; }
.plan-vote.yes.on { background: color-mix(in srgb, var(--green) 18%, var(--bg2)); border-color: var(--green); color: var(--text); }
.plan-vote.maybe.on { background: color-mix(in srgb, var(--yellow) 16%, var(--bg2)); border-color: var(--yellow); color: var(--text); }
.plan-foot { display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.plan-form .plan-slots { margin: 4px 0; }
.plan-slot-edit { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 10px; background: var(--bg1); color: var(--muted); }
.plan-slot-edit input { width: auto; }
.plan-quick { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }

/* ---------- raid protection ---------- */
.raid-card { margin-top: 4px; max-width: 600px; border-radius: 14px; border: 1px solid color-mix(in srgb, var(--red) 45%, var(--line)); background: color-mix(in srgb, var(--red) 6%, var(--bg2)); padding: 12px 14px; display: grid; gap: 10px; }
.raid-card.ended { border-color: var(--line); background: var(--bg2); }
.raid-head { display: flex; gap: 10px; align-items: center; }
.raid-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--red) 18%, transparent); color: var(--red-t); flex: none; }
.raid-card.ended .raid-ic { background: var(--bg3); color: var(--muted); }
.raid-people { display: flex; flex-wrap: wrap; gap: 6px; }
.raid-person { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 3px; border-radius: 999px; background: var(--bg1); font-size: 13px; }
.raid-card .row { justify-content: flex-start; }
.raid-banner { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--red) 12%, var(--bg1)); color: var(--text); margin: 8px 0; }
.raid-trigger { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.raid-trigger select { width: auto; }

/* ---------- seasonal colors: the whole app dresses up (Settings → Appearance → Seasonal colors) ---------- */
:root[data-scolor="halloween"] {
  --bg0: #0c0810; --bg1: #130d19; --bg2: #191220; --bg3: #24192f; --bg4: #33243f;
  --line: #2c2138; --text: #f1e9de; --text-2: #d6c9bb; --muted: #9a8ba8;
  --hover: rgba(255, 140, 60, .05); --mention-bg: rgba(255, 117, 24, .1); --code-bg: #0c0810;
  --green: #8bd450; --yellow: #ffb238; --blue: #b48cff;
}
:root[data-theme="light"][data-scolor="halloween"] {
  --bg0: #eadfd2; --bg1: #f6eee4; --bg2: #fffaf3; --bg3: #f1e4d4; --bg4: #e2cfba;
  --line: #e3d3c0; --text: #2a1b10; --text-2: #4a3424; --muted: #7d6656; --hover: rgba(120, 60, 0, .05); --mention-bg: rgba(255, 117, 24, .14); --code-bg: #f6eee4;
  --blue: #7b4fd6; --green: #3f9a2f;
}
:root[data-scolor="halloween"] .chat { background: radial-gradient(1200px 380px at 50% 112%, rgba(120, 50, 200, .16), transparent 70%), var(--bg2); }
:root[data-scolor="halloween"] .sidebar { background: linear-gradient(180deg, var(--bg1) 70%, color-mix(in srgb, #6b2bd9 10%, var(--bg1))); }
:root[data-scolor="halloween"] .btn.primary { background: linear-gradient(180deg, #ff8a2e, #ff6a00); box-shadow: 0 2px 12px -4px rgba(255, 110, 0, .6); }
:root[data-scolor="halloween"] .rail-btn:hover, :root[data-scolor="halloween"] .rail-btn.active { box-shadow: 0 0 0 2px var(--accent), 0 0 16px -2px rgba(255, 117, 24, .5); }
:root[data-scolor="halloween"] .msg.mentioned { box-shadow: inset 3px 0 0 var(--accent); }
:root[data-scolor="halloween"] .chan.active { background: color-mix(in srgb, #8a4fff 18%, var(--bg3)); }
:root[data-scolor="halloween"] ::-webkit-scrollbar-thumb { background: #3d2a52; background-clip: padding-box; }
:root[data-scolor="halloween"] .composer-row { background: color-mix(in srgb, #6b2bd9 8%, var(--bg3)); }
:root[data-scolor="halloween"] .composer-row:focus-within { border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
:root[data-scolor="halloween"] .modal-card { box-shadow: 0 20px 60px -10px rgba(0, 0, 0, .7), 0 0 0 1px #2c2138, 0 0 50px -20px rgba(140, 70, 255, .45); }

:root[data-scolor="winter"] {
  --bg0: #08101c; --bg1: #0d1726; --bg2: #121e30; --bg3: #1a2940;
  --bg4: #253854; --line: #1f3048; --text: #eaf3fb; --text-2: #c6d6e6; --muted: #8aa2bb;
  --hover: rgba(160, 210, 255, .05); --mention-bg: rgba(94, 200, 255, .1); --code-bg: #08101c;
  --red: #ff5f6d; --yellow: #ffd479; --blue: #8fd3ff;
}
:root[data-theme="light"][data-scolor="winter"] {
  --bg0: #dce8f3; --bg1: #edf4fa; --bg2: #ffffff; --bg3: #e3edf6; --bg4: #cddcea;
  --line: #d4e1ed; --text: #13202d; --text-2: #2f4255; --muted: #5d7287; --hover: rgba(0, 60, 120, .04); --mention-bg: rgba(40, 150, 220, .12); --code-bg: #edf4fa;
}
:root[data-scolor="winter"] .chat { background: radial-gradient(1000px 300px at 50% -10%, rgba(140, 210, 255, .1), transparent 70%), var(--bg2); }
:root[data-scolor="winter"] .rail { background: linear-gradient(180deg, color-mix(in srgb, #3de0b0 10%, var(--bg0)), var(--bg0) 30%, var(--bg0) 60%, color-mix(in srgb, #7c5cff 14%, var(--bg0))); }
:root[data-scolor="winter"] .btn.primary { background: linear-gradient(180deg, #7fd6ff, #3fb4f5); box-shadow: 0 2px 12px -4px rgba(80, 190, 255, .6); }
:root[data-scolor="winter"] .rail-btn:hover, :root[data-scolor="winter"] .rail-btn.active { box-shadow: 0 0 0 2px var(--accent), 0 0 16px -2px rgba(94, 200, 255, .5); }
:root[data-scolor="winter"] .chan.active { background: color-mix(in srgb, #5ec8ff 14%, var(--bg3)); }
:root[data-scolor="winter"] .msg.mentioned { box-shadow: inset 3px 0 0 var(--accent); }
:root[data-scolor="winter"] .chat-head { box-shadow: inset 0 -1px 0 rgba(200, 235, 255, .2), 0 6px 18px -12px rgba(160, 220, 255, .35); }
:root[data-scolor="winter"] .modal-card { box-shadow: 0 20px 60px -10px rgba(0, 0, 0, .6), 0 0 0 1px #1f3048, inset 0 1px 0 rgba(220, 240, 255, .12); }
:root[data-scolor="winter"] ::-webkit-scrollbar-thumb { background: #2a4362; background-clip: padding-box; }

/* service status in the front page's top bar (and the footer), live */
.lp-bar-r { display: flex; align-items: center; gap: 6px; }
.lp-status-top { padding: 7px 12px; border-radius: 999px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); font-size: 13.5px; }
.lp-status-top:hover { background: rgba(255, 255, 255, .1); }
.lp-status[data-state="degraded"] .lp-dot, .lp-status[data-state="maint"] .lp-dot { background: #f2c14e; box-shadow: 0 0 0 3px rgba(242, 193, 78, .22); }
.lp-status[data-state="down"] .lp-dot { background: #f05d5e; box-shadow: 0 0 0 3px rgba(240, 93, 94, .25); }
.lp-status[data-state="unknown"] .lp-dot { background: #8e939b; box-shadow: none; }
.lp-status[data-state="up"] .lp-dot { animation: lp-pulse 2.6s ease-in-out infinite; }
@keyframes lp-pulse { 50% { box-shadow: 0 0 0 6px rgba(62, 207, 142, 0); } }
@media (prefers-reduced-motion: reduce) { .lp-status .lp-dot { animation: none !important; } }
@media (max-width: 560px) { .lp-status-top { padding: 7px 11px; gap: 7px; } }
.lp-skip { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.lp-skip input { accent-color: #ffb35c; width: 15px; height: 15px; }
a.menu-item { text-decoration: none; }

/* ---------- the front page in season ---------- */
.lp-season-tag { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 16px; padding: 6px 12px; border-radius: 999px; font-size: 14px; font-weight: 600; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12); color: #f3ead6; }
.lp-season-tag.hidden { display: none; }
/* Halloween: a purple night, an orange moon, glowing jack-o'-lanterns, bats */
.lp-s-halloween { --lp-lantern: #ff8a2e; }
.lp-s-halloween #lpSky stop:first-child { stop-color: #140b22; }
.lp-s-halloween #lpSky stop:last-child { stop-color: #2e1a44; }
.lp-s-halloween .lp-hero { background: #140b22; }
.lp-s-halloween #lpGlow stop:first-child { stop-color: #ff7a1a; }
.lp-s-halloween .lp-moon { fill: #ffcf8a; filter: drop-shadow(0 0 18px rgba(255, 160, 60, .55)); }
.lp-s-halloween .lp-trees { fill: #120d18; }
.lp-s-halloween .lp-btn.primary { background: linear-gradient(180deg, #ff9a3c, #ff6f0f); color: #1a0b00; }
.lp-s-halloween .lp-season-tag { background: rgba(255, 122, 26, .14); border-color: rgba(255, 122, 26, .35); }
.lp-s-halloween .lp-face { animation: lp-flicker 3.4s ease-in-out infinite; }
.lp-s-halloween .lp-pumpkin:nth-child(2) .lp-face { animation-delay: -1.3s; }
.lp-s-halloween .lp-pumpkin:nth-child(3) .lp-face { animation-delay: -2.1s; }
@keyframes lp-flicker { 0%, 100% { opacity: 1; } 40% { opacity: .75; } 45% { opacity: .95; } 70% { opacity: .82; } }
.lp-bat > path { transform-box: fill-box; transform-origin: center; animation: lp-bat-flap .32s ease-in-out infinite alternate, lp-bat-drift 9s ease-in-out infinite alternate; animation-delay: calc(var(--i) * -.1s), calc(var(--i) * -2.3s); }
@keyframes lp-bat-flap { to { transform: scaleY(.45); } }
@keyframes lp-bat-drift { 0% { translate: 0 0; } 50% { translate: 24px -10px; } 100% { translate: -18px 8px; } }
[class*="lp-s-"] .lp-status-top { backdrop-filter: blur(4px); }
/* winter: an icy night, snow on the roof and hills, snow falling */
.lp-s-winter #lpSky stop:first-child { stop-color: #0b1830; }
.lp-s-winter #lpSky stop:last-child { stop-color: #27446e; }
.lp-s-winter .lp-hero { background: #0b1830; }
.lp-s-winter .lp-trees { fill: #18323a; }
.lp-s-winter .lp-season-tag { background: rgba(140, 210, 255, .12); border-color: rgba(140, 210, 255, .3); }
.lp-snowfall { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.lp-snowfall i { position: absolute; top: -10px; border-radius: 50%; background: #fff; opacity: .7; animation: lp-snow linear infinite; }
@keyframes lp-snow { to { transform: translateY(110vh); } }
@media (prefers-reduced-motion: reduce) { .lp-bat > path, .lp-face, .lp-snowfall i { animation: none !important; } .lp-snowfall { display: none; } }
.lp-s-halloween .lp-hill-far { fill: #2a1a3d; }
.lp-s-winter .lp-hill-far { fill: #2a4568; }

/* ---------- seasonal: pumpkins / snowflakes all over ---------- */
:root[data-season="halloween"] { --sx: "🎃"; --sx-row: "🎃  🍂  🕯️  🍂  🎃"; }
:root[data-season="winter"] { --sx: "❄️"; --sx-row: "❄️  ☃️  ❄️  ⛄  ❄️"; }
/* category headers in the channel list and member list */
:root[data-season] .channels .cat-name::before, :root[data-season] #members .cat-name::before { content: var(--sx); margin-right: 6px; font-size: 11px; letter-spacing: 0; }
/* date dividers in chat, and the NEW line */
:root[data-season] .day-t::before { content: var(--sx); margin-right: 6px; }
:root[data-season] .day-t::after { content: var(--sx); margin-left: 6px; }
:root[data-season] .new-line::after { content: var(--sx); margin-left: 2px; font-size: 11px; }
/* a little patch at the end of the channel list and the member list */
:root[data-season] .channels::after, :root[data-season] #members::after { content: var(--sx-row); display: block; text-align: center; padding: 18px 0 6px; font-size: 15px; letter-spacing: 2px; opacity: .75; white-space: pre; }
/* Keeper wears the season */
:root[data-season] .avatar.bot-av::after, :root[data-season] .keeper-av-wrap::after { content: var(--sx); position: absolute; top: -9px; right: -7px; font-size: 15px; line-height: 1; filter: drop-shadow(0 1px 1px rgba(0,0,0,.5)); }
/* every other server icon gets one too */
:root[data-season] #serverIcons > .rail-btn:nth-child(odd)::after { content: var(--sx); position: absolute; top: -6px; right: -6px; font-size: 13px; line-height: 1; filter: drop-shadow(0 1px 1px rgba(0,0,0,.6)); pointer-events: none; }
/* empty spots get a big faint one */
:root[data-season] .empty-card::before { content: var(--sx); display: block; font-size: 30px; margin-bottom: 6px; opacity: .8; }
/* Halloween: a spider dangling from the server header */
:root[data-season="halloween"] .sidebar-head::after { content: "🕷️"; position: absolute; right: 54px; top: 100%; font-size: 14px; line-height: 1; padding-top: 18px; background: linear-gradient(#cfc6da, #cfc6da) top center / 1px 18px no-repeat; transform-origin: top center; animation: sx-spider 4.5s ease-in-out infinite; pointer-events: none; z-index: 3; opacity: .85; }
@keyframes sx-spider { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(10px); } }
/* winter: icicles under the top bar and snow piled on your user bar */
:root[data-season="winter"] .chat-head { position: relative; }
:root[data-season="winter"] .chat-head::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 9px; pointer-events: none; z-index: 3; opacity: .55;
  background: conic-gradient(from 165deg at 50% 0, #dff1ff 0 30deg, transparent 30deg) 0 0 / 16px 9px repeat-x, conic-gradient(from 170deg at 50% 0, #dff1ff 0 20deg, transparent 20deg) 8px 0 / 23px 6px repeat-x; }
:root[data-season="winter"] .me { position: relative; }
:root[data-season="winter"] .me::before { content: ""; position: absolute; left: 0; right: 0; top: -6px; height: 10px; pointer-events: none;
  background: radial-gradient(10px 7px at 10px 7px, #eef6ff 98%, transparent) 0 0 / 22px 10px repeat-x, radial-gradient(14px 8px at 14px 8px, #e6f1fd 98%, transparent) 9px 1px / 31px 10px repeat-x; opacity: .9; }
:root[data-theme="light"][data-season="winter"] .me::before, :root[data-theme="light"][data-season="winter"] .chat-head::after { filter: drop-shadow(0 1px 1px rgba(60, 110, 160, .35)); }
@media (prefers-reduced-motion: reduce) { :root[data-season] .sidebar-head::after { animation: none; } }

/* the moon sits in the page (not the scene), so wide screens never push it under the top bar */
.lp-moon-wrap { position: absolute; top: clamp(92px, 13vh, 150px); right: clamp(28px, 11vw, 240px); width: clamp(56px, 5.5vw, 92px); height: auto; z-index: 0; pointer-events: none; overflow: visible; }
@media (max-width: 760px) { .lp-moon-wrap { top: 84px; right: 18px; width: 44px; } }

/* ---------- game server cards (/server) ---------- */
.gs-card { margin-top: 4px; max-width: 520px; min-width: 0; grid-template-columns: minmax(0, 1fr); border-radius: 14px; border: 1px solid var(--line); background: var(--bg2); padding: 12px 14px; display: grid; gap: 10px; border-left: 4px solid var(--green); }
.gs-card.down { border-left-color: var(--red); }
.gs-head { display: flex; gap: 12px; align-items: center; }
.gs-pic { width: 44px; height: 44px; border-radius: 10px; background: var(--bg3); display: grid; place-items: center; font-size: 22px; flex: none; overflow: hidden; }
.gs-pic img { width: 100%; height: 100%; image-rendering: pixelated; }
.gs-words { flex: 1; min-width: 0; }
.gs-name { display: block; font-family: Bricolage, Inter, sans-serif; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gs-pill { flex: none; font-size: 12px; font-weight: 800; padding: 3px 10px; border-radius: 999px; background: color-mix(in srgb, var(--green) 18%, transparent); color: var(--green-t); display: inline-flex; align-items: center; gap: 6px; }
.gs-pill::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.gs-card.up .gs-pill::before { animation: gsPulse 2s ease-in-out infinite; }
.gs-card.down .gs-pill { background: color-mix(in srgb, var(--red) 16%, transparent); color: var(--red-t); }
@keyframes gsPulse { 50% { opacity: .35; } }
.gs-players { display: grid; gap: 6px; }
.gs-ptop { display: flex; align-items: baseline; gap: 6px; }
.gs-ptop b { font-size: 20px; font-variant-numeric: tabular-nums; }
.gs-peak { margin-left: auto; }
.gs-bar { height: 7px; border-radius: 99px; background: var(--bg3); overflow: hidden; }
.gs-bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 60%, var(--green))); transition: width .4s; }
.gs-who { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.gs-person { font-size: 12.5px; padding: 2px 9px; border-radius: 999px; background: var(--bg1); }
.gs-foot { display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--line); padding-top: 9px; }
.gs-addr { display: inline-flex; align-items: center; gap: 6px; background: var(--bg1); border: 1px solid var(--line); color: var(--text); padding: 4px 9px; border-radius: 8px; cursor: pointer; max-width: 60%; }
.gs-addr code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; }
.gs-addr:hover { border-color: var(--accent); }
.gs-refresh { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 5px; border-radius: 8px; display: grid; }
.gs-refresh:hover { color: var(--text); background: var(--bg3); }
.gs-refresh.spin svg { animation: gsSpin .8s linear infinite; }
@keyframes gsSpin { to { transform: rotate(360deg); } }

/* ---------- question of the day ---------- */
.qotd-card { margin-top: 4px; max-width: 560px; min-width: 0; border-radius: 16px; padding: 14px 18px 12px; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 16%, var(--bg2)), var(--bg2) 70%); border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line)); display: grid; gap: 6px; }
.qotd-kicker { font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-t); }
.qotd-q { font-family: Bricolage, Inter, sans-serif; font-size: 19px; line-height: 1.3; letter-spacing: -.01em; }

/* ---------- profile badges ---------- */
.pc-badges { display: flex; flex-wrap: wrap; gap: 5px; margin: 6px 0 2px; }
.pc-badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px 3px 6px; border-radius: 999px; background: var(--bg1); border: 1px solid var(--line); font-size: 12px; font-weight: 650; cursor: default; }
.pc-badge .pcb-e { font-size: 13px; line-height: 1; }
.pc-badge.b-staff, .pc-badge.b-owner { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); background: color-mix(in srgb, var(--accent) 10%, var(--bg1)); }
.pc-badge.b-level50, .pc-badge.b-chatter { border-color: color-mix(in srgb, #b98bff 45%, var(--line)); }
.pc-badge[class*="b-halloween"] { border-color: color-mix(in srgb, #ff7518 50%, var(--line)); background: color-mix(in srgb, #ff7518 10%, var(--bg1)); }
.pc-badge[class*="b-winter"] { border-color: color-mix(in srgb, #5ec8ff 50%, var(--line)); background: color-mix(in srgb, #5ec8ff 10%, var(--bg1)); }

/* ---------- entrance sounds, bans ---------- */
.ent-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ent-row select { flex: 1; min-width: 160px; }
.ban-row { align-items: center; }
.ban-until { font-size: 12px; padding: 3px 9px; border-radius: 999px; background: var(--bg3); color: var(--muted); white-space: nowrap; }
.ban-until.temp { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent-t); }
@media (max-width: 600px) { .gs-addr { max-width: 100%; } .gs-foot { flex-wrap: wrap; } .qotd-q { font-size: 17px; } }
@media (prefers-reduced-motion: reduce) { .gs-card.up .gs-pill::before, .gs-refresh.spin svg { animation: none; } }

/* ---------- channel notes ---------- */
.icon-btn.has-dot { position: relative; }
.icon-btn.has-dot::after { content: ''; position: absolute; top: 5px; right: 5px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--bg1); }
.notes-panel { padding: 12px 14px 16px; display: grid; gap: 12px; align-content: start; overflow-y: auto; min-height: 0; }
.notes-body { display: grid; gap: 2px; line-height: 1.5; word-wrap: break-word; overflow-wrap: anywhere; }
.notes-body .nb-h { margin: 10px 0 2px; font-family: Bricolage, Inter, sans-serif; letter-spacing: -.01em; }
.notes-body h3.nb-h { font-size: 18px; } .notes-body h4.nb-h { font-size: 15px; color: var(--text-2); }
.notes-body .nb-h:first-child { margin-top: 0; }
.notes-body .nb-gap { height: 8px; }
.notes-body .nb-list { margin: 2px 0; padding-left: 20px; display: grid; gap: 3px; }
.notes-body .nb-check { list-style: none; margin-left: -20px; display: flex; gap: 8px; align-items: flex-start; }
.notes-body .nb-box { flex: none; width: 16px; height: 16px; margin-top: 3px; border-radius: 4px; border: 1.5px solid var(--muted); display: grid; place-items: center; font-size: 11px; font-weight: 900; }
.notes-body .nb-check.done .nb-box { background: var(--green); border-color: var(--green); color: #06210f; }
.notes-body .nb-check.done > span:last-child { text-decoration: line-through; color: var(--muted); }
.notes-meta { border-top: 1px solid var(--line); padding-top: 8px; }
.notes-empty { display: grid; justify-items: center; text-align: center; gap: 6px; padding: 24px 8px; color: var(--muted); }
.notes-empty b { color: var(--text); }
.notes-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.notes-lock { display: inline-flex; align-items: center; gap: 4px; }
.notes-edit { width: 100%; min-height: 320px; resize: vertical; font: 14px/1.5 ui-monospace, Consolas, monospace; background: var(--bg1); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.notes-edit:focus { outline: none; border-color: var(--accent); }
.notes-version .notes-body { max-height: 55vh; overflow-y: auto; padding: 10px 12px; background: var(--bg1); border-radius: 10px; margin: 8px 0 12px; }

.notes-editor { display: grid; gap: 10px; }
.notes-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.notes-cols .notes-edit { min-height: 52vh; }
.notes-preview { max-height: 52vh; overflow-y: auto; padding: 10px 14px; border-radius: 10px; border: 1px dashed var(--line); background: var(--bg2); }
@media (max-width: 760px) { .notes-cols { grid-template-columns: minmax(0, 1fr); } .notes-cols .notes-edit { min-height: 40vh; } .notes-preview { max-height: 30vh; } }
.modal-card.notes-editor { max-width: 980px; width: min(980px, calc(100vw - 32px)); }

/* ---------- profile card: smaller ---------- */
.modal-card.profile-card { max-width: 400px; }
.profile-card .pc-banner { height: 92px; }
.profile-card .pc-av { margin-top: -44px; border-width: 5px; width: 80px; height: 80px; font-size: 30px; }
.profile-card .pc-body { gap: 8px; padding: 4px 18px 18px; }
.profile-card .pc-name { font-size: 20px; line-height: 1.2; }
.profile-card .pc-body > .cat, .profile-card .pc-note .cat, .profile-card .pc-wall > .cat { padding: 6px 0 0; font-size: 10.5px; }
.profile-card .pc-body .btn:not(.xs):not(.small) { padding-top: 8px; padding-bottom: 8px; }
.profile-card .pc-note-text { min-height: 30px; padding: 5px 8px; }
.profile-card .pc-roles summary { padding: 2px 0; font-size: 12.5px; }
.profile-card .pc-level { padding: 8px 10px; }
.pc-fold { border: 1px solid var(--line); border-radius: 12px; background: var(--bg2); margin-top: 4px; }
.pc-fold > summary { list-style: none; display: flex; align-items: center; gap: 8px; padding: 9px 12px; cursor: pointer; font-size: 13px; font-weight: 700; color: var(--text-2); user-select: none; }
.pc-fold > summary::-webkit-details-marker { display: none; }
.pc-fold > summary:hover { color: var(--text); }
.pc-fold-chev { transition: transform .15s; color: var(--muted); }
.pc-fold[open] .pc-fold-chev { transform: rotate(180deg); }
.pc-fold-flag { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; color: var(--red-t); background: color-mix(in srgb, var(--red) 14%, transparent); }
.pc-fold > .mod-panel { padding: 0 10px 10px; }
.mod-panel.compact { gap: 6px; }
.mod-panel.compact .mod-title { font-size: 10px; margin-top: 4px; }
.mod-panel.compact .mod-list { grid-template-columns: 1fr 1fr; border: 0; background: none; gap: 4px; border-radius: 0; overflow: visible; }
.mod-panel.compact .mod-item { padding: 6px 8px; gap: 8px; border-radius: 9px; border: 1px solid var(--line); background: var(--bg1); }
.mod-panel.compact .mod-item + .mod-item { border-top: 1px solid var(--line); }
.mod-panel.compact .mod-ic { width: 26px; height: 26px; border-radius: 7px; }
.mod-panel.compact .mod-txt b { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mod-panel.compact .mod-chev { margin-left: -4px; }
.mod-panel.compact .mod-item.danger { border-color: color-mix(in srgb, var(--red) 30%, var(--line)); }

/* ---------- member history (mods) ---------- */
.modal-card.mh-modal { max-width: 520px; padding: 0; gap: 12px; overflow-x: hidden; }
.mh-hero { padding: 14px 18px 14px; background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 16%, var(--bg2)), var(--bg1) 85%); border-bottom: 1px solid var(--line); display: grid; gap: 10px; }
.mh-nav { display: flex; align-items: center; gap: 6px; margin: -4px -8px -2px -4px; }
.mh-kicker { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-t); padding-left: 4px; }
.mh-who { display: flex; align-items: center; gap: 12px; }
.mh-name { display: block; font-family: Bricolage, Inter, sans-serif; font-size: 20px; letter-spacing: -.01em; }
.mh-flags { display: flex; flex-wrap: wrap; gap: 6px; }
.mh-flag { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--bg3); color: var(--text-2); }
.mh-flag.warn { background: color-mix(in srgb, var(--yellow) 16%, transparent); color: var(--yellow-t); }
.mh-flag.bad { background: color-mix(in srgb, var(--red) 16%, transparent); color: var(--red-t); }
.mh-flag.good { background: color-mix(in srgb, var(--green) 16%, transparent); color: var(--green-t); }
.mh-compose { margin: 0 18px; display: flex; align-items: flex-end; gap: 8px; padding: 6px 6px 6px 12px; border-radius: 12px; background: var(--bg2); border: 1px solid var(--line); }
.mh-compose:focus-within { border-color: var(--accent); }
.mh-compose-ic { color: var(--muted); flex: none; margin-bottom: 9px; }
.mh-compose textarea { flex: 1; resize: none; border: 0; background: none; color: var(--text); font: inherit; font-size: 14px; padding: 7px 0; min-height: 34px; max-height: 120px; outline: none; }
.mh-send { background: var(--accent); color: var(--on-accent); border-radius: 9px; flex: none; }
.mh-send:hover { background: color-mix(in srgb, var(--accent) 85%, #fff); color: var(--on-accent); }
.mh-modal > .seg { margin: 0 18px; }
.mh-modal > .seg button { padding: 6px 8px; font-size: 13px; }
.mh-list { padding: 0 18px 16px; max-height: 50vh; overflow-y: auto; display: grid; align-content: start; }
.mh-day { font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); padding: 10px 0 4px; }
.mh-item { position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 6px 0; }
.mh-item::before { content: ''; position: absolute; left: 13px; top: 34px; bottom: -6px; width: 2px; background: var(--line); border-radius: 2px; }
.mh-item:has(+ .mh-day)::before, .mh-item:last-child::before { display: none; }
.mh-ic { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--bg3); color: var(--muted); position: relative; z-index: 1; }
.mh-item.t-warn .mh-ic { background: color-mix(in srgb, var(--yellow) 18%, var(--bg1)); color: var(--yellow-t); }
.mh-item.t-bad .mh-ic { background: color-mix(in srgb, var(--red) 18%, var(--bg1)); color: var(--red-t); }
.mh-item.t-note .mh-ic { background: color-mix(in srgb, var(--accent) 22%, var(--bg1)); color: var(--accent-t); }
.mh-main { flex: 1; min-width: 0; padding-top: 4px; }
.mh-item.t-note .mh-main { background: color-mix(in srgb, var(--accent) 8%, var(--bg2)); border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line)); border-radius: 4px 12px 12px 12px; padding: 7px 10px; margin-top: 2px; }
.mh-line { display: flex; flex-wrap: wrap; gap: 5px; align-items: baseline; font-size: 14px; }
.mh-when { margin-left: auto; font-size: 12px; color: var(--muted); white-space: nowrap; }
.mh-status { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--bg3); color: var(--text-2); text-transform: capitalize; }
.mh-text { color: var(--text-2); font-size: 13.5px; white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 1px; }
.mh-del { flex: none; opacity: 0; margin-top: 2px; }
.mh-item:hover .mh-del, .mh-del:focus-visible { opacity: 1; }
.mh-empty { display: grid; justify-items: center; gap: 6px; padding: 28px 0; color: var(--muted); font-size: 13.5px; }
@media (hover: none) { .mh-del { opacity: 1; } }
@media (max-width: 600px) { .mh-hero, .mh-list { padding-left: 14px; padding-right: 14px; } .mh-compose, .mh-modal > .seg { margin: 0 14px; } }
.profile-card .pc-note-text { height: 32px; }

/* ---------- watch a stream from the voice list / profile card ---------- */
.live-watch { border: 0; cursor: pointer; font: inherit; display: inline-flex; gap: 0; overflow: hidden; padding: 0 !important; }
.live-watch span { padding: 1px 6px; }
.live-watch .lw-watch { background: color-mix(in srgb, #000 22%, transparent); display: none; }
.vuser:hover .live-watch .lw-watch, .live-watch:focus-visible .lw-watch { display: inline; }
@media (hover: none) { .live-watch .lw-watch { display: inline; } }
.pc-watch { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border-radius: 12px; cursor: pointer; font: inherit; color: var(--text); text-align: left;
  border: 1px solid color-mix(in srgb, var(--red) 40%, var(--line)); background: color-mix(in srgb, var(--red) 9%, var(--bg2)); }
.pc-watch:hover { background: color-mix(in srgb, var(--red) 15%, var(--bg2)); }
.pc-watch b { color: var(--red-t); }

/* ---------- games on profile cards ---------- */
.game-tile { --gt: #555; flex: none; width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; font-weight: 800; font-size: 15px; color: #fff;
  background: linear-gradient(140deg, color-mix(in srgb, var(--gt) 100%, white 12%), color-mix(in srgb, var(--gt) 75%, black)); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.game-tile.sm { width: 28px; height: 28px; border-radius: 7px; font-size: 12px; }
.game-tile.xs { width: 16px; height: 16px; border-radius: 4px; font-size: 9px; }
.game-chip { padding-left: 4px; }
.pc-games { display: grid; gap: 6px; }
.pc-games .cat { padding-top: 4px; }
.pg-hidden { text-transform: none; letter-spacing: 0; font-weight: 500; }
.pg-list { display: grid; gap: 4px; }
.pg-row { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 9px; background: var(--bg2); border: 1px solid var(--line); }
.pg-row b { font-size: 13.5px; }
.pg-row.now { border-color: color-mix(in srgb, var(--green) 45%, var(--line)); }
.pg-row.now .pg-sub { color: var(--green-t); }
.pg-sub { font-size: 12px; color: var(--muted); }
.pg-more { justify-self: start; font-size: 12.5px; padding: 2px 4px; }

/* ---------- Home → Activity ---------- */
.activity-page { max-width: 980px; }
.act-head { display: flex; align-items: center; gap: 8px; margin: 18px 2px 10px; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.act-head .icon { color: var(--accent-t); }
.act-now { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.act-card { display: grid; gap: 10px; align-content: start; padding: 12px; border-radius: 12px; background: var(--bg2); border: 1px solid var(--line); cursor: pointer; transition: border-color .15s, transform .15s; min-width: 0; }
.act-card:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.act-card.live { border-color: color-mix(in srgb, var(--red) 40%, var(--line)); background: linear-gradient(160deg, color-mix(in srgb, var(--red) 9%, var(--bg2)), var(--bg2) 60%); }
.act-card.playing { background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 7%, var(--bg2)), var(--bg2) 65%); }
.act-card-top { display: flex; align-items: center; gap: 10px; min-width: 0; }
.act-card-top .grow { min-width: 0; }
.act-card-top .sicon.xs { width: 32px; height: 32px; border-radius: 9px; font-size: 11px; }
.act-name { border: 0; background: none; padding: 0; color: var(--text); font: inherit; font-weight: 700; cursor: pointer; }
.act-name:hover { text-decoration: underline; }
.act-sub { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.act-names { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.act-chan { display: flex; align-items: center; gap: 5px; min-width: 0; }
.act-chan b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.act-game { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; background: var(--bg1); min-width: 0; }
.act-game b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.act-tag { font-size: 10.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--green-t); background: color-mix(in srgb, var(--green) 14%, transparent); padding: 2px 6px; border-radius: 5px; }
.act-faces { display: flex; align-items: center; }
.act-faces .avatar { box-shadow: 0 0 0 2px var(--bg2); margin-right: -5px; }
.act-more { margin-left: 10px; font-size: 12px; color: var(--muted); font-weight: 700; }
.act-btns { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.act-btns .btn { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; }
.act-title { font-size: 13px; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.act-timeline { display: grid; border-left: 2px solid var(--line); margin-left: 15px; padding-left: 0; }
.act-day { margin: 10px 0 4px -9px; padding-left: 0; font-size: 12px; font-weight: 700; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.act-day::before { content: ''; width: 16px; height: 16px; border-radius: 50%; background: var(--bg1); border: 2px solid var(--line); flex: none; }
.act-item { position: relative; display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 0; margin-left: -15px; border-radius: 10px; cursor: pointer; }
.act-item:hover { background: var(--hover); }
.act-mark { flex: none; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; background: var(--bg3); color: var(--muted); box-shadow: 0 0 0 3px var(--bg1); }
.act-item.k-level .act-mark { color: var(--yellow-t); background: color-mix(in srgb, var(--yellow) 16%, var(--bg2)); }
.act-item.k-live .act-mark { color: var(--red-t); background: color-mix(in srgb, var(--red) 16%, var(--bg2)); }
.act-text { min-width: 0; font-size: 14px; line-height: 1.4; }
.act-server { display: inline-flex; align-items: center; gap: 5px; border: 0; background: var(--bg3); color: var(--text); font: inherit; font-weight: 600; font-size: 13px; padding: 1px 7px 1px 3px; border-radius: 6px; cursor: pointer; vertical-align: 1px; }
.act-server .sicon.xxs { width: 16px; height: 16px; border-radius: 4px; font-size: 7px; background: var(--bg4); }
.act-link { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.act-time { flex: none; font-size: 12px; color: var(--muted); }
.act-older { margin: 12px auto 0; display: block; }
@media (max-width: 860px) { .act-now { grid-template-columns: 1fr; } .act-time { display: none; } }

/* ---------- catch-up card ---------- */
.catchup { margin: 8px 16px 0; border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line)); border-radius: 12px;
  background: linear-gradient(170deg, color-mix(in srgb, var(--accent) 8%, var(--bg2)), var(--bg2) 70%); box-shadow: 0 4px 18px var(--shadow); flex: none; overflow: hidden; }
.cu-head { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 12px; cursor: pointer; min-width: 0; }
.cu-mark { flex: none; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); }
.cu-title { display: grid; min-width: 0; line-height: 1.25; }
.cu-title b { font-size: 14px; }
.cu-sub { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cu-faces { display: flex; }
.cu-faces .avatar { box-shadow: 0 0 0 2px var(--bg2); margin-left: -4px; }
.cu-body { display: grid; gap: 12px; padding: 4px 12px 12px; max-height: min(46vh, 380px); overflow-y: auto; }
.cu-sec { display: grid; gap: 6px; }
.cu-label { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.cu-msg { display: flex; align-items: center; gap: 10px; text-align: left; border: 1px solid var(--line); background: var(--bg1); color: var(--text); font: inherit; padding: 8px 10px; border-radius: 10px; cursor: pointer; min-width: 0; }
.cu-msg:hover { border-color: var(--accent); }
.cu-msg .grow { min-width: 0; }
.cu-msg b { font-size: 13px; }
.cu-text { font-size: 13.5px; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cu-rx { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; max-width: 40%; }
.cu-pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px; border-radius: 999px; background: var(--bg3); font-size: 12px; font-weight: 700; }
.cu-pill img, .cu-pill .emoji { width: 16px; height: 16px; }
.cu-pics { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; }
.cu-pic { flex: none; width: 92px; height: 70px; padding: 0; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; cursor: pointer; background: var(--bg1); }
.cu-pic:hover { border-color: var(--accent); }
.cu-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cu-linkrow { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cu-link { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 9px; background: var(--bg1); border: 1px solid var(--line); text-decoration: none; color: var(--text); }
.cu-link:hover { border-color: var(--accent); }
.cu-lt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; font-weight: 600; }
.cu-host { flex: none; font-size: 12px; color: var(--muted); }
.cu-by { flex: none; font-size: 12.5px; }
.cu-quiet { font-size: 13px; color: var(--muted); }
@media (max-width: 860px) { .catchup { margin: 6px 8px 0; } .cu-faces, .cu-head .btn { display: none; } .cu-rx { max-width: 34%; } }

/* ---------- /teams ---------- */
.teams-card { margin-top: 4px; max-width: 620px; min-width: 0; display: grid; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--bg2); border: 1px solid var(--line); border-left: 4px solid var(--accent); }
.teams-card.done { border-left-color: var(--bg4); opacity: .85; }
.tm-head { display: flex; align-items: center; gap: 10px; }
.tm-mark { flex: none; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-t); }
.tm-sub { font-size: 12.5px; color: var(--muted); }
.tm-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.tm-team { --tc: var(--accent); display: grid; gap: 4px; align-content: start; padding: 8px 10px 10px; border-radius: 11px; background: var(--bg1); border-top: 3px solid var(--tc); }
.tm-team.t1 { --tc: var(--blue); } .tm-team.t2 { --tc: var(--green); } .tm-team.t3 { --tc: #b98bff; }
.tm-name { display: flex; align-items: center; gap: 6px; font-weight: 800; font-size: 13px; color: var(--tc); margin-bottom: 2px; }
.tm-name .tm-n { margin-left: auto; font-size: 11.5px; color: var(--muted); font-weight: 700; }
.teams-card.done .tm-team { --tc: var(--muted); }
.tm-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.tm-acts .btn { display: inline-flex; align-items: center; gap: 5px; }
.kr-person { display: inline-flex; align-items: center; gap: 7px; border: 0; background: none; color: var(--text); font: inherit; font-size: 13.5px; font-weight: 600; padding: 2px 0; cursor: pointer; min-width: 0; text-align: left; }
.kr-person span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kr-person:hover span { text-decoration: underline; }
.kr-pills { display: flex; flex-wrap: wrap; gap: 4px; }
.kr-pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px; border-radius: 999px; background: var(--bg3); font-size: 12px; font-weight: 700; }
.kr-pill img, .kr-pill .emoji { width: 16px; height: 16px; }

/* ---------- On this day ---------- */
.otd-card { margin-top: 4px; max-width: 560px; min-width: 0; display: grid; gap: 10px; padding: 12px 14px; border-radius: 14px; border: 1px solid color-mix(in srgb, #c98a52 40%, var(--line));
  background: linear-gradient(160deg, color-mix(in srgb, #c98a52 12%, var(--bg2)), var(--bg2) 60%); }
.otd-top { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.otd-years { font-family: Bricolage, Inter, sans-serif; font-size: 18px; font-weight: 800; color: #e2a46d; letter-spacing: -.01em; }
.otd-date { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.otd-by { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.otd-where { font-size: 12.5px; color: var(--muted); }
.otd-text { padding-left: 10px; border-left: 3px solid color-mix(in srgb, #c98a52 50%, var(--line)); }
.otd-imgs { display: grid; gap: 4px; border-radius: 10px; overflow: hidden; max-width: 460px; }
.otd-imgs.n2, .otd-imgs.n4 { grid-template-columns: 1fr 1fr; } .otd-imgs.n3 { grid-template-columns: 1fr 1fr 1fr; }
.otd-imgs img { width: 100%; height: 100%; max-height: 280px; object-fit: cover; display: block; cursor: zoom-in; }
.otd-imgs.n2 img, .otd-imgs.n3 img, .otd-imgs.n4 img { aspect-ratio: 4 / 3; }
.otd-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

/* ---------- weekly recap ---------- */
.recap-card { margin-top: 4px; max-width: 640px; min-width: 0; display: grid; gap: 12px; padding: 14px 16px; border-radius: 16px; border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line));
  background: radial-gradient(420px 140px at 0% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%), var(--bg2); }
.rc-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.rc-kicker { font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-t); }
.rc-range { font-family: Bricolage, Inter, sans-serif; font-size: 17px; font-weight: 700; }
.rc-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.rc-tile { display: grid; gap: 1px; padding: 10px; border-radius: 11px; background: var(--bg1); border: 1px solid var(--line); min-width: 0; }
.rc-tile b { font-size: 20px; font-family: Bricolage, Inter, sans-serif; line-height: 1.15; }
.rc-tile span:last-child { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.rc-ic { color: var(--accent-t); }
.rc-sec { display: grid; gap: 6px; min-width: 0; }
.rc-title { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.rc-msg { display: flex; align-items: center; gap: 10px; text-align: left; border: 1px solid var(--line); background: var(--bg1); color: var(--text); font: inherit; padding: 8px 10px; border-radius: 10px; cursor: pointer; min-width: 0; }
.rc-msg:hover { border-color: var(--accent); }
.rc-msg .grow { min-width: 0; } .rc-msg b { font-size: 13px; }
.rcp-text { font-size: 13.5px; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rc-pics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.rc-pic { padding: 0; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; cursor: pointer; background: var(--bg1); aspect-ratio: 4 / 3; }
.rc-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rc-pic:hover { border-color: var(--accent); }
.rc-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rc-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.rc-rank { width: 20px; text-align: center; }
.rc-num { margin-left: auto; font-size: 12px; color: var(--muted); font-weight: 700; white-space: nowrap; }
.rc-game { font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-note { font-size: 12.5px; color: var(--muted); }
.rc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rc-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 4px; border-radius: 999px; background: var(--bg1); border: 1px solid var(--line); }
.rc-chip b { font-size: 11px; padding: 1px 6px; border-radius: 6px; }
.rc-chip.lv b { color: var(--yellow-t); background: color-mix(in srgb, var(--yellow) 14%, transparent); }
.rc-chip.new b { color: var(--green-t); background: color-mix(in srgb, var(--green) 14%, transparent); }
.rc-when label, .va-row > * { flex: 1; }
.va-row { align-items: flex-end; }
@media (max-width: 600px) { .rc-tiles { grid-template-columns: 1fr 1fr; } .rc-two { grid-template-columns: 1fr; } .rc-pics { grid-template-columns: 1fr 1fr; } }
.otd-imgs.n1 { max-width: 340px; } .otd-imgs.n1 img { max-height: 240px; }

/* ---------- dice (/roll) ---------- */
.dice-card { margin-top: 4px; max-width: 460px; display: grid; gap: 8px; padding: 10px 12px; border-radius: 14px; background: var(--bg2); border: 1px solid var(--line); border-left: 4px solid var(--accent); }
.dice-card.nat20 { border-left-color: var(--yellow); background: linear-gradient(150deg, color-mix(in srgb, var(--yellow) 12%, var(--bg2)), var(--bg2) 60%); }
.dice-card.nat1 { border-left-color: var(--red); }
.dc-top { display: flex; align-items: center; gap: 10px; min-width: 0; }
.dc-top .grow { min-width: 0; }
.dc-mark { font-size: 22px; line-height: 1; }
.dc-line { font-size: 13.5px; color: var(--text-2); overflow-wrap: anywhere; }
.dc-who { border: 0; background: none; padding: 0; font: inherit; font-weight: 700; color: var(--text); cursor: pointer; }
.dc-who:hover { text-decoration: underline; }
.dc-expr { font-family: var(--mono); font-size: 12.5px; padding: 1px 6px; border-radius: 6px; background: var(--bg1); color: var(--accent-2); }
.dc-label { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.dc-total { flex: none; min-width: 52px; height: 52px; padding: 0 10px; border-radius: 14px; display: grid; place-items: center; font-size: 26px; font-weight: 800; background: var(--accent); color: var(--on-accent); box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 35%, transparent); }
.nat20 .dc-total { background: var(--yellow); color: #2a2000; }
.nat1 .dc-total { background: var(--red); color: #fff; }
.dc-dice { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.dc-grp { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.die { min-width: 28px; height: 28px; padding: 0 5px; border-radius: 8px; display: inline-grid; place-items: center; font-weight: 800; font-size: 13.5px; background: var(--bg1); border: 1px solid var(--line); }
.die.max { border-color: var(--accent); color: var(--accent-t); }
.die.min { color: var(--red-t); }
.die.dropped { opacity: .4; text-decoration: line-through; }
.dc-sub { font-size: 11px; color: var(--muted); font-weight: 700; }
.dc-op { color: var(--muted); font-weight: 800; }
.dc-num { font-weight: 800; padding: 0 2px; }
.dc-nat { font-weight: 800; font-size: 13px; letter-spacing: .02em; }
.nat20 .dc-nat { color: var(--yellow-t); } .nat1 .dc-nat { color: var(--red-t); }
.dc-again { justify-self: start; font-size: 12.5px; }
.rolls-list { display: grid; gap: 6px; margin: 6px 0 4px; }
.roll-row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; background: var(--bg2); border: 1px solid var(--line); }
.roll-row .grow { display: flex; align-items: center; gap: 8px; min-width: 0; }
.roll-add { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 10px; }
.roll-add > *, .init-form > * { min-width: 0; }
.roll-add input, .init-form input, .init-form select { width: 100%; box-sizing: border-box; }
@media (max-width: 560px) { .roll-add { grid-template-columns: 1fr; } }

/* ---------- initiative tracker ---------- */
.init-card { margin-top: 4px; max-width: 560px; min-width: 0; display: grid; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--bg2); border: 1px solid var(--line); border-left: 4px solid var(--accent); }
.init-card.done { border-left-color: var(--bg4); opacity: .85; }
.in-head { display: flex; align-items: center; gap: 10px; }
.in-mark { flex: none; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--accent-soft); font-size: 16px; }
.in-sub { font-size: 12.5px; color: var(--muted); }
.in-round { flex: none; font-size: 12px; font-weight: 800; padding: 3px 10px; border-radius: 999px; background: var(--accent); color: var(--on-accent); }
.in-list { display: grid; gap: 4px; }
.in-empty { padding: 6px 2px; }
.in-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 10px; background: var(--bg1); border: 1px solid transparent; min-width: 0; }
.in-row.now { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--bg1)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent); }
.in-row.down { opacity: .5; }
.in-row.down .in-name { text-decoration: line-through; }
.in-init { flex: none; min-width: 32px; height: 28px; border-radius: 8px; display: grid; place-items: center; font-weight: 800; background: var(--bg3); font-variant-numeric: tabular-nums; }
.in-init.click, .in-name.click { cursor: pointer; }
.in-init.click:hover { outline: 2px solid var(--accent); }
.in-who { display: flex; align-items: center; gap: 7px; min-width: 0; }
.in-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.in-name.click:hover { text-decoration: underline; }
.in-npc { font-size: 15px; width: 20px; text-align: center; }
.in-turn { flex: none; font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; padding: 2px 7px; border-radius: 999px; background: var(--accent); color: var(--on-accent); }
.in-hp { flex: none; display: flex; align-items: center; gap: 6px; border: 0; background: transparent; padding: 3px 4px; border-radius: 8px; cursor: pointer; color: var(--text); font: inherit; }
.in-hp:hover:not(:disabled) { background: var(--bg3); }
.in-hp:disabled { cursor: default; }
.in-bar { width: 64px; height: 7px; border-radius: 999px; background: var(--bg3); overflow: hidden; }
.in-fill { display: block; height: 100%; border-radius: inherit; background: var(--green); transition: width .3s; }
.in-fill.mid { background: var(--yellow); } .in-fill.low { background: var(--red); }
.in-hpn { font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; min-width: 44px; text-align: right; }
.in-gap { width: 32px; flex: none; }
.in-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.in-acts .btn { display: inline-flex; align-items: center; gap: 4px; }
.btn.danger-text { color: var(--red-t); }
.hp-pop { display: grid; gap: 8px; padding: 12px; width: 220px; }
.hp-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.init-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
@media (max-width: 560px) { .init-form { grid-template-columns: 1fr; } .in-bar { width: 40px; } }

/* ---------- daily word ---------- */
.word-card { margin-top: 4px; max-width: 520px; display: grid; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--bg2); border: 1px solid var(--line); border-left: 4px solid var(--accent); }
.wg-head { display: flex; align-items: center; gap: 10px; }
.wg-head .btn { display: inline-flex; align-items: center; gap: 4px; }
.wg-mark { flex: none; display: grid; grid-template-columns: 1fr 1fr; gap: 2px; width: 30px; height: 30px; }
.wg-mark span { display: grid; place-items: center; font-size: 8px; font-weight: 900; border-radius: 3px; background: var(--bg4); color: var(--text); }
.wg-mark span:nth-child(1), .wg-mark span:nth-child(4) { background: var(--accent); color: var(--on-accent); }
.wg-mark span:nth-child(2) { background: var(--blue); color: #fff; }
.wg-sub { font-size: 12.5px; color: var(--muted); }
.wg-list { display: grid; gap: 4px; }
.wg-row { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 10px; background: var(--bg1); min-width: 0; }
.wg-row.lost { opacity: .7; }
.wg-rank { width: 18px; flex: none; text-align: center; }
.wg-who { display: flex; align-items: center; gap: 7px; min-width: 0; flex: 1; border: 0; background: none; padding: 0; font: inherit; font-weight: 700; color: var(--text); cursor: pointer; text-align: left; }
.wg-who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wg-who:hover span { text-decoration: underline; }
.wg-mini { display: grid; gap: 1.5px; flex: none; }
.wg-mini div { display: flex; gap: 1.5px; }
.wg-mini i { width: 7px; height: 7px; border-radius: 1.5px; background: var(--bg4); }
.wg-mini i.c1 { background: var(--blue); } .wg-mini i.c2 { background: var(--accent); }
.wg-score { flex: none; font-variant-numeric: tabular-nums; min-width: 30px; text-align: right; }
.wg-streak { flex: none; font-size: 12px; font-weight: 700; color: var(--muted); }
.word-modal { max-width: 440px; }
.wg-board { display: grid; gap: 6px; justify-content: center; margin: 4px 0 12px; }
.wg-line { display: grid; grid-template-columns: repeat(5, 52px); gap: 6px; }
.wg-tile { height: 52px; display: grid; place-items: center; font-size: 24px; font-weight: 800; border-radius: 10px; border: 2px solid var(--line); background: var(--bg1); text-transform: uppercase; user-select: none; }
.wg-tile.typed { border-color: var(--muted); animation: wg-pop .1s ease-out; }
.wg-tile.c0 { background: var(--bg4); border-color: var(--bg4); color: var(--text-2); }
.wg-tile.c1 { background: var(--blue); border-color: var(--blue); color: #fff; }
.wg-tile.c2 { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.wg-line.flip .wg-tile { animation: wg-flip .45s ease-out both; animation-delay: calc(var(--i) * .12s); }
.wg-line.shake { animation: wg-shake .35s; }
@keyframes wg-pop { from { transform: scale(1.08); } }
@keyframes wg-flip { 0% { transform: rotateX(90deg); } 100% { transform: rotateX(0); } }
@keyframes wg-shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
@media (prefers-reduced-motion: reduce) { .wg-line.flip .wg-tile, .wg-line.shake, .wg-tile.typed { animation: none; } }
.wg-keys { display: grid; gap: 6px; }
.wg-krow { display: flex; justify-content: center; gap: 5px; }
.wg-key { flex: 1; max-width: 40px; height: 48px; border: 0; border-radius: 8px; background: var(--bg3); color: var(--text); font: inherit; font-weight: 800; font-size: 14px; cursor: pointer; display: grid; place-items: center; touch-action: manipulation; }
.wg-key.wide { max-width: 64px; flex: 1.5; font-size: 12px; }
.wg-key:hover { filter: brightness(1.15); }
.wg-key.c0 { background: var(--bg1); color: var(--muted); }
.wg-key.c1 { background: var(--blue); color: #fff; }
.wg-key.c2 { background: var(--accent); color: var(--on-accent); }
.wg-help { text-align: center; margin-top: 10px; }
.wg-result { display: grid; gap: 10px; justify-items: stretch; }
.wg-big { font-size: 20px; font-weight: 800; text-align: center; }
.wg-answer { text-align: center; color: var(--muted); font-weight: 700; letter-spacing: .08em; }
.wg-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.wg-stats div { display: grid; justify-items: center; padding: 8px 4px; border-radius: 10px; background: var(--bg2); }
.wg-stats b { font-size: 20px; }
.wg-stats span { font-size: 11.5px; color: var(--muted); }
.wg-dist { display: grid; gap: 4px; }
.wg-drow { display: flex; align-items: center; gap: 6px; }
.wg-dn { width: 12px; font-weight: 700; font-size: 12.5px; color: var(--muted); }
.wg-dbar { display: block; text-align: right; padding: 1px 8px; border-radius: 6px; background: var(--bg4); font-weight: 800; font-size: 12.5px; }
.wg-dbar.me { background: var(--accent); color: var(--on-accent); }
.wg-next { text-align: center; }
@media (max-width: 420px) { .wg-line { grid-template-columns: repeat(5, 46px); } .wg-tile { height: 46px; } .wg-key { height: 44px; } .wg-krow { gap: 4px; } }

/* ---------- down to play ---------- */
.pc-dtp { display: grid; gap: 8px; padding: 10px 12px; border-radius: 12px; background: linear-gradient(150deg, color-mix(in srgb, var(--accent) 14%, var(--bg2)), var(--bg2) 70%); border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line)); }
.pcd-top { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pcd-top .grow { min-width: 0; display: grid; }
.pcd-top .grow b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcd-kicker { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: var(--accent-t); }
.pcd-sub { font-size: 12px; color: var(--muted); }
.pcd-note { font-size: 13px; color: var(--text-2); }
.dtp-faces { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.dtp-faces .avatar { margin-right: -2px; }
.dtp-faces .muted { margin-left: 6px; }
.act-card.dtp { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 12%, var(--bg2)), var(--bg2) 65%); }
.act-tag.dtp-tag { background: var(--accent); color: var(--on-accent); }
.m-sub.m-dtp { color: var(--text); }
.m-sub.m-dtp svg, .m-sub.m-playing svg { display: inline-block; }
.m-sub.m-dtp svg { color: var(--accent-t); vertical-align: -2px; }
.dtp-now { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; background: var(--bg2); border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--line)); margin-bottom: 4px; }
.dtp-chips { margin-top: -4px; }
.dtp-durs button { flex: 1 1 auto; }

/* ---------- streamer mode ---------- */
body.streamer .sm-private { filter: blur(7px); user-select: none; pointer-events: none; }
body.streamer input.sm-private { pointer-events: none; }
.streamer-pill { position: fixed; bottom: 66px; left: 82px; z-index: 90; display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--accent) 50%, transparent); background: color-mix(in srgb, var(--accent) 18%, var(--bg1)); color: var(--text); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; box-shadow: 0 6px 20px #0006; }
.streamer-pill svg { color: var(--accent-t); }
.streamer-pill:hover { background: var(--accent); color: var(--on-accent); }
.streamer-pill:hover svg { color: inherit; }
@media (max-width: 860px) { .streamer-pill { left: 12px; bottom: 132px; } }

/* ---------- outbox (send while offline) ---------- */
.outbox { padding-bottom: 6px; }
.ob-msg { opacity: .62; }
.ob-msg.fail { opacity: 1; }
.ob-msg.fail .text { color: var(--muted); }
.ob-state { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; font-size: 12px; color: var(--muted); font-weight: 600; }
.ob-msg.fail .ob-state { color: var(--red-t); }
.ob-acts { display: flex; gap: 12px; margin-top: 2px; }
.ob-acts .link-btn { font-size: 12.5px; }

/* hover card on a server in the rail: name + who's in voice */
.rail-card { position: fixed; z-index: 9999; pointer-events: none; min-width: 170px; max-width: 260px; display: grid; gap: 8px; padding: 9px 12px; border-radius: 10px; background: var(--bg0); color: var(--text); border: 1px solid var(--line); box-shadow: 0 10px 28px rgba(0,0,0,.4); font-size: 13px; animation: tip-in .12s ease-out; }
.rail-card::before { content: ""; position: absolute; left: -5px; top: calc(var(--arrow-y, 50%) - 4px); width: 8px; height: 8px; background: inherit; border: inherit; border-width: 0 0 1px 1px; transform: rotate(45deg); }
.rc2-name { font-size: 13.5px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc2-room { display: grid; gap: 4px; padding-top: 6px; border-top: 1px solid var(--line); }
.rc2-chan { display: flex; align-items: center; gap: 5px; color: var(--green-t); font-weight: 700; font-size: 12px; }
.rc2-chan span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc2-n { margin-left: auto; color: var(--muted); font-size: 11.5px; }
.rc2-user { display: flex; align-items: center; gap: 7px; padding-left: 2px; color: var(--text-2); font-weight: 600; min-width: 0; }
.rc2-user .grow { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc2-more { font-size: 11.5px; color: var(--muted); padding-left: 2px; }
.mention[data-user] { cursor: pointer; }

/* ---------- shop & coins ---------- */
.shop-modal { max-width: 620px; }
.shop-hero { display: flex; align-items: center; gap: 16px; padding: 14px 16px; border-radius: 14px; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 20%, var(--bg2)), var(--bg2) 70%); border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line)); margin-bottom: 4px; }
.shop-bal { display: flex; align-items: baseline; gap: 8px; }
.shop-bal b { font-size: 32px; font-weight: 800; line-height: 1; }
.shop-bal span:last-child { color: var(--muted); font-weight: 700; }
.shop-emoji { font-size: 26px; }
.shop-side { display: grid; gap: 2px; margin-left: auto; text-align: right; }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.shop-item { display: grid; gap: 8px; align-content: start; padding: 12px; border-radius: 12px; background: var(--bg2); border: 1px solid var(--line); }
.shop-item.owned { border-color: color-mix(in srgb, var(--green) 45%, var(--line)); }
.shop-top { display: flex; align-items: center; gap: 6px; font-weight: 800; font-size: 15px; }
.shop-prev { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 8px; background: var(--bg1); font-weight: 700; font-size: 13px; }
.shop-foot { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.shop-price { font-variant-numeric: tabular-nums; }
.shop-owned { font-size: 12px; font-weight: 800; color: var(--green-t); }
.shop-color { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; background: var(--bg2); border: 1px solid var(--line); flex-wrap: wrap; }
.shop-color input[type=color] { width: 46px; height: 46px; border: 0; border-radius: 10px; padding: 0; background: none; cursor: pointer; }
.shop-cprev { font-weight: 800; font-size: 16px; }
.shop-cacts { display: flex; gap: 6px; }
.shop-hist { margin-top: 6px; }
.shop-hist summary { cursor: pointer; color: var(--muted); font-weight: 700; font-size: 13px; padding: 4px 0; }
.shop-hrow { display: flex; align-items: center; gap: 10px; padding: 4px 2px; font-size: 13px; }
.shop-hrow .plus { color: var(--green-t); } .shop-hrow .minus { color: var(--red-t); }
.shop-edit { display: grid; gap: 6px; }
.shop-erow { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.shop-erow select { min-width: 140px; }
.shop-erow input[type=number] { width: 90px; }
.coins-card { margin-top: 4px; max-width: 460px; display: grid; gap: 4px; padding: 12px 14px; border-radius: 14px; background: var(--bg2); border: 1px solid var(--line); border-left: 4px solid var(--yellow); }
.cc-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.cc-head b { flex: 1; }
.cc-emoji { font-size: 18px; }
.coins-list { display: grid; gap: 4px; }
.coin-row { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 9px; background: var(--bg1); min-width: 0; }
.coin-row.me { outline: 1px solid color-mix(in srgb, var(--accent) 50%, transparent); }
.coin-row .uname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; cursor: pointer; }
.coin-place { width: 22px; text-align: center; font-weight: 800; color: var(--muted); flex: none; }
.coin-bal { font-variant-numeric: tabular-nums; flex: none; }

/* ---------- predictions ---------- */
.pr-card { margin-top: 4px; max-width: 560px; display: grid; gap: 8px; padding: 12px 14px; border-radius: 14px; background: var(--bg2); border: 1px solid var(--line); border-left: 4px solid var(--blue); }
.pr-card.resolved { border-left-color: var(--green); } .pr-card.cancelled { border-left-color: var(--bg4); opacity: .85; } .pr-card.locked { border-left-color: var(--yellow); }
.pr-head { display: flex; align-items: center; gap: 10px; }
.pr-mark { flex: none; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: color-mix(in srgb, var(--blue) 18%, transparent); color: var(--blue); }
.pr-head b { font-size: 15px; }
.pr-sub { font-size: 12.5px; color: var(--muted); }
.pr-pot { flex: none; font-weight: 800; padding: 4px 10px; border-radius: 999px; background: var(--bg1); font-variant-numeric: tabular-nums; }
.pr-opt-row { position: relative; display: grid; gap: 6px; padding: 9px 10px; border-radius: 10px; background: linear-gradient(90deg, color-mix(in srgb, var(--blue) 16%, var(--bg1)) var(--pct), var(--bg1) var(--pct)); border: 1px solid transparent; }
.pr-opt-row.mine { border-color: color-mix(in srgb, var(--accent) 55%, transparent); }
.pr-opt-row.win { background: linear-gradient(90deg, color-mix(in srgb, var(--green) 22%, var(--bg1)) var(--pct), var(--bg1) var(--pct)); border-color: color-mix(in srgb, var(--green) 50%, transparent); }
.pr-opt-row.lose { opacity: .6; }
.pr-ot { display: flex; align-items: center; gap: 8px; min-width: 0; }
.pr-ot b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-meta { flex: none; font-size: 12px; color: var(--muted); font-weight: 700; font-variant-numeric: tabular-nums; }
.pr-faces { display: flex; gap: 3px; }
.pr-bet { display: flex; gap: 6px; align-items: center; }
.pr-amt { width: 90px; padding: 5px 8px !important; }
.pr-mine { font-size: 12.5px; color: var(--text-2); font-weight: 600; }
.pr-winners { display: flex; flex-wrap: wrap; gap: 6px; }
.pr-win { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px 3px 4px; border-radius: 999px; background: color-mix(in srgb, var(--green) 14%, var(--bg1)); font-size: 12.5px; font-weight: 700; }
.pr-win b { color: var(--green-t); }
.pr-acts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pr-acts select { padding: 5px 8px; }
.pr-opts { display: grid; gap: 6px; margin: 4px 0 6px; }
.pr-opt { display: flex; gap: 6px; align-items: center; }
.pr-opt input { flex: 1; }

/* ---------- picture editor ---------- */
.img-edit { max-width: 980px; }
.ie-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 8px; }
.ie-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg2); color: var(--text); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.ie-btn:hover:not(:disabled) { border-color: var(--accent); }
.ie-btn.on { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.ie-btn:disabled { opacity: .4; cursor: default; }
.ie-opts { display: flex; align-items: center; gap: 6px; margin-left: auto; flex-wrap: wrap; }
.ie-sw { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); cursor: pointer; padding: 0; }
.ie-sw.on { outline: 2px solid var(--accent); outline-offset: 2px; }
.ie-sep { width: 1px; height: 20px; background: var(--line); margin: 0 4px; }
.ie-size { min-width: 28px; height: 26px; border-radius: 7px; border: 1px solid var(--line); background: var(--bg2); color: var(--text); font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
.ie-size.on { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.ie-stage { position: relative; display: grid; place-items: center; background: repeating-conic-gradient(var(--bg2) 0 25%, var(--bg1) 0 50%) 0 0 / 20px 20px; border-radius: 12px; padding: 10px; margin-bottom: 10px; overflow: hidden; }
.ie-stage canvas { max-width: 100%; max-height: 62vh; touch-action: none; cursor: crosshair; display: block; box-shadow: 0 6px 24px #0007; }
.ie-crop { position: absolute; display: none; border: 2px dashed #fff; box-shadow: 0 0 0 9999px rgba(0,0,0,.5); pointer-events: none; }
.tray-item .tray-ed { position: absolute; top: 2px; left: 28px; width: 24px; height: 24px; background: rgba(0,0,0,.6); color: #fff; }
.tray-item .tray-ed:hover { color: var(--accent-t); }

/* ---------- read receipts ---------- */
.seen-line { display: flex; align-items: center; justify-content: flex-end; gap: 4px; padding: 0 16px 4px; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.seen-line.seen { color: var(--text-2); }

/* ---------- brackets ---------- */
.br-card { margin-top: 4px; max-width: 100%; min-width: 0; display: grid; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--bg2); border: 1px solid var(--line); border-left: 4px solid var(--yellow); }
.br-head { display: flex; align-items: center; gap: 10px; }
.br-mark { font-size: 20px; }
.br-sub { font-size: 12.5px; color: var(--muted); }
.br-grid { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 4px; }
.br-col { display: flex; flex-direction: column; min-width: 150px; flex: none; }
.br-round { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 6px; }
.br-matches { display: flex; flex-direction: column; justify-content: space-around; gap: 8px; flex: 1; }
.br-match { display: grid; border-radius: 9px; overflow: hidden; border: 1px solid var(--line); background: var(--bg1); }
.br-match.bye { opacity: .6; }
.br-slot { text-align: left; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 13px; font-weight: 700; padding: 6px 9px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.br-slot + .br-slot { border-top: 1px solid var(--line); }
.br-slot:hover:not(:disabled) { background: var(--hover); }
.br-slot:disabled { cursor: default; }
.br-slot.win { background: color-mix(in srgb, var(--accent) 20%, transparent); color: var(--text); }
.br-slot.lose { color: var(--muted); text-decoration: line-through; }
.br-slot.empty { color: var(--muted); font-weight: 600; font-style: italic; }
.br-champ { justify-content: center; }
.br-trophy { padding: 10px 12px; border-radius: 10px; background: var(--bg1); border: 1px dashed var(--line); font-weight: 800; color: var(--muted); text-align: center; }
.br-trophy.on { border: 1px solid var(--yellow); background: color-mix(in srgb, var(--yellow) 16%, var(--bg1)); color: var(--text); }
.br-entries { width: 100%; box-sizing: border-box; resize: vertical; }

/* ---------- wishlist ---------- */
.wl-list { display: grid; gap: 4px; margin: 8px 0; }
.wl-row { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 9px; background: var(--bg2); }
.wl-row.sale { border: 1px solid color-mix(in srgb, var(--green) 45%, transparent); }
.wl-name { font-weight: 700; color: var(--text); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wl-name:hover { text-decoration: underline; }
.wl-off { font-weight: 800; font-size: 12px; padding: 2px 6px; border-radius: 6px; background: var(--green); color: #0b1f14; }
.wl-price { font-variant-numeric: tabular-nums; color: var(--text-2); font-size: 13px; }

/* ---------- server themes ---------- */
#messages.themed { background-attachment: local; }
#messages.themed .msg:hover { background: color-mix(in srgb, var(--bg0) 35%, transparent); }
.snd-grid { display: grid; gap: 6px; }
.snd-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 9px; background: var(--bg2); }
.snd-row select { min-width: 170px; }
.snd-extra { display: flex; align-items: center; gap: 8px; padding: 0 8px; }
.snd-extra:empty { display: none; }
.snd-row input[type=range] { width: 170px; }
.snd-pct { min-width: 44px; text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- iPhone home-screen app: keep everything clear of the clock/notch and the home bar ----------
   (black-translucent + viewport-fit=cover draw the app under them; these are 0 everywhere else) */
:root { --sat: env(safe-area-inset-top, 0px); --sab: env(safe-area-inset-bottom, 0px); --sal: env(safe-area-inset-left, 0px); --sar: env(safe-area-inset-right, 0px); }
.app { box-sizing: border-box; padding-top: var(--sat); padding-left: var(--sal); padding-right: var(--sar); }
.auth { padding-top: max(16px, var(--sat)); padding-bottom: max(16px, var(--sab)); }
.landing { padding-top: var(--sat); }
.modal { padding: max(16px, var(--sat)) max(16px, var(--sar)) max(16px, var(--sab)) max(16px, var(--sal)); }
.modal-card { max-height: calc(100dvh - 32px - var(--sat) - var(--sab)); }
.lb-top { top: var(--sat); }
.lb-stage { top: calc(56px + var(--sat)); bottom: max(16px, var(--sab)); }
@media (max-width: 860px) {
  .lb-stage, .lb-many .lb-stage { left: 0; right: 0; }
  .lb-nav, .lb-open { display: none; }
}
.toast { bottom: calc(24px + var(--sab)); }
.notice-stack { bottom: calc(18px + var(--sab)); }
.maint-screen { padding-top: max(24px, var(--sat)); }
@media (max-width: 860px) {
  .rail, .sidebar, .side-panel, .app.no-panel .side-panel, .app.no-side .side-panel { top: var(--sat); }
  .rail { left: var(--sal); }
  .sidebar { left: calc(72px + var(--sal)); }
  .rail, .sidebar, .side-panel { padding-bottom: var(--sab); box-sizing: border-box; }
  .call-toast { top: calc(60px + var(--sat)); }
  .streamer-pill { bottom: calc(132px + var(--sab)); }
}
/* installed phone app: no double-tap zoom; text boxes at 16px so iPhone doesn't zoom in when you tap one */
html.installed, html.installed body { touch-action: pan-x pan-y; }
/* iPhone/iPad: the page never scrolls or bounces as a whole; the app is exactly as tall as what's visible (main.js sets
   --app-h, smaller while the keyboard is up), so the message box sits right on top of the keyboard */
html.ios, html.ios body { overflow: hidden; overscroll-behavior: none; height: 100%; }
html.ios body { position: fixed; inset: 0; width: 100%; }
html.ios .app { height: var(--app-h, 100dvh); }
html.ios .auth { box-sizing: border-box; height: 100%; overflow-y: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 860px) { html.ios .rail, html.ios .sidebar, html.ios .side-panel { bottom: auto; height: calc(var(--app-h, 100dvh) - var(--sat)); } }
@media (hover: none) and (pointer: coarse) { input:not([type=range]):not([type=color]):not([type=checkbox]), textarea, select, [contenteditable] { font-size: 16px !important; } }

/* ---------- menus: a small heading row ---------- */
.menu-head { font-size: 11px; font-weight: 750; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 6px 10px 3px; }

/* ---------- Lodge Contributor badge ---------- */
.pc-badge.b-contributor { border-color: color-mix(in srgb, #2fbf9f 50%, var(--line)); background: color-mix(in srgb, #2fbf9f 12%, var(--bg1)); }
.p-chip.contrib { background: color-mix(in srgb, #2fbf9f 12%, var(--bg1)); border-color: color-mix(in srgb, #2fbf9f 45%, transparent); color: var(--text); }
.p-chip.contrib svg { color: #2fbf9f; }

/* ---------- idea board ---------- */
.idea-post { display: grid; gap: 8px; padding: 12px; border-radius: 12px; background: var(--bg2); border: 1px solid var(--line); margin: 6px 0 14px; }
.idea-post textarea { resize: vertical; min-height: 64px; font: inherit; }
.idea-post .row { justify-content: flex-end; margin: 0; }
.idea-tabs { margin-bottom: 10px; overflow-x: auto; }
.idea-tabs .seg { flex-wrap: nowrap; }
.idea-tabs .seg button { white-space: nowrap; }
.idea-list { display: grid; gap: 8px; }
.idea { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 12px; background: var(--bg2); border: 1px solid var(--line); position: relative; }
.idea.s-built { border-color: color-mix(in srgb, var(--green) 40%, var(--line)); }
.idea.s-declined { opacity: .75; }
.idea-vote { display: grid; justify-items: center; gap: 1px; min-width: 46px; padding: 6px 4px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg1); color: var(--muted); cursor: pointer; font: inherit; }
.idea-vote b { font-size: 14px; color: var(--text); font-variant-numeric: tabular-nums; }
.idea-vote:hover:not(:disabled) { border-color: var(--accent); color: var(--accent-t); }
.idea-vote.on { background: color-mix(in srgb, var(--accent) 16%, var(--bg1)); border-color: var(--accent); color: var(--accent-t); }
.idea-vote:disabled { cursor: default; opacity: .8; }
.idea-main { flex: 1; min-width: 0; display: grid; gap: 5px; }
.idea-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-right: 26px; }
.idea-title { font-size: 15px; overflow-wrap: anywhere; }
.idea-status { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 750; padding: 2px 7px; border-radius: 999px; background: var(--bg3); color: var(--text-2); }
.idea-status.s-planned { background: color-mix(in srgb, #4dabf7 22%, transparent); }
.idea-status.s-building { background: color-mix(in srgb, var(--accent) 22%, transparent); }
.idea-status.s-built { background: color-mix(in srgb, var(--green) 25%, transparent); }
.idea-status.s-declined { background: color-mix(in srgb, var(--red) 18%, transparent); }
.idea-body { color: var(--text-2); font-size: 13.5px; white-space: pre-wrap; overflow-wrap: anywhere; }
.idea-body.clip { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; cursor: pointer; }
.idea-note { display: flex; gap: 6px; align-items: flex-start; font-size: 12.5px; padding: 6px 8px; border-radius: 8px; background: var(--bg1); color: var(--text-2); }
.idea-note svg { flex: none; margin-top: 2px; color: var(--accent-t); }
.idea-by { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.idea-more { position: absolute; top: 8px; right: 8px; }

/* ---------- keyboard shortcuts ---------- */
.kbd-combo { display: inline-flex; align-items: center; gap: 3px; }
.kbd-combo kbd { font-family: var(--mono); font-size: 11.5px; min-width: 22px; text-align: center; padding: 2px 6px; border-radius: 6px; border: 1px solid var(--line); border-bottom-width: 2px; background: var(--bg1); color: var(--text); }
.keys-list { display: grid; gap: 2px; margin: 4px 0 10px; }
.keys-row { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 9px; }
.keys-row:nth-child(odd) { background: var(--bg2); }
.keys-row .grow { display: grid; gap: 1px; min-width: 0; }
.keys-acts { display: flex; align-items: center; gap: 2px; flex: none; }
.keys-btn { border: 1px solid transparent; background: none; border-radius: 8px; padding: 4px 6px; cursor: pointer; color: var(--text); font: inherit; }
.keys-btn:hover { border-color: var(--line); background: var(--bg1); }
.keys-btn.changed kbd { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.keys-btn.listening { border-color: var(--accent); background: var(--accent-soft); font-size: 12px; color: var(--accent-t); }
.keys-list.fixed .keys-row .grow { display: block; }

/* ---------- Steam wishlist link ---------- */
.wl-steam { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 12px; background: var(--bg2); border: 1px solid var(--line); margin: 4px 0 12px; }
.wl-steam-ic { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 10px; background: color-mix(in srgb, #66c0f4 18%, var(--bg1)); color: #66c0f4; }
.wl-steam .grow { display: grid; gap: 4px; min-width: 0; }
.wl-steam .row { margin: 4px 0 0; flex-wrap: wrap; }
.wl-steam .row input { min-width: 0; flex: 1 1 220px; }
.wl-steam-acts { display: flex; gap: 6px; flex: none; }
.wl-bar { height: 6px; border-radius: 99px; background: var(--bg3); overflow: hidden; margin-top: 2px; }
.wl-bar i { display: block; height: 100%; background: #66c0f4; border-radius: inherit; transition: width .4s; }
.wl-src { font-size: 10.5px; font-weight: 750; padding: 1px 6px; border-radius: 6px; background: color-mix(in srgb, #66c0f4 18%, transparent); color: var(--text-2); }
.wl-search { width: 100%; margin: 2px 0 4px; }
.wl-count { margin: 4px 2px 0; }
.wl-list { max-height: min(46vh, 420px); overflow-y: auto; }
@media (max-width: 600px) { .wl-steam { flex-wrap: wrap; } .wl-steam-acts { width: 100%; justify-content: flex-end; } }
/* wishlist rows never grow wider than the window: long names get "…", the tag/sale/price/remove stay on the right */
.wl-list { grid-template-columns: minmax(0, 1fr); overflow-x: hidden; }
.wl-row { min-width: 0; gap: 8px; }
.wl-row > :not(.wl-name) { flex: none; white-space: nowrap; }
.wl-row .icon-btn { margin-right: -4px; }
@media (max-width: 520px) { .wl-row .wl-src { display: none; } }

/* ---------- one size everywhere ----------
   Every pop-up window uses the same calm, compact size as Settings: 14px text, 16px titles, 34px buttons and boxes.
   (Phones still get 16px text boxes so iPhone doesn't zoom; chat text follows Appearance → Text size.) */
.modal-card { font-size: 14px; padding: 18px 20px; gap: 10px; }
.modal-card h3, .modal-card .head h3, .modal-card .head .inline-label { font-size: 16px; }
.modal-card p { margin: 0; }
.modal-card .btn { padding: 7px 12px; font-size: 13.5px; }
.modal-card .btn.xs, .modal-card .btn.small-btn { padding: 3px 9px; font-size: 12px; }
.modal-card input:not([type=checkbox]):not([type=range]):not([type=color]):not([type=radio]), .modal-card textarea, .modal-card select { padding: 7px 10px; font-size: 13.5px; }
.modal-card label { font-size: 12.5px; gap: 5px; }
.modal-card .perm { padding: 8px 0; }
.modal-card .perm .txt b { font-size: 13.5px; }
.modal-card .perm .txt span { font-size: 12px; }
.modal-card .seg button { padding: 5px 9px; font-size: 13px; }
.modal-card .muted.small, .modal-card .small, .modal-card .hint { font-size: 12px; }
.modal-card .list-row { padding: 6px 10px; }
.modal-card.profile-card, .modal-card.settings-shell, .modal-card.wn-modal, .modal-card.mh-modal { padding: 0; }
.qs-input { font-size: 15px; padding: 9px 12px; }
/* lists inside windows (wishlist, shop, saved rolls, voice history…): the same row size as Settings rows */
.wl-row { padding: 6px 10px; }
.wl-name { font-size: 13.5px; }
/* main pages (Friends / Activity, Music player): page titles match the Settings headers */
.people-top h2 { font-size: 18px; }
.people-top h2 svg { width: 18px; height: 18px; }
.ftab { font-size: 13.5px; }
/* a field next to one with a hint under it keeps its own height */
label { align-content: start; }
/* buttons on Keeper cards in chat (King's Cup, trivia, giveaways…): the same size as everywhere else */
.msg .btn:not(.xs):not(.small-btn) { padding: 6px 12px; font-size: 13.5px; }
/* Health → Over time charts */
.hc-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.hc-head .perm-group { margin: 0; }
.hc-range { flex: none; }
.hc-range button { flex: none; }
.hc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; margin-top: 8px; }
.hc-card { background: var(--bg2); border-radius: 12px; padding: 10px 12px 8px; display: grid; gap: 6px; min-width: 0; }
.hc-top { display: flex; align-items: flex-start; gap: 8px; }
.hc-title { flex: 1; min-width: 0; display: grid; gap: 1px; }
.hc-title b { font-size: 13.5px; }
.hc-title .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hc-now { font-weight: 800; font-size: 16px; font-variant-numeric: tabular-nums; color: var(--text); white-space: nowrap; }
.hc-plot { position: relative; height: 96px; padding-left: 44px; }
.hc-svg { width: 100%; height: 100%; display: block; overflow: visible; }
.hc-axis { position: absolute; left: 0; top: -6px; bottom: -6px; width: 40px; display: flex; flex-direction: column; justify-content: space-between; font-size: 10.5px; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; pointer-events: none; }
.hc-axis span { white-space: nowrap; overflow: hidden; }
.hc-grid-line { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; stroke-dasharray: 3 3; }
.hc-line { fill: none; stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.hc-area { opacity: .14; }
.hc-cursor { stroke: var(--text-2); stroke-width: 1; vector-effect: non-scaling-stroke; }
.hc-tip { position: absolute; top: 2px; width: 140px; background: var(--bg0); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; font-size: 11.5px; display: grid; gap: 1px; pointer-events: none; z-index: 2; box-shadow: 0 6px 20px var(--shadow); opacity: .96; }
.hc-tip b { font-size: 11.5px; }
.hc-x { display: flex; justify-content: space-between; font-size: 10.5px; padding-left: 44px; }
.hc-legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 11.5px; color: var(--text-2); }
.hc-key { display: inline-flex; align-items: center; gap: 5px; }
.hc-key i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
.hc-empty { padding: 14px; border: 1px dashed var(--line); border-radius: 12px; grid-column: 1 / -1; }
.hc-note { margin: 4px 0 0; }

/* ---------- Lodge Wrapped ---------- */
.modal-card.wr-modal { max-width: 420px; padding: 0; overflow: hidden; background: #120c08; border: 0; }
.wr-stage { position: relative; min-height: min(640px, calc(100dvh - 48px)); display: flex; flex-direction: column; color: #fff; padding: 22px 22px 14px; user-select: none; cursor: pointer; overflow: hidden; isolation: isolate; }
.wr-stage::after { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(120% 60% at 100% 0%, rgba(255,255,255,.18), transparent 60%), radial-gradient(90% 50% at 0% 100%, rgba(0,0,0,.35), transparent 70%); pointer-events: none; }
.wr-ember { background: linear-gradient(165deg, #ff8a3d 0%, #c2410c 48%, #2a0e04 100%); }
.wr-amber { background: linear-gradient(165deg, #f59e0b 0%, #b45309 50%, #241103 100%); }
.wr-night { background: linear-gradient(165deg, #3730a3 0%, #1e1b4b 55%, #0b0a1a 100%); }
.wr-forest { background: linear-gradient(165deg, #16a34a 0%, #14532d 52%, #04190c 100%); }
.wr-violet { background: linear-gradient(165deg, #8b5cf6 0%, #4c1d95 52%, #160a2b 100%); }
.wr-sun { background: linear-gradient(165deg, #fcd34d 0%, #f97316 48%, #3b1306 100%); }
.wr-rose { background: linear-gradient(165deg, #f43f5e 0%, #9f1239 52%, #22060d 100%); }
.wr-teal { background: linear-gradient(165deg, #14b8a6 0%, #115e59 52%, #031a18 100%); }
.wr-dusk { background: linear-gradient(165deg, #64748b 0%, #1e293b 55%, #0b1120 100%); }
.wr-bars { display: flex; gap: 4px; margin: -8px 34px 0 0; }
.wr-bars i { flex: 1; height: 3px; border-radius: 3px; background: rgba(255,255,255,.28); }
.wr-bars i.done { background: rgba(255,255,255,.85); }
.wr-bars i.on { background: #fff; box-shadow: 0 0 8px rgba(255,255,255,.6); }
.wr-x { position: absolute; top: 8px; right: 10px; width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(0,0,0,.22); color: #fff; display: grid; place-items: center; cursor: pointer; }
.wr-x:hover { background: rgba(0,0,0,.4); }
.wr-body { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 10px; padding: 18px 2px 10px; min-height: 0; animation: wr-in .35s ease-out; }
.wr-body.center { align-items: center; text-align: center; }
@keyframes wr-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .wr-body { animation: none; } }
.wr-kicker { font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.78); }
.wr-hero { font-family: Bricolage, Inter, sans-serif; font-size: clamp(56px, 17vw, 84px); font-weight: 800; line-height: .95; letter-spacing: -.03em; text-shadow: 0 4px 30px rgba(0,0,0,.25); font-variant-numeric: tabular-nums; }
.wr-big { font-family: Bricolage, Inter, sans-serif; font-size: 30px; font-weight: 800; line-height: 1.08; letter-spacing: -.02em; overflow-wrap: anywhere; }
.wr-sub { font-size: 15px; color: rgba(255,255,255,.88); line-height: 1.4; }
.wr-foot { font-size: 13px; color: rgba(255,255,255,.75); }
.wr-hint { font-size: 12px; color: rgba(255,255,255,.6); margin-top: 18px; }
.wr-pill { align-self: flex-start; font-size: 12.5px; font-weight: 700; padding: 5px 11px; border-radius: 999px; background: rgba(0,0,0,.25); }
.wr-body .avatar.xl { box-shadow: 0 0 0 4px rgba(255,255,255,.35), 0 10px 30px rgba(0,0,0,.35); }
.wr-years { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.wr-year { border: 1px solid rgba(255,255,255,.35); background: transparent; color: #fff; border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 700; cursor: pointer; }
.wr-year.on { background: #fff; color: #7c2d12; }
.wr-months { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; align-items: end; height: 120px; margin-top: 8px; }
.wr-mcol { display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; }
.wr-mcol i { width: 100%; border-radius: 4px 4px 2px 2px; background: rgba(255,255,255,.4); }
.wr-mcol.peak i { background: #fff; box-shadow: 0 0 14px rgba(255,255,255,.55); }
.wr-mcol span { font-size: 10px; color: rgba(255,255,255,.7); font-weight: 700; }
.wr-hours { display: flex; align-items: flex-end; gap: 2px; height: 90px; margin-top: 10px; }
.wr-hours i { flex: 1; border-radius: 3px 3px 1px 1px; background: rgba(255,255,255,.3); }
.wr-hours i.peak { background: #ffb36b; box-shadow: 0 0 12px rgba(255,179,107,.7); }
.wr-hours-lab { display: flex; justify-content: space-between; font-size: 10.5px; color: rgba(255,255,255,.65); }
.wr-list { display: grid; gap: 6px; margin-top: 6px; }
.wr-row { position: relative; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: rgba(0,0,0,.2); overflow: hidden; isolation: isolate; }
.wr-row > i { position: absolute; inset: 0 auto 0 0; background: rgba(255,255,255,.12); z-index: -1; }
.wr-rank { width: 18px; text-align: center; font-weight: 800; color: rgba(255,255,255,.7); flex: none; }
.wr-name { flex: 1; min-width: 0; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wr-val { font-size: 13px; font-weight: 700; color: rgba(255,255,255,.85); font-variant-numeric: tabular-nums; }
.wr-emo { font-size: inherit; }
img.wr-emo { width: 1em; height: 1em; object-fit: contain; vertical-align: middle; }
.wr-emoji-top { font-size: 96px; line-height: 1.05; filter: drop-shadow(0 8px 24px rgba(0,0,0,.3)); }
.wr-emoji-rest { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.wr-emoji-it { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 10px; border-radius: 12px; background: rgba(0,0,0,.18); font-size: 30px; min-width: 54px; }
.wr-emoji-it span { font-size: 11.5px; font-weight: 700; color: rgba(255,255,255,.8); }
.wr-people { display: grid; gap: 8px; margin-top: 6px; }
.wr-person { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: rgba(0,0,0,.2); }
.wr-ptxt { display: grid; min-width: 0; }
.wr-ptxt b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wr-ptxt span { font-size: 12px; color: rgba(255,255,255,.78); }
.wr-quote { background: rgba(0,0,0,.25); border-radius: 14px; padding: 12px 14px; display: grid; gap: 8px; border-left: 3px solid rgba(255,255,255,.7); }
.wr-qtext { font-size: 15px; line-height: 1.4; overflow-wrap: anywhere; white-space: pre-wrap; max-height: 9.5em; overflow: hidden; }
.wr-qpic { max-width: 100%; max-height: 200px; border-radius: 10px; object-fit: cover; }
.wr-qpic.sm { max-height: 120px; }
.wr-qmeta { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 12px; color: rgba(255,255,255,.75); }
.wr-qkinds { display: flex; gap: 6px; }
.wr-qk { display: inline-flex; align-items: center; gap: 2px; padding: 2px 7px; border-radius: 999px; background: rgba(255,255,255,.14); font-weight: 700; font-size: 12.5px; }
.wr-link { align-self: flex-start; border: 0; background: rgba(255,255,255,.16); color: #fff; font-weight: 700; padding: 6px 12px; border-radius: 999px; cursor: pointer; font-size: 12.5px; }
.wr-link:hover { background: rgba(255,255,255,.26); }
.wr-share { margin-top: 10px; background: rgba(0,0,0,.28); border-radius: 14px; padding: 12px; display: grid; gap: 8px; cursor: default; }
.wr-share-h { font-size: 13.5px; }
.wr-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; }
.wr-opt { display: flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: rgba(255,255,255,.9); cursor: pointer; }
.wr-opt input { accent-color: #ff8a3d; flex: none; }
.wr-opts .wr-opt:last-child:nth-child(odd) { grid-column: 1 / -1; }
.btn.wr-go { justify-self: stretch; background: #fff; color: #7c2d12; }
.btn.wr-go:disabled { background: rgba(255,255,255,.5); }
.wr-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.wr-arrow { width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(0,0,0,.25); color: #fff; display: grid; place-items: center; cursor: pointer; }
.wr-arrow:disabled { opacity: .3; cursor: default; }
.wr-count { font-size: 12px; font-weight: 700; color: rgba(255,255,255,.7); font-variant-numeric: tabular-nums; }
/* the card in chat */
.msg-card.wr-card { border-left: 0; background: linear-gradient(160deg, color-mix(in srgb, #ff8a3d 22%, var(--bg2)), var(--bg2) 60%); border: 1px solid color-mix(in srgb, #ff8a3d 35%, var(--line)); border-radius: 14px; padding: 12px; display: grid; gap: 10px; max-width: 460px; }
.wr-card-head { display: flex; align-items: center; gap: 10px; }
.wr-card-t { display: grid; min-width: 0; }
.wr-card-k { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-t); }
.wr-card-t b { font-family: Bricolage, Inter, sans-serif; font-size: 18px; line-height: 1.15; }
.wr-card-d { font-size: 12.5px; color: var(--text-2); }
.wr-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 6px; }
.wr-tile { background: var(--bg1); border-radius: 10px; padding: 8px 10px; display: grid; gap: 1px; min-width: 0; }
.wr-tile > b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wr-tl { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.wr-ts { font-size: 11.5px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wr-tile-emo { display: flex; gap: 4px; font-size: 20px; line-height: 1.2; }
.wr-tile-people { display: flex; gap: 2px; padding: 2px 0; }
.wr-card-q { background: var(--bg1); border-radius: 10px; padding: 8px 10px; display: grid; gap: 4px; }
.wr-card-qt { font-size: 13.5px; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.wr-card-btn { justify-self: start; }

/* ---------- Forum channels ---------- */
.forum-page { max-width: 880px; margin: 0 auto; padding: 18px 20px 30px; display: grid; gap: 12px; align-content: start; }
.fp-top { display: flex; align-items: center; gap: 12px; }
.fp-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-t); flex: none; }
.fp-words { display: grid; min-width: 0; }
.fp-words b { font-size: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fp-top .btn { padding: 7px 12px; font-size: 13.5px; }
.fp-guide { background: var(--bg2); border-radius: 12px; padding: 8px 12px; border: 1px solid var(--line); }
.fp-guide summary { cursor: pointer; display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 13px; color: var(--text-2); list-style: none; }
.fp-guide summary::-webkit-details-marker { display: none; }
.fp-guide-t { margin-top: 6px; font-size: 13.5px; color: var(--text-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.fp-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.fp-sw { flex: 1 1 220px; display: flex; align-items: center; gap: 8px; background: var(--bg0); border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; color: var(--muted); min-width: 0; }
.fp-sw:focus-within { border-color: var(--accent); }
.fp-sw input.fp-search { border: 0; background: transparent; box-shadow: none; padding: 7px 0; font-size: 13.5px; flex: 1; min-width: 0; }
.fp-sort { flex: none; }
.fp-sort button { padding: 5px 10px; font-size: 13px; flex: none; }
.fp-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.ftag { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); background: var(--bg2); color: var(--text-2); border-radius: 999px; padding: 3px 10px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
button.ftag { cursor: pointer; }
button.ftag:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); color: var(--text); }
.ftag.on { background: var(--accent-soft); border-color: var(--accent); color: var(--text); }
.ftag.sm { padding: 1px 8px; font-size: 11.5px; background: var(--bg3); border-color: transparent; }
.ftag-e { font-size: 1.05em; line-height: 1; }
.fp-list { display: grid; gap: 8px; }
.fp-card { all: unset; box-sizing: border-box; cursor: pointer; display: flex; gap: 12px; align-items: stretch; padding: 12px 14px; border-radius: 12px; background: var(--bg2); border: 1px solid transparent; transition: border-color .12s, background .12s; min-width: 0; }
.fp-card:hover { background: var(--bg3); }
.fp-card:focus-visible { outline: 2px solid var(--accent); }
.fp-card.pinned { border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.fp-card.locked { opacity: .8; }
.fp-main { flex: 1; min-width: 0; display: grid; gap: 4px; align-content: start; }
.fp-ctags { display: flex; gap: 5px; flex-wrap: wrap; align-items: center; }
.fp-flag { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; color: var(--accent-t); }
.fp-flag.lock { color: var(--muted); }
.fp-title { font-weight: 700; font-size: 15px; color: var(--text); overflow-wrap: anywhere; line-height: 1.3; }
.fp-card.unread .fp-title { color: var(--text); }
.fp-card:not(.unread) .fp-title { color: var(--text-2); }
.fp-prev { font-size: 13px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.fp-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 2px; }
.fp-by { color: var(--text-2); font-weight: 600; margin-left: -4px; }
.fp-stat { display: inline-flex; align-items: center; gap: 4px; }
.fp-new { font-size: 10.5px; font-weight: 800; color: var(--on-accent); background: var(--accent); padding: 1px 6px; border-radius: 999px; }
.fp-thumb { width: 84px; height: 84px; border-radius: 10px; object-fit: cover; flex: none; align-self: center; background: var(--bg3); }
.fp-empty { display: grid; justify-items: center; gap: 6px; padding: 40px 16px; border: 1px dashed var(--line); border-radius: 14px; color: var(--muted); text-align: center; }
.fp-empty b { color: var(--text); }
.fp-mguide { white-space: pre-wrap; background: var(--bg2); border-radius: 10px; padding: 8px 10px; }
.fp-tags.pick { padding: 2px 0; }
.fp-files { display: flex; gap: 6px; flex-wrap: wrap; }
.fp-files:empty { display: none; }
.fp-file { display: flex; align-items: center; gap: 6px; padding: 4px 6px 4px 4px; border-radius: 8px; background: var(--bg2); font-size: 12px; max-width: 220px; }
.fp-file img { width: 34px; height: 34px; border-radius: 6px; object-fit: cover; }
.fp-file span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fp-file.busy { opacity: .6; }
.fp-file.err { outline: 1px solid var(--red); }
.fp-settings { display: grid; gap: 8px; }
.fp-tag-edit { display: grid; gap: 6px; }
.fp-tag-row { display: flex; gap: 6px; align-items: center; }
.modal-card .fp-tag-row input.fp-tag-emo { width: 52px; text-align: center; flex: none; }
.fp-modonly { display: flex !important; align-items: center; gap: 5px; white-space: nowrap; font-size: 12px; }
.intro .fp-ctags, .hello .fp-ctags { justify-content: flex-start; margin: 2px 0 4px; }
#chatHead .ftag.sm { flex: none; }
@media (max-width: 600px) { .forum-page { padding: 12px 12px 24px; } .fp-thumb { width: 64px; height: 64px; } .fp-card { padding: 10px 12px; } .fp-sort { width: 100%; } .fp-sort button { flex: 1; } }
.fp-field { display: grid; gap: 5px; }
.fp-label { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.fp-tag-row input.grow { min-width: 0; width: 100%; }
.fp-tag-row { min-width: 0; }
@media (max-width: 520px) { .fp-modonly { font-size: 11px !important; gap: 3px; } .modal-card .fp-tag-row input.fp-tag-emo { width: 40px; padding-left: 4px; padding-right: 4px; } }

/* ---------- staff, team page, new badges ---------- */
.pc-badge.colored { border-color: color-mix(in srgb, var(--bc) 55%, var(--line)); background: color-mix(in srgb, var(--bc) 13%, var(--bg1)); }
.pc-badge.colored .pcb-n { color: color-mix(in srgb, var(--bc) 35%, var(--text)); }
.pc-badge.click { cursor: pointer; }
.pc-badge.click:hover { background: color-mix(in srgb, var(--bc, var(--accent)) 22%, var(--bg1)); }
.p-chip.bug { color: #3ba55d; background: color-mix(in srgb, #3ba55d 14%, transparent); }
.p-chip.beta { color: #9b6dff; background: color-mix(in srgb, #9b6dff 14%, transparent); }
.modal-card.team-modal { max-width: 460px; }
.tm-hero { display: flex; align-items: center; gap: 12px; padding: 12px; margin: -4px -4px 0; border-radius: 14px; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 22%, var(--bg2)), var(--bg2)); }
.tm-hero > div { display: grid; }
.tm-hero b { font-size: 16px; }
.tm-hero-ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); flex: none; }
.tm-list { display: grid; gap: 6px; }
.tm-row { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 10px; background: var(--bg2); cursor: pointer; }
.tm-row:hover { background: var(--bg3); }
.tm-av { position: relative; flex: none; }
.tm-dot { position: absolute; right: -1px; bottom: -1px; width: 12px; height: 12px; border-radius: 50%; border: 2.5px solid var(--bg2); background: var(--muted); }
.tm-dot.online { background: var(--green); } .tm-dot.idle { background: var(--yellow); } .tm-dot.dnd { background: var(--red); }
.tm-txt { flex: 1; min-width: 0; display: grid; }
.tm-txt b { font-size: 14px; }
.tm-txt span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tm-job { font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 999px; white-space: nowrap; background: var(--accent-soft); color: var(--accent-t); flex: none; }
.tm-job.j-owner { background: var(--accent); color: var(--on-accent); }
.tm-job.j-helper { background: color-mix(in srgb, var(--blue) 16%, transparent); color: var(--blue); }
.tm-emo { font-size: 18px; flex: none; }
.tm-foot { margin: 0; }
.perm-grid { display: grid; grid-template-columns: minmax(0, 1fr) 70px 70px; gap: 6px 8px; align-items: center; background: var(--bg2); border-radius: 12px; padding: 10px 12px; font-size: 13.5px; }
.perm-grid > b { font-size: 12px; color: var(--muted); text-align: center; }
.perm-grid input { justify-self: center; }
.lounge-ic { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-t); flex: none; }
.dm-row.lounge-row .dm-name { color: var(--accent-t); }
.beta-tag { font-size: 10px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; padding: 1px 6px; border-radius: 999px; background: color-mix(in srgb, #9b6dff 20%, transparent); color: #9b6dff; vertical-align: middle; }
.beta-seg { flex: none; }
.beta-seg button { flex: none; }
@media (max-width: 600px) { .admin-row:has(.beta-seg) { flex-wrap: wrap; } .beta-seg { width: 100%; } .beta-seg button { flex: 1; } }
/* Beta Testers: a purple flask by the name (like the staff icon), and in the name tip */
.beta-badge { flex: none; color: #a37bff; filter: drop-shadow(0 0 4px rgba(155, 109, 255, .5)); }
.staff-tip.is-tester { color: #fff; font-weight: 800; background: linear-gradient(120deg, #7c4dff, #b18cff); box-shadow: 0 8px 26px rgba(155, 109, 255, .4); text-shadow: 0 1px 2px rgba(0,0,0,.3); }
.staff-tip .st-sep { opacity: .7; }
/* Call connection window */
#vbText { cursor: pointer; }
#vbText:hover { text-decoration: underline; }
.modal-card.vs-modal { max-width: 560px; }
.vs-list { display: grid; gap: 8px; }
.vs-row { background: var(--bg2); border-radius: 12px; padding: 10px 12px; display: grid; gap: 8px; border-left: 3px solid var(--green); }
.vs-row.warn { border-left-color: var(--yellow); }
.vs-row.bad { border-left-color: var(--red); }
.vs-head { display: flex; align-items: center; gap: 8px; justify-content: space-between; flex-wrap: wrap; }
.vs-verdict { font-size: 12px; font-weight: 700; color: var(--text-2); }
.vs-row.bad .vs-verdict { color: var(--red-t); } .vs-row.warn .vs-verdict { color: var(--yellow-t); } .vs-row.good .vs-verdict { color: var(--green-t); }
.vs-nums { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 6px; }
.vs-n { display: grid; background: var(--bg1); border-radius: 8px; padding: 5px 8px; }
.vs-n i { font-style: normal; font-size: 10.5px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.vs-n b { font-size: 13.5px; font-variant-numeric: tabular-nums; }
.vs-me { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 4px 12px; background: var(--bg2); border-radius: 12px; padding: 10px 12px; font-size: 13px; }
.vs-kv { display: flex; justify-content: space-between; gap: 8px; }
.beta-card { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; padding: 12px; border-radius: 12px; border: 1px solid color-mix(in srgb, #9b6dff 45%, var(--line)); background: color-mix(in srgb, #9b6dff 10%, var(--bg2)); }
.beta-card .grow { min-width: 200px; display: grid; gap: 2px; }
.beta-card-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, #9b6dff 25%, transparent); color: #b18cff; flex: none; }
.beta-card .row { margin: 0; }
/* Update Lodge: live progress */
.up-prog { border: 1px solid var(--line); border-radius: 16px; padding: 16px; display: grid; gap: 14px; background: radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 60%), var(--bg1); }
.up-prog[data-result="ok"] { background: radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--green) 10%, transparent), transparent 60%), var(--bg1); }
.up-prog[data-result="fail"] { background: radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--red) 10%, transparent), transparent 60%), var(--bg1); }
.up-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.up-htxt { min-width: 0; display: grid; gap: 2px; }
.up-title { font-size: 16px; }
.up-sub { overflow-wrap: anywhere; }
.up-num { display: grid; justify-items: end; line-height: 1; gap: 4px; flex: none; }
.up-pct { font-size: 30px; font-weight: 800; letter-spacing: -.02em; color: var(--accent-t); font-variant-numeric: tabular-nums; }
.up-prog[data-result="ok"] .up-pct { color: var(--green-t); }
.up-prog[data-result="warn"] .up-pct { color: var(--yellow-t); }
.up-prog[data-result="fail"] .up-pct { color: var(--red-t); }
.up-clock { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.up-track { display: grid; grid-template-columns: 30fr 20fr 25fr 25fr; gap: 6px; }
.up-seg { display: grid; gap: 6px; min-width: 0; }
.up-segbar { height: 10px; border-radius: 99px; background: var(--bg3); overflow: hidden; position: relative; }
.up-segbar i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--accent); transition: width .3s ease; }
.up-seg.running .up-segbar i { background: repeating-linear-gradient(-45deg, var(--accent) 0 8px, color-mix(in srgb, var(--accent) 70%, #fff) 8px 16px); background-size: 22.6px 100%; animation: up-stripes .7s linear infinite; box-shadow: 0 0 12px color-mix(in srgb, var(--accent) 55%, transparent); }
.up-seg.ok .up-segbar i { background: var(--accent); }
.up-prog[data-result="ok"] .up-seg.ok .up-segbar i { background: var(--green); }
.up-seg.warn .up-segbar i { background: var(--yellow); }
.up-seg.fail .up-segbar i { background: var(--red); width: 100% !important; }
.up-seglbl { display: flex; align-items: baseline; gap: 6px; font-size: 12px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.up-seg.running .up-seglbl, .up-seg.ok .up-seglbl { color: var(--text); }
.up-seg.fail .up-seglbl { color: var(--red-t); }
.up-segt { color: var(--muted); font-weight: 500; font-variant-numeric: tabular-nums; }
@keyframes up-stripes { to { background-position: 22.6px 0; } }
.up-now { display: none; }
.up-now.on { display: grid; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--bg2); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); }
.up-nowtop { display: flex; align-items: flex-start; gap: 10px; }
.up-nowtop .grow { min-width: 0; display: grid; gap: 2px; }
.up-nowtop b { font-size: 13.5px; }
.up-nowtop .up-spin { margin-top: 2px; }
.up-minibar { height: 4px; border-radius: 99px; background: var(--bg3); overflow: hidden; position: relative; }
.up-minibar i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: inherit; transition: width .3s; }
.up-minibar.slow i { background: var(--yellow); }
.up-minibar.busy i { position: absolute; width: 35%; animation: up-busy 1.1s ease-in-out infinite; }
@keyframes up-busy { 0% { left: -35%; } 100% { left: 100%; } }
.up-det { border-top: 1px solid var(--line); padding-top: 10px; }
.up-det summary { cursor: pointer; font-size: 12.5px; font-weight: 700; color: var(--muted); list-style: none; display: inline-flex; align-items: center; gap: 6px; }
.up-det summary::-webkit-details-marker { display: none; }
.up-det summary::before { content: '›'; font-size: 15px; transition: transform .15s; display: inline-block; }
.up-det[open] summary::before { transform: rotate(90deg); }
.up-steps { display: grid; gap: 2px; margin-top: 8px; }
.up-step { display: flex; align-items: flex-start; gap: 9px; padding: 6px 8px; border-radius: 8px; }
.up-step:hover { background: var(--bg2); }
.up-step .grow { min-width: 0; display: flex; flex-wrap: wrap; column-gap: 8px; row-gap: 2px; align-items: baseline; }
.up-stitle { font-size: 13px; font-weight: 600; }
.up-step.pending { opacity: .5; }
.up-step.fail { background: color-mix(in srgb, var(--red) 9%, transparent); }
.up-ic { width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center; flex: none; margin-top: 1px; background: var(--bg3); color: var(--muted); }
.up-step.ok .up-ic { background: color-mix(in srgb, var(--green) 22%, transparent); color: var(--green-t); }
.up-step.fail .up-ic { background: color-mix(in srgb, var(--red) 22%, transparent); color: var(--red-t); }
.up-step.warn .up-ic { background: color-mix(in srgb, var(--yellow) 22%, transparent); color: var(--yellow-t); }
.up-step.running .up-ic { background: transparent; }
.up-spin { width: 14px; height: 14px; flex: none; border-radius: 50%; border: 2px solid var(--accent); border-right-color: transparent; animation: up-spin .8s linear infinite; }
.up-spin.sm { width: 12px; height: 12px; }
.up-meta { font-size: 12px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; margin-left: auto; }
.up-step.fail .up-meta { color: var(--red-t); }
.up-out-btn { all: unset; cursor: pointer; font-size: 12px; font-weight: 700; color: var(--accent-t); }
.up-out { flex-basis: 100%; margin: 4px 0 0; padding: 8px 10px; border-radius: 8px; background: var(--bg0); font: 11.5px/1.45 var(--mono); max-height: 220px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
.up-done { padding: 10px 12px; border-radius: 10px; font-weight: 700; font-size: 13.5px; }
.up-done.ok { color: var(--green-t); background: color-mix(in srgb, var(--green) 12%, transparent); border: 1px solid color-mix(in srgb, var(--green) 35%, transparent); }
.up-done.warn { color: var(--yellow-t); background: color-mix(in srgb, var(--yellow) 12%, transparent); }
.up-done.fail { color: var(--red-t); background: color-mix(in srgb, var(--red) 12%, transparent); border: 1px solid color-mix(in srgb, var(--red) 35%, transparent); }
@media (max-width: 560px) { .up-track { grid-template-columns: 1fr 1fr; row-gap: 10px; } .up-pct { font-size: 24px; } }
@media (prefers-reduced-motion: reduce) { .up-spin { animation-duration: 2s; } }

/* ---------- 8-ball pool ---------- */
.pool-card { max-width: 420px; display: grid; gap: 8px; }
.pool-card.done { opacity: .92; }
.pl-head { display: flex; gap: 8px; align-items: flex-start; }
.pl-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.pl-players { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pl-p { display: flex; align-items: center; gap: 6px; padding: 4px 8px 4px 4px; border-radius: 999px; background: var(--bg3, rgba(255,255,255,.05)); border: 1px solid transparent; font-size: 13px; min-width: 0; }
.pl-p.turn { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 22%, transparent); }
.pl-p.won { border-color: #e6b422; }
.pl-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 110px; }
.pl-open { color: var(--muted); font-style: italic; padding-left: 4px; }
.pl-vs { font-size: 11px; font-weight: 800; color: var(--muted); text-transform: uppercase; }
.pl-group { font-size: 11px; color: var(--muted); text-transform: capitalize; }
.pl-mini { width: 100%; height: auto; aspect-ratio: 542 / 292; border-radius: 10px; display: block; cursor: pointer; }
.pl-acts { display: flex; gap: 6px; flex-wrap: wrap; }
.modal-card.pool-modal { width: min(1060px, 96vw); max-width: 96vw; }
.pz-top { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.pz-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pz-status { font-size: 13px; color: var(--muted); }
.pz-wrap { position: relative; width: 100%; }
.pz-canvas { display: block; margin: 0 auto; touch-action: none; cursor: crosshair; border-radius: 14px; }
.pz-banner { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); background: rgba(16, 12, 8, .86); color: #fff; padding: 7px 14px; border-radius: 999px; font-size: 13.5px; font-weight: 600; border: 1px solid color-mix(in srgb, var(--accent) 50%, transparent); max-width: 90%; text-align: center; pointer-events: none; }
.pz-ctrl { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.pz-power { width: 160px; height: 10px; border-radius: 999px; background: var(--bg3, rgba(255,255,255,.08)); overflow: hidden; }
.pz-power i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #f5b04a, var(--accent), #d9452b); }
.pz-spin { position: relative; width: 30px; height: 30px; border-radius: 50%; background: #f7f4ea; cursor: pointer; box-shadow: inset 0 -3px 6px rgba(0,0,0,.2); }
.pz-spin i { position: absolute; left: 50%; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: #d9452b; }
.pz-hint { flex: 1 1 220px; }
.pl-group.open { color: var(--accent-t); }
.pz-players { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); gap: 10px; align-items: stretch; margin-bottom: 10px; }
.pz-p { display: grid; grid-template-columns: auto minmax(0,1fr); grid-template-areas: "av who" "av rack"; column-gap: 10px; row-gap: 4px; align-items: center; padding: 8px 12px; border-radius: 12px; background: var(--bg3, rgba(255,255,255,.05)); border: 1px solid transparent; min-width: 0; }
.pz-p > .avatar, .pz-p > img { grid-area: av; }
.pz-p.turn { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 22%, transparent); }
.pz-p.won { border-color: #e6b422; }
.pz-who { grid-area: who; display: flex; align-items: center; gap: 8px; min-width: 0; flex-wrap: wrap; }
.pz-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.pz-tag { font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: rgba(255,255,255,.07); color: var(--muted); }
.pz-tag:empty { display: none; }
.pz-tag.solids { background: color-mix(in srgb, #f2c200 22%, transparent); color: #f5d35a; }
.pz-tag.stripes { background: color-mix(in srgb, #1f57d6 26%, transparent); color: #9cb9ff; }
.pz-tag.open { background: color-mix(in srgb, var(--accent) 20%, transparent); color: var(--accent-t); }
.pz-rack { grid-area: rack; display: flex; gap: 3px; flex-wrap: wrap; align-items: center; min-height: 20px; }
.pz-ball { width: 19px; height: 19px; border-radius: 50%; display: grid; place-items: center; font: 700 8.5px/1 Inter, sans-serif; font-style: normal; color: #111; background: radial-gradient(circle at 50% 50%, #fff 0 33%, var(--bc) 35%); box-shadow: inset 0 -2px 3px rgba(0,0,0,.3); }
.pz-ball.stripe { background: radial-gradient(circle at 50% 50%, #fff 0 33%, transparent 35%), linear-gradient(#f7f4ea 0 24%, var(--bc) 24% 76%, #f7f4ea 76%); }
.pz-ball.gone { opacity: .18; filter: grayscale(1); }
.pz-ball.eight { outline: 2px solid var(--accent); outline-offset: 1px; }
.pz-vs { align-self: center; font-size: 11px; font-weight: 800; color: var(--muted); text-transform: uppercase; }
@media (max-width: 560px) { .pz-players { grid-template-columns: 1fr; } .pz-vs { display: none; } }
@media (max-width: 700px) { .pz-power { width: 110px; } .modal-card.pool-modal { padding: 12px; } }
.set-foot { display: grid; gap: 6px; }
.set-ver { font-size: 11.5px; color: var(--muted); padding: 0 10px; }
.up-ver { display: flex; align-items: baseline; gap: 6px; margin-bottom: 6px; }
@keyframes up-spin { to { transform: rotate(360deg); } }
/* beta testing notes: Update Lodge fields, the beta card, the tester popup and Settings → Beta */
.bn-box { display: grid; gap: 8px; padding: 12px; border-radius: 12px; background: color-mix(in srgb, #9b6dff 8%, var(--bg2)); border: 1px solid color-mix(in srgb, #9b6dff 30%, transparent); }
.bn-test { width: 100%; resize: vertical; min-height: 84px; font: inherit; font-size: 13.5px; line-height: 1.45; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg0); color: var(--text); box-sizing: border-box; }
.bn-card { margin-top: 8px; padding: 10px 12px; border-radius: 10px; background: var(--bg1); display: grid; gap: 6px; }
.bn-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.bn-list { margin: 0; padding-left: 18px; display: grid; gap: 3px; font-size: 13px; }
.bn-fb { display: grid; gap: 6px; margin-top: 8px; }
.bn-fbrow { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; border-radius: 10px; background: var(--bg1); }
.bn-kind { font-size: 15px; line-height: 1.3; }
.bn-fbtext { font-size: 13px; margin-top: 2px; white-space: pre-wrap; overflow-wrap: anywhere; }
.modal-card.bt-modal { max-width: 460px; display: grid; gap: 12px; }
.bt-hello { font-size: 17px; font-weight: 800; }
.bt-what { display: grid; gap: 8px; padding: 14px; border-radius: 14px; background: radial-gradient(120% 120% at 0% 0%, color-mix(in srgb, #9b6dff 18%, transparent), transparent 65%), var(--bg2); border: 1px solid color-mix(in srgb, #9b6dff 35%, transparent); }
.bt-whath { display: flex; gap: 10px; align-items: center; }
.bt-ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, #9b6dff 22%, transparent); color: #b896ff; flex: none; }
.bt-kicker { font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: #a988ff; }
.bt-title { font-size: 15.5px; }
.bt-sub { font-size: 12.5px; font-weight: 700; color: var(--muted); margin-top: 2px; }
.bt-list { margin: 0; padding-left: 20px; display: grid; gap: 5px; font-size: 13.5px; }
.bt-list li::marker { color: #a988ff; font-weight: 700; }
/* the update note that came in the zip (Update Lodge) */
.un-box { display: grid; gap: 8px; padding: 12px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 7%, var(--bg2)); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); }
.un-head { display: flex; align-items: center; gap: 8px; cursor: pointer; flex-wrap: wrap; }
.un-head input { accent-color: var(--accent); width: 16px; height: 16px; margin: 0; }
.un-fields { display: grid; gap: 6px; }
.un-fields.off { opacity: .45; pointer-events: none; }

.tk-label { margin-left: 5px; color: var(--muted); font-weight: 400; font-size: .92em; }
.stream-card.popped { display: grid; justify-items: center; align-content: center; gap: 8px; min-height: 180px; text-align: center; padding: 16px; }
.stream-card.popped .stream-who { display: flex; align-items: center; gap: 8px; }
.popped-ic { color: var(--accent-t); opacity: .85; }
/* ---------- Words ---------- */
.words-card { max-width: 380px; display: grid; gap: 8px; }
.words-card.done { opacity: .94; }
.wd-score { font-variant-numeric: tabular-nums; color: var(--accent-t); margin-left: 2px; }
.wd-mini { width: 100%; max-width: 300px; aspect-ratio: 1; height: auto; border-radius: 10px; display: block; cursor: pointer; }
.wd-last { font-size: 12.5px; color: var(--muted); }
.modal-card.words-modal { width: min(700px, 96vw); max-width: 96vw; }
.wd-help { margin: -2px 0 8px; line-height: 1.45; }
.wd-scores { display: grid; gap: 4px; margin-bottom: 8px; }
.wd-wrap { position: relative; display: grid; justify-items: center; }
.wd-board { container-type: inline-size; width: min(100%, 600px, max(300px, calc(100dvh - 380px))); aspect-ratio: 1; display: grid; grid-template-columns: repeat(15, 1fr); gap: 2px; padding: 4px; background: #2a211a; border-radius: 12px; touch-action: none; user-select: none; -webkit-user-select: none; }
.wd-cell { position: relative; background: #3a2e25; border-radius: 3px; display: grid; place-items: center; min-width: 0; min-height: 0; }
.wd-cell.b-tw { background: #b33f2c; } .wd-cell.b-dw { background: #c47a34; } .wd-cell.b-tl { background: #36709f; } .wd-cell.b-dl { background: #3f8580; } .wd-cell.b-st { background: #c47a34; }
.wd-blab { font: 800 2.1cqw/1 Inter, system-ui, sans-serif; color: rgba(255,255,255,.82); letter-spacing: -.02em; }
.wd-cell.b-st .wd-blab { font-size: 3.6cqw; }
.wd-cell.target { cursor: pointer; box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--accent) 55%, transparent); }
.wd-cell.hover { box-shadow: inset 0 0 0 2px var(--accent); }
.wd-tile { position: relative; width: 100%; height: 100%; border-radius: 4px; background: linear-gradient(#f6ead2, #e7d3ad); color: #3a2614; display: grid; place-items: center; box-shadow: inset 0 -2px 0 rgba(0,0,0,.18); cursor: default; }
.wd-tile b { font: 800 4.2cqw/1 Inter, system-ui, sans-serif; }
.wd-tile i { position: absolute; right: 8%; bottom: 4%; font: 700 1.9cqw/1 Inter, system-ui, sans-serif; font-style: normal; opacity: .75; }
.wd-tile.blank b { color: #8a5a2b; }
.wd-cell.last .wd-tile { background: linear-gradient(#ffd79a, #f0bb6a); }
.wd-tile.pending { background: linear-gradient(#ffc58a, #f39a4c); cursor: grab; outline: 2px solid var(--accent); outline-offset: -2px; }
.wd-preview { min-height: 20px; text-align: center; font-size: 13px; font-weight: 600; margin: 8px 0 4px; color: var(--muted); }
.wd-preview.good { color: #7bc96f; } .wd-preview.bad { color: #ef7d6a; }
.wd-rack { display: flex; justify-content: center; gap: 6px; padding: 8px; border-radius: 12px; background: var(--bg3, rgba(255,255,255,.05)); min-height: 60px; container-type: normal; touch-action: none; }
.wd-rack .wd-tile, .wd-slot { width: 44px; height: 44px; flex: 0 0 auto; }
.wd-slot { border-radius: 6px; border: 1.5px dashed rgba(255,255,255,.12); }
.wd-rack .wd-tile { cursor: pointer; }
.wd-rack .wd-tile b { font-size: 22px; } .wd-rack .wd-tile i { font-size: 10px; }
.wd-tile.rack.sel { transform: translateY(-5px); outline: 2.5px solid var(--accent); outline-offset: 1px; }
.wd-tile.rack.swap { outline: 2.5px dashed #ef7d6a; outline-offset: 1px; opacity: .8; }
.wd-tile.dragging { opacity: .3; }
.wd-ghost { position: fixed; z-index: 9999; width: 44px; height: 44px; pointer-events: none; transform: translate(-50%, -60%) scale(1.08); box-shadow: 0 8px 18px rgba(0,0,0,.4); }
.wd-ghost b { font-size: 22px !important; } .wd-ghost i { font-size: 10px !important; }
.wd-ctrl { display: flex; align-items: center; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.wd-ctrl .grow { flex: 1; }
.wd-picker { position: absolute; inset: 10% 8% auto; z-index: 3; background: var(--bg1, #1c1612); border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: grid; gap: 10px; justify-items: center; box-shadow: 0 14px 40px rgba(0,0,0,.5); }
.wd-pick-t { font-weight: 700; }
.wd-pick-g { display: grid; grid-template-columns: repeat(7, 38px); gap: 5px; }
.wd-pick-b { height: 38px; border-radius: 6px; border: 0; background: linear-gradient(#f6ead2, #e7d3ad); color: #3a2614; font: 800 17px Inter, sans-serif; cursor: pointer; }
.wd-pick-b:hover { outline: 2px solid var(--accent); }
@media (max-width: 560px) { .wd-rack { gap: 4px; padding: 6px; } .wd-rack .wd-tile, .wd-slot { width: 38px; height: 38px; } .wd-rack .wd-tile b { font-size: 19px; } .modal-card.words-modal { padding: 10px; } .wd-board { gap: 1px; padding: 2px; } .wd-pick-g { grid-template-columns: repeat(6, 36px); } }

/* Site admin → People (cleaner list) */
.pp-filters { display: flex; gap: 6px; flex-wrap: wrap; margin: 2px 0 6px; }
.pp-filter { display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--text-2); font: 600 12.5px/1 inherit; cursor: pointer; }
.pp-filter b { font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.pp-filter:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); color: var(--text); }
.pp-filter.on { background: color-mix(in srgb, var(--accent) 16%, transparent); border-color: color-mix(in srgb, var(--accent) 55%, transparent); color: var(--text); }
.pp-filter.on b { color: var(--accent-t); }
.pp-list { display: grid; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.pp-empty { padding: 14px; }
.pp-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 14px; padding: 11px 14px; border-top: 1px solid var(--line); }
.pp-row:first-child { border-top: 0; }
.pp-row:hover { background: color-mix(in srgb, var(--text) 3%, transparent); }
.pp-row.suspended { opacity: .6; }
.pp-av { position: relative; display: grid; }
.pp-dot { position: absolute; right: -1px; bottom: -1px; width: 12px; height: 12px; border-radius: 50%; background: #6b6460; border: 2.5px solid var(--bg1); }
.pp-dot.on { background: var(--green); }
.pp-main { min-width: 0; display: grid; gap: 3px; }
.pp-name { display: flex; align-items: center; gap: 6px; min-width: 0; flex-wrap: wrap; }
.pp-name > b { font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-tag { display: inline-flex; align-items: center; gap: 3px; height: 20px; padding: 0 7px; border-radius: 6px; font: 700 11px/1 inherit; background: var(--bg3); color: var(--text-2); }
.pp-tag:not(:has(span)) { padding: 0 5px; }
.pp-tag.admin { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent-t); }
.pp-tag.beta { background: color-mix(in srgb, #9b6dff 18%, transparent); color: #b99bff; }
.pp-tag.good { background: transparent; color: var(--green-t); }
.pp-tag.bug { background: color-mix(in srgb, #3ba55d 16%, transparent); color: #6fd38f; }
.pp-tag.contrib { background: color-mix(in srgb, #2fbf9f 16%, transparent); color: #5fd9bd; }
.pp-tag.bad { background: color-mix(in srgb, var(--red) 16%, transparent); color: var(--red-t); }
.pp-sub { display: flex; gap: 6px; font-size: 12.5px; color: var(--muted); min-width: 0; white-space: nowrap; overflow: hidden; }
.pp-sub .pp-on { color: var(--green-t); font-weight: 600; }
.pp-servers { overflow: hidden; text-overflow: ellipsis; }
.pp-sep { opacity: .5; }
.pp-stats { display: grid; grid-template-columns: 70px 64px 84px 92px; gap: 4px; }
.pp-stat { display: grid; gap: 2px; text-align: right; }
.pp-stat b { font-size: 13.5px; font-variant-numeric: tabular-nums; }
.pp-stat span { font-size: 11px; color: var(--muted); }
.pp-stat.dim b { color: var(--muted); font-weight: 500; }
@media (max-width: 700px) {
  .pp-row { grid-template-columns: auto minmax(0, 1fr) auto; row-gap: 8px; }
  .pp-stats { grid-column: 2 / 4; grid-row: 2; grid-template-columns: repeat(4, auto); justify-content: start; gap: 18px; }

  .pp-stat { text-align: left; }
}

/* What's new sits in the same corner column as the other pop-ups */
.notice-stack .wn-card { position: relative; right: auto; bottom: auto; width: auto; }
.admin-row .bt-sub { margin-top: 8px; }
.admin-row .bt-list { margin-top: 4px; }
.admin-row > .grow > .btn.xs { margin-top: 6px; }

/* Lodge on a phone: the home-screen guide */
.modal-card.pa-modal { width: min(460px, 96vw); }
.pa-plat { display: grid; gap: 8px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; margin-top: 10px; }
.pa-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.pa-steps li { display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: start; }
.pa-n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent-t); }
.pa-t { display: grid; gap: 6px; font-size: 14px; line-height: 1.4; padding-top: 3px; }
.pa-glyph { display: inline-grid; place-items: center; width: 40px; height: 34px; border-radius: 9px; background: var(--bg3); color: #4a9eff; }
.pa-appicon { display: inline-grid; justify-items: center; gap: 3px; font-size: 11px; color: var(--muted); width: max-content; }
.pa-appicon img { width: 44px; height: 44px; border-radius: 11px; }
.pa-warn { padding: 9px 12px; border-radius: 10px; background: color-mix(in srgb, #e6b422 14%, transparent); color: var(--text); font-size: 13px; margin: 6px 0 0; }
.pa-done { padding: 9px 12px; border-radius: 10px; background: color-mix(in srgb, var(--green) 14%, transparent); color: var(--text); font-size: 13.5px; font-weight: 600; }
.pa-card { display: grid; gap: 8px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 14px; }

.h-older { margin: -4px 0 10px; }

/* What's new: older updates folded to one line each */
.wn-search { width: 100%; margin-bottom: 4px; }
.wn-list { display: grid; gap: 8px; }
.wn-month { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin: 10px 0 0; }
.wn-note.folded { padding: 0; gap: 0; }
.wn-fold { all: unset; box-sizing: border-box; width: 100%; display: grid; grid-template-columns: 52px minmax(0, 1fr) auto 16px; align-items: center; gap: 10px; padding: 10px 14px; cursor: pointer; }
.wn-fold:hover { background: var(--hover); border-radius: 12px; }
.wn-fold-date { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.wn-fold-title { font-size: 14px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wn-fold-n { font-size: 12px; color: var(--muted); white-space: nowrap; }
.wn-fold-ic { color: var(--muted); transition: transform .15s; }
.wn-note.folded.open .wn-fold-ic { transform: rotate(180deg); }
.wn-note.folded.open .wn-fold-title { white-space: normal; }
.wn-fold-body { padding: 0 14px 12px; display: grid; gap: 4px; }
.wn-note.folded:not(.open) .wn-fold-body { display: none; }
.wn-none { padding: 10px 2px; }
@media (max-width: 560px) { .wn-fold { grid-template-columns: minmax(0, 1fr) 16px; } .wn-fold-date, .wn-fold-n { display: none; } }
.wn-timeline .wn-note.folded::before { top: 15px; }

.lp-legal { flex-basis: 100%; font-size: 13px; color: #8e939b; }
.lp-legal a { color: #c9c7c3; }
.set-ver a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.set-ver a:hover { color: var(--text); }
#authLegal { margin: 0; line-height: 1.45; }

.bt-stack { display: grid; gap: 10px; }

/* ---------- invites ---------- */
.modal-card.iv-modal { width: min(520px, 96vw); padding: 0; overflow: hidden; }
.iv-hero { display: flex; align-items: center; gap: 14px; padding: 22px 22px 18px; background: radial-gradient(ellipse at 0% 0%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 70%); border-bottom: 1px solid var(--line); position: relative; }
.iv-hero .iv-icon { width: 56px; height: 56px; border-radius: 16px; font-size: 20px; flex: none; box-shadow: 0 6px 18px rgba(0,0,0,.35); }
.iv-hero-t { display: grid; gap: 2px; min-width: 0; flex: 1; }
.iv-kicker { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.iv-name { font-size: 22px; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.iv-stats { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); margin-top: 2px; }
.iv-stats span + .iv-dot { margin-left: 8px; }
.iv-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.iv-dot.on { background: var(--green); }
.iv-x { position: absolute; top: 14px; right: 14px; }
.iv-card { padding: 20px 22px 6px; display: grid; gap: 12px; }
.iv-linkrow { display: flex; gap: 8px; align-items: stretch; }
.iv-link { all: unset; box-sizing: border-box; flex: 1; min-width: 0; display: flex; align-items: center; padding: 0 14px; height: 48px; border-radius: 12px; background: var(--bg0); border: 1px solid var(--line); cursor: pointer; font: 600 15px/1 var(--mono); overflow: hidden; white-space: nowrap; }
.iv-link:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.iv-base { color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.iv-code { color: var(--accent-t); flex: none; }
.iv-copy { height: 48px; padding: 0 18px; gap: 6px; display: inline-flex; align-items: center; white-space: nowrap; }
.iv-copy.done, .btn.done { background: var(--green); border-color: var(--green); }
.iv-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.iv-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--text-2); padding: 4px 10px; border-radius: 999px; background: var(--bg3); }
.iv-chip svg { color: var(--muted); }
.iv-extra { display: flex; gap: 6px; }
.iv-custom { margin: 10px 22px 22px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.iv-custom-h { all: unset; box-sizing: border-box; width: 100%; display: flex; align-items: center; gap: 10px; padding: 12px 14px; cursor: pointer; font-weight: 600; font-size: 14px; }
.iv-custom-h:hover { background: var(--hover); }
.iv-chev { color: var(--muted); transition: transform .15s; }
.iv-custom.open .iv-chev { transform: rotate(180deg); }
.iv-custom-b { display: none; padding: 2px 14px 14px; gap: 8px; }
.iv-custom.open .iv-custom-b { display: grid; }
/* Server settings → Invites */
.iv-tabtop { display: flex; justify-content: flex-end; margin-bottom: 10px; }
.iv-tabtop .btn { display: inline-flex; align-items: center; gap: 6px; }
.iv-list { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.iv-item { display: grid; grid-template-columns: 34px minmax(0, 1fr) 90px 150px auto; align-items: center; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--line); }
.iv-item:first-child { border-top: 0; }
.iv-item:hover { background: var(--hover); }
.iv-item.main { background: color-mix(in srgb, var(--accent) 6%, transparent); }
.iv-item-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--bg3); color: var(--muted); }
.iv-item.main .iv-item-ic { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent-t); }
.iv-item-name { display: flex; align-items: center; gap: 8px; }
.iv-item-name code { font: 600 14px var(--mono); }
.iv-tag { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent-t); }
.iv-item-sub { font-size: 12.5px; color: var(--muted); }
.iv-usage { display: grid; gap: 3px; justify-items: end; font-size: 11.5px; color: var(--muted); }
.iv-usage b { font-size: 14px; color: var(--text); font-variant-numeric: tabular-nums; }
.iv-bar { width: 70px; height: 4px; border-radius: 99px; background: var(--bg3); overflow: hidden; display: block; }
.iv-bar i { display: block; height: 100%; background: var(--accent); }
.iv-exp { font-size: 12.5px; color: var(--muted); text-align: right; }
.iv-acts { display: flex; gap: 2px; }
.iv-acts .danger:hover { color: var(--red-t); }
.iv-empty { margin-top: 10px; }
@media (max-width: 640px) { .iv-item { grid-template-columns: 34px minmax(0, 1fr) auto; } .iv-usage, .iv-exp { display: none; } .iv-linkrow { flex-direction: column; } .iv-link { flex: none; height: 46px; font-size: 14px; } .iv-hero { padding: 18px 16px 14px; } .iv-card { padding: 16px 16px 4px; } .iv-custom { margin: 10px 16px 16px; } }

/* Keeper live status card (statuscard.js) */
.stc { margin-top: 4px; max-width: 560px; min-width: 0; display: grid; gap: 10px; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--line); background: radial-gradient(380px 120px at 0% 0%, color-mix(in srgb, var(--tone, var(--green)) 13%, transparent), transparent 70%), var(--bg2); --tone: var(--green); }
.stc.st-degraded { --tone: var(--yellow); } .stc.st-down { --tone: var(--red); } .stc.st-maint { --tone: var(--blue); } .stc.st-unknown { --tone: var(--muted); }
.stc-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.stc-kicker { font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.stc-title { font-family: Bricolage, Inter, sans-serif; font-size: 17px; font-weight: 700; }
.stc-link { font-size: 12.5px; font-weight: 700; color: var(--accent-t); text-decoration: none; white-space: nowrap; }
.stc-link:hover { text-decoration: underline; }
.stc-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--muted); }
.stc-dot.up { background: var(--green); } .stc-dot.degraded { background: var(--yellow); } .stc-dot.down { background: var(--red); } .stc-dot.maint { background: var(--blue); }
.stc-dot.big { width: 14px; height: 14px; background: var(--tone); box-shadow: 0 0 0 5px color-mix(in srgb, var(--tone) 18%, transparent); animation: stc-pulse 2.4s ease-in-out infinite; }
@keyframes stc-pulse { 50% { box-shadow: 0 0 0 9px color-mix(in srgb, var(--tone) 6%, transparent); } }
@media (prefers-reduced-motion: reduce) { .stc-dot.big { animation: none; } }
.stc-list { display: grid; gap: 6px; }
.stc-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--bg1); border: 1px solid var(--line); min-width: 0; }
.stc-name { display: grid; min-width: 0; } .stc-name b { font-size: 13.5px; }
.stc-note { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stc-stats { display: flex; gap: 10px; font-size: 12px; font-weight: 600; color: var(--text-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.stc-ms { color: var(--muted); }
.stc-inc { display: grid; gap: 4px; font-size: 13px; padding: 8px 10px; border-radius: 10px; background: color-mix(in srgb, var(--tone) 10%, var(--bg1)); }
.stc-foot { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); flex-wrap: wrap; font-variant-numeric: tabular-nums; }
.stc-clock.late { color: var(--yellow-t); }
.stc-auto { font-size: 11.5px; }
@media (max-width: 520px) { .stc-ms { display: none; } .stc-auto { display: none; } }

/* what someone's up to (presence.js): member list line, profile card block, set-an-activity window */
.at-playing { --at: var(--accent); } .at-watching { --at: #e06c9f; } .at-listening { --at: var(--green); } .at-custom { --at: var(--blue); }
.m-sub.m-act { color: var(--text-2); display: block; }
.m-sub.m-act svg { color: var(--at); vertical-align: -2px; margin-right: 4px; display: inline-block; }
.m-sub.m-act .m-act-verb { color: var(--muted); }
.m-sub.m-act b { font-weight: 650; color: var(--text); }
.pc-status { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; margin-top: 6px; padding: 6px 11px; border-radius: 4px 14px 14px 14px; background: var(--bg1); border: 1px solid var(--line); font-size: 13.5px; color: var(--text); overflow-wrap: anywhere; }
.pc-status-emoji { font-size: 16px; line-height: 1; }
.pc-act { margin-top: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--at) 32%, var(--line)); background: linear-gradient(135deg, color-mix(in srgb, var(--at) 13%, var(--bg1)), var(--bg1) 70%); display: grid; gap: 7px; }
.pc-act-kicker { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--at); }
.pc-act-row { display: flex; align-items: center; gap: 11px; min-width: 0; }
.pc-act-row .grow { min-width: 0; }
.pc-act-name { display: block; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-act-sub { font-size: 12px; color: var(--muted); }
.act-icon-tile { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; flex: none; color: #fff; background: color-mix(in srgb, var(--at) 80%, #000); }
.act-icon-tile.lg, .game-tile.lg { width: 42px; height: 42px; border-radius: 10px; font-size: 19px; }
.act-tag.at-watching, .act-tag.at-listening, .act-tag.at-custom { color: var(--at); }
.side-profile .pc-act { text-align: left; margin: 10px 12px 0; }
.actm-kinds { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.actm-kind { display: grid; justify-items: center; gap: 5px; padding: 10px 4px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg1); color: var(--muted); font: inherit; font-size: 12.5px; font-weight: 650; cursor: pointer; }
.actm-kind svg { color: var(--at); }
.actm-kind:hover { border-color: color-mix(in srgb, var(--at) 50%, var(--line)); color: var(--text); }
.actm-kind.on { border-color: var(--at); color: var(--text); background: color-mix(in srgb, var(--at) 14%, var(--bg1)); }
.actm-input { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 0 0 0 12px; border-radius: 10px; background: var(--bg0); border: 1px solid var(--line); }
.actm-input:focus-within { border-color: var(--accent); }
.actm-verb { font-weight: 700; color: var(--muted); white-space: nowrap; font-size: 14px; }
.actm-input input { border: 0; background: transparent; flex: 1; min-width: 0; }
.actm-input input:focus { outline: none; box-shadow: none; }
.actm-preview { margin: 10px 0 4px; padding: 10px 12px; border-radius: 10px; border: 1px dashed var(--line); display: grid; gap: 6px; }
.actm-pk { font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.actm-line { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 14px; }
.actm-line b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 420px) { .actm-kinds { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Android app download (phoneapp.js) */
.pa-sub { font-weight: 700; margin: 8px 0 6px; }
.pa-android { display: grid; gap: 8px; }
.pa-android .pa-dl { width: 100%; justify-content: center; }
.pa-more { margin-top: 10px; }
.pa-more summary { cursor: pointer; color: var(--muted); font-size: 13px; font-weight: 600; }
.pa-more[open] summary { margin-bottom: 8px; }
a.btn, a.btn:hover { text-decoration: none; }

/* a pasted message link, shown as a quote (chat.js msgLinkEmbed) */
.msglink-embed { margin-top: 6px; max-width: 520px; display: grid; gap: 6px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); border-left: 3px solid var(--accent); background: var(--bg2); min-width: 0; }
.msglink-embed.bad { border-left-color: var(--line); }
.ml-head { display: flex; align-items: center; gap: 7px; min-width: 0; flex-wrap: wrap; font-size: 13.5px; }
.ml-text { font-size: 14px; color: var(--text-2); overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.ml-img { max-width: 220px; max-height: 160px; border-radius: 8px; object-fit: cover; }
.ml-jump { justify-self: start; }

/* ---------- leagues (pool + Words) ---------- */
.league-card { max-width: 460px; display: grid; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--bg2); border: 1px solid var(--line); border-left: 4px solid #e8b931; }
.lg-head { display: flex; align-items: center; gap: 10px; }
.lg-trophy { font-size: 26px; line-height: 1; }
.lg-kicker { display: block; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #e8b931; }
.lg-table { display: grid; gap: 3px; }
.lg-game { font-weight: 700; font-size: 13.5px; margin-bottom: 2px; }
.lg-last { margin: -2px 0 4px; }
.lg-row { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 9px; background: var(--bg1); font-size: 13.5px; }
.lg-row.me { box-shadow: inset 0 0 0 1px var(--accent-soft); background: color-mix(in srgb, var(--accent) 7%, var(--bg1)); }
.lg-row.top { background: color-mix(in srgb, #e8b931 10%, var(--bg1)); }
.lg-row.placing .lg-name, .lg-row.placing .lg-rating { opacity: .65; }
.lg-pos { width: 20px; text-align: center; font-weight: 700; color: var(--muted); flex: none; }
.lg-mv { width: 26px; font-size: 11px; font-weight: 700; color: var(--muted); flex: none; text-align: center; }
.lg-mv.up { color: var(--green-t); } .lg-mv.down { color: var(--red-t); } .lg-mv.new { color: var(--blue); }
.lg-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lg-rec { font-size: 12px; color: var(--muted); white-space: nowrap; }
.lg-streak { font-size: 11.5px; white-space: nowrap; }
.lg-rating { min-width: 40px; text-align: right; font-variant-numeric: tabular-nums; }
.lg-crowned { display: grid; gap: 6px; }
.lg-champ { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: color-mix(in srgb, #e8b931 12%, var(--bg1)); }
.lg-empty { padding: 4px 2px; }
.lg-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 12.5px; color: var(--muted); padding: 6px 8px; border-radius: 9px; background: var(--bg1); }
.lg-tag { font-weight: 700; color: #e8b931; }
.lg-where { color: var(--text-2); }
.lg-p { display: inline-flex; gap: 5px; align-items: baseline; }
.lg-p b { color: var(--text); font-weight: 600; }
.lg-d { font-weight: 700; } .lg-d.up { color: var(--green-t); } .lg-d.down { color: var(--red-t); }
.lg-r { font-variant-numeric: tabular-nums; }

/* ---------- Keeper staff commands (private answers): same look as the invite window ---------- */
.modal-card.kst-modal { width: min(540px, 96vw); padding: 0; overflow: hidden auto; display: block; }
.modal-card.kst-modal.wide { width: min(680px, 96vw); }
.kst-hero { display: flex; align-items: center; gap: 14px; padding: 22px 56px 18px 22px; background: radial-gradient(ellipse at 0% 0%, color-mix(in srgb, var(--kst-c, var(--accent)) 18%, transparent), transparent 70%); border-bottom: 1px solid var(--line); position: relative; }
.kst-hero.good { --kst-c: var(--green); } .kst-hero.warn { --kst-c: var(--yellow); } .kst-hero.bad, .kst-hero.danger { --kst-c: var(--red); }
.kst-ic { width: 56px; height: 56px; border-radius: 16px; flex: none; display: grid; place-items: center; color: var(--kst-c, var(--accent)); background: color-mix(in srgb, var(--kst-c, var(--accent)) 16%, var(--bg2)); box-shadow: 0 6px 18px rgba(0,0,0,.3); }
.kst-av { flex: none; width: 56px !important; height: 56px !important; font-size: 20px; }
.kst-hero-t { display: grid; gap: 2px; min-width: 0; flex: 1; }
.kst-kicker { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.kst-title { font-size: 20px; line-height: 1.2; overflow-wrap: anywhere; }
.kst-sub { font-size: 13px; color: var(--muted); }
.kst-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.kst-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--text-2); padding: 3px 10px; border-radius: 999px; background: var(--bg3); }
.kst-chip svg { color: var(--muted); }
.kst-x { position: absolute; top: 14px; right: 14px; }
.kst-body { padding: 18px 22px 18px; display: grid; gap: 16px; }
.kst-block { display: grid; gap: 8px; min-width: 0; }
.kst-btitle { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.kst-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.kst-stat { display: grid; gap: 3px; padding: 11px 14px; background: var(--bg2); min-width: 0; }
.kst-label { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.kst-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); flex: none; }
.kst-stat.good .kst-dot { background: var(--green); } .kst-stat.warn .kst-dot { background: var(--yellow); } .kst-stat.bad .kst-dot { background: var(--red); }
.kst-stat.bad .kst-val { color: var(--red-t); } .kst-stat.warn .kst-val { color: var(--yellow-t); }
.kst-val { font-size: 15px; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kst-list { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.kst-item { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-top: 1px solid var(--line); }
.kst-item:first-child { border-top: 0; }
.kst-item:hover { background: var(--hover); }
.kst-it { font-weight: 600; font-size: 14px; overflow-wrap: anywhere; }
.kst-isub { font-size: 12.5px; color: var(--muted); }
.kst-quote { margin-top: 5px; padding: 4px 10px; border-left: 3px solid var(--bg4); color: var(--text-2); font-size: 13px; overflow-wrap: anywhere; }
.kst-code { margin: 5px 0 0; padding: 6px 8px; border-radius: 8px; background: var(--code-bg); font: 11.5px/1.4 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; color: var(--muted); }
.kst-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.kst-pill { padding: 4px 11px; border-radius: 999px; background: var(--bg3); font-size: 12.5px; color: var(--text-2); }
.kst-empty { font-size: 13px; color: var(--muted); }
.kst-foot { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); padding-top: 2px; }
.kst-lead { margin: 0; color: var(--text-2); }
.kst-details { display: grid; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.kst-detail { padding: 10px 14px; border-top: 1px solid var(--line); font-size: 13.5px; overflow-wrap: anywhere; }
.kst-detail:first-child { border-top: 0; }
.kst-acts { display: flex; justify-content: flex-end; gap: 8px; }
.kst-go { min-width: 110px; }
@media (max-width: 520px) { .kst-hero { padding: 18px 50px 16px 16px; gap: 12px; } .kst-ic, .kst-av { width: 46px !important; height: 46px !important; border-radius: 13px; } .kst-body { padding: 16px; } .kst-title { font-size: 18px; } }
.kst-body > *, .kst-block > *, .kst-b-link .iv-linkrow > * { min-width: 0; }
.kst-b-link .iv-link { overflow: hidden; white-space: nowrap; }

/* ---------- You and them (profile card) ---------- */
.yt { display: grid; gap: 8px; padding: 12px; border-radius: 14px; background: linear-gradient(150deg, color-mix(in srgb, var(--accent) 10%, var(--bg2)), var(--bg2) 65%); border: 1px solid color-mix(in srgb, var(--accent) 25%, var(--line)); }
.yt-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.yt-kicker { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-2); }
.yt-since { font-size: 12.5px; color: var(--muted); }
.yt-since::before { content: '·'; margin-right: 8px; }
.yt-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 6px; }
.yt-tile { display: grid; grid-template-columns: auto 1fr; column-gap: 7px; align-items: center; padding: 8px 10px; border-radius: 10px; background: var(--bg1); min-width: 0; }
.yt-tile .yt-ic { grid-row: span 2; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-t); }
.yt-tile b { font-size: 14.5px; line-height: 1.2; }
.yt-tile > span:last-child { font-size: 11.5px; color: var(--muted); line-height: 1.25; }
.yt-tile.live .yt-ic { background: color-mix(in srgb, var(--green) 18%, transparent); color: var(--green-t); }
.yt-tile.live b { color: var(--green-t); }
.yt-sub { font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.yt-glist { display: grid; gap: 4px; }
.yt-game { display: flex; align-items: center; gap: 9px; padding: 5px 8px; border-radius: 9px; background: var(--bg1); }
.yt-game b { font-size: 13px; }
.yt-gsub { font-size: 11.5px; color: var(--muted); }
.yt-h2h { display: flex; flex-wrap: wrap; gap: 6px; }
.yt-score { display: inline-flex; align-items: baseline; gap: 6px; padding: 5px 10px; border-radius: 999px; background: var(--bg1); font-size: 12.5px; color: var(--text-2); }
.yt-score b { font-variant-numeric: tabular-nums; color: var(--text); }
.yt-score.up b { color: var(--green-t); } .yt-score.down b { color: var(--red-t); }
.yt-who { color: var(--muted); font-size: 11.5px; }

/* ---------- Your month (monthly recap) ---------- */
.modal-card.mo-modal { width: min(560px, 96vw); padding: 0; overflow: hidden auto; display: block; }
.mo-hero { display: flex; align-items: center; gap: 14px; padding: 22px 56px 18px 22px; position: relative; border-bottom: 1px solid var(--line);
  background: radial-gradient(ellipse at 0% 0%, color-mix(in srgb, var(--accent) 24%, transparent), transparent 65%), radial-gradient(ellipse at 100% 0%, color-mix(in srgb, var(--blue) 14%, transparent), transparent 60%); }
.mo-ic { width: 56px; height: 56px; border-radius: 16px; flex: none; display: grid; place-items: center; color: var(--accent-t); background: color-mix(in srgb, var(--accent) 18%, var(--bg2)); box-shadow: 0 6px 18px rgba(0,0,0,.3); }
.mo-hero-t { display: grid; gap: 2px; min-width: 0; }
.mo-kicker { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.mo-title { font-size: 21px; line-height: 1.2; }
.mo-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.mo-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--text-2); padding: 3px 10px; border-radius: 999px; background: var(--bg3); }
.mo-chip svg { color: var(--muted); }
.mo-x { position: absolute; top: 14px; right: 14px; }
.mo-body { padding: 18px 22px 20px; display: grid; gap: 16px; }
.mo-nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.mo-num { display: grid; gap: 4px; padding: 12px 14px; border-radius: 12px; background: var(--bg1); border: 1px solid var(--line); min-width: 0; }
.mo-numtop { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.mo-num b { font-size: 26px; line-height: 1.05; font-variant-numeric: tabular-nums; }
.mo-chg { font-size: 11.5px; font-weight: 700; color: var(--muted); }
.mo-chg.up { color: var(--green-t); } .mo-chg.down { color: var(--red-t); }
.mo-vs { margin-top: -10px; font-size: 11.5px; color: var(--muted); }
.mo-sec { display: grid; gap: 8px; min-width: 0; }
.mo-h { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.mo-list { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.mo-row { display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-top: 1px solid var(--line); min-width: 0; }
.mo-row:first-child { border-top: 0; }
.mo-row b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mo-row.champ { background: color-mix(in srgb, #e8b931 10%, transparent); }
.mo-rank { width: 16px; font-weight: 700; color: var(--muted); text-align: center; flex: none; }
.mo-val { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text-2); flex: none; }
.mo-sub { font-size: 12px; color: var(--muted); }
.mo-lg { font-size: 18px; flex: none; }
.mo-people { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; }
.mo-person { all: unset; box-sizing: border-box; cursor: pointer; display: grid; justify-items: center; gap: 4px; padding: 12px 8px; border-radius: 12px; background: var(--bg1); border: 1px solid var(--line); text-align: center; min-width: 0; }
.mo-person:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.mo-person b { font-size: 13.5px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mo-person span:last-child { font-size: 11.5px; color: var(--muted); }
.mo-two { grid-template-columns: 1fr 1fr; gap: 8px; }
.mo-mini { display: grid; gap: 6px; padding: 12px 14px; border-radius: 12px; background: var(--bg1); border: 1px solid var(--line); }
.mo-emoji { font-size: 22px; line-height: 1.2; font-weight: 700; }
.mo-top { all: unset; box-sizing: border-box; cursor: pointer; display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--bg1); border: 1px solid var(--line); }
.mo-top:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.mo-top img { width: 64px; height: 64px; border-radius: 9px; object-fit: cover; flex: none; }
.mo-quote { font-size: 14px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.mo-where { margin-top: 4px; font-size: 12px; color: var(--muted); }
.mo-foot { display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--muted); }
@media (max-width: 520px) { .mo-hero { padding: 18px 50px 16px 16px; } .mo-ic { width: 46px; height: 46px; } .mo-body { padding: 16px; } .mo-num b { font-size: 21px; } .mo-num { padding: 10px; } .mo-title { font-size: 18px; } }

/* colored pill tooltips on badges and tags (same look as the staff name tip) */
.pill-tip { position: fixed; z-index: 9999; pointer-events: none; max-width: 280px; padding: 6px 11px; border-radius: 9px; background: var(--bg4); color: var(--text); box-shadow: 0 8px 24px var(--shadow); animation: pop-in .12s ease-out; font-size: 12.5px; }
.pill-tip.colored { color: #fff; background: linear-gradient(120deg, color-mix(in srgb, var(--pc) 88%, #000), color-mix(in srgb, var(--pc) 78%, #ffffff) 50%, color-mix(in srgb, var(--pc) 88%, #000)); background-size: 220% 100%; animation: pop-in .12s ease-out, staff-shine 2.4s linear infinite; box-shadow: 0 8px 24px color-mix(in srgb, var(--pc) 35%, transparent); text-shadow: 0 1px 2px rgba(0,0,0,.25); }
.pt-top { display: flex; align-items: center; gap: 7px; }
.pt-top b { font-weight: 800; letter-spacing: .02em; }
.pt-ic { display: grid; place-items: center; }
.pt-emoji { font-size: 14px; line-height: 1; }
.pt-sub { margin-top: 3px; font-size: 12px; font-weight: 500; opacity: .92; line-height: 1.35; }
@media (prefers-reduced-motion: reduce) { .pill-tip.colored { animation: none; } }
.pp-stat.old b { color: var(--yellow-t); }
.pp-tag.old { background: color-mix(in srgb, var(--yellow) 16%, transparent); color: var(--yellow-t); }

/* ---------- /help ---------- */
.modal-card.hp-modal { width: min(620px, 96vw); padding: 0; overflow: hidden auto; display: block; }
.hp-hero { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; align-items: center; padding: 22px 56px 16px 22px; position: relative; border-bottom: 1px solid var(--line); background: radial-gradient(ellipse at 0% 0%, color-mix(in srgb, var(--accent) 20%, transparent), transparent 70%); position: sticky; top: 0; z-index: 2; background-color: var(--bg2); }
.hp-av { width: 52px; height: 52px; border-radius: 15px; background: var(--bg1); padding: 6px; box-shadow: 0 6px 18px rgba(0,0,0,.3); }
.hp-hero-t { display: grid; gap: 1px; min-width: 0; }
.hp-kicker { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.hp-title { font-size: 21px; }
.hp-sub { font-size: 13px; color: var(--muted); }
.hp-x { position: absolute; top: 14px; right: 14px; }
.hp-findwrap { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; margin-top: 8px; padding: 0 12px; height: 40px; border-radius: 11px; background: var(--bg0); border: 1px solid var(--line); color: var(--muted); }
.hp-findwrap:focus-within { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.hp-search { all: unset; flex: 1; min-width: 0; color: var(--text); font-size: 14px; }
.hp-body { padding: 16px 22px 22px; display: grid; gap: 18px; }
.hp-sec { display: grid; gap: 8px; }
.hp-h { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.hp-n { margin-left: 2px; padding: 1px 7px; border-radius: 99px; background: var(--bg3); font-size: 11px; letter-spacing: 0; }
.hp-only { margin-left: auto; text-transform: none; letter-spacing: 0; font-weight: 600; color: var(--accent-2); font-size: 11.5px; }
.hp-sub2 { font-size: 12.5px; color: var(--muted); margin-top: -4px; }
.hp-list { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.hp-row { display: grid; gap: 7px; padding: 11px 14px; border-top: 1px solid var(--line); }
.hp-row:first-child { border-top: 0; }
.hp-top { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.hp-cmd { font: 700 14px var(--mono); color: var(--accent-t); flex: none; }
.hp-what { font-size: 13.5px; color: var(--text-2); flex: 1; min-width: 180px; }
.hp-exs { display: flex; flex-wrap: wrap; gap: 6px; }
.hp-ex { all: unset; box-sizing: border-box; cursor: pointer; font: 12.5px var(--mono); padding: 4px 9px; border-radius: 7px; background: var(--bg1); border: 1px solid var(--line); color: var(--text); }
.hp-ex:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); color: var(--accent-2); }
.hp-ex.big { font-weight: 700; color: var(--accent-t); }
.hp-sec.staff .hp-list { border-color: color-mix(in srgb, var(--accent) 30%, var(--line)); background: color-mix(in srgb, var(--accent) 3%, transparent); }
.hp-owner { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent-t); }
.hp-note { padding: 10px 14px; border-radius: 10px; background: var(--bg1); color: var(--muted); font-size: 13px; }
@media (max-width: 520px) { .hp-hero { padding: 18px 50px 14px 16px; } .hp-body { padding: 14px 16px 18px; } .hp-what { min-width: 0; flex-basis: 100%; } }
.hp-findwrap .hp-search, .hp-findwrap .hp-search:focus { border: 0; background: transparent; box-shadow: none; outline: none; padding: 0; height: 100%; border-radius: 0; }
.hp-sec.staff .hp-top { flex-direction: column; align-items: flex-start; gap: 5px; }
.hp-sec.staff .hp-what { min-width: 0; }
.hp-sec.staff .hp-row { position: relative; }
.hp-sec.staff .hp-owner { position: absolute; top: 12px; right: 12px; }
.pill-tip.colored.dark { color: #1d1606; text-shadow: none; }
.tray-item .tray-hd { position: absolute; top: 2px; left: 54px; width: 24px; height: 24px; background: rgba(0,0,0,.6); color: #fff; }
.tray-item .tray-hd:hover, .tray-item .tray-hd.on { color: var(--accent-t); }

/* ---------- notification check-up ---------- */
.nc-check { display: grid; gap: 12px; padding: 16px; margin-bottom: 14px; border-radius: 14px; border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line)); background: radial-gradient(ellipse at 0% 0%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 60%), var(--bg2); }
.ncc-head { display: flex; align-items: center; gap: 12px; }
.ncc-ic { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; flex: none; color: var(--accent-t); background: color-mix(in srgb, var(--accent) 16%, var(--bg1)); }
.ncc-kicker { display: block; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.ncc-title { font-size: 16px; }
.ncc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ncc-chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; background: var(--bg3); font-size: 12.5px; color: var(--text-2); }
.ncc-chip.good { background: color-mix(in srgb, var(--green) 14%, transparent); color: var(--green-t); }
.ncc-chip.warn { background: color-mix(in srgb, var(--yellow) 14%, transparent); color: var(--yellow-t); }
.ncc-chip.bad { background: color-mix(in srgb, var(--red) 14%, transparent); color: var(--red-t); }
.ncc-presets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ncc-preset { all: unset; box-sizing: border-box; cursor: pointer; display: grid; gap: 2px; padding: 10px 12px; border-radius: 11px; background: var(--bg1); border: 1px solid var(--line); min-width: 0; }
.ncc-preset:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.ncc-preset.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--bg1)); }
.ncc-preset b { font-size: 13.5px; }
.ncc-preset span { font-size: 11.5px; color: var(--muted); }
.ncc-lists { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ncc-list { display: grid; gap: 4px; align-content: start; padding: 10px 12px; border-radius: 11px; background: var(--bg1); border: 1px solid var(--line); min-width: 0; }
.ncc-h { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.ncc-empty { font-size: 12.5px; color: var(--muted); }
.ncc-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; min-width: 0; }
.ncc-row b { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ncc-row .grow span { display: block; font-size: 11.5px; color: var(--muted); }
.ncc-ric { color: var(--muted); display: grid; place-items: center; }
.ncc-alerts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ncc-alerts .ncc-h { margin-right: 4px; }
.ncc-alert { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; font-size: 12.5px; background: var(--bg3); color: var(--muted); }
.ncc-alert.on { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent-2); }
.ncc-foot { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); }
@media (max-width: 560px) { .ncc-presets, .ncc-lists { grid-template-columns: 1fr; } }

/* landing: trust strip + Get Lodge */
.lp-features ul { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); column-gap: 40px; row-gap: 36px; }
.lp-features p { max-width: none; }
.lp-trust { max-width: 1060px; margin: 0 auto; padding: 8px clamp(18px, 5vw, 64px) 64px; }
.lp-trust-in { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0; border-radius: 18px; overflow: hidden; border: 1px solid rgba(255, 179, 92, .28);
  background: radial-gradient(ellipse at 0% 0%, rgba(255, 179, 92, .16), transparent 60%), rgba(19, 33, 58, .55); }
.lp-trust-in > div { padding: 26px 28px; border-left: 1px solid rgba(238, 242, 247, .08); }
.lp-trust-in > div:first-child { border-left: 0; }
.lp-trust-in span { color: var(--lp-lantern); display: block; margin-bottom: 10px; }
.lp-trust-in b { display: block; font-family: Bricolage, Inter, sans-serif; font-size: 21px; font-weight: 700; margin-bottom: 6px; }
.lp-trust-in p { margin: 0; color: var(--lp-mist); line-height: 1.55; font-size: 15px; }
.lp-apps { max-width: 1060px; margin: 0 auto; padding: 0 clamp(18px, 5vw, 64px) 72px; }
.lp-apps h2 { font-family: Bricolage, Inter, sans-serif; font-weight: 700; font-stretch: 96%; font-size: clamp(28px, 3.2vw, 38px); margin: 0 0 22px; }
.lp-app-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.lp-app { display: grid; gap: 6px; align-content: start; padding: 20px; border-radius: 16px; background: rgba(19, 33, 58, .55); border: 1px solid rgba(238, 242, 247, .1); color: var(--lp-snow); text-decoration: none; cursor: pointer; transition: border-color .15s, transform .15s; }
.lp-app:hover { border-color: rgba(255, 179, 92, .6); transform: translateY(-2px); }
.lp-app > span:first-child { color: var(--lp-lantern); margin-bottom: 4px; }
.lp-app b { font-size: 18px; }
.lp-app > span:nth-child(3) { color: var(--lp-mist); font-size: 14px; line-height: 1.45; }
.lp-app i { font-style: normal; font-weight: 650; font-size: 14px; color: var(--lp-lantern); margin-top: 6px; }
.lp-app.hidden { display: none; }
@media (max-width: 640px) { .lp-trust-in > div { border-left: 0; border-top: 1px solid rgba(238, 242, 247, .08); } .lp-trust-in > div:first-child { border-top: 0; } }

/* People: Lodge version + Windows app version columns */
.pp-ver b { display: inline-flex; align-items: center; justify-content: end; gap: 5px; }
.pp-ver b svg { opacity: .7; flex: none; }
.pp-ver .pp-now { color: var(--green-t); font-weight: 600; }
.pp-stat.old b { color: var(--yellow-t); }
@media (max-width: 700px) { .pp-ver b { justify-content: start; } }
@media (max-width: 700px) { .pp-stat b, .pp-stat span { white-space: nowrap; } .pp-stats { gap: 14px; } }

/* voice stats: bad moments log */
.vs-loghead { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.vs-loghead .btn { height: 26px; padding: 0 10px; font-size: 12px; }
.vs-log { display: grid; gap: 6px; max-height: 260px; overflow: auto; }
.vs-moment { background: var(--bg2); border-radius: 10px; padding: 8px 10px; display: grid; gap: 3px; border-left: 3px solid var(--yellow); }
.vs-moment.pc { border-left-color: var(--accent); }
.vs-mtop { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.vs-mtop b { font-size: 13px; flex: 1; min-width: 0; }
.vs-mtime { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.vs-mtag { font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 6px; background: color-mix(in srgb, var(--yellow) 16%, transparent); color: var(--yellow-t); }
.vs-mtag.pc { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent-t); }
.vs-mpc { color: var(--text-2); }
.beta-done { margin-top: 4px; }
.beta-done summary { cursor: pointer; padding: 6px 0; }
.beta-done .admin-row > .btn { width: auto; flex: none; }

/* server tags (Clans) */
.utag { display: inline-flex; align-items: center; gap: 3px; height: 18px; padding: 0 6px 0 4px; margin-left: 5px; border-radius: 6px; vertical-align: middle;
  font: 800 10.5px/1 inherit; letter-spacing: .04em; color: var(--tc); background: color-mix(in srgb, var(--tc) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--tc) 35%, transparent); cursor: pointer; white-space: nowrap; flex: none; }
.utag:hover { background: color-mix(in srgb, var(--tc) 26%, transparent); }
.utag-b { font-size: 11px; line-height: 1; }
.utag.big { height: 24px; padding: 0 9px 0 6px; font-size: 13px; border-radius: 8px; cursor: default; }
.utag.big .utag-b { font-size: 14px; }
.tag-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-badge { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line); background: var(--bg2); font-size: 17px; cursor: pointer; }
.tag-badge.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, var(--bg2)); }
.tag-preview { display: flex; align-items: center; gap: 4px; padding: 10px 12px; border-radius: 10px; background: var(--bg2); margin: 4px 0 10px; }
.tag-pick { display: grid; gap: 6px; }
.tag-opt { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg2); color: var(--text); cursor: pointer; text-align: left; font: inherit; }
.tag-opt .utag { margin-left: 0; }
.tag-opt.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--bg2)); }
.clan-modal { padding-top: 0 !important; overflow: hidden; }
.clan-hero { display: flex; align-items: flex-end; gap: 14px; margin: 0 -20px 12px; padding: 34px 20px 14px; background: linear-gradient(160deg, color-mix(in srgb, var(--tc) 30%, transparent), transparent 70%); background-size: cover; background-position: center; }
.clan-title { display: grid; gap: 6px; justify-items: start; }
.clan-title b { font-size: 19px; }
.clan-stats { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.clan-on { color: var(--green-t); }
.clan-style { color: var(--text-2); font-weight: 700; }
.clan-about { margin: 4px 0 10px; line-height: 1.45; }
.clan-games { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.clan-game { padding: 4px 9px; border-radius: 8px; background: var(--bg2); font-size: 12.5px; }
/* someone's voice connection blipped */
.vuser.reconnecting .avatar, .tile.reconnecting video, .tile.reconnecting .avatar { opacity: .45; }
.vuser.reconnecting::after { content: 'reconnecting…'; margin-left: auto; flex: none; font-size: 11px; font-weight: 600; color: var(--yellow-t); animation: rc-blink 1.2s ease-in-out infinite; }
.vuser .utag { display: none; } /* the voice list is narrow: names first */
.tile.reconnecting::after { content: 'Reconnecting…'; position: absolute; left: 50%; top: 10px; transform: translateX(-50%); padding: 3px 9px; border-radius: 8px; font-size: 12px; font-weight: 700; color: #1b1405; background: var(--yellow); animation: rc-blink 1.2s ease-in-out infinite; }
@keyframes rc-blink { 50% { opacity: .55; } }

.clan-hero .sicon { width: 64px; height: 64px; flex: none; border-radius: 18px; display: grid; place-items: center; overflow: hidden; font-weight: 800; font-size: 20px; background: var(--bg3); box-shadow: 0 6px 18px rgba(0,0,0,.35); }
.clan-hero .sicon img { width: 100%; height: 100%; object-fit: cover; }
.clan-title { min-width: 0; }

/* pick your badges */
.upin { display: inline-grid; place-items: center; margin-left: 4px; font-size: 13px; line-height: 1; vertical-align: middle; cursor: default; flex: none; }
.bp-list { display: grid; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.bp-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; border-top: 1px solid var(--line); }
.bp-row:first-child { border-top: 0; }
.bp-row.off .bp-t { opacity: .45; }
.bp-t { display: flex; align-items: center; gap: 10px; min-width: 0; }
.bp-e { font-size: 20px; width: 28px; text-align: center; flex: none; }
.bp-n { display: grid; min-width: 0; }
.bp-n .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bp-acts { display: flex; gap: 4px; flex: none; }
.bp-btn { height: 28px; min-width: 28px; padding: 0 8px; border-radius: 7px; border: 1px solid var(--line); background: var(--bg2); color: var(--text-2); font: 600 12px/1 inherit; cursor: pointer; }
.bp-btn:disabled { opacity: .35; cursor: default; }
.bp-btn.on { color: var(--accent-t); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.bp-eye { min-width: 64px; }
.bp-eye:not(.on) { color: var(--muted); }

/* join by application */
.ap-hero { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.ap-hero .sicon { width: 56px; height: 56px; flex: none; border-radius: 16px; display: grid; place-items: center; overflow: hidden; font-weight: 800; font-size: 18px; background: var(--bg3); }
.ap-hero .sicon img { width: 100%; height: 100%; object-fit: cover; }
.ap-kicker { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-t); }
.ap-name { display: block; font-size: 18px; margin: 2px 0 4px; }
.ap-hero .utag { margin-left: 0; }
.ap-list { display: grid; gap: 10px; max-height: 60vh; overflow: auto; }
.ap-card { display: grid; gap: 8px; padding: 12px 14px; border-radius: 12px; background: var(--bg2); border-left: 3px solid var(--accent); }
.ap-card.approved { border-left-color: var(--green); opacity: .8; } .ap-card.rejected { border-left-color: var(--red); opacity: .7; }
.ap-top { display: flex; align-items: center; gap: 10px; }
.ap-st { margin-left: auto; font-size: 12px; font-weight: 700; } .ap-st.approved { color: var(--green-t); } .ap-st.rejected { color: var(--red-t); }
.ap-q { font-size: 12px; font-weight: 700; color: var(--muted); }
.ap-a { white-space: pre-wrap; }
.btn.ap-has { border-color: var(--accent); color: var(--accent-t); }
.card-wait { min-height: 120px; max-width: 520px; border-radius: 12px; background: var(--bg3); opacity: .5; margin-top: 6px; }

/* ---------- Blackjack (3.7) ---------- */
.bj { margin-top: 4px; max-width: 620px; min-width: 0; box-sizing: border-box; grid-template-columns: minmax(0, 1fr); border-radius: 16px; padding: 14px 16px; display: grid; gap: 10px; color: #f3efe8;
  background: radial-gradient(120% 80% at 50% 0%, rgba(255,138,61,.16), transparent 60%), linear-gradient(165deg, #1d3a2f, #12241d 70%);
  box-shadow: inset 0 0 0 1px rgba(255,190,120,.18); }
.bj-top { display: flex; align-items: center; gap: 10px; }
.bj-title { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.bj-title b { font-family: Bricolage, Inter, sans-serif; font-size: 18px; letter-spacing: -.01em; }
.bj-icon { font-size: 20px; }
.bj-tag { font-size: 12px; font-weight: 700; color: #ffd9b8; background: rgba(255,255,255,.08); padding: 2px 9px; border-radius: 999px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bj .btn.ghost { color: #f3efe8; border-color: rgba(255,255,255,.22); }
.bj-sub { font-family: Bricolage, Inter, sans-serif; font-size: 17px; font-weight: 700; }
.bj-time { height: 5px; border-radius: 999px; background: rgba(255,255,255,.1); overflow: hidden; }
.bj-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #ff8a3d, #ffd36b); }
.bj-result .bj-fill { background: rgba(255,255,255,.3); }
.bj-felt { display: grid; gap: 10px; padding: 10px; border-radius: 14px; background: rgba(0,0,0,.18); box-shadow: inset 0 1px 0 rgba(255,255,255,.04); }
.bj-dealer { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding-bottom: 10px; border-bottom: 1px dashed rgba(255,255,255,.12); }
.bj-who { display: flex; align-items: center; gap: 7px; min-width: 0; font-size: 13.5px; }
.bj-keeper { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 12px; color: #2a1406; background: linear-gradient(135deg, #ffb26b, #ff8a3d); }
.bj-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 120px; }
.bj-cards { display: flex; gap: 5px; flex-wrap: wrap; min-height: 58px; align-items: center; }
.bj-wait { font-size: 12.5px; color: rgba(243,239,232,.6); }
.bj-c { position: relative; width: 40px; height: 56px; border-radius: 7px; background: #fbf8f2; color: #1b1b1f; box-shadow: 0 2px 6px rgba(0,0,0,.35); display: grid; place-items: center; font-weight: 800; flex: none; }
.bj-c.red { color: #d0353a; }
.bj-r { position: absolute; top: 3px; left: 5px; font-size: 12px; line-height: 1; }
.bj-r2 { top: auto; left: auto; bottom: 3px; right: 5px; transform: rotate(180deg); }
.bj-s { font-size: 20px; line-height: 1; }
.bj-c.back { background: repeating-linear-gradient(45deg, #ff8a3d 0 5px, #e2701f 5px 10px); box-shadow: inset 0 0 0 3px #fbf8f2, 0 2px 6px rgba(0,0,0,.35); }
.bj-c.deal { animation: bj-deal .32s cubic-bezier(.2,.8,.3,1.2) both; }
@keyframes bj-deal { from { opacity: 0; transform: translateY(-14px) rotate(-6deg) scale(.9); } }
@media (prefers-reduced-motion: reduce) { .bj-c.deal { animation: none; } }
.bj-total { font-size: 12px; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: rgba(255,255,255,.12); font-variant-numeric: tabular-nums; }
.bj-total.x21 { background: #ffd36b; color: #2a1406; }
.bj-total.bust { background: #e5484d; color: #fff; }
.bj-seats { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(175px, 100%), 1fr)); gap: 8px; min-width: 0; }
.bj-seat { display: grid; gap: 6px; align-content: start; padding: 8px; border-radius: 12px; background: rgba(255,255,255,.05); box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); min-width: 0; }
.bj-seat.me { box-shadow: inset 0 0 0 1.5px rgba(255,138,61,.75); background: rgba(255,138,61,.08); }
.bj-seat.out { opacity: .6; }
.bj-seat.empty { place-items: center; min-height: 70px; font-size: 12.5px; color: rgba(243,239,232,.45); background: transparent; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); border: 1px dashed rgba(255,255,255,.12); }
.bj-bet { margin-left: auto; font-size: 12px; font-weight: 700; color: rgba(243,239,232,.65); white-space: nowrap; }
.bj-bet.ready { color: #ffd36b; }
.bj-hand { display: grid; gap: 4px; padding: 4px; border-radius: 10px; }
.bj-hand.turn { background: rgba(255,211,107,.1); box-shadow: inset 0 0 0 1px rgba(255,211,107,.5); }
.bj-hand .bj-cards { min-height: 0; }
.bj-hinfo { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.bj-note { font-size: 11.5px; color: rgba(243,239,232,.7); }
.bj-res { font-size: 11.5px; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: rgba(255,255,255,.12); }
.bj-res.win, .bj-res.blackjack { background: #2fbf71; color: #062312; }
.bj-res.blackjack { background: linear-gradient(90deg, #ffd36b, #ff8a3d); color: #2a1406; }
.bj-res.bust, .bj-res.lose { background: rgba(229,72,77,.85); color: #fff; }
.bj-seatfoot { display: flex; gap: 8px; flex-wrap: wrap; font-size: 11.5px; color: rgba(243,239,232,.65); }
.bj-net.up { color: #4fe08a; } .bj-net.down { color: #ff9a9a; }
.bj-acts { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bj-acts .grow { flex: 1; }
.bj-hint { font-size: 12.5px; color: rgba(243,239,232,.7); }
.bj-chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; flex: 1 1 260px; min-width: 0; }
.bj-chip { all: unset; box-sizing: border-box; cursor: pointer; min-width: 44px; height: 44px; padding: 0 8px; border-radius: 999px; display: grid; place-items: center; font-size: 12.5px; font-weight: 800; color: #2a1406;
  background: radial-gradient(circle at 50% 40%, #ffd36b, #ff8a3d); box-shadow: inset 0 0 0 3px rgba(255,255,255,.55), inset 0 0 0 5px rgba(42,20,6,.25), 0 2px 5px rgba(0,0,0,.35); transition: transform .08s; }
.bj-chip:hover { transform: translateY(-2px); }
.bj-chip:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.bj-chip.on { box-shadow: inset 0 0 0 3px #fff, 0 0 0 3px rgba(255,211,107,.6); }
.bj-chip.same { border-radius: 999px; padding: 0 12px; background: rgba(255,255,255,.14); color: #f3efe8; box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); }
.bj-amt { width: 84px; height: 36px; border-radius: 10px; border: 1px solid rgba(255,255,255,.2); background: rgba(0,0,0,.25); color: #f3efe8; padding: 0 10px; font: inherit; font-size: 13px; }
.bj-you { font-family: Bricolage, Inter, sans-serif; font-weight: 750; font-size: 16px; }
.bj-you.up { color: #4fe08a; } .bj-you.down { color: #ff9a9a; }
.bj-closed { font-size: 14px; color: rgba(243,239,232,.8); }
.bj-closed + .bj-acts { margin-top: -2px; }
.bj-foot { font-size: 11.5px; color: rgba(243,239,232,.55); }
.bj-rows { display: grid; gap: 4px; }
.bj-row { display: flex; align-items: center; gap: 9px; padding: 6px 9px; border-radius: 10px; background: rgba(0,0,0,.2); }
.bj-row.me { box-shadow: inset 0 0 0 1px rgba(255,211,107,.5); }
.bj-place { width: 26px; text-align: center; font-weight: 800; font-size: 13px; }
.bj-rmid { flex: 1; min-width: 0; display: grid; }
.bj-rmid b { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bj-score { font-weight: 800; font-variant-numeric: tabular-nums; color: #ffd36b; white-space: nowrap; }
.bj-score.up { color: #4fe08a; } .bj-score.down { color: #ff9a9a; }
.bj-gap { text-align: center; color: rgba(243,239,232,.4); font-size: 12px; }
@media (max-width: 520px) { .bj { padding: 12px; } .bj-seats { grid-template-columns: 1fr 1fr; } .bj-c { width: 34px; height: 48px; } .bj-s { font-size: 17px; } .bj-r { font-size: 11px; } }

/* ---------- Server pet (3.7) ---------- */
.pet { margin-top: 4px; max-width: 600px; box-sizing: border-box; min-width: 0; border-radius: 18px; padding: 14px 16px; color: #f6efe6;
  display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 16px; row-gap: 10px; align-items: center;
  background: radial-gradient(90% 120% at 0% 0%, rgba(255,138,61,.28), transparent 55%), linear-gradient(160deg, #3a2519, #1e1510 75%); box-shadow: inset 0 0 0 1px rgba(255,190,120,.18); }
.pet.old { opacity: .75; grid-template-columns: auto minmax(0, 1fr); padding: 10px 12px; }
.pet-stage { width: 150px; height: 150px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 50% 60%, rgba(255,211,150,.22), rgba(255,138,61,.06) 60%, transparent 72%); }
.pet.old .pet-stage { width: 96px; height: 96px; }
.pet-side { display: grid; gap: 7px; min-width: 0; }
.pet-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.pet-name { font-family: Bricolage, Inter, sans-serif; font-size: 21px; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.pet-chip { font-size: 11.5px; font-weight: 800; color: #2a1406; background: linear-gradient(90deg, #ffd36b, #ff8a3d); padding: 2px 9px; border-radius: 999px; }
.pet-sub { font-size: 12.5px; color: rgba(246,239,230,.65); }
.pet-mood { font-size: 14.5px; font-weight: 650; }
.pm-hungry .pet-mood, .pm-sad .pet-mood, .pm-bored .pet-mood { color: #ffb4a0; }
.pet-bars { display: grid; gap: 5px; }
.pet-bar, .pet-grow { display: grid; grid-template-columns: 74px minmax(0, 1fr) 36px; align-items: center; gap: 8px; font-size: 12px; }
.pet-grow { grid-template-columns: 74px minmax(0, 1fr); color: rgba(246,239,230,.7); }
.pet-bl { white-space: nowrap; }
.pet-bv { text-align: right; font-variant-numeric: tabular-nums; color: rgba(246,239,230,.75); }
.pet-track { height: 8px; border-radius: 999px; background: rgba(255,255,255,.1); overflow: hidden; }
.pet-fill { height: 100%; border-radius: 999px; transition: width .6s ease; }
.pet-bar.food .pet-fill { background: linear-gradient(90deg, #ff8a3d, #ffb26b); }
.pet-bar.fun .pet-fill { background: linear-gradient(90deg, #e86fd0, #ff9ad9); }
.pet-bar.energy .pet-fill { background: linear-gradient(90deg, #ffd36b, #fff0a8); }
.pet-grow .pet-fill { background: linear-gradient(90deg, #2fbf9f, #8fe8c9); }
.pet-bar.low .pet-fill { background: #e5484d; animation: pet-low 1.6s ease-in-out infinite; }
@keyframes pet-low { 50% { opacity: .55; } }
.pet-acts { grid-column: 1 / -1; display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }
.pet .btn.ghost { color: #f6efe6; border-color: rgba(255,255,255,.22); }
.pet-foot { grid-column: 1 / -1; display: grid; gap: 6px; }
.pet-hint { font-size: 12px; color: rgba(246,239,230,.62); }
.pet-carers { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pet-carer { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; }
/* the pet itself */
.pet-svg { overflow: visible; }
.pet-body { animation: pet-bob 2.8s ease-in-out infinite; transform-origin: 60px 108px; }
.mood-sleeping .pet-body, .mood-sad .pet-body { animation-duration: 4.5s; }
.mood-happy .pet-body { animation: pet-hop 1.8s ease-in-out infinite; }
@keyframes pet-bob { 50% { transform: translateY(-2px) scaleY(1.02); } }
@keyframes pet-hop { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-6px) scaleY(1.03); } }
.pet-eyes { animation: pet-blink 5s infinite; transform-box: fill-box; transform-origin: center; }
@keyframes pet-blink { 0%, 94%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.1); } }
.mood-sleeping .pet-eyes, .mood-happy .pet-eyes { animation: none; }
.pet-egg { animation: pet-wobble 3.2s ease-in-out infinite; transform-origin: 60px 106px; }
@keyframes pet-wobble { 0%, 70%, 100% { transform: rotate(0); } 76% { transform: rotate(-5deg); } 84% { transform: rotate(5deg); } 92% { transform: rotate(-2deg); } }
.pet-z { animation: pet-z 2.4s ease-in-out infinite; opacity: 0; }
@keyframes pet-z { 0% { opacity: 0; transform: translateY(4px); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(-8px); } }
.pet-bubble { animation: pet-bob 2s ease-in-out infinite; }
.pet-tear { animation: pet-tear 2.6s ease-in infinite; }
@keyframes pet-tear { 0% { transform: translateY(0); opacity: 1; } 100% { transform: translateY(10px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .pet-body, .pet-eyes, .pet-egg, .pet-z, .pet-bubble, .pet-tear, .pet-bar.low .pet-fill { animation: none; } .pet-z { opacity: 1; } }
@media (max-width: 520px) { .pet { grid-template-columns: minmax(0, 1fr); justify-items: stretch; } .pet-stage { justify-self: center; width: 130px; height: 130px; } .pet-stage .pet-svg { width: 130px; height: 130px; } }
.pet-rename { display: flex; gap: 8px; align-items: center; } .pet-rename input { flex: 1; min-width: 0; }

/* ---------- Private DMs (3.8) ---------- */
.e2e-lock.on { color: #2fbf71; width: auto; padding: 0 8px; gap: 5px; display: inline-flex; align-items: center; border-radius: 999px; background: rgba(47,191,113,.12); }
.e2e-lock-t { font-size: 12px; font-weight: 700; }
.e2e-list { margin: 4px 0 14px; padding-left: 20px; display: grid; gap: 8px; line-height: 1.45; }
.e2e-code-box { padding: 12px 14px; border-radius: 14px; background: var(--bg2); border: 1px solid var(--line, #26292e); display: grid; gap: 8px; margin: 10px 0; }
.e2e-h { font-weight: 750; font-size: 14px; }
.e2e-code { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px 12px; font: 700 17px/1.3 ui-monospace, Menlo, Consolas, monospace; letter-spacing: .06em; color: var(--accent-t); }
.e2e-status { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 13px; }
.e2e-ok { color: #2fbf71; font-weight: 650; } .e2e-warn { color: #f0b232; font-weight: 650; }
.e2e-devs { display: grid; gap: 6px; margin-bottom: 12px; }
.e2e-dev { display: flex; gap: 10px; align-items: center; padding: 6px 10px; border-radius: 10px; background: var(--bg2); font-size: 13.5px; }
.e2e-dev .grow { flex: 1; }
@media (max-width: 520px) { .e2e-code { grid-template-columns: repeat(2, 1fr); } }

/* private DMs: locked pictures and files (opened in the page) */
.e2e-intro { margin-top: 10px; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 0; background: rgba(47,191,113,.12); color: #2fbf71; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.e2e-intro:hover { background: rgba(47,191,113,.2); }
.img-grid img.att-opening { min-width: 120px; min-height: 90px; background: var(--bg3); animation: att-pulse 1.2s ease-in-out infinite; }
.img-grid img.att-failed, .voice-msg.att-failed { opacity: .5; }
video.att-opening { background: var(--bg3); animation: att-pulse 1.2s ease-in-out infinite; }
.voice-msg.att-opening { animation: att-pulse 1.2s ease-in-out infinite; }
@keyframes att-pulse { 50% { opacity: .55; } }
.att-lockvid { cursor: pointer; text-align: left; font: inherit; color: inherit; max-width: 360px; }
.att-lockvid .fc-txt b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-lockvid:disabled { opacity: .7; cursor: default; }
.media-cell.media-locked { background: var(--bg3); }

/* Shop 2.0: profile frames (a ring around the picture), name effects, lottery */
.avatar.framed { --fr: var(--accent); box-shadow: 0 0 0 2px var(--bg2), 0 0 0 4px var(--fr); }
.avatar.frame-gold { --fr: #f5c542; box-shadow: 0 0 0 2px var(--bg2), 0 0 0 4px #f5c542, 0 0 10px 3px rgba(245,197,66,.45); }
.avatar.frame-flame { --fr: #ff6a2b; animation: frame-flame 1.6s ease-in-out infinite; }
@keyframes frame-flame { 0%, 100% { box-shadow: 0 0 0 2px var(--bg2), 0 0 0 4px #ff6a2b, 0 0 10px 3px rgba(255,106,43,.55); } 50% { box-shadow: 0 0 0 2px var(--bg2), 0 0 0 4px #ffb347, 0 0 16px 5px rgba(255,64,32,.5); } }
.avatar.frame-frost { --fr: #8fd8ff; box-shadow: 0 0 0 2px var(--bg2), 0 0 0 4px #bfe9ff, 0 0 0 6px #5ab8f0, 0 0 12px 4px rgba(143,216,255,.45); }
.avatar.frame-neon { --fr: #ff3df2; animation: frame-neon 2.4s linear infinite; }
@keyframes frame-neon { 0%, 100% { box-shadow: 0 0 0 2px var(--bg2), 0 0 0 4px #ff3df2, 0 0 12px 3px rgba(255,61,242,.6); } 50% { box-shadow: 0 0 0 2px var(--bg2), 0 0 0 4px #3dfcff, 0 0 12px 3px rgba(61,252,255,.6); } }
.avatar.frame-leaf { --fr: #4caf50; box-shadow: 0 0 0 2px var(--bg2), 0 0 0 4px #4caf50, 0 0 0 6px #2e7d32; }
.avatar.frame-rainbow { animation: frame-rainbow 4s linear infinite; }
@keyframes frame-rainbow { 0% { box-shadow: 0 0 0 2px var(--bg2), 0 0 0 4px #ff4d4d; } 17% { box-shadow: 0 0 0 2px var(--bg2), 0 0 0 4px #ffa64d; } 33% { box-shadow: 0 0 0 2px var(--bg2), 0 0 0 4px #ffe14d; } 50% { box-shadow: 0 0 0 2px var(--bg2), 0 0 0 4px #4dff88; } 67% { box-shadow: 0 0 0 2px var(--bg2), 0 0 0 4px #4dc3ff; } 83% { box-shadow: 0 0 0 2px var(--bg2), 0 0 0 4px #b84dff; } 100% { box-shadow: 0 0 0 2px var(--bg2), 0 0 0 4px #ff4d4d; } }
html.app-away .avatar.framed, .reduce-motion .avatar.framed { animation-play-state: paused; }
.avatar.xxs.framed { box-shadow: 0 0 0 1px var(--fr); animation: none; }
.shop-frames { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; margin-bottom: 8px; }
.shop-frame { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 8px 10px; border-radius: 12px; background: var(--bg3); border: 1px solid transparent; }
.shop-frame.on { border-color: var(--accent); }
.shop-frame .avatar { margin: 4px 0; }
.shop-fx .shop-fxcols { display: flex; flex-direction: column; gap: 6px; }
.shop-fx input[type=color] { width: 34px; height: 34px; border: 0; padding: 0; background: none; cursor: pointer; }
.shop-fxseg { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0; }
.shop-fxseg button { font: inherit; font-size: 12px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line, rgba(127,127,127,.3)); background: none; color: inherit; cursor: pointer; }
.shop-fxseg button.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent, #111); }
.shop-lottery { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 14px; border-radius: 12px; background: linear-gradient(135deg, rgba(255,138,61,.14), rgba(255,209,102,.08)); border: 1px solid rgba(255,138,61,.25); margin-bottom: 8px; }
.shop-pot { font-size: 24px; font-weight: 800; }
.shop-pinline { margin: 10px 0; }
@media (max-width: 520px) { .shop-color { flex-wrap: wrap; } .shop-color > .grow { min-width: 0; flex-basis: calc(100% - 60px); } .shop-color .shop-cacts { width: 100%; justify-content: flex-end; } }
@media (max-width: 520px) { .shop-lottery > .grow { flex-basis: 100%; } .shop-lottery .shop-cacts { width: 100%; justify-content: flex-end; } }

/* Birthdays 2.0: the card, signing, upcoming in Events */
.row-inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.bday-card { margin-top: 6px; max-width: 520px; border-radius: 14px; padding: 14px; background: linear-gradient(135deg, rgba(255,111,174,.16), rgba(255,209,102,.12)); border: 1px solid rgba(255,111,174,.35); }
.bday-head { display: flex; gap: 10px; align-items: center; }
.bday-cake { font-size: 30px; }
.bday-sigs { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; margin: 12px 0 10px; }
.bday-sig { background: var(--bg1); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 8px; transform: rotate(-.6deg); }
.bday-sig:nth-child(even) { transform: rotate(.7deg); }
.bday-note { white-space: pre-wrap; word-break: break-word; font-size: 14px; }
.bday-by { display: flex; gap: 6px; align-items: center; font-size: 12px; }
.bday-sign textarea { width: 100%; box-sizing: border-box; resize: vertical; }
.bday-upcoming { margin-top: 14px; }
.bday-row { display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: 10px; background: var(--bg2); margin-bottom: 6px; }

/* Tickets 2.0 */
.tk-replies { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.tk-reply { background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.tk-reply-top { display: flex; gap: 6px; align-items: center; }
.tk-reply-top input { flex: 1; }
.tk-reply textarea { width: 100%; box-sizing: border-box; resize: vertical; }
.tk-kinds { display: flex; flex-wrap: wrap; gap: 6px; }
.tk-staffrow { display: flex; align-items: center; gap: 8px; padding: 6px 4px; }
.tk-medal { width: 22px; text-align: center; }
.tk-report .st-tiles { margin: 12px 0; }

.notice-card .nc-body.nc-lines { white-space: pre-line; }

/* Lodge Helpers: the same staff shield in sky blue (Admins keep orange) */
.staff-badge.is-helper { color: #3fb4ff; filter: drop-shadow(0 0 4px rgba(63,180,255,.55)); animation: helper-glow 3s ease-in-out infinite; }
@keyframes helper-glow { 0%, 100% { filter: drop-shadow(0 0 2px rgba(63,180,255,.4)); } 50% { filter: drop-shadow(0 0 6px rgba(63,180,255,.8)); } }
.staff-tip.is-staff.is-helper { background: linear-gradient(120deg, #3fb4ff, #8fd8ff 50%, #3fb4ff); background-size: 220% 100%; box-shadow: 0 8px 26px rgba(63,180,255,.45); }
@media (prefers-reduced-motion: reduce) { .staff-badge.is-helper { animation: none; } }

/* New member questions */
.jq-q { margin: 14px 0; }
.jq-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.jq-chip { font: inherit; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg2); color: inherit; cursor: pointer; }
.jq-chip:hover { border-color: var(--accent); }
.jq-chip.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 700; }
.jq-edit { display: flex; flex-direction: column; gap: 10px; margin: 8px 0; }
.jq-card { border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: var(--bg2); display: flex; flex-direction: column; gap: 8px; }
.jq-top, .jq-opt { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.jq-emoji { width: 52px; text-align: center; }
.jq-roles { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.jq-multi { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 8px; flex-direction: row; }
.jq-multi input { width: auto; margin: 0; }

/* Profile wall */
.pc-wall .wall-form { display: flex; gap: 6px; align-items: center; margin-bottom: 8px; }
.pc-wall .wall-form input { flex: 1; min-width: 0; }
.wall-st-pick { width: 22px; height: 22px; object-fit: contain; }
.wall-list { display: flex; flex-direction: column; gap: 6px; max-height: 260px; overflow-y: auto; }
.wall-note { background: var(--bg2); border-radius: 10px; padding: 8px 10px; }
.wall-top { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.wall-top .wall-x { margin-left: auto; width: 22px; height: 22px; }
.wall-body { margin-top: 4px; display: flex; align-items: center; gap: 8px; word-break: break-word; }
.wall-sticker { width: 56px; height: 56px; object-fit: contain; }

/* Music player: lyrics + listen along (4.1) */
.mp-lyrics { display: grid; gap: 6px; padding: 10px 10px 8px; border-radius: 14px; background: var(--bg1); box-shadow: inset 0 0 0 1px var(--line); }
.mp-ly-lines { max-height: 240px; overflow-y: auto; scrollbar-width: thin; padding: 6px 4px; mask-image: linear-gradient(transparent, #000 18%, #000 82%, transparent); display: grid; gap: 5px; }
.mp-ly-lines:not(.synced) { mask-image: none; }
.mp-ly-line { font-size: 14.5px; font-weight: 650; line-height: 1.35; color: color-mix(in srgb, var(--text) 42%, transparent); transition: color .25s, transform .25s; transform-origin: left center; cursor: default; }
.mp-ly-lines.synced .mp-ly-line { cursor: pointer; }
.mp-ly-line.past { color: color-mix(in srgb, var(--text) 62%, transparent); }
.mp-ly-line.on { color: var(--text); transform: scale(1.04); text-shadow: 0 0 18px color-mix(in srgb, var(--accent) 45%, transparent); }
.mp-ly-line.on::before { content: ""; display: inline-block; width: 4px; height: .9em; border-radius: 2px; background: var(--accent); margin-right: 7px; vertical-align: -1px; }
.mp-ly-line.gap { color: var(--muted); font-weight: 500; }
.mp-ly-line.plain { font-weight: 500; font-size: 13.5px; color: var(--text2, var(--text)); cursor: default; }
.mp-ly-msg { padding: 8px 4px; text-align: center; }
.mp-ly-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11px; flex-wrap: wrap; }
.mp-ly-off { display: inline-flex; align-items: center; gap: 2px; }
.mp-share { display: grid; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--bg1); box-shadow: inset 0 0 0 1px var(--line); }
.mp-share.on { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 55%, var(--line)); background: linear-gradient(135deg, var(--accent-soft), var(--bg1) 70%); }
.mp-share-top { display: flex; align-items: center; gap: 10px; }
.mp-share-top > svg { color: var(--accent-t); flex: none; }
.mp-share-top b { font-size: 13.5px; }
.mp-share-ppl { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.mp-along { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); }
.mp-friends { display: grid; gap: 6px; padding: 12px; border-radius: 16px; background: var(--bg2); box-shadow: inset 0 0 0 1px var(--line); }
.mp-friends .mp-q-head svg { color: var(--accent-t); }
.mp-fr-row { display: flex; align-items: center; gap: 9px; min-width: 0; }
.mp-fr-row .mp-q-txt { flex: 1; min-width: 0; }
.md-leave { color: var(--accent-t); }
.pc-listen { display: flex; align-items: center; gap: 9px; width: 100%; padding: 8px 10px; border-radius: 10px; cursor: pointer; font: inherit; font-size: 13px; color: var(--text); text-align: left; border: 0; background: color-mix(in srgb, var(--at, var(--accent)) 12%, var(--bg2)); }
.pc-listen:hover { background: color-mix(in srgb, var(--at, var(--accent)) 22%, var(--bg2)); }
.pc-listen > svg { color: var(--at, var(--accent)); flex: none; }
.pc-listen .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-listen b { color: var(--at, var(--accent)); white-space: nowrap; }
@media (max-width: 860px) { .mp-hero > .mp-lyrics, .mp-hero > .mp-share, .mp-hero > .mp-along, .mp-hero > .mp-seek, .mp-hero > .mp-vol { grid-column: 1 / -1; } }
@media (prefers-reduced-motion: reduce) { .mp-ly-line { transition: none; } .mp-ly-line.on { transform: none; } }

/* Texas Hold'em (4.1): uses the blackjack table look (.bj) */
.pk { max-width: 680px; }
.pk-felt { gap: 12px; }
.pk-mid { display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap; padding: 6px 0 12px; border-bottom: 1px dashed rgba(255,255,255,.12); }
.pk-board { display: flex; gap: 6px; }
.pk-slot { width: 40px; height: 56px; border-radius: 7px; border: 1.5px dashed rgba(255,255,255,.16); flex: none; }
.pk-pot { display: grid; justify-items: center; gap: 1px; min-width: 70px; }
.pk-pot-l { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: rgba(243,239,232,.6); }
.pk-pot b { font-family: Bricolage, Inter, sans-serif; font-size: 18px; color: #ffd36b; font-variant-numeric: tabular-nums; }
.pk-seats { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(118px, 100%), 1fr)); gap: 8px; }
.pk-seat { display: grid; gap: 6px; align-content: start; padding: 8px; border-radius: 12px; background: rgba(255,255,255,.05); box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); min-width: 0; transition: box-shadow .2s, background .2s; }
.pk-seat.me { box-shadow: inset 0 0 0 1.5px rgba(255,138,61,.75); background: rgba(255,138,61,.08); }
.pk-seat.turn { box-shadow: inset 0 0 0 2px #ffd36b, 0 0 18px rgba(255,211,107,.25); }
.pk-seat.folded, .pk-seat.out { opacity: .55; }
.pk-seat.won { box-shadow: inset 0 0 0 2px #2fbf71, 0 0 18px rgba(47,191,113,.3); }
.pk-seat.empty { place-items: center; min-height: 60px; font-size: 12.5px; color: rgba(243,239,232,.45); background: transparent; border: 1px dashed rgba(255,255,255,.12); box-shadow: none; }
.pk-hole { display: flex; gap: 4px; min-height: 56px; align-items: center; }
.pk-seat:not(.me) .pk-c { width: 34px; height: 48px; }
.pk-seat:not(.me) .pk-c .bj-s { font-size: 17px; }
.pk-btn { margin-left: auto; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 900; color: #1b1b1f; background: #fbf8f2; box-shadow: 0 1px 3px rgba(0,0,0,.4); flex: none; }
.pk-blind { margin-left: auto; font-size: 10.5px; font-weight: 800; padding: 1px 6px; border-radius: 999px; background: rgba(255,255,255,.12); color: #ffd9b8; flex: none; }
.pk-btn + .pk-blind { margin-left: 4px; }
.pk-bet { font-size: 11.5px; font-weight: 800; color: #2a1406; background: radial-gradient(circle at 50% 40%, #ffd36b, #ff8a3d); padding: 2px 8px; border-radius: 999px; }
.pk-hand { font-size: 11.5px; font-weight: 700; color: #ffd36b; }
.pk-stack { font-weight: 700; color: rgba(243,239,232,.85); font-variant-numeric: tabular-nums; }
.pk-mine { font-size: 13px; font-weight: 750; color: #ffd36b; padding: 4px 10px; border-radius: 999px; background: rgba(255,211,107,.12); }
.pk-raise { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; flex: 1 1 280px; min-width: 0; }
.pk-raise .pk-pre { height: 32px; min-width: 0; padding: 0 10px; font-size: 12px; }
.pk-myturn { box-shadow: inset 0 0 0 1px rgba(255,190,120,.18), 0 0 0 2px rgba(255,211,107,.35); }
.bj-time.hurry .bj-fill { background: linear-gradient(90deg, #e5484d, #ff8a3d); }
@media (max-width: 520px) { .pk-slot, .pk-board .pk-c { width: 34px; height: 48px; } .pk-board { gap: 4px; } .pk-seat { padding: 6px; } .pk-seat .pk-c { width: 30px; height: 42px; } .pk-seat .pk-c .bj-s { font-size: 15px; } .pk-seat .bj-r { font-size: 10px; } .pk-hole { min-height: 42px; } .pk-seat .bj-name { max-width: 70px; } }

/* Watch together 2.0 (4.1): reactions, fullscreen with chat, watch parties */
.wd-stage { position: relative; display: flex; flex-direction: column; }
.wd-stage .wd-tap { top: 50%; }
.wd-float { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 3; }
.wd-fx { position: absolute; bottom: 8px; font-size: 34px; line-height: 1; display: grid; justify-items: center; gap: 2px; filter: drop-shadow(0 3px 6px rgba(0,0,0,.5)); animation: wd-rise 2.6s cubic-bezier(.2,.7,.3,1) forwards; }
.wd-fx small { font-size: 11px; font-weight: 700; color: #fff; background: rgba(0,0,0,.55); padding: 1px 6px; border-radius: 999px; white-space: nowrap; }
@keyframes wd-rise { 0% { transform: translate(0, 10px) scale(.6); opacity: 0; } 12% { opacity: 1; transform: translate(0, -10px) scale(1.1); } 70% { opacity: 1; } 100% { transform: translate(var(--dx, 0), -240px) scale(1); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .wd-fx { animation-name: wd-fade; } @keyframes wd-fade { 0%, 70% { opacity: 1; } 100% { opacity: 0; } } }
.wd-react { display: flex; gap: 2px; padding: 4px 8px; justify-content: center; flex-wrap: wrap; }
.wd-rx { all: unset; cursor: pointer; font-size: 19px; line-height: 1; padding: 5px 7px; border-radius: 10px; transition: transform .1s, background .1s; }
.wd-rx:hover { background: var(--bg3); transform: translateY(-2px) scale(1.12); }
.wd-rx:active { transform: scale(.92); }
.wd-rx:focus-visible { outline: 2px solid var(--accent); }
.watch-dock.mini .wd-react { padding: 2px 4px; } .watch-dock.mini .wd-rx { font-size: 15px; padding: 3px 4px; }
.wd-chat { display: none; }
.watch-dock.full { display: grid; grid-template-columns: 1fr 320px; grid-template-rows: auto 1fr auto; background: #000; border: 0; }
.watch-dock.full .wd-head { grid-column: 1 / -1; background: var(--bg1); }
.watch-dock.full .wd-stage { grid-column: 1; grid-row: 2; min-height: 0; }
.watch-dock.full .wd-player { height: 100% !important; flex: 1; }
.watch-dock.full .wd-react { grid-column: 1; grid-row: 3; background: var(--bg1); }
.watch-dock.full .wd-queue { display: none; }
.watch-dock.full .wd-chat { display: flex; flex-direction: column; grid-column: 2; grid-row: 2 / span 2; background: var(--bg1); border-left: 1px solid var(--line); min-height: 0; }
.wdc-head { padding: 10px 12px; font-weight: 700; font-size: 13.5px; border-bottom: 1px solid var(--line); }
.wdc-list { flex: 1; overflow-y: auto; padding: 8px 12px; display: flex; flex-direction: column; gap: 6px; min-height: 0; }
.wdc-msg { font-size: 13.5px; line-height: 1.35; overflow-wrap: anywhere; }
.wdc-form { padding: 10px; border-top: 1px solid var(--line); }
.wdc-input { width: 100%; box-sizing: border-box; }
@media (max-width: 760px) { .watch-dock.full { grid-template-columns: 1fr; grid-template-rows: auto 1fr auto 34vh; } .watch-dock.full .wd-chat { grid-column: 1; grid-row: 4; border-left: 0; border-top: 1px solid var(--line); } }
.wp { display: flex; gap: 12px; margin-top: 4px; max-width: 560px; padding: 10px; border-radius: 14px; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 14%, var(--bg2)), var(--bg2) 60%); box-shadow: inset 0 0 0 1px var(--line); }
.wp-art { position: relative; flex: none; width: 168px; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: #111 linear-gradient(135deg, #2a1e16, #120d0a); display: grid; place-items: center; }
.wp-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.wp-play { position: relative; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: rgba(0,0,0,.55); color: #fff; font-size: 14px; padding-left: 3px; box-sizing: border-box; }
.wp-live { position: absolute; top: 6px; left: 6px; }
.wp-body { display: grid; gap: 5px; align-content: start; min-width: 0; flex: 1; }
.wp-kicker { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-2); }
.wp-live-now .wp-kicker, .wp-live .wp-kicker { color: var(--red-t); }
.wp-title { font-family: Bricolage, Inter, sans-serif; font-size: 16.5px; font-weight: 750; line-height: 1.25; overflow-wrap: anywhere; }
.wp-meta { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.wp-dot { opacity: .6; }
.wp-ppl { display: flex; align-items: center; gap: 3px; flex-wrap: wrap; }
.wp-ppl .muted { margin-left: 4px; }
.wp-acts { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 2px; }
.wp-acts .grow { flex: 1; }
.wp-in { color: var(--green, #3ba55d); }
.wp-done, .wp-cancelled { opacity: .7; }
@media (max-width: 520px) { .wp { flex-direction: column; } .wp-art { width: 100%; } }

/* Music player on phones: buttons stuck to the top (4.2) */
.mp-mbar { display: none; }
@media (max-width: 860px) {
  .mp-mbar:not(.empty) { display: flex; align-items: center; gap: 2px; position: sticky; top: -8px; margin-top: -8px; z-index: 3; padding: 14px 8px 6px 10px; background: var(--bg2); border-bottom: 1px solid var(--line); box-shadow: 0 6px 14px -10px #000a; }
  .mp-mb-info { all: unset; display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; cursor: pointer; }
  .mp-mb-txt { display: grid; min-width: 0; line-height: 1.2; }
  .mp-mb-txt b { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mp-mb-txt span { font-size: 11.5px; color: var(--muted); }
  .mp-mbar .mp-play { width: 38px; height: 38px; }
}

/* Name styles (4.2): fonts in public/fonts/names (SIL OFL), loaded only when a name uses them */
@font-face { font-family: "Lodge Rounded"; font-weight: 600; font-display: swap; src: url(fonts/names/fredoka.woff2) format("woff2"); }
@font-face { font-family: "Lodge Script"; font-display: swap; src: url(fonts/names/pacifico.woff2) format("woff2"); }
@font-face { font-family: "Lodge Hand"; font-weight: 700; font-display: swap; src: url(fonts/names/caveat.woff2) format("woff2"); }
@font-face { font-family: "Lodge Marker"; font-display: swap; src: url(fonts/names/permanent-marker.woff2) format("woff2"); }
@font-face { font-family: "Lodge Tall"; font-display: swap; src: url(fonts/names/bebas-neue.woff2) format("woff2"); }
@font-face { font-family: "Lodge Retro"; font-display: swap; src: url(fonts/names/lobster.woff2) format("woff2"); }
@font-face { font-family: "Lodge Tech"; font-weight: 700; font-display: swap; src: url(fonts/names/orbitron.woff2) format("woff2"); }
@font-face { font-family: "Lodge Pixel"; font-display: swap; src: url(fonts/names/press-start-2p.woff2) format("woff2"); }
@font-face { font-family: "Lodge Spooky"; font-display: swap; src: url(fonts/names/creepster.woff2) format("woff2"); }
.nf-rounded { font-family: "Lodge Rounded", Inter, sans-serif !important; font-weight: 600; }
.nf-script { font-family: "Lodge Script", cursive !important; font-weight: 400; letter-spacing: .01em; }
.nf-hand { font-family: "Lodge Hand", cursive !important; font-weight: 700; font-size: 1.18em; line-height: 1; }
.nf-marker { font-family: "Lodge Marker", cursive !important; font-weight: 400; letter-spacing: .02em; }
.nf-tall { font-family: "Lodge Tall", Inter, sans-serif !important; font-weight: 400; font-size: 1.15em; letter-spacing: .04em; line-height: 1; }
.nf-retro { font-family: "Lodge Retro", cursive !important; font-weight: 400; letter-spacing: .01em; }
.nf-tech { font-family: "Lodge Tech", Inter, sans-serif !important; font-weight: 700; font-size: .9em; letter-spacing: .03em; }
.nf-pixel { font-family: "Lodge Pixel", monospace !important; font-weight: 400; font-size: .62em; letter-spacing: 0; line-height: 1.6; }
.nf-spooky { font-family: "Lodge Spooky", cursive !important; font-weight: 400; font-size: 1.08em; letter-spacing: .04em; }
.nf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.nf-opt { display: grid; gap: 4px; justify-items: start; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg1); color: var(--text); cursor: pointer; text-align: left; font: inherit; min-width: 0; }
.nf-opt:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.nf-opt.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.nf-opt .nf-sample { font-size: 17px; font-weight: 650; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nf-label { font-size: 11.5px; color: var(--muted); }
.nf-srv-prev { padding: 12px 14px; border-radius: 12px; background: var(--bg1); border: 1px solid var(--line); margin-bottom: 8px; font-size: 17px; font-weight: 750; }
.nf-color { display: flex; align-items: center; gap: 6px; font-size: 13px; margin: 6px 0; }
.nf-color input[type=color] { width: 36px; height: 26px; padding: 0; border: 0; background: none; }
.tpl-line { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.tpl-code { font-size: 16px; font-weight: 700; letter-spacing: .08em; padding: 6px 12px; border-radius: 10px; background: var(--bg1); border: 1px dashed color-mix(in srgb, var(--accent) 50%, var(--line)); }
.tpl-field .error { color: var(--red-t); }
.nf-opt .nf-sample.nf-pixel { font-size: 11px; line-height: 1.9; }
.nf-opt .nf-sample.nf-hand, .nf-opt .nf-sample.nf-tall { font-size: 20px; }

/* ---------- What should we play? (/whatgame, 4.4) ---------- */
.wpg { margin-top: 4px; max-width: 560px; display: grid; gap: 10px; padding: 12px; border-radius: 14px; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 14%, var(--bg2)), var(--bg2) 60%); box-shadow: inset 0 0 0 1px var(--line); }
.wpg-head { display: grid; gap: 6px; }
.wpg-kicker { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-2); }
.wpg-done .wpg-kicker { color: var(--green-t); }
.wpg-sub { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.wpg-ppl { display: flex; }
.wpg-ppl .avatar { box-shadow: 0 0 0 2px var(--bg2); }
.wpg-ppl .avatar + .avatar { margin-left: -6px; }
.wpg-empty { font-size: 13.5px; color: var(--text-2); }
.wpg-list { display: grid; gap: 6px; }
.wpg-opt { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; background: var(--bg1); box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .15s, opacity .15s; }
.wpg-opt.mine { box-shadow: inset 0 0 0 2px var(--accent); }
.wpg-opt.won { box-shadow: inset 0 0 0 2px var(--green); background: color-mix(in srgb, var(--green) 10%, var(--bg1)); }
.wpg-opt.lost { opacity: .55; }
.wpg-face { position: relative; flex: none; width: 92px; height: 35px; border-radius: 6px; overflow: hidden; display: grid; place-items: center; background: linear-gradient(135deg, #2a1e16, #120d0a); }
.wpg-face img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.wpg-letter { font-family: Bricolage, Inter, sans-serif; font-weight: 800; font-size: 18px; color: var(--accent-t); }
.wpg-mid { flex: 1; min-width: 0; display: grid; gap: 4px; }
.wpg-name { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; overflow-wrap: anywhere; }
.wpg-win { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; padding: 1px 6px; border-radius: 99px; background: var(--green); color: #fff; }
.wpg-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.wpg-tag { font-size: 11.5px; padding: 1px 7px; border-radius: 99px; background: var(--bg3); color: var(--text-2); }
.wpg-tag.good { background: color-mix(in srgb, var(--green) 18%, var(--bg3)); color: var(--text); }
.wpg-tag.sale { background: color-mix(in srgb, var(--accent) 22%, var(--bg3)); color: var(--text); font-weight: 700; }
.wpg-tag.dim { background: transparent; padding-left: 0; color: var(--muted); }
.wpg-bar { height: 4px; border-radius: 99px; background: var(--bg3); overflow: hidden; }
.wpg-bar i { display: block; height: 100%; background: var(--accent); border-radius: inherit; transition: width .3s; }
.wpg-done .wpg-opt.won .wpg-bar i { background: var(--green); }
.wpg-end { flex: none; display: grid; justify-items: end; gap: 5px; }
.wpg-votes { display: flex; align-items: center; gap: 2px; min-height: 22px; }
.wpg-votes .avatar + .avatar { margin-left: -6px; }
.wpg-votes b { margin-left: 4px; font-size: 13px; }
.wpg-voted { background: var(--accent); color: var(--on-accent); }
.wpg-end .btn { display: inline-flex; align-items: center; gap: 4px; }
.wpg-notes { display: grid; gap: 3px; font-size: 12px; color: var(--muted); padding: 6px 8px; border-radius: 8px; background: var(--bg1); }
.wpg-foot { display: flex; align-items: center; gap: 8px; }
.wpg-foot .grow { flex: 1; }
@media (max-width: 560px) { .wpg-face { width: 54px; height: 54px; } .wpg-opt { align-items: flex-start; } }

/* ---------- Clip wall (4.4) ---------- */
.cw-modal { width: min(980px, 96vw); }
.cw-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.cw-bar .grow { flex: 1; }
.cw-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); grid-auto-rows: max-content; align-content: start; gap: 12px; max-height: min(64vh, 720px); overflow-y: auto; padding: 2px; }
.cw-tile { display: grid; grid-template-rows: auto auto; align-content: start; border-radius: 12px; overflow: hidden; background: var(--bg2); box-shadow: inset 0 0 0 1px var(--line); }
.cw-tile.featured { box-shadow: inset 0 0 0 2px var(--accent); }
.cw-pic { position: relative; aspect-ratio: 16 / 9; background: #0d0a08; cursor: pointer; display: grid; place-items: center; overflow: hidden; }
.cw-thumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.cw-play { position: relative; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgba(0,0,0,.55); color: #fff; font-size: 15px; padding-left: 3px; box-sizing: border-box; transition: transform .15s, background .15s; }
.cw-pic:hover .cw-play { transform: scale(1.1); background: var(--accent); color: var(--on-accent); }
.cw-badge, .cw-rank { position: absolute; top: 6px; font-size: 11px; font-weight: 800; padding: 2px 7px; border-radius: 99px; background: rgba(0,0,0,.65); color: #fff; }
.cw-badge { left: 6px; background: var(--accent); color: var(--on-accent); }
.cw-rank { right: 6px; }
.cw-info { display: grid; gap: 5px; padding: 8px 10px 10px; min-width: 0; }
.cw-who { display: flex; align-items: center; gap: 6px; min-width: 0; }
.cw-name { font-weight: 700; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cw-meta { font-size: 12px; color: var(--muted); }
.cw-reacts { display: flex; flex-wrap: wrap; gap: 4px; }
.cw-react { display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px; border-radius: 99px; border: 0; background: var(--bg3); color: var(--text); font: inherit; font-size: 12.5px; cursor: pointer; }
.cw-react .emo, .cw-react img { width: 16px; height: 16px; font-size: 14px; line-height: 16px; }
.cw-react.mine { background: var(--accent-soft, color-mix(in srgb, var(--accent) 25%, var(--bg3))); box-shadow: inset 0 0 0 1px var(--accent); }
.cw-react.add { opacity: .45; padding: 2px 5px; }
.cw-react.add:hover { opacity: 1; }
.cw-react.static { cursor: default; }
.cw-empty { grid-column: 1 / -1; display: grid; justify-items: center; gap: 8px; text-align: center; padding: 40px 20px; color: var(--muted); }
.cw-empty b { color: var(--text); font-size: 15px; }
.cw-empty .muted { max-width: 440px; }
.cw-more { display: flex; justify-content: center; margin-top: 10px; }
.cw-more:empty { display: none; }
.cw-big { width: 100%; max-height: 62vh; border-radius: 10px; background: #000; margin-bottom: 8px; }
.cw-text { font-size: 14px; margin-bottom: 4px; }
.cw-modal .row .grow { flex: 1; }
.cw-week { margin-top: 4px; max-width: 520px; display: grid; gap: 8px; padding: 12px; border-radius: 14px; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 18%, var(--bg2)), var(--bg2) 60%); box-shadow: inset 0 0 0 1px var(--line); }
.cw-kicker { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-2); }
.cw-gone { display: grid; place-items: center; aspect-ratio: 16 / 9; max-height: 200px; border-radius: 10px; background: var(--bg1); color: var(--muted); font-size: 13px; }
.cw-wvid { width: 100%; max-height: 300px; border-radius: 10px; background: #000; }
.cw-winfo { display: grid; gap: 5px; }
.cw-wacts { display: flex; gap: 6px; flex-wrap: wrap; }
.cw-wacts .btn { display: inline-flex; align-items: center; gap: 4px; }
@media (max-width: 560px) { .cw-grid { grid-template-columns: 1fr 1fr; gap: 8px; } .cw-name { font-size: 12px; } }

/* ---------- Steam on your profile (4.4) ---------- */
.stp { display: grid; gap: 8px; }
.stp:empty { display: none; }
.stp-head { display: flex; align-items: center; gap: 6px; }
.stp-head .grow { flex: 1; }
.stp-link { font-size: 12px; text-transform: none; letter-spacing: 0; font-weight: 600; }
.stp-sum { margin-top: -4px; }
.stp-lbl { font-size: 11.5px; font-weight: 700; color: var(--muted); }
.stp-recent { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.stp-recent .stp-lbl { margin-right: 2px; }
.stp-chip b { font-weight: 650; }
.stp-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.stp-game { display: grid; gap: 3px; padding: 0 0 6px; border: 0; border-radius: 8px; overflow: hidden; background: var(--bg2); color: var(--text); font: inherit; text-align: left; cursor: pointer; box-shadow: inset 0 0 0 1px var(--line); }
.stp-game:hover { box-shadow: inset 0 0 0 1px var(--accent); }
.stp-face { position: relative; aspect-ratio: 184 / 69; display: grid; place-items: center; background: linear-gradient(135deg, #2a1e16, #120d0a); }
.stp-face img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.stp-letter { font-family: Bricolage, Inter, sans-serif; font-weight: 800; font-size: 16px; color: var(--accent-t); }
.stp-name { padding: 0 7px; font-size: 12px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stp-hrs { padding: 0 7px; font-size: 11.5px; color: var(--muted); }
.stp-linked { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--green-t); }
.stp-linked span, .stp-linked .link-btn { color: var(--text); }

/* ---------- Game news (4.4) ---------- */
.gn-card { display: grid; grid-template-columns: 220px minmax(0, 1fr); margin-top: 4px; max-width: 600px; border-radius: 14px; overflow: hidden; background: var(--bg2); box-shadow: inset 0 0 0 1px var(--line); color: var(--text); text-decoration: none; }
.gn-card:hover { box-shadow: inset 0 0 0 1px var(--accent); text-decoration: none; }
.gn-pic { position: relative; min-height: 110px; display: grid; place-items: center; background: linear-gradient(135deg, #2a1e16, #120d0a); }
.gn-pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.gn-letter { font-family: Bricolage, Inter, sans-serif; font-weight: 800; font-size: 34px; color: var(--accent-t); }
.gn-body { display: grid; gap: 5px; align-content: start; padding: 10px 12px 10px; min-width: 0; }
.gn-top { display: flex; align-items: center; gap: 6px; }
.gn-game { font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--accent-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gn-tag { flex: none; font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: 99px; background: var(--bg3); color: var(--text-2); }
.gn-tag.patch { background: color-mix(in srgb, var(--blue) 25%, var(--bg3)); color: var(--text); }
.gn-title { font-family: Bricolage, Inter, sans-serif; font-size: 15.5px; line-height: 1.25; overflow-wrap: anywhere; }
.gn-text { font-size: 13px; line-height: 1.4; color: var(--text-2); white-space: pre-line; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.gn-meta { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); margin-top: 2px; }
.gn-meta .grow { flex: 1; }
.gn-more { display: inline-flex; align-items: center; gap: 4px; color: var(--accent-2); font-weight: 650; }
.gn-list { display: grid; gap: 6px; }
.gn-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 10px; background: var(--bg1); box-shadow: inset 0 0 0 1px var(--line); }
.gn-row .grow { flex: 1; }
.gn-mini { position: relative; flex: none; width: 64px; aspect-ratio: 460 / 215; border-radius: 5px; overflow: hidden; background: linear-gradient(135deg, #2a1e16, #120d0a); }
.gn-mini img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.gn-rname { font-weight: 650; font-size: 13.5px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kp-gamenews .row input { flex: 1; min-width: 0; }
@media (max-width: 560px) { .gn-card { grid-template-columns: 1fr; } .gn-pic { aspect-ratio: 460 / 215; min-height: 0; } .gn-row { flex-wrap: wrap; } }

/* ---------- Your monitors (4.4) ---------- */
.stc-own { border-top: 1px solid var(--line); padding-top: 6px; }
.stc-sub { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 2px 0 4px; }
.mon-list { display: grid; gap: 6px; }
.mon-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--bg1); box-shadow: inset 0 0 0 1px var(--line); }
.mon-row.mon-down { box-shadow: inset 0 0 0 1px var(--red); background: color-mix(in srgb, var(--red) 8%, var(--bg1)); }
.mon-row .grow { flex: 1; min-width: 0; }
.mon-mid { display: grid; gap: 1px; }
.mon-mid b, .mon-mid span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mon-st { display: grid; justify-items: end; gap: 1px; font-size: 13px; flex: none; text-align: right; }
.kp-monitors .row input { flex: 1; min-width: 0; }
.kp-monitors .row input:nth-child(2) { flex: 0 1 150px; }
@media (max-width: 560px) { .mon-row { flex-wrap: wrap; } .kp-monitors .row { flex-wrap: wrap; } .kp-monitors .row input:nth-child(2) { flex: 1 1 100%; } }
.act-item.k-watched .act-mark { color: var(--blue); background: color-mix(in srgb, var(--blue) 16%, var(--bg2)); }
.act-item.k-listened .act-mark { color: var(--green-t); background: color-mix(in srgb, var(--green) 16%, var(--bg2)); }

/* ---------- App font, size, motion, links (4.4) ---------- */
@font-face { font-family: "Lodge Nunito"; font-style: normal; font-weight: 200 1000; font-display: swap; src: url(fonts/app/nunito-latin-wght.woff2) format("woff2"); }
@font-face { font-family: "Lodge Atkinson"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/app/atkinson-400.woff2) format("woff2"); }
@font-face { font-family: "Lodge Atkinson"; font-style: normal; font-weight: 500 900; font-display: swap; src: url(fonts/app/atkinson-700.woff2) format("woff2"); }
@font-face { font-family: "Lodge Serif"; font-style: normal; font-weight: 200 900; font-display: swap; src: url(fonts/app/source-serif-latin-wght.woff2) format("woff2"); }
html[data-font="readable"] body { letter-spacing: .01em; }
html.reduce-motion *, html.reduce-motion *::before, html.reduce-motion *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: .001ms !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
html.underline-links a, html.underline-links .link-btn, html.underline-links .text a { text-decoration: underline; text-underline-offset: 2px; }
.font-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.font-card { display: grid; gap: 4px; justify-items: start; padding: 10px 12px; border: 0; border-radius: 12px; background: var(--bg2); color: var(--text); text-align: left; cursor: pointer; box-shadow: inset 0 0 0 1px var(--line); font: inherit; }
.font-card:hover { box-shadow: inset 0 0 0 1px var(--muted); }
.font-card.on { box-shadow: inset 0 0 0 2px var(--accent); }
.fc-sample { font-size: 26px; font-weight: 650; line-height: 1.1; }
.fc-label { font-size: 13px; color: var(--text-2); }

/* Settings → My account → Email (4.6) */
.em-cur { display: flex; align-items: center; gap: 10px; margin: 4px 0 10px; }
.em-ok { font-size: 12px; font-weight: 700; color: var(--green, #3ba55d); background: color-mix(in srgb, var(--green, #3ba55d) 15%, transparent); padding: 2px 8px; border-radius: 999px; }
#emailSection input { margin-bottom: 8px; }

/* Edit my server profile (4.6) */
.sp-row { display: flex; gap: 14px; align-items: center; margin-bottom: 10px; }
.sp-prev .avatar { flex: none; }
.pc-sp-tag { margin-left: 8px; font-size: 11px; font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--accent, #ff8a3d); background: color-mix(in srgb, var(--accent, #ff8a3d) 14%, transparent); padding: 1px 7px; border-radius: 999px; }

/* Spotify on the profile card (4.6, app 1.5.7) */
.pc-spotify { display: flex; align-items: center; gap: 8px; margin-top: 8px; padding: 7px 10px; border-radius: 9px; background: color-mix(in srgb, #1db954 14%, transparent); color: inherit; text-decoration: none; font-size: 13px; font-weight: 600; }
.pc-spotify:hover { background: color-mix(in srgb, #1db954 24%, transparent); }
.pc-spotify svg:first-child { color: #1db954; }

/* passkeys (4.7) */
#passkeyBtn { width: 100%; margin-top: 8px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
#passkeyBtn.hidden { display: none; }
.pk-list { display: flex; flex-direction: column; gap: 8px; margin: 6px 0 10px; }
.pk-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; background: var(--bg-2, rgba(255,255,255,.04)); }
.pk-row > svg { color: var(--accent, #ff8a3d); flex: none; }

/* ---------- 4.7: emoji & sticker packs ---------- */
.pk-wrap { display: flex; flex-direction: column; gap: 12px; }
.pk-own { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; background: var(--bg2); border-radius: 12px; padding: 12px; }
.pk-own .row { flex-wrap: wrap; gap: 6px; }
.pk-code { width: 9.5em; font-family: ui-monospace, Consolas, monospace; letter-spacing: .04em; }
.pk-add { display: flex; gap: 8px; }
.pk-add input { min-width: 0; }
.pk-sub { margin-top: 4px; }
.pk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.pk-card { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; text-align: left; background: var(--bg2); border: 1px solid transparent; border-radius: 12px; padding: 10px; color: inherit; cursor: pointer; font: inherit; }
.pk-card:hover { border-color: var(--accent); }
.pk-pv { display: flex; flex-wrap: wrap; gap: 4px; min-height: 30px; margin-bottom: 2px; }
.pk-pv img { width: 28px; height: 28px; object-fit: contain; }
.pk-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; max-height: 50vh; overflow-y: auto; padding: 2px; margin: 8px 0; }
.pk-h { grid-column: 1 / -1; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-top: 6px; }
.pk-tile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; background: var(--bg2); border: 2px solid transparent; border-radius: 10px; padding: 6px 4px; cursor: pointer; opacity: .45; color: inherit; font: inherit; }
.pk-tile img { width: 40px; height: 40px; object-fit: contain; }
.pk-tile.st img { width: 56px; height: 56px; }
.pk-tile.on { opacity: 1; border-color: var(--accent); }
.pk-tile.on::after { content: '✓'; position: absolute; top: 2px; right: 5px; font-size: 11px; font-weight: 800; color: var(--accent-t); }
.pk-tile.owned { opacity: .3; cursor: default; filter: grayscale(1); }
.pk-nm { font-size: 10px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }

/* ---------- 4.7: announcement following ---------- */
.fl-sec { margin-top: 6px; }
.fl-list { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.fl-ic { color: var(--accent-t); display: inline-flex; }
.fl-sub { margin-top: 8px; }
.bot-tag.fl-tag { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent-t); }
.bot-tag.fl-tag.click { cursor: pointer; }
.bot-tag.fl-tag.click:hover { text-decoration: underline; }

/* ---------- 4.7: storage per person ---------- */
.stg-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.stg-num { font-size: 16px; }
.stg-bar { height: 10px; border-radius: 6px; background: var(--bg3, var(--bg2)); overflow: hidden; margin: 8px 0; }
.stg-fill { height: 100%; background: var(--accent); border-radius: 6px; transition: width .3s; }
.stg-bar.warn .stg-fill { background: var(--yellow, #e0a526); }
.stg-bar.full .stg-fill { background: var(--red); }
.stg-kinds { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.stg-kinds .chip { display: inline-flex; align-items: center; gap: 2px; }
.stg-list { max-height: 360px; overflow-y: auto; }
.stg-row { gap: 10px; }
.stg-ic { color: var(--muted); display: inline-flex; }
.stg-t { min-width: 0; }
.stg-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: inherit; }
a.stg-name:hover { text-decoration: underline; }
.stg-size { white-space: nowrap; font-variant-numeric: tabular-nums; }
.stg-sub { margin-top: 10px; }

/* ---------- 4.7: campfire channels ---------- */
.cf-wrap { width: 100%; max-width: 900px; margin: 0 auto 6px; display: flex; flex-direction: column; gap: 8px; }
.cf-bar { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 22%, var(--bg2)), var(--bg2) 70%); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); }
.cf-bar .grow { min-width: 0; }
.cf-ic { width: 38px; height: 38px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--accent) 25%, transparent); color: var(--accent-t); flex: none; }
.cf-hands { background: var(--bg2); border-radius: 12px; padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; }
.cf-hands-h { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--accent-t); }
.cf-hand { display: flex; align-items: center; gap: 8px; }
.cf-hand-ic, .cf-hand-flag { color: var(--yellow-t); }
.cf-h { width: 100%; max-width: 900px; margin: 6px auto 0; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.tiles.cf-listeners .tile { transform: scale(.82); opacity: .9; }
.tile.cf-raised { box-shadow: 0 0 0 2px var(--yellow) inset; }
@media (max-width: 600px) { .cf-bar { flex-wrap: wrap; } .cf-bar .btn { width: 100%; } }

/* Words 2.0 (4.8): 3–4 players, best move line, replay */
.pl-p.out { opacity: .5; } .pl-p.out .pl-name { text-decoration: line-through; }
.wd-best { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 2px 0 6px; padding: 6px 10px; border-radius: 10px; background: color-mix(in srgb, var(--accent) 10%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent); font-size: 13px; }
.wd-best .grow { flex: 1; min-width: 0; }
.wd-tile.best { background: linear-gradient(#bfe6b3, #8fcf7e); outline: 2px dashed #5fae4f; outline-offset: -2px; animation: wd-best-in .3s ease; }
@keyframes wd-best-in { from { transform: scale(.6); opacity: 0; } }
.wd-replay .wd-board { margin: 0 auto; width: min(100%, 560px, max(280px, calc(100dvh - 420px))); }
.wd-rp-line { text-align: center; font-size: 13.5px; margin: 8px 0 4px; min-height: 20px; }
.wd-rp-best { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; margin-top: 4px; font-size: 13px; }
.wd-rp-rack { display: flex; justify-content: center; align-items: center; gap: 4px; min-height: 30px; flex-wrap: wrap; }
.wd-rp-rack .wd-tile.mini { width: 26px; height: 26px; flex: 0 0 auto; }
.wd-rp-rack .wd-tile.mini b { font-size: 14px; } .wd-rp-rack .wd-tile.mini i { font-size: 7px; }
.wd-rp-bar { justify-content: center; }
.wd-rp-slider { width: 100%; accent-color: var(--accent); margin: 6px 0; }
.wd-rp-list { max-height: 150px; overflow-y: auto; border-radius: 10px; background: var(--bg3, rgba(255,255,255,.05)); padding: 4px; display: grid; gap: 2px; }
.wd-rp-row { display: flex; align-items: center; gap: 8px; text-align: left; background: none; border: 0; color: var(--text); padding: 5px 8px; border-radius: 7px; font-size: 12.5px; cursor: pointer; }
.wd-rp-row:hover { background: rgba(255,255,255,.05); } .wd-rp-row.on { background: color-mix(in srgb, var(--accent) 18%, transparent); }
.wd-rp-row .grow { flex: 1; min-width: 0; }
.wd-rp-n { color: var(--muted); font-variant-numeric: tabular-nums; width: 22px; text-align: right; }
.wd-rp-miss { font-size: 11px; color: var(--muted); white-space: nowrap; }

/* Guest voice pass (4.8) */
.gp-intro { margin: 0 0 10px; }
.gp-out { display: grid; gap: 6px; margin-top: 10px; }
.gp-out:empty { display: none; }
.gp-link .iv-code { font-size: 12.5px; word-break: break-all; }
.gp-list { display: grid; gap: 6px; margin-top: 14px; }
.gp-list:empty { display: none; }
.gp-h { font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-top: 6px; }
.gp-row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; background: var(--bg3, rgba(255,255,255,.05)); }
.gp-row .grow { flex: 1; min-width: 0; }
.danger-text { color: #ef7d6a !important; }
.gp-card { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; background: var(--bg3, rgba(255,255,255,.05)); margin-bottom: 8px; }
.gp-card .grow { flex: 1; min-width: 0; }
.gp-chan { display: block; font-size: 17px; margin: 2px 0; }
.gp-icon { width: 52px; height: 52px; flex: 0 0 auto; }
.gp-facts { margin: 6px 0 12px; padding-left: 20px; color: var(--muted); font-size: 13px; display: grid; gap: 3px; }
.gp-banner { display: flex; align-items: center; gap: 10px; margin: 8px 8px 10px; padding: 10px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 12%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); color: var(--accent-t); }
.gp-banner .grow { flex: 1; min-width: 0; color: var(--text); }
.gp-tag { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; padding: 1px 6px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 20%, transparent); color: var(--accent-t); margin-left: 4px; flex: 0 0 auto; }
.gp-auth { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent-t); }
.gp-auth > div { color: var(--text); }
.iv-guest { margin-top: 8px; width: 100%; }
.modal-card.gp-modal { width: min(560px, 96vw); max-width: 96vw; }
.gp-modal select { width: 100%; min-width: 0; }
.gp-modal .two-col > * { min-width: 0; }
.gp-modal .iv-linkrow { display: flex; gap: 8px; min-width: 0; }
.gp-modal .gp-link { flex: 1; min-width: 0; overflow: hidden; text-align: left; }
.gp-modal .gp-row .btn { flex: 0 0 auto; }
.gp-modal .gp-row .grow { overflow: hidden; text-overflow: ellipsis; }
.gp-link .iv-code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; word-break: normal; }

/* Call recording (4.8) */
.rec-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; width: min(100%, 760px); margin: 0 auto 12px; padding: 9px 12px; border-radius: 12px; background: color-mix(in srgb, #e5484d 14%, var(--bg2, #1e1f22)); border: 1px solid color-mix(in srgb, #e5484d 45%, transparent); font-size: 13.5px; }
.rec-bar .grow { flex: 1; min-width: 160px; }
.rec-dot { width: 11px; height: 11px; border-radius: 50%; background: #e5484d; box-shadow: 0 0 0 0 rgba(229,72,77,.6); animation: rec-pulse 1.6s infinite; flex: 0 0 auto; }
@keyframes rec-pulse { 0% { box-shadow: 0 0 0 0 rgba(229,72,77,.55); } 70% { box-shadow: 0 0 0 8px rgba(229,72,77,0); } 100% { box-shadow: 0 0 0 0 rgba(229,72,77,0); } }
html.reduce-motion .rec-dot { animation: none; }
.rec-time { font-variant-numeric: tabular-nums; font-weight: 700; }
.rec-sub { color: var(--muted); }
.rec-me { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.rec-me.in { background: rgba(229,72,77,.18); color: #ff8a8d; } .rec-me.out { background: rgba(255,255,255,.07); color: var(--muted); }
.rec-tag { font-size: 9.5px; font-weight: 800; letter-spacing: .05em; padding: 1px 5px; border-radius: 5px; background: #e5484d; color: #fff; margin-left: 4px; flex: 0 0 auto; }
.rec-in { color: #e5484d; display: inline-flex; margin-left: 4px; } .rec-in svg { fill: currentColor; }
.ctl.rec-btn svg { color: #e5484d; } .ctl.rec-btn.on { background: #e5484d; } .ctl.rec-btn.on svg { color: #fff; fill: #fff; }
.tname .rec-in svg, .vuser .rec-in svg { color: #e5484d; fill: #e5484d; stroke: #e5484d; }

/* Accessibility (4.8) */
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.brand h1.app-name { font: inherit; margin: 0; letter-spacing: inherit; }
/* a clear focus ring, only for keyboard users (html.kbd is set by the Tab key, cleared by the mouse) */
html.kbd :is(button, a, input, select, textarea, [role="button"], [tabindex="0"]):focus-visible { outline: 2.5px solid var(--accent) !important; outline-offset: 2px; border-radius: 6px; }
html.kbd .chan[role="button"]:focus-visible, html.kbd .vuser[role="button"]:focus-visible { outline-offset: -2px; }

/* speed (4.8): messages off screen aren't laid out or painted until you scroll near them (the browser remembers each
   one's real height once it has been shown). overflow-clip-margin keeps the hover toolbar (it pokes out above) visible. */
.msg-list > .msg { content-visibility: auto; contain-intrinsic-size: auto 46px; overflow-clip-margin: 34px; }

/* Game menu (4.8) */
.gm-card { max-width: 720px; display: grid; gap: 8px; }
.gm-head { display: flex; align-items: center; gap: 10px; }
.gm-head .grow { flex: 1; min-width: 0; }
.gm-head b { font-size: 15.5px; }
.gm-ic { font-size: 26px; line-height: 1; }
.gm-sec { margin-top: 6px; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-t); }
.gm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 6px; }
.gm-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--bg3, rgba(255,255,255,.05)); border: 1px solid transparent; }
.gm-row:hover { border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.gm-e { font-size: 22px; width: 30px; text-align: center; flex: 0 0 auto; }
.gm-tx { flex: 1; min-width: 0; }
.gm-name { display: flex; align-items: center; gap: 6px; font-size: 13.5px; }
.gm-who { font-size: 11.5px; color: var(--accent-t); font-weight: 600; }
.gm-desc { font-size: 12px; color: var(--muted); line-height: 1.35; }
.gm-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: 0 0 auto; }
.gm-cmd { font-size: 11px; color: var(--muted); background: rgba(0,0,0,.18); padding: 1px 6px; border-radius: 5px; }
.gm-people { display: grid; gap: 4px; max-height: 50vh; overflow-y: auto; margin: 8px 0 12px; }
.gm-person { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 10px; background: var(--bg3, rgba(255,255,255,.05)); border: 1px solid transparent; color: var(--text); text-align: left; cursor: pointer; }
.gm-person .grow { flex: 1; }
.gm-person.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.gm-check { width: 16px; height: 16px; border-radius: 5px; border: 2px solid var(--muted); }
.gm-person.on .gm-check { background: var(--accent); border-color: var(--accent); }
@media (max-width: 560px) { .gm-grid { grid-template-columns: 1fr; } }
.gm-now { padding: 8px 10px; border-radius: 10px; background: color-mix(in srgb, var(--accent) 8%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent); display: grid; gap: 6px; }
.gm-now-h { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-t); }
.gm-now-list { display: flex; flex-wrap: wrap; gap: 6px; }
.gm-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px 3px 4px; border-radius: 999px; background: var(--bg3, rgba(255,255,255,.06)); font-size: 12.5px; color: var(--text); border: 1px solid transparent; }
.gm-vchip { cursor: pointer; padding-left: 9px; } .gm-vchip:hover { border-color: var(--accent); }
.gm-avs { display: inline-flex; } .gm-avs > * + * { margin-left: -6px; }
.gm-items { margin-top: 14px; display: grid; gap: 6px; }
.gm-items-h { font-weight: 700; }
.gm-items-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 4px 12px; }
.gm-items-sec { grid-column: 1 / -1; margin-top: 6px; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-t); }
.gm-item { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 8px; background: var(--bg3, rgba(255,255,255,.04)); font-size: 13px; cursor: pointer; flex-direction: row !important; }
.gm-item input { width: auto; margin: 0; }
.gm-item .gm-cmd { margin-left: auto; }
.win-steps { margin: 4px 0 14px; padding-left: 22px; display: grid; gap: 8px; font-size: 14px; line-height: 1.45; }
.win-steps b { color: var(--text); }

/* Share into Lodge (4.9, share.js) */
.share-preview { gap: 8px; }
.share-files { display: grid; gap: 4px; }
.share-file { display: flex; align-items: center; gap: 8px; min-width: 0; }
.share-file .sf-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share-modal .fw-list { max-height: min(300px, 42vh); }
/* games (4.9): End game sits on its own row, away from the main buttons, and asks first */
.game-end-row { display: flex; justify-content: flex-end; margin-top: 8px; padding-top: 6px; border-top: 1px solid var(--bg3, rgba(255,255,255,.06)); }
.row-ctl { display: inline-flex; align-items: center; gap: 10px; }

/* polish pass (4.9): readable red text on the light theme */
:root[data-theme="light"] .btn.danger-text, :root[data-theme="light"] .set-logout { color: #b83536; }
.usage-out { display: grid; gap: 2px; margin: -4px 0 8px; }
.usage-out .usage-total { color: var(--text); font-weight: 600; }
/* Translate button (4.9, translate.js) */
.tr-box { margin-top: 6px; padding: 6px 10px; border-left: 3px solid var(--accent-soft); background: var(--hover); border-radius: 0 8px 8px 0; }
.tr-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.tr-head .link-btn { font-size: 12px; }
.tr-dot { opacity: .6; }
.tr-text { margin-top: 2px; }

/* polish pass (5.0): breathing room between the loose parts inside a settings panel (fields, hints, button rows);
   setting rows keep their own lines between them */
.kp > :not(.kp-head):not(.setting-row):not(.kp-head + *) { margin-top: 12px; }
.kp > .kp-head + :not(.setting-row) { margin-top: 10px; }
.kp > .field + .muted.small, .kp > .field + p.muted { margin-top: 6px; }
.acct-top { margin-top: 14px; }
.kc .game-end-row { margin-top: -4px; }

/* polish pass 2 (5.0): the channel header on phones: the name gives way (…) before the buttons do, so the last
   button (search) is never cut off at the edge */
@media (max-width: 860px) {
  .chat-head { gap: 2px; padding: 0 8px 0 10px; }
  .chat-head .ch-title { flex: 1 1 auto; min-width: 0; max-width: none; }
  .chat-head .icon-btn { width: 32px; height: 32px; flex: none; }
  .chat-head .search-box { width: 32px; padding: 0 7px; }
}

/* Mini games in voice (5.0, voicegames.js) */
.vg-dock { position: fixed; right: 16px; bottom: 96px; width: min(420px, calc(100vw - 32px)); max-height: calc(100vh - 140px); overflow-y: auto; z-index: 60; background: var(--bg1); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 18px 50px var(--shadow); }
.vg-dock.small { width: auto; max-width: calc(100vw - 32px); }
.vg-head { display: flex; align-items: center; gap: 6px; padding: 10px 10px 10px 14px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--bg1); z-index: 1; }
.vg-dock.small .vg-head { border-bottom: 0; }
.vg-title { display: grid; flex: 1; min-width: 0; cursor: default; }
.vg-dock.small .vg-title { cursor: pointer; }
.vg-timer { font-weight: 800; font-variant-numeric: tabular-nums; color: var(--muted); min-width: 32px; text-align: right; }
.vg-timer.low { color: var(--red-t); }
.vg-body { display: grid; gap: 10px; padding: 12px 14px 14px; }
.vg-word { display: grid; justify-items: center; gap: 4px; text-align: center; }
.vg-say { color: var(--muted); font-size: 13px; }
.vg-secret { font-size: 22px; font-weight: 800; color: var(--accent-t); letter-spacing: .02em; }
.vg-mask { font-family: var(--mono); font-size: 22px; font-weight: 700; letter-spacing: .12em; }
.vg-choices { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.vg-board { background: #fff; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.vg-board canvas { display: block; width: 100%; aspect-ratio: 1; cursor: crosshair; touch-action: none; }
.vg-tools { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.vg-tools2 { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; flex-basis: 100%; }
.vg-color { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); cursor: pointer; padding: 0; }
.vg-color.on { outline: 2px solid var(--accent); outline-offset: 2px; }
.vg-size { width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg2); display: grid; place-items: center; cursor: pointer; padding: 0; }
.vg-size span { display: block; border-radius: 50%; background: var(--text); }
.vg-size.on { border-color: var(--accent); }
.vg-tools .btn.on { background: var(--accent-soft); color: var(--accent-t); }
.vg-feed { display: grid; gap: 2px; max-height: 120px; overflow-y: auto; font-size: 13px; }
.vg-line.sys { color: var(--muted); font-style: italic; }
.vg-line.ok { color: var(--green-t); font-weight: 700; }
.vg-guess { width: 100%; box-sizing: border-box; }
.vg-got { color: var(--green-t); font-weight: 700; text-align: center; }
.vg-scores { display: flex; flex-wrap: wrap; gap: 6px; }
.vg-scores.final { display: grid; gap: 6px; }
.vg-score { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 4px; border-radius: 999px; background: var(--bg2); font-size: 12.5px; }
.vg-scores.final .vg-score { border-radius: 10px; padding: 6px 10px; font-size: 14px; }
.vg-score.got { box-shadow: inset 0 0 0 1px var(--green); }
.vg-score.drawer { box-shadow: inset 0 0 0 1px var(--accent); }
.vg-score .vg-name { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vg-scores.final .vg-name { flex: 1; max-width: none; }
.vg-rank { width: 22px; text-align: center; }
.vg-again { justify-content: flex-end; }
.vg-wyr { display: grid; gap: 6px; }
.vg-or { text-align: center; color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.vg-opt { --pct: 0%; position: relative; overflow: hidden; display: grid; gap: 6px; text-align: left; padding: 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg2); color: var(--text); font-size: 15px; font-weight: 650; cursor: pointer; }
.vg-opt:hover:not(:disabled) { border-color: var(--accent); }
.vg-opt.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.vg-opt.shown::before { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--pct); background: var(--accent-soft); transition: width .6s; }
.vg-opt > * { position: relative; }
.vg-opt:disabled { cursor: default; opacity: 1; }
.vg-opt-meta { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.vg-faces { display: flex; gap: 2px; flex-wrap: wrap; }
.vg-count { text-align: center; }
.vg-hist { display: grid; gap: 4px; font-size: 13px; }
@media (max-width: 860px) {
  .vg-dock { left: 8px; right: 8px; bottom: 80px; width: auto; max-height: calc(100vh - 120px); }
  .vg-dock.small { left: auto; }
}

/* desktop app on a Mac (5.0): the red/yellow/green window buttons sit at the top left */
html.desk-darwin #titlebar { padding-left: 78px; }

/* front page: "Also for Mac and Linux" under the Get Lodge row (5.0) */
.lp-also { text-align: center; margin: 14px 0 0; color: var(--lp-muted, #a9a39b); font-size: 14px; }
.lp-also a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Shared lists /list (5.0) ---------- */
.list-card { margin-top: 4px; max-width: 480px; min-width: 0; display: grid; gap: 8px; padding: 12px 14px; border-radius: 14px; background: var(--bg2); border: 1px solid var(--line); border-left: 4px solid var(--accent); }
.list-card.locked { border-left-color: var(--bg4); }
.lc-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.lc-head b { display: block; overflow-wrap: anywhere; }
.lc-mark { font-size: 20px; line-height: 1; }
.lc-sub { color: var(--muted); font-size: 12.5px; }
.lc-bar { height: 4px; border-radius: 4px; background: var(--bg3); overflow: hidden; }
.lc-bar > span { display: block; height: 100%; background: var(--green); border-radius: 4px; transition: width .25s; }
.lc-items { display: grid; gap: 2px; }
.lc-item { display: flex; align-items: center; gap: 8px; padding: 4px 4px; border-radius: 8px; min-width: 0; }
.lc-item:hover { background: var(--hover); }
.lc-check { flex: none; width: 20px; height: 20px; border-radius: 6px; border: 2px solid var(--bg4); background: transparent; display: grid; place-items: center; color: var(--on-accent); cursor: pointer; padding: 0; }
.lc-check:disabled { cursor: default; }
.lc-item.done .lc-check { background: var(--green); border-color: var(--green); }
.lc-text { min-width: 0; overflow-wrap: anywhere; line-height: 1.35; }
.lc-item.done .lc-text > span:first-child { text-decoration: line-through; color: var(--muted); }
.lc-who { color: var(--muted); font-size: 12px; }
.lc-del { opacity: 0; width: 26px; height: 26px; }
.lc-item:hover .lc-del, .lc-del:focus-visible { opacity: 1; }
@media (hover: none) { .lc-del { opacity: .7; } }
.lc-add { display: flex; gap: 6px; }
.lc-add input { flex: 1; min-width: 0; height: 32px; }
.lc-add .btn { flex: none; width: 34px; padding: 0; display: grid; place-items: center; }

/* ---------- Connect four (5.0) ---------- */
.c4-card { margin-top: 4px; width: min(100%, 380px); display: grid; gap: 8px; padding: 12px 14px; border-radius: 14px; background: var(--bg2); border: 1px solid var(--line); border-left: 4px solid var(--accent); }
.c4-card.over { border-left-color: var(--bg4); }
.c4-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.c4-pl { display: flex; align-items: center; gap: 6px; min-width: 0; flex: 1 1 0; padding: 4px 8px; border-radius: 999px; border: 1px solid transparent; }
.c4-pl.now { border-color: var(--accent); background: var(--accent-soft); }
.c4-pl.won { border-color: var(--green); }
.c4-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: 13.5px; }
.c4-vs { color: var(--muted); font-size: 12px; flex: none; }
.c4-disc { flex: none; width: 14px; height: 14px; border-radius: 50%; }
.c4-disc.d1, .c4-cell.d1 { background: var(--accent); }
.c4-disc.d2, .c4-cell.d2 { background: var(--blue); }
.c4-status { font-size: 13.5px; color: var(--text-2); }
.c4-card.my-turn .c4-status { color: var(--accent-t); font-weight: 600; }
.c4-board { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; padding: 6px; border-radius: 12px; background: var(--bg3); }
.c4-col { display: grid; gap: 4px; padding: 3px; border: 0; border-radius: 8px; background: transparent; cursor: pointer; }
.c4-col:disabled { cursor: default; }
.c4-col:not(:disabled):hover, .c4-col:not(:disabled):focus-visible { background: var(--hover); }
.c4-cell { aspect-ratio: 1; border-radius: 50%; background: var(--bg1); box-shadow: inset 0 2px 3px rgba(0, 0, 0, .25); }
.c4-cell.last { outline: 2px solid var(--text); outline-offset: -2px; }
.c4-cell.win { outline: 3px solid var(--green); outline-offset: -3px; }
.c4-cell.d1.last, .c4-cell.d2.last { animation: c4drop .25s ease-out; }
@keyframes c4drop { from { transform: translateY(-40px); opacity: .4; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .c4-cell.last { animation: none; } }
html.reduce-motion .c4-cell.last { animation: none; }
.c4-acts { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- Read it out (5.0) ---------- */
.ro-pop { display: grid; gap: 8px; width: min(300px, calc(100vw - 32px)); padding: 12px; }
.ro-pop .setting-row { padding: 0; border: 0; }
.ro-pitch { display: flex; gap: 6px; }
.ro-pitch .btn { flex: 1; }

/* ---------- Call recap (5.0) ---------- */
.cr-card { margin-top: 4px; max-width: 480px; min-width: 0; display: grid; gap: 8px; padding: 10px 14px; border-radius: 14px; background: var(--bg2); border: 1px solid var(--line); border-left: 4px solid var(--green); }
.cr-head { display: flex; align-items: center; gap: 10px; }
.cr-mark { font-size: 18px; }
.cr-sub { color: var(--muted); font-size: 12.5px; }
.cr-people { display: flex; flex-wrap: wrap; gap: 6px; }
.cr-p { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px 2px 3px; border-radius: 999px; background: var(--bg3); font-size: 12.5px; max-width: 100%; min-width: 0; }
.cr-p > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cr-did { display: flex; flex-wrap: wrap; gap: 6px; }
.cr-tag { font-size: 12px; padding: 2px 8px; border-radius: 6px; background: var(--accent-soft); color: var(--accent-t); overflow-wrap: anywhere; }

/* ---------- 5.1: every holiday gets a look (New Year's, Valentine's, St. Patrick's, Easter, 4th of July, Thanksgiving, Christmas) ---------- */
/* falling, rising and spinning pieces (season.js pieces()) */
.season-fx .sf-fall, .season-fx .sf-rise, .season-fx .sf-confetti, .season-fx .sf-petal { position: absolute; display: block; opacity: .4; animation-timing-function: linear; animation-iteration-count: infinite; }
.season-fx .sf-fall svg, .season-fx .sf-rise svg { width: 100%; height: 100%; display: block; }
.season-fx .sf-fall { top: -24px; animation-name: sf-fall; }
.season-fx .sf-confetti { top: -12px; background: currentColor; border-radius: 1px; opacity: .55; animation-name: sf-fall; }
.season-fx .sf-petal { top: -12px; background: currentColor; border-radius: 80% 10% 80% 10%; opacity: .5; animation-name: sf-fall; }
.season-fx .sf-rise { bottom: -24px; opacity: .28; animation-name: sf-rise; }
@keyframes sf-fall { 0% { transform: translate(0, -20px) rotate(0); } 50% { transform: translate(var(--drift, 0), 50vh) rotate(calc(var(--spin, 360deg) / 2)); } 100% { transform: translate(0, 106vh) rotate(var(--spin, 360deg)); } }
@keyframes sf-rise { 0% { transform: translate(0, 0) scale(.8); opacity: 0; } 10% { opacity: .28; } 50% { transform: translate(var(--drift, 0), -50vh) scale(1); } 90% { opacity: .22; } 100% { transform: translate(0, -106vh) scale(1.1); opacity: 0; } }
:root[data-theme="light"] .season-fx .sf-fall, :root[data-theme="light"] .season-fx .sf-petal, :root[data-theme="light"] .season-fx .sf-confetti { opacity: .6; }
:root[data-theme="light"] .season-fx .sf-rise { opacity: .4; }
/* fireworks: 12 sparks fly out, fade, and the next burst goes somewhere else (one cycle = 11.5 s) */
.season-fx .sf-fw { position: absolute; width: 0; height: 0; }
.season-fx .sf-fw i { position: absolute; left: -2px; top: -2px; width: 4px; height: 4px; border-radius: 50%; background: currentColor; box-shadow: 0 0 6px currentColor; opacity: 0; animation: sf-burst 11.5s ease-out infinite; }
@keyframes sf-burst { 0% { transform: rotate(var(--a)) translateY(0); opacity: 0; } 1% { opacity: .75; } 12% { transform: rotate(var(--a)) translateY(-58px); opacity: .45; } 18% { transform: rotate(var(--a)) translateY(-68px); opacity: 0; } 100% { opacity: 0; } }
:root[data-theme="light"] .season-fx .sf-fw i { box-shadow: none; }

/* little emoji next to category headers, date lines, Keeper and server icons (the rules for these are above) */
:root[data-season="newyear"] { --sx: "🎉"; --sx-row: "🎉  ✨  🥂  ✨  🎉"; }
:root[data-season="valentines"] { --sx: "💗"; --sx-row: "💗  🌹  💌  🌹  💗"; }
:root[data-season="stpatricks"] { --sx: "☘️"; --sx-row: "☘️  🍀  🌈  🍀  ☘️"; }
:root[data-season="easter"] { --sx: "🐣"; --sx-row: "🌷  🥚  🐣  🥚  🌷"; }
:root[data-season="july4"] { --sx: "🎆"; --sx-row: "⭐  🎆  🎇  🎆  ⭐"; }
:root[data-season="thanksgiving"] { --sx: "🍂"; --sx-row: "🍂  🦃  🥧  🌽  🍂"; }
:root[data-season="christmas"] { --sx: "🎄"; --sx-row: "🎄  🎁  ⭐  🎁  🎄"; }
/* the Home button wears one too */
:root[data-season="newyear"] .rail-btn.home::after, :root[data-season="valentines"] .rail-btn.home::after, :root[data-season="stpatricks"] .rail-btn.home::after,
:root[data-season="easter"] .rail-btn.home::after, :root[data-season="july4"] .rail-btn.home::after, :root[data-season="thanksgiving"] .rail-btn.home::after,
:root[data-season="christmas"] .rail-btn.home::after { position: absolute; left: -5px; top: -5px; font-size: 14px; line-height: 1; filter: drop-shadow(0 1px 2px rgba(0,0,0,.6)); pointer-events: none; }
:root[data-season="newyear"] .rail-btn.home::after { content: "🥳"; }
:root[data-season="valentines"] .rail-btn.home::after { content: "💘"; }
:root[data-season="stpatricks"] .rail-btn.home::after { content: "🍀"; }
:root[data-season="easter"] .rail-btn.home::after { content: "🐰"; }
:root[data-season="july4"] .rail-btn.home::after { content: "🎆"; }
:root[data-season="thanksgiving"] .rail-btn.home::after { content: "🦃"; }
:root[data-season="christmas"] .rail-btn.home::after { content: "🎅"; }
/* a tint at the bottom of the server rail in the season's color */
:root[data-season="newyear"] .rail { background: linear-gradient(180deg, var(--bg0) 40%, color-mix(in srgb, #f5c542 14%, var(--bg0))); }
:root[data-season="valentines"] .rail { background: linear-gradient(180deg, var(--bg0) 40%, color-mix(in srgb, #ff5c8a 16%, var(--bg0))); }
:root[data-season="stpatricks"] .rail { background: linear-gradient(180deg, var(--bg0) 40%, color-mix(in srgb, #3ccf6e 14%, var(--bg0))); }
:root[data-season="easter"] .rail { background: linear-gradient(180deg, color-mix(in srgb, #ffb3d1 8%, var(--bg0)), var(--bg0) 40%, color-mix(in srgb, #9fe8c8 12%, var(--bg0))); }
:root[data-season="july4"] .rail { background: linear-gradient(180deg, color-mix(in srgb, #6aa8ff 12%, var(--bg0)), var(--bg0) 45%, color-mix(in srgb, #ff4f5e 14%, var(--bg0))); }
:root[data-season="thanksgiving"] .rail { background: linear-gradient(180deg, var(--bg0) 40%, color-mix(in srgb, #e8902a 16%, var(--bg0))); }
:root[data-season="christmas"] .rail { background: linear-gradient(180deg, var(--bg0) 40%, color-mix(in srgb, #2faa64 16%, var(--bg0))); }
/* Christmas: a string of lights under the top bar, twinkling; snow piled on your user bar like winter */
:root[data-season="christmas"] .chat-head { position: relative; }
:root[data-season="christmas"] .chat-head::after { content: ""; position: absolute; left: 0; right: 0; top: calc(100% - 2px); height: 12px; pointer-events: none; z-index: 3; opacity: .85;
  background: radial-gradient(3px 4px at 8px 8px, #ff5a52 92%, transparent) 0 0 / 64px 12px repeat-x, radial-gradient(3px 4px at 24px 8px, #ffd36b 92%, transparent) 0 0 / 64px 12px repeat-x,
    radial-gradient(3px 4px at 40px 8px, #4fd08a 92%, transparent) 0 0 / 64px 12px repeat-x, radial-gradient(3px 4px at 56px 8px, #8fd3ff 92%, transparent) 0 0 / 64px 12px repeat-x,
    radial-gradient(16px 6px at 8px 0, transparent 70%, rgba(40, 70, 50, .9) 72%, transparent 80%) 0 0 / 16px 12px repeat-x; animation: sx-twinkle 2.4s steps(2, jump-none) infinite; }
@keyframes sx-twinkle { 0%, 100% { filter: brightness(1) drop-shadow(0 0 3px rgba(255, 220, 140, .5)); } 50% { filter: brightness(.7); } }
:root[data-season="christmas"] .me { position: relative; }
:root[data-season="christmas"] .me::before { content: ""; position: absolute; left: 0; right: 0; top: -6px; height: 10px; pointer-events: none;
  background: radial-gradient(10px 7px at 10px 7px, #eef6ff 98%, transparent) 0 0 / 22px 10px repeat-x, radial-gradient(14px 8px at 14px 8px, #e6f1fd 98%, transparent) 9px 1px / 31px 10px repeat-x; opacity: .9; }
:root[data-theme="light"][data-season="christmas"] .me::before { filter: drop-shadow(0 1px 1px rgba(60, 110, 160, .35)); }
/* New Year's and 4th of July: a soft glow line under the top bar */
:root[data-season="newyear"] .chat-head, :root[data-season="july4"] .chat-head, :root[data-season="valentines"] .chat-head, :root[data-season="stpatricks"] .chat-head, :root[data-season="easter"] .chat-head, :root[data-season="thanksgiving"] .chat-head { box-shadow: inset 0 -1px 0 color-mix(in srgb, var(--accent) 30%, transparent); }
@media (prefers-reduced-motion: reduce) { :root[data-season="christmas"] .chat-head::after { animation: none; } }
:root.app-away[data-season="christmas"] .chat-head::after { animation-play-state: paused; }

/* seasonal colors for the new holidays (Settings → Appearance → Seasonal colors) */
:root[data-scolor="newyear"] { --bg0: #0b0c14; --bg1: #10121c; --bg2: #151826; --bg3: #1e2233; --bg4: #2a2f45; --line: #262b3f; --text: #f2efe6; --text-2: #d4d0c4; --muted: #9497a8; --hover: rgba(245, 197, 66, .05); --mention-bg: rgba(245, 197, 66, .1); --code-bg: #0b0c14; --yellow: #ffd76a; --blue: #9fb4ff; }
:root[data-theme="light"][data-scolor="newyear"] { --bg0: #ebe8de; --bg1: #f6f3ea; --bg2: #fffdf7; --bg3: #efeadc; --bg4: #ddd6c2; --line: #e3dccb; --text: #1d1a12; --text-2: #3f3a2c; --muted: #6d6656; --hover: rgba(90, 70, 0, .05); --mention-bg: rgba(245, 197, 66, .18); --code-bg: #f6f3ea; --accent-2: color-mix(in srgb, var(--accent) 52%, black); }
:root[data-scolor="valentines"] { --bg0: #120a0e; --bg1: #190e14; --bg2: #20121a; --bg3: #2c1824; --bg4: #3c2231; --line: #33202b; --text: #f7e9ee; --text-2: #dccbd2; --muted: #a68e99; --hover: rgba(255, 120, 160, .05); --mention-bg: rgba(255, 92, 138, .1); --code-bg: #120a0e; --red: #ff6b6b; }
:root[data-theme="light"][data-scolor="valentines"] { --bg0: #f1e3e8; --bg1: #faf0f3; --bg2: #fffafb; --bg3: #f5e6eb; --bg4: #e7cfd8; --line: #ecd8df; --text: #2a1219; --text-2: #4c2e38; --muted: #7f5f6a; --hover: rgba(120, 0, 40, .04); --mention-bg: rgba(255, 92, 138, .14); --code-bg: #faf0f3; }
:root[data-scolor="stpatricks"] { --bg0: #08110c; --bg1: #0c1711; --bg2: #111e16; --bg3: #18291f; --bg4: #22382b; --line: #1d3025; --text: #e9f3ec; --text-2: #c7d8cc; --muted: #8aa595; --hover: rgba(120, 230, 160, .05); --mention-bg: rgba(255, 210, 74, .1); --code-bg: #08110c; --yellow: #ffd24a; }
:root[data-theme="light"][data-scolor="stpatricks"] { --bg0: #dfeae2; --bg1: #eef5f0; --bg2: #fbfffc; --bg3: #e4efe7; --bg4: #cfe0d4; --line: #d6e4da; --text: #102016; --text-2: #2c4234; --muted: #587262; --hover: rgba(0, 80, 30, .04); --mention-bg: rgba(255, 200, 40, .18); --code-bg: #eef5f0; --accent-2: color-mix(in srgb, var(--accent) 50%, black); }
:root[data-scolor="easter"] { --bg0: #110f17; --bg1: #17141f; --bg2: #1d1927; --bg3: #272233; --bg4: #352e45; --line: #2e2840; --text: #f3eefa; --text-2: #d6cfe2; --muted: #9d94ae; --hover: rgba(220, 190, 255, .05); --mention-bg: rgba(201, 162, 255, .1); --code-bg: #110f17; --green: #7fe0b0; --yellow: #ffe08a; --blue: #a8d8ff; }
:root[data-theme="light"][data-scolor="easter"] { --bg0: #ece6f4; --bg1: #f6f2fb; --bg2: #fffeff; --bg3: #efe8f7; --bg4: #ddd2ec; --line: #e5dcef; --text: #1f1730; --text-2: #3e3352; --muted: #6c6181; --hover: rgba(60, 0, 120, .04); --mention-bg: rgba(201, 162, 255, .18); --code-bg: #f6f2fb; --accent-2: color-mix(in srgb, var(--accent) 50%, black); }
:root[data-scolor="july4"] { --bg0: #090d18; --bg1: #0d1322; --bg2: #12192c; --bg3: #1a2339; --bg4: #253150; --line: #1f2a44; --text: #eef2fa; --text-2: #cdd5e6; --muted: #8d9ab4; --hover: rgba(140, 180, 255, .05); --mention-bg: rgba(255, 79, 94, .1); --code-bg: #090d18; --red: #ff6b78; --blue: #6aa8ff; }
:root[data-theme="light"][data-scolor="july4"] { --bg0: #e1e6f0; --bg1: #f0f3f9; --bg2: #ffffff; --bg3: #e6ebf4; --bg4: #d0d8e8; --line: #d8dfeb; --text: #101828; --text-2: #2c3a52; --muted: #5a6880; --hover: rgba(0, 30, 90, .04); --mention-bg: rgba(255, 79, 94, .12); --code-bg: #f0f3f9; }
:root[data-scolor="thanksgiving"] { --bg0: #110c08; --bg1: #18110b; --bg2: #1f160f; --bg3: #2b1f15; --bg4: #3b2b1d; --line: #33261a; --text: #f5ebdf; --text-2: #dacbb8; --muted: #a5927c; --hover: rgba(240, 170, 90, .05); --mention-bg: rgba(232, 144, 42, .1); --code-bg: #110c08; --red: #e0584a; --green: #9cc25a; }
:root[data-theme="light"][data-scolor="thanksgiving"] { --bg0: #ece2d5; --bg1: #f7efe4; --bg2: #fffaf3; --bg3: #f1e5d5; --bg4: #e2d0b9; --line: #e6d6c1; --text: #2a1a0c; --text-2: #4a3522; --muted: #7e6650; --hover: rgba(100, 50, 0, .05); --mention-bg: rgba(232, 144, 42, .14); --code-bg: #f7efe4; }
:root[data-scolor="christmas"] { --bg0: #081210; --bg1: #0c1915; --bg2: #10201b; --bg3: #172b24; --bg4: #213a31; --line: #1c322a; --text: #f0f5ef; --text-2: #cfdcd0; --muted: #8ea597; --hover: rgba(160, 230, 190, .05); --mention-bg: rgba(255, 211, 107, .1); --code-bg: #081210; --green: #4fd08a; --yellow: #ffd36b; }
:root[data-theme="light"][data-scolor="christmas"] { --bg0: #e1ebe5; --bg1: #eff6f1; --bg2: #fffefc; --bg3: #e5efe9; --bg4: #cfe0d6; --line: #d6e5dc; --text: #0f1f18; --text-2: #2b4237; --muted: #587266; --hover: rgba(0, 60, 30, .04); --mention-bg: rgba(255, 90, 82, .12); --code-bg: #eff6f1; }
/* the same finishing touches every season's colors get: glowing buttons, a tinted open channel, the season's scrollbar */
:root:is([data-scolor="newyear"], [data-scolor="valentines"], [data-scolor="stpatricks"], [data-scolor="easter"], [data-scolor="july4"], [data-scolor="thanksgiving"], [data-scolor="christmas"]) .btn.primary { background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 82%, white), var(--accent)); box-shadow: 0 2px 12px -4px color-mix(in srgb, var(--accent) 60%, transparent); }
:root:is([data-scolor="newyear"], [data-scolor="valentines"], [data-scolor="stpatricks"], [data-scolor="easter"], [data-scolor="july4"], [data-scolor="thanksgiving"], [data-scolor="christmas"]) :is(.rail-btn:hover, .rail-btn.active) { box-shadow: 0 0 0 2px var(--accent), 0 0 16px -2px color-mix(in srgb, var(--accent) 50%, transparent); }
:root:is([data-scolor="newyear"], [data-scolor="valentines"], [data-scolor="stpatricks"], [data-scolor="easter"], [data-scolor="july4"], [data-scolor="thanksgiving"], [data-scolor="christmas"]) .chan.active { background: color-mix(in srgb, var(--accent) 15%, var(--bg3)); }
:root:is([data-scolor="newyear"], [data-scolor="valentines"], [data-scolor="stpatricks"], [data-scolor="easter"], [data-scolor="july4"], [data-scolor="thanksgiving"], [data-scolor="christmas"]) .msg.mentioned { box-shadow: inset 3px 0 0 var(--accent); }
:root:is([data-scolor="newyear"], [data-scolor="valentines"], [data-scolor="stpatricks"], [data-scolor="easter"], [data-scolor="july4"], [data-scolor="thanksgiving"], [data-scolor="christmas"]) ::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--accent) 22%, var(--bg4)); background-clip: padding-box; }
:root:is([data-scolor="newyear"], [data-scolor="valentines"], [data-scolor="stpatricks"], [data-scolor="easter"], [data-scolor="july4"], [data-scolor="thanksgiving"], [data-scolor="christmas"]) .modal-card { box-shadow: 0 20px 60px -10px rgba(0, 0, 0, .6), 0 0 0 1px var(--line), 0 0 50px -24px color-mix(in srgb, var(--accent) 55%, transparent); }
:root[data-scolor="newyear"] .chat { background: radial-gradient(1000px 300px at 50% -10%, rgba(245, 197, 66, .08), transparent 70%), var(--bg2); }
:root[data-scolor="valentines"] .chat { background: radial-gradient(1200px 380px at 50% 112%, rgba(255, 92, 138, .1), transparent 70%), var(--bg2); }
:root[data-scolor="stpatricks"] .chat { background: radial-gradient(1200px 380px at 50% 112%, rgba(60, 207, 110, .09), transparent 70%), var(--bg2); }
:root[data-scolor="easter"] .chat { background: radial-gradient(900px 300px at 15% -10%, rgba(255, 179, 209, .07), transparent 70%), radial-gradient(900px 300px at 85% 110%, rgba(159, 232, 200, .07), transparent 70%), var(--bg2); }
:root[data-scolor="july4"] .chat { background: radial-gradient(1000px 300px at 50% -10%, rgba(106, 168, 255, .09), transparent 70%), var(--bg2); }
:root[data-scolor="thanksgiving"] .chat { background: radial-gradient(1200px 380px at 50% 112%, rgba(232, 144, 42, .1), transparent 70%), var(--bg2); }
:root[data-scolor="christmas"] .chat { background: radial-gradient(1000px 300px at 50% -10%, rgba(255, 90, 82, .07), transparent 70%), var(--bg2); }


/* profile badges for each holiday */
.pc-badge[class*="b-newyear"] { border-color: color-mix(in srgb, #f5c542 50%, var(--line)); background: color-mix(in srgb, #f5c542 10%, var(--bg1)); }
.pc-badge[class*="b-valentines"] { border-color: color-mix(in srgb, #ff5c8a 50%, var(--line)); background: color-mix(in srgb, #ff5c8a 10%, var(--bg1)); }
.pc-badge[class*="b-stpatricks"] { border-color: color-mix(in srgb, #3ccf6e 50%, var(--line)); background: color-mix(in srgb, #3ccf6e 10%, var(--bg1)); }
.pc-badge[class*="b-easter"] { border-color: color-mix(in srgb, #c9a2ff 50%, var(--line)); background: color-mix(in srgb, #c9a2ff 10%, var(--bg1)); }
.pc-badge[class*="b-july4"] { border-color: color-mix(in srgb, #ff4f5e 50%, var(--line)); background: color-mix(in srgb, #6aa8ff 10%, var(--bg1)); }
.pc-badge[class*="b-thanksgiving"] { border-color: color-mix(in srgb, #e8902a 50%, var(--line)); background: color-mix(in srgb, #e8902a 10%, var(--bg1)); }
.pc-badge[class*="b-christmas"] { border-color: color-mix(in srgb, #ff5a52 50%, var(--line)); background: color-mix(in srgb, #4fd08a 10%, var(--bg1)); }

/* the front page for each holiday (landing-season.js) */
.lp-s-newyear #lpSky stop:first-child { stop-color: #07081a; } .lp-s-newyear #lpSky stop:last-child { stop-color: #1c1d3e; } .lp-s-newyear .lp-hero { background: #07081a; }
.lp-s-newyear .lp-season-tag { background: rgba(245, 197, 66, .14); border-color: rgba(245, 197, 66, .35); }
.lp-s-valentines #lpSky stop:first-child { stop-color: #1a0a18; } .lp-s-valentines #lpSky stop:last-child { stop-color: #42183a; } .lp-s-valentines .lp-hero { background: #1a0a18; }
.lp-s-valentines .lp-season-tag { background: rgba(255, 92, 138, .14); border-color: rgba(255, 92, 138, .35); } .lp-s-valentines .lp-hill-far { fill: #3a1834; }
.lp-s-stpatricks #lpSky stop:first-child { stop-color: #0b1a24; } .lp-s-stpatricks #lpSky stop:last-child { stop-color: #1f4048; } .lp-s-stpatricks .lp-hero { background: #0b1a24; }
.lp-s-stpatricks .lp-season-tag { background: rgba(60, 207, 110, .14); border-color: rgba(60, 207, 110, .35); } .lp-s-stpatricks .lp-hill-far { fill: #1c4436; }
.lp-s-easter #lpSky stop:first-child { stop-color: #1a1734; } .lp-s-easter #lpSky stop:last-child { stop-color: #4a3a66; } .lp-s-easter .lp-hero { background: #1a1734; }
.lp-s-easter .lp-season-tag { background: rgba(201, 162, 255, .14); border-color: rgba(201, 162, 255, .35); } .lp-s-easter .lp-hill-far { fill: #3a3a5c; }
.lp-s-july4 #lpSky stop:first-child { stop-color: #060a1c; } .lp-s-july4 #lpSky stop:last-child { stop-color: #18234a; } .lp-s-july4 .lp-hero { background: #060a1c; }
.lp-s-july4 .lp-season-tag { background: rgba(106, 168, 255, .14); border-color: rgba(255, 79, 94, .4); }
.lp-s-thanksgiving #lpSky stop:first-child { stop-color: #1a0f14; } .lp-s-thanksgiving #lpSky stop:last-child { stop-color: #4a2a22; } .lp-s-thanksgiving .lp-hero { background: #1a0f14; }
.lp-s-thanksgiving .lp-season-tag { background: rgba(232, 144, 42, .14); border-color: rgba(232, 144, 42, .35); } .lp-s-thanksgiving .lp-hill-far { fill: #3c2a20; } .lp-s-thanksgiving .lp-trees { fill: #2a1a12; }
.lp-s-christmas #lpSky stop:first-child { stop-color: #0a1428; } .lp-s-christmas #lpSky stop:last-child { stop-color: #20385e; } .lp-s-christmas .lp-hero { background: #0a1428; }
.lp-s-christmas .lp-season-tag { background: rgba(255, 90, 82, .14); border-color: rgba(255, 90, 82, .35); } .lp-s-christmas .lp-hill-far { fill: #2a4568; } .lp-s-christmas .lp-trees { fill: #18323a; }
/* pieces on the front page (hearts, clovers, leaves, petals, confetti) */
.lp-pieces { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.lp-pieces i { position: absolute; display: block; opacity: .55; animation: sf-fall linear infinite; }
.lp-pieces i.up { top: auto; bottom: -24px; animation-name: sf-rise; opacity: .4; }
.lp-pieces i svg { width: 100%; height: 100%; display: block; }
.lp-pieces i.dot { background: currentColor; border-radius: 1px; }
.lp-pieces i.petal { background: currentColor; border-radius: 80% 10% 80% 10%; }
.lp-fw circle { transform-box: fill-box; transform-origin: center; }
.lp-fw { animation: lp-fw 6s ease-out infinite; opacity: 0; transform-box: fill-box; transform-origin: center; }
@keyframes lp-fw { 0% { opacity: 0; transform: scale(.2); } 4% { opacity: 1; } 30% { opacity: .8; transform: scale(1); } 45%, 100% { opacity: 0; transform: scale(1.08); } }
.lp-bulb { animation: lp-twinkle 1.6s steps(2, jump-none) infinite; }
@keyframes lp-twinkle { 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .lp-pieces { display: none; } .lp-fw, .lp-bulb { animation: none !important; opacity: 1; } }

/* ---------- webhook embed boxes (5.1) ---------- */
.embed.rich { gap: 6px; max-width: min(520px, 100%); }
.em-author { font-size: 12.5px; font-weight: 650; color: var(--text-2); }
.embed.rich .em-title { color: var(--text); font-size: 15px; }
.embed.rich a.em-title { color: var(--accent-2); }
.em-rdesc { white-space: pre-wrap; font-size: 14px; color: var(--text-2); line-height: 1.4; }
.em-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 14px; margin-top: 2px; }
.em-field { grid-column: 1 / -1; min-width: 0; }
.em-field.inline { grid-column: auto; }
.em-fn { font-size: 12.5px; font-weight: 700; color: var(--text); margin-bottom: 2px; }
.em-fv { white-space: pre-wrap; font-size: 13.5px; color: var(--text-2); overflow-wrap: anywhere; }
.em-foot { font-size: 12px; color: var(--muted); margin-top: 2px; }
@media (max-width: 560px) { .em-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- GitHub posts (5.1): a Lodge card ---------- */
.gh-card { margin-top: 6px; max-width: min(540px, 100%); background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.gh-top { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 10%, var(--bg2)), var(--bg2) 70%); border-bottom: 1px solid var(--line); }
.gh-card.ping .gh-top { border-bottom: 0; background: linear-gradient(135deg, color-mix(in srgb, var(--green) 10%, var(--bg2)), var(--bg2) 70%); }
.gh-ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-t); flex: none; }
.gh-card.ping .gh-ic { background: color-mix(in srgb, var(--green) 16%, transparent); color: var(--green-t); }
.gh-t { display: grid; gap: 3px; min-width: 0; }
.gh-title { font-family: Bricolage, Inter, sans-serif; font-size: 16px; font-weight: 700; color: var(--text); text-decoration: none; }
a.gh-title:hover { text-decoration: underline; }
.gh-sub { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.gh-pill { font: 600 12px var(--mono, ui-monospace, monospace); padding: 2px 8px; border-radius: 999px; background: var(--bg3); color: var(--text-2); }
.gh-list { padding: 10px 14px 4px; display: grid; }
.gh-commit { position: relative; padding: 0 0 12px 22px; }
.gh-commit::before { content: ''; position: absolute; left: 4px; top: 6px; width: 8px; height: 8px; border-radius: 50%; border: 2px solid var(--accent); background: var(--bg2); z-index: 1; }
.gh-commit:not(:last-child)::after { content: ''; position: absolute; left: 8px; top: 16px; bottom: -4px; width: 2px; background: var(--line); }
.gh-chead { display: flex; align-items: baseline; gap: 10px; }
.gh-ctitle { font-weight: 650; font-size: 14.5px; color: var(--text); flex: 1; min-width: 0; }
.gh-sha { font: 11.5px var(--mono, ui-monospace, monospace); color: var(--muted); flex: none; text-decoration: none; }
a.gh-sha:hover { color: var(--accent-t); }
.gh-lines { margin: 5px 0 0; padding: 0; list-style: none; display: grid; gap: 3px; font-size: 13.5px; color: var(--text-2); line-height: 1.45; }
.gh-lines li { position: relative; padding-left: 14px; }
.gh-lines li::before { content: ''; position: absolute; left: 2px; top: .58em; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.gh-lines li.plain { padding-left: 0; } .gh-lines li.plain::before { display: none; }
.gh-more { padding: 0 0 10px 22px; font-size: 12.5px; color: var(--muted); }
.gh-foot { display: flex; align-items: center; gap: 6px; padding: 9px 14px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); background: var(--bg1); }
.gh-dot { opacity: .6; }
.gh-commit:last-child { padding-bottom: 6px; }
.gh-av { width: 100%; height: 100%; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 18%, var(--bg3)); color: var(--accent-t); }

/* ---------- jump to a date (5.2) ---------- */
.popover.jd { width: 292px; padding: 10px; }
.jd-head { display: flex; align-items: center; justify-content: space-between; margin: 2px 0 6px; }
.jd-month { font-size: 14px; }
.jd-arrow[disabled] { opacity: .3; pointer-events: none; }
.jd-week, .jd-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.jd-week span { font-size: 11px; font-weight: 700; color: var(--muted); padding: 2px 0 4px; }
.jd-grid { min-height: 216px; align-content: start; }
.jd-grid.jd-loading { opacity: .5; }
.jd-day { position: relative; height: 34px; border: 0; border-radius: 8px; background: none; color: var(--muted); font: inherit; font-size: 13px; cursor: default; padding: 0; }
.jd-day.has { color: var(--text); font-weight: 700; cursor: pointer; }
.jd-day.has:hover, .jd-day.has:focus-visible { background: var(--bg4); outline: none; }
.jd-day.has:focus-visible { box-shadow: 0 0 0 2px var(--accent); }
.jd-day.today span { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--accent); }
.jd-day[disabled] { opacity: .45; }
.jd-day.has[disabled] { opacity: 1; }
.jd-dot { position: absolute; left: 50%; bottom: 3px; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--accent); opacity: var(--k, 1); transform: scale(calc(.7 + var(--k, 1) * .5)); }
.jd-quick { display: flex; gap: 6px; justify-content: flex-end; margin-top: 6px; }
.jd-otd:not(:empty) { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.jd-otd-title { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; margin-bottom: 4px; }
.jd-year { display: flex; align-items: center; justify-content: space-between; border: 0; background: none; color: var(--text); font: inherit; padding: 7px 8px; border-radius: 8px; cursor: pointer; text-align: left; }
.jd-year:hover, .jd-year:focus-visible { background: var(--bg4); outline: none; }
.jd-tip { display: flex; align-items: center; gap: 8px; font-weight: 600; }

/* ---------- webhook box pictures + GitHub release card (5.2) ---------- */
.em-author { display: flex; align-items: center; gap: 7px; }
.em-aicon { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; }
.embed.rich.has-rthumb { padding-right: 104px; min-height: 104px; }
.em-rthumb { position: absolute; top: 12px; right: 12px; width: 80px; height: 80px; object-fit: cover; border-radius: 8px; cursor: zoom-in; background: var(--bg3); }
.em-rimg { width: 100%; max-height: 300px; object-fit: cover; border-radius: 8px; cursor: zoom-in; margin-top: 4px; background: var(--bg3); }
.embed.rich.has-rthumb .em-rimg { width: calc(100% + 90px); }
.gh-card.release .gh-top { background: linear-gradient(135deg, color-mix(in srgb, var(--green) 11%, var(--bg2)), var(--bg2) 70%); }
.gh-card.release .gh-ic { background: color-mix(in srgb, var(--green) 16%, transparent); color: var(--green-t); }
.gh-kicker { font-size: 11.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--green-t); }
.gh-notes { padding: 10px 14px 8px; display: grid; gap: 6px; }
.gh-notes .gh-lines { margin: 0; }
.gh-h { font-weight: 700; font-size: 13.5px; color: var(--text); margin-top: 2px; }
.gh-notes .gh-more { padding: 0; }

/* ---------- short what's new + "New" tags (5.2) ---------- */
.hl-grid { display: grid; gap: 14px; padding: 18px 22px 4px; overflow-y: auto; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.hl-tile { display: grid; gap: 10px; align-content: start; }
.hl-pic { position: relative; aspect-ratio: 16 / 10; border-radius: 12px; overflow: hidden; background: radial-gradient(120% 120% at 20% 0%, color-mix(in srgb, var(--accent) 22%, var(--bg3)), var(--bg2)); border: 1px solid var(--line); display: grid; place-items: center; }
.hl-pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top left; }
.hl-ic { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-t); }
.hl-pic.has-img .hl-ic { display: none; }
.hl-tx { display: grid; gap: 3px; }
.hl-tx b { font-family: Bricolage, Inter, sans-serif; font-size: 15.5px; color: var(--text); }
.hl-tx span { font-size: 13.5px; color: var(--text-2); line-height: 1.45; }
.modal-card.hl-modal { max-width: min(760px, calc(100vw - 24px)); }
@media (max-width: 600px) {
  .hl-grid { grid-template-columns: 1fr; padding: 14px 16px 2px; gap: 12px; }
  .hl-tile { grid-template-columns: 112px 1fr; align-items: center; }
  .hl-pic { aspect-ratio: 4 / 3; }
  .hl-ic { width: 40px; height: 40px; border-radius: 12px; }
}
.new-pill { display: inline-flex; align-items: center; margin-left: 8px; padding: 1px 7px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: 10.5px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; line-height: 1.5; vertical-align: middle; flex: none; }
.is-new.nt-dot { position: relative; }
.is-new.nt-dot::after { content: ''; position: absolute; top: 3px; right: 3px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--bg2); animation: new-pulse 2.4s ease-out 3; }
@keyframes new-pulse { 0% { box-shadow: 0 0 0 2px var(--bg2), 0 0 0 2px color-mix(in srgb, var(--accent) 60%, transparent); } 100% { box-shadow: 0 0 0 2px var(--bg2), 0 0 0 10px transparent; } }
@media (max-width: 860px) { .chat-head .jd-btn { display: none; } } /* phones: Jump to a date is in the search box's tips (no room in the header) */

/* ---------- chess (5.2) ---------- */
.ch-card { margin-top: 4px; width: min(100%, 400px); display: grid; gap: 8px; padding: 12px 14px; border-radius: 14px; background: var(--bg2); border: 1px solid var(--line); border-left: 4px solid var(--accent); }
.ch-card.over { border-left-color: var(--bg4); }
.ch-pl { display: flex; align-items: center; gap: 7px; min-width: 0; padding: 4px 8px; border-radius: 10px; border: 1px solid transparent; }
.ch-pl.now { border-color: var(--accent); background: var(--accent-soft); }
.ch-pl.won { border-color: var(--green); }
.ch-dot { flex: none; width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--muted); }
.ch-dot.w { background: #f6efe4; } .ch-dot.b { background: #1f1913; }
.ch-name { font-weight: 650; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ch-taken { font-family: "Segoe UI Symbol", "Noto Sans Symbols 2", "Noto Sans Symbols", "DejaVu Sans", "Apple Symbols", sans-serif; font-size: 14px; color: var(--muted); letter-spacing: -2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.ch-taken b { font-family: var(--font); letter-spacing: 0; font-size: 12px; margin-left: 4px; color: var(--text-2); }
.ch-clock { margin-left: auto; flex: none; font: 700 14px var(--mono, ui-monospace, monospace); font-variant-numeric: tabular-nums; padding: 3px 8px; border-radius: 8px; background: var(--bg3); color: var(--text-2); }
.ch-clock.run { background: var(--accent); color: var(--on-accent); }
.ch-clock.low { background: var(--red); color: #fff; }
.ch-status { font-size: 13.5px; color: var(--text-2); }
.ch-card.my-turn .ch-status { color: var(--accent-t); font-weight: 650; }
.ch-board { position: relative; display: grid; grid-template-columns: repeat(8, 1fr); aspect-ratio: 1; border-radius: 10px; overflow: hidden; box-shadow: 0 2px 10px var(--shadow); user-select: none; -webkit-user-select: none; }
.ch-board.busy { opacity: .85; pointer-events: none; }
.ch-sq { position: relative; border-radius: 0; display: grid; place-items: center; border: 0; padding: 0; margin: 0; aspect-ratio: 1; min-width: 0; font: inherit; cursor: default; }
.ch-sq.ch-l { background: #efe0c8; } .ch-sq.ch-d { background: #b7865c; }
.ch-board.live .ch-sq { cursor: pointer; }
.ch-sq.last.ch-l { background: #f3d67a; } .ch-sq.last.ch-d { background: #d6a849; }
.ch-sq.pick { box-shadow: inset 0 0 0 3px var(--accent); }
.ch-sq.check { box-shadow: inset 0 0 16px 5px rgba(224, 57, 43, .95); }
.ch-sq.to::after { content: ''; position: absolute; width: 28%; height: 28%; border-radius: 50%; background: rgba(40, 24, 10, .38); pointer-events: none; }
.ch-sq.to.cap::after { width: 86%; height: 86%; background: transparent; border: 4px solid rgba(40, 24, 10, .38); box-sizing: border-box; }
.ch-sq:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; z-index: 1; }
.ch-pc { font-family: "Segoe UI Symbol", "Noto Sans Symbols 2", "Noto Sans Symbols", "DejaVu Sans", "Apple Symbols", sans-serif; font-size: min(36px, 8.6vw); line-height: 1; pointer-events: none; }
.ch-pc.w { color: #fffaf2; text-shadow: 0 0 1px #2a1d10, 0 0 1px #2a1d10, 1px 1px 0 #2a1d10, -1px -1px 0 #2a1d10, 1px -1px 0 #2a1d10, -1px 1px 0 #2a1d10, 0 2px 3px rgba(0,0,0,.35); }
.ch-pc.b { color: #221a12; text-shadow: 0 0 1px #f3e6d2, 0 1px 2px rgba(0,0,0,.35); }
.ch-rk, .ch-fl { position: absolute; font-size: 9.5px; font-weight: 800; opacity: .75; pointer-events: none; }
.ch-rk { top: 2px; left: 3px; } .ch-fl { bottom: 1px; right: 3px; }
.ch-sq.ch-l .ch-rk, .ch-sq.ch-l .ch-fl { color: #8a5f3b; } .ch-sq.ch-d .ch-rk, .ch-sq.ch-d .ch-fl { color: #f3e6d2; }
.ch-promo { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 6px; background: rgba(20, 14, 8, .7); z-index: 3; }
.ch-promo .ch-sq { width: 20%; aspect-ratio: 1; border-radius: 10px; background: #efe0c8; cursor: pointer; }
.ch-promo .ch-sq:hover { background: #f3d67a; }
.ch-promo-x { position: absolute; top: 6px; right: 8px; border: 0; background: none; color: #fff; font-size: 18px; cursor: pointer; }
.ch-moves { display: flex; gap: 10px; overflow-x: auto; white-space: nowrap; font: 12.5px var(--mono, ui-monospace, monospace); color: var(--text-2); padding: 2px 0 4px; scrollbar-width: thin; }
.ch-mv i { font-style: normal; color: var(--muted); }
.ch-acts { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.ch-offer { font-size: 13px; font-weight: 600; }

/* ---------- battleship (5.2) ---------- */
.bs-card { margin-top: 4px; width: min(100%, 460px); display: grid; gap: 8px; padding: 12px 14px; border-radius: 14px; background: var(--bg2); border: 1px solid var(--line); border-left: 4px solid var(--blue); }
.bs-card.over { border-left-color: var(--bg4); }
.bs-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.bs-pl { display: flex; align-items: center; gap: 6px; min-width: 0; flex: 1 1 0; padding: 4px 8px; border-radius: 999px; border: 1px solid transparent; }
.bs-pl.now { border-color: var(--accent); background: var(--accent-soft); }
.bs-pl.won { border-color: var(--green); }
.bs-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: 13.5px; min-width: 0; }
.bs-left { margin-left: auto; flex: none; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.bs-vs { color: var(--muted); font-size: 12px; flex: none; }
.bs-status { font-size: 13.5px; color: var(--text-2); }
.bs-card.my-turn .bs-status { color: var(--accent-t); font-weight: 650; }
.bs-boards { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; }
.bs-boards.busy { pointer-events: none; opacity: .85; }
.bs-wrap { flex: 1 1 230px; min-width: 0; max-width: 300px; display: grid; gap: 4px; }
.bs-wrap.small { flex: 0 1 170px; max-width: 190px; }
.bs-label { font-size: 11.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.bs-grid { display: grid; grid-template-columns: repeat(10, 1fr); gap: 2px; padding: 4px; border-radius: 10px; background: color-mix(in srgb, var(--blue) 22%, var(--bg1)); aspect-ratio: 1; }
.bs-c { position: relative; display: grid; place-items: center; border: 0; padding: 0; border-radius: 3px; background: color-mix(in srgb, var(--blue) 14%, var(--bg2)); aspect-ratio: 1; min-width: 0; font: inherit; }
.bs-grid.live button.bs-c { cursor: crosshair; }
.bs-grid.live button.bs-c:hover, .bs-grid.live button.bs-c:focus-visible { background: color-mix(in srgb, var(--accent) 45%, var(--bg2)); outline: none; }
.bs-c.ship { background: #7c8798; }
.bs-c.ship.ac.s0 { border-radius: 40% 3px 3px 40%; } .bs-c.ship.ac.s1 { border-radius: 3px 40% 40% 3px; }
.bs-c.ship.dn.s0 { border-radius: 40% 40% 3px 3px; } .bs-c.ship.dn.s1 { border-radius: 3px 3px 40% 40%; }
.bs-c.miss::after { content: ''; width: 26%; height: 26%; border-radius: 50%; background: color-mix(in srgb, var(--text) 45%, transparent); }
.bs-c.hit::after { content: ''; width: 58%; height: 58%; border-radius: 50%; background: radial-gradient(circle, #ffd27a 0%, #ff7a2f 55%, #e0392b 100%); box-shadow: 0 0 6px rgba(255, 122, 47, .7); }
.bs-c.sunk { background: #4a2a22; }
.bs-c.sunk.hit::after { background: #e0392b; box-shadow: none; width: 40%; height: 40%; }
.bs-c.last { outline: 2px solid var(--text); outline-offset: -1px; z-index: 1; }
.bs-wrap.small .bs-grid { gap: 1px; padding: 3px; }
.bs-acts { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.bs-stats { margin-left: auto; }
html[data-theme="light"] .bs-c.ship { background: #8a96a8; }

/* ---------- profile song (5.2) ---------- */
.ps-card { position: relative; display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 12px; background: var(--bg2); border: 1px solid var(--line); min-width: 0; }
.ps-cover { position: relative; flex: none; width: 56px; height: 56px; border-radius: 10px; overflow: hidden; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-t); }
.ps-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ps-play { position: absolute; inset: 0; margin: auto; width: 34px; height: 34px; border-radius: 50%; border: 0; display: grid; place-items: center; background: rgba(0,0,0,.55); color: #fff; cursor: pointer; z-index: 1; transition: transform .15s, background .15s; }
.ps-play:hover, .ps-card.on .ps-play { background: var(--accent); color: var(--on-accent); transform: scale(1.06); }
.ps-play:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ps-tx { display: grid; gap: 2px; min-width: 0; flex: 1; }
.ps-title { font-size: 14px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ps-by { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ps-bar { height: 4px; border-radius: 4px; background: var(--bg4); overflow: hidden; margin-top: 6px; }
.ps-bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .25s linear; }
.ps-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; }
.ps-time { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ps-open { color: var(--muted); display: grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; }
.ps-open:hover { color: var(--text); background: var(--bg3); }
.ps-frame { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; border: 0; left: 0; top: 0; }
.ps-block { display: grid; gap: 6px; }
.ps-cur { display: grid; gap: 10px; margin-bottom: 10px; }
.ps-add input { flex: 1; min-width: 0; }
.ps-cat { display: flex; align-items: center; }
/* 5.3 stream check: shown on a stream card while the picture isn't coming through */
.stream-note { padding: 8px 12px; font-size: 13px; color: var(--yellow-t, #e8b43a); background: color-mix(in srgb, var(--yellow, #e8b43a) 10%, transparent); border-top: 1px solid var(--line); }
/* 5.3 channel permissions: roles and people to pick from */
.ov-who { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }
.ov-chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg0); color: var(--text); font: inherit; font-size: 13px; cursor: pointer; }
.ov-chip.person { padding-left: 4px; }
.ov-chip:hover { border-color: var(--accent); }
.ov-chip.on { background: color-mix(in srgb, var(--accent) 16%, var(--bg0)); border-color: var(--accent); color: var(--accent-t, var(--accent)); }
.ov-chip.add { border-style: dashed; color: var(--muted); }
.ov-chip .ov-n { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; }
.ov-chip .ov-x { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; color: var(--muted); }
.ov-chip .ov-x:hover { background: var(--red); color: #fff; }
.ov-pick { width: 260px; padding: 8px; display: grid; gap: 6px; }
.ov-pick-list { max-height: 260px; overflow-y: auto; display: grid; gap: 2px; }
.ov-pick-item { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 0; border-radius: 8px; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.ov-pick-item:hover { background: var(--bg2, rgba(255,255,255,.06)); }
.ov-for { margin: 0 0 6px; }
/* 5.3 game achievements (Settings → My account → Badges) */
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; margin: 8px 0 4px; }
.ach { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg0); }
.ach .ach-e { font-size: 22px; line-height: 1; filter: grayscale(1); opacity: .45; }
.ach.got { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); background: color-mix(in srgb, var(--accent) 7%, var(--bg0)); }
.ach.got .ach-e { filter: none; opacity: 1; }
.ach-t { display: grid; gap: 2px; min-width: 0; flex: 1; }
.ach:not(.got) .ach-t b { color: var(--muted); }
.ach-bar { height: 5px; border-radius: 3px; background: var(--line); overflow: hidden; margin-top: 4px; }
.ach-bar i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.ach-of { font-size: 11px; }
/* ---------- 5.4 the staff page (lodgehq.app/staff) ---------- */
html.spg-on, html.spg-on body { overflow: hidden; }
.spg { position: fixed; inset: 0; z-index: 40; background: var(--bg0); display: grid; grid-template-columns: 252px 1fr; grid-template-rows: 1fr; color: var(--text); }
.spg-top { display: none; }
.spg-side { background: var(--bg1); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; padding: 16px 12px 12px; }
.spg-brand { display: flex; align-items: center; gap: 10px; padding: 2px 8px 14px; }
.spg-brand .spg-logo { width: 34px; height: 34px; border-radius: 10px; }
.spg-brand b { display: block; font-size: 16px; }
.spg-brand span { display: block; color: var(--muted); font-size: 12px; }
.spg-list { flex: 1; overflow-y: auto; display: grid; align-content: start; gap: 2px; scrollbar-width: thin; }
.spg-grp { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 14px 10px 6px; }
.spg-nav { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 0; border-radius: 9px; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.spg-nav svg { color: var(--muted); flex: none; }
.spg-nav:hover { background: var(--bg2); }
.spg-nav.on { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent-t, var(--accent)); }
.spg-nav.on svg { color: var(--accent); }
.spg-nav .spg-n { margin-left: auto; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; border-radius: 9px; padding: 0 6px; min-width: 18px; text-align: center; }
.spg-me { display: flex; align-items: center; gap: 10px; padding: 10px; margin-top: 10px; border-radius: 12px; background: var(--bg2); }
.spg-me-t { flex: 1; min-width: 0; display: grid; }
.spg-me-t b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spg-job { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; color: var(--accent-t, var(--accent)); }
.spg-open { width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--line); background: var(--bg1); color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.spg-open:hover { color: var(--text); border-color: var(--accent); }
.spg-scrim { display: none; }
.spg-main { overflow-y: auto; padding: 26px 32px 40px; min-width: 0; }
.spg-main > * { max-width: 1180px; margin-left: auto; margin-right: auto; }
.spg-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.spg-head h1, .spg-hello h1 { font-size: 22px; margin: 0; }
.spg-head p, .spg-hello p { margin: 2px 0 0; }
.spg-head-ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 14%, var(--bg1)); color: var(--accent); flex: none; }
.spg-body { padding: 0; max-width: none; }
.spg-home { display: grid; gap: 16px; }
.spg-hello { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.spg-hello > div:first-child { flex: 1; min-width: 220px; }
.spg-hello-acts { display: flex; gap: 8px; }
.spg-card { background: var(--bg1); border: 1px solid var(--line); border-radius: 14px; padding: 16px; min-width: 0; }
.spg-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.spg-stat { display: grid; gap: 2px; text-align: left; font: inherit; color: var(--text); }
.spg-stat.click { cursor: pointer; } .spg-stat.click:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.spg-stat small { color: var(--muted); font-size: 12px; font-weight: 600; }
.spg-stat b { font-size: 26px; line-height: 1.2; }
.spg-stat span { font-size: 12px; color: var(--muted); }
.spg-stat span.warn { color: var(--yellow-t, var(--yellow)); } .spg-stat span.bad { color: var(--red-t, var(--red)); }
.spg-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--green); vertical-align: 0; }
.spg-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 12px; align-items: start; }
.spg-card-h { display: flex; align-items: center; margin-bottom: 8px; }
.spg-card-h h3 { margin: 0; font-size: 14px; flex: 1; }
.spg-link { border: 0; background: none; color: var(--accent-t, var(--accent)); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.spg-log { display: grid; grid-template-columns: 66px 54px 1fr; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 13px; align-items: start; }
.spg-card-h + .spg-log { border-top: 0; }
.spg-log time { color: var(--muted); font-variant-numeric: tabular-nums; }
.spg-log-t { overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.spg-tag { font-size: 10px; font-weight: 800; border-radius: 6px; padding: 2px 0; text-align: center; letter-spacing: .03em; }
.spg-tag.w { color: var(--yellow-t, var(--yellow)); background: color-mix(in srgb, var(--yellow) 14%, transparent); }
.spg-tag.e { color: var(--red-t, var(--red)); background: color-mix(in srgb, var(--red) 14%, transparent); }
.spg-person { display: flex; align-items: center; gap: 10px; padding: 7px 0; }
.spg-person-t { flex: 1; min-width: 0; display: grid; }
.spg-person-t small { font-size: 12px; }
.spg-on-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--bg4, #30343a); flex: none; }
.spg-on-dot.on { background: var(--green); }
.spg-note { margin: 8px 0 0; }
.spg-quick-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.spg-q { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg0); color: var(--text); font: inherit; cursor: pointer; text-align: left; }
.spg-q svg { color: var(--accent); flex: none; }
.spg-q:hover { border-color: var(--accent); }
.spg-foot { display: flex; align-items: center; gap: 6px; margin: 0; }
.spg-gate { margin: 12vh auto 0; max-width: 420px; text-align: center; background: var(--bg1); border: 1px solid var(--line); border-radius: 18px; padding: 28px; grid-column: 1 / -1; align-self: start; }
.spg-gate-ic { width: 56px; height: 56px; margin: 0 auto 8px; border-radius: 16px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 14%, var(--bg1)); color: var(--accent); }
.spg-gate h2 { margin: 6px 0; font-size: 20px; }
.spg-gate-acts { display: flex; gap: 8px; justify-content: center; margin-top: 16px; flex-wrap: wrap; }
@media (max-width: 900px) {
  .spg-stats { grid-template-columns: 1fr 1fr; }
  .spg-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .spg { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .spg-top { display: flex; align-items: center; gap: 10px; padding: 10px 16px; padding-top: max(10px, var(--sat, 0px)); background: var(--bg1); border-bottom: 1px solid var(--line); }
  .spg-ham { width: 38px; height: 38px; border-radius: 10px; border: 0; background: var(--bg2); color: var(--text); display: grid; place-items: center; }
  .spg-brand.small { padding: 0; } .spg-brand.small .spg-logo { width: 28px; height: 28px; border-radius: 8px; }
  .spg-side { position: fixed; top: 0; bottom: 0; left: 0; width: min(290px, 86vw); z-index: 2; transform: translateX(-100%); transition: transform .2s ease; padding-top: max(16px, var(--sat, 0px)); }
  .spg.menu-open .spg-side { transform: none; box-shadow: 0 0 60px rgba(0,0,0,.5); }
  .spg.menu-open .spg-scrim { display: block; position: fixed; inset: 0; z-index: 1; background: rgba(0,0,0,.45); }
  .spg-main { padding: 16px 16px 32px; }
  .spg-hello-acts .btn.ghost { display: none; }
}
.spg-from-admin { justify-self: start; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--bg1); color: var(--accent-t, var(--accent)); border-radius: 8px; padding: 6px 10px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.spg-from-admin:hover { border-color: var(--accent); }
