/* Seguridad del chat. La lista de reglas usa el estandar de tablas de la consola
   (.tbl + acciones-fila.js); aqui solo quedan las notas y el editor de reglas. */
.cs-note{
  max-width:72ch;
  line-height:1.6
}

.cs-status{
  margin:12px 0 0;
  font-size:var(--x-fs-s);
  color:var(--x-texto-dim)
}
.cs-status:empty{display:none}
.cs-status[data-error]{color:var(--x-error)}

.cs-empty{
  padding:24px 0;
  color:var(--x-texto-dim);
  line-height:1.6
}

.cs-editor textarea{
  box-sizing:border-box;
  width:100%;
  resize:vertical;
  min-height:88px;
  padding:10px 12px;
  font:inherit;
  color:var(--x-texto);
  background:var(--x-superficie);
  border:1px solid var(--x-borde);
  border-radius:var(--x-radio-md)
}

.cs-preview{
  border-top:1px solid var(--x-borde);
  padding-top:16px
}

.cs-preview summary{
  cursor:pointer;
  min-height:44px;
  display:list-item
}

.cs-preview pre{
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  font:inherit;
  line-height:1.7;
  padding:12px;
  border:1px solid var(--x-borde);
  border-radius:var(--x-radio-md);
  max-height:240px;
  overflow:auto
}

.cs-editor{
  box-sizing:border-box;
  width:min(620px,calc(100% - 32px));
  max-height:calc(100dvh - 32px);
  margin:auto;
  padding:26px;
  border:1px solid var(--x-borde);
  border-radius:var(--x-radio-xl);
  background:var(--x-superficie);
  color:var(--x-texto);
  font:14px/1.6 var(--x-fuente);
  overflow:auto
}.cs-editor::backdrop{background:rgb(0 0 0 / 48%)}

.cs-editor-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  margin-bottom:24px
}

.cs-editor-head h2{
  margin:0;
  font-size:var(--x-fs-2xl);
  letter-spacing:-.02em
}

.cs-editor form{
  display:flex;
  flex-direction:column;
  gap:20px
}

.cs-field{
  display:flex;
  flex-direction:column;
  gap:8px
}.cs-preview[open] .cs-field{margin-top:16px}

.cs-field input,.cs-field select{
  box-sizing:border-box;
  width:100%;
  min-height:44px;
  padding:10px 12px;
  font:inherit
}

.cs-categories{
  min-width:0;
  padding:0;
  border:0;
  margin:0;
  display:flex;
  flex-direction:column;
  gap:12px
}

.cs-categories legend{
  padding:0;
  margin-bottom:12px;
  font-weight:600
}

.cs-categories label,.cs-enabled{
  display:flex;
  align-items:center;
  gap:10px;
  min-height:44px
}

.cs-categories input,.cs-enabled input,.cs-targets input{
  width:18px;
  height:18px;
  flex-shrink:0;
  margin:0;
  accent-color:var(--x-acento-boton)
}

.cs-editor-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:20px
}

.cs-targets{
  max-height:240px;
  overflow:auto;
  margin-top:12px;
  border-top:1px solid var(--x-borde);
  border-bottom:1px solid var(--x-borde);
  scrollbar-color:var(--x-borde-fuerte) var(--x-superficie)
}

.cs-targets label{
  display:flex;
  align-items:center;
  gap:12px;
  padding:12px 4px;
  cursor:pointer
}

.cs-targets span{
  min-width:0;
  overflow-wrap:anywhere
}

.cs-editor-error{
  color:var(--x-error);
  margin:0;
  line-height:1.6
}.cs-editor-error:empty{display:none}

.cs-editor-foot{
  display:flex;
  justify-content:flex-end;
  gap:12px;
  border-top:1px solid var(--x-borde);
  padding-top:20px
}

.cs-editor :focus-visible{
  outline:2px solid var(--x-acento);
  outline-offset:3px
}.cs-editor [hidden]{display:none!important}

@media(width <=600px){.cs-editor{padding:20px}.cs-editor-head h2{font-size:var(--x-fs-xl)}

.cs-editor-grid{
  grid-template-columns:1fr;
  gap:20px
}.cs-editor-foot button{flex:1}}
