:root {
  --ink: #1d2a35;
  --blue: #1f5f8b;
  --blue-dark: #17496b;
  --line: #d6dee5;
  --bg: #f3f5f7;
  --panel: #ffffff;
  --muted: #657786;
  --amber: #8a5a16;
}

* { box-sizing: border-box; }

body {
  min-width: 1180px;
  margin: 0;
  background:
    linear-gradient(rgba(31,95,139,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31,95,139,.025) 1px, transparent 1px),
    var(--bg);
  background-size:32px 32px;
  color: var(--ink);
  font: 400 14px/1.55 "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", Arial, sans-serif;
}

.page { max-width: 1400px; margin: auto; padding: 30px 34px 50px; }

header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: end;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
}

.back { display: block; color: var(--blue); text-decoration: none; font-size: 13px; margin-bottom: 7px; }
[hidden] { display: none !important; }
h1, h2, p { margin: 0; }
h1 { font-size: 30px; letter-spacing: -.02em; color: #152b3a; font-weight:700; }
header p, .hint { color: var(--muted); margin-top: 3px; }
header > span { background:#eef5f9; border:1px solid #c8dbe6; color:#315f7d; padding:7px 11px; font-size:12px; font-weight:700; }

.panel {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius:6px;
  box-shadow: 0 8px 24px rgba(24, 43, 58, .055);
  padding: 22px;
  margin-bottom: 16px;
}

.panel h2 { font-size:18px; margin-bottom:6px; color:#1a3448; font-weight:700; }
.hidden { display: none; }

.topics { display:grid; grid-template-columns:repeat(3,1fr); gap:14px; margin-top:20px; }
.topic { min-height:190px; margin:0; padding:20px; background:#fff; border:1px solid var(--line); border-radius:5px; text-align:left; color:var(--ink); cursor:pointer; box-shadow:none; transition:border-color .16s,box-shadow .16s,transform .16s; }
.topic:hover { background:#fbfdfe; border-color:#7fa9c3; box-shadow:0 10px 24px rgba(28,72,101,.09); transform:translateY(-2px); }
.topic-top { display:flex; justify-content:space-between; align-items:center; margin:0 0 12px; }
.topic-top small { color:var(--blue); font-size:12px; font-weight:700; letter-spacing:.04em; }
.topic-top i { color:#668092; font-size:11px; font-style:normal; font-weight:400; }
.topic b { display:block; min-height:48px; color:#203746; font-size:16px; line-height:1.5; font-weight:700; }
.topic-role { display:block; margin-top:12px; color:#4e6c80; font-size:12px; font-weight:600; }
.topic p { margin-top:10px; color:#657986; font-size:13px; line-height:1.65; font-weight:400; }

.modules { display: flex; gap: 8px; overflow: auto; margin-bottom: 14px; padding-bottom: 3px; }
.modules button { white-space: nowrap; border: 1px solid var(--line); background: #fff; padding: 8px 11px; color: #445866; cursor: pointer; margin: 0; }
.modules button.active { background: var(--blue); color: #fff; border-color: var(--blue); }

.lesson-stage-nav { display:grid; grid-template-columns:repeat(6,1fr); gap:8px; margin:0 0 14px; }
.lesson-stage-nav button { display:flex; align-items:center; gap:9px; min-height:50px; margin:0; padding:9px 11px; border-color:#ccd7de; background:#fff; color:#4a6070; text-align:left; }
.lesson-stage-nav button b { display:grid; place-items:center; width:23px; height:23px; background:#edf3f6; color:#4a718b; font-size:11px; }
.lesson-stage-nav button span { font-size:12px; }
.lesson-stage-nav button:hover { background:#f7fafb; border-color:#8eacbf; }
.lesson-stage-nav button.active { border-color:var(--blue); background:var(--blue); color:#fff; }
.lesson-stage-nav button.active b { background:rgba(255,255,255,.18); color:#fff; }
.lesson-stage-nav button.completed:not(.active)::after { content:"已完成"; margin-left:auto; color:#28714e; font-size:10px; }
.lesson-stage-grid { display:grid; grid-template-columns:minmax(300px,.72fr) minmax(0,1.28fr); gap:14px; align-items:start; }
.stage-guide { position:sticky; top:14px; min-height:360px; background:linear-gradient(145deg,#f8fbfd,#edf5f9); }
.stage-kicker { display:inline-block; margin-bottom:12px; padding:4px 8px; background:#dcecf5; color:#2e6587; font-size:11px; font-weight:700; }
.stage-guide h2 { margin-bottom:12px; font-size:23px; }
.stage-guide > p { color:#516a79; font-size:14px; line-height:1.85; }
.case-file { margin-top:22px; padding:15px 16px; border:1px solid #cfdee7; background:#fff; }
.case-file b { display:block; margin-bottom:7px; color:#2b536b; font-size:12px; }
.case-file p { color:#455e6d; line-height:1.75; }
.stage-output { margin-top:28px; padding-top:18px; border-top:1px solid #d6e2e9; }
.stage-output b,.stage-output span { display:block; }
.stage-output b { color:#284c63; font-size:12px; }
.stage-output span { margin-top:6px; color:#607887; }
.stage-work h2 { font-size:21px; }
.stage-form label { margin-top:16px; font-size:13px; }
.stage-form textarea { min-height:105px; }
.stage-form button { width:auto; min-width:190px; }
.issue-field { margin:18px 0 0; padding:14px; border:1px solid #d6e0e6; background:#fafcfd; }
.issue-field legend { padding:0 6px; color:#3c4f5c; font-size:12px; font-weight:700; }
.review-checks { display:grid; gap:8px; }
.review-checks label { display:flex; align-items:center; gap:7px; margin:0; font-weight:500; }
.review-checks input { width:auto; margin:0; }
.save-message { min-height:20px; margin:8px 0 0; color:#28714e; font-size:12px; }

.workbench { display: grid; grid-template-columns: minmax(350px, .8fr) minmax(0, 1.2fr); gap: 14px; align-items: start; }
.task-column { position: sticky; top: 14px; max-height: calc(100vh - 28px); overflow: auto; }
.input-column { min-width: 0; }
.task-brief h3 { font-size: 14px; margin: 18px 0 6px; color: #264e69; }
.task-intro { color: #354c5c; }
.requirement-list, .submission-list { margin: 6px 0 0; padding-left: 22px; color: #344b5c; }
.requirement-list li, .submission-list li { margin: 6px 0; }
.completion-rule { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); }

.material-group { margin-top:16px; }
.material-group:first-child { margin-top:12px; }
.material-group-title { display:flex; justify-content:space-between; align-items:center; padding:7px 9px; background:#edf3f6; border-left:3px solid #7fa9c3; color:#395b70; }
.material-group-title b { font-size:12px; }
.material-group-title span { color:#728592; font-size:11px; }
.material { border-bottom: 1px solid #e5eaee; padding: 11px 4px; }
.material:last-child { border: 0; }
.material b { display: block; color: #204d6c; }
.material small { color: #708391; }
.material-name { display:block; margin-top:4px; color:#3d4f5c; font-size:13px; }
.material-head { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; }
.material-type { flex:0 0 auto; padding:2px 6px; border:1px solid #cfdae1; background:#f5f8fa; color:#5b7281; font-size:11px; }
.material button { width:100%; margin-top:10px; padding:7px 10px; background:#fff; color:var(--blue); }
.material button:hover, .material.selected button { background:#eef5f9; color:var(--blue-dark); }
.material.selected { margin:0 -10px; padding:11px 10px; background:#f4f9fc; border-left:3px solid var(--blue); }
.material.completed { background:#fbfdfc; }
.material-status { flex:0 0 auto; padding:2px 7px; border:1px solid #b9d7c8; background:#f0f8f4; color:#28714e; font-size:11px; }
.material-document { margin:14px 0 18px; border:1px solid #c8d3da; background:#fbfcfd; }
.material-document.empty { border-style:dashed; background:#f7f9fa; }
.document-head { display:flex; align-items:center; gap:12px; padding:11px 14px; border-bottom:1px solid #d8e0e5; background:#eef3f6; }
.document-head span { flex:0 0 auto; padding:3px 7px; background:#fff; border:1px solid #c9d6de; color:#627985; font-size:10px; font-weight:700; }
.document-head b { color:#27485d; font-size:13px; }
.material-document pre { min-height:110px; max-height:340px; margin:0; padding:18px; overflow:auto; white-space:pre-wrap; color:#273b48; font:400 14px/1.85 "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", Arial, sans-serif; }
.form-guide { margin:4px 0 14px; padding:10px 12px; background:#f4f7f9; border-left:3px solid #8eb2c8; color:#536b7a; }

.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
label { display: block; font-size: 12px; font-weight: 700; margin-top: 10px; color: #3c4f5c; }
input, textarea, select { display:block; width:100%; margin-top:5px; border:1px solid #bdc9d2; border-radius:4px; padding:10px; color:var(--ink); background:#fff; font:inherit; font-size:14px; line-height:1.45; }
input:focus, textarea:focus, select:focus { outline:0; border-color:var(--blue); box-shadow:0 0 0 3px rgba(31,95,139,.1); }
textarea { min-height: 72px; resize: vertical; }
select option { background: #fff; }
.check { display: flex; align-items: center; gap: 7px; }
.check input { width: auto; margin: 0; }
.dimension-field { margin:14px 0 2px; padding:0; border:0; }
.dimension-field legend { color:#3c4f5c; font-size:12px; font-weight:700; }
.dimension-options { display:flex; flex-wrap:wrap; gap:8px; margin-top:7px; }
.dimension-options label { display:flex; align-items:center; gap:6px; margin:0; padding:7px 10px; border:1px solid #cfd8de; border-radius:4px; background:#fafcfd; font-weight:500; }
.dimension-options input { width:auto; margin:0; }
.task-steps { display:grid; gap:8px; margin:14px 0 0; padding:0; list-style:none; counter-reset:task-step; }
.task-steps li { position:relative; padding:10px 10px 10px 39px; border:1px solid #dce4e9; background:#fafcfd; color:#526875; }
.task-steps li::before { counter-increment:task-step; content:counter(task-step); position:absolute; left:10px; top:10px; display:grid; place-items:center; width:20px; height:20px; background:#dfeef6; color:#245b7d; font-size:11px; font-weight:800; }
.task-steps b { display:block; color:#29495e; font-size:13px; }
.task-steps span { display:block; margin-top:2px; font-size:12px; line-height:1.55; }

button { border:1px solid var(--blue); background:var(--blue); color:#fff; padding:9px 14px; margin-top:12px; cursor:pointer; font:inherit; font-weight:700; border-radius:4px; }
button:hover { background: var(--blue-dark); border-color: var(--blue-dark); }

.decision-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 14px; }
.wide, .form-section { grid-column: 1 / -1; }
.form-section { margin: 20px 0 2px; padding: 8px 10px; border-left: 3px solid var(--blue); background: #eef5f9; color: #245474; font-weight: 700; font-size: 13px; }
.decision-grid .form-section:first-child { margin-top: 5px; }
.actions { display: flex; gap: 10px; }
.actions button:first-child { background: #fff; border-color: #8ea2b0; color: #435866; }
.actions button:first-child:hover { background: #edf1f4; }

.ledger-item { border-top: 1px solid #e1e7eb; padding: 10px 0; font-size: 13px; }
.ledger-item b, .ledger-item small, .ledger-item span { display: block; }
.ledger-item b { color: #244b67; }
.ledger-item small { color: #748795; margin: 2px 0; }
.ledger-item span { color: var(--muted); }
.saved-title { margin:18px 0 2px; padding-top:14px; border-top:1px solid #e1e7eb; color:#29495e; font-size:14px; }

.module-activity-head { display:flex; justify-content:space-between; gap:34px; align-items:flex-start; padding:24px 28px; }
.module-activity-head > div:first-child { max-width:820px; }
.module-activity-head h2 { margin-bottom:9px; font-size:24px; }
.module-activity-head p { color:#566e7d; line-height:1.8; }
.module-activity-head .stage-output { flex:0 0 310px; margin:0; padding:13px 0 0 20px; border-top:0; border-left:1px solid #d6e2e9; }
.module-activity-grid { display:grid; grid-template-columns:minmax(330px,.72fr) minmax(0,1.28fr); gap:14px; align-items:start; }
.module-activity-side { position:sticky; top:14px; max-height:calc(100vh - 28px); overflow:auto; }
.activity-steps { margin:15px 0 0; padding:0; list-style:none; counter-reset:activity-step; }
.activity-steps li { position:relative; margin-top:9px; padding:11px 12px 11px 43px; border:1px solid #dce4e9; background:#fafcfd; color:#4c6271; line-height:1.65; }
.activity-steps li::before { counter-increment:activity-step; content:counter(activity-step); position:absolute; left:12px; top:12px; display:grid; place-items:center; width:21px; height:21px; background:#dfeef6; color:#245b7d; font-size:11px; font-weight:800; }
.module-material-panel { padding-bottom:14px; }
.module-clue-progress { margin:10px 0 12px; padding:9px 11px; border-radius:8px; background:#fff7df; color:#765416; font-size:12px; line-height:1.6; }
.module-mission { margin:12px 0 0; padding:10px 12px; border-left:4px solid #e6aa34; border-radius:6px; background:#fff7df; color:#765416; font-weight:600; line-height:1.6; }
.module-clue-day { margin-top:12px; }
.module-clue-day h3 { margin:0 0 5px; padding:7px 9px; border-left:3px solid #efbd52; color:#765416; background:#fffaf0; font-size:13px; }
.module-material { display:grid; grid-template-columns:88px 1fr auto; gap:8px; align-items:center; width:100%; margin:9px 0 0; padding:11px 12px; border:1px solid #d7e0e6; background:#fff; color:#304b5c; text-align:left; font-weight:500; }
.module-material b { color:#23638d; font-size:12px; }
.module-material span { font-size:13px; }
.module-material i { color:#49758f; font-size:11px; font-style:normal; }
.module-material:hover,.module-material.active { border-color:#79a4bf; background:#eef6fa; color:#233e4f; }
.module-material.opened i { color:#18724c; }
.module-activity-main { min-width:0; }
.module-activity-main .material-document pre { min-height:220px; max-height:460px; }
.teacher-answer,.teacher-ai-tools { margin-top:16px; padding:16px; border:1px solid #c9dce7; border-radius:12px; background:#f5fafc; }
.teacher-answer h3 { margin:0 0 10px; font-size:17px; }
.teacher-answer p { margin:7px 0; line-height:1.7; }
.teacher-answer pre { margin:12px 0 0; padding:12px; white-space:pre-wrap; overflow-wrap:anywhere; background:#fff; border:1px solid #dce8ee; border-radius:8px; }
.teacher-ai-tools .hint { margin:8px 0 0; }
#moduleFields { display:grid; grid-template-columns:1fr 1fr; gap:0 14px; }
#moduleFields label:nth-child(3n) { grid-column:1/-1; }
#moduleFields textarea { min-height:105px; }

.topic-dialog { position:fixed; inset:0; z-index:20; display:grid; place-items:center; padding:34px; background:rgba(20,40,54,.48); }
.topic-dialog-card { position:relative; width:min(1040px,calc(100vw - 80px)); max-height:calc(100vh - 68px); overflow:auto; padding:34px 38px 30px; background:#fff; border:1px solid #c8d6df; border-radius:7px; box-shadow:0 28px 80px rgba(12,35,51,.28); }
.dialog-close { position:absolute; right:20px; top:15px; width:36px; height:36px; margin:0; padding:0; border:0; background:transparent; color:#5f7381; font-size:27px; font-weight:400; line-height:1; }
.dialog-close:hover { border:0; background:#eef3f6; color:#203b4c; }
.detail-code { color:var(--blue); font-size:12px; font-weight:700; letter-spacing:.08em; }
.topic-dialog-card > h2 { margin:7px 54px 10px 0; color:#183345; font-size:25px; line-height:1.35; }
.detail-scenario { max-width:900px; color:#5c7180; font-size:14px; line-height:1.8; }
.detail-facts { display:grid; grid-template-columns:.75fr 1.2fr 1fr; gap:12px; margin:24px 0 27px; }
.detail-facts div { padding:15px 16px; background:#f5f8fa; border:1px solid #dce5ea; }
.detail-facts span { display:block; margin-bottom:6px; color:#718592; font-size:11px; }
.detail-facts b { display:block; color:#294657; font-size:13px; line-height:1.55; font-weight:600; }
.topic-dialog-card > h3 { margin:0 0 13px; color:#203d50; font-size:16px; }
.flow-nodes { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; }
.flow-node { display:flex; gap:12px; min-height:96px; padding:15px; border:1px solid #d7e1e7; border-top:3px solid #8fb4ca; background:#fff; }
.flow-node > span { color:#7aa1b9; font-size:12px; font-weight:800; }
.flow-node b { display:block; margin-bottom:5px; color:#254456; font-size:13px; }
.flow-node p { color:#6a7d88; font-size:12px; line-height:1.6; }
.dialog-actions { display:flex; justify-content:flex-end; gap:10px; margin-top:24px; padding-top:20px; border-top:1px solid #e1e7eb; }
.dialog-actions button { width:auto; min-width:130px; margin:0; }
.dialog-actions .secondary-button { background:#fff; border-color:#aabac4; color:#405866; }
.dialog-actions .secondary-button:hover { background:#f2f5f7; border-color:#8196a4; }

.feedback-launcher { position:fixed; right:22px; bottom:22px; z-index:18; margin:0; padding:11px 15px; border:0; border-radius:999px; background:#186b86; box-shadow:0 8px 24px rgba(20,79,103,.25); font-size:13px; }
.feedback-launcher span { margin-right:5px; font-size:15px; }
.feedback-launcher:hover { background:#10536a; }
.feedback-dialog { position:fixed; inset:0; z-index:30; display:grid; place-items:center; padding:26px; background:rgba(20,40,54,.5); }
.feedback-card { position:relative; width:min(580px,calc(100vw - 40px)); padding:30px 32px 25px; border:1px solid #c8d6df; border-radius:10px; background:#fff; box-shadow:0 24px 70px rgba(12,35,51,.28); }
.feedback-card > h2 { margin:6px 45px 7px 0; color:#183345; font-size:23px; }
.feedback-card > p { color:#5c7180; line-height:1.65; }
.feedback-types { margin:18px 0 3px; padding:0; border:0; }
.feedback-types legend { margin-bottom:9px; color:#3c4f5c; font-size:12px; font-weight:700; }
.feedback-types > div { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.feedback-types label { display:flex; align-items:center; gap:7px; margin:0; padding:10px; border:1px solid #d7e2e8; border-radius:6px; background:#f8fbfc; color:#365567; font-weight:600; cursor:pointer; }
.feedback-types input { width:auto; margin:0; }
.feedback-actions { display:flex; justify-content:flex-end; gap:10px; margin-top:17px; }
.feedback-actions button { margin:0; }
.feedback-actions .secondary-button { background:#fff; border-color:#aabac4; color:#405866; }
@media (max-width:620px) { .feedback-launcher { right:13px; bottom:13px; } .feedback-card { padding:25px 20px 20px; } .feedback-types > div { grid-template-columns:1fr; } }
