*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: var(--font-size-base);
  line-height: 1.6;
  color: var(--color-text);
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 14px 28px;
}

.page--catalog {
  align-items: stretch;
  justify-content: flex-start;
  max-width: 480px;
  margin: 0 auto;
}

.page-header {
  width: 100%;
  margin-bottom: 16px;
}

.page-title {
  margin: 6px 0 4px;
  font-size: var(--font-size-prompt);
  font-weight: 900;
  color: var(--color-primary);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
}

.page-subtitle {
  margin: 0;
  color: var(--color-muted);
  font-size: var(--font-size-base);
  font-weight: 600;
}

.back-link {
  display: inline-block;
  min-height: 44px;
  line-height: 44px;
  color: var(--color-secondary);
  text-decoration: none;
  font-weight: 800;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}

.back-link:hover {
  text-decoration: underline;
}

/* 年级 / 册别大按钮网格 */
.pill-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: 100%;
}

.pill-grid--compact {
  max-width: 320px;
}

.pill-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: var(--btn-min-height);
  padding: 12px 10px;
  text-decoration: none;
  border-radius: var(--radius-btn);
  border: 3px solid rgba(255, 255, 255, 0.55);
  transition: transform 0.12s ease;
}

.pill-btn--orange {
  color: #fff;
  background: linear-gradient(180deg, #ff9f43, var(--color-primary));
  box-shadow: 0 5px 0 var(--color-primary-dark), var(--shadow-soft);
}

.pill-btn--blue {
  color: #fff;
  background: linear-gradient(180deg, #4a90e8, var(--color-secondary));
  box-shadow: 0 5px 0 var(--color-secondary-dark), var(--shadow-soft);
}

.pill-btn:hover,
.pill-btn:focus-visible {
  transform: translateY(-2px);
  outline: none;
}

.pill-btn__title {
  font-size: 22px;
  font-weight: 900;
  line-height: 1.2;
}

.pill-btn__meta {
  margin-top: 4px;
  font-size: 13px;
  font-weight: 700;
  opacity: 0.9;
}

.card-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.nav-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: var(--btn-min-height);
  padding: 16px 18px;
  border-radius: var(--radius-card);
  text-decoration: none;
  color: var(--color-text);
  background: var(--color-surface);
  border: 2px solid rgba(245, 130, 32, 0.16);
  box-shadow: var(--shadow-soft);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.nav-card--glass {
  background: var(--color-surface-glass);
  backdrop-filter: blur(8px);
  border-color: rgba(255, 255, 255, 0.65);
}

.nav-card:hover,
.nav-card:focus-visible {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
  outline: none;
}

.nav-card__title {
  font-size: var(--font-size-prompt);
  font-weight: 900;
  color: var(--color-primary);
}

.nav-card__desc {
  margin-top: 6px;
  font-size: 15px;
  color: var(--color-muted);
}

.empty-state {
  width: 100%;
  padding: 24px 18px;
  text-align: center;
  background: var(--color-surface);
  border-radius: var(--radius-card);
  border: 2px solid rgba(245, 130, 32, 0.16);
  box-shadow: var(--shadow-soft);
}

.empty-state--glass {
  background: var(--color-surface-glass);
  backdrop-filter: blur(8px);
}

.empty-state p {
  margin: 0 0 16px;
  font-size: var(--font-size-base);
}
