:root {
  color-scheme: light;
  --bg: #f3f6f8;
  --surface: #ffffff;
  --surface-subtle: #f7fafb;
  --ink: #15232d;
  --muted: #667784;
  --line: #dbe4e8;
  --blue: #17668a;
  --blue-strong: #0f526f;
  --blue-soft: #e7f3f7;
  --green: #247257;
  --green-soft: #e8f5ef;
  --amber: #8a5a00;
  --amber-soft: #fff2d5;
  --red: #9d3128;
  --red-soft: #faeae8;
  --focus: #087ea4;
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { min-width: 0; }

body {
  margin: 0;
  min-width: 0;
  background:
    radial-gradient(circle at 8% 0%, rgba(96, 175, 195, 0.12), transparent 25rem),
    radial-gradient(circle at 92% 12%, rgba(218, 175, 91, 0.10), transparent 24rem),
    var(--bg);
  color: var(--ink);
  line-height: 1.55;
}

button,
input,
select,
textarea { font: inherit; }

button,
a { -webkit-tap-highlight-color: transparent; }

a { color: var(--blue); }

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--focus) 35%, transparent);
  outline-offset: 2px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(207, 220, 226, 0.9);
  box-shadow: 0 4px 18px rgba(35, 63, 76, 0.05);
  backdrop-filter: blur(14px);
}

.topbar-inner,
.page {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar-inner {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.brand strong { color: #11394b; font-size: 19px; letter-spacing: 0.02em; }
.brand span { color: var(--muted); font-size: 13px; }

.nav {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px;
  border: 1px solid #e3eaed;
  border-radius: 12px;
  background: #f7fafb;
}

.nav a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0 13px;
  color: var(--muted);
  text-decoration: none;
  border-radius: 8px;
  transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.nav a[aria-current="page"] {
  color: var(--blue-strong);
  background: #fff;
  box-shadow: 0 2px 8px rgba(41, 74, 89, 0.10);
}

.page { padding: 24px 0 48px; }

.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 18px;
}

h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 4px; font-size: 26px; line-height: 1.3; letter-spacing: 0; }
h2 { margin-bottom: 14px; font-size: 17px; letter-spacing: 0; }
h3 { margin-bottom: 8px; font-size: 15px; letter-spacing: 0; }
.lede { margin: 0; color: var(--muted); font-size: 14px; }

.sync-status {
  flex: 0 0 auto;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
}

.sync-status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #82909d;
}

.sync-status[data-state="synced"]::before,
.sync-status[data-state="idle"]::before { background: var(--green); }
.sync-status[data-state="pending"]::before { background: var(--amber); }
.sync-status[data-state="issue"]::before { background: var(--red); }

.sync-group { display: grid; justify-items: end; gap: 6px; }
.sync-issue-panel {
  max-width: 360px;
  padding: 8px 10px;
  border: 1px solid #e8c2be;
  border-radius: 6px;
  background: var(--red-soft);
  color: var(--red);
  font-size: 12px;
}
.sync-issue-panel:not([hidden]) { display: flex; align-items: center; gap: 8px; }
.sync-issue-panel span { overflow-wrap: anywhere; }
.sync-issue-panel button { min-height: 30px; padding: 3px 7px; flex: 0 0 auto; }

.dashboard-grid,
.practice-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 18px;
  align-items: start;
}

.stack { display: grid; gap: 18px; min-width: 0; }

.panel {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 8px 26px rgba(37, 66, 80, 0.055);
}

.panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.panel-heading a { font-size: 13px; }
.empty, .loading { color: var(--muted); font-size: 14px; }
.error { color: var(--red); }

.summary-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255,255,255,0.98), rgba(247,251,252,0.98));
  box-shadow: 0 8px 26px rgba(37, 66, 80, 0.05);
  margin-bottom: 18px;
}

.summary-item { padding: 14px 16px; min-width: 0; }
.summary-item + .summary-item { border-left: 1px solid var(--line); }
.summary-label { color: var(--muted); font-size: 12px; }
.summary-value { margin-top: 3px; color: #173746; font-weight: 800; font-size: 19px; overflow-wrap: anywhere; }

.beginner-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.beginner-card {
  grid-column: span 2;
  min-width: 0;
  padding: 15px 16px;
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  background: linear-gradient(145deg, #ffffff, #f9fbfc);
  box-shadow: 0 10px 28px rgba(37, 66, 80, 0.065);
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.beginner-card::after { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: #91b9c9; }
.beginner-card:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(37, 66, 80, 0.10); }
.beginner-card:nth-child(4), .beginner-card:nth-child(5) { grid-column: span 3; }
.beginner-card p, .beginner-card blockquote { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.beginner-card blockquote { position: relative; border: 0; padding: 2px 0 0 20px; color: #314b58; font-size: 14px; line-height: 1.7; }
.beginner-card blockquote::before { content: "“"; position: absolute; left: 0; top: -9px; color: #71a2b5; font: 700 30px/1 Georgia, serif; }
.beginner-value { margin-top: 5px; color: #183846; font-weight: 800; font-size: 20px; overflow-wrap: anywhere; }
.card-topline { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card-topline > span { color: #9aabb3; font-size: 11px; font-weight: 800; letter-spacing: 0.12em; }
.countdown-card { background: linear-gradient(145deg, #e6f4f8, #f5fbfd); border-color: #c8e0e9; }
.countdown-card::after { background: #277a9c; }
.quote-card::after { background: #d4a746; }
.phase-card::after { background: #8174b4; }
.effort-card::after { background: #6a9e7b; }
.focus-card { background: linear-gradient(145deg, #e7f5ee, #f7fcf9); border-color: #c8e2d4; }
.focus-card::after { background: #2e7d5f; }

.task-list, .review-list, .stat-list { display: grid; gap: 0; }

.task-row,
.review-row,
.stat-row {
  min-width: 0;
  display: grid;
  gap: 12px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
}

.task-row:first-child,
.review-row:first-child,
.stat-row:first-child { border-top: 0; padding-top: 2px; }
.task-row { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.review-row { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.stat-row { grid-template-columns: minmax(100px, 1fr) 2fr auto; align-items: center; }
.task-title, .review-title { font-weight: 700; overflow-wrap: anywhere; }
.task-meta, .review-meta { margin-top: 2px; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }

.tag {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 12px;
}

.button,
button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--ink);
  padding: 8px 14px;
  cursor: pointer;
  text-decoration: none;
}

.button { display: inline-flex; align-items: center; justify-content: center; }
.button.primary, button.primary { border-color: var(--blue); background: linear-gradient(135deg, var(--blue), var(--blue-strong)); color: #fff; box-shadow: 0 5px 14px rgba(23, 102, 138, 0.18); }
.button.secondary, button.secondary { background: var(--surface-subtle); }
button.danger { color: var(--red); border-color: #e8c2be; background: var(--red-soft); }
button:disabled { cursor: not-allowed; opacity: 0.6; }

.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.actions.compact button { min-height: 34px; padding: 5px 9px; font-size: 13px; }

.segmented { display: inline-flex; max-width: 100%; margin-bottom: 12px; }
.segmented button { border-radius: 0; min-height: 36px; padding: 6px 12px; }
.segmented button:first-child { border-radius: 6px 0 0 6px; }
.segmented button:last-child { border-radius: 0 6px 6px 0; }
.segmented button + button { margin-left: -1px; }
.segmented button[aria-pressed="true"] { position: relative; border-color: var(--blue); background: var(--blue-soft); color: var(--blue); }
.fragment-list { display: grid; }
.fragment-task { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 10px 0; border-top: 1px solid var(--line); }
.fragment-task input { width: 18px; min-height: 18px; margin-top: 3px; }
.fragment-task strong { display: block; }
.fragment-task small { display: block; color: var(--muted); }
.fragment-task.done strong { text-decoration: line-through; color: var(--muted); }

.quiz-area { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.quiz-question { font-weight: 700; }
.quiz-options { display: grid; gap: 8px; margin-bottom: 10px; }
.quiz-options button { text-align: left; }
.quiz-options button.correct { border-color: var(--green); background: var(--green-soft); color: var(--green); }
.quiz-options button.wrong { border-color: var(--red); background: var(--red-soft); color: var(--red); }
.quiz-explanation { padding: 9px 10px; background: var(--surface-subtle); border-left: 3px solid var(--blue); }

.meter {
  height: 8px;
  overflow: hidden;
  border-radius: 4px;
  background: #e7ecef;
}

.meter span { display: block; height: 100%; background: var(--green); }
.stat-value { font-variant-numeric: tabular-nums; font-size: 13px; }

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.field { min-width: 0; }
.field.full { grid-column: 1 / -1; }
.checkbox-field label { display: flex; align-items: center; gap: 8px; }
.checkbox-field input { width: 18px; min-height: 18px; margin: 0; }
.field label, .field-label {
  display: block;
  margin-bottom: 5px;
  color: #35424e;
  font-size: 13px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  border: 1px solid #cbd4dc;
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  padding: 8px 10px;
}
input:focus, select:focus, textarea:focus { border-color: #70aabd; box-shadow: 0 0 0 3px rgba(62, 139, 166, 0.11); }

textarea { min-height: 88px; resize: vertical; }
.form-help { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.form-message { min-height: 24px; margin: 10px 0 0; font-size: 13px; }
.form-message.success { color: var(--green); }
.form-message.pending { color: var(--amber); }
.form-message.error { color: var(--red); }

.upload-queue {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}
.upload-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-subtle);
}
.upload-item-main { display: grid; gap: 2px; min-width: 0; }
.upload-item-main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.upload-status { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.upload-status.success { color: var(--green); }
.upload-status.pending { color: var(--amber); }
.upload-status.error { color: var(--red); }
.upload-answer { display: grid; grid-template-columns: auto minmax(70px, 1fr); gap: 7px; align-items: center; font-size: 12px; font-weight: 700; }
.upload-answer select { min-height: 36px; padding-block: 5px; }
.advanced-fields { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.advanced-fields summary { cursor: pointer; color: var(--blue); font-size: 13px; font-weight: 700; }
.advanced-fields[open] summary { margin-bottom: 10px; }
.mistake-book { display: grid; gap: 14px; }
.mistake-card { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-subtle); }
.mistake-card-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.mistake-card-head p, .analysis-line { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.mistake-image { width: min(100%, 520px); max-height: 420px; object-fit: contain; border-radius: 7px; background: #fff; border: 1px solid var(--line); }
.analysis-editor { border-top: 1px solid var(--line); padding-top: 9px; }
.analysis-editor summary { cursor: pointer; color: var(--blue); font-weight: 700; font-size: 13px; }
.analysis-editor[open] summary { margin-bottom: 10px; }
.insight-list { display: grid; gap: 8px; }
.insight-list p { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 8px; margin: 0; font-size: 13px; }
.insight-list span { color: var(--muted); overflow-wrap: anywhere; }

.notice {
  padding: 11px 12px;
  border: 1px solid #f0d89d;
  border-left: 4px solid var(--amber);
  border-radius: 8px;
  background: linear-gradient(135deg, var(--amber-soft), #fff8e8);
  color: #5d450f;
  font-size: 13px;
}

.step-line { margin: 0 0 14px; color: var(--muted); font-size: 13px; }
.step-line strong { color: var(--ink); }

@media (max-width: 780px) {
  .topbar-inner, .page { width: min(100% - 24px, 1120px); }
  .topbar-inner { min-height: auto; padding: 10px 0; align-items: flex-start; }
  .brand { display: grid; gap: 0; }
  .dashboard-grid, .practice-grid { grid-template-columns: 1fr; }
  .page { padding-top: 18px; }
  .page-heading { display: grid; gap: 10px; }
  .sync-status { width: fit-content; }
  .sync-group { justify-items: start; }
  .summary-strip { grid-template-columns: 1fr; }
  .beginner-grid { grid-template-columns: 1fr; }
  .beginner-card, .beginner-card:nth-child(4), .beginner-card:nth-child(5) { grid-column: auto; }
  .summary-item + .summary-item { border-left: 0; border-top: 1px solid var(--line); }
}

@media (max-width: 520px) {
  .topbar-inner { flex-direction: column; align-items: stretch; gap: 6px; }
  .nav { width: 100%; border-radius: 11px; }
  .nav a { flex: 1; justify-content: center; min-height: 38px; padding-inline: 5px; white-space: nowrap; font-size: 14px; }
  h1 { font-size: 22px; }
  .panel { padding: 15px; }
  .form-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .task-row, .review-row { grid-template-columns: 1fr; }
  .task-row .button { width: 100%; }
  .review-row .actions { width: 100%; }
  .review-row .actions button { flex: 1; }
  .stat-row { grid-template-columns: minmax(0, 1fr) 1.4fr auto; gap: 8px; }
  .fragment-task { grid-template-columns: auto minmax(0, 1fr); }
  .fragment-task .tag { grid-column: 2; }
  .upload-item { grid-template-columns: 1fr; }
  .upload-answer { grid-template-columns: minmax(90px, auto) 1fr; }
  .upload-item .actions button { flex: 1; }
  .mistake-card-head { display: grid; }
  .insight-list p { grid-template-columns: 1fr; gap: 1px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

/* 备考台首页：按参考稿保持紧凑首屏，不影响录入、错题和设置页面。 */
.dashboard-home {
  --dashboard-bg: #f7f8f4;
  --dashboard-green: #176b55;
  --dashboard-green-strong: #11533f;
  --dashboard-green-soft: #edf6f1;
  background: var(--dashboard-bg);
}
.dashboard-shell { min-height: 100vh; display: grid; grid-template-columns: 150px minmax(0, 1fr); }
.dashboard-sidebar {
  position: sticky; top: 0; height: 100vh; padding: 34px 14px 24px;
  display: flex; flex-direction: column; background: #f1f4ef; border-right: 1px solid #e0e5df;
}
.dashboard-brand { display: flex; justify-content: center; margin-bottom: 30px; color: var(--ink); text-decoration: none; }
.dashboard-brand > span { width: 45px; height: 45px; display: grid; place-items: center; border-radius: 12px; background: var(--dashboard-green); color: #fff; font-weight: 800; box-shadow: 0 8px 20px rgba(23,107,85,.18); }
.dashboard-sidebar nav { display: grid; gap: 15px; }
.dashboard-sidebar nav a { min-height: 50px; display: flex; align-items: center; gap: 10px; padding: 0 15px; border-radius: 10px; color: #66736c; font-size: 13px; text-decoration: none; }
.dashboard-sidebar nav a > span { width: 20px; text-align: center; font-size: 17px; }
.dashboard-sidebar nav a:hover, .dashboard-sidebar nav a[aria-current="page"] { background: var(--dashboard-green); color: #fff; font-weight: 700; box-shadow: 0 8px 20px rgba(23,107,85,.16); }
.dashboard-main { width: min(1190px, 100%); margin: 0 auto; padding: 32px 38px 44px; }
.dashboard-header { min-height: 70px; display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 10px; }
.dashboard-title h1 { margin: 0 0 8px; font-size: clamp(25px, 2.5vw, 32px); letter-spacing: .04em; }
.dashboard-title p { margin: 0; color: #637068; font-size: 13px; }
.dashboard-title p i { margin: 0 8px; font-style: normal; }
.dashboard-title p strong { color: var(--dashboard-green); font-size: 18px; }
.dashboard-date { margin: 0; color: #5f6c65; font-size: 13px; }
.dashboard-date::before { content: "▦"; margin-right: 8px; color: var(--dashboard-green); }
.dashboard-sync { min-height: 25px; margin-bottom: 10px; }
.dashboard-sync .sync-status[data-state="idle"] { opacity: 0; pointer-events: none; }
.dashboard-layout { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(340px, .88fr); gap: 20px; align-items: start; }
.dashboard-primary, .dashboard-insights { min-width: 0; display: grid; gap: 18px; }
.daily-focus, .dashboard-panel { min-width: 0; border: 1px solid #dce3de; border-radius: 15px; background: #fff; box-shadow: 0 7px 18px rgba(34,60,49,.055); }
.daily-focus { position: relative; overflow: hidden; padding: 25px 27px 20px; }
.focus-label { display: flex; align-items: center; gap: 12px; margin: 0; color: #22342c; font-size: 14px; font-weight: 800; }
.focus-label span { width: 34px; height: 40px; margin-top: -25px; display: grid; place-items: center; background: var(--dashboard-green); color: #fff; clip-path: polygon(0 0,100% 0,100% 100%,50% 78%,0 100%); }
.daily-focus h2 { margin: 16px 0 10px 46px; font-size: clamp(23px, 2.5vw, 28px); letter-spacing: .03em; }
.focus-detail { margin: 0 0 12px 46px; color: #55645c; font-size: 13px; }
.focus-standard { margin: 0 0 15px 46px; padding: 12px 0; display: flex; gap: 11px; border-top: 1px dashed #cad6cf; color: #35463e; }
.focus-standard span { color: var(--dashboard-green); font-weight: 800; }
.focus-standard p { margin: 0; font-size: 13px; }
.focus-action { min-height: 45px; display: flex; align-items: center; justify-content: center; gap: 32px; border-radius: 8px; background: var(--dashboard-green); color: #fff; font-weight: 800; text-decoration: none; box-shadow: 0 8px 18px rgba(23,107,85,.16); }
.focus-action:hover { background: var(--dashboard-green-strong); }
.dashboard-panel { padding: 18px; }
.dashboard-section-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.dashboard-section-head h2 { margin: 0; font-size: 17px; }
.dashboard-section-head > strong { color: var(--dashboard-green); font-size: 13px; }
.today-progress { height: 5px; margin: 13px 0 7px; overflow: hidden; border-radius: 99px; background: #edf0ec; }
.today-progress span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--dashboard-green); transition: width 180ms ease; }
.today-summary { margin-bottom: 6px; color: var(--muted); font-size: 11px; }
.dashboard-home .task-row { grid-template-columns: minmax(0,1fr) auto; padding: 8px 0; }
.dashboard-home .task-row .button.primary { min-height: 32px; border-color: #cddbd2; background: var(--dashboard-green-soft); color: var(--dashboard-green); box-shadow: none; }
.quick-entry { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.quick-entry { margin-top: 11px; }
.quick-entry a { min-height: 40px; display: flex; align-items: center; justify-content: center; gap: 9px; border: 1px solid var(--dashboard-green); border-radius: 7px; color: var(--dashboard-green); text-decoration: none; }
.insight-card { min-height: 155px; display: grid; grid-template-columns: 74px minmax(0,1fr) auto; align-items: center; gap: 18px; padding: 22px; }
.insight-icon { width: 70px; height: 70px; display: grid; place-items: center; border-radius: 50%; font-size: 33px; }
.review-icon { background: #fff7e9; color: #cf8500; }
.error-icon { background: #fff0ed; color: #dc4e45; }
.progress-icon { background: #edf6f1; color: var(--dashboard-green); }
.insight-card p { margin: 0 0 9px; color: #657169; font-size: 13px; }
.insight-card h2 { margin: 0; font-size: 18px; line-height: 1.45; }
.insight-card h2 strong { color: var(--dashboard-green); font-size: 30px; }
.review-panel h2 strong { color: #c78209; }
.insight-card > a { color: #66736c; font-size: 28px; text-decoration: none; }
.insight-card small { color: var(--muted); }
.dashboard-insights .review-list { max-height: 45px; overflow: hidden; }
.dashboard-insights .review-list .review-row { display: none; }
.dashboard-insights .review-list .empty, .dashboard-insights .review-list .loading { margin: 5px 0 0; font-size: 11px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.mobile-metrics, .mobile-compact-grid { display: none; }
.dashboard-mobile-nav { display: none; }

@media (max-width: 860px) {
  .dashboard-home { padding-bottom: 66px; }
  .dashboard-shell { display: block; }
  .dashboard-sidebar { display: none; }
  .dashboard-main { width: 100%; padding: 20px 14px 18px; }
  .dashboard-header { min-height: 58px; align-items: flex-start; margin-bottom: 3px; }
  .dashboard-title h1 { margin-bottom: 6px; font-size: 21px; letter-spacing: .02em; }
  .dashboard-title p { font-size: 11px; }
  .dashboard-title p strong { font-size: 14px; }
  .dashboard-date { padding-top: 4px; font-size: 10px; }
  .dashboard-date::before { display: none; }
  .dashboard-sync { position: absolute; min-height: 0; margin: 0; }
  .dashboard-layout { grid-template-columns: 1fr; }
  .dashboard-primary { gap: 14px; }
  .dashboard-insights, .today-panel { display: none; }
  .daily-focus { padding: 18px 15px 15px; }
  .focus-label { gap: 9px; font-size: 12px; }
  .focus-label span { width: 28px; height: 34px; margin-top: -18px; }
  .daily-focus h2 { margin: 11px 0 7px 37px; font-size: 21px; }
  .focus-detail { margin: 0 0 9px 37px; font-size: 11px; line-height: 1.5; }
.focus-standard { margin: 0 0 11px 37px; padding: 9px 0; font-size: 11px; }
  .focus-standard p { font-size: 11px; line-height: 1.45; }
  .focus-action { min-height: 44px; }
  .mobile-metrics { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid #dce3de; border-radius: 12px; background: #fff; box-shadow: 0 7px 18px rgba(34,60,49,.05); }
  .mobile-metrics div { min-width: 0; padding: 12px 5px; display: grid; place-items: center; gap: 4px; border-left: 1px solid #e2e7e3; }
  .mobile-metrics div:first-child { border-left: 0; }
  .mobile-metrics span { color: #68746d; font-size: 10px; }
  .mobile-metrics strong { overflow: hidden; max-width: 100%; color: #172a21; font-size: 19px; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-compact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .mobile-weakness, .mobile-actions { min-width: 0; min-height: 145px; padding: 14px; border: 1px solid #dce3de; border-radius: 12px; background: #fff; color: var(--ink); text-decoration: none; box-shadow: 0 7px 18px rgba(34,60,49,.05); }
  .mobile-weakness { position: relative; }
  .mobile-compact-grid h2 { margin: 0 0 16px; font-size: 13px; }
  .mobile-compact-grid h2 span { margin-right: 7px; color: var(--dashboard-green); }
  .mobile-weakness #mobile-weakest-module strong { display: block; overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-weakness #mobile-weakest-module p { margin: 7px 0 0; color: var(--muted); font-size: 10px; }
  .mobile-weakness > i { position: absolute; right: 14px; bottom: 14px; color: #65736b; font-size: 22px; font-style: normal; }
  .mobile-actions a { min-height: 34px; margin-top: 8px; display: flex; align-items: center; justify-content: center; border: 1px solid #8ab0a2; border-radius: 7px; color: var(--dashboard-green); font-size: 11px; font-weight: 700; text-decoration: none; }
  .dashboard-mobile-nav { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; min-height: 64px; display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid #dce2dd; background: rgba(255,255,255,.97); box-shadow: 0 -6px 22px rgba(34,60,49,.07); backdrop-filter: blur(12px); }
  .dashboard-mobile-nav a { display: grid; place-items: center; align-content: center; gap: 2px; color: #77837b; font-size: 9px; text-decoration: none; }
  .dashboard-mobile-nav a span { font-size: 18px; }
  .dashboard-mobile-nav a[aria-current="page"] { color: var(--dashboard-green); font-weight: 800; }
}
@media (max-width: 430px) {
  .dashboard-title h1 { font-size: 20px; }
  .dashboard-date { max-width: 92px; text-align: right; }
  .daily-focus h2 { font-size: 20px; }
}

.decision-chain { margin: 13px 0 14px 37px; display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 7px; }
.decision-chain div { min-width: 0; padding: 9px; border: 1px solid rgba(255,255,255,.25); border-radius: 8px; background: rgba(255,255,255,.09); }
.decision-chain dt { margin-bottom: 4px; color: #bfe0d4; font-size: 10px; font-weight: 800; }
.decision-chain dd { margin: 0; color: #fff; font-size: 10px; line-height: 1.45; }
.task-title { display: flex; align-items: center; gap: 7px; }
.task-type { flex: 0 0 auto; padding: 2px 6px; border-radius: 99px; font-size: 10px; }
.task-type.required { background: #fff0ed; color: #b54036; }
.task-type.suggested { background: #edf6f1; color: #176b55; }
.task-type.fragment { background: #fff7e9; color: #a56900; }
.task-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; flex-wrap: wrap; }
.task-actions select { width: auto; min-height: 32px; padding: 4px 24px 4px 7px; font-size: 11px; }
.task-actions button, .task-actions .button { min-height: 32px; padding: 6px 10px; font-size: 11px; }
.task-row.is-complete { opacity: .72; }
.completion-feedback { color: var(--dashboard-green); font-size: 12px; }

@media (max-width: 860px) {
  .dashboard-insights { display: none; }
  .today-panel { display: block; }
  .today-panel .quick-entry { display: none; }
  .decision-chain { margin-left: 0; grid-template-columns: 1fr 1fr; }
  .decision-chain div:nth-child(3) { grid-column: 1 / -1; }
  .dashboard-home .task-row { grid-template-columns: 1fr; gap: 9px; }
  .task-actions { justify-content: flex-start; }
}

/* 全站工作台设计系统：首页、学习、复习、错题与设置共用同一视觉语言。 */
.app-view {
  --dashboard-bg: #f7f8f4;
  --dashboard-green: #176b55;
  --dashboard-green-strong: #11533f;
  --dashboard-green-soft: #edf6f1;
  --workspace-warm: #fff8e9;
  min-height: 100vh;
  background: var(--dashboard-bg);
}

.workspace-main { padding-top: 34px; }
.workspace-header {
  min-height: 92px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}
.workspace-header h1 { margin: 3px 0 7px; font-size: clamp(26px, 2.5vw, 32px); letter-spacing: .03em; }
.workspace-header > div > p:last-child { max-width: 720px; margin: 0; color: #637068; font-size: 13px; }
.workspace-kicker, .section-eyebrow { margin: 0; color: var(--dashboard-green); font-size: 11px; font-weight: 800; letter-spacing: .1em; }
.header-action { flex: 0 0 auto; min-width: 132px; }
.workspace-sync { padding-top: 5px; }

.workspace-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 18px;
  padding: 6px;
  border: 1px solid #dce3de;
  border-radius: 13px;
  background: #f0f3ef;
}
.workspace-tabs a {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 9px;
  color: #66736c;
  font-size: 13px;
  text-decoration: none;
}
.workspace-tabs a span { color: var(--dashboard-green); font-size: 16px; }
.workspace-tabs a[aria-current="page"] { background: #fff; color: var(--dashboard-green); font-weight: 800; box-shadow: 0 4px 12px rgba(34,60,49,.08); }

.workspace-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 20px;
  align-items: start;
}
.workspace-content, .workspace-aside { min-width: 0; display: grid; gap: 18px; }
.app-view .panel {
  border-color: #dce3de;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 7px 18px rgba(34,60,49,.055);
}
.workspace-panel { padding: 22px; }
.workspace-panel .panel-heading { margin-bottom: 15px; align-items: flex-start; }
.workspace-panel .panel-heading h2 { margin: 3px 0 0; font-size: 19px; }
.guide-card { border-color: #cfe0d7 !important; background: var(--dashboard-green-soft) !important; }
.guide-card h2 { margin: 6px 0 10px; }
.guide-card ol { margin: 0; padding-left: 20px; color: #405249; font-size: 13px; }
.guide-card li + li { margin-top: 7px; }
.text-link { color: var(--dashboard-green); font-size: 12px; text-decoration: none; }
.full-button { width: 100%; }

.app-view .button,
.app-view button { border-radius: 8px; }
.app-view .button.primary,
.app-view button.primary,
.login-view button.primary {
  border-color: var(--dashboard-green);
  background: var(--dashboard-green);
  color: #fff;
  box-shadow: 0 7px 16px rgba(23,107,85,.15);
}
.app-view .button.primary:hover,
.app-view button.primary:hover,
.login-view button.primary:hover { background: var(--dashboard-green-strong); }
.app-view .button.secondary,
.app-view button.secondary { border-color: #cddbd2; background: #fff; color: var(--dashboard-green); box-shadow: none; }
.app-view input:focus,
.app-view select:focus,
.app-view textarea:focus,
.login-view input:focus { border-color: #6b9f8c; box-shadow: 0 0 0 3px rgba(23,107,85,.11); }
.app-view .tag { border-color: #cee0d7; background: var(--dashboard-green-soft); color: var(--dashboard-green); }
.app-view .advanced-fields { border-color: #dce3de; background: #fafbf8; }
.workspace-actions { margin-top: 17px; }
.workspace-actions .primary { min-width: 150px; }

.workspace-review-list { max-height: none; overflow: visible; }
.workspace-review-list .review-row { display: grid; grid-template-columns: minmax(0,1fr) auto; padding: 14px 0; }
.workspace-review-list .review-row:first-child { padding-top: 4px; }
.workspace-review-list .empty { margin: 4px 0 0; padding: 30px 16px; border-radius: 10px; background: #f6f8f4; text-align: center; }

.workspace-summary { margin-bottom: 18px; border-color: #dce3de; border-radius: 15px; box-shadow: 0 7px 18px rgba(34,60,49,.045); }
.workspace-summary .summary-value { color: var(--dashboard-green); }
.mistakes-layout { grid-template-columns: minmax(0, 1fr) 270px; }
.mistake-book-panel { padding: 20px; }
.sticky-panel-heading { position: sticky; z-index: 4; top: 0; margin: -20px -20px 12px; padding: 18px 20px 14px; border-bottom: 1px solid #e6ebe7; border-radius: 15px 15px 0 0; background: rgba(255,255,255,.96); backdrop-filter: blur(12px); }
.mistake-card { gap: 12px; padding: 17px; border-color: #dce3de; border-radius: 12px; background: #fbfcfa; }
.mistake-image { width: min(100%, 360px); max-height: 260px; border-radius: 10px; }
.analysis-editor { border-top: 1px solid #e0e7e2; padding-top: 8px; }

.settings-layout { grid-template-columns: minmax(0, 1fr) 300px; }
.settings-group { margin: 0; padding: 0; border: 0; }
.settings-group + .settings-group { margin-top: 22px; padding-top: 20px; border-top: 1px solid #e3e9e5; }
.settings-group legend { margin-bottom: 13px; color: #2d4037; font-size: 14px; font-weight: 800; }
.settings-actions { padding-top: 3px; }
.trial-summary { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 9px; }
.trial-summary div { min-width: 0; padding: 13px 10px; border: 1px solid #dce6df; border-radius: 10px; background: #f8faf7; text-align: center; }
.trial-summary span, .trial-day span, .trial-list-row span { display: block; color: #68746d; font-size: 11px; }
.trial-summary strong { display: block; margin-top: 5px; color: var(--dashboard-green); font-size: 20px; }
.trial-next-action { margin-top: 14px; padding: 13px 15px; border-left: 4px solid var(--dashboard-green); border-radius: 8px; background: var(--dashboard-green-soft); }
.trial-next-action span { display: block; margin-bottom: 4px; color: #66736c; font-size: 11px; }
.trial-day-grid { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 7px; margin-top: 13px; }
.trial-day { min-width: 0; padding: 9px 6px; border: 1px solid #e0e6e2; border-radius: 8px; background: #fafbf9; }
.trial-day time, .trial-day strong { display: block; font-size: 11px; }
.trial-day strong { margin: 4px 0; color: #7b8680; }
.trial-day.is-closed { border-color: #9fc3b4; background: var(--dashboard-green-soft); }
.trial-day.is-closed strong { color: var(--dashboard-green); }
.trial-admin-summary { margin: 0 0 14px; padding: 12px; border-radius: 9px; background: #f5f8f4; color: #405249; font-size: 13px; }
.trial-admin-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.trial-admin-grid h3 { margin: 0 0 9px; font-size: 14px; }
.trial-list { display: grid; gap: 8px; }
.trial-list-row { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 9px; padding: 10px; border: 1px solid #e1e7e3; border-radius: 8px; }
.trial-list-row > span { text-align: right; }
.invite-once { margin-bottom: 14px; padding: 12px; border: 1px solid #e9cf8d; border-radius: 9px; background: #fff8e9; }
.invite-once span, .invite-once code { display: block; }
.invite-once code { margin-top: 6px; overflow-wrap: anywhere; color: #6d5214; font-weight: 800; }

.login-view {
  --dashboard-green: #176b55;
  --dashboard-green-strong: #11533f;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(135deg, #edf3ed 0%, #f8f8f3 52%, #eef5f0 100%);
}
.login-shell { width: min(900px, 100%); display: grid; grid-template-columns: 1.08fr .92fr; overflow: hidden; border: 1px solid #dce3de; border-radius: 20px; background: #fff; box-shadow: 0 20px 60px rgba(34,60,49,.12); }
.login-intro { padding: 54px; display: flex; flex-direction: column; justify-content: center; background: #f0f4ef; }
.login-brand { width: 54px; height: 54px; margin-bottom: 30px; display: grid; place-items: center; border-radius: 14px; background: var(--dashboard-green); color: #fff; font-size: 20px; font-weight: 800; box-shadow: 0 10px 24px rgba(23,107,85,.2); }
.login-intro h1 { max-width: 440px; margin: 10px 0 18px; font-size: clamp(28px, 4vw, 40px); line-height: 1.35; }
.login-intro > p:last-child { max-width: 440px; margin: 0; color: #637068; }
.login-card { padding: 54px 46px; display: grid; align-content: center; gap: 14px; }
.login-card h2 { margin: 5px 0 7px; font-size: 25px; }
.login-card > div > p:last-child { margin: 0; color: var(--muted); font-size: 13px; }
.login-card label { color: #36483f; font-size: 13px; font-weight: 700; }
.login-card input { min-height: 48px; }
.login-card button { min-height: 48px; margin-top: 6px; }
#login-status { min-height: 22px; margin: 0; color: var(--red); font-size: 13px; }

@media (max-width: 860px) {
  .app-view { padding-bottom: 68px; }
  .workspace-main { padding-top: 18px; }
  .workspace-header { min-height: auto; margin-bottom: 13px; align-items: flex-start; }
  .workspace-header h1 { margin-top: 2px; font-size: 22px; }
  .workspace-header > div > p:last-child { font-size: 11px; line-height: 1.45; }
  .workspace-sync { position: absolute; min-height: 0; padding: 0; }
  .workspace-sync .sync-status[data-state="idle"] { opacity: 0; pointer-events: none; }
  .workspace-tabs { grid-template-columns: repeat(4, minmax(82px, 1fr)); overflow-x: auto; margin-bottom: 14px; padding: 5px; }
  .workspace-tabs a { min-height: 42px; gap: 5px; font-size: 11px; white-space: nowrap; }
  .workspace-layout, .mistakes-layout, .settings-layout { grid-template-columns: 1fr; }
  .workspace-aside { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .workspace-panel { padding: 17px; }
  .workspace-panel .panel-heading h2 { font-size: 17px; }
  .header-action { min-width: 112px; min-height: 38px; padding-inline: 12px; }
  .workspace-summary { grid-template-columns: repeat(3, 1fr); }
  .workspace-summary .summary-item { min-width: 0; padding: 14px 6px; border-top: 0; }
  .workspace-summary .summary-item + .summary-item { border-left: 1px solid var(--line); }
  .workspace-summary .summary-label { font-size: 10px; }
  .workspace-summary .summary-value { overflow: hidden; font-size: 17px; text-overflow: ellipsis; white-space: nowrap; }
  .sticky-panel-heading { margin: -17px -17px 10px; padding: 15px 17px 12px; }
}

@media (max-width: 600px) {
  .workspace-header { gap: 10px; }
  .workspace-header .header-action { align-self: flex-end; font-size: 11px; }
  .workspace-tabs { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2px; overflow-x: visible; }
  .workspace-tabs a { gap: 2px; padding-inline: 2px; font-size: 10px; }
  .workspace-aside { grid-template-columns: 1fr; }
  .workspace-actions { display: grid; grid-template-columns: 1fr; }
  .workspace-actions .primary, .workspace-actions .button, .workspace-actions button { width: 100%; }
  .workspace-review-list .review-row { grid-template-columns: 1fr; }
  .trial-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .trial-day-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .trial-admin-grid { grid-template-columns: 1fr; }
  .workspace-review-list .review-row .actions { width: 100%; }
  .workspace-review-list .review-row .actions button { flex: 1; }
  .mistake-image { width: 100%; max-height: 300px; }
  .login-view { padding: 14px; }
  .login-shell { grid-template-columns: 1fr; border-radius: 16px; }
  .login-intro { padding: 27px 24px 22px; }
  .login-brand { width: 44px; height: 44px; margin-bottom: 18px; }
  .login-intro h1 { margin: 8px 0 10px; font-size: 24px; }
  .login-intro > p:last-child { font-size: 12px; }
  .login-card { padding: 26px 24px 30px; }
}

/* M1 目标状态内核：保持现有工作台视觉，只增加目标创建与摘要所需组件。 */
.goal-main { width: min(980px, 100%); margin: 0 auto; }
.goal-entry-banner { margin-bottom: 16px; padding: 16px 18px; display: flex; justify-content: space-between; align-items: center; gap: 18px; border: 1px solid #cfe0d7; border-radius: 13px; background: var(--dashboard-green-soft); }
.goal-entry-banner h2 { margin: 4px 0; font-size: 18px; }
.goal-entry-banner p:last-child { margin: 0; color: var(--muted); font-size: 12px; }
.goal-empty { max-width: 720px; margin: 8vh auto 0; text-align: center; }
.goal-empty h2 { margin: 8px 0 12px; }
.goal-empty p:not(.section-eyebrow) { max-width: 580px; margin: 0 auto 22px; color: var(--muted); }
.goal-wizard { max-width: 860px; margin: 0 auto; }
.text-button { border: 0; background: transparent; color: var(--dashboard-green); box-shadow: none; }
.goal-steps { margin: 0 0 24px; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; list-style: none; }
.goal-steps li { padding: 8px; border-radius: 8px; background: #eef1ee; color: #748078; font-size: 12px; text-align: center; }
.goal-steps li[data-active="true"] { background: var(--dashboard-green-soft); color: var(--dashboard-green); font-weight: 800; }
.goal-step { margin: 0; padding: 0; border: 0; }
.goal-wizard-actions { justify-content: flex-end; }
.resource-drafts { display: grid; gap: 10px; margin-bottom: 14px; }
.resource-draft { display: grid; grid-template-columns: 140px 1.2fr 1fr 1fr 1.2fr auto; gap: 7px; align-items: center; }
.resource-draft input, .resource-draft select { min-width: 0; }
.goal-confirm, .goal-summary-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.goal-confirm > div, .goal-summary-grid > div { padding: 14px; border: 1px solid #dce6df; border-radius: 10px; background: #f8faf7; }
.goal-confirm span, .goal-summary-grid span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 11px; }
.goal-confirm strong, .goal-summary-grid strong { overflow-wrap: anywhere; }
.goal-hero { margin-bottom: 18px; padding: 24px; display: flex; justify-content: space-between; align-items: center; gap: 18px; border-radius: 16px; background: var(--dashboard-green); color: #fff; }
.goal-hero h2 { margin: 10px 0 6px; font-size: clamp(25px, 4vw, 36px); }
.goal-hero p { margin: 0; color: #d8ebe4; }
.goal-hero .focus-label { color: #fff; }
.goal-hero button { flex: 0 0 auto; }
.goal-summary-grid { margin-bottom: 18px; }
.goal-resources { display: grid; gap: 9px; }
.goal-resource-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px; border: 1px solid #e0e7e2; border-radius: 10px; }
.goal-resource-row p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.goal-resource-row > div:last-child { display: flex; gap: 7px; }
.resource-editor { margin-top: 18px; padding-top: 18px; border-top: 1px solid #e3e9e5; }

@media (max-width: 760px) {
  .goal-main { padding-inline: 14px; }
  .resource-draft { grid-template-columns: 1fr; padding: 12px; border: 1px solid #e0e7e2; border-radius: 10px; }
  .goal-confirm, .goal-summary-grid { grid-template-columns: 1fr; }
  .goal-hero { align-items: flex-start; padding: 19px; }
  .goal-resource-row { align-items: flex-start; flex-direction: column; }
  .goal-resource-row > div:last-child { width: 100%; }
  .goal-resource-row > div:last-child button { flex: 1; }
  .goal-entry-banner { align-items: flex-start; flex-direction: column; }
  .goal-entry-banner .button { width: 100%; }
}

/* M2 跨日陪伴闭环：沿用现有面板与表单组件。 */
.companion-main { width: min(980px, 100%); margin: 0 auto; }
.companion-header-actions, .goal-hero-actions { display: flex; gap: 8px; align-items: center; }
.business-date-bar { margin-bottom: 14px; padding: 10px 13px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; border: 1px solid #dce5df; border-radius: 11px; background: #f8faf7; }
.business-date-bar label { font-weight: 800; }
.business-date-bar input { width: auto; }
.business-date-bar small { flex-basis: 100%; color: var(--muted); }
.companion-hero { margin-bottom: 16px; padding: 22px; display: flex; justify-content: space-between; gap: 18px; border-radius: 16px; color: #fff; background: var(--dashboard-green); }
.companion-hero h2 { margin: 7px 0; font-size: clamp(23px,4vw,34px); }
.companion-hero p { margin: 0; color: #d8ebe4; }
.companion-budget { min-width: 120px; display: grid; align-content: center; text-align: right; }
.companion-budget span { font-size: 12px; color: #d8ebe4; }
.companion-budget strong { font-size: 24px; }
.inline-companion-form { display: flex; align-items: end; gap: 10px; flex-wrap: wrap; }
.inline-companion-form label { flex-basis: 100%; font-weight: 700; }
.inline-companion-form input { width: 180px; }
.companion-tasks { display: grid; gap: 12px; margin-top: 14px; }
.companion-task { padding: 16px; border: 1px solid #dce5df; border-radius: 12px; background: #fff; }
.companion-task-head { display: flex; justify-content: space-between; gap: 12px; }
.companion-task-head > div { display: flex; align-items: center; gap: 8px; }
.companion-task h3 { margin: 0; }
.companion-task > p { color: var(--muted); }
.companion-task dl, .review-summary dl { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.companion-task dl div, .review-summary dl div { padding: 9px; border-radius: 8px; background: #f5f8f5; }
.companion-task dt, .review-summary dt { color: var(--muted); font-size: 11px; }
.companion-task dd, .review-summary dd { margin: 3px 0 0; }
.task-state-actions, .companion-day-actions { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; }
.compact-grid { margin-top: 10px; }
.task-result { padding: 9px; border-radius: 8px; background: var(--dashboard-green-soft); color: var(--dashboard-green-strong) !important; }
.suggestion-list { display: grid; gap: 9px; }
.suggestion-list > div { padding: 12px; border: 1px solid #dce5df; border-radius: 9px; }
.suggestion-list span { float: right; color: var(--dashboard-green); font-weight: 800; }
.suggestion-list p { margin: 6px 0 0; color: var(--muted); }

@media (max-width: 650px) {
  .companion-main { padding-inline: 13px; }
  .companion-header-actions { flex-direction: column; align-items: stretch; }
  .business-date-bar input, .business-date-bar button { flex: 1 1 130px; }
  .companion-hero { flex-direction: column; }
  .companion-budget { text-align: left; }
  .inline-companion-form { display: grid; grid-template-columns: 1fr; }
  .inline-companion-form input { width: 100%; }
  .companion-task dl, .review-summary dl { grid-template-columns: 1fr; }
  .task-state-actions button, .companion-day-actions button { flex: 1 1 120px; }
}
