/* Khung cảnh và biểu tượng dùng hình 3D thay cho hình phẳng: mặt trời, mây, bóng bay, sao trên trời; nút nhà, nút loa; ngôi sao thưởng.
   Trang chủ đổi theo buổi trong ngày (body[data-time]: sang, trua, chieu, toi) — đặt trong js/app.js. Nạp sau css/style.css. */

/* ---------- mặt trời, mặt trăng ---------- */
.sun { top: -46px; right: -46px; width: 220px; height: 220px; background: none; animation: none; }
.sun::before { content: ""; position: absolute; inset: -18%; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 240, 150, .75) 0 30%, rgba(255, 226, 110, 0) 68%), repeating-conic-gradient(rgba(255, 232, 130, .5) 0 9deg, transparent 9deg 18deg);
  -webkit-mask: radial-gradient(circle, #000 34%, transparent 70%); mask: radial-gradient(circle, #000 34%, transparent 70%); animation: spin 50s linear infinite; }
.sun img { position: absolute; inset: 14%; width: 72%; height: 72%; filter: drop-shadow(0 8px 14px rgba(240, 140, 20, .45)); animation: s3-breathe 5s ease-in-out infinite; }
@keyframes s3-breathe { 50% { transform: scale(1.06) rotate(6deg); } }
@media (max-width: 720px) { .sun { width: 170px; height: 170px; top: -40px; right: -40px; } }

/* ---------- mây ---------- */
img.cloud { background: none; border-radius: 0; width: clamp(110px, 17vw, 220px); height: auto; opacity: .96; filter: drop-shadow(0 10px 10px rgba(60, 110, 190, .22)); }
img.cloud.c2 { opacity: .8; }

/* ---------- bóng bay trên trời ---------- */
img.fl8 { background: none; border-radius: 0; aspect-ratio: auto; height: auto; width: clamp(40px, 5.6vw, 70px); box-shadow: none; opacity: .95; filter: drop-shadow(0 6px 6px rgba(30, 42, 94, .18)); }
img.fl8.f-b { filter: hue-rotate(200deg) brightness(1.25) drop-shadow(0 6px 6px rgba(30, 42, 94, .18)); }
img.fl8.f-c { filter: hue-rotate(90deg) brightness(1.5) drop-shadow(0 6px 6px rgba(30, 42, 94, .18)); }
img.fl8.f-d { filter: hue-rotate(260deg) brightness(1.2) drop-shadow(0 6px 6px rgba(30, 42, 94, .18)); }
img.fl8.f-e { filter: hue-rotate(40deg) saturate(1.4) drop-shadow(0 6px 6px rgba(30, 42, 94, .18)); }

/* ---------- sao lấp lánh ---------- */
img.tw { width: clamp(16px, 2.4vw, 30px); height: auto; filter: drop-shadow(0 0 6px rgba(255, 255, 255, .9)); }

/* ---------- đồi cỏ có khối ---------- */
.hills { filter: drop-shadow(0 -6px 10px rgba(20, 110, 60, .18)); }
.deco { filter: drop-shadow(0 5px 3px rgba(20, 70, 40, .28)); }
.deco.rainbow, .deco.kite, .deco.bird, .deco.fly { filter: none; }

/* ---------- nút tròn: hình 3D thay cho nét vẽ phẳng ---------- */
.round img.ic3 { width: 38px; height: 38px; object-fit: contain; pointer-events: none; filter: drop-shadow(0 2px 0 rgba(30, 42, 94, .25)); }
@media (max-width: 480px), (max-height: 560px) { .round img.ic3 { width: 30px; height: 30px; } }

/* ---------- ngôi sao thưởng: hình 3D nằm trong khung svg cũ (mọi chỗ định cỡ theo svg vẫn đúng) ---------- */
svg.star { overflow: visible; }
.pips svg:not(.on), .gj-prog .star:not(.on) { filter: grayscale(1) brightness(1.35) opacity(.5); }

/* ---------- buổi chiều tà ---------- */
body[data-scene="home"][data-time="chieu"] { --sky1: #FF9D6C; --sky2: #FFE7B8; }
body[data-scene="home"][data-time="chieu"] .sun::before { background: radial-gradient(circle, rgba(255, 200, 120, .8) 0 30%, rgba(255, 170, 90, 0) 68%), repeating-conic-gradient(rgba(255, 190, 110, .5) 0 9deg, transparent 9deg 18deg); }
body[data-scene="home"][data-time="chieu"] img.cloud { filter: sepia(.5) saturate(2.2) hue-rotate(-18deg) drop-shadow(0 10px 10px rgba(190, 90, 60, .22)); }
body[data-scene="home"][data-time="chieu"] .hills { filter: saturate(.9) brightness(.94) drop-shadow(0 -6px 10px rgba(150, 90, 40, .2)); }

/* ---------- buổi tối: trời sao, trăng, đồi sẫm lại ---------- */
body[data-scene="home"][data-time="toi"] { --sky1: #1B2466; --sky2: #5566C8; }
body[data-scene="home"][data-time="toi"] .sun::before { background: radial-gradient(circle, rgba(255, 250, 210, .55) 0 32%, rgba(255, 250, 210, 0) 66%); animation: none; }
body[data-scene="home"][data-time="toi"] .sun img { inset: 20%; width: 60%; height: 60%; filter: drop-shadow(0 0 18px rgba(255, 244, 180, .8)); }
body[data-scene="home"][data-time="toi"] img.cloud { opacity: .28; filter: brightness(.9); }
body[data-scene="home"][data-time="toi"] .hills { filter: brightness(.55) saturate(.85) hue-rotate(18deg); }
body[data-scene="home"][data-time="toi"] .deco { filter: brightness(.7) drop-shadow(0 5px 3px rgba(0, 0, 0, .35)); }
body[data-scene="home"][data-time="toi"] .deco.rainbow, body[data-scene="home"][data-time="toi"] .deco.kite, body[data-scene="home"][data-time="toi"] .deco.bird, body[data-scene="home"][data-time="toi"] .deco.fly, body[data-scene="home"][data-time="toi"] img.fl8 { display: none; }
body[data-scene="home"][data-time="toi"] img.tw { width: clamp(18px, 2.8vw, 34px); filter: drop-shadow(0 0 10px rgba(255, 246, 190, 1)); }
.tw.t-n { display: none; }
body[data-scene="home"][data-time="toi"] .tw.t-n { display: block; }
.t-g { left: 18%; top: 30%; animation-delay: -.4s; } .t-h { left: 42%; top: 26%; animation-delay: -1.1s; } .t-i { left: 68%; top: 9%; animation-delay: -1.9s; } .t-j { left: 80%; top: 34%; animation-delay: -.6s; } .t-k { left: 4%; top: 42%; animation-delay: -1.4s; }

@media (prefers-reduced-motion: reduce) { .sun::before, .sun img { animation: none; } }

/* ---------- Bóng bay: bóng căng tròn có khối (sáng ở vai, sẫm ở đáy), mây 3D trên nền trời ---------- */
.field { background: url(../img/may.png) 10% 12% / clamp(110px, 16%, 190px) auto no-repeat, url(../img/may.png) 86% 6% / clamp(130px, 20%, 230px) auto no-repeat, linear-gradient(#58B4FF, #DDF3FF); }
.balloon .b, .mb { background:
    radial-gradient(ellipse 20% 26% at 30% 24%, rgba(255, 255, 255, .95) 0, rgba(255, 255, 255, .5) 45%, rgba(255, 255, 255, 0) 100%),
    radial-gradient(ellipse 62% 56% at 38% 34%, rgba(255, 255, 255, .4), rgba(255, 255, 255, 0) 72%),
    radial-gradient(ellipse 90% 90% at 60% 70%, rgba(0, 0, 0, 0) 42%, rgba(0, 0, 0, .2) 76%, rgba(0, 0, 0, .4) 100%),
    var(--c);
  box-shadow: inset -7px -11px 18px rgba(0, 0, 0, .16), inset 5px 6px 14px rgba(255, 255, 255, .3), 0 14px 16px rgba(30, 42, 94, .2);
  text-shadow: 0 2px 0 rgba(255, 255, 255, .5); }
.balloon .b::before { border-bottom-color: var(--c); filter: brightness(.72); }
.mb { box-shadow: inset -4px -6px 10px rgba(0, 0, 0, .16), inset 3px 4px 8px rgba(255, 255, 255, .3), 0 6px 8px rgba(30, 42, 94, .2); }

/* ---------- Ếch nhảy: mặt ao có ánh nước, lá sen dày có gân và bóng đổ ---------- */
.pond { background:
    radial-gradient(circle at 78% 82%, transparent 0 38px, rgba(255, 255, 255, .45) 39px 42px, transparent 43px),
    radial-gradient(circle at 20% 12%, transparent 0 26px, rgba(255, 255, 255, .45) 27px 30px, transparent 31px),
    radial-gradient(ellipse 60% 38% at 28% 16%, rgba(255, 255, 255, .5), rgba(255, 255, 255, 0) 72%),
    radial-gradient(ellipse 85% 70% at 72% 96%, rgba(0, 50, 120, .4), rgba(0, 50, 120, 0) 72%),
    linear-gradient(160deg, #92E8F5, #2FA8E0 62%, #1C84C6);
  box-shadow: var(--lift), inset 0 12px 26px rgba(255, 255, 255, .35), inset 0 -16px 32px rgba(0, 50, 110, .3); }
.lily, .lily.done, .lilymini { background: none; isolation: isolate; filter: drop-shadow(0 8px 4px rgba(8, 60, 90, .45)); }
.lilymini { position: relative; }
.lily::before, .lilymini::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: 50%;
  background:
    radial-gradient(ellipse 36% 26% at 34% 26%, rgba(255, 255, 255, .6), rgba(255, 255, 255, 0) 100%),
    repeating-conic-gradient(from 25deg, rgba(0, 70, 25, 0) 0 21deg, rgba(0, 70, 25, .22) 21deg 22.5deg),
    radial-gradient(circle at 46% 42%, #8BE896 0, #41BD63 52%, #1D8C43 100%);
  box-shadow: inset 0 -7px 10px rgba(0, 60, 25, .5), inset 0 5px 8px rgba(255, 255, 255, .4);
  -webkit-mask: conic-gradient(from 25deg, #000 0 325deg, transparent 325deg); mask: conic-gradient(from 25deg, #000 0 325deg, transparent 325deg); }
.lily.done::before { filter: hue-rotate(-78deg) saturate(1.7) brightness(1.18); }

/* ---------- sửa nhỏ sau đợt rà soát ---------- */
/* tên màn dài ("Du lịch Việt Nam", "Lời nhắn của ba mẹ") không làm thanh trên cao lên: chữ nhỏ lại, tối đa hai dòng */
.brand { font-size: clamp(1.05rem, 4.5vw, 2rem); line-height: 1.08; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; padding: .12em .1em .16em; margin: -.12em -.1em -.16em; }
@media (max-width: 480px), (max-height: 560px) { .brand { font-size: clamp(1.05rem, 5.2vw, 1.35rem); } }
/* vừa xong một nhiệm vụ: nút về nhà nhún nhảy gọi bé */
#btnHome.bd-new { animation: pulse 1.1s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { #btnHome.bd-new { animation: none; } }

/* ---------- Hái quả: tán cây có khối (sáng phía trên, tối phía dưới), thân cây tròn, giỏ mây đan có lòng giỏ ---------- */
.tree::before { border: 0;
  background: radial-gradient(ellipse 46% 36% at 32% 26%, rgba(255, 255, 255, .34), rgba(255, 255, 255, 0) 72%), radial-gradient(ellipse 95% 85% at 60% 82%, rgba(0, 70, 30, 0) 42%, rgba(0, 70, 30, .5) 100%), radial-gradient(circle at 40% 34%, #86E493, #3DB260 58%, #218A44);
  box-shadow: 0 20px 22px rgba(20, 90, 50, .32), inset 0 -16px 26px rgba(0, 60, 25, .35), inset 0 10px 18px rgba(255, 255, 255, .22); }
.tree .lobe { border: 0;
  background: radial-gradient(ellipse 44% 38% at 32% 26%, rgba(255, 255, 255, .45), rgba(255, 255, 255, 0) 72%), radial-gradient(circle at 38% 34%, #98EDA4, #47BC68 58%, #27964B);
  box-shadow: inset -9px -13px 22px rgba(0, 60, 25, .32), 0 12px 14px rgba(20, 90, 50, .22); }
.tree .lobe.in { box-shadow: inset -9px -13px 22px rgba(0, 60, 25, .16); }
.tree::after { background: linear-gradient(90deg, #D49A62 0, #B06E3E 38%, #7A4821 100%); box-shadow: inset 5px 0 8px rgba(255, 255, 255, .22), 0 10px 10px rgba(60, 30, 10, .28); }
.fruit .emo { filter: drop-shadow(0 7px 4px rgba(0, 50, 20, .42)); }
.basket { border: 0; border-radius: 18px 18px 64px 64px / 14px 14px 60px 60px;
  background:
    linear-gradient(rgba(60, 30, 5, .5), rgba(60, 30, 5, 0) 26%),
    radial-gradient(ellipse 90% 70% at 30% 20%, rgba(255, 240, 200, .35), rgba(255, 240, 200, 0) 70%),
    repeating-linear-gradient(45deg, rgba(120, 70, 20, .28) 0 3px, rgba(120, 70, 20, 0) 3px 14px),
    repeating-linear-gradient(-45deg, rgba(255, 225, 160, .35) 0 3px, rgba(255, 225, 160, 0) 3px 14px),
    linear-gradient(#E3A655, #B97A2C);
  box-shadow: 0 0 0 5px #C98B3E, 0 0 0 9px #A46A26, 0 16px 18px rgba(60, 35, 10, .35), inset 0 12px 16px rgba(50, 25, 5, .45), inset 0 -10px 14px rgba(255, 230, 170, .25); }
.basket .emo { filter: drop-shadow(0 4px 3px rgba(50, 25, 5, .45)); }

/* ---------- nút và ô lời có khối: bóng sáng phía trên, viền nổi ---------- */
.round { background: radial-gradient(ellipse 62% 40% at 36% 20%, rgba(255, 255, 255, .6), rgba(255, 255, 255, 0) 72%), radial-gradient(ellipse 90% 70% at 60% 100%, rgba(0, 0, 0, .16), rgba(0, 0, 0, 0) 70%), var(--c); }
.btn { background: linear-gradient(rgba(255, 255, 255, .38), rgba(255, 255, 255, 0) 46%, rgba(0, 0, 0, .1)), var(--c); }
.bubble { background: linear-gradient(#FFFFFF, #FFF6D2); box-shadow: 0 6px 0 rgba(30, 42, 94, .16), 0 12px 14px rgba(30, 42, 94, .12), inset 0 3px 0 rgba(255, 255, 255, .9), inset 0 -6px 10px rgba(255, 200, 80, .22); }
.bd-pip { box-shadow: 0 5px 0 rgba(30, 42, 94, .16), 0 10px 12px rgba(30, 42, 94, .16), inset 0 3px 0 rgba(255, 255, 255, .9), inset 0 -6px 10px rgba(255, 200, 80, .25); }

/* hai ngón tay của bé không phóng to cả trang (vẫn cuộn được) */
html, body { touch-action: pan-x pan-y; }
