/* BBCode editor / Aiwan smiles: inherits the Air theme and site font. */
.rcg-bb-toolbar{display:flex;flex-wrap:wrap;gap:4px;margin:0 0 6px;align-items:center}
.rcg-bb-toolbar button,.rcg-smile-tabs button,.rcg-smile-grid button{font:inherit;color:inherit;background:transparent;border:1px solid currentColor;border-color:rgba(128,128,128,.25);border-radius:6px;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;transition:background .15s}
.rcg-bb-toolbar button{width:32px;height:32px;padding:0;flex:0 0 auto}
.rcg-bb-toolbar button:hover,.rcg-smile-tabs button:hover,.rcg-smile-grid button:hover,.rcg-smile-tabs button[aria-pressed=true],.rcg-bb-toolbar button[aria-expanded=true]{background:rgba(128,128,128,.18)}
.rcg-bb-toolbar button:focus-visible,.rcg-smile-picker button:focus-visible{outline:2px solid currentColor;outline-offset:2px}
.rcg-smile-picker{border:1px solid rgba(128,128,128,.25);border-radius:6px;padding:8px;margin-bottom:8px;min-width:0}
.rcg-smile-picker[hidden],.rcg-smile-data[hidden]{display:none!important}
.rcg-smile-tabs{display:flex;flex-wrap:wrap;gap:4px;margin-bottom:8px}
.rcg-smile-tabs button{padding:5px 8px;font-size:.88em}
.rcg-smile-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(54px,1fr));gap:4px;max-height:260px;overflow:auto}
.rcg-smile-grid button{min-height:45px;padding:4px;min-width:0}
.rcg-smile-grid img{max-width:100%;max-height:65px;object-fit:contain}
.rcg-comment-content .rcg-bb-smile{display:inline-block;vertical-align:middle;max-width:100%;max-height:120px;width:auto;height:auto;margin:0 2px;border:0;box-shadow:none}
.rcg-comment-content .rcg-bb-image{display:block;max-width:100%;max-height:650px;width:auto;height:auto;border-radius:6px}
.rcg-bb-quote,.rcg-bb-code,.rcg-bb-spoiler{margin:6px 0;padding:9px 12px;border:1px solid rgba(128,128,128,.25);border-radius:6px;background:rgba(128,128,128,.08);overflow-wrap:anywhere}
.rcg-bb-quote{border-left:3px solid var(--accent,#6485ac)}
.rcg-bb-quote-title{font-size:.88em;opacity:.8;margin-bottom:5px;font-weight:600}
.rcg-bb-code{white-space:pre-wrap;overflow:auto;max-width:100%}.rcg-bb-spoiler summary{cursor:pointer;font-weight:600}
.rcg-bb-align-left{text-align:left}.rcg-bb-align-center{text-align:center}.rcg-bb-align-right{text-align:right}.rcg-bb-align-justify{text-align:justify}
.rcg-comment-content{overflow-wrap:anywhere}.rcg-comment-content ul,.rcg-comment-content ol{padding-left:1.5em}.rcg-bb-hr{border:0;border-top:1px solid rgba(128,128,128,.35)}
@media(max-width:600px){.rcg-bb-toolbar button{width:30px;height:32px}.rcg-smile-grid{max-height:220px}.rcg-smile-tabs button{font-size:.82em}}
.rcg-wrap .rcg-comments .rcg-comment-content{display:block;white-space:normal;min-width:0}
.rcg-wrap .rcg-comments .rcg-new-comment,.rcg-wrap .rcg-comments .rcg-comment-edit .rcg-form{gap:6px;min-width:0}

.rcg-wrap .rcg-comments[data-rcg-version="1.5.9"] .rcg-bb-toolbar{display:flex!important;visibility:visible!important;flex-wrap:wrap;gap:4px}
.rcg-wrap .rcg-comments[data-rcg-version="1.5.9"] .rcg-bb-toolbar button{width:auto;min-height:30px;height:auto;padding:4px 7px;gap:4px;display:inline-flex!important;font-size:.82em}
.rcg159-picker,.rcg159-group{border:1px solid rgba(128,128,128,.25);border-radius:6px;padding:6px;margin:3px 0;min-width:0}.rcg159-picker summary,.rcg159-group summary{cursor:pointer;font-weight:500}.rcg159-group .rcg-smile-grid{margin-top:6px}

/* Scoped editor layout: independent of global theme button styles. */
.rcg-comments .rcg-bb-toolbar{display:flex!important;flex-direction:row!important;flex-wrap:wrap!important;align-items:center!important;justify-content:flex-start!important;gap:4px!important;min-width:0;max-width:100%;margin:0!important;padding:0!important;overflow:visible}
.rcg-comments .rcg-bb-toolbar > button{box-sizing:border-box!important;position:static!important;display:inline-flex!important;flex:0 0 32px!important;width:32px!important;min-width:32px!important;max-width:32px!important;height:32px!important;min-height:32px!important;max-height:32px!important;padding:0!important;margin:0!important;align-items:center!important;justify-content:center!important;line-height:1!important;white-space:nowrap!important;overflow:hidden!important;transform:none!important;border-radius:6px!important;font-size:14px!important}
.rcg-comments .rcg-bb-toolbar > button i{margin:0!important;position:static!important;line-height:1!important;font-size:inherit!important}
.rcg-comments .rcg-bb-toolbar .rcg159-label{display:none!important}
.rcg-comments .rcg159-picker[hidden]{display:none!important}
.rcg-comments .rcg159-picker:not([hidden]){display:block!important;max-width:100%;box-sizing:border-box}
