/* Trạm Dừng Xanh — game.css (tách từ index.php v0.79) */
  * { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
  html, body { margin: 0; padding: 0; height: 100%; overflow-x: hidden; width: 100%; max-width: 100vw; }
  body {
    font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #0d2818; color: #1b2b1f; overflow: hidden;
    user-select: none; -webkit-user-select: none;
  }
  #game { max-width: 480px; width: 100%; margin: 0 auto; height: 100dvh; height: 100vh; display: flex; flex-direction: column; background: #f1f8e9; position: relative; overflow: hidden; }

  /* ===== Thanh trên ===== */
  #topbar {
    background: linear-gradient(135deg, #1b5e20, #2e7d32);
    color: #fff; padding: 8px 8px; display: flex; justify-content: space-between; align-items: center;
    gap: 4px; box-shadow: 0 2px 6px rgba(0,0,0,.25);
    position: relative; z-index: 300;   /* v0.50: luôn nằm trên mọi overlay để nút bấm được */
    overflow: hidden;   /* v0.72: không để nội dung tràn cắt icon */
  }
  /* v0.50: nút topbar không bị đè khi màn hình hẹp */
  #topbar button { flex-shrink: 0; width: 24px !important; height: 24px !important; font-size: 10px !important; }  /* v0.85: thu nhỏ hết dàn topbar theo ý anh */
  #topbar .tien { font-size: 10px; font-weight: 800; flex-shrink: 0; white-space: nowrap; }  /* v0.85: thu nhỏ chữ tiền theo ý anh */
  #topbar .capquan { flex-shrink: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }  /* v0.82: tên quán co lại khi hẹp, nhường chỗ cho tiền */
  #topbar .sao { font-size: 10px; font-weight: 700; background: rgba(255,255,255,.15); padding: 3px 8px; border-radius: 20px; white-space: nowrap; }
  #topbar .capquan { font-size: 10px; opacity: .95; text-align: right; line-height: 1.3; white-space: nowrap; }
  #topbar .thoitiet-top { flex-shrink: 0; font-size: 10px; }

  /* ===== Sân quán ===== */
  #scene { flex: 3 1 0; min-height: 0; position: relative; overflow: hidden; background-size: cover; background-position: center bottom; }  /* v0.73: nhường chỗ cho khung dịch vụ */
  /* v0.21: game 80% / bảng thông tin 20% — bảng cuộn nội bộ nếu tràn */
  #panel-duoi { display: none; }  /* v0.75: ẩn panel đáy cũ — dịch vụ chuyển sang nút trượt góc phải */
  /* v0.75: nút mũi tên + panel dịch vụ trượt ngang (demo anh duyệt) */
  #fab-dv {
    position: fixed; right: max(10px, calc((100vw - 480px) / 2 + 10px)); bottom: calc(27px + env(safe-area-inset-bottom, 0px)); z-index: 90;  /* v0.80: hạ z-index xuống dưới modal (150) để không đè nút popup */
    width: 44px; height: 44px; border-radius: 50%;
    background: #2e7d32; color: #fff; border: 2px solid #fff;
    font-size: 20px; cursor: pointer; box-shadow: 0 3px 10px rgba(0,0,0,.35);
    display: flex; align-items: center; justify-content: center; padding: 0;
  }
  #fab-dv:active { transform: scale(.93); }
  #fab-dv .dot-bao { position: absolute; top: -3px; right: -3px; width: 13px; height: 13px;
    border-radius: 50%; background: #f9a825; border: 2px solid #fff; display: none; }
  #fab-dv.co-update .dot-bao { display: block; animation: chopchop 1.6s ease-in-out infinite; }
  #dv-truot {
    position: fixed; right: max(0px, calc((100vw - 480px) / 2)); bottom: calc(23px + env(safe-area-inset-bottom, 0px)); z-index: 80; max-width: 80%;  /* v0.80: hạ z-index xuống dưới modal (150) */
    background: #e8f5e9; border: 2px solid #a5d6a7; border-right: none;
    border-radius: 16px 0 0 16px; padding: 8px 12px 8px 14px;
    transform: translateX(106%); transition: transform .28s ease;
    box-shadow: -4px 4px 16px rgba(0,0,0,.25);
  }
  #dv-truot.mo { transform: translateX(0); }
  #dv-truot .hang { display: flex; gap: 8px; overflow-x: auto; }
  /* v0.83: trên PC (màn hình rộng) — nút + panel nằm gọn trong khung game, không lồi ra nền đen */
  @media (min-width: 481px) {
    #fab-dv { position: absolute; right: 10px; bottom: 27px; }
    #dv-truot { position: absolute; right: 0; bottom: 23px; max-width: 80%; }
  }
  #scene.cap1 { background-image: url("/scene-ngay.webp"); }
  #scene.cap2 { background-image: url("/scene-dem.webp"); }
  #scene.cap3 { background-image: url("/scene-dem.webp"); }
  #scene.cap4, #scene.cap5, #scene.cap6, #scene.cap7, #scene.cap8, #scene.cap9, #scene.cap10 { background-image: url("/scene-dem.webp"); }  /* v0.61 */
  #scene::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(13,40,24,.25), transparent 45%); pointer-events: none; }
  /* v0.53: hướng dẫn tân thủ */
  #tutorial-spot { position: fixed; z-index: 401; pointer-events: none; border-radius: 14px;
    box-shadow: 0 0 0 9999px rgba(0,0,0,.62); border: 3px solid #ffeb3b; transition: all .3s ease; display: none; }
  #tutorial-finger { position: fixed; z-index: 402; font-size: 44px; pointer-events: none; display: none;
    animation: chiTay 0.9s ease-in-out infinite; filter: drop-shadow(0 3px 6px rgba(0,0,0,.4)); }
  @keyframes chiTay { 0%,100% { transform: translateY(0) rotate(-12deg); } 50% { transform: translateY(-14px) rotate(-12deg); } }
  #tutorial-tip { position: fixed; z-index: 403; display: none; max-width: 280px;
    background: #fff; border-radius: 14px; padding: 12px 14px; box-shadow: 0 6px 20px rgba(0,0,0,.35);
    border: 3px solid #43a047; font-size: 14px; color: #333; line-height: 1.5; }
  #tutorial-tip .tieu-de { font-weight: 800; color: #2e7d32; margin-bottom: 4px; font-size: 15px; }
  #tutorial-tip .nut-tiep { display: flex; gap: 8px; margin-top: 10px; }
  #tutorial-tip .nut-tiep button { flex: 1; padding: 8px; border: none; border-radius: 10px; font-weight: 700;
    cursor: pointer; font-size: 13px; }
  #tutorial-tip #tut-tieptuc { background: #43a047; color: #fff; }
  #tutorial-tip #tut-boqua { background: #e0e0e0; color: #666; }
  /* v0.44: thời tiết */
  .thoitiet-top { font-size: 18px; }
  #mua-roi { position: absolute; inset: 0; z-index: 4; pointer-events: none; display: none;
    background-image: repeating-linear-gradient(105deg, transparent 0 18px, rgba(174,194,224,.5) 18px 20px);
    animation: muaRoi .45s linear infinite; }
  #mua-roi.hien { display: block; }
  @keyframes muaRoi { from { background-position: 0 0; } to { background-position: -46px 70px; } }
  /* v0.44: chế độ ngắm quán */
  .ngam-quan #icon-noi, .ngam-quan #banbe-noi, .ngam-quan #panel-duoi, .ngam-quan #topbar { display: none !important; }
  .ngam-quan #scene { flex: 1 1 0; }
  /* v0.44: vòng quay */
  #vongquay-banh { width: 230px; height: 230px; border-radius: 50%; margin: 8px auto; position: relative;
    border: 6px solid #2e7d32; transition: transform 4s cubic-bezier(.15,.85,.25,1); }
  #vongquay-kim { position: absolute; left: 50%; top: -14px; transform: translateX(-50%); font-size: 30px; z-index: 2; }
  #vongquay-tam { position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; border-radius: 50%;
    background: #fff; border: 3px solid #2e7d32; transform: translate(-50%,-50%); font-size: 22px; line-height: 40px; }
  .nv-row { display: flex; align-items: center; gap: 8px; background: #f1f8e9; border-radius: 10px; padding: 7px 8px; margin: 5px 0; text-align: left; }
  .nv-row .tt { flex: 1; font-size: 12px; min-width: 0; }
  .nv-row .btn { width: auto; flex-shrink: 0; padding: 6px 14px; font-size: 12px; } /* v1.54: nút gọn trong dòng nv */
  .nv-row span { flex-shrink: 0; font-size: 12px; }
  .nv-thanh { height: 8px; background: #dcedc8; border-radius: 4px; margin-top: 4px; overflow: hidden; }
  .nv-thanh i { display: block; height: 100%; background: #43a047; border-radius: 4px; }
  .bxh-row { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 10px; margin: 4px 0; background: #f1f8e9; font-size: 13px; }
  .bxh-row.toi { background: #fff8e1; border: 2px solid #f9a825; font-weight: 800; }

  .khach { position: absolute; text-align: center; transform: translateX(-50%); } /* v0.11: căn giữa bằng transform — tự động chuẩn dù icon thay đổi */
  .nhu-cau { display: flex; gap: 5px; justify-content: center; margin-bottom: 10px; min-height: 44px; } /* v0.5: đẩy icon nhu cầu lên cao hơn, tránh đè nhãn tên */
  .mon { /* v0.34: món CHƯA phục vụ — đậm, nổi bật */
    width: 44px; height: 44px; border-radius: 50%; border: 2px solid #43a047; background: #ffffff;
    font-size: 23px; cursor: pointer; position: relative; padding: 0; line-height: 1;
    box-shadow: 0 2px 6px rgba(0,0,0,.3); animation: nhapnho 1.6s ease-in-out infinite;
  }
  @keyframes nhapnho { 0%,100% { transform: scale(1); } 50% { transform: scale(1.12); } }
  .mon:disabled { animation: none; cursor: default; }
  /* v0.34: món đang làm / đã phục vụ xong — mờ đi, không bấm được */
  .mon.dang-lam, .mon.xong {
    background: #eeeeee; border-color: #bdbdbd; box-shadow: none;
    opacity: .45; filter: grayscale(.7);
  }
  .mon .tien-trinh { position: absolute; left: 4px; right: 4px; bottom: 3px; height: 5px; background: rgba(0,0,0,.15); border-radius: 3px; overflow: hidden; }
  .mon .tien-trinh i { display: block; height: 100%; width: 0%; background: #fb8c00; border-radius: 3px; }
  /* v0.7: sprite tách nền chroma-key thật (sprite-tai-xe.png) — trong suốt, không khung, không viền, không đĩa tròn */
  .anh-taixe {
    /* v0.10: phóng to 100px cho cân tỉ lệ với background */
    width: 100px; height: 100px; margin: 0 auto;
    background-image: url("/sprite-tai-xe-xanhla.png"); background-size: contain; background-position: 50% 50%; background-repeat: no-repeat;
    transform-origin: 50% 92%;
  }
  .nhanvat { filter: drop-shadow(0 3px 5px rgba(0,0,0,.4)); } /* v0.6: shadow ở parent, animation walk-cycle vẫn ở .anh-taixe */
  .khach.vip .nhanvat { filter: drop-shadow(0 0 8px #ffd54f) drop-shadow(0 3px 5px rgba(0,0,0,.4)); }
  .ten-khach { display: inline-block; font-size: 10px; font-weight: 700; color: #fff; background: rgba(0,0,0,.45); border-radius: 10px; padding: 2px 8px; margin-top: 2px; white-space: nowrap; } /* v0.5: nhãn sát chân nhân vật */
  /* v0.12: thanh kiên nhẫn + biểu tượng giận dữ */
  .thanh-kien-nhan { width: 76px; height: 7px; background: rgba(0,0,0,.22); border-radius: 4px; margin: 0 auto 4px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
  .thanh-kien-nhan i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #66bb6a, #43a047); border-radius: 4px; transition: width .4s linear; }
  .thanh-kien-nhan.gan-het i { background: linear-gradient(90deg, #ffb74d, #fb8c00); }
  .gian-du { display: none; font-size: 24px; line-height: 1.2; }
  .khach.gian .gian-du { display: block; animation: gianRung .45s ease-in-out infinite; }
  @keyframes gianRung { 0%,100% { transform: rotate(-14deg) scale(1); } 50% { transform: rotate(14deg) scale(1.18); } }
  /* v0.15: khách giận nhảy lên nhảy xuống liên tục */
  .khach.gian .walker.ngoi-yen .anh-taixe { animation: gianNhay .5s ease-in-out infinite; }
  @keyframes gianNhay {
    0%,100% { transform: translateY(0) scale(1,1); }
    30% { transform: translateY(-16px) scale(.96,1.06); }
    60% { transform: translateY(0) scale(1.07,.9); }
  }
  /* v0.15: chó giữ nhà */
  /* v0.16: nhiều chó xếp hàng ngang, mỗi con một chỗ */
  /* v0.17: chó thu nhỏ, dồn gọn góc dưới cho khỏi chiếm chỗ */
  /* v0.22: dời ổ chó ra nền gạch trống theo mũi tên anh chỉ */
  /* v0.39: decor đang chờ đặt chỗ — viền xanh nhấp nháy */
  .decor-item.dang-doi { animation: decorDoi 0.8s ease-in-out infinite; z-index: 25 !important; }
  @keyframes decorDoi {
    0%, 100% { filter: drop-shadow(0 0 0 rgba(67,160,71,0)); }
    50% { filter: drop-shadow(0 0 10px rgba(67,160,71,.95)); }
  }
  #cho-nha { position: absolute; left: 3%; bottom: 28%; display: none; z-index: 6; }
  #cho-nha.co { display: flex; gap: 0; align-items: flex-end; }
  .con-cho { width: 40px; text-align: center; }
  .anh-cho { width: 36px; height: 45px; margin: 0 auto; background: url("/sprite-cho.png") center/contain no-repeat; filter: drop-shadow(0 2px 3px rgba(0,0,0,.4)); }
  /* v0.17: khách được chọn để dời chỗ */
  .khach.duoc-chon .nhanvat { filter: drop-shadow(0 0 7px #ffd54f) drop-shadow(0 3px 5px rgba(0,0,0,.4)); }
  .khach.duoc-chon::after { content: ""; position: absolute; inset: -4px; border: 2px dashed #ffd54f; border-radius: 12px; animation: chonNhay 1s ease-in-out infinite; pointer-events: none; }
  /* v0.33: khách đang chọn nổi lên trên — icon món không bị khách khác che */
  .khach.duoc-chon { z-index: 30; }
  @keyframes chonNhay { 0%,100% { opacity: .5; transform: scale(1); } 50% { opacity: 1; transform: scale(1.03); } }
  /* v0.20: ô sáng nằm sát nền đất — elip dưới đất + tay chỉ xuống đúng chỗ chân đứng */
  .o-sang { position: absolute; width: 60px; height: 24px; border-radius: 50%; border: 3px solid #ffd54f; background: rgba(255,213,79,.25); transform: translate(-50%,-50%); animation: oSangNhay 1.1s ease-in-out infinite; z-index: 40; cursor: pointer; } /* v0.33: ô sáng luôn bấm được */
  .o-sang::after { content: "👇"; position: absolute; left: 50%; bottom: 100%; transform: translateX(-50%); font-size: 26px; filter: drop-shadow(0 2px 2px rgba(0,0,0,.35)); }
  /* v0.24: ô đang có người (mờ hơn) — chạm để đổi chỗ */
  .o-sang.co-nguoi { opacity: .55; }
  .o-sang.co-nguoi::after { content: "🔄"; font-size: 22px; }
  @keyframes oSangNhay { 0%,100% { box-shadow: 0 0 0 0 rgba(255,213,79,.65); } 50% { box-shadow: 0 0 0 12px rgba(255,213,79,0); } }
  .con-cho.sua .anh-cho { animation: choSua .35s ease-in-out 6; }
  @keyframes choSua { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
  /* v0.16: khách bị chó kéo giật */
  .khach.bi-keo .walker.ngoi-yen .anh-taixe { animation: biKeoGiut .3s ease-in-out 2; }
  @keyframes biKeoGiut { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-9px) rotate(-6deg); } 75% { transform: translateX(9px) rotate(6deg); } }
  /* v0.15: hàng nút tiện ích */
  #tien-ich { display: flex; gap: 6px; padding: 0 6px 6px; background: #e8f5e9; }
  #tien-ich .btn { flex: 1; padding: 6px 4px; font-size: 11px; }
  #tien-ich small { display: block; font-size: 10px; font-weight: 400; }
  /* v0.26: icon nổi trên scene thay các nút dưới | v0.27: thu nhỏ, xếp dọc gọn bên phải */
  #icon-noi { position: absolute; right: 2%; top: 8%; z-index: 7; display: flex; flex-direction: column;
    gap: 8px; pointer-events: none; transition: opacity .2s; align-items: center; }  /* v0.50: anh chốt top 14% */
  /* v0.49: nút menu hamburger — nhỏ gọn, tự hiểu */
  #nut-menu-hbg { width: 36px; height: 36px; border-radius: 50%; border: 2px solid #2e7d32;
    background: rgba(255,255,255,.95); font-size: 17px; cursor: pointer; padding: 0;
    box-shadow: 0 3px 8px rgba(0,0,0,.3); pointer-events: auto; line-height: 1; }
  #icon-noi:not(.thu-gon) #nut-menu-hbg { display: none; }  /* mở rồi thì ẩn nút hamburger */
  #icon-noi .fic { pointer-events: auto; position: relative; }
  /* v0.40: thu gọn / xổ menu | v0.45: chia 2 cột cho gọn */
  #icon-noi .nhom-nut { display: grid; grid-template-columns: repeat(2, 38px); gap: 30px 8px; /* v0.93: tăng gap hàng 16→30px cho chữ không bị đè */
    justify-content: center; max-height: 480px; opacity: 1; overflow-y: auto; overflow-x: hidden;
    transition: max-height .28s ease, opacity .2s ease; padding: 2px 2px 16px; }
  #icon-noi.thu-gon .nhom-nut { max-height: 0; opacity: 0; overflow: hidden; padding-bottom: 0; }
  /* v0.46: nhãn nút ở chế độ 2 cột — gọn, không đè nhau */
  #icon-noi .nhom-nut .fic .nhan-fic { font-size: 8px; max-width: 58px; overflow: hidden;
    text-overflow: ellipsis; padding: 1px 4px; }
  .fic { width: 38px; height: 38px; border-radius: 50%; border: 2px solid #2e7d32;
    background: rgba(255,255,255,.95); font-size: 18px; cursor: pointer; padding: 0;
    box-shadow: 0 3px 8px rgba(0,0,0,.3); position: relative; }
  /* v0.86: chấm đỏ báo có thưởng/bị phá trên nút giải đấu */
  .fic .cham-do { position: absolute; top: -2px; right: -2px; width: 12px; height: 12px;
    background: #e53935; border: 2px solid #fff; border-radius: 50%; display: none;
    animation: nhapnhay 1s infinite; }
  .fic.co-thongbao .cham-do { display: block; }
  @keyframes nhapnhay { 0%,100% { transform: scale(1); } 50% { transform: scale(1.3); } }
  .fic .nhan-fic { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); margin-top: 3px;
    background: rgba(27,94,32,.93); color: #fff; font-size: 9px; font-weight: 700;
    padding: 1px 6px; border-radius: 7px; white-space: nowrap; line-height: 1.3; }
  .fic .nhan-fic small { display: block; font-size: 8px; font-weight: 400; opacity: .9; }
  .fic:disabled { opacity: .55; filter: grayscale(.6); cursor: default; }
  #banbe-noi { position: absolute; top: 2%; right: 2%; z-index: 7; text-align: right; transition: opacity .2s; }
  #banbe-noi .tieu-de-bb { font-size: 11px; font-weight: 800; color: #fff; text-shadow: 0 1px 3px #1b5e20; margin-bottom: 4px; }
  #banbe-noi .fav { position: relative; width: 44px; height: 44px; border-radius: 50%;
    background: rgba(255,255,255,.95); border: 3px solid #00897b; font-size: 24px; cursor: pointer;
    margin-left: 6px; padding: 0; box-shadow: 0 3px 8px rgba(0,0,0,.3); }
  #banbe-noi .fav.off { border-color: #9e9e9e; filter: grayscale(.7); opacity: .8; }
  #banbe-noi .cham-on { position: absolute; right: -2px; bottom: -2px; width: 12px; height: 12px;
    border-radius: 50%; border: 2px solid #fff; }
  #banbe-noi .cham-on.on { background: #43a047; }
  #banbe-noi .cham-on.off { background: #9e9e9e; }
  /* đang chọn khách để dời: mờ icon nổi cho dễ chạm ô sáng */
  #game.dang-chon #icon-noi, #game.dang-chon #banbe-noi { opacity: .22; pointer-events: none; }
  .dong-bb.nhan-manh { border-color: #00897b; box-shadow: 0 0 0 3px rgba(0,137,123,.35); }
  .btn-xam { background: linear-gradient(135deg, #78909c, #546e7a); }
  .btn-nau { background: linear-gradient(135deg, #a1887f, #6d4c41); }
  .btn-xanh { background: linear-gradient(135deg, #4db6ac, #00897b); }
  /* v0.15: modal thuê phục vụ */
  .goi-thue { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; }
  .goi-thue button { border: 2px solid #a5d6a7; background: #f1f8e9; border-radius: 12px; padding: 10px 4px; font-size: 13px; cursor: pointer; }
  .goi-thue button b { display: block; color: #2e7d32; font-size: 14px; margin-top: 2px; }
  .goi-thue button:disabled { opacity: .45; }
  .khach.vip .ten-khach::before { content: "⭐ "; }

  /* ===== Animation v0.3: walk-cycle procedural kiểu Spine (CSS transform, 60fps) ===== */
  .walker { } /* wrapper trơn, animation walk-cycle ở .anh-taixe */
  /* Đi bộ: nhún 2 nhịp/chu kỳ + squash & stretch + nghiêng về hướng đi */
  .walker.dang-di .anh-taixe { animation: diBo .3s ease-in-out infinite; }
  @keyframes diBo {
    0%, 100% { transform: translateY(0) scaleY(.94) scaleX(1.05) rotate(var(--lean-di, 4deg)); }
    50% { transform: translateY(-10px) scaleY(1.05) scaleX(.95) rotate(calc(var(--lean-di, 4deg) * -.5)); }
  }
  /* v1.62: walk-cycle bang JS doi frame (bo CSS walkSteps de tranh phinh to) */
  .walker.dang-di.buoc-chan .anh-taixe {
    animation: nhunNheDi .56s ease-in-out infinite;
  }
  /* v1.62: lat mat theo huong di chuyen (khong di lui) */
  /* Di vao: huong=1 la tu phai vao -> di sang trai -> lat */
  /* Di ra: huong=-1 la ra ben trai -> di sang trai -> lat */
  @keyframes nhunNheDi {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
  }
  /* Ngồi chờ: thở nhẹ */
  .walker.ngoi-yen .anh-taixe { animation: thoNhe 2.4s ease-in-out infinite; }
  @keyframes thoNhe {
    0%, 100% { transform: scaleY(1) scaleX(1) rotate(0deg); }
    50% { transform: scaleY(1.022) scaleX(.996) rotate(1.4deg); }
  }
  /* Hạt bụi bay ở chân mỗi nhịp bước */
  .hat-bui {
    position: absolute; width: 8px; height: 8px; border-radius: 50%;
    background: radial-gradient(circle, rgba(214,196,164,.85) 0%, rgba(214,196,164,0) 70%);
    z-index: 4; pointer-events: none; animation: buiBay .6s ease-out forwards;
  }
  @keyframes buiBay {
    0% { transform: translate(0, 0) scale(1); opacity: .8; }
    100% { transform: translate(var(--bx, -12px), -24px) scale(.25); opacity: 0; }
  }
  .nhu-cau { transition: opacity .25s ease, transform .25s ease; }
  .nhu-cau.an { display: none; }  /* v0.28: gọn hẳn, không chiếm chỗ */
  .nhu-cau.hien { animation: popLen .38s ease-out; }
  /* v0.30: badge số món chưa phục vụ (thay huy hiệu Mới) */
  .dem-mon { display: inline-flex; align-items: center; justify-content: center;
    min-width: 22px; height: 22px; border-radius: 50%; background: #43a047; color: #fff;
    font-size: 12px; font-weight: 800; margin-top: 3px; box-shadow: 0 2px 4px rgba(0,0,0,.25); }
  .dem-mon.an { display: none; }
  /* v0.30: vòng tiến trình giữ 3 giây để dời khách */
  #scene { touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
  .vong-giu { position: absolute; left: 50%; top: 38%; width: 88px; height: 88px; border-radius: 50%;
    transform: translate(-50%,-50%); pointer-events: none; z-index: 5;
    -webkit-mask: radial-gradient(circle, transparent 60%, #000 63%);
    mask: radial-gradient(circle, transparent 60%, #000 63%); }
  @keyframes popLen {
    0% { transform: scale(.4); opacity: 0; }
    55% { transform: scale(1.22); opacity: 1; }
    75% { transform: scale(.93); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
  }
  #co-chu { position: absolute; left: 50%; top: 22%; width: 100px; margin-left: -50px; text-align: center; }
  /* v0.9: cô chủ đứng sau quầy — vị trí khớp từng background (cap1=ngày, cap2/3=đêm) */
  /* v0.10: sprite to 100px — nâng top để chân vẫn chạm mặt quầy */
  #scene.cap1 #co-chu { left: 28%; top: 35%; }  /* v0.83: hạ xuống chạm sàn (anh chỉ) */
  #scene.cap2 #co-chu, #scene.cap3 #co-chu, #scene.cap4 #co-chu, #scene.cap5 #co-chu, #scene.cap6 #co-chu, #scene.cap7 #co-chu, #scene.cap8 #co-chu, #scene.cap9 #co-chu, #scene.cap10 #co-chu { left: 32%; top: 52%; }  /* v1.33: hạ xuống sát sàn */
  .cochu-run { position: relative; filter: drop-shadow(0 3px 5px rgba(0,0,0,.4)); } /* v0.6: shadow ở parent */
  .anh-cochu { /* v0.7: sprite tách nền chroma-key thật (sprite-co-chu.png) — trong suốt, không khung, không viền */
    /* v0.10: phóng to 100px cho cân tỉ lệ với background */
    width: 100px; height: 100px; margin: 0 auto;
    background-image: url("/sprite-co-chu.png"); background-size: contain; background-position: 50% 50%; background-repeat: no-repeat;
    transform-origin: 50% 92%;
  }
  #co-chu.nam .anh-cochu { background-image: url("/sprite-cau-chu-v2.png"); } /* v1.35: sprite cậu chủ - v1.77 bo !important de JS doi duoc walk-sheet */
  /* v0.3: chạy lean mạnh về trước + squash mạnh + vệt chuyển động phía sau */
  #co-chu.dang-chay .anh-cochu { animation: chayVoi .18s linear infinite; transform-origin: 50% 92%; }
  @keyframes chayVoi {
    0%, 100% { transform: translateY(0) rotate(var(--lean-chay, 12deg)) scaleY(.9) scaleX(1.07); }
    50% { transform: translateY(-12px) rotate(var(--lean-chay, 12deg)) scaleY(1.06) scaleX(.94); }
  }
  /* Phanh khi tới nơi: nghiêng ngược nhẹ 0.15s rồi mới hiện tia sáng */
  #co-chu.phanh .anh-cochu { animation: phanhLai .15s ease-out; transform-origin: 50% 92%; }
  @keyframes phanhLai {
    0% { transform: rotate(calc(var(--lean-chay, 12deg) * -.6)) scaleY(1.07) scaleX(.95); }
    100% { transform: rotate(0deg) scaleY(1) scaleX(1); }
  }
  .veo-sau {
    display: none; position: absolute; top: 8px; width: 42px; height: 50px;
    background: repeating-linear-gradient(to bottom, transparent 0 8px, rgba(255,255,255,.5) 8px 11px, transparent 11px 16px);
    filter: blur(1.5px); pointer-events: none;
  }
  #co-chu.dang-chay .veo-sau { display: block; animation: veoDong .18s linear infinite; }
  @keyframes veoDong { 0% { opacity: .4; } 100% { opacity: .9; } }
  .ten-cochu { display: inline-block; font-size: 10px; font-weight: 700; color: #fff; background: rgba(0,0,0,.45); border-radius: 10px; padding: 2px 8px; margin-top: 2px; white-space: nowrap; }
  .tia-sang {
    position: absolute; z-index: 31; font-size: 26px; pointer-events: none;
    animation: noSang .6s ease-out forwards;
  }
  @keyframes noSang {
    0% { transform: scale(.3) rotate(0deg); opacity: 1; }
    100% { transform: scale(1.7) rotate(40deg) translateY(-16px); opacity: 0; }
  }

  .tien-bay {
    position: absolute; z-index: 30; font-weight: 800; font-size: 17px; color: #1b5e20;
    text-shadow: 0 1px 0 #fff, 0 0 6px rgba(255,255,255,.9); pointer-events: none;
    animation: baylen 1.4s ease-out forwards; white-space: nowrap;
  }
  .tien-bay.tip { color: #ef6c00; font-size: 15px; }
  @keyframes baylen { 0% { transform: translateY(0); opacity: 1; } 100% { transform: translateY(-64px); opacity: 0; } }

  /* ===== Thanh dịch vụ ===== */
  #dichvu { background: #e8f5e9; border-top: 2px solid #a5d6a7; padding: 0 2px 2px; position: relative; }  /* v0.58: sát vạch xanh */
  #dichvu .hang { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; }
  /* v0.41: thu gọn thanh dịch vụ */
  #thanh-dv-mini { display: none; align-items: center; justify-content: center; gap: 8px;
    padding: 6px 4px; font-size: 12px; font-weight: 800; color: #2e7d32; cursor: pointer;
    border-radius: 8px; }
  #thanh-dv-mini .mo-mini { font-size: 10px; opacity: .7; }
  #thanh-dv-mini .an { display: none; }
  #dichvu.thu-gon { padding: 2px 5px; }
  #dichvu.thu-gon .hang { display: none; }
  #dichvu.thu-gon #thanh-dv-mini { display: flex; }
  /* v0.43: chỉ chớp opacity nhẹ, KHÔNG scale để khỏi giật */
  @keyframes chopchop { 0%,100% { opacity: 1; } 50% { opacity: .45; } }
  #thanh-dv-mini.co-update { background: #fff8e1; border: 2px dashed #f9a825; }
  #bao-nangcap { display: inline-block; animation: chopchop 1.6s ease-in-out infinite; }
  /* v0.21: thẻ dịch vụ thu gọn cho vừa 20% */
  /* v0.55: PA2 — thanh icon dịch vụ gọn nhất */
  #hang-dv { display: flex; gap: 10px; padding: 9px 12px 2px; overflow-x: auto; justify-content: flex-start; }  /* v0.58: sát vạch xanh */
  .icon-dv { position: relative; flex: 0 0 auto; width: 52px; height: 52px; border-radius: 16px;
    background: #fff; border: 2px solid #a5d6a7; font-size: 26px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,.12); }
  .icon-dv .badge-cap { position: absolute; top: -8px; right: -8px; background: #ff9800; color: #fff;
    font-size: 10px; font-weight: 800; border-radius: 10px; padding: 2px 7px;
    box-shadow: 0 1px 3px rgba(0,0,0,.3); }
  .icon-dv .dot-up { position: absolute; bottom: -4px; right: -4px; width: 18px; height: 18px;
    background: #43a047; border-radius: 50%; color: #fff; font-size: 12px; line-height: 1;
    display: flex; align-items: center; justify-content: center; border: 2px solid #fff;
    animation: nhapnhay 1.2s ease-in-out infinite; }
  @keyframes nhapnhay { 0%,100% { transform: scale(1); } 50% { transform: scale(1.25); } }
  .icon-dv.khoa { opacity: .45; filter: grayscale(.6); }
  .icon-dv.khoa .badge-cap { background: #999; }
  /* popup chi tiết dịch vụ */
  #popup-dv .nd { max-width: 320px; text-align: center; }
  #popup-dv .dv-icon-big { font-size: 52px; margin-bottom: 4px; }
  #popup-dv .dv-ten { font-size: 18px; font-weight: 800; color: #2e7d32; margin-bottom: 6px; }
  #popup-dv .dv-thongtin { font-size: 13px; color: #222; font-weight: 600; line-height: 1.8; margin-bottom: 12px;
    background: #f1f8e9; border-radius: 10px; padding: 8px 12px; }  /* v0.60: chữ đậm + nền nhẹ cho nổi */
  #popup-dv .dv-nut { display: flex; gap: 8px; }
  #popup-dv .dv-nut .btn { flex: 1; }
  /* v0.11: mỗi dịch vụ một màu gradient + watermark icon trang trí */
  .the-dv.dv-sac  { background: linear-gradient(135deg, #e8f5e9, #c8e6c9); border-color: #a5d6a7; border-left-color: #43a047; }
  .the-dv.dv-nuoc { background: linear-gradient(135deg, #f3ece4, #e3d3bf); border-color: #cbb79f; border-left-color: #8d6e63; }
  .the-dv.dv-an   { background: linear-gradient(135deg, #fff8e1, #ffecb3); border-color: #ffe082; border-left-color: #f9a825; }
  .the-dv.dv-tam  { background: linear-gradient(135deg, #e0f7fa, #b2ebf2); border-color: #80deea; border-left-color: #00acc1; }
  .the-dv::after {
    content: attr(data-icon); position: absolute; right: -4px; bottom: -10px; font-size: 46px;
    opacity: .14; pointer-events: none; transform: rotate(-12deg);
  }
  .the-dv.khoa { opacity: .55; }
  .the-dv.khoa::after { opacity: .07; }
  .the-dv .ten { font-weight: 800; font-size: 12px; position: relative; }
  .the-dv .cap { color: #2e7d32; font-weight: 700; position: relative; }
  .the-dv .tt { color: #555; margin: 1px 0 4px; line-height: 1.3; position: relative; }
  .the-dv .btn { position: relative; padding: 5px 4px; font-size: 11px; }
  .btn {
    display: block; width: 100%; border: none; border-radius: 8px; padding: 7px 4px; font-size: 12px; font-weight: 800;
    background: linear-gradient(135deg, #43a047, #2e7d32); color: #fff; cursor: pointer;
  }
  .btn:disabled { background: #bdbdbd; cursor: default; }
  .btn-cam { background: linear-gradient(135deg, #fb8c00, #ef6c00); }
  .btn-vang { background: linear-gradient(135deg, #fdd835, #f9a825); color: #4e342e; }

  #hanhdong { display: flex; gap: 6px; padding: 5px 6px; background: #e8f5e9; }
  #hanhdong .btn { padding: 8px 4px; font-size: 13px; }
  #moi-khach small { display: block; font-size: 10px; font-weight: 400; }

  /* ===== Modal ===== */
  #modal { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 100; display: none; align-items: flex-end; justify-content: center; }
  #modal.mo { display: flex; }
  #panel { background: #fbfdf7; width: 100%; max-width: 480px; max-height: 82dvh; overflow-y: auto; border-radius: 18px 18px 0 0; padding: 16px 14px 24px; }
  #panel h3 { margin: 0 0 4px; color: #1b5e20; }
  #panel .dong-nc { display: flex; justify-content: space-between; align-items: center; background: #fff; border: 1px solid #dcedc8; border-radius: 10px; padding: 10px; margin: 8px 0; font-size: 13px; }
  #panel .dong-nc .trai { line-height: 1.5; }
  #panel .dong-nc .btn { width: auto; padding: 8px 12px; }
  #dong-panel { text-align: right; margin-bottom: 6px; }
  #dong-panel button { border: none; background: #e0e0e0; border-radius: 50%; width: 32px; height: 32px; font-size: 16px; cursor: pointer; }

  #toast {
    position: fixed; left: 50%; bottom: 320px; transform: translateX(-50%); z-index: 200;
    background: #33691e; color: #fff; padding: 10px 18px; border-radius: 24px; font-size: 14px; font-weight: 600;
    display: none; box-shadow: 0 4px 12px rgba(0,0,0,.3); max-width: 90%; text-align: center;
  }
  #offline-modal .nd, #hint .nd, #thue-modal .nd, #banbe-modal .nd, #nhiemvu-modal .nd, #duatop-modal .nd, #vongquay-modal .nd, #admin-popup .nd, #noti-modal .nd { background: #fff; border-radius: 16px; padding: 22px; margin: 0 24px; text-align: center; border-top: 6px solid #43a047; max-width: 340px; }
  #offline-modal h3, #hint h3, #thue-modal h3, #banbe-modal h3, #nhiemvu-modal h3, #duatop-modal h3, #vongquay-modal h3 { color: #1b5e20; margin-top: 0; }
  #offline-modal h3, #hint h3, #thue-modal h3, #banbe-modal h3 { color: #1b5e20; margin-top: 0; }
  /* v0.25: bạn bè */
  .dong-bb { background: #fff; border: 1px solid #dcedc8; border-radius: 12px; padding: 10px; margin: 8px 0; text-align: left; }
  .tt-bb { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; font-size: 13px; }
  .av-bb { font-size: 30px; }
  .tt-bb small { color: #666; }
  .hn-bb { display: flex; gap: 6px; }
  .hn-bb button { flex: 1; border-radius: 8px; padding: 8px 2px; font-size: 11px; font-weight: 700; cursor: pointer; background: #e8f5e9; color: #2e7d32; border: 1px solid #a5d6a7; }
  .hn-bb button:disabled { opacity: .45; cursor: default; }
  #thue-modal .nd p { font-size: 13px; color: #555; margin: 6px 0; }
  .full-modal { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 150; display: none; align-items: center; justify-content: center; }
  .full-modal.mo { display: flex; }
  /* v0.35: cửa hàng */
  .shop-tabs { display: flex; gap: 6px; margin: 8px 0; }
  .shop-tabs button { flex: 1; border-radius: 10px; padding: 9px 2px; font-size: 12px; font-weight: 800; cursor: pointer; background: #e8f5e9; color: #2e7d32; border: 2px solid #a5d6a7; }
  .shop-tabs button.on { background: #43a047; color: #fff; border-color: #2e7d32; }
  #shop-nd { max-height: 46vh; overflow-y: auto; margin-bottom: 8px; }
  .luoi-bg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .o-bg { border: 2px solid #c8e6c9; border-radius: 10px; overflow: hidden; background: #f1f8e9; }
  .o-bg.dang-dung { border-color: #43a047; box-shadow: 0 0 0 2px #a5d6a7; }
  .o-bg img { width: 100%; height: 74px; object-fit: cover; display: block; }
  .o-bg .ten-bg { font-size: 12px; font-weight: 800; color: #2e7d32; padding: 4px 6px 0; }
  .o-bg button { width: calc(100% - 12px); margin: 4px 6px 6px; border-radius: 8px; padding: 7px 2px; font-size: 12px; font-weight: 800; cursor: pointer; border: none; }
  .o-bg .mua { background: #43a047; color: #fff; }
  .o-bg .dung { background: #e8f5e9; color: #2e7d32; border: 1px solid #a5d6a7; }
  .o-bg .dangdung { background: #c8e6c9; color: #1b5e20; }
  .o-bg button:disabled { opacity: .5; cursor: default; }
  .mon-shop { display: flex; align-items: center; gap: 8px; background: #f1f8e9; border: 2px solid #c8e6c9; border-radius: 10px; padding: 8px; margin-bottom: 8px; }
  .mon-shop .ic { font-size: 30px; }
  .mon-shop .tt { flex: 1; }
  .mon-shop .tt b { font-size: 13px; color: #1b5e20; }
  .mon-shop .tt small { display: block; font-size: 11px; color: #666; }
  .mon-shop .tt .conlai { color: #2e7d32; font-weight: 800; }
  .mon-shop button { border-radius: 8px; padding: 9px 12px; font-size: 12px; font-weight: 800; cursor: pointer; background: #43a047; color: #fff; border: none; white-space: nowrap; }
  .mon-shop button:disabled { opacity: .5; cursor: default; }

/* ===== login overlay (v0.79: gộp từ block style thứ 2) ===== */
  /* v03 bản web: màn hình đăng nhập */
  #login-overlay { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #1b5e20, #2e7d32, #43a047); }
  #login-overlay .hop { background: #fff; border-radius: 18px; padding: 28px 24px; text-align: center;
    max-width: 320px; width: 88%; box-shadow: 0 8px 32px rgba(0,0,0,.3); }
  #login-overlay h2 { color: #2e7d32; margin: 0 0 6px; font-size: 22px; }
  #login-overlay p { color: #666; font-size: 13px; margin: 0 0 18px; }
  #login-overlay .nut-login { display: flex; align-items: center; justify-content: center; gap: 10px;
    width: 100%; padding: 12px; margin: 8px 0; border: 1px solid #ddd; border-radius: 12px;
    font-size: 15px; font-weight: 700; cursor: pointer; background: #fff; }
  #login-overlay .nut-login:active { transform: scale(.97); }
  #login-overlay .nut-login.gg { color: #333; }

/* v1.42: khách vẫy tay chào lại khi ra về (sprite vẫy tay thật + nhún nhảy) */
.khach.dang-vay-tay .walker { animation: khachNhunVay .38s ease-in-out infinite; }
@keyframes khachNhunVay {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-7px) rotate(2deg); }
}

/* v1.62-test: procedural animation chu quan */
/* Idle: tho nhe khi dung yen */
#co-chu:not(.dang-chay):not(.phanh) .anh-cochu { animation: thoNhe 2.4s ease-in-out infinite; }
@keyframes thoNhe { 0%,100% { transform: scaleY(1); } 50% { transform: scaleY(1.03) translateY(-2px); } }
/* Wave/Bow: dung voi sprite doi bang JS */
@keyframes vayTayAnim { 0%,100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg) translateY(-4px); } }
@keyframes cuiChaoAnim { 0%,100% { transform: translateY(0) scaleY(1); } 30%,60% { transform: translateY(6px) scaleY(.97); } }

/* ===== v1.80: GIAO DIỆN V2 (gọn) ===== */
#game.theme-v2 #scene { flex: 5 1 0; }
/* Badge cấp quán nổi bật */
#game.theme-v2 #topbar .capquan { background: #f9a825; color: #1b5e20; font-weight: 800; padding: 4px 12px; border-radius: 15px; border: 2px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.3); }
/* Nút nâng cấp nổi bật khi đủ tiền */
#nang-cap-quan.du-tien { border: 2px solid #f9a825 !important; animation: nutSang 1.2s ease-in-out infinite; }
@keyframes nutSang { 0%,100% { box-shadow: 0 0 0 0 rgba(249,168,37,.7); } 50% { box-shadow: 0 0 12px 4px rgba(249,168,37,.7); } }
/* Dịch vụ gọn hơn ở theme v2 */
#game.theme-v2 #dv-truot { padding: 6px 10px 6px 12px; }
/* Icon menu gọn hơn ở theme v2 */
#game.theme-v2 #icon-noi .fic { transform: scale(.92); }
/* ===== v1.81: V2 đổi tông xanh dương cho dễ phân biệt ===== */
#game.theme-v2 #topbar { background: linear-gradient(135deg, #0d47a1, #1e88e5); }
#game.theme-v2 #icon-noi .nhom-nut { background: rgba(13,71,161,.92); }
#game.theme-v2 #icon-noi .fic { background: rgba(255,255,255,.14); }
#game.theme-v2 #nut-menu-hbg { background: #0d47a1; }
#game.theme-v2 #dv-truot { background: #e3f2fd; border-color: #90caf9; }
#game.theme-v2 #panel-duoi { background: #0d47a1; }
#game.theme-v2 .full-modal .nd { border-color: #1e88e5; }
#game.theme-v2 #nut-theme { background: linear-gradient(135deg,#0d47a1,#1e88e5) !important; }
/* v1.80: background scene luôn full mobile */
#scene { background-color: #87ceeb; }
@media (max-width: 480px) {
  #scene { background-size: cover; background-position: center; min-height: 0; }
  #game { height: 100dvh; }
}
/* v1.82: tên dịch vụ trong chip — ẩn ở v1 */
.ten-dv-chip { display: none; }

/* ===== v1.82: GIAO DIỆN V2 đúng demo bố cục gọn ===== */
/* Dịch vụ: thanh chip trượt ngang dưới scene */
#game.theme-v2 #fab-dv { display: none; }
#game.theme-v2 #dv-truot {
  position: absolute; left: 0; right: 0; bottom: 62px; top: auto;
  transform: none; max-width: 100%;
  background: #fff; border: none; border-top: 2px solid #90caf9; border-bottom: 2px solid #90caf9;
  border-radius: 0; padding: 8px 10px; box-shadow: none;
}
#game.theme-v2 #dv-truot .hang { gap: 8px; }
#game.theme-v2 .icon-dv {
  display: flex; align-items: center; gap: 6px;
  background: #e3f2fd; border: 1px solid #90caf9; border-radius: 20px;
  padding: 6px 12px 6px 8px; font-size: 18px; width: auto; height: auto;
}
#game.theme-v2 .ten-dv-chip { display: inline; font-size: 11px; font-weight: 700; color: #0d47a1; white-space: nowrap; }
#game.theme-v2 .icon-dv .badge-cap { position: static; margin-left: 2px; }
/* Menu: hàng ngang dưới đáy, cuộn ngang */
#game.theme-v2 #icon-noi {
  top: auto; bottom: 0; left: 0; right: 0;
  flex-direction: row; align-items: center;
}
/* v1.83: mobile tránh safe-area, không bị cắt đoạn dưới */
#game.theme-v2 #dv-truot {
  padding-bottom: max(8px, env(safe-area-inset-bottom, 0px));
}
@media (max-width: 480px) {
  #game.theme-v2 #icon-noi { bottom: 0; }
  #game.theme-v2 #nut-nangcap-noi { bottom: 140px; }
}
/* v1.84: menu nổi lên trên thanh dịch vụ, không bị đè */
#game.theme-v2 #icon-noi { z-index: 85; bottom: 0; }
#game.theme-v2 #icon-noi .nhom-nut { border-radius: 0; }
#game.theme-v2 #icon-noi .nhom-nut { box-shadow: 0 4px 12px rgba(0,0,0,.3); }
#game.theme-v2 #icon-noi .nhom-nut {
  display: flex; flex-direction: row; gap: 4px;
  overflow-x: auto; max-width: 100%; width: 100%; padding: 8px 6px;
  background: #1b5e20; border-radius: 0; justify-content: space-around;
}
#game.theme-v2 #icon-noi.thu-gon .nhom-nut { display: none; }
#game.theme-v2 #nut-menu-hbg { background: #0d47a1; border-color: #fff; }
/* Nút nâng cấp nổi trên scene */
#nut-nangcap-noi {
  position: absolute; bottom: 190px; right: 10px; z-index: 75;
  background: linear-gradient(135deg, #f9a825, #ff8f00); color: #fff;
  border: 2px solid #fff; border-radius: 12px; padding: 8px 12px;
  font-family: inherit; font-weight: 800; font-size: 12px; cursor: pointer;
  box-shadow: 0 4px 15px rgba(249,168,37,.6); text-align: center;
}
#nut-nangcap-noi small { display: block; font-size: 10px; font-weight: 400; }
#nut-nangcap-noi.du-tien { animation: nutSang 1.2s ease-in-out infinite; }

/* v1.87: nút menu v2 trên nền xanh lá */
#game.theme-v2 #icon-noi .nhom-nut .fic { background: rgba(255,255,255,.15); flex-shrink: 0; }
#game.theme-v2 #icon-noi .nhom-nut .fic .nhan-fic { color: #fff; }
/* v1.85: popup mục phụ của menu v2 */
#popup-them-v2 {
  position: absolute; left: 0; right: 0; bottom: 0; top: 0; z-index: 90;
  background: rgba(0,0,0,.5); display: flex; flex-direction: column;
  align-items: center; justify-content: flex-end; padding-bottom: 140px; gap: 8px;
}
#popup-them-v2 button {
  background: #fff; border: 2px solid #1e88e5; border-radius: 12px;
  padding: 10px 20px; font-family: inherit; font-size: 14px; font-weight: 700; color: #0d47a1;
  display: flex; align-items: center; gap: 8px; min-width: 200px; justify-content: flex-start; cursor: pointer;
}
#popup-them-v2 button .em { font-size: 20px; }

/* v1.88: nút bạn bè góc trên trái ở v2 */
#game.theme-v2 #nut-banbe-nhanh.bb-goc-trai {
  position: absolute; top: 10px; left: 10px; z-index: 75;
  width: 44px; height: 44px; border-radius: 50%;
  background: #1b5e20; border: 2px solid #fff; font-size: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,.3);
}
/* v1.88: menu full width, cao giáp mí dịch vụ, luôn hiện không thu gọn */
#game.theme-v2 #icon-noi .nhom-nut { padding: 10px 6px; }
#game.theme-v2 #icon-noi .nhom-nut .fic { padding: 8px 6px; }
#game.theme-v2 #icon-noi.thu-gon .nhom-nut { display: flex !important; max-height: none !important; opacity: 1 !important; }
#game.theme-v2 #nut-menu-hbg { display: none !important; }
#game.theme-v2 #dv-truot { bottom: 64px; }

/* v1.89: popup nâng cấp nhà */
#popup-nangcap {
  position: absolute; inset: 0; z-index: 200;
  background: rgba(0,0,0,.55); display: flex; align-items: center; justify-content: center;
}
#popup-nangcap .hop-nangcap {
  background: #fff; border-radius: 16px; padding: 20px 24px; text-align: center;
  border: 3px solid #f9a825; max-width: 85%; box-shadow: 0 8px 30px rgba(0,0,0,.4);
}
#popup-nangcap .hop-nangcap h3 { margin: 0 0 10px; color: #1b5e20; font-size: 18px; }
#popup-nangcap .hop-nangcap p { margin: 6px 0; font-size: 14px; color: #333; }
#popup-nangcap .hop-nangcap button {
  font-family: inherit; font-weight: 800; border: none; border-radius: 10px;
  padding: 10px 20px; margin: 8px 4px 0; cursor: pointer; font-size: 14px;
}
#btn-nangcap-ok { background: linear-gradient(135deg,#f9a825,#ff8f00); color: #fff; }
#btn-nangcap-ok:disabled { background: #ccc; }
#btn-nangcap-dong { background: #e0e0e0; color: #555; }
/* v1.89: badge topbar v2 thành nút bấm */
#game.theme-v2 #topbar .capquan { cursor: pointer; }

/* v1.90: ẩn thanh cuộn ở thanh dịch vụ v2 */
#game.theme-v2 #dv-truot .hang { scrollbar-width: none; -ms-overflow-style: none; }
#game.theme-v2 #dv-truot .hang::-webkit-scrollbar { display: none; width: 0; height: 0; }

/* v1.91: nút mũi tên cuộn thanh dịch vụ v2 */
#dv-mui-trai, #dv-mui-phai {
  display: none;
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 28px; height: 28px; border-radius: 50%; z-index: 5;
  background: #1b5e20; color: #fff; border: 2px solid #fff;
  font-size: 12px; cursor: pointer; box-shadow: 0 2px 6px rgba(0,0,0,.3);
  font-family: inherit;
}
#game.theme-v2 #dv-mui-trai, #game.theme-v2 #dv-mui-phai { display: block; }
#dv-mui-trai { left: 2px; }
#dv-mui-phai { right: 2px; }
#game.theme-v2 #dv-truot .hang { cursor: grab; padding: 0 30px; }

/* v1.92: tap nhân vật ẩn thanh menu + dịch vụ */
#game.theme-v2 #icon-noi, #game.theme-v2 #dv-truot { transition: transform .3s ease; }
#game.theme-v2.an-thanh #icon-noi { transform: translateY(120%); }
#game.theme-v2.an-thanh #dv-truot { transform: translateY(120%); }
#game.theme-v2.an-thanh #nut-banbe-nhanh.bb-goc-trai { opacity: .3; }

/* v1.94: khách và chủ quán nổi trên decor (không bị vật phẩm đè) */
.khach { z-index: 7; }
#co-chu { z-index: 7; }
/* v1.94: chỉnh vị trí chủ quán ở theme v2 cho chạm sàn */
#game.theme-v2 #scene.cap1 #co-chu { left: 28%; top: 48%; }
#game.theme-v2 #scene.cap2 #co-chu, #game.theme-v2 #scene.cap3 #co-chu, #game.theme-v2 #scene.cap4 #co-chu, #game.theme-v2 #scene.cap5 #co-chu, #game.theme-v2 #scene.cap6 #co-chu, #game.theme-v2 #scene.cap7 #co-chu, #game.theme-v2 #scene.cap8 #co-chu, #game.theme-v2 #scene.cap9 #co-chu, #game.theme-v2 #scene.cap10 #co-chu { left: 32%; top: 64%; }
