/* 配置場所: css/style.css */
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Hiragino Maru Gothic ProN", "Rounded Mgen+", sans-serif;
  background: #fafafa;
}
.screen { min-height: 100vh; padding: 20px; text-align: center; }
.hidden { display: none !important; }

.home-title { font-size: 26px; font-weight: 900; margin: 20px 0; }
.home-button {
  display: block; width: 100%; max-width: 320px; margin: 12px auto;
  padding: 24px; font-size: 20px; font-weight: bold; color: #fff;
  border: none; border-radius: 24px;
}
.color-orange { background: #ff9800; }
.color-green  { background: #4caf50; }
.color-purple { background: #9c27b0; }
.color-pink   { background: #e91e63; }
.parent-entry-button {
  position: fixed; right: 16px; bottom: 16px;
  background: #eee; color: #888; border: none; border-radius: 50%;
  width: 56px; height: 56px; font-size: 12px;
}

.camera-wrap { position: relative; width: 100%; max-width: 400px; margin: 20px auto; }
#qr-video { width: 100%; border-radius: 16px; background: #000; }
.scan-frame {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 70%; height: 70%; border: 4px solid #fff; border-radius: 20px;
  box-shadow: 0 0 0 9999px rgba(0,0,0,0.15);
}
.guide-text { font-size: 20px; font-weight: bold; }

.big-button, .action-button, .done-button, .danger-button, .link-button, .close-button {
  display: inline-block; padding: 16px 24px; margin: 8px; font-size: 18px; font-weight: bold;
  border: none; border-radius: 18px; color: #fff; background: #4a90d9;
}
.danger-button { background: #e53935; }
.close-button, .link-button { background: #999; }

.dict-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 12px; }
.dict-cell { padding: 12px; border-radius: 16px; background: #f0f0f0; }
.dict-cell.discovered { background: #fff3cd; }
.dict-cell-icon { font-size: 40px; }

.gate-hold-button {
  width: 120px; height: 120px; border-radius: 50%; border: none; position: relative; background: #eee;
}
.gate-progress-ring {
  position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(#ddd 0deg, #ddd 0deg);
}
.gate-icon { position: relative; font-size: 40px; z-index: 1; }

/* ===== 共通ヘッダー（ホームへ戻るボタン） ===== */
.screen-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  margin-bottom: 12px;
  position: sticky;
  top: 0;
  background: #fffdf5ee;
  z-index: 10;
}
.back-to-home-button {
  font-size: 1.1rem;
  padding: 12px 18px;
  border: none;
  border-radius: 16px;
  background-color: #ffd166;
  color: #333;
  min-width: 88px;
  min-height: 48px;
  cursor: pointer;
  flex-shrink: 0;
}
.screen-header-title {
  font-size: 1.4rem;
  margin: 0;
  flex: 1;
  text-align: left;
}

/* ===== 図鑑・保護者設定などで使う共通モーダル ===== */
.dict-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
}
.dict-modal-inner {
  background: #fff;
  border-radius: 20px;
  padding: 24px;
  max-width: 340px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  text-align: center;
}
.dict-summary { font-size: 16px; font-weight: bold; margin: 8px 0 16px; }
.dict-cell-name { font-size: 13px; margin-top: 4px; }
.dict-tags { display: flex; gap: 6px; justify-content: center; margin: 12px 0; flex-wrap: wrap; }
.tag {
  display: inline-block; padding: 4px 10px; border-radius: 12px;
  font-size: 12px; font-weight: bold; color: #fff;
}
.tag-blue  { background: #4a90d9; }
.tag-green { background: #4caf50; }
.tag-pink  { background: #e91e63; }

/* ===== 保護者設定画面 ===== */
.settings-section {
  max-width: 400px;
  margin: 0 auto 20px;
  padding: 16px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 4px;
  font-size: 16px;
}
.settings-row + .settings-row { border-top: 1px solid #eee; }
.toggle-button {
  min-width: 64px;
  min-height: 40px;
  border: none;
  border-radius: 20px;
  font-weight: bold;
  color: #fff;
  cursor: pointer;
}
.toggle-button.on  { background: #4caf50; }
.toggle-button.off { background: #bbb; }
.settings-info { font-size: 15px; margin: 4px 0 12px; }
.secondary-button {
  display: block; width: 100%; max-width: 320px; margin: 8px auto;
  padding: 14px; font-size: 16px; font-weight: bold; color: #333;
  background: #f0f0f0; border: none; border-radius: 14px;
}
.privacy-section { background: #eef6ff; }
.privacy-text { font-size: 14px; line-height: 1.7; text-align: left; margin: 0; }
.card-list { list-style: none; padding: 0; margin: 0; text-align: left; font-size: 14px; }
.card-list li { padding: 6px 4px; border-bottom: 1px solid #eee; }

/* ===== なきごえクイズ画面 ===== */
.quiz-goal { font-size: 18px; font-weight: bold; margin: 8px 0; }
.quiz-stars { font-size: 28px; margin-bottom: 12px; }
.quiz-choices { display: flex; gap: 12px; justify-content: center; margin: 16px 0; flex-wrap: wrap; }
.quiz-choice-btn {
  font-size: 40px; padding: 16px; border: none; border-radius: 20px;
  background: #fff3cd; min-width: 88px; min-height: 88px;
}
.quiz-choice-btn:disabled { opacity: 0.6; }
.quiz-message { font-size: 18px; font-weight: bold; margin-top: 12px; }
.quiz-effect { position: fixed; inset: 0; pointer-events: none; text-align: center; padding-top: 30vh; }
.correct-text { font-size: 24px; font-weight: 900; color: #e91e63; }
.confetti { font-size: 28px; margin: 0 4px; display: inline-block; animation: fall 1.2s ease-out; }
@keyframes fall { from { transform: translateY(-20px); opacity: 1; } to { transform: translateY(60px); opacity: 0; } }

/* ===== まねっこあそび画面 ===== */
.mimic-emoji { font-size: 80px; margin: 20px 0; }
.mimic-prompt { font-size: 18px; font-weight: bold; margin-bottom: 16px; }
.mimic-praise { font-size: 20px; font-weight: bold; color: #e91e63; margin-top: 12px; }
