.mentor-today-mast,
.mentor-today,
.mentor-review-dialog {
  --mentor-ink: #141c2e;
  --mentor-muted: #54627b;
  --mentor-rule: #dce3f0;
  --mentor-paper: #fff;
  --mentor-soft: #f3f6fc;
  --mentor-accent: #1746ed;
  color: var(--mentor-ink);
}
.mentor-today-mast {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 60px;
  padding: 10px max(24px, calc((100vw - 1344px) / 2));
  background: #0d1018;
  color: #fff;
}
.mentor-today-brand { display: flex; align-items: center; gap: clamp(8px, 2vw, 22px); white-space: nowrap; }
.mentor-today-brand strong { font-size: clamp(16px, 2vw, 24px); }
.mentor-today-brand i { font-size: 28px; line-height: 1; font-weight: 800; color: #4268ff; }
.mentor-today-brand span { color: #d1d9ed; font-size: 14px; }
.mentor-today-mast .button { background: transparent; border-color: #4e5c73; color: #eaf0ff; font-size: 13px; min-height: 34px; }
.mentor-today-mast .button:hover { background: #202b40; }
.mentor-today {
  --mentor-list-height: 625px;
  --mentor-pager-height: 44px;
  box-sizing: border-box;
  width: min(calc(100% - 64px), 1344px);
  margin: 26px auto 32px;
  padding: 18px;
  border: 1px solid var(--mentor-rule);
  border-radius: 10px;
  background: var(--mentor-paper);
}

.mentor-roster { min-width: 0; }
.mentor-roster-toolbar { display: flex; gap: 12px; align-items: center; }
.mentor-roster-toolbar input { width: min(330px, 100%); min-width: 0; min-height: 44px; padding: 10px; font: inherit; font-size: 16px; border: 1px solid #a0b0ca; border-radius: 6px; }
.mentor-roster-feedback { height: 28px; margin: 8px 0; color: #8b3040; overflow: auto; }
.mentor-roster-groups { display: grid; gap: 24px; }
.mentor-roster-groups h2 { font-size: 18px; margin: 0 0 12px; }
.mentor-roster-table { height: clamp(230px, 32dvh, 360px); overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; container-type: inline-size; border: 1px solid #dce3f0; border-radius: 8px; }
.mentor-roster table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.mentor-roster th, .mentor-roster td { text-align: left; padding: 12px 14px; border-bottom: 1px solid #e1e7f0; }
.mentor-roster thead { position: sticky; top: 0; z-index: 2; background: #f3f6fc; }
.mentor-roster tbody th { position: sticky; left: 0; background: #fff; z-index: 1; min-width: 130px; }
.mentor-roster small { display: block; color: #53627a; font-weight: 400; overflow-wrap: anywhere; }
.mentor-roster-empty { padding: 30px 20px; color: #53627a; }
.mentor-roster-pager { display: flex; align-items: center; justify-content: flex-end; gap: 10px; min-height: 54px; font-size: 13px; }
.mentor-roster-pager span { margin-right: auto; }
.mentor-roster button, .mentor-history-dialog button { min-height: 44px; }
.mentor-history-dialog { width: min(860px, calc(100vw - 32px)); box-sizing: border-box; max-height: calc(100dvh - 40px); padding: 24px; border: 1px solid #c8d3e3; border-radius: 12px; background: #fff; color: #17253d; }
.mentor-history-dialog:modal { overscroll-behavior: contain; }
.mentor-history-dialog::backdrop { background: #14233c88; overflow: hidden; overscroll-behavior: contain; }
.mentor-history-dialog header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.mentor-history-dialog h1 { font-size: 22px; margin: 0; }
.mentor-history-dialog > p { min-height: 28px; color: #53627a; }
.mentor-history-records { height: min(480px, 52dvh); overflow: auto; scrollbar-gutter: stable; }
.mentor-history-day { padding: 14px 0; border-bottom: 1px solid #dce3f0; }
.mentor-history-day h2 { font-size: 16px; margin: 0; }
.mentor-history-day p { margin: 8px 0; color: #53627a; }
.mentor-history-day ul { padding: 0; margin: 0; list-style: none; }
.mentor-history-day li { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 8px 0; font-size: 14px; }
.mentor-history-dialog :focus-visible { outline: 2px solid #1746ed; outline-offset: 2px; }
@container (width < 600px) {
  .mentor-roster table, .mentor-roster tbody, .mentor-roster tr, .mentor-roster th, .mentor-roster td { display: block; }
  .mentor-roster thead { display: none; }
  .mentor-roster tbody tr { padding: 12px; border-bottom: 1px solid #dce3f0; }
  .mentor-roster tbody th { position: static; padding: 0 0 8px; border: 0; }
  .mentor-roster td { padding: 6px 0; border: 0; }
  .mentor-roster td::before { content: attr(data-label) "："; color: #53627a; }
}
.mentor-today-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.mentor-today-heading h1 { display: flex; align-items: center; gap: 10px; margin: 0 0 4px; color: var(--mentor-ink); font-size: clamp(25px, 4vw, 34px); letter-spacing: -.035em; }
.mentor-today-heading h1::before { content: ""; display: block; width: 6px; height: .96em; border-radius: 2px; background: var(--mentor-accent); }
.mentor-today-date,
.mentor-today-count { color: var(--mentor-muted); font-size: 14px; margin: 0; }
.mentor-today-count { min-height: 21px; line-height: 1.5; }
.mentor-today-date { margin-inline-end: 4px; color: var(--mentor-ink); font-size: clamp(15px, 2vw, 23px); font-weight: 700; white-space: nowrap; }
.mentor-today-feedback { display: flex; align-items: center; gap: 10px; min-height: 20px; font-size: 13px; line-height: 20px; }
/* Keep loading, empty and paginated results in the same two-row frame. */
.mentor-today-content { display: grid; grid-template-rows: var(--mentor-list-height) var(--mentor-pager-height); min-width: 0; }
.mentor-today-table-wrap { grid-row: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; border: 1px solid var(--mentor-rule); border-radius: 10px; background: var(--mentor-paper); }
.mentor-today-table { width: 100%; min-width: 600px; border-collapse: collapse; font-size: 14px; text-align: left; font-variant-numeric: tabular-nums; }
.mentor-today-table :is(th, td) { padding: 0 16px; }
.mentor-today-table thead th { height: 38px; background: var(--mentor-soft); color: var(--mentor-muted); font-size: 12px; font-weight: 650; }
.mentor-today-table tbody :is(th, td) { height: 39px; border-top: 1px solid #e9edf5; }
.mentor-today-table tbody th { font-weight: 650; }
.mentor-today-table :is(th, td):last-child { text-align: right; }
.mentor-today-table :is(th, td):nth-child(n+3) { white-space: nowrap; }
.mentor-today-table tbody tr:hover { background: #f8faff; }
.mentor-today-table time { color: var(--mentor-muted); }
.mentor-today .reviewed,
.mentor-review-dialog .reviewed,
.mentor-today .review-needed,
.mentor-review-dialog .review-needed {
  display: inline-block;
  border-radius: 4px;
  padding: 2px 8px;
  color: #17614f;
  background: #e9f5f0;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}
.mentor-today .review-needed,
.mentor-review-dialog .review-needed { color: #254ab2; background: #edf2ff; }
.mentor-today .mentor-detail-button { min-height: 30px; padding: 3px 0 3px 8px; border: 0; background: transparent; color: #1945c3; font-size: 13px; }
.mentor-today .mentor-detail-button svg { order: 1; width: 14px; }
.mentor-today .mentor-detail-button:hover { text-decoration: underline; }
.mentor-today-pager,
.mentor-today-pager nav { display: flex; align-items: center; gap: 12px; }
.mentor-today-pager { grid-row: 2; justify-content: space-between; padding-top: 12px; color: var(--mentor-muted); font-size: 13px; }
.mentor-today-pager .button { min-height: 32px; padding: 5px 10px; border-color: var(--mentor-rule); background: var(--mentor-paper); color: var(--mentor-ink); font-size: 13px; white-space: nowrap; }
.mentor-today-empty { grid-row: 1; display: grid; place-items: center; min-height: 0; overflow: auto; margin: 0; padding: 20px; border: 1px solid var(--mentor-rule); border-radius: 10px; background: var(--mentor-paper); color: var(--mentor-muted); text-align: center; }

.mentor-review-dialog {
  box-sizing: border-box;
  width: min(96vw, 1500px);
  max-width: none;
  height: 90vh;
  height: 90dvh;
  max-height: none;
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--mentor-rule);
  border-radius: 12px;
  background: var(--mentor-paper);
  box-shadow: 0 22px 90px #101b4145;
}
.mentor-review-dialog[open] { display: flex; flex-direction: column; }
.mentor-review-dialog::backdrop { background: #111a32a6; }
.mentor-review-heading { display: flex; flex: none; gap: 14px; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--mentor-rule); }
.mentor-review-heading > div { flex: 1; min-width: 0; }
.mentor-review-heading h2 { margin: 0 0 4px; font-size: clamp(16px, 2vw, 23px); overflow-wrap: anywhere; }
.mentor-review-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 0; color: var(--mentor-muted); font-size: 12px; }
.mentor-review-heading select,
.mentor-review-close {
  border: 1px solid var(--mentor-rule);
  border-radius: 6px;
  background: var(--mentor-paper);
  color: var(--mentor-ink);
}
.mentor-review-heading select { min-height: 38px; max-width: min(30%, 260px); padding: 6px; font: inherit; font-size: 13px; }
.mentor-review-close { flex: none; display: grid; place-items: center; inline-size: 38px; block-size: 38px; cursor: pointer; }
.mentor-review-close:hover { background: var(--mentor-soft); }
.mentor-review-body { display: grid; grid-template-columns: minmax(136px, 17%) minmax(0, 1fr) minmax(210px, 23%); flex: 1; min-height: 0; }
.mentor-review-loading { grid-column: 1 / -1; display: flex; justify-content: center; align-items: center; gap: 12px; color: var(--mentor-muted); }
.mentor-review-nav,
.mentor-review-reading,
.mentor-review-side { min-width: 0; overflow: auto; overscroll-behavior: contain; }
.mentor-review-nav { display: flex; flex-direction: column; gap: 3px; padding: 12px; border-right: 1px solid var(--mentor-rule); background: var(--mentor-soft); }
.mentor-review-dialog .mentor-review-question-link { justify-content: flex-start; min-height: 36px; padding: 6px 10px; border: 1px solid transparent; background: transparent; color: var(--mentor-muted); font-size: 13px; text-align: left; line-height: 1.4; }
.mentor-review-dialog .mentor-review-question-link:hover { color: var(--mentor-accent); }
.mentor-review-dialog .mentor-review-question-link[aria-current] { border-color: #dce5ff; background: #eaf0ff; color: #153db7; }
html[data-theme] .mentor-review-reading.report-grid { display: block; height: auto; margin: 0; border: 0; overflow: auto; background: var(--mentor-paper); }
html[data-theme] .mentor-review-reading > .report-overview { display: flex; flex-wrap: wrap; gap: 12px; min-height: 48px; margin: 0; padding: 10px 20px; border: 0; border-bottom: 1px solid var(--mentor-rule); border-radius: 0; background: var(--mentor-paper); color: var(--mentor-ink); }
.mentor-review-reading .report-summary { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 16px; }
.mentor-review-reading .report-overview h2 { font-size: 14px; }
.mentor-review-reading .report-canvas { display: block; }
html[data-theme] .mentor-review-reading .report-canvas > .report-answer-pane { padding: 18px 20px; min-width: 0; }
.mentor-review-side { padding: 18px; border-left: 1px solid var(--mentor-rule); background: #fafbfe; }
.mentor-review-side h3,
.mentor-review-question-note h3 { margin: 0 0 12px; color: var(--mentor-ink); font-size: 15px; }
.mentor-review-question-note { margin: 4px 20px 22px; padding-top: 16px; border-top: 1px solid var(--mentor-rule); }
.mentor-review-dialog .field { min-width: 0; margin: 0; }
.mentor-review-dialog .field > label { color: var(--mentor-ink); font-size: 13px; font-weight: 650; }
.mentor-review-dialog .field-hint:empty { display: none; }
.mentor-review-dialog .field textarea { width: 100%; margin: 0; padding: 10px; box-sizing: border-box; resize: vertical; border: 1px solid #cdd7eb; background: var(--mentor-paper); color: var(--mentor-ink); font: inherit; font-size: 14px; line-height: 1.65; }
.mentor-review-actions { display: grid; gap: 10px; margin-top: 14px; }
.mentor-review-actions .button.primary { justify-content: center; border-color: var(--mentor-accent); background: var(--mentor-accent); color: #fff; font-size: 13px; }
.mentor-review-actions .button.primary:hover { background: #1439c0; }
.mentor-review-error { color: #a42b3c; font-size: 13px; margin: 0; }
.mentor-review-published { margin: 0 0 12px; color: var(--mentor-ink); font-size: 14px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }

@media (max-width: 820px) {
  .mentor-today-mast { flex-wrap: wrap; }
  .mentor-today-actions { margin-left: auto; flex-wrap: wrap; }
  .mentor-today { --mentor-list-height: clamp(320px, 60svh, 625px); }
  .mentor-review-body { display: block; overflow: auto; overscroll-behavior: contain; }
  .mentor-review-nav { position: sticky; z-index: 1; top: 0; flex-direction: row; padding: 7px 12px; border-right: 0; border-bottom: 1px solid var(--mentor-rule); }
  .mentor-review-dialog .mentor-review-question-link { flex: none; }
  .mentor-review-side { border-left: 0; border-top: 1px solid var(--mentor-rule); }
}
@media (max-width: 520px) {
  .mentor-today-mast { padding-inline: 12px; flex-wrap: wrap; }
  .mentor-today-actions { margin-left: auto; flex-wrap: wrap; }
  .mentor-today-mast .button { padding-inline: 6px; min-height: 44px; }
  .mentor-today-mast .button svg { display: none; }
  .mentor-today { --mentor-pager-height: 76px; width: calc(100% - 24px); margin-top: 16px; padding: 12px; }
  .mentor-today-pager { flex-wrap: wrap; }
  .mentor-review-heading { padding-inline: 12px; }
}
