:root {
  --ink: #282047;
  --muted: #6f6890;
  --line: #ded9ef;
  --bg: #f5f1ff;
  --panel: #ffffff;
  --primary: #1f73f1;
  --good: #258a55;
  --bad: #c73f4a;
}

.word-tree-page {
  display: grid;
  gap: 16px;
  max-width: 1080px;
  margin: 0 auto;
}

.word-tree-hero,
.word-tree-search,
.word-tree-result {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 14px 38px rgba(49, 38, 91, .08);
}

.word-tree-hero {
  padding: 26px;
  color: white;
  background: linear-gradient(135deg, #1f73f1, #6753c8);
}

.word-tree-hero span,
.word-tree-result-head span,
.word-tree-search label,
.word-tree-search > div > span {
  color: inherit;
  font-size: 13px;
  font-weight: 900;
}

.word-tree-hero h1 {
  margin: 8px 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.08;
}

.word-tree-hero p {
  max-width: 680px;
  margin: 0;
  color: rgba(255, 255, 255, .82);
  line-height: 1.65;
}

.word-tree-search {
  display: grid;
  grid-template-columns: minmax(260px, 380px) minmax(0, 1fr);
  gap: 18px;
  padding: 18px;
}

.word-tree-search label,
.word-tree-search > div > span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
}

.word-tree-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.word-tree-input-row button {
  color: white;
  border-color: var(--primary);
  background: var(--primary);
}

.word-tree-example-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.word-tree-example-list button {
  display: inline-grid;
  gap: 2px;
  justify-items: start;
  padding: 8px 12px;
  border-radius: 12px;
  background: #fff;
}

.word-tree-example-list small {
  color: var(--muted);
  font-size: 11px;
}

.word-tree-result {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.word-tree-empty {
  padding: 32px;
  color: var(--muted);
  text-align: center;
  font-weight: 800;
}

.word-tree-result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.word-tree-result-head span {
  color: var(--muted);
}

.word-tree-result-head h2 {
  margin: 4px 0 0;
  font-size: 36px;
}

.word-tree-result-head em {
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--primary);
  background: #edf4ff;
  font-style: normal;
  font-weight: 900;
}

.word-tree-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.word-tree-pos-groups {
  display: grid;
  gap: 12px;
}

.word-tree-pos-groups > div {
  display: grid;
  gap: 7px;
}

.word-tree-pos-groups > div > span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.word-tree-tabs button {
  display: inline-grid;
  gap: 2px;
  min-width: 92px;
  border-radius: 12px;
  background: #fff;
}

.word-tree-tabs button.active {
  color: white;
  border-color: var(--primary);
  background: var(--primary);
}

.word-tree-tabs button.primary-pos-tab {
  border-color: rgba(31, 115, 241, .45);
  box-shadow: inset 0 -3px 0 var(--primary);
}

.word-tree-tabs small {
  font-size: 11px;
  opacity: .78;
}

.word-tree-tab-panel {
  display: grid;
  gap: 14px;
  border-left: 5px solid var(--primary);
  padding-left: 14px;
}

.word-tree-tab-panel.green { border-left-color: #25a96b; }
.word-tree-tab-panel.purple { border-left-color: #6753c8; }
.word-tree-tab-panel.amber { border-left-color: #ffb12c; }
.word-tree-tab-panel.red { border-left-color: #d95465; }

.word-tree-template-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
}

.word-tree-template-meta strong {
  color: var(--ink);
  font-size: 20px;
}

.word-tree-template-meta em {
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--primary);
  background: #edf4ff;
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
}

.word-tree-node-list {
  display: grid;
  gap: 10px;
}

.word-tree-node {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
  border: 1px solid #e8e4f4;
  border-radius: 14px;
  background: #fff;
}

.word-tree-node-order {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  color: white;
  background: var(--primary);
  font-weight: 900;
}

.word-tree-node-body {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.word-tree-node-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.word-tree-node-title h3 {
  margin: 0;
  font-size: 19px;
}

.word-tree-node-title span {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  color: #56627e;
  background: #f2f5fb;
  font-size: 12px;
  font-weight: 900;
}

.word-tree-node p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.word-tree-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.word-tree-examples code {
  padding: 6px 8px;
  border-radius: 8px;
  color: #305c83;
  background: #edf6ff;
  white-space: normal;
}

@media (max-width: 720px) {
  .word-tree-search {
    grid-template-columns: minmax(0, 1fr);
  }
  .word-tree-input-row {
    grid-template-columns: minmax(0, 1fr);
  }
  .word-tree-template-meta,
  .word-tree-result-head,
  .word-tree-node-title {
    align-items: flex-start;
    flex-direction: column;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html,
body {
  max-width: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: auto;
  touch-action: pan-y;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", sans-serif;
  color: var(--ink);
  background: var(--bg);
}

a { color: var(--primary); }
button, .button-link {
  border: 1px solid #bdb7d2;
  background: #eeeaf7;
  color: var(--ink);
  padding: 10px 16px;
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
button:hover, .button-link:hover { border-color: var(--primary); }
button:disabled {
  cursor: not-allowed;
  opacity: .62;
}
input, select, textarea {
  min-height: 40px;
  border: 1px solid #bdb7d2;
  border-radius: 6px;
  padding: 8px 10px;
  background: white;
  font: inherit;
}
textarea {
  resize: vertical;
  line-height: 1.6;
}

.page { width: 100%; max-width: 1440px; margin: 0 auto; padding: 24px; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.auth-panel {
  max-width: 430px;
  margin: 64px auto;
  padding: 28px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.auth-panel h1 { margin-top: 0; }
.login-announcements {
  display: grid;
  gap: 8px;
  margin: 16px 0 20px;
  padding: 14px;
  border: 1px solid #e8d998;
  border-radius: 8px;
  background: linear-gradient(135deg, #fff8d8, #edf7ff);
}
.login-announcement-item {
  display: grid;
  gap: 3px;
  padding-top: 8px;
  border-top: 1px solid rgba(138, 106, 18, .16);
}
.login-announcement-item:first-of-type { border-top: 0; padding-top: 0; }
.login-announcement-item strong { color: var(--ink); }
.login-announcement-item span { color: var(--muted); line-height: 1.45; }
.more-link { font-weight: 800; text-decoration: none; }
.stack { display: grid; gap: 16px; }
.stack label { display: grid; gap: 8px; font-weight: 700; }
.muted { color: var(--muted); }
.error { color: var(--bad); font-weight: 700; }
.ok { color: var(--good); font-weight: 700; }
.ghost { background: white; }
.danger, .bad { color: var(--bad); border-color: #e4b5bc; background: #fff3f5; }
.good { color: var(--good); border-color: #add7bf; background: #effaf4; }
.secondary { background: white; margin-top: 12px; }

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

.content-admin-section {
  background: linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(255, 255, 255, .9));
}

.content-admin-hero {
  align-items: flex-start;
  padding-bottom: 14px;
  border-bottom: 1px solid #ece8f7;
}

.content-admin-hero h2 {
  margin-bottom: 8px;
}

.content-type-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 18px 0;
}

.content-type-tabs a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 120px;
  justify-content: center;
  padding: 12px 18px;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
  border: 1px solid #d8d0ee;
  border-radius: 12px;
  background: linear-gradient(180deg, #fff, #faf8ff);
  box-shadow: 0 8px 18px rgba(51, 39, 101, .06);
}

.content-type-tabs a.active {
  color: #fff;
  border-color: #2877f0;
  background: linear-gradient(135deg, #2877f0, #6753c8);
  box-shadow: 0 12px 24px rgba(66, 74, 204, .22);
}

.content-type-tabs span {
  color: inherit;
  opacity: .8;
  font-size: 12px;
}

.content-admin-tools {
  display: grid;
  gap: 16px;
  margin: 18px 0;
}

.content-admin-card {
  padding: 18px;
  border: 1px solid #e3def3;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(48, 36, 94, .06);
}

.content-filter-card {
  background: linear-gradient(135deg, #ffffff, #f7f5ff);
}

.content-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.content-card-head > span {
  display: grid;
  place-items: center;
  min-width: 42px;
  height: 42px;
  padding: 0 8px;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  border-radius: 12px;
  background: linear-gradient(135deg, #2877f0, #6753c8);
}

.content-card-head h3 {
  margin: 0;
  color: var(--ink);
}

.content-card-head p,
.content-list-head p,
.content-help-text {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.content-admin-card .admin-form {
  align-items: end;
  margin: 0;
}

.content-admin-card .content-filter-form {
  grid-template-columns: repeat(3, minmax(150px, 1fr)) minmax(150px, .7fr);
}

.content-admin-card .content-create-form,
.content-admin-card .content-import-form {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
}

.content-wide-field {
  grid-column: span 2;
}

.content-file-field {
  grid-column: span 2;
}

.content-help-text {
  padding: 12px 14px;
  border-radius: 12px;
  background: #f8f6ff;
  font-size: 13px;
}

.content-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 22px 0 10px;
}

.content-list-head h3 {
  margin: 0;
}

.content-table-wrap {
  border: 1px solid #e4dff3;
  border-radius: 14px;
  background: #fff;
}

.content-table-wrap table {
  min-width: 980px;
}

.content-table-wrap thead th {
  color: #5d5582;
  background: #f6f3ff;
}

.content-table-wrap tbody tr {
  border-bottom: 1px solid #eee9f8;
}

.content-table-wrap .row-form.word-form {
  grid-template-columns: minmax(160px, 1.1fr) minmax(180px, 1.2fr) minmax(150px, 1fr) 110px 110px 100px 90px 86px;
  align-items: center;
  gap: 8px;
}

.content-table-wrap td > form:last-child {
  margin-top: 8px;
}

.admin-import-report {
  margin: 18px 0;
}

.pos-review-table {
  min-width: 1180px;
}

.pos-review-workbench {
  background: #f7f9fc;
  box-shadow: none;
  border: 0;
}

.admin-breadcrumb {
  margin: 0 0 14px;
  color: #6b7894;
  font-size: 13px;
}

.pos-review-hero {
  align-items: flex-start;
  margin-bottom: 18px;
}

.pos-review-top-actions,
.pos-review-bulk-actions,
.pos-review-filter-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.pos-review-import-button {
  cursor: pointer;
}

.pos-review-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.pos-review-metric {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 98px;
  padding: 18px;
  border: 1px solid #e4e8f2;
  border-radius: 8px;
  background: #fff;
}

.pos-review-metric i {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #eef2ff;
}

.pos-review-metric.purple i { background: linear-gradient(135deg, #efe9ff, #d9cdff); }
.pos-review-metric.orange i { background: linear-gradient(135deg, #fff3df, #ffdca9); }
.pos-review-metric.green i { background: linear-gradient(135deg, #e7f8ed, #bdeccb); }
.pos-review-metric.blue i { background: linear-gradient(135deg, #e9f1ff, #bed5ff); }

.pos-review-metric div {
  display: grid;
  gap: 4px;
}

.pos-review-metric span,
.pos-review-metric small {
  color: #66738f;
}

.pos-review-metric strong {
  color: #15213d;
  font-size: 28px;
  line-height: 1;
}

.pos-review-filter-card {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr)) minmax(220px, 1.4fr) auto;
  align-items: end;
  gap: 12px;
  margin-bottom: 14px;
  padding: 16px;
  border: 1px solid #e4e8f2;
  border-radius: 8px;
  background: #fff;
}

.pos-review-filter-card label {
  display: grid;
  gap: 6px;
  color: #596984;
  font-size: 13px;
  font-weight: 800;
}

.pos-review-filter-card select,
.pos-review-filter-card input {
  min-height: 36px;
  border-color: #d8deea;
  border-radius: 6px;
  background: #fff;
}

.pos-review-table-card {
  border: 1px solid #e4e8f2;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.pos-review-table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid #edf0f6;
}

.pos-review-table-toolbar > div:first-child {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pos-review-table-wrap {
  margin: 0;
  border: 0;
  border-radius: 0;
}

.pos-review-table th,
.pos-review-table td {
  padding: 8px 12px;
  vertical-align: middle;
}

.pos-review-table tbody tr {
  height: 44px;
}

.pos-review-table tbody tr.has-pos-diff {
  background: #fffdf8;
}

.pos-review-table small {
  display: block;
  margin-top: 3px;
  color: #73809a;
  font-size: 12px;
}

.pos-review-word-link {
  width: auto;
  min-height: 0;
  padding: 0;
  color: #3c35c8;
  border: 0;
  background: transparent;
  font-weight: 900;
}

.pos-review-tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin: 2px 4px 2px 0;
  padding: 2px 8px;
  border: 1px solid #cad7ff;
  border-radius: 5px;
  color: #235ad8;
  background: #f0f5ff;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.pos-review-tag.green { color: #168048; border-color: #b9e9c9; background: #edf9f1; }
.pos-review-tag.orange { color: #c76a13; border-color: #ffd4a6; background: #fff7eb; }
.pos-review-tag.gray { color: #5f6c82; border-color: #d9dee8; background: #f6f7fa; }
.pos-review-tag.purple { color: #6a45d8; border-color: #d7caff; background: #f5f0ff; }

.pos-tag-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
}

.pos-review-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid #edf0f6;
}

.pos-review-pagination select {
  min-height: 32px;
  padding: 4px 28px 4px 8px;
}

.pos-review-empty {
  padding: 28px;
}

.pos-review-drawer-mask {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(20, 28, 45, .28);
}

.pos-review-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 61;
  width: min(460px, 92vw);
  height: 100vh;
  background: #fff;
  border-left: 1px solid #e4e8f2;
  box-shadow: -18px 0 34px rgba(24, 35, 60, .14);
  transform: translateX(105%);
  transition: transform .18s ease;
  overflow-y: auto;
}

.pos-review-drawer.open {
  transform: translateX(0);
}

.pos-review-drawer-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 22px;
  border-bottom: 1px solid #edf0f6;
  background: #fff;
}

.pos-review-drawer-head h3 {
  margin: 4px 0 0;
  color: #15213d;
  font-size: 24px;
}

.pos-review-drawer-body {
  padding: 18px 22px 26px;
}

.pos-drawer-section {
  padding: 16px 0;
  border-bottom: 1px solid #edf0f6;
}

.pos-drawer-section h4 {
  margin: 0 0 12px;
  color: #36445f;
}

.pos-drawer-section label {
  display: grid;
  gap: 7px;
  margin-bottom: 12px;
  color: #596984;
  font-weight: 800;
}

.pos-drawer-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 18px;
}

.pos-drawer-history {
  margin-top: 18px;
  padding: 12px;
  border: 1px solid #e4e8f2;
  border-radius: 8px;
}

@media (max-width: 1100px) {
  .pos-review-metrics,
  .pos-review-filter-card {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pos-review-filter-actions {
    grid-column: 1 / -1;
  }
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.topbar h1 { margin: 0; }
.topbar p { margin: 6px 0 0; color: var(--muted); }

.student-app {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: calc(100vh - 48px);
  overflow: hidden;
  background:
    radial-gradient(circle at 80% 0%, rgba(108, 92, 231, .1), transparent 28%),
    #f8f7ff;
  border: 1px solid #ebe8f8;
  border-radius: 26px;
  box-shadow: 0 22px 60px rgba(49, 38, 91, .1);
}
.student-sidebar {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 24px 18px;
  background: rgba(255, 255, 255, .9);
  border-right: 1px solid #ece9f8;
}
.student-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px 24px;
  font-size: 18px;
}
.student-brand > span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: white;
  border-radius: 10px;
  background: linear-gradient(145deg, #806df2, #5540ce);
  box-shadow: 0 7px 18px rgba(108, 92, 231, .28);
}
.side-nav {
  display: grid;
  gap: 8px;
}
.side-nav button {
  justify-content: flex-start;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  color: #4e4965;
  border: 0;
  background: transparent;
}
.side-nav button > span,
.bottom-nav button > span {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  color: #6d62a0;
  font-size: 12px;
  border: 1px solid #d9d4f2;
  border-radius: 8px;
}
.side-nav button.active {
  color: var(--primary);
  background: #efecff;
}
.side-nav button.active > span {
  color: white;
  border-color: var(--primary);
  background: var(--primary);
}
.sidebar-streak {
  display: grid;
  gap: 6px;
  margin-top: auto;
  padding: 18px;
  border-radius: 16px;
  background: linear-gradient(145deg, #f6f3ff, #fff);
  border: 1px solid #ece7ff;
}
.sidebar-streak span,
.sidebar-streak p {
  color: var(--muted);
  font-size: 12px;
}
.sidebar-streak strong {
  color: var(--primary);
  font-size: 26px;
}
.sidebar-streak strong::after {
  content: " 天";
  font-size: 13px;
}
.sidebar-streak p {
  margin: 0;
  line-height: 1.6;
}
.sidebar-user {
  justify-content: flex-start;
  gap: 10px;
  width: 100%;
  margin-top: 16px;
  padding: 10px;
  border: 0;
  background: transparent;
}
.sidebar-user > span:last-child {
  display: grid;
  gap: 3px;
  justify-items: start;
  min-width: 0;
}
.sidebar-user small {
  color: var(--muted);
}
.avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  color: white;
  font-size: 18px;
  font-weight: 900;
  border-radius: 50%;
  background: linear-gradient(145deg, #745de4, #9b8cf4);
}
.avatar.large {
  width: 70px;
  height: 70px;
  font-size: 28px;
}
.student-workspace {
  position: relative;
  min-width: 0;
  padding: 28px 36px calc(104px + env(safe-area-inset-bottom));
}
.student-workspace .mobile-panel {
  max-width: 980px;
  margin: 0 auto;
}
.student-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}
.student-header h1 {
  margin: 0;
  font-size: 28px;
}
.student-header p {
  margin: 6px 0 0;
  color: var(--muted);
}
.student-header .wave {
  color: #a27600;
  font-size: 14px;
  font-weight: 800;
}
.section-header {
  min-height: 58px;
}
.round-action {
  min-width: 52px;
  padding: 10px 12px;
  color: #4f476c;
  border-color: #e2def2;
  border-radius: 12px;
  background: white;
}
.primary-button {
  color: white;
  border-color: #5b49bc;
  background: linear-gradient(135deg, #7a64e8, #5b43d0);
}
.student-workspace .today-grid {
  gap: 16px;
  margin-bottom: 16px;
}
.student-workspace .mini-stat {
  position: relative;
  min-height: 104px;
  padding: 18px;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(52, 43, 86, .04);
}
.student-workspace .mini-stat::after {
  position: absolute;
  right: 16px;
  bottom: 16px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #f0edff;
  content: "学";
  color: var(--primary);
  font-weight: 900;
}
.student-workspace .stat-red::after {
  content: "错";
  color: #ef476f;
  background: #fff0f4;
}
.student-workspace .stat-yellow::after {
  content: "勤";
  color: #d18b00;
  background: #fff7dc;
}
.student-workspace .mini-stat strong {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 8px;
}
.student-workspace .mini-stat strong b {
  color: var(--primary);
  font-size: 34px;
}
.student-workspace .stat-red strong b { color: #ef476f; }
.student-workspace .stat-yellow strong b { color: #e49a00; }
.student-workspace .mini-stat strong small {
  color: #615a78;
  font-size: 13px;
}
.student-workspace .range-card {
  position: relative;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  align-items: center;
  padding: 18px 20px;
  border-radius: 14px;
}
.student-workspace .range-card span,
.student-workspace .range-card strong {
  grid-column: 1;
}
.student-workspace .range-card button {
  grid-column: 2;
  grid-row: 1 / 3;
  color: var(--primary);
  border-color: #ddd7fa;
  background: #f4f1ff;
}
.student-workspace .compact-study {
  min-height: 430px;
  padding: 26px;
  border-radius: 16px;
  box-shadow: 0 12px 34px rgba(54, 43, 93, .05);
}
.student-workspace .compact-study h2 {
  font-size: clamp(34px, 4vw, 48px);
}
.word-answer-line {
  display: flex;
  align-items: center;
  gap: 10px;
}
.word-answer-line .answer {
  font-size: 28px;
}
.word-sound {
  min-width: auto;
  padding: 6px 10px;
  color: var(--primary);
  border: 0;
  background: transparent;
}
.student-workspace .answer-row {
  grid-template-columns: minmax(0, 1fr) 110px;
  margin-top: 8px;
}
.student-workspace .answer-row input {
  min-height: 50px;
}
.student-workspace .explain-button {
  min-height: 46px;
}
.student-workspace .mobile-actions {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.student-workspace .mobile-actions .action-wide {
  grid-column: span 2;
}
.student-workspace .bottom-nav {
  position: absolute;
  left: 36px;
  right: 36px;
  bottom: 0;
  width: auto;
  transform: none;
  border: 1px solid #ebe8f8;
  border-bottom: 0;
  border-radius: 18px 18px 0 0;
}
.student-workspace .bottom-nav button {
  display: flex;
  gap: 7px;
}
.student-workspace .bottom-nav button.active {
  color: var(--primary);
  background: transparent;
  box-shadow: inset 0 -3px 0 var(--primary);
}
.student-workspace .bottom-nav button.active > span {
  color: white;
  border-color: var(--primary);
  background: var(--primary);
}
.article-search-card {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  padding: 12px;
  border-radius: 14px;
}
.article-search-card label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.article-date-row { display: contents; }
.article-card,
.profile-card,
.menu-card,
.trend-card,
.list-card {
  border-radius: 14px;
}
.student-workspace .record-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.student-workspace .record-grid .mini-stat {
  min-height: 94px;
}
.student-workspace .record-grid .mini-stat::after {
  display: none;
}
.student-workspace .record-grid .mini-stat strong {
  color: var(--primary);
  font-size: 28px;
}
.card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.card-title-row span {
  color: var(--muted);
  font-size: 13px;
}
.export-link {
  padding: 10px 14px;
  color: var(--primary);
  font-weight: 800;
  text-decoration: none;
  border: 1px solid #ded8fb;
  border-radius: 10px;
  background: white;
}
.activation-only-tag,
.my-post-tag {
  padding: 7px 10px;
  color: #9a6800;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
  border: 1px solid #f0d88d;
  border-radius: 999px;
  background: #fff8d9;
}
.community-compose {
  display: grid;
  gap: 14px;
  margin-bottom: 20px;
  padding: 20px;
}
.community-compose h2,
.community-list-head h2 {
  margin: 0;
}
.community-compose label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.community-compose textarea {
  min-height: 108px;
  resize: vertical;
}
.community-compose-actions,
.community-list-head,
.community-post-head,
.community-reply-form {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.community-compose-actions .primary-button {
  flex: 0 0 auto;
}
.community-list-head {
  margin: 0 0 12px;
}
.community-list {
  display: grid;
  gap: 14px;
}
.community-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  box-shadow: 0 8px 24px rgba(52, 43, 86, .04);
}
.community-post-head > div {
  display: grid;
  gap: 5px;
}
.community-post-head strong {
  color: var(--ink);
  font-size: 18px;
}
.community-post-head span,
.community-reply small {
  color: var(--muted);
  font-size: 12px;
}
.community-content {
  margin: 16px 0;
  color: #3f3957;
  line-height: 1.75;
  overflow-wrap: anywhere;
}
.content-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}
.content-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 12px 0;
}
.content-actions button {
  min-width: auto;
  padding: 8px 12px;
  color: var(--primary);
  border-color: #ded8fb;
  border-radius: 999px;
  background: #f8f6ff;
}
.content-actions button.active {
  color: white;
  border-color: var(--primary);
  background: var(--primary);
}
.content-actions button span {
  margin-left: 4px;
}
.content-view-count {
  color: var(--muted);
  font-size: 13px;
}
.community-actions {
  margin-top: -4px;
}
.inline-select {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.inline-select select {
  min-height: 34px;
  padding: 6px 10px;
}
.article-comments {
  display: grid;
  gap: 12px;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.article-comments h3 {
  margin: 0;
}
.article-comment {
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 1px solid #ece8f6;
  border-radius: 12px;
  background: #fbfaff;
}
.article-comment > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--primary);
}
.article-comment p {
  margin: 0;
  line-height: 1.65;
}
.comment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.comment-actions button {
  min-width: auto;
  padding: 6px 10px;
}
.comment-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px;
  gap: 10px;
}
.community-replies {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 12px;
  background: #f8f7fd;
}
.community-reply {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 9px;
  align-items: start;
  padding: 8px 0;
  border-bottom: 1px solid #ebe8f5;
}
.community-reply:last-child {
  border-bottom: 0;
}
.community-reply strong {
  color: var(--primary);
}
.community-reply span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.community-reply-form {
  margin-top: 12px;
}
.community-reply-form input {
  min-width: 0;
  flex: 1;
}
.community-reply-result {
  margin-bottom: 0;
}
.community-empty {
  padding: 28px;
  text-align: center;
}
.ai-chat-sheet {
  display: grid;
  gap: 12px;
}
.ai-chat-sheet .sheet-head {
  position: sticky;
  top: 0;
  z-index: 2;
  padding-bottom: 8px;
  background: white;
}
.ai-chat-note {
  padding: 10px 12px;
  color: #7a5b00;
  font-size: 13px;
  line-height: 1.6;
  border: 1px solid #ead98c;
  border-radius: 12px;
  background: #fff9dd;
}
.ai-chat-list {
  display: grid;
  gap: 10px;
  max-height: min(48vh, 460px);
  overflow-y: auto;
  padding: 4px 2px;
}
.ai-chat-message {
  display: grid;
  gap: 6px;
  max-width: 88%;
  padding: 12px 14px;
  border-radius: 14px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.ai-chat-message > strong {
  font-size: 13px;
}
.ai-chat-message p {
  margin: 0;
}
.ai-chat-body {
  display: grid;
  gap: 8px;
}
.ai-chat-body p,
.ai-chat-body ul,
.ai-chat-body ol,
.ai-chat-body blockquote {
  margin: 0;
}
.ai-chat-body ul,
.ai-chat-body ol {
  padding-left: 20px;
}
.ai-chat-body li {
  margin: 3px 0;
}
.ai-chat-body code {
  padding: 1px 5px;
  border-radius: 6px;
  background: rgba(103, 83, 200, 0.12);
}
.ai-chat-body blockquote {
  padding-left: 10px;
  color: #5d537f;
  border-left: 3px solid #d8cff7;
}
.ai-chat-message.assistant {
  justify-self: start;
  color: #352d55;
  background: #f5f2ff;
  border: 1px solid #e5defb;
}
.ai-chat-message.user {
  justify-self: end;
  color: white;
  background: linear-gradient(135deg, #7a64e8, #5b43d0);
}
.ai-chat-message.user .ai-chat-body code {
  color: white;
  background: rgba(255, 255, 255, 0.2);
}
.ai-chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 88px;
  gap: 10px;
  align-items: stretch;
}
.ai-chat-form textarea {
  min-height: 72px;
  resize: vertical;
}
.ai-chat-close-bottom {
  width: 100%;
  min-height: 42px;
  color: var(--primary);
  border: 1px solid #ded8fb;
  background: #f8f6ff;
}
.profile-hero {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px;
}
.profile-hero > div {
  display: grid;
  gap: 6px;
}
.profile-menu {
  padding: 0;
  overflow: hidden;
}
.profile-menu button,
.profile-menu .menu-link {
  min-height: 58px;
  margin: 0;
  padding: 14px 18px;
  border: 0;
  border-bottom: 1px solid #eeeaf7;
  border-radius: 0;
}
.profile-menu button:last-child { border-bottom: 0; }
.profile-menu button > span,
.profile-menu .menu-link > span {
  color: var(--ink);
  font-size: 15px;
}
.profile-menu em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  max-width: 58%;
  text-align: right;
  line-height: 1.35;
  white-space: normal;
}

.empty-study-card {
  position: relative;
  display: grid;
  min-height: 430px;
}
.study-progress {
  justify-self: start;
  padding: 6px 12px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  border-radius: 999px;
  background: #f1edff;
}
.empty-study-content {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 10px;
  min-height: 230px;
  text-align: center;
}
.empty-study-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  color: white;
  font-size: 24px;
  font-weight: 900;
  border-radius: 20px;
  background: linear-gradient(145deg, #806df2, #5540ce);
  box-shadow: 0 12px 24px rgba(103, 83, 200, .2);
}
.empty-study-content h2 {
  margin: 4px 0 0;
  font-size: 24px !important;
}
.empty-study-content p {
  max-width: 360px;
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}
.empty-study-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.profile-activation {
  justify-self: start;
  padding: 4px 9px;
  color: #6748d7;
  font-size: 12px;
  font-weight: 800;
  border-radius: 999px;
  background: #f0ecff;
}
.profile-login-link {
  margin-left: auto;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  border: 1px solid #7661e8;
  border-radius: 999px;
}
.profile-overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 12px 0;
  padding: 18px 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
}
.profile-overview > div {
  display: grid;
  justify-items: center;
  gap: 7px;
  border-right: 1px solid #eeeaf7;
}
.profile-overview > div:last-child {
  border-right: 0;
}
.profile-overview span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.profile-overview strong {
  display: flex;
  align-items: baseline;
  gap: 4px;
  color: var(--primary);
  font-size: 25px;
}
.profile-overview strong b {
  font: inherit;
}
.profile-overview small {
  color: var(--muted);
  font-size: 12px;
}
.record-type-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 12px;
  padding: 4px;
  border: 1px solid #e7e2f7;
  border-radius: 12px;
  background: white;
}
.record-type-tabs button {
  min-height: 38px;
  padding: 8px;
  border: 0;
  background: transparent;
}
.record-type-tabs button.active {
  color: white;
  background: linear-gradient(135deg, #7a64e8, #5b43d0);
}
.record-type-tabs button:not(.active):active {
  background: #f3f0ff;
}
.phrase-study-card {
  position: relative;
  text-align: center;
  background:
    radial-gradient(circle at 88% 4%, rgba(114, 82, 231, .08), transparent 30%),
    white;
}
.study-card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.phrase-study-card > h2 {
  margin: 34px 0 14px;
  color: #17123f;
  font-size: clamp(34px, 5vw, 54px);
}
.phrase-answer {
  min-height: 34px;
  margin: 0 0 18px;
  color: #6d58d9;
  font-size: 24px;
  font-weight: 800;
}
.phrase-study-card .answer-row,
.phrase-study-card .phrase-actions {
  text-align: left;
}
.phrase-study-card .explain-button {
  margin: 12px 0;
}
.phrase-actions {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}
.phrase-actions .action-wide {
  grid-column: span 2;
}
.sentence-study-card > h2 {
  max-width: 820px;
  margin-right: auto;
  margin-left: auto;
  font-size: clamp(25px, 3.2vw, 40px);
  line-height: 1.35;
}
.sentence-answer {
  max-width: 820px;
  margin-right: auto;
  margin-left: auto;
  font-size: 20px;
  line-height: 1.55;
}

.structure-hero {
  position: relative;
  align-items: center;
  min-height: 178px;
  padding: 26px;
  color: white;
  overflow: hidden;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(31, 115, 241, .96), rgba(45, 138, 255, .9)), #1f73f1;
  box-shadow: 0 18px 42px rgba(31, 115, 241, .2);
}
.structure-hero::after {
  position: absolute;
  right: 24px;
  bottom: -18px;
  width: 148px;
  height: 148px;
  border-radius: 42px;
  background: linear-gradient(145deg, rgba(255, 255, 255, .24), rgba(255, 255, 255, .08));
  transform: rotate(8deg);
  content: "";
}
.structure-hero-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
  max-width: 620px;
}
.student-header.structure-hero h1 {
  color: white;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1;
}
.student-header.structure-hero p {
  max-width: 560px;
  color: rgba(255, 255, 255, .88);
  line-height: 1.7;
}
.system-kicker {
  justify-self: start;
  margin: 0 !important;
  padding: 6px 10px;
  color: #0f5fd4 !important;
  font-size: 12px;
  font-weight: 900;
  border-radius: 999px;
  background: rgba(255, 255, 255, .88);
}
.structure-hero .header-actions {
  position: relative;
  z-index: 2;
}
.structure-hero .round-action {
  color: white;
  border-color: rgba(255, 255, 255, .32);
  background: rgba(255, 255, 255, .16);
}
.section-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
.section-title-row span,
.continue-card span,
.growth-tree article span,
.wordtree-preview-card span,
.training-grid span {
  color: #65758b;
  font-size: 13px;
  font-weight: 900;
}
.section-title-row h2,
.practice-title-row h2 {
  margin: 3px 0 0;
  color: #11243d;
  font-size: 20px;
}
.section-title-row > strong {
  color: #1f73f1;
  font-size: 26px;
}
.daily-task-card,
.continue-card,
.growth-tree-card,
.wordtree-preview-card {
  margin-bottom: 14px;
  padding: 18px;
  border: 1px solid #dbe8fb;
  border-radius: 16px;
  background: white;
  box-shadow: 0 12px 32px rgba(22, 81, 150, .06);
}
.task-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0 14px;
}
.task-grid article {
  display: grid;
  gap: 7px;
  padding: 14px;
  border-radius: 14px;
  background: #f4f8ff;
}
.task-grid article:nth-child(2) { background: #f0fbf5; }
.task-grid article:nth-child(3) { background: #fff7ec; }
.task-grid strong {
  color: #10233f;
  font-size: 24px;
}
.task-grid em {
  color: #7890aa;
  font-style: normal;
}
.task-progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9f1fb;
}
.task-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1f73f1, #2fbf71, #f2a724);
  transition: width .25s ease;
}
.continue-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
}
.continue-card strong {
  display: block;
  margin-top: 4px;
  color: #10233f;
  font-size: 22px;
}
.continue-card p {
  margin: 6px 0 0;
  color: #65758b;
}
.continue-card button,
.practice-title-row button {
  color: #1f73f1;
  border-color: #cfe0fa;
  border-radius: 12px;
  background: #f4f8ff;
}
.growth-tree {
  position: relative;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}
.growth-tree::before {
  position: absolute;
  left: 6%;
  right: 6%;
  top: 32px;
  height: 3px;
  background: #d9e8fb;
  content: "";
}
.growth-tree article {
  position: relative;
  z-index: 1;
  display: grid;
  min-width: 0;
  gap: 8px;
  padding: 11px;
  border: 1px solid #dce9fb;
  border-radius: 14px;
  background: #fbfdff;
}
.growth-tree i {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: white;
  font-style: normal;
  font-weight: 900;
  border-radius: 14px;
  background: linear-gradient(135deg, #1f73f1, #56a2ff);
  box-shadow: 0 8px 18px rgba(31, 115, 241, .2);
}
.growth-tree article:nth-child(3n + 2) i {
  background: linear-gradient(135deg, #22a867, #6edb9e);
  box-shadow: 0 8px 18px rgba(34, 168, 103, .18);
}
.growth-tree article:nth-child(3n) i {
  background: linear-gradient(135deg, #f0a01f, #ffd16a);
  box-shadow: 0 8px 18px rgba(240, 160, 31, .18);
}
.growth-tree strong {
  display: block;
  overflow: hidden;
  color: #10233f;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.growth-tree div span {
  display: block;
  margin-top: 2px;
  color: #1f73f1;
}
.growth-tree em {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8f1fb;
}
.growth-tree u {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #1f73f1;
}
.growth-tree article.is-complete {
  border-color: #bae7cf;
  background: #f5fff9;
}
.home-practice-card {
  margin-top: 0;
}
.home-practice-card .practice-title-row {
  margin-bottom: 8px;
}
.student-workspace .home-practice-card .practice-title-row h2 {
  font-size: 20px;
  line-height: 1.2;
}
.wordtree-preview-card {
  display: grid;
  gap: 22px;
}
.structure-tree-card {
  position: relative;
  overflow: hidden;
  min-height: 620px;
}
.wordtree-root {
  justify-self: center;
  display: grid;
  justify-items: center;
  min-width: min(260px, 100%);
  padding: 20px;
  color: white;
  border-radius: 24px;
  background: linear-gradient(135deg, #1f73f1, #2d8aff);
  cursor: pointer;
  box-shadow: 0 16px 36px rgba(31, 115, 241, .22);
}
.wordtree-root span,
.wordtree-root small {
  color: rgba(255, 255, 255, .88);
}
.wordtree-root strong {
  margin: 6px 0;
  font-size: 36px;
}
.wordtree-preview-grid,
.training-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.structure-node-grid {
  position: relative;
  z-index: 1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 720px;
  margin: 0 auto;
}
.wordtree-preview-grid article,
.training-grid button {
  display: grid;
  align-content: start;
  min-width: 0;
  gap: 8px;
  padding: 16px;
  text-align: left;
  border: 1px solid #dce9fb;
  border-radius: 16px;
  background: white;
  box-shadow: 0 10px 26px rgba(22, 81, 150, .05);
}
.wordtree-preview-grid article {
  min-height: 132px;
}
.wordtree-preview-grid article[data-tab-jump],
.wordtree-preview-grid article[data-structure-field],
.training-grid button {
  cursor: pointer;
}
.structure-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
.structure-status {
  margin: -6px 0 12px;
  padding: 10px 12px;
  color: #55708f;
  font-size: 13px;
  line-height: 1.55;
  border: 1px solid #dbe8fb;
  border-radius: 12px;
  background: rgba(255, 255, 255, .72);
}
.structure-status.is-warning {
  color: #8a5700;
  border-color: #f3cf8a;
  background: #fff9eb;
}
.structure-status.is-success {
  color: #167044;
  border-color: #a9dfc3;
  background: #f1fcf6;
}
.structure-status.is-loading {
  color: #2859a9;
  border-color: #b9d0f6;
  background: #f3f7ff;
}
.structure-status.is-error {
  color: #a62f43;
  border-color: #f0b7c1;
  background: #fff4f6;
}
.structure-actions #structureRefreshBtn.has-missing {
  color: #8a5700;
  border-color: #f3cf8a;
  background: #fff9eb;
}
.wordtree-preview-grid article.needs-query {
  border-color: #ffd9a8;
  background: #fffaf2;
}
.wordtree-preview-grid article.inspect-attention {
  animation: structureMissingPulse .6s ease-in-out 2;
}
.wordtree-preview-grid article.is-querying {
  pointer-events: none;
  opacity: .68;
}
.wordtree-preview-grid article.is-querying::after {
  grid-column: 1 / -1;
  color: #2859a9;
  font-size: 12px;
  font-weight: 900;
  content: "正在补充...";
}
@keyframes structureMissingPulse {
  0%, 100% { box-shadow: 0 10px 26px rgba(22, 81, 150, .05); }
  50% { box-shadow: 0 0 0 4px rgba(240, 160, 31, .2), 0 12px 28px rgba(240, 160, 31, .16); }
}
.wordtree-preview-grid article.needs-query strong {
  color: #9a5b00;
}
.wordtree-preview-grid article small {
  display: -webkit-box;
  overflow: hidden;
  color: #65758b;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.wordtree-preview-grid strong,
.training-grid strong {
  display: -webkit-box;
  overflow: hidden;
  color: #10233f;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}
.training-grid button {
  min-height: 118px;
}
.training-grid em {
  justify-self: start;
  color: #1f73f1;
  font-size: 13px;
  font-style: normal;
  font-weight: 900;
}
.learn-nav-hero {
  align-items: flex-start;
  min-height: 0;
  padding: 8px 2px 4px;
  color: #0d1b3f;
  background: transparent;
  box-shadow: none;
}
.student-header.learn-nav-hero h1,
.training-center-hero h1,
.pos-tree-header h1,
.dynamic-tree-header h1 {
  color: #0d1b3f;
  letter-spacing: 0;
}
.learn-nav-hero p,
.training-center-hero p,
.pos-tree-header p,
.dynamic-tree-header p {
  color: #43577c;
  font-weight: 700;
}
.range-pill,
.icon-only,
.mode-pill,
.modal-close {
  min-height: 36px;
  color: #1f73f1;
  border: 1px solid #d8e4f6;
  border-radius: 12px;
  background: #f8fbff;
  font-weight: 900;
}
.icon-only {
  width: 42px;
  overflow: hidden;
  white-space: nowrap;
}
.announcement-action {
  min-width: 58px;
  padding: 7px 12px;
  white-space: nowrap;
}
.learn-growth-card,
.pos-class-card,
.recent-learning-card,
.pos-tree-board {
  margin-bottom: 14px;
  padding: 18px;
  border: 1px solid #dbe8fb;
  border-radius: 18px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 14px 34px rgba(31, 50, 105, .07);
}
.learn-progress-bar,
.recent-progress {
  height: 8px;
  overflow: hidden;
  margin: 14px 0 18px;
  border-radius: 999px;
  background: #e8f0fb;
}
.learn-progress-bar span,
.recent-progress span {
  display: block;
  width: 23%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1f73f1, #6a55e8);
}
.recent-progress span {
  width: 68%;
}
.learn-growth-route {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}
.learn-growth-route::before {
  top: 20px;
}
.learn-growth-route article {
  justify-items: center;
  gap: 6px;
  padding: 0;
  text-align: center;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.learn-growth-route i {
  width: 34px;
  height: 34px;
  border-radius: 999px;
}
.learn-growth-route div span {
  display: none;
}
.learn-growth-route strong {
  font-size: 12px;
}
.pos-class-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.pos-class-grid button {
  display: grid;
  justify-items: center;
  gap: 7px;
  min-height: 108px;
  padding: 14px 8px;
  color: #10233f;
  text-align: center;
  border: 1px solid #e2e9f6;
  border-radius: 14px;
  background: linear-gradient(180deg, #f8fbff, #eff5ff);
}
.pos-class-grid button:nth-child(3n + 2) {
  background: linear-gradient(180deg, #f4fff8, #edf9f2);
}
.pos-class-grid button:nth-child(3n) {
  background: linear-gradient(180deg, #fffaf0, #fff4df);
}
.pos-class-grid button.wide {
  grid-column: 1 / -1;
  grid-template-columns: auto minmax(0, 1fr);
  justify-items: start;
  align-items: center;
  min-height: 68px;
  text-align: left;
  background: linear-gradient(90deg, #fff4f7, #fffafb);
}
.pos-class-grid i,
.pos-tree-list i,
.entry-tree-list i,
.training-entry-card i {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: white;
  font-style: normal;
  font-weight: 900;
  border-radius: 13px;
  background: linear-gradient(135deg, #1f73f1, #60a5ff);
}
.pos-class-grid button:nth-child(3n + 2) i,
.pos-tree-list button:nth-child(3n + 2) i {
  background: linear-gradient(135deg, #22a867, #65d897);
}
.pos-class-grid button:nth-child(3n) i,
.pos-tree-list button:nth-child(3n) i {
  background: linear-gradient(135deg, #f0a01f, #ffc24f);
}
.pos-class-grid strong,
.pos-class-grid span {
  display: block;
}
.pos-class-grid span {
  color: #425b88;
  font-size: 12px;
  font-weight: 700;
}
.pos-action-sheet .sheet-head span,
.pos-word-list-sheet .sheet-head span {
  display: block;
  margin-bottom: 4px;
  color: #65758b;
  font-size: 12px;
  font-weight: 900;
}
.pos-action-summary {
  margin: 4px 0 14px;
  color: #425b88;
  line-height: 1.65;
}
.pos-action-buttons {
  display: grid;
  gap: 10px;
}
.pos-action-buttons button {
  width: 100%;
  min-height: 48px;
  border-radius: 14px;
  font-weight: 900;
}
.pos-word-list {
  display: grid;
  gap: 10px;
  max-height: min(56vh, 520px);
  overflow-y: auto;
  padding-right: 2px;
}
.pos-word-list button {
  display: grid;
  grid-template-columns: minmax(110px, .8fr) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 12px 14px;
  color: #10233f;
  text-align: left;
  border: 1px solid #dbe8fb;
  border-radius: 14px;
  background: #f8fbff;
}
.pos-word-list button strong {
  overflow-wrap: anywhere;
  color: #1f73f1;
  font-size: 18px;
}
.pos-word-list button span {
  color: #425b88;
  line-height: 1.45;
}
.recent-learning-card {
  display: grid;
  gap: 10px;
}
.recent-learning-card p {
  margin: 0;
  color: #425b88;
  font-weight: 800;
}
.recent-learning-card button {
  justify-self: end;
  color: white;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #8068ef, #5b42d4);
  font-weight: 900;
}

/* Unified learning center */
.learning-center-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}
.learning-brand-range {
  display: flex;
  align-items: center;
  gap: 20px;
  min-width: 0;
}
.learning-brand-range h1 {
  margin: 0;
  font-size: 30px;
}
.learning-range-select {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 14px;
  color: #17284d;
  border: 1px solid #e0e7f4;
  border-radius: 8px;
  background: #fff;
  font-weight: 800;
  box-shadow: 0 6px 18px rgba(42, 59, 111, .06);
}
.learning-range-select span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.learning-settings-action,
.announcement-action {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  color: #17284d;
  border-color: #e5e9f3;
  background: #fff;
  box-shadow: 0 6px 18px rgba(42, 59, 111, .05);
}
.learning-settings-action i,
.announcement-action i {
  color: #6579a4;
  font-style: normal;
}
.announcement-dot {
  position: absolute;
  top: 5px;
  right: 7px;
  width: 8px;
  height: 8px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #ff5c6c;
}
.learning-center-card {
  margin-bottom: 14px;
  padding: 18px;
  border: 1px solid #e4e9f3;
  border-radius: 8px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 10px 28px rgba(38, 54, 104, .06);
}
.learning-entry-list,
.scene-library-list {
  display: grid;
  gap: 14px;
}
.learning-entry-card,
.scene-library-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  width: 100%;
  min-height: 126px;
  padding: 20px 24px;
  color: #17284d;
  text-align: left;
  border: 1px solid #e5e9f3;
  border-radius: 22px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 12px 30px rgba(38, 54, 104, .07);
}
.learning-entry-card > i,
.scene-library-card > i {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  color: #684ff0;
  font-style: normal;
  font-size: 20px;
  font-weight: 900;
  border-radius: 18px;
  background: linear-gradient(145deg, #eeeaff, #f8f6ff);
}
.learning-entry-card > span,
.scene-library-card > span {
  display: grid;
  gap: 7px;
  min-width: 0;
}
.learning-entry-card strong,
.scene-library-card strong {
  font-size: 21px;
  line-height: 1.25;
}
.learning-entry-card small,
.scene-library-card small {
  color: #687895;
  font-size: 14px;
  line-height: 1.45;
}
.learning-entry-card em {
  color: #52698e;
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
}
.learning-entry-card > b,
.scene-library-card > em {
  color: #71809a;
  font-size: 34px;
  font-style: normal;
  font-weight: 400;
}
.learning-entry-card.pos > i { color: #12b978; background: linear-gradient(145deg, #e0f9ef, #f3fcf8); }
.learning-entry-card.core > i { color: #b64e16; background: linear-gradient(145deg, #fff1df, #fff8f0); }
.learning-entry-card.scene > i { color: #11aee1; background: linear-gradient(145deg, #def4ff, #f2fbff); }
.learning-entry-card.english-scene > i { color: #7b55d8; background: linear-gradient(145deg, #f0edff, #fbfaff); }
.learning-entry-card.is-locked,
.scene-library-card.is-locked {
  opacity: .68;
}
.scene-library-card.is-locked > em {
  color: #9aa7ba;
  font-size: 13px;
  font-weight: 900;
}
.learning-subpage-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}
.learning-subpage-header h1 {
  margin: 0;
  color: #17284d;
  font-size: 25px;
}
.learning-subpage-header p {
  margin: 4px 0 0;
  color: #71809a;
  font-size: 13px;
}
.learning-subpage-header > span {
  color: #6851df;
  font-weight: 900;
}
.learning-back-button,
.learning-header-help {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  color: #17284d;
  border: 0;
  border-radius: 14px;
  background: transparent;
  font-size: 34px;
  line-height: 1;
}
.learning-header-help {
  color: #657590;
  border: 1px solid #e7eaf1;
  background: #fff;
  font-size: 18px;
  font-weight: 900;
  box-shadow: 0 8px 20px rgba(38, 54, 104, .06);
}
.scene-library-card {
  min-height: 132px;
}
.scene-library-card.life > i { color: #1fbd7e; background: #e8f9f2; }
.scene-library-card.work > i { color: #287eef; background: #eaf2ff; }
.scene-library-card.tense > i { color: #7058ef; background: #f0edff; }
.scene-library-card.scenario > i { color: #f39a22; background: #fff3e4; }
.scene-library-card.practice > i { color: #287eef; background: #edf3ff; }
.english-scene-course-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(260px, .7fr);
  gap: 14px;
  margin-bottom: 14px;
  padding: 20px;
  border: 1px solid #e2e8f4;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(38, 54, 104, .06);
}
.english-scene-course-hero > div:first-child {
  display: grid;
  gap: 10px;
}
.english-scene-course-hero span {
  width: max-content;
  padding: 5px 9px;
  color: #7353d5;
  border-radius: 999px;
  background: #f0edff;
  font-size: 12px;
  font-weight: 900;
}
.english-scene-course-hero strong {
  color: #17284d;
  font-size: 26px;
}
.english-scene-course-hero p {
  margin: 0;
  color: #5d6d89;
  line-height: 1.65;
}
.english-scene-course-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  align-self: center;
}
.english-scene-course-stats article {
  display: grid;
  gap: 5px;
  padding: 14px;
  border: 1px solid #e6ebf4;
  border-radius: 8px;
  background: #f8fafc;
}
.english-scene-course-stats span {
  width: auto;
  padding: 0;
  color: #71809a;
  background: transparent;
}
.english-scene-course-stats strong {
  font-size: 22px;
}
.english-scene-methods,
.english-scene-lesson-list,
.english-scene-sentence-list {
  display: grid;
  gap: 10px;
}
.english-scene-methods span {
  padding: 11px 13px;
  color: #405779;
  border: 1px solid #e5eaf3;
  border-radius: 8px;
  background: #f8fafc;
  line-height: 1.55;
}
.english-scene-lesson-list button,
.english-scene-sentence-card {
  display: grid;
  gap: 8px;
  width: 100%;
  padding: 15px;
  color: #17284d;
  text-align: left;
  border: 1px solid #e4eaf3;
  border-radius: 8px;
  background: #fff;
}
.english-scene-lesson-list button {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}
.english-scene-lesson-list strong,
.english-scene-sentence-card strong {
  font-size: 17px;
  line-height: 1.45;
}
.english-scene-lesson-list small,
.english-scene-sentence-card p,
.english-scene-sentence-card small {
  margin: 0;
  color: #697893;
  line-height: 1.5;
}
.english-scene-lesson-list em {
  color: #7353d5;
  font-style: normal;
  font-weight: 900;
}
.english-scene-sentence-card header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}
.english-scene-sentence-card header b {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: #7353d5;
  border-radius: 50%;
  background: #f0edff;
  font-size: 12px;
}
.english-scene-sentence-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.english-scene-sentence-actions button {
  min-height: 36px;
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 900;
}
.english-scene-sentence-actions button:first-child {
  color: #fff;
  border-color: #7353d5;
  background: #7353d5;
}
.scene-empty-state,
.tense-tree-empty {
  display: grid;
  justify-items: center;
  gap: 12px;
  min-height: 380px;
  padding: 58px 28px;
  text-align: center;
  border: 1px solid #e3e8f2;
  border-radius: 22px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 12px 30px rgba(38, 54, 104, .07);
}
.scene-empty-state > i {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  color: #5572e8;
  font-style: normal;
  font-size: 24px;
  font-weight: 900;
  border-radius: 24px;
  background: linear-gradient(145deg, #eaf0ff, #f7f9ff);
}
.scene-empty-state > strong,
.scene-empty-copy strong {
  color: #17284d;
  font-size: 21px;
}
.scene-empty-state > p,
.scene-empty-copy p {
  max-width: 480px;
  margin: 0;
  color: #687895;
  line-height: 1.75;
}
.scene-empty-state > small {
  padding: 8px 14px;
  color: #7c6bc9;
  border-radius: 999px;
  background: #f3f0ff;
  font-weight: 800;
}
.tense-tree-empty {
  align-content: center;
  min-height: 440px;
}
.tense-tree-root {
  display: grid;
  justify-items: center;
  gap: 6px;
}
.tense-tree-root > i {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  color: #fff;
  font-style: normal;
  font-size: 27px;
  font-weight: 900;
  border-radius: 50%;
  background: linear-gradient(145deg, #7660f2, #5140d0);
  box-shadow: 0 14px 26px rgba(91, 70, 215, .24);
}
.tense-tree-root strong { color: #17284d; font-size: 22px; }
.tense-tree-root small { color: #7a88a3; }
.tense-tree-branches {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  width: min(100%, 520px);
  padding-top: 30px;
}
.tense-tree-branches::before {
  position: absolute;
  top: 8px;
  right: 16.5%;
  left: 16.5%;
  height: 2px;
  background: #ddd8f7;
  content: "";
}
.tense-tree-branches span {
  position: relative;
  padding: 12px 8px;
  color: #8a91a4;
  border: 1px dashed #d8ddeb;
  border-radius: 12px;
  background: #fafbfe;
  font-size: 12px;
  font-weight: 800;
}
.tense-tree-branches span::before {
  position: absolute;
  top: -23px;
  left: 50%;
  width: 2px;
  height: 22px;
  background: #ddd8f7;
  content: "";
}
.tense-course-intro {
  display: grid;
  gap: 9px;
  margin-bottom: 16px;
  padding: 18px;
  border: 1px solid #deddf6;
  border-radius: 20px;
  background: linear-gradient(135deg, #f2f0ff, #f8fbff);
}
.tense-course-intro > strong { color: #342b82; font-size: 21px; }
.tense-course-intro > p { margin: 0; color: #667591; line-height: 1.6; }
.tense-course-intro > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tense-course-intro span {
  padding: 8px;
  color: #5a4ec3;
  text-align: center;
  border-radius: 10px;
  background: #fff;
  font-size: 12px;
  font-weight: 800;
}
.tense-course-groups { display: grid; gap: 15px; }
.tense-course-group {
  overflow: hidden;
  border: 1px solid #e0e6f0;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 10px 25px rgba(37, 54, 98, .05);
}
.tense-course-group > header {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 15px;
  background: #f2f7ff;
}
.tense-course-group.past > header { background: #fff6ed; }
.tense-course-group.future > header { background: #f1fbf7; }
.tense-course-group > header i {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  color: #fff;
  border-radius: 14px;
  background: #347fec;
  font-style: normal;
  font-weight: 900;
}
.tense-course-group.past > header i { background: #ee932d; }
.tense-course-group.future > header i { background: #35a978; }
.tense-course-group > header span { display: grid; gap: 3px; }
.tense-course-group > header strong { color: #1a365f; font-size: 18px; }
.tense-course-group > header small,
.tense-course-group > header em { color: #73819a; font-size: 12px; font-style: normal; }
.tense-course-group > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; padding: 12px; }
.tense-course-group > div > button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 12px;
  align-items: center;
  gap: 9px;
  min-height: 112px;
  padding: 13px;
  text-align: left;
  border: 1px solid #e2e8f2;
  border-radius: 15px;
  background: #fbfcff;
}
.tense-course-group button > span { display: grid; gap: 4px; min-width: 0; }
.tense-course-group button small { color: #347fec; font-size: 10px; font-weight: 800; }
.tense-course-group button strong { color: #203b66; font-size: 16px; }
.tense-course-group button em {
  display: -webkit-box;
  overflow: hidden;
  color: #75839a;
  font-size: 11px;
  font-style: normal;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.tense-course-group button > b {
  max-width: 128px;
  padding: 7px;
  color: #5f6f88;
  border-radius: 9px;
  background: #f1f4f9;
  font-size: 10px;
}
.tense-course-group button > u { color: #687994; text-decoration: none; }
.tense-detail-hero {
  display: grid;
  justify-items: start;
  gap: 9px;
  margin-bottom: 14px;
  padding: 20px;
  border: 1px solid #dcdff5;
  border-radius: 21px;
  background: linear-gradient(135deg, #f1f0ff, #f4f9ff);
}
.tense-detail-hero > span {
  padding: 5px 10px;
  color: #5b4dcc;
  border-radius: 999px;
  background: #fff;
  font-size: 12px;
  font-weight: 900;
}
.tense-detail-hero > strong { color: #25205f; font-size: 23px; }
.tense-detail-hero > p { margin: 0; color: #61718d; line-height: 1.65; }
.tense-detail-hero > button {
  min-height: 42px;
  padding: 8px 13px;
  color: #3472ce;
  border: 1px solid #d8e6fb;
  border-radius: 11px;
  background: #fff;
  font-weight: 800;
}
.tense-use-list { display: grid; gap: 8px; margin-top: 13px; }
.tense-use-list span { display: flex; align-items: center; gap: 9px; color: #405779; }
.tense-use-list b {
  display: grid;
  place-items: center;
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  color: #fff;
  border-radius: 50%;
  background: #5f72df;
  font-size: 11px;
}
.tense-marker-list { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; padding-top: 12px; border-top: 1px solid #e5eaf2; }
.tense-marker-list strong { width: 100%; color: #344d72; font-size: 12px; }
.tense-marker-list span { padding: 5px 9px; color: #3f70ba; border-radius: 999px; background: #edf5ff; font-size: 11px; font-weight: 800; }
.tense-form-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin-top: 13px; }
.tense-form-tabs button { padding: 9px; color: #667792; border: 1px solid #e0e6ef; border-radius: 10px; background: #f7f9fc; font-weight: 800; }
.tense-form-tabs button.active { color: #fff; border-color: #347fec; background: #347fec; }
.tense-form-examples,
.tense-example-list { display: grid; gap: 8px; margin-top: 11px; }
.tense-form-examples article,
.tense-example-list article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  align-items: center;
  gap: 9px;
  padding: 11px 12px;
  border-radius: 12px;
  background: #f7f9fd;
}
.tense-form-examples strong,
.tense-example-list strong { color: #263f67; line-height: 1.5; }
.tense-form-examples button,
.tense-example-list button { width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: #e5efff; }
.tense-example-list span { display: grid; gap: 3px; }
.tense-example-list small { color: #75829a; }
.tense-note-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.tense-note-grid article { padding: 14px; border: 1px solid #e0e8f3; border-radius: 16px; background: #fff; }
.tense-note-grid article.key { background: #eff6ff; }
.tense-note-grid article.mistake { background: #fff5ee; }
.tense-note-grid article.compare { background: #f1fbf7; }
.tense-note-grid strong { color: #27446e; }
.tense-note-grid p { margin: 7px 0 0; color: #61718b; font-size: 13px; line-height: 1.65; }
.tense-detail-navigation { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.tense-detail-navigation button { min-height: 48px; color: #41628f; border: 1px solid #dde5f1; border-radius: 13px; background: #fff; font-weight: 800; }
.scene-empty-copy {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin-top: 10px;
}
.life-category-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.life-category-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 128px;
  padding: 18px;
  color: #17284d;
  text-align: left;
  border: 1px solid #e1e8f3;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(38, 54, 104, .06);
}
.life-category-card > i {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  font-style: normal;
  font-size: 28px;
  border-radius: 16px;
  background: #eef4ff;
}
.life-category-card > span {
  display: grid;
  gap: 5px;
}
.life-category-card > span strong { font-size: 18px; }
.life-category-card > span small { color: #71809a; line-height: 1.45; }
.life-category-card > em {
  color: #5572e8;
  font-style: normal;
  font-weight: 900;
}
.life-category-card > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  grid-column: 1 / -1;
}
.life-category-card > div::before {
  grid-column: 1;
  grid-row: 1;
  height: 6px;
  border-radius: 999px;
  background: #e9edf5;
  content: "";
}
.life-category-card u {
  position: relative;
  z-index: 1;
  grid-column: 1;
  grid-row: 1;
  height: 6px;
  border-radius: 999px;
  background: #4c8df5;
  text-decoration: none;
}
.life-category-card b { color: #7383a0; font-size: 12px; }
.life-topic-list {
  display: grid;
  gap: 12px;
}
.life-topic-card {
  overflow: hidden;
  border: 1px solid #e1e7f1;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(38, 54, 104, .05);
}
.life-topic-toggle {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  width: 100%;
  padding: 17px;
  color: #17284d;
  text-align: left;
  border: 0;
  background: transparent;
}
.life-topic-toggle > i {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  font-style: normal;
  font-size: 24px;
  border-radius: 14px;
  background: #f3f6fb;
}
.life-topic-toggle > span { display: grid; gap: 4px; }
.life-topic-toggle strong { font-size: 17px; }
.life-topic-toggle small { color: #71809a; }
.life-topic-toggle em { color: #66789a; font-size: 12px; font-style: normal; }
.life-verb-list {
  display: none;
  gap: 9px;
  padding: 0 14px 14px;
}
.life-topic-card.expanded .life-verb-list { display: grid; }
.life-verb-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  overflow: hidden;
  border: 1px solid #e9edf4;
  border-radius: 14px;
  background: #fbfcff;
}
.life-verb-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(105px, .55fr);
  align-items: center;
  gap: 12px;
  min-height: 92px;
  padding: 13px 15px;
  text-align: left;
  border: 0;
  background: transparent;
}
.life-verb-main > span,
.life-verb-main > div { display: grid; gap: 4px; }
.life-verb-main > span strong { color: #17284d; font-size: 21px; }
.life-verb-main > span small { color: #7b88a0; }
.life-verb-main > span em { color: #40557c; font-style: normal; }
.life-verb-main > div { justify-items: start; }
.life-verb-main > div b {
  padding: 3px 7px;
  color: #168653;
  border-radius: 999px;
  background: #e3f7ec;
  font-size: 10px;
}
.life-verb-main > div small { color: #66789a; }
.life-verb-main > div u {
  width: 100%;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5eaf2;
  text-decoration: none;
}
.life-verb-main > div u i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #2fb873;
}
.life-verb-speak {
  width: 54px;
  align-self: stretch;
  border: 0;
  border-left: 1px solid #e9edf4;
  background: #f4f8ff;
  font-size: 20px;
}
.life-favorite-top {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  color: #f1a313;
  border: 1px solid #f3e3be;
  border-radius: 14px;
  background: #fffaf0;
  font-size: 0;
}
.life-favorite-top::before { content: "☆"; font-size: 24px; }
.life-favorite-top.is-favorited::before { content: "★"; }
.life-word-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  margin-bottom: 14px;
  padding: 22px;
  border: 1px solid #e2e8f2;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(38, 54, 104, .07);
}
.life-word-hero > div:first-child {
  display: grid;
  justify-items: start;
  gap: 6px;
}
.life-word-hero > div:first-child > span { color: #5e75a1; font-weight: 800; }
.life-word-hero h2 { margin: 2px 0 0; color: #17284d; font-size: 40px; }
.life-word-hero p { margin: 0; color: #71809a; font-size: 17px; }
.life-word-hero strong { color: #2f466d; font-size: 20px; }
.life-word-hero > div:first-child > em {
  padding: 5px 9px;
  color: #168653;
  border-radius: 999px;
  background: #e4f7ec;
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
}
.life-word-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(70px, 1fr));
  align-self: end;
  gap: 8px;
}
.life-word-actions button {
  display: grid;
  justify-items: center;
  gap: 5px;
  min-height: 68px;
  padding: 8px;
  color: #40557c;
  border: 1px solid #e0e6f0;
  border-radius: 14px;
  background: #f9fbff;
  font-weight: 800;
}
.life-word-actions i { font-style: normal; font-size: 20px; }
.life-learning-card {
  margin-bottom: 14px;
  padding: 18px;
  border: 1px solid #e2e8f2;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(38, 54, 104, .05);
}
.life-section-toggle,
.life-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 0;
  color: #17284d;
  border: 0;
  background: transparent;
}
.life-section-toggle span,
.life-card-heading strong { font-size: 18px; font-weight: 900; }
.life-section-toggle em,
.life-card-heading small { color: #74839e; font-size: 12px; font-style: normal; }
.life-forms-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}
.life-forms-grid > div {
  position: relative;
  display: grid;
  gap: 6px;
  min-height: 116px;
  padding: 12px 8px 42px;
  text-align: center;
  border-radius: 12px;
  background: #f6f8fc;
}
.life-forms-grid span { color: #74839e; font-size: 11px; }
.life-forms-grid strong { color: #273d64; }
.life-forms-grid small {
  color: #71809b;
  font-size: 11px;
}
.life-form-speak {
  position: absolute;
  right: 8px;
  bottom: 8px;
  left: 8px;
  min-height: 30px;
  padding: 4px 8px;
  color: #2878e5;
  border: 1px solid #dce9fb;
  border-radius: 9px;
  background: #fff;
}
[data-life-audio]:disabled {
  cursor: wait;
  opacity: .48;
}
[data-life-audio].is-playing {
  color: #fff;
  border-color: #347fec;
  background: #347fec;
  opacity: 1;
}
.life-scene-tabs,
.life-tense-tabs {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  overflow-x: auto;
  scrollbar-width: none;
}
.life-scene-tabs button,
.life-tense-tabs button {
  flex: 0 0 auto;
  min-width: 90px;
  padding: 9px 14px;
  color: #617394;
  border: 1px solid #e1e6f0;
  border-radius: 999px;
  background: #f8f9fc;
  font-weight: 800;
}
.life-scene-tabs button.active,
.life-tense-tabs button.active {
  color: #fff;
  border-color: #347fec;
  background: #347fec;
}
.life-tense-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.life-tense-tabs button { min-width: 0; border-radius: 10px; }
.life-example-card {
  position: relative;
  display: grid;
  gap: 9px;
  margin-top: 14px;
  padding: 18px;
  border-radius: 16px;
  background: #f5f8ff;
}
.life-example-card > strong { padding-right: 42px; color: #17284d; font-size: 18px; line-height: 1.55; }
.life-example-card > p { margin: 0; color: #40557c; line-height: 1.6; }
.life-example-speak {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #e4efff;
}
.life-breakdown-toggle {
  justify-self: start;
  padding: 7px 0;
  color: #3b73cd;
  border: 0;
  background: transparent;
  font-weight: 800;
}
.life-breakdown {
  display: grid;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px solid #dfe6f2;
}
.life-breakdown p {
  display: grid;
  grid-template-columns: 54px minmax(0, .9fr) minmax(0, 1.2fr);
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 8px 10px;
  border-radius: 9px;
  background: #fff;
}
.life-breakdown small {
  color: #347fec;
  font-size: 11px;
  font-weight: 800;
}
.life-breakdown strong { color: #1f355b; }
.life-breakdown span { color: #687895; }
.life-breakdown-explanation {
  margin-top: 5px;
  padding: 12px;
  border: 1px solid #d9e8ff;
  border-radius: 12px;
  background: #eef6ff;
}
.life-breakdown-explanation strong { color: #246cc9; }
.life-breakdown-explanation p {
  display: block;
  margin: 6px 0 0;
  padding: 0;
  color: #40557c;
  background: transparent;
  line-height: 1.65;
}
.phonetic-course-intro {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid #dce9fb;
  border-radius: 18px;
  background: linear-gradient(135deg, #f1f7ff, #fbfdff);
}
.phonetic-course-intro > i {
  display: grid;
  place-items: center;
  flex: 0 0 50px;
  width: 50px;
  height: 50px;
  border-radius: 15px;
  background: #fff;
  font-size: 24px;
  font-style: normal;
}
.phonetic-course-intro strong { color: #193765; }
.phonetic-course-intro p { margin: 4px 0 0; color: #71809b; font-size: 13px; line-height: 1.55; }
.phonetic-category-list { display: grid; gap: 14px; }
.phonetic-category-section {
  overflow: hidden;
  border: 1px solid #e0e7f2;
  border-radius: 19px;
  background: #fff;
  box-shadow: 0 9px 24px rgba(40, 61, 105, .05);
}
.phonetic-category-heading {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 14px;
  text-align: left;
  border: 0;
  background: transparent;
}
.phonetic-category-heading > i {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: #fff;
  border-radius: 13px;
  background: #347fec;
  font-size: 16px;
  font-style: normal;
  font-weight: 900;
}
.phonetic-category-section.orange .phonetic-category-heading > i { background: #f3a11b; }
.phonetic-category-section.green .phonetic-category-heading > i { background: #58ae45; }
.phonetic-category-section.purple .phonetic-category-heading > i { background: #7955c8; }
.phonetic-category-section.coral .phonetic-category-heading > i { background: #f07b35; }
.phonetic-category-section.navy .phonetic-category-heading > i { background: #315dab; }
.phonetic-category-heading span { display: grid; gap: 3px; }
.phonetic-category-heading strong { color: #19345e; font-size: 17px; }
.phonetic-category-heading small,
.phonetic-category-heading em { color: #77869f; font-size: 12px; font-style: normal; }
.phonetic-symbol-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  padding: 0 14px 14px;
}
.phonetic-symbol-card {
  position: relative;
  min-width: 0;
  border: 1px solid #e1e8f3;
  border-radius: 15px;
  background: #f9fbff;
}
.phonetic-symbol-main {
  display: grid;
  gap: 5px;
  width: 100%;
  min-height: 128px;
  padding: 13px 38px 13px 12px;
  text-align: left;
  border: 0;
  background: transparent;
}
.phonetic-symbol-main strong { color: #173765; font-size: 26px; line-height: 1; }
.phonetic-symbol-main span {
  display: -webkit-box;
  overflow: hidden;
  color: #5c6f8d;
  font-size: 12px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.phonetic-symbol-main small { align-self: end; color: #347fec; font-weight: 800; }
.phonetic-card-audio {
  position: absolute;
  top: 10px;
  right: 9px;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #e8f2ff;
}
.phonetic-header-audio {
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid #d9e8fb;
  border-radius: 13px;
  background: #fff;
}
.phonetic-symbol-hero {
  display: grid;
  justify-items: center;
  gap: 12px;
  margin-bottom: 15px;
  padding: 25px 18px 20px;
  text-align: center;
  border: 1px solid #dce7f5;
  border-radius: 22px;
  background: linear-gradient(145deg, #eef6ff, #fff);
}
.phonetic-symbol-hero > span { color: #173d73; font-size: 58px; font-weight: 900; line-height: 1; }
.phonetic-symbol-hero > strong { color: #526984; font-size: 16px; }
.phonetic-symbol-hero > div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  width: min(100%, 580px);
}
.phonetic-symbol-hero button {
  min-height: 48px;
  padding: 9px;
  color: #285a9b;
  border: 1px solid #dce8f8;
  border-radius: 13px;
  background: #fff;
  font-weight: 800;
}
.phonetic-method-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.phonetic-method-grid article {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  min-height: 112px;
  padding: 14px;
  border: 1px solid #e0e7f1;
  border-radius: 17px;
  background: #fff;
}
.phonetic-method-grid i {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: #f0f6ff;
  font-size: 21px;
  font-style: normal;
}
.phonetic-method-grid strong { color: #1e3a66; }
.phonetic-method-grid p,
.phonetic-teaching-card > p,
.phonetic-mistake-card > p {
  margin: 5px 0 0;
  color: #60718d;
  font-size: 13px;
  line-height: 1.65;
}
.phonetic-example-words {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 13px;
}
.phonetic-example-words article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  align-items: center;
  gap: 7px;
  padding: 10px;
  border-radius: 13px;
  background: #f5f8fd;
}
.phonetic-example-words span { display: grid; gap: 3px; min-width: 0; }
.phonetic-example-words strong { overflow: hidden; color: #233f68; text-overflow: ellipsis; }
.phonetic-example-words small { color: #74839b; }
.phonetic-example-words button {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #e4efff;
}
.phonetic-example-sentence {
  position: relative;
  display: grid;
  gap: 5px;
  margin-top: 12px;
  padding: 14px 120px 14px 14px;
  border: 1px solid #e0e8f3;
  border-radius: 14px;
}
.phonetic-example-sentence > span { color: #347fec; font-size: 11px; font-weight: 900; }
.phonetic-example-sentence > strong { color: #203c65; }
.phonetic-example-sentence > p { margin: 0; color: #6d7b92; font-size: 13px; }
.phonetic-example-sentence > button {
  position: absolute;
  top: 50%;
  right: 12px;
  min-height: 38px;
  padding: 8px 10px;
  color: #286bc5;
  border: 1px solid #dce9f9;
  border-radius: 10px;
  background: #f2f7ff;
  transform: translateY(-50%);
}
[data-phonetic-audio]:disabled {
  cursor: wait;
  opacity: .48;
}
[data-phonetic-audio].is-playing {
  color: #fff;
  border-color: #347fec;
  background: #347fec;
  opacity: 1;
}
.life-practice-question {
  margin: 15px 0 10px;
  color: #263d64;
  font-size: 17px;
  font-weight: 800;
}
.life-practice-options {
  display: grid;
  gap: 8px;
}
.life-practice-options button {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 8px 12px;
  color: #40557c;
  text-align: left;
  border: 1px solid #dfe5ef;
  border-radius: 12px;
  background: #fff;
}
.life-practice-options b {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #eef2f8;
}
.life-practice-options button.correct { color: #147a4c; border-color: #9ed9ba; background: #eaf8f0; }
.life-practice-options button.wrong { color: #b34343; border-color: #efb5b5; background: #fff0f0; }
.life-practice-result { margin: 10px 0 0; color: #2b7b54; line-height: 1.55; }
.life-related-list {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  overflow-x: auto;
  scrollbar-width: none;
}
.life-related-list button {
  display: grid;
  grid-template-columns: minmax(80px, 1fr) auto;
  gap: 4px 12px;
  min-width: 132px;
  padding: 12px;
  text-align: left;
  border: 1px solid #e1e7f1;
  border-radius: 13px;
  background: #fafbfe;
}
.life-related-list strong { color: #17284d; }
.life-related-list span { color: #71809a; font-size: 12px; }
.life-related-list em { grid-column: 2; grid-row: 1 / span 2; align-self: center; color: #6b7d99; font-style: normal; }
.life-next-word {
  display: flex;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 46px;
  margin-top: 14px;
  color: #fff;
  border: 0;
  border-radius: 12px;
  background: #347fec;
  font-weight: 900;
}
.learning-section-heading,
.learning-status-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.learning-section-heading h2,
.learning-status-title h2 {
  margin: 0;
  color: #17284d;
  font-size: 21px;
}
.learning-section-heading h2 i {
  margin-right: 7px;
  color: #f2a711;
  font-style: normal;
}
.learning-section-heading > button,
.learning-status-heading > button,
.pos-heading > button {
  padding: 6px 0;
  color: #1767df;
  border: 0;
  background: transparent;
  font-weight: 800;
}
.pos-heading p,
.learning-status-title p {
  margin: 4px 0 0;
  color: #66789a;
  font-size: 13px;
}
.grammar-category-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}
.grammar-category-grid > button {
  display: grid;
  justify-items: center;
  gap: 7px;
  min-width: 0;
  min-height: 154px;
  padding: 14px 8px;
  color: #17284d;
  border: 1px solid #dcebea;
  border-radius: 8px;
  background: #f4fbf7;
}
.grammar-category-grid > button:nth-child(2),
.grammar-category-grid > button:nth-child(7) { border-color: #dbe6fa; background: #f5f8ff; }
.grammar-category-grid > button:nth-child(3) { border-color: #e4ddfb; background: #f8f5ff; }
.grammar-category-grid > button:nth-child(4) { border-color: #f4e5ce; background: #fff9f1; }
.grammar-category-grid > button:nth-child(5) { border-color: #d4eff0; background: #f3fbfb; }
.grammar-category-grid > button:nth-child(6) { border-color: #f4ddea; background: #fff6fa; }
.grammar-category-grid > button > i {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #25b971;
  font-style: normal;
  font-weight: 900;
  border-radius: 8px;
  background: #def7e9;
}
.grammar-category-grid > button:nth-child(2) > i,
.grammar-category-grid > button:nth-child(7) > i { color: #377eed; background: #e5efff; }
.grammar-category-grid > button:nth-child(3) > i { color: #7c5ee5; background: #ede7ff; }
.grammar-category-grid > button:nth-child(4) > i { color: #e88a18; background: #fff0dc; }
.grammar-category-grid > button:nth-child(5) > i { color: #20aeb3; background: #def7f7; }
.grammar-category-grid > button:nth-child(6) > i { color: #e95f9e; background: #ffe5f1; }
.grammar-category-grid > button strong {
  font-size: 15px;
  line-height: 1.25;
}
.grammar-category-grid > button > span {
  color: #66789a;
  font-size: 12px;
}
.grammar-category-grid > button > div {
  display: grid;
  grid-template-columns: minmax(26px, 1fr) auto;
  align-items: center;
  gap: 6px;
  width: 100%;
}
.grammar-category-grid u {
  display: block;
  height: 6px;
  border-radius: 999px;
  background: #2cbe76;
  text-decoration: none;
}
.grammar-category-grid > button > div::before {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8edf6;
}
.grammar-category-grid > button > div::before {
  grid-column: 1;
  grid-row: 1;
  content: "";
}
.grammar-category-grid > button > div u {
  position: relative;
  z-index: 1;
  grid-column: 1;
  grid-row: 1;
}
.grammar-category-grid em {
  color: #2caa70;
  font-size: 11px;
  font-style: normal;
}
.learning-center-card.pos-class-card {
  padding: 20px;
  border-radius: 8px;
}
.learning-center-card .pos-class-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}
.learning-center-card .pos-class-grid button,
.learning-center-card .pos-class-grid button.wide {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  justify-items: start;
  gap: 10px;
  min-height: 92px;
  padding: 12px;
  text-align: left;
  border-radius: 8px;
  background: #f7fafc;
}
.learning-center-card .pos-class-grid button:nth-child(3n + 2) { background: #f4fbf7; }
.learning-center-card .pos-class-grid button:nth-child(3n) { background: #fff9f1; }
.learning-center-card .pos-class-grid button > i {
  width: 40px;
  height: 40px;
  border-radius: 8px;
}
.learning-center-card .pos-class-grid button > span {
  min-width: 0;
}
.learning-center-card .pos-class-grid button strong {
  font-size: 16px;
}
.learning-center-card .pos-class-grid button small {
  display: block;
  margin-top: 4px;
  color: #617394;
  font-size: 12px;
}
.learning-center-card .pos-class-grid button > em {
  color: #1e7eea;
  font-size: 24px;
  font-style: normal;
}
.learning-status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.learning-status-grid .learning-center-card {
  margin-bottom: 0;
}
.learning-status-title {
  display: flex;
  align-items: center;
  gap: 10px;
}
.learning-status-title > i {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: #566ee8;
  font-style: normal;
  font-weight: 900;
  border-radius: 8px;
  background: #eef1ff;
}
.grammar-category-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}
.grammar-category-header > span {
  color: #6550dc;
  font-size: 18px;
  font-weight: 900;
}
.core-words-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 2px 12px;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid #f1dcc6;
  border-radius: 8px;
  background: #fff8f1;
}
.core-words-summary strong { grid-row: span 2; color: #a94d12; font-size: 24px; }
.core-words-summary span { color: #3a2b21; font-weight: 900; }
.core-words-summary em { color: #7a6a5c; font-size: 12px; font-style: normal; }
.core-category-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.core-category-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 132px;
  padding: 16px;
  text-align: left;
  border: 1px solid #eadfce;
  border-radius: 8px;
  background: #fff;
}
.core-category-card > span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #b64e16;
  border-radius: 8px;
  background: #fff0df;
  font-weight: 900;
}
.core-category-card div { display: grid; min-width: 0; gap: 5px; }
.core-category-card strong { color: #231c18; font-size: 16px; }
.core-category-card p {
  display: -webkit-box;
  min-height: 36px;
  margin: 0;
  overflow: hidden;
  color: #74665b;
  font-size: 12px;
  line-height: 1.5;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.core-category-card small { color: #9a5b2c; font-size: 12px; font-weight: 900; }
.core-category-card em { color: #b64e16; font-size: 13px; font-style: normal; font-weight: 900; }
.core-category-focus {
  margin-bottom: 12px;
  padding: 12px 14px;
  color: #664b37;
  border-left: 4px solid #c76a25;
  background: #fff7ed;
  font-size: 13px;
}
.core-node-list { display: grid; gap: 8px; }
.core-node-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 62px;
  padding: 10px 12px;
  text-align: left;
  border: 1px solid #ebe4da;
  border-radius: 8px;
  background: #fff;
}
.core-node-row > span {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: #8b5c36;
  border-radius: 8px;
  background: #fff2e6;
  font-size: 12px;
  font-weight: 900;
}
.core-node-row div { display: grid; min-width: 0; gap: 3px; }
.core-node-row strong { color: #231b17; font-size: 18px; }
.core-node-row small { color: #766b61; font-size: 12px; }
.core-node-row em {
  padding: 5px 9px;
  color: #7f6d5e;
  border-radius: 999px;
  background: #f4efe8;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}
.core-node-row.learning em { color: #2b6aae; background: #eaf3ff; }
.core-node-row.mastered em { color: #1d8a55; background: #e8f8ef; }
.core-node-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  margin-bottom: 14px;
  padding: 20px;
  border: 1px solid #eadfce;
  border-radius: 8px;
  background: #fff8f1;
}
.core-node-hero span { color: #a64f18; font-size: 12px; font-weight: 900; }
.core-node-hero h2 { margin: 4px 0; color: #211712; font-size: 42px; line-height: 1; }
.core-node-hero p { margin: 0; color: #6b5f55; }
.core-node-actions { display: grid; gap: 8px; }
.core-node-actions button {
  min-width: 118px;
  min-height: 42px;
  color: #fff;
  border: 0;
  border-radius: 8px;
  background: #b95d1c;
  font-weight: 900;
}
.core-node-actions button:first-child { color: #9a4d16; background: #ffe9d3; }
.core-lesson-card-grid { display: grid; gap: 10px; }
.core-lesson-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  padding: 16px;
  border: 1px solid #e8dfd3;
  border-radius: 8px;
  background: #fff;
}
.core-lesson-card > span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: #fff;
  border-radius: 8px;
  background: #c76a25;
  font-weight: 900;
}
.core-lesson-card h3 { margin: 0 0 6px; color: #221b17; font-size: 16px; }
.core-lesson-card p { margin: 0; color: #5e554e; line-height: 1.6; }
.core-lesson-card ul {
  display: grid;
  gap: 6px;
  margin: 10px 0 0;
  padding-left: 18px;
  color: #66584c;
}
.grammar-topic-list {
  display: grid;
  gap: 8px;
}
.grammar-topic-list article {
  border-bottom: 1px solid #e9edf5;
}
.grammar-topic-list article:last-child { border-bottom: 0; }
.grammar-topic-list article > button {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 70px;
  padding: 10px 0;
  text-align: left;
  border: 0;
  background: transparent;
}
.grammar-topic-list article > button i {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #6751df;
  font-style: normal;
  font-weight: 900;
  border-radius: 8px;
  background: #f0edff;
}
.grammar-topic-list article.completed > button i { color: #168a55; background: #e8f8ef; }
.grammar-topic-list article > button span { display: grid; gap: 4px; }
.grammar-topic-list article > button small { color: #657696; line-height: 1.45; }
.grammar-topic-list article > button em { color: #5b6f94; font-size: 12px; font-style: normal; }
.grammar-topic-detail {
  margin: 0 0 12px 46px;
  padding: 12px;
  background: #f7f9fd;
}
.grammar-topic-detail[hidden] { display: none; }
.grammar-topic-detail p { margin: 0 0 10px; color: #40557c; line-height: 1.65; }
.grammar-topic-detail button { color: #fff; border: 0; border-radius: 8px; background: #6751df; font-weight: 800; }
.grammar-tree-group {
  border-bottom: 1px solid #e4e9f3;
}
.grammar-tree-group > .grammar-tree-toggle,
.grammar-tree-leaf > button {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 70px;
  padding: 10px 0;
  text-align: left;
  border: 0;
  background: transparent;
}
.grammar-tree-group > .grammar-tree-toggle > i,
.grammar-tree-leaf > button > i {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #6751df;
  font-style: normal;
  font-weight: 900;
  border-radius: 8px;
  background: #f0edff;
}
.grammar-tree-group button > span,
.grammar-tree-leaf button > span {
  display: grid;
  gap: 4px;
}
.grammar-tree-group button small,
.grammar-tree-leaf button small {
  color: #657696;
  line-height: 1.45;
}
.grammar-tree-group button em,
.grammar-tree-leaf button em {
  color: #5b6f94;
  font-size: 12px;
  font-style: normal;
}
.grammar-tree-children {
  display: grid;
  margin: 0 0 10px 17px;
  padding-left: 18px;
  border-left: 2px solid #e8e4fa;
}
.grammar-tree-group.collapsed > .grammar-tree-children { display: none; }
.grammar-tree-leaf {
  border-bottom: 1px solid #eef1f6;
}
.grammar-tree-leaf:last-child { border-bottom: 0; }
.grammar-tree-leaf.completed > button > i {
  color: #158b55;
  background: #e8f8ef;
}
.grammar-tree-leaf.completed > button > em { color: #158b55; }
.grammar-lesson-content {
  display: grid;
  gap: 14px;
}
.grammar-lesson-summary {
  margin: 0;
  padding: 14px;
  color: #31486e;
  border-left: 4px solid #6751df;
  background: #f7f5ff;
  line-height: 1.7;
}
.grammar-lesson-content > article {
  padding: 14px 0;
  border-bottom: 1px solid #e7ebf3;
}
.grammar-lesson-content > article[hidden] { display: none; }
.grammar-lesson-content > article h2 {
  margin: 0 0 10px;
  color: #17284d;
  font-size: 17px;
}
.grammar-lesson-content > article p {
  margin: 0;
  color: #40557c;
  line-height: 1.75;
}
.grammar-lesson-content code {
  display: block;
  padding: 12px;
  color: #5b42c7;
  border-radius: 8px;
  background: #f1effb;
  font-family: inherit;
  font-size: 16px;
  font-weight: 900;
}
.grammar-lesson-content ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
  color: #40557c;
}
.grammar-lesson-content li {
  line-height: 1.65;
}
.grammar-lesson-content li small {
  display: block;
  color: #71809a;
}
.grammar-lesson-actions {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: 10px;
}
.grammar-lesson-actions > button {
  min-height: 46px;
  border-radius: 8px;
  font-weight: 900;
}
.grammar-lesson-actions > button:first-child {
  color: #5e4bd0;
  border: 1px solid #dcd5fa;
  background: #f5f2ff;
}
.grammar-lesson-actions .learning-primary-action {
  margin-top: 0;
}
.learning-primary-action {
  color: #fff;
  border: 0;
  background: #25b96f;
}
.pos-tree-word-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
  padding: 16px 18px;
  border: 1px solid #e1e8f4;
  border-radius: 8px;
  background: #fff;
}
.pos-tree-word-summary > div:first-child { display: grid; grid-template-columns: auto auto minmax(0, 1fr); align-items: baseline; gap: 5px 12px; }
.pos-tree-word-summary span { color: #647698; font-size: 12px; font-weight: 800; }
.pos-tree-word-summary strong { color: #17284d; font-size: 26px; }
.pos-tree-word-summary small { color: #536789; }
.pos-tree-word-summary p { grid-column: 1 / -1; margin: 0; color: #40557c; }
.pos-tree-word-summary .pos-tree-example { color: #7383a0; font-size: 12px; }
.pos-tree-word-nav { display: grid; grid-template-columns: repeat(2, auto); gap: 7px; }
.pos-tree-word-nav > span { grid-column: 1 / -1; justify-self: end; color: #654fdc; font-size: 15px; }
.pos-tree-word-nav button { min-height: 38px; color: #4f6387; border: 1px solid #dce4f2; border-radius: 8px; background: #f8faff; font-weight: 800; }
.pos-tree-word-nav button:disabled { opacity: .45; }
.pos-tree-path {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  overflow-x: auto;
  padding: 10px 12px;
  color: #40557c;
  border: 1px solid #e5eaf3;
  border-radius: 8px;
  background: #f8faff;
  scrollbar-width: none;
}
.pos-tree-path::-webkit-scrollbar { display: none; }
.pos-tree-path span { flex: 0 0 auto; font-size: 12px; font-weight: 800; }
.pos-tree-path b { color: #9ba8bd; }
.pos-tree-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  text-align: center;
}
.dynamic-tree-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  text-align: center;
}
.dynamic-tree-header .structure-actions {
  flex-wrap: nowrap;
}
.word-pos-tabs {
  display: flex;
  gap: 8px;
  margin: 0 0 12px;
  padding: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.word-pos-tabs[hidden] {
  display: none;
}
.word-pos-tabs::-webkit-scrollbar {
  display: none;
}
.word-pos-tabs button {
  display: grid;
  flex: 0 0 auto;
  min-width: 112px;
  gap: 2px;
  padding: 9px 14px;
  color: #425b88;
  text-align: left;
  border: 1px solid #dbe5f5;
  border-radius: 12px;
  background: rgba(255, 255, 255, .9);
}
.word-pos-tabs button strong {
  color: #10233f;
  font-size: 14px;
}
.word-pos-tabs button span {
  color: #6b7890;
  font-size: 11px;
  font-weight: 800;
}
.word-pos-tabs button.active {
  color: white;
  border-color: #6248dc;
  background: linear-gradient(135deg, #286fe8, #6a55e8);
  box-shadow: 0 8px 20px rgba(74, 82, 214, .2);
}
.word-pos-tabs button.active strong,
.word-pos-tabs button.active span {
  color: white;
}
.dynamic-word-tree {
  min-height: 0;
  padding: 22px;
  border: 1px solid #dbe8fb;
  border-radius: 18px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 14px 34px rgba(31, 50, 105, .07);
}
.dynamic-word-tree .wordtree-root {
  width: min(420px, 100%);
  min-width: 0;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(135deg, #286fe8, #6a55e8);
}
.dynamic-word-tree .wordtree-root strong {
  overflow-wrap: anywhere;
  letter-spacing: 0;
}
.dynamic-word-tree .wordtree-root em {
  margin-top: 8px;
  color: rgba(255, 255, 255, .86);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}
.dynamic-tree-connector {
  display: grid;
  justify-items: center;
  height: 28px;
}
.dynamic-tree-connector span {
  width: 2px;
  height: 100%;
  background: #c8d7ee;
}
.dynamic-word-tree .structure-node-grid {
  width: 100%;
  max-width: 860px;
  gap: 12px;
}
.dynamic-word-tree .structure-node-grid article {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-content: center;
  align-items: center;
  gap: 12px;
  min-height: 104px;
  padding: 14px;
  border-radius: 14px;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.dynamic-word-tree .structure-node-grid article[hidden] {
  display: none;
}
.dynamic-word-tree .structure-node-grid article:last-child:not([hidden]) {
  grid-column: 1 / -1;
}
.dynamic-word-tree .structure-node-grid article:hover {
  border-color: #aec9f3;
  box-shadow: 0 12px 26px rgba(31, 115, 241, .1);
  transform: translateY(-1px);
}
.dynamic-word-tree .structure-node-grid article > i {
  display: grid;
  place-items: center;
  width: 50px;
  height: 44px;
  color: white;
  font-style: normal;
  font-weight: 900;
  font-size: 12px;
  letter-spacing: 0;
  line-height: 1.1;
  text-align: center;
  border-radius: 13px;
  background: linear-gradient(135deg, #1f73f1, #5aa3ff);
}
.dynamic-word-tree .structure-node-grid article:nth-child(3n + 2) > i {
  background: linear-gradient(135deg, #22a867, #65d897);
}
.dynamic-word-tree .structure-node-grid article:nth-child(3n) > i {
  background: linear-gradient(135deg, #f0a01f, #ffc24f);
}
.dynamic-word-tree .structure-node-grid article > div {
  display: grid;
  min-width: 0;
  gap: 3px;
}
.dynamic-word-tree .structure-node-grid article span {
  color: #5c6f8a;
  font-size: 12px;
  font-weight: 900;
}
.dynamic-word-tree .structure-node-grid article strong {
  font-size: 17px;
  -webkit-line-clamp: 2;
}
.dynamic-word-tree .structure-node-grid article small {
  font-size: 12px;
}
.dynamic-word-tree .structure-node-grid article > .structure-node-action {
  color: #1f73f1;
  border: 0;
  cursor: pointer;
}
.dynamic-word-tree .structure-node-grid article > .structure-node-action.structure-query-action,
.dynamic-word-tree .structure-node-grid article > .structure-node-action.structure-detail-action {
  display: inline-grid;
  place-items: center;
  min-width: 48px;
  min-height: 34px;
  padding: 0 10px;
  color: #1f73f1;
  font-size: 13px;
  font-weight: 900;
  border-radius: 999px;
  background: #edf4ff;
}
.dynamic-word-tree .structure-node-grid article > .structure-node-action.structure-detail-action {
  color: #168451;
  background: #eaf9f1;
}
.dynamic-word-tree .structure-node-grid article.needs-query > i {
  background: linear-gradient(135deg, #f0a01f, #ffc24f);
}
.word-tree-section-list { display: grid; gap: 10px; width: 100%; }
.word-tree-section { overflow: hidden; border: 1px solid #dfe6f2; border-radius: 14px; background: #fff; }
.word-tree-section-toggle { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto auto auto; align-items: center; gap: 10px; width: 100%; padding: 14px; border: 0; background: transparent; text-align: left; cursor: pointer; }
.word-tree-section-icon { font-size: 22px; }
.word-tree-section-progress { color: #66758c; font-size: 12px; font-weight: 800; }
.word-tree-chevron { color: #66758c; font-size: 18px; transition: transform .15s ease; }
.word-tree-section-toggle[aria-expanded="true"] .word-tree-chevron { transform: rotate(180deg); }
.word-tree-status-dot { display: inline-block; width: 12px; height: 12px; border: 2px solid #9aa6b7; border-radius: 50%; }
.word-tree-status-dot.mastered { border-color: #20ad63; background: #20ad63; }
.word-tree-status-dot.learning { border-color: #3478e5; background: linear-gradient(90deg, #3478e5 50%, transparent 50%); }
.word-tree-status-dot.not_started { border-color: #9aa6b7; background: transparent; }
.word-tree-children { padding: 0 14px 12px 62px; }
.word-tree-child { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; width: 100%; padding: 11px 0; border: 0; border-top: 1px solid #edf0f5; background: transparent; text-align: left; cursor: pointer; }
.word-tree-child span { display: grid; gap: 3px; }
.word-tree-child small { color: #7a8799; }
.word-tree-child b { color: #5f53d8; font-size: 12px; }
.word-tree-node-page { width: min(760px, calc(100% - 24px)); margin: 20px auto 70px; }
.word-tree-node-header, .word-tree-node-word-card { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px; border: 1px solid #e0e5ef; border-radius: 16px; background: #fff; }
.word-tree-node-header h1 { margin: 3px 0 0; font-size: 22px; }
.word-tree-node-header span { color: #6b7690; font-size: 12px; }
.word-tree-node-header button, .word-tree-node-word-card button, .word-tree-node-detail button { padding: 9px 12px; border: 1px solid #d8ddeb; border-radius: 10px; background: #fff; cursor: pointer; }
.word-tree-node-word-card { margin-top: 12px; }
.word-tree-node-word-card div { display: grid; gap: 4px; }
.word-tree-node-word-card strong { font-size: 27px; }
.word-tree-node-word-card p { margin: 0; color: #56637a; }
.word-tree-node-status { padding: 20px; text-align: center; }
.word-tree-node-detail { display: grid; gap: 12px; margin-top: 12px; }
.word-tree-node-detail article { padding: 16px; border: 1px solid #e0e5ef; border-radius: 14px; background: #fff; }
.word-tree-node-detail h2 { margin: 0 0 10px; color: #5d54d8; font-size: 16px; }
.word-tree-node-detail p { margin: 6px 0; line-height: 1.65; }
.word-tree-mastery-button { position: sticky; bottom: 12px; width: 100%; margin-top: 16px; padding: 13px; color: #fff; border: 0; border-radius: 12px; background: #6753df; font-weight: 900; cursor: pointer; }
.word-tree-mastery-button.is-mastered { background: #20ad63; }
.word-tree-node-actions { position: sticky; bottom: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.word-tree-node-actions .word-tree-mastery-button { position: static; margin: 0; }
.word-tree-regenerate-button { width: 100%; padding: 13px; color: #5c4fd2; border: 1px solid #7467df; border-radius: 12px; background: #fff; font-weight: 900; cursor: pointer; }
.word-tree-regenerate-button:disabled { opacity: .65; cursor: wait; }
.word-tree-mistake { padding: 8px 0; border-bottom: 1px solid #edf0f5; }
.word-tree-mistake:last-child { border-bottom: 0; }
.word-tree-mistake .wrong { color: #bd3f4a; }
.word-tree-mistake .right { color: #168451; }
@media (max-width: 640px) { .word-tree-children { padding-left: 18px; } .word-tree-node-page { margin-top: 10px; } }
.structure-full-list {
  display: grid;
  gap: 10px;
}
.structure-full-list article,
.structure-full-row {
  display: grid;
  gap: 6px;
  padding: 10px 0;
  border-bottom: 1px solid #eeeaf7;
}
.structure-full-list article:last-child,
.structure-full-row:last-child {
  border-bottom: 0;
}
.structure-full-row > b {
  color: #5f53b7;
  font-size: 12px;
  line-height: 1.35;
}
.structure-full-row p,
.structure-full-row span {
  margin: 0;
  line-height: 1.6;
}
.pos-tree-board {
  display: grid;
  gap: 14px;
}
.pos-tree-list,
.entry-tree-list {
  position: relative;
  display: grid;
  gap: 10px;
}
.pos-tree-list::before {
  position: absolute;
  left: 21px;
  top: 20px;
  bottom: 20px;
  width: 2px;
  background: #c9d5ec;
  content: "";
}
.pos-tree-list button,
.entry-tree-list button {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 10px 14px;
  text-align: left;
  border: 1px solid #dfe8f8;
  border-radius: 14px;
  background: rgba(255, 255, 255, .96);
}
.entry-tree-list button {
  min-height: 54px;
  background: #f9fcff;
}
.pos-tree-list strong,
.entry-tree-list strong {
  display: grid;
  gap: 2px;
  color: #10233f;
}
.pos-tree-list small,
.entry-tree-list small {
  color: #5b6c86;
  font-weight: 700;
}
.pos-tree-list em,
.entry-tree-list em {
  color: #1f73f1;
  font-style: normal;
  font-size: 22px;
}
.training-center-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  padding-top: 18px;
  text-align: left;
}
.training-header-actions {
  justify-self: end;
  flex-shrink: 0;
}
.training-center-shell {
  display: grid;
  gap: 18px;
  padding-bottom: 18px;
}
.training-module {
  display: grid;
  gap: 12px;
}
.training-module h2 {
  margin: 0;
  color: #171240;
  font-size: 16px;
}
.training-center-grid {
  display: grid;
  gap: 12px;
}
.training-entry-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 74px;
  padding: 14px;
  color: #15143e;
  text-align: left;
  border: 1px solid #ede9fb;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(75, 63, 130, .07);
}
.training-entry-card i {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: #fff;
  font-style: normal;
  font-weight: 900;
  border-radius: 13px;
  background: linear-gradient(135deg, #8a62ff, #6845e8);
  box-shadow: 0 8px 16px rgba(108, 92, 231, .22);
}
.training-entry-card.phrase i {
  background: linear-gradient(135deg, #55d78c, #28b86d);
}
.training-entry-card.sentence i {
  background: linear-gradient(135deg, #62a8ff, #2f74f4);
}
.training-entry-card.mistake i {
  background: linear-gradient(135deg, #ff8a8a, #ff5a5f);
}
.training-entry-card.favorite i {
  background: linear-gradient(135deg, #ffd166, #ffad32);
}
.training-entry-card.smart i {
  background: linear-gradient(135deg, #6fb5ff, #6c5ce7);
}
.training-entry-card span {
  display: grid;
  gap: 4px;
  color: #171240;
}
.training-entry-card strong {
  color: #171240;
  font-size: 15px;
}
.training-entry-card small {
  color: #77708f;
  font-size: 12px;
  font-weight: 700;
}
.training-entry-card em {
  justify-self: end;
  min-height: 36px;
  padding: 9px 13px;
  color: #fff;
  font-style: normal;
  font-weight: 900;
  border-radius: 999px;
  background: linear-gradient(135deg, #7c5cff, #5f41df);
  box-shadow: 0 8px 16px rgba(108, 92, 231, .18);
}
.training-plan-card,
.review-list-card,
.review-progress-card,
.review-question-card {
  border: 1px solid #ede9fb;
  border-radius: 14px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 10px 24px rgba(75, 63, 130, .07);
}
.training-plan-card {
  display: grid;
  gap: 12px;
  padding: 14px;
}
.training-plan-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}
.training-plan-head strong {
  color: #171240;
}
.training-plan-head button,
.text-action {
  padding: 0;
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
  border: 0;
  background: transparent;
}
.training-plan-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.training-plan-grid div {
  display: grid;
  justify-items: center;
  gap: 3px;
  min-height: 58px;
  padding: 9px 4px;
  border-radius: 10px;
  background: #f7f5ff;
}
.training-plan-grid span,
.training-plan-grid small {
  color: #766f8e;
  font-size: 11px;
  font-weight: 800;
}
.training-plan-grid strong {
  color: #171240;
  font-size: 19px;
}
.training-review-panel,
.training-practice-panel {
  padding-bottom: calc(104px + env(safe-area-inset-bottom));
}
.training-subpage-header {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 64px;
  align-items: center;
  gap: 8px;
  margin: -4px -2px 14px;
  padding: 10px 2px;
  background: rgba(248, 249, 255, .95);
}
.training-subpage-header h1 {
  margin: 0;
  color: #171240;
  font-size: 18px;
  text-align: center;
}
.review-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.review-summary-grid article {
  display: grid;
  gap: 4px;
  min-height: 74px;
  padding: 14px;
  border: 1px solid #ede9fb;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(75, 63, 130, .06);
}
.review-summary-grid article:first-child {
  grid-column: span 2;
}
.review-summary-grid span {
  color: #6c6684;
  font-size: 12px;
  font-weight: 800;
}
.review-summary-grid strong {
  color: #5b3ee7;
  font-size: 28px;
}
.review-summary-grid small {
  color: #171240;
  font-weight: 900;
}
.review-list-card {
  overflow: hidden;
}
.review-list-card button {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 58px;
  padding: 13px 14px;
  color: #171240;
  text-align: left;
  border: 0;
  border-bottom: 1px solid #f0edf8;
  background: transparent;
}
.review-list-card button:last-child {
  border-bottom: 0;
}
.review-list-card i {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: #6c5ce7;
  font-style: normal;
  font-weight: 900;
  border-radius: 9px;
  background: #f2efff;
}
.review-list-card span {
  font-weight: 900;
}
.review-list-card em {
  color: #5f5a7a;
  font-style: normal;
  font-size: 12px;
  font-weight: 800;
}
.wide-primary-action {
  width: 100%;
  min-height: 52px;
  margin-top: 14px;
  color: white;
  font-weight: 900;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #7c5cff, #5f41df);
  box-shadow: 0 12px 22px rgba(108, 92, 231, .22);
}
.review-progress-card {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
  padding: 14px;
}
.review-progress-card div:first-child {
  display: flex;
  justify-content: space-between;
  color: #6c6684;
  font-size: 12px;
  font-weight: 800;
}
.review-progress-card strong {
  color: #5b3ee7;
}
.review-progress-bar {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #eeeef7;
}
.review-progress-bar i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #8a62ff, #6c5ce7);
}
.review-question-card {
  position: relative;
  display: grid;
  gap: 14px;
  min-height: 430px;
  padding: 22px 14px 16px;
}
.question-dots {
  display: flex;
  justify-content: center;
  gap: 4px;
}
.question-dots i {
  width: 8px;
  height: 4px;
  border-radius: 99px;
  background: #d7d3eb;
}
.question-dots i:first-child {
  width: 18px;
  background: #8a62ff;
}
.unknown-pill {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 7px 10px;
  color: #ff4f60;
  font-size: 12px;
  font-weight: 900;
  border: 0;
  border-radius: 999px;
  background: #fff0f2;
}
.question-type {
  color: #6c5ce7;
  font-size: 12px;
  font-weight: 900;
}
.review-question-card h2 {
  margin: 0;
  color: #11143d;
  font-size: 28px;
}
.review-question-card > p {
  margin: 0;
  color: #5f5a7a;
  line-height: 1.6;
}
.review-options {
  display: grid;
  gap: 10px;
}
.review-options button {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) 22px;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 12px;
  color: #171240;
  text-align: left;
  border: 1px solid #ece8f7;
  border-radius: 12px;
  background: #fff;
}
.review-options b {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #f4f2fb;
  font-size: 12px;
}
.review-options button.selected {
  border-color: #8a62ff;
}
.review-options button.correct i {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  color: white;
  border-radius: 999px;
  background: #6c5ce7;
}
.review-options button.correct i::before {
  content: "✓";
  font-style: normal;
  font-size: 12px;
}
.review-feedback {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 12px;
}
.review-feedback.ok {
  color: #15945d;
  background: #effcf5;
}
.review-feedback.error {
  color: #b73543;
  background: #fff3f4;
}
.review-feedback strong {
  font-size: 18px;
}
.review-feedback p {
  margin: 0;
  line-height: 1.55;
}
.review-feedback button {
  min-height: 42px;
  color: white;
  font-weight: 900;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, #7c5cff, #5f41df);
}
.review-practice-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}
.review-practice-actions button {
  min-height: 48px;
  border-radius: 10px;
}
.training-detail-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  text-align: center;
}
.training-page[hidden] {
  display: none;
}
.student-app[hidden] {
  display: none;
}
.training-page {
  min-height: 100dvh;
  padding: 28px 20px 48px;
  background: linear-gradient(180deg, #f3f6ff 0%, #fbfcff 52%, #f7f5ff 100%);
}
.training-page-shell {
  width: min(860px, 100%);
  margin: 0 auto;
}
.training-page-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
  padding: 8px 0;
  color: #0d1b3f;
  text-align: center;
}
.training-page-header span {
  display: block;
  color: #43577c;
  font-size: 14px;
  font-weight: 800;
}
.training-page-header strong {
  display: block;
  margin-top: 5px;
  font-size: 20px;
}
body.training-route-active {
  overflow: auto;
  background: #f6f8ff;
}
body.training-route-active .page {
  max-width: none;
  min-height: 100dvh;
  padding: 0;
}
body.training-route-active .student-app {
  grid-template-columns: minmax(0, 1fr);
  min-height: 100dvh;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: linear-gradient(180deg, #f3f6ff, #fbfcff 55%, #f7f5ff);
  box-shadow: none;
}
body.training-route-active .student-sidebar,
body.training-route-active .bottom-nav {
  display: none;
}
body.training-route-active .student-workspace {
  min-height: 100dvh;
  padding: 28px 20px 48px;
}
body.training-route-active .training-full-panel {
  width: min(860px, 100%);
  max-width: 860px;
}
body.training-route-active .training-full-panel .compact-study {
  box-shadow: none;
}
.word-training-card {
  width: min(720px, 100%);
  min-height: 560px;
  margin: 0 auto;
  padding: 34px;
  border: 1px solid #e3e8f5;
  border-radius: 22px;
  background: rgba(255, 255, 255, .94);
  box-shadow: none;
}
.word-training-card .study-card-topline {
  justify-content: center;
}
.word-training-card h2 {
  text-align: center;
  color: #11143d;
  font-size: 34px;
}
.word-training-card .answer,
.word-training-card .guide {
  text-align: center;
}
.word-training-card .guide {
  margin: -4px 0 14px;
  color: #6b7793;
  font-size: 22px;
  font-weight: 900;
}
.favorite-entry {
  color: #d56b00;
  border-color: #ffe0af;
  background: #fff8eb;
}

@media (max-width: 820px) {
  .training-page {
    padding: 14px 12px calc(28px + env(safe-area-inset-bottom));
  }
  .training-page-header {
    position: sticky;
    top: 0;
    z-index: 5;
    gap: 8px;
    margin: -14px -12px 14px;
    padding: 12px;
    background: rgba(247, 249, 255, .96);
  }
  .training-page-header span {
    font-size: 12px;
  }
  .training-page-header strong {
    font-size: 16px;
  }
  .word-training-card {
    min-height: calc(100dvh - 94px);
    padding: 22px 16px;
    border: 0;
    border-radius: 18px;
  }
  .word-training-card .mobile-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  body.training-route-active .student-workspace {
    padding: 14px 12px calc(28px + env(safe-area-inset-bottom));
  }
  body.training-route-active .training-full-panel {
    max-width: 680px;
  }
}
.word-detail-topbar {
  align-items: center;
}
.word-detail-topbar > div {
  flex: 1;
  text-align: center;
}
.word-detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin-bottom: 14px;
  padding: 24px;
  color: white;
  border-radius: 18px;
  background: linear-gradient(135deg, #1f73f1, #2d8aff);
  box-shadow: 0 18px 42px rgba(31, 115, 241, .18);
}
.word-detail-hero span,
.word-detail-hero p {
  color: rgba(255, 255, 255, .86);
}
.word-detail-hero h2 {
  margin: 6px 0;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1;
}
.word-detail-hero strong {
  display: block;
  margin-top: 10px;
  font-size: 18px;
}
.word-detail-hero em {
  display: inline-flex;
  margin-top: 12px;
  padding: 6px 10px;
  color: #0f5fd4;
  font-style: normal;
  font-weight: 900;
  border-radius: 999px;
  background: rgba(255, 255, 255, .9);
}
.word-detail-actions {
  display: grid;
  gap: 10px;
  min-width: 150px;
}
.word-detail-actions button {
  color: #0f5fd4;
  border-color: rgba(255, 255, 255, .68);
  background: rgba(255, 255, 255, .94);
}
.word-detail-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.word-detail-tabs article {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 18px;
  border: 1px solid #dbe8fb;
  border-radius: 16px;
  background: white;
  box-shadow: 0 12px 32px rgba(22, 81, 150, .06);
}
.word-detail-tabs article > span {
  color: #1f73f1;
  font-weight: 900;
}
.word-detail-tabs p {
  margin: 0;
  color: #31445d;
  line-height: 1.75;
}
.detail-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.detail-chip-list span {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  color: #10233f;
  font-weight: 900;
  border-radius: 12px;
  background: #f4f8ff;
}
.detail-chip-list small {
  color: #65758b;
  font-weight: 700;
}
.detail-sentence-list,
.detail-tense-list {
  display: grid;
  gap: 10px;
}
.detail-sentence-list p,
.detail-tense-list p {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 12px;
  background: #f8fbff;
}
.detail-sentence-list span,
.detail-tense-list span {
  color: #65758b;
}
.detail-tense-list strong {
  color: #10233f;
}

.mobile-app-shell {
  max-width: 520px;
  min-height: calc(100vh - 48px);
  margin: 0 auto;
  padding-bottom: 84px;
}

@supports (min-height: 100dvh) {
  .student-app,
  .mobile-app-shell {
    min-height: calc(100dvh - 48px);
  }
}
.mobile-panel {
  display: none;
}
.mobile-panel.active {
  display: block;
}
.mobile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.learn-header {
  justify-content: flex-end;
  min-height: 42px;
  margin-bottom: 10px;
}
.mobile-header.plain {
  display: block;
}
.mobile-header h1 {
  margin: 0;
  font-size: 26px;
}
.mobile-header p {
  margin: 4px 0 0;
  color: var(--muted);
}
.header-actions {
  display: flex;
  gap: 8px;
}
.learn-header .header-actions {
  margin-left: auto;
}
.icon-button {
  min-width: auto;
  padding: 9px 11px;
  border-radius: 999px;
  background: white;
}
.today-grid,
.record-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.record-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.mini-stat,
.summary-card,
.range-card,
.profile-card,
.menu-card,
.trend-card,
.list-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}
.mini-stat {
  display: grid;
  gap: 4px;
  min-height: 72px;
}
.mini-stat span,
.summary-card span,
.range-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.mini-stat strong,
.summary-card strong,
.range-card strong {
  color: var(--primary);
  font-size: 24px;
  line-height: 1.1;
}
.range-card {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #ffffff 0%, #fbf8ff 100%);
}
.range-card strong {
  font-size: 17px;
  color: var(--ink);
}
.compact-study {
  align-content: start;
  gap: 9px;
  margin-bottom: 0;
  padding: 16px;
}
.compact-study h2 {
  font-size: 34px;
  line-height: 1.12;
}
.compact-study .tag {
  display: none;
}
.compact-study .answer-row {
  margin-top: 2px;
}
.compact-study .guide:empty,
.compact-study .result:empty {
  display: none;
}
.compact-study .result {
  min-height: 0;
  margin: 0;
}
.explain-button {
  width: 100%;
  margin-top: 2px;
  background: #fff8d8;
  border-color: #e8d998;
  color: #6d4c00;
}
.licensed-entry.course-not-allowed {
  color: #8b3a3a;
  border-color: #efb3b3;
  background: #fff0f0;
}
.licensed-entry.course-not-allowed span {
  color: #8b3a3a;
  background: #ffdede;
}
.mobile-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.mobile-actions button {
  min-width: 0;
  min-height: 48px;
}
.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  width: min(520px, 100%);
  transform: translateX(-50%);
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .96);
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 24px rgba(44, 36, 76, .08);
}
.bottom-nav button {
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 9px 4px;
  border-radius: 8px;
}
.bottom-nav button.active {
  color: white;
  background: var(--primary);
}
.sheet-mask {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(22, 18, 40, .38);
}
.sheet-mask[hidden] {
  display: none;
}
.bottom-sheet {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 31;
  width: min(520px, 100%);
  max-height: min(78vh, 720px);
  overflow: auto;
  transform: translateX(-50%);
  padding: 16px;
  padding-bottom: calc(18px + env(safe-area-inset-bottom));
  background: white;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -18px 40px rgba(22, 18, 40, .18);
}
.bottom-sheet[hidden] {
  display: none;
}
.loop-player-sheet {
  width: min(560px, 100%);
  height: min(100dvh, 920px);
  max-height: 100dvh;
  padding: 0 14px 315px;
  color: #211b49;
  background: #f7f6ff;
  border-radius: 18px 18px 0 0;
}
.loop-player-header {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 2px 12px;
  background: rgba(247, 246, 255, .96);
  backdrop-filter: blur(12px);
}
.loop-player-header .student-brand {
  flex-direction: row;
  gap: 8px;
  margin: 0;
}
.loop-player-header .student-brand span {
  display: inline;
  width: auto;
  height: auto;
  color: inherit;
  background: transparent;
}
.loop-panel {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
  padding: 16px;
  background: white;
  border: 1px solid #ebe8ff;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(81, 63, 170, .06);
}
.loop-panel-title {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.loop-panel-title > span {
  color: #6548e7;
  font-size: 22px;
  line-height: 1;
}
.loop-panel-title div {
  display: grid;
  gap: 5px;
}
.loop-panel-title strong {
  font-size: 17px;
}
.loop-panel-title small {
  color: var(--muted);
}
.loop-filter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.loop-mode-control {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 0;
  border: 0;
}
.loop-mode-control legend {
  margin-bottom: 7px;
  color: #413962;
  font-size: 13px;
  font-weight: 800;
}
.loop-mode-control label {
  position: relative;
  min-width: 0;
  cursor: pointer;
}
.loop-mode-control input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.loop-mode-control span {
  display: grid;
  gap: 3px;
  height: 100%;
  padding: 11px 12px;
  color: #4b436d;
  background: #fbfaff;
  border: 1px solid #e4e0fb;
  border-radius: 8px;
}
.loop-mode-control small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.35;
}
.loop-mode-control input:checked + span {
  color: #563bd5;
  background: #f1edff;
  border-color: #7455e8;
  box-shadow: inset 0 0 0 1px #7455e8;
}
.loop-mode-control input:focus-visible + span {
  outline: 2px solid #7455e8;
  outline-offset: 2px;
}
.loop-filter-grid label {
  display: grid;
  min-width: 0;
  gap: 7px;
  color: #413962;
  font-size: 13px;
  font-weight: 800;
}
.loop-filter-grid select {
  width: 100%;
  min-width: 0;
  padding: 10px 8px;
  border-color: #e4e0fb;
  background: #fbfaff;
}
.loop-start-actions {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 10px;
}
.loop-start-actions button {
  min-width: 0;
}
.loop-queue-panel {
  padding: 0;
  overflow: hidden;
}
.loop-queue-head {
  padding: 15px 16px 10px;
}
.loop-queue-head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.loop-queue {
  display: grid;
  max-height: 390px;
  overflow: auto;
}
.loop-queue-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 11px 14px;
  text-align: left;
  border: 0;
  border-top: 1px solid #f0eef9;
  border-radius: 0;
  background: white;
}
.loop-queue-item b {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  color: #5f4bd2;
  border-radius: 50%;
  background: #f0edff;
}
.loop-queue-item > span {
  display: grid;
  min-width: 0;
  gap: 2px;
}
.loop-queue-item strong,
.loop-queue-item small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.loop-queue-item small {
  color: var(--muted);
}
.loop-queue-item em {
  color: #6548e7;
  font-style: normal;
}
.loop-queue-item.active {
  background: #f7f4ff;
}
.loop-queue-item.active b {
  color: white;
  background: #6753c8;
}
.loop-now-playing {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 33;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  width: min(560px, 100%);
  padding: 16px 18px calc(16px + env(safe-area-inset-bottom));
  color: white;
  transform: translateX(-50%);
  background: linear-gradient(145deg, #7455e8, #563bd5);
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -12px 30px rgba(70, 45, 180, .28);
}
.loop-now-meta {
  display: grid;
  min-width: 0;
  gap: 3px;
}
.loop-now-meta span,
.loop-now-meta small {
  color: rgba(255, 255, 255, .82);
}
.loop-now-meta strong {
  overflow: hidden;
  font-size: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.loop-now-count {
  display: grid;
  justify-items: end;
  gap: 3px;
}
.loop-now-count strong {
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .16);
}
.loop-now-count span {
  color: rgba(255, 255, 255, .82);
  font-size: 12px;
}
.loop-subtitle {
  grid-column: 1 / -1;
  min-height: 54px;
  max-height: 88px;
  padding: 10px 12px;
  overflow-y: auto;
  color: white;
  font-size: 15px;
  line-height: 1.55;
  text-align: center;
  white-space: pre-wrap;
  background: rgba(31, 17, 104, .28);
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 8px;
}
.loop-player-controls {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
  justify-items: center;
  padding: 7px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
}
.loop-player-controls button {
  min-width: 0;
  color: white;
  border: 0;
  background: transparent;
}
.loop-player-controls .loop-pause {
  width: 48px;
  height: 48px;
  padding: 0;
  border: 3px solid white;
  border-radius: 50%;
}
.loop-progress-track {
  grid-column: 1 / -1;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, .28);
}
.loop-progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: white;
  transition: width .25s ease;
}
.loop-volume {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}
.loop-volume input {
  width: 100%;
  accent-color: white;
}
.sheet-head,
.sheet-actions,
.list-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.sheet-head strong {
  font-size: 20px;
}
.sheet-close {
  min-width: auto;
  padding: 8px 10px;
  background: #f8f6ff;
}
.sheet-toolbar {
  border: 0;
  margin: 0;
  padding: 0;
  grid-template-columns: 1fr;
}
.announcement-list {
  display: grid;
  gap: 10px;
}
.announcement-item.full {
  padding: 12px;
  border: 1px solid #efe6bd;
  border-radius: 8px;
  background: #fffdf4;
}
.profile-card,
.menu-card {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}
.profile-card strong {
  font-size: 22px;
}
.profile-card span {
  color: var(--muted);
}
.menu-card button {
  justify-content: space-between;
  width: 100%;
  background: white;
}
.menu-card span {
  color: var(--muted);
  font-size: 13px;
}
.logout-button {
  width: 100%;
  color: var(--bad);
  border-color: #e4b5bc;
  background: #fff3f5;
}
.trend-card,
.list-card {
  margin-bottom: 12px;
}
.trend-card h2,
.list-card h2 {
  margin: 0 0 12px;
  font-size: 18px;
}
.trend-chart {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  align-items: end;
  min-height: 112px;
}
.trend-chart > .muted {
  grid-column: 1 / -1;
  align-self: center;
  width: 100%;
}
.trend-bar {
  display: grid;
  justify-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}
.trend-bar span {
  display: block;
  width: 100%;
  max-width: 28px;
  border-radius: 999px 999px 4px 4px;
  background: var(--primary);
}
.wrong-list {
  display: grid;
  gap: 10px;
}
.photo-ai-card,
.photo-explain-card,
.photo-history-item {
  display: grid;
  gap: 12px;
}
.photo-ai-card {
  padding: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.photo-picker {
  display: grid;
  gap: 8px;
  padding: 14px;
  color: var(--primary);
  font-weight: 900;
  text-align: center;
  background: #f4f1ff;
  border: 1px dashed #b7aaf0;
  border-radius: 8px;
}
.photo-picker input {
  width: 100%;
}
.photo-tip {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
.photo-preview {
  display: grid;
  place-items: center;
  min-height: 180px;
  color: var(--muted);
  background: #f9fbff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.photo-preview img {
  width: 100%;
  max-height: 360px;
  object-fit: contain;
}
.ocr-result-list,
.photo-history-list,
.history-line-list {
  display: grid;
  gap: 10px;
}
.ocr-line-card,
.history-line-list button {
  justify-content: flex-start;
  width: 100%;
  text-align: left;
  line-height: 1.5;
  background: #fbfdff;
}
.photo-explain-card {
  line-height: 1.7;
}
.photo-explain-card p {
  margin: 0;
}
.photo-explain-card ul {
  margin: 6px 0 0;
  padding-left: 20px;
}
.photo-explain-card span {
  color: var(--muted);
}
.photo-history-item {
  padding: 12px;
  background: #fbfdff;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.article-search-card {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
  padding: 14px;
  background: linear-gradient(135deg, #ffffff 0%, #f7fbff 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.article-date-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.list-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.list-card-head h2 {
  margin: 0;
}
.article-list {
  display: grid;
  gap: 18px;
  padding-bottom: calc(96px + env(safe-area-inset-bottom));
}
.article-browser-card {
  overflow: hidden;
}
.article-browser-head,
.article-module-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.article-browser-head h2,
.article-module-head h3,
.article-section-head h3 {
  margin: 0;
}
.article-back-button {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 6px 12px;
}
.article-section-head {
  align-items: center;
  margin-top: 4px;
}
.article-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.article-breadcrumb {
  padding: 4px 8px;
  min-height: 0;
  border-radius: 8px;
  background: #eef4ff;
  color: var(--primary);
  border-color: #cbd9ff;
}
.article-folder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.article-card {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: start;
  width: 100%;
  min-height: 92px;
  gap: 10px;
  padding: 14px;
  text-align: left;
  background: #fbfdff;
  border-color: #d8e1f2;
}
.article-folder-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 18px;
  align-items: center;
  width: 100%;
  min-height: 116px;
  gap: 12px;
  padding: 16px;
  text-align: left;
  background: #f8fbff;
  border-color: #bfd2ff;
}
.article-folder-icon,
.article-doc-icon {
  position: relative;
  display: inline-block;
  border-radius: 8px;
}
.article-folder-icon {
  width: 42px;
  height: 36px;
  background: linear-gradient(180deg, #67a7ff, #1f7cf2);
  box-shadow: 0 8px 18px rgba(31, 124, 242, 0.18);
}
.article-folder-icon::before {
  content: "";
  position: absolute;
  left: 5px;
  top: -5px;
  width: 18px;
  height: 8px;
  border-radius: 6px 6px 0 0;
  background: #91c3ff;
}
.article-doc-icon {
  width: 28px;
  height: 34px;
  background: #eef4ff;
  border: 1px solid #bfd2ff;
}
.article-doc-icon::before,
.article-doc-icon::after {
  content: "";
  position: absolute;
  left: 7px;
  right: 7px;
  height: 2px;
  border-radius: 99px;
  background: #6b8bd8;
}
.article-doc-icon::before {
  top: 11px;
}
.article-doc-icon::after {
  top: 18px;
}
.article-folder-content,
.article-card-body {
  display: grid;
  min-width: 0;
  gap: 5px;
}
.article-folder-card strong {
  font-size: 18px;
  color: var(--ink);
}
.article-folder-card span span,
.article-recent-item span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.article-folder-card em {
  color: var(--primary);
  font-style: normal;
  font-size: 13px;
  font-weight: 900;
}
.article-folder-arrow {
  color: var(--primary);
  font-size: 24px;
  font-weight: 900;
}
.article-item-list,
.article-recent-list {
  display: grid;
  gap: 10px;
}
.article-card strong {
  font-size: 18px;
  color: var(--ink);
  min-width: 0;
}
.article-card em {
  color: var(--muted);
  font-style: normal;
  line-height: 1.5;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.article-card-meta {
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
}
.article-recent-updates {
  margin: 4px 0 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfdff;
}
.article-recent-item {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) 96px;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 44px;
  padding: 10px;
  text-align: left;
  background: white;
  border-color: #e1e7f4;
}
.article-recent-item strong,
.article-recent-item span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.article-recent-item em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  text-align: right;
}
.article-empty-state {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 32px 14px;
  border: 1px dashed #cbd9ff;
  border-radius: 12px;
  background: #fbfdff;
  color: var(--muted);
  text-align: center;
}
.article-empty-state button {
  width: auto;
  min-height: 34px;
  padding: 6px 14px;
}
@media (max-width: 720px) {
  .article-search-card {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    padding: 10px;
  }
  .article-search-card label {
    gap: 5px;
  }
  .article-folder-grid {
    grid-template-columns: 1fr;
  }
  .article-folder-card {
    min-height: 96px;
    padding: 13px;
  }
  .article-recent-item {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .article-recent-item em {
    text-align: left;
  }
  .article-browser-head {
    align-items: flex-start;
  }
  .article-list {
    padding-bottom: calc(124px + env(safe-area-inset-bottom));
  }
}
.article-detail-card {
  margin-top: 12px;
}
.article-detail-content {
  display: grid;
  gap: 10px;
  color: #332b52;
  line-height: 1.8;
}
.article-detail-content h2,
.article-detail-content h3,
.article-detail-content h4,
.article-detail-content p,
.article-detail-content ul,
.article-detail-content ol,
.article-detail-content blockquote {
  margin: 0;
}
.article-detail-content h2,
.article-detail-content h3,
.article-detail-content h4 {
  color: #1f1a3d;
  line-height: 1.35;
}
.article-detail-content h2 {
  font-size: 22px;
}
.article-detail-content h3 {
  font-size: 18px;
}
.article-detail-content h4 {
  font-size: 16px;
}
.article-detail-content ul,
.article-detail-content ol {
  padding-left: 22px;
}
.article-detail-content li + li {
  margin-top: 4px;
}
.article-detail-content blockquote {
  border-left: 4px solid #8d7cff;
  color: #51476f;
  padding: 4px 0 4px 12px;
}
.article-detail-content code {
  background: #f3f0ff;
  border-radius: 4px;
  color: #493a85;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
  padding: 2px 5px;
}
.article-detail-content a {
  color: #4f46e5;
  font-weight: 800;
  text-decoration: none;
}
.article-detail-content a:hover {
  text-decoration: underline;
}
.article-detail-page {
  min-height: 100vh;
  padding-bottom: calc(96px + env(safe-area-inset-bottom));
  background: #f6f7fb;
}
.article-detail-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  padding: 8px max(16px, calc((100vw - 860px) / 2));
  background: rgba(255, 255, 255, .94);
  border-bottom: 1px solid #ebe8f5;
  backdrop-filter: blur(14px);
}
.article-detail-back {
  width: auto;
  min-height: 38px;
  padding: 7px 13px;
}
.article-detail-brand {
  color: var(--primary);
  font-weight: 900;
  text-decoration: none;
}
.article-reader-shell {
  width: min(820px, calc(100% - 28px));
  margin: 24px auto;
}
.article-detail-state {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 54px 20px;
  color: var(--muted);
  text-align: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 18px;
}
.article-detail-state[hidden] { display: none; }
.article-detail-state.error strong { color: #a52d3b; font-size: 22px; }
.article-detail-state div { display: flex; align-items: center; gap: 10px; }
.article-detail-state a { color: var(--primary); font-weight: 800; }
.article-reader {
  padding: 34px clamp(20px, 6vw, 64px) 30px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 16px 44px rgba(48, 39, 91, .08);
}
.article-reader[hidden] { display: none; }
.article-reader-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.article-reader-breadcrumb a { color: var(--primary); text-decoration: none; }
.article-reader-breadcrumb i { color: #aaa4bd; font-style: normal; }
.article-reader-header { padding-bottom: 26px; border-bottom: 1px solid #eeeaf7; }
.article-category-pill {
  display: inline-flex;
  padding: 5px 10px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 900;
  background: #f0edff;
  border-radius: 99px;
}
.article-reader-header h1 {
  margin: 14px 0 10px;
  color: #1f1a3d;
  font-size: clamp(30px, 5vw, 44px);
  line-height: 1.25;
  letter-spacing: -.02em;
}
.article-reader-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--muted); font-size: 14px; }
.article-reader-summary {
  margin: 22px 0 0;
  padding: 16px 18px;
  color: #51476f;
  line-height: 1.75;
  background: #f8f7fc;
  border-left: 4px solid #8d7cff;
  border-radius: 0 10px 10px 0;
}
.article-audio-button { width: auto; margin-top: 18px; color: white; background: var(--primary); }
.article-audio-status { min-height: 20px; margin: 9px 0 0; color: var(--muted); font-size: 13px; }
.article-reader-body { gap: 17px; padding: 30px 0; font-size: 17px; line-height: 1.95; }
.article-reader-body p { margin: 0; }
.article-reader-body h2 { margin-top: 16px; font-size: 26px; }
.article-reader-body h3 { margin-top: 12px; font-size: 21px; }
.article-reader-body li + li { margin-top: 8px; }
.article-reader-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 20px 0;
  border-top: 1px solid #eeeaf7;
  border-bottom: 1px solid #eeeaf7;
}
.article-reader-actions button { width: auto; min-height: 40px; padding: 8px 14px; }
.article-reader-actions button.active { color: white; border-color: var(--primary); background: var(--primary); }
.article-reader-actions span { margin-left: auto; color: var(--muted); font-size: 13px; }
.article-sibling-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 24px; }
.article-sibling-nav a {
  display: grid;
  gap: 5px;
  padding: 15px;
  color: var(--ink);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.article-sibling-nav a[hidden] { display: none; }
.article-sibling-nav a:last-child { text-align: right; }
.article-sibling-nav span { color: var(--muted); font-size: 12px; }
.article-detail-bottom-nav a {
  display: grid;
  justify-items: center;
  gap: 3px;
  min-width: 0;
  padding: 9px 4px;
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
  border-radius: 8px;
}
.article-detail-bottom-nav a span { font-weight: 900; }
.article-detail-bottom-nav a.active { color: white; background: var(--primary); }
@media (max-width: 720px) {
  .article-detail-topbar { padding-inline: 12px; }
  .article-reader-shell { width: 100%; margin: 0; }
  .article-reader { padding: 22px 17px 34px; border-width: 0; border-radius: 0; box-shadow: none; }
  .article-reader-breadcrumb { margin-bottom: 18px; overflow-x: auto; flex-wrap: nowrap; white-space: nowrap; }
  .article-reader-header h1 { font-size: 30px; }
  .article-reader-body { font-size: 17px; line-height: 1.9; }
  .article-reader-actions span { width: 100%; margin-left: 0; }
  .article-sibling-nav { grid-template-columns: 1fr; }
  .article-sibling-nav a:last-child { text-align: left; }
}
.compact-pager {
  margin-top: 12px;
}
.explain-content dl {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 10px;
  margin: 0;
}
.explain-content dt {
  color: var(--muted);
  font-weight: 900;
}
.explain-content dd {
  margin: 0;
  line-height: 1.6;
}
.explain-content dd span {
  color: var(--muted);
}
.word-explain-sheet {
  width: min(1024px, calc(100% - 16px));
  max-height: min(92vh, 920px);
  padding: 0;
  overflow: auto;
  color: #17133c;
  background: #f8f9fc;
  border: 1px solid rgba(108, 92, 231, .14);
  border-radius: 18px 18px 0 0;
}
.word-explain-topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 18px;
  background: rgba(248, 249, 252, .94);
  border-bottom: 1px solid rgba(108, 92, 231, .12);
  backdrop-filter: blur(12px);
}
.word-explain-back,
.word-explain-refresh,
.ai-card-head button {
  min-width: auto;
  color: #5b45d6;
  border: 1px solid rgba(108, 92, 231, .2);
  background: white;
  border-radius: 999px;
}
.word-explain-refresh {
  color: #8a5a00;
  background: #fff3cf;
  border-color: #ffd47c;
}
.ai-explain-page {
  display: grid;
  gap: 18px;
  padding: 20px 24px 0;
  background:
    radial-gradient(circle at 8% 0%, rgba(162, 155, 254, .34), transparent 28%),
    radial-gradient(circle at 95% 8%, rgba(108, 92, 231, .16), transparent 26%),
    #f8f9fc;
}
.ai-explain-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  text-align: center;
}
.ai-explain-hero > div {
  flex: 1;
}
.ai-kicker {
  margin: 0;
  color: #6c5ce7;
  font-size: 30px;
  font-weight: 950;
}
.ai-kicker span {
  display: inline-flex;
  margin-left: 10px;
  padding: 5px 13px;
  color: #8a5a00;
  font-size: 14px;
  vertical-align: middle;
  border: 1px solid #f8c568;
  border-radius: 999px;
  background: #ffe7a8;
}
.ai-explain-hero h2 {
  margin: 8px 0 4px;
  font-size: 18px;
}
.ai-explain-hero p:last-child {
  margin: 0;
  color: #5e5a7d;
}
.ai-explain-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.8fr);
  gap: 18px;
}
.ai-card {
  padding: 22px;
  background: rgba(255, 255, 255, .94);
  border: 1px solid rgba(108, 92, 231, .18);
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
}
.ai-card h3 {
  margin: 0 0 14px;
  color: #1d1760;
  font-size: 24px;
}
.ai-word-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  min-height: 250px;
  overflow: hidden;
}
.ai-word-card h3 {
  display: inline-flex;
  margin: 0;
  color: #6c5ce7;
  font-size: clamp(52px, 9vw, 78px);
  line-height: .95;
}
.ai-sound {
  width: 48px;
  height: 48px;
  margin-left: 10px;
  vertical-align: top;
  background: #eeeaff;
}
.ai-phonetic {
  margin: 12px 0;
  color: #2b254a;
  font-size: 28px;
}
.ai-part {
  display: inline-flex;
  padding: 7px 12px;
  color: white;
  font-weight: 900;
  border-radius: 9px;
  background: linear-gradient(135deg, #a29bfe, #6c5ce7);
}
.ai-stars {
  margin: 18px 0 0;
  color: #fdcb6e;
  font-size: 22px;
}
.ai-stars span {
  margin-left: 10px;
  padding: 6px 10px;
  color: #e17000;
  font-size: 14px;
  border: 1px solid #ffd79a;
  border-radius: 10px;
  background: #fff3da;
}
.ai-teacher {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 220px;
  margin: -22px -22px -22px 0;
  overflow: hidden;
}
.ai-bubble {
  position: absolute;
  left: 0;
  top: 38px;
  max-width: 145px;
  padding: 14px;
  color: white;
  font-weight: 900;
  border-radius: 24px 24px 24px 8px;
  background: linear-gradient(135deg, #a29bfe, #6c5ce7);
  box-shadow: 0 14px 26px rgba(108, 92, 231, .22);
}
.ai-teacher-image {
  width: 100%;
  height: 100%;
  min-height: 250px;
  object-fit: cover;
  object-position: 52% 22%;
}
.meaning-list {
  display: grid;
  gap: 12px;
}
.meaning-list p {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0;
  padding: 15px;
  font-size: 18px;
  border-radius: 12px;
  background: #f5f6fb;
}
.meaning-list span {
  font-size: 28px;
}
.ai-ai-card {
  line-height: 1.85;
}
.ai-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.ai-card-head h3 {
  margin: 0;
}
.ai-ai-text p,
.ai-ai-text ul,
.ai-ai-text ol {
  margin: 0 0 10px;
}
.ai-ai-text li::marker {
  color: #6c5ce7;
}
.ai-cache {
  margin: 10px 0 0;
  color: #8a86a6;
  font-size: 12px;
}
.example-list {
  display: grid;
  gap: 10px;
}
.example-row {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f7f7fd;
}
.example-row b {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  color: white;
  border-radius: 50%;
  background: #6c5ce7;
}
.example-row p {
  display: grid;
  gap: 3px;
  margin: 0;
}
.example-row span {
  color: #5f5b7b;
}
.example-row button {
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 12px;
  background: #eeeaff;
}
.ai-pronunciation-card {
  margin-bottom: 92px;
}
.pronunciation-ai-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}
.pronunciation-ai-grid > div {
  display: grid;
  justify-items: center;
  gap: 10px;
  min-height: 150px;
  padding: 18px;
  text-align: center;
  border: 1px solid #e4e0f5;
  border-radius: 14px;
  background: #fbfbff;
}
.pronunciation-ai-grid span {
  font-weight: 950;
}
.pronunciation-ai-grid button {
  min-height: 46px;
  color: #5b45d6;
  border-color: #d9d0ff;
  background: #f1edff;
  border-radius: 999px;
}
.pronunciation-ai-grid strong {
  color: #00b894;
  font-size: 48px;
}
.pronunciation-ai-grid em {
  font-size: 18px;
  font-style: normal;
}
.pronunciation-ai-grid small,
.pronunciation-ai-grid p {
  margin: 0;
  color: #5f5b7b;
  line-height: 1.7;
}
.ai-reward-bar {
  position: sticky;
  bottom: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 -24px;
  padding: 16px 24px calc(16px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .96);
  border-top: 1px solid rgba(108, 92, 231, .14);
  box-shadow: 0 -12px 30px rgba(29, 23, 96, .08);
  backdrop-filter: blur(12px);
}
.ai-reward-bar div {
  display: flex;
  align-items: center;
  gap: 28px;
  min-width: 0;
}
.ai-reward-bar span {
  color: #4f486d;
}
.ai-reward-bar button {
  color: white;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, #6c5ce7, #5a43d6);
  box-shadow: 0 10px 18px rgba(108, 92, 231, .22);
}

.toolbar, .stats, .study-card, .history, .admin-section {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  margin-bottom: 16px;
}
.toolbar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  align-items: end;
}
.toolbar label { display: grid; gap: 6px; font-weight: 700; color: var(--muted); }
.toolbar .check { display: flex; align-items: center; gap: 8px; }
.voice-status {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.study-card { display: grid; gap: 12px; }
.review-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid #b9c7ea;
  border-radius: 8px;
  background: #edf4ff;
  color: #3b4c72;
  font-weight: 800;
}
.review-banner[hidden] { display: none; }
.announcement-board {
  min-height: 118px;
  border-radius: 8px;
  background: linear-gradient(135deg, #fff8d8 0%, #edf7ff 100%);
  padding: 14px;
  border: 1px solid #e8d998;
}
.announcement-card {
  display: grid;
  gap: 10px;
}
.announcement-card.quiet {
  color: #4c5574;
}
.announcement-kicker {
  margin: 0;
  color: #8a6a12;
  font-size: 13px;
  font-weight: 900;
}
.announcement-item {
  display: grid;
  gap: 4px;
  padding: 8px 0;
  border-top: 1px solid rgba(138, 106, 18, 0.18);
}
.announcement-item:first-of-type {
  border-top: 0;
  padding-top: 0;
}
.announcement-card strong {
  color: #241d48;
  font-size: 18px;
}
.announcement-card span {
  color: #4f5570;
  line-height: 1.55;
}
.tag { color: var(--muted); margin: 0; }
.study-card h2 { margin: 0; font-size: 36px; }
.answer { margin: 0; color: var(--primary); font-size: 22px; font-weight: 800; }
.guide { margin: 0; line-height: 1.7; color: #3b335a; }
.answer-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.result { min-height: 28px; font-weight: 800; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.actions button { min-width: 110px; }
.licensed-entry span {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 6px;
  color: #795400;
  font-size: 11px;
  border-radius: 999px;
  background: #fff0bd;
}
.nav-prev {
  color: #3b4c72;
  border-color: #b9c7ea;
  background: #edf4ff;
}
.reveal-answer {
  color: #2f4f7a;
  border-color: #bfd2ef;
  background: #f1f7ff;
}
.speak-main {
  color: white;
  border-color: #5b49bc;
  background: #6753c8;
}
.auto-play,
.pronunciation-practice {
  color: #4d3100;
  border-color: #e5ba55;
  background: #fff0bd;
}
.loop-play-entry {
  color: white;
  border-color: #5b49bc;
  background: #6753c8;
}
.auto-play.is-running,
.pronunciation-practice.is-running {
  color: white;
  border-color: #bf3543;
  background: #c73f4a;
}
.pronunciation-panel {
  display: grid;
  gap: 10px;
  padding: 14px;
  background: #f8fbff;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.purchase-sheet {
  max-width: 520px;
}
.license-center-sheet {
  max-width: 520px;
}
.license-status-card {
  margin-bottom: 14px;
  padding: 16px;
  border: 1px solid #d9d2f5;
  border-radius: 8px;
  background: #f5f2ff;
}
.license-status-card.is-active {
  border-color: #bce7d2;
  background: #f0fbf6;
}
.license-status-card strong { color: #4933a5; font-size: 20px; }
.license-status-card.is-active strong { color: #16885a; }
.license-status-card p { margin: 6px 0 0; color: var(--muted); }
.license-details {
  display: grid;
  margin: 0 0 16px;
}
.license-details div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 2px;
  border-bottom: 1px solid var(--line);
}
.license-details dt { color: var(--muted); }
.license-details dd { margin: 0; font-weight: 800; text-align: right; }
.purchase-content {
  display: grid;
  gap: 14px;
  padding: 4px 0 12px;
}
.purchase-content > p {
  margin: 0;
  line-height: 1.7;
}
.purchase-price {
  color: var(--primary);
  font-size: 20px;
  font-weight: 900;
}
.purchase-qr {
  width: min(240px, 72vw);
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.contact-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #faf9ff;
}
.contact-row span {
  color: var(--muted);
}
.purchase-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.menu-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px 0;
  color: inherit;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.menu-link span {
  color: var(--muted);
}
.login-main-link {
  display: block;
  margin-top: 16px;
  text-align: center;
}
.pronunciation-head,
.pronunciation-actions,
.score-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.pronunciation-head {
  justify-content: space-between;
}
.pronunciation-head span {
  color: var(--primary);
  font-weight: 900;
}
.score-card {
  display: grid;
  place-items: center;
  width: 96px;
  min-height: 82px;
  color: white;
  background: #6753c8;
  border-radius: 8px;
}
.score-card strong {
  font-size: 32px;
}
.score-grid span {
  padding: 8px 10px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.nav-next {
  color: white;
  border-color: #23754a;
  background: #258a55;
}

.history h2, .admin-section h2 { margin-top: 0; }
.records-page-status {
  margin-bottom: 12px;
  padding: 12px 14px;
  color: #5c4bb5;
  font-size: 13px;
  font-weight: 800;
  border: 1px solid #ddd6ff;
  border-radius: 12px;
  background: #f5f2ff;
}
.records-page-status.error {
  color: var(--bad);
  border-color: #f0c2c8;
  background: #fff2f4;
}
.records-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}
.records-metric,
.records-card {
  border: 1px solid #e8e3f7;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(55, 42, 105, .06);
}
.records-metric {
  position: relative;
  display: grid;
  gap: 5px;
  min-height: 128px;
  padding: 18px;
  overflow: hidden;
}
.records-metric::after {
  position: absolute;
  top: -18px;
  right: -18px;
  width: 64px;
  height: 64px;
  content: "";
  border-radius: 50%;
  background: currentColor;
  opacity: .07;
}
.records-metric span,
.records-metric small { color: var(--muted); font-weight: 800; }
.records-metric span { font-size: 14px; }
.records-metric small { font-size: 12px; }
.records-metric strong {
  display: flex;
  align-items: baseline;
  gap: 4px;
  color: #20175b;
  font-size: 32px;
  line-height: 1;
}
.records-metric strong b { font: inherit; }
.records-metric strong em { color: var(--muted); font-size: 13px; font-style: normal; }
.metric-today { color: #7255e9; }
.metric-total { color: #20a766; }
.metric-accuracy { color: #307ded; }
.metric-streak { color: #f09a28; }
.records-card { padding: 18px; }
.level-card { margin-bottom: 12px; }
.level-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
}
.level-medal {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  color: #ffd66b;
  font-size: 34px;
  border: 7px solid #a890ff;
  border-radius: 50%;
  background: linear-gradient(145deg, #7658ef, #4d35bc);
  box-shadow: 0 8px 20px rgba(94, 65, 207, .25);
}
.level-copy > span { color: #7258db; font-size: 12px; font-weight: 900; }
.level-copy h2 { margin: 4px 0; color: #211752; }
.level-copy h2 em { color: #674fe0; font-size: 18px; font-style: normal; }
.level-copy p { margin: 0; color: var(--muted); font-size: 13px; }
.level-main > strong { color: #3f3477; font-size: 14px; }
.level-progress {
  height: 9px;
  margin: 14px 0 16px 88px;
  overflow: hidden;
  border-radius: 999px;
  background: #eeeaf8;
}
.level-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7f60f1, #5a3cd3);
  transition: width .35s ease;
}
.level-stages { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.level-stage { position: relative; display: grid; justify-items: center; gap: 4px; color: #aaa4ba; font-size: 11px; }
.level-stage::before {
  position: absolute;
  top: 15px;
  right: 56%;
  left: -44%;
  height: 2px;
  content: "";
  background: #ebe7f5;
}
.level-stage:first-child::before { display: none; }
.level-stage span { z-index: 1; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #f0eef6; }
.level-stage.unlocked { color: #6048cc; }
.level-stage.unlocked span { color: #fff; background: #7458df; }
.level-stage.current span { box-shadow: 0 0 0 5px #eee9ff; }
.records-learning-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}
.learning-progress-card .records-card-head span {
  color: #5c46c8;
  font-size: 13px;
  font-weight: 900;
}
.learning-progress-summary {
  margin: -6px 0 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.learning-progress-summary.current {
  margin-top: -4px;
  color: #4e6387;
}
.learning-progress-list {
  display: grid;
  gap: 10px;
}
.learning-progress-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(90px, .7fr) 42px 10px;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 0;
  text-align: left;
  border: 0;
  background: transparent;
}
.learning-progress-item div {
  display: grid;
  min-width: 0;
  gap: 2px;
}
.learning-progress-item strong {
  overflow: hidden;
  color: #28204d;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.learning-progress-item small {
  color: var(--muted);
  font-size: 11px;
}
.learning-progress-track {
  overflow: hidden;
  height: 8px;
  border-radius: 999px;
  background: #eeeaf8;
}
.learning-progress-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #2f9c6a;
}
.learning-progress-item.pos .learning-progress-track i {
  background: #3979d9;
}
.learning-progress-item em {
  color: #514875;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  text-align: right;
}
.learning-progress-item b {
  color: #9a93af;
  font-size: 16px;
  font-weight: 900;
}
.records-progress-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  margin-top: 12px;
  color: #fff;
  border: 0;
  border-radius: 8px;
  background: #2f9c6a;
  font-weight: 900;
}
.records-progress-action.pos {
  color: #285ca6;
  background: #eaf2ff;
}
.records-dashboard-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.records-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.records-card-head h2 { margin: 0; color: #21194a; font-size: 17px; }
.calendar-nav { display: flex; align-items: center; gap: 8px; }
.calendar-nav button { min-width: 32px; padding: 5px 8px; color: #4e3cb2; border: 0; background: transparent; font-size: 22px; }
.calendar-nav strong { min-width: 86px; text-align: center; font-size: 13px; }
.calendar-weekdays,
.records-calendar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.calendar-weekdays { margin-bottom: 6px; color: #8c86a2; font-size: 11px; text-align: center; }
.records-calendar button,
.calendar-spacer { min-width: 0; aspect-ratio: 1; }
.records-calendar button { position: relative; display: grid; place-items: center; padding: 0; color: #393153; border: 0; border-radius: 50%; background: transparent; }
.records-calendar button.studied { color: #167448; background: #dff8eb; font-weight: 900; }
.records-calendar button.today { color: #fff; background: #6b4de2; box-shadow: 0 4px 12px rgba(107, 77, 226, .28); }
.records-calendar button i { position: absolute; bottom: 3px; width: 4px; height: 4px; border-radius: 50%; background: #2ab979; }
.records-calendar button.today i { background: #fff; }
.calendar-legend { display: flex; justify-content: center; gap: 14px; margin-top: 12px; color: var(--muted); font-size: 11px; }
.calendar-legend span { display: flex; align-items: center; gap: 4px; }
.calendar-legend i { width: 9px; height: 9px; border-radius: 50%; background: #eeeaf7; }
.calendar-legend i.studied { background: #83ddb1; }
.calendar-legend i.today { background: #6b4de2; }
.trend-legend { display: flex; gap: 12px; color: var(--muted); font-size: 11px; }
.trend-legend span::before { display: inline-block; width: 8px; height: 8px; margin-right: 4px; content: ""; border-radius: 50%; }
.trend-legend .total::before { background: #7458df; }
.trend-legend .accuracy::before { background: #3ac48a; }
.trend-plot { position: relative; height: 150px; margin: 8px 10px 0; border-bottom: 1px solid #eeeaf7; }
.trend-bars { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(7, 1fr); align-items: end; gap: 8px; }
.records-trend-bar { position: relative; display: flex; justify-content: center; height: 100%; align-items: end; }
.records-trend-bar span { width: min(24px, 70%); min-height: 2px; border-radius: 6px 6px 0 0; background: linear-gradient(#9b83f6, #6849db); }
.records-trend-bar b { position: absolute; top: 2px; color: #776d92; font-size: 10px; }
.trend-line { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.trend-line polyline { fill: none; stroke: #38bd82; stroke-width: 2; vector-effect: non-scaling-stroke; }
.trend-line circle { fill: #38bd82; stroke: #fff; stroke-width: 1; vector-effect: non-scaling-stroke; }
.trend-labels { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-top: 8px; text-align: center; }
.trend-labels span { display: grid; gap: 2px; min-width: 0; }
.trend-labels b { color: #71698a; font-size: 10px; }
.trend-labels em { color: #2ba66f; font-size: 9px; font-style: normal; }
.records-text-link { min-width: auto; padding: 4px; color: #6549d5; border: 0; background: transparent; font-size: 12px; }
.mistakes-list { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.mistakes-list li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid #f0edf7; }
.mistakes-list li:last-child { border-bottom: 0; }
.mistake-rank { display: grid; place-items: center; width: 22px; height: 22px; color: #fff; font-size: 11px; border-radius: 50%; background: #7560db; }
.mistakes-list li:nth-child(1) .mistake-rank { background: #f5a623; }
.mistakes-list li:nth-child(2) .mistake-rank { background: #8b74ed; }
.mistakes-list li:nth-child(3) .mistake-rank { background: #e68b43; }
.mistakes-list li div { display: grid; min-width: 0; }
.mistakes-list strong { overflow: hidden; color: #272046; text-overflow: ellipsis; white-space: nowrap; }
.mistakes-list small { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.mistakes-list em { color: var(--bad); font-size: 12px; font-style: normal; font-weight: 800; }
.favorites-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.favorites-summary button { display: grid; justify-items: center; gap: 7px; min-width: 0; padding: 14px 5px; color: #514a69; border: 0; border-radius: 12px; background: #f7f5fc; }
.favorites-summary button::before { display: grid; place-items: center; width: 34px; height: 34px; color: #674ce0; content: "★"; border-radius: 50%; background: #ebe6ff; }
.favorites-summary span { font-size: 11px; }
.favorites-summary strong { color: #21194a; font-size: 19px; }
.records-history-card { margin-top: 12px; }
.record-history-row { display: grid; grid-template-columns: 1.2fr repeat(4, .8fr) auto; align-items: center; gap: 10px; width: 100%; padding: 14px 10px; text-align: left; border: 0; border-bottom: 1px solid #ece8f5; border-radius: 0; background: transparent; }
.record-history-row:first-child { border-radius: 10px 10px 0 0; background: linear-gradient(90deg, #f0ebff, #faf8ff); }
.record-history-row strong { color: #29204f; }
.record-history-row span { color: #77708e; font-size: 12px; }
.record-history-row span b { color: #332a59; }
.record-history-row span b.correct { color: var(--good); }
.record-history-row span b.wrong { color: var(--bad); }
.record-history-row em { color: #6047cb; font-size: 12px; font-style: normal; font-weight: 800; }
.records-empty { grid-column: 1 / -1; margin: 18px 0; color: var(--muted); text-align: center; }
.records-empty.error { color: var(--bad); }
.record-detail-page {
  min-height: 100vh;
  padding-bottom: calc(94px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, #f8f6ff 0, #fbfaff 100%);
}
.record-detail-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 64px;
  padding: 10px max(18px, calc((100% - 860px) / 2));
  border-bottom: 1px solid #ebe7f5;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(14px);
}
.record-detail-topbar > strong { color: #1f1944; font-size: 18px; }
.record-detail-topbar > span { justify-self: end; color: #5145a8; }
.record-detail-back { color: #403381; font-weight: 800; text-decoration: none; }
.record-detail-shell { width: min(820px, calc(100% - 28px)); margin: 0 auto; padding: 18px 0 30px; }
.record-detail-state { padding: 30px; color: var(--muted); text-align: center; }
.record-detail-state.error { margin-top: 24px; color: var(--bad); border: 1px solid #f0c4cb; border-radius: 14px; background: #fff3f5; }
.record-detail-state.error p { color: var(--muted); }
.record-date-nav { display: grid; grid-template-columns: 42px 1fr 42px; align-items: center; margin-bottom: 16px; }
.record-date-nav h1 { margin: 0; color: #181142; font-size: 20px; text-align: center; }
.record-date-nav button { min-width: 38px; padding: 7px; color: #4f3cb4; border: 0; background: transparent; font-size: 26px; }
.record-detail-summary,
.record-session-summary,
.record-detail-list-card,
.record-learning-tip {
  border: 1px solid #e5dffc;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(55, 42, 105, .05);
}
.record-detail-summary { display: grid; grid-template-columns: repeat(4, 1fr); padding: 20px; background: linear-gradient(135deg, #f3edff, #fff); }
.record-detail-summary div { display: grid; justify-items: center; gap: 5px; border-right: 1px solid #e4dcfa; }
.record-detail-summary div:last-child { border-right: 0; }
.record-detail-summary span { color: #6f6787; font-size: 12px; font-weight: 800; }
.record-detail-summary strong { color: #2d1aa0; font-size: 28px; }
.record-detail-summary strong.correct { color: var(--good); }
.record-detail-summary strong.wrong { color: var(--bad); }
.record-detail-summary small { color: var(--muted); font-size: 11px; }
.record-session-summary { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: -1px; padding: 16px 20px; border-radius: 14px; }
.record-session-summary div { display: grid; justify-items: center; gap: 4px; }
.record-session-summary span { color: var(--muted); font-size: 11px; }
.record-session-summary strong { color: #2c2552; font-size: 13px; }
.record-detail-filters { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 18px 0; }
.record-detail-filters button { padding: 11px; color: #655d7b; border-color: #ddd7ed; background: #fff; }
.record-detail-filters button.active { color: #fff; border-color: #6c4cdf; background: linear-gradient(135deg, #7859ec, #5d3fd2); box-shadow: 0 5px 14px rgba(98, 67, 211, .2); }
.record-detail-list-card { overflow: hidden; }
.record-detail-list-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid #eeeaf6; }
.record-detail-list-head h2 { margin: 0; color: #221b4c; font-size: 16px; }
.record-detail-list-head span { color: var(--muted); font-size: 12px; }
.record-detail-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 13px; min-height: 78px; padding: 13px 18px; border-bottom: 1px solid #eeeaf6; }
.record-detail-item:last-child { border-bottom: 0; }
.record-result-icon { display: grid; place-items: center; width: 23px; height: 23px; color: #fff; border-radius: 50%; background: var(--good); }
.record-detail-item.is-wrong .record-result-icon { background: var(--bad); }
.record-item-copy { min-width: 0; }
.record-item-copy > div { display: flex; align-items: center; gap: 8px; }
.record-item-copy strong { overflow: hidden; color: #211a46; font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
.record-item-copy em { padding: 2px 7px; color: #6550ca; font-size: 10px; font-style: normal; border-radius: 999px; background: #f0ecff; }
.record-item-copy p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.record-result-text { color: var(--good); font-size: 12px; font-weight: 900; }
.record-detail-item.is-wrong .record-result-text { color: var(--bad); }
.record-audio-button { min-width: 36px; padding: 7px; color: #6047db; border: 0; background: transparent; }
.record-detail-empty { margin: 0; padding: 30px; color: var(--muted); text-align: center; }
.record-learning-tip { display: flex; gap: 12px; margin-top: 16px; padding: 14px 18px; background: linear-gradient(90deg, #fffceb, #fff); }
.record-learning-tip > span { font-size: 24px; }
.record-learning-tip strong { color: #6c50d7; }
.record-learning-tip p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.record-detail-bottom-nav a { display: grid; justify-items: center; gap: 3px; padding: 8px 4px; color: var(--muted); font-size: 11px; text-decoration: none; border-radius: 8px; }
.record-detail-bottom-nav a span { font-weight: 900; }
.record-detail-bottom-nav a.active { color: #fff; background: var(--primary); }
.day-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.history-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
.history-actions button {
  min-width: 86px;
  padding: 8px 10px;
  background: #ffffff;
}
.history-actions button[data-status="correct"] {
  color: var(--good);
  border-color: #add7bf;
}
.history-actions button[data-status="wrong"] {
  color: var(--bad);
  border-color: #e4b5bc;
}
.history-actions span {
  min-width: 86px;
  padding: 8px 10px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.history-actions span.correct {
  color: var(--good);
  border-color: #add7bf;
}
.history-actions span.wrong {
  color: var(--bad);
  border-color: #e4b5bc;
}
.favorite-record {
  display: grid;
  width: 100%;
  margin-bottom: 10px;
  padding: 14px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.favorite-record > span {
  width: fit-content;
  margin-bottom: 6px;
  padding: 3px 8px;
  color: #654bd6;
  font-size: 12px;
  font-weight: 800;
  border-radius: 999px;
  background: #f1edff;
}
.favorite-record strong {
  color: var(--text);
}
.favorite-record p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.55;
}
.favorite-entry.is-favorited {
  color: #7b5200;
  border-color: #f0c85f;
  background: #fff7d9;
}
.favorite-center-sheet { max-height: min(78vh, 720px); }
.favorite-center-list { display: grid; gap: 8px; max-height: 52vh; overflow-y: auto; overscroll-behavior: contain; }
.favorite-center-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; width: 100%; padding: 14px; text-align: left; border: 1px solid #e8e3f5; border-radius: 12px; background: #fff; }
.favorite-center-item div { min-width: 0; }
.favorite-center-item strong { display: block; overflow: hidden; color: #261e4e; text-overflow: ellipsis; white-space: nowrap; }
.favorite-center-item p { margin: 5px 0 0; overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.favorite-center-item em { color: #654cd2; font-size: 12px; font-style: normal; font-weight: 800; }
.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding-top: 14px;
}
.pager span {
  color: var(--muted);
  font-weight: 800;
}
.admin-pager {
  flex-wrap: wrap;
}
.pager-total {
  margin-right: 4px;
}
.page-numbers {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.page-number {
  display: inline-grid;
  place-items: center;
  min-width: 38px;
  min-height: 38px;
  padding: 6px;
  color: var(--ink);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
}
.page-number.active {
  color: white;
  border-color: var(--primary);
  background: var(--primary);
}
.page-ellipsis {
  min-width: 24px;
  text-align: center;
}
.button-link.is-disabled {
  cursor: not-allowed;
  opacity: .5;
}
.bulk-action-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf0;
}
.bulk-select-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 800;
}
.bulk-select-label input,
.code-select-cell input {
  width: 18px;
  min-height: 18px;
}
.bulk-action-bar button {
  margin-left: auto;
}
.admin-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  align-items: end;
}
.admin-form .wide {
  grid-column: 1 / -1;
}
.admin-form label { display: grid; gap: 6px; font-weight: 700; color: var(--muted); }
.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px 12px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255,255,255,.55);
}
.checkbox-grid label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--text);
}
.permission-table th,
.permission-table td {
  text-align: center;
}
.permission-table th:first-child,
.permission-table td:first-child {
  text-align: left;
}
.filter-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  align-items: end;
  margin-bottom: 14px;
  padding: 12px;
  background: #fbfdff;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.filter-bar label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 800;
}
.course-picker {
  grid-column: 1 / -1;
  padding: 14px;
  background: #fbfdff;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.course-picker-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.course-picker-head strong {
  color: var(--text);
}
.course-picker-head span {
  color: var(--muted);
  font-size: 13px;
}
.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 10px;
}
.course-group {
  display: grid;
  gap: 7px;
  padding: 10px;
  background: #ffffff;
  border: 1px solid #ebe6f6;
  border-radius: 8px;
}
.course-group strong {
  color: var(--primary);
  font-weight: 800;
}
.course-group label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  font-weight: 700;
}
.course-group input {
  width: auto;
}
.course-picker.compact {
  margin-top: 10px;
}
.course-picker.compact .course-grid {
  grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
}
.module-picker {
  border-color: #d9e5fb;
  background: #f8fbff;
}
.module-permission-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}
.module-permission-grid > label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 9px;
  padding: 12px;
  color: #17284d;
  border: 1px solid #dfe7f5;
  border-radius: 10px;
  background: #fff;
}
.module-permission-grid input {
  width: 17px;
  height: 17px;
  margin-top: 2px;
}
.module-permission-grid span {
  display: grid;
  gap: 4px;
}
.module-permission-grid strong {
  color: #1767df;
}
.module-permission-grid small {
  color: #71809a;
  font-size: 11px;
  line-height: 1.4;
}
.table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
}
table { width: 100%; border-collapse: collapse; min-width: 840px; table-layout: fixed; }
th, td { border-bottom: 1px solid var(--line); padding: 10px; text-align: left; vertical-align: middle; }
th { color: var(--muted); background: #faf8ff; }
td {
  overflow-wrap: anywhere;
}
.admin-table th,
.admin-table td {
  white-space: normal;
}
.codes-table {
  min-width: 1170px;
}
.codes-table th:nth-child(1) { width: 58px; }
.codes-table th:nth-child(2) { width: 150px; }
.codes-table th:nth-child(3) { width: 220px; }
.codes-table th:nth-child(4) { width: 100px; }
.codes-table th:nth-child(5) { width: 120px; }
.codes-table th:nth-child(6) { width: 185px; }
.codes-table th:nth-child(7) { width: 95px; }
.codes-table th:nth-child(8) { width: 95px; }
.codes-table th:nth-child(9) { width: 96px; }
.code-select-cell {
  text-align: center;
}
.course-cell {
  color: #3d365f;
  line-height: 1.5;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
  background: #eef1f7;
  color: #516079;
}
.status-pill.ok {
  background: #e9f8ef;
  color: var(--good);
}
.status-pill.warn {
  background: #fff2d5;
  color: #9a6400;
}
.status-pill.idle {
  background: #eef1f7;
  color: #536071;
}
.row-details summary {
  cursor: pointer;
  color: var(--primary);
  font-weight: 900;
}
.row-actions-cell {
  white-space: nowrap;
}
.compact-button {
  min-width: 68px;
  padding: 8px 12px;
}
.admin-dialog {
  width: min(900px, calc(100vw - 32px));
  max-width: 900px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  margin: auto;
  padding: 0;
  color: var(--ink);
  border: 0;
  border-radius: 12px;
  background: white;
  box-shadow: 0 24px 70px rgba(31, 24, 61, .28);
}
.admin-dialog::backdrop {
  background: rgba(31, 24, 61, .52);
  backdrop-filter: blur(2px);
}
.dialog-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  background: white;
  border-bottom: 1px solid var(--line);
}
.dialog-head > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.dialog-head strong {
  font-size: 20px;
}
.dialog-head code {
  overflow: hidden;
  text-overflow: ellipsis;
}
.dialog-close {
  flex: 0 0 auto;
  background: white;
}
.dialog-form {
  width: 100%;
  margin: 0;
  padding: 18px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.dialog-form .edit-actions {
  gap: 10px;
}
.dialog-delete-form {
  padding: 0 18px 18px;
}
.edit-panel {
  display: grid;
  gap: 12px;
  width: min(820px, 78vw);
  margin-top: 10px;
  padding: 12px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(44, 36, 76, .12);
}
.edit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}
.edit-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 800;
}
.edit-actions {
  display: flex;
  justify-content: flex-end;
}
.inline-admin-form {
  display: grid;
  gap: 8px;
  min-width: 220px;
  margin: 10px 0;
}
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.row-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}
.announcement-form {
  margin-bottom: 16px;
}
.announcement-row-form {
  grid-template-columns: minmax(140px, 1fr) minmax(260px, 2fr) 90px minmax(170px, 1fr) minmax(170px, 1fr) auto;
}
.announcement-table {
  min-width: 980px;
}
.announcement-table textarea {
  min-height: 58px;
}
.article-create-form {
  margin-bottom: 18px;
}
.articles-table {
  min-width: 1160px;
}
.article-category-table {
  min-width: 980px;
}
.articles-table th:nth-child(1) { width: 32%; }
.articles-table th:nth-child(2) { width: 160px; }
.articles-table th:nth-child(3) { width: 72px; }
.articles-table th:nth-child(4) { width: 120px; }
.articles-table th:nth-child(5) { width: 96px; }
.articles-table th:nth-child(6) { width: 110px; }
.articles-table th:nth-child(7) { width: 120px; }
.articles-table p {
  margin: 6px 0 0;
  line-height: 1.5;
}
.article-edit-panel {
  width: min(920px, 78vw);
}
.article-edit-panel label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 800;
}
.article-edit-panel textarea[name="content"] {
  min-height: 220px;
}
.article-row-actions {
  justify-content: flex-start;
  gap: 10px;
}
.admin-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 18px;
  width: 100%;
  min-width: 0;
}
.admin-menu {
  position: sticky;
  top: 16px;
  align-self: start;
  display: grid;
  gap: 4px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  scrollbar-width: thin;
}
.admin-menu-heading {
  padding: 4px 10px 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.admin-menu-group {
  border-radius: 7px;
}
.admin-menu-group summary {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 8px 10px;
  border-radius: 7px;
  color: #322b58;
  cursor: pointer;
  font-weight: 800;
  list-style: none;
  user-select: none;
}
.admin-menu-group summary::-webkit-details-marker {
  display: none;
}
.admin-menu-group summary:hover,
.admin-menu-group.is-active > summary {
  background: #f1edff;
  color: var(--primary);
}
.admin-menu-group-icon {
  width: 22px;
  font-size: 16px;
  line-height: 1;
  text-align: center;
}
.admin-menu-chevron {
  margin-left: auto;
  color: #8e84b5;
  transition: transform .18s ease;
}
.admin-menu-group[open] .admin-menu-chevron {
  transform: rotate(180deg);
}
.admin-submenu {
  display: grid;
  gap: 3px;
  padding: 3px 5px 8px 35px;
}
.admin-menu a {
  padding: 8px 10px;
  border-radius: 6px;
  color: #514a73;
  font-size: 14px;
  text-decoration: none;
  font-weight: 700;
}
.admin-menu a:hover {
  background: #eeeaf7;
}
.admin-menu a.active {
  color: white;
  background: var(--primary);
}
.knowledge-cms-layout {
  display: grid;
  grid-template-columns: minmax(250px, 320px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.knowledge-tree-pane,
.knowledge-editor-pane {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.knowledge-tree-pane {
  position: sticky;
  top: 16px;
  max-height: calc(100vh - 64px);
  overflow: auto;
}
.knowledge-pane-heading,
.knowledge-editor-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.knowledge-pane-heading span,
.knowledge-editor-toolbar small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.knowledge-editor-toolbar > div:last-child,
.knowledge-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.knowledge-admin-tree {
  padding: 10px;
}
.knowledge-tree-branch {
  margin: 2px 0;
}
.knowledge-tree-branch > summary,
.knowledge-tree-leaf {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  padding: 7px 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  list-style: none;
  text-align: left;
}
.knowledge-tree-branch > summary::-webkit-details-marker { display: none; }
.knowledge-tree-branch > summary:hover,
.knowledge-tree-leaf:hover,
.knowledge-admin-tree .selected {
  background: #f0edff;
  color: var(--primary);
}
.knowledge-tree-branch > div {
  margin-left: 14px;
  padding-left: 8px;
  border-left: 1px solid #e4def7;
}
.knowledge-tree-node-main {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.knowledge-tree-node-main i {
  display: grid;
  place-items: center;
  flex: 0 0 25px;
  height: 25px;
  border-radius: 6px;
  background: #e9e4ff;
  color: var(--primary);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}
.knowledge-tree-node-main span { min-width: 0; }
.knowledge-tree-node-main strong,
.knowledge-tree-node-main small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.knowledge-tree-node-main small { color: var(--muted); font-size: 11px; }
.knowledge-tree-branch em,
.knowledge-tree-leaf em {
  flex: 0 0 auto;
  font-size: 10px;
  font-style: normal;
}

.learning-export-section .learning-export-form {
  grid-template-columns: repeat(3, minmax(180px, 1fr));
}

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

.learning-export-summary {
  display: grid;
  gap: 6px;
  margin: 16px 0;
  padding: 14px 16px;
  border: 1px solid #eadfca;
  border-radius: 8px;
  background: #fffaf1;
  color: #5f4630;
}

.learning-export-summary strong {
  color: #8a4c11;
}

.learning-export-table-wrap {
  margin-top: 16px;
}

.learning-export-table td {
  vertical-align: top;
}

.learning-export-table code {
  white-space: nowrap;
}
.knowledge-tree-branch .status-published,
.knowledge-tree-leaf .status-published { color: #16885a; }
.knowledge-tree-branch .status-disabled,
.knowledge-tree-leaf .status-disabled { color: #ad4654; }
.knowledge-tree-branch .status-draft,
.knowledge-tree-leaf .status-draft { color: #9a6b00; }
.knowledge-node-form {
  margin: 0;
  padding: 16px;
}
.knowledge-markdown-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
}
.knowledge-markdown-grid textarea {
  min-height: 520px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  line-height: 1.65;
}
.knowledge-preview-wrap {
  min-width: 0;
}
.knowledge-preview-wrap > span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.markdown-body {
  min-height: 520px;
  padding: 18px;
  overflow-wrap: anywhere;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fcfbff;
  color: #27213f;
  line-height: 1.75;
}
.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4 { margin: 1.1em 0 .55em; line-height: 1.3; }
.markdown-body h1:first-child,
.markdown-body h2:first-child { margin-top: 0; }
.markdown-body p { margin: .65em 0; }
.markdown-body ul,
.markdown-body ol { padding-left: 1.5em; }
.markdown-body li { margin: .35em 0; }
.markdown-body blockquote {
  margin: 1em 0;
  padding: 8px 14px;
  border-left: 4px solid #9b8aef;
  background: #f3f0ff;
  color: #514a73;
}
.markdown-body code {
  padding: 2px 5px;
  border-radius: 4px;
  background: #eeeaf8;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.markdown-body pre {
  padding: 14px;
  overflow: auto;
  border-radius: 7px;
  background: #29243d;
  color: #fff;
}
.markdown-body pre code { padding: 0; background: transparent; color: inherit; }
.error-text { color: #b52d43 !important; }
.knowledge-detail-page {
  min-height: 100vh;
  padding-bottom: calc(92px + env(safe-area-inset-bottom));
  background: #f7f5ff;
}
.knowledge-detail-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  max-width: 900px;
  margin: 0 auto;
  padding: 16px 18px;
}
.knowledge-detail-topbar a {
  color: #302854;
  font-weight: 900;
  text-decoration: none;
}
.knowledge-detail-topbar button {
  min-height: 42px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: #302854;
}
.knowledge-reader-shell {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 16px 30px;
}
.knowledge-detail-state,
.knowledge-reader {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(69, 54, 126, .08);
}
.knowledge-detail-state { text-align: center; }
.knowledge-detail-state.error { color: #9f2940; }
.knowledge-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
}
.knowledge-breadcrumb i { font-style: normal; }
.knowledge-reader-header {
  padding: 26px 0 20px;
  border-bottom: 1px solid var(--line);
}
.knowledge-reader-header h1 {
  margin: 10px 0 8px;
  color: #201a3e;
  font-size: 34px;
  line-height: 1.25;
}
.knowledge-reader-header p { margin: 0; color: var(--muted); font-size: 17px; }
.knowledge-reader-tags { display: flex; gap: 8px; }
.knowledge-reader-tags span {
  padding: 5px 10px;
  border-radius: 6px;
  background: #eeeaff;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
}
.knowledge-reader-content {
  min-height: 240px;
  margin-top: 20px;
  padding: 0;
  border: 0;
  background: transparent;
}
.knowledge-sibling-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.knowledge-sibling-nav a {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: #302854;
  text-decoration: none;
}
.knowledge-sibling-nav span { color: var(--muted); font-size: 12px; }
.knowledge-sibling-nav strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.knowledge-detail-bottom-nav { position: fixed; }
.knowledge-detail-bottom-nav a {
  display: grid;
  justify-items: center;
  gap: 3px;
  min-width: 0;
  padding: 9px 4px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 12px;
  text-decoration: none;
}
.knowledge-detail-bottom-nav a span { font-weight: 900; }
.knowledge-detail-bottom-nav a.active { color: #fff; background: var(--primary); }
.admin-main {
  width: 100%;
  min-width: 0;
}

@media (max-width: 980px) {
  .knowledge-cms-layout,
  .knowledge-markdown-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .knowledge-tree-pane {
    position: static;
    max-height: 420px;
  }
  .knowledge-markdown-grid textarea,
  .markdown-body {
    min-height: 360px;
  }
}

@media (max-width: 600px) {
  .knowledge-detail-topbar { padding: 12px; }
  .knowledge-reader-shell { padding: 0 10px 24px; }
  .knowledge-reader { padding: 17px; }
  .knowledge-reader-header { padding-top: 20px; }
  .knowledge-reader-header h1 { font-size: 27px; }
  .knowledge-sibling-nav { grid-template-columns: minmax(0, 1fr); }
}
.admin-section {
  width: 100%;
  min-width: 0;
  overflow: hidden;
}
.list-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}
.list-toolbar h2,
.list-toolbar h3 {
  margin: 0;
}
.page-size-form {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.page-size-form label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-weight: 800;
}
.section-title-row,
.detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}
.section-title-row h2,
.detail-header h3 {
  margin: 0;
}
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.compact-metrics {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.metric-card {
  display: grid;
  gap: 6px;
  padding: 14px;
  color: var(--text);
  text-decoration: none;
  background: #fbfdff;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.metric-card:hover,
.metric-card.is-active {
  border-color: var(--primary);
  background: #f2efff;
}
.metric-value {
  font-size: 28px;
  font-weight: 900;
  color: var(--primary);
  line-height: 1;
}
.metric-label {
  font-weight: 900;
}
.metric-desc {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}
.row-form.wide {
  grid-template-columns: repeat(10, minmax(95px, 1fr));
}
.row-form.word-form {
  grid-template-columns: minmax(130px, 1.3fr) minmax(150px, 1.4fr) minmax(90px, .8fr) minmax(90px, .8fr) minmax(90px, .9fr) minmax(70px, .6fr) auto;
}

@media (max-width: 680px) {
  .page { padding: 14px 12px; }
  .topbar { align-items: flex-start; flex-direction: column; }
  .answer-row { grid-template-columns: 1fr; }
  .study-card h2 { font-size: 30px; }
  .compact-study {
    gap: 11px;
    padding: 16px;
  }
  .compact-study h2 {
    font-size: 34px;
  }
  .compact-study .answer {
    line-height: 1.25;
  }
  .compact-study input,
  .compact-study button {
    min-height: 48px;
  }
  .compact-study .explain-button {
    margin-top: 4px;
  }
  .compact-study .mobile-actions {
    margin-top: 2px;
  }
  .auth-panel {
    margin: 16px auto;
    padding: 20px;
  }
  .toolbar, .stats, .study-card, .history, .admin-section {
    padding: 14px;
  }
  .today-grid {
    gap: 8px;
  }
  .mini-stat {
    padding: 11px;
  }
  .mini-stat strong {
    font-size: 21px;
  }
  .answer {
    font-size: 20px;
  }
  .review-banner,
  .day-row {
    align-items: stretch;
    flex-direction: column;
  }
  .history-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .history-actions button {
    min-width: 0;
    padding: 9px 6px;
  }
  .admin-layout { grid-template-columns: minmax(0, 1fr); }
  .admin-menu {
    position: static;
    display: grid;
    gap: 3px;
    max-width: 100%;
    max-height: min(46vh, 360px);
    overflow-x: hidden;
    overflow-y: auto;
    padding: 10px;
    white-space: normal;
    overscroll-behavior: contain;
  }
  .admin-menu a {
    width: 100%;
  }
  .section-title-row,
  .detail-header,
  .list-toolbar {
    flex-direction: column;
  }
  .page-size-form,
  .page-size-form label {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }
  .row-form { grid-template-columns: 1fr; }
  .row-form.wide,
  .row-form.announcement-row-form,
  .row-form.word-form { grid-template-columns: 1fr; }
  .filter-bar,
  .admin-form,
  .edit-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .filter-bar > *,
  .admin-form > *,
  .edit-grid > * {
    min-width: 0;
    width: 100%;
  }
  .filter-bar .button-link,
  .filter-bar button {
    margin-top: 0;
  }
  .codes-table {
    min-width: 0;
    table-layout: auto;
  }
  .codes-table thead {
    display: none;
  }
  .codes-table,
  .codes-table tbody,
  .codes-table tr,
  .codes-table td {
    display: block;
    width: 100%;
  }
  .codes-table tbody {
    display: grid;
    gap: 12px;
  }
  .codes-table tr {
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: white;
  }
  .codes-table td {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    min-height: 42px;
    padding: 8px 0;
    border-bottom: 1px solid #eeeaf7;
  }
  .codes-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-weight: 800;
  }
  .codes-table td:last-child {
    border-bottom: 0;
  }
  .codes-table .row-actions-cell {
    white-space: normal;
  }
  .codes-table .compact-button {
    width: 100%;
  }
  .codes-table .code-select-cell {
    text-align: left;
  }
  .bulk-action-bar {
    align-items: stretch;
    flex-direction: column;
  }
  .bulk-action-bar button {
    width: 100%;
    margin-left: 0;
  }
  .admin-dialog {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
  }
  .dialog-head {
    padding: 13px 14px;
  }
  .dialog-form {
    padding: 14px;
  }
  .dialog-delete-form {
    padding: 0 14px 14px;
  }
  .dialog-form .course-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .admin-pager {
    gap: 8px;
  }
  .page-numbers {
    order: 3;
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 820px) {
  .page {
    padding: 0;
  }
  .student-app {
    display: block;
    min-height: 100vh;
    overflow: visible;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .student-sidebar {
    display: none;
  }
  .student-workspace {
    min-height: 100vh;
    padding: 18px 14px calc(112px + env(safe-area-inset-bottom));
  }
  .student-workspace .mobile-panel {
    max-width: 520px;
  }
  .student-header {
    align-items: center;
    margin-bottom: 16px;
  }
  .student-header h1 {
    font-size: 22px;
  }
  .student-header p {
    font-size: 13px;
  }
  .student-header .header-actions {
    gap: 6px;
  }
  .round-action {
    min-width: auto;
    padding: 8px 9px;
    font-size: 12px;
  }
  .student-workspace .today-grid {
    gap: 8px;
    margin-bottom: 12px;
  }
  .student-workspace .mini-stat {
    min-height: 80px;
    padding: 12px;
  }
  .student-workspace .mini-stat::after {
    display: none;
  }
  .student-workspace .mini-stat strong {
    gap: 3px;
    margin-top: 4px;
  }
  .student-workspace .mini-stat strong b {
    font-size: 25px;
  }
  .student-workspace .range-card {
    padding: 14px;
  }
  .student-workspace .range-card button {
    min-width: auto;
    padding: 8px 10px;
    font-size: 12px;
  }
  .student-workspace .compact-study {
    min-height: 0;
    padding: 18px;
  }
  .student-workspace .compact-study h2 {
    font-size: 34px;
  }
  .word-answer-line .answer {
    font-size: 24px;
  }
  .student-workspace .answer-row {
    grid-template-columns: minmax(0, 1fr) 76px;
  }
  .student-workspace .mobile-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .student-workspace .mobile-actions .action-wide {
    grid-column: 1 / -1;
  }
  .student-workspace .bottom-nav {
    position: fixed;
    left: 50%;
    right: auto;
    bottom: 0;
    width: min(520px, 100%);
    transform: translateX(-50%);
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 16px 16px 0 0;
  }
  .student-workspace .bottom-nav button {
    display: grid;
    justify-items: center;
    gap: 3px;
    font-size: 11px;
  }
  .student-workspace .bottom-nav button.active {
    box-shadow: inset 0 -3px 0 var(--primary);
  }
  .article-search-card {
    grid-template-columns: minmax(0, 1fr);
  }
  .student-workspace .record-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .student-workspace .record-grid .mini-stat {
    min-height: 82px;
  }
  .community-compose,
  .community-card {
    padding: 16px;
  }
  .community-compose-actions {
    align-items: stretch;
    flex-direction: column;
  }
  .community-compose-actions .primary-button {
    width: 100%;
  }
  .community-post-head {
    align-items: flex-start;
  }
  .community-reply {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .community-reply-form {
    align-items: stretch;
  }
  .community-reply-form button {
    min-width: 64px;
  }
  .comment-form {
    grid-template-columns: minmax(0, 1fr);
  }
  .ai-chat-message {
    max-width: 94%;
  }
  .ai-chat-form {
    grid-template-columns: minmax(0, 1fr);
  }
  .word-explain-sheet {
    width: 100%;
    max-height: 100dvh;
    border-radius: 0;
  }
  .ai-explain-page {
    gap: 14px;
    padding: 14px 12px 0;
  }
  .ai-explain-hero {
    align-items: flex-start;
    text-align: left;
  }
  .ai-kicker {
    font-size: 22px;
  }
  .ai-kicker span {
    margin-left: 4px;
    padding: 4px 9px;
    font-size: 12px;
  }
  .ai-explain-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .ai-word-card {
    grid-template-columns: minmax(0, 1fr) 300px;
    min-height: 0;
  }
  .ai-word-card h3 {
    font-size: 58px;
  }
  .ai-phonetic {
    font-size: 24px;
  }
  .ai-teacher {
    min-height: 230px;
    margin: -16px -16px -16px 0;
  }
  .ai-bubble {
    left: -8px;
    right: auto;
    top: 44px;
    max-width: 120px;
    font-size: 13px;
  }
  .ai-teacher-image {
    min-height: 260px;
    max-height: 320px;
    object-position: 50% 18%;
  }
  .ai-card {
    padding: 16px;
  }
  .ai-card h3 {
    font-size: 20px;
  }
  .ai-card-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .pronunciation-ai-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .ai-pronunciation-card {
    margin-bottom: 128px;
  }
  .ai-reward-bar {
    align-items: stretch;
    flex-direction: column;
    margin: 0 -12px;
    padding: 12px 12px calc(12px + env(safe-area-inset-bottom));
  }
  .ai-reward-bar div {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
  .ai-reward-bar button {
    width: 100%;
  }
  @supports (min-height: 100dvh) {
    .student-app,
    .student-workspace {
      min-height: 100dvh;
    }
  }
  .profile-hero {
    padding: 18px;
  }
}

@media (display-mode: standalone) {
  html,
  body {
    height: auto;
    min-height: 100%;
    overflow-y: auto;
    overscroll-behavior-y: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
  }
  .page,
  .student-app,
  .student-workspace {
    height: auto;
    max-height: none;
    overflow: visible;
  }
}

@media (max-width: 680px) {
  .loop-player-sheet {
    padding-right: 10px;
    padding-bottom: calc(250px + env(safe-area-inset-bottom));
    padding-left: 10px;
    border-radius: 0;
  }
  .loop-player-header {
    padding: 9px 2px 7px;
  }
  .loop-player-header .student-brand {
    font-size: 15px;
  }
  .loop-player-header .student-brand {
    padding-bottom: 0;
  }
  .loop-player-header .sheet-close {
    padding: 6px 8px;
    font-size: 12px;
  }
  .loop-panel {
    gap: 8px;
    margin-bottom: 8px;
    padding: 10px;
  }
  .loop-panel-title {
    gap: 6px;
  }
  .loop-panel-title > span {
    font-size: 16px;
  }
  .loop-panel-title div {
    gap: 2px;
  }
  .loop-panel-title strong {
    font-size: 14px;
  }
  .loop-panel-title small {
    font-size: 11px;
  }
  .loop-filter-grid label,
  .loop-mode-control legend {
    font-size: 11px;
  }
  .loop-filter-grid label {
    gap: 4px;
  }
  .loop-filter-grid select {
    min-height: 34px;
    padding: 5px 6px;
    font-size: 12px;
  }
  .loop-mode-control {
    gap: 6px;
  }
  .loop-mode-control legend {
    margin-bottom: 3px;
  }
  .loop-mode-control span {
    gap: 1px;
    padding: 7px 8px;
  }
  .loop-mode-control span strong {
    font-size: 14px;
  }
  .loop-mode-control small {
    font-size: 10px;
  }
  .loop-start-actions {
    gap: 7px;
  }
  .loop-start-actions button {
    min-height: 40px;
    padding: 7px 8px;
    font-size: 13px;
  }
  .loop-now-playing {
    gap: 8px 10px;
    padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
    border-radius: 12px 12px 0 0;
  }
  .loop-now-meta {
    gap: 1px;
  }
  .loop-now-meta > span {
    display: none;
  }
  .loop-now-meta strong {
    font-size: 21px;
  }
  .loop-now-meta small {
    overflow: hidden;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .loop-now-count {
    gap: 1px;
  }
  .loop-now-count strong {
    padding: 3px 7px;
    font-size: 13px;
  }
  .loop-subtitle {
    min-height: 58px;
    max-height: 82px;
    padding: 9px 11px;
    font-size: 15px;
    line-height: 1.5;
    text-align: left;
  }
  .loop-player-controls {
    padding: 3px 12px;
  }
  .loop-player-controls .loop-pause {
    width: 46px;
    height: 46px;
    border-width: 2px;
  }
  .loop-progress-track,
  .loop-volume {
    display: none;
  }
  .ai-word-card {
    grid-template-columns: minmax(0, 1fr);
  }
  .ai-teacher {
    min-height: 190px;
    margin: 10px -16px -16px;
  }
  .ai-teacher-image {
    min-height: 220px;
    max-height: 260px;
  }
  .ai-bubble {
    left: auto;
    right: 18px;
    top: 22px;
  }
}

@media (max-width: 820px) {
  body {
    background:
      radial-gradient(circle at 92% 0%, rgba(111, 83, 226, .1), transparent 30%),
      #faf9ff;
  }
  .student-workspace {
    padding-top: 20px;
    padding-right: 10px;
    padding-left: 10px;
  }
  .student-header {
    padding: 0 6px;
  }
  .student-header h1 {
    color: #17123f;
    font-size: 20px;
  }
  .student-header .wave {
    display: inline-block;
    margin-left: 4px;
    padding: 3px 7px;
    color: #6548d8;
    font-size: 11px;
    border-radius: 999px;
    background: #f0ecff;
  }
  .round-action {
    min-width: 44px;
    min-height: 44px;
    padding: 7px;
    border-color: #ece8f7;
    border-radius: 13px;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 6px 18px rgba(56, 43, 105, .05);
  }
  .student-workspace .mini-stat,
  .student-workspace .range-card,
  .student-workspace .compact-study,
  .profile-card,
  .menu-card,
  .trend-card,
  .list-card {
    border-color: #eeeaf9;
    box-shadow: 0 8px 24px rgba(54, 43, 93, .045);
  }
  .student-workspace .mini-stat,
  .student-workspace .range-card {
    border-radius: 13px;
  }
  .student-workspace .compact-study {
    border-radius: 16px;
  }
  .empty-study-card {
    min-height: 430px !important;
  }
  .empty-study-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .phrase-study-card > h2 {
    margin-top: 28px;
    font-size: 38px;
  }
  .phrase-answer {
    font-size: 22px;
  }
  .phrase-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  .phrase-actions .action-wide {
    grid-column: 1 / -1;
  }
  .sentence-study-card > h2 {
    margin-top: 24px;
    font-size: 27px;
    line-height: 1.42;
  }
  .sentence-answer {
    font-size: 18px;
    line-height: 1.55;
  }
  .profile-hero {
    position: relative;
    min-height: 124px;
    border-radius: 16px;
    background: linear-gradient(135deg, #f4f0ff, #fff);
  }
  .profile-hero .avatar.large {
    width: 58px;
    height: 58px;
    font-size: 22px;
  }
  .profile-hero > div strong {
    font-size: 19px;
  }
  .profile-overview {
    border-color: #eeeaf9;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(54, 43, 93, .04);
  }
  .profile-menu {
    border-radius: 16px;
  }
  .profile-menu button,
  .profile-menu .menu-link {
    min-height: 54px;
  }
  .record-type-tabs {
    position: sticky;
    top: 0;
    z-index: 3;
  }
  .student-workspace .bottom-nav {
    padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 -10px 30px rgba(52, 43, 86, .08);
    backdrop-filter: blur(16px);
  }
  .student-workspace .bottom-nav button {
    min-height: 56px;
    padding: 6px 2px;
    color: #777094;
    border-radius: 10px;
  }
  .student-workspace .bottom-nav button > span {
    width: 25px;
    height: 25px;
    border: 0;
    background: transparent;
  }
  .student-workspace .bottom-nav button.active {
    color: #6248dc;
    background: #f7f4ff;
    box-shadow: inset 0 -3px 0 #7155ec;
  }
  .student-workspace .bottom-nav button.active > span {
    color: white;
    background: linear-gradient(135deg, #8068ef, #5b42d4);
  }
}

@media (max-width: 900px) {
  .growth-tree {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .learn-growth-route {
    grid-template-columns: repeat(7, minmax(42px, 1fr));
    overflow-x: auto;
  }
  .growth-tree::before {
    display: none;
  }
  .learn-growth-route::before {
    display: block;
  }
  .wordtree-preview-grid,
  .training-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .dynamic-tree-header {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .dynamic-tree-header .structure-actions {
    grid-column: 1 / -1;
    justify-content: center;
  }
  .dynamic-word-tree {
    padding: 14px;
  }
  .dynamic-word-tree .structure-node-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .dynamic-word-tree .wordtree-root strong {
    font-size: 30px;
  }
  .student-header.structure-hero {
    display: grid;
    min-height: 0;
    padding: 20px;
  }
  .student-header.structure-hero h1 {
    color: white;
    font-size: 34px;
  }
  .student-header.structure-hero p {
    color: rgba(255, 255, 255, .9);
    font-size: 14px;
  }
  .structure-hero::after {
    width: 106px;
    height: 106px;
  }
  .task-grid,
  .wordtree-preview-grid,
  .training-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .growth-tree {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .learn-growth-route {
    grid-template-columns: repeat(7, minmax(42px, 1fr));
    gap: 7px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
  }
  .learn-growth-route::-webkit-scrollbar {
    display: none;
  }
  .learn-growth-route::before {
    display: block;
    left: 6%;
    right: 6%;
  }
  .learn-growth-route article {
    min-width: 42px;
  }
  .learn-growth-route strong {
    font-size: 11px;
  }
  .structure-tree-card {
    min-height: 0;
  }
  .structure-node-grid {
    max-width: none;
  }
  .word-detail-topbar {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }
  .word-detail-topbar > div {
    min-width: 0;
  }
  .word-detail-hero {
    grid-template-columns: minmax(0, 1fr);
    padding: 20px;
  }
  .word-detail-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    min-width: 0;
  }
  .word-detail-actions button {
    min-width: 0;
    padding: 10px 8px;
  }
  .word-detail-tabs {
    grid-template-columns: minmax(0, 1fr);
  }
  .continue-card {
    grid-template-columns: minmax(0, 1fr);
  }
  .continue-card button,
  .practice-title-row button {
    width: 100%;
  }
  .daily-task-card,
  .continue-card,
  .growth-tree-card,
  .wordtree-preview-card {
    border-radius: 16px;
  }
  .section-title-row {
    align-items: flex-start;
  }
  .practice-title-row {
    display: grid;
  }
  .home-practice-card .answer-row {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  #tab-history { padding-bottom: calc(28px + env(safe-area-inset-bottom)); }
  #tab-history .section-header { align-items: flex-start; }
  #tab-history .export-link { padding: 8px 10px; font-size: 12px; }
  .records-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .records-metric { min-height: 104px; padding: 14px; border-radius: 14px; }
  .records-metric strong { font-size: 27px; }
  .records-card { padding: 14px; border-radius: 14px; }
  .records-learning-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .learning-progress-item { grid-template-columns: minmax(0, 1fr) minmax(70px, .55fr) 38px 8px; gap: 8px; }
  .learning-progress-item strong { font-size: 12px; }
  .level-main { grid-template-columns: auto minmax(0, 1fr); gap: 12px; }
  .level-medal { width: 58px; height: 58px; border-width: 6px; font-size: 27px; }
  .level-main > strong { grid-column: 2; margin-top: -10px; }
  .level-progress { margin-left: 70px; }
  .level-copy h2 { font-size: 18px; }
  .records-dashboard-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .records-calendar button { min-height: 36px; }
  .trend-plot { height: 135px; }
  .record-history-row { grid-template-columns: 1fr repeat(2, auto); gap: 7px 10px; padding: 13px 8px; }
  .record-history-row > strong { grid-column: 1 / -1; }
  .record-history-row > span { font-size: 11px; }
  .record-history-row > em { grid-column: 3; grid-row: 1; justify-self: end; }
  .record-history-row > span:nth-of-type(4) { grid-column: 1 / -1; }
  .favorites-summary { gap: 6px; }
  .favorites-summary button { padding: 12px 3px; }
  .record-detail-page { padding-bottom: calc(118px + env(safe-area-inset-bottom)); }
  .record-detail-topbar { min-height: 56px; padding: 8px 16px; }
  .record-detail-shell { width: min(100% - 20px, 560px); padding-top: 12px; }
  .record-detail-summary { padding: 16px 8px; }
  .record-detail-summary strong { font-size: 24px; }
  .record-session-summary { padding: 14px 6px; }
  .record-detail-filters { gap: 8px; margin: 14px 0; }
  .record-detail-item { grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; padding: 12px; }
  .record-result-text { display: none; }
  .record-audio-button { min-width: 32px; padding: 6px; }
  .record-detail-bottom-nav { padding-bottom: calc(8px + env(safe-area-inset-bottom)); }
  .favorite-center-sheet { padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
}

@media (max-width: 390px) {
  .records-metric { min-height: 96px; }
  .records-metric span { font-size: 12px; }
  .records-metric strong { font-size: 24px; }
  .level-stages { gap: 2px; }
  .level-stage::before { right: 58%; left: -42%; }
  .records-calendar button { min-height: 32px; }
  .calendar-legend { gap: 8px; }
  .record-detail-summary span { font-size: 10px; }
  .record-detail-summary strong { font-size: 21px; }
  .record-session-summary strong { font-size: 11px; }
  .record-item-copy strong { font-size: 14px; }
}

@media (max-width: 820px) {
  .learning-center-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 10px;
  }
  .learning-brand-range {
    display: grid;
    gap: 8px;
  }
  .learning-brand-range h1 { font-size: 25px; }
  .learning-range-select { max-width: 100%; padding: 7px 10px; }
  .learning-center-header .header-actions { gap: 6px; }
  .training-center-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .training-header-actions {
    justify-self: end;
  }
  .learning-settings-action,
  .announcement-action { min-width: 44px; padding: 8px; font-size: 0; }
  .learning-settings-action i,
  .announcement-action i { font-size: 18px; }
  .learning-entry-list,
  .scene-library-list { gap: 12px; }
  .learning-entry-card,
  .scene-library-card {
    gap: 14px;
    min-height: 112px;
    padding: 16px;
    border-radius: 18px;
  }
  .learning-entry-card > i,
  .scene-library-card > i {
    width: 62px;
    height: 62px;
    border-radius: 16px;
  }
  .learning-entry-card strong,
  .scene-library-card strong { font-size: 18px; }
  .learning-entry-card small,
  .scene-library-card small { font-size: 13px; }
  .learning-entry-card > b,
  .scene-library-card > em { font-size: 30px; }
  .learning-subpage-header {
    min-height: 54px;
    margin-bottom: 14px;
  }
  .learning-subpage-header h1 { font-size: 22px; }
  .learning-subpage .learning-center-card { border-radius: 18px; }
  .life-category-grid { gap: 10px; }
  .life-category-card {
    grid-template-columns: auto minmax(0, 1fr);
    min-height: 142px;
    padding: 14px;
  }
  .life-category-card > em { grid-column: 2; }
  .life-word-hero { grid-template-columns: minmax(0, 1fr); padding: 18px; }
  .life-word-actions { width: 100%; }
  .life-forms-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .learning-center-card { padding: 14px; }
  .learning-section-heading h2,
  .learning-status-title h2 { font-size: 18px; }
  .grammar-category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .grammar-category-grid > button {
    grid-template-columns: auto minmax(0, 1fr);
    justify-items: start;
    align-items: center;
    min-height: 94px;
    padding: 10px;
    text-align: left;
  }
  .grammar-category-grid > button > i { grid-row: 1 / span 2; }
  .grammar-category-grid > button > div { grid-column: 1 / -1; }
  .learning-center-card .pos-class-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .learning-center-card .pos-class-grid button,
  .learning-center-card .pos-class-grid button.wide {
    min-height: 78px;
    padding: 10px;
  }
  .learning-center-card .pos-class-grid button > i { width: 36px; height: 36px; }
  .learning-status-grid { grid-template-columns: minmax(0, 1fr); }
  .core-category-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .core-category-card { min-height: 118px; padding: 14px; }
  .core-node-hero { grid-template-columns: minmax(0, 1fr); padding: 18px; }
  .core-node-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .core-node-actions button { width: 100%; }
  .grammar-category-header { grid-template-columns: auto minmax(0, 1fr) auto; }
  .grammar-topic-list article > button { align-items: start; }
  .pos-tree-word-summary { grid-template-columns: minmax(0, 1fr); }
  .pos-tree-word-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pos-tree-word-nav > span { justify-self: start; }
  .pos-tree-word-nav button { width: 100%; }
}

@media (max-width: 430px) {
  .learning-center-header { grid-template-columns: minmax(0, 1fr) auto; }
  .learning-entry-card,
  .scene-library-card {
    grid-template-columns: 58px minmax(0, 1fr) auto;
    gap: 12px;
    min-height: 104px;
    padding: 14px;
  }
  .learning-entry-card > i,
  .scene-library-card > i {
    width: 56px;
    height: 56px;
    border-radius: 15px;
  }
  .learning-entry-card > span,
  .scene-library-card > span { gap: 5px; }
  .learning-entry-card strong,
  .scene-library-card strong { font-size: 17px; }
  .learning-entry-card small,
  .scene-library-card small { font-size: 12px; }
  .learning-entry-card em { font-size: 11px; }
  .learning-subpage-header { gap: 8px; }
  .learning-subpage-header h1 { font-size: 20px; }
  .learning-subpage-header p { font-size: 11px; }
  .learning-back-button,
  .learning-header-help {
    width: 38px;
    height: 38px;
  }
  .scene-empty-state,
  .tense-tree-empty {
    min-height: 350px;
    padding: 42px 18px;
    border-radius: 18px;
  }
  .scene-empty-state > strong,
  .scene-empty-copy strong { font-size: 18px; }
  .scene-empty-state > p,
  .scene-empty-copy p { font-size: 13px; }
  .tense-tree-branches { gap: 6px; }
  .tense-tree-branches span { padding: 10px 4px; font-size: 10px; }
  .tense-course-intro > div { grid-template-columns: minmax(0, 1fr); }
  .tense-course-group > div { grid-template-columns: minmax(0, 1fr); }
  .tense-course-group > div > button { min-height: 104px; }
  .tense-course-group button > b { max-width: 105px; }
  .tense-detail-hero > strong { font-size: 19px; }
  .tense-note-grid { grid-template-columns: minmax(0, 1fr); }
  .life-category-grid { grid-template-columns: minmax(0, 1fr); }
  .life-category-card {
    grid-template-columns: 52px minmax(0, 1fr) auto;
    min-height: 116px;
  }
  .life-category-card > i { width: 50px; height: 50px; font-size: 24px; }
  .life-category-card > em { grid-column: 3; }
  .life-topic-toggle { padding: 13px; }
  .life-topic-toggle > i { width: 42px; height: 42px; }
  .life-topic-toggle em { max-width: 62px; text-align: right; }
  .life-verb-main { grid-template-columns: minmax(0, 1fr) 90px; padding: 11px; }
  .life-verb-main > span strong { font-size: 19px; }
  .life-word-hero h2 { font-size: 34px; }
  .life-word-actions button { min-height: 62px; font-size: 11px; }
  .life-learning-card { padding: 14px; border-radius: 17px; }
  .life-forms-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .life-forms-grid > div:last-child { grid-column: 1 / -1; }
  .life-example-card > strong { font-size: 16px; }
  .phonetic-course-intro { padding: 13px; }
  .phonetic-symbol-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .phonetic-symbol-main { min-height: 118px; }
  .phonetic-symbol-hero > span { font-size: 50px; }
  .phonetic-symbol-hero > div { grid-template-columns: minmax(0, 1fr); }
  .phonetic-symbol-hero button { min-height: 44px; }
  .phonetic-method-grid { grid-template-columns: minmax(0, 1fr); }
  .phonetic-method-grid article { min-height: 0; }
  .phonetic-example-words { grid-template-columns: minmax(0, 1fr); }
  .phonetic-example-sentence { padding: 13px; }
  .phonetic-example-sentence > button {
    position: static;
    justify-self: start;
    margin-top: 5px;
    transform: none;
  }
  .learning-center-card .pos-class-grid button,
  .learning-center-card .pos-class-grid button.wide {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }
  .learning-center-card .pos-class-grid button strong { font-size: 14px; }
  .learning-center-card .pos-class-grid button small { font-size: 10px; }
}
