/* COBOL Dicas | Kunena Aurelia | interface-only, scoped to Kunena pages.
   No display:none for controls, no positioning overrides on editors/modals. */
:root{--cdk-bg:#091c12;--cdk-panel:#102519;--cdk-border:#254431;--cdk-text:#e9f7ec;--cdk-muted:#a4bfae;--cdk-accent:#39ff88}
:is(#kunena,.kunena,.kfrontend){color:var(--cdk-text);line-height:1.55}
:is(#kunena,.kunena,.kfrontend) :is(.card,.panel,.well,.kblock,.kmsg,.kfrontend){border-radius:12px;border-color:var(--cdk-border)}
:is(#kunena,.kunena,.kfrontend) :is(.card,.panel,.well){background-color:var(--cdk-panel);color:var(--cdk-text)}
:is(#kunena,.kunena,.kfrontend) :is(.card-header,.panel-heading){background-color:#12321e;color:var(--cdk-text);border-color:var(--cdk-border)}
:is(#kunena,.kunena,.kfrontend) :is(.table,.table-striped){--bs-table-bg:transparent;--bs-table-color:var(--cdk-text);--bs-table-border-color:var(--cdk-border);--bs-table-striped-bg:#102519;--bs-table-striped-color:var(--cdk-text);color:var(--cdk-text);border-color:var(--cdk-border)}
:is(#kunena,.kunena,.kfrontend) :is(.table,.table-striped) > :not(caption) > * > *{border-bottom-color:var(--cdk-border)}
:is(#kunena,.kunena,.kfrontend) :is(.table,.table-striped) tbody tr:hover{background:#12321e}
:is(#kunena,.kunena,.kfrontend) a:not(.btn):not(.badge){text-underline-offset:3px}
:is(#kunena,.kunena,.kfrontend) a:not(.btn):not(.badge):hover{color:var(--cdk-accent)}
:is(#kunena,.kunena,.kfrontend) :is(.text-muted,.small,small){color:var(--cdk-muted)!important}
:is(#kunena,.kunena,.kfrontend) :is(.badge.bg-success,.badge.bg-primary){color:#06160b}
:is(#kunena,.kunena,.kfrontend) :is(.btn-primary,.btn-success){background:#1b8f4b;border-color:#39c875;color:#fff}
:is(#kunena,.kunena,.kfrontend) :is(.btn-primary,.btn-success):hover{background:#13773e;border-color:var(--cdk-accent)}
:is(#kunena,.kunena,.kfrontend) :is(a,button,input,select,textarea):focus-visible{outline:2px solid var(--cdk-accent);outline-offset:2px}
:is(#kunena,.kunena,.kfrontend) :is(.kmsg,.kmsgtext){overflow-wrap:anywhere}
@media(max-width:767px){:is(#kunena,.kunena,.kfrontend) :is(.card,.panel,.kblock){border-radius:9px}}


/* v1.1.0 — Single-column Kunena, limited to public Kunena pages.
   :has() detects the actual forum container; no global layout change on other pages. */
@supports selector(body:has(#kunena)) {
  body:has(:is(#kunena,.kunena,.kfrontend)) .site-grid > :is(.container-sidebar-left,.container-sidebar-right) {display:none!important}
  body:has(:is(#kunena,.kunena,.kfrontend)) .site-grid {grid-template-columns:minmax(0,1fr)!important;grid-template-areas:none!important}
  body:has(:is(#kunena,.kunena,.kfrontend)) .site-grid > .container-component {grid-column:1 / -1!important;grid-row:auto!important;min-width:0;width:100%;max-width:none}
  body:has(:is(#kunena,.kunena,.kfrontend)) .site-grid > :is(.container-top-a,.container-top-b,.container-bottom-a,.container-bottom-b) {grid-column:1 / -1}
}
/* Wider forum reading area, preserving the header, footer and native controls. */
:is(#kunena,.kunena,.kfrontend) {width:100%;max-width:none;min-width:0}
:is(#kunena,.kunena,.kfrontend) :is(.card,.panel,.kblock,.kmsg) {margin-bottom:1rem;box-shadow:0 2px 12px rgba(0,0,0,.10)}
:is(#kunena,.kunena,.kfrontend) :is(.card-body,.panel-body,.kmsgtext) {line-height:1.7}
:is(#kunena,.kunena,.kfrontend) :is(.table,.table-responsive) {width:100%;max-width:100%}
:is(#kunena,.kunena,.kfrontend) :is(.table-responsive,.kmsgtext,pre) {overflow-x:auto}
:is(#kunena,.kunena,.kfrontend) :is(pre,code) {tab-size:4}
:is(#kunena,.kunena,.kfrontend) pre {background:#06160e;color:#e4f8e9;border:1px solid #285039;border-radius:8px;padding:1rem;white-space:pre;overflow-x:auto}
:is(#kunena,.kunena,.kfrontend) :is(.btn,.pagination .page-link) {transition:background-color .15s ease,border-color .15s ease}
:is(#kunena,.kunena,.kfrontend) :is(.card-header,.panel-heading) {font-weight:600}
@media (min-width:992px) {
  :is(#kunena,.kunena,.kfrontend) :is(.kmsg,.kblock,.card) {max-width:none}
}
@media (max-width:767px) {
  :is(#kunena,.kunena,.kfrontend) :is(.card-body,.panel-body) {padding:.85rem}
  :is(#kunena,.kunena,.kfrontend) :is(.btn,.pagination .page-link) {min-height:36px}
}

/* v1.2.0 — topic and message readability; no structural or permission changes. */
:is(#kunena,.kunena,.kfrontend) .kfrontend {border:1px solid var(--cdk-border);border-radius:12px;overflow:hidden}
:is(#kunena,.kunena,.kfrontend) .kfrontend table {border-collapse:separate;border-spacing:0}
:is(#kunena,.kunena,.kfrontend) .kfrontend table th {background:#10291a;color:#ccebd3;font-weight:600;vertical-align:middle;padding:.85rem .8rem}
:is(#kunena,.kunena,.kfrontend) .kfrontend table td {vertical-align:middle;padding:.9rem .8rem;line-height:1.5}
:is(#kunena,.kunena,.kfrontend) .kfrontend table tbody tr {transition:background-color .15s ease}
:is(#kunena,.kunena,.kfrontend) .kfrontend table tbody tr:hover {background-color:#12301f}
:is(#kunena,.kunena,.kfrontend) .kfrontend table td a {overflow-wrap:anywhere}
:is(#kunena,.kunena,.kfrontend) .mykmsg-header {background:#102b1c;border:1px solid #2a5139;border-radius:10px;padding:.7rem .9rem;margin-bottom:.8rem}
:is(#kunena,.kunena,.kfrontend) .kmsg {background:#0a1e13;border:1px solid #254431;border-radius:10px;padding:1rem;margin-bottom:.8rem;line-height:1.75}
:is(#kunena,.kunena,.kfrontend) .kmsgtext-hide {overflow-wrap:anywhere;min-width:0}
:is(#kunena,.kunena,.kfrontend) .ksig {margin-top:1rem;padding-top:.75rem;border-top:1px solid #254431;color:var(--cdk-muted)}
:is(#kunena,.kunena,.kfrontend) :is(.breadcrumb,.pagination) {gap:.25rem;flex-wrap:wrap}
:is(#kunena,.kunena,.kfrontend) .btn {border-radius:7px}
:is(#kunena,.kunena,.kfrontend) :is(input[type=search],input[type=text],textarea,select) {max-width:100%;min-width:0}
:is(#kunena,.kunena,.kfrontend) :is(blockquote,.blockquote) {border-left:3px solid #39c875;background:#132a1b;padding:.8rem 1rem;border-radius:4px}
@media(max-width:767px){
 :is(#kunena,.kunena,.kfrontend) .kfrontend table td {padding:.65rem .5rem}
 :is(#kunena,.kunena,.kfrontend) .mykmsg-header {padding:.6rem}
 :is(#kunena,.kunena,.kfrontend) .kmsg {padding:.75rem}
}

/* v1.2.1 — message metadata and reply-context refinement.
   Presentation only: never suppress moderation-only metadata or native actions. */
:is(#kunena,.kunena,.kfrontend) :is(.kmsg-header,.kmessage-header,.kmsghead,.kmsg-header-info,.kmessage-meta,.kmsginfo,.mykmsg-header) {
  background:#0e2719!important;color:#c9e5d1!important;
  border:1px solid #285039!important;border-radius:9px!important;
  padding:.7rem .9rem!important;margin-bottom:.75rem!important;
  line-height:1.65;overflow-wrap:anywhere;
}
:is(#kunena,.kunena,.kfrontend) :is(.kmsg-header,.kmessage-header,.kmsghead,.kmsginfo,.mykmsg-header) a {color:#9be7aa!important;text-underline-offset:3px}
:is(#kunena,.kunena,.kfrontend) :is(.kmsg-header,.kmessage-header,.kmsghead,.kmsginfo,.mykmsg-header) :is(.badge,.label) {font-size:.75rem}
/* Kunena may render a reply reference as a quoted/announcement-like block. */
:is(#kunena,.kunena,.kfrontend) :is(.kmsg,.kmessage,.kmsgtext,.kmsgtext-hide) :is(blockquote,.blockquote,.kquote,.kmsg-quote) {
  background:#132c1c!important;color:#d8f0df!important;
  border:1px solid #2c5a3e!important;border-left:3px solid #39c875!important;
  border-radius:7px!important;padding:.75rem 1rem!important;
  margin:.5rem 0 1rem!important;max-width:100%;
}
:is(#kunena,.kunena,.kfrontend) :is(.kmsg,.kmessage,.kmsgtext) :is(blockquote,.blockquote,.kquote) a {color:#a4f2b8!important}
:is(#kunena,.kunena,.kfrontend) :is(.kmsgtext,.kmsgtext-hide) {padding-top:.35rem;line-height:1.75}
@media(max-width:767px){
  :is(#kunena,.kunena,.kfrontend) :is(.kmsg-header,.kmessage-header,.kmsghead,.kmsginfo,.mykmsg-header){padding:.6rem .7rem!important;font-size:.9rem}
}

/* v1.2.2: selectors confirmed from the Aurelia markup supplied by the site owner.
   Scoped by asset loading (only com_kunena public pages); do not hide IP or moderation data. */
.mykmsg-header {
  display:block!important;
  clear:both!important;
  background:#0e2719!important;
  background-image:none!important;
  color:#d7efde!important;
  border:1px solid #2b563b!important;
  border-left:3px solid #39c875!important;
  border-radius:8px!important;
  box-shadow:none!important;
  padding:10px 14px!important;
  margin:12px 0 18px!important;
  font-size:.92rem!important;
  line-height:1.55!important;
  overflow-wrap:anywhere;
}
.mykmsg-header :is(a,em) {color:#9be7aa!important;}
.mykmsg-header em {font-style:normal!important;font-weight:600!important;}
/* Metadata row has float-end in actual markup; allow wrapping instead of overlap. */
small.float-end:has(> span.ip):has(> .text-muted) {
  float:none!important;
  display:flex!important;
  justify-content:flex-end!important;
  align-items:center!important;
  flex-wrap:wrap!important;
  column-gap:.65rem!important;
  row-gap:.25rem!important;
  width:100%!important;
  margin:0 0 8px!important;
  padding:4px 0 8px!important;
  border-bottom:1px solid #254431!important;
  color:#b5d3bf!important;
  font-size:.8rem!important;
}
small.float-end:has(> span.ip):has(> .text-muted) > .text-muted {
  color:#b5d3bf!important;
  display:inline-flex!important;
  flex-wrap:wrap!important;
  align-items:center!important;
  gap:.4rem!important;
}
small.float-end:has(> span.ip):has(> .text-muted) .ip a {color:#a0bda9!important;}
small.float-end:has(> span.ip):has(> .text-muted) svg {width:.85rem;height:.85rem;vertical-align:middle;}
@media(max-width:650px){
 small.float-end:has(> span.ip):has(> .text-muted){justify-content:flex-start!important;}
 .mykmsg-header{padding:9px 11px!important;}
}


/* v1.2.3 — prevent long IPv6 metadata from overlapping the reply reference.
   The markup places small.float-end immediately before .mykmsg-header. */
small.float-end:has(.ip) {
  float:none!important;
  clear:both!important;
  display:flex!important;
  flex-flow:row wrap!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:.35rem .75rem!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  height:auto!important;
  margin:0 0 12px!important;
  padding:6px 0 10px!important;
  box-sizing:border-box!important;
  border-bottom:1px solid #285039!important;
  line-height:1.5!important;
  overflow-wrap:anywhere!important;
}
small.float-end:has(.ip) > .ip {
  display:inline-flex!important;
  flex:0 1 auto!important;
  min-width:0!important;
  max-width:100%!important;
  overflow-wrap:anywhere!important;
  word-break:break-word!important;
}
small.float-end:has(.ip) > .ip a {
  display:inline!important;
  overflow-wrap:anywhere!important;
  word-break:break-word!important;
}
small.float-end:has(.ip) > .text-muted {
  display:inline-flex!important;
  flex:1 1 auto!important;
  flex-wrap:wrap!important;
  align-items:center!important;
  gap:.25rem .45rem!important;
  min-width:0!important;
  max-width:100%!important;
  overflow-wrap:anywhere!important;
}
small.float-end:has(.ip) + .mykmsg-header {
  clear:both!important;
  position:relative!important;
  display:flow-root!important;
  width:100%!important;
  max-width:100%!important;
  margin-top:0!important;
  box-sizing:border-box!important;
}
@media(max-width:767px) {
  small.float-end:has(.ip) {gap:.3rem .5rem!important;}
  small.float-end:has(.ip) > .text-muted {flex-basis:100%!important;}
}


/* v1.3.0 — technical-content reading: COBOL, JCL, SQL and logs.
   No changes to message header or Kunena controls. */
:is(#kunena,.kunena,.kfrontend) :is(.kmsgtext,.kmsgtext-hide,.kmessage) pre,
:is(#kunena,.kunena,.kfrontend) :is(.kmsgtext,.kmsgtext-hide,.kmessage) .code,
:is(#kunena,.kunena,.kfrontend) :is(.kmsgtext,.kmsgtext-hide,.kmessage) .code-block {
  display:block;
  max-width:100%;
  min-width:0;
  overflow-x:auto;
  white-space:pre;
  overflow-wrap:normal;
  word-break:normal;
  tab-size:4;
  padding:1rem 1.15rem;
  margin:.85rem 0 1.1rem;
  border:1px solid #315b40;
  border-left:3px solid #39c875;
  border-radius:9px;
  background:#06140c;
  color:#e0f7e6;
  font-family:ui-monospace,SFMono-Regular,Consolas,"Liberation Mono",monospace;
  font-size:.91rem;
  line-height:1.55;
  scrollbar-width:thin;
}
:is(#kunena,.kunena,.kfrontend) :is(.kmsgtext,.kmsgtext-hide,.kmessage) pre code {
  display:inline;
  padding:0;
  border:0;
  background:transparent;
  color:inherit;
  font:inherit;
  white-space:inherit;
  overflow-wrap:normal;
  word-break:normal;
}
:is(#kunena,.kunena,.kfrontend) :is(.kmsgtext,.kmsgtext-hide,.kmessage) :not(pre)>code {
  border:1px solid #315b40;
  background:#102b1c;
  color:#c7f9d4;
  border-radius:4px;
  padding:.1em .35em;
  overflow-wrap:anywhere;
}
:is(#kunena,.kunena,.kfrontend) :is(.kmsgtext,.kmsgtext-hide,.kmessage) img {
  max-width:100%;
  height:auto;
}
:is(#kunena,.kunena,.kfrontend) :is(.kmsgtext,.kmsgtext-hide,.kmessage) a {
  overflow-wrap:anywhere;
  text-underline-offset:3px;
}
:is(#kunena,.kunena,.kfrontend) :is(.kmsgtext,.kmsgtext-hide,.kmessage) :is(blockquote,.kquote) {
  max-width:100%;
  overflow-wrap:anywhere;
}
@media(max-width:767px) {
  :is(#kunena,.kunena,.kfrontend) :is(.kmsgtext,.kmsgtext-hide,.kmessage) pre {
    padding:.75rem;
    font-size:.82rem;
  }
}

/* v1.4.0 — opt-in 3270/ISPF display for plain-text code blocks only. */
#kunena pre.cd-terminal, .kunena pre.cd-terminal, .kfrontend pre.cd-terminal {
  background:#000 !important;color:#f4f4f4 !important;
  border:1px solid #176b5b !important;border-radius:6px;
  padding:1rem 1.1rem !important;max-width:100%;overflow-x:auto;
  white-space:pre !important;overflow-wrap:normal !important;word-break:normal !important;
  font: 14px/1.48 ui-monospace,Consolas,"Liberation Mono",monospace !important;
  tab-size:8;font-variant-ligatures:none;
}
.cd-terminal .cd-green {color:#23e83b}
.cd-terminal .cd-cyan {color:#30e6ee}
.cd-terminal .cd-red {color:#ff5353}
.cd-terminal .cd-yellow {color:#f5e96a}
.cd-terminal .cd-blue {color:#5ca3ff}
.cd-terminal .cd-white {color:#f4f4f4}
.cd-terminal .cd-muted {color:#aab8b0}
@media(max-width:700px){#kunena pre.cd-terminal,.kunena pre.cd-terminal,.kfrontend pre.cd-terminal{font-size:12px !important;padding:.75rem !important}}

/* v1.5.0 — ação de cópia independente da sintaxe colorida. */
#kunena .cd-code-wrapper,.kunena .cd-code-wrapper,.kfrontend .cd-code-wrapper {
  position:relative;min-width:0;max-width:100%;margin:.9rem 0;
}
#kunena .cd-code-wrapper > pre,.kunena .cd-code-wrapper > pre,.kfrontend .cd-code-wrapper > pre {
  margin:0!important;padding-top:3.15rem!important;
}
#kunena .cd-copy-code,.kunena .cd-copy-code,.kfrontend .cd-copy-code {
  position:absolute;z-index:2;top:.55rem;right:.65rem;
  border:1px solid #39885b;border-radius:6px;background:#10321f;color:#e4f8e9;
  padding:.3rem .65rem;font:600 .8rem/1.4 system-ui,sans-serif;cursor:pointer;
}
#kunena .cd-copy-code:hover,.kunena .cd-copy-code:hover,.kfrontend .cd-copy-code:hover {
  background:#1c5333;color:#fff;
}
#kunena .cd-copy-code:focus-visible,.kunena .cd-copy-code:focus-visible,.kfrontend .cd-copy-code:focus-visible {
  outline:2px solid #39ff88;outline-offset:3px;
}
@media(max-width:600px){#kunena .cd-copy-code,.kunena .cd-copy-code,.kfrontend .cd-copy-code{font-size:.75rem}}

/* v1.5.1: Kunena Aurelia BBCode [code] renders a div, not a pre. */
#kunena .cd-code-wrapper, .kunena .cd-code-wrapper, .kfrontend .cd-code-wrapper { position:relative; min-width:0; max-width:100%; }
#kunena .cd-code-wrapper > .bbcode_code_body, .kunena .cd-code-wrapper > .bbcode_code_body, .kfrontend .cd-code-wrapper > .bbcode_code_body { overflow-x:auto; max-width:100%; white-space:pre !important; padding-top:2.7rem !important; tab-size:4; }
#kunena .cd-code-wrapper > .cd-copy-code, .kunena .cd-code-wrapper > .cd-copy-code, .kfrontend .cd-code-wrapper > .cd-copy-code { position:absolute; top:.45rem; right:.55rem; z-index:2; }

/* v1.6.0 — citations and conversation readability; presentation only. */
:is(#kunena,.kunena,.kfrontend) :is(.bbcode_quote,.bbcode_quote_body,.kquote,.kmsg-quote,blockquote) {
  box-sizing:border-box;
  max-width:100%;
  min-width:0;
  overflow-wrap:anywhere;
  border-radius:8px;
}
:is(#kunena,.kunena,.kfrontend) :is(.bbcode_quote,.kquote,.kmsg-quote,blockquote) {
  border:1px solid #2e5b3b;
  border-left:4px solid #3bd884;
  background:#0c2416;
  color:#d7efde;
  margin:1rem 0;
  padding:.85rem 1rem;
}
:is(#kunena,.kunena,.kfrontend) .bbcode_quote_head {
  display:block;
  color:#77e5a0;
  font-size:.9em;
  font-weight:650;
  padding-bottom:.45rem;
  margin-bottom:.55rem;
  border-bottom:1px solid #2c5037;
}
:is(#kunena,.kunena,.kfrontend) .bbcode_quote_body {
  background:transparent;
  color:inherit;
  line-height:1.65;
}
:is(#kunena,.kunena,.kfrontend) :is(.bbcode_quote,.kquote,blockquote) :is(pre,.bbcode_code_body) {
  max-width:100%;
  overflow-x:auto;
  white-space:pre;
}
:is(#kunena,.kunena,.kfrontend) :is(.bbcode_quote,.kquote,blockquote) a {
  color:#9bf0b7;
  text-decoration:underline;
  text-underline-offset:2px;
}
@media(max-width:640px) {
  :is(#kunena,.kunena,.kfrontend) :is(.bbcode_quote,.kquote,.kmsg-quote,blockquote) {
    padding:.65rem .75rem;
    margin:.75rem 0;
  }
}

/* v1.7.0 — confirmed Aurelia markup. No markup moves, no ACL changes. */
body:has(.mykmsg-header) .mykmsg-header {
  display:block !important;
  float:none !important;
  clear:both !important;
  width:100% !important;
  max-width:100% !important;
  box-sizing:border-box !important;
  margin:.65rem 0 1.1rem !important;
  padding:.75rem 1rem !important;
  border:1px solid #31583b !important;
  border-left:3px solid #39d878 !important;
  border-radius:7px !important;
  background:#0e2718 !important;
  color:#d7f0de !important;
  line-height:1.55 !important;
  overflow-wrap:anywhere !important;
}
body:has(.mykmsg-header) .mykmsg-header :is(a,em) { color:#86eaa6 !important; }
body:has(.mykmsg-header) small.float-end:has(.ip) {
  display:flex !important;
  flex-wrap:wrap !important;
  float:none !important;
  clear:both !important;
  justify-content:flex-start !important;
  align-items:baseline !important;
  gap:.25rem .8rem !important;
  width:100% !important;
  max-width:100% !important;
  margin:0 0 .35rem !important;
  line-height:1.6 !important;
}
body:has(.mykmsg-header) small.float-end:has(.ip) .ip {
  min-width:0 !important;
  max-width:100% !important;
  overflow-wrap:anywhere !important;
}
body:has(.mykmsg-header) small.float-end:has(.ip) .ip a {
  overflow-wrap:anywhere !important;
  word-break:break-word !important;
}
body:has(.mykmsg-header) small.float-end:has(.ip) + .mykmsg-header { clear:both !important; }

/* v1.7.1 — restrained message header polish, based on inspected Aurelia markup.
   Only public-facing appearance changes; Kunena permissions and data untouched. */
body:has(.mykmsg-header) small.float-end:has(> .ip) {
  display:flex!important;
  align-items:center!important;
  flex-wrap:wrap!important;
  gap:.25rem .65rem!important;
  min-height:1.8rem;
  border-bottom:1px solid #254832!important;
  padding:0 0 .55rem!important;
  margin:0 0 .7rem!important;
  font-size:.82rem!important;
  color:#b7d8c2!important;
}
body:has(.mykmsg-header) small.float-end:has(> .ip) > .ip,
body:has(.mykmsg-header) small.float-end:has(> .ip) > svg.bi-compass {
  display:none!important;
}
body:has(.mykmsg-header) small.float-end:has(> .ip) > .text-muted {
  display:inline-flex!important;
  flex-wrap:wrap!important;
  align-items:center!important;
  gap:.25rem!important;
  width:auto!important;
  flex-basis:auto!important;
  margin:0!important;
  color:#b7d8c2!important;
}
body:has(.mykmsg-header) small.float-end:has(> .ip) > .text-muted > a[href^="#"] {
  display:inline-flex;
  align-items:center;
  padding:.08rem .45rem;
  border:1px solid #326648;
  border-radius:5px;
  color:#90efad!important;
  text-decoration:none!important;
  white-space:nowrap;
}
body:has(.mykmsg-header) .mykmsg-header {
  margin:.4rem 0 .8rem!important;
  padding:.55rem .85rem!important;
  background:#0c2518!important;
  border:1px solid #244d35!important;
  border-left:3px solid #3bd884!important;
  font-size:.9rem!important;
  line-height:1.5!important;
}
body:has(.mykmsg-header) .mykmsg-header em {
  font-style:normal!important;
  font-weight:600!important;
}
@media(max-width:640px) {
  body:has(.mykmsg-header) small.float-end:has(> .ip) {gap:.15rem .4rem!important;}
  body:has(.mykmsg-header) .mykmsg-header {padding:.5rem .65rem!important;}
}

/* v1.8.0 — Kunena BBCode copy toolbar, without moving source elements. */
.cd-code-toolbar {display:flex;justify-content:flex-end;align-items:center;margin:.55rem 0 .2rem;max-width:100%;}
.cd-code-toolbar .cd-copy-code {position:static!important;inset:auto!important;display:inline-flex!important;align-items:center;justify-content:center;padding:.38rem .8rem!important;background:#102b1c!important;color:#a7f7c0!important;border:1px solid #3a7952!important;border-radius:6px!important;cursor:pointer!important;font:600 .8rem/1.3 monospace!important;}
.cd-code-toolbar .cd-copy-code:hover,.cd-code-toolbar .cd-copy-code:focus-visible {background:#1c4830!important;color:white!important;outline:2px solid #55c784;outline-offset:1px;}
.bbcode_code_body {max-width:100%;overflow-x:auto;tab-size:4;}

/* v1.9.0: companion action to the confirmed Kunena BBCode copy toolbar. */
.cd-code-toolbar {display:flex; flex-wrap:wrap; align-items:center; justify-content:flex-end; gap:.4rem;}
.cd-code-toolbar .cd-download-code {background:#0b291a; color:#b6f2c9; border:1px solid #34774d; border-radius:5px; padding:.3rem .65rem; cursor:pointer; font:inherit; font-size:.82rem;}
.cd-code-toolbar .cd-download-code:hover,.cd-code-toolbar .cd-download-code:focus-visible {background:#15452b; color:#fff; outline-offset:2px;}

/* v2.0.0 — opt-in visual wrapping for long source lines. Never changes copied text. */
:is(#kunena,.kunena,.kfrontend) :is(.bbcode_code_body,pre).cd-code-wrap-enabled {
  white-space:pre-wrap!important;
  overflow-wrap:anywhere!important;
  word-break:normal!important;
  max-width:100%;
}
:is(#kunena,.kunena,.kfrontend) .cd-code-toolbar .cd-wrap-code {
  border:1px solid #326a48;
  border-radius:5px;
  padding:.35rem .65rem;
  background:#0b2115;
  color:#b6f2c9;
  cursor:pointer;
  font:inherit;
}
:is(#kunena,.kunena,.kfrontend) .cd-code-toolbar .cd-wrap-code[aria-pressed="true"] {
  background:#19432a;
  border-color:#39d883;
}
:is(#kunena,.kunena,.kfrontend) .cd-code-toolbar {display:flex;flex-wrap:wrap;gap:.45rem;align-items:center;}

/* v2.1.0: optional collapse for lengthy Kunena code examples.
   Code stays in DOM unchanged for copying, saving and accessibility. */
:is(#kunena,.kunena,.kfrontend) :is(.bbcode_code_body,pre).cd-code-collapsed {
  max-height: 13.5rem !important;
  overflow-y: auto !important;
  overflow-x: auto;
  scrollbar-width: thin;
  border-bottom: 2px solid #39c875;
}
:is(#kunena,.kunena,.kfrontend) .cd-code-toolbar .cd-fold-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #d5f5df;
  background: #10331e;
  border: 1px solid #34774d;
  border-radius: 6px;
  padding: .3rem .6rem;
  font: inherit;
}
:is(#kunena,.kunena,.kfrontend) .cd-code-toolbar .cd-fold-code:hover,
:is(#kunena,.kunena,.kfrontend) .cd-code-toolbar .cd-fold-code:focus-visible {
  border-color: #39ff88;
  outline-offset: 2px;
}

/* v2.2.0 — Profile and author-panel polish. Presentation-only,
   constrained to Kunena frontend; no user data or permissions modified. */
:is(#kunena,.kunena,.kfrontend) :is(.kprofile,.kprofilebox,.kprofile-left,.kprofile-right,.kmessage-left,.kmsg-profile,.kmsgprofile) {
  min-width:0;overflow-wrap:anywhere;
  border-color:#2a5239;
}
:is(#kunena,.kunena,.kfrontend) :is(.kprofile,.kprofilebox,.kmsg-profile,.kmsgprofile) :is(.avatar,img.avatar,.kavatar img) {
  max-width:100%;height:auto;object-fit:cover;
  border:2px solid #356f4c;border-radius:12px;
  box-shadow:0 3px 14px rgba(0,0,0,.2);
}
:is(#kunena,.kunena,.kfrontend) :is(.kprofile,.kprofilebox,.kmsg-profile,.kmsgprofile) :is(.username,.kusername,.kwho-admin,.kwho-globalmod,.kwho-moderator) {
  font-weight:700;overflow-wrap:anywhere;
}
:is(#kunena,.kunena,.kfrontend) :is(.kprofile,.kprofilebox,.kmsg-profile,.kmsgprofile) :is(.badge,.label) {
  display:inline-flex;align-items:center;max-width:100%;white-space:normal;
  border-radius:999px;padding:.15rem .55rem;line-height:1.35;
}
:is(#kunena,.kunena,.kfrontend) :is(.kprofile,.kprofilebox,.kmsg-profile,.kmsgprofile) :is(.small,small,.text-muted) {
  font-size:.82rem;line-height:1.5;
}
/* Keep the author and message columns legible on phones, without hiding any controls. */
@media(max-width:767px){
  :is(#kunena,.kunena,.kfrontend) :is(.kprofile,.kprofilebox,.kmsg-profile,.kmsgprofile) {
    max-width:100%;margin-bottom:.65rem;
  }
  :is(#kunena,.kunena,.kfrontend) :is(.kprofile,.kprofilebox,.kmsg-profile,.kmsgprofile) :is(.avatar,img.avatar,.kavatar img){
    max-width:72px;max-height:72px;
  }
}

/* v2.3.0 — Kunena Aurelia community navigation. Scoped to Kunena only.
   Preserve existing links, permissions, forms and keyboard focus. */
:is(#kunena,.kunena,.kfrontend) :is(.breadcrumb,.breadcrumbs,.kunena-breadcrumb,.kbreadcrumbs,nav[aria-label="breadcrumb"]) {
 display:flex;flex-wrap:wrap;align-items:center;gap:.35rem .55rem;min-width:0;
 padding:.7rem .9rem;margin-bottom:1rem;border:1px solid #28513a;
 border-radius:9px;background:#0b2416;color:#c2e5cc;
}
:is(#kunena,.kunena,.kfrontend) :is(.breadcrumb,.breadcrumbs,.kunena-breadcrumb,.kbreadcrumbs,nav[aria-label="breadcrumb"]) a {color:#a2f4bb;text-decoration:none;}
:is(#kunena,.kunena,.kfrontend) :is(.breadcrumb,.breadcrumbs,.kunena-breadcrumb,.kbreadcrumbs,nav[aria-label="breadcrumb"]) a:hover {text-decoration:underline;}
:is(#kunena,.kunena,.kfrontend) :is(.pagination,.kpagination,nav[aria-label="Pagination"],nav[aria-label="Paginação"]) {
 display:flex;flex-wrap:wrap;align-items:center;gap:.3rem;max-width:100%;
}
:is(#kunena,.kunena,.kfrontend) :is(.pagination,.kpagination) :is(.page-link,a) {
 border-radius:6px;border-color:#326448;background:#0b2518;color:#b6f6ca;
}
:is(#kunena,.kunena,.kfrontend) :is(.pagination,.kpagination) :is(.active,.current) :is(.page-link,a),
:is(#kunena,.kunena,.kfrontend) :is(.pagination,.kpagination) :is(.page-link,a)[aria-current="page"] {
 background:#245c39;border-color:#49b773;color:#fff;
}
:is(#kunena,.kunena,.kfrontend) :is(.pagination,.kpagination) :is(.disabled,[aria-disabled="true"]) :is(.page-link,a) {opacity:.55;}
:is(#kunena,.kunena,.kfrontend) :is(.table-responsive,.klist,.klist-markall,.klist-categories,.klist-topics) {max-width:100%;}
:is(#kunena,.kunena,.kfrontend) :is(.table-responsive) {overflow-x:auto;-webkit-overflow-scrolling:touch;}
:is(#kunena,.kunena,.kfrontend) :is(.topictitle,.klist-title,.kcategory-title) {overflow-wrap:anywhere;}
:is(#kunena,.kunena,.kfrontend) :is(input[type="search"],input[name="searchword"],input[name="q"],.search-query) {
 max-width:100%;border-radius:7px;border-color:#326448;
}
:is(#kunena,.kunena,.kfrontend) :is(a,button,input,select,textarea):focus-visible {
 outline:2px solid #65ed99;outline-offset:2px;
}
@media(max-width:767px){
 :is(#kunena,.kunena,.kfrontend) :is(.breadcrumb,.breadcrumbs,.kunena-breadcrumb,.kbreadcrumbs,nav[aria-label="breadcrumb"]) {padding:.55rem .7rem;font-size:.88rem;}
 :is(#kunena,.kunena,.kfrontend) :is(.pagination,.kpagination) :is(.page-link,a) {padding:.3rem .55rem;}
 :is(#kunena,.kunena,.kfrontend) :is(.klist,.klist-categories,.klist-topics) {overflow-wrap:anywhere;}
}

/* v2.4.0: visible only with explicit diagnostic query flag */
.cd-visual-diagnostics{position:fixed;right:1rem;bottom:1rem;z-index:9999;background:#071c10;color:#c6f4d2;border:1px solid #39a76b;border-radius:8px;padding:1rem;max-width:min(360px,90vw);box-shadow:0 8px 30px #0009;font:14px/1.5 sans-serif}
.cd-visual-diagnostics p{margin:.4rem 0}
.cd-visual-diagnostics button{background:#164d2e;color:#fff;border:1px solid #39a76b;border-radius:5px;padding:.3rem .7rem;cursor:pointer}

/* v2.5.0: conservative visual refinement of Kunena post author and message regions.
   No structural rearrangement, content hiding, ACL changes, or action movement. */
:is(#kunena,.kunena,.kfrontend) :is(.kprofile,.kprofilebox,.kmsg-profile,.kmsgprofile,.kmessage-left) {
  padding:.75rem .55rem;
  border-radius:10px;
  line-height:1.45;
}
:is(#kunena,.kunena,.kfrontend) :is(.kprofile,.kprofilebox,.kmsg-profile,.kmsgprofile,.kmessage-left) :is(.kwho-admin,.kwho-moderator,.kwho-globalmod,.username,.kusername) {
  color:#a0f2b9!important;
  font-weight:700;
  text-decoration-thickness:1px;
  text-underline-offset:3px;
}
:is(#kunena,.kunena,.kfrontend) :is(.kprofile,.kprofilebox,.kmsg-profile,.kmsgprofile,.kmessage-left) :is(img.avatar,.kavatar img) {
  display:inline-block;
  max-width:88px;
  max-height:88px;
  object-fit:cover;
  border-radius:12px;
}
/* Header metadata and reply reference: keep them compact, without repositioning buttons. */
body:has(.mykmsg-header) .mykmsg-header {
  margin:.45rem 0 .65rem!important;
  padding:.55rem .8rem!important;
  line-height:1.4!important;
}
body:has(.mykmsg-header) small.float-end:has(> .ip) {
  margin-bottom:.4rem!important;
  padding-bottom:.4rem!important;
}
/* Distinguish each message without relying on uncertain Aurelia action selectors. */
:is(#kunena,.kunena,.kfrontend) :is(.kmsg,.kmessage,.kmessage-container,.kmsg-container) {
  scroll-margin-top:5rem;
}
:is(#kunena,.kunena,.kfrontend) :is(.kmsg,.kmessage,.kmessage-container,.kmsg-container) :is(.kmsgtext,.kmsgtext-hide,.kmessage-body) {
  line-height:1.6;
  overflow-wrap:break-word;
}
:is(#kunena,.kunena,.kfrontend) :is(.kmsg,.kmessage,.kmessage-container,.kmsg-container) :is(.kmsgtext,.kmsgtext-hide,.kmessage-body) p:last-child {
  margin-bottom:.5rem;
}
@media(max-width:767px) {
  :is(#kunena,.kunena,.kfrontend) :is(.kprofile,.kprofilebox,.kmsg-profile,.kmsgprofile,.kmessage-left) {
    padding:.5rem .35rem;
  }
  body:has(.mykmsg-header) .mykmsg-header {
    padding:.5rem .65rem!important;
    margin-bottom:.55rem!important;
  }
}

/* v2.6.0 - confirmed Kunena Aurelia markup from topic HTML.
   Reduce spacing without changing moderation, forms, or message markup. */
#kunena .topic-item-messages > .row.message {
  margin-block: 0 1rem !important;
  padding-block: .75rem 1rem !important;
  border-bottom: 1px solid #245137;
  align-items: flex-start;
}
#kunena .topic-item-messages > .row.message > .message-published {
  min-height: 0 !important;
  padding-bottom: .4rem !important;
}
#kunena .topic-item-messages .message-published > .shadow-none.p-4.mb-5.rounded {
  margin-bottom: .5rem !important;
  padding: .75rem !important;
}
#kunena .topic-item-messages .message-published > .report.pb-5 {
  padding-bottom: 0 !important;
  margin: 0 0 .55rem !important;
  min-height: 2.25rem;
  display: flow-root;
}
#kunena .topic-item-messages .message-published > .clearfix {
  clear: both;
}
#kunena .topic-item-messages .message-published > .btn-toolbar.kmessagepadding {
  margin: .5rem 0 .65rem !important;
  padding: 0 !important;
  gap: .35rem;
}
#kunena .topic-item-messages .message-published .ksig {
  margin: .7rem 0 0 !important;
  padding: 0 !important;
}
#kunena .topic-item-messages .message-published .ksig hr {
  margin: .45rem 0 !important;
}
#kunena .topic-item-messages > .row.message > .col-md-2 .profilebox {
  list-style: none;
  padding: .65rem .35rem !important;
  margin: 0 !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .25rem;
}
#kunena .topic-item-messages > .row.message > .col-md-2 .profilebox > li {
  margin: 0 !important;
  padding: .08rem 0 !important;
  max-width: 100%;
  overflow-wrap: anywhere;
}
#kunena .topic-item-messages > .row.message > .col-md-2 .profilebox img[width="144"] {
  max-width: min(100%, 112px);
  height: auto;
  border-radius: .6rem;
}
#kunena .topic-item-messages > .row.message > .col-md-2 .profile-expand {
  margin: .4rem 0 .65rem !important;
}
@media (max-width: 767.98px) {
  #kunena .topic-item-messages > .row.message > .message-published {
    padding-inline: .5rem !important;
  }
  #kunena .topic-item-messages .message-published > .shadow-none.p-4.mb-5.rounded {
    padding: .55rem !important;
  }
  #kunena .topic-item-messages .message-published > .btn-toolbar.kmessagepadding {
    flex-wrap: wrap;
  }
}
