/* 课伴 · 二级页面统一皮肤（加载于 style.css 之后，覆盖东方主题） */

:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --ink: #1f2937;
  --muted: #6b7280;
  --brand: #14532d;
  --brand-strong: #14532d;
  --brand-soft: #ecfdf5;
  --accent: #1d4ed8;
  --accent-soft: #eff6ff;
  --danger: #b91c1c;
  --danger-soft: #fef2f2;
  --ok-soft: #ecfdf5;
  --line: #eef1f4;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 10px 28px rgba(16, 24, 40, 0.06);
  --font-serif: system-ui, -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
  --font-kai: system-ui, -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
}

html {
  background: var(--bg);
}

body {
  font-family: var(--font-serif);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
}

h1, h2, h3, h4, .brand strong, .timer {
  font-family: var(--font-serif);
  letter-spacing: 0;
  color: var(--ink);
}

/* 顶栏 */
.topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  box-shadow: none;
  padding: 12px clamp(16px, 4vw, 40px);
}

.topbar-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  justify-self: center;
  padding: 3px;
  border-radius: 999px;
  background: #f3f6f8;
}

.topbar-nav .nav-link {
  flex: 0 0 auto;
  padding: 6px 13px;
  border-radius: 999px;
  white-space: nowrap;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

.topbar-nav .nav-link:hover {
  background: #e9eef2;
}

.topbar-nav .nav-link.is-active {
  position: relative;
  background: #fff;
  color: var(--ink);
  border-bottom-color: transparent;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08);
}

.topbar-nav .nav-link.is-active::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 3px;
  height: 2px;
  border-radius: 2px;
  background: var(--brand);
  pointer-events: none;
}

.topbar-nav .nav-link.is-active:hover {
  background: #e8f3ec;
  color: #14532d;
  border-bottom-color: transparent;
  box-shadow: 0 2px 8px rgba(20, 83, 45, 0.18);
  transform: translateY(-1px);
}

.topbar-actions {
  justify-self: end;
}

body .topbar .badge {
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

body .topbar .badge:hover,
body .topbar .badge#modeBadge:hover {
  border-color: #e09a91;
  background: #fff0ee;
  color: #8c2e25;
  box-shadow: 0 2px 8px rgba(140, 46, 37, 0.14);
}

body .topbar .btn-ghost:hover {
  background: #e2e8f0;
  border-color: #d5dbe3;
  color: #111827;
}

body .topbar a,
body .topbar button {
  cursor: pointer;
}

body .topbar .topbar-nav .nav-link:focus-visible,
body .topbar .badge:focus-visible,
body .topbar .btn-ghost:focus-visible {
  outline: 2px solid #14532d;
  outline-offset: 2px;
}

@media (max-width: 1000px) {
  .topbar {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 10px;
  }
  .topbar-nav {
    justify-self: end;
    max-width: 100%;
    padding-right: 14px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .topbar-nav::-webkit-scrollbar {
    display: none;
  }
  .brand small {
    display: none;
  }
  .topbar-actions {
    gap: 4px;
  }
}

@media (max-width: 720px) {
  .topbar {
    padding: 8px 12px;
  }
  .topbar-nav .nav-link {
    padding: 5px 9px;
    font-size: 12px;
  }
  .topbar-actions .nav-link {
    padding: 5px 8px;
    font-size: 12px;
  }
}

.brand {
  gap: 12px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  font-family: var(--font-serif);
  font-size: 17px;
  box-shadow: 0 4px 12px rgba(20, 83, 45, 0.22);
}

.brand strong {
  font-size: 16px;
  letter-spacing: 0.02em;
}

.brand small {
  font-family: var(--font-serif);
  font-size: 11.5px;
  color: var(--muted);
}

.nav-link {
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 13.5px;
  color: var(--muted);
  font-family: var(--font-serif);
  letter-spacing: 0;
}

.nav-link:hover {
  background: #f3f6f8;
  color: var(--ink);
}

.nav-link.is-active {
  color: var(--ink);
  font-weight: 600;
  box-shadow: inset 0 -2px 0 var(--brand);
  background: transparent;
}

.badge {
  padding: 4px 10px;
  border-radius: 999px;
  background: #f3f6f8;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  font-family: var(--font-serif);
  letter-spacing: 0;
}


/* 页面与卡片 */
.page {
  width: min(1280px, 100%);
  padding: 26px clamp(16px, 3.5vw, 36px) 64px;
  gap: 18px;
}

.card {
  background: var(--surface);
  border: 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 22px;
}

.card::before {
  display: none;
}

.card-head {
  border-bottom: 0;
  padding-bottom: 0;
  margin-bottom: 16px;
  align-items: flex-start;
}

.card-head h2 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0;
}

.card-head h2::before {
  content: none;
}

.card-head .muted {
  max-width: 52ch;
}

.muted {
  color: var(--muted);
  font-size: 12.5px;
}

.hint {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f7f9fa;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.65;
}

.empty {
  color: var(--muted);
  font-size: 13px;
  padding: 16px;
  text-align: center;
  background: #f8fafb;
  border-radius: 10px;
}

/* 按钮 */
.btn {
  border: 0;
  border-radius: 10px;
  padding: 9px 16px;
  background: var(--brand);
  color: #fff;
  font-family: var(--font-serif);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0;
  box-shadow: none;
  transition: background 0.15s ease, transform 0.15s ease;
}

.btn:hover {
  background: #166534;
  box-shadow: none;
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-secondary {
  background: var(--brand-soft);
  color: var(--brand);
  border: 0;
}

.btn-secondary:hover {
  background: #dcfce7;
}

.btn-ghost {
  background: #f3f6f8;
  color: var(--muted);
  border: 0;
}

.btn-ghost:hover {
  background: #e9eef2;
  color: var(--ink);
}

.btn-danger {
  background: var(--danger-soft);
  color: var(--danger);
  border: 0;
  padding: 6px 12px;
  font-size: 12.5px;
}

.btn-danger:hover {
  background: #fee2e2;
}

.btn-sm {
  padding: 5px 11px;
  font-size: 12.5px;
  border-radius: 8px;
}

.chip-btn {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  padding: 6px 12px;
  font-size: 12.5px;
  font-family: var(--font-serif);
}

.chip-btn:hover {
  border-color: #d9e1e7;
  background: #f8fafb;
  color: var(--ink);
}

/* 表单 */
.field {
  gap: 6px;
}

.field > span {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
}

.field input,
.field select,
.field textarea,
.agent-form input,
.agent-form select,
.agent-form textarea {
  width: 100%;
  border: 0;
  border-radius: 10px;
  background: #f7f9fa;
  padding: 10px 12px;
  font-family: var(--font-serif);
  font-size: 13.5px;
  color: var(--ink);
  box-shadow: none;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.agent-form textarea:focus {
  outline: none;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(20, 83, 45, 0.16);
}

.field textarea,
.agent-form textarea {
  resize: vertical;
  line-height: 1.7;
  min-height: 110px;
}

/* 模块中心 */
.module-page {
  gap: 18px;
}

.module-intro {
  padding: 8px 4px 2px;
}

.module-intro .eyebrow {
  color: var(--brand);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.module-intro h1 {
  margin: 8px 0;
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 700;
  letter-spacing: 0;
}

.module-intro .lead {
  font-family: var(--font-serif);
  color: var(--muted);
  font-size: 14px;
  max-width: 720px;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.module-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.module-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 34px rgba(16, 24, 40, 0.1);
}

.module-seal {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--brand-soft);
  color: var(--brand);
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 700;
  border: 0;
}

.module-card h2 {
  margin: 2px 0 0;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0;
}

.module-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.module-arrow {
  margin-top: auto;
  color: var(--brand);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0;
}

.module-note {
  text-align: center;
  color: var(--muted);
  font-family: var(--font-serif);
  font-size: 12px;
}

.module-banner {
  padding: 4px;
  font-size: 13px;
  color: var(--muted);
}

.module-banner a {
  color: var(--brand);
  font-weight: 600;
}

/* 学习目标 Agent */
.agent-hero {
  margin: 2px 0 6px;
}

.agent-hero .eyebrow {
  color: var(--brand);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.agent-hero h1 {
  font-family: var(--font-serif);
  color: var(--ink);
  font-size: clamp(26px, 4vw, 34px);
  font-weight: 700;
  margin: 8px 0;
}

.agent-hero p {
  color: var(--muted);
  max-width: 820px;
  font-size: 13.5px;
  line-height: 1.8;
}

.agent-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 18px;
  align-items: start;
}

.agent-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.agent-examples {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.agent-result {
  min-height: 300px;
}

.agent-status {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.agent-block {
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin-top: 14px;
}

.agent-block h3 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}

.agent-answer {
  white-space: pre-wrap;
  line-height: 1.85;
  font-family: var(--font-serif);
  font-size: 14px;
  background: #f8fafb;
  border-radius: 10px;
  padding: 14px;
}

.agent-list {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  font-size: 13px;
}

.agent-list li {
  margin: 4px 0;
}

.agent-tool {
  border: 0;
  border-radius: 10px;
  background: #f8fafb;
  padding: 10px 12px;
  margin: 8px 0;
  font-size: 12.5px;
  color: var(--muted);
}

.agent-tool strong {
  color: var(--ink);
  font-family: ui-monospace, Consolas, monospace;
}

.agent-citations {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.agent-citations span {
  border: 0;
  background: var(--brand-soft);
  color: var(--brand);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11.5px;
}

.agent-error {
  border-left: 0;
  background: var(--danger-soft);
  color: var(--danger);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
}

/* 学习聊天 */
.chat-layout {
  grid-template-columns: 280px minmax(0, 1fr) 320px;
  align-items: start;
}

.chat-sidebar {
  position: sticky;
  top: 78px;
}

.chat-main-card {
  display: flex;
  flex-direction: column;
  min-height: 640px;
  min-width: 0;
  border-top: 0;
}

.chat-main-card,
.chat-side,
.chat-sidebar {
  background: var(--surface);
}

.chat-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.chat-head h2 {
  font-size: 16px;
  margin: 0 0 4px;
}

.chat-thread {
  background: transparent;
  padding: 16px 2px;
  max-height: 560px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-thread .message-bubble {
  font-family: var(--font-serif);
  border-radius: 14px;
}

.message-row {
  display: flex;
}

.message-row.user {
  justify-content: flex-end;
}

.message-row.assistant {
  justify-content: flex-start;
}

.message-bubble {
  max-width: 88%;
  padding: 12px 14px;
  font-size: 13.5px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.message-bubble.user {
  background: linear-gradient(135deg, #16794a, #14532d);
  color: #fff;
  border: 0;
  border-bottom-right-radius: 4px;
}

.message-bubble.assistant {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 1px solid var(--line);
  border-bottom-left-radius: 4px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.message-bubble.assistant.guided {
  background: #fffbeb;
  border-color: #fde68a;
  color: #92400e;
}

.message-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.message-body {
  line-height: 1.7;
}

.message .notice,
.message-bubble .notice {
  margin: 8px 0 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fffbeb;
  color: #92400e;
  font-size: 12px;
}

.message h4 {
  margin: 0 0 5px;
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.message .quote {
  margin: 0 0 10px;
  padding: 9px 11px;
  border-radius: 8px;
  background: #f8fafb;
  border: 0;
}

.to-task {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
}

.to-task select,
.to-task input {
  padding: 5px 8px;
  border: 0;
  border-radius: 8px;
  background: #f3f6f8;
  font-size: 12px;
}

.quick-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 10px 0;
}

.chat-form {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.chat-form-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin-top: 9px;
}

.session-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
  max-height: 420px;
  overflow: auto;
}

.session-item {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafb;
  overflow: hidden;
}

.session-item.active {
  border-color: transparent;
  background: var(--brand-soft);
  box-shadow: inset 0 0 0 1px #bbf7d0;
}

.session-open {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 9px 11px;
  text-align: left;
  cursor: pointer;
}

.session-open strong {
  display: block;
  font-size: 12.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.session-open small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.session-delete {
  border: 0;
  background: transparent;
  color: var(--danger);
  font-size: 17px;
  padding: 0 10px;
  cursor: pointer;
}

.checkin-form {
  gap: 10px;
}

.advice-box {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fffbeb;
  border: 0;
  color: #92400e;
  font-size: 12.5px;
}

.summary-panel {
  margin-top: 16px;
}

.summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.summary-head h3 {
  margin: 0;
  font-size: 14px;
}

.similar-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.similar-list li {
  padding: 8px 10px;
  border: 1px solid var(--line);
  background: #f8fafb;
  border-radius: 8px;
  font-size: 12px;
}

/* 专注模式 */
.focus-layout {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: start;
}

.focus-card {
  text-align: center;
}

.focus-card .eyebrow {
  color: var(--muted);
  letter-spacing: 0.14em;
  font-size: 11.5px;
}

.timer {
  width: auto;
  height: auto;
  margin: 20px auto 18px;
  font-size: clamp(56px, 10vw, 88px);
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--ink);
  border: 0;
  box-shadow: none;
  background: transparent;
}

.focus-modes {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.focus-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 16px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.stat-card {
  padding: 14px;
  border-radius: 10px;
  background: #f8fafb;
  border: 0;
}

.stat-card span {
  display: block;
  color: var(--muted);
  font-size: 11.5px;
}

.stat-card strong {
  font-size: 26px;
  color: var(--ink);
  font-family: var(--font-serif);
}

/* 练习 */
.practice-layout {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: start;
}

.practice-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.analysis-note {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f8fafb;
  color: var(--muted);
  font-size: 12.5px;
}

.type-grid {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.type-grid label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #f8fafb;
  font-size: 12.5px;
}

.quiz-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

.quiz-card {
  padding: 16px;
  border: 0;
  border-radius: 12px;
  background: #f8fafb;
}

.quiz-meta {
  color: var(--muted);
  font-size: 11.5px;
  margin-bottom: 8px;
}

.quiz-question {
  margin: 0 0 10px;
  font-weight: 600;
  font-size: 14px;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.quiz-option {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  padding: 9px 11px;
  border: 0;
  border-radius: 10px;
  background: #fff;
  font-size: 13px;
  cursor: pointer;
}

.quiz-option:hover {
  background: #f1f5f8;
}

.quiz-option input {
  margin-top: 4px;
  accent-color: var(--brand);
}

.quiz-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 11px;
}

.quiz-card textarea {
  margin-top: 8px;
  width: 100%;
  padding: 9px 11px;
  border: 0;
  border-radius: 9px;
  background: #fff;
}

.quiz-feedback {
  margin-top: 11px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 12.5px;
  background: #fff;
  border: 0;
}

.quiz-feedback.correct {
  background: var(--ok-soft);
}

.quiz-feedback.wrong {
  background: var(--danger-soft);
}

/* 账号 / 管理 / 登录 */
.agent-form .btn,
.card > .btn {
  align-self: flex-start;
}

.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
}

table th {
  text-align: left;
  font-size: 11.5px;
  letter-spacing: 0.05em;
  color: var(--muted);
  background: #f8fafb;
  padding: 9px 12px;
}

table td {
  padding: 10px 12px;
  border-top: 1px solid var(--line);
}

/* Toast */
.toast {
  background: #1f2937;
  color: #fff;
  border-radius: 10px;
  font-size: 13px;
  box-shadow: 0 10px 30px rgba(16, 24, 40, 0.18);
}

.toast.error {
  background: var(--danger);
}

/* 响应式 */
@media (max-width: 1100px) {
  .chat-layout {
    grid-template-columns: 240px minmax(0, 1fr);
  }

  .chat-side {
    grid-column: 1 / -1;
  }

  .agent-layout,
  .practice-layout,
  .focus-layout {
    grid-template-columns: 1fr;
  }

  .module-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .page {
    padding: 18px 14px 48px;
  }

  .module-grid {
    grid-template-columns: 1fr;
  }

  .chat-layout {
    grid-template-columns: 1fr;
  }

  .chat-sidebar,
  .chat-side {
    position: static;
    grid-column: auto;
  }

  .stats-grid,
  .grid2 {
    grid-template-columns: 1fr;
  }

  .message-bubble {
    max-width: 100%;
  }
}
.module-merge-note {
  margin-top: 18px;
  padding: 18px 20px;
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow);
}

.module-merge-note h3 {
  margin: 0 0 10px;
  font-size: 14px;
}

.module-merge-note ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}

.module-merge-note strong {
  color: var(--ink);
}
.dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.32);
}

.dialog-backdrop[hidden] {
  display: none;
}

.dialog-card {
  width: min(420px, 100%);
  padding: 22px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.24);
}

.dialog-card h3 {
  margin: 0 0 8px;
  font-size: 17px;
}

.dialog-card p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.error-analysis {
  margin: 8px 0 0;
  padding: 8px 10px;
  border-left: 3px solid var(--brand);
  background: #f8fafb;
  line-height: 1.7;
}
