body { font-family: system-ui, sans-serif; margin: 20px; font-size: 18px; }
table { border-collapse: collapse; width: 100%; }
th, td { border: 1px solid #ccc; padding: 8px; vertical-align: top; }
th { background: #f4f4f4; }
.char-cell { font-size: 32px; text-align: center; width: 60px; }
a { color: #0645ad; }

/* 家长设置表单（局部，仅 settings 页） */
.topback { margin: 0 0 12px; }
.topback .back-link, .back-link {
  display: inline-block;
  background: transparent;
  border: none;
  color: #1a1a1a;
  font-size: 18px;
  font-family: serif;
  text-decoration: none;
  padding: 10px 12px;
  cursor: pointer;
  text-align: left;
  min-height: 44px;
  line-height: 24px;
}
.saved-tip { color: #16a34a; font-size: 18px; margin: 4px 0 12px; }
.settings-section { border: 1px solid #e5e7eb; border-radius: 8px; padding: 14px 16px; margin: 16px 0; max-width: 560px; }
.settings-section h2 { font-size: 24px; margin: 0 0 12px; }
.settings-form { max-width: 560px; }
.settings-row { margin: 12px 0; }
.settings-row label { display: inline-block; width: 96px; color: #333; font-size: 20px; vertical-align: middle; }
.settings-row input, .settings-row select { padding: 6px 8px; font-size: 18px; border: 1px solid #ccc; border-radius: 4px; width: 240px; box-sizing: border-box; vertical-align: middle; }
.settings-voice { border: 1px solid #ccc; border-radius: 6px; padding: 8px 14px; margin: 12px 0; }
.settings-voice legend { color: #333; padding: 0 6px; font-size: 20px; }
.voice-opt { display: block; margin: 8px 0; font-size: 18px; }
.voice-opt input { width: auto; margin-right: 8px; }
.switch-opt { display: inline-block; font-size: 18px; color: #333; line-height: 1.4; vertical-align: middle; white-space: nowrap; }
.switch-opt input { width: auto; margin-right: 5px; vertical-align: middle; }
.settings-hint { margin-top: 12px; color: #333; font-size: 16px; line-height: 1.7; }
/* placeholder 加深（Kindle/e-ink 浅灰不明显） */
.child-rename-input::placeholder { color: #555; opacity: 1; }
.child-rename-input::-webkit-input-placeholder { color: #555; }
.child-add-form .child-rename-input::placeholder { color: #555; }

/* 宝宝管理 */
.child-list { margin-bottom: 10px; }
.child-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid #f0f0f0; flex-wrap: wrap; }
.child-row.active { background: #f0f7ff; border-radius: 4px; padding: 6px 8px; }
.child-switch-form { flex: 0 0 auto; }
.child-name { background: none; border: none; font-size: 20px; cursor: pointer; color: #0645ad; padding: 4px 6px; font-family: inherit; }
.child-name.active { color: #1d4ed8; font-weight: bold; }
.child-rename-form { display: flex; gap: 4px; align-items: center; }
.child-rename-input { padding: 5px 8px; font-size: 18px; border: 1px solid #ccc; border-radius: 4px; width: 140px; }
.child-add-form { display: flex; gap: 6px; align-items: center; margin-top: 8px; }
.btn-text { background: none; border: 1px solid #ccc; border-radius: 4px; padding: 6px 12px; font-size: 18px; cursor: pointer; color: #333; }
.btn-text.danger { color: #dc2626; border-color: #fca5a5; }

/* 后台链接（区别于主按钮） */
.admin-link { display: inline-block; margin: 4px 8px 4px 0; padding: 10px 16px; background: #f3f4f6; color: #374151; text-decoration: none; border: 1px solid #d1d5db; border-radius: 6px; font-size: 18px; }
.admin-link:hover { background: #e5e7eb; }

/* 进度页宝宝切换栏 */
.cur-child { font-size: 20px; margin: 4px 0 8px; color: #333; }
.child-switchbar { margin: 6px 0 14px; }
.switch-chip { display: inline-block; padding: 8px 16px; margin: 0 6px 6px 0; background: #fff; color: #374151; text-decoration: none; border: 1px solid #d1d5db; border-radius: 16px; font-size: 18px; }
.switch-chip.active { background: #2563eb; color: #fff; border-color: #2563eb; }

.btn { display: inline-block; padding: 8px 16px; background: #2563eb; color: #fff; text-decoration: none; border: none; border-radius: 4px; font-size: 18px; cursor: pointer; }
.btn:hover { background: #1d4ed8; }
