/* Page structure; the six palette tokens live in the shared site theme. */
body.classroom-map {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--world-paper) !important;
}
body.classroom-map #app > header {
  background: var(--world-surface);
  border-bottom: 1px solid var(--world-line);
  padding-block: 18px;
}
body.classroom-map .map-header h1 {
  font: 800 21px/1.3 "Trebuchet MS", "Microsoft YaHei", sans-serif !important;
}
body.classroom-map main {
  display: grid;
  grid-template-columns: minmax(270px, .85fr) minmax(0, 1.15fr);
  gap: 20px 28px;
  padding-top: 22px;
  max-width: 1400px;
}
body.classroom-map .controls { gap: 10px; margin: 0; }
body.classroom-map .controls > div { gap: 4px; }
body.classroom-map .controls button {
  min-width: 44px; min-height: 44px;
  padding: 8px 10px; font-size: 13px;
}
body.classroom-map .controls .utilities button { border-bottom: 0; }
body.classroom-map .map-search {
  display: flex; align-items: center; gap: 10px; margin: 0; min-width: 0;
}
body.classroom-map .map-search label {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
body.classroom-map .map-search > div { display: flex; flex: 1; min-width: 0; gap: 7px; }
body.classroom-map .map-search input {
  width: 100%; min-width: 0; flex: 1; min-height: 44px; padding: 10px 12px;
  border: 1px solid var(--world-line); border-radius: 10px;
  background: var(--world-surface); color: var(--world-ink); font: inherit;
}
body.classroom-map .map-search button { flex: 0 0 auto; min-width: 52px; min-height: 44px; padding: 8px 10px; white-space: nowrap; }
body.classroom-map .map-search p { margin: 0; font-size: 12px; white-space: nowrap; color: var(--world-muted); }
body.classroom-map .workspace {
  grid-column: 1 / -1; display: grid;
  grid-template-columns: minmax(270px, .85fr) minmax(0, 1.15fr);
  gap: 28px; align-items: start;
}
body.classroom-map .cards { display: grid; grid-template-columns: 1fr; gap: 14px; }
body.classroom-map .task-card {
  display: grid; grid-template-columns: 136px minmax(0, 1fr);
  border: 1px solid var(--world-line); border-radius: 15px;
  background: var(--world-surface); box-shadow: none;
}
body.classroom-map .task-card > .art { height: 100%; min-height: 164px; padding: 14px 12px; }
body.classroom-map .task-card .card-copy { padding: 18px 20px; background: var(--world-surface); }
body.classroom-map .task-card h2 { font-size: 19px; line-height: 1.5; margin: 0; }
body.classroom-map .card-actions { margin-top: 14px; padding-top: 0; gap: 14px; flex-wrap: wrap; }
body.classroom-map .primary {
  min-height: 40px; border-radius: 9px; padding: 9px 15px;
  background: var(--world-accent); color: var(--world-surface); font-size: 13px;
}
body.classroom-map .mark { min-height: 40px; font-size: 12px; }
body.classroom-map .topic-nav { min-height: 516px; gap: 28px 18px; }
body.classroom-map .topic-nav button {
  background: var(--world-soft); color: var(--world-ink);
  border-color: var(--world-surface); box-shadow: 0 5px 0 color-mix(in srgb, var(--world-soft) 82%, var(--world-accent));
  padding: 17px 12px; grid-template-columns: 36px minmax(0, 1fr); gap: 9px;
  font-size: 14px; line-height: 1.5;
}
body.classroom-map .topic-nav button:nth-child(even) {
  background: var(--world-sun);
  box-shadow: 0 5px 0 color-mix(in srgb, var(--world-sun) 86%, var(--world-accent));
}
body.classroom-map .topic-nav button:first-child { background: var(--world-surface); box-shadow: none; }
body.classroom-map .topic-nav svg { width: 36px; height: 36px; }
body.classroom-map .topic-nav button[aria-pressed=true] { outline: 2px solid var(--world-accent); outline-offset: 4px; }
body.classroom-map .art { background: color-mix(in srgb, var(--world-paper) 65%, white); color: var(--world-ink); }
body.classroom-map .forest-art, body.classroom-map .eye-art { background: var(--world-soft); }
body.classroom-map .diagram-borrow, body.classroom-map .speech-art { background: color-mix(in srgb, var(--world-sun) 65%, white); }
body.classroom-map .clue-tags b { background: var(--world-sun); }
body.classroom-map .is-seen { border-style: dashed; }
body.classroom-map .pager { margin-top: 16px; }
body.classroom-map .pager button { min-height: 44px; min-width: 44px; }
body.classroom-map .empty { background: var(--world-surface); }
body.classroom-map main > footer { grid-column: 1 / -1; margin: 0; padding: 12px 0; }
body.classroom-map .reader-top, body.classroom-map #reader { background: var(--world-surface); }
body.classroom-map .reader-grid article { color: var(--world-ink); }
@media (max-width: 1050px) and (min-width: 761px) {
  body.classroom-map main, body.classroom-map .workspace { grid-template-columns: 270px minmax(0, 1fr); gap: 20px; }
  body.classroom-map .topic-nav { gap: 28px 13px; }
  body.classroom-map .topic-nav button { padding: 16px 9px; grid-template-columns: 28px minmax(0, 1fr); gap: 7px; font-size: 13px; }
  body.classroom-map .topic-nav svg { width: 28px; height: 28px; }
  body.classroom-map .task-card { grid-template-columns: 118px minmax(0, 1fr); }
  body.classroom-map .task-card h2 { font-size: 17px; }
  body.classroom-map .task-card .card-copy { padding: 16px; }
  body.classroom-map .map-search { flex-wrap: wrap; gap: 5px; }
  body.classroom-map .map-search p { width: 100%; font-size: 11px; }
}
@media (max-width: 760px) {
  body.classroom-map #app > header { padding: 16px 18px; }
  body.classroom-map main { display: flex; flex-direction: column; gap: 16px; padding-top: 16px; }
  body.classroom-map .controls { width: 100%; }
  body.classroom-map .map-search { width: 100%; flex-wrap: wrap; gap: 6px; }
  body.classroom-map .map-search > div { flex-basis: 100%; }
  body.classroom-map .map-search input { font-size: 16px; }
  body.classroom-map .map-search p { font-size: 11px; }
  body.classroom-map .workspace { display: flex; flex-direction: column; gap: 18px; width: 100%; }
  body.classroom-map .topic-nav { width: 100%; min-height: 0; padding: 0 2px 4px; gap: 10px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  body.classroom-map .topic-nav button, body.classroom-map .topic-nav button:nth-child(even) {
    display: flex; flex-direction: row; justify-content: center; gap: 5px;
    min-height: 49px; padding: 8px 5px; font-size: 12px; transform: none;
    border-radius: 22% 18%; box-shadow: 0 3px 0 color-mix(in srgb, var(--world-soft) 80%, var(--world-accent));
  }
  body.classroom-map .topic-nav button:nth-child(even) { box-shadow: 0 3px 0 color-mix(in srgb, var(--world-sun) 86%, var(--world-accent)); }
  body.classroom-map .topic-nav button:first-child { grid-column: 1 / -1; justify-self: start; min-height: 44px; padding: 6px 14px; border-radius: 22px; box-shadow: none; }
  body.classroom-map .topic-nav svg, body.classroom-map .topic-nav button:first-child svg { width: 22px; height: 22px; flex-shrink: 0; }
  body.classroom-map .topic-nav button[aria-pressed=true] { outline-offset: 2px; }
  body.classroom-map .task-card { grid-template-columns: 102px minmax(0, 1fr); }
  body.classroom-map .task-card > .art { min-height: 150px; padding: 9px; }
  body.classroom-map .task-card .card-copy { padding: 15px 13px; }
  body.classroom-map .task-card h2 { font-size: 16px; }
  body.classroom-map .primary, body.classroom-map .mark { min-height: 44px; }
  body.classroom-map .primary { padding: 8px 12px; }
  body.classroom-map .card-actions { margin-top: 12px; gap: 10px; }
}

body.classroom-map .topic-nav [data-group="question"]{grid-column:1/-1;justify-self:center;width:72%;min-height:78px;grid-template-columns:36px 1fr;border-radius:28px;background:var(--world-surface);box-shadow:0 4px 0 var(--world-line)}
@media(max-width:760px){body.classroom-map .topic-nav [data-group="question"]{grid-column:span 2;justify-self:stretch;width:100%;min-height:49px;border-radius:14px}}
