:root {
  --bg: #f3f5fb;
  --panel: rgba(255, 255, 255, 0.96);
  --panel-soft: #f7faff;
  --line: #dbe4f2;
  --line-strong: #c7d4e9;
  --primary: #2459d6;
  --primary-soft: #e9f0ff;
  --text: #162033;
  --muted: #607086;
  --danger: #c24141;
  --ok: #1f9d55;
  --shadow: 0 18px 40px rgba(20, 35, 71, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  min-height: 100vh;
  background:
    radial-gradient(circle at top right, rgba(122, 162, 255, 0.24), transparent 30%),
    radial-gradient(circle at left top, rgba(57, 152, 216, 0.14), transparent 22%),
    linear-gradient(180deg, #f8fbff 0%, var(--bg) 55%, #eef3fb 100%);
}

.container {
  max-width: 1360px;
  margin: 0 auto;
  padding: 28px 20px 48px;
}

h1,
h2,
h3 {
  margin: 0 0 12px;
}

a {
  color: inherit;
  text-decoration: none;
}

.page-shell {
  position: relative;
}

.page-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 18px;
  padding: 28px;
  border: 1px solid rgba(207, 219, 240, 0.9);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(229, 237, 255, 0.95), rgba(255, 255, 255, 0.98)),
    var(--panel);
  box-shadow: var(--shadow);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  margin-bottom: 10px;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #5b6f96;
}

.hero-copy {
  max-width: 720px;
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.ghost-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: #23478f;
  font-size: 14px;
  font-weight: 600;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

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

.auth-panel {
  max-width: 520px;
}

.auth-panel--compact {
  max-width: 460px;
}

label {
  display: block;
  margin: 12px 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

input,
textarea,
select,
button {
  width: 100%;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: #96afe6;
  box-shadow: 0 0 0 4px rgba(36, 89, 214, 0.12);
}

textarea {
  min-height: 88px;
  resize: vertical;
}

button {
  cursor: pointer;
  min-height: 44px;
  border-color: #ccd6ea;
  background: #eff4ff;
  color: #19376d;
  font-weight: 600;
}

button.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 12px 22px rgba(36, 89, 214, 0.22);
}

button.danger {
  background: #fdecec;
  border-color: #f5c2c2;
  color: var(--danger);
}

button:hover {
  transform: translateY(-1px);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.7;
  transform: none;
  box-shadow: none;
}

.inline {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.inline > * {
  flex: 1;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th,
td {
  border-bottom: 1px solid #edf0f6;
  padding: 12px 10px;
  text-align: left;
  vertical-align: top;
}

th {
  background: rgba(248, 250, 255, 0.88);
  color: #42536e;
  font-weight: 700;
}

.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.actions button {
  width: auto;
  min-height: auto;
  padding: 8px 12px;
  font-size: 12px;
  border-radius: 999px;
}

.notice-slot {
  position: sticky;
  top: 14px;
  z-index: 30;
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
  pointer-events: none;
}

.notice {
  width: min(420px, 100%);
  padding: 14px 16px;
  border-radius: 18px;
  font-size: 13px;
  line-height: 1.6;
  box-shadow: 0 18px 30px rgba(16, 24, 40, 0.12);
  animation: notice-slide 0.22s ease;
}

.notice-title {
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.notice.error {
  background: #fdeaea;
  color: #8e1f1f;
  border: 1px solid #f8c7c7;
}

.notice.success {
  background: #ebf8ef;
  color: #1f7a43;
  border: 1px solid #c6ebd1;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.toolbar .actions {
  gap: 8px;
}

.small {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 14px;
}

.section-title {
  margin: 0;
  font-size: 22px;
}

.section-copy {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.form-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.form-actions button {
  width: auto;
  min-width: 128px;
}

.table-wrap {
  margin-top: 16px;
  overflow: auto;
  border: 1px solid #edf1f8;
  border-radius: 16px;
  background: rgba(252, 253, 255, 0.86);
}

.summary-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff, #f7faff);
}

.summary-label {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6b7da0;
}

.summary-value {
  margin-top: 10px;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.1;
}

.summary-meta {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.tab-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tab-button {
  width: auto;
  min-width: 0;
  padding: 11px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
}

.tab-button.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 14px 26px rgba(36, 89, 214, 0.2);
}

.dashboard-view {
  display: none;
}

.dashboard-view.active {
  display: block;
  animation: view-fade 0.24s ease;
}

.overview-grid,
.workspace-grid {
  display: grid;
  gap: 16px;
}

.overview-grid {
  grid-template-columns: minmax(300px, 420px) minmax(0, 1fr);
}

.workspace-grid--wide {
  grid-template-columns: minmax(360px, 0.9fr) minmax(520px, 1.1fr);
  align-items: stretch;
}

.workspace-grid--wide > .panel {
  margin-bottom: 0;
  height: 100%;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.quick-actions > a {
  display: block;
}

.selection-card {
  min-height: 100%;
}

.selected-tree-name {
  font-size: 28px;
  font-weight: 700;
}

.selected-tree-desc {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.8;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.feature-list {
  display: grid;
  gap: 12px;
}

.feature-item {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.teacher-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.teacher-toolbar-meta {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.6;
}

.info-panel {
  min-height: 100%;
}

.is-active-row {
  background: #eef4ff;
}

@keyframes notice-slide {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes view-fade {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.node-level {
  color: #4b5563;
}

.tree-box {
  border: 1px solid #e6eaf3;
  border-radius: 10px;
  padding: 10px;
  max-height: 320px;
  overflow: auto;
  background: #fcfdff;
}

.tree-item {
  margin: 4px 0;
}

.tree-item .score {
  color: #0f4dbf;
  font-size: 12px;
  margin-left: 6px;
}

.panel--mindmap {
  display: grid;
  grid-template-rows: auto minmax(640px, 1fr);
  min-height: 720px;
}

.panel--mindmap .section-header {
  margin-bottom: 12px;
}

.mindmap {
  height: 100%;
  min-height: 0;
  border: 1px solid #dfe6f4;
  border-radius: 10px;
  padding: 14px;
  overflow: auto;
  background: #fbfcff;
}

.mindmap ul {
  list-style: none;
  margin: 0;
  padding-left: 20px;
}

.mindmap li {
  position: relative;
  margin: 8px 0;
  padding-left: 14px;
}

.mindmap li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 11px;
  width: 10px;
  border-top: 1px solid #b8c4dd;
}

.mindmap li::after {
  content: '';
  position: absolute;
  left: 0;
  top: -8px;
  bottom: -8px;
  border-left: 1px solid #b8c4dd;
}

.mindmap > ul > li::after {
  display: none;
}

.mindmap-node {
  display: inline-block;
  border: 1px solid #d8e0f2;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  background: #fff;
}

.mindmap-node.root {
  border-color: #9bb6f8;
  background: #ebf1ff;
  font-weight: 700;
}

.sort-editor {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sort-editor input {
  min-width: 84px;
  max-width: 96px;
}

.sort-editor button {
  width: auto;
  min-height: auto;
  padding: 8px 12px;
  font-size: 12px;
  border-radius: 999px;
}


.score-work {
  min-width: 220px;
}

.score-work-code {
  min-height: 88px;
  min-width: 260px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  background: #f8fbff;
}

.score-work-image {
  margin-top: 6px;
  max-width: 180px;
  border: 1px solid #d9e3f3;
  border-radius: 8px;
}

.score-work-image-group {
  margin-top: 8px;
}

.student-problem-list {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.student-problem-item {
  padding: 10px;
  border: 1px solid #dbe5f5;
  border-radius: 10px;
  background: #fff;
}

.student-image-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
}

.student-submission-image-link {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  color: #214ca3;
  text-decoration: none;
  font-weight: 600;
}

.submission-review-table {
  min-width: 1120px;
}

.submission-score-cell {
  min-width: 140px;
}

.submission-comment-cell {
  min-width: 280px;
}

.submission-score-input {
  min-width: 120px;
}

.submission-comment-input {
  min-width: 260px;
  min-height: 88px;
  resize: vertical;
}

.entity-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.entity-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.entity-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  background: #edf3ff;
  color: #214ca3;
  font-size: 12px;
}

.entity-pill.system {
  background: #eef8ff;
  color: #16607f;
}

.entity-pill.readonly {
  background: #f3f5f8;
  color: #4c5968;
}

.system-tree-settings-list {
  display: grid;
  gap: 12px;
}

.system-tree-card {
  border: 1px solid #dfe7f4;
  border-radius: 12px;
  padding: 12px;
  background: #fbfcff;
}

.system-tree-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.system-tree-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
  margin-top: 12px;
  font-size: 13px;
}

.system-rule-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.system-rule-item {
  border: 1px solid #e5ebf6;
  border-radius: 10px;
  padding: 10px;
  background: #fff;
  font-size: 13px;
  line-height: 1.5;
}

.system-node-table-wrap {
  margin-top: 10px;
  overflow: auto;
}

.system-node-table {
  min-width: 720px;
}

@media (max-width: 980px) {
  .system-tree-meta-grid,
  .system-rule-list {
    grid-template-columns: 1fr;
  }
}

.student-tree-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.student-tree-stats {
  min-width: 180px;
  padding: 10px 12px;
  border: 1px solid #dbe5f5;
  border-radius: 10px;
  background: #f8fbff;
  font-size: 13px;
}

.student-tree-list {
  margin-top: 14px;
}

.student-node-card {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #e1e8f5;
  border-radius: 12px;
  background: #fcfdff;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.student-node-card.branch {
  background: linear-gradient(180deg, #fcfdff, #f7faff);
}

.student-node-card.branch.is-expanded {
  border-color: #c9daf5;
  box-shadow: 0 12px 24px rgba(27, 53, 108, 0.08);
}

.student-node-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.student-node-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.student-node-title {
  font-weight: 700;
}

.student-node-kind {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: #edf3ff;
  color: #214ca3;
  font-size: 12px;
}

.student-branch-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid #cbd8ef;
  background: #ffffff;
  color: #214ca3;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.student-branch-toggle.is-open {
  border-color: #b7cbef;
  background: #eef4ff;
}

.student-branch-hint {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.student-node-score {
  margin-top: 8px;
  font-size: 14px;
}

.student-node-children {
  margin-top: 12px;
  padding-left: 14px;
  border-left: 2px solid #e6eefb;
}

.student-task-panel {
  margin-top: 12px;
  border: 1px dashed #c8d7ef;
  border-radius: 12px;
  background: #fff;
  padding: 10px 12px;
}

.student-task-panel summary {
  cursor: pointer;
  font-weight: 600;
}

.student-problem-box {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #d7e4f6;
  border-radius: 12px;
  background: linear-gradient(180deg, #f9fbff, #f3f7ff);
}

.student-problem-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.student-problem-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.student-problem-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid #c8d7ef;
  background: #fff;
  color: #214ca3;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}

.student-problem-preview {
  display: block;
  margin-top: 8px;
  max-width: 220px;
  border: 1px solid #d9e3f3;
  border-radius: 8px;
}

.student-submission-form {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #edf1f8;
}

.student-form-actions {
  margin-top: 10px;
}

.student-history-list {
  margin-top: 14px;
}

.student-submission-item {
  margin-top: 10px;
  padding: 12px;
  border: 1px solid #e5ebf6;
  border-radius: 10px;
  background: #f9fbff;
}

.student-submission-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.student-review-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 12px;
}

.student-review-pill.reviewed {
  background: #ebf8ef;
  color: #1f7a43;
}

.student-review-pill.pending {
  background: #fff4da;
  color: #9b6900;
}

.student-review-comment {
  margin-top: 8px;
  padding: 8px 10px;
  border-left: 3px solid #8aa8eb;
  background: #eef4ff;
  font-size: 13px;
}

.student-code-block {
  margin-top: 10px;
  white-space: pre-wrap;
  word-break: break-word;
  background: #f7f9ff;
  border: 1px solid #dce6f7;
  border-radius: 10px;
  padding: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.5;
}

.student-image-box {
  margin-top: 10px;
}

.student-submission-image {
  display: block;
  margin-top: 8px;
  max-width: 220px;
  border: 1px solid #d9e3f3;
  border-radius: 8px;
}
.student-file-list {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.student-file-item {
  padding: 10px;
  border: 1px solid #dbe5f5;
  border-radius: 10px;
  background: #fff;
}

.student-file-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.student-file-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid #c8d7ef;
  background: #fff;
  color: #214ca3;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}


.dashboard-layout {
  display: grid;
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.dashboard-layout--student {
  grid-template-columns: minmax(300px, 0.95fr) minmax(0, 1.05fr);
}

.empty-state {
  padding: 24px;
  border: 1px dashed var(--line-strong);
  border-radius: 18px;
  background: linear-gradient(180deg, #fcfdff, #f6f9ff);
  color: var(--muted);
  text-align: center;
}

.entity-title-row {
  row-gap: 8px;
}

.student-tree-shell {
  margin-bottom: 14px;
  border: 1px solid #dfe7f4;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 255, 0.96));
  box-shadow: var(--shadow);
  overflow: hidden;
}

.student-tree-summary {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 20px;
  cursor: pointer;
  list-style: none;
}

.student-tree-summary::-webkit-details-marker {
  display: none;
}

.student-tree-summary-main {
  flex: 1;
}

.student-tree-summary-main h3 {
  margin-bottom: 8px;
}

.student-tree-summary-stats {
  min-width: 240px;
  display: grid;
  gap: 10px;
}

.student-stat-chip {
  padding: 12px 14px;
  border: 1px solid #dbe5f5;
  border-radius: 16px;
  background: #f8fbff;
}

.student-stat-chip span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}

.student-stat-chip strong {
  font-size: 15px;
}

.student-tree-body {
  padding: 0 20px 20px;
  border-top: 1px solid #edf2fb;
}

.student-node-card.leaf {
  background: linear-gradient(180deg, #ffffff, #fbfcff);
}

.student-node-card.locked {
  border-color: #ead7c3;
  background: linear-gradient(180deg, #fffdf8, #fff8ef);
}

.student-inline-banner {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid #cfe0ff;
  border-radius: 16px;
  background: linear-gradient(180deg, #f6faff, #eef4ff);
  color: #21458e;
  font-size: 13px;
  font-weight: 600;
}

.student-tool-actions {
  gap: 10px;
}

.student-tool-actions button {
  width: auto;
  min-width: 120px;
}

.student-tool-summary-grid,
.student-report-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.student-mini-card {
  min-height: 100%;
}

.student-mini-card .summary-value {
  font-size: 22px;
}

.student-claim-item,
.student-report-card {
  gap: 10px;
}

.student-claim-item.is-claimable {
  border-color: #c7dafd;
  background: linear-gradient(180deg, #ffffff, #f1f6ff);
}

.student-claim-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.student-claim-meta {
  margin-top: 8px;
  color: #21458e;
  font-size: 13px;
  font-weight: 600;
}

.student-highlight-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.student-highlight-item {
  padding: 10px 12px;
  border: 1px solid #dce7f7;
  border-radius: 12px;
  background: #fbfdff;
  font-size: 13px;
  line-height: 1.6;
}

.student-encouragement {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: linear-gradient(180deg, #f8fbff, #f1f6ff);
  border: 1px solid #d8e5fa;
  color: #21458e;
  line-height: 1.7;
}


.student-pet-editor {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff, #f7faff);
}

.pet-frame-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.pet-frame-tab {
  width: auto;
  min-width: 0;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
}

.pet-frame-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 14px 26px rgba(36, 89, 214, 0.18);
}

.pet-frame-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.pet-frame-summary-card {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.76);
}

.pet-frame-summary-card.is-active {
  border-color: rgba(36, 89, 214, 0.36);
  box-shadow: 0 14px 28px rgba(36, 89, 214, 0.1);
}

.pet-frame-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.pet-frame-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.pet-frame-order {
  margin-bottom: 10px;
  font-size: 12px;
  color: var(--muted);
}

.pet-frame-thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  border-radius: 14px;
  border: 1px solid #e4eaf6;
  background: #fff;
}

.pet-frame-thumb--placeholder {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 1100px) {
  .grid,
  .overview-grid,
  .workspace-grid,
  .dashboard-layout,
  .dashboard-layout--student {
    grid-template-columns: 1fr;
  }

  .stats-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .student-tool-summary-grid,
  .student-report-stats,
  .pet-frame-summary-grid {
    grid-template-columns: 1fr;
  }

  .pet-frame-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .student-tree-summary {
    flex-direction: column;
  }

  .student-node-header {
    flex-direction: column;
  }

  .student-node-actions {
    width: 100%;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .student-tree-summary-stats {
    width: 100%;
    min-width: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workspace-grid--wide > .panel {
    height: auto;
  }

  .panel--mindmap {
    grid-template-rows: auto minmax(360px, 1fr);
    min-height: 0;
  }

  .mindmap {
    height: auto;
    min-height: 360px;
  }
}

@media (max-width: 720px) {
  .container {
    padding: 18px 14px 36px;
  }

  .page-hero,
  .panel,
  .student-tree-summary,
  .student-tree-body {
    padding-left: 16px;
    padding-right: 16px;
  }

  .page-hero,
  .teacher-toolbar,
  .toolbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .inline {
    flex-direction: column;
  }

  .stats-row,
  .quick-actions,
  .student-tree-summary-stats,
  .student-tool-summary-grid,
  .student-report-stats {
    grid-template-columns: 1fr;
  }

  .tab-bar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tab-button {
    width: 100%;
  }

  .actions {
    width: 100%;
  }

  .pet-frame-grid {
    grid-template-columns: 1fr;
  }

  .pet-frame-tab {
    width: 100%;
    justify-content: center;
  }

  .actions button,
  .form-actions button,
  .student-tool-actions button {
    width: 100%;
  }

  .student-node-card {
    margin-left: 0 !important;
  }

  .notice {
    width: 100%;
  }
}
