/* take picker ในหน้ารายละเอียด */
.take-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
.take-btn {
  font-family: inherit; font-size: 12.5px; padding: 5px 10px; border-radius: 8px;
  background: var(--card); color: var(--text); border: 2px solid var(--line); cursor: pointer;
}
.take-btn.current { border-color: var(--green); color: var(--green); font-weight: 700; }
.take-btn:hover { border-color: var(--accent); }
.use-take-btn { margin-left: auto; }

/* หนังสือนิทานอ่านตาม (read-along) */
.readalong {
  position: fixed; inset: 0; z-index: 85; overflow: auto;
  background: radial-gradient(700px 500px at 50% -10%, rgba(116,143,252,.25), transparent 60%), var(--bg);
  display: flex; flex-direction: column; align-items: center; padding: 20px 16px 40px;
}
.ra-head { width: min(720px, 100%); display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.ra-head h2 { margin: 0; font-size: 20px; }
.ra-scene-video { width: min(720px, 100%); border-radius: 16px; background: #000; margin-top: 14px; }
.ra-text {
  width: min(720px, 100%); background: var(--card); border: 1px solid var(--line);
  border-radius: 16px; padding: 20px 22px; margin-top: 14px; min-height: 140px;
  display: flex; flex-direction: column; justify-content: center; gap: 6px;
}
.ra-cue { font-size: 17px; line-height: 1.8; color: var(--muted); transition: all .25s ease; }
.ra-cue.active { color: var(--primary); font-size: 22px; font-weight: 700; transform: translateX(6px); }
.ra-controls { display: flex; gap: 10px; margin-top: 16px; align-items: center; flex-wrap: wrap; justify-content: center; }
.ra-controls button { font-size: 17px; padding: 12px 20px; }
.ra-dots { display: flex; gap: 8px; margin-top: 14px; }
.ra-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--card2); border: 1px solid var(--line); }
.ra-dot.done { background: var(--green); border-color: var(--green); }
.ra-dot.now { background: var(--primary); border-color: var(--primary); transform: scale(1.3); }
.ra-hint { color: var(--muted); font-size: 13px; margin-top: 12px; }

/* ธีม AI + เสียงพากย์ (chips ใช้ร่วมกับ .ai-scenes) */
#kid-voice-row { display: flex; gap: 10px; align-items: center; justify-content: center; flex-wrap: wrap; margin-top: 10px; font-size: 14px; color: var(--muted); }
.voice-chip {
  font-family: inherit; font-size: 15px; padding: 8px 16px; border-radius: 12px;
  background: var(--card2); color: var(--text); border: 2px solid var(--line); cursor: pointer;
}
.voice-chip.picked { border-color: var(--pink); color: var(--pink); font-weight: 700; }
.btn-voice-preview { padding: 6px 10px; border-radius: 8px; }

/* คลังนิทานเป็นภาพ */
.project.with-thumb { display: flex; gap: 12px; align-items: center; }
.project .proj-thumb {
  width: 104px; height: 62px; border-radius: 10px; object-fit: cover; flex-shrink: 0;
  border: 1px solid var(--line); background: #000;
}
.project .proj-body { min-width: 0; flex: 1; }

/* scene editor การ์ด (โหมดผู้ใหญ่) */
.scene-edit { background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.scene-edit .se-head { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.scene-edit .se-head b { color: var(--primary); }
.se-tools { margin-left: auto; display: flex; gap: 6px; }
.se-tools button {
  font-family: inherit; font-size: 13px; padding: 4px 9px; border-radius: 8px;
  background: var(--card); color: var(--text); border: 1px solid var(--line); cursor: pointer;
}
.se-tools button:hover { border-color: var(--accent); }
.se-tools button.danger:hover { border-color: var(--red); color: var(--red); }
.scene-edit textarea {
  width: 100%; background: var(--card); color: var(--text); border: 1px solid var(--line);
  border-radius: 8px; padding: 8px 10px; font-family: inherit; font-size: 14px; line-height: 1.6;
  resize: vertical;
}
.scene-edit .se-prompt { font-size: 12px; color: var(--muted); min-height: 34px; }
.scene-edit .se-hint { font-size: 11.5px; color: var(--muted); margin: 4px 0 0; }

/* ภาพการ์ดตัวละครจริง (เจนด้วย MiniMax แล้วแคช) */
.kid-card { position: relative; }
.kid-card .char-img {
  position: absolute; inset: 6px 6px 30px; width: calc(100% - 12px); height: calc(100% - 36px);
  object-fit: cover; border-radius: 12px; opacity: .92;
}
.kid-card.has-img .em { display: none; }
.kid-card.has-img .nm { position: relative; z-index: 1; text-shadow: 0 1px 4px rgba(0,0,0,.8); }

/* ฉบับร่าง + สถิติ */
.draft-bar {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  background: rgba(255, 209, 102, .08); border: 1px solid rgba(255, 209, 102, .35);
  border-radius: 10px; padding: 8px 14px; margin-bottom: 10px; font-size: 13.5px; color: var(--primary);
}
.stats-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.stats-table th { text-align: left; color: var(--muted); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.stats-table td { padding: 6px 8px; border-bottom: 1px solid rgba(45, 58, 104, .5); }
.stats-table tr.total td { color: var(--primary); font-weight: 700; border-top: 2px solid var(--line); }

/* ระบบจำเบราว์เซอร์: ดูต่อ + หัวใจ + ของหนู */
.resume-play { padding: 12px 16px; }
.proj-heart {
  background: none; border: none; cursor: pointer; font-size: 16px;
  padding: 3px 6px; border-radius: 8px; transition: transform .1s;
}
.proj-heart:hover { transform: scale(1.25); }
.badge.mine { color: #63e6be; border-color: rgba(99, 230, 190, .4); }
