/* Rich text editor (lolz-style toolbar) and rendered BB-code content. */
.rte{position:relative;border:1px solid var(--line,#5b4a72);border-radius:14px;background:color-mix(in srgb,var(--surface,#211f2c) 82%,#000 18%);overflow:visible}
.rte:focus-within{border-color:color-mix(in srgb,var(--accent,#d1c3ed) 55%,transparent);box-shadow:0 0 0 3px color-mix(in srgb,var(--accent,#d1c3ed) 16%,transparent)}
.rte-toolbar{display:flex;justify-content:space-between;gap:6px;flex-wrap:wrap;padding:6px 8px;border-bottom:1px solid var(--line,#5b4a72);background:#ffffff06;border-radius:14px 14px 0 0;position:sticky;top:0;z-index:2}
.rte-group{display:flex;flex-wrap:wrap;gap:2px;align-items:center}
.rte-toolbar button{display:grid;place-items:center;width:34px;height:34px;padding:0;border:0;border-radius:9px;background:transparent;color:var(--text-soft,#c2bfd2);cursor:pointer;transition:background .15s,color .15s}
.rte-toolbar button:hover,.rte-toolbar button[aria-expanded=true],.rte-toolbar button.is-on{background:#ffffff12;color:var(--text,#f0edf6)}
.rte-toolbar button:focus-visible{outline:2px solid var(--accent,#d1c3ed);outline-offset:1px}
.rte-toolbar svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.rte-gif{font:800 10px/1 Manrope,Arial,sans-serif;letter-spacing:.04em;border:1.6px solid currentColor;border-radius:4px;padding:2px 3px}
.rte-area,.rte-source{display:block;width:100%;min-height:220px;max-height:70vh;overflow:auto;padding:16px 18px;border:0;outline:0;background:transparent;color:var(--text,#f0edf6);font:15px/1.75 Manrope,Arial,sans-serif;box-sizing:border-box}
.rte-compact .rte-area,.rte-compact .rte-source{min-height:96px}
.rte-source{font:13.5px/1.7 ui-monospace,Consolas,monospace;resize:vertical}
.rte.is-empty .rte-area::before{content:attr(data-placeholder);color:var(--text-soft,#a99fbb);opacity:.65;pointer-events:none;position:absolute}
.rte-status{min-height:0;padding:0 14px;font:12.5px/1.6 Manrope,Arial,sans-serif;color:var(--text-soft,#c2bfd2)}.rte-status:not(:empty){padding:6px 14px 10px}
.rte-link{background:none;border:0;padding:0;color:var(--accent,#d1c3ed);text-decoration:underline;cursor:pointer;font:inherit}
.rte.is-full{position:fixed;inset:12px;z-index:200;display:flex;flex-direction:column;box-shadow:0 30px 90px #000c}.rte.is-full .rte-area,.rte.is-full .rte-source{flex:1;max-height:none}
.rte-pop{position:absolute;z-index:30;min-width:180px;max-width:min(420px,calc(100vw - 32px));padding:8px;border:1px solid var(--line,#5b4a72);border-radius:12px;background:var(--surface,#211f2c);box-shadow:0 18px 50px #0008}
.rte-pop.is-narrow{min-width:90px}.rte-pop.is-wide{width:340px}.rte-pop.is-emoji{width:330px}
.rte-list{display:grid}.rte-list button,.rte-menu button{display:flex;align-items:center;gap:10px;width:100%;padding:7px 10px;border:0;border-radius:8px;background:transparent;color:var(--text,#f0edf6);font:600 13px/1.4 Manrope,Arial,sans-serif;text-align:left;cursor:pointer}
.rte-list button:hover,.rte-menu button:hover{background:#ffffff10}.rte-menu svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;flex:none;color:var(--text-soft,#c2bfd2)}
.rte-swatches{display:grid;grid-template-columns:repeat(7,26px);gap:5px;margin-bottom:8px}.rte-swatches button{width:26px;height:26px;border:1px solid #ffffff2a;border-radius:7px;cursor:pointer}.rte-nocolor{background:transparent!important;color:var(--text-soft,#c2bfd2);font-size:15px}
.rte-row{display:flex;gap:6px;align-items:center}.rte-row input[type=color]{width:34px;height:34px;padding:0;border:0;background:none}
.rte-pop input:not([type]),.rte-pop input[type=url],.rte-pop .rte-hex,.rte-pop .rte-arg{flex:1;min-width:0;width:100%;padding:8px 10px;border:1px solid var(--line,#5b4a72);border-radius:9px;background:#0d0913;color:var(--text,#f0edf6);font:13px/1.4 Manrope,Arial,sans-serif;box-sizing:border-box}
.rte-form{display:grid;gap:8px}.rte-form label{display:grid;gap:6px;font:600 12.5px/1.4 Manrope,Arial,sans-serif;color:var(--text-soft,#c2bfd2)}.rte-form small{font-size:12px;color:var(--text-soft,#c2bfd2);line-height:1.5}
.rte-check{display:flex!important;grid-template-columns:none;align-items:center;gap:8px!important}
.rte-ok{justify-self:start;padding:8px 14px;border:0;border-radius:9px;background:var(--accent,#d1c3ed);color:var(--accent-ink,#2b2436);font:800 12.5px/1.2 Manrope,Arial,sans-serif;cursor:pointer;text-align:center}.rte-form .rte-ok.rte-upload{display:inline-block;color:var(--accent-ink,#2b2436);font:800 12.5px/1.2 Manrope,Arial,sans-serif}
.rte-or{font-size:12px;color:var(--text-soft,#c2bfd2)}
.rte-drop{display:grid;gap:4px;place-items:center;text-align:center;padding:22px 12px;margin-bottom:8px;border:1.5px dashed var(--line,#5b4a72);border-radius:12px;cursor:pointer;font:13px/1.4 Manrope,Arial,sans-serif;color:var(--text,#f0edf6)}.rte-drop span{color:var(--text-soft,#c2bfd2);font-size:12px}.rte-drop.is-over{border-color:var(--accent,#d1c3ed);background:#ffffff08}
.rte-emoji-title{font:700 12px/1.4 Manrope,Arial,sans-serif;color:var(--text-soft,#c2bfd2);margin:4px 4px 6px}.rte-emoji{display:grid;grid-template-columns:repeat(9,1fr);gap:2px;max-height:220px;overflow:auto}.rte-emoji button{border:0;background:transparent;border-radius:7px;font-size:20px;line-height:32px;cursor:pointer}.rte-emoji button:hover{background:#ffffff12}
/* Rendered content (also used inside the editor). */
.bb-content{overflow-wrap:anywhere}.bb-content img.bb-img{display:block;max-width:100%;height:auto;margin:10px 0;border-radius:12px}
.bb-content ul,.bb-content ol{padding-left:24px;margin:8px 0}.bb-content li{margin:4px 0}
.bb-quote{margin:12px 0;padding:10px 14px;border-left:3px solid var(--accent,#d1c3ed);border-radius:0 12px 12px 0;background:#ffffff08;color:var(--text-soft,#c2bfd2)}.bb-quote cite{display:block;font:700 12.5px/1.5 Manrope,Arial,sans-serif;font-style:normal;color:var(--text,#f0edf6);margin-bottom:4px}
.bb-spoiler{margin:12px 0;border:1px solid var(--line,#5b4a72);border-radius:12px;background:#ffffff05}.bb-spoiler summary,.bb-spoiler-title{padding:9px 14px;font:700 13.5px/1.5 Manrope,Arial,sans-serif;cursor:pointer;color:var(--text,#f0edf6)}.bb-spoiler-body{padding:4px 14px 12px}
.bb-code{margin:12px 0;padding:12px 14px;border-radius:12px;background:#00000066;overflow:auto;font:13.5px/1.6 ui-monospace,Consolas,monospace;white-space:pre}.bb-icode{padding:1px 6px;border-radius:6px;background:#00000055;font:13.5px/1.6 ui-monospace,Consolas,monospace}
.bb-hide,.bb-guest,.bb-ad{margin:12px 0;padding:10px 14px;border:1px dashed color-mix(in srgb,var(--accent,#d1c3ed) 45%,transparent);border-radius:12px;background:#ffffff06}.bb-hide-label{font:700 12.5px/1.5 Manrope,Arial,sans-serif;color:var(--text-soft,#c2bfd2);margin-bottom:6px}.bb-hide.is-locked{text-align:center;padding:16px}.bb-hide.is-locked .bb-hide-label{margin:0}
.bb-ad{border-style:solid;border-color:#ff9a5266;background:#ff9a520d}
.bb-censor{filter:blur(5px);transition:filter .2s;cursor:pointer;border-radius:4px}.bb-censor:hover,.bb-censor:focus,.bb-censor.is-open,.rte-area .bb-censor{filter:none}.rte-area .bb-censor{background:#ffffff14;text-decoration:line-through dotted}
.bb-media{position:relative;margin:12px 0;width:100%;max-width:720px;aspect-ratio:16/9;border-radius:12px;overflow:hidden;background:#000}.bb-media.is-audio{aspect-ratio:auto;height:160px}.bb-media.is-tall{aspect-ratio:9/16;max-width:340px}.bb-media iframe{position:absolute;inset:0;width:100%;height:100%;border:0}
.bb-card{display:grid;gap:2px;margin:10px 0;padding:10px 14px;border:1px solid var(--line,#5b4a72);border-radius:12px;background:#ffffff06;text-decoration:none;max-width:520px}.bb-card b{color:var(--text,#f0edf6);font-size:13.5px}.bb-card span{color:var(--text-soft,#c2bfd2);font-size:12.5px}
.bb-embed-edit{display:inline-flex;margin:6px 0;padding:8px 12px;border:1px solid var(--line,#5b4a72);border-radius:10px;background:#ffffff0a;color:var(--text,#f0edf6);font:600 13px/1.4 Manrope,Arial,sans-serif;user-select:all}
html[data-season=light] .rte{background:#fff}html[data-season=light] .rte-pop input:not([type]),html[data-season=light] .rte-pop input[type=url],html[data-season=light] .rte-pop .rte-hex,html[data-season=light] .rte-pop .rte-arg{background:#fff}
@media(max-width:600px){.rte-toolbar button{width:32px;height:32px}.rte-pop.is-wide,.rte-pop.is-emoji{width:calc(100vw - 48px)}}
/* Where formatted text sits on the site: keep each page's own type scale. */
.article-comment-body{margin:10px 0 0;line-height:1.7}
.project-rich-description>.bb-content{font:400 15px/1.95 Manrope,Arial,sans-serif;color:var(--text-soft)}
.project-description>.bb-content{white-space:normal}
.support-message>.bb-content{font:14px/1.8 Manrope,Arial,sans-serif;color:#e6d7ef;margin:12px 0 0}
html[data-season=light] .support-message>.bb-content{color:inherit}
.article-editor .rte,.studio-label+.rte,.support-reply-form .rte,#support-create-form .rte{margin-top:2px}
/* Launcher release posts: the download link is a button. */
.bb-content a[href^="/api/launcher/releases/download"]{display:inline-flex;align-items:center;gap:9px;margin:8px 0;padding:12px 22px;border-radius:14px;border:1px solid #ffffff2e;background:linear-gradient(180deg,#a47cff,#7448de);box-shadow:0 12px 28px #6c3fd855,inset 0 1px 0 #ffffff47;color:#fff;font:800 15px/1.2 Manrope,Arial,sans-serif;text-decoration:none;transition:transform .2s,box-shadow .2s}
.bb-content a[href^="/api/launcher/releases/download"]::before{content:"";width:18px;height:18px;background:currentColor;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4v11M7 10l5 5 5-5M5 20h14'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4v11M7 10l5 5 5-5M5 20h14'/%3E%3C/svg%3E") center/contain no-repeat}
.bb-content a[href^="/api/launcher/releases/download"]:hover{transform:translateY(-2px);box-shadow:0 16px 34px #6c3fd877,inset 0 1px 0 #ffffff47}
/* Editor: hidden-text, guest and ad blocks have their own typing area under the label. */
.bb-hide-body{min-height:1.6em}
.rte-area .bb-hide-body{cursor:text}
/* Release posts written before the button moved left kept it in a centred block. */
.bb-content div[data-bb="center"]:has(>a[href^="/api/launcher/releases/download"]:only-child){text-align:left!important}
/* Chat composer (comments, wall posts): avatar · one-line box with inline tools · send. The arrow opens the toolbar inside the box. */
.rte.rte-chat{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:end;gap:12px;border:0;border-radius:0;background:transparent;box-shadow:none}
.rte.rte-chat:focus-within{box-shadow:none}
.rte-chat-avatar{position:relative;display:grid;place-items:center;width:40px;height:40px;margin-bottom:2px;border-radius:50%;overflow:hidden;background:linear-gradient(135deg,#8b5cf6,#c9b3ff);color:#fff;font:800 15px/1 Manrope,Arial,sans-serif;box-shadow:0 0 0 2px #ffffff14}
.rte-chat-avatar img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.rte-chat-box{min-width:0;border:1px solid var(--line,#5b4a72);border-radius:14px;background:color-mix(in srgb,var(--surface,#211f2c) 82%,#000 18%);transition:border-color .15s,box-shadow .15s}
.rte-chat-box:focus-within{border-color:color-mix(in srgb,var(--accent,#d1c3ed) 55%,transparent);box-shadow:0 0 0 3px color-mix(in srgb,var(--accent,#d1c3ed) 16%,transparent)}
.rte-chat .rte-toolbar{position:static;padding:5px 6px}
.rte-chat-line{display:flex;align-items:flex-end;gap:2px;padding-right:6px}
.rte-chat .rte-area,.rte-chat .rte-source{flex:1;min-width:0;min-height:44px;max-height:280px;padding:11px 14px;font-size:14.5px;line-height:1.55}
.rte-chat-tools{display:flex;gap:1px;padding:5px 0}
.rte-chat-tools button,.rte-chat-send{display:grid;place-items:center;width:34px;height:34px;padding:0;border:0;border-radius:9px;background:transparent;color:var(--text-soft,#c2bfd2);cursor:pointer;transition:background .15s,color .15s,transform .15s}
.rte-chat-tools button:hover,.rte-chat-tools button[aria-expanded=true]{background:#ffffff12;color:var(--text,#f0edf6)}
.rte-chat-tools button:focus-visible,.rte-chat-send:focus-visible{outline:2px solid var(--accent,#d1c3ed);outline-offset:1px}
.rte-chat-tools svg,.rte-chat-send svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.rte-chat-send{width:42px;height:42px;margin-bottom:2px;border-radius:12px;color:var(--accent,#d1c3ed)}
.rte-chat-send svg{width:21px;height:21px}
.rte-chat-send:hover{background:color-mix(in srgb,var(--accent,#d1c3ed) 16%,transparent);color:#fff;transform:translateX(2px)}
.rte-chat-send:disabled{opacity:.5;cursor:default;transform:none}
.rte-chat>.rte-status{grid-column:2;padding-left:4px}
.rte.rte-chat.is-full{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:stretch;padding:14px;border-radius:16px;background:var(--surface,#211f2c)}
.rte-chat.is-full .rte-chat-box{display:flex;flex-direction:column}.rte-chat.is-full .rte-chat-line{flex:1;align-items:stretch}.rte-chat.is-full .rte-area{max-height:none}
html[data-season=light] .rte-chat-box{background:#fff}
/* The placeholder stays inside the line and ends with «…» instead of running under the buttons. */
.rte-chat .rte-area{position:relative}.rte-chat.is-empty .rte-area::before{top:11px;left:14px;right:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@media(max-width:560px){.rte.rte-chat{gap:6px}.rte-chat-avatar{display:none}.rte.rte-chat{grid-template-columns:minmax(0,1fr) auto}.rte-chat>.rte-status{grid-column:1}.rte-chat-tools [data-tool=ul]{display:none}.rte-chat .rte-area{padding-inline:12px 6px}.rte-chat.is-empty .rte-area::before{left:12px}}
