/* Vườn Kẹo, Thử thách ngày, Sổ tay kẹo. Dùng lại kiểu nút / modal / biến --ring của style.css (nạp sau style.css). */

/* ---------- màn chính: hàng nút chế độ ---------- */
.title-modes { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 4px; }
.title-modes .btn { display: inline-flex; align-items: center; gap: .45em; }
.chip { font-size: .9em; padding: .12em .5em .06em; border-radius: 999px; background: rgba(40, 10, 90, .6); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .55); }
.chip[hidden] { display: none; }

/* chấm đỏ báo còn thứ chưa xem: nút Thử thách ngày (chưa chơi hôm nay), nút Sổ tay (còn xu chưa nhận) */
.has-dot::after { content: ""; position: absolute; top: -4px; right: -4px; width: 15px; height: 15px; border-radius: 50%;
  background: #ff3d5c; border: 3px solid #fff; box-shadow: 0 0 0 2px var(--ring); pointer-events: none; }
.icon-btn.has-dot { position: relative; }

/* ---------- màn chơi: HUD gọn cho Vườn Kẹo / Thử thách ngày ---------- */
#screen-game[data-mode="zen"] .g-moves { visibility: hidden; }
#screen-game[data-mode="zen"] .g-goals, #screen-game[data-mode="zen"] .score-track { display: none; }
#screen-game[data-mode="zen"] .g-boosters, #screen-game[data-mode="daily"] .g-boosters { display: none; }
#screen-game[data-mode="zen"] .g-level small, #screen-game[data-mode="daily"] .g-level small { display: none; }
#screen-game[data-mode="zen"] .g-level b, #screen-game[data-mode="daily"] .g-level b { font-size: 19px; }

/* ---------- Sổ tay kẹo ---------- */
.cx-hint { opacity: .85; font-size: 14px; }
.cx-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; width: 100%; max-height: min(58vh, 470px); overflow-y: auto;
  padding: 2px 4px 8px; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.cx-card { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 10px 8px 9px; border-radius: 18px; cursor: pointer;
  background: rgba(30, 5, 80, .45); border: 2px solid rgba(255, 255, 255, .35); text-align: center; transition: background .2s; }
.cx-card:hover { background: rgba(30, 5, 80, .6); }
.cx-card:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.cx-card.open { grid-column: 1 / -1; background: rgba(30, 5, 80, .65); border-color: #fff; }
.cx-card img { width: 64px; height: 64px; filter: drop-shadow(0 4px 4px rgba(20, 0, 60, .4)); }
.cx-card.fresh img { filter: brightness(.35) saturate(.6); } /* chưa ăn viên nào: chỉ thấy bóng */
.cx-name { font-size: 17px; line-height: 1.1; }
.cx-count { font-size: 18px; line-height: 1; }
.cx-count small { font-size: 11px; opacity: .85; text-transform: uppercase; letter-spacing: .05em; }
.cx-stamps { display: flex; gap: 4px; margin: 2px 0 1px; }
.cx-stamps i { width: 15px; height: 15px; background: #6d5a9a; clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
.cx-stamps i.on { background: linear-gradient(#fff6b0, #ffc21f); }
.cx-bar { width: 88%; height: 9px; border-radius: 999px; background: rgba(20, 0, 60, .55); border: 1.5px solid rgba(255, 255, 255, .5); overflow: hidden; }
.cx-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(#ffe98a, #ffb020); transition: width .4s; }
.cx-next { font-size: 11px; opacity: .85; }
.cx-story { display: none; margin: 6px 6px 2px; font-size: 14px; line-height: 1.35; opacity: .96; }
.cx-card.open .cx-story { display: block; }
.cx-claim { margin-top: 6px; display: inline-flex; align-items: center; gap: .35em; }
.cx-claim .ico-coin { width: 18px; height: 18px; }

/* ---------- Thử thách ngày ---------- */
.dl-date { font-size: 15px; opacity: .92; letter-spacing: .04em; }
.dl-tip { margin: 0; font-size: 16px; line-height: 1.3; }
.dl-twist { padding: 3px 14px 2px; border-radius: 999px; background: rgba(255, 255, 255, .16); font-size: 14px; }
.dl-goals { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.dl-goals span { display: flex; flex-direction: column; align-items: center; padding: 6px 12px 4px; border-radius: 14px; font-size: 17px; line-height: 1.1;
  background: rgba(30, 5, 80, .45); border: 2px solid rgba(255, 255, 255, .3); }
.dl-goals em { font-style: normal; color: #ffd84a; font-size: 13px; letter-spacing: 1px; }
.dl-stats { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.dl-stat { display: grid; justify-items: center; min-width: 88px; padding: 8px 10px 6px; border-radius: 16px; line-height: 1.05;
  background: rgba(30, 5, 80, .45); border: 2px solid rgba(255, 255, 255, .3); }
.dl-stat span { font-size: 20px; }
.dl-stat b { font-size: 22px; }
.dl-stat small { font-size: 11px; opacity: .85; text-transform: uppercase; letter-spacing: .05em; }
.dl-note { font-size: 13px; opacity: .85; line-height: 1.4; }
.dl-note-line { font-size: 15px; }

@media (max-height: 640px) { .cx-grid { max-height: 52vh; } .cx-card img { width: 52px; height: 52px; } }
@media (prefers-reduced-motion: reduce) { .cx-bar i, .cx-card { transition: none; } }
