:root {
  --bg: #e6f0d6;
  --panel: linear-gradient(135deg, #cfe6b6 0%, #c4df9e 50%, #a7cf76 100%);
  --deepBlue: #063b67;
  --deepGreen: #067149;
  --tagGreen: #008649;
  --card: #8ec0b2;
  --cardBorder: #6ea397;
  --text: #163340;
  --title: #8a8d18;
  --shadow: 0 8px 18px rgba(34, 77, 47, 0.18);
}

html,
body {
  touch-action: manipulation;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", sans-serif;
  background: radial-gradient(
    circle at top,
    #f8fbf2 0%,
    var(--bg) 65%,
    #d3e4b9 100%
  );
  color: var(--text);
}

button {
  font: inherit;
}

.page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.board {
  width: min(1180px, 100%);
  background: var(--panel);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 28px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px;
  gap: 24px;
  position: relative;
  overflow: hidden;
}

.board::before,
.board::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  opacity: 0.28;
  pointer-events: none;
}

.board::before {
  width: 320px;
  height: 320px;
  top: -140px;
  left: -120px;
  background: radial-gradient(circle, #eff7de 0%, rgba(239, 247, 222, 0) 72%);
}

.board::after {
  width: 280px;
  height: 280px;
  right: -90px;
  bottom: -110px;
  background: radial-gradient(circle, #90c86b 0%, rgba(144, 200, 107, 0) 70%);
}

.boardHeader {
  grid-column: 1 / -1;
  position: relative;
  z-index: 1;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(22, 51, 64, 0.72);
}

.pageTitle {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.1;
}

.subtitle {
  margin: 10px 0 0;
  color: rgba(22, 51, 64, 0.8);
}

.boardContent {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.section {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.sectionBadge {
  writing-mode: vertical-rl;
  text-orientation: upright;
  background: var(--deepBlue);
  color: #fff7b8;
  border-radius: 999px;
  padding: 14px 10px;
  min-height: 108px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  letter-spacing: 0.12em;
  box-shadow: 0 6px 12px rgba(6, 59, 103, 0.25);
}

.groupList {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.groupRow {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.groupTag {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--tagGreen);
  color: white;
  font-weight: 700;
  box-shadow: 0 4px 10px rgba(0, 81, 43, 0.2);
}

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

.symbolCard {
  min-width: 54px;
  height: 38px;
  padding: 0 14px;
  border: 1px solid var(--cardBorder);
  border-radius: 6px;
  background: linear-gradient(180deg, #95c8ba 0%, var(--card) 100%);
  color: #20323d;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "Times New Roman", "Noto Serif", serif;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(68, 112, 103, 0.18);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}

.symbolCard:hover,
.symbolCard:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 8px 14px rgba(68, 112, 103, 0.22);
  outline: none;
}

.symbolCard.isActive {
  background: linear-gradient(180deg, #c7f1e5 0%, #9fdacb 100%);
  box-shadow: 0 0 0 2px rgba(6, 113, 73, 0.24);
}

.preview {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 16px;
}

.previewLabel {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: rgba(22, 51, 64, 0.74);
}

.previewCard {
  width: 100%;
  min-height: 220px;
  padding: 18px 12px;
  border-radius: 24px;
  background: rgba(248, 252, 240, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.35);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.activeSymbol {
  font-family: "Times New Roman", "Noto Serif", serif;
  font-size: clamp(42px, 5vw, 56px);
  line-height: 1;
}

.activeGroup {
  margin: 0;
  font-size: 15px;
  color: rgba(22, 51, 64, 0.8);
  text-align: center;
}

.audioStatus {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(22, 51, 64, 0.72);
  text-align: center;
  word-break: break-word;
}

@media (min-width: 980px) {
  .boardHeader {
    max-width: 720px;
  }

  .pageTitle {
    position: absolute;
    right: -118px;
    top: 126px;
    writing-mode: vertical-rl;
    text-orientation: upright;
    color: var(--title);
    font-size: 28px;
    letter-spacing: 0.08em;
  }

  .subtitle {
    max-width: 560px;
  }
}

@media (max-width: 979px) {
  .board {
    grid-template-columns: 1fr;
  }

  .preview {
    order: -1;
    align-items: stretch;
  }

  .previewCard {
    min-height: 120px;
  }

  .pageTitle {
    color: var(--title);
  }
}

@media (max-width: 720px) {
  .page {
    padding: 12px;
  }

  .board {
    padding: 18px;
    border-radius: 22px;
    gap: 18px;
  }

  .section {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .sectionBadge {
    writing-mode: horizontal-tb;
    text-orientation: mixed;
    min-height: auto;
    width: fit-content;
    padding: 10px 18px;
    font-size: 17px;
    letter-spacing: 0.04em;
  }

  .groupRow {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .groupTag {
    width: fit-content;
    padding: 0 18px;
  }

  .cards {
    gap: 7px;
  }

  .symbolCard {
    min-width: 48px;
    height: 36px;
    padding: 0 12px;
    font-size: 17px;
  }
}
