/* Kinh tế game: ♪ (thanh trên, màn kết bài), Cửa hàng (#/cua-hang), Hộp nhạc có quà.
 * Hiệu ứng chỉ dùng transform/opacity; html.po-giam (giảm chuyển động) → không chuyển động. Không giãn khoảng cách chữ. */

/* ---------- ô ♪ trên thanh trên (Làng nhạc, trang chủ) ---------- */
.cd-chip--pv { border: 0; cursor: pointer; font: inherit; font-weight: 700; font-size: 17px; -webkit-tap-highlight-color: transparent; }
.cd-chip--pv b { color: #8A5C0A; }
.cd-chip--pv:active { transform: scale(.96); }
.cd-chip--pv:focus-visible { box-shadow: inset 0 0 0 2px #EFE7D8, var(--focus); }
.cd-chip__pv { line-height: 0; }
.scr--cd .cd-tren { gap: 6px; }
.scr--cd .cd-tren .cd-chip { padding: 0 10px; }
@media (max-width: 380px) {
  .scr--cd .cd-hs__ten { display: none; }
  .scr--cd .cd-tren .cd-chip { padding: 0 8px; font-size: 16px; }
}
.hhead-row { display: flex; align-items: center; gap: 6px; margin: 0 0 4px; }
.hhead-row .hhead { margin: 0; flex: 0 1 auto; min-width: 0; padding-right: 12px; }
.hhead-row .hhead__track, .hhead-row .hhead__chev { display: none; }
.hso { flex: none; display: flex; gap: 4px; margin-left: auto; }
.hso .cd-chip { padding: 0 8px; font-size: 16px; min-height: 40px; }
@media (max-width: 380px) { .hhead-row .hhead .avatar { width: 40px; height: 40px; } .hso .cd-chip { padding: 0 7px; gap: 3px; } }

/* ---------- màn kết bài: số dư + "+N ♪" ---------- */
.gm-pv { position: absolute; top: calc(var(--safe-t) + 12px); right: 16px; z-index: 2; display: inline-flex; align-items: center; gap: 6px;
  min-height: 40px; padding: 0 12px 0 8px; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 2px #F2DFA8, 0 6px 16px -10px rgba(15, 3, 78, .5); }
.gm-end { position: relative; }
.gm-pv__i { line-height: 0; }
.gm-pv__so { font-size: 18px; font-weight: 700; color: #8A5C0A; font-variant-numeric: tabular-nums; }
.gm-pv.is-nhun { animation: pv-nhun .5s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes pv-nhun { 40% { transform: scale(1.22); } }
.gm-pv-them { margin: 14px 0 0; display: flex; flex-direction: column; align-items: center; gap: 2px; animation: pv-hien .45s cubic-bezier(.3, 1.4, .5, 1) both; }
.gm-pv-them__n { display: inline-block; padding: 6px 16px; border-radius: 999px; background: linear-gradient(180deg, #FFF3C4, #FFE07A);
  box-shadow: inset 0 0 0 2px #E8B53A; color: #6E4A00; font-size: 20px; font-weight: 700; white-space: nowrap; }
.gm-pv-them__l { font-size: 14px; font-weight: 600; color: var(--muted); }
.gm-pv-bay { position: fixed; z-index: 50; margin: 0; pointer-events: none; text-align: center; }
@keyframes pv-hien { from { opacity: 0; transform: translateY(10px) scale(.7); } to { opacity: 1; transform: none; } }

/* ---------- Hộp nhạc: chìa lên dây cót, hộp vàng, quà ---------- */
.cd-hop__cot { fill: #FFC93C; transform-box: fill-box; transform-origin: 0% 50%; }
.cd-hopmo__hop.is-len-day .cd-hop__cot { animation: hop-cot .3s linear 3; }
@keyframes hop-cot { 50% { transform: scaleY(-1); } }
.cd-hopmo__hop.is-len-day .cd-hop__svg { animation: cd-lac .9s ease-in-out; }
.cd-hop.is-vang .cd-hop__than, .cd-hopmo__hop.is-vang .cd-hop__than { fill: #F2B92E; }
.cd-hop.is-vang .cd-hop__dai, .cd-hop.is-vang .cd-hop__nap path,
.cd-hopmo__hop.is-vang .cd-hop__dai, .cd-hopmo__hop.is-vang .cd-hop__nap path { fill: #C08A1E; }
.cd-hop.is-vang .cd-hop__vien, .cd-hop.is-vang .cd-hop__khoa,
.cd-hopmo__hop.is-vang .cd-hop__vien, .cd-hopmo__hop.is-vang .cd-hop__khoa { fill: #FFF3C4; }
.cd-hop.is-vang .cd-hop__not, .cd-hopmo__hop.is-vang .cd-hop__not { fill: #8A5C0A; }
.cd-hopmo__goiy { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 16px; padding: 10px 12px; border-radius: 14px; background: #FFF3C4;
  color: #6E4A00; font-size: 14px; font-weight: 600; text-align: left; }
.cd-hopmo__goiy .ico { flex: none; color: #C08A1E; }
.cd-hopmo__sau { display: block; margin: 10px auto 0; min-height: 44px; }
.cd-hopmo__qua:empty { display: none; }
.cd-qua { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 0 0 18px; animation: pv-hien .5s cubic-bezier(.3, 1.4, .5, 1) .35s both; }
.cd-qua__pv { display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 8px 18px 8px 10px; border-radius: 999px;
  background: linear-gradient(180deg, #FFF3C4, #FFE07A); box-shadow: inset 0 0 0 2px #E8B53A; color: #6E4A00; font-size: 22px; font-weight: 700; }
.cd-qua__i { line-height: 0; }
.cd-qua__vp { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 12px; border-radius: 18px; background: var(--tone-l); text-align: left; }
.cd-qua__nv { flex: none; line-height: 0; }
.cd-qua__txt { display: flex; flex-direction: column; font-size: 15px; font-weight: 600; color: var(--navy); }
.cd-qua__txt b { color: var(--tone-i); font-size: 16px; }
.cd-qua__txt small { color: var(--muted); font-size: 13px; }

/* ---------- Cửa hàng (#/cua-hang) – khổ ngang, một màn hình trên nền đêm (thanh dọc + chip: khung-ngang.css, nền: hom-nay.css) ----------
 * Trái: 8 nhân vật · giữa: nhân vật lớn thử đồ + nút chính · phải: lưới món + Thẻ nghỉ. */
.pv { line-height: 0; display: inline-flex; }
.scr--shop .shop__dau { flex: 1; min-width: 0; }
.scr--shop .shop__dau .scr__title { margin: 0; font-size: 21px; line-height: 1.2; white-space: nowrap; }
.scr--shop .shop__dau .scr__title:focus { outline: none; }
.scr--shop .shop__dau .scr__sub { margin: 1px 0 0; font-size: 12.5px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scr--shop .scr__main { padding: 6px 14px 12px 16px; }
.scr--shop .scr__body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.shop__man { flex: 1; min-height: 0; display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(220px, 300px); gap: 12px; }

.shop__nv { min-height: 0; display: grid; grid-template-columns: repeat(2, 56px); grid-auto-rows: minmax(0, 64px); align-content: center; gap: 8px; }
.shop__nvb { display: grid; place-items: end center; width: 56px; height: 100%; min-height: 44px; padding: 0; overflow: hidden; cursor: pointer;
  border-radius: 16px; border: 1px solid rgba(255, 255, 255, .10); background: linear-gradient(180deg, rgba(52, 22, 140, .92), rgba(36, 12, 104, .94));
  -webkit-tap-highlight-color: transparent; }
.shop__nvb :is(svg, .nv3d img) { width: 44px; height: auto; max-height: 100%; margin-bottom: -2px; }
.shop__nvb.is-chon { background: linear-gradient(180deg, var(--tone), var(--tone-d)); border-color: rgba(255, 229, 138, .7);
  box-shadow: 0 0 0 2px rgba(255, 229, 138, .35); }
.shop__nvb:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(255, 229, 138, .8); }

.shop__xem { position: relative; min-width: 0; min-height: 0; overflow: hidden; display: flex; flex-direction: column; align-items: center;
  padding: 8px 12px 12px; border-radius: 22px; color: var(--ink); border: 1px solid rgba(255, 255, 255, .10);
  background: radial-gradient(70% 55% at 50% 72%, color-mix(in srgb, var(--tone) 42%, transparent) 0%, transparent 70%),
    linear-gradient(180deg, rgba(52, 22, 140, .9), rgba(36, 12, 104, .94)); }
.shop__san { flex: 1; min-height: 0; width: 100%; display: flex; justify-content: center; align-items: flex-end; }
.shop__san :is(svg, .nv3d img) { height: 100%; width: auto; max-height: 230px; max-width: 100%; }
.shop__ten { margin: 2px 0 0; font-size: 12.5px; font-weight: 700; color: var(--tone-n, var(--ink-2)); }
.shop__mon { margin: 0; font-size: 16px; font-weight: 700; line-height: 1.2; text-align: center; color: #fff; }
.shop__hanh { flex: none; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px 12px; margin-top: 6px; }
.shop__chinh { margin-top: 0; height: 42px; padding: 0 18px; font-size: 15px; }
.shop__chinh:disabled { background: #3A2785; color: #C9BEF0; box-shadow: 0 4px 0 #24165E; cursor: default; transform: none; }
.shop__dung { display: inline-flex; align-items: center; gap: 6px; height: 42px; padding: 0 16px; border-radius: 21px;
  background: rgba(63, 191, 106, .16); color: #8BE39A; font-size: 15px; font-weight: 700; }
.shop__coi { min-height: 40px; color: var(--ink-2); }
.shop__goiy { flex-basis: 100%; margin: 0; font-size: 12px; font-weight: 600; color: var(--ink-2); text-align: center; }

.shop__phai { min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 8px; }
.shop__luoi { flex: 1; min-height: 0; list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.shop__luoi > li { flex: 1; min-height: 0; max-height: 84px; }
.shop__mon-b { width: 100%; height: 100%; min-height: 48px; display: flex; align-items: center; gap: 10px; padding: 4px 12px 4px 6px; overflow: hidden;
  border-radius: 16px; border: 1px solid rgba(255, 255, 255, .10); background: linear-gradient(180deg, rgba(52, 22, 140, .92), rgba(36, 12, 104, .94));
  color: var(--ink); font: inherit; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.shop__mon-b.is-chon { border-color: rgba(255, 229, 138, .6); box-shadow: 0 0 0 1px rgba(255, 229, 138, .3); }
.shop__mon-b:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(255, 229, 138, .8); }
.shop__mini { flex: none; width: 50px; height: 100%; max-height: 64px; display: flex; align-items: flex-end; justify-content: center; line-height: 0;
  border-radius: 12px; background: color-mix(in srgb, var(--tone) 35%, transparent); overflow: hidden; }
.shop__mini :is(svg, .nv3d img) { width: 46px; height: auto; max-height: 100%; }
.shop__mon-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.shop__mon-t { font-size: 13.5px; font-weight: 700; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shop__gia, .shop__nhan { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 700; }
.shop__gia { color: #FFE58A; }
.shop__nhan.is-dung { color: #8BE39A; }
.shop__nhan.is-co { color: var(--ink-2); }

.shop__tn { flex: none; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 16px; color: var(--ink);
  border: 1px solid rgba(255, 255, 255, .10); background: linear-gradient(180deg, rgba(36, 52, 106, .92), rgba(22, 35, 74, .94)); }
.shop__tn-i { flex: none; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: #2F4C8A; color: #CFE0FF; }
.shop__tn-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.shop__tn-txt b { font-size: 14px; }
.shop__tn-txt small { font-size: 11.5px; font-weight: 600; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shop__tn-b { flex: none; display: inline-flex; align-items: center; gap: 4px; min-height: 40px; padding: 0 12px; border: 0; border-radius: 14px;
  background: var(--nut-xanh); color: #fff; font: 700 15px/1 "Quicksand", system-ui, sans-serif; box-shadow: 0 3px 0 var(--nut-xanh-bd); cursor: pointer; }
.shop__tn-b:disabled { background: #3A2785; color: #C9BEF0; box-shadow: 0 3px 0 #24165E; cursor: default; }
.shop__tn-b:focus-visible { outline: none; box-shadow: 0 3px 0 var(--nut-xanh-bd), 0 0 0 3px rgba(255, 229, 138, .8); }
@media (max-height: 400px) {
  .shop__nv { grid-template-columns: repeat(2, 52px); gap: 6px; }
  .shop__nvb { width: 52px; }
  .shop__nvb :is(svg, .nv3d img) { width: 40px; }
  .shop__chinh, .shop__dung { height: 40px; }
  .shop__tn { padding: 6px 10px; }
  .shop__tn-b { min-height: 40px; }
}
@media (max-width: 780px) {
  .shop__man { grid-template-columns: auto minmax(0, 1fr) minmax(206px, 240px); gap: 10px; }
  .scr--shop .shop__dau .scr__sub { display: none; }
}

/* giảm chuyển động */
html.po-giam .gm-pv.is-nhun, html.po-giam .gm-pv-them, html.po-giam .cd-qua, html.po-giam .cd-hopmo__hop.is-len-day .cd-hop__cot,
html.po-giam .cd-hopmo__hop.is-len-day .cd-hop__svg { animation: none !important; }
@media (prefers-reduced-motion: reduce) {
  .gm-pv.is-nhun, .gm-pv-them, .cd-qua, .cd-hopmo__hop.is-len-day .cd-hop__cot, .cd-hopmo__hop.is-len-day .cd-hop__svg { animation: none !important; }
}

/* Hộp nhạc trên màn thấp: hộp nhỏ hơn để phần quà vẫn nằm gọn hộp thoại */
@media (max-height: 720px) {
  .cd-hopmo { padding: 14px 20px 18px; }
  .cd-hopmo__hop { margin-top: 18px; }
  .cd-hopmo__hop .cd-hop__svg { width: 116px; height: 116px; }
  .cd-hopmo__t { font-size: 22px; }
  .cd-hopmo__p { margin-bottom: 12px; font-size: 15px; }
  .cd-qua { margin-bottom: 12px; gap: 8px; }
  .cd-qua__pv { font-size: 20px; padding: 6px 16px 6px 8px; }
}
/* Hộp nhạc vàng: quầng sáng vàng quanh hộp (trên con đường và trong hộp thoại) */
.cd-hop.is-vang:not(.is-khoa) .cd-hop__svg { filter: none; }
/* trong hộp thoại hộp lắc (có animation): quầng sáng bằng phần tử radial, không filter */
.cd-hopmo__hop.is-vang { position: relative; }
.cd-hopmo__hop.is-vang::before { content: ""; position: absolute; left: 50%; top: 50%; width: 1.5em; height: 1.5em; font-size: 160px; transform: translate(-50%, -50%); border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(255, 210, 58, .5), rgba(255, 210, 58, 0) 68%); }
.cd-hopmo__hop.is-vang .cd-hop__svg { position: relative; }
