/* Câu giao tiếp hằng ngày */
/* Chọn nhóm: 4 thẻ */
.dl-groups { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(10px, 2.4vmin, 20px); width: min(900px, 100%); }
.dl-group { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 14px 6px; border: 5px solid var(--c);
  box-shadow: 0 8px 0 var(--d), 0 16px 26px rgba(0, 0, 0, .16), inset 0 3px 0 #fff; animation: pop .4s ease backwards; animation-delay: calc(var(--k) * .06s); }
.dl-group b { font-size: clamp(16px, 2.8vmin, 22px); line-height: 1.15; color: var(--d); text-align: center; }
.dl-group small { font-size: 14px; color: var(--ink-soft); font-weight: 700; }
.dl-group.picked { animation: bump .45s ease; }

/* Cảnh hoạt hình: bé (trái) – đồ vật – người thân (phải) */
.dl-scene { --bg: #fff; position: relative; overflow: hidden; container-type: inline-size;
  width: min(620px, 100%, 78vh); aspect-ratio: 16 / 9; padding: 0; border: 5px solid var(--c); background: var(--bg);
  box-shadow: 0 8px 0 var(--d), 0 16px 26px rgba(0, 0, 0, .16); }
.dl-scene::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 16%; background: rgba(0, 0, 0, .06); }
.dl-scene.night { color: #fff; }
.dl-deco { position: absolute; inset: 0; display: flex; justify-content: space-between; padding: 3% 4%; opacity: .55; pointer-events: none; }
.dl-deco .pic { --s: 16cqw; }
.dl-kid, .dl-who { position: absolute; bottom: 4%; z-index: 1; display: flex; flex-direction: column; align-items: center; }
.dl-kid { left: 5%; }
.dl-who { right: 5%; }
.dl-char { display: block; animation: dlBob 2.6s ease-in-out infinite; }
.dl-who .dl-char { animation-delay: -1.3s; }
.dl-char .pic { --s: 31cqw; }
.dl-prop { position: absolute; left: 50%; bottom: 10%; transform: translateX(-50%); z-index: 1; }
.dl-prop .pic { --s: 15cqw; }
/* bong bóng lời nói của nhân vật (khác .bubble của Gấu Mì) */
.dl-say { position: relative; max-width: 42cqw; margin-bottom: 4px; padding: 4px 12px; border-radius: 16px; background: #fff; color: var(--ink);
  font-weight: 800; font-size: clamp(13px, 4cqw, 22px); line-height: 1.15; text-align: center; box-shadow: 0 3px 0 rgba(0, 0, 0, .12);
  opacity: 0; transform: scale(.4); transition: opacity .2s, transform .3s cubic-bezier(.3, 1.6, .5, 1); }
.dl-say::after { content: ''; position: absolute; left: 50%; bottom: -8px; margin-left: -8px; border: 8px solid transparent; border-bottom: 0; border-top-color: #fff; }
.dl-say.show { opacity: 1; transform: none; }
.dl-kid.hop .dl-char, .dl-who.hop .dl-char { animation: dlHop .6s cubic-bezier(.3, 1.6, .5, 1); }
/* nhân vật bước vào cảnh */
.dl-scene.enter .dl-kid { animation: dlInL .6s cubic-bezier(.3, 1.4, .5, 1) backwards; }
.dl-scene.enter .dl-who { animation: dlInR .6s cubic-bezier(.3, 1.4, .5, 1) .15s backwards; }
.dl-scene.enter .dl-prop .pic { animation: pop .5s ease .45s backwards; }
@keyframes dlInL { from { transform: translateX(-120%); } }
@keyframes dlInR { from { transform: translateX(120%); } }
@keyframes dlBob { 50% { transform: translateY(-4%); } }
@keyframes dlHop { 40% { transform: translateY(-18%) scale(1.04, .96); } }

@media (orientation: portrait) {
  .dl-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dl-scene { width: min(100%, 50vh); aspect-ratio: 4 / 3; }
  .dl-char .pic { --s: 36cqw; }
  .dl-prop .pic { --s: 18cqw; }
}
@media (orientation: landscape) and (max-height: 520px) {
  .dl-scene { width: min(100%, 92vh); border-width: 4px; }
  .dl-group { padding: 8px 4px; }
}
@media (orientation: portrait) and (max-height: 660px) {
  .dl-scene { width: min(100%, 40vh); }
  .dl-group { padding: 8px 4px; }
}
