/* RIFT Chat. Colours are each design's own, measured from rendered pages and kept in designs.json.
   The values below serve only the plain MyBB view, which has no design tokens; they equal the light design. */
:root{
 --rift-chat-surface:#c1c8c1;--rift-chat-surface-image:none;--rift-chat-text:#0e0b07;--rift-chat-muted:#617975;--rift-chat-accent:#617975;--rift-chat-line:#73817e6e;
 --rift-chat-action:#88a19d;--rift-chat-action-text:#fff;--rift-chat-input:#88a19d4d;--rift-chat-quote:#dfe1df;--rift-chat-quote-text:#0e0b07;--rift-chat-quote-line:#adadad;
 --rift-chat-summary:#88a19d;--rift-chat-summary-text:#fff;
 --rift-chat-radius:12px;--rift-chat-bubble-size:56px;--rift-chat-gap:24px;--rift-chat-avatar:36px;--rift-chat-layer:10001;
}
.rift-chat-bubble{position:fixed;right:var(--rift-chat-gap);bottom:var(--rift-chat-gap);z-index:var(--rift-chat-layer);display:flex;align-items:center;justify-content:center;width:var(--rift-chat-bubble-size);height:var(--rift-chat-bubble-size);padding:0;border:1px solid var(--rift-chat-line);border-radius:50%;background:var(--rift-chat-action);color:var(--rift-chat-action-text);box-shadow:0 6px 18px #0007;cursor:pointer;transition:filter .15s}
.rift-chat-bubble:hover,.rift-chat-bubble[aria-expanded=true]{filter:brightness(1.12)}
.rift-chat-bubble:focus-visible,.rift-chat-window button:focus-visible,.rift-chat-open:focus-visible{outline:2px solid var(--rift-chat-accent);outline-offset:2px}
.rift-chat-window{position:fixed;z-index:var(--rift-chat-layer);display:flex;flex-direction:column;box-sizing:border-box;overflow:hidden;border:1px solid var(--rift-chat-line);border-radius:var(--rift-chat-radius);background:var(--rift-chat-surface) var(--rift-chat-surface-image) center top;color:var(--rift-chat-text);box-shadow:0 12px 30px #0007;font:13px/1.4 Verdana,sans-serif;text-align:left}
.rift-chat-window[hidden]{display:none}
.rift-chat-window button{font:inherit}
.rift-chat-window[data-minimized="1"]>:not(.rift-chat-header){display:none}
.rift-chat-header{display:flex;flex:none;align-items:center;gap:4px;min-height:42px;padding:3px 6px;border-bottom:1px solid var(--rift-chat-line);background:var(--rift-chat-input);cursor:move;touch-action:none;user-select:none}
.rift-chat-tools{display:flex;flex:none;gap:2px}
.rift-chat-tool{flex:none;width:30px;height:30px;padding:0;border:0;border-radius:6px;background:transparent;color:var(--rift-chat-text);font-size:15px;line-height:1;cursor:pointer}
/* Every chat icon is the forum's Font Awesome (owner 2026-11-13; FA in rift-chat.js). */
:is(.rift-chat-tool,.rift-chat-tab-close,.rift-chat-actions .rift-chat-open,.rift-chat-react,.rift-chat-fa){font-family:FontAwesome;font-weight:900;font-style:normal}
.rift-chat-tool{font-size:13px}
.rift-chat-tab-close{font-size:10px}
.rift-chat-tool[data-off]{opacity:.45}
.rift-chat-tool:hover{background:var(--rift-chat-action);color:var(--rift-chat-action-text)}
/* The glyphs need words: the browser's own title tip comes late and never on touch, so the label shows at once
   under the button, right-aligned so the last button's tip stays inside the window. */
/* The chat's buttons carry their hint in title: the forum's own hint shows it (rift-theme.js, owner 2026-11-09). */
.rift-chat-tabs{display:flex;flex:1 1 auto;min-width:0;gap:3px;overflow-x:auto;scrollbar-width:none}
.rift-chat-tabs::-webkit-scrollbar{display:none}
.rift-chat-tab{display:flex;flex:0 1 auto;align-items:center;min-width:64px;max-width:150px;border-radius:6px;background:transparent;color:var(--rift-chat-text)}
.rift-chat-tab:hover{background:var(--rift-chat-input)}
.rift-chat-tab[data-active]{background:var(--rift-chat-action);color:var(--rift-chat-action-text)}
.rift-chat-tab-name{flex:1 1 auto;min-width:0;padding:6px 2px 6px 8px;overflow:hidden;border:0;background:transparent;color:inherit;font-size:11px;text-overflow:ellipsis;white-space:nowrap;cursor:pointer}
.rift-chat-tab-close{flex:none;width:20px;padding:0;border:0;background:transparent;color:inherit;cursor:pointer}
.rift-chat-menu,.rift-chat-adder{flex:none;max-height:45%;padding:6px;overflow:auto;border-bottom:1px solid var(--rift-chat-line)}
.rift-chat-menu[hidden],.rift-chat-adder[hidden]{display:none}
/* The + panel's finds are menu items; its search field shares the messenger search look (below). */
.rift-chat-adder .rift-chat-menu-item small{opacity:.75}
.rift-chat-menu-row{display:flex;align-items:center;gap:2px}
.rift-chat-menu-row>.rift-chat-menu-item{flex:1 1 auto;min-width:0}
/* The composer's send button is a paper plane (Font Awesome solid, fonts.css), in the design's accent, without a pill. */
.rift-chat-send.rift-chat-send-plane{padding:4px 8px;background:transparent;color:var(--rift-chat-accent);font:900 20px/1 FontAwesome}
.rift-chat-send.rift-chat-send-plane:disabled{opacity:.4}
/* A setting is a menu item with a checkbox; its hint sits under it like a find's note. */
.rift-chat-setting input{margin:0 6px 0 0;vertical-align:middle}
.rift-chat-setting small{display:block;margin-top:2px;opacity:.75}
/* A chat topic's own page (spec 3.1): the two switches above the posts, the plate for new posts, the compact view. */
.rift-chat-live-bar{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:16px;margin:6px 0;font-size:11px}
.rift-chat-live-bar input{margin:0 4px 0 0;vertical-align:middle}
.rift-chat-live-fresh{position:fixed;bottom:var(--rift-chat-gap);left:50%;transform:translateX(-50%);margin:0;z-index:var(--rift-chat-layer)}
.rift-chat-live-fresh[hidden]{display:none}
.rift-chat-live-next{display:block;margin:8px 0;text-align:center}
.rift-messenger.rift-chat-topic{display:flex}
/* A found message, and the message it opens on, marked for a moment. */
.rift-chat-found>span{display:block;margin-top:2px;font-size:11px;opacity:.85}
.rift-chat-message[data-found]{box-shadow:inset 3px 0 0 var(--rift-chat-accent);background:var(--rift-chat-quote)}
.rift-chat-storage{padding:0 10px 6px;font-size:11px}
.rift-chat-storage .rift-chat-menu-head{margin:6px 0 2px}
.rift-chat-storage p{margin:2px 0 4px}
.rift-chat-storage ul{margin:0;padding-left:16px;opacity:.75}
/* Section names in the window's menu: conversations, then topics; set like the feed's day line. */
.rift-chat-menu-head{margin:6px 10px 2px;color:var(--rift-chat-muted);font-size:10px;text-transform:uppercase;letter-spacing:.5px}
.rift-chat-menu-item{display:block;width:100%;padding:8px 10px;border:0;border-radius:6px;background:transparent;color:var(--rift-chat-text);text-align:left;cursor:pointer}
.rift-chat-menu-item:hover,.rift-chat-menu-item[aria-current]{background:var(--rift-chat-action);color:var(--rift-chat-action-text)}
.rift-chat-content{display:flex;flex:1 1 auto;min-height:0;flex-direction:column}
.rift-chat-feed{flex:1 1 auto;min-height:0;padding:8px 10px;overflow-y:auto;overflow-wrap:anywhere;overscroll-behavior:contain}
/* The feed shows the page's own background, as «Сообщения» does, so the bubbles stand out (owner 2026-11-13). rift-chat.js
   copies the design's body background into these properties; with the body's fixed attachment it is the very same picture. */
.rift-chat-feed{background-color:var(--rift-chat-page-color,transparent);background-image:var(--rift-chat-page-image,none);background-size:var(--rift-chat-page-size,auto);background-position:var(--rift-chat-page-position,0 0);background-repeat:var(--rift-chat-page-repeat,repeat);background-attachment:var(--rift-chat-page-attachment,scroll)}
/* On a computer the floating window is frosted glass instead (owner 2026-11-13): its feed shows whatever is behind the
   window, blurred and tinted with the design's action colour, so the surface bubbles stand out over light and dark pages
   alike; the frame (header, panels, field) keeps the solid surface. On a phone the window covers the page and the blurred
   page was a mess (owner 2026-11-13): the feed keeps the page background above, darker than the bubbles in every phone
   design (background.jpg, Sylvania's brown). */
@media (min-width:769px){
.rift-chat-window{background:color-mix(in srgb,var(--rift-chat-action) 25%,transparent);-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px)}
.rift-chat-window .rift-chat-feed{background:none}
}
.rift-chat-window .rift-chat-feed .rift-chat-body{box-shadow:0 1px 2px rgba(0,0,0,.18)}
.rift-chat-window>:is(.rift-chat-menu,.rift-chat-adder,.rift-chat-composer){background:var(--rift-chat-surface) var(--rift-chat-surface-image) center top}
.rift-chat-window>.rift-chat-header{background:linear-gradient(var(--rift-chat-input),var(--rift-chat-input)),var(--rift-chat-surface) var(--rift-chat-surface-image) center top}
.rift-chat-status,.rift-chat-empty{padding:12px;color:var(--rift-chat-muted);font-size:11px;text-align:center}
.rift-chat-day{margin:10px 0 6px;color:var(--rift-chat-muted);font-size:10px;text-align:center;text-transform:uppercase;letter-spacing:.5px}
.rift-chat-message{position:relative;display:grid;grid-template-columns:var(--rift-chat-avatar) minmax(0,1fr);gap:8px;margin-top:10px;padding:2px;border-radius:6px}
.rift-chat-body{position:relative;min-width:0}
.rift-chat-message[data-grouped]{margin-top:0}
.rift-chat-message:hover{background:var(--rift-chat-input)}
.rift-chat-message[data-pending]{opacity:.7}
.rift-chat-avatar{position:relative;align-self:end;width:var(--rift-chat-avatar)}
/* The avatar stands at the foot of the last message of a run, as in Telegram: one the next message continues keeps its place empty. */
.rift-chat-message:has(+ .rift-chat-message[data-grouped]) .rift-chat-avatar{visibility:hidden}
/* The bubble's foot: reactions on the left, the notes and the time in the right corner. */
.rift-chat-foot{display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px;margin-top:2px}
.rift-chat-stamp{display:flex;align-items:baseline;gap:6px;margin-left:auto;white-space:nowrap}
.rift-chat-avatar[data-letter]{height:var(--rift-chat-avatar);border-radius:50%;background:var(--rift-chat-action);color:var(--rift-chat-action-text);font-weight:bold;line-height:var(--rift-chat-avatar);text-align:center}
.rift-chat-avatar img{position:absolute;inset:0;display:block;width:var(--rift-chat-avatar);height:var(--rift-chat-avatar);border-radius:50%;object-fit:cover}
.rift-chat-head{display:flex;flex-wrap:wrap;align-items:baseline;gap:6px}
:is(.rift-chat-window,.rift-messenger) .rift-chat-feed .rift-chat-author,:is(.rift-chat-window,.rift-messenger) .rift-chat-feed .rift-chat-author a{font-weight:bold;font-size:12px;color:var(--rift-chat-accent);text-decoration:none}
.rift-chat-time,.rift-chat-note{color:var(--rift-chat-muted);font-size:10px}
/* .post_body stays for the theme's BBCode; four classes outweigh its post padding and line height. */
:is(.rift-chat-window,.rift-messenger) .rift-chat-feed .rift-chat-text.post_body{width:auto;min-height:0;margin:0;padding:0;border:0;background:transparent;color:var(--rift-chat-text);line-height:1.45;text-align:left}
:is(.rift-chat-window,.rift-messenger) .rift-chat-feed .rift-chat-text.post_body[hidden]{display:none}
:is(.rift-chat-window,.rift-messenger) .rift-chat-feed .rift-chat-text a{color:var(--rift-chat-accent)}
.rift-chat-text img{max-width:100%;height:auto}
:is(.rift-chat-window,.rift-messenger) .rift-chat-feed .rift-chat-text.post_body blockquote.mycode_quote,:is(.rift-chat-window,.rift-messenger) .rift-chat-feed .rift-chat-text.post_body details.rift-spoiler{box-sizing:border-box;width:auto;max-width:100%;margin:4px 0;padding:5px 8px;border:1px solid var(--rift-chat-quote-line);border-radius:6px;background:var(--rift-chat-quote);color:var(--rift-chat-quote-text);font-size:12px}
:is(.rift-chat-window,.rift-messenger) .rift-chat-feed .rift-chat-text.post_body blockquote.mycode_quote cite{display:block;margin:0 0 2px;color:inherit;font-size:10px;opacity:.75}
:is(.rift-chat-window,.rift-messenger) .rift-chat-feed .rift-chat-text.post_body details.rift-spoiler>summary{margin:0;padding:5px 25px 6px 28px;border-radius:100px;background:var(--rift-chat-summary);color:var(--rift-chat-summary-text);font-size:11px;cursor:pointer}
.rift-chat-link{padding:0;border:0;background:transparent;color:var(--rift-chat-accent);font-size:11px;text-decoration:underline;cursor:pointer}
/* The message's buttons: a row on the bubble's upper edge, as in Telegram and Discord, shown while the message is pointed
   at or holds the focus (owner 2026-11-09). Without hover (touch) they are a row at the bubble's foot. */
.rift-chat-actions{position:absolute;top:-11px;right:8px;z-index:2;display:flex;align-items:center;gap:8px;padding:1px 7px;border:1px solid var(--rift-chat-line);border-radius:10px;background:var(--rift-chat-surface);box-shadow:0 1px 4px rgba(0,0,0,.2);opacity:0;pointer-events:none}
.rift-chat-message:is(:hover,:focus-within) :is(.rift-chat-actions,.rift-chat-react){opacity:1;pointer-events:auto}
/* The reactions button outside the bubble's lower right corner, as in Telegram; the window, whose messages run its whole
   width, keeps a 28px lane for it, the messages page keeps the bubble 28px narrower than the feed. */
:is(.rift-chat-window,.rift-messenger) .rift-chat-feed .rift-chat-open.rift-chat-react{position:absolute;left:calc(100% + 4px);bottom:0;display:grid;place-items:center;width:22px;height:22px;border:1px solid var(--rift-chat-line);border-radius:50%;background:var(--rift-chat-surface);box-shadow:0 1px 4px rgba(0,0,0,.2);font-size:13px;line-height:1}
.rift-chat-react{opacity:0;pointer-events:none}
.rift-chat-window .rift-chat-message{padding-right:28px}
:is(.rift-chat-window,.rift-messenger) .rift-chat-feed .rift-chat-open{padding:0;border:0;background:transparent;color:var(--rift-chat-muted);font-size:12px;line-height:1.3;text-decoration:none;cursor:pointer}
/* A message's heart in a chat: no big heart under every message, but a small plate as Telegram's reactions — the heart
   with its count, the reactions beside it — and none while nobody rated; the bar's ♡ opens the reactions. The prefix
   outweighs the forum heart of parity.css (the designs' button rules leave the chat out). */
body[data-rift-view] :is(.rift-chat-window,.rift-messenger) .rift-chat-body .rift-heart-rating{flex-direction:row;flex-wrap:wrap;justify-content:flex-start;align-self:auto;justify-self:auto;gap:4px;margin:0;padding:0;z-index:auto}
body[data-rift-view] :is(.rift-chat-window,.rift-messenger) .rift-chat-body .rift-heart-rating:has(.rift-rating-toggle.is-empty){display:none}
body[data-rift-view] :is(.rift-chat-window,.rift-messenger) .rift-chat-body .rift-heart-rating .rift-rating-toggle{display:inline-flex;align-items:center;gap:3px;width:auto;height:auto;padding:0 7px;border:1px solid var(--rift-chat-quote-line);border-radius:10px;background:var(--rift-chat-quote);color:var(--rift-chat-quote-text)}
body[data-rift-view] :is(.rift-chat-window,.rift-messenger) .rift-chat-body .rift-heart-rating .rift-rating-toggle.is-rated{border-color:var(--rift-chat-accent)}
body[data-rift-view] :is(.rift-chat-window,.rift-messenger) .rift-chat-body .rift-rating-toggle>span{width:auto;height:auto;background:none;clip-path:none;color:#c49393;font:13px/18px sans-serif}
body[data-rift-view] :is(.rift-chat-window,.rift-messenger) .rift-chat-body .rift-rating-toggle>span::after{content:none}
body[data-rift-view] :is(.rift-chat-window,.rift-messenger) .rift-chat-body .rift-rating-toggle>b{margin:0;font:700 11px/18px Verdana,sans-serif;color:inherit}
body[data-rift-view] :is(.rift-chat-window,.rift-messenger) .rift-chat-body .rift-reaction-pills{flex-direction:row;gap:4px}
body[data-rift-view] :is(.rift-chat-window,.rift-messenger) .rift-chat-body .rift-reaction-pill{gap:3px;padding:0 6px;font:13px/18px sans-serif}
body[data-rift-view] :is(.rift-chat-window,.rift-messenger) .rift-chat-body .rift-reaction-pill b{font:700 10px/18px Verdana,sans-serif}
/* Who rated, in a chat: a short list of lines (small round avatar, name, mark) opening from the plate's left edge
   instead of the topic's cards; the topic keeps its own (owner 2026-11-09). */
body[data-rift-view] :is(.rift-chat-window,.rift-messenger) .rift-chat-body .rift-voters{left:0;right:auto;bottom:calc(100% + 4px);width:max-content;min-width:140px;max-width:240px;padding:6px 8px}
body[data-rift-view] :is(.rift-chat-window,.rift-messenger) .rift-chat-body .rift-voters ul{flex-direction:column;flex-wrap:nowrap;gap:4px;max-height:180px;margin:6px 0 0}
body[data-rift-view] :is(.rift-chat-window,.rift-messenger) .rift-chat-body .rift-voters li{width:auto;text-align:left}
body[data-rift-view] :is(.rift-chat-window,.rift-messenger) .rift-chat-body .rift-voters li a{flex-direction:row;align-items:center;gap:6px;overflow-wrap:normal;font:11px Verdana,sans-serif}
body[data-rift-view] :is(.rift-chat-window,.rift-messenger) .rift-chat-body :is(.rift-voters img,.rift-voter-placeholder){flex:none;width:20px;height:20px;border-radius:50%}
body[data-rift-view] :is(.rift-chat-window,.rift-messenger) .rift-chat-body .rift-voter-placeholder{font-size:12px}
.rift-chat-message{cursor:pointer}
.rift-chat-message[data-replying]{background:var(--rift-chat-input);box-shadow:inset 2px 0 var(--rift-chat-accent)}
.rift-chat-reply{display:flex;align-items:center;gap:6px;margin-bottom:6px;padding:4px 6px;border-left:2px solid var(--rift-chat-accent);border-radius:0 6px 6px 0;background:var(--rift-chat-input);color:var(--rift-chat-text);font-size:11px}
.rift-chat-reply[hidden]{display:none}
.rift-chat-reply-body{flex:1 1 auto;min-width:0}
.rift-chat-reply-body strong,.rift-chat-reply-body span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rift-chat-composer{flex:none;margin:0;padding:6px 8px 8px;border-top:1px solid var(--rift-chat-line)}
.rift-chat-actor{margin-bottom:4px;color:var(--rift-chat-muted);font-size:10px}
:is(.rift-chat-window,.rift-messenger) .rift-chat-composer textarea.rift-chat-input{display:block;box-sizing:border-box;width:100%;padding:7px 9px;border:1px solid var(--rift-chat-line);border-radius:7px;background:var(--rift-chat-input);color:var(--rift-chat-text);font:13px/1.4 Verdana,sans-serif;resize:none}
:is(.rift-chat-window,.rift-messenger) .rift-chat-composer textarea.rift-chat-input:disabled{color:var(--rift-chat-muted);cursor:not-allowed}
:is(.rift-chat-window,.rift-messenger) .rift-chat-composer textarea.rift-chat-input::placeholder{color:var(--rift-chat-muted);opacity:1}
.rift-chat-grip{position:absolute;right:0;bottom:0;width:16px;height:16px;cursor:nwse-resize;touch-action:none;background:linear-gradient(135deg,transparent 60%,var(--rift-chat-muted) 60%,var(--rift-chat-muted) 68%,transparent 68%,transparent 78%,var(--rift-chat-muted) 78%,var(--rift-chat-muted) 86%,transparent 86%)}
.rift-chat-bubble[data-unread]::after{content:attr(data-count);position:absolute;top:-4px;right:-4px;min-width:18px;height:18px;padding:0 5px;box-sizing:border-box;border-radius:9px;background:rgb(180,50,50);color:#fff;font:bold 10px/18px Verdana,sans-serif;text-align:center}
.rift-chat-count{flex:none;min-width:16px;height:16px;margin:0 2px;padding:0 4px;box-sizing:border-box;border-radius:8px;background:rgb(180,50,50);color:#fff;font:bold 9px/16px Verdana,sans-serif;text-align:center}
/* New messages in one's chat topic that are not addressed to the reader: a dot without a number (owner 2026-11-13). */
.rift-chat-bubble[data-unread][data-count=""]::after{top:0;right:0;min-width:12px;height:12px;padding:0;border-radius:50%}
.rift-chat-count:empty{min-width:8px;width:8px;height:8px;padding:0;border-radius:50%;align-self:center}
.rift-chat-compose-row{display:flex;align-items:flex-end;gap:6px}
:is(.rift-chat-window,.rift-messenger) .rift-chat-compose-row textarea.rift-chat-input{flex:1 1 auto;min-width:0}
.rift-chat-send{flex:none;padding:7px 12px;border:0;border-radius:7px;background:var(--rift-chat-action);color:var(--rift-chat-action-text);font:bold 11px/1.4 Verdana,sans-serif;cursor:pointer}
.rift-chat-send:disabled{opacity:.5;cursor:not-allowed}
.rift-chat-error{margin-top:4px;color:var(--rift-chat-accent);font-size:11px;font-weight:bold}
.rift-chat-error[hidden]{display:none}
.rift-chat-fresh{align-self:center;margin:-34px auto 6px;padding:4px 12px;border:0;border-radius:100px;background:var(--rift-chat-action);color:var(--rift-chat-action-text);font-size:11px;cursor:pointer;position:relative;z-index:1;box-shadow:0 2px 8px #0005}
.rift-chat-edit{margin-top:4px}
.rift-chat-edit-bar{display:flex;align-items:center;gap:8px;margin-top:4px}
:is(.rift-chat-window,.rift-messenger) .rift-chat-edit textarea.rift-chat-input{display:block;box-sizing:border-box;width:100%;padding:6px 8px;border:1px solid var(--rift-chat-line);border-radius:7px;background:var(--rift-chat-input);color:var(--rift-chat-text);font:13px/1.4 Verdana,sans-serif;resize:vertical}
.rift-chat-admin{border-top:1px solid var(--rift-chat-line)}
/* The messenger page: the same feed and field in a two-column layout. */
.rift-messenger{display:flex;flex-direction:column;box-sizing:border-box;height:min(760px,calc(100vh - 72px));min-height:460px;margin:12px 0;scroll-margin-top:56px;overflow:hidden;border:1px solid var(--rift-chat-line);border-radius:var(--rift-chat-radius);background:var(--rift-chat-surface) var(--rift-chat-surface-image) center top;color:var(--rift-chat-text);font:13px/1.4 Verdana,sans-serif;text-align:left}
.rift-messenger button{font:inherit}
.rift-messenger button:focus-visible,.rift-messenger a:focus-visible,.rift-messenger-search:focus-visible{outline:2px solid var(--rift-chat-accent);outline-offset:2px}
.rift-messenger-bar{display:flex;flex:none;flex-wrap:wrap;gap:6px;padding:8px 10px;border-bottom:1px solid var(--rift-chat-line);background:var(--rift-chat-input)}
.rift-messenger-action{padding:6px 14px;border:0;border-radius:100px;background:var(--rift-chat-action);color:var(--rift-chat-action-text);font-size:11px;cursor:pointer}
.rift-messenger-action:disabled{opacity:.6;cursor:not-allowed}
.rift-messenger-body{display:grid;flex:1 1 auto;min-height:0;grid-template-columns:minmax(220px,300px) minmax(0,1fr)}
.rift-messenger-side{display:flex;min-height:0;flex-direction:column;border-right:1px solid var(--rift-chat-line)}
:is(.rift-chat-window,.rift-messenger) :is(.rift-messenger-search,.rift-chat-adder-input){flex:none;box-sizing:border-box;width:auto;margin:8px;padding:6px 10px;border:1px solid var(--rift-chat-line);border-radius:7px;background:var(--rift-chat-input);color:var(--rift-chat-text)}
:is(.rift-chat-window,.rift-messenger) .rift-chat-adder-input{display:block;width:100%;margin:0 0 4px;font:13px Verdana,sans-serif}
/* New conversation: the picked players as chips, then the group name and the button. */
.rift-messenger-starter{margin:0 8px;border:1px solid var(--rift-chat-line);border-radius:7px}
.rift-messenger-starter>.rift-chat-send{margin-top:4px}
.rift-messenger-chosen{display:flex;flex-wrap:wrap;gap:4px;margin:4px 0}
.rift-messenger-chip{display:inline-flex;align-items:center;gap:2px;padding:2px 4px 2px 8px;border-radius:12px;background:var(--rift-chat-action);color:var(--rift-chat-action-text);font-size:11px}
.rift-chat-menu-item:disabled{opacity:.55;cursor:default}
/* The line a reply answers (a conversation's reply, a chat topic's forum quote), and the plate of a message deleted for everyone. */
.rift-chat-quoted{display:block;width:100%;margin:2px 0 4px;padding:3px 8px;overflow:hidden;border:0;border-left:3px solid var(--rift-chat-quote-line);border-radius:4px;background:var(--rift-chat-quote);color:var(--rift-chat-quote-text);font-size:11px;text-align:left;text-overflow:ellipsis;white-space:nowrap;cursor:pointer}
.rift-chat-gone{opacity:.7}
.rift-chat-adder-input:focus-visible{outline:2px solid var(--rift-chat-accent);outline-offset:2px}
.rift-messenger-list{flex:1 1 auto;min-height:0;padding:0 6px 6px;overflow-y:auto}
.rift-messenger-item{display:flex;align-items:center;gap:8px;width:100%;padding:7px;border:0;border-radius:8px;background:transparent;color:var(--rift-chat-text);text-align:left;cursor:pointer}
.rift-messenger-item:hover{background:var(--rift-chat-input)}
.rift-messenger-item[aria-current]{background:var(--rift-chat-action);color:var(--rift-chat-action-text)}
.rift-messenger-item .rift-chat-avatar{flex:none;display:block}
/* A chat in the list, as in Telegram (owner 2026-11-13): the name with its kind and the time on one line, the newest
   message and the count on the next; one's own topic shows its × on hover. */
.rift-messenger-row{position:relative;display:flex;align-items:center}
.rift-messenger-row>.rift-messenger-item{flex:1 1 auto;min-width:0}
.rift-messenger-drop{position:absolute;top:2px;right:2px;width:22px;height:22px;font-size:10px;opacity:0}
.rift-messenger-row:is(:hover,:focus-within)>.rift-messenger-drop{opacity:1}
.rift-messenger-item-text{display:flex;flex:1 1 auto;min-width:0;flex-direction:column;gap:2px}
:is(.rift-messenger-item-head,.rift-messenger-item-foot){display:flex;align-items:center;gap:6px;min-width:0}
:is(.rift-messenger-item-name,.rift-messenger-item-note){flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rift-messenger-item-note{font-size:10px;opacity:.75}
.rift-messenger-item-time{flex:none;font-size:10px;opacity:.75}
.rift-messenger-item-name .rift-chat-fa{font-size:.85em;opacity:.7}
/* «Новая беседа»: Telegram's round pencil, kept in the list's lower right corner while the list scrolls. */
.rift-messenger-list{display:flex;flex-direction:column}
:is(.rift-chat-window,.rift-messenger) .rift-chat-new{position:sticky;bottom:10px;order:1;flex:none;align-self:flex-end;width:48px;height:48px;margin:auto 4px 0 0;padding:0;border:0;border-radius:50%;background:var(--rift-chat-action);color:var(--rift-chat-action-text);box-shadow:0 2px 8px rgba(0,0,0,.3);font:900 18px/48px FontAwesome;text-align:center;cursor:pointer;transition:filter .15s}
.rift-chat-new:hover{filter:brightness(1.12)}
/* The window's ☰ panel takes the whole window under the header while it is open; the filters wrap, all in sight. */
.rift-chat-window[data-list]>:is(.rift-chat-content,.rift-chat-composer){display:none}
.rift-chat-window>.rift-chat-list-panel:not([hidden]){display:flex;flex:1 1 auto;min-height:0;max-height:none;flex-direction:column;padding:0;border-bottom:0}
.rift-chat-list-panel .rift-messenger-search{margin:8px 8px 6px}
.rift-chat-list-actions{flex:none;padding:4px 6px 6px;border-top:1px solid var(--rift-chat-line)}
.rift-chat-list-actions:empty{display:none}
.rift-messenger-main{display:flex;min-width:0;min-height:0;flex-direction:column}
.rift-messenger-head{display:flex;flex:none;align-items:center;gap:6px;min-height:42px;padding:3px 10px;border-bottom:1px solid var(--rift-chat-line)}
.rift-messenger-title{flex:1 1 auto;min-width:0;overflow:hidden;font-weight:bold;text-overflow:ellipsis;white-space:nowrap}
.rift-messenger-head a.rift-chat-tool{display:block;line-height:30px;text-align:center;text-decoration:none}
.rift-messenger-head a.rift-chat-tool[hidden]{display:none}
.rift-messenger-head [data-phone]{display:none}
/* The messenger page (owner 2026-11-08, «как в Telegram»): no panel under it, the forum's own background shows
   through the feed; the surface stays on the controls (chat list, the conversation's head, the field) and on the
   messages themselves as bubbles. A topic's compact view keeps the surface on its frame, and its feed shows the same
   background with the same bubbles; the floating window is frosted glass (owner 2026-11-13). */
/* Designs paint #container with body[data-rift-view].<design> #container (dark.css: 1,3,1); the page's own attributes
   outweigh them without a copy per design or !important. */
html body[data-rift-view][data-rift-design][data-rift-page="rift_messenger.php"] :is(#container,#content),body[data-rift-page="rift_messenger.php"] .rift-messenger{background:transparent}
body[data-rift-page="rift_messenger.php"] .rift-messenger{border:0;border-radius:0}
body[data-rift-page="rift_messenger.php"] .rift-messenger-bar{padding:0 0 8px;border:0;background:transparent}
body[data-rift-page="rift_messenger.php"] .rift-messenger-body{gap:8px}
body[data-rift-page="rift_messenger.php"] .rift-messenger-main{gap:8px}
body[data-rift-page="rift_messenger.php"] :is(.rift-messenger-side,.rift-messenger-head,.rift-messenger .rift-chat-composer,.rift-messenger-drawer){border:0;border-radius:var(--rift-chat-radius);background:var(--rift-chat-surface) var(--rift-chat-surface-image) center top}
:is(.rift-chat-window,.rift-messenger) .rift-chat-feed .rift-chat-body{justify-self:start;box-sizing:border-box;max-width:calc(100% - 28px);padding:6px 10px;border-radius:var(--rift-chat-radius);background:var(--rift-chat-surface)}
/* One's own messages on the right with the avatar on their right, the others' on the left, as in Telegram (owner
   2026-11-09). The name stays: a player may write as one of several characters. */
body[data-rift-page="rift_messenger.php"] .rift-messenger .rift-chat-message[data-own="1"]{grid-template-columns:minmax(0,1fr) var(--rift-chat-avatar)}
body[data-rift-page="rift_messenger.php"] .rift-messenger .rift-chat-message[data-own="1"] .rift-chat-avatar{grid-area:1/2}
body[data-rift-page="rift_messenger.php"] .rift-messenger .rift-chat-message[data-own="1"] .rift-chat-body{grid-area:1/1;justify-self:end}
:is(.rift-chat-window,.rift-messenger) .rift-chat-feed :is(.rift-chat-day,.rift-chat-notice,.rift-chat-status){width:fit-content;margin-inline:auto;padding:2px 10px;border-radius:100px;background:var(--rift-chat-surface)}
/* Without the panel the page's own text would hang over the forum background: the breadcrumbs and the footer's
   «Дополнительно» go (owner), and so does the space before the footer art; the greeting gets the bubbles' surface. */
body[data-rift-page="rift_messenger.php"] #container .navigation{display:none}
html body[data-rift-view][data-rift-design][data-rift-page="rift_messenger.php"] #container{margin-bottom:0}
html body[data-rift-view][data-rift-design][data-rift-page="rift_messenger.php"] #content{padding-bottom:0}
html body[data-rift-view][data-rift-design][data-rift-page="rift_messenger.php"] #footer .rift-footer-art{margin-top:0}
/* The header's lower corners and the footer's upper ones get the footer's own 5px (parity.css #footer, owner). Both
   panels are painted inside their pictures at desktop size (base.css, parity.css): hero.png's panel spans x 162..1197
   of the 1217x605 hero and ends at its bottom; footer.png's starts 12px down the 1035px-wide art. Only those corners
   are cut, so the tree beside the header and the stars over the footer stay. */
@media(min-width:761px){
body[data-rift-view=rift][data-rift-page="rift_messenger.php"] .rift-hero{clip-path:path('M0 0H1217V600H1197A5 5 0 0 1 1192 605H167A5 5 0 0 1 162 600H0Z')}
body[data-rift-view=rift][data-rift-page="rift_messenger.php"] #footer .rift-footer-art{clip-path:path('M0 0H1035V12H1030A5 5 0 0 1 1035 17V140H0V17A5 5 0 0 1 5 12H0Z')}
}
body[data-rift-page="rift_messenger.php"] #container .welcome{padding:2px 10px;border-radius:var(--rift-chat-radius);background:var(--rift-chat-surface)}
/* Stage 3 part 2. Folder views are the bar's pills, outlined until chosen; a count sits inside the pill. */
.rift-messenger-folders{display:flex;flex:none;flex-wrap:wrap;gap:4px;padding:0 8px 6px}
.rift-messenger-folders[hidden]{display:none}
.rift-messenger-folders .rift-messenger-action{flex:none;padding:4px 10px;border:1px solid transparent;white-space:nowrap}
.rift-messenger-folders .rift-messenger-action[aria-pressed=false]{border-color:var(--rift-chat-line);background:transparent;color:var(--rift-chat-text)}
:is(.rift-messenger-action,.rift-main-nav a) .rift-chat-count{display:inline-block;margin:0 0 0 4px;vertical-align:1px}
.rift-main-nav .rift-chat-count[hidden]{display:none}
/* Folder names, a group's title and its members: a field or a name with its tools on one line. */
.rift-chat-menu-row>.rift-chat-adder-input{flex:1 1 auto;min-width:0;margin:0 0 4px}
.rift-chat-menu-row>.rift-chat-send{margin:0 0 4px}
a.rift-chat-menu-item{box-sizing:border-box;text-decoration:none}
a.rift-chat-menu-item small{opacity:.75}
.rift-messenger-drawer>.rift-chat-link{margin-top:6px}
/* Reports (administrators): the reported message stands out among its context, as a message being answered does. */
.rift-report-about{margin:8px 0;padding:6px 8px;border:1px solid var(--rift-chat-line);border-radius:6px}
.rift-report-row{margin:6px 0;padding:4px 6px;border-radius:6px}
.rift-report-row[data-target]{background:var(--rift-chat-input);box-shadow:inset 2px 0 var(--rift-chat-accent)}
.rift-report-versions{margin:4px 0 8px 12px;font-size:11px}
.rift-report-versions>summary{color:var(--rift-chat-accent);cursor:pointer}
/* A line from the conversation itself: joined, left, removed, renamed. */
.rift-chat-notice{margin:8px 0;color:var(--rift-chat-muted);font-size:11px;text-align:center}
@media (hover:none){.rift-chat-actions{position:static;justify-content:flex-end;margin-top:3px;padding:0;border:0;background:none;box-shadow:none;opacity:1;pointer-events:auto}.rift-chat-react{opacity:1;pointer-events:auto}}
@media (max-width:768px){
 /* The mobile designs' own bars reach 2147483620 (mobile.css); a full-screen chat covers them. */
 :root{--rift-chat-layer:2147483630}
 .rift-chat-bubble{right:16px;bottom:16px}
 html[data-rift-chat-open] .rift-chat-bubble{display:none}
 .rift-chat-window{inset:0;width:auto;height:auto;border:0;border-radius:0}
 .rift-chat-header{cursor:default;touch-action:auto}
 .rift-chat-tool{width:38px;height:38px}
 .rift-chat-tool[data-desktop],.rift-chat-grip{display:none}
 .rift-messenger{height:auto;min-height:60vh;margin:8px 0}
 .rift-messenger-body{display:block}
 .rift-messenger-side{border-right:0}
 .rift-messenger[data-view=list] .rift-messenger-main{display:none}
 .rift-messenger[data-view=chat]{position:fixed;inset:0;z-index:var(--rift-chat-layer);height:auto;margin:0;border:0;border-radius:0}
 /* An open conversation covers the page on a phone with its own surface; the feed keeps the page background and the bubbles. */
 body[data-rift-page="rift_messenger.php"] .rift-messenger[data-view=chat]{gap:0;background:var(--rift-chat-surface) var(--rift-chat-surface-image) center top}
 body[data-rift-page="rift_messenger.php"] .rift-messenger[data-view=chat] :is(.rift-messenger-main,.rift-messenger-body){gap:0}
 body[data-rift-page="rift_messenger.php"] .rift-messenger[data-view=chat] :is(.rift-messenger-head,.rift-chat-composer){border-radius:0;background:transparent}
 .rift-messenger[data-view=chat] .rift-messenger-bar,.rift-messenger[data-view=chat] .rift-messenger-side{display:none}
 .rift-messenger[data-view=chat] .rift-messenger-body,.rift-messenger[data-view=chat] .rift-messenger-main{height:100%}
 .rift-messenger-head [data-phone]{display:block}
 :is(.rift-chat-window,.rift-messenger) .rift-chat-composer textarea.rift-chat-input{font-size:16px}
}
