/* ============================================================
   拼音小课堂 - 家长教学指南
   温暖童趣风 · 设计令牌系统
   ============================================================ */

:root {
  /* 色彩体系 */
  --bg-cream: #FFF8F0;
  --orange: #FF8C42;
  --orange-light: #FFB07A;
  --orange-dark: #E07A30;
  --mint: #7FD8BE;
  --mint-light: #A8E5D2;
  --lavender: #B5A5D8;
  --lavender-light: #C9BDE8;
  --yellow: #FFD166;
  --coral: #FF9F84;
  --brown: #8B572A;
  --dark: #333333;
  --gray: #666666;
  --light-gray: #E6E1DA;
  --red: #E56363;
  --white: #FFFFFF;
  --card-shadow: 0 4px 12px rgba(255, 140, 66, 0.08), 0 2px 6px rgba(0, 0, 0, 0.04);
  --card-shadow-hover: 0 8px 24px rgba(255, 140, 66, 0.15), 0 4px 12px rgba(0, 0, 0, 0.06);

  /* 字号 */
  --fs-hero: 2.8rem;
  --fs-h1: 2.2rem;
  --fs-h2: 1.7rem;
  --fs-h3: 1.3rem;
  --fs-body: 1.05rem;
  --fs-small: 0.9rem;
  --fs-tiny: 0.8rem;

  /* 间距 */
  --sp-xs: 0.5rem;
  --sp-sm: 1rem;
  --sp-md: 1.5rem;
  --sp-lg: 2rem;
  --sp-xl: 3rem;
  --sp-2xl: 4rem;

  /* 圆角 */
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-full: 999px;

  /* 导航 */
  --nav-height: 64px;
  --nav-blur: blur(20px);
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Helvetica Neue", sans-serif;
  background: var(--bg-cream);
  color: var(--dark);
  line-height: 1.8;
  font-size: 16px;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--orange); text-decoration: none; }
a:hover { color: var(--orange-dark); }

/* ============================================================
   顶部导航栏
   ============================================================ */
.top-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  background: rgba(255, 248, 240, 0.85);
  backdrop-filter: var(--nav-blur);
  -webkit-backdrop-filter: var(--nav-blur);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--sp-lg);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--orange);
  white-space: nowrap;
}

.nav-brand .logo {
  width: 36px; height: 36px;
  background: var(--orange);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--white);
  font-size: 1.1rem;
  font-weight: 700;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.nav-links::-webkit-scrollbar { display: none; }

.nav-links a {
  display: block;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  color: var(--gray);
  white-space: nowrap;
  transition: all 0.2s ease;
  scroll-margin-right: 20px;
}
.nav-links a:hover { background: rgba(255, 140, 66, 0.1); color: var(--orange); }
.nav-links a.active {
  background: var(--orange);
  color: var(--white);
  font-weight: 600;
}

.nav-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.nav-btn {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 2px solid var(--orange);
  background: transparent;
  color: var(--orange);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.nav-btn:hover { background: var(--orange); color: var(--white); }

.nav-btn.child-btn { border-color: var(--mint); color: #5cb89e; }
.nav-btn.child-btn:hover { background: var(--mint); color: var(--white); }

/* Mobile hamburger */
.nav-toggle { display: none; }

/* ============================================================
   Hero Section
   ============================================================ */
.hero {
  margin-top: var(--nav-height);
  padding: var(--sp-2xl) var(--sp-lg);
  text-align: center;
  background: linear-gradient(135deg, var(--bg-cream) 0%, #FFF0E0 50%, #E8F8F0 100%);
}

.hero h1 {
  font-size: var(--fs-hero);
  color: var(--dark);
  margin-bottom: var(--sp-sm);
  line-height: 1.3;
}
.hero h1 .accent { color: var(--orange); }

.hero .subtitle {
  font-size: var(--fs-h3);
  color: var(--gray);
  margin-bottom: var(--sp-lg);
}

.hero .pinyin-display {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: var(--sp-xl) 0;
}
.hero .pinyin-display span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px; height: 64px;
  border-radius: var(--radius-md);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--white);
  box-shadow: var(--card-shadow);
}
.hero .p1 { background: var(--orange); }
.hero .p2 { background: var(--mint); }
.hero .p3 { background: var(--lavender); }
.hero .p4 { background: var(--yellow); }
.hero .p5 { background: var(--coral); }
.hero .p6 { background: var(--orange-light); }

.hero .hero-desc {
  max-width: 700px;
  margin: 0 auto;
  font-size: var(--fs-body);
  color: var(--gray);
  line-height: 1.8;
}

/* ============================================================
   Section Layout
   ============================================================ */
.section {
  padding: var(--sp-2xl) var(--sp-lg);
  max-width: 1140px;
  margin: 0 auto;
  scroll-margin-top: calc(var(--nav-height) + 16px);
}

.section-header {
  text-align: center;
  margin-bottom: var(--sp-xl);
}
.section-header .section-tag {
  display: inline-block;
  padding: 4px 16px;
  border-radius: var(--radius-full);
  font-size: var(--fs-small);
  color: var(--white);
  margin-bottom: var(--sp-sm);
}
.section-header h2 {
  font-size: var(--fs-h1);
  color: var(--dark);
  margin-bottom: var(--sp-sm);
}
.section-header p {
  font-size: var(--fs-body);
  color: var(--gray);
  max-width: 700px;
  margin: 0 auto;
}

/* Section tag colors */
.tag-1 { background: var(--orange); }
.tag-2 { background: var(--mint); }
.tag-3 { background: var(--lavender); }
.tag-4 { background: var(--coral); }
.tag-5 { background: var(--yellow); color: var(--brown) !important; }
.tag-6 { background: var(--orange-light); }

/* ============================================================
   Content Cards
   ============================================================ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--sp-lg);
  margin-bottom: var(--sp-xl);
}

.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--sp-lg);
  box-shadow: var(--card-shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-shadow-hover);
}

.card h3 {
  font-size: var(--fs-h3);
  color: var(--dark);
  margin-bottom: var(--sp-sm);
}

.card p {
  font-size: var(--fs-body);
  color: var(--gray);
  line-height: 1.8;
  margin-bottom: var(--sp-sm);
}

.card .card-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  margin-bottom: var(--sp-sm);
}

/* Image card */
.img-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.img-card:hover { transform: translateY(-4px); box-shadow: var(--card-shadow-hover); }
.img-card .img-wrapper {
  width: 100%;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--light-gray);
}
.img-card .img-wrapper img {
  width: 100%; height: 100%;
  object-fit: contain;
}
.img-card .img-caption {
  padding: var(--sp-sm) var(--sp-md);
}
.img-card .img-caption h4 {
  font-size: var(--fs-body);
  color: var(--dark);
  margin-bottom: 4px;
}
.img-card .img-caption p {
  font-size: var(--fs-small);
  color: var(--gray);
}

/* ============================================================
   Text Content
   ============================================================ */
.content-block {
  max-width: 800px;
  margin: 0 auto var(--sp-lg);
}
.content-block h3 {
  font-size: var(--fs-h2);
  color: var(--dark);
  margin: var(--sp-lg) 0 var(--sp-sm);
  padding-left: 12px;
  border-left: 4px solid var(--orange);
}
.content-block h4 {
  font-size: var(--fs-h3);
  color: var(--dark);
  margin: var(--sp-md) 0 var(--sp-sm);
}
.content-block p {
  font-size: var(--fs-body);
  color: var(--dark);
  line-height: 1.9;
  margin-bottom: var(--sp-sm);
}
.content-block ul, .content-block ol {
  margin: var(--sp-sm) 0 var(--sp-sm) var(--sp-lg);
}
.content-block li {
  margin-bottom: var(--sp-xs);
  line-height: 1.9;
}
.content-block strong { color: var(--orange); }

/* Callout box */
.callout {
  background: linear-gradient(135deg, #FFF5E8 0%, #FFF8F0 100%);
  border-left: 4px solid var(--orange);
  border-radius: var(--radius-md);
  padding: var(--sp-md);
  margin: var(--sp-md) 0;
}
.callout .callout-title {
  font-weight: 700;
  color: var(--orange);
  margin-bottom: var(--sp-xs);
}
.callout p { margin-bottom: 0; }

/* Tip box */
.tip-box {
  background: linear-gradient(135deg, #E8F8F0 0%, #F0FBF5 100%);
  border-left: 4px solid var(--mint);
  border-radius: var(--radius-md);
  padding: var(--sp-md);
  margin: var(--sp-md) 0;
}
.tip-box .tip-title {
  font-weight: 700;
  color: #5cb89e;
  margin-bottom: var(--sp-xs);
}

/* Warning box */
.warn-box {
  background: linear-gradient(135deg, #FFF0F0 0%, #FFF8F0 100%);
  border-left: 4px solid var(--red);
  border-radius: var(--radius-md);
  padding: var(--sp-md);
  margin: var(--sp-md) 0;
}
.warn-box .warn-title {
  font-weight: 700;
  color: var(--red);
  margin-bottom: var(--sp-xs);
}

/* ============================================================
   FAQ
   ============================================================ */
.faq-item {
  background: var(--white);
  border-radius: var(--radius-md);
  margin-bottom: var(--sp-sm);
  overflow: hidden;
  box-shadow: var(--card-shadow);
}
.faq-item details {
  padding: var(--sp-md);
}
.faq-item summary {
  font-weight: 600;
  font-size: var(--fs-body);
  cursor: pointer;
  color: var(--dark);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.faq-item summary::after {
  content: "▼";
  font-size: 0.7em;
  color: var(--orange);
  transition: transform 0.2s;
}
.faq-item details[open] summary::after { transform: rotate(180deg); }
.faq-item .faq-answer {
  margin-top: var(--sp-sm);
  color: var(--gray);
  font-size: var(--fs-body);
  line-height: 1.8;
}

/* ============================================================
   Print Buttons (always visible in nav)
   ============================================================ */
.print-bar {
  display: flex;
  gap: var(--sp-sm);
  justify-content: center;
  margin: var(--sp-xl) 0;
}

/* ============================================================
   Filter floating panel (mobile)
   ============================================================ */
.filter-fab {
  display: none;
  position: fixed;
  bottom: 20px;
  left: 20px;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--orange);
  color: var(--white);
  border: none;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  z-index: 900;
  box-shadow: 0 4px 16px rgba(255, 140, 66, 0.4);
  align-items: center;
  justify-content: center;
  line-height: 1.2;
  text-align: center;
}

.filter-panel {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  top: var(--nav-height);
  width: 220px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 950;
  padding: var(--sp-md);
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
}
.filter-panel.open { transform: translateX(0); }

.filter-panel .filter-title {
  font-weight: 700;
  color: var(--orange);
  margin-bottom: var(--sp-sm);
  font-size: var(--fs-body);
}

.filter-panel .filter-item {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 var(--sp-sm);
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--gray);
  font-size: var(--fs-body);
  transition: background 0.2s;
}
.filter-panel .filter-item:hover { background: rgba(255, 140, 66, 0.1); }
.filter-panel .filter-item.active { background: var(--orange); color: var(--white); font-weight: 600; }

.filter-overlay {
  display: none;
  position: fixed;
  top: var(--nav-height); left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(2px);
  z-index: 940;
  opacity: 0;
  transition: opacity 0.3s;
}
.filter-overlay.open { display: block; opacity: 1; }

/* Desktop filter bar */
.filter-bar-desktop {
  display: flex;
  justify-content: center;
  gap: var(--sp-sm);
  flex-wrap: wrap;
  margin-bottom: var(--sp-xl);
}
.filter-bar-desktop .filter-chip {
  padding: 8px 20px;
  border-radius: var(--radius-full);
  background: var(--white);
  border: 2px solid var(--light-gray);
  color: var(--gray);
  font-size: var(--fs-small);
  cursor: pointer;
  transition: all 0.2s;
}
.filter-bar-desktop .filter-chip:hover { border-color: var(--orange); color: var(--orange); }
.filter-bar-desktop .filter-chip.active {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--white);
  font-weight: 600;
}

/* ============================================================
   Sources section
   ============================================================ */
.sources-section {
  max-width: 800px;
  margin: 0 auto;
  padding: var(--sp-xl) 0;
}
.sources-section h3 {
  font-size: var(--fs-h2);
  margin-bottom: var(--sp-md);
  color: var(--dark);
}
.sources-list {
  list-style: none;
  margin: 0;
}
.sources-list li {
  padding: var(--sp-sm) 0;
  border-bottom: 1px solid var(--light-gray);
  font-size: var(--fs-small);
  color: var(--gray);
}
.sources-list li a { word-break: break-all; }
.last-verified {
  text-align: center;
  color: var(--gray);
  font-size: var(--fs-small);
  margin-top: var(--sp-lg);
}

/* ============================================================
   Footer
   ============================================================ */
.footer {
  text-align: center;
  padding: var(--sp-xl) var(--sp-lg);
  background: #FFF0E0;
  color: var(--gray);
  font-size: var(--fs-small);
}

/* ============================================================
   Scroll reveal animation
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   Print Styles - Adult Version
   ============================================================ */
@media print {
  body { background: white !important; color: black; font-size: 12pt; }
  .top-nav, .filter-fab, .filter-panel, .filter-overlay,
  .nav-actions, .nav-toggle, .print-bar,
  .filter-bar-desktop { display: none !important; }

  body.print-adult .hero { margin-top: 0; padding: 1cm 0; }
  body.print-adult .section { page-break-after: auto; padding: 0.5cm 0; max-width: 100%; }
  body.print-adult .content-block { max-width: 100%; }
  body.print-adult .card, body.print-adult .img-card,
  body.print-adult .callout, body.print-adult .tip-box,
  body.print-adult .warn-box, body.print-adult .faq-item {
    break-inside: avoid;
    box-shadow: none !important;
    border: 1px solid #ccc;
  }
  body.print-adult h2, body.print-adult h3 {
    break-after: avoid;
  }
  body.print-adult .faq-item details { display: block; }
  body.print-adult .faq-item details[open] .faq-answer,
  body.print-adult .faq-item .faq-answer { display: block !important; }
  body.print-adult .faq-item summary::after { display: none; }
  body.print-adult img { max-width: 100%; }
  body.print-adult .sources-section { break-before: page; }

  /* Child print version - only images and brief captions */
  body.print-child .hero { margin-top: 0; padding: 1cm 0; text-align: center; }
  body.print-child .hero .subtitle, body.print-child .hero .hero-desc { display: none; }
  body.print-child .section { padding: 0.5cm 0; }
  body.print-child .content-block,
  body.print-child .card-grid .card:not(:has(img)),
  body.print-child .callout, body.print-child .tip-box,
  body.print-child .warn-box,
  body.print-child .faq-item,
  body.print-child .sources-section { display: none !important; }

  body.print-child .img-card { break-inside: avoid; box-shadow: none; border: 1px solid #ccc; }
  body.print-child .img-card .img-caption h4 { font-size: 14pt; }
  body.print-child .img-card .img-caption p { font-size: 10pt; }
  body.print-child .section-header { text-align: center; }
  body.print-child .section-header p { display: none; }
  body.print-child .top-nav, body.print-child .filter-fab,
  body.print-child .filter-panel, body.print-child .filter-overlay,
  body.print-child .nav-actions, body.print-child .nav-toggle,
  body.print-child .print-bar, body.print-child .filter-bar-desktop { display: none !important; }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 768px) {
  :root {
    --fs-hero: 2rem;
    --fs-h1: 1.6rem;
    --fs-h2: 1.3rem;
    --fs-h3: 1.1rem;
    --sp-2xl: 2.5rem;
    --sp-xl: 2rem;
  }

  .top-nav { padding: 0 var(--sp-sm); }

  .nav-brand { font-size: 1rem; }
  .nav-brand .logo { width: 32px; height: 32px; font-size: 0.9rem; }

  .nav-links { gap: 0; }
  .nav-links a { padding: 6px 10px; font-size: 0.8rem; }

  .nav-actions { display: none; }
  .nav-toggle {
    display: flex;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    padding: 8px;
    background: none;
    border: none;
  }
  .nav-toggle span {
    width: 24px; height: 3px;
    background: var(--orange);
    border-radius: 2px;
    transition: all 0.3s;
  }

  .nav-menu-mobile {
    display: none;
    position: fixed;
    top: var(--nav-height);
    left: 0; right: 0;
    background: rgba(255, 248, 240, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    padding: var(--sp-md);
    gap: var(--sp-xs);
    z-index: 999;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  }
  .nav-menu-mobile.open { display: flex; }
  .nav-menu-mobile a {
    padding: 12px var(--sp-md);
    border-radius: var(--radius-sm);
    color: var(--gray);
    font-size: var(--fs-body);
  }
  .nav-menu-mobile a:hover { background: rgba(255,140,66,0.1); color: var(--orange); }
  .nav-menu-mobile .mobile-print-btns {
    display: flex;
    gap: var(--sp-sm);
    margin-top: var(--sp-sm);
    padding-top: var(--sp-sm);
    border-top: 1px solid var(--light-gray);
  }

  .hero { padding: var(--sp-xl) var(--sp-sm); }
  .hero .pinyin-display span { width: 48px; height: 48px; font-size: 1.4rem; }

  .section { padding: var(--sp-xl) var(--sp-sm); }

  .card-grid { grid-template-columns: 1fr; }

  .filter-bar-desktop { display: none; }
  .filter-fab { display: flex; }
  .filter-panel { display: block; }
  .filter-overlay { display: block; }

  .content-block h3 { font-size: 1.3rem; }

  /* Mobile nav auto-center active item */
  .nav-links { scroll-behavior: smooth; }
}

/* Page transition keyframes */
@keyframes chapterTransition {
  from { opacity: 0.3; transform: translateX(10px); }
  to { opacity: 1; transform: translateX(0); }
}
.section {
  animation: chapterTransition 0.4s ease;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ============================================================
   拼音发声按钮
   ============================================================ */

/* 发声按钮 - 小型内联按钮 */
.speak-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 14px;
  background: linear-gradient(135deg, var(--orange), var(--orange-light));
  color: var(--white) !important;
  border: none;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(255, 140, 66, 0.25);
  vertical-align: middle;
  line-height: 1.4;
  white-space: nowrap;
  user-select: none;
  -webkit-user-select: none;
}
.speak-btn:hover {
  transform: scale(1.06);
  box-shadow: 0 4px 14px rgba(255, 140, 66, 0.4);
}
.speak-btn:active {
  transform: scale(0.97);
}
.speak-btn.speaking {
  animation: pulseSpeak 0.6s ease-in-out infinite alternate;
}
@keyframes pulseSpeak {
  0% { box-shadow: 0 2px 8px rgba(255, 140, 66, 0.25); }
  100% { box-shadow: 0 2px 20px rgba(255, 140, 66, 0.55), 0 0 0 4px rgba(255, 140, 66, 0.15); }
}

/* 音波点动画 */
.speak-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--white);
  flex-shrink: 0;
}
.speak-dot.animate {
  animation: dotBounce 0.5s ease-in-out infinite;
}
@keyframes dotBounce {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.8); opacity: 0.5; }
}

/* 卡片中的发声按钮容器 */
.speak-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 12px 0;
  padding: 10px 14px;
  background: rgba(255, 248, 240, 0.6);
  border-radius: 12px;
  border: 1px dashed var(--orange-light);
}
.speak-row-label {
  font-size: 13px;
  color: var(--gray);
  font-weight: 500;
  margin-right: 4px;
}

/* 大型发声按钮 - 用于标题旁 */
.speak-btn-lg {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  background: linear-gradient(135deg, var(--orange), var(--coral));
  color: var(--white) !important;
  border: none;
  border-radius: 24px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 3px 12px rgba(255, 140, 66, 0.3);
  vertical-align: middle;
  white-space: nowrap;
  user-select: none;
  -webkit-user-select: none;
}
.speak-btn-lg:hover {
  transform: scale(1.06);
  box-shadow: 0 5px 18px rgba(255, 140, 66, 0.45);
}
.speak-btn-lg:active {
  transform: scale(0.97);
}
.speak-btn-lg.speaking {
  animation: pulseSpeak 0.6s ease-in-out infinite alternate;
}

/* 四声调发声按钮组 */
.tone-speak-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 16px 0;
}
.tone-speak-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border: none;
  border-radius: 16px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--dark);
}
.tone-speak-btn.tone-1 { background: linear-gradient(135deg, #FFD166, #FFE199); }
.tone-speak-btn.tone-2 { background: linear-gradient(135deg, #7FD8BE, #A8E5D2); }
.tone-speak-btn.tone-3 { background: linear-gradient(135deg, #B5A5D8, #C9BDE8); }
.tone-speak-btn.tone-4 { background: linear-gradient(135deg, #FF8C42, #FFB07A); color: white; }
.tone-speak-btn:hover { transform: scale(1.08); box-shadow: 0 4px 14px rgba(0,0,0,0.12); }
.tone-speak-btn:active { transform: scale(0.96); }
.tone-speak-btn.speaking { animation: pulseSpeak 0.6s ease-in-out infinite alternate; }

/* 拼音练习面板 */
.practice-panel {
  background: linear-gradient(135deg, rgba(255, 248, 240, 0.95), rgba(255, 209, 102, 0.12));
  border: 2px solid var(--orange-light);
  border-radius: 20px;
  padding: 24px;
  margin: 24px auto;
  max-width: 600px;
  text-align: center;
}
.practice-panel h4 {
  font-size: 18px;
  color: var(--orange-dark);
  margin-bottom: 12px;
}
.practice-panel p {
  font-size: 13px;
  color: var(--gray);
  margin-bottom: 14px;
}
.practice-input-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}
#practice-input {
  flex: 1;
  min-width: 200px;
  max-width: 320px;
  padding: 10px 16px;
  border: 2px solid var(--orange-light);
  border-radius: 14px;
  font-size: 20px;
  text-align: center;
  letter-spacing: 2px;
  background: var(--white);
  color: var(--dark);
  outline: none;
  transition: border-color 0.3s;
}
#practice-input:focus {
  border-color: var(--orange);
}
#practice-btn {
  padding: 10px 24px;
  background: linear-gradient(135deg, var(--orange), var(--coral));
  color: var(--white);
  border: none;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(255, 140, 66, 0.25);
}
#practice-btn:hover { transform: scale(1.05); box-shadow: 0 4px 14px rgba(255, 140, 66, 0.4); }
#practice-btn:active { transform: scale(0.96); }
#practice-hint {
  margin-top: 10px;
  font-size: 13px;
  color: var(--mint);
  min-height: 20px;
  font-weight: 500;
}

/* 声母韵母发声卡片 */
.sound-card {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 10px;
}
.sound-card .sound-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--orange-dark);
}
