/* ========== 全局基础 ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  user-select: none;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', sans-serif;
  background: linear-gradient(135deg, #E8F6FF 0%, #FFF5E6 50%, #F0E6FF 100%);
}

.hidden { display: none !important; }

/* ========== 屏幕切换 ========== */
.screen {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  display: none;
  flex-direction: column;
  animation: fadeIn 0.3s ease;
}
.screen.active {
  display: flex;
}
@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

/* ========== 锁定屏幕 ========== */
.lock-screen {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.lock-content { text-align: center; }
.lock-icon { font-size: 120px; animation: float 3s ease-in-out infinite; }
.lock-text { font-size: 42px; color: #FFE66D; margin-top: 20px; font-weight: bold; }
.lock-sub { font-size: 28px; color: #aaa; margin-top: 12px; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

/* ========== 加载动画 ========== */
.loading-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(255,255,255,0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 8000;
}
.loading-stars {
  display: flex;
  gap: 20px;
}
.loading-stars span {
  font-size: 48px;
  animation: bounce 0.6s ease-in-out infinite;
}
.loading-stars span:nth-child(2) { animation-delay: 0.2s; }
.loading-stars span:nth-child(3) { animation-delay: 0.4s; }
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-30px); }
}

/* ========== 成功反馈动画 ========== */
.success-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(255,255,255,0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 7000;
  pointer-events: none;
}
.success-stars {
  position: relative;
  width: 300px;
  height: 200px;
}
.star-fall {
  position: absolute;
  font-size: 56px;
  animation: starFall 1.2s ease-out forwards;
}
.star-fall.delay1 { animation-delay: 0.15s; left: 60px; }
.star-fall.delay2 { animation-delay: 0.3s; left: 120px; }
.star-fall.delay3 { animation-delay: 0.45s; left: 180px; }
.star-fall.delay4 { animation-delay: 0.6s; left: 240px; }
@keyframes starFall {
  0% { top: -60px; opacity: 0; transform: scale(0.3) rotate(0deg); }
  50% { opacity: 1; transform: scale(1.3) rotate(180deg); }
  100% { top: 160px; opacity: 0; transform: scale(0.8) rotate(360deg); }
}
.success-text {
  font-size: 52px;
  color: #FF6B6B;
  font-weight: bold;
  animation: popIn 0.5s ease 0.3s both;
}
@keyframes popIn {
  0% { transform: scale(0); opacity: 0; }
  70% { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}

/* ========== 首页：工作台桌面 ========== */
#screenHome {
  padding: 16px;
  overflow: hidden;
}

/* 宠物区 */
.pet-area {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 12px 20px;
  background: rgba(255,255,255,0.7);
  border-radius: 24px;
  margin-bottom: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}
.pet-container {
  display: flex;
  align-items: center;
  gap: 12px;
}
.pet-character {
  font-size: 64px;
  animation: float 3s ease-in-out infinite;
  cursor: pointer;
  transition: transform 0.2s;
}
.pet-character:active { transform: scale(1.2); }
.pet-name {
  font-size: 22px;
  color: #666;
  font-weight: bold;
}
.pet-stars {
  display: flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #FFE66D, #FFA726);
  padding: 8px 18px;
  border-radius: 20px;
  box-shadow: 0 2px 10px rgba(255,167,38,0.3);
}
.star-icon { font-size: 28px; }
.star-count {
  font-size: 26px;
  font-weight: bold;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.pet-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}
.feed-btn {
  font-size: 44px;
  transition: transform 0.2s;
}
.feed-btn:active { transform: scale(1.3) rotate(-10deg); }
.feed-label {
  font-size: 14px;
  color: #999;
}

/* 分页滑动系统 */
.pager {
  flex: 1;
  overflow: hidden;
  position: relative;
  width: 100%;
}
.pager-track {
  display: flex;
  height: calc(100% - 36px);
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  touch-action: pan-y;
}
.pager-page {
  min-width: 100%;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 14px;
  padding: 0 16px;
  align-content: center;
}
.page-dots {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 8px 0;
}
.dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(0,0,0,0.15);
  cursor: pointer;
  transition: all 0.3s;
}
.dot.active {
  background: #FF6B6B;
  transform: scale(1.3);
}
.tool-card {
  background: #fff;
  border-radius: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 6px 24px rgba(0,0,0,0.08);
  border: 3px solid transparent;
  min-height: 140px;
  position: relative;
  overflow: hidden;
}
.tool-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: linear-gradient(135deg, rgba(255,255,255,0) 60%, rgba(255,255,255,0.4));
  pointer-events: none;
}
.tool-card:active {
  transform: scale(0.95);
  border-color: #FFE66D;
  box-shadow: 0 2px 12px rgba(255,230,109,0.4);
}
.tool-card[data-module="drawing"] { background: linear-gradient(135deg, #FFF0F0, #FFE0E0); }
.tool-card[data-module="puzzle"] { background: linear-gradient(135deg, #F0F8FF, #E0F0FF); }
.tool-card[data-module="tasks"] { background: linear-gradient(135deg, #F0FFF0, #E0FFE8); }
.tool-card[data-module="gallery"] { background: linear-gradient(135deg, #FFF8F0, #FFF0E0); }
.tool-card[data-module="stickers"] { background: linear-gradient(135deg, #FFF0FF, #FFE0FF); }
.tool-card[data-module="colorbook"] { background: linear-gradient(135deg, #FFFFF0, #FFFFE0); }
.tool-card[data-module="pentraining"] { background: linear-gradient(135deg, #F0FFFF, #E0FFFF); }
.tool-card[data-module="shapematch"] { background: linear-gradient(135deg, #F8F0FF, #F0E0FF); }
.tool-card[data-module="flashcards"] { background: linear-gradient(135deg, #FFF5F0, #FFE8E0); }
.tool-card[data-module="instruments"] { background: linear-gradient(135deg, #F0FFF5, #E0FFE8); }
.tool-card[data-module="findit"] { background: linear-gradient(135deg, #F5F0FF, #E8E0FF); }
.tool-card[data-module="storybook"] { background: linear-gradient(135deg, #FFFBF0, #FFF5E0); }
.card-icon {
  font-size: 72px;
  line-height: 1;
}
.card-label {
  font-size: 22px;
  font-weight: bold;
  color: #555;
}
.tool-card.disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* 家长入口 */
.parent-entry {
  position: fixed;
  bottom: 16px;
  right: 16px;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.3;
  cursor: pointer;
  border-radius: 50%;
  transition: opacity 0.3s;
}
.parent-entry:hover { opacity: 0.6; }
.parent-icon { font-size: 28px; }

/* ========== 模块通用头部 ========== */
.module-header {
  padding: 12px 20px;
  background: rgba(255,255,255,0.8);
  border-radius: 0 0 20px 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}
.module-title {
  font-size: 28px;
  font-weight: bold;
  color: #444;
}

/* 回家按钮 */
.home-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #FF6B6B, #FF8E8E);
  font-size: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(255,107,107,0.4);
  transition: all 0.2s;
  z-index: 100;
}
.home-btn:active {
  transform: scale(0.9);
  box-shadow: 0 2px 10px rgba(255,107,107,0.3);
}

/* ========== 涂鸦画板 ========== */
.drawing-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  overflow: hidden;
}
#drawingCanvas {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  touch-action: none;
  max-width: 100%;
  max-height: 100%;
}
.drawing-toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 12px 16px;
  background: rgba(255,255,255,0.9);
  border-radius: 20px 20px 0 0;
  flex-wrap: wrap;
}
.color-picker {
  display: flex;
  gap: 8px;
}
.color-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 3px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.color-btn.active {
  border-color: #333;
  transform: scale(1.15);
}
.color-btn:active { transform: scale(0.9); }

.brush-sizes {
  display: flex;
  gap: 8px;
  align-items: center;
}
.brush-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid #ddd;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}
.brush-btn.active { border-color: #FF6B6B; background: #FFF0F0; }
.brush-dot {
  border-radius: 50%;
  background: #333;
}
.brush-dot.small { width: 8px; height: 8px; }
.brush-dot.medium { width: 16px; height: 16px; }
.brush-dot.large { width: 26px; height: 26px; }

.tool-actions {
  display: flex;
  gap: 8px;
}
.action-btn {
  padding: 10px 18px;
  border-radius: 16px;
  border: none;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 4px;
}
.action-btn:active { transform: scale(0.95); }
.eraser-btn { background: #FFE0E0; color: #D32F2F; }
.eraser-btn.active { background: #D32F2F; color: #fff; }
.clear-btn { background: #E0E0E0; color: #555; }
.save-btn { background: linear-gradient(135deg, #4ECDC4, #44B8A8); color: #fff; }

/* ========== 拼图乐园 ========== */
.puzzle-difficulty {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 12px;
}
.diff-btn {
  padding: 12px 28px;
  border-radius: 20px;
  border: 3px solid #ddd;
  background: #fff;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s;
}
.diff-btn.active {
  border-color: #4ECDC4;
  background: #E0FFF8;
  color: #00897B;
}
.diff-btn:active { transform: scale(0.95); }

.puzzle-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 12px;
  overflow-y: auto;
}
.puzzle-board {
  display: grid;
  gap: 2px;
  background: #ddd;
  border-radius: 12px;
  padding: 2px;
  justify-content: center;
}
.puzzle-board .puzzle-slot {
  background: #f5f5f5;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: outline 0.2s;
}
.puzzle-board .puzzle-slot.filled {
  opacity: 1 !important;
  outline: 3px solid #4CAF50 !important;
  outline-offset: -3px;
}
.puzzle-pieces {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  padding: 8px;
}
.puzzle-piece {
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  transition: transform 0.15s, box-shadow 0.15s;
  touch-action: none;
}
.puzzle-piece:active { cursor: grabbing; transform: scale(1.08); box-shadow: 0 8px 24px rgba(0,0,0,0.3); }
.puzzle-piece.placed {
  display: none;
}

/* ========== 今日任务 ========== */
.tasks-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
  overflow-y: auto;
}
.task-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 24px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
  cursor: pointer;
  transition: all 0.2s;
  border: 3px solid transparent;
}
.task-card:active {
  transform: scale(0.98);
  border-color: #FFE66D;
}
.task-card.completed {
  background: #E8F5E9;
  border-color: #81C784;
}
.task-icon { font-size: 52px; }
.task-info { flex: 1; }
.task-name {
  font-size: 22px;
  font-weight: bold;
  color: #444;
}
.task-status {
  font-size: 16px;
  color: #999;
  margin-top: 4px;
}
.task-check {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 3px solid #ddd;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  transition: all 0.2s;
}
.task-card.completed .task-check {
  background: #66BB6A;
  border-color: #66BB6A;
  color: #fff;
}
.no-tasks {
  text-align: center;
  padding: 60px 20px;
  font-size: 24px;
  color: #bbb;
}

/* ========== 作品相册 ========== */
.gallery-container {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
  padding: 20px;
  overflow-y: auto;
  align-content: start;
}
.gallery-item {
  aspect-ratio: 1;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  transition: all 0.2s;
  background: #fff;
}
.gallery-item:active { transform: scale(0.95); }
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gallery-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  font-size: 24px;
  color: #bbb;
}

/* ========== 家长后台 ========== */
.parent-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}
.parent-title {
  font-size: 24px;
  font-weight: bold;
  color: #444;
}
.back-btn {
  padding: 10px 20px;
  border-radius: 12px;
  border: none;
  background: #F0F0F0;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.2s;
}
.back-btn:active { background: #E0E0E0; }

.parent-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}
.parent-section {
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}
.section-title {
  font-size: 20px;
  font-weight: bold;
  color: #444;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid #F0F0F0;
}
.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid #F8F8F8;
}
.setting-row label {
  font-size: 17px;
  color: #555;
}
.time-control {
  display: flex;
  align-items: center;
  gap: 12px;
}
.time-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid #4ECDC4;
  background: #fff;
  font-size: 24px;
  color: #4ECDC4;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.time-btn:active { background: #E0FFF8; }
.time-value {
  font-size: 28px;
  font-weight: bold;
  color: #4ECDC4;
  min-width: 50px;
  text-align: center;
}
.time-display {
  font-size: 20px;
  font-weight: bold;
  color: #FF6B6B;
}

/* 任务编辑器 */
.task-editor { }
.task-list { margin-bottom: 12px; }
.editor-task-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid #F0F0F0;
}
.editor-task-item span { font-size: 18px; }
.remove-task-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: #FFE0E0;
  color: #D32F2F;
  font-size: 18px;
  cursor: pointer;
}
.add-task-area {
  display: flex;
  gap: 12px;
  align-items: center;
}
.task-type-select {
  flex: 1;
  padding: 10px 16px;
  border-radius: 12px;
  border: 2px solid #E0E0E0;
  font-size: 17px;
  background: #fff;
}
.add-task-btn {
  padding: 10px 20px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #4ECDC4, #44B8A8);
  color: #fff;
  font-size: 17px;
  font-weight: bold;
  cursor: pointer;
  white-space: nowrap;
}
.add-task-btn:active { transform: scale(0.95); }

/* 开关 */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid #F8F8F8;
  font-size: 18px;
}
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 56px;
  height: 30px;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background: #ccc;
  border-radius: 30px;
  transition: 0.3s;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  height: 24px;
  width: 24px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: 0.3s;
}
.toggle-switch input:checked + .toggle-slider { background: #4ECDC4; }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(26px); }

.reset-btn {
  padding: 8px 20px;
  border-radius: 10px;
  border: 2px solid #FF6B6B;
  background: #fff;
  color: #FF6B6B;
  font-size: 16px;
  cursor: pointer;
}
.reset-btn:active { background: #FFF0F0; }

/* 记录列表 */
.record-list { }
.record-item {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid #F8F8F8;
  font-size: 16px;
  color: #666;
}
.empty-record {
  text-align: center;
  padding: 20px;
  color: #bbb;
  font-size: 17px;
}

/* ========== 弹窗 ========== */
.modal-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 6000;
}
.modal-content {
  background: #fff;
  border-radius: 20px;
  padding: 20px;
  max-width: 90%;
  max-height: 90%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.artwork-preview {
  max-width: 100%;
  max-height: 60vh;
  border-radius: 12px;
}
.modal-actions {
  display: flex;
  gap: 12px;
}
.modal-btn {
  padding: 12px 24px;
  border-radius: 14px;
  border: none;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s;
}
.modal-btn:active { transform: scale(0.95); }
.download-btn { background: linear-gradient(135deg, #4ECDC4, #44B8A8); color: #fff; }
.close-modal-btn { background: #F0F0F0; color: #555; }

/* ========== 横屏适配 ========== */
@media (orientation: landscape) {
  .pager-page {
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: 1fr;
    max-width: none;
  }
  .card-icon { font-size: 48px; }
  .card-label { font-size: 16px; }
  .tool-card { min-height: 110px; }
  .pet-area { padding: 8px 20px; margin-bottom: 8px; }
  .pet-character { font-size: 48px; }
  .puzzle-container { flex-direction: column; gap: 16px; }
}

@media (orientation: portrait) {
  .pager-page {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
  }
  .puzzle-container {
    flex-direction: column;
    gap: 12px;
    padding: 8px;
  }
}

/* 小屏幕手机适配 */
@media (max-height: 500px) and (orientation: landscape) {
  .pet-area { padding: 6px 12px; margin-bottom: 6px; }
  .pet-character { font-size: 36px; }
  .card-icon { font-size: 36px; }
  .card-label { font-size: 14px; }
  .tool-card { min-height: 80px; border-radius: 16px; gap: 6px; }
  .home-btn { width: 56px; height: 56px; font-size: 28px; bottom: 10px; right: 10px; }
  .pager-page { gap: 10px; padding: 0 10px; }
}

/* ========== 拖拽时的样式 ========== */
.dragging {
  opacity: 0.8;
  z-index: 1000;
  transform: scale(1.1);
}
.drag-over {
  background: rgba(102,187,106,0.3) !important;
  border-color: #66BB6A !important;
}

/* ========== 创意贴纸屋 ========== */
.sticker-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 8px;
  gap: 8px;
  overflow: hidden;
}
#stickerCanvas {
  flex: 1;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}
.sticker-palette {
  display: flex;
  gap: 8px;
  padding: 8px;
  background: rgba(255,255,255,0.9);
  border-radius: 16px;
  overflow-x: auto;
  flex-wrap: wrap;
  justify-content: center;
}
.sticker-item {
  font-size: 40px;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: all 0.2s;
}
.sticker-item:active { transform: scale(1.2); }
.sticker-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 8px;
}
.placed-sticker {
  position: absolute;
  font-size: 40px;
  cursor: grab;
  touch-action: none;
  transition: transform 0.1s;
}
.placed-sticker:active { cursor: grabbing; }

/* ========== 涂色本 ========== */
.colorbook-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 8px;
  gap: 8px;
  overflow: hidden;
}
.template-picker, .pen-picker, .flash-category {
  display: flex;
  gap: 8px;
  padding: 6px 8px;
  overflow-x: auto;
  justify-content: center;
}
.template-btn, .pen-btn, .flash-cat-btn {
  padding: 8px 16px;
  border-radius: 14px;
  border: 2px solid #ddd;
  background: #fff;
  font-size: 18px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}
.template-btn.active, .pen-btn.active, .flash-cat-btn.active {
  border-color: #4ECDC4;
  background: #E0FFF8;
}
#colorbookCanvas {
  flex: 1;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}
.color-palette {
  display: flex;
  gap: 8px;
  padding: 8px;
  background: rgba(255,255,255,0.9);
  border-radius: 16px;
  justify-content: center;
  flex-wrap: wrap;
}
.color-fill-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 3px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.color-fill-btn.active { border-color: #333; transform: scale(1.15); }

/* ========== 控笔小训练 ========== */
.pen-picker {
  padding: 6px 8px;
}
.pen-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
}
#penCanvas {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
  touch-action: none;
}

/* ========== 图形配对 ========== */
.shape-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 16px;
}
.shape-targets {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}
.shape-target {
  width: 100px;
  height: 100px;
  border-radius: 16px;
  border: 3px dashed #ccc;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  background: rgba(255,255,255,0.5);
  transition: all 0.2s;
}
.shape-target.filled {
  border-style: solid;
  border-color: #66BB6A;
  background: rgba(102,187,106,0.15);
}
.shape-draggables {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}
.shape-drag {
  width: 90px;
  height: 90px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  cursor: grab;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transition: all 0.2s;
  touch-action: none;
}
.shape-drag:active { cursor: grabbing; transform: scale(1.1); }
.shape-drag.placed { opacity: 0.3; pointer-events: none; }

/* ========== 万物识物卡 ========== */
.flash-container {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 12px;
  overflow-y: auto;
  align-content: start;
}
.flash-card {
  aspect-ratio: 1;
  background: #fff;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  transition: all 0.2s;
  border: 3px solid transparent;
}
.flash-card:active {
  transform: scale(0.95);
  border-color: #FFE66D;
}
.flash-card .flash-emoji { font-size: 56px; }
.flash-card .flash-name { font-size: 18px; color: #555; font-weight: bold; }
.flash-card.playing {
  border-color: #FF6B6B;
  background: #FFF5F5;
  animation: pulse 0.5s ease;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* ========== 即将开放占位 ========== */
.coming-soon {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: #bbb;
}

/* ========== 手指乐器台 ========== */
.instruments-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ========== 找一找 ========== */
.findit-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ========== 有声绘本屋 ========== */
.storybook-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
