/* Bits the rewrite added. Uses Bulma's theme variables, so it follows dark mode. */
.auth-box { max-width: 560px; margin: 2rem auto; }
/* Login and sign-up */
.auth-page { display: flex; justify-content: center; padding: 2.5rem 1rem 3rem; }
.auth-card { width: 100%; max-width: 420px; padding: 2rem 2rem 1.5rem; }
.auth-logo { display: block; width: 56px; height: 56px; object-fit: contain; margin: 0 auto 0.75rem; }
.auth-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; font-size: 0.9rem; }
.auth-perks { list-style: none; margin: 0; padding: 0; }
.auth-perks li { display: flex; align-items: center; gap: 0.6rem; padding: 0.3rem 0; }
.auth-perks .material-symbols-outlined { color: var(--bulma-primary); }
.auth-note { margin-top: 0.75rem; text-align: center; font-size: 0.8rem; opacity: 0.65; }
.auth-card hr { margin: 1.5rem 0 1rem; }
.greentext { color: #789922; } /* room chat, posts and comments: a line starting with > */
.system-msg { font-style: italic; opacity: 0.75; }
.chat-delete { margin-left: 0.4rem; opacity: 0.4; font-size: 0.8em; cursor: pointer; visibility: hidden; }
.chat-delete:hover { opacity: 1; }
/* Only on the hovered line; touch screens can't hover, so they always show it. */
.msg:hover .chat-delete { visibility: visible; }
@media (hover: none) { .chat-delete { visibility: visible; } }
.mod-log-when { white-space: nowrap; }
.mod-log-detail { word-break: break-word; }
.room-notice { font-size: 0.85em; padding: 0.25rem 0.5rem; color: var(--bulma-text-strong); background: var(--bulma-background); }
.emote { vertical-align: middle; }
/* An emote without a size: its own, but never more than 100 px either way. */
.emote-auto { max-width: 100px; max-height: 100px; width: auto; height: auto; }
.click-to-start { position: absolute; z-index: 5; left: 50%; top: 40%; transform: translate(-50%, -50%); }
.video iframe, .video .raw-player { width: 100%; height: 100%; border: 0; display: block; }
.video { position: relative; height: 100%; }
.post-body { white-space: normal; word-break: break-word; }
.media-buttons .level-item { margin-right: 1rem; cursor: pointer; }
.player-box { width: 100%; height: 100%; }
.player-box iframe, .player-box .raw-player, .player-box > div { width: 100%; height: 100%; border: 0; display: block; }
/* The emote picker. */
.emote-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 0.5rem; }
.emote-pick { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 0.4rem; border: 1px solid var(--bulma-border); border-radius: 8px; background: none; cursor: pointer; color: var(--bulma-text); font: inherit; font-size: 0.75em; }
.emote-pick:hover { background: var(--bulma-background); }
.emote-pick img { max-width: 64px; max-height: 48px; object-fit: contain; }
.emote-pick span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Virtual list rows: flow-root keeps each post's margin inside its row, so the row's measured
   height is the space it really takes. */
.vrow { display: flow-root; }
/* Space between posts in virtual lists (each box sits alone in its row, so Bulma's
   "margin on every box but the last" never applies). Inside .vrow, so it's measured. */
.vrow > .box { margin: 5px 0; }
/* The followers / following modal. */
.follow-box { max-height: 60vh; overflow-y: auto; padding: 0 0.75rem 0.75rem; }
.follow-row { padding: 0.5rem; border-radius: 8px; margin: 0 !important; color: var(--bulma-text); }
.follow-row:hover { background: var(--bulma-background); }
.follow-name { font-weight: 700; color: var(--bulma-text-strong); }

/* Hashtags and @mentions in posts. */
.post-body a.hashtag, .post-body a.mention { font-weight: 600; }

/* Trending hashtags. */
.trending { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; }
.trending .tag { text-decoration: none; }

/* A link's preview card. Fixed height (92px + 8px margin = LINK_CARD_PX in posts.js), so the
   virtual list knows a post's height before it renders. */
.link-card { display: flex; height: 92px; margin-top: 8px; overflow: hidden; border: 1px solid var(--bulma-border, #dbdbdb); border-radius: 8px; color: inherit; text-decoration: none; }
.link-card:hover { background: var(--bulma-scheme-main-bis, rgba(127, 127, 127, 0.06)); }
.link-card img { width: 92px; height: 92px; flex: none; object-fit: cover; }
.link-card-text { display: flex; flex-direction: column; justify-content: center; min-width: 0; padding: 0 0.75rem; line-height: 1.3; }
.link-card-text > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-card-text small { opacity: 0.7; }
.link-card-text > span { opacity: 0.8; font-size: 0.875rem; }

/* YouTube search tab (rooms) */
.yt-result { display: flex; align-items: center; gap: 0.6rem; padding: 0.35rem 0.5rem; border-bottom: 1px solid rgba(128, 128, 128, 0.2); }
.yt-thumb { position: relative; flex: none; line-height: 0; }
.yt-thumb img { width: 120px; height: 68px; object-fit: cover; border-radius: 4px; background: rgba(128, 128, 128, 0.2); }
.yt-length { position: absolute; right: 3px; bottom: 3px; padding: 1px 4px; border-radius: 3px; background: rgba(0, 0, 0, 0.8); color: #fff; font-size: 11px; line-height: 1.3; }
.yt-length.is-live { background: #cc0000; }
.yt-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.yt-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.yt-channel { opacity: 0.7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.yt-more { min-height: 2rem; padding: 0.5rem; text-align: center; font-size: 0.85em; }
@media (max-width: 768px) {
  .yt-thumb img { width: 96px; height: 54px; }
}

/* Reposts and quotes */
.reposted-by { display: flex; align-items: center; gap: 0.35rem; font-size: 0.85rem; font-weight: 600; opacity: 0.7; margin: -0.25rem 0 0.5rem 0; }
.reposted-by .material-symbols-outlined { font-size: 1.1rem; }
.reposted-by a { color: inherit; }
.reposted { color: #00ba7c; }
.repost-menu .dropdown-menu { min-width: 10rem; }
.repost-menu .dropdown-item { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; }
.repost-menu .dropdown-item .material-symbols-outlined { font-size: 1.2rem; }
.quote-card { display: block; border: 1px solid var(--bulma-border); border-radius: 12px; padding: 0.6rem 0.8rem; margin-top: 0.6rem; color: inherit; }
a.quote-card:hover { background: var(--bulma-background); }
.quote-card.is-gone { opacity: 0.6; font-style: italic; }
.quote-head { display: flex; align-items: center; gap: 0.4rem; min-width: 0; }
.quote-head img { width: 22px; height: 22px; object-fit: cover; flex-shrink: 0; }
.quote-head strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex-shrink: 1; }
.quote-head small { opacity: 0.7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.quote-body { display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 0.25rem; }
.quote-composer .quote-card { margin-top: 0.75rem; }
.quote-sent { position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%); z-index: 50; padding: 0.75rem 1.5rem; }

/* Post page comments */
.comment-handle { opacity: 0.75; }
.comment-actions { display: flex; gap: 0.75rem; }
/* A mentioned post under its notification */
.box > .quote-card { margin-left: 2rem; }

/* Twitch: started muted, or waiting for a click on the player */
.room-box-upper { position: relative; }
.unmute-button { position: absolute; z-index: 5; left: 1rem; bottom: 3.5rem; }
.unmute-button .material-symbols-outlined { margin-right: 0.35rem; }
.tap-hint { position: absolute; z-index: 5; left: 50%; bottom: 3.5rem; transform: translateX(-50%); pointer-events: none; background: rgba(0, 0, 0, 0.75); color: #fff; padding: 0.4rem 0.9rem; border-radius: 999px; font-weight: 600; white-space: nowrap; }

/* Moderation: support cases */
.support-case-row.is-active { outline: 2px solid var(--bulma-primary); }
.support-msg { padding: 0.6rem 0.8rem; border-radius: 10px; margin-bottom: 0.5rem; background: var(--bulma-background); }
.support-msg.is-staff { border-left: 3px solid var(--bulma-primary); }
.support-body { white-space: pre-wrap; overflow-wrap: anywhere; }

/* FAQ, About, Contact */
.info-page { max-width: 820px; margin: 0 auto; padding: 2rem 1rem 8rem; } /* clear of the fixed footer */
.faq { padding: 0; margin-bottom: 0.75rem !important; }
.faq summary { cursor: pointer; padding: 1rem 1.25rem; font-weight: 700; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: 'expand_more'; font-family: 'Material Symbols Outlined'; font-size: 1.4rem; transition: transform 0.15s; }
.faq[open] summary::after { transform: rotate(180deg); }
.faq > p { padding: 0 1.25rem 1.1rem; }
.about-hero { display: flex; align-items: center; gap: 1.25rem; margin-bottom: 1.5rem; }
.about-hero img { width: 88px; height: 88px; object-fit: contain; flex: none; }
.about-text { font-size: 1.05rem; }
.about-app { height: 100%; }
.about-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: var(--bulma-primary); color: #fff; margin-bottom: 0.75rem; }
.about-simon { cursor: pointer; transition: transform 0.2s; }
.about-simon:hover, .about-simon:focus-visible { transform: rotate(-12deg) scale(1.08); }
.about-hint { font-size: 0.85rem; font-style: italic; color: var(--bulma-text-weak); }

/* The About page's game (about_game.js): a full-screen layer over the page */
.about-game-open, .about-game-open body { overflow: hidden; }
.about-game { position: fixed; inset: 0; z-index: 1000; background: var(--bulma-scheme-main); touch-action: none; user-select: none; cursor: crosshair; }
.about-game canvas { display: block; }
.about-game-hud { position: absolute; top: 14px; left: 16px; right: 64px; display: flex; gap: 1.25rem; align-items: center; font-weight: 700; color: var(--bulma-text-strong); pointer-events: none; }
.about-game-close { position: absolute !important; top: 12px; right: 14px; cursor: pointer; }
.about-game-message { position: absolute; left: 50%; bottom: 72px; transform: translateX(-50%); margin: 0; padding: 0.4rem 1rem; border-radius: 999px; background: rgba(0, 0, 0, 0.7); color: #fff; font-weight: 600; text-align: center; max-width: calc(100% - 32px); pointer-events: none; }

/* Chat filter colours (default filters; rooms can style more .chat-* classes in their CSS) */
.chat-red { color: #e5484d; }
.chat-blue { color: #3e8ef7; }
.chat-yellow { color: #e2b203; }
.chat-purple { color: #a55eea; }
/* Room settings: filters */
.settings-notice { position: sticky; top: 0; z-index: 2; }
.filter-table td { vertical-align: middle; }
.filter-table tr.is-off { opacity: 0.5; }
.filter-order { white-space: nowrap; width: 1%; }
.filter-order .button { padding: 0 0.3rem; height: 1.8em; }
.filter-pattern { font-size: 0.8rem; word-break: break-all; }
.filter-preview { min-height: 2.5rem; padding: 0.5rem 0.75rem; border: 1px solid var(--bulma-border); border-radius: 6px; }
.filter-edit .label { margin-bottom: 0.2rem; }

/* Your own votes: the buttons you pressed stay coloured */
.playbar-icon.voted { color: #32de84 !important; }
.playbar-icon.voted-down { color: #e5484d !important; }
.tooltip.is-wide { white-space: normal; width: 15rem; }

:root { --app-primary: var(--bulma-primary); }

/* The control panels (MCP and ACP, js/mod.js) */
.cp-page { max-width: 1100px; margin: 0 auto; padding-bottom: 4rem; }
.cp-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.cp-head .title .material-symbols-outlined { vertical-align: -4px; }
.cp-tabs a .material-symbols-outlined { font-size: 1.15rem; }
.cp-card { margin-bottom: 1rem !important; }
.cp-avatar { width: 100%; height: 100%; object-fit: cover; }
.cp-avatar-sm { width: 40px; height: 40px; flex: none; }
.cp-quote { white-space: pre-wrap; overflow-wrap: anywhere; padding: 0.6rem 0.9rem; border-left: 3px solid var(--app-primary); background: var(--bulma-background); border-radius: 6px; }
.cp-subhead { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; opacity: 0.65; margin-bottom: 0.35rem; }
.cp-reports { list-style: none; margin: 0; padding: 0; }
.cp-reports li { padding: 0.15rem 0; overflow-wrap: anywhere; }
.cp-row { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1rem; margin-bottom: 0.5rem !important; }
.cp-row-main { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.cp-stats { height: 100%; }
.cp-stat { display: flex; justify-content: space-between; gap: 1rem; padding: 0.3rem 0; border-bottom: 1px solid var(--bulma-border-weak); }
.cp-stat:last-child { border-bottom: none; }
.cp-stat strong { font-variant-numeric: tabular-nums; }
.cp-when { white-space: nowrap; font-size: 0.85rem; }

/* Navbar counts (notifications, unread messages): a small badge over the icon's top-right
   corner, so it takes no room of its own. */
.navbar .navbar-item:has(.nav-badge) {
    position: relative;
}
.navbar .nav-badge {
    position: absolute;
    top: 5px;
    left: calc(0.75rem + 13px);
    margin: 0;
    min-width: 1.1rem;
    height: 1.1rem;
    padding: 0 0.3rem;
    border-radius: 999px;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 1;
    pointer-events: none;
}

/* The playlist's History tab (rooms.html): rows like the YouTube search's. */
.history-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0.5rem 0.5rem 0.25rem; flex-wrap: wrap; }
.history-buttons { flex: none; display: flex; align-items: center; gap: 0.35rem; }
.history-buttons .buttons { margin-bottom: 0; }
.history-buttons .buttons .button { margin-bottom: 0; }
.history-delete { opacity: 0.6; }
.history-delete:hover { opacity: 1; color: var(--bulma-danger); }
.history-nothumb { display: inline-flex; align-items: center; justify-content: center; width: 120px; height: 68px; border-radius: 4px; background: rgba(128, 128, 128, 0.2); }
@media (max-width: 768px) {
    .history-tab .yt-thumb img, .history-nothumb { width: 88px; height: 50px; }
}

/* --- Search ------------------------------------------------------------------------------ */
/* Post cards: the whole card opens the post (posts.js openPost); its links and buttons do their own thing. */
.post-card.is-clickable { cursor: pointer; transition: background-color 0.15s; }
.post-card.is-clickable:hover { background-color: rgba(127, 127, 127, 0.06); }
.post-card .post-time { color: inherit; opacity: 0.75; }
.post-card .post-time:hover { opacity: 1; text-decoration: underline; }
.post-card .media-buttons .level-item { cursor: pointer; border-radius: 999px; padding: 2px 6px; margin-right: 0.6rem; transition: background-color 0.15s, color 0.15s; }
.post-card .media-buttons .level-item:hover { background: rgba(50, 222, 132, 0.12); color: #32de84; }

/* People cards */
.search-person { display: flex; gap: 0.75rem; padding: 0.85rem; margin-bottom: 0.6rem !important; }
.search-person-photo { flex: none; }
.search-person-photo img { width: 52px; height: 52px; object-fit: cover; display: block; }
.search-person-main { flex: 1; min-width: 0; }
.search-person-head { display: flex; align-items: flex-start; gap: 0.4rem; }
.search-person-name { display: flex; flex-direction: column; min-width: 0; color: inherit; line-height: 1.25; margin-right: auto; }
.search-person-name strong, .search-person-name small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-person-name small { opacity: 0.7; }
.search-person-name:hover strong { text-decoration: underline; }
.search-person-head .tag { flex: none; margin-top: 2px; }
.search-person-bio { margin: 0.4rem 0 0; font-size: 0.9rem; white-space: pre-line; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.search-person-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.6rem; }
.room-btn.is-small { height: 32px; padding: 0 0.75rem 0 0.6rem; font-size: 13px; }
.room-btn.is-small .material-symbols-outlined { font-size: 17px; }
.search-icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border: 0; border-radius: 999px; background: transparent; color: inherit; cursor: pointer; opacity: 0.7; }
.search-icon-btn:hover { opacity: 1; background: rgba(127, 127, 127, 0.15); }
.search-person-more .dropdown-item { display: flex; align-items: center; gap: 0.5rem; }

/* --- Site messages (site_messages.rs) -------------------------------------------------------- */
/* In room chat: a green-edged announcement from "Simul", never faded. */
.msg.site-msg {
    margin: 4px 0;
    padding: 6px 10px;
    border-left: 3px solid #32de84;
    border-radius: 6px;
    background: rgba(50, 222, 132, 0.1);
}
.msg.site-msg > span[x-html] { white-space: pre-line; } /* the message's own line breaks */
.site-msg-from { display: inline-flex; align-items: center; gap: 0.2rem; margin-right: 0.35rem; font-weight: 700; color: #32de84; vertical-align: -2px; }
.site-msg-from .material-symbols-outlined { font-size: 17px; }
.site-msg-from:hover { text-decoration: underline; color: #32de84; }

/* ACP */
.site-compose .textarea { margin: 0.4rem 0 0.6rem; }
.site-compose-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 0.75rem; }
.site-compose-foot .checkbox { flex: 1 1 260px; }
.site-compose-foot .help { margin: 0; }
.site-msg-card { padding: 0.9rem 1rem; }
.site-msg-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 0.6rem; font-size: 0.85rem; opacity: 0.85; margin-bottom: 0.4rem; }
.site-msg-body, .changelog-body { white-space: pre-line; overflow-wrap: anywhere; }

/* The Changelogs page: a timeline */
.changelogs-head { margin-bottom: 1.5rem; }
.changelogs-head .title { display: flex; align-items: center; gap: 0.5rem; }
.changelogs-head .material-symbols-outlined { color: #32de84; font-size: 32px; }
.changelog-list { position: relative; padding-left: 1.6rem; }
.changelog-list::before { content: ''; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 2px; border-radius: 2px; background: rgba(50, 222, 132, 0.3); }
.changelog-entry { position: relative; margin-bottom: 1rem; }
.changelog-dot { position: absolute; left: calc(-1.6rem + 1px); top: 1.1rem; width: 12px; height: 12px; border-radius: 50%; background: #32de84; box-shadow: 0 0 0 4px rgba(50, 222, 132, 0.2); }
.changelog-card { margin-bottom: 0 !important; }
.changelog-meta { display: flex; align-items: baseline; gap: 0.6rem; margin-bottom: 0.5rem; }
.changelog-meta time { font-weight: 700; color: #32de84; }
.changelog-delete { margin-left: auto; border: 0; background: transparent; color: inherit; opacity: 0.5; cursor: pointer; border-radius: 999px; padding: 2px 4px; }
.changelog-delete:hover { opacity: 1; color: #f14668; background: rgba(241, 70, 104, 0.12); }
.changelog-delete .material-symbols-outlined { font-size: 19px; }

/* The playlist's Search tab: which source to search (YouTube, Room history, ...). */
.search-sources { display: flex; gap: 0.4rem; padding: 0.5rem 0.5rem 0; flex-wrap: wrap; }
.search-source {
    display: inline-flex; align-items: center; gap: 0.35rem;
    height: 30px; padding: 0 0.8rem 0 0.6rem;
    border: 1px solid rgba(127, 127, 127, 0.3); border-radius: 999px;
    background: transparent; color: inherit; font: inherit; font-size: 13px; font-weight: 600;
    cursor: pointer; transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.search-source .material-symbols-outlined { font-size: 18px; }
.search-source .site-icon { width: 16px; height: 16px; opacity: 1; }
.search-source:hover { border-color: #32de84; color: #32de84; }
.search-source.is-active { background: rgba(50, 222, 132, 0.15); border-color: #32de84; color: #32de84; }
/* Room history results with no picture (TikTok, files): the site's icon on a tile. */
.lib-nothumb { display: flex; align-items: center; justify-content: center; width: 120px; height: 68px; border-radius: 4px; background: rgba(128, 128, 128, 0.15); }
.lib-nothumb .site-icon { width: 28px; height: 28px; opacity: 0.9; }
@media (max-width: 768px) { .lib-nothumb { width: 96px; height: 54px; } }

/* Room settings → Chat modes: each mode on its own card; the ones that are on get a green edge. */
.chat-modes .chat-mode { margin-bottom: 0.9rem; padding: 0.8rem 0.9rem; border: 1px solid rgba(127, 127, 127, 0.25); border-radius: 12px; }
.chat-modes .chat-mode.is-on { border-color: rgba(50, 222, 132, 0.6); background: rgba(50, 222, 132, 0.06); }
.chat-modes .chat-mode-head { display: flex; align-items: center; gap: 0.45rem; margin-bottom: 0.4rem; }
.chat-modes .chat-mode-head .material-symbols-outlined { font-size: 20px; color: #32de84; }
.chat-modes .chat-mode .help { margin-top: 0; margin-bottom: 0.5rem; }
.chat-modes .chat-mode .field { margin-bottom: 0; }
.perm-fixed { font-size: 0.78rem !important; background: rgba(127, 127, 127, 0.15); color: inherit; opacity: 0.85; }
.perm-row .perm-label a { color: inherit; text-decoration: underline; text-decoration-color: rgba(50, 222, 132, 0.5); text-underline-offset: 2px; }
.perm-row .perm-label a:hover { color: #32de84; }
.chat-modes-who { display: flex; align-items: center; gap: 0.35rem; margin: -0.5rem 0 0.9rem; }
.chat-modes-who .material-symbols-outlined { font-size: 16px; opacity: 0.7; }
/* Permission dropdowns line up whatever ranks each one offers. */
.perm-row .select, .perm-row .select select { width: 11.5rem; }
.perm-row .perm-fixed { width: 11.5rem; justify-content: center; }
/* Room settings → Logs: the action column ("ban", "permissions"…). Bulma's default tag is
   near-black text on a light chip, which disappears on the dark theme. Only these tags. */
.theme-dark .tag.log-action { color: #32de84; background: rgba(50, 222, 132, 0.12); }

/* --- The profile header (users page) ------------------------------------------------------- */
/* A .box (the theme's background and shadow), opened up for the banner. */
.box.profile-card { padding: 0; margin-bottom: 1.25rem; border-radius: 18px; overflow: visible; }
.profile-banner {
    height: 120px;
    border-radius: 18px 18px 0 0;
    background:
        radial-gradient(circle at 15% 120%, rgba(50, 222, 132, 0.55), transparent 55%),
        radial-gradient(circle at 85% -20%, rgba(43, 200, 118, 0.35), transparent 50%),
        linear-gradient(120deg, #133524, #0f1f19 55%, #16241e);
}
.theme-light .profile-banner {
    background:
        radial-gradient(circle at 15% 120%, rgba(50, 222, 132, 0.55), transparent 55%),
        radial-gradient(circle at 85% -20%, rgba(43, 200, 118, 0.3), transparent 50%),
        linear-gradient(120deg, #c9f5dc, #e8faf0 55%, #d6f3e3);
}
.profile-body { padding: 0 1.5rem 1.25rem; }
.profile-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-top: -48px; }
.profile-photo {
    flex: none;
    width: 112px; height: 112px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid #fff; /* the card's own colour, so the photo looks cut out of it */
    background: #fff;
    box-shadow: 0 0 0 2px rgba(50, 222, 132, 0.55);
}
.theme-dark .profile-photo { border-color: #14161a; background: #14161a; }
.profile-actions { padding-bottom: 0.4rem; min-width: 0; }
.profile-actions-row { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.45rem; }
.room-btn.is-icon { width: 38px; padding: 0; justify-content: center; }
.room-btn[disabled] { opacity: 0.5; cursor: not-allowed; transform: none; }
.profile-more .dropdown-item { display: flex; align-items: center; gap: 0.5rem; }
.profile-who { margin-top: 0.75rem; }
.profile-name { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem; font-size: 1.6rem; font-weight: 800; line-height: 1.2; }
.profile-role { padding: 0.1rem 0.55rem; border-radius: 999px; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.02em; }
.profile-role.is-admin { background: rgba(50, 222, 132, 0.18); color: #32de84; }
.profile-role.is-mod { background: rgba(62, 142, 208, 0.2); color: #6fb6ef; }
.profile-handle { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem; opacity: 0.7; margin-top: 0.1rem; }
.profile-follows-you { padding: 0.05rem 0.5rem; border-radius: 6px; background: rgba(127, 127, 127, 0.18); font-size: 0.75rem; font-weight: 600; }
.profile-bio { margin-top: 0.8rem; font-size: 1rem; line-height: 1.45; }
.profile-meta { display: flex; flex-wrap: wrap; gap: 0.4rem 1.1rem; margin-top: 0.75rem; font-size: 0.9rem; opacity: 0.75; }
.profile-meta > * { display: inline-flex; align-items: center; gap: 0.3rem; color: inherit; }
.profile-meta a:hover { color: #32de84; opacity: 1; }
.profile-meta .material-symbols-outlined { font-size: 18px; }
.profile-stats { display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; margin-top: 0.85rem; padding-top: 0.85rem; border-top: 1px solid rgba(127, 127, 127, 0.18); font-size: 0.95rem; }
.profile-stats > * { color: inherit; opacity: 0.8; }
.profile-stats strong { color: inherit; font-weight: 800; margin-right: 0.15rem; }
.profile-stats a:hover { color: #32de84; opacity: 1; }
.profile-stats a:hover strong { color: #32de84; }
.profile-blocked { display: flex; align-items: center; gap: 0.35rem; margin-top: 0.75rem; color: #f14668; font-size: 0.9rem; }
@media (max-width: 600px) {
    .profile-banner { height: 90px; }
    .profile-body { padding: 0 1rem 1rem; }
    .profile-top { flex-direction: column; align-items: flex-start; margin-top: -42px; gap: 0.6rem; }
    .profile-photo { width: 88px; height: 88px; border-width: 4px; }
    .profile-actions { padding-bottom: 0; }
    .profile-actions-row { justify-content: flex-start; }
    .profile-name { font-size: 1.35rem; }
    /* One row of buttons: Follow takes the room left over, the rest stay round. */
    .profile-actions { width: 100%; }
    .profile-actions-row { flex-wrap: nowrap; }
    .profile-actions-row > .room-btn { flex: 1 1 auto; min-width: 0; }
    .profile-actions-row > .room-btn.is-icon,
    .profile-actions-row .profile-more .room-btn { flex: 0 0 38px; }
}
@media (max-width: 420px) {
    /* Not room for "Message" as well: just its icon (the title still says what it is). */
    .profile-actions-row > a.room-btn[title="Send a message"] { flex: 0 0 38px; width: 38px; padding: 0; }
    .profile-actions-row > a.room-btn[title="Send a message"] > span { display: none; }
}

/* Chat scrolled up: a small pill at the bottom of the chat back to the newest message, with a count of new ones. */
.chat-jump-wrap { position: sticky; bottom: 0; height: 0; display: flex; justify-content: center; pointer-events: none; z-index: 5; }
.chat-jump {
    position: absolute; bottom: 10px; display: inline-flex; align-items: center; gap: 0.35rem;
    padding: 0.25rem 0.7rem 0.25rem 0.5rem; border: 1px solid rgba(50, 222, 132, 0.25); border-radius: 999px;
    background: rgba(18, 24, 21, 0.78); color: #e8f3ec; font-size: 0.75rem; font-weight: 600; line-height: 1.2;
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
    cursor: pointer; white-space: nowrap; opacity: 0; transform: translateY(6px); pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease, background-color 0.15s ease, border-color 0.15s ease;
}
.chat-jump.is-shown { opacity: 0.85; transform: none; pointer-events: auto; }
.chat-jump.is-shown:hover, .chat-jump.is-shown:focus-visible { opacity: 1; background: rgba(14, 34, 24, 0.92); border-color: rgba(50, 222, 132, 0.6); }
.chat-jump .material-symbols-outlined { font-size: 15px; color: #32de84; }
.chat-jump.has-new.is-shown { opacity: 1; }
.chat-jump-count {
    min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: #32de84; color: #0b1410;
    font-size: 10.5px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center;
}
@media (prefers-reduced-motion: reduce) { .chat-jump { transition: none; } }

/* Tab completion: the names to choose from, above the chat box. */
.chat-input { position: relative; }
.tab-names {
    position: absolute; left: 0.5rem; right: 0.5rem; bottom: calc(100% + 6px); z-index: 6;
    display: flex; flex-wrap: wrap; gap: 0.3rem; max-height: 9rem; overflow-y: auto;
    padding: 0.45rem; border: 1px solid rgba(50, 222, 132, 0.25); border-radius: 10px;
    background: rgba(18, 24, 21, 0.92); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
}
.tab-name {
    border: 0; border-radius: 999px; padding: 0.15rem 0.6rem; cursor: pointer;
    background: rgba(255, 255, 255, 0.08); color: #e8f3ec; font: inherit; font-size: 0.8rem; font-weight: 600;
    display: inline-flex; align-items: center; gap: 0.3rem;
}
.tab-name-emote { height: 20px; width: auto; max-width: 48px; object-fit: contain; }
.tab-name:hover, .tab-name:focus-visible { background: rgba(50, 222, 132, 0.2); color: #32de84; }
.tab-names-more { align-self: center; padding: 0 0.3rem; font-size: 0.75rem; color: rgba(232, 243, 236, 0.6); }

/* Room settings → Emotes: the room's emotes as cards (theme colours, so readable in light and dark). */
.emote-admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 0.5rem; }
.emote-admin {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    min-height: 84px; padding: 0.5rem 0.35rem 0.4rem; border: 1px solid var(--bulma-border); border-radius: 10px;
    background: var(--bulma-scheme-main-bis); color: var(--bulma-text-strong);
}
.emote-admin:hover { border-color: rgba(50, 222, 132, 0.55); }
.emote-admin img { max-width: 64px; max-height: 44px; object-fit: contain; }
.emote-admin-code {
    max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    font-size: 0.75rem; font-weight: 600; color: var(--bulma-text-strong);
}
.emote-admin-remove {
    position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 999px;
    display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
    background: transparent; color: var(--bulma-text-weak); opacity: 0.55;
}
.emote-admin-remove i { font-size: 16px; }
.emote-admin:hover .emote-admin-remove, .emote-admin-remove:focus-visible { opacity: 1; }
.emote-admin-remove:hover { background: rgba(255, 56, 96, 0.15); color: #ff3860; }
.settings-pager { margin-top: 0.75rem; }

/* About: links to the sister apps. */
.about-app h2 a { color: inherit; }
.about-app h2 a:hover { text-decoration: underline; }
.about-visit { display: inline-flex; align-items: center; gap: 0.2rem; margin-top: 0.75rem; font-weight: 700; }
.about-visit .material-symbols-outlined { font-size: 18px; }
