@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600;700&family=Inter:wght@400;500;600;700&family=Lora:wght@400;500;600&display=swap');
:root{--bg:#0b1020;--gold:#e0b85d;--gold2:#f2cc75;--text:#f4efe5;--muted:#b6bfd2;--line:#35405e;--green:#55d98b}
*{box-sizing:border-box}body{margin:0;min-height:100vh;background:radial-gradient(ellipse at 50% 0%,#26345a 0%,#11182e 43%,#090e1c 100%);color:var(--text);font-family:Inter,Arial,sans-serif;padding:28px 18px}
.shell{width:min(1380px,100%);margin:0 auto}.brand{text-align:center;margin:0 auto 22px}.brand .eyebrow{margin:0 0 2px}.eyebrow{font-size:11px;letter-spacing:3px;color:var(--gold2);font-weight:700}.brand h1{font:600 clamp(42px,5vw,66px) 'Cormorant Garamond',Georgia,serif;margin:0;color:#f7ecd5;line-height:1.05}.subtitle{color:var(--muted);font-size:15px;margin:7px 0 0}
.panel{background:linear-gradient(145deg,rgba(25,35,63,.97),rgba(15,22,42,.98));border:1px solid rgba(224,184,93,.35);border-radius:18px;box-shadow:0 22px 70px #0006;padding:26px}.auth-panel{max-width:490px;margin:35px auto}.tabs{display:flex;border-bottom:1px solid var(--line);margin:-4px 0 22px}.tab{flex:1;background:none;border:0;color:var(--muted);padding:12px;cursor:pointer;font:inherit;font-size:15px}.tab.active{color:var(--gold2);border-bottom:2px solid var(--gold2)}
label{display:block;color:#d9deea;font-size:12px;margin:15px 0}input,textarea{display:block;width:100%;margin-top:7px;background:#0c1428;border:1px solid var(--line);border-radius:9px;color:white;padding:13px;font:14px Inter,Arial;outline:none}input:focus,textarea:focus{border-color:var(--gold2)}button{font:inherit;cursor:pointer}.primary{background:linear-gradient(110deg,#e0b85d,#f2d48d);color:#17182a;border:1px solid #d69d32;border-radius:9px;padding:12px 18px;font-weight:700}.auth-panel .primary{width:100%;margin-top:10px}.outline{background:transparent;border:1px solid rgba(224,184,93,.65);color:var(--text);border-radius:9px;padding:10px 17px}.text-button{background:none;border:0;color:var(--gold2);padding:8px 0}.notice{color:#f1cc7a;font-size:12px;line-height:1.5;min-height:16px}.hidden{display:none!important}
.room-frame{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:0;background:linear-gradient(145deg,rgba(21,31,56,.98),rgba(12,19,37,.99));border:2px solid var(--gold);border-radius:22px;box-shadow:0 0 22px rgba(224,184,93,.15),0 24px 70px #0007;overflow:hidden;min-height:680px}.room-main{padding:24px 22px 22px;min-width:0}.room-top{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:17px}.room-top .eyebrow{margin:0 0 3px}.room-top h2{font:600 38px 'Cormorant Garamond',Georgia,serif;margin:0;color:#f7ecd5;line-height:1.05}.muted{font-size:13px;color:var(--muted);margin:5px 0 0}
.presence-summary,.participants-count{display:flex;align-items:center;gap:8px;border:1px solid #d99d3e;border-radius:13px;padding:11px 15px;color:#e9e3d8;font-size:13px;background:rgba(8,15,31,.32)}.presence-summary{margin:0 0 12px}.presence-summary strong,.participants-count strong{color:#fff}.pulse{width:9px;height:9px;flex:0 0 9px;border-radius:50%;background:var(--green);box-shadow:0 0 11px var(--green)}
.messages{height:clamp(340px,48vh,510px);overflow:auto;padding:18px;background:rgba(7,14,29,.55);border:1.5px solid #d99d3e;border-radius:15px;display:flex;flex-direction:column;gap:12px}.empty{color:#d0d8e8;font-size:14px;text-align:center;margin:auto}.message{max-width:88%;align-self:flex-start;background:#1a2744;border:1px solid #665176;border-radius:5px 15px 15px 15px;padding:11px 14px}.message.mine{align-self:flex-end;background:linear-gradient(145deg,#493b58,#332b48);border-color:#866b91;border-radius:15px 5px 15px 15px}.message-head{display:flex;gap:10px;align-items:center;margin-bottom:5px}.message-name{font-size:12px;color:var(--gold2);font-weight:700}.message-time{font-size:10px;color:#aeb7ca}.message-text{font-size:14px;line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere}
.composer{margin-top:13px}.composer textarea{resize:vertical;min-height:62px;max-height:180px;background:rgba(7,14,29,.55);border:1.5px solid #d99d3e;border-radius:13px;padding:14px 16px}.composer-bottom{display:flex;justify-content:space-between;align-items:center;gap:14px;margin-top:10px}.composer-bottom small{color:var(--muted);font-size:11px;line-height:1.4}.send-button{min-width:190px;padding:13px 18px}
.participants{border-left:1px solid rgba(224,184,93,.7);padding:25px 18px 20px;display:flex;flex-direction:column;min-width:0}.participants h3{font:600 23px 'Cormorant Garamond',Georgia,serif;color:#f7ecd5;margin:2px 0 15px;display:flex;align-items:center;gap:9px}.people-icon{font-family:Arial,sans-serif;color:var(--gold2);font-size:23px}.participants-count{margin-bottom:12px;padding:10px 12px}.online-users{flex:1;min-height:220px;overflow:auto;background:rgba(7,14,29,.45);border:1.5px solid #d99d3e;border-radius:14px}.online-user{display:flex;align-items:center;gap:11px;padding:13px 12px;border-bottom:1px solid rgba(224,184,93,.2)}.avatar{width:37px;height:37px;flex:0 0 37px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(145deg,#f5d58b,#b78331);color:#34230d;font-weight:700;font-size:15px}.online-name{font-size:13px;font-weight:700;color:#f3eee5;overflow-wrap:anywhere}.online-dot{width:9px;height:9px;border-radius:50%;background:var(--green);margin-left:auto;box-shadow:0 0 9px var(--green)}.empty-users{font-size:12px;color:var(--muted);text-align:center;padding:20px 10px}
footer{text-align:center;color:#9da8bf;font-size:12px;margin:22px 0 0}footer strong{color:var(--gold2)}
@media(max-width:850px){.room-frame{grid-template-columns:minmax(0,1fr) 245px}.participants{padding:22px 13px}.participants h3{font-size:20px}}
@media(max-width:680px){body{padding:18px 10px}.brand h1{font-size:44px}.room-frame{grid-template-columns:1fr;min-height:0}.room-main{padding:19px 14px}.participants{border-left:0;border-top:1px solid rgba(224,184,93,.7);padding:17px 14px}.online-users{min-height:90px;max-height:180px}.messages{height:52vh;min-height:280px}.room-top h2{font-size:32px}.composer-bottom{align-items:flex-start;flex-direction:column}.send-button{align-self:flex-end;width:100%}.participants h3{font-size:22px}}


/* Personalización individual de la apariencia */
.top-actions{display:flex;gap:9px;align-items:center}
.customize-panel{background:rgba(8,15,31,.88);border:1.5px solid #d99d3e;border-radius:14px;padding:15px 17px;margin:0 0 14px}
.customize-heading{display:flex;justify-content:space-between;align-items:center;color:var(--gold2);margin-bottom:10px}
.customize-controls{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.customize-controls label{margin:0;color:var(--muted);font-size:11px}
.customize-controls select{display:block;width:100%;margin-top:6px;padding:9px 10px;border:1px solid #d99d3e;border-radius:8px;background:#111a30;color:var(--text);font:12px Inter,Arial}
.customize-note{font-size:10px;color:var(--muted);margin:10px 0 0}
body[data-palette="nature"]{--gold:#8eaa79;--gold2:#b8d0a2;--green:#55b987}
body[data-palette="nature"] .messages,body[data-palette="nature"] .composer textarea,body[data-palette="nature"] .online-users{background:#f4f7ef;color:#344238;border-color:#91ad7b}
body[data-palette="nature"] .empty,body[data-palette="nature"] .message-text,body[data-palette="nature"] .online-name{color:#344238}
body[data-palette="nature"] .message{background:#e5eddf;border-color:#91ad7b}
body[data-palette="nature"] .message.mine{background:#d8e7d1;border-color:#819f70}
body[data-palette="serenity"]{--gold:#7daec7;--gold2:#b6dced;--green:#54c9b5}
body[data-palette="serenity"] .messages,body[data-palette="serenity"] .composer textarea,body[data-palette="serenity"] .online-users{background:#edf6fa;color:#294454;border-color:#83b8d0}
body[data-palette="serenity"] .empty,body[data-palette="serenity"] .message-text,body[data-palette="serenity"] .online-name{color:#294454}
body[data-palette="serenity"] .message{background:#dcecf4;border-color:#83b8d0}
body[data-palette="serenity"] .message.mine{background:#d4e8f2;border-color:#78a9c1}
body[data-palette="warm"]{--gold:#c98b68;--gold2:#edb995;--green:#72bd88}
body[data-palette="warm"] .messages,body[data-palette="warm"] .composer textarea,body[data-palette="warm"] .online-users{background:#fbf1e7;color:#604536;border-color:#d5a17e}
body[data-palette="warm"] .empty,body[data-palette="warm"] .message-text,body[data-palette="warm"] .online-name{color:#604536}
body[data-palette="warm"] .message{background:#f3e2d4;border-color:#d5a17e}
body[data-palette="warm"] .message.mine{background:#f0d9c9;border-color:#c98b68}
body[data-font="modern"]{font-family:Inter,Arial,sans-serif}
body[data-font="classic"]{font-family:Lora,Georgia,serif}
body[data-font="elegant"]{font-family:Inter,Arial,sans-serif}
body[data-font="classic"] .message-text,body[data-font="classic"] .online-name{font-family:Lora,Georgia,serif}
body[data-font="elegant"] .message-text{font-family:'Cormorant Garamond',Georgia,serif;font-size:17px}
body[data-size="small"] .message-text,body[data-size="small"] .online-name{font-size:12px}
body[data-size="medium"] .message-text{font-size:14px}
body[data-size="large"] .message-text,body[data-size="large"] .online-name{font-size:17px}
@media(max-width:680px){.customize-controls{grid-template-columns:1fr}.top-actions{gap:6px}.top-actions .outline{padding:8px 10px;font-size:12px}}

/* Chat privado flotante */
.online-user[role="button"]{cursor:pointer}
.online-user[role="button"]:hover{background:rgba(224,184,93,.12)}
.online-user[role="button"]:focus-visible{outline:2px solid var(--gold2);outline-offset:-2px}
.private-chat-panel{position:fixed;right:28px;bottom:24px;z-index:1000;width:min(390px,calc(100vw - 24px));max-height:70vh;display:flex;flex-direction:column;background:#101a32;border:2px solid var(--gold);border-radius:16px;padding:14px;box-shadow:0 18px 60px #000b}
.private-chat-panel.hidden{display:none!important}
.private-chat-header{display:flex;justify-content:space-between;align-items:center;gap:8px;color:var(--gold2);font-size:14px}
.private-chat-header>div{display:flex;gap:6px}
.private-chat-header .outline{padding:6px 9px;font-size:11px}
.private-messages{min-height:130px;max-height:38vh;overflow:auto;display:flex;flex-direction:column;gap:8px;padding:12px 2px}
.private-message{align-self:flex-start;max-width:88%;padding:9px 11px;border:1px solid var(--gold);border-radius:5px 12px 12px 12px;background:#24314c;color:var(--text);overflow-wrap:anywhere}
.private-message.mine{align-self:flex-end;border-radius:12px 5px 12px 12px;background:#493b58}
.private-message strong{font-size:11px;color:var(--gold2)}
.private-message p{margin:4px 0 0;font-size:13px;white-space:pre-wrap}
.private-composer{display:flex;gap:8px;align-items:flex-end}
.private-composer textarea{min-height:48px;max-height:110px;resize:vertical}
.private-composer .primary{padding:10px 12px}
@media(max-width:680px){.private-chat-panel{right:12px;bottom:12px}}

/* Herramientas sencillas de formato y emojis */
.format-toolbar{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin:8px 0 5px}
.format-toolbar button{min-width:32px;height:30px;padding:4px 8px;border:1px solid rgba(224,184,93,.55);border-radius:7px;background:rgba(8,15,31,.55);color:var(--text);font-size:14px;line-height:1}
.format-toolbar button:hover,.format-toolbar button:focus-visible{background:rgba(224,184,93,.2);outline:1px solid var(--gold2)}
.toolbar-separator{height:20px;border-left:1px solid var(--line);margin:0 2px}
.private-composer{display:block}
.private-composer .format-toolbar{margin-top:2px}
.private-composer textarea{width:100%}
.message-text strong,.private-message p strong{font-weight:800}
.message-text em,.private-message p em{font-style:italic}

/* Selector de color para texto seleccionado */
.text-color-select{height:30px;max-width:112px;padding:3px 6px;border:1px solid rgba(224,184,93,.55);border-radius:7px;background:#111a30;color:var(--text);font:12px Inter,Arial,sans-serif}
.format-toolbar .apply-text-color{min-width:34px}
.text-color-red{color:#e53935}.text-color-blue{color:#42a5f5}.text-color-green{color:#43a047}.text-color-violet{color:#ab67d5}.text-color-orange{color:#fb8c00}.text-color-gold{color:#d6a93b}.text-color-black{color:#222}

/* El color seleccionado queda activo para los siguientes mensajes. */
.text-color-select{min-width:125px}

/* Formato persistente de los mensajes: fuente, tamaño, negrita y cursiva */
.format-toolbar select.text-font-select,
.format-toolbar select.text-size-select {
  min-width: 104px;
  height: 30px;
  padding: 4px 7px;
  border: 1px solid rgba(224,184,93,.55);
  border-radius: 7px;
  background: rgba(8,15,31,.72);
  color: var(--text);
  font: 12px Inter, Arial, sans-serif;
}
.format-toolbar button.is-active {
  background: rgba(224,184,93,.35);
  border-color: var(--gold2);
  color: var(--gold2);
  box-shadow: inset 0 0 0 1px var(--gold2);
}
.msg-font-sans { font-family: Inter, Arial, sans-serif; }
.msg-font-serif { font-family: Lora, Georgia, serif; }
.msg-font-elegant { font-family: 'Cormorant Garamond', Georgia, serif; }
.msg-size-small { font-size: 12px; }
.msg-size-medium { font-size: 14px; }
.msg-size-large { font-size: 18px; }
.msg-bold { font-weight: 800; }
.msg-italic { font-style: italic; }

/* Adjuntos públicos */
.attachment-tools{display:flex;align-items:center;gap:10px;margin:8px 0}.attachment-button{display:inline-block;padding:8px 12px;border:1px solid var(--gold);border-radius:8px;color:var(--gold2);cursor:pointer;font-size:13px}.attachment-button:hover{background:rgba(224,184,93,.12)}.attachment-status{font-size:12px;color:var(--gold2)}.chat-attachment{display:flex;flex-direction:column;gap:8px;max-width:min(100%,420px);margin-top:5px}.chat-attachment img{display:block;max-width:100%;max-height:300px;object-fit:contain;border-radius:9px}.chat-attachment audio{width:min(100%,360px)}.chat-attachment a{color:var(--gold2);overflow-wrap:anywhere}.chat-attachment small{font-size:11px;opacity:.8}


/* =========================================================
   EL MÍSTICO — ESTÉTICA EQUILIBRADA 1.1
   Base azul noche · marco verde · detalles dorados · paneles claros
   ========================================================= */

:root {
  --bg: #0b1424;
  --gold: #d9b45f;
  --gold2: #f0d28b;
  --text: #f4efe5;
  --muted: #b9c4bd;
  --line: #465b4b;
  --green: #75a94e;
}

body {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(45, 75, 62, .48), transparent 48%),
    linear-gradient(145deg, #0b1424 0%, #101e2b 52%, #09111d 100%);
}

.room-frame {
  background: linear-gradient(145deg, #294735, #1d3529 70%, #172c23);
  border: 2px solid #b9954e;
  box-shadow: 0 0 24px rgba(217,180,95,.13), 0 24px 70px #0008;
}

.room-main {
  background: transparent;
}

.participants {
  background: rgba(14, 31, 24, .35);
  border-left: 1px solid rgba(217,180,95,.7);
}

.messages,
.online-users,
.private-messages {
  background: #f7f8f5;
  color: #263329;
  border: 1px solid #d7bd7e;
  border-radius: 13px;
}

.messages .empty,
.empty-users {
  color: #647267;
}

.message,
.message.mine {
  background: #ffffff;
  color: #263329;
  border: 1px solid #dce5d9;
  box-shadow: 0 2px 7px rgba(20, 40, 25, .07);
}

.message.mine {
  background: #edf5e9;
  border-color: #c6d9b9;
}

.message-name,
.private-message strong {
  color: #557b38;
}

.message-time {
  color: #788477;
}

.message-text,
.private-message p {
  color: #263329;
}

.online-user {
  color: #2d3b30;
  border-bottom-color: #e4e9df;
}

.online-user:hover,
.online-user:focus-visible {
  background: #edf5e9;
}

.online-name {
  color: #344b36;
}

.composer textarea,
.private-composer textarea {
  background: #ffffff;
  color: #263329;
  border: 1px solid #c9d9c1;
}

.composer textarea::placeholder,
.private-composer textarea::placeholder {
  color: #7b887b;
}

.composer textarea:focus,
.private-composer textarea:focus {
  border-color: #75a64d;
  box-shadow: 0 0 0 3px rgba(117,166,77,.13);
}

.presence-summary,
.participants-count {
  background: rgba(10, 24, 18, .38);
  border-color: rgba(217,180,95,.75);
  color: #f0eadc;
}

.customize-panel {
  background: rgba(12, 25, 20, .9);
  border-color: rgba(217,180,95,.8);
}

.format-toolbar button,
.format-toolbar select,
.text-color-select {
  background-color: #f4f6f1;
  color: #344238;
  border-color: #b7c9ad;
}

.format-toolbar button:hover,
.format-toolbar button:focus-visible {
  background: #e6efe0;
  color: #263329;
}

.attachment-button {
  color: #f1d38b;
  border-color: #d7ad55;
  background: rgba(15, 28, 24, .35);
}

.attachment-status {
  color: #e8c875;
}

.private-chat-panel {
  background: linear-gradient(145deg, #1a2c27, #101d1a);
  border: 1px solid rgba(224,184,93,.85);
}

.private-chat-header {
  color: #f7ecd5;
}

.private-message,
.private-message.mine {
  background: #ffffff;
  color: #263329;
  border-color: #dce5d9;
}

.private-message.mine {
  background: #edf5e9;
  border-color: #c6d9b9;
}

.private-composer .format-toolbar button,
.private-composer .format-toolbar select {
  background: #f4f6f1;
  color: #344238;
}

@media (max-width: 680px) {
  .room-frame {
    grid-template-columns: minmax(0, 1fr);
  }
  .participants {
    border-left: 0;
    border-top: 1px solid rgba(217,180,95,.7);
  }
  .format-toolbar {
    gap: 5px;
  }
  .format-toolbar select,
  .format-toolbar .text-color-select {
    max-width: 100%;
  }
}


/* EL MÍSTICO — SALA DE ENCUENTRO · REDISEÑO VISUAL 1.2 */
body {
  padding: 0 18px 28px;
  background:
    radial-gradient(circle at 12% 9%, rgba(28,105,190,.25), transparent 28%),
    radial-gradient(circle at 88% 10%, rgba(30,95,175,.22), transparent 30%),
    linear-gradient(180deg,#06152f 0%,#071b39 52%,#06152d 100%);
}
.brand {
  position: relative;
  isolation: isolate;
  width: calc(100% + 36px);
  margin: 0 -18px 18px;
  min-height: 132px;
  padding: 8px 18px 15px;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 22%,#ffffffb8 0 1px,transparent 1.8px),
    radial-gradient(circle at 28% 16%,#ffffffa8 0 1px,transparent 1.8px),
    radial-gradient(circle at 52% 12%,#ffffffb8 0 1px,transparent 1.8px),
    radial-gradient(circle at 75% 18%,#ffffffa8 0 1px,transparent 1.8px),
    radial-gradient(circle at 91% 30%,#ffffffb8 0 1px,transparent 1.8px),
    linear-gradient(180deg,#061b43 0%,#092d62 70%,#132b50 100%);
  background-size: 120px 80px,170px 100px,140px 90px,180px 100px,130px 90px,auto;
}
.brand::before {
  content:"";
  position:absolute;
  z-index:-1;
  inset:25px 0 0;
  background:linear-gradient(180deg,#254a78 0%,#101e3b 100%);
  clip-path:polygon(0 75%,7% 55%,13% 68%,21% 30%,29% 70%,37% 45%,46% 74%,54% 32%,63% 72%,71% 43%,79% 70%,88% 35%,96% 68%,100% 52%,100% 100%,0 100%);
  opacity:.95;
}
.brand::after {
  content:"";
  position:absolute;
  z-index:-1;
  inset:65px 0 0;
  background:linear-gradient(180deg,#071a37 0%,#06142b 100%);
  clip-path:polygon(0 55%,10% 28%,19% 62%,30% 25%,42% 70%,55% 22%,68% 62%,78% 30%,90% 65%,100% 26%,100% 100%,0 100%);
}
.brand .eyebrow {
  color:#ffcf35;
  font:700 clamp(19px,2.2vw,30px) Georgia,serif;
  letter-spacing:4px;
  margin:0;
  text-shadow:0 2px 8px #000;
}
.brand h1 {
  color:#fff7e8;
  font-size:clamp(42px,5vw,64px);
  text-shadow:0 3px 8px #000b;
}
.brand .subtitle {
  color:#fff;
  font-weight:600;
  text-shadow:0 2px 5px #000;
}
.room-frame {
  grid-template-columns:minmax(0,1fr) 300px;
  background:linear-gradient(135deg,#087b08 0%,#005500 48%,#003d12 100%);
  border:8px solid #f2b900;
  border-radius:28px;
  box-shadow:0 0 0 2px #ffe35b inset,0 12px 38px #0008;
  min-height:0;
}
.room-main {padding:20px 16px 16px}
.room-top h2 {font-size:42px;color:#fff8e9}
.room-top .eyebrow {color:#ffe15b;font-size:13px;letter-spacing:2px}
.muted {color:#fff;font-size:14px}
.top-actions .outline {
  border:2px solid #f5c900;
  border-radius:13px;
  color:#fff;
  font-weight:700;
  background:rgba(0,35,0,.45);
  padding:12px 17px;
}
.presence-summary,.participants-count {
  background:rgba(0,45,0,.78);
  border:2px solid #e7c52e;
  color:#fff;
  border-radius:15px;
  font-size:16px;
}
.messages {
  height:clamp(390px,49vh,560px);
  background:#fff;
  border:2px solid #e7c52e;
  border-radius:18px;
  padding:18px 20px;
  gap:12px;
}
.message {
  max-width:78%;
  background:linear-gradient(135deg,#fff,#f0f1ff);
  border:1px solid #d1d5ec;
  color:#17202c;
  border-radius:20px 20px 20px 7px;
  padding:12px 16px;
  box-shadow:0 2px 4px #17202c12;
}
.message.mine {
  background:linear-gradient(135deg,#efffd0,#d8f5a4);
  border:1px solid #c5e58c;
  border-radius:20px 20px 7px 20px;
}
.message-name {color:#75400b;font-size:15px}
.message-time {color:#41557d;font-size:12px}
.message-text {color:#111827;font-size:17px;line-height:1.35}
.composer {margin-top:10px}
.format-toolbar {gap:7px;margin:8px 0}
.format-toolbar button,.format-toolbar select,.text-color-select {
  height:38px;
  min-width:38px;
  border:2px solid #e8c400;
  border-radius:10px;
  background:#063e13;
  color:#fff;
  font-size:15px;
  font-weight:700;
}
.format-toolbar select.text-font-select,.format-toolbar select.text-size-select {
  height:38px;
  min-width:120px;
  background:#063e13;
  color:#fff;
  border:2px solid #e8c400;
  font-size:14px;
}
.format-toolbar button:hover,.format-toolbar button:focus-visible {
  background:#e8bd00;
  color:#10200d;
}
.attachment-tools {margin:8px 0}
.attachment-button {
  background:#063e13;
  border:2px solid #e8c400;
  border-radius:10px;
  color:#fff4b8;
  padding:10px 14px;
}
.composer textarea {
  min-height:64px;
  background:#fff;
  color:#243a62;
  border:2px solid #e8c400;
  border-radius:14px;
  font-size:17px;
}
.composer textarea::placeholder {color:#53678e}
.composer-bottom {margin-top:8px}
.composer-bottom small {color:#fff;display:none}
.send-button {
  min-width:150px;
  border:2px solid #ffda22;
  border-radius:14px;
  background:linear-gradient(135deg,#ffe23a,#f2a900);
  color:#101b08;
  font-size:19px;
  padding:13px 20px;
}
.participants {
  padding:16px 12px;
  background:rgba(0,48,13,.6);
  border-left:2px solid #e5c12b;
}
.participants h3 {font-size:24px;color:#fff8df;margin:3px 0 12px}
.participants-count {background:#fff;color:#101820;border:1px solid #e5c12b;font-size:16px}
.participants-count strong {color:#111}
.online-users {
  background:#fff;
  border:2px solid #e5c12b;
  border-radius:16px;
}
.online-user {padding:11px 10px;border-bottom:1px solid #d9dfeb;gap:10px}
.avatar {width:46px;height:46px;flex-basis:46px;font-size:18px}
.online-name {color:#111827;font-size:15px}
.online-dot {background:#08c72e;box-shadow:0 0 7px #08c72e}
.private-chat-panel {
  border:5px solid #f2c400;
  border-radius:22px;
  background:linear-gradient(135deg,#005b12,#003c10);
  box-shadow:0 12px 35px #0009;
  padding:14px 16px;
}
.private-chat-header {color:#fff;font-size:17px}
.private-chat-header .outline {color:#fff;border-color:#f2c400}
.private-messages {background:#fff;border-radius:12px;padding:12px}
.private-message,.private-message.mine {background:#f5f7ff;color:#17202c;border-color:#d6dcef}
.private-message.mine {background:#eaffce;border-color:#c7e89b}
.private-message strong {color:#74420b}
.private-message p {color:#17202c}
.private-composer textarea {background:#fff;color:#17202c;border:1px solid #c5d5c2}
footer {color:#dbe6f7}
@media(max-width:900px) {
  .room-frame {grid-template-columns:minmax(0,1fr) 250px;border-width:6px}
  .room-main {padding:15px 12px}
  .participants {padding:14px 9px}
}
@media(max-width:680px) {
  body {padding:0 8px 18px}
  .brand {width:calc(100% + 16px);margin:0 -8px 12px;min-height:110px;padding:8px}
  .brand h1 {font-size:40px}
  .room-frame {grid-template-columns:1fr;border-width:5px;border-radius:20px}
  .participants {border-left:0;border-top:2px solid #e5c12b}
  .messages {height:55vh;min-height:300px;padding:12px}
  .message {max-width:92%}
  .message-text {font-size:15px}
  .format-toolbar select.text-font-select,.format-toolbar select.text-size-select {min-width:95px;flex:1}
  .composer-bottom {flex-direction:row;align-items:center}
  .send-button {width:auto;min-width:120px}
}


/* EL MÍSTICO — ajuste visual 1.3: cabecera y compositor compacto */
body {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(35,83,126,.42), transparent 42%),
    linear-gradient(180deg,#071a38 0%,#0a1d38 45%,#06152b 100%);
  padding: 0 18px 18px;
}
.shell { width: min(1500px, 100%); }
.brand {
  position: relative;
  isolation: isolate;
  min-height: 118px;
  margin: 0 auto 14px;
  padding: 9px 12px 12px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 15% 90%, rgba(40,95,145,.45), transparent 38%),
    radial-gradient(ellipse at 80% 85%, rgba(38,87,128,.4), transparent 35%),
    linear-gradient(180deg,#09224a 0%,#102d55 62%,#071a35 100%);
  border-bottom: 1px solid rgba(220,184,91,.55);
}
.brand::before {
  content:"";
  position:absolute; inset:0; z-index:-1;
  opacity:.72;
  background:
    radial-gradient(2px 2px at 8% 18%,#fff 98%,transparent),
    radial-gradient(1.5px 1.5px at 17% 32%,#fff 98%,transparent),
    radial-gradient(2px 2px at 29% 12%,#fff 98%,transparent),
    radial-gradient(1.5px 1.5px at 42% 24%,#fff 98%,transparent),
    radial-gradient(2px 2px at 61% 14%,#fff 98%,transparent),
    radial-gradient(1.5px 1.5px at 77% 28%,#fff 98%,transparent),
    radial-gradient(2px 2px at 91% 15%,#fff 98%,transparent),
    linear-gradient(165deg,transparent 58%,#17345b 58.5%,#17345b 68%,transparent 68.5%),
    linear-gradient(15deg,transparent 61%,#07162d 61.5%,#07162d 76%,transparent 76.5%);
  background-size:100% 100%;
}
.brand .eyebrow { color:#f4c52e; font-size:clamp(12px,1.3vw,17px); }
.brand h1 { font-size:clamp(38px,4.7vw,62px); text-shadow:0 2px 12px #0009; }
.brand .subtitle { color:#f5f3ee; font-weight:600; margin-top:2px; }
.room-frame {
  grid-template-columns:minmax(0,1fr) 270px;
  min-height:0;
  border-width:5px;
  border-radius:24px;
  background:linear-gradient(135deg,#08730b,#00440c 65%,#00320b);
}
.room-main { padding:16px 16px 12px; }
.room-top { margin-bottom:10px; }
.room-top h2 { font-size:34px; }
.presence-summary { margin-bottom:9px; padding:8px 12px; }
.messages {
  height:clamp(300px,48vh,500px);
  min-height:280px;
  padding:14px;
  gap:11px;
  background:#fff;
}
.message { max-width:min(78%,680px); padding:10px 12px; }
.participants { padding:18px 12px 14px; }
.participants h3 { font-size:20px; margin-bottom:10px; }
.participants-count { padding:8px 10px; margin-bottom:9px; }
.online-users { min-height:180px; max-height:clamp(250px,58vh,560px); }
.online-user { padding:10px 9px; gap:9px; }
.composer { margin-top:8px; display:grid; grid-template-columns:minmax(0,1fr) auto; gap:7px 10px; align-items:end; }
.composer .format-toolbar { grid-column:1 / -1; margin:0; padding:0; gap:5px; }
/* v36.9: los botones de adjuntos comparten la fila de formato; no fuerzan una segunda fila */
.composer .attachment-tools { grid-column:auto; display:flex; flex:0 0 auto; align-items:center; gap:6px; margin:0; min-height:0; width:auto; }
.composer .attachment-tools .attachment-buttons { display:flex; flex:0 0 auto; align-items:center; gap:5px; }
.composer .attachment-tools .attachment-guidance,
.composer .attachment-tools .attachment-status,
.composer .attachment-tools .attachment-selection { display:none; }
.composer .attachment-feedback { grid-column:1 / -1; display:none; align-items:center; flex-wrap:wrap; gap:8px; margin:0; min-width:0; }
.composer .attachment-feedback.is-visible { display:flex; }
.composer .attachment-feedback .attachment-guidance { display:none; }
.composer .attachment-feedback .attachment-status { display:inline; }
.composer .attachment-feedback .attachment-selection { display:flex; align-items:center; flex-wrap:wrap; gap:8px; width:100%; }
.composer .attachment-feedback .attachment-selection.hidden { display:none; }
.composer .attachment-file-name { color:#fff4d6; font-size:12px; overflow-wrap:anywhere; }
.composer .attachment-action { cursor:pointer; border:1px solid #d9b45f; border-radius:7px; padding:6px 10px; background:#f5eddf; color:#49356e; font-weight:700; }
.composer .attachment-action:disabled { opacity:.6; cursor:wait; }
.composer .format-toolbar { flex-wrap:nowrap; white-space:nowrap; gap:4px; }
.composer .format-toolbar > button, .composer .format-toolbar > select { flex:0 0 auto; }
.composer .format-toolbar .attachment-button { min-width:32px; height:34px; padding:5px 8px; }
.composer .format-toolbar .attachment-button svg { width:17px; height:17px; }
@media(max-width:1100px) { .composer .format-toolbar { flex-wrap:wrap; } .composer .attachment-tools { flex-basis:auto; } }

.composer .attachment-button { padding:6px 10px; }
.composer textarea {
  grid-column:1;
  grid-row:3;
  min-height:54px;
  max-height:110px;
  resize:vertical;
  padding:12px 14px;
  margin:0;
}
.composer-bottom {
  display:contents;
}
.composer-bottom small { display:none; }
.composer-bottom .send-button {
  grid-column:2;
  grid-row:3;
  align-self:stretch;
  min-width:130px;
  width:auto;
  margin:0;
  padding:10px 17px;
}
.room-main > #roomMessage { margin:3px 0 0; }
footer { margin-top:12px; }
@media(max-width:850px) {
  .room-frame { grid-template-columns:minmax(0,1fr) 230px; }
  .room-main { padding:13px 12px 10px; }
  .composer-bottom .send-button { min-width:110px; }
}
@media(max-width:680px) {
  body { padding:0 8px 12px; }
  .brand { min-height:100px; margin-bottom:10px; }
  .brand h1 { font-size:38px; }
  .room-frame { grid-template-columns:1fr; }
  .participants { border-left:0; border-top:2px solid #d9b45f; }
  .messages { height:46vh; min-height:260px; }
  .composer { grid-template-columns:minmax(0,1fr) 105px; }
  .composer-bottom .send-button { min-width:0; padding:9px 8px; font-size:14px; }
}


/* ===== EL MÍSTICO · acabado premium de Sala de Encuentro ===== */
:root{
  --emerald:#164d3c;--emerald-deep:#10382f;--gold:#c9a45b;--gold-soft:#e8d19a;
  --ivory:#fffdf7;--ink:#24352f;--muted-ink:#718078;
}
body{
  padding:22px 18px 30px;
  background:
    radial-gradient(ellipse at 50% -12%,rgba(42,75,125,.38),transparent 44%),
    linear-gradient(180deg,#101b35 0%,#09152c 52%,#060e20 100%);
  color:var(--ink);
}
.shell{width:min(1440px,100%);}
.brand{margin:0 auto 22px;max-width:1440px;}
.brand-banner{
  display:block;width:100%;height:auto;aspect-ratio:3/1;object-fit:cover;
  border:1px solid rgba(201,164,91,.85);border-radius:18px;
  box-shadow:0 12px 34px rgba(30,54,43,.20),0 2px 7px rgba(201,164,91,.25);
}
.panel{
  background:linear-gradient(145deg,rgba(255,255,251,.98),rgba(246,248,241,.99));
  color:var(--ink);border:1px solid rgba(201,164,91,.68);border-radius:18px;
  box-shadow:0 18px 48px rgba(29,57,43,.13),inset 0 1px 0 #fff;padding:28px;
}
.auth-panel{margin:26px auto;}
.tabs{border-color:#e5e2d7}
.tab{color:#718078}
.tab.active{color:var(--emerald);border-color:var(--gold);font-weight:700}
label{color:#52665b}
input,textarea{
  background:#fff;color:#263a31;border:1px solid #d9dfd6;
  box-shadow:inset 0 1px 2px rgba(25,54,39,.035);
}
input:focus,textarea:focus{border-color:#b9944d;box-shadow:0 0 0 3px rgba(201,164,91,.15)}
.primary{
  background:linear-gradient(120deg,#1c654c,#124532);color:#fff;
  border:1px solid #b89551;border-radius:10px;
  box-shadow:0 5px 12px rgba(16,64,46,.17),inset 0 1px 0 rgba(255,255,255,.18);
  transition:transform .16s ease,box-shadow .16s ease,filter .16s ease;
}
.primary:hover{transform:translateY(-1px);box-shadow:0 8px 18px rgba(16,64,46,.22);filter:brightness(1.06)}
.outline{
  border:1px solid rgba(201,164,91,.8);background:rgba(255,255,255,.08);
  color:inherit;border-radius:9px;transition:background .15s ease,border-color .15s ease;
}
.outline:hover{background:rgba(201,164,91,.13);border-color:#b58c42}
.room-frame{
  background:linear-gradient(145deg,#174b3a,#10392f);
  border:1px solid #c5a15b;border-radius:20px;
  box-shadow:0 0 0 4px rgba(201,164,91,.10),0 22px 55px rgba(25,55,41,.22);
  overflow:hidden;
}
.room-main{padding:22px 22px 18px}
.room-top{margin-bottom:15px}
.room-top .eyebrow{color:#e5cc91;letter-spacing:2.2px}
.room-top h2,.participants h3{color:#fff8e9}
.muted{color:#d5dfd5}
.presence-summary,.participants-count{
  background:rgba(255,255,255,.08);border:1px solid rgba(218,190,130,.65);
  color:#f6f2e7;border-radius:10px;
}
.messages{
  background:var(--ivory);border:1px solid #d5c18e;border-radius:13px;
  box-shadow:inset 0 2px 7px rgba(45,58,43,.045);padding:17px;
}
.empty{color:#7b887e}
.message{background:#f0f4ed;border:1px solid #dce5d8;color:#263b30;box-shadow:0 2px 5px rgba(37,57,43,.045)}
.message.mine{background:#e5efe6;border:1px solid #c8d9c9;color:#263b30}
.message-name{color:#31664d}
.message-time{color:#87938a}
.message-text{color:#263b30}
.composer{margin-top:11px}
.format-toolbar{gap:5px;margin:7px 0 7px}
.format-toolbar button{
  background:#f8f7f0;color:#345344;border:1px solid #d9c99f;
  border-radius:7px;min-width:31px;height:30px;transition:all .15s ease;
}
.format-toolbar button:hover,.format-toolbar button:focus-visible{
  background:#efe6d0;border-color:#b9944d;outline:0;box-shadow:0 0 0 2px rgba(201,164,91,.16)
}
.format-toolbar select,.text-color-select{
  background:#fffdf7;color:#40584a;border:1px solid #d9c99f;border-radius:7px;
}
.attachment-tools{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin:0 0 7px}
.attachment-button{
  display:inline-flex;align-items:center;justify-content:center;min-width:36px;height:34px;
  padding:0 10px;margin:0;border:1px solid #cbb783;border-radius:8px;
  background:linear-gradient(180deg,#fffdf7,#f1eddf);color:#28543f;
  font:600 14px Inter,Arial,sans-serif;cursor:pointer;
  box-shadow:0 2px 5px rgba(37,57,43,.06);transition:all .15s ease;
}
.attachment-button:hover{background:#efe5cd;border-color:#b28b45;transform:translateY(-1px)}
.attachment-button[data-file-kind="pdf"]{font-size:11px;letter-spacing:.4px}
.attachment-status{color:#e7d7ae;font-size:11px;flex:1 1 160px}
.composer textarea{
  min-height:54px;max-height:150px;background:#fffdf8;color:#273b30;
  border:1px solid #d5c18e;border-radius:11px;padding:12px 14px;
}
.composer-bottom{margin-top:8px}
.composer-bottom small{color:#d5dfd5}
.send-button{min-width:150px;padding:11px 20px}
.participants{
  border-left:1px solid rgba(218,190,130,.7);
  background:linear-gradient(180deg,rgba(8,38,29,.20),rgba(8,38,29,.08));
  padding:22px 16px 18px;
}
.participants h3{font-size:22px}
.online-users{background:rgba(255,255,255,.96);border:1px solid #d5c18e;border-radius:12px}
.online-user{border-bottom:1px solid #e8e4d7}
.online-name{color:#31483a}
.online-user[role="button"]:hover{background:#f2f4eb}
.avatar{border:1px solid #d2b36d;box-shadow:0 2px 6px rgba(29,57,43,.12)}
footer{color:#77867b;margin-top:17px}
footer strong{color:#8b6b31}
.customize-panel{background:#fffdf7;border:1px solid #d5c18e;box-shadow:0 8px 22px rgba(0,0,0,.08)}
.customize-heading{color:#28543f}
.customize-controls label{color:#5b6c60}
.customize-controls select{background:#fff;color:#344b3c;border-color:#d5c18e}
.private-chat-panel{background:#fffdf7;color:#293d31;border:1px solid #c5a15b;box-shadow:0 18px 55px rgba(12,35,25,.28)}
.private-chat-header{color:#28543f}
.private-messages{color:#293d31}
.private-message{background:#eef3eb;color:#293d31;border-color:#d3c18e}
.private-message.mine{background:#e2ede2;color:#293d31}
.private-message strong{color:#35674e}
.private-composer textarea{background:#fff;color:#293d31}
.notice{color:#8b6b31}
@media(max-width:680px){
  body{padding:12px 9px 20px}
  .brand{margin-bottom:14px}
  .brand-banner{border-radius:12px;aspect-ratio:2.6/1}
  .room-frame{border-radius:15px}
  .room-main{padding:15px 11px}
  .participants{border-top:1px solid rgba(218,190,130,.7);border-left:0}
  .composer-bottom{flex-direction:row;align-items:center}
  .send-button{width:auto;min-width:120px;align-self:auto}
  .composer-bottom small{font-size:10px}
}


/* ===== Corrección definitiva de cabecera: banner limpio y sin marco exterior ===== */
.brand{
  position:relative;
  isolation:auto;
  display:block;
  width:100%;
  max-width:none;
  min-height:0;
  height:auto;
  margin:0 auto 14px;
  padding:0;
  overflow:visible;
  background:transparent;
  border:0;
  border-radius:0;
  box-shadow:none;
}
.brand::before,
.brand::after{
  content:none !important;
  display:none !important;
}
.brand-banner{
  display:block;
  width:100%;
  max-width:100%;
  height:auto;
  aspect-ratio:auto;
  object-fit:contain;
  margin:0;
  padding:0;
  border:0;
  border-radius:0;
  box-shadow:none;
}
@media(max-width:680px){
  .brand{
    min-height:0;
    margin:0 auto 10px;
    padding:0;
    background:transparent;
  }
  .brand-banner{
    aspect-ratio:auto;
    border:0;
    border-radius:0;
    box-shadow:none;
  }
}


/* EL MÍSTICO — CORRECCIÓN DEFINITIVA DEL BANNER */

.brand {
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 auto 14px !important;
  padding: 0 !important;
  background: #10152b !important;
  border: 0 !important;
  box-shadow: none !important;
  overflow: visible !important;
}

.brand::before,
.brand::after {
  display: none !important;
  content: none !important;
}

.brand-banner {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  aspect-ratio: auto !important;
  object-fit: contain !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

/* FONDO DEFINITIVO AZUL NOCHE */
html,
body {
  background-color: #09152c !important;
}

body {
  background:
    radial-gradient(
      ellipse at 50% 0%,
      rgba(42, 75, 125, 0.38),
      transparent 45%
    ),
    linear-gradient(
      180deg,
      #101b35 0%,
      #09152c 52%,
      #060e20 100%
    ) !important;
}

/* ===== CABECERA CANÓNICA: la altura depende solo de la imagen ===== */
header.brand {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 0 auto 14px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
  line-height: 0 !important;
  font-size: 0 !important;
}
header.brand::before,
header.brand::after {
  content: none !important;
  display: none !important;
}
header.brand > img.brand-banner {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  object-fit: initial !important;
  object-position: center !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  vertical-align: top !important;
}
@media (max-width: 680px) {
  header.brand { margin-bottom: 10px !important; }
}


/* EL MÍSTICO — CABECERA FINAL: transparencia real y altura natural */
html, body { background-color: #09152c !important; }
body {
  background: radial-gradient(ellipse at 50% 0%, rgba(42,75,125,.38), transparent 45%),
              linear-gradient(180deg,#101b35 0%,#09152c 52%,#060e20 100%) !important;
}
header.brand {
  display:block !important; position:relative !important; isolation:auto !important;
  width:100% !important; max-width:100% !important; height:auto !important;
  min-height:0 !important; max-height:none !important;
  margin:0 auto 14px !important; padding:0 !important;
  background:transparent !important; border:0 !important; border-radius:0 !important;
  box-shadow:none !important; overflow:visible !important;
  line-height:0 !important; font-size:0 !important;
}
header.brand::before, header.brand::after { content:none !important; display:none !important; }
header.brand > img.brand-banner {
  display:block !important; width:100% !important; max-width:100% !important;
  height:auto !important; min-height:0 !important; max-height:none !important;
  aspect-ratio:auto !important; object-fit:contain !important;
  margin:0 !important; padding:0 !important;
  background:transparent !important; border:0 !important; border-radius:0 !important;
  box-shadow:none !important; vertical-align:top !important;
}
@media(max-width:680px){ header.brand{margin-bottom:10px !important;} }


/* =========================================================
   EL MÍSTICO — AJUSTE DE ARMONÍA VISUAL · v24
   Verde esmeralda más luminoso, banner alineado y márgenes compactos.
   ========================================================= */
:root {
  --emerald: #1d7654;
  --emerald-deep: #14563f;
}

/* Márgenes exteriores más equilibrados */
body {
  padding: 12px 18px 18px !important;
}

/* Banner y sala comparten exactamente el ancho del contenedor */
.shell {
  width: min(1440px, 100%) !important;
  margin-left: auto !important;
  margin-right: auto !important;
}
header.brand {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 auto 12px !important;
}
header.brand > img.brand-banner {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  border-radius: 0 !important;
}

/* Esmeralda más vivo, sin llegar a un verde fosforescente */
.room-frame {
  background: linear-gradient(135deg, #21845d 0%, #1b7653 52%, #155c43 100%) !important;
}
.room-main {
  background: transparent !important;
}
.participants {
  background: linear-gradient(180deg, rgba(8, 48, 34, .28), rgba(8, 42, 31, .20)) !important;
}

/* Menos espacio bajo la sala */
footer {
  margin-top: 10px !important;
}

@media (max-width: 680px) {
  body { padding: 9px 9px 14px !important; }
  header.brand { margin-bottom: 10px !important; }
}


/* ===== AJUSTE DE COMPOSICIÓN · v25 ===== */
/* Banner aprobado: no se modifica su imagen ni su presentación. */
body {
  padding-top: 6px !important;
  padding-bottom: 10px !important;
}
header.brand {
  margin-bottom: 8px !important;
}

/* Encabezado de la sala en una sola línea para liberar altura. */
.room-top {
  align-items: center !important;
  margin-bottom: 8px !important;
}
.room-heading-wrap {
  min-width: 0;
  flex: 1 1 auto;
}
.room-title-line {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  column-gap: 12px;
  row-gap: 0;
}
.room-title-line > .eyebrow {
  margin: 0 !important;
  line-height: 1.15;
  white-space: nowrap;
  font-size: 11px;
}
.room-title-line > h2 {
  margin: 0 !important;
  line-height: 1.05;
  font-size: 30px !important;
}
.room-heading-wrap > .muted {
  margin-top: 3px !important;
}

/* La altura liberada se aprovecha en el área de conversación. */
.messages {
  height: clamp(340px, 54vh, 580px) !important;
  min-height: 320px !important;
}

footer {
  margin-top: 8px !important;
  margin-bottom: 0 !important;
}

@media (max-width: 680px) {
  body {
    padding-top: 6px !important;
    padding-bottom: 10px !important;
  }
  header.brand {
    margin-bottom: 8px !important;
  }
  .room-top {
    align-items: flex-start !important;
    flex-wrap: wrap;
    row-gap: 8px;
  }
  .room-title-line {
    column-gap: 8px;
  }
  .room-title-line > .eyebrow {
    font-size: 9px;
    letter-spacing: 1.2px;
  }
  .room-title-line > h2 {
    font-size: 26px !important;
  }
  .messages {
    height: 54vh !important;
    min-height: 300px !important;
  }
}


/* ===== PALETA DE PRUEBA AMATISTA · v26 ===== */
/* Se conserva el banner aprobado, el fondo azul noche y los paneles claros. */
:root {
  --amethyst: #60458A;
  --amethyst-deep: #49366F;
  --amethyst-light: #765BA0;
}

/* Superficie principal de la sala: amatista equilibrado. */
.room-frame {
  background: linear-gradient(
    135deg,
    #705596 0%,
    #60458A 48%,
    #513A78 100%
  ) !important;
}

/* La columna lateral gana profundidad para separar visualmente participantes. */
.participants {
  background: linear-gradient(
    180deg,
    #49366F 0%,
    #40305F 100%
  ) !important;
}

/* Mantener mensajes y zonas de lectura claros, con bordes suaves violetas. */
.messages {
  background: #fffdf7 !important;
  border-color: rgba(224, 184, 93, .85) !important;
}
.message {
  border-color: #d9cde8;
}
.message.mine {
  border-color: #c7b5df;
}

/* Los indicadores conservan su verde de estado: no se altera su significado. */


/* ===== DEPURACIÓN CROMÁTICA AMATISTA · v27 ===== */
/* Elimina los restos de verde de la interfaz interior.
   Se preservan los indicadores verdes de presencia/estado. */

/* Botones principales y acciones del compositor */
.primary,
.send-button {
  background: linear-gradient(135deg, #60458A 0%, #49366F 100%) !important;
  color: #fffdf8 !important;
  border-color: #d8b65f !important;
  box-shadow: 0 4px 11px rgba(45, 29, 75, .20),
              inset 0 1px 0 rgba(255,255,255,.16) !important;
}
.primary:hover,
.send-button:hover {
  background: linear-gradient(135deg, #765BA0 0%, #574078 100%) !important;
}

/* Controles de formato, selectores y adjuntos */
.format-toolbar button,
.format-toolbar select,
.text-color-select,
.attachment-button {
  background: linear-gradient(180deg, #f5f0fb 0%, #e9e0f4 100%) !important;
  color: #49366F !important;
  border-color: #c8b5df !important;
}
.format-toolbar button:hover,
.format-toolbar button:focus-visible,
.attachment-button:hover {
  background: #ded0ef !important;
  color: #382653 !important;
  border-color: #d8b65f !important;
}
.format-toolbar select:focus,
.text-color-select:focus {
  border-color: #d8b65f !important;
}

/* Globos de conversación: lavanda muy pálido y blanco cálido */
.message {
  background: #f4effa !important;
  color: #30263f !important;
  border: 1px solid #d9cbe9 !important;
  box-shadow: 0 2px 6px rgba(61, 43, 88, .07) !important;
}
.message.mine {
  background: #ebe3f5 !important;
  color: #30263f !important;
  border: 1px solid #cbb9e0 !important;
}
.message-name,
.online-name,
.private-message strong {
  color: #563b7d !important;
}
.message-time {
  color: #81758f !important;
}
.message-text {
  color: #30263f !important;
}
.messages {
  background: #fffdf8 !important;
}

/* Columna de participantes: superficies claras con texto amatista */
.online-users {
  background: #fbf9fd !important;
  border-color: #cbb9e0 !important;
}
.online-user {
  background: transparent !important;
  border-bottom-color: #e7deef !important;
}
.online-user[role="button"]:hover {
  background: #f0e9f7 !important;
}
.avatar {
  border-color: #d8b65f !important;
}

/* Caja de escritura, paneles y controles de personalización */
.composer textarea,
.private-composer textarea {
  background: #fffdf8 !important;
  color: #30263f !important;
  border-color: #cbb9e0 !important;
}
.composer textarea::placeholder {
  color: #81758f !important;
}
.customize-panel,
.private-chat-panel {
  background: #fbf9fd !important;
  color: #30263f !important;
  border-color: #d8b65f !important;
}
.customize-heading,
.private-chat-header,
.customize-controls label {
  color: #563b7d !important;
}
.customize-controls select {
  background: #f5f0fb !important;
  color: #49366F !important;
  border-color: #c8b5df !important;
}
.private-message {
  background: #f4effa !important;
  color: #30263f !important;
  border-color: #d9cbe9 !important;
}
.private-message.mine {
  background: #ebe3f5 !important;
  color: #30263f !important;
  border-color: #cbb9e0 !important;
}

/* Se mantienen verdes únicamente los indicadores de conexión y actividad. */


/* ===== ENCABEZADO UNIFICADO DE LA SALA · v28 ===== */
.room-title-line {
  display: flex !important;
  align-items: baseline !important;
  flex-wrap: wrap;
  gap: 9px;
}
.room-title-line > .eyebrow,
.room-title-line > h2 {
  margin: 0 !important;
  padding: 0 !important;
  font-family: Georgia, "Times New Roman", serif !important;
  font-size: 22px !important;
  font-weight: 700 !important;
  font-style: normal !important;
  line-height: 1.15 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  color: #fffdf8 !important;
}
.room-title-line > .eyebrow {
  white-space: nowrap;
}
.room-heading-wrap > .muted {
  margin-top: 5px !important;
}

@media (max-width: 680px) {
  .room-title-line > .eyebrow,
  .room-title-line > h2 {
    font-size: 19px !important;
  }
  .room-title-line {
    gap: 7px;
  }
}


/* Adjuntos: selección previa, confirmación y cancelación */
.attachment-selection {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  flex: 1 1 100%;
  min-width: 0;
  padding: 7px 9px;
  border: 1px solid #cbb9e0;
  border-radius: 9px;
  background: rgba(251, 249, 253, .96);
}
.attachment-selection.hidden { display: none !important; }
.attachment-file-name {
  flex: 1 1 180px;
  min-width: 0;
  color: #49366f;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.attachment-action {
  border: 1px solid #c8b5df;
  border-radius: 7px;
  padding: 6px 10px;
  font: 600 12px Inter, Arial, sans-serif;
  cursor: pointer;
}
.attachment-cancel {
  background: #fffdf8;
  color: #60458a;
}
.attachment-send {
  background: linear-gradient(135deg, #60458a, #49366f);
  border-color: #d8b65f;
  color: #fffdf8;
}
.attachment-action:disabled {
  opacity: .55;
  cursor: wait;
}
@media (max-width: 680px) {
  .attachment-selection { width: 100%; }
  .attachment-file-name { flex-basis: 100%; }
}


/* v30: el selector nativo permanece oculto; se abre exclusivamente desde los iconos. */
#publicAttachment[hidden] { display: none !important; }
.attachment-tools { align-items: center; }
.attachment-status { flex-basis: 100%; min-height: 0; }


/* v31 — acceso de visitantes */
.visitor-entry { margin-top: 18px; padding-top: 15px; border-top: 1px solid rgba(120,94,153,.20); display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; color:#66577d; font-size:13px; }
.visitor-button { border-color:#c9ad68; color:#60458a; font-weight:700; }
.visitor-button:disabled { opacity:.65; cursor:wait; }
.guest-notice { margin:0 0 12px; padding:11px 14px; border:1px solid #d8c28a; border-radius:10px; background:#fffaf0; color:#594477; font-size:13px; line-height:1.5; }
.guest-mode .composer { display:none !important; }
.guest-mode .online-user { cursor:default !important; }
.guest-mode .online-user:hover { transform:none; }
@media (max-width:560px) { .visitor-entry { align-items:stretch; flex-direction:column; } .visitor-button { width:100%; } }


/* v32 — vistas previas de YouTube, Facebook, Instagram y TikTok */
.social-embed {
  width: min(100%, 560px);
  margin: 12px 0 4px;
  padding: 10px;
  border: 1px solid #d8c28a;
  border-radius: 12px;
  background: #f8f4fc;
  color: #49366f;
  box-sizing: border-box;
}
.social-embed-label { margin: 0 0 8px; font-size: 12px; font-weight: 700; color: #60458a; }
.social-embed iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 190px;
  border: 0;
  border-radius: 8px;
  background: #171326;
}
.social-embed-vertical { width: min(100%, 360px); }
.social-embed-vertical iframe { aspect-ratio: 9 / 16; min-height: 420px; max-height: 620px; }
.social-embed a { display: inline-block; margin-top: 8px; color: #60458a; font-size: 12px; font-weight: 700; text-decoration: underline; }
.social-embed-fallback { margin: 8px 0; font-size: 13px; line-height: 1.45; }
/* Contraste accesible de los controles de la ventana privada */
.private-chat-header .outline {
  background: #60458a !important;
  color: #fffdf8 !important;
  border: 1px solid #d8b65f !important;
  font-weight: 700 !important;
  opacity: 1 !important;
}
.private-chat-header .outline:hover,
.private-chat-header .outline:focus-visible {
  background: #49366f !important;
  color: #ffffff !important;
  outline: 2px solid #e4c66e;
  outline-offset: 2px;
}
@media (max-width: 560px) {
  .social-embed-vertical iframe { min-height: 360px; }
}


/* v33 — banderas y panel de administración */
.online-country-flag{font-family:"Segoe UI Emoji","Apple Color Emoji","Noto Color Emoji",sans-serif;font-size:17px;line-height:1;flex:0 0 auto;min-width:20px;text-align:center}
.online-manage{margin-left:auto;border:1px solid #d8c28a;border-radius:7px;padding:4px 7px;background:#fffaf0;color:#60458a;font-size:10px;font-weight:700;cursor:pointer}
.online-manage:hover{background:#f2e8ca}
.message-moderate{margin-left:auto;border:1px solid #d8c28a;border-radius:6px;background:#fffaf0;color:#60458a;padding:3px 7px;font-size:10px;cursor:pointer}
.admin-panel{position:fixed;inset:0;z-index:1000;background:rgba(24,28,36,.58);display:flex;align-items:center;justify-content:center;padding:18px;overflow:auto}
.admin-panel.hidden{display:none!important}
.admin-panel-card{width:min(1050px,100%);max-height:92vh;overflow:auto;background:#fffdf8;border:1px solid #d8c28a;border-radius:16px;padding:22px;box-shadow:0 18px 60px rgba(0,0,0,.24);color:#49366f}
.admin-panel-head{display:flex;align-items:center;justify-content:space-between;gap:16px;border-bottom:1px solid #eadfca;padding-bottom:12px}
.admin-panel-head h2{margin:2px 0 0;font-size:24px}.admin-toolbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:14px 0}.admin-columns{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(250px,1fr);gap:18px}.admin-columns h3{font-size:16px;margin:8px 0 12px}.admin-users,.admin-logs{display:grid;gap:10px;max-height:52vh;overflow:auto;padding-right:4px}.admin-user-card,.admin-log-row{border:1px solid #e5dccb;border-radius:10px;padding:11px;background:#fff}.admin-user-card>strong,.admin-user-card>span{display:block}.admin-user-card>span,.admin-log-row time{font-size:12px;color:#75678a;margin-top:3px}.admin-reason{width:100%;box-sizing:border-box;margin:9px 0;padding:8px;border:1px solid #d8cde5;border-radius:7px;font:inherit}.admin-actions{display:flex;gap:6px;flex-wrap:wrap}.admin-actions button{font-size:11px;padding:6px 8px}.admin-log-row p{margin:5px 0 0;font-size:12px;overflow-wrap:anywhere}.admin-footnote{font-size:12px;color:#75678a;margin:16px 0 0}.admin-panel .notice{margin:0;font-size:12px}
@media(max-width:700px){.admin-panel{padding:8px}.admin-panel-card{padding:14px;max-height:96vh}.admin-columns{grid-template-columns:1fr}.admin-users,.admin-logs{max-height:38vh}.admin-panel-head h2{font-size:19px}}

.participants-note{margin:10px 0 0;font-size:10px;line-height:1.4;color:#81758e}

/* Adjuntos en conversaciones privadas */
.private-attachment-tools{display:flex;align-items:center;gap:9px;flex-wrap:wrap;margin:8px 0 10px}
.private-attachment-tools .attachment-button{font-weight:600}
.private-attachment-tools .attachment-action{margin-left:auto}


/* Avisos personales enviados desde el panel de moderación */
.warning-notices{display:grid;gap:8px;margin:0 0 12px}
.warning-notice{position:relative;display:grid;grid-template-columns:1fr auto;gap:4px 12px;align-items:start;padding:12px 14px;background:#fff7df;border:1px solid #d69d32;border-left:5px solid #c87922;border-radius:10px;color:#3b2a13;box-shadow:0 5px 18px #0002}
.warning-notice strong{font-size:13px;color:#7b3f12}
.warning-notice p{grid-column:1;margin:0;font-size:13px;line-height:1.45;overflow-wrap:anywhere}
.warning-notice small{grid-column:1;color:#745e42;font-size:10px}
.warning-notice .warning-dismiss{grid-column:2;grid-row:1/4;align-self:center;border:1px solid #bd8a48;background:#fff;color:#563b1c;border-radius:7px;padding:6px 9px;font-size:11px}
/* Contraste consistente de controles de conversación privada */
.private-chat-header .outline{background:#fff;color:#24314c;border-color:#d6b56d;font-weight:700}
.private-chat-header .outline:hover,.private-chat-header .outline:focus-visible{background:#f5e8c8;color:#17233a;outline:2px solid #d6b56d}


/* v36.4 — paleta tipográfica y selector de emojis ampliados */
.msg-font-humanist { font-family: Verdana, Geneva, sans-serif; }
.msg-font-book { font-family: Georgia, 'Times New Roman', serif; }
.msg-font-rounded { font-family: 'Trebuchet MS', Arial, sans-serif; }
.msg-font-mono { font-family: 'Courier New', monospace; }
.text-color-teal { color: #008c8c; }
.text-color-rose { color: #d64f79; }
.text-color-cyan { color: #168db5; }
.text-color-brown { color: #8b5a2b; }
.text-color-magenta { color: #c0268b; }
.text-color-navy { color: #263b70; }
.format-toolbar { position: relative; }
.emoji-toggle { font-weight: 700; letter-spacing: -.04em; }
.emoji-picker { position: absolute; z-index: 30; left: 0; bottom: calc(100% + 8px); display: grid; grid-template-columns: repeat(8, 36px); gap: 4px; max-width: min(330px, 90vw); max-height: 220px; overflow: auto; padding: 9px; border: 1px solid var(--gold); border-radius: 12px; background: #fffdf8; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.emoji-picker.hidden { display: none !important; }
.emoji-picker button { min-width: 34px; width: 34px; height: 34px; padding: 2px; border: 1px solid #eadfc8; border-radius: 7px; background: #fff; color: #342b45; font-size: 20px; }
.emoji-picker button:hover,.emoji-picker button:focus-visible { background: #f8edcf; outline: 1px solid var(--gold); }
.attachment-button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-width: 38px; min-height: 36px; }
.attachment-button svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.attachment-guidance { font-size: 11px; color: var(--gold2); opacity: .9; }
.pdf-attachment-button span { font-size: 11px; font-weight: 700; }
@media (max-width: 620px) { .emoji-picker { grid-template-columns: repeat(7, 34px); left: auto; right: 0; } .attachment-guidance { flex-basis: 100%; } }


/* v36.5 — barra de adjuntos compacta y participantes legibles */
.attachment-tools {
  display: flex !important;
  align-items: center;
  flex-wrap: nowrap !important;
  gap: 8px;
  width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 3px 1px 7px;
  scrollbar-width: thin;
}
.attachment-buttons {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  flex-wrap: nowrap;
  gap: 7px;
}
.attachment-tools .attachment-button {
  display: inline-flex;
  flex: 0 0 42px;
  width: 42px;
  height: 38px;
  align-items: center;
  justify-content: center;
  padding: 6px;
  white-space: nowrap;
}
.attachment-tools .attachment-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.attachment-tools .pdf-attachment-button {
  flex-basis: 66px;
  width: 66px;
  gap: 5px;
}
.attachment-tools .attachment-guidance {
  flex: 0 0 auto;
  white-space: nowrap;
  font-size: 10px;
}
.attachment-tools .attachment-status {
  flex: 0 0 auto;
  white-space: nowrap;
}
.online-user {
  min-width: 0;
  gap: 8px;
}
.online-user .avatar {
  flex: 0 0 37px;
}
.online-country-flag {
  font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif;
  flex: 0 0 20px;
  width: 20px;
  text-align: center;
  font-size: 17px;
  line-height: 1;
}
.online-user .online-name {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  overflow-wrap: normal;
}
.online-user .online-dot {
  flex: 0 0 9px;
  margin-left: 2px;
}
.online-user .online-manage {
  flex: 0 0 auto;
  margin-left: 2px;
  white-space: nowrap;
}
@media (max-width: 680px) {
  .attachment-tools { max-width: 100%; }
  .attachment-tools .attachment-guidance { display: none; }
  .online-user { gap: 7px; padding: 10px 8px; }
  .online-user .online-manage { font-size: 9px; padding: 3px 5px; }
}


/* Insignias públicas de rango: el contenido procede del backend Firebase. */
.online-role-badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 21px;
  height: 21px;
  margin-left: 2px;
  border-radius: 50%;
  font-size: 14px;
  line-height: 1;
  background: #fff8df;
  border: 1px solid #d9b65c;
  box-shadow: 0 1px 3px rgba(38, 25, 55, .12);
}
.online-role-admin { background: #fff4c7; border-color: #d5a72c; }
.online-role-moderator { background: #eef4ff; border-color: #9eafd2; }


/* v36.8 — controles de formato y adjuntos en una única línea visual */
.composer .format-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
  margin: 0;
}
.composer .format-toolbar > .attachment-tools {
  display: inline-flex !important;
  flex: 0 1 auto;
  align-items: center;
  flex-wrap: nowrap !important;
  gap: 5px;
  width: auto;
  min-width: 0;
  max-width: 100%;
  margin: 0 0 0 2px;
  padding: 0;
  overflow: visible;
}
.composer .attachment-buttons { gap: 5px; }
.composer .attachment-tools .attachment-button {
  flex: 0 0 36px;
  width: 36px;
  min-width: 36px;
  height: 30px;
  min-height: 30px;
  padding: 4px;
}
.composer .attachment-tools .pdf-attachment-button {
  flex-basis: 54px;
  width: 54px;
  min-width: 54px;
}
.composer .attachment-tools .attachment-guidance {
  display: none;
}
.composer .attachment-tools .attachment-status {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.composer textarea { grid-row: 2; }
.composer .composer-bottom .send-button { grid-row: 2; }
@media (max-width: 680px) {
  .composer .format-toolbar { column-gap: 4px; row-gap: 5px; }
  .composer .format-toolbar > .attachment-tools { flex: 0 1 auto; }
}

/* Cuota diaria de adjuntos: administración */
.admin-quota{border:1px solid #e5dccb;border-radius:12px;background:#fff;padding:14px;margin:0 0 18px}.admin-quota h3{font-size:16px;margin:0 0 8px}.admin-quota p{font-size:13px;margin:6px 0}.admin-quota .admin-actions{align-items:center;margin-top:10px}.admin-quota label{font-size:13px;font-weight:600}.admin-quota input{width:110px;padding:8px;border:1px solid #d8cde5;border-radius:7px;font:inherit}

.customize-save-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:12px}.customize-save-row .notice{font-size:12px}

.featured-topic{margin:10px 0 14px;padding:14px 16px;border:1px solid #d8bd79;border-left:4px solid #bd8c36;border-radius:10px;background:linear-gradient(135deg,#fffdf5,#f8f1df);color:#45375e}.featured-topic.hidden{display:none}.featured-topic .eyebrow{margin:0 0 4px;color:#94702c;font-size:11px;text-transform:uppercase;letter-spacing:.12em}.featured-topic h3{margin:0 0 6px;font-size:18px}.featured-topic p:not(.eyebrow){margin:0 0 8px;white-space:pre-wrap;overflow-wrap:anywhere}.featured-topic small{color:#7c7186;font-size:11px}.admin-topic{display:grid;gap:7px}.admin-topic input,.admin-topic textarea{width:100%;box-sizing:border-box;padding:9px;border:1px solid #d8cde5;border-radius:7px;font:inherit}.admin-topic label{font-size:12px;font-weight:600}

.seo-intro{max-width:900px;margin:0 auto 16px;padding:0 12px;text-align:center;color:#f5f0e7}.seo-intro h1{margin:10px 0 8px;font-size:clamp(22px,3vw,30px);color:#f1d89b}.seo-intro p{max-width:820px;margin:6px auto;font-size:14px;line-height:1.55;color:rgba(255,255,255,.88)}


/* v1.1 — cabecera compacta: banner seguido inmediatamente por la sala */
header.brand {
  margin: 0 auto 6px !important;
  padding: 0 !important;
  line-height: 0 !important;
}
header.brand > img.brand-banner {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  margin: 0 !important;
}


/* v1.2 — identidad zafiro para toda la estructura de conversación.
   El área de lectura permanece blanca; los controles conservan amatista. */
#roomPanel.room-frame {
  background: linear-gradient(145deg, #082d78 0%, #061f5c 55%, #08194a 100%) !important;
  border-color: var(--gold) !important;
}
#roomPanel .room-main,
#roomPanel .participants {
  background: linear-gradient(145deg, #0b347f 0%, #082866 58%, #071e55 100%) !important;
  color: #f7f3ff;
}
#roomPanel .room-top,
#roomPanel .presence-summary,
#roomPanel .participants-count {
  background: transparent !important;
}
#roomPanel .presence-summary,
#roomPanel .participants-count {
  background: rgba(3, 20, 66, .42) !important;
  border-color: var(--gold) !important;
  color: #fff !important;
}
#roomPanel .messages,
#roomPanel .online-users {
  background: #fffdf9 !important;
  color: #26314a !important;
  border: 1.5px solid var(--gold) !important;
}
#roomPanel .messages .empty,
#roomPanel .online-users .empty-users {
  color: #687184 !important;
}
#roomPanel .composer textarea {
  background: #fffdf9 !important;
  color: #26314a !important;
  border: 1.5px solid var(--gold) !important;
}
#roomPanel .room-top .muted,
#roomPanel .participants-note {
  color: rgba(255,255,255,.78) !important;
}
/* Amatista reservado para botones y controles interactivos. */
#roomPanel .top-actions .outline,
#roomPanel .send-button,
#roomPanel .format-toolbar button,
#roomPanel .format-toolbar select,
#roomPanel .composer .attachment-button,
#roomPanel .customize-panel {
  background: linear-gradient(145deg, #68428f, #492c70) !important;
  color: #fff !important;
  border: 1px solid var(--gold) !important;
}
#roomPanel .format-toolbar button:hover,
#roomPanel .top-actions .outline:hover,
#roomPanel .send-button:hover {
  background: linear-gradient(145deg, #8056a8, #59347f) !important;
}
#roomPanel .format-toolbar select option {
  background: #fff;
  color: #26314a;
}
#roomPanel .participants {
  border-left-color: var(--gold) !important;
}
@media (max-width: 680px) {
  #roomPanel .participants {
    border-top-color: var(--gold) !important;
  }
}

/* Nuevas opciones de apariencia v1.3 */
body[data-palette="ocean"]{--gold:#70a9c8;--gold2:#a9d4e9;--green:#5bb8a8}
body[data-palette="ocean"] .messages,body[data-palette="ocean"] .composer textarea,body[data-palette="ocean"] .online-users{background:#eaf4f8;color:#294454;border-color:#78aec8}
body[data-palette="ocean"] .message{background:#d9eaf1;border-color:#78aec8}body[data-palette="ocean"] .message.mine{background:#cfe3ed;border-color:#6b9eb7}
body[data-palette="lavender"]{--gold:#a58bc8;--gold2:#d0b9ed;--green:#72bca0}
body[data-palette="lavender"] .messages,body[data-palette="lavender"] .composer textarea,body[data-palette="lavender"] .online-users{background:#f2eef8;color:#493d59;border-color:#ad96ce}
body[data-palette="lavender"] .message{background:#e8e0f2;border-color:#ad96ce}body[data-palette="lavender"] .message.mine{background:#ded3ed;border-color:#9e84c3}
body[data-palette="forest"]{--gold:#7eaa83;--gold2:#b6d8b8;--green:#60bd8c}
body[data-palette="forest"] .messages,body[data-palette="forest"] .composer textarea,body[data-palette="forest"] .online-users{background:#edf4ed;color:#344b39;border-color:#88b18d}
body[data-palette="forest"] .message{background:#dceadd;border-color:#88b18d}body[data-palette="forest"] .message.mine{background:#d1e4d4;border-color:#78a27e}
body[data-palette="slate"]{--gold:#91a6bd;--gold2:#c4d2e1;--green:#69bba7}
body[data-palette="slate"] .messages,body[data-palette="slate"] .composer textarea,body[data-palette="slate"] .online-users{background:#edf1f5;color:#394655;border-color:#9cabbc}
body[data-palette="slate"] .message{background:#dfe6ed;border-color:#9cabbc}body[data-palette="slate"] .message.mine{background:#d4dee8;border-color:#8b9caf}
body[data-font="humanist"]{font-family:Verdana,Geneva,sans-serif}body[data-font="book"]{font-family:Georgia,'Times New Roman',serif}body[data-font="rounded"]{font-family:'Trebuchet MS',Arial,sans-serif}body[data-font="mono"]{font-family:'Courier New',monospace}
body[data-size="small"] .message-text{font-size:12px}body[data-size="medium"] .message-text{font-size:14px}body[data-size="large"] .message-text{font-size:17px}body[data-size="xlarge"] .message-text{font-size:19px}body[data-size="xxlarge"] .message-text{font-size:22px}

.text-color-indigo{color:#4b4ca8}.text-color-lime{color:#65a30d}.text-color-mint{color:#2a9d8f}.text-color-coral{color:#f06c5b}.text-color-salmon{color:#e97979}.text-color-plum{color:#7e3f78}.text-color-silver{color:#9aa4b2}

/* v1.4 — paleta vibrante turquesa, naranja, coral y amarillo */
body[data-palette="vibrant"]{
  --gold:#ff8a00;--gold2:#ffd400;--green:#16c85a;--line:#ff806b;
  --bg:#e7fffb;--text:#173b3b;--muted:#426b69;
  background:radial-gradient(ellipse at 50% 0%,#fff5c7 0%,#c9fff6 42%,#7be7dc 100%);
  color:#173b3b;
}
body[data-palette="vibrant"] .brand h1{color:#fff5d8;text-shadow:0 2px 5px #005d58}
body[data-palette="vibrant"] .subtitle{color:#eafffb}
body[data-palette="vibrant"] .room-frame{background:linear-gradient(145deg,#11b8ad,#008f89);border-color:#ffd400;box-shadow:0 0 0 3px #ff8a00,0 18px 48px #006b6540}
body[data-palette="vibrant"] .room-main{background:linear-gradient(145deg,#10b8ad,#008e88)}
body[data-palette="vibrant"] .room-top h2,body[data-palette="vibrant"] .participants h3{color:#fff}
body[data-palette="vibrant"] .room-top .muted{color:#eafffb}
body[data-palette="vibrant"] .participants{background:linear-gradient(160deg,#009c95,#007b78);border-left-color:#ffd400}
body[data-palette="vibrant"] .presence-summary,body[data-palette="vibrant"] .participants-count{background:#007f79;border:2px solid #ffd400;color:#fff}
body[data-palette="vibrant"] .messages,body[data-palette="vibrant"] .online-users{background:#fff;color:#203b3a;border:2px solid #ff8a00}
body[data-palette="vibrant"] .message{background:#fff2dc;color:#263b3a;border:1px solid #ffb15b}
body[data-palette="vibrant"] .message.mine{background:#ffe5e2;color:#3d2928;border-color:#ff806b}
body[data-palette="vibrant"] .message-name{color:#007f79}
body[data-palette="vibrant"] .message-time{color:#687b79}
body[data-palette="vibrant"] .online-user{border-bottom-color:#f4d7c5}
body[data-palette="vibrant"] .online-name{color:#234341}
body[data-palette="vibrant"] .avatar{background:linear-gradient(145deg,#ffe46b,#ff9e00);color:#513000}
body[data-palette="vibrant"] .primary,body[data-palette="vibrant"] .send-button{background:linear-gradient(110deg,#ff7900,#ff4e16);border:1px solid #ffd400;color:#fff}
body[data-palette="vibrant"] .outline{background:#ff6b32;border-color:#ffd400;color:#fff}
body[data-palette="vibrant"] .customize-panel{background:linear-gradient(120deg,#ff806b,#ff665b);border:2px solid #ffd1b8;color:#fff}
body[data-palette="vibrant"] .customize-heading,body[data-palette="vibrant"] .customize-controls label,body[data-palette="vibrant"] .customize-note{color:#fff}
body[data-palette="vibrant"] .customize-controls select{background:#fff;color:#234341;border-color:#ff8a00}
body[data-palette="vibrant"] .composer textarea,body[data-palette="vibrant"] .private-composer textarea{background:#fff;color:#263b3a;border-color:#ff806b}
body[data-palette="vibrant"] .featured-topic{display:flex;align-items:center;gap:10px;margin:8px 0 12px;padding:9px 14px;border:2px solid #ff8a00;border-left:7px solid #ffd400;border-radius:14px;background:linear-gradient(90deg,#fff2a6,#fffdf0);color:#263b3a;min-height:0}
body[data-palette="vibrant"] .featured-topic .eyebrow{display:none}
body[data-palette="vibrant"] .featured-topic h3{font-size:14px;line-height:1.25;margin:0;flex:0 0 auto;color:#b64a16}
body[data-palette="vibrant"] .featured-topic p:not(.eyebrow){font-size:14px;line-height:1.35;margin:0;white-space:normal}
body[data-palette="vibrant"] .featured-topic small{display:none}
body[data-palette="vibrant"] .featured-topic:has(h3:empty){display:none}
body[data-palette="vibrant"] footer{color:#eafffb}
body[data-palette="vibrant"] .format-toolbar button,body[data-palette="vibrant"] .format-toolbar select{background:#fff;color:#234341;border-color:#ff9b6d}
body[data-palette="vibrant"] .attachment-button{background:#ff8a00;color:#fff;border-color:#ffd400}

/* Fuentes adicionales de sistema: se usa fallback si el dispositivo no las tiene. */
body[data-font="arial"],.msg-font-arial{font-family:Arial,Helvetica,sans-serif}
body[data-font="comic"],.msg-font-comic{font-family:"Comic Sans MS","Comic Sans",cursive}
body[data-font="berlin"],.msg-font-berlin{font-family:"Berlin Sans FB","Arial Rounded MT Bold",sans-serif}
body[data-font="tahoma"],.msg-font-tahoma{font-family:Tahoma,Geneva,sans-serif}
body[data-font="century"],.msg-font-century{font-family:"Century Gothic",CenturyGothic,AppleGothic,sans-serif}
body[data-font="palatino"],.msg-font-palatino{font-family:"Palatino Linotype",Palatino,"Book Antiqua",serif}
body[data-font="garamond"],.msg-font-garamond{font-family:Garamond,"Times New Roman",serif}
body[data-font="impact"],.msg-font-impact{font-family:Impact,Haettenschweiler,"Arial Narrow Bold",sans-serif}

/* El tópico público es deliberadamente compacto. Los metadatos quedan para moderación. */
.featured-topic{padding:9px 13px;margin:7px 0 10px;border-radius:11px}
.featured-topic .eyebrow{display:none}
.featured-topic h3{font-size:15px;margin:0 0 2px}
.featured-topic p:not(.eyebrow){font-size:14px;line-height:1.35;margin:0}
body[data-role="user"] .featured-topic small,body[data-role="guest"] .featured-topic small{display:none}
body[data-role="admin"] .featured-topic small,body[data-role="moderator"] .featured-topic small{display:block;margin-top:4px}
.topic-word-count{font-size:11px;color:#687b79}
.topic-word-count.over-limit{color:#c62828;font-weight:700}


/* v1.4.1 — tópico unificado y compacto; paleta vibrante como opción predeterminada. */
body[data-palette="vibrant"] .featured-topic{display:flex;align-items:center;gap:8px;margin:7px 0 9px;padding:8px 12px;min-height:0;border:2px solid #ff8a00;border-left:6px solid #ffd400;border-radius:12px;background:linear-gradient(90deg,#fff0a0 0%,#fff8d8 55%,#fffdf0 100%);color:#263b3a;box-shadow:0 2px 8px #ff8a0020}
body[data-palette="vibrant"] .featured-topic .eyebrow{display:none}
body[data-palette="vibrant"] .featured-topic h3{display:block;flex:1 1 auto;min-width:0;margin:0;color:#984018;font-size:14px;line-height:1.3;font-weight:700;overflow-wrap:anywhere}
body[data-palette="vibrant"] .featured-topic p:not(.eyebrow){display:none}
body[data-palette="vibrant"] .featured-topic small{display:none;color:#765b37;font-size:10px;white-space:nowrap}
body[data-role="admin"] .featured-topic small,body[data-role="moderator"] .featured-topic small{display:block}
body[data-palette="vibrant"] .featured-topic:has(h3:empty){display:none}
@media(max-width:680px){body[data-palette="vibrant"] .featured-topic{align-items:flex-start;padding:8px 10px}body[data-palette="vibrant"] .featured-topic h3{font-size:13px;line-height:1.3}body[data-palette="vibrant"] .featured-topic small{white-space:normal}}


/* v1.4.2 — aplicación integral y prioritaria de la paleta turquesa/naranja/coral */
body[data-palette="vibrant"] {
  --gold:#ff8a00 !important;
  --gold2:#ffd400 !important;
  --green:#16c85a !important;
  --line:#ff806b !important;
  --text:#173b3b !important;
  --muted:#426b69 !important;
  background:radial-gradient(ellipse at 50% 0%,#fff5c7 0%,#c9fff6 42%,#7be7dc 100%) !important;
  color:#173b3b !important;
}
body[data-palette="vibrant"] #roomPanel.room-frame {
  background:linear-gradient(145deg,#11b8ad 0%,#009c95 55%,#007b78 100%) !important;
  border:2px solid #ffd400 !important;
  box-shadow:0 0 0 3px #ff8a00,0 18px 48px #006b6540 !important;
}
body[data-palette="vibrant"] #roomPanel .room-main {
  background:linear-gradient(145deg,#10b8ad,#008e88) !important;
}
body[data-palette="vibrant"] #roomPanel .participants {
  background:linear-gradient(160deg,#009c95,#007b78) !important;
  border-left:2px solid #ffd400 !important;
}
body[data-palette="vibrant"] #roomPanel .room-top h2,
body[data-palette="vibrant"] #roomPanel .participants h3,
body[data-palette="vibrant"] #roomPanel .room-top .muted,
body[data-palette="vibrant"] #roomPanel .participants .muted,
body[data-palette="vibrant"] #roomPanel .participants > small {color:#fff !important;}
body[data-palette="vibrant"] #roomPanel .presence-summary,
body[data-palette="vibrant"] #roomPanel .participants-count {
  background:#007f79 !important;border:2px solid #ffd400 !important;color:#fff !important;
}
body[data-palette="vibrant"] #roomPanel .messages,
body[data-palette="vibrant"] #roomPanel .online-users {
  background:#fff !important;color:#203b3a !important;border:2px solid #ff8a00 !important;
}
body[data-palette="vibrant"] #roomPanel .message {background:#fff2dc !important;color:#263b3a !important;border:1px solid #ffb15b !important;}
body[data-palette="vibrant"] #roomPanel .message.mine {background:#ffe5e2 !important;color:#3d2928 !important;border-color:#ff806b !important;}
body[data-palette="vibrant"] #roomPanel .message-name {color:#007f79 !important;}
body[data-palette="vibrant"] #roomPanel .message-time {color:#687b79 !important;}
body[data-palette="vibrant"] #roomPanel .online-name {color:#234341 !important;}
body[data-palette="vibrant"] #roomPanel .online-user {border-bottom-color:#f4d7c5 !important;}
body[data-palette="vibrant"] #roomPanel .avatar {background:linear-gradient(145deg,#ffe46b,#ff9e00) !important;color:#513000 !important;}
body[data-palette="vibrant"] .primary,
body[data-palette="vibrant"] #roomPanel .send-button,
body[data-palette="vibrant"] #roomPanel .attachment-button,
body[data-palette="vibrant"] #roomPanel .attachment-action {
  background:linear-gradient(110deg,#ff7900,#ff4e16) !important;border:1px solid #ffd400 !important;color:#fff !important;
}
body[data-palette="vibrant"] #roomPanel .outline,
body[data-palette="vibrant"] #roomPanel .top-actions .outline {
  background:#ff6b32 !important;border:1px solid #ffd400 !important;color:#fff !important;
}
body[data-palette="vibrant"] #roomPanel .customize-panel {
  background:linear-gradient(120deg,#ff806b,#ff665b) !important;border:2px solid #ffd1b8 !important;color:#fff !important;
}
body[data-palette="vibrant"] #roomPanel .customize-heading,
body[data-palette="vibrant"] #roomPanel .customize-controls label,
body[data-palette="vibrant"] #roomPanel .customize-note {color:#fff !important;}
body[data-palette="vibrant"] #roomPanel .customize-controls select,
body[data-palette="vibrant"] #roomPanel .format-toolbar select {
  background:#fff !important;color:#234341 !important;border-color:#ff8a00 !important;
}
body[data-palette="vibrant"] #roomPanel .composer textarea {
  background:#fff !important;color:#263b3a !important;border:2px solid #ff806b !important;
}
body[data-palette="vibrant"] #roomPanel .format-toolbar button {
  background:#fff !important;color:#234341 !important;border:1px solid #ff9b6d !important;
}
body[data-palette="vibrant"] #roomPanel .featured-topic {
  display:flex !important;align-items:center !important;gap:8px !important;
  margin:7px 0 9px !important;padding:8px 12px !important;min-height:0 !important;
  border:2px solid #ff8a00 !important;border-left:6px solid #ffd400 !important;
  border-radius:12px !important;background:linear-gradient(90deg,#fff0a0 0%,#fff8d8 55%,#fffdf0 100%) !important;
  color:#263b3a !important;box-shadow:0 2px 8px #ff8a0020 !important;
}
body[data-palette="vibrant"] #roomPanel .featured-topic .eyebrow,
body[data-palette="vibrant"] #roomPanel .featured-topic p:not(.eyebrow),
body[data-palette="vibrant"] #roomPanel .featured-topic small {display:none !important;}
body[data-palette="vibrant"] #roomPanel .featured-topic h3 {
  display:block !important;flex:1 1 auto !important;min-width:0 !important;margin:0 !important;
  color:#984018 !important;font-size:14px !important;line-height:1.3 !important;font-weight:700 !important;
  overflow-wrap:anywhere !important;
}
body[data-palette="vibrant"] footer {color:#eafffb !important;}
body[data-palette="vibrant"] #authPanel.panel {
  background:linear-gradient(145deg,#0b9993,#087b78) !important;
  border:2px solid #ffd400 !important;color:#fff !important;
}
body[data-palette="vibrant"] #authPanel label,
body[data-palette="vibrant"] #authPanel .tab,
body[data-palette="vibrant"] #authPanel .visitor-entry {color:#fff !important;}
body[data-palette="vibrant"] #authPanel input {
  background:#fff !important;color:#234341 !important;border:1px solid #ff806b !important;
}
body[data-palette="vibrant"] #authPanel .tab.active {color:#fff !important;border-bottom-color:#ffd400 !important;}
body[data-palette="vibrant"] #authPanel .primary {background:linear-gradient(110deg,#ff7900,#ff4e16) !important;color:#fff !important;border-color:#ffd400 !important;}
body[data-palette="vibrant"] #authPanel .outline {background:#ff6b32 !important;color:#fff !important;border-color:#ffd400 !important;}
body[data-palette="vibrant"] #authPanel .notice {color:#fff7cf !important;}
body[data-palette="vibrant"] #roomPanel .private-chat-panel {background:#087b78 !important;border-color:#ffd400 !important;}
@media(max-width:680px){body[data-palette="vibrant"] #roomPanel .participants{border-top:2px solid #ffd400 !important;border-left:0 !important;}}


/* v1.4.3 — overrides definitivos de la paleta vibrante en la sala autenticada.
   Se usan selectores con #roomPanel para superar las reglas zafiro heredadas. */
body[data-palette="vibrant"] {
  --gold:#ff8a00 !important;
  --gold2:#ffd400 !important;
  --green:#16c85a !important;
  --line:#ff806b !important;
  --text:#173b3b !important;
  --muted:#426b69 !important;
  background:radial-gradient(ellipse at 50% 0%,#fff2bd 0%,#b9fff4 38%,#58d8ce 100%) !important;
  color:#173b3b !important;
}
body[data-palette="vibrant"] #roomPanel.room-frame {
  background:linear-gradient(145deg,#11b8ad 0%,#009b94 58%,#007c78 100%) !important;
  border:2px solid #ffd400 !important;
  box-shadow:0 0 0 3px #ff8a00,0 18px 48px #006b6540 !important;
}
body[data-palette="vibrant"] #roomPanel .room-main,
body[data-palette="vibrant"] #roomPanel .participants {
  background:linear-gradient(145deg,#10b8ad 0%,#008f89 100%) !important;
  color:#fff !important;
}
body[data-palette="vibrant"] #roomPanel .participants {
  border-left:2px solid #ffd400 !important;
}
body[data-palette="vibrant"] #roomPanel .room-top h2,
body[data-palette="vibrant"] #roomPanel .participants h3,
body[data-palette="vibrant"] #roomPanel .room-top .muted,
body[data-palette="vibrant"] #roomPanel .participants-note {
  color:#fff !important;
}
body[data-palette="vibrant"] #roomPanel .presence-summary,
body[data-palette="vibrant"] #roomPanel .participants-count {
  background:#007f79 !important;
  border:2px solid #ffd400 !important;
  color:#fff !important;
}
body[data-palette="vibrant"] #roomPanel .messages,
body[data-palette="vibrant"] #roomPanel .online-users {
  background:#fff !important;
  color:#203b3a !important;
  border:2px solid #ff8a00 !important;
}
body[data-palette="vibrant"] #roomPanel .message {
  background:#fff2dc !important;
  color:#263b3a !important;
  border:1px solid #ffb15b !important;
}
body[data-palette="vibrant"] #roomPanel .message.mine {
  background:#ffe5e2 !important;
  color:#3d2928 !important;
  border-color:#ff806b !important;
}
body[data-palette="vibrant"] #roomPanel .message-name,
body[data-palette="vibrant"] #roomPanel .online-name {color:#007f79 !important;}
body[data-palette="vibrant"] #roomPanel .message-time {color:#687b79 !important;}
body[data-palette="vibrant"] #roomPanel .online-user {border-bottom-color:#f4d7c5 !important;}
body[data-palette="vibrant"] #roomPanel .avatar {
  background:linear-gradient(145deg,#ffe46b,#ff9e00) !important;
  color:#513000 !important;
}
body[data-palette="vibrant"] #roomPanel .top-actions .outline,
body[data-palette="vibrant"] #roomPanel .send-button,
body[data-palette="vibrant"] #roomPanel .attachment-button,
body[data-palette="vibrant"] #roomPanel .attachment-action,
body[data-palette="vibrant"] #roomPanel .primary {
  background:linear-gradient(110deg,#ff7900,#ff4e16) !important;
  border:1px solid #ffd400 !important;
  color:#fff !important;
}
body[data-palette="vibrant"] #roomPanel .format-toolbar button,
body[data-palette="vibrant"] #roomPanel .format-toolbar select {
  background:linear-gradient(145deg,#ff806b,#f35c50) !important;
  color:#fff !important;
  border:1px solid #ffd1b8 !important;
}
body[data-palette="vibrant"] #roomPanel .format-toolbar select option {background:#fff;color:#234341;}
body[data-palette="vibrant"] #roomPanel .customize-panel {
  background:linear-gradient(120deg,#ff806b,#ff665b) !important;
  border:2px solid #ffd1b8 !important;
  color:#fff !important;
}
body[data-palette="vibrant"] #roomPanel .customize-heading,
body[data-palette="vibrant"] #roomPanel .customize-heading strong,
body[data-palette="vibrant"] #roomPanel .customize-controls label,
body[data-palette="vibrant"] #roomPanel .customize-note {color:#fff !important;}
body[data-palette="vibrant"] #roomPanel .customize-controls select,
body[data-palette="vibrant"] #roomPanel .composer textarea {
  background:#fff !important;
  color:#234341 !important;
  border:2px solid #ff8a00 !important;
}
body[data-palette="vibrant"] #roomPanel .featured-topic {
  display:flex !important;
  align-items:center !important;
  gap:8px !important;
  margin:7px 0 9px !important;
  padding:8px 14px !important;
  min-height:0 !important;
  border:2px solid #ff8a00 !important;
  border-left:7px solid #ffd400 !important;
  border-radius:12px !important;
  background:linear-gradient(90deg,#fff0a0 0%,#fff8d8 55%,#fffdf0 100%) !important;
  color:#263b3a !important;
  box-shadow:0 2px 8px #ff8a0020 !important;
}
body[data-palette="vibrant"] #roomPanel .featured-topic .eyebrow,
body[data-palette="vibrant"] #roomPanel .featured-topic p,
body[data-palette="vibrant"] #roomPanel .featured-topic small,
body[data-palette="vibrant"] #roomPanel .featured-topic .topic-meta,
body[data-palette="vibrant"] #roomPanel .featured-topic .featured-topic-meta {display:none !important;}
body[data-palette="vibrant"] #roomPanel .featured-topic h3 {
  display:block !important;
  flex:1 1 auto !important;
  min-width:0 !important;
  margin:0 !important;
  color:#984018 !important;
  font-size:14px !important;
  line-height:1.3 !important;
  font-weight:700 !important;
  overflow-wrap:anywhere !important;
}
body[data-palette="vibrant"] #roomPanel footer,
body[data-palette="vibrant"] footer {color:#eafffb !important;}
body[data-palette="vibrant"] #authPanel.panel {
  background:linear-gradient(145deg,#0b9993,#087b78) !important;
  border:2px solid #ffd400 !important;
  color:#fff !important;
}
body[data-palette="vibrant"] #authPanel label,
body[data-palette="vibrant"] #authPanel .tab,
body[data-palette="vibrant"] #authPanel .visitor-entry {color:#fff !important;}
body[data-palette="vibrant"] #authPanel input {
  background:#fff !important;color:#234341 !important;border:1px solid #ff806b !important;
}
body[data-palette="vibrant"] #authPanel .primary {
  background:linear-gradient(110deg,#ff7900,#ff4e16) !important;
  color:#fff !important;border-color:#ffd400 !important;
}
body[data-palette="vibrant"] #authPanel .outline {
  background:#ff6b32 !important;color:#fff !important;border-color:#ffd400 !important;
}
#featuredTopicAdminMeta {font-size:12px;line-height:1.45;color:#6b6475;}
.featured-topic small,
.featured-topic .topic-meta,
.featured-topic .featured-topic-meta,
.featured-topic [data-topic-meta] {display:none !important;}
@media(max-width:680px){
  body[data-palette="vibrant"] #roomPanel .participants {border-top:2px solid #ffd400 !important;border-left:0 !important;}
  body[data-palette="vibrant"] #roomPanel .featured-topic {align-items:center !important;padding:8px 10px !important;}
  body[data-palette="vibrant"] #roomPanel .featured-topic h3 {font-size:13px !important;}
}

/* =========================================================
   EL MÍSTICO CHAT 1.4.4 — Ajuste estético aprobado
   Fondo exterior neutro y barra de herramientas verde oscuro.
   Sin cambios en la estructura ni en la lógica de la aplicación.
   ========================================================= */
body[data-palette="vibrant"] {
  background: #111b35 !important;
  color: #234341;
}
body[data-palette="vibrant"] #roomPanel .composer .format-toolbar {
  background: #006f68 !important;
  border: 1px solid #ffd400 !important;
  border-radius: 11px !important;
  padding: 6px 8px !important;
}
body[data-palette="vibrant"] #roomPanel .format-toolbar button,
body[data-palette="vibrant"] #roomPanel .format-toolbar select,
body[data-palette="vibrant"] #roomPanel .format-toolbar .text-color-select {
  background: #006f68 !important;
  color: #ffffff !important;
  border: 1px solid #e7c94b !important;
}
body[data-palette="vibrant"] #roomPanel .format-toolbar button:hover,
body[data-palette="vibrant"] #roomPanel .format-toolbar button:focus-visible,
body[data-palette="vibrant"] #roomPanel .format-toolbar select:focus-visible {
  background: #00877e !important;
  color: #ffffff !important;
  outline: 1px solid #ffe36b !important;
}
body[data-palette="vibrant"] #roomPanel .format-toolbar select option {
  background: #ffffff !important;
  color: #234341 !important;
}
@media (max-width: 680px) {
  body[data-palette="vibrant"] #roomPanel .composer .format-toolbar {
    padding: 6px !important;
  }
}

/* EL MÍSTICO CHAT 1.4.6 — Personalización de avatares */
.avatar-panel{position:fixed;inset:0;z-index:1200;display:grid;place-items:center;padding:18px;background:rgba(5,12,28,.78);backdrop-filter:blur(5px)}
.avatar-panel.hidden{display:none!important}
.avatar-panel-card{width:min(560px,100%);max-height:88vh;overflow:auto;padding:22px;border:2px solid #d8b45e;border-radius:18px;background:#fff;color:#263b3a;box-shadow:0 18px 60px #0008}
.avatar-panel-card>header{display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid #e8dfca;padding-bottom:12px}
.avatar-panel-card h3{margin:0;color:#176b65;font-size:27px}
.avatar-panel-card .eyebrow{margin:0 0 3px;color:#a16b24;font-size:11px;letter-spacing:.12em;text-transform:uppercase}
.avatar-tabs{display:flex;gap:7px;margin:17px 0;flex-wrap:wrap}
.avatar-tabs button,.avatar-choices button{border:1px solid #cdbb8a;border-radius:10px;background:#f8f5ec;color:#28433e;padding:9px 12px;cursor:pointer}
.avatar-tabs button.active{background:#087b73;color:#fff;border-color:#e0bd62}
.avatar-pane{min-height:110px;padding:12px 4px}
.avatar-pane label{display:block;margin-bottom:10px;font-weight:600}
.avatar-pane input{display:block;margin:8px 0 14px;max-width:100%}
.avatar-choices{display:grid;grid-template-columns:repeat(auto-fill,minmax(48px,1fr));gap:8px;margin-top:10px}
.avatar-choices button{font-size:25px;min-height:48px;padding:5px}
.avatar-choices button:hover,.avatar-tabs button:hover{filter:brightness(.96);outline:2px solid #e0bd62}
.avatar-panel-footer{display:flex;align-items:center;gap:12px;flex-wrap:wrap;border-top:1px solid #e8dfca;padding-top:14px}
.avatar-panel-footer .notice{font-size:12px}
.avatar{overflow:hidden}
.avatar img{display:block;width:100%;height:100%;object-fit:cover;border-radius:50%}
.avatar.avatar-small{width:25px;height:25px;flex:0 0 25px;font-size:13px}
.message-head .avatar,.private-message .avatar{vertical-align:middle}
.message-head .avatar{margin-right:1px}
.private-message{display:flex;align-items:flex-start;gap:7px;flex-wrap:wrap}
.private-message p{flex-basis:100%;margin-left:32px!important}
@media(max-width:520px){.avatar-panel-card{padding:16px}.avatar-panel-footer{align-items:flex-start}.avatar-tabs button{flex:1 1 auto;font-size:12px;padding:8px 7px}}


/* EL MÍSTICO CHAT 1.4.7 — Visor del acuerdo de convivencia */
.rules-panel{position:fixed;inset:0;z-index:1250;display:grid;place-items:center;padding:18px;background:rgba(5,12,28,.82);backdrop-filter:blur(5px)}
.rules-panel.hidden{display:none!important}
.rules-panel-card{display:flex;flex-direction:column;width:min(900px,100%);height:min(88vh,900px);min-height:420px;overflow:hidden;border:2px solid #d8b45e;border-radius:18px;background:#fffdf8;box-shadow:0 18px 60px #0009}
.rules-panel-card>header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 18px;background:#102c62;color:#fff;border-bottom:1px solid #d8b45e}
.rules-panel-card .eyebrow{margin:0 0 3px;color:#f0d28c;font-size:11px;letter-spacing:.1em;text-transform:uppercase}
.rules-panel-card h3{margin:0;color:#fff;font-size:21px}
.rules-panel-card iframe{display:block;flex:1;width:100%;min-height:0;border:0;background:#fff}
@media(max-width:600px){.rules-panel{padding:7px}.rules-panel-card{height:92vh;min-height:360px;border-radius:12px}.rules-panel-card>header{padding:10px 12px}.rules-panel-card h3{font-size:18px}.rules-panel-card>header .outline{padding:8px 10px;font-size:12px}}


/* Temas oficiales de El Místico: cinco paletas individuales */
/* Azul Serenidad (vibrant) conserva la identidad azul noche/violeta/dorado actual. */
body[data-palette="lavender"] {--gold:#b99ad8;--gold2:#e2c9f5;--green:#79c9a7;}
body[data-palette="lavender"] #roomPanel.room-frame,
body[data-palette="lavender"] .panel {background:linear-gradient(145deg,#302447,#211b35);border-color:#b99ad8;}
body[data-palette="lavender"] #roomPanel .room-main,
body[data-palette="lavender"] #roomPanel .participants {background:linear-gradient(145deg,#49365f,#302447);}
body[data-palette="lavender"] #roomPanel .messages,
body[data-palette="lavender"] #roomPanel .online-users,
body[data-palette="lavender"] #roomPanel .composer textarea {background:#fbf8ff;color:#493b56;border-color:#c9b3df;}
body[data-palette="lavender"] #roomPanel .message {background:#eee5f6;color:#493b56;border-color:#c9b3df;}
body[data-palette="lavender"] #roomPanel .message.mine {background:#e4d7f0;color:#493b56;border-color:#b99ad8;}
body[data-palette="lavender"] #roomPanel .message-text,
body[data-palette="lavender"] #roomPanel .online-name {color:#493b56;}
body[data-palette="lavender"] #roomPanel .top-actions .outline,
body[data-palette="lavender"] #roomPanel .send-button {background:#5b4475;color:#fff;border-color:#d6b9ef;}

body[data-palette="ocean"] {--gold:#55b9c9;--gold2:#a5e8ee;--green:#58d4a0;}
body[data-palette="ocean"] #roomPanel.room-frame,
body[data-palette="ocean"] .panel {background:linear-gradient(145deg,#082e4b,#061d38);border-color:#55b9c9;}
body[data-palette="ocean"] #roomPanel .room-main,
body[data-palette="ocean"] #roomPanel .participants {background:linear-gradient(145deg,#104b70,#082e4b);}
body[data-palette="ocean"] #roomPanel .messages,
body[data-palette="ocean"] #roomPanel .online-users,
body[data-palette="ocean"] #roomPanel .composer textarea {background:#f2fbfc;color:#244652;border-color:#83cbd4;}
body[data-palette="ocean"] #roomPanel .message {background:#dff2f4;color:#244652;border-color:#83cbd4;}
body[data-palette="ocean"] #roomPanel .message.mine {background:#cce9ed;color:#244652;border-color:#55b9c9;}
body[data-palette="ocean"] #roomPanel .message-text,
body[data-palette="ocean"] #roomPanel .online-name {color:#244652;}
body[data-palette="ocean"] #roomPanel .top-actions .outline,
body[data-palette="ocean"] #roomPanel .send-button {background:#12617b;color:#fff;border-color:#a5e8ee;}

/* Verde Naturaleza y Tierra y Armonía mantienen la estructura; solo cambia la paleta. */
body[data-palette="nature"] #roomPanel .room-main,
body[data-palette="nature"] #roomPanel .participants {background:linear-gradient(145deg,#405b43,#293f35);}
body[data-palette="nature"] #roomPanel .top-actions .outline,
body[data-palette="nature"] #roomPanel .send-button {background:#52734e;color:#fff;border-color:#b8d0a2;}
body[data-palette="warm"] #roomPanel .room-main,
body[data-palette="warm"] #roomPanel .participants {background:linear-gradient(145deg,#76543f,#50392f);}
body[data-palette="warm"] #roomPanel .top-actions .outline,
body[data-palette="warm"] #roomPanel .send-button {background:#875b43;color:#fff;border-color:#edb995;}

/* v1.2 — Azul Serenidad real: tema azul noche predeterminado */
body[data-palette="serenity"]{--gold:#e3b94f!important;--gold2:#f2d27a!important;--green:#57c987!important;--line:#5277ad!important;--text:#f4f1ea!important;--muted:#c2cce0!important;background:radial-gradient(ellipse at 50% 0%,#203b70 0%,#10264e 48%,#081833 100%)!important;color:#f4f1ea!important}
body[data-palette="serenity"] #roomPanel.room-frame{background:linear-gradient(145deg,#17396d 0%,#102b59 58%,#0a2048 100%)!important;border:2px solid #d9ad42!important;box-shadow:0 0 0 2px #263f70,0 18px 48px #020b1d88!important}
body[data-palette="serenity"] #roomPanel .room-main{background:linear-gradient(145deg,#17396d,#102b59)!important}
body[data-palette="serenity"] #roomPanel .participants{background:linear-gradient(160deg,#102b59,#0b2149)!important;border-left:1px solid #d9ad42!important}
body[data-palette="serenity"] #roomPanel .room-top h2,body[data-palette="serenity"] #roomPanel .participants h3{color:#fff7e8!important}
body[data-palette="serenity"] #roomPanel .room-top .muted,body[data-palette="serenity"] #roomPanel .participants .muted,body[data-palette="serenity"] #roomPanel .participants>small{color:#d2dced!important}
body[data-palette="serenity"] #roomPanel .presence-summary,body[data-palette="serenity"] #roomPanel .participants-count{background:#213e70!important;border:1px solid #c99f42!important;color:#fff!important}
body[data-palette="serenity"] #roomPanel .messages,body[data-palette="serenity"] #roomPanel .online-users{background:#fffdf9!important;color:#29364e!important;border:1.5px solid #d7b45d!important}
body[data-palette="serenity"] #roomPanel .message{background:#eee8f6!important;color:#453957!important;border:1px solid #c9b5df!important}
body[data-palette="serenity"] #roomPanel .message.mine{background:#e4edf9!important;color:#30425f!important;border-color:#a9c3e3!important}
body[data-palette="serenity"] #roomPanel .message-name{color:#514078!important}
body[data-palette="serenity"] #roomPanel .message-time{color:#777b8b!important}
body[data-palette="serenity"] #roomPanel .online-name{color:#35466b!important}
body[data-palette="serenity"] #roomPanel .online-user{border-bottom-color:#e3d9c7!important}
body[data-palette="serenity"] #roomPanel .avatar{background:linear-gradient(145deg,#f5d98f,#bd8c36)!important;color:#38280e!important}
body[data-palette="serenity"] .primary,body[data-palette="serenity"] #roomPanel .send-button,body[data-palette="serenity"] #roomPanel .attachment-button,body[data-palette="serenity"] #roomPanel .attachment-action{background:linear-gradient(110deg,#624783,#493466)!important;border:1px solid #e1b94f!important;color:#fff!important}
body[data-palette="serenity"] #roomPanel .outline,body[data-palette="serenity"] #roomPanel .top-actions .outline{background:#3e3262!important;border:1px solid #e1b94f!important;color:#fff!important}
body[data-palette="serenity"] #roomPanel .customize-panel{background:linear-gradient(130deg,#263f70,#1b315d)!important;border:1.5px solid #d9ad42!important;color:#fff!important}
body[data-palette="serenity"] #roomPanel .customize-heading,body[data-palette="serenity"] #roomPanel .customize-controls label,body[data-palette="serenity"] #roomPanel .customize-note{color:#f4e7c7!important}
body[data-palette="serenity"] #roomPanel .customize-controls select,body[data-palette="serenity"] #roomPanel .format-toolbar select{background:#fffdf9!important;color:#29364e!important;border-color:#d9ad42!important}
body[data-palette="serenity"] #roomPanel .composer textarea,body[data-palette="serenity"] #roomPanel .private-composer textarea{background:#fffdf9!important;color:#29364e!important;border:1.5px solid #d9ad42!important}
body[data-palette="serenity"] #roomPanel .format-toolbar button{background:#eee8f6!important;color:#43345e!important;border-color:#c9b5df!important}
body[data-palette="serenity"] footer{color:#c8d5e8!important}


/* Avisos privados integrados a la lista de participantes */
.private-inbox-button{display:inline-flex;align-items:center;justify-content:center;gap:8px;border-color:var(--gold);font-weight:800;white-space:nowrap}
.private-inbox-button #privateInboxCount{display:inline-flex;align-items:center;justify-content:center;min-width:22px;height:22px;padding:0 5px;border-radius:999px;background:var(--gold);color:#17264a;font-size:12px;font-weight:900}
.online-private-bell{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;margin-left:3px;padding:2px 6px;min-height:22px;border:1px solid rgba(224,184,93,.9);border-radius:999px;background:rgba(224,184,93,.18);color:#f5d58b;font-size:13px;font-weight:800;line-height:1;white-space:nowrap;box-shadow:0 0 8px rgba(224,184,93,.18)}
.private-message-toast{position:fixed;z-index:1200;top:18px;right:20px;max-width:min(420px,calc(100vw - 40px));padding:12px 18px;border:1px solid var(--gold);border-radius:14px;background:#182b52;color:#fff;font-weight:700;box-shadow:0 8px 28px #0006;cursor:pointer;text-align:left}
.private-message-toast:hover{filter:brightness(1.12)}
@media(max-width:850px){.private-inbox-button{max-width:100%;white-space:normal}.private-message-toast{top:10px;right:10px}}

/* v1.4: aviso privado agrupado y fugaz, sin bloquear la conversación */
.private-message-toast{
  max-width:min(390px,calc(100vw - 28px));
  padding:10px 15px;
  border-radius:12px;
  font-size:14px;
  line-height:1.35;
  opacity:0;
  transform:translateY(-6px);
  transition:opacity .18s ease, transform .18s ease;
  pointer-events:auto;
}
.private-message-toast.private-toast-visible{
  opacity:1;
  transform:translateY(0);
}
@media(max-width:600px){
  .private-message-toast{
    top:8px;
    right:8px;
    max-width:calc(100vw - 16px);
    font-size:13px;
  }
}
