/* ============================================================
   Bloom — Check-ins (sheet over Home + Class Feelings page)
   Same tokens as style.css: paper, cards, Fredoka titles, leaf
   green = done, coral = today, sunny = reward. Tap targets 88px+
   on the child screens; nothing under 16px type.
   ============================================================ */

body.ck-open { overflow: hidden; }

.ck-sheet {
  position: fixed; inset: 0; z-index: 130;
  background: var(--paper);
  display: flex; align-items: center; justify-content: center;
  padding: 18px; overflow: auto;
  animation: ck-up 0.35s var(--ease);
}
@keyframes ck-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .ck-sheet { animation: none; } .bump { animation: none !important; } }

.ck-wrap {
  position: relative; width: 100%; max-width: 1100px;
  background: var(--card); border: var(--line); border-radius: var(--r-tile, 24px);
  box-shadow: var(--shadow); padding: 28px 30px 24px; text-align: center;
}
.ck-x { position: absolute; top: 14px; right: 16px; border: 0; background: none; font-size: 22px; color: var(--ink-soft); cursor: pointer; padding: 6px 10px; }
.ck-title { font-family: var(--hand); font-size: 36px; font-weight: 600; line-height: 1.1; margin: 4px 0 6px; }
.ck-title u { text-decoration-color: var(--coral); text-underline-offset: 4px; }
.ck-sub { color: var(--ink-soft); font-size: 18px; margin: 0 0 16px; }
.ck-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; text-align: left; }
.ck-count { font-size: 17px; color: var(--ink-soft); white-space: nowrap; }
.ck-count b { font-family: var(--hand); font-size: 26px; color: var(--ink); }
.ck-count.teacher-count { opacity: 0.55; }
.ck-row { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 18px; flex-wrap: wrap; }
.ck-row.end { justify-content: flex-end; }
.ck-link { border: 0; background: none; font: inherit; font-size: 17px; color: var(--ink-soft); text-decoration: underline; cursor: pointer; padding: 10px 12px; min-height: 44px; }
.ck-link.on { color: var(--coral-deep); font-weight: 700; }
.ck-btn { font-size: 19px; padding: 12px 30px; min-height: 52px; }
.ck-btn.big { font-size: 24px; padding: 16px 40px; min-height: 72px; background: var(--green); border-color: var(--green-deep); color: #fff; }
.ck-btn.big:hover { background: var(--green-deep); }
.ck-btn.big[disabled] { opacity: 0.35; cursor: default; }
.ck-err { color: var(--coral-deep); font-size: 17px; margin: 8px 0; }

.ck-fox { display: block; margin: 0 auto; width: 160px; height: 160px; object-fit: contain; }
.ck-wrap img { display: inline-block; }
.ck-fox, .ck-fox-sm, .ck-pic-face img, .ck-face img { display: block; margin-left: auto; margin-right: auto; }
.ck-fox-big { width: 240px; height: 240px; }
.ck-fox-sm { width: 110px; height: 110px; object-fit: contain; flex: 0 0 auto; }

/* ---- start: choose how ---- */
.ck-modes { display: flex; gap: 18px; justify-content: center; margin: 14px 0 6px; flex-wrap: wrap; }
.ck-mode {
  flex: 1 1 260px; max-width: 320px; min-height: 120px;
  border: var(--line); border-radius: var(--r-card); background: var(--card);
  padding: 16px 18px; cursor: pointer; font: inherit; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  box-shadow: var(--shadow); transition: transform 0.12s var(--bounce);
}
.ck-mode.def { border-color: var(--green-deep); background: var(--green-l); }
.ck-mode:hover { transform: translateY(-2px); }
.ck-mode:active { transform: translateY(2px); box-shadow: var(--shadow-press); }
.ck-mode-ic { font-size: 34px; line-height: 1; }
.ck-mode b { font-family: var(--hand); font-size: 22px; }
.ck-mode small { color: var(--ink-soft); font-size: 15px; }

/* ---- settings ---- */
.ck-field { text-align: left; margin: 14px auto 0; max-width: 620px; }
.ck-field-l { font-weight: 700; margin-bottom: 6px; }
.ck-seg { display: flex; gap: 8px; flex-wrap: wrap; }
.ck-seg-b { border: var(--line); border-radius: 999px; background: var(--card); padding: 8px 16px; font: inherit; font-size: 16px; cursor: pointer; min-height: 44px; }
.ck-seg-b.on { background: var(--green-l); border-color: var(--green-deep); font-weight: 700; }

/* ---- faces ---- */
.ck-faces { display: flex; gap: 14px; justify-content: center; margin: 16px 0 6px; flex-wrap: wrap; }
.ck-face {
  position: relative; flex: 1 1 0; min-width: 120px; max-width: 200px; min-height: 180px;
  border: var(--line); border-radius: var(--r-tile, 24px); background: var(--card);
  padding: 14px 8px 12px; cursor: pointer; font: inherit;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  box-shadow: var(--shadow); transition: transform 0.15s var(--bounce), background 0.15s;
}
.ck-face img { width: 100%; max-width: 150px; aspect-ratio: 1; object-fit: contain; }
.ck-face-l { font-family: var(--hand); font-size: 18px; font-weight: 600; }
.ck-face.sel { background: var(--sunny-l); border-color: var(--sunny); transform: scale(1.06); }
.ck-faces:has(.sel) .ck-face:not(.sel) { opacity: 0.55; }
.ck-face.big { min-height: 200px; }
.ck-face-col { flex: 1 1 0; min-width: 120px; max-width: 200px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.ck-face-col .ck-face { width: 100%; }
.ck-col-row { display: flex; gap: 8px; }
.ck-mini { border: var(--line); border-radius: 999px; background: var(--card); min-width: 44px; min-height: 44px; font: inherit; font-size: 20px; cursor: pointer; padding: 0 14px; }
.ck-mini.words { font-size: 15px; }
.ck-mini:hover { background: var(--beige); }
.ck-bubble {
  position: absolute; top: -10px; right: -10px; min-width: 40px; height: 40px; padding: 0 10px;
  border-radius: 999px; background: var(--coral); color: #fff; border: 3px solid var(--card);
  font-family: var(--hand); font-size: 20px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.ck-bubble.sm { min-width: 30px; height: 30px; font-size: 15px; top: -8px; right: -8px; }
.ck-confirm { min-height: 84px; display: flex; justify-content: center; align-items: center; margin-top: 10px; }

/* ---- words ---- */
.ck-wtop, .ck-bw-top { display: flex; align-items: center; gap: 16px; justify-content: center; margin: 6px 0 12px; }
.ck-meaning { background: var(--sunny-l); border-radius: 12px; padding: 10px 16px; font-size: 19px; max-width: 520px; text-align: left; }
.ck-words { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.ck-words.six { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ck-word {
  position: relative; border: var(--line); border-radius: var(--r-card); background: var(--card);
  min-height: 96px; padding: 8px 10px; cursor: pointer; font: inherit;
  display: flex; align-items: center; gap: 10px; text-align: left; box-shadow: var(--shadow);
  transition: transform 0.15s var(--bounce), background 0.15s;
}
.ck-word img { width: 56px; height: 56px; object-fit: contain; flex: 0 0 auto; }
.ck-word-l { font-family: var(--hand); font-size: 20px; font-weight: 600; flex: 1; }
.ck-word.sel { background: var(--sunny-l); border-color: var(--sunny); transform: scale(1.04); }
.ck-spk { font-size: 16px; opacity: 0.6; cursor: pointer; }
.ck-spk.no-audio { display: none; }
.ck-title .ck-spk { font-size: 22px; vertical-align: middle; }
@media (max-width: 760px) { .ck-words, .ck-words.six { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ck-title { font-size: 28px; } }

/* ---- react + pass ---- */
.ck-react-word { font-family: var(--hand); font-size: 40px; font-weight: 700; margin-top: 6px; text-transform: lowercase; }
.ck-react .ck-meaning { display: inline-block; margin-top: 10px; text-align: center; }
.ck-reply { margin-top: 18px; font-size: 20px; color: var(--ink-soft); }
.ck-completed { position: absolute; left: 18px; bottom: 14px; font-size: 15px; opacity: 0.6; }
.ck-completed:hover { opacity: 1; }
.ck-react .ck-confirm { margin-top: 18px; }

/* ---- class picture ---- */
.ck-pic-faces { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin: 14px 0; }
.ck-pic-face { flex: 1 1 0; min-width: 100px; max-width: 170px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.ck-pic-face img { width: 100%; max-width: 120px; aspect-ratio: 1; object-fit: contain; }
.ck-pic-face b { font-family: var(--hand); font-size: 34px; }
.ck-pic-face span { font-size: 15px; color: var(--ink-soft); }
.ck-pic-words { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 8px 0; }
.ck-chip { background: var(--beige); border-radius: 999px; padding: 6px 14px; font-family: var(--hand); font-weight: 600; }
.ck-chip small { color: var(--ink-soft); font-weight: 400; }
.ck-summary { font-size: 20px; margin: 10px 0 0; }
.ck-flowers { margin-top: 8px; color: var(--green-deep); font-weight: 700; font-size: 18px; }

.bump { animation: ck-bump 0.45s var(--bounce); }
@keyframes ck-bump { 0% { transform: scale(1); } 40% { transform: scale(1.12); } 100% { transform: scale(1); } }

/* ---- Home: the check-in card under the week strip ---- */
.checkin-card { margin-top: 16px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.checkin-card img { width: 64px; height: 64px; object-fit: contain; }
.checkin-card .ck-home-t { font-family: var(--hand); font-size: 22px; font-weight: 600; }
.checkin-card .ck-home-s { color: var(--ink-soft); font-size: 15px; }
.checkin-card .ck-home-main { flex: 1; min-width: 200px; }
.checkin-card .ck-home-faces { display: flex; gap: 8px; }
.checkin-card .ck-home-faces span { display: flex; flex-direction: column; align-items: center; font-size: 13px; color: var(--ink-soft); }
.checkin-card .ck-home-faces img { width: 36px; height: 36px; }
.checkin-card .ck-home-faces b { font-family: var(--hand); font-size: 18px; color: var(--ink); }
.cal .ck-mark { position: absolute; left: 8px; bottom: 6px; font-size: 16px; }

/* ---- Class Feelings page ---- */
.ck-now { background: var(--green); border-color: var(--green-deep); color: #fff; font-weight: 600; font-size: 18px; padding: 10px 24px; }
.ck-now:hover { background: var(--green-deep); }
.ck-now.done { background: var(--green-l); color: var(--green-deep); }
.fl-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.fl-range { display: flex; gap: 8px; }
.fl-range .btn.on { background: var(--green-l); border-color: var(--green-deep); }
.fl-today { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.fl-chart { display: flex; align-items: flex-end; gap: 6px; height: 240px; box-sizing: border-box; padding: 30px 0 0; border-bottom: 2px solid var(--line-c); overflow-x: auto; }
.fl-bar { flex: 1 0 34px; max-width: 60px; display: flex; flex-direction: column-reverse; align-items: stretch; height: 100%; position: relative; }
.fl-seg { width: 100%; }
.fl-seg.f5 { background: #4caf6e; } .fl-seg.f4 { background: #8fd19e; } .fl-seg.f3 { background: #f5c242; } .fl-seg.f2 { background: #f29b5a; } .fl-seg.f1 { background: #6f8fd6; }
.fl-bar .fl-n { position: absolute; top: -20px; left: 0; right: 0; text-align: center; font-size: 13px; color: var(--ink-soft); }
.fl-xlabels { display: flex; gap: 6px; margin-top: 6px; }
.fl-xlabels span { flex: 1 0 34px; max-width: 60px; text-align: center; font-size: 12px; color: var(--ink-soft); }
.fl-key { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 10px; font-size: 14px; color: var(--ink-soft); }
.fl-key i { display: inline-block; width: 14px; height: 14px; border-radius: 3px; vertical-align: -2px; margin-right: 4px; }
.fl-words { display: flex; flex-direction: column; gap: 8px; }
.fl-word { display: flex; align-items: center; gap: 12px; }
.fl-word .w { flex: 0 0 150px; font-family: var(--hand); font-weight: 600; font-size: 18px; }
.fl-word .bar { flex: 1; height: 14px; background: var(--beige); border-radius: 999px; overflow: hidden; }
.fl-word .bar i { display: block; height: 100%; background: var(--green); }
.fl-word .n { flex: 0 0 40px; text-align: right; color: var(--ink-soft); }
.fl-guard { color: var(--ink-soft); font-size: 15px; background: var(--beige); border-radius: 10px; padding: 10px 14px; }

/* small bits the site stylesheet does not carry */
.fl-range .btn.sm { font-size: 15px; padding: 6px 16px; }
#fl-trend .empty, #fl-words .empty { color: var(--ink-soft); font-size: 16px; padding: 14px 0 4px; }
