.aqbm-quiz-editor-screen{
  position:fixed;
  inset:0;
  z-index:1000001;
}
.aqbm-quiz-editor-screen__bg{
  position:absolute;
  inset:0;
  background:rgba(23,25,29,.94);
}
.aqbm-quiz-editor-screen__content{
  position:absolute;
  inset:0;
  z-index:1;
  margin:0;
  padding:2px 6px;
  background:transparent;
  border-radius:0;
  box-shadow:none;
  box-sizing:border-box;
}
.aqbm-quiz-editor-layout{
  height:100%;
  display:grid;
  grid-template-rows:auto minmax(0,1fr) auto;
  gap:6px;
}
.aqbm-quiz-editor-layout__header,
.aqbm-quiz-editor-layout__body,
.aqbm-quiz-editor-layout__footer{
  background:#3b3f46;
  border:1px solid #4a4f58;
  border-radius:10px;
}
.aqbm-quiz-editor-layout__header{
  padding:8px 10px;
  display:flex;
  flex-direction:column;
  gap:6px;
}
.aqbm-quiz-editor-layout__header-main{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
}
.aqbm-quiz-editor-layout__title{
  color:#fff;
  font-size:18px;
  font-weight:700;
  white-space:nowrap;
}
.aqbm-quiz-editor-layout__header-row,
.aqbm-quiz-editor-layout__footer-actions,
.aqbm-quiz-editor-toolbar{
  display:flex;
  gap:.4rem;
  flex-wrap:wrap;
  align-items:center;
}
.aqbm-quiz-editor-subtabs{
  flex:1;
  justify-content:flex-start;
  min-width:0;
}
.aqbm-quiz-editor-layout__body,
.aqbm-editor-tab-panels,
.aqbm-editor-panel,
.aqbm-editor-fill-y{
  min-height:0;
}
.aqbm-quiz-editor-layout__body{
  padding:2px;
  overflow:hidden;
}
.aqbm-editor-tab-panels,
.aqbm-editor-panel{
  height:100%;
  display:flex;
  flex-direction:column;
}
.aqbm-editor-surface{
  flex:1;
  min-height:0;
  background:#4a4f58;
  border:1px solid #5a606b;
  border-radius:4px;
  padding:2px;
  box-sizing:border-box;
  overflow:hidden;
}
.aqbm-editor-fill-y{
  overflow:auto;
}
.aqbm-editor-grid-wrap{
  flex:1;
  min-height:0;
  overflow:auto;
  border:1px solid #5a606b;
  border-radius:4px;
  background:#b8bec8;
}
.aqbm-quiz-editor-layout__footer{
  padding:2px 6px;
  min-height:0;
}
.aqbm-quiz-editor-layout__footer-actions{
  justify-content:flex-end;
}
.aqbm-editor-section-note,
.aqbm-quiz-editor-layout .aqbm-small,
.aqbm-quiz-editor-layout .aqbm-muted{
  color:#e3e6eb;
}
.aqbm-quiz-editor-layout .aqbm-btn.-ghost{
  background:#5b616c;
  color:#fff;
  border-color:#767d89;
}
.aqbm-quiz-editor-layout .aqbm-btn.-primary{
  background:#1f5fbf;
  color:#fff;
  border-color:#1f5fbf;
}
.aqbm-editor-preview-area{
  flex:1;
  min-height:0;
  width:100%;
}
.aqbm-quiz-editor-table{
  table-layout:fixed;
  min-width:1100px;
}
.aqbm-quiz-category-table{
  min-width:1600px;
}
.aqbm-quiz-qform-table thead th,
.aqbm-quiz-qform-table tbody td,
.aqbm-quiz-category-table thead th,
.aqbm-quiz-category-table tbody td{
  vertical-align:top;
}
.aqbm-quiz-qform-table thead th:first-child,
.aqbm-quiz-qform-table tbody td:first-child,
.aqbm-quiz-qform-table thead th:nth-child(n+6):nth-child(-n+15),
.aqbm-quiz-qform-table tbody td:nth-child(n+6):nth-child(-n+15),
.aqbm-quiz-category-table thead th:first-child,
.aqbm-quiz-category-table tbody td:first-child,
.aqbm-quiz-category-table thead th:nth-child(n+2):nth-child(-n+7),
.aqbm-quiz-category-table tbody td:nth-child(n+2):nth-child(-n+7),
.aqbm-quiz-category-table thead th:nth-child(n+23):nth-child(-n+28),
.aqbm-quiz-category-table tbody td:nth-child(n+23):nth-child(-n+28){
  text-align:center;
}
#aqbm-quiz-editor-modal .aqbm-scroll-x::-webkit-scrollbar{
  height:12px;
  width:12px;
}
#aqbm-quiz-editor-modal .aqbm-scroll-x::-webkit-scrollbar-thumb{
  background:#888;
  border-radius:8px;
}
#aqbm-quiz-editor-modal .aqbm-scroll-x::-webkit-scrollbar-track{
  background:#222;
}
.aqbm-modal{
  position:fixed;
  inset:0;
}
.aqbm-code-block{
  width:100%;
  min-height:320px;
  background:#111;
  color:#e8f1ff;
  border:1px solid #333;
  border-radius:8px;
  padding:12px;
  box-sizing:border-box;
  font-family:Consolas, Monaco, monospace;
  font-size:13px;
  white-space:pre;
  overflow:auto;
}
.aqbm-scroll-x{ overflow:auto; }
.aqbm-builder-table{
  width:100%;
  border-collapse:collapse;
  background:#fff;
}
.aqbm-builder-table th,
.aqbm-builder-table td{
  border:1px solid #d7dbe2;
  padding:2px;
  box-sizing:border-box;
  word-break:break-word;
}
.aqbm-builder-table th{ background:#f6f7f9; }
.aqbm-builder-table td[contenteditable="true"]{ background:#fffef7; }

@media (max-width: 900px){
  .aqbm-quiz-editor-screen__content{ padding:6px; }
  .aqbm-quiz-editor-layout__header-main{ align-items:flex-start; flex-direction:column; gap:8px; }
  .aqbm-quiz-editor-layout__footer-actions{ justify-content:flex-start; }
}


.aqbm-problem-editor-wrap{
  display:flex;
  justify-content:center;
  align-items:flex-start;
}
.aqbm-problem-editor-card{
  width:min(100%, 800px);
  margin:0 auto;
  background:#c8ccd2;
  border:1px solid #666c77;
  border-radius:6px;
  overflow:hidden;
}
.aqbm-problem-editor-card__header{
  padding:1%;
  border-bottom:1px solid #666c77;
  background:#b9bec6;
}
.aqbm-problem-editor-card__title{
  color:#fff;
  font-weight:700;
  margin-bottom:6px;
}
.aqbm-label-line{
  display:inline-flex;
  align-items:center;
  gap:6px;
  flex-wrap:wrap;
}
.aqbm-problem-type-tabs{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
}
.aqbm-problem-editor-card__body{
  padding:1%;
  display:flex;
  flex-direction:column;
  gap:6px;
}
.aqbm-problem-form-table th,
.aqbm-problem-form-table td{
  padding:2px;
}
.aqbm-problem-type-panel{ min-height:0; }


.aqbm-label-line .aqbm-small{
  color:#d63638;
  font-weight:700;
}
.aqbm-problem-form-table{
  background:#c8ccd2;
}
.aqbm-problem-form-table th,
.aqbm-problem-form-table td{
  border:none;
  border-bottom:1px solid #8b919b;
  background:transparent;
  padding:2px;
}
.aqbm-problem-form-table tr:last-child th,
.aqbm-problem-form-table tr:last-child td{
  border-bottom:1px solid #8b919b;
}
.aqbm-problem-form-table .aqbm-input,
.aqbm-problem-form-table textarea.aqbm-input,
.aqbm-problem-form-table select.aqbm-input{
  min-height:34px;
  height:34px;
  line-height:1.2;
  padding:4px 8px;
  box-sizing:border-box;
  resize:none;
}
