.wh-header {
  background: var(--wh-red);
  color: #fff;
  height: var(--wh-header-h);
  display: flex;
  align-items: center;
  justify-content: center;
}

.wh-header__inner {
  width: 100%;
  max-width: var(--wh-max-width);
  padding: 0 var(--wh-space-4);
  display: flex;
  align-items: center;
  gap: var(--wh-space-3);
}

.wh-logo {
  width: 40px;
  height: 40px;
  background: #fff;
  border-radius: var(--wh-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.wh-logo svg {
  width: 28px;
  height: 28px;
}

.wh-site-title {
  font-size: var(--wh-font-h2);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.wh-toolbar {
  background: var(--wh-surface);
  border-bottom: 1px solid var(--wh-border);
  height: var(--wh-toolbar-h);
  display: flex;
  align-items: center;
}

.wh-toolbar__inner {
  width: 100%;
  max-width: var(--wh-max-width);
  margin: 0 auto;
  padding: 0 var(--wh-space-4);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--wh-space-4);
}

.wh-toolbar__group {
  display: flex;
  align-items: center;
  gap: var(--wh-space-2);
}

.wh-toolbar__label {
  font-size: var(--wh-font-small);
  color: var(--wh-text-muted);
}

.wh-toolbar__btn {
  min-width: var(--wh-touch-min);
  min-height: 36px;
  padding: 0 var(--wh-space-3);
  border: 1px solid var(--wh-border);
  border-radius: var(--wh-radius);
  background: var(--wh-surface);
  color: var(--wh-text);
  transition: background var(--wh-duration-fast) var(--wh-ease),
    transform var(--wh-duration-fast) var(--wh-ease);
}

.wh-toolbar__btn:hover {
  background: var(--wh-bg);
}

.wh-toolbar__btn:active {
  transform: scale(0.97);
}

.wh-toolbar__btn.is-active {
  background: var(--wh-blue);
  color: #fff;
  border-color: var(--wh-blue);
}

.wh-nav {
  background: var(--wh-blue);
}

.wh-nav__inner {
  max-width: var(--wh-max-width);
  margin: 0 auto;
  display: flex;
  padding: 0 var(--wh-space-4);
}

.wh-nav__link {
  color: rgba(255, 255, 255, 0.9);
  padding: var(--wh-space-3) var(--wh-space-4);
  font-size: var(--wh-font-body);
  transition: background var(--wh-duration-fast) var(--wh-ease);
  min-height: var(--wh-touch-min);
  display: flex;
  align-items: center;
}

.wh-nav__link:hover,
.wh-nav__link.is-active {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.wh-main {
  max-width: var(--wh-max-width);
  margin: 0 auto;
  padding: var(--wh-space-5) var(--wh-space-4);
  min-height: calc(100vh - var(--wh-header-h) - var(--wh-toolbar-h) - 120px);
}

.wh-layout-3col {
  display: grid;
  grid-template-columns: 220px 1fr 260px;
  gap: var(--wh-space-5);
}

.wh-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--wh-space-3);
}

.wh-card {
  background: var(--wh-surface);
  border: 1px solid var(--wh-border);
  border-radius: var(--wh-radius);
  padding: var(--wh-space-4);
  box-shadow: var(--wh-shadow);
}

.wh-card__title {
  font-size: var(--wh-font-h3);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: var(--wh-space-3);
  padding-bottom: var(--wh-space-2);
  border-bottom: 2px solid var(--wh-red);
}

.wh-meta-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--wh-font-small);
}

.wh-meta-table th,
.wh-meta-table td {
  border: 1px solid var(--wh-border);
  padding: var(--wh-space-2) var(--wh-space-3);
  text-align: left;
}

.wh-meta-table th {
  background: var(--wh-bg);
  color: var(--wh-text-muted);
  font-weight: 500;
  width: 35%;
}

.wh-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--wh-touch-min);
  min-width: var(--wh-touch-min);
  padding: 0 var(--wh-space-5);
  font-size: var(--wh-font-btn);
  font-weight: 500;
  border-radius: var(--wh-radius);
  border: 2px solid transparent;
  transition: background var(--wh-duration-fast) var(--wh-ease),
    transform var(--wh-duration-fast) var(--wh-ease),
    border-color var(--wh-duration-fast) var(--wh-ease);
}

.wh-btn:active {
  transform: scale(0.97);
}

.wh-btn--primary {
  background: var(--wh-blue);
  color: #fff;
}

.wh-btn--primary:hover {
  background: var(--wh-blue-hover);
}

.wh-btn--secondary {
  background: var(--wh-surface);
  color: var(--wh-text);
  border-color: var(--wh-border);
}

.wh-btn--secondary:hover {
  background: var(--wh-bg);
}

.wh-footer {
  background: var(--wh-surface);
  border-top: 1px solid var(--wh-border);
  padding: var(--wh-space-5) var(--wh-space-4);
  margin-top: var(--wh-space-6);
}

.wh-footer__inner {
  max-width: var(--wh-max-width);
  margin: 0 auto;
  text-align: center;
  color: var(--wh-text-muted);
  font-size: var(--wh-font-small);
}

.wh-game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--wh-space-4);
}

.wh-game-card {
  background: var(--wh-surface);
  border: 1px solid var(--wh-border);
  border-radius: var(--wh-radius-lg);
  padding: var(--wh-space-4);
  cursor: pointer;
  transition: box-shadow var(--wh-duration-normal) var(--wh-ease),
    transform var(--wh-duration-normal) var(--wh-ease);
}

.wh-game-card:hover {
  box-shadow: var(--wh-shadow-lg);
  transform: translateY(-2px);
}

.wh-game-card__name {
  font-size: var(--wh-font-h3);
  font-weight: 600;
  margin-bottom: var(--wh-space-2);
}

.wh-game-card__meta {
  font-size: var(--wh-font-small);
  color: var(--wh-text-muted);
}

.wh-badge {
  display: inline-block;
  padding: 2px var(--wh-space-2);
  font-size: var(--wh-font-small);
  border-radius: var(--wh-radius);
  background: var(--wh-success-bg);
  color: var(--wh-success);
}

.wh-badge--pending {
  background: var(--wh-warning-bg);
  color: var(--wh-warning);
}

.wh-search {
  width: 100%;
  max-width: 480px;
  height: var(--wh-touch-min);
  padding: 0 var(--wh-space-4);
  border: 2px solid var(--wh-border);
  border-radius: var(--wh-radius);
  font-size: var(--wh-font-body);
  background: var(--wh-surface);
  transition: border-color var(--wh-duration-fast) var(--wh-ease);
}

.wh-search:focus {
  outline: none;
  border-color: var(--wh-blue);
}

.wh-list {
  list-style: none;
}

.wh-list__item {
  padding: var(--wh-space-3) 0;
  border-bottom: 1px solid var(--wh-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--wh-space-3);
}

.wh-list__item:last-child {
  border-bottom: none;
}

.wh-rank {
  font-weight: 700;
  color: var(--wh-red);
  min-width: 32px;
}

.wh-skeleton {
  background: linear-gradient(90deg, var(--wh-bg) 25%, #eceae4 50%, var(--wh-bg) 75%);
  background-size: 200% 100%;
  animation: wh-shimmer 1.5s infinite;
  border-radius: var(--wh-radius);
  min-height: 24px;
}

@keyframes wh-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.wh-empty {
  text-align: center;
  padding: var(--wh-space-7) var(--wh-space-4);
  color: var(--wh-text-muted);
}

.wh-play-shell {
  display: flex;
  flex-direction: column;
  gap: var(--wh-space-4);
}

.wh-level-picker {
  display: flex;
  flex-wrap: wrap;
  gap: var(--wh-space-2);
}

.wh-level-btn {
  min-width: 56px;
  min-height: var(--wh-touch-min);
  border: 2px solid var(--wh-border);
  border-radius: var(--wh-radius);
  background: var(--wh-surface);
  font-weight: 500;
  transition: all var(--wh-duration-fast) var(--wh-ease);
}

.wh-level-btn.is-active {
  border-color: var(--wh-blue);
  background: var(--wh-blue);
  color: #fff;
}

.wh-level-btn--sm {
  min-width: 44px;
  min-height: 40px;
  font-size: var(--wh-font-sm);
}

.wh-result {
  text-align: center;
  padding: var(--wh-space-6);
}

.wh-result__score {
  font-size: var(--wh-font-h1);
  font-weight: 700;
  color: var(--wh-success);
  line-height: 1.1;
}

.wh-result--fail .wh-result__score {
  color: var(--wh-error);
}

.wh-result__score--fail {
  color: var(--wh-error);
}

.wh-result__grade {
  margin-top: 8px;
  font-size: var(--wh-font-md);
  color: var(--wh-text-muted);
  line-height: 1.5;
}

.wh-result__stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px 32px;
  margin-top: 24px;
  padding: 16px 24px;
  background: color-mix(in oklch, var(--wh-surface) 92%, var(--wh-text) 8%);
  border-radius: var(--wh-radius-md);
}

.wh-result__stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 80px;
}

.wh-result__stat-label {
  font-size: var(--wh-font-sm);
  color: var(--wh-text-muted);
}

.wh-result__stat span:last-child {
  font-size: var(--wh-font-md);
  font-weight: 500;
}

.wh-result__hint {
  margin-top: 16px;
  font-size: var(--wh-font-sm);
  color: var(--wh-text-muted);
  line-height: 1.6;
}

.wh-result__actions {
  margin-top: 24px;
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.wh-result__celebrate {
  margin-top: 12px;
  font-size: var(--wh-font-md);
  font-weight: 500;
  color: var(--wh-blue);
  line-height: 1.5;
}

.wh-help {
  margin-bottom: 16px;
  border: 1px solid color-mix(in oklch, var(--wh-border) 80%, transparent);
  border-radius: var(--wh-radius-md);
  background: color-mix(in oklch, var(--wh-surface) 96%, var(--wh-blue) 4%);
}

.wh-help__toggle {
  padding: 12px 16px;
  font-size: var(--wh-font-md);
  font-weight: 500;
  cursor: pointer;
  list-style: none;
  min-height: var(--wh-touch-min);
  display: flex;
  align-items: center;
}

.wh-help__toggle::-webkit-details-marker {
  display: none;
}

.wh-help[open] .wh-help__toggle {
  border-bottom: 1px solid var(--wh-border);
}

.wh-help__body {
  padding: 16px;
}

.wh-help__meta {
  font-size: var(--wh-font-sm);
  color: var(--wh-text-muted);
  margin-bottom: 12px;
}

.wh-help__subtitle {
  font-size: var(--wh-font-sm);
  font-weight: 600;
  color: var(--wh-text);
  margin: 12px 0 6px;
}

.wh-help__subtitle:first-of-type {
  margin-top: 0;
}

.wh-help__text {
  font-size: var(--wh-font-md);
  line-height: 1.6;
  color: var(--wh-text);
  margin: 0;
}

.wh-help__glossary {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px dashed var(--wh-border);
}

.wh-help__dl {
  margin: 8px 0 0;
  display: grid;
  gap: 10px;
}

.wh-help__dl dt {
  font-weight: 600;
  font-size: var(--wh-font-sm);
}

.wh-help__dl dd {
  margin: 0 0 0 8px;
  font-size: var(--wh-font-sm);
  line-height: 1.55;
  color: var(--wh-text-muted);
}

.wh-help__term-link {
  color: var(--wh-blue);
  text-decoration: none;
  font-weight: 600;
}

.wh-help__term-link:hover {
  text-decoration: underline;
}

.wh-learn__intro {
  margin: 0 0 16px;
  font-size: var(--wh-font-md);
  line-height: 1.6;
  color: var(--wh-text-muted);
}

.wh-learn__search {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.wh-learn__input {
  flex: 1;
  min-width: 200px;
  min-height: var(--wh-touch-min);
  padding: 0 16px;
  border: 1px solid var(--wh-border);
  border-radius: var(--wh-radius-md);
  font-size: var(--wh-font-md);
}

.wh-learn__chip-group {
  margin-bottom: 12px;
}

.wh-learn__chip-label {
  display: block;
  margin-bottom: 8px;
  font-size: var(--wh-font-sm);
  font-weight: 600;
  color: var(--wh-text-muted);
}

.wh-learn__more {
  display: flex;
  justify-content: center;
  margin: 24px 0 8px;
}

.wh-list__link {
  padding: 0;
  border: none;
  background: none;
  color: var(--wh-blue);
  font-size: inherit;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}

.wh-list__link:hover {
  text-decoration: underline;
}

.wh-learn__mark {
  background: oklch(92% 0.08 85);
  color: inherit;
  padding: 0 2px;
  border-radius: 2px;
}

.wh-learn__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.wh-learn__chip {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--wh-border);
  border-radius: 999px;
  background: var(--wh-surface);
  font-size: var(--wh-font-sm);
  cursor: pointer;
  transition: background var(--wh-duration-fast) var(--wh-ease);
}

.wh-learn__chip.is-active {
  background: var(--wh-blue);
  color: #fff;
  border-color: var(--wh-blue);
}

.wh-learn__count {
  margin: 0;
  font-size: var(--wh-font-sm);
  color: var(--wh-text-muted);
}

.wh-learn__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.wh-learn__card {
  text-align: left;
  padding: 20px;
  border: 1px solid var(--wh-border);
  border-radius: var(--wh-radius-md);
  background: var(--wh-surface);
  cursor: pointer;
  transition: transform var(--wh-duration-fast) var(--wh-ease), box-shadow var(--wh-duration-fast) var(--wh-ease);
  min-height: var(--wh-touch-min);
}

.wh-learn__card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.wh-learn__term {
  display: block;
  font-size: var(--wh-font-h2);
  font-weight: 700;
  line-height: 1.2;
}

.wh-learn__pinyin {
  display: block;
  margin-top: 4px;
  font-size: var(--wh-font-sm);
  color: var(--wh-text-muted);
}

.wh-learn__brief {
  margin: 12px 0 8px;
  font-size: var(--wh-font-md);
  line-height: 1.55;
  color: var(--wh-text);
}

.wh-learn__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.wh-learn__tag {
  font-size: var(--wh-font-sm);
  padding: 2px 10px;
  border-radius: 999px;
  background: color-mix(in oklch, var(--wh-blue) 12%, var(--wh-surface));
  color: var(--wh-blue);
}

.wh-learn-detail__head {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--wh-border);
}

.wh-learn-detail__term {
  font-size: var(--wh-font-h1);
  font-weight: 700;
  margin: 0;
  line-height: 1.15;
}

.wh-learn-detail__pinyin {
  margin: 8px 0 12px;
  color: var(--wh-text-muted);
}

.wh-learn-detail__brief {
  margin-top: 16px;
  font-size: var(--wh-font-md);
  line-height: 1.6;
}

.wh-learn-detail__section {
  margin-bottom: 24px;
}

.wh-learn-detail__section h3 {
  margin: 0 0 8px;
  font-size: var(--wh-font-md);
  font-weight: 600;
}

.wh-learn-detail__section p {
  margin: 0;
  line-height: 1.65;
  font-size: var(--wh-font-md);
}

.wh-learn-detail__list {
  margin: 0;
  padding-left: 20px;
  line-height: 1.65;
}

.wh-learn-detail__related {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.wh-learn__link {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--wh-border);
  border-radius: var(--wh-radius);
  background: var(--wh-surface);
  color: var(--wh-blue);
  cursor: pointer;
}

.wh-learn__back {
  margin-bottom: 20px;
}

.wh-mobile-nav {
  display: none;
}
