.mobile-workflow-nav { display: none; }
.editor-workflow-actions { gap: 16px; }
.editor-workflow-actions h2 { margin: 0; }
.editor-workflow-actions p { margin: 5px 0 0; font-size: 13px; }
/* PB-H71: bộ đếm "Câu 7/10 (gói Miễn phí)" ở đầu trình soạn (dính khi cuộn) và cạnh nút "+ Thêm câu hỏi". */
.editor-question-count { font-weight: 600; font-size: 13px; color: var(--muted, #5b6475); }
.editor-question-count:empty { display: none; }
.editor-question-count.is-near { color: #a15c00; }
.editor-question-count.is-full { color: #b42318; }
.editor-question-count--inline { align-self: center; }

.assignment-report-roster-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 12px;
}
.assignment-report-roster-tabs button {
  min-height: 38px;
  padding: 7px 13px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #fff;
  color: #334155;
  cursor: pointer;
}
.assignment-report-roster-tabs button[aria-pressed="true"] {
  border-color: #2563eb;
  background: #eff6ff;
  color: #1e3a8a;
  font-weight: 700;
}

@media (max-width: 720px) {
  .editor-workflow-actions { align-items: stretch; flex-direction: column; }
  .editor-workflow-actions .dashboard-actions { display: flex; flex-wrap: wrap; gap: 8px; }
  .editor-workflow-actions .dashboard-actions .btn { flex: 1 1 auto; }
  .home-shell { padding-bottom: calc(66px + env(safe-area-inset-bottom)); }
  .mobile-workflow-nav {
    position: fixed;
    z-index: 24;
    inset: auto 0 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    min-height: calc(60px + env(safe-area-inset-bottom));
    padding: 5px 5px env(safe-area-inset-bottom);
    border-top: 1px solid #dbe3f0;
    background: #fff;
    box-shadow: 0 -4px 20px rgba(15, 23, 42, .06);
  }
  .mobile-workflow-nav button {
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 1px;
    min-height: 50px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #475569;
    font: inherit;
    cursor: pointer;
  }
  .mobile-workflow-nav button span { font-size: 22px; line-height: 1; }
  .mobile-workflow-nav button small { font-size: 11px; }
  .mobile-workflow-nav button.is-active { background: #eff6ff; color: #1e3a8a; font-weight: 700; }
  .mobile-workflow-nav button:focus-visible { outline: 2px solid #2563eb; outline-offset: -2px; }
}

/* Hộp thoại "Công cụ AI" (host/views/home.js > openAiHub). */
dialog.ai-hub-modal { width: min(92vw, 480px); }
.ai-hub-card { display: flex; flex-direction: column; gap: 4px; width: 100%; min-height: 64px; padding: 12px 14px; text-align: left; font: inherit; color: var(--text); background: var(--surface, #f9fafb); border: 1.5px solid var(--border, #e5e7eb); border-radius: 10px; cursor: pointer; }
.ai-hub-card:hover, .ai-hub-card:focus-visible { border-color: var(--focus, #2563eb); background: #eff6ff; }
.ai-hub-card strong { font-size: 16px; }
.ai-hub-card small { font-size: 13px; color: var(--text-muted, #4b5563); line-height: 1.4; }

/* Trình soạn câu hỏi: phông UI cho mọi ô nhập (textarea mặc định của trình duyệt là monospace),
   thanh Lưu/Hủy dính đầu khi cuộn bộ đề dài. Không đụng khu công thức (math-editor.css). */
textarea, textarea::placeholder, input::placeholder { font-family: inherit; }
.solution-block textarea.question-solution {
  width: 100%;
  min-height: 62px;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--card-border);
  background: var(--card);
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  line-height: 1.5;
  resize: vertical;
}
#editorView textarea::placeholder, #editorView input::placeholder { font-style: normal; color: #8a94a6; }
.home-shell #editorView .editor-workflow-actions {
  position: sticky;
  top: 65px;
  z-index: 19;
  margin: 0 -32px 16px;
  padding: 12px 32px;
  background: var(--h-bg, #f5f6fb);
  border-bottom: 1px solid var(--h-border, #e8e9f1);
}
@media (max-width: 720px) {
  .home-shell #editorView .editor-workflow-actions { top: 61px; margin: 0 -14px 14px; padding: 10px 14px; }
}

/* Điện thoại (~390px): không tràn ngang, vùng bấm >= 44px, chừa chỗ cho thanh điều hướng đáy. */
.home-main { overflow-x: clip; }
@media (max-width: 720px) {
  .home-shell .container { padding-left: 14px; padding-right: 14px; padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
  .home-shell .home-content { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
  .home-shell .btn,
  .home-shell .btn-sm,
  .home-shell .tab-item,
  .home-shell .breadcrumb-item,
  .home-shell .home-link-btn,
  .home-shell .home-nav-item,
  .home-shell .menu-item,
  .home-shell .home-popover-item,
  .home-shell .folder-open-btn,
  .home-shell .quiz-card-open,
  .home-shell .home-secondary-card,
  .home-shell .home-search { min-height: 44px; }
  .home-shell .home-link-btn { display: inline-flex; align-items: center; padding: 0 6px; }
  .home-shell .folder-actions-menu > summary { min-width: 44px; min-height: 44px; }
  .home-shell .row-between { flex-wrap: wrap; }
  .home-shell h1, .home-shell h2, .home-shell h3, .home-shell .quiz-card-meta, .home-shell .home-todo-main { overflow-wrap: anywhere; }
  .home-shell .quiz-card { flex-wrap: wrap; }
  .home-shell .quiz-card-body { min-width: 0; flex: 1 1 140px; }
  .home-shell .quiz-card-actions { width: 100%; }
  .home-shell select, .home-shell input[type="search"], .home-shell .modal-input { max-width: 100%; }
  .home-shell .tabs { overflow-x: auto; }
  .home-shell .dashboard-actions { width: 100%; }
}
