/* === 童言道 Design System === */
:root {
  --bg: #f8f7f4;
  --surface: #ffffff;
  --text: #2c2c2a;
  --text-secondary: #888780;
  --text-tertiary: #b4b2a9;
  --border: #e5e3da;
  --accent: #534AB7;
  --accent-light: #EEEDFE;
  --success: #1D9E75;
  --success-light: #E1F5EE;
  --warning: #EF9F27;
  --warning-light: #FAEEDA;
  --danger: #E24B4A;
  --danger-light: #FCEBEB;
  --info: #378ADD;
  --info-light: #E6F1FB;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  min-height: 100vh;
}

/* === Layout === */
.app-container {
  max-width: 480px;
  margin: 0 auto;
  padding: 16px;
  padding-bottom: 80px;
}

/* === Header === */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  margin-bottom: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}

.logo-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--accent);
  font-weight: 500;
}

.logo-text {
  font-size: 18px;
  font-weight: 500;
}

/* === Navigation === */
.nav-links {
  display: flex;
  gap: 16px;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 14px;
  transition: color 0.15s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  font-weight: 500;
}

/* === Cards === */
.card {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
}

.card-accent {
  border: 2px solid var(--accent);
}

.card-flat {
  background: var(--bg);
  border: none;
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 12px;
}

/* === Daily Plan Card === */
.daily-plan {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.daily-plan-label {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.daily-plan-text {
  font-size: 18px;
  font-weight: 500;
}

.daily-plan-badge {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 3px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 500;
  color: var(--accent);
  flex-shrink: 0;
}

/* === Quick Actions === */
.quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.action-btn {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s, background 0.15s;
  display: block;
}

.action-btn:hover {
  border-color: var(--accent);
  background: var(--accent-light);
}

.action-btn-title {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 2px;
}

.action-btn-desc {
  font-size: 12px;
  color: var(--text-secondary);
}

/* === Poem List Items === */
.poem-item {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: border-color 0.15s;
}

.poem-item:hover {
  border-color: var(--accent);
}

.poem-item.new {
  border-color: var(--accent);
}

.poem-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.poem-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.poem-icon.review { background: var(--warning-light); }
.poem-icon.new-poem { background: var(--success-light); }
.poem-icon.done { background: var(--info-light); }

.poem-title {
  font-size: 14px;
  font-weight: 500;
}

.poem-meta {
  font-size: 12px;
  color: var(--text-secondary);
}

.poem-tag {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 500;
}

.tag-review { color: var(--warning); background: var(--warning-light); }
.tag-new { color: var(--accent); background: var(--accent-light); }
.tag-done { color: var(--success); background: var(--success-light); }

/* === Badge Grid === */
.badge-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}

.badge-item {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 8px;
  text-align: center;
}

.badge-item.locked { opacity: 0.4; }

.badge-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin: 0 auto 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.badge-icon.common { background: var(--info-light); color: var(--info); }
.badge-icon.rare { background: var(--warning-light); color: var(--warning); }
.badge-icon.legendary { background: var(--accent-light); color: var(--accent); }

.badge-name {
  font-size: 11px;
}

/* === Stats Row === */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}

.stat-card {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 14px 10px;
  text-align: center;
}

.stat-value {
  font-size: 22px;
  font-weight: 500;
}

.stat-label {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* === Section Title === */
.section-title {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 10px;
  color: var(--text);
}

/* === Poem Library === */
.grade-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.grade-tab {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  border: 0.5px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}

.grade-tab:hover { border-color: var(--accent); }
.grade-tab.active { background: var(--accent); color: white; border-color: var(--accent); }

.poem-list-item {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s;
}

.poem-list-item:hover { border-color: var(--accent); }

.poem-list-left { display: flex; align-items: center; gap: 12px; }

.difficulty-dots {
  display: flex;
  gap: 3px;
  margin-top: 2px;
}

.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--text-tertiary); }
.dot.filled { background: var(--warning); }

.rarity-badge-sm {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
}

.rarity-badge-sm.common { background: var(--info-light); color: var(--info); }
.rarity-badge-sm.rare { background: var(--warning-light); color: var(--warning); }
.rarity-badge-sm.legendary { background: var(--accent-light); color: var(--accent); }

/* === Recitation Page === */
.recite-container {
  max-width: 480px;
  margin: 0 auto;
  padding: 16px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.recite-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.back-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 0.5px solid var(--border);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  text-decoration: none;
  color: var(--text);
}

.recite-poem-title {
  font-size: 20px;
  font-weight: 500;
}

.poem-display {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  margin-bottom: 24px;
  flex: 1;
}

.poem-line {
  font-size: 22px;
  font-family: "STKaiti", "KaiTi", "楷体", serif;
  line-height: 2;
  letter-spacing: 2px;
  transition: all 0.3s;
}

.poem-line.correct { color: var(--success); }
.poem-line.wrong { color: var(--danger); text-decoration: underline; text-decoration-color: var(--danger); }
.poem-line.active { color: var(--accent); font-weight: 500; }
.poem-line.pending { color: var(--text-tertiary); }

.record-area {
  text-align: center;
  margin-bottom: 24px;
}

.record-btn {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  font-size: 28px;
  transition: all 0.2s;
  position: relative;
}

.record-btn.idle {
  background: var(--accent);
  color: white;
}

.record-btn.recording {
  background: var(--danger);
  color: white;
  animation: pulse 1.2s ease-in-out infinite;
}

.record-btn.processing {
  background: var(--text-tertiary);
  color: white;
  pointer-events: none;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.record-hint {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 10px;
}

/* === Result Panel === */
.result-panel {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-top: 16px;
}

.result-score {
  font-size: 36px;
  font-weight: 500;
  text-align: center;
  margin-bottom: 8px;
}

.result-detail {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}

.result-metric {
  text-align: center;
  padding: 8px;
}

.metric-value { font-size: 18px; font-weight: 500; }
.metric-label { font-size: 12px; color: var(--text-secondary); }

.badge-unlock {
  text-align: center;
  padding: 16px;
  background: var(--accent-light);
  border-radius: var(--radius);
  animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* === 3D Badge Medal System === */
.badge-medal-3d {
  width: 120px;
  height: 120px;
  margin: 0 auto 16px;
  position: relative;
  transform-style: preserve-3d;
  perspective: 600px;
  animation: medalFloat 3s ease-in-out infinite;
}

.badge-medal-3d.sm {
  width: 60px;
  height: 60px;
}

.badge-medal-3d.lg {
  width: 160px;
  height: 160px;
}

@keyframes medalFloat {
  0%, 100% { transform: translateY(0) rotateX(12deg) rotateY(0deg); }
  50% { transform: translateY(-6px) rotateX(12deg) rotateY(5deg); }
}

.medal-outer-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 6px solid transparent;
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    conic-gradient(from 0deg, #f6e27a, #cb9b51, #f6e27a, #b48811, #f6e27a) border-box;
  box-shadow:
    inset 0 0 14px rgba(196, 164, 84, 0.35),
    0 10px 24px rgba(0,0,0,0.18),
    0 4px 8px rgba(0,0,0,0.12);
}

.badge-medal-3d[data-rarity="rare"] .medal-outer-ring {
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    conic-gradient(from 0deg, #d4d4d4, #9ea7b0, #f5f5f5, #7a8699, #d4d4d4) border-box;
  box-shadow:
    inset 0 0 14px rgba(140, 150, 165, 0.35),
    0 10px 24px rgba(0,0,0,0.18),
    0 4px 8px rgba(0,0,0,0.12);
}

.badge-medal-3d[data-rarity="legendary"] .medal-outer-ring {
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    conic-gradient(from 0deg, #ffd700, #ffaa00, #fff5b0, #ff8800, #ffd700) border-box;
  box-shadow:
    inset 0 0 18px rgba(255, 170, 0, 0.5),
    0 12px 30px rgba(255, 170, 0, 0.25),
    0 4px 10px rgba(0,0,0,0.18);
}

.medal-inner-disk {
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,0.9), rgba(255,255,255,0) 40%),
              radial-gradient(circle at 50% 50%, #faf9f6 0%, #f0efe9 55%, #e4e2d8 100%);
  box-shadow:
    inset 0 4px 12px rgba(255,255,255,0.8),
    inset 0 -6px 14px rgba(0,0,0,0.08),
    0 3px 6px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.badge-medal-3d[data-rarity="common"] .medal-inner-disk {
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,0.9), rgba(255,255,255,0) 40%),
              radial-gradient(circle at 50% 50%, #f4f9ff 0%, #e6f1fb 55%, #d2e6f7 100%);
}

.badge-medal-3d[data-rarity="rare"] .medal-inner-disk {
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,0.9), rgba(255,255,255,0) 40%),
              radial-gradient(circle at 50% 50%, #fffbf4 0%, #faeeda 55%, #f2dec0 100%);
}

.badge-medal-3d[data-rarity="legendary"] .medal-inner-disk {
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,0.95), rgba(255,255,255,0) 45%),
              radial-gradient(circle at 50% 50%, #fffbe8 0%, #fff2c2 55%, #ffe69b 100%);
}

.medal-center-element {
  font-size: 52px;
  line-height: 1;
  filter: drop-shadow(0 3px 5px rgba(0,0,0,0.18));
  transform: translateZ(16px);
  z-index: 3;
}

.badge-medal-3d.sm .medal-center-element { font-size: 28px; transform: translateZ(8px); }
.badge-medal-3d.lg .medal-center-element { font-size: 72px; transform: translateZ(24px); }

.medal-orbit {
  position: absolute;
  font-size: 22px;
  line-height: 1;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,0.15));
  transform: translateZ(10px);
  z-index: 4;
}

.badge-medal-3d.sm .medal-orbit { font-size: 12px; transform: translateZ(6px); }
.badge-medal-3d.lg .medal-orbit { font-size: 30px; transform: translateZ(14px); }

.medal-orbit:nth-child(2) { top: 8%; left: 50%; transform: translateX(-50%) translateZ(10px); }
.medal-orbit:nth-child(3) { bottom: 12%; left: 12%; transform: translateZ(10px); }
.medal-orbit:nth-child(4) { bottom: 12%; right: 12%; transform: translateZ(10px); }
.medal-orbit:nth-child(5) { top: 42%; left: 6%; transform: translateZ(10px); }
.medal-orbit:nth-child(6) { top: 42%; right: 6%; transform: translateZ(10px); }

.medal-shine {
  position: absolute;
  top: 12%;
  left: 18%;
  width: 28%;
  height: 18%;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0) 70%);
  pointer-events: none;
  transform: translateZ(22px);
}

.badge-medal-3d.locked .medal-outer-ring {
  filter: grayscale(100%);
  opacity: 0.6;
}
.badge-medal-3d.locked .medal-inner-disk {
  filter: grayscale(100%);
  opacity: 0.7;
}

/* === Badge Element Assembly Animation === */
.badge-anim-stage {
  position: relative;
  width: 200px;
  height: 200px;
  margin: 0 auto 20px;
}

.assembly-particle {
  position: absolute;
  font-size: 34px;
  line-height: 1;
  filter: drop-shadow(0 3px 5px rgba(0,0,0,0.2));
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  z-index: 10;
}

.assembly-particle.animate {
  animation: particleAssemble 1.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes particleAssemble {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.2) rotate(-45deg);
  }
  20% {
    opacity: 1;
    transform: translate(var(--fly-x), var(--fly-y)) scale(1.1) rotate(15deg);
  }
  60% {
    opacity: 1;
    transform: translate(calc(var(--target-x) * 0.7), calc(var(--target-y) * 0.7)) scale(1.0) rotate(0deg);
  }
  100% {
    opacity: 1;
    transform: translate(var(--target-x), var(--target-y)) scale(0.85) rotate(0deg);
  }
}

.badge-anim-stage .badge-medal-3d {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0) rotateX(12deg);
  animation: medalAssemble 0.8s 1.0s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

@keyframes medalAssemble {
  0% { transform: translate(-50%, -50%) scale(0) rotateX(12deg); opacity: 0; }
  60% { transform: translate(-50%, -50%) scale(1.15) rotateX(12deg); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1) rotateX(12deg); opacity: 1; }
}

.badge-anim-stage .badge-medal-3d.assembled {
  animation: medalGlowPulse 1.8s ease-in-out infinite;
}

@keyframes medalGlowPulse {
  0%, 100% { filter: drop-shadow(0 0 0 rgba(83,74,183,0)); }
  50% { filter: drop-shadow(0 0 24px rgba(83,74,183,0.35)); }
}

/* === Badge Animation Overlay === */
.badge-animation-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.7);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: overlayIn 0.3s ease;
}
@keyframes overlayIn { from { opacity: 0; } to { opacity: 1; } }

.badge-animation-container {
  background: var(--surface);
  border-radius: 20px;
  padding: 36px 32px;
  text-align: center;
  max-width: 320px;
  width: 90%;
  animation: badgeBounceIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  position: relative;
}
@keyframes badgeBounceIn {
  0% { transform: scale(0.3); opacity: 0; }
  50% { transform: scale(1.08); }
  70% { transform: scale(0.95); }
  100% { transform: scale(1); opacity: 1; }
}

.badge-anim-icon {
  width: 80px; height: 80px;
  border-radius: 50%;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  position: relative;
  animation: badgeIconGlow 1.5s ease-in-out infinite;
}
@keyframes badgeIconGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(83,74,183,0.4); }
  50% { box-shadow: 0 0 20px 8px rgba(83,74,183,0.2); }
}

.badge-elements-anim {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}

.element-float {
  position: absolute;
  animation: elementFly 2s ease-in-out infinite;
}
.element-float:nth-child(1) { animation-delay: 0s; }
.element-float:nth-child(2) { animation-delay: 0.4s; }
.element-float:nth-child(3) { animation-delay: 0.8s; }
@keyframes elementFly {
  0%, 100% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
  25% { transform: translate(calc(-50% + 60px), calc(-50% - 35px)) scale(1.3); opacity: 1; }
  100% { transform: translate(calc(-50% + 90px), calc(-50% + 25px)) scale(0); opacity: 0; }
}

.badge-anim-title {
  font-size: 18px; font-weight: 500;
  margin-bottom: 8px;
  animation: slideUp 0.5s 0.3s ease both;
}
.badge-anim-name {
  font-size: 15px; font-weight: 500;
  margin-bottom: 6px; color: var(--text);
  animation: slideUp 0.5s 0.5s ease both;
}
.badge-anim-poem {
  font-size: 13px; color: var(--text-secondary);
  margin-bottom: 16px;
  animation: slideUp 0.5s 0.7s ease both;
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.badge-anim-close {
  position: absolute;
  top: 12px; right: 12px;
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 0.5px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
}
.badge-anim-replay {
  padding: 8px 20px;
  border-radius: 20px;
  border: 0.5px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  font-size: 13px;
  color: var(--accent);
  transition: all 0.15s;
  animation: slideUp 0.5s 0.9s ease both;
}
.badge-anim-replay:hover {
  border-color: var(--accent);
  background: var(--accent-light);
}

/* === Audio Player (Card) === */
.audio-player-bar {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}
.audio-play-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: white;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.15s;
}
.audio-play-btn:hover { transform: scale(1.08); }
.audio-play-btn.playing { background: var(--danger); }
.audio-progress-wrap { flex: 1; min-width: 0; }
.audio-label { font-size: 12px; color: var(--text-secondary); margin-bottom: 4px; }
.audio-progress-bar {
  width: 100%; height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  cursor: pointer;
}
.audio-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.1s linear;
  width: 0%;
}
.audio-time { font-size: 11px; color: var(--text-tertiary); white-space: nowrap; }

/* === Card Share Page === */
.card-preview {
  max-width: 360px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 0.5px solid var(--border);
}

.card-image {
  width: 100%;
  aspect-ratio: 3 / 3.5;
  object-fit: cover;
  display: block;
}

.card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px;
  background: linear-gradient(transparent, rgba(0,0,0,0.6));
  color: white;
}

.card-poem-text {
  font-size: 18px;
  font-family: "STKaiti", "KaiTi", serif;
  line-height: 1.8;
  margin-bottom: 8px;
}

.card-meta {
  font-size: 12px;
  opacity: 0.8;
}

.share-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}

.share-btn {
  padding: 12px;
  border-radius: var(--radius);
  border: 0.5px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  font-size: 14px;
  text-align: center;
  transition: all 0.15s;
}

.share-btn:hover { border-color: var(--accent); }
.share-btn.primary { background: var(--accent); color: white; border-color: var(--accent); }

/* === Badge Wall Page === */
.badge-section { margin-bottom: 20px; }

.badge-section-title {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.badge-count { font-size: 12px; color: var(--text-secondary); font-weight: 400; }

.badge-card {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 12px;
  text-align: center;
  transition: transform 0.15s;
  cursor: pointer;
}

.badge-card:hover { transform: scale(1.03); }
.badge-card.locked { opacity: 0.35; cursor: default; }
.badge-card.locked:hover { transform: none; }

.badge-img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  margin: 0 auto 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.badge-poem { font-size: 12px; font-weight: 500; }
.badge-grade { font-size: 11px; color: var(--text-secondary); }

/* === Empty State === */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-secondary);
}

.empty-state-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

/* === Loading === */
.loading {
  text-align: center;
  padding: 24px;
  color: var(--text-secondary);
}

.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin: 0 auto 10px;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* === Toast === */
.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: white;
  padding: 10px 24px;
  border-radius: 20px;
  font-size: 14px;
  z-index: 1000;
  animation: fadeInDown 0.3s ease, fadeOut 0.3s ease 2s forwards;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateX(-50%) translateY(-10px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

/* === Bottom Nav (Mobile) === */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background: var(--surface);
  border-top: 0.5px solid var(--border);
  display: flex;
  justify-content: space-around;
  padding: 8px 0;
  z-index: 100;
}

.bottom-nav a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 11px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.bottom-nav a .nav-icon { font-size: 18px; }
.bottom-nav a.active { color: var(--accent); }
