﻿:root {
  --bg: #f4efe7;
  --panel: rgba(255, 251, 245, 0.88);
  --ink: #192126;
  --muted: #62707c;
  --line: rgba(25, 33, 38, 0.12);
  --accent: #cc5a36;
  --accent-deep: #942d0d;
  --mint: #1f7a64;
  --rose: #c44f62;
  --shadow: 0 18px 45px rgba(60, 48, 35, 0.12);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(204, 90, 54, 0.16), transparent 24%),
    radial-gradient(circle at top right, rgba(31, 122, 100, 0.15), transparent 20%),
    linear-gradient(180deg, #f7f1e7, #efe4d5 45%, #f4efe7);
  color: var(--ink);
}
.page-shell { max-width: 1400px; margin: 0 auto; padding: 28px; }
.hero {
  width: 100%;
  margin: 0;
  padding: 28px 32px;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(255, 250, 242, 0.95), rgba(248, 237, 220, 0.9));
  box-shadow: var(--shadow);
}
.hero-copy-block { width: 100%; max-width: none; }
.hero h1 {
  margin: 8px 0 12px;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1.08;
  white-space: nowrap;
}
.eyebrow, .hero-copy, .muted { color: var(--muted); }
.source-pill {
  margin-top: 14px;
  width: 100%;
  max-width: 720px;
  padding: 12px 16px;
  border-radius: 16px;
  background: rgba(25, 33, 38, 0.06);
  text-align: left;
  line-height: 1.45;
  font-size: 0.92rem;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.layout { display: grid; gap: 22px; margin-top: 22px; width: 100%; }
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 22px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}
.panel-title, .action-row, .review-meta, .export-row, .words-title-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.review-actions-single { justify-content: flex-end; }
.controls-grid, .analytics-grid, .summary-grid, .stats-grid { display: grid; gap: 16px; }
.controls-grid { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin: 18px 0; }
.stats-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.analytics-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin-top: 18px; }
label span, .prompt-label { display: block; margin-bottom: 8px; color: var(--muted); font-size: 0.95rem; }
select, input, button { font: inherit; }
select, input {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--line);
  padding: 12px 14px;
  background: white;
}
#word-search { max-width: 320px; }
button { border: none; border-radius: 14px; padding: 12px 18px; cursor: pointer; transition: transform 0.18s ease, opacity 0.18s ease, background 0.18s ease; }
button:hover { transform: translateY(-1px); }
.primary { background: var(--accent); color: white; }
.ghost { background: rgba(25, 33, 38, 0.06); color: var(--ink); }
.success { background: var(--mint); color: white; }
.danger { background: var(--rose); color: white; }
.slash-btn, #slash-question { min-width: 72px; }
.is-slashed, .slash-btn:disabled { opacity: 0.65; cursor: not-allowed; }
.review-card { padding: 16px; border-radius: 22px; background: linear-gradient(160deg, rgba(255, 255, 255, 0.9), rgba(248, 239, 226, 0.9)); }
.prompt-wrap { min-height: 160px; display: grid; align-content: center; }
#question-prompt { margin: 0; font-size: clamp(2rem, 5vw, 4rem); line-height: 1.1; word-break: break-word; }
.last-result {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  margin: 0 0 14px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(25, 33, 38, 0.04);
  min-height: 52px;
  font-weight: 600;
}
.last-result.ok { color: var(--mint); }
.last-result.bad { color: var(--rose); }
.last-result.skip { color: var(--accent-deep); }
.options, .self-test-actions { display: grid; gap: 12px; margin: 16px 0; }
.options { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.option-btn { background: white; border: 1px solid rgba(25, 33, 38, 0.12); text-align: left; }
.feedback { min-height: 28px; margin-bottom: 12px; color: var(--muted); }
.feedback.ok { color: var(--mint); }
.feedback.bad { color: var(--rose); }
.feedback.skip { color: var(--accent-deep); }
.stat-card, .stack-item, .calendar-cell, .trend-card { border-radius: 18px; background: rgba(255, 255, 255, 0.75); border: 1px solid var(--line); padding: 16px; }
.stat-card strong, .stack-item strong { display: block; margin-top: 10px; font-size: 1.6rem; }
.stack-list, .trend-panels, .source-bars { display: grid; gap: 12px; }
.trend-panels { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.source-bar-row { display: grid; gap: 8px; }
.source-bar-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.source-bar-label { color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.source-bar-value { color: var(--muted); font-size: 0.95rem; white-space: nowrap; }
.source-bar-track { height: 12px; border-radius: 999px; background: rgba(25, 33, 38, 0.08); overflow: hidden; }
.source-bar-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #cc5a36, #e3a160); }
.trend-card.empty { display: grid; gap: 12px; align-content: start; }
.trend-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.trend-head h4 { margin: 0; font-size: 1rem; }
.trend-head span { color: var(--muted); font-size: 0.92rem; }
.trend-chart-wrap { position: relative; padding-bottom: 20px; }
.trend-chart { width: 100%; height: auto; display: block; }
.trend-grid { stroke: rgba(25, 33, 38, 0.15); stroke-width: 1; }
.trend-axis { position: absolute; left: 0; right: 0; bottom: 0; height: 18px; }
.trend-axis-label { position: absolute; width: 48px; text-align: center; font-size: 0.72rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trend-caption { margin: 8px 0 0; color: var(--muted); font-size: 0.9rem; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; margin: 10px 0 16px; }
.calendar-cell { min-height: 54px; display: grid; place-items: center; font-weight: 700; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; }
.words-table-grid { table-layout: fixed; }
.words-table-grid th:nth-child(1), .words-table-grid td:nth-child(1) { width: 16%; }
.words-table-grid th:nth-child(2), .words-table-grid td:nth-child(2) { width: 26%; }
.words-table-grid th:nth-child(3), .words-table-grid td:nth-child(3) { width: 14%; }
.words-table-grid th:nth-child(4), .words-table-grid td:nth-child(4), .words-table-grid th:nth-child(5), .words-table-grid td:nth-child(5), .words-table-grid th:nth-child(6), .words-table-grid td:nth-child(6), .words-table-grid th:nth-child(7), .words-table-grid td:nth-child(7), .words-table-grid th:nth-child(8), .words-table-grid td:nth-child(8) { width: 7%; }
.words-table-grid th:nth-child(9), .words-table-grid td:nth-child(9) { width: 110px; }
.words-table-grid td { overflow: hidden; text-overflow: ellipsis; }
.words-table-grid .slash-btn { width: 100%; min-width: 0; white-space: nowrap; }
th, td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.mistake-list, .recommendations { line-height: 1.8; }
.muted-cell { color: var(--muted); text-align: center; }
.hidden { display: none !important; }
@media (max-width: 1100px) {
  .hero h1 { white-space: normal; }
}
@media (max-width: 900px) {
  .page-shell { padding: 14px; }
  .hero { width: 100%; margin: 0; padding: 22px; }
  .layout { width: 100%; margin-top: 18px; }
  .panel { padding: 22px; }
  .source-pill { max-width: none; }
  .panel-title, .action-row, .review-meta, .export-row, .words-title-row { flex-direction: column; align-items: stretch; }
  .review-actions-single { align-items: flex-end; }
  #word-search { max-width: none; }
}


