/* 小张同学爱学习 — 学习站通用样式 */

.site-nav {
  background: rgba(255, 253, 248, 0.96);
  border-bottom: 1px solid #e0d4c0;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
}

.site-nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
}

.site-logo {
  font-size: 1.05rem;
  font-weight: 700;
  color: #4a3222;
  text-decoration: none;
  letter-spacing: 0.06em;
  white-space: nowrap;
  flex-shrink: 0;
  max-width: min(54vw, 16rem);
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 桌面端：以下为折叠容器，子节点通过 display:contents 参与同一行布局 */
.site-nav-panel {
  display: contents;
}

.site-nav-menu-btn {
  display: none;
  margin-left: auto;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid #c4ad8a;
  background: #fffdfa;
  color: #4a3222;
  cursor: pointer;
  flex-shrink: 0;
  font-family: inherit;
}

.site-nav-menu-btn:hover {
  background: #f5efe4;
}

.site-nav-menu-btn:focus-visible {
  outline: 2px solid #a63a28;
  outline-offset: 3px;
}

.site-nav-menu-bars {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 22px;
}

.site-nav-menu-bar {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 1px;
  background: currentColor;
  transition:
    transform 0.22s ease,
    opacity 0.2s ease;
  transform-origin: 50% 50%;
}

.site-nav-menu-btn.is-expanded .site-nav-menu-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.site-nav-menu-btn.is-expanded .site-nav-menu-bar:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.site-nav-menu-btn.is-expanded .site-nav-menu-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.site-nav-links {
  display: flex;
  gap: 4px;
  flex: 1;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
}

.site-nav-link {
  padding: 8px 12px;
  border-radius: 8px;
  color: #5c5348;
  text-decoration: none;
  font-size: 0.92rem;
}

.site-nav-link:hover {
  background: #f5efe4;
  color: #2f2a24;
}

.site-nav-link.is-active {
  background: #f4e0d6;
  color: #8f2f1f;
  font-weight: 600;
}

.site-nav-auth {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.site-user {
  font-size: 0.88rem;
  color: #6a6357;
}

.site-nav-btn,
.site-nav-btn-primary {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.88rem;
  text-decoration: none;
  border: 1px solid #c4ad8a;
  background: #fffdfa;
  color: #4a3222;
  cursor: pointer;
  font-family: inherit;
}

.site-nav-btn-primary {
  background: linear-gradient(180deg, #b84432 0%, #a63a28 100%);
  color: #fff;
  border-color: #a63a28;
}

.site-footer {
  max-width: 1100px;
  margin: 24px auto 0;
  padding: 16px;
  text-align: center;
  font-size: 0.84rem;
  color: #8a8174;
}

/* 首页 Hero */
.landing-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.landing-main {
  flex: 1;
}

.site-hero {
  position: relative;
  min-height: 420px;
  max-height: 64vh;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.site-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
}

.site-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    rgba(47, 42, 36, 0.72) 0%,
    rgba(47, 42, 36, 0.35) 42%,
    rgba(47, 42, 36, 0.12) 68%,
    rgba(47, 42, 36, 0.45) 100%
  );
}

.site-hero-content {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 20px 40px;
  width: 100%;
  color: #fff;
}

.site-hero-content h1 {
  margin: 0 0 8px;
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  letter-spacing: 0.1em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

.site-hero-content p {
  margin: 0 0 20px;
  font-size: 1.05rem;
  opacity: 0.95;
  max-width: 520px;
}

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

.hero-btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  font-size: 0.95rem;
}

.hero-btn-primary {
  background: #fff;
  color: #4a3222;
}

.hero-btn-secondary {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.6);
}

.feature-grid {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 16px 40px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.feature-card {
  background: #fffdfa;
  border: 1px solid #e0d4c0;
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 8px 24px rgba(78, 58, 28, 0.06);
}

.feature-card h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  color: #4a3222;
}

.feature-card p {
  margin: 0;
  font-size: 0.9rem;
  color: #6a6357;
  line-height: 1.55;
}

/* 表单页 */
.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.auth-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: #fffdfa;
  border: 1px solid #e0d4c0;
  border-radius: 16px;
  padding: 28px 24px;
  box-shadow: 0 12px 40px rgba(78, 58, 28, 0.1);
}

.auth-card h1 {
  margin: 0 0 6px;
  font-size: 1.35rem;
  color: #4a3222;
}

.auth-card .auth-sub {
  margin: 0 0 20px;
  color: #6a6357;
  font-size: 0.9rem;
}

.auth-form label {
  display: block;
  font-size: 0.88rem;
  margin-bottom: 6px;
  color: #5c5549;
}

.auth-form input {
  width: 100%;
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px solid #c4ad8a;
  border-radius: 10px;
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
}

.auth-form button[type="submit"] {
  width: 100%;
  margin-top: 4px;
  padding: 12px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(180deg, #b84432 0%, #a63a28 100%);
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  font-family: inherit;
}

.auth-error {
  color: #9b2f16;
  font-size: 0.88rem;
  margin-bottom: 12px;
  min-height: 1.2em;
}

.auth-footer-link {
  margin-top: 16px;
  text-align: center;
  font-size: 0.88rem;
}

.auth-footer-link a {
  color: #a63a28;
}

/* 学习记录 */
.history-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.history-main {
  flex: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 20px 16px 40px;
  width: 100%;
}

.history-main h1 {
  margin: 0 0 6px;
  font-size: 1.4rem;
  color: #4a3222;
}

.history-sub {
  margin: 0 0 20px;
  color: #6a6357;
  font-size: 0.9rem;
}

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

.history-item {
  background: #fffdfa;
  border: 1px solid #e0d4c0;
  border-radius: 12px;
  padding: 16px;
}

.history-item-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.history-char {
  font-size: 1.8rem;
  font-weight: 700;
  color: #2f2a24;
}

.history-score {
  font-size: 1.25rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 8px;
  background: #f5efe4;
  color: #4a3222;
}

.history-score.high {
  background: #e8f4ec;
  color: #3d7a52;
}

.history-score.mid {
  background: #faf3e6;
  color: #b07a28;
}

.history-score.low {
  background: #f4e0d6;
  color: #a63a28;
}

.history-meta {
  font-size: 0.82rem;
  color: #8a8174;
  margin-bottom: 8px;
}

.history-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.history-metrics span {
  font-size: 0.78rem;
  background: #faf5ec;
  padding: 4px 8px;
  border-radius: 6px;
  color: #5c5549;
}

.history-tip {
  font-size: 0.9rem;
  color: #4c463d;
  margin: 0;
}

.history-tip.muted {
  color: #8a8174;
  margin-top: 4px;
}

.history-empty {
  text-align: center;
  padding: 48px 20px;
  color: #8a8174;
}

.history-pagination {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  gap: 12px;
  align-items: center;
}

.history-pagination button {
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid #c4ad8a;
  background: #fffdfa;
  cursor: pointer;
  font-family: inherit;
}

.history-pagination button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.practice-page .app-shell {
  padding-top: 8px;
}

.top-bar-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  align-items: flex-start;
}

.practice-banner {
  text-align: center;
  padding: 32px 20px;
}

.practice-banner h2 {
  margin: 0 0 8px;
  color: #4a3222;
}

.finalize-row {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed #e0d4c0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.finalize-btn {
  padding: 10px 16px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(180deg, #3d7a52 0%, #357048 100%);
  color: #fff;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}

.whole-ai-btn {
  padding: 10px 16px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(180deg, #3d6895 0%, #356288 100%);
  color: #fff;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}

.whole-ai-btn:disabled {
  opacity: 0.52;
  cursor: not-allowed;
}

.finalize-hint {
  font-size: 0.82rem;
}

/* 字帖列表页 */
.copybooks-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.copybooks-main {
  flex: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 16px 40px;
  width: 100%;
}

.copybooks-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.copybooks-head h1 {
  margin: 0 0 6px;
  font-size: 1.4rem;
  color: #4a3222;
}

.copybook-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.copybook-card {
  position: relative;
  background: #fffdfa;
  border: 1px solid #e0d4c0;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(78, 58, 28, 0.08);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.copybook-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(78, 58, 28, 0.12);
}

.copybook-card-link {
  display: block;
  padding: 16px;
  text-decoration: none;
  color: inherit;
}

.copybook-card-preview {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 10px;
  background: linear-gradient(145deg, #faf5ec 0%, #f0e6d4 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  border: 1px solid #ebe3d4;
}

.copybook-card-char {
  font-size: 3rem;
  font-family: "KaiTi", "STKaiti", serif;
  color: #4a3222;
  opacity: 0.85;
}

.copybook-card-title {
  margin: 0 0 6px;
  font-size: 1.05rem;
  color: #4a3222;
}

.copybook-card-meta {
  margin: 0 0 4px;
  font-size: 0.88rem;
  color: #6a6357;
}

.copybook-card-preview-text {
  margin: 0 0 8px;
  font-size: 0.82rem;
  color: #8a8174;
}

.copybook-card-foot {
  margin: 0;
  font-size: 0.78rem;
}

.copybook-card-edit,
.copybook-card-delete {
  position: absolute;
  top: 8px;
  padding: 4px 10px;
  font-size: 0.75rem;
  z-index: 3;
  pointer-events: auto;
}

.copybook-card-edit {
  left: 8px;
}

.copybook-card-delete {
  right: 8px;
}

.copybooks-empty {
  grid-column: 1 / -1;
}

.copybook-dialog {
  border: none;
  border-radius: 16px;
  padding: 0;
  max-width: 440px;
  width: calc(100% - 32px);
  box-shadow: 0 20px 60px rgba(40, 28, 12, 0.25);
}

.copybook-dialog::backdrop {
  background: rgba(30, 24, 18, 0.45);
}

.copybook-dialog-form {
  padding: 24px;
}

.copybook-dialog-form h2 {
  margin: 0 0 16px;
  color: #4a3222;
}

.copybook-dialog-form label {
  display: block;
  font-size: 0.88rem;
  margin-bottom: 6px;
  color: #5c5549;
}

.copybook-dialog-form input,
.copybook-dialog-form textarea {
  width: 100%;
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px solid #c4ad8a;
  border-radius: 10px;
  font-family: inherit;
  font-size: 1rem;
}

.dialog-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 8px;
}

.dialog-actions button[type="submit"] {
  padding: 10px 16px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(180deg, #b84432 0%, #a63a28 100%);
  color: #fff;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}

/* 在线课本 */
.textbooks-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.textbooks-main {
  flex: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 16px 40px;
  width: 100%;
}

.textbooks-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.textbooks-head h1 {
  margin: 0 0 6px;
  font-size: 1.4rem;
  color: #4a3222;
}

.textbooks-head .muted {
  margin: 0;
  font-size: 0.92rem;
  color: #6a6357;
}

.subject-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.subject-tab {
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid #c4ad8a;
  background: #fffdfb;
  color: #5c5348;
  font-size: 0.92rem;
  font-family: inherit;
  cursor: pointer;
  transition:
    background 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease;
}

.subject-tab:hover {
  background: #f9f4ea;
}

.subject-tab.is-active {
  border-color: #a63a28;
  background: linear-gradient(180deg, #f8e9e4 0%, #f4e0d6 100%);
  color: #8f2f1f;
  font-weight: 600;
}

.textbook-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.textbook-card {
  background: #fffdfa;
  border: 1px solid #e0d4c0;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(78, 58, 28, 0.08);
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

.textbook-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(78, 58, 28, 0.12);
}

.textbook-card-cover-wrap {
  background: linear-gradient(145deg, #faf5ec 0%, #ebe3d4 100%);
  border-bottom: 1px solid #ebe3d4;
}

.textbook-card-cover {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  vertical-align: middle;
}

.textbook-card-body {
  padding: 14px 16px 16px;
}

.textbook-card-title {
  margin: 0 0 8px;
  font-size: 1rem;
  color: #4a3222;
  font-weight: 600;
}

.textbook-card-meta {
  margin: 0 0 12px;
  font-size: 0.86rem;
  color: #6a6357;
  line-height: 1.4;
}

.textbook-card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.textbook-dl-link {
  padding: 8px 12px;
  border-radius: 8px;
  background: linear-gradient(180deg, #b84432 0%, #a63a28 100%);
  color: #fff;
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 600;
}

.textbook-card-actions .textbook-del-btn {
  padding: 8px 12px;
  font-size: 0.82rem;
}

.textbooks-upload-dialog {
  max-width: 480px;
}

.textbooks-upload-dialog .copybook-dialog-form select,
.copybook-dialog-form select {
  width: 100%;
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px solid #c4ad8a;
  border-radius: 10px;
  font-family: inherit;
  font-size: 1rem;
  background: #fffdfb;
}

/* 管理后台 */
.admin-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.admin-main {
  flex: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 16px 40px;
  width: 100%;
}

.admin-head h1 {
  margin: 0 0 6px;
  font-size: 1.4rem;
  color: #4a3222;
}

.admin-panel[hidden] {
  display: none !important;
}

.admin-table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  background: #fffdfa;
  border: 1px solid #e0d4c0;
  border-radius: 12px;
  overflow: hidden;
}

.admin-table th,
.admin-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #ebe3d4;
}

.admin-table th {
  background: #f5efe4;
  color: #4a3222;
  font-weight: 600;
}

.admin-table tr:last-child td {
  border-bottom: none;
}

.admin-role-select {
  padding: 6px 8px;
  border: 1px solid #c4ad8a;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.86rem;
  background: #fffdfb;
}

.admin-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  cursor: pointer;
}

.admin-fieldset {
  border: 1px solid #e0d4c0;
  border-radius: 10px;
  padding: 12px 14px 14px;
  margin-bottom: 14px;
}

.admin-fieldset legend {
  padding: 0 6px;
  color: #5c5549;
  font-size: 0.88rem;
}

.admin-fieldset .admin-check {
  margin-right: 16px;
}

.admin-settings-form label {
  display: block;
  font-size: 0.88rem;
  margin-bottom: 6px;
  color: #5c5549;
}

.admin-settings-form textarea,
.admin-settings-form input[type="number"] {
  width: 100%;
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px solid #c4ad8a;
  border-radius: 10px;
  font-family: inherit;
  font-size: 1rem;
  background: #fffdfb;
}

.admin-muted {
  color: #8a8174;
  font-size: 0.82rem;
}

.admin-ok {
  color: #2d6a3e;
  font-size: 0.9rem;
  margin: 0 0 10px;
}

/* 学习记录 · 字帖轮次 */
.history-run-card {
  background: #fffdfa;
  border: 1px solid #e0d4c0;
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 4px;
}

.history-run-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 6px;
}

.history-run-title {
  margin: 0 0 4px;
  font-size: 1.15rem;
  color: #4a3222;
}

.history-run-score {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.history-run-label {
  margin: 0 0 10px;
  font-size: 0.82rem;
}

.history-detail-toggle {
  margin-bottom: 10px;
}

.history-run-detail {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px dashed #e0d4c0;
}

.history-cell-list {
  display: grid;
  gap: 10px;
}

.history-cell-item {
  margin: 0;
}

/* --- 学习闯关 --- */
.games-hub-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #fdf8f2 0%, #f6efe4 100%);
}

.games-hub-main {
  flex: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 16px 48px;
  width: 100%;
  box-sizing: border-box;
}

.games-hub-head {
  margin-bottom: 16px;
}

.games-hub-head h1 {
  margin: 0 0 6px;
  color: #4a3222;
  font-size: 1.65rem;
}

.games-filters.card-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  padding: 16px 18px;
  margin-bottom: 20px;
  background: #fffdfa;
  border: 1px solid #e0d4c0;
  border-radius: 14px;
}

.games-filter-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.88rem;
  color: #5c5348;
}

.games-filter-field select {
  min-width: 160px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #c4ad8a;
  background: #fff;
  font-family: inherit;
  font-size: 0.94rem;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}

.games-card {
  background: #fffdfa;
  border: 1px solid #e0d4c0;
  border-radius: 14px;
  overflow: hidden;
  transition:
    box-shadow 0.15s ease,
    transform 0.15s ease;
}

.games-card:hover {
  box-shadow: 0 8px 28px rgba(74, 50, 34, 0.12);
  transform: translateY(-2px);
}

.games-card-link {
  display: block;
  padding: 18px 18px 16px;
  color: inherit;
  text-decoration: none;
}

.games-card-kicker {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #a63a28;
  margin-bottom: 8px;
}

.games-card-title {
  margin: 0 0 8px;
  font-size: 1.12rem;
  color: #4a3222;
}

.games-card-desc {
  margin: 0 0 12px;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #5c5348;
}

.games-tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f4e0d6;
  color: #6a3a2a;
  font-size: 0.78rem;
  margin-right: 6px;
  margin-bottom: 4px;
}

/* 打地鼠页样式见 web/games/math-mole-g1-lower.css */

/* —— 手机 / 小平板：汉堡菜单 —— */
@media (max-width: 767px) {
  .site-nav-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 0 10px;
    align-items: center;
    padding: 10px 14px;
  }

  .site-logo {
    grid-column: 1;
    grid-row: 1;
    max-width: none;
  }

  .site-nav-menu-btn {
    grid-column: 2;
    grid-row: 1;
    display: inline-flex;
  }

  /* 取消 contents，整块折叠面板占满第二行 */
  .site-nav-panel {
    display: none;
    grid-column: 1 / -1;
    grid-row: 2;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin-top: 12px;
    padding-top: 14px;
    border-top: 1px solid #e0d4c0;
  }

  .site-nav-panel.is-open {
    display: flex;
  }

  .site-nav-links {
    flex: none;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 2px;
  }

  .site-nav-link {
    padding: 12px 12px;
    font-size: 0.95rem;
    text-align: left;
  }

  .site-nav-auth {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding-top: 4px;
    border-top: 1px dashed #e8dfd0;
  }

  .site-nav-auth .site-user {
    text-align: center;
    padding: 4px 0;
  }

  .site-nav-auth .site-nav-btn,
  .site-nav-auth .site-nav-btn-primary,
  .site-nav-auth #site-logout-btn {
    width: 100%;
    text-align: center;
    box-sizing: border-box;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-nav-menu-bar {
    transition: none;
  }
}
