:root{--cream:#fff7e8;--paper:#fffdf6;--ink:#4a3426;--brown:#8c5a35;--pink:#ef6d8f;--blue:#4f9fd8;--green:#45a66a;--line:#d7b98d}
#tthms-app{font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--ink);background:#f5ead7}
.tthms{width:min(100%,760px);margin:0 auto;background:#f8edd9;overflow:hidden;box-shadow:0 12px 40px #0002}
.tthms *{box-sizing:border-box}.game-top{display:block;padding:10px 12px;background:#fff7e9;border-bottom:1px solid #ead7ba;} .game-top-main{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:8px}.top-left{display:flex;align-items:center;gap:8px}.day b{display:block;font-size:19px;line-height:1}.day span{font-size:12px;color:#806d5c}.shop-title{text-align:center;font-weight:900;color:#bd5571;font-size:13px}.shop-title strong{display:block;color:#5a3827;font-size:24px;line-height:1}.top-right{text-align:right}.stars{font-size:20px;letter-spacing:1px;color:#efb53c;white-space:nowrap}.stars small{display:block;font-size:11px;color:#806d5c;letter-spacing:0}.game-stage{padding:0 10px 10px;background:#f6ead6}.scene{position:relative;aspect-ratio:709/1000;min-height:680px;overflow:hidden;border:2px solid #b77e5d;background:#f7e4c3 center/cover no-repeat url('../images/tiem-tap-hoa-portrait-bg.jpg');box-shadow:inset 0 0 0 9999px #fff1e20d}.awning{height:54px;background:repeating-linear-gradient(90deg,#f06488 0 52px,#fff8ec 52px 104px);border-bottom:3px solid #9e5d55;clip-path:polygon(0 0,100% 0,100% 72%,96% 100%,92% 72%,88% 100%,84% 72%,80% 100%,76% 72%,72% 100%,68% 72%,64% 100%,60% 72%,56% 100%,52% 72%,48% 100%,44% 72%,40% 100%,36% 72%,32% 100%,28% 72%,24% 100%,20% 72%,16% 100%,12% 72%,8% 100%,4% 72%,0 100%)}.hud-bubbles{position:absolute;top:64px;left:14px;display:flex;gap:6px;z-index:12}.avatar-bubble{width:55px;height:55px;border:4px solid #f7b1c5;border-radius:50%;background:#fff;display:grid;place-items:center;font-size:28px;box-shadow:0 3px 8px #0003}.avatar-bubble.active{outline:3px solid #55bd93;outline-offset:-6px}.customer-dialog{position:absolute;top:118px;left:13%;right:7%;z-index:11;background:#fff9ec;border:2px solid #a77859;border-radius:20px;padding:13px 14px 11px;box-shadow:0 5px 12px #0003}.customer-dialog:before{content:"";position:absolute;left:10%;bottom:-16px;border:10px solid transparent;border-top-color:#a77859}.dialog-title{font-size:16px;font-weight:900;line-height:1.35}.dialog-title em{color:#d95e77;font-style:normal}.dialog-meta{font-size:10px;font-weight:800;margin-top:9px}.patience{height:9px;background:#f0e1cc;border:1px solid #a68b70;border-radius:10px;overflow:hidden;margin-top:4px}.patience i{display:block;height:100%;width:70%;background:#6ec487}.guide{position:absolute;top:235px;left:18%;right:18%;z-index:12;background:#3e8fca;color:#fff;border:0;border-radius:11px;padding:10px 12px;text-align:center;font-weight:900;box-shadow:0 4px 0 #276d9e;font-size:13px}.counter{position:absolute;left:5%;right:5%;top:33%;bottom:24%;z-index:5}.counter-board{position:absolute;left:0;right:0;top:0;height:27%;background:#f7ead2;border:3px solid #8f5c40;border-radius:14px 14px 6px 6px;box-shadow:0 5px 0 #b87959}.counter-label{position:absolute;left:10px;top:10px;background:#ffe4ae;border:2px solid #9c6846;border-radius:8px;padding:6px 10px;font-weight:900;font-size:12px}.checkout{position:absolute;right:7%;top:8px;font-size:45px}.product-trays{position:absolute;left:8%;right:4%;top:30%;bottom:0;display:grid;grid-template-columns:repeat(4,1fr);gap:6px;align-content:start}.tray{position:relative;min-height:86px;border:3px solid #777;background:#fff9ef;border-radius:12px;box-shadow:0 3px 0 #a08d78;display:flex;align-items:center;justify-content:center;flex-direction:column;padding:5px;overflow:hidden}.tray.has-stock{background:linear-gradient(#fffdf6,#f8e7cb)}.tray .tray-icon{font-size:30px;line-height:1}.tray b{font-size:9px;text-align:center;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.qty{position:absolute;right:4px;top:4px;background:#f1c98e;border:2px solid #805d40;border-radius:50%;min-width:24px;height:24px;display:grid;place-items:center;font-size:10px}.empty-lock{opacity:.35;font-size:24px}.store-tools{position:absolute;right:4%;bottom:7%;display:flex;flex-direction:column;gap:7px;z-index:10}.store-tools button{border:2px solid #8b6046;background:#fff7e8;color:#563a2a;border-radius:10px;padding:8px 10px;font-weight:900;font-size:11px;box-shadow:0 3px 0 #c69b76}.store-tools button.primary{background:#4f9fd8;color:#fff;border-color:#327eae}.store-tools button.green{background:#58a86d;color:#fff;border-color:#3b8250}.status-pill{position:absolute;right:8px;top:8px;background:#fff9e9dd;border:2px solid #8e674e;border-radius:10px;padding:5px 8px;font-size:10px;font-weight:900;z-index:14}.queue{position:absolute;left:5%;right:5%;bottom:31%;z-index:13;display:flex;gap:6px;justify-content:center}.queue-card{background:#fff9ee;border:2px solid #956548;border-radius:10px;padding:5px 7px;font-size:9px;max-width:48%;box-shadow:0 3px 7px #0003}.queue-card b{display:block}.queue-card button{margin-top:4px;border:0;border-radius:6px;padding:5px 6px;font-size:9px;font-weight:900}.pay{background:#3e9859;color:#fff}.leave{background:#c05c62;color:#fff}.game-bottom{padding:10px;background:#f6ead7;border-top:1px solid #e1c8a5}.action-row{display:grid;grid-template-columns:repeat(4,1fr);gap:6px}.action-row button{border:0;border-radius:10px;background:#8b5b3a;color:#fff;padding:10px 5px;font-size:10px;font-weight:900}.money-row{margin-top:7px;background:#fff8ea;border:1px solid #dec49f;border-radius:10px;padding:8px;font-size:11px;font-weight:800;display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap}.reviews-box{padding:10px;background:#fff8ea;border-top:2px solid #ddc29d}.reviews-box h3{font-size:13px;margin:0 0 6px}.review-item{font-size:10px;padding:6px;border-radius:7px;margin:4px 0}.review-item.good{background:#e9f8e9}.review-item.bad{background:#fff0f0}.modal{display:none}.modal.show{display:flex;position:fixed;inset:0;background:#0007;z-index:50;align-items:center;justify-content:center;padding:12px}.box{background:#fff8ec;width:min(720px,96%);max-height:90vh;overflow:auto;border-radius:18px;padding:15px}.row{display:grid;grid-template-columns:1.3fr .9fr 70px 65px;gap:6px;align-items:center;padding:8px 0;border-bottom:1px solid #ead9c2}.row input{width:65px;padding:7px}.row button,.box button{border:0;border-radius:8px;padding:8px;background:#8b5b3a;color:#fff;font-weight:800}.close{margin-top:10px}.auth-game{min-height:100dvh;width:100vw;max-width:100vw;margin-left:calc(50% - 50vw);display:flex;align-items:center;justify-content:center;background:#7ec7e8 center/cover no-repeat url('../images/tiem-tap-hoa-login-bg.jpg');padding:18px 12px;position:relative;overflow:hidden}.auth-game:before{content:"";position:absolute;inset:0;background:linear-gradient(180deg,rgba(255,239,194,.08),rgba(76,42,25,.18));pointer-events:none}.auth-box{position:relative;z-index:2;width:min(420px,94%);background:rgba(255,250,240,.96);backdrop-filter:blur(2px);border:4px solid #8c5a35;border-radius:22px;padding:24px;box-shadow:0 15px 40px #0005;text-align:center}.auth-logo{font-size:58px}.auth-box h1{margin:5px 0}.auth-box p{color:#777}.auth-tabs{display:flex;gap:7px;margin:18px 0 10px}.auth-tabs button{flex:1;border:0;border-radius:10px;padding:11px;font-weight:900;background:#ead8bd;color:#60452f}.auth-tabs button.active{background:#8c5a35;color:#fff}.auth-box input{display:block;width:100%;padding:13px;margin:9px 0;border:2px solid #d4bd9b;border-radius:10px;font-size:15px}.auth-box #authSubmit{width:100%;border:0;background:#287a45;color:#fff;padding:13px;border-radius:10px;font-weight:900;font-size:15px;margin:6px 0 10px}.auth-box #authMsg{min-height:20px;color:#a33;font-size:12px;font-weight:700}
@media(max-width:520px){.tthms{width:100%;box-shadow:none}.game-top-main{grid-template-columns:1fr auto 1fr}.day b{font-size:17px}.shop-title strong{font-size:21px}.stars{font-size:17px}.scene{min-height:0}.customer-dialog{top:108px;left:10%;right:5%;padding:10px}.dialog-title{font-size:14px}.guide{top:218px;font-size:11px}.counter{top:34%;bottom:24%}.product-trays{left:22%;top:30%;grid-template-columns:repeat(3,1fr);gap:5px}.tray{min-height:74px}.tray .tray-icon{font-size:25px}.store-tools{right:3%;bottom:7%}.store-tools button{font-size:9px;padding:7px}.queue-card{max-width:49%;font-size:8px}.action-row button{font-size:9px;padding:9px 3px}.money-row{font-size:10px}.row{grid-template-columns:1.2fr .8fr 58px 60px;font-size:10px}}
.bulk-box{max-width:760px!important;width:calc(100vw - 28px)!important;max-height:88vh;overflow:auto}.bulk-toolbar{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:10px 0}.bulk-toolbar span{margin-left:auto}.bulk-list{display:flex;flex-direction:column;gap:7px}.bulk-row{display:grid!important;grid-template-columns:minmax(180px,1fr) auto 82px;gap:8px;align-items:center}.bulk-row label{display:flex;gap:8px;align-items:center}.bulk-row input[type=number]{width:78px}.bulk-summary{position:sticky;bottom:0;background:#fff7e8;border:1px solid #ead7b5;border-radius:10px;padding:10px;margin:12px 0;font-weight:700}.bulk-box button{min-height:40px}@media(max-width:600px){.bulk-row{grid-template-columns:1fr 68px}.bulk-row span{grid-column:1/-1;font-size:12px}.bulk-row input[type=number]{grid-column:2;grid-row:1;width:68px}.bulk-toolbar span{margin-left:0;width:100%}}

/* v1.8.2 shelf footer controls: move the main game controls to the bottom of the game box. */
.game-controls-footer{background:#f6ead6;border-top:2px solid #d7b58e;padding:8px 8px 9px;display:flex;flex-direction:column;gap:7px}
.guide-footer{background:#3e8fca;color:#fff;border-radius:12px;padding:9px 12px;text-align:center;font-size:12px;font-weight:900;box-shadow:0 3px 0 #276d9e}
.footer-control-grid{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(150px,.8fr);gap:7px;align-items:stretch}
.footer-store-tools{position:static!important;display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px!important}
.footer-store-tools button{width:100%;min-height:38px;font-size:10px;padding:7px 5px}
.shelf-control{background:#fff3d9;border:2px solid #9a6b4b;border-radius:12px;padding:6px;box-shadow:0 3px 0 #c89b75;display:flex;flex-direction:column;justify-content:center;min-width:0}
.shelf-control-title{text-align:center;font-size:12px;font-weight:900;color:#5a3b29}
.shelf-control-main{display:grid;grid-template-columns:38px 1fr 38px;gap:6px;align-items:center;margin-top:4px}
.shelf-control-main button{height:36px;border:0;border-radius:9px;background:#8b5b3a;color:#fff;font-size:25px;line-height:1;font-weight:900;box-shadow:0 2px 0 #684127}
.shelf-control-main button:last-child{background:#4f9fd8;box-shadow:0 2px 0 #327eae}
.shelf-control-main strong{text-align:center;font-size:18px;color:#5a3827;white-space:nowrap}
.shelf-control-main small{font-size:10px}
.shelf-control-note{text-align:center;font-size:8px;color:#7d6652;margin-top:3px;font-weight:800}
.product-trays{overflow:auto;padding:2px 4px 8px;scrollbar-width:thin}
@media(max-width:600px){.footer-control-grid{grid-template-columns:1fr 1fr}.footer-store-tools{grid-template-columns:1fr 1fr!important}.footer-store-tools button{font-size:9px;min-height:36px}.guide-footer{font-size:10px;padding:8px 7px}.shelf-control-main{grid-template-columns:34px 1fr 34px}.shelf-control-main button{height:34px}.shelf-control-main strong{font-size:16px}.shelf-control-note{font-size:7px}.product-trays{grid-template-columns:repeat(3,1fr);gap:5px}}

/* v1.8.2 payment animation: 2–3 shopping bags fly from checkout queue to the customer. */
.payment-bag-layer{position:fixed;inset:0;z-index:99999;pointer-events:none;overflow:hidden}
.payment-bag{position:fixed;width:28px;height:25px;display:block;box-sizing:border-box;background:linear-gradient(180deg,#ff4b4b 0%,#e40000 72%,#b80000 100%);border:2px solid #a90000;border-radius:4px 4px 6px 6px;opacity:.98;filter:drop-shadow(0 3px 3px #0004);transition:transform .72s cubic-bezier(.2,.85,.25,1),opacity .72s ease;will-change:transform,opacity}.payment-bag:before{content:"";position:absolute;left:6px;right:6px;top:-9px;height:11px;border:2px solid #a90000;border-bottom:0;border-radius:9px 9px 0 0;box-sizing:border-box}.payment-bag:after{content:"";position:absolute;left:4px;right:4px;bottom:5px;height:2px;background:#ff7777;border-radius:2px;opacity:.7}
@media(max-width:600px){.payment-bag{width:25px;height:23px}.payment-bag:before{left:5px;right:5px;top:-8px;height:10px}}

/* v1.8.3: permanently remove the legacy warehouse card highlighted in the old mobile UI. */
.left-tools,.tool-card{display:none!important;width:0!important;height:0!important;margin:0!important;padding:0!important;overflow:hidden!important}

/* v1.9.0 global leaderboard + mobile stability */
.leaderboard-box{padding:10px;background:#fff8ea;border-top:2px solid #ddc29d}
.leaderboard-box h3{font-size:14px;margin:0 0 2px;color:#5a3b29}
.leaderboard-sub{font-size:10px;color:#806b59;font-weight:700;margin-bottom:7px}
.leaderboard-list{display:flex;flex-direction:column;gap:5px}
.leader-row{display:grid;grid-template-columns:38px 1fr auto;gap:6px;align-items:center;background:#fffdf7;border:1px solid #e6d3b4;border-radius:8px;padding:7px 8px;font-size:10px}
.leader-row .rank{font-weight:900;color:#9b653e}
.leader-row strong{font-size:10px;color:#2f7046}
.leaderboard-head-row{display:grid;grid-template-columns:38px minmax(80px,1fr) auto auto;gap:6px;align-items:center;padding:3px 8px 5px;font-size:9px;font-weight:900;color:#806b59}
.leader-row{grid-template-columns:38px minmax(80px,1fr) auto auto}
.leader-row .leader-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.leader-row .leader-revenue{font-size:9px;color:#6b5a49;white-space:nowrap}
.leader-row .leader-profit{font-size:9px;color:#2f7046;white-space:nowrap}
@media(max-width:600px){
 .leaderboard-head-row{grid-template-columns:32px minmax(65px,1fr) auto auto;font-size:7.5px;padding:3px 5px}
 .leader-row{grid-template-columns:32px minmax(65px,1fr) auto auto;font-size:8px;padding:6px 5px}
 .leader-row .leader-revenue,.leader-row .leader-profit{font-size:7.5px}
}

.leaderboard-loading{font-size:10px;color:#8a7868;padding:6px}
@media(max-width:600px){
  /* Keep rank / shop / metric / profit on ONE row on phones.
     The previous 3-column override forced the 4th value (profit) onto a new line. */
  .leader-row{
    grid-template-columns:30px minmax(0,1fr) max-content max-content;
    gap:5px;
    font-size:8.5px;
    padding:7px 5px;
  }
  .leader-row .leader-name{
    min-width:0;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
  .leader-row .leader-revenue,
  .leader-row .leader-profit{
    font-size:7.5px;
    white-space:nowrap;
  }
  .leaderboard-sub{font-size:9px}
}

/* v1.9.1 exact payment: player must select the exact requested products from shelf. */
.payment-check-box{max-width:720px!important;width:calc(100vw - 24px)!important}
.payment-request{background:#fff3d6;border:2px solid #d5ad72;border-radius:10px;padding:10px;margin:9px 0;font-size:13px;font-weight:800}
.payment-products{display:flex;flex-direction:column;gap:6px;max-height:48vh;overflow:auto}
.payment-product{display:flex;justify-content:space-between;align-items:center;gap:8px;border:2px solid #dfc9a8;border-radius:10px;padding:8px;background:#fffdf7}
.payment-product.required{border-color:#5a9bd0;background:#f1f8ff}
.payment-product.not-required{opacity:.58}
.payment-product small{display:block;font-size:9px;color:#7a6755;margin-top:2px}
.payment-stepper{display:flex;align-items:center;gap:7px;white-space:nowrap}
.payment-stepper button{width:34px;height:34px;padding:0!important;border-radius:9px!important;font-size:22px!important;display:grid;place-items:center}
.payment-stepper strong{min-width:24px;text-align:center;font-size:16px}
.payment-stepper button:disabled{opacity:.35}
.payment-progress{margin:10px 0;padding:9px;border-radius:9px;background:#f4ead9;text-align:center;font-weight:900;font-size:12px}
@media(max-width:600px){.payment-check-box{padding:11px!important}.payment-product{padding:7px;font-size:11px}.payment-product small{font-size:8px}.payment-stepper button{width:32px;height:32px}.payment-products{max-height:45vh}}

/* v1.9.2: stable payment confirmation modal. Prevent background scrolling/touch and layout movement while confirming. */
.modal.payment-modal{position:fixed!important;inset:0!important;width:100vw!important;height:100vh!important;max-width:none!important;margin:0!important;z-index:2147483000!important;overflow:hidden!important;overscroll-behavior:contain!important;touch-action:none!important;}
.modal.payment-modal .payment-check-box{position:relative;flex:0 1 auto;max-height:calc(100vh - 24px)!important;overflow-y:auto!important;overscroll-behavior:contain!important;touch-action:auto!important;transform:none!important;margin:0 auto!important;}
html.tthms-payment-lock,body.tthms-payment-lock{overflow:hidden!important;touch-action:none!important;}
@media(max-width:600px){.modal.payment-modal{padding:8px!important;align-items:center!important;justify-content:center!important}.modal.payment-modal .payment-check-box{width:calc(100vw - 16px)!important;max-height:calc(100vh - 16px)!important;border-radius:14px!important;}}

/* v1.9.5 Mobile Stable: reduce layout shifts and make touch interaction predictable. */
.tthms,
.tthms *{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
.tthms button,
.tthms input,
.tthms .tray{touch-action:manipulation;contain:layout paint;}
.tthms button{user-select:none;-webkit-user-select:none}
.tthms .game-stage{contain:layout paint}
.tthms .scene{contain:layout paint;overflow:hidden;touch-action:pan-y}
.tthms .queue{min-height:52px;contain:layout}
.tthms .hud-bubbles{min-height:46px}
.tthms .customer-dialog{min-height:58px}
.tthms .payment-bag-layer{contain:strict}
.tthms .payment-bag{pointer-events:none}
html,body{overscroll-behavior-y:auto;overflow-x:hidden}
@media(max-width:600px){
  #tthms-app{width:100%;max-width:100%;overflow-x:hidden}
  .tthms{width:100%;max-width:100%;overflow-x:hidden}
  .game-top{position:relative;min-height:62px}
  .game-stage{min-height:420px}
  .scene{min-height:420px}
  .store-tools button,.game-bottom button,.shelf-control-main button{min-height:42px}
  .tray{min-height:68px;touch-action:manipulation}
  .queue{padding:4px;gap:5px}
  .queue-card{min-height:58px}
  .modal.show{padding:8px}
  .modal .box{width:100%;max-width:100%;max-height:calc(100dvh - 16px);margin:0;overflow:auto;-webkit-overflow-scrolling:touch}
  .modal.payment-modal .payment-check-box{max-height:calc(100dvh - 16px)!important}
}
@supports(height:100dvh){
  .modal.payment-modal{height:100dvh!important}
}

/* v1.9.6: product names in inventory/display-shelf panels are black for readability. */
.bulk-row label b,.bulk-row span,.bulk-row span b,.tray b{color:#000!important}


/* v1.9.7 mobile + product label rules */
.shelf-product-name,.display-shelf .product-name,.inventory-display .product-name,
.product-label,.shelf-item .name{color:#000 !important;}
.game-day,[data-game-day],#game-day{contain:layout paint;}
button,.game-btn,.action-btn{touch-action:manipulation;-webkit-tap-highlight-color:transparent;}
/* v1.11.0 employee controls */
.employee-status{font-size:12px}
@media(max-width:600px){.game-controls-footer button{min-height:42px}.box{max-width:96vw}.box button{min-height:42px}}
/* v1.12.8: vehicle assets / customer traffic upgrade panel in the floor area */
.vehicle-parking{position:absolute;left:5%;right:5%;bottom:2%;z-index:20;margin:0;padding:4px 6px 5px;background:rgba(255,248,232,.98);border:2px solid #b88961;border-radius:12px;box-shadow:0 3px 0 rgba(90,58,38,.16);max-height:10%;min-height:0;overflow:auto;pointer-events:auto;}
.vehicle-parking-head{display:flex;justify-content:space-between;align-items:center;gap:5px;font-size:7px;color:#5b3c2b;margin-bottom:2px;line-height:1.1}.vehicle-parking-head span{font-weight:900;color:#2f7046}
.vehicle-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:3px}.vehicle-card{background:#fffdf7;border:1px solid #dfc9a8;border-radius:7px;padding:2px;text-align:center;min-width:0}.vehicle-card img{width:100%;height:25px;object-fit:contain;display:block}.vehicle-info b{display:block;font-size:6px;color:#000;line-height:1}.vehicle-info small{display:block;font-size:5px;color:#6f5a49;margin:1px 0 2px;line-height:1}.vehicle-card button,.vehicle-modal-row button{font-size:6px!important;min-height:19px!important;padding:2px 3px!important;border-radius:5px!important;touch-action:manipulation}.vehicle-owned{display:block;font-size:6px;color:#2f7046;font-weight:900}.vehicle-modal-row{display:flex;align-items:center;gap:10px;border:1px solid #ddd0be;border-radius:12px;padding:8px;margin:8px 0}.vehicle-modal-row img{width:105px;height:68px;object-fit:contain;flex:none}.vehicle-modal-row>div{flex:1;font-size:12px}.vehicle-modal-row>div>b{display:block;margin-bottom:3px}
@media(max-width:600px){.vehicle-parking{left:4%;right:4%;bottom:2%;padding:3px 4px;max-height:10%;height:auto;z-index:20}.vehicle-list{gap:3px}.vehicle-card{padding:2px}.vehicle-card img{height:24px}.vehicle-info b{font-size:6px}.vehicle-info small{font-size:5px}.vehicle-card button{font-size:6px!important;min-height:19px!important;padding:2px 3px!important}.vehicle-modal-row img{width:88px;height:58px}}

/* v1.13.0: vehicle cards are tap targets; details/price/purchase appear after tapping. */
.vehicle-card{border:1px solid #dfc9a8;border-radius:7px;padding:2px;text-align:center;min-width:0;width:100%;font:inherit;color:inherit;cursor:pointer;background:#fffdf7;appearance:none;-webkit-appearance:none;touch-action:manipulation}
.vehicle-card:active{transform:scale(.98)}
.vehicle-tap-hint{display:block;font-size:5px;color:#8c5a35;font-weight:800;margin-top:1px;line-height:1.05}
.vehicle-detail-box{text-align:center;max-width:420px!important}
.vehicle-detail-img{display:block;width:min(220px,70vw);height:125px;object-fit:contain;margin:0 auto 5px}
.vehicle-detail-price{font-size:22px;font-weight:900;color:#8c5a35;margin:7px 0}
.vehicle-detail-bonus{font-size:14px;font-weight:800;color:#2f7046;margin-bottom:12px}
.vehicle-detail-buy{width:100%;min-height:44px!important;font-size:15px!important}
.vehicle-owned-large{padding:12px;border-radius:10px;background:#edf8ef;color:#2f7046;font-weight:900;margin:10px 0}
@media(max-width:600px){.vehicle-detail-img{height:105px}.vehicle-detail-price{font-size:20px}.vehicle-detail-bonus{font-size:12px}.vehicle-detail-buy{min-height:46px!important}}

/* v1.13.3: move welcome message to the top of the game frame */
.tthms .scene .welcome-dialog{top:62px;left:7%;right:7%;z-index:16;}
@media(max-width:520px){.tthms .scene .welcome-dialog{top:62px;left:6%;right:6%;}}

/* v1.13.4: welcome message above the money/store header */
.welcome-top{background:#fff9ec;border:2px solid #a77859;border-radius:14px;padding:8px 12px;margin-bottom:7px;box-shadow:0 3px 8px #0002;text-align:center;}
.welcome-top-title{font-size:15px;font-weight:900;line-height:1.25;color:#5a3827}.welcome-top-title em{color:#d95e77;font-style:normal}.welcome-top-meta{font-size:10px;font-weight:800;margin-top:3px;color:#6d5747}.welcome-top-progress{height:6px;background:#eadfcf;border:1px solid #a68b70;border-radius:8px;overflow:hidden;margin-top:5px}.welcome-top-progress i{display:block;width:100%;height:100%;background:#6ec487}
@media(max-width:520px){.welcome-top{padding:7px 9px;margin-bottom:5px}.welcome-top-title{font-size:13px}.welcome-top-meta{font-size:9px}.welcome-top-progress{height:5px}}

.sale-money-toast{position:fixed;left:50%;top:16%;transform:translateX(-50%);z-index:99999;background:#2f7d32;color:#fff;padding:10px 16px;border-radius:999px;font-weight:800;font-size:15px;box-shadow:0 8px 24px rgba(0,0,0,.18);pointer-events:none;animation:saleMoneyToast .25s ease-out;}@keyframes saleMoneyToast{from{opacity:0;transform:translate(-50%,-8px)}to{opacity:1;transform:translate(-50%,0)}}

/* v1.13.7: draggable shelf display area for mobile - pan vertically to see additional shelves */
.product-trays{overflow-y:auto;overflow-x:hidden;align-content:start;overscroll-behavior:contain;scrollbar-width:none;-webkit-overflow-scrolling:touch;cursor:grab;touch-action:pan-y;z-index:7;padding:2px 3px 8px 2px;}
.product-trays::-webkit-scrollbar{display:none}
.product-trays.shelf-dragging{cursor:grabbing;user-select:none;-webkit-user-select:none;}
.shelf-pan-hint{position:absolute;left:50%;bottom:4px;transform:translateX(-50%);z-index:20;background:#8c5a35dd;color:#fff;border-radius:999px;padding:3px 8px;font-size:7px;font-weight:900;pointer-events:none;white-space:nowrap;box-shadow:0 2px 5px #0003}
@media(max-width:520px){.product-trays{top:29%;bottom:0;grid-template-columns:repeat(3,minmax(0,1fr));max-height:100%;padding-bottom:18px}.shelf-pan-hint{font-size:7px}}

/* v1.13.22: move loan control beside compact shelf control */
.shelf-loan-side{display:flex;flex-direction:column;gap:5px;min-width:0;align-self:stretch;}
.compact-shelf-control{padding:4px!important;border-radius:9px!important;box-shadow:0 2px 0 #c89b75!important;}
.compact-shelf-control .shelf-control-title{font-size:10px;}
.compact-shelf-control .shelf-control-main{grid-template-columns:30px 1fr 30px;gap:4px;margin-top:2px;}
.compact-shelf-control .shelf-control-main button{height:29px;font-size:20px;border-radius:7px;}
.compact-shelf-control .shelf-control-main strong{font-size:14px;}
.compact-shelf-control .shelf-control-main small{font-size:8px;}
.compact-shelf-control .shelf-control-note{font-size:6.5px;margin-top:2px;}
.loan-side-btn{width:100%;min-height:32px!important;padding:5px 6px!important;border:0;border-radius:9px;background:#6b4a38;color:#fff;font-weight:900;font-size:10px;box-shadow:0 2px 0 #4d3327;touch-action:manipulation;}
.loan-side-btn:active{transform:translateY(1px);box-shadow:0 1px 0 #4d3327;}
@media(max-width:600px){.shelf-loan-side{gap:4px}.compact-shelf-control .shelf-control-main{grid-template-columns:27px 1fr 27px}.compact-shelf-control .shelf-control-main button{height:27px;font-size:18px}.compact-shelf-control .shelf-control-main strong{font-size:13px}.compact-shelf-control .shelf-control-note{font-size:6px}.loan-side-btn{min-height:30px!important;font-size:9px;padding:4px!important;}}

/* v1.13.25: reliable mobile shelf purchase button */
.shelf-control-main{position:relative;z-index:80;}
.shelf-control-main button{position:relative;z-index:81;pointer-events:auto!important;touch-action:manipulation!important;cursor:pointer;}
.shelf-control-main button:disabled{opacity:.65;}
.shelf-loan-side{position:relative;z-index:70;}

/* v1.13.26: make shelf purchase controls reliably tappable above all game layers */
.shelf-loan-side{
  position:relative!important;
  z-index:10!important;
  pointer-events:auto!important;
  isolation:isolate;
}
.compact-shelf-control,
.shelf-control-main,
.shelf-control-main button#shelfPlus{
  position:relative!important;
  z-index:11!important;
  pointer-events:auto!important;
  touch-action:manipulation!important;
}
.shelf-control-main button#shelfPlus{
  cursor:pointer!important;
  -webkit-tap-highlight-color:rgba(0,0,0,.08);
}

/* v1.13.27: modal must always cover shelf/loan controls; controls stay tappable when modal is closed. */
.modal.show{position:fixed!important;z-index:2147483000!important;}
/* v2.7.10 mobile box stability: keep open boxes isolated from the game surface. */
.modal.show{touch-action:none!important;-webkit-tap-highlight-color:transparent!important;}
.modal.show .box{touch-action:pan-y!important;-webkit-overflow-scrolling:touch!important;overscroll-behavior:contain!important;}
.modal.show .box button,.modal.show .box input,.modal.show .box select,.modal.show .box textarea{touch-action:manipulation!important;}
.shelf-loan-side{z-index:10!important;}
.compact-shelf-control,.shelf-control-main,.shelf-control-main button#shelfPlus{z-index:11!important;}

/* v1.13.32: teen login/register background */
@media(max-width:600px){.auth-game{min-height:100dvh;width:100vw;max-width:100vw;margin-left:calc(50% - 50vw);padding:16px 10px;background-position:center top;background-attachment:scroll}.auth-box{width:min(420px,94vw);border-width:3px;border-radius:24px;padding:18px;box-shadow:0 14px 36px rgba(65,35,20,.32)}}

/* v1.13.33: full-bleed clean login background; prevents theme gutters and background UI duplication */
html,body{margin:0;padding:0;}
#tthms-app:has(.auth-game){width:100%;max-width:none;margin:0;padding:0;}
#tthms-app .tthms:has(.auth-game){width:100%;max-width:none;margin:0;padding:0;box-shadow:none;background:transparent;}
.auth-game:before{background:linear-gradient(180deg,rgba(255,244,210,.03),rgba(54,28,16,.10));}
@media(max-width:600px){#tthms-app:has(.auth-game),#tthms-app .tthms:has(.auth-game){width:100vw;max-width:100vw;margin:0;padding:0;} .auth-game{min-height:100dvh;box-sizing:border-box;}}

/* v1.13.34: compact leaderboard/reviews controls under loan button */
.compact-info-panel{width:100%;min-width:0;margin-top:0;}
.compact-info-btn{width:100%;min-height:30px!important;padding:5px 7px!important;border:0;border-radius:9px;background:#fff8ea;color:#6b4a38;font-weight:900;font-size:9px;box-shadow:0 2px 0 #c89b75;display:flex;align-items:center;justify-content:space-between;gap:4px;touch-action:manipulation;cursor:pointer;}
.compact-info-btn span{font-size:16px;line-height:1;transition:transform .15s ease;}
.compact-info-panel.open .compact-info-btn span{transform:rotate(90deg);}
.compact-info-panel.open .compact-info-btn{background:#f3dfc3;}
.compact-info-content{margin-top:4px;max-height:300px;overflow:auto;border-radius:9px;}
.compact-info-content[hidden]{display:none!important;}
.compact-info-content .leaderboard-box,.compact-info-content .reviews-box{border:1px solid #ddc29d;border-radius:9px;padding:7px;background:#fff8ea;}
.compact-info-content .leaderboard-box h3,.compact-info-content .reviews-box h3{font-size:10px;margin:0 0 3px;}
.compact-info-content .leaderboard-sub{font-size:7px;margin-bottom:4px;}
.compact-info-content .leaderboard-list{gap:3px;}
.compact-info-content .leader-row{grid-template-columns:24px 1fr auto;padding:4px 5px;border-radius:6px;font-size:8px;}
.compact-info-content .leader-row strong{font-size:8px;}
.compact-info-content .review-item{font-size:8px;padding:4px;border-radius:6px;margin:3px 0;}
.compact-info-content .review-item small{display:block;font-size:7px;color:#806d5c;margin-top:2px;}
@media(max-width:600px){
 .compact-info-btn{min-height:28px!important;font-size:8px;padding:4px 6px!important;}
 .compact-info-content{max-height:260px;}
 .compact-info-content .leader-row{font-size:7.5px;padding:4px;}
 .compact-info-content .leader-row strong{font-size:7.5px;}
}


/* v1.13.36: hard-remove the legacy four-button bottom action bar. */
#tthms-app .action-row,
#tthms-app .action-row button,
#tthms-app .legacy-bottom-actions,
#tthms-app .mobile-bottom-nav{display:none!important;}

/* v1.13.39: leaderboard/reviews are trigger-only buttons; details open in the same modal style as loans. */
.compact-info-actions{display:flex;flex-direction:column;gap:4px;width:100%;min-width:0;}
.compact-info-actions .compact-info-btn{position:relative;}
.ranking-review-modal{width:min(430px,92vw);max-height:calc(100vh - 30px);overflow-y:auto;box-sizing:border-box;}
.ranking-review-modal h2{margin-top:0;}
.ranking-review-modal .leaderboard-box,.ranking-review-modal .reviews-box{margin:10px 0;border:1px solid #ddc29d;border-radius:12px;padding:8px;background:#fff8ea;}
.ranking-review-modal .rating-summary{font-size:18px;text-align:center;padding:8px;border-radius:10px;background:#fff8ea;margin:8px 0;}
.ranking-review-modal .review-item{font-size:12px;padding:7px;border-radius:7px;margin:4px 0;}
.ranking-review-modal .review-item small{display:block;font-size:9px;color:#806d5c;margin-top:2px;}
@media(max-width:600px){.compact-info-actions{gap:3px}.ranking-review-modal{width:92vw;max-height:calc(100dvh - 24px);}.ranking-review-modal .review-item{font-size:10px}.ranking-review-modal .leader-row{font-size:10px;}}

/* v1.13.42: vehicle pawn / redeem */
.vehicle-pawn-actions,.vehicle-pawn-active{margin-top:12px;padding:12px;border:2px solid #d8c2a8;border-radius:12px;background:#fffaf1;text-align:left}.vehicle-pawn-actions h3,.vehicle-pawn-active h3{margin:0 0 6px;text-align:center;font-size:15px}.vehicle-pawn-actions p,.vehicle-pawn-active p{margin:5px 0;font-size:12px;line-height:1.4}.pawn-choice-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:9px}.pawn-choice{border:2px solid #8c5a35;border-radius:10px;background:#fff;padding:10px 6px;min-height:105px;touch-action:manipulation;color:#4b2d1d;box-shadow:0 2px 0 rgba(0,0,0,.08)}.pawn-choice.pawn-bank{border-color:#8c5a35;background:#9a6037;color:#fff}.pawn-choice.pawn-social{border-color:#7f1d2d;background:#8f2435;color:#fff}.pawn-choice b,.pawn-choice span,.pawn-choice small{display:block;color:inherit}.pawn-choice b{font-size:12px;font-weight:900}.pawn-choice span{font-weight:900;margin:4px 0}.pawn-choice small{font-size:10px;line-height:1.3}.pawn-choice:active{transform:scale(.98);filter:brightness(.95)}.vehicle-pawn-active{text-align:center;border-color:#d6b36a;background:#fff9e8}.vehicle-pawn-active .pawn-due{font-size:15px;color:#8c5a35}.vehicle-redeem{width:100%;min-height:44px!important;font-size:14px!important;margin:7px 0}.vehicle-pawn-active small{display:block;font-size:10px;color:#7a5d3b;line-height:1.3}@media(max-width:600px){.pawn-choice-grid{gap:6px}.pawn-choice{min-height:90px}.vehicle-pawn-actions,.vehicle-pawn-active{padding:10px}}

.vehicle-card.pawned{border-color:#d6b36a;background:#fff9e8}.vehicle-card.pawned img{filter:saturate(.65) opacity(.8)}

.owner-character{position:absolute;left:18px;bottom:58px;width:120px;height:190px;padding:0;border:0;background:transparent;z-index:12;cursor:pointer;display:flex;align-items:flex-end;justify-content:center}.owner-character img{max-width:100%;max-height:100%;object-fit:contain;filter:drop-shadow(0 5px 4px rgba(0,0,0,.18))}.owner-select-box{max-width:760px}.owner-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:16px 0}.owner-choice{border:2px solid #ead9c5;border-radius:16px;background:#fffaf1;padding:10px;cursor:pointer;min-height:230px;display:flex;flex-direction:column;align-items:center;justify-content:flex-end}.owner-choice.selected{border-color:#3a8f4a;box-shadow:0 0 0 3px rgba(58,143,74,.12)}.owner-choice img{width:100%;height:170px;object-fit:contain}.owner-choice b{font-size:17px;color:#513a2b}.owner-choice small{color:#75665d}.owner-choice span{color:#2f7d3b;font-weight:700;margin-top:4px}@media(max-width:700px){.owner-grid{grid-template-columns:repeat(2,1fr)}.owner-character{left:8px;bottom:48px;width:92px;height:150px}}


/* v1.13.51: OWNER CHARACTER — exact red-box placement from reference image.
   Keep the owner in the empty lower-left display area, completely to the left
   of the 3-column product trays. Fixed mobile dimensions prevent the character
   from scaling into the shelves when the scene height changes.
*/
.tthms .scene .owner-character{
  left:0!important;
  bottom:10%!important;
  width:clamp(130px,29vw,170px)!important;
  height:250px!important;
  max-width:none!important;
  max-height:none!important;
  padding:0!important;
  margin:0!important;
  z-index:8!important;
  display:flex!important;
  align-items:flex-end!important;
  justify-content:center!important;
  overflow:visible!important;
}
.tthms .scene .owner-character img{
  display:block!important;
  width:100%!important;
  height:100%!important;
  max-width:100%!important;
  max-height:100%!important;
  object-fit:contain!important;
  object-position:center bottom!important;
  pointer-events:none!important;
}
@media(max-width:600px){
  .tthms .scene .owner-character{
    left:0!important;
    bottom:10%!important;
    width:clamp(130px,29vw,170px)!important;
    height:250px!important;
  }
}
/* v1.13.66: configurable welcome box + paid public message */
.welcome-top-actions{display:flex;justify-content:center;margin-top:7px}
.promo-buy-btn{border:2px solid #8b5b3a!important;border-radius:10px!important;background:#f3b84b!important;color:#4f301e!important;padding:7px 14px!important;font-size:11px!important;font-weight:900!important;box-shadow:0 3px 0 #b77e36!important;min-height:36px!important}
.promo-buy-btn:active{transform:translateY(1px);box-shadow:0 2px 0 #b77e36!important}
.public-promo-list{display:flex;flex-direction:column;gap:4px;margin-top:6px}
.public-promo-message{background:#fff3cf;border:1px solid #d8ad65;border-radius:8px;padding:5px 7px;text-align:left;font-size:10px;font-weight:800;color:#65472e;word-break:break-word}
.promo-submit-box textarea{width:100%;resize:vertical;min-height:110px;border:2px solid #d5bd9d;border-radius:10px;padding:10px;font-size:15px;line-height:1.4;background:#fffdf8}
.promo-char-count{text-align:right;font-size:11px;color:#806b59;font-weight:800;margin:4px 0 8px}
.promo-buy-box,.promo-submit-box{max-width:520px!important}
@media(max-width:600px){.promo-buy-btn{width:100%;font-size:11px!important}.welcome-top-actions{margin-top:6px}.public-promo-message{font-size:9px}.promo-submit-box textarea{font-size:14px}}

/* v1.13.85 - footer Zalo support box */
.tthms-zalo-support{position:fixed;left:50%;bottom:10px;transform:translateX(-50%);z-index:99990;width:min(92vw,520px);box-sizing:border-box;padding:10px 12px;border-radius:14px;background:rgba(255,255,255,.97);border:2px solid #2271b1;box-shadow:0 6px 24px rgba(0,0,0,.18);display:flex;align-items:center;justify-content:space-between;gap:10px;font-family:inherit}
.tthms-zalo-support{position:fixed}.tthms-zalo-support .tthms-zalo-content{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;min-width:0}.tthms-zalo-support .tthms-zalo-text{min-width:0}.tthms-zalo-support strong{display:block;font-size:14px}.tthms-zalo-support span{display:block;font-size:12px;opacity:.75;margin-top:2px}.tthms-zalo-support a{flex:0 0 auto;text-decoration:none!important;background:#2271b1;color:#fff!important;border-radius:10px;padding:9px 12px;font-weight:700;font-size:13px;white-space:nowrap}.tthms-zalo-support .tthms-zalo-toggle{position:absolute;right:6px;top:-28px;width:38px;height:28px;border:1px solid #2271b1;border-bottom:0;border-radius:10px 10px 0 0;background:#fff;color:#2271b1;font-size:20px;line-height:24px;font-weight:700;cursor:pointer;padding:0}.tthms-zalo-support.is-collapsed{width:44px;height:38px;min-width:44px;padding:0;border-radius:12px;left:auto;right:10px;bottom:10px;transform:none;justify-content:center}.tthms-zalo-support.is-collapsed .tthms-zalo-content{display:none}.tthms-zalo-support.is-collapsed .tthms-zalo-toggle{position:static;width:44px;height:38px;border:0;border-radius:12px;background:transparent;font-size:22px}
@media(max-width:480px){.tthms-zalo-support{bottom:6px;padding:9px 10px}.tthms-zalo-support a{padding:8px 10px;font-size:12px}.tthms-zalo-support strong{font-size:13px}.tthms-zalo-support span{font-size:11px}}

/* v1.13.99 - local-only expense history */
.expense-history-btn{margin-top:6px}
.expense-history-box{margin-top:10px;border-radius:14px;padding:10px;background:rgba(0,0,0,.04)}
.expense-history-title{font-weight:800;font-size:14px;margin-bottom:3px}
.expense-history-note{font-size:11px;opacity:.7;margin-bottom:8px}
.expense-history-list{max-height:300px;overflow:auto}
.expense-history-item{padding:9px 8px;border-bottom:1px solid rgba(0,0,0,.08)}
.expense-history-item:last-child{border-bottom:0}
.expense-history-main{display:flex;justify-content:space-between;gap:8px;align-items:center}
.expense-history-main strong{white-space:nowrap}
.expense-history-detail{font-size:12px;margin-top:2px}
.expense-history-item small{display:block;font-size:10px;opacity:.65;margin-top:3px}
.expense-history-empty{padding:12px 4px;text-align:center;opacity:.65;font-size:12px}
.expense-history-clear{width:100%;margin-top:7px}
.expense-history-modal{max-height:85vh;overflow:auto}
.expense-history-modal .expense-history-list{max-height:55vh}
.expense-history-actions{display:flex;gap:8px;margin-top:10px}
.expense-history-actions button{flex:1}
/* v1.13.90 daily check-in + affiliate */
.tthms-extra-box{display:flex;align-items:stretch;margin:8px 0;min-width:0}
.tthms-extra-box button,.tthms-extra-box a{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;width:100%;min-height:54px;border:1px solid rgba(255,255,255,.18);border-radius:12px;padding:8px 10px;text-decoration:none;font-weight:800;cursor:pointer;box-sizing:border-box}
.tthms-extra-box small{font-size:11px;opacity:.82;font-weight:600}


/* v2.2.2 - local 6-hour reward box / mandatory game gate */
.tthms-reward-6h-gate{position:fixed;inset:0;z-index:2147483000;display:flex;align-items:center;justify-content:center;padding:16px;box-sizing:border-box;background:rgba(0,0,0,.58);pointer-events:auto;touch-action:none;overscroll-behavior:contain}
.tthms-reward-locked{overflow:hidden!important}
.tthms-reward-6h-box{position:relative;z-index:1;display:flex;align-items:center;gap:10px;width:min(92vw,520px);margin:0;padding:14px 16px;border:3px solid rgba(34,113,177,.55);border-radius:18px;background:rgba(255,255,255,.98);box-shadow:0 12px 40px rgba(0,0,0,.3);box-sizing:border-box}
.tthms-reward-6h-icon{font-size:30px;line-height:1}.tthms-reward-6h-body{display:flex;flex:1;min-width:0;flex-direction:column;gap:2px}.tthms-reward-6h-body strong{font-size:14px;color:#1d2327}.tthms-reward-6h-body span{font-size:12px;color:#646970}.tthms-reward-6h-required{font-size:11px;color:#b32d2e;font-weight:800}.tthms-reward-6h-box button{display:inline-block;text-align:center;border:0;border-radius:10px;padding:10px 13px;font-weight:800;background:#2271b1;color:#fff;white-space:nowrap;cursor:pointer;min-height:40px}.tthms-reward-6h-box button:disabled{opacity:.65;cursor:not-allowed}
@media(max-width:520px){.tthms-reward-6h-box{gap:8px;width:min(92vw,420px);padding:12px}.tthms-reward-6h-icon{font-size:25px}.tthms-reward-6h-body strong{font-size:12px}.tthms-reward-6h-body span{font-size:11px}.tthms-reward-6h-required{font-size:10px}.tthms-reward-6h-box button{font-size:11px;padding:9px 10px}}

/* v2.1.1: nested guide box inside Save Game control */
.save-game-box{display:flex;flex-direction:column;gap:4px;width:100%;min-width:0}
.save-game-box #saveGameBtn{width:100%;margin:0}
.save-game-guide-btn{width:100%;min-height:28px!important;padding:4px 6px!important;font-size:9px!important;background:#fff3d9!important;color:#6b4a32!important;border:1px solid #c89b75!important;box-shadow:none!important}
.save-game-guide-modal-box{width:min(460px,94vw);border:2px solid #b88961}
.save-game-guide-modal-box h3{font-size:16px;color:#5a3b29;margin:0 0 10px}
.save-game-guide-inner{background:#fff3d9;border:2px solid #d2aa7d;border-radius:12px;padding:10px}
.save-game-guide-title{font-weight:900;color:#3e8fca;font-size:13px;margin-bottom:7px}
.save-game-guide-content p{font-size:11px;line-height:1.45;margin:6px 0;color:#5a4637}
@media(max-width:600px){.save-game-guide-btn{min-height:28px!important;font-size:8px!important}.save-game-guide-content p{font-size:10px}}


/* v2.3.2 - chat on/off control */
.tthms-chat-toggle{display:block;width:min(680px,calc(100% - 20px));margin:12px auto 6px;padding:8px 12px;border:1px solid rgba(255,255,255,.2);border-radius:10px;background:rgba(18,18,24,.94);color:#fff;font-weight:800;font-size:12px;cursor:pointer;box-sizing:border-box}
.tthms-chat-toggle:active{transform:scale(.99)}

/* v2.3.0 - realtime player chat */
.tthms-chat-box{width:min(680px,calc(100% - 20px));margin:12px auto;padding:10px;border:1px solid rgba(255,255,255,.18);border-radius:14px;background:rgba(18,18,24,.94);box-sizing:border-box;box-shadow:0 6px 20px rgba(0,0,0,.18);color:#fff}
.tthms-chat-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px;font-size:14px}
.tthms-chat-head small{font-size:11px;opacity:.75;white-space:nowrap}
.tthms-chat-list{height:180px;overflow-y:auto;overscroll-behavior:contain;padding:4px 2px;box-sizing:border-box}
.tthms-chat-row{display:grid;grid-template-columns:minmax(85px,30%) 1fr auto;gap:7px;align-items:baseline;padding:6px 5px;border-bottom:1px solid rgba(255,255,255,.08);font-size:13px}
.tthms-chat-row:last-child{border-bottom:0}
.tthms-chat-name{font-weight:700;overflow-wrap:anywhere;word-break:break-word;white-space:normal}
.tthms-chat-message{min-width:0;overflow-wrap:anywhere;word-break:break-word}
.tthms-chat-row small{font-size:10px;opacity:.6;white-space:nowrap}
.tthms-chat-empty{text-align:center;padding:65px 8px;opacity:.65;font-size:13px}
.tthms-chat-form{display:flex;gap:6px;margin-top:7px}
.tthms-chat-form input{flex:1;min-width:0;height:40px;padding:0 10px;border-radius:9px;border:1px solid rgba(255,255,255,.2);background:#fff;color:#111;font-size:14px;box-sizing:border-box}
.tthms-chat-form button{width:64px;border:0;border-radius:9px;font-weight:700;cursor:pointer}
.tthms-chat-form button:disabled{opacity:.55;cursor:wait}
.tthms-chat-count{text-align:right;font-size:10px;opacity:.55;margin-top:3px}
@media (max-width:600px){
  .tthms-chat-box{width:calc(100% - 12px);margin:8px auto;padding:8px;border-radius:12px}
  .tthms-chat-list{height:165px}
  .tthms-chat-row{grid-template-columns:minmax(72px,31%) 1fr auto;gap:5px;font-size:12px}
  .tthms-chat-form input{height:38px}
  .tthms-chat-form button{height:38px}
}

/* v2.3.7 local chat alias */
.tthms-chat-name-form{display:flex;gap:6px;margin:6px 0}.tthms-chat-name-form input{flex:1;min-width:0}.tthms-chat-name-form button{white-space:nowrap}.tthms-chat-name{overflow-wrap:anywhere;word-break:break-word}

/* v2.3.19: single mobile-first customer review overlay. The PNG is presentation-only. */
.tthms-viral-review-modal{
  z-index:120!important;
  position:fixed!important;
  inset:0!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  padding:0!important;
  margin:0!important;
  background:rgba(5,8,18,.78)!important;
  overflow:hidden!important;
  touch-action:none;
}
.tthms-review-stage{
  position:relative;
  width:min(96vw,960px);
  aspect-ratio:3/2;
  height:auto;
  max-height:96dvh;
  margin:auto;
  overflow:hidden;
  flex:0 1 auto;
}
.tthms-review-asset{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:contain;
  display:block;
  pointer-events:none;
  user-select:none;
  -webkit-user-drag:none;
}
.tthms-review-close{
  position:absolute!important;
  right:3.1%!important;
  top:7.8%!important;
  width:clamp(34px,5.2vw,56px)!important;
  height:clamp(34px,5.2vw,56px)!important;
  padding:0!important;
  border:3px solid #fff!important;
  border-radius:50%!important;
  background:#ff4f7b!important;
  color:#fff!important;
  font-size:clamp(24px,4.2vw,40px)!important;
  line-height:1!important;
  box-shadow:0 4px 0 rgba(100,20,60,.35)!important;
  z-index:8!important;
  cursor:pointer!important;
  touch-action:manipulation;
}
.tthms-review-character{
  position:absolute;
  left:4.2%;
  top:24%;
  width:22%;
  height:34%;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:flex-start;
  z-index:5;
  text-align:center;
  pointer-events:none;
}
.tthms-review-avatar{
  width:68%;
  aspect-ratio:1;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:clamp(30px,6vw,66px);
  line-height:1;
  filter:drop-shadow(0 3px 2px rgba(0,0,0,.25));
}
.tthms-review-avatar img{
  width:100%;
  height:100%;
  object-fit:contain;
  display:block;
}
.tthms-review-character b{
  margin-top:4%;
  padding:5px 8px;
  border-radius:12px;
  background:#fff1bd;
  border:3px solid #9a5a18;
  color:#4a2a16;
  font-size:clamp(9px,1.5vw,17px);
  font-weight:1000;
  box-shadow:0 3px 0 rgba(100,50,0,.18);
  white-space:nowrap;
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
}
.tthms-review-quote{
  position:absolute;
  left:30%;
  top:24%;
  width:64%;
  height:30%;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding:2% 3%;
  box-sizing:border-box;
  color:#24170f;
  font-weight:900;
  font-size:clamp(12px,2.05vw,25px);
  line-height:1.18;
  z-index:5;
  overflow:hidden;
  overflow-wrap:anywhere;
  pointer-events:none;
}
.tthms-review-stars{
  position:absolute;
  left:29%;
  top:55%;
  width:67%;
  height:14%;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#ffd21a;
  text-shadow:0 2px 0 #8d4b00,-1px 0 #8d4b00,1px 0 #8d4b00;
  font-size:clamp(22px,4vw,43px);
  letter-spacing:.06em;
  z-index:5;
  pointer-events:none;
  white-space:nowrap;
}
.tthms-review-action{
  position:absolute;
  bottom:6.1%;
  height:17.2%;
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:7;
  width:38.5%;
  padding:0!important;
  margin:0!important;
  border:0!important;
  background:transparent!important;
  color:#fff;
  font-size:clamp(24px,4.5vw,48px);
  cursor:pointer;
  touch-action:manipulation;
  user-select:none;
  -webkit-tap-highlight-color:transparent;
}
.tthms-review-thanks{left:10.3%;}
.tthms-review-great{right:10.2%;}
.tthms-review-action:active,.tthms-review-close:active{transform:translateY(2px) scale(.97);filter:brightness(.92);}
.tthms-review-action:focus-visible,.tthms-review-close:focus-visible{outline:3px solid #fff;outline-offset:2px;}
@media(max-width:600px){
  .tthms-review-stage{width:100vw;max-width:100vw;max-height:100dvh;}
  .tthms-review-close{right:3.2%!important;top:7.8%!important;width:10vw!important;height:10vw!important;min-width:34px!important;min-height:34px!important;font-size:7vw!important;}
  .tthms-review-character{left:4.2%;top:24.5%;width:22%;height:33%;}
  .tthms-review-avatar{width:72%;font-size:clamp(30px,9vw,58px);}
  .tthms-review-character b{font-size:clamp(7px,2.55vw,11px);border-width:2px;padding:3px 5px;border-radius:8px;}
  .tthms-review-quote{left:29.5%;top:24%;width:65%;height:31%;font-size:clamp(10px,3.05vw,16px);padding:1% 2%;line-height:1.16;}
  .tthms-review-stars{left:28.5%;top:55%;width:68%;height:13%;font-size:clamp(17px,5.2vw,28px);}
  .tthms-review-action{bottom:6%;height:17%;font-size:clamp(24px,8vw,40px);}
}

/* v2.3.20: stars are already part of the supplied review asset; never overlay a second star row. */
.tthms-viral-review-modal .tthms-review-stars{display:none!important;}
.tthms-review-avatar{overflow:hidden;}
.tthms-review-avatar img{width:82%!important;height:82%!important;object-fit:contain!important;margin:auto;display:block;}

/* v2.3.23: clean review asset has no visible X/Like/Heart graphics. Keep only invisible touch hitboxes. */
.tthms-review-hitbox{background:transparent!important;border:0!important;box-shadow:none!important;color:transparent!important;text-shadow:none!important;opacity:0!important;cursor:pointer!important;-webkit-tap-highlight-color:transparent!important;}
.tthms-review-hitbox::before,.tthms-review-hitbox::after{display:none!important;content:none!important;}
.tthms-review-close.tthms-review-hitbox{display:block!important;pointer-events:auto!important;}
.tthms-review-action.tthms-review-hitbox{display:block!important;pointer-events:auto!important;}
/* Multi stores 2-10 local module */
.multi-store-box{max-width:980px;width:96vw;max-height:90vh;overflow:auto}.ms-head{display:flex;align-items:center;justify-content:space-between;gap:8px}.ms-head h2{margin:0}.ms-tabs{display:flex;gap:6px;overflow-x:auto;padding:10px 0;position:sticky;top:0;background:inherit;z-index:2}.ms-tab{min-width:96px;border:1px solid #ccc;border-radius:10px;padding:8px 6px;background:#fff;font-weight:700}.ms-tab small{display:block;font-weight:500;font-size:11px;margin-top:3px}.ms-tab.active{outline:2px solid #222}.ms-summary{display:grid;grid-template-columns:1.3fr 1fr 1fr auto;gap:8px;align-items:center;padding:12px;border-radius:12px;background:#f3f3f3}.ms-summary small{display:block}.ms-notice{margin:10px 0;padding:10px;border-radius:10px;background:#fff7d6}.ms-grid{display:grid;gap:7px}.ms-emp{display:grid;grid-template-columns:1.4fr 1fr auto;gap:7px;align-items:center;border:1px solid #ddd;border-radius:10px;padding:9px}.ms-emp-name small{display:block;font-size:11px;opacity:.7}.ms-price{font-size:12px}.ms-hire,.ms-fire{font-size:12px;padding:6px 8px;border-radius:8px;border:1px solid #bbb;background:#fff;margin:2px}.ms-security{display:grid;gap:6px;margin-top:10px;padding:10px;border-radius:10px;background:#eef6ff}.ms-history-wrap{margin-top:12px}.ms-history{display:flex;justify-content:space-between;gap:8px;border-bottom:1px solid #eee;padding:6px 0;font-size:12px}.ms-history .in{color:#078a31}.ms-history .out{color:#b00020}.ms-empty{opacity:.6;padding:8px}@media(max-width:700px){.ms-summary{grid-template-columns:1fr 1fr}.ms-emp{grid-template-columns:1fr}.ms-tabs{scrollbar-width:none}.ms-tab{min-width:88px}.multi-store-box{width:98vw}.ms-price{font-size:11px}}

/* v2.3.29 theft login notification */
.tthms-theft-alert{position:fixed;inset:0;z-index:100500;display:flex;align-items:center;justify-content:center;padding:12px;background:rgba(0,0,0,.72);box-sizing:border-box;}
.tthms-theft-card{position:relative;width:min(94vw,760px);max-height:94vh;border-radius:18px;overflow:hidden;box-shadow:0 18px 60px rgba(0,0,0,.5);background:#111;}
.tthms-theft-card img{display:block;width:100%;height:auto;max-height:94vh;object-fit:contain;}
.tthms-theft-info{position:absolute;left:18%;right:18%;bottom:17%;display:flex;justify-content:center;gap:8px;flex-wrap:wrap;color:#111;background:rgba(255,255,255,.9);border-radius:10px;padding:7px 10px;font-size:12px;text-align:center;}
.tthms-theft-info span{display:block;width:100%;}
.tthms-theft-info strong{color:#c00;}
#tthmsTheftAck{position:absolute;left:36%;right:36%;bottom:3.5%;height:13%;border:0;background:transparent;cursor:pointer;border-radius:18px;}
#tthmsTheftAck:active{background:rgba(255,255,255,.12);}
@media(max-width:600px){.tthms-theft-alert{padding:5px}.tthms-theft-card{width:98vw;border-radius:12px}.tthms-theft-info{left:10%;right:10%;bottom:17%;font-size:10px;padding:5px}.tthms-theft-info span{line-height:1.2}#tthmsTheftAck{left:28%;right:28%;bottom:3%;height:14%;}}
.ms-rent-gate{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:10px;padding:28px 18px;margin-top:8px;border:2px solid #d8b04b;border-radius:18px;background:linear-gradient(180deg,#fffdf4,#fff7d6);box-shadow:0 8px 24px rgba(0,0,0,.12)}
.ms-rent-icon{font-size:52px;line-height:1}.ms-rent-gate h3{margin:0;font-size:21px}.ms-rent-gate p{margin:0;max-width:620px;color:#555}.ms-rent-price{font-size:28px;font-weight:900;color:#b00020}.ms-rent-price small{font-size:13px;color:#555;font-weight:700}.ms-rent-note{max-width:620px;padding:9px 12px;border-radius:10px;background:#fff;color:#555;font-size:12px}.ms-rent-btn{width:min(100%,620px);min-height:48px;border:0;border-radius:12px;background:#111;color:#fff;font-weight:900;font-size:14px;padding:12px;cursor:pointer;box-shadow:0 5px 14px rgba(0,0,0,.18)}.ms-rent-btn:active{transform:scale(.99)}.ms-rent-balance{color:#666}@media(max-width:600px){.ms-rent-gate{padding:22px 12px}.ms-rent-price{font-size:23px}.ms-rent-btn{font-size:12px}}

/* v2.3.31: gom nút quản lý cửa tiệm 2-10 thành một nút chính, tối ưu mobile */
.ms-management-panel{margin-top:10px;padding:10px;border:1px solid #ddd;border-radius:14px;background:#fafafa}
.ms-panel-actions{display:grid;grid-template-columns:1fr 1fr 1fr 1fr;gap:7px}
.ms-manage-main,.ms-primary-action,.ms-section-toggle,.ms-employee-manage{min-height:42px;border:1px solid #c8c8c8;border-radius:10px;background:#fff;color:#5a3827;font-weight:800;cursor:pointer;touch-action:manipulation}
.ms-manage-main{background:#222;color:#fff;border-color:#222;padding:8px 12px}
.ms-primary-action{background:#e8f5e9;border-color:#8bc48f;color:#155b1a}
.ms-section-toggle{padding:8px;text-align:left;display:flex;align-items:center;justify-content:space-between}
.ms-section-toggle.active{background:#f0e0c8;border-color:#c89b75}
.ms-section-toggle span{font-size:18px}
.ms-section{margin-top:9px;padding:9px;border-radius:11px;background:#fff;border:1px solid #e2e2e2}
.ms-section-title{font-weight:900;margin-bottom:8px}
.ms-emp{padding:8px}
.ms-emp-main{display:grid;grid-template-columns:1.4fr 1fr auto;gap:7px;align-items:center}
.ms-employee-manage{padding:7px 10px;white-space:nowrap}
.ms-employee-manage.active{background:#f3dfc3;border-color:#c89b75}
.ms-employee-actions{display:flex;gap:6px;flex-wrap:wrap;margin-top:7px;padding-top:7px;border-top:1px dashed #ddd}
.ms-employee-actions button{min-height:36px;border:1px solid #bbb;border-radius:8px;background:#fff;padding:6px 9px;font-weight:700}
.ms-employee-actions button.ms-hire{color:#5a3827!important;background:#fff!important;display:flex;align-items:center;justify-content:center;visibility:visible!important;opacity:1!important}
.ms-employee-actions button.ms-fire{color:#a40000!important}
.ms-employee-actions button:disabled{color:#777!important;opacity:.65!important}
.ms-employee-actions .ms-fire{color:#a40000}
.ms-current{font-size:11px;font-weight:800;align-self:center;margin-right:auto}
@media(max-width:700px){
 .ms-panel-actions{grid-template-columns:1fr 1fr}
 .ms-manage-main{grid-column:1/-1}
 .ms-emp-main{grid-template-columns:1fr auto}
 .ms-emp-main .ms-price{grid-column:1/2;font-size:10px}
 .ms-employee-manage{grid-column:2/3;grid-row:1/3}
 .ms-employee-actions{display:grid;grid-template-columns:1fr 1fr}
 .ms-current{grid-column:1/-1}
 .ms-employee-actions button{width:100%;min-height:40px}
}

/* v2.3.32: compact main-store controls for mobile */
.primary-actions{display:grid;grid-template-columns:1.25fr 1fr;gap:6px;align-items:stretch}
.primary-actions .save-game-box{display:grid;grid-template-columns:1fr 38px;gap:4px;margin:0}
.primary-actions button{min-height:40px}
.multi-store-main-btn{width:100%;min-height:42px!important;margin-top:6px;border:1px solid #6b4b2a!important;border-radius:12px!important;background:#6b4b2a!important;color:#fff!important;font-weight:900!important;font-size:12px!important;padding:8px 10px!important;cursor:pointer;touch-action:manipulation}
.multi-store-main-btn:active{transform:translateY(1px);filter:brightness(.95)}
.control-group,.side-group{background:#fff8ea;border:1px solid #dec49f;border-radius:12px;padding:0;overflow:hidden}
.control-group summary,.side-group summary{list-style:none;cursor:pointer;padding:9px 10px;display:flex;align-items:center;gap:6px;font-size:11px;color:#5a3827;min-height:38px}
.control-group summary::-webkit-details-marker,.side-group summary::-webkit-details-marker{display:none}
.control-group summary:after,.side-group summary:after{content:'＋';margin-left:auto;font-size:16px;font-weight:900}
.control-group[open] summary:after,.side-group[open] summary:after{content:'−'}
.control-group summary span{display:block;font-size:9px;color:#8a7562;font-weight:700;margin-left:2px}
.control-group-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;padding:0 6px 6px}
.control-group-grid button{width:100%;min-height:36px!important;font-size:9px!important;padding:6px 5px!important}
.control-group-grid .wide-control{grid-column:1/-1}
.side-group{margin-top:6px}
.side-group .loan-side-btn{width:calc(100% - 12px);margin:0 6px 6px}
.side-group summary{background:#fff8ea}
.side-group .compact-info-actions{padding:0 6px 6px;display:grid;gap:5px}
.side-group .compact-info-actions .compact-info-btn{width:100%;min-height:34px}
@media(max-width:600px){
 .footer-control-grid{grid-template-columns:1fr!important;gap:6px}
 .footer-store-tools{grid-template-columns:1fr!important;gap:6px!important}
 .primary-actions{grid-template-columns:1fr 1fr}
 .primary-actions .save-game-box{grid-template-columns:1fr 34px}
 .control-group summary,.side-group summary{font-size:10px;padding:8px}
 .control-group summary span{font-size:8px}
 .control-group-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:4px}
 .control-group-grid button{min-height:38px!important;font-size:8.5px!important}
}
/* v2.3.38: store opening / salary strike notifications */
.ms-money-float{position:fixed;z-index:100000;left:50%;top:92px;transform:translateX(-50%);pointer-events:none;animation:msMoneyFloat 1.55s ease-out forwards}.ms-money-float-inner{display:flex;align-items:center;gap:6px;background:#edf8ee;border:2px solid #79bd84;border-radius:999px;padding:6px 12px;box-shadow:0 4px 12px rgba(0,0,0,.14);color:#237a34;white-space:nowrap}.ms-money-float-inner span{font-size:15px;line-height:1}.ms-money-float-inner b{font-size:16px;line-height:1}.ms-money-float-inner small{font-size:10px;font-weight:800;color:#5c7c62}.tthms-open-success-modal{position:fixed;inset:0;z-index:100001;background:rgba(0,0,0,.68);display:flex;align-items:center;justify-content:center;padding:12px}.tthms-open-success-card{width:min(92vw,460px);background:#fff;border-radius:20px;overflow:hidden;box-shadow:0 20px 60px rgba(0,0,0,.45);border:3px solid #7ccf79}.tthms-open-success-card img{display:block;width:100%;height:auto}.tthms-open-success-card button{display:block;width:calc(100% - 24px);margin:12px;border:0;border-radius:12px;background:#39ad4d;color:#fff;padding:11px 14px;font-weight:900;font-size:14px}@keyframes msMoneyFloat{0%{opacity:0;transform:translate(-50%,8px) scale(.92)}18%{opacity:1;transform:translate(-50%,0) scale(1)}72%{opacity:1;transform:translate(-50%,-10px) scale(1)}100%{opacity:0;transform:translate(-50%,-22px) scale(.98)}}.tthms-strike-alert{position:fixed;inset:0;z-index:100001;background:rgba(0,0,0,.68);display:flex;align-items:center;justify-content:center;padding:14px}.tthms-strike-card{max-width:520px;width:min(94vw,520px);background:#fff;border-radius:24px;overflow:hidden;box-shadow:0 20px 70px rgba(0,0,0,.5);border:3px solid #d52b20}.tthms-strike-card img{display:block;width:100%;height:auto}.tthms-strike-info{padding:14px;text-align:center}.tthms-strike-info b{display:block;font-size:20px;color:#c21f1f}.tthms-strike-info span{display:block;margin:8px 0 12px;font-weight:700;line-height:1.4}.tthms-strike-info button{border:0;border-radius:14px;padding:12px 16px;margin:4px;font-weight:900;cursor:pointer}.tthms-strike-info #tthmsStrikeManage{background:#20a94b;color:#fff}.tthms-strike-info #tthmsStrikeClose{background:#eee;color:#333}.ms-pay-salary{background:#1eaa4b!important;color:#fff!important;border:0;border-radius:10px;padding:8px 10px;font-weight:800}.tthms-main-strike{position:fixed;inset:0;z-index:100000;background:rgba(0,0,0,.66);display:flex;align-items:center;justify-content:center;padding:12px}.tthms-main-strike-card{width:min(94vw,520px);background:#fff;border:3px solid #d52b20;border-radius:24px;overflow:hidden;box-shadow:0 20px 70px rgba(0,0,0,.5)}.tthms-main-strike-card img{display:block;width:100%;height:auto}.tthms-main-strike-text{text-align:center;padding:14px}.tthms-main-strike-text b{display:block;color:#c21f1f;font-size:22px}.tthms-main-strike-text span{display:block;margin:8px 0 12px;font-weight:700;line-height:1.4}.tthms-main-strike-text button{border:0;border-radius:14px;background:#20a94b;color:#fff;padding:12px 20px;font-weight:900}

/* v2.3.41 UI compact + clearer multi-store management */
.ms-summary-card{grid-template-columns:1.35fr .9fr .9fr .9fr auto!important;padding:9px!important;gap:6px!important;font-size:11px!important;}
.ms-summary-card>div{min-width:0;background:#fff;border-radius:9px;padding:7px 8px;border:1px solid #ead9c2;}
.ms-summary-card small{display:block;font-size:9px;color:#806d5c;margin-bottom:2px;}
.ms-summary-card b{display:block;font-size:12px;line-height:1.2;}
.ms-management-panel{margin-top:7px;}
.ms-panel-actions{display:grid;grid-template-columns:1.15fr 1fr 1fr 1fr;gap:5px;margin-bottom:7px;}
.ms-panel-actions button{min-height:34px!important;font-size:9px!important;padding:5px 6px!important;}
.ms-section{padding:7px!important;border-radius:10px!important;}
.ms-section-title{font-size:11px!important;margin-bottom:5px!important;}
.ms-emp{padding:7px!important;gap:5px!important;border-radius:8px!important;}
.ms-employee-manage{min-height:30px!important;padding:5px 7px!important;font-size:9px!important;}
.ms-employee-actions button{font-size:9px!important;padding:5px 6px!important;}
.ms-security{padding:7px!important;margin-top:5px!important;font-size:10px!important;}
.ms-history{font-size:10px!important;padding:5px 0!important;}
/* Main shop: larger shelf area while controls stay compact */
.product-trays{transform:none!important;transform-origin:center center;}
.tray{min-height:86px!important;padding:6px!important;}
.tray .tray-icon{font-size:29px!important;}
.guide-footer{font-size:10px!important;padding:7px 9px!important;border-radius:9px!important;}
.save-game-guide-content p{font-size:10px!important;line-height:1.35!important;margin:5px 0!important;}
@media(max-width:700px){
  .multi-store-box{width:96vw!important;max-height:88vh!important;padding:10px!important;border-radius:14px!important;}
  .ms-head h2{font-size:15px!important;}
  .ms-tabs{padding:6px 0!important;gap:4px!important;}
  .ms-tab{min-width:78px!important;padding:6px 5px!important;font-size:10px!important;}
  .ms-tab small{font-size:9px!important;}
  .ms-summary-card{grid-template-columns:1fr 1fr!important;}
  .ms-summary-card>div{padding:6px!important;}
  .ms-panel-actions{grid-template-columns:1fr 1fr!important;}
  .ms-panel-actions .ms-primary-action{grid-column:1/-1!important;}
  .product-trays{transform:none!important;}
  .tray{min-height:82px!important;}
}
/* v2.3.42 - store directory 2-10 */
.multi-store-directory{max-width:980px!important;width:96vw!important}
.ms-directory-note{margin:8px 0 12px;padding:9px 11px;border-radius:10px;background:#fff7d6;font-size:12px}
.ms-store-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.ms-store-card{border:1px solid #ddd;border-radius:13px;padding:10px;background:#fff;box-shadow:0 2px 7px rgba(0,0,0,.06)}
.ms-store-card.locked{background:#fafafa}
.ms-store-card-top{display:flex;gap:9px;align-items:center}.ms-store-number{width:34px;height:34px;border-radius:10px;display:grid;place-items:center;background:#6b4b2a;color:#fff;font-weight:900;font-size:15px}.ms-store-card-top b{display:block;font-size:13px}.ms-store-card-top small{display:block;font-size:10px;margin-top:2px}.ms-store-card-price{font-weight:800;font-size:12px;margin-top:8px}.ms-store-card-meta{font-size:10px;opacity:.75;margin:5px 0 8px}.ms-store-card-btn{width:100%;min-height:34px;border:1px solid #bbb;border-radius:9px;background:#f5f5f5;font-weight:800;font-size:11px;cursor:pointer}.ms-store-card.rented .ms-store-card-btn{background:#fff7d6}
.ms-detail{margin-top:12px;padding-top:10px;border-top:1px solid #ddd}.ms-detail-head{display:flex;align-items:center;gap:8px;margin-bottom:8px}.ms-detail-head button{border:0;background:#eee;border-radius:8px;padding:7px 9px;font-size:11px;font-weight:800}.ms-detail-head b{flex:1;font-size:14px}.ms-detail-head span{font-size:10px}
@media(max-width:700px){.ms-store-grid{grid-template-columns:1fr 1fr;gap:7px}.ms-store-card{padding:8px}.ms-store-number{width:30px;height:30px;font-size:13px}.ms-store-card-top b{font-size:11px}.ms-store-card-price{font-size:10px}.ms-store-card-meta{font-size:9px}.ms-store-card-btn{font-size:10px;min-height:32px}.ms-directory-note{font-size:11px}.ms-detail-head b{font-size:12px}}

/* v2.3.43 - mobile icon dashboard + ultra-compact shelf upgrade */
.mobile-icon-dashboard{gap:7px!important;}
.mobile-icon-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;}
.mobile-icon-box{min-width:0;min-height:58px;border:1px solid #dec49f;border-radius:11px;background:#fff8ea;color:#4f3326;padding:6px 4px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;cursor:pointer;touch-action:manipulation;box-shadow:0 2px 0 rgba(107,75,42,.10);}
.mobile-icon-box:active{transform:scale(.98);}
.mobile-icon-box .mobile-icon{font-size:22px;line-height:1.05;}
.mobile-icon-box b{font-size:9px;line-height:1.1;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;}
.mobile-icon-box small{font-size:7px;line-height:1;color:#8a7562;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;}
.mobile-icon-open{background:#edf8ee;border-color:#9acb9d;}
.mobile-icon-save{background:#eef5ff;border-color:#9bbbe6;}
.mobile-icon-store{background:#fff2d7;border-color:#d9b26f;}
.mobile-more-controls{margin-top:6px!important;}
.mobile-more-controls summary{min-height:30px!important;padding:6px 8px!important;}
.mobile-more-controls .control-group-grid{padding:5px!important;}
.mobile-more-controls button{min-height:34px!important;font-size:9px!important;}
.mobile-shelf-card{padding:3px!important;min-height:58px;}
.mobile-shelf-card .shelf-control-title{font-size:8px!important;}
.mobile-shelf-card .shelf-control-main{grid-template-columns:24px 1fr 24px!important;gap:3px!important;margin-top:0!important;}
.mobile-shelf-card .shelf-control-main button{height:24px!important;font-size:16px!important;}
.mobile-shelf-card .shelf-control-main strong{font-size:13px!important;}
.mobile-shelf-card .shelf-control-main small{font-size:7px!important;}
.mobile-shelf-card .shelf-control-note{font-size:6px!important;line-height:1;margin-top:1px!important;}
.mobile-info-group summary{min-height:30px!important;padding:6px 8px!important;font-size:9px!important;}
@media(max-width:700px){
  .mobile-icon-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;}
  .mobile-icon-box{min-height:55px;padding:5px 3px;border-radius:10px;}
  .mobile-icon-box .mobile-icon{font-size:20px;}
  .mobile-icon-box b{font-size:8px;}
  .mobile-icon-box small{font-size:6px;}
  .mobile-shelf-card{min-height:53px;}
}
@media(max-width:430px){
  .mobile-icon-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;}
  .mobile-icon-box{min-height:51px;border-radius:9px;}
  .mobile-icon-box .mobile-icon{font-size:18px;}
  .mobile-icon-box b{font-size:7px;}
  .mobile-icon-box small{display:none;}
  .mobile-shelf-card .shelf-control-note{display:block!important;font-size:7px!important;line-height:1.15!important;margin-top:2px!important;white-space:nowrap;overflow:visible;}
}
/* v2.3.43 - 2-10 store directory as compact icon/card grid */
.ms-store-card{position:relative;min-height:132px;}
.ms-store-card-top{align-items:flex-start!important;}
.ms-store-number{width:38px;height:38px;border-radius:11px;font-size:16px;flex:0 0 auto;}
.ms-store-card-top:before{content:'🏪';position:absolute;right:9px;top:9px;font-size:21px;opacity:.9;}
.ms-store-card-top b{padding-right:25px;}
.ms-store-card-btn{min-height:36px!important;}
@media(max-width:700px){
  .ms-store-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:6px!important;}
  .ms-store-card{padding:7px!important;min-height:118px;border-radius:11px;}
  .ms-store-number{width:29px;height:29px;border-radius:8px;font-size:12px;}
  .ms-store-card-top{gap:5px!important;}
  .ms-store-card-top b{font-size:9px!important;padding-right:18px;}
  .ms-store-card-top small{font-size:7px!important;}
  .ms-store-card-top:before{right:6px;top:6px;font-size:15px;}
  .ms-store-card-price{font-size:8px!important;margin-top:5px!important;}
  .ms-store-card-meta{font-size:7px!important;margin:4px 0 5px!important;min-height:18px;}
  .ms-store-card-btn{font-size:8px!important;min-height:29px!important;padding:4px!important;}
  .ms-directory-note{font-size:9px!important;padding:6px 8px!important;margin:5px 0 7px!important;}
}
@media(max-width:380px){
  .ms-store-grid{gap:4px!important;}
  .ms-store-card{padding:6px!important;min-height:110px;}
  .ms-store-card-price{font-size:7px!important;}
  .ms-store-card-meta{font-size:6.5px!important;}
  .ms-store-card-btn{font-size:7px!important;min-height:27px!important;}
}

/* v2.3.45 multi-store land mobile */
.ms-land-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.ms-land-card{border:1px solid #ddd;border-radius:12px;padding:10px;display:flex;flex-direction:column;gap:5px;background:#fff}.ms-land-card small{font-size:11px;line-height:1.25}.ms-land-card strong{font-size:13px}.ms-land-owned{font-size:11px;color:#087f23;font-weight:700}.ms-buy-land{width:100%;min-height:38px;border:0;border-radius:10px;font-weight:700}@media(max-width:520px){.ms-land-grid{grid-template-columns:1fr}.ms-land-card{padding:9px}.ms-land-card small{font-size:10px}}

/* v2.3.47: visible feedback when selecting a multi-store card */
.ms-store-feedback{position:fixed;left:50%;top:18px;transform:translateX(-50%);z-index:100000;display:flex;align-items:center;gap:8px;max-width:92vw;padding:11px 14px;border-radius:12px;background:#222;color:#fff;box-shadow:0 8px 24px rgba(0,0,0,.25);font-size:13px;font-weight:700}.ms-store-feedback.ok{background:#167a3a}.ms-store-feedback b{font-size:18px}@media(max-width:700px){.ms-store-feedback{top:10px;font-size:12px;max-width:94vw;text-align:center}}

/* v2.3.65: high-contrast staff hire controls for mobile */
.ms-employee-actions button.ms-hire[data-mode="day"]{
  background:#2f80ed!important;
  color:#fff!important;
  border:2px solid #1f63bd!important;
  box-shadow:0 2px 0 #174f99;
}
.ms-employee-actions button.ms-hire[data-mode="month"]{
  background:#20a05a!important;
  color:#fff!important;
  border:2px solid #16753f!important;
  box-shadow:0 2px 0 #0f5a30;
}
.ms-employee-actions button.ms-hire[data-mode="day"]:active,
.ms-employee-actions button.ms-hire[data-mode="month"]:active{
  transform:translateY(1px);
  box-shadow:none;
}
.ms-employee-actions button.ms-hire{
  min-height:42px!important;
  font-weight:900!important;
  text-shadow:0 1px 1px rgba(0,0,0,.18);
  cursor:pointer;
  touch-action:manipulation;
}
.ms-employee-actions button.ms-hire[data-mode="day"]::first-letter{color:#fff}
@media(max-width:700px){
  .ms-employee-actions button.ms-hire{min-height:44px!important;font-size:11px!important;padding:8px 10px!important;}
}

/* v2.3.68: compact shelf box matches the compact information box on mobile. */
.mobile-shelf-card{
  padding:6px 8px!important;
  border:1px solid #dec49f!important;
  border-radius:11px!important;
  background:#fff8ea!important;
  box-shadow:0 2px 0 rgba(107,75,42,.10)!important;
  min-height:0!important;
}
.mobile-shelf-card .shelf-control-title{font-size:9px!important;line-height:1.1!important;margin:0!important;}
.mobile-shelf-card .shelf-control-note{font-size:6px!important;line-height:1.1!important;margin-top:2px!important;}
.mobile-shelf-card .shelf-control-main{padding:0!important;}
.mobile-shelf-card .shelf-control-main button{min-height:24px!important;}
@media(max-width:600px){
  .mobile-shelf-card{padding:5px 7px!important;}
  .mobile-shelf-card .shelf-control-title{font-size:8px!important;}
  .mobile-shelf-card .shelf-control-note{font-size:5.5px!important;}
}

/* v2.3.72: cumulative revenue UI / secondary-store opening gate */
.tthms-total-revenue{margin-top:8px;padding:8px 12px;border-radius:12px;background:rgba(255,255,255,.92);border:1px solid rgba(0,0,0,.08);font-weight:800;text-align:center;font-size:14px}
.ms-rent-revenue-gate{margin:10px 0;padding:10px 12px;border-radius:12px;background:#f4f8ff;border:1px solid #c9d9f5;line-height:1.55}
.ms-rent-btn:disabled{opacity:.55;cursor:not-allowed;filter:grayscale(.25)}

/* v2.3.44 - UI ONLY: reorganize main control boxes for mobile.
 * Functional JS/PHP handlers and IDs are intentionally unchanged.
 * Visual ordering: 1 Open/Close, 2 Import, 3 Display, 4 Staff,
 * 5 Manage stores, 6 Finance, 7 Save, 8 Guide.
 */
.mobile-icon-grid .mobile-icon-open{order:1;}
.mobile-icon-grid #buy{order:2;}
.mobile-icon-grid #stock{order:3;}
.mobile-icon-grid #employeesBtn{order:4;}
.mobile-icon-grid #multiStoresBtn{order:5;}
.mobile-icon-grid #loanBtn{order:6;}
.mobile-icon-grid .mobile-icon-save{order:7;}
.mobile-icon-grid #saveGameGuideBtn{order:8;}

/* Keep the primary controls visually consistent and make the workflow obvious. */
.mobile-icon-grid .mobile-icon-open{background:#edf8ee;border-color:#9acb9d;}
.mobile-icon-grid #buy{background:#fff8ea;border-color:#d8b98d;}
.mobile-icon-grid #stock{background:#fff8ea;border-color:#d8b98d;}
.mobile-icon-grid #employeesBtn{background:#f1f7ff;border-color:#aac8e6;}
.mobile-icon-grid #multiStoresBtn{background:#fff2d7;border-color:#d9b26f;}
.mobile-icon-grid #loanBtn{background:#f8f1ff;border-color:#c8a9df;}
.mobile-icon-grid .mobile-icon-save{background:#eef5ff;border-color:#9bbbe6;}
.mobile-icon-grid #saveGameGuideBtn{background:#fff8ea;border-color:#d8b98d;}

/* Put the less-frequent controls below the daily workflow. */
.mobile-more-controls{order:20;}
.shelf-loan-side{order:21;}

@media(max-width:600px){
  .mobile-icon-grid{grid-template-columns:repeat(4,minmax(0,1fr));}
  .mobile-icon-box{min-height:57px;}
  .mobile-icon-box b{font-size:8.5px;}
  .mobile-icon-box small{font-size:6.5px;}
  .shelf-loan-side{margin-top:0;}
}

@media(max-width:430px){
  .mobile-icon-grid{gap:4px;}
  .mobile-icon-box{min-height:54px;}
  .mobile-icon-box .mobile-icon{font-size:19px;}
}


/* v2.3.71 — independent referral box */
.tthms-referral-box{
  width:min(94%,760px);
  margin:10px auto 0;
  display:flex;
  align-items:center;
  gap:10px;
  padding:12px 14px;
  border:1px solid rgba(245,158,11,.45);
  border-radius:16px;
  background:linear-gradient(135deg,#fff7ed,#fffbeb);
  box-shadow:0 5px 18px rgba(0,0,0,.08);
  box-sizing:border-box;
}
.tthms-referral-icon{font-size:30px;line-height:1}
.tthms-referral-body{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}
.tthms-referral-body strong{font-size:16px;color:#3b1f0f;font-weight:900}
.tthms-referral-body span{font-size:12px;color:#1f2937;line-height:1.45;font-weight:600}
.tthms-referral-body small{font-size:11px;color:#374151;font-weight:700}
.tthms-referral-box button,.tthms-referral-actions button{
  border:0;border-radius:11px;padding:10px 12px;font-weight:800;cursor:pointer;
}
.tthms-referral-box button{background:#f59e0b;color:#fff;white-space:nowrap}
.tthms-referral-modal{max-width:560px;color:#111827;box-sizing:border-box;width:min(100%,560px);overflow:hidden}.tthms-referral-overlay{background:rgba(0,0,0,.45)!important}.tthms-referral-modal .modal-title{color:#111827!important}.tthms-referral-modal .tthms-referral-note{color:#111827!important}.tthms-referral-modal .tthms-referral-share-hint{color:#374151!important}
.tthms-referral-banner-wrap{width:100%;margin:4px 0 12px;border:2px solid #f59e0b;border-radius:16px;background:#fff;overflow:hidden;box-sizing:border-box;box-shadow:0 5px 16px rgba(0,0,0,.08)}
.tthms-referral-banner{display:block;width:100%;height:auto;max-height:310px;object-fit:contain;background:#fff}
.tthms-referral-intro-box{margin:0 0 12px;padding:12px;border:2px solid #fbbf24;border-radius:14px;background:linear-gradient(135deg,#fff7ed,#fffbeb);box-sizing:border-box}
.tthms-referral-intro-title{font-size:14px;line-height:1.25;font-weight:900;color:#92400e;text-align:center;margin-bottom:8px}
.tthms-referral-intro-lines{display:grid;gap:5px;font-size:12px;line-height:1.45;color:#1f2937;font-weight:600}
.tthms-referral-intro-lines div{padding:6px 8px;border-radius:9px;background:rgba(255,255,255,.75)}
.tthms-referral-note{font-size:13px;line-height:1.5;color:#4b5563}
.tthms-referral-share-grid{display:grid;grid-template-columns:190px minmax(0,1fr);gap:14px;align-items:center;margin:12px 0}
.tthms-referral-qr-wrap{display:flex;flex-direction:column;align-items:center;gap:5px;padding:10px;border:1px solid #e5e7eb;border-radius:14px;background:#fff}
.tthms-referral-qr-title{font-size:12px;font-weight:800;color:#374151}
.tthms-referral-qr{width:min(160px,100%);height:auto;aspect-ratio:1/1;max-width:100%;display:block;object-fit:contain;background:#fff;border-radius:6px}
.tthms-referral-qr-wrap small{font-size:10px;color:#6b7280;text-align:center}
.tthms-referral-link-col{min-width:0}
.tthms-referral-share-hint{margin-top:7px;font-size:11px;line-height:1.4;color:#6b7280}
.tthms-referral-link-row{display:flex;gap:7px;align-items:stretch}
.tthms-referral-link-row input{
  flex:1;min-width:0;padding:11px;border:1px solid #d1d5db;border-radius:10px;
  font-size:12px;background:#f9fafb;color:#111827;box-sizing:border-box;
}
.tthms-referral-link-row button{background:#2563eb;color:#fff;white-space:nowrap}
.tthms-referral-stats{margin:12px 0;padding:10px;border-radius:10px;background:#f3f4f6;font-size:13px}
.tthms-referral-actions{display:flex;gap:8px;justify-content:flex-end}
.tthms-referral-actions #shareReferralBtn{background:#16a34a;color:#fff}
@media(max-width:600px){
  .tthms-referral-box{align-items:flex-start;padding:10px}
  .tthms-referral-icon{font-size:26px}
  .tthms-referral-box button{padding:9px 8px;font-size:11px}
  .tthms-referral-modal{width:calc(100vw - 20px);max-width:none;margin:10px auto;padding:14px;border-radius:16px;max-height:calc(100vh - 20px);overflow-y:auto;-webkit-overflow-scrolling:touch}
  .tthms-referral-banner-wrap{border-radius:12px;margin-bottom:10px}
  .tthms-referral-banner{max-height:none;width:100%;height:auto}
  .tthms-referral-intro-box{padding:10px;margin-bottom:10px}
  .tthms-referral-intro-title{font-size:13px}
  .tthms-referral-intro-lines{font-size:11.5px;gap:4px}
  .tthms-referral-share-grid{grid-template-columns:1fr;gap:10px}
  .tthms-referral-qr-wrap{width:100%;box-sizing:border-box;padding:9px}
  .tthms-referral-qr{width:min(180px,68vw);height:auto;aspect-ratio:1/1}
  .tthms-referral-link-row{flex-direction:column}
  .tthms-referral-link-row input{width:100%;font-size:11px;min-height:42px}
  .tthms-referral-link-row button{width:100%;min-height:42px}
  .tthms-referral-actions{flex-direction:column}
  .tthms-referral-actions button{width:100%;min-height:42px}
}


/* v2.3.79 — independent employee incident UI: white background / black text. */
.tthms-employee-incident-modal{z-index:10050!important;background:rgba(0,0,0,.52)!important;padding:10px;box-sizing:border-box}
.tthms-employee-incident-box{position:relative;width:min(94vw,460px);max-height:calc(100vh - 24px);overflow:auto;margin:auto;background:#fff;color:#111;border:3px solid #111;border-radius:18px;box-shadow:0 12px 35px rgba(0,0,0,.3);padding:18px 16px 16px;box-sizing:border-box;text-align:center;font-family:inherit}
.tthms-ei-title{font-size:22px;line-height:1.15;font-weight:950;color:#111;margin:2px 36px 12px}
.tthms-ei-close{position:absolute;right:10px;top:10px;width:38px;height:38px;border:2px solid #111;border-radius:50%;background:#fff;color:#111;font-size:25px;font-weight:900;line-height:30px;cursor:pointer}
.tthms-ei-employee{width:78px;height:78px;margin:4px auto 10px;border:3px solid #111;border-radius:50%;display:flex;align-items:center;justify-content:center;background:#fff;font-size:45px}
.tthms-ei-error{font-size:18px;line-height:1.35;font-weight:900;padding:12px 10px;border:2px solid #111;border-radius:12px;background:#fff;margin:0 0 10px}
.tthms-ei-meta{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-bottom:10px}
.tthms-ei-meta span,.tthms-ei-balance,.tthms-ei-note{border:2px solid #111;border-radius:10px;background:#fff;padding:9px 7px;font-size:12px;font-weight:700}
.tthms-ei-fine{border:3px solid #111;border-radius:12px;background:#fff;padding:13px 10px;font-size:19px;font-weight:900;margin-bottom:10px}
.tthms-ei-fine b{font-size:24px}
.tthms-ei-note{margin-bottom:10px;font-size:11px}
.tthms-ei-balance{margin-bottom:12px;font-size:14px}
.tthms-ei-ok{width:100%;min-height:46px;border:3px solid #111;border-radius:12px;background:#fff;color:#111;font-size:16px;font-weight:950;cursor:pointer;touch-action:manipulation}
.tthms-ei-ok:active{transform:scale(.98)}
@media(max-width:430px){.tthms-employee-incident-box{width:calc(100vw - 20px);padding:15px 12px 12px;border-radius:15px}.tthms-ei-title{font-size:19px}.tthms-ei-error{font-size:16px}.tthms-ei-fine{font-size:17px}.tthms-ei-fine b{font-size:21px}.tthms-ei-meta span{font-size:10.5px}}

/* v2.3.83 — clean review UI: white background, black text; no decorative PNG controls */
.tthms-viral-review-modal .tthms-review-stage{
  background:#fff!important;
  border:2px solid #222!important;
  border-radius:28px!important;
  box-shadow:0 14px 40px rgba(0,0,0,.22)!important;
}
.tthms-viral-review-modal .tthms-review-asset{
  opacity:1!important;
  background:#fff!important;
}
.tthms-viral-review-modal .tthms-review-quote{
  color:#111!important;
  text-shadow:none!important;
  background:#fff!important;
  border:1px solid #222!important;
  border-radius:16px!important;
  padding:3% 4%!important;
}
.tthms-viral-review-modal .tthms-review-character b{
  color:#111!important;
  background:#fff!important;
  border-color:#222!important;
  box-shadow:none!important;
}

/* v2.3.84 — global payment freeze while employee incident popup is open. */
.tthms-payment-paused .pay,
.tthms-payment-paused #confirmPayment,
.tthms-payment-paused .ms-pay,
.tthms-payment-paused [data-payment-action]{
  pointer-events:none!important;
  opacity:.45!important;
}
.tthms-employee-incident-modal{z-index:100500!important;}
.tthms-employee-incident-modal .tthms-ei-close{z-index:100501!important;pointer-events:auto!important;}

/* v2.3.86 — real review Like button; no fake hitbox/decorative control. */
.tthms-viral-review-modal .tthms-review-actions-clean{display:flex;justify-content:center;align-items:center;margin-top:14px;}
.tthms-viral-review-modal .tthms-review-like-clean{min-width:92px;min-height:44px;padding:8px 16px;border:2px solid #111!important;border-radius:12px!important;background:#fff!important;color:#111!important;font-size:16px;font-weight:900;cursor:pointer;touch-action:manipulation;}
.tthms-viral-review-modal .tthms-review-like-clean.is-liked{background:#111!important;color:#fff!important;}
.tthms-viral-review-modal .tthms-review-like-clean:active{transform:scale(.97);}
.tthms-viral-review-modal .tthms-review-like-clean:focus-visible{outline:3px solid #111;outline-offset:2px;}


/* v2.3.87 — definitive clean review UI: no legacy asset, avatar, emoji, decorative hitboxes */
.tthms-viral-review-modal .tthms-review-stage{
  width:min(92vw,520px)!important;
  aspect-ratio:auto!important;
  min-height:0!important;
  max-height:90dvh!important;
  padding:24px!important;
  background:#fff!important;
  color:#111!important;
  border:2px solid #111!important;
  border-radius:16px!important;
  box-shadow:0 8px 30px rgba(0,0,0,.18)!important;
}
.tthms-viral-review-modal .tthms-review-asset,
.tthms-viral-review-modal .tthms-review-avatar,
.tthms-viral-review-modal .tthms-review-stars,
.tthms-viral-review-modal .tthms-review-hitbox{display:none!important;}
.tthms-viral-review-modal .tthms-review-character{position:static!important;width:auto!important;height:auto!important;display:block!important;}
.tthms-viral-review-modal .tthms-review-character b{display:block!important;margin:0 0 14px!important;padding:0!important;border:0!important;background:#fff!important;color:#111!important;box-shadow:none!important;font-size:18px!important;white-space:normal!important;}
.tthms-viral-review-modal .tthms-review-quote{position:static!important;width:auto!important;height:auto!important;min-height:90px!important;margin:0 0 16px!important;padding:18px!important;background:#fff!important;color:#111!important;border:1px solid #111!important;border-radius:12px!important;text-shadow:none!important;font-size:17px!important;line-height:1.45!important;display:block!important;}
.tthms-viral-review-modal .tthms-review-close{right:10px!important;top:10px!important;width:36px!important;height:36px!important;border:2px solid #111!important;border-radius:8px!important;background:#fff!important;color:#111!important;font-size:24px!important;box-shadow:none!important;}
.tthms-viral-review-modal .tthms-review-actions-clean{margin:0!important;display:flex!important;justify-content:center!important;}
.tthms-viral-review-modal .tthms-review-like-clean{min-width:110px!important;min-height:44px!important;padding:8px 16px!important;border:2px solid #111!important;border-radius:10px!important;background:#fff!important;color:#111!important;font-size:16px!important;font-weight:900!important;}
.tthms-viral-review-modal .tthms-review-like-clean.is-liked{background:#111!important;color:#fff!important;}

/* v2.3.88 — visible real LIKE button. */
.tthms-viral-review-modal .tthms-review-like-clean{display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:10px!important;min-width:150px!important;min-height:48px!important;padding:10px 20px!important;background:#fff!important;color:#111!important;border:2px solid #111!important;border-radius:10px!important;font-size:17px!important;font-weight:900!important;line-height:1!important;cursor:pointer!important;visibility:visible!important;opacity:1!important;position:relative!important;z-index:2!important;}
.tthms-viral-review-modal .tthms-review-like-label{display:inline!important;color:inherit!important;font-weight:950!important;}
.tthms-viral-review-modal .tthms-review-like-count{display:inline!important;color:inherit!important;font-weight:950!important;min-width:1ch!important;}
.tthms-viral-review-modal .tthms-review-like-clean.is-liked{background:#111!important;color:#fff!important;}


/* v2.3.90 — NEW 30-payment review event: blue real LIKE button and global customer pause. */
.tthms-viral-review-modal .tthms-review-like-clean{
  background:#0b74e8!important;color:#fff!important;border:2px solid #075bb5!important;
  box-shadow:0 2px 0 #075bb5!important;
}
.tthms-viral-review-modal .tthms-review-like-clean.is-liked{
  background:#075bb5!important;color:#fff!important;
}
.tthms-review-paused .pay,.tthms-review-paused #confirmPayment,.tthms-review-paused .ms-pay,.tthms-review-paused [data-payment-action]{
  pointer-events:none!important;opacity:.45!important;
}
.tthms-review-paused .customer-dialog,.tthms-review-paused .queue-card .pay,.tthms-review-paused .queue-card .leave{
  pointer-events:none!important;
}


/* v2.3.95: offline encrypted recovery code UI */
.tthms-recovery-code{display:block;width:100%;min-height:92px;box-sizing:border-box;margin:8px 0;padding:10px;border:2px solid #d2aa7d;border-radius:10px;background:#fff;color:#3b2b22;font-size:10px;line-height:1.35;resize:vertical;font-family:monospace;word-break:break-all}
.tthms-recovery-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin:7px 0}
.tthms-recovery-actions button{min-height:38px;border:1px solid #b88961;border-radius:9px;background:#fff3d9;color:#5a3b29;font-weight:800;font-size:11px;padding:7px}
.tthms-recovery-actions button:last-child{grid-column:1/-1}
@media(max-width:600px){.tthms-recovery-code{min-height:105px;font-size:9px}.tthms-recovery-actions button{font-size:10px;min-height:40px}}

/* v2.4.4: clean Information box face; only the title is visible until tapped */
.mobile-info-top-box.mobile-info-group{background:#fff8ea;border:1px solid #dec49f;border-radius:11px;padding:0;overflow:hidden;box-shadow:0 2px 0 rgba(107,75,42,.10);margin-top:0;}
.mobile-info-top-box .mobile-info-summary{list-style:none;cursor:pointer;min-height:58px!important;padding:6px 4px!important;display:flex!important;align-items:center!important;justify-content:center!important;gap:0!important;background:#fff8ea;color:#4f3326;font-size:9px!important;font-weight:900!important;text-align:center;line-height:1.1;}
.mobile-info-top-box .mobile-info-summary::-webkit-details-marker{display:none;}
.mobile-info-top-box .mobile-info-summary:after{display:none!important;content:none!important;}
.mobile-info-top-box .mobile-info-summary b{font-size:9px;line-height:1.1;text-align:center;white-space:nowrap;}
.mobile-info-top-box[open] .mobile-info-summary{background:#f3dfc3;}
.mobile-info-top-box .compact-info-actions{padding:0 6px 6px;}
@media(max-width:700px){.mobile-info-top-box .mobile-info-summary{min-height:55px!important;padding:5px 3px!important;font-size:8px!important}.mobile-info-top-box .mobile-info-summary b{font-size:8px;}}
@media(max-width:430px){.mobile-info-top-box .mobile-info-summary{min-height:51px!important;border-radius:9px;font-size:7px!important}.mobile-info-top-box .mobile-info-summary b{font-size:7px;}}

/* v2.4.1: mobile dashboard fixed 4 boxes x 2 rows; Info children stay hidden until opened */
.mobile-icon-grid{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;grid-auto-flow:row!important;gap:6px!important;align-items:stretch!important;}
.mobile-icon-grid>.mobile-icon-box,.mobile-icon-grid>.mobile-info-top-box{grid-column:auto!important;grid-row:auto!important;min-width:0!important;}
.mobile-info-top-box .compact-info-actions{display:none!important;}
.mobile-info-top-box[open]{grid-column:1/-1!important;}
.mobile-info-top-box[open] .compact-info-actions{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;padding:6px!important;}
.mobile-info-top-box[open] .compact-info-actions .compact-info-btn{min-width:0;width:100%;}
.mobile-info-top-box .mobile-info-summary{position:relative;}
.mobile-info-top-box .mobile-info-summary .mobile-icon{font-size:20px;line-height:1.05;}
@media(max-width:430px){
  .mobile-icon-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:4px!important;}
  .mobile-info-top-box[open] .compact-info-actions{grid-template-columns:1fr!important;}
  .mobile-info-top-box .mobile-info-summary .mobile-icon{font-size:18px;}
}

/* Final mobile 4x2 dashboard order: Thông tin must be between Tài chính and Lưu game. */
.mobile-icon-grid > #doorToggle{order:1!important;}
.mobile-icon-grid > #buy{order:2!important;}
.mobile-icon-grid > #stock{order:3!important;}
.mobile-icon-grid > #employeesBtn{order:4!important;}
.mobile-icon-grid > #multiStoresBtn{order:5!important;}
.mobile-icon-grid > #loanBtn{order:6!important;}
.mobile-icon-grid > .mobile-info-top-box{order:7!important;}
.mobile-icon-grid > #saveGameBtn{order:8!important;}
.mobile-icon-grid > .mobile-info-top-box:not([open]){grid-column:auto!important;grid-row:auto!important;}
/* Thông tin: hoạt động như các box chính, mở menu bằng modal; không bung 3 box con trong dashboard. */
.mobile-info-box{order:7!important;grid-column:auto!important;grid-row:auto!important;}
.mobile-info-box:active{transform:scale(.98);}
.info-modal-actions{display:flex!important;flex-direction:column!important;gap:7px!important;width:100%!important;padding:0!important;}
.info-modal-actions .compact-info-btn{width:100%!important;min-height:42px!important;display:flex!important;align-items:center!important;justify-content:space-between!important;}


/* v2.4.5 — Corporate staff gate for fully opened stores 2–10 */
.tthms-corporate-staff-gate{
  position:fixed!important;inset:0!important;z-index:1000!important;
  display:flex!important;align-items:center!important;justify-content:center!important;
  padding:14px!important;box-sizing:border-box!important;
  background:rgba(0,0,0,.72)!important;
  overscroll-behavior:contain!important;
}
body.tthms-corporate-gate-lock>*:not(#tthms-corporate-staff-gate):not(#modal){pointer-events:auto!important;}
.tthms-corp-close{position:absolute!important;right:10px!important;top:10px!important;width:38px!important;height:38px!important;padding:0!important;border:2px solid #8b5e34!important;border-radius:10px!important;background:#fff!important;color:#5b3b25!important;font-size:28px!important;line-height:1!important;font-weight:900!important;cursor:pointer!important;z-index:2!important;}
.tthms-corporate-staff-card{position:relative!important;}
.tthms-corporate-staff-card{
  width:min(720px,96vw)!important;max-height:92vh!important;overflow:auto!important;
  box-sizing:border-box!important;background:#fffaf0!important;color:#2f241e!important;
  border:3px solid #8b5e34!important;border-radius:18px!important;
  box-shadow:0 18px 55px rgba(0,0,0,.38)!important;padding:16px!important;
}
.tthms-corp-head h2{margin:0 0 6px!important;font-size:22px!important;font-weight:950!important;text-align:center!important;}
.tthms-corp-head p{margin:0!important;text-align:center!important;line-height:1.4!important;font-size:14px!important;}
.tthms-corp-total{margin:12px 0!important;padding:10px!important;border-radius:11px!important;background:#fff0c9!important;border:1px solid #d7b16c!important;text-align:center!important;font-weight:800!important;}
.tthms-corp-list{display:grid!important;gap:9px!important;}
.tthms-corp-staff-card{padding:11px!important;border:1px solid #dcc6a6!important;border-radius:12px!important;background:#fff!important;}
.tthms-corp-staff-main{display:flex!important;align-items:center!important;gap:10px!important;}
.tthms-corp-icon{font-size:30px!important;width:40px!important;text-align:center!important;}
.tthms-corp-staff-main b{display:block!important;font-size:16px!important;}
.tthms-corp-staff-main small{display:block!important;margin-top:3px!important;color:#68584a!important;}
.tthms-corp-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important;margin-top:9px!important;}
.tthms-corp-actions button{min-height:43px!important;border:1px solid #9c7045!important;border-radius:9px!important;background:#fff2cf!important;color:#3d2a1c!important;font-weight:900!important;cursor:pointer!important;}
.tthms-corp-actions button:active{transform:scale(.98)!important;}
.tthms-corp-current{margin-top:8px!important;padding:8px!important;border-radius:8px!important;background:#eaf7e9!important;color:#245a2c!important;font-weight:800!important;text-align:center!important;}
.tthms-corp-warning{margin-top:12px!important;padding:10px!important;border-radius:10px!important;background:#fff0f0!important;border:1px solid #e3a1a1!important;color:#8b2727!important;text-align:center!important;font-weight:850!important;line-height:1.35!important;}
@media(max-width:600px){
 .tthms-corporate-staff-gate{padding:8px!important;align-items:flex-start!important;overflow:auto!important;}
 .tthms-corporate-staff-card{width:100%!important;max-height:96vh!important;margin-top:3vh!important;padding:11px!important;border-radius:14px!important;}
 .tthms-corp-head h2{font-size:18px!important;}
 .tthms-corp-head p,.tthms-corp-total{font-size:12px!important;}
 .tthms-corp-actions{grid-template-columns:1fr!important;}
 .tthms-corp-actions button{min-height:45px!important;font-size:12px!important;}
}

/* v2.4.5 UI-only fix: keep store directory in front and make corporate staff reopenable. */
.ms-head{display:flex!important;align-items:center!important;gap:8px!important;}
.ms-head h2{flex:1!important;margin:0!important;}
.ms-head-actions{display:flex!important;align-items:center!important;gap:6px!important;flex-shrink:0!important;}
.ms-corporate-staff-btn{min-height:38px!important;padding:7px 10px!important;border:1px solid #8b5e34!important;border-radius:9px!important;background:#fff0c9!important;color:#4b321f!important;font-weight:900!important;cursor:pointer!important;white-space:nowrap!important;}
.ms-corporate-staff-btn:active{transform:scale(.98)!important;}
/* The 2–10 management modal is always the front UI layer. */
#modal.modal.show{z-index:2147483000!important;}
.tthms-corporate-staff-gate{z-index:2147483001!important;}
@media(max-width:700px){
  .ms-head{align-items:flex-start!important;}
  .ms-head-actions{gap:4px!important;}
  .ms-corporate-staff-btn{font-size:10px!important;min-height:34px!important;padding:6px 7px!important;}
  .ms-head .close{min-height:34px!important;padding:6px 8px!important;}
}

/* v2.4.7 — cân đối box nhân viên chuỗi, ưu tiên mobile */
.tthms-corporate-staff-card{width:min(560px,94vw)!important;max-height:88vh!important;padding:14px!important;border-radius:16px!important;}
.tthms-corp-head{padding:2px 34px 0 8px!important;}
.tthms-corp-head h2{font-size:20px!important;line-height:1.2!important;margin:0 0 7px!important;}
.tthms-corp-head p{font-size:13px!important;line-height:1.35!important;}
.tthms-corp-total{margin:10px 0!important;padding:9px 10px!important;font-size:12px!important;line-height:1.45!important;}
.tthms-corp-list{gap:7px!important;}
.tthms-corp-staff-card{padding:9px 10px!important;border-radius:11px!important;}
.tthms-corp-staff-main{gap:8px!important;}
.tthms-corp-icon{font-size:27px!important;width:34px!important;flex:0 0 34px!important;}
.tthms-corp-staff-main b{font-size:14px!important;line-height:1.2!important;}
.tthms-corp-staff-main small{font-size:11px!important;margin-top:2px!important;}
.tthms-corp-actions{gap:6px!important;margin-top:7px!important;}
.tthms-corp-actions button{min-height:38px!important;padding:6px 7px!important;font-size:11px!important;}
.tthms-corp-current{margin-top:7px!important;padding:7px!important;font-size:11px!important;}
.tthms-corp-warning{margin-top:9px!important;padding:8px!important;font-size:11px!important;line-height:1.35!important;}
.tthms-corp-close{width:34px!important;height:34px!important;right:8px!important;top:8px!important;font-size:24px!important;border-radius:9px!important;}
@media(max-width:600px){
 .tthms-corporate-staff-card{width:94vw!important;max-height:90vh!important;margin:4vh auto 0!important;padding:10px!important;}
 .tthms-corp-head{padding-right:30px!important;}
 .tthms-corp-head h2{font-size:17px!important;}
 .tthms-corp-head p,.tthms-corp-total{font-size:11px!important;}
 .tthms-corp-actions{grid-template-columns:1fr 1fr!important;}
 .tthms-corp-actions button{min-height:39px!important;font-size:10px!important;}
}

/* v2.4.8 — Nhân viên chuỗi là box con của Quản lý cửa tiệm 2–10 */
.ms-corporate-staff-panel{margin:10px 0 12px!important;padding:0!important;width:100%!important;box-sizing:border-box!important;}
.ms-corporate-staff-panel[hidden]{display:none!important;}
.ms-corporate-staff-panel>#tthms-corporate-staff-panel{display:block!important;width:100%!important;}
.tthms-corp-subhead{display:flex!important;align-items:flex-start!important;gap:8px!important;padding:0 0 8px!important;}
.tthms-corp-subhead>div{flex:1!important;min-width:0!important;}
.tthms-corp-subhead h3{margin:0 0 3px!important;font-size:16px!important;line-height:1.2!important;}
.tthms-corp-subhead p{margin:0!important;font-size:11px!important;line-height:1.35!important;color:#68584a!important;}
.ms-corporate-staff-panel .tthms-corporate-staff-card{width:100%!important;max-width:none!important;max-height:none!important;margin:0!important;padding:11px!important;border:2px solid #8b5e34!important;border-radius:13px!important;box-shadow:none!important;background:#fffaf0!important;box-sizing:border-box!important;}
.ms-corporate-staff-panel .tthms-corp-close{position:static!important;flex:0 0 34px!important;width:34px!important;height:34px!important;font-size:23px!important;}
.ms-corporate-staff-panel .tthms-corp-list{grid-template-columns:1fr!important;}
.ms-corporate-staff-panel .tthms-corp-staff-card{background:#fff!important;}
@media(max-width:600px){
 .ms-corporate-staff-panel{margin-top:8px!important;}
 .ms-corporate-staff-panel .tthms-corporate-staff-card{padding:9px!important;}
 .tthms-corp-subhead h3{font-size:15px!important;}
 .tthms-corp-subhead p{font-size:10px!important;}
 .ms-corporate-staff-panel .tthms-corp-actions{grid-template-columns:1fr 1fr!important;}
 .ms-corporate-staff-panel .tthms-corp-actions button{min-height:38px!important;font-size:10px!important;}
}

/* v2.4.9 — Cân lại nút Nhân viên chuỗi và thêm thao tác cho nghỉ */
.ms-corporate-staff-btn-full{display:block!important;width:100%!important;min-height:44px!important;margin:10px 0 12px!important;padding:9px 12px!important;text-align:center!important;font-size:13px!important;line-height:1.2!important;box-sizing:border-box!important;}
.tthms-corp-fire{display:block!important;width:100%!important;margin-top:8px!important;min-height:38px!important;padding:7px 10px!important;border:1px solid #b54b4b!important;border-radius:9px!important;background:#fff1f1!important;color:#8b2727!important;font-weight:900!important;cursor:pointer!important;}
.tthms-corp-fire:active{transform:scale(.98)!important;}
@media(max-width:600px){.ms-corporate-staff-btn-full{min-height:42px!important;font-size:12px!important;margin:8px 0 10px!important}.tthms-corp-fire{min-height:38px!important;font-size:11px!important;}}


/* v2.5.0 — Box Tiện ích cửa hàng: cùng ngôn ngữ UI với hàng 1–2 */
.mobile-more-controls{margin:0!important;padding:0!important;border:0!important;background:transparent!important;}
.mobile-more-controls>summary{
  list-style:none!important;display:flex!important;align-items:center!important;justify-content:flex-start!important;gap:8px!important;
  min-height:64px!important;padding:8px 10px!important;margin:0!important;box-sizing:border-box!important;
  border:1px solid rgba(139,94,52,.35)!important;border-radius:12px!important;background:#fffaf0!important;
  box-shadow:0 2px 7px rgba(0,0,0,.08)!important;cursor:pointer!important;font-family:inherit!important;color:inherit!important;
}
.mobile-more-controls>summary::-webkit-details-marker{display:none!important;}
.mobile-more-controls>summary .mobile-icon{width:34px!important;min-width:34px!important;height:34px!important;display:flex!important;align-items:center!important;justify-content:center!important;font-size:22px!important;line-height:1!important;}
.mobile-more-controls>summary b{display:block!important;font-size:13px!important;line-height:1.15!important;font-weight:900!important;}
.mobile-more-controls>summary small{display:block!important;margin-left:auto!important;color:#766657!important;font-size:10px!important;line-height:1.2!important;text-align:right!important;max-width:48%!important;}
.mobile-more-controls>summary:active{transform:scale(.985)!important;}
.mobile-more-controls[open]>summary{border-color:rgba(139,94,52,.65)!important;}
.mobile-more-controls .control-group-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important;margin-top:8px!important;}
.mobile-more-controls .control-group-grid button{
  min-height:56px!important;padding:7px 6px!important;border-radius:11px!important;border:1px solid rgba(139,94,52,.28)!important;
  background:#fff!important;font:inherit!important;font-size:11px!important;font-weight:900!important;line-height:1.2!important;color:inherit!important;
  box-shadow:0 1px 5px rgba(0,0,0,.06)!important;
}
@media(max-width:600px){
 .mobile-more-controls>summary{min-height:62px!important;padding:7px 9px!important;}
 .mobile-more-controls>summary .mobile-icon{width:32px!important;min-width:32px!important;height:32px!important;font-size:21px!important;}
 .mobile-more-controls>summary b{font-size:12px!important;}
 .mobile-more-controls>summary small{font-size:9px!important;max-width:46%!important;}
}

/* v2.4.x: Store 6 corporate staffing notice — white box / black text */
.ms-store-gate-notice{position:fixed;inset:0;z-index:2147483646;display:grid;place-items:center;padding:18px;background:rgba(0,0,0,.28);font-family:inherit;}
.ms-store-gate-notice-box{position:relative;width:min(420px,92vw);box-sizing:border-box;background:#fff;color:#111;border:1px solid #ddd;border-radius:16px;padding:22px 20px 18px;text-align:center;box-shadow:0 14px 40px rgba(0,0,0,.25);}
.ms-store-gate-notice-icon{font-size:34px;line-height:1;margin-bottom:8px;}
.ms-store-gate-notice-box h3{margin:0 26px 8px;font-size:17px;font-weight:800;color:#111;}
.ms-store-gate-notice-box p{margin:0 8px 16px;font-size:14px;line-height:1.5;font-weight:600;color:#111;}
.ms-store-gate-notice-close{position:absolute;right:8px;top:7px;width:32px;height:32px;border:0;background:transparent;color:#111;font-size:27px;line-height:30px;border-radius:8px;cursor:pointer;}
.ms-store-gate-notice-close:active{background:#eee;}
.ms-store-gate-notice-ok{min-width:120px;min-height:38px;padding:8px 16px;border:1px solid #bbb;border-radius:10px;background:#fff;color:#111;font:inherit;font-weight:800;cursor:pointer;}
.ms-store-gate-notice-ok:active{background:#eee;}
@media(max-width:700px){.ms-store-gate-notice-box{width:92vw;padding:20px 16px 16px}.ms-store-gate-notice-box h3{font-size:15px}.ms-store-gate-notice-box p{font-size:13px}.ms-store-gate-notice-ok{width:100%;}}
.ms-store-card-meta b{font-weight:900;color:#111}


/* v2.5.0 CÀO VÉ SỐ */
.tthms-scratch-income-history{margin-top:14px;text-align:left}.tthms-scratch-history-title{font-weight:900;font-size:14px}.tthms-scratch-history-note{font-size:11px;opacity:.7;margin:3px 0 8px}.tthms-scratch-income-item{display:grid;grid-template-columns:1fr auto;gap:2px 8px;padding:8px 0;border-top:1px solid rgba(0,0,0,.08)}.tthms-scratch-income-item b{font-size:13px}.tthms-scratch-income-item strong{font-size:14px}.tthms-scratch-income-item small,.tthms-scratch-income-item span{grid-column:1/-1;font-size:11px;opacity:.75}.tthms-scratch-history-empty{font-size:12px;opacity:.7;padding:8px 0}

.tthms-utility-lottery-row{display:flex;gap:8px;align-items:stretch;width:100%;margin-top:8px}
.tthms-utility-lottery-row .mobile-more-controls{flex:1 1 65%;margin-top:0}
.tthms-lottery-box{flex:1 1 35%;min-height:58px;border:1px solid rgba(0,0,0,.12);border-radius:12px;background:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;cursor:pointer;padding:8px;color:#111}
.tthms-lottery-box .mobile-icon{font-size:22px;line-height:1}
.tthms-lottery-box b{font-size:14px}.tthms-lottery-box small{font-size:10px;color:#666}
.tthms-scratch-modal,.tthms-scratch-shop{max-width:520px;width:calc(100vw - 24px);box-sizing:border-box}
.tthms-scratch-note{text-align:center;margin:4px 0 12px}
.tthms-scratch-jackpot-note{text-align:center;margin:8px 0 12px;padding:9px 10px;border:1px solid rgba(0,0,0,.14);border-radius:10px;background:#fff7d6;color:#111;font-size:12px;line-height:1.35}
.tthms-scratch-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin:12px 0}
.tthms-scratch-ticket{min-height:88px;border:2px solid #111;border-radius:12px;background:linear-gradient(135deg,#ddd,#fff,#bbb);color:#111;display:flex;flex-direction:column;align-items:center;justify-content:center;font-weight:800;cursor:pointer;touch-action:manipulation}
.tthms-scratch-ticket small{font-weight:600;margin-top:4px}
.tthms-scratch-ticket.scratched{cursor:default;opacity:.75;background:#eee}
.tthms-scratch-ticket.winner{border-color:#222}.tthms-scratch-ticket.loser{border-color:#777}
.tthms-scratch-buy-grid{display:grid;grid-template-columns:1fr;gap:9px;margin:14px 0}
.tthms-scratch-buy{min-height:64px;border:1px solid #222;border-radius:12px;background:#fff;color:#111;padding:8px;display:flex;flex-direction:column;align-items:center;justify-content:center;cursor:pointer;touch-action:manipulation}
.tthms-scratch-buy b{font-size:17px}.tthms-scratch-buy small{font-size:11px;margin-top:3px}
.tthms-scratch-old{display:flex;flex-direction:column;gap:6px;margin:12px 0}.tthms-scratch-old button{border:1px solid #bbb;background:#f7f7f7;color:#111;border-radius:9px;padding:9px}
.tthms-scratch-result{text-align:center;max-width:380px}.tthms-scratch-result h2{margin-bottom:8px}
@media(max-width:520px){
  .tthms-utility-lottery-row{gap:6px}
  .tthms-lottery-box{min-width:0}
  .tthms-scratch-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
  .tthms-scratch-ticket{min-height:78px}
}


.tthms-scratch-card-box{max-width:540px;width:calc(100vw - 20px);background:#111;color:#fff!important;border-radius:16px}
.tthms-scratch-card-box p{color:#eee;text-align:center}
.tthms-scratch-surface-wrap{position:relative;width:100%;aspect-ratio:16/9;background:#fff;border-radius:12px;overflow:hidden;border:2px solid #fff;touch-action:none}
.tthms-scratch-hidden{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;background:#fff;color:#111;gap:10px}
.tthms-scratch-hidden strong{font-size:25px}.tthms-scratch-hidden span{font-size:18px;font-weight:800}
.tthms-scratch-hidden.is-win{background:#fff;color:#111}.tthms-scratch-hidden.is-lose{background:#111;color:#fff}
#tthmsScratchCanvas{position:absolute;inset:0;width:100%;height:100%;touch-action:none;cursor:crosshair}
.tthms-scratch-progress{text-align:center;font-size:12px;color:#ddd;padding:8px 0}
.tthms-scratch-card-box .close{background:#fff;color:#111;border:0;border-radius:9px;padding:9px 18px}

/* v2.5.1: Đồng bộ box Thông tin / Vé số với toàn bộ dashboard mobile.
   Thông tin chỉ là 1 box mặt ngoài; nội dung con chỉ mở trong modal.
   Tiện ích + Vé số dùng cùng kích thước 50/50 và cùng visual language. */
.mobile-icon-grid > .mobile-info-box{
  min-width:0!important;
  min-height:58px!important;
  margin:0!important;
  padding:6px 4px!important;
  border:1px solid #dec49f!important;
  border-radius:11px!important;
  background:#fff8ea!important;
  color:#4f3326!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  gap:1px!important;
  box-shadow:0 2px 0 rgba(107,75,42,.10)!important;
}
.mobile-icon-grid > .mobile-info-box .mobile-icon{font-size:22px!important;line-height:1.05!important}
.mobile-icon-grid > .mobile-info-box b{font-size:9px!important;line-height:1.1!important}
.mobile-icon-grid > .mobile-info-box small{font-size:7px!important;line-height:1!important;color:#8a7562!important}
.mobile-icon-grid > .mobile-info-box:active{transform:scale(.98)}

.tthms-utility-lottery-row{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
  gap:6px!important;
  align-items:stretch!important;
  width:100%!important;
  margin-top:6px!important;
}
.tthms-utility-lottery-row .mobile-more-controls,
.tthms-utility-lottery-row .tthms-lottery-box{
  width:100%!important;
  min-width:0!important;
  min-height:58px!important;
  margin:0!important;
  box-sizing:border-box!important;
}
.tthms-utility-lottery-row .mobile-more-controls>summary{
  min-height:58px!important;
  width:100%!important;
  box-sizing:border-box!important;
  border:1px solid #dec49f!important;
  border-radius:11px!important;
  background:#fff8ea!important;
  color:#4f3326!important;
  padding:6px 4px!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  gap:1px!important;
  text-align:center!important;
  box-shadow:0 2px 0 rgba(107,75,42,.10)!important;
}
.tthms-utility-lottery-row .mobile-more-controls>summary .mobile-icon{
  width:auto!important;min-width:0!important;height:auto!important;font-size:22px!important;line-height:1.05!important;
}
.tthms-utility-lottery-row .mobile-more-controls>summary b{
  font-size:9px!important;line-height:1.1!important;font-weight:900!important;
}
.tthms-utility-lottery-row .mobile-more-controls>summary small{
  margin:0!important;max-width:100%!important;font-size:7px!important;line-height:1!important;text-align:center!important;
}
.tthms-utility-lottery-row .tthms-lottery-box{
  border:1px solid #dec49f!important;
  border-radius:11px!important;
  background:#fff8ea!important;
  color:#4f3326!important;
  padding:6px 4px!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  gap:1px!important;
  box-shadow:0 2px 0 rgba(107,75,42,.10)!important;
}
.tthms-utility-lottery-row .tthms-lottery-box .mobile-icon{font-size:22px!important;line-height:1.05!important}
.tthms-utility-lottery-row .tthms-lottery-box b{font-size:9px!important;line-height:1.1!important}
.tthms-utility-lottery-row .tthms-lottery-box small{font-size:7px!important;line-height:1!important;color:#8a7562!important}
.tthms-utility-lottery-row .tthms-lottery-box:active,
.tthms-utility-lottery-row .mobile-more-controls>summary:active{transform:scale(.98)}
@media(max-width:600px){
  .mobile-icon-grid > .mobile-info-box{min-height:55px!important;padding:5px 3px!important}
  .mobile-icon-grid > .mobile-info-box .mobile-icon{font-size:20px!important}
  .mobile-icon-grid > .mobile-info-box b{font-size:8px!important}
  .mobile-icon-grid > .mobile-info-box small{font-size:6.5px!important}
  .tthms-utility-lottery-row{gap:5px!important}
  .tthms-utility-lottery-row .mobile-more-controls>summary,
  .tthms-utility-lottery-row .tthms-lottery-box{min-height:55px!important}
  .tthms-utility-lottery-row .mobile-more-controls>summary .mobile-icon,
  .tthms-utility-lottery-row .tthms-lottery-box .mobile-icon{font-size:20px!important}
}
@media(max-width:430px){
  .mobile-icon-grid > .mobile-info-box{min-height:51px!important;border-radius:9px!important}
  .mobile-icon-grid > .mobile-info-box .mobile-icon{font-size:18px!important}
  .mobile-icon-grid > .mobile-info-box b{font-size:7px!important}
  .mobile-icon-grid > .mobile-info-box small{font-size:6px!important}
  .tthms-utility-lottery-row .mobile-more-controls>summary,
  .tthms-utility-lottery-row .tthms-lottery-box{min-height:51px!important;border-radius:9px!important}
  .tthms-utility-lottery-row .mobile-more-controls>summary .mobile-icon,
  .tthms-utility-lottery-row .tthms-lottery-box .mobile-icon{font-size:18px!important}
  .tthms-utility-lottery-row .mobile-more-controls>summary b,
  .tthms-utility-lottery-row .tthms-lottery-box b{font-size:7px!important}
  .tthms-utility-lottery-row .mobile-more-controls>summary small,
  .tthms-utility-lottery-row .tthms-lottery-box small{font-size:6px!important}
}

/* v2.5.2 — Tiện ích giống các box chính: tuyệt đối không bung box con trên màn hình chính. */
.mobile-utility-box{
  appearance:none!important;-webkit-appearance:none!important;
  width:100%!important;min-height:58px!important;margin:0!important;padding:6px 4px!important;
  border:1px solid #dec49f!important;border-radius:11px!important;background:#fff8ea!important;
  color:#4f3326!important;display:flex!important;flex-direction:column!important;
  align-items:center!important;justify-content:center!important;gap:1px!important;
  box-sizing:border-box!important;box-shadow:0 2px 0 rgba(107,75,42,.10)!important;
  cursor:pointer!important;font:inherit!important;text-align:center!important;
}
.mobile-utility-box .mobile-icon{width:auto!important;min-width:0!important;height:auto!important;font-size:22px!important;line-height:1.05!important;}
.mobile-utility-box b{font-size:9px!important;line-height:1.1!important;font-weight:900!important;}
.mobile-utility-box small{margin:0!important;max-width:100%!important;font-size:7px!important;line-height:1!important;text-align:center!important;color:#8a7562!important;}
.mobile-utility-box:active{transform:scale(.98)!important;}
.tthms-utility-modal .utility-modal-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important;margin:10px 0 14px!important;}
.tthms-utility-modal .utility-modal-grid button{min-height:56px!important;padding:7px 6px!important;border-radius:11px!important;border:1px solid rgba(139,94,52,.28)!important;background:#fff!important;color:#111!important;font:inherit!important;font-size:11px!important;font-weight:900!important;line-height:1.2!important;box-shadow:0 1px 5px rgba(0,0,0,.06)!important;}

/* v2.5.6: viral winner result card — visual only, no gameplay logic. */
.tthms-scratch-result.is-win{position:relative;overflow:hidden;background:linear-gradient(145deg,#fff,#fff8d8);border:2px solid #111}
.tthms-result-glow{font-size:46px;line-height:1;margin:4px 0 8px;animation:tthmsWinPop .55s ease-out}
.tthms-viral-win{margin:14px 0;padding:14px 12px;border:2px solid #111;border-radius:16px;background:#fff;box-shadow:0 8px 24px rgba(0,0,0,.12)}
.tthms-viral-badge{font-weight:1000;font-size:13px}.tthms-viral-tier{margin-top:5px;font-weight:900;font-size:17px}.tthms-viral-win>strong{display:block;font-size:28px;margin:5px 0}.tthms-viral-meta{font-size:11px;opacity:.7}.tthms-viral-share{margin-top:9px;padding-top:9px;border-top:1px dashed #bbb;font-size:12px;font-weight:800}
@keyframes tthmsWinPop{0%{transform:scale(.6);opacity:0}70%{transform:scale(1.12)}100%{transform:scale(1);opacity:1}}


/* v2.5.1 — compact utility/lottery/security row for mobile */
.tthms-utility-lottery-row{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px!important;align-items:stretch;width:100%;margin-top:7px!important;}
.tthms-utility-lottery-row .mobile-more-controls,
.tthms-utility-lottery-row .tthms-lottery-box,
.tthms-utility-lottery-row .tthms-security-box{min-width:0!important;width:100%!important;flex:1 1 0!important;min-height:55px!important;margin:0!important;padding:5px 3px!important;border-radius:10px!important;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:1px!important;box-sizing:border-box!important;}
.tthms-utility-lottery-row .mobile-more-controls>summary{min-height:0!important;width:100%!important;padding:0!important;background:transparent!important;border:0!important;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:1px!important;}
.tthms-utility-lottery-row .mobile-icon{font-size:20px!important;line-height:1.05!important;}
.tthms-utility-lottery-row b{font-size:8px!important;line-height:1.1!important;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;}
.tthms-utility-lottery-row small{font-size:6px!important;line-height:1!important;color:#8a7562!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;}
.tthms-security-box{border:1px solid #b8d7c0!important;background:#edf8ee!important;color:#245c31!important;cursor:pointer!important;touch-action:manipulation;}
.tthms-security-box:active,.tthms-utility-lottery-row .tthms-lottery-box:active,.tthms-utility-lottery-row .mobile-more-controls>summary:active{transform:scale(.98);}
@media(max-width:430px){
 .tthms-utility-lottery-row{gap:4px!important;margin-top:6px!important;}
 .tthms-utility-lottery-row .mobile-more-controls,
 .tthms-utility-lottery-row .tthms-lottery-box,
 .tthms-utility-lottery-row .tthms-security-box{min-height:51px!important;padding:4px 2px!important;border-radius:9px!important;}
 .tthms-utility-lottery-row .mobile-icon{font-size:18px!important;}
 .tthms-utility-lottery-row b{font-size:7px!important;}
 .tthms-utility-lottery-row small{font-size:5.5px!important;}
}


/* v2.6.2 — PORTRAIT MOBILE DASHBOARD
 * Ưu tiên luồng chơi từ trái sang phải, trên xuống dưới:
 * Row 1: Mở cửa · Nhập hàng · Khu trưng bày · Nhân sự
 * Row 2: Quản lý cửa tiệm · Cấp cửa hàng · Tài chính · Vệ sĩ
 * Row 3: Vé số · Tiện ích · Thông tin · Lưu game
 */
.game-controls-footer .footer-control-grid{display:block!important;}
.game-controls-footer .store-tools{position:static!important;width:100%!important;display:block!important;}
.game-controls-footer .mobile-icon-grid{display:grid!important;width:100%!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;grid-template-rows:repeat(3,minmax(0,auto))!important;grid-auto-flow:row!important;gap:6px!important;align-items:stretch!important;}
.game-controls-footer .mobile-icon-grid>.mobile-icon-box{width:100%!important;min-width:0!important;min-height:58px!important;margin:0!important;padding:6px 4px!important;box-sizing:border-box!important;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:1px!important;overflow:hidden!important;}
.game-controls-footer .mobile-icon-grid>.mobile-icon-box .mobile-icon{font-size:22px!important;line-height:1.05!important;}
.game-controls-footer .mobile-icon-grid>.mobile-icon-box b{font-size:9px!important;line-height:1.1!important;text-align:center!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;max-width:100%!important;}
.game-controls-footer .mobile-icon-grid>.mobile-icon-box small{font-size:7px!important;line-height:1!important;text-align:center!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;max-width:100%!important;}
.game-controls-footer .mobile-icon-grid>#topLeaderboardBtn{order:1!important;}
.game-controls-footer .mobile-icon-grid>#doorToggle{order:2!important;}
.game-controls-footer .mobile-icon-grid>#buy{order:3!important;}
.game-controls-footer .mobile-icon-grid>#stock{order:4!important;}
.game-controls-footer .mobile-icon-grid>#employeesBtn{order:5!important;}
.game-controls-footer .mobile-icon-grid>#multiStoresBtn{order:6!important;}
.game-controls-footer .mobile-icon-grid>#storeLevelBtn{order:7!important;}
.game-controls-footer .mobile-icon-grid>#loanBtn{order:8!important;}
.game-controls-footer .mobile-icon-grid>#securityGuardBtn{order:9!important;}
.game-controls-footer .mobile-icon-grid>#utilityBtn{order:10!important;}
.game-controls-footer .mobile-icon-grid>#infoBtn{order:11!important;}
.game-controls-footer .mobile-icon-grid>#saveGameBtn{order:12!important;}
.game-controls-footer .mobile-icon-grid>#utilityBtn{position:static!important;}
.game-controls-footer .mobile-icon-grid>#securityGuardBtn{position:static!important;}
.game-controls-footer .mobile-icon-grid>#storeLevelBtn{background:#f8f1ff!important;border-color:#c8a9df!important;color:#4f3326!important;}
.game-controls-footer .shelf-loan-side{width:100%!important;margin-top:6px!important;}
@media(max-width:600px){
  .game-controls-footer{padding:7px 6px 8px!important;}
  .game-controls-footer .mobile-icon-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:5px!important;}
  .game-controls-footer .mobile-icon-grid>.mobile-icon-box{min-height:55px!important;padding:5px 3px!important;border-radius:10px!important;}
  .game-controls-footer .mobile-icon-grid>.mobile-icon-box .mobile-icon{font-size:20px!important;}
  .game-controls-footer .mobile-icon-grid>.mobile-icon-box b{font-size:8px!important;}
  .game-controls-footer .mobile-icon-grid>.mobile-icon-box small{font-size:6.5px!important;}
}
@media(max-width:430px){
  .game-controls-footer .mobile-icon-grid{gap:4px!important;}
  .game-controls-footer .mobile-icon-grid>.mobile-icon-box{min-height:51px!important;border-radius:9px!important;padding:4px 2px!important;}
  .game-controls-footer .mobile-icon-grid>.mobile-icon-box .mobile-icon{font-size:18px!important;}
  .game-controls-footer .mobile-icon-grid>.mobile-icon-box b{font-size:7px!important;}
  .game-controls-footer .mobile-icon-grid>.mobile-icon-box small{font-size:5.5px!important;}
}


/* v2.6.1 — MOBILE EDGE-TO-EDGE UI
 * Make the game use the full phone viewport width with no side gutters.
 * UI/game logic is untouched; this block only changes responsive layout.
 */
@media (max-width: 768px){
  html,body{margin:0!important;padding:0!important;width:100%;max-width:100%;overflow-x:hidden;background:#f6ead6;}
  #tthms-app{
    width:100vw!important;
    max-width:100vw!important;
    margin-left:calc(50% - 50vw)!important;
    margin-right:0!important;
    padding:0!important;
    overflow-x:hidden!important;
  }
  #tthms-app .tthms{
    width:100%!important;
    max-width:none!important;
    min-height:100dvh;
    margin:0!important;
    border-radius:0!important;
    box-shadow:none!important;
    overflow-x:hidden!important;
  }
  #tthms-app .game-top{
    margin:0!important;
    border-radius:0!important;
  }
  #tthms-app .game-stage{
    width:100%!important;
    margin:0!important;
    padding:0!important;
  }
  #tthms-app .scene{
    width:100%!important;
    max-width:none!important;
    margin:0!important;
    border-left:0!important;
    border-right:0!important;
    border-radius:0!important;
    box-shadow:none!important;
  }
  #tthms-app .game-controls-footer,
  #tthms-app .game-bottom{
    width:100%!important;
    margin:0!important;
  }
  #tthms-app .game-controls-footer{padding-left:6px;padding-right:6px;}
  #tthms-app .game-bottom{padding-left:6px;padding-right:6px;}
}

/* Very narrow phones: keep every control inside the viewport. */
@media (max-width: 380px){
  #tthms-app .game-top{padding-left:7px;padding-right:7px;}
  #tthms-app .game-top-main{gap:4px;}
  #tthms-app .shop-title strong{font-size:19px;}
  #tthms-app .stars{font-size:15px;letter-spacing:0;}
  #tthms-app .mobile-icon-grid{gap:4px!important;}
  #tthms-app .mobile-icon-grid>.mobile-icon-box{min-height:55px!important;padding-left:2px!important;padding-right:2px!important;}
  #tthms-app .mobile-icon-grid>.mobile-icon-box .mobile-icon{font-size:20px!important;}
  #tthms-app .mobile-icon-grid>.mobile-icon-box b{font-size:8px!important;}
  #tthms-app .mobile-icon-grid>.mobile-icon-box small{font-size:6px!important;}
}


/* v2.6.2 — PORTRAIT-FIRST MOBILE MODE
 * Game is composed for vertical phone play. No landscape stretching or side gutters.
 * The landscape notice is visual only; no game state/logic is changed.
 */
@media (max-width: 900px) and (orientation: landscape){
  #tthms-app .tthms:not(:has(.auth-game)){
    position:relative!important;
  }
  #tthms-app .tthms:not(:has(.auth-game))::before{
    content:'📱 VUI LÒNG XOAY ĐIỆN THOẠI DỌC ĐỂ CHƠI';
    position:fixed!important;
    inset:0!important;
    z-index:2147483646!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    text-align:center!important;
    padding:24px!important;
    background:#fff8ec!important;
    color:#5a3827!important;
    font-size:18px!important;
    font-weight:900!important;
    line-height:1.45!important;
    box-sizing:border-box!important;
  }
}

@media (max-width: 600px) and (orientation: portrait){
  #tthms-app .game-top,
  #tthms-app .game-stage,
  #tthms-app .game-controls-footer,
  #tthms-app .game-bottom{
    width:100%!important;
    max-width:none!important;
  }
  #tthms-app .game-controls-footer .guide-footer{
    font-size:11px!important;
    line-height:1.25!important;
    text-align:center!important;
    padding:8px 6px!important;
  }
  #tthms-app .game-controls-footer .mobile-icon-grid{
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
    gap:5px!important;
  }
  #tthms-app .game-controls-footer .mobile-icon-grid>.mobile-icon-box{
    min-height:58px!important;
    border-radius:11px!important;
    padding:5px 2px!important;
    touch-action:manipulation!important;
    -webkit-tap-highlight-color:rgba(0,0,0,.08)!important;
  }
}
@media (max-width: 380px) and (orientation: portrait){
  #tthms-app .game-controls-footer .mobile-icon-grid{gap:4px!important;}
  #tthms-app .game-controls-footer .mobile-icon-grid>.mobile-icon-box{min-height:54px!important;}
  #tthms-app .game-controls-footer .mobile-icon-grid>.mobile-icon-box .mobile-icon{font-size:18px!important;}
  #tthms-app .game-controls-footer .mobile-icon-grid>.mobile-icon-box b{font-size:7.5px!important;}
  #tthms-app .game-controls-footer .mobile-icon-grid>.mobile-icon-box small{font-size:6px!important;}
}

/* v2.6.3 — MOBILE SCROLL FIX
 * Native vertical touch scrolling must win over custom pointer-drag code.
 */
@media (pointer: coarse){
  html,body{overflow-x:hidden!important;overflow-y:auto!important;-webkit-overflow-scrolling:touch!important;}
  #tthms-app,.tthms,.tthms .game-stage,.tthms .scene{touch-action:pan-y!important;}
  #tthms-app .product-trays{touch-action:pan-y!important;overflow-y:auto!important;-webkit-overflow-scrolling:touch!important;}
  #tthms-app .tray{touch-action:pan-y!important;}
}


/* v2.6.6 — MOBILE TAP/ZOOM STABILITY
 * Prevent accidental page zoom/reflow after tapping controls in mobile browsers/WebViews.
 * No gameplay/state logic is changed.
 */
@media (max-width: 900px){
  html,body{
    width:100%;
    max-width:100%;
    min-width:0;
    -webkit-text-size-adjust:100%!important;
    text-size-adjust:100%!important;
  }
  #tthms-app,
  #tthms-app .tthms,
  #tthms-app .game-top,
  #tthms-app .game-stage,
  #tthms-app .game-controls-footer,
  #tthms-app .game-bottom{
    transform:none!important;
    -webkit-transform:none!important;
    zoom:1!important;
  }
  #tthms-app .mobile-icon-box,
  #tthms-app .mobile-info-box,
  #tthms-app .mobile-utility-box,
  #tthms-app button,
  #tthms-app summary{
    touch-action:manipulation;
  }
  #tthms-app .scene,
  #tthms-app .product-trays{
    transform:none!important;
  }
}


/* v7.1: clearly show land/vehicle percentage effects in red */
.tthms-red-percent{color:#d60000!important;font-weight:900!important;font-size:1.05em;}
.vehicle-detail-bonus .tthms-red-percent,.vehicle-owned-large .tthms-red-percent{font-size:1.15em;}
/* v12: Bank + Gold vault */
.tthms-wealth-modal{max-width:980px!important;background:#fff;border:2px solid #d7b56d;border-radius:18px;color:#111}
.tthms-wealth-modal h2{color:#111;text-align:center}
.wealth-panels{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.wealth-panel{border:2px solid #e7e7e7;border-radius:16px;padding:14px;background:#fff;box-shadow:0 5px 18px rgba(0,0,0,.08)}
.wealth-panel h3{margin:0 0 8px;color:#111}.wealth-rate{font-size:28px;font-weight:900;color:#b40000}.wealth-balance{margin:8px 0;font-size:16px;color:#111}
.wealth-assets{min-height:82px;border-radius:12px;background:#f7f7f7;padding:10px;display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:10px 0}
.bank-stacks span,.gold-bars span{display:inline-flex;width:52px;height:42px;align-items:center;justify-content:center;border-radius:8px;background:#fff;border:1px solid #ddd;font-size:28px}
.wealth-panel input{width:100%;box-sizing:border-box;padding:11px;border:1px solid #bbb;border-radius:10px;margin:6px 0;font-size:16px}
.wealth-panel button{padding:11px 14px;border-radius:10px;border:0;margin:4px;font-weight:800;cursor:pointer}.wealth-panel .primary{background:#111;color:#fff}
.gold-buy-row{display:flex;gap:8px;align-items:center}.gold-buy-row input{max-width:100px}.gold-buy-row button{flex:1}
.tthms-wealth-box{border:1px solid #d7b56d!important}
@media(max-width:700px){.wealth-panels{grid-template-columns:1fr}.wealth-rate{font-size:24px}.bank-stacks span,.gold-bars span{width:44px;height:38px;font-size:24px}.gold-buy-row{flex-wrap:wrap}.gold-buy-row input{max-width:none;flex:0 0 90px}.gold-buy-row button{min-width:180px}}

/* v13.3 finance: bank & gold live inside the Finance modal only. */
.tthms-finance-modal .finance-wealth-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:12px 0 16px}
.tthms-finance-modal .finance-wealth-card{border:1px solid #ddd;border-radius:16px;background:#fff;padding:10px;text-align:left;cursor:pointer;display:flex;flex-direction:column;gap:6px;min-width:0}
.tthms-finance-modal .finance-wealth-card img{width:100%;height:105px;object-fit:cover;border-radius:12px;display:block}
.tthms-finance-modal .finance-wealth-card span{font-size:15px;color:#111}
.tthms-finance-modal .finance-wealth-card small{font-size:12px;color:#333;line-height:1.35}
.tthms-finance-modal .finance-loans-section{margin-top:4px}
@media(max-width:520px){.tthms-finance-modal .finance-wealth-grid{grid-template-columns:1fr 1fr;gap:8px}.tthms-finance-modal .finance-wealth-card{padding:7px}.tthms-finance-modal .finance-wealth-card img{height:78px}.tthms-finance-modal .finance-wealth-card span{font-size:13px}.tthms-finance-modal .finance-wealth-card small{font-size:11px}}

/* v2.6.0: VIRAL BOOKKEEPING / SỔ SÁCH - live local accounting dashboard */
.bookkeeping-modal{width:min(96vw,760px)!important;max-height:calc(100dvh - 16px)!important;overflow:auto!important;background:#fffdf7!important;border:3px solid #9e1b16!important;border-radius:18px!important;box-shadow:0 18px 60px rgba(70,25,15,.32)!important;padding:0!important;color:#321f18!important;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;}
.bookkeeping-header{display:grid;grid-template-columns:78px 1fr 90px;gap:10px;align-items:center;padding:13px;background:linear-gradient(135deg,#9e0808,#e31b16 58%,#7d0909);color:#fff;border-bottom:4px double #f5d27a;}
.bookkeeping-logo{width:66px;height:66px;background:#fff;border:4px solid #ffd75a;border-radius:12px;display:flex;flex-direction:column;align-items:center;justify-content:center;color:#c00;text-align:center;box-shadow:0 3px 0 #5d0808;transform:rotate(-2deg);}
.bookkeeping-logo span{font-size:27px;line-height:1}.bookkeeping-logo b{font-size:8px;line-height:1.05;margin-top:2px;letter-spacing:.3px}
.bookkeeping-title{text-align:left}.bookkeeping-title>div{font-size:21px;font-weight:1000;letter-spacing:1px;text-shadow:0 2px 0 #6b0000}.bookkeeping-title strong{display:block;font-size:15px;margin-top:2px}.bookkeeping-title small{display:block;font-size:8px;font-weight:800;opacity:.92;margin-top:4px}
.bookkeeping-stamp{border:2px solid #ffd75a;color:#ffd75a;border-radius:50%;width:76px;height:76px;display:flex;align-items:center;justify-content:center;text-align:center;font-size:9px;font-weight:1000;line-height:1.15;transform:rotate(8deg);box-sizing:border-box}
.bookkeeping-live{margin:8px 10px 0;padding:7px 9px;border:1px dashed #b88b55;border-radius:9px;background:#fff8e8;font-size:10px;color:#5d4939;text-align:center}
.bookkeeping-kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;padding:9px 10px}.bookkeeping-kpis>div{background:#fff;border:1px solid #d8b98e;border-radius:10px;padding:8px;text-align:center;box-shadow:0 2px 0 rgba(120,70,35,.08)}.bookkeeping-kpis small{display:block;font-size:8px;font-weight:900;color:#795f4d}.bookkeeping-kpis b{display:block;font-size:13px;color:#a40e0e;margin-top:3px}
.book-section{margin:0 10px 9px;border:1px solid #d7bd9b;border-radius:11px;background:#fffaf0;overflow:hidden}.book-section h3{margin:0;padding:8px 10px;background:#f3dfc3;color:#5b3927;font-size:12px;border-bottom:1px solid #ddc19c}.book-grid{display:grid;grid-template-columns:1fr auto;gap:0}.book-grid>span,.book-grid>b{padding:6px 9px;border-bottom:1px dotted #decab0;font-size:10px}.book-grid>b{text-align:right;color:#321f18}.book-grid .book-debt,.book-out{color:#b20f0f!important}.book-section>small{display:block;padding:7px 9px;color:#826e5b;font-size:8px}
.book-table{overflow:auto}.book-row{display:grid;grid-template-columns:1.6fr .55fr .7fr 1fr;gap:5px;align-items:center;padding:6px 8px;border-bottom:1px dotted #dfcbb1;font-size:9px;min-width:470px}.book-row.head{background:#6e4a35;color:#fff;font-weight:900;border-bottom:0}.book-row>span:nth-child(n+2),.book-row>b{text-align:right}.book-row small{display:block;font-size:7px;color:#806b58;margin-top:2px}.book-row.head span{text-align:right}.book-row.head span:first-child{text-align:left}.book-in{color:#16833b!important}.book-out{color:#b20f0f!important}
.book-tags{display:flex;flex-wrap:wrap;gap:5px;padding:8px}.book-tags span{background:#fff;border:1px solid #ddc7a9;border-radius:999px;padding:5px 8px;font-size:8px;font-weight:800;color:#654735}.book-empty{padding:10px;text-align:center;color:#8b7663;font-size:10px}.bookkeeping-footer{margin:2px 10px 9px;padding:7px 9px;background:#fff4da;border-radius:9px;color:#74563f;font-size:8px;line-height:1.35;text-align:center}.bookkeeping-modal>.close{margin:0 10px 12px;width:calc(100% - 20px);background:#9e1712!important;color:#fff!important;border:0!important;border-radius:10px!important;min-height:40px!important;font-weight:900!important}
@media(max-width:600px){.bookkeeping-modal{width:96vw!important;border-radius:14px!important}.bookkeeping-header{grid-template-columns:56px 1fr 65px;gap:6px;padding:9px}.bookkeeping-logo{width:50px;height:50px;border-width:3px}.bookkeeping-logo span{font-size:20px}.bookkeeping-logo b{font-size:6px}.bookkeeping-title>div{font-size:15px;letter-spacing:.4px}.bookkeeping-title strong{font-size:11px}.bookkeeping-title small{font-size:6.5px}.bookkeeping-stamp{width:54px;height:54px;font-size:7px}.bookkeeping-kpis{grid-template-columns:repeat(2,1fr)}.bookkeeping-kpis b{font-size:11px}.book-section h3{font-size:10px}.book-grid>span,.book-grid>b{font-size:9px}.book-row{font-size:8px;min-width:430px}.book-row small{font-size:6.5px}}

/* v2.7.2: Tiệm Tạp Hóa bookkeeping seal + render recovery */
.bookkeeping-header{position:relative;overflow:hidden}.bookkeeping-stamp{position:relative;width:104px;min-width:104px;height:104px;display:flex;align-items:center;justify-content:center}.bookkeeping-stamp img{width:118px;height:118px;object-fit:contain;transform:rotate(-8deg);filter:drop-shadow(0 2px 2px rgba(120,0,0,.18))}.bookkeeping-stamp span{position:absolute;bottom:2px;right:0;background:#b30000;color:#fff;font-size:7px;font-weight:900;padding:3px 5px;border-radius:4px;letter-spacing:.3px}.bookkeeping-seal-mini{display:flex;justify-content:flex-end;align-items:center;margin:6px 4px -10px;opacity:.18;pointer-events:none}.bookkeeping-seal-mini img{width:72px;height:72px;object-fit:contain;transform:rotate(-11deg)}
.tthms-render-recovery{min-height:100dvh;display:flex;align-items:center;justify-content:center;background:#f7efe4;padding:18px;box-sizing:border-box}.tthms-render-recovery-box{max-width:390px;width:100%;background:#fff;border:3px solid #9b1c1c;border-radius:20px;padding:24px;text-align:center;box-shadow:0 12px 30px rgba(0,0,0,.16)}.tthms-render-recovery-icon{font-size:54px}.tthms-render-recovery-box h2{margin:8px 0;color:#7d1717}.tthms-render-recovery-box p{font-size:14px;line-height:1.5;color:#555}.tthms-render-recovery-box button{width:100%;border:0;border-radius:12px;padding:13px;background:#b30000;color:#fff;font-weight:900}.tthms-render-recovery-box small{display:block;margin-top:12px;color:#777}
@media(max-width:520px){.bookkeeping-stamp{width:82px;min-width:82px;height:82px}.bookkeeping-stamp img{width:94px;height:94px}.bookkeeping-stamp span{font-size:6px}.bookkeeping-seal-mini img{width:58px;height:58px}}
/* v2.7.3: bookkeeping seal/site identity */
.bookkeeping-live b:last-child{letter-spacing:.25px;color:#9e0808}.bookkeeping-stamp{z-index:2}.bookkeeping-stamp::after{content:'tiemtaphoa.site';position:absolute;bottom:-3px;right:3px;background:#fff;color:#b30000;border:1px solid #b30000;border-radius:4px;padding:2px 4px;font-size:6px;font-weight:1000;white-space:nowrap;transform:rotate(-8deg)}


/* v2.7.4: three-stamp bookkeeping layout — no seal in top-right header */
.bookkeeping-header{grid-template-columns:66px 1fr!important;position:relative;}
.bookkeeping-seal-hero{position:relative;z-index:3;height:74px;margin:-18px 18px 2px;display:flex;align-items:center;justify-content:center;pointer-events:none;}
.bookkeeping-seal-hero img{width:92px;height:92px;object-fit:contain;transform:rotate(-7deg);filter:drop-shadow(0 3px 2px rgba(100,0,0,.2));}
.bookkeeping-seal-hero span{position:absolute;left:50%;bottom:0;transform:translateX(18px) rotate(-7deg);background:#a90000;color:#fff;border:1px solid #ffd75a;border-radius:4px;padding:3px 6px;font-size:7px;font-weight:1000;letter-spacing:.35px;white-space:nowrap;box-shadow:0 2px 4px rgba(80,0,0,.18);}
.bookkeeping-finance-section{position:relative;overflow:hidden;}
.bookkeeping-seal-accounting{position:absolute;right:8px;bottom:7px;opacity:.72;pointer-events:none;transform:rotate(9deg);}
.bookkeeping-seal-accounting img{width:62px;height:62px;object-fit:contain;filter:drop-shadow(0 2px 2px rgba(100,0,0,.15));}
.bookkeeping-seal-footer{display:flex;align-items:center;justify-content:center;gap:7px;margin:5px 12px 1px;position:relative;min-height:54px;}
.bookkeeping-seal-footer img{width:64px;height:64px;object-fit:contain;transform:rotate(-6deg);opacity:.86;filter:drop-shadow(0 2px 2px rgba(100,0,0,.15));}
.bookkeeping-seal-footer span{font-size:8px;font-weight:1000;letter-spacing:.7px;color:#a20c0c;border:1px dashed #b98a57;background:#fff7e5;border-radius:999px;padding:5px 8px;}
@media(max-width:520px){
  .bookkeeping-header{grid-template-columns:50px 1fr!important;}
  .bookkeeping-seal-hero{height:62px;margin:-15px 10px 0;}
  .bookkeeping-seal-hero img{width:76px;height:76px;}
  .bookkeeping-seal-hero span{font-size:5.5px;transform:translateX(16px) rotate(-7deg);padding:2px 4px;}
  .bookkeeping-seal-accounting{right:4px;bottom:5px;opacity:.58;}
  .bookkeeping-seal-accounting img{width:48px;height:48px;}
  .bookkeeping-seal-footer{min-height:46px;margin:3px 8px 0;}
  .bookkeeping-seal-footer img{width:52px;height:52px;}
  .bookkeeping-seal-footer span{font-size:6.5px;padding:4px 6px;}
}

/* v2.7.x — live bookkeeping tax ledger */
.bookkeeping-tax-section{border:2px solid #9e1b16!important;background:linear-gradient(180deg,#fffaf0,#fff)!important;position:relative;overflow:hidden}
.tax-live-badge{margin:6px 8px 8px;padding:7px 9px;border-radius:9px;background:#fff0d0;border:1px solid #d6a85e;color:#6a351e;font-size:10px;font-weight:800;text-align:center}
.tax-grid{background:#fffdf8}
.tax-grid .book-debt{color:#9e0808!important;font-size:14px!important}
.tax-rules{margin:8px;padding:9px;border:1px dashed #b98a57;border-radius:10px;background:#fff9ea;color:#624936;font-size:9px;line-height:1.55}
.tax-rules>b{display:block;color:#a20c0c;font-size:10px;margin-bottom:3px}
.tax-choice{margin:8px;padding:8px;border-left:4px solid #b30000;background:#fff4e1;border-radius:7px;color:#5d4030;font-size:9px}
.tax-late{margin:8px;padding:8px;border:1px solid #d9b88a;border-radius:8px;background:#fffdf7;color:#654735;font-size:9px;line-height:1.45}
.bookkeeping-tax-section>small{display:block;margin:8px 10px 10px;color:#8a6d58;font-size:8px;line-height:1.4}
@media(max-width:600px){
 .tax-live-badge{font-size:8px}.tax-rules,.tax-choice,.tax-late{font-size:8px}.tax-rules>b{font-size:9px}
}
/* Tax obligation box moved under Thông tin: compact, mobile-first, viral ledger aesthetic */
.info-tax-btn{border:2px solid #a80e0e!important;background:linear-gradient(135deg,#fff8f5,#ffe6e0)!important;color:#8d0808!important;font-weight:900!important;box-shadow:0 3px 10px rgba(128,0,0,.12)!important}
.tax-obligation-modal{width:min(720px,96vw)!important;max-height:92vh!important;overflow:auto!important;background:linear-gradient(180deg,#fffaf4,#fff)!important;border:2px solid #9e1b16!important;box-shadow:0 16px 50px rgba(80,20,10,.25)!important}
.tax-obligation-hero{display:grid;grid-template-columns:68px 1fr;gap:10px;align-items:center;padding:12px;background:radial-gradient(circle at 90% 10%,rgba(183,25,18,.16),transparent 36%),linear-gradient(135deg,#fff1e6,#fffdf8);border-bottom:2px solid #b51c16}
.tax-seal-mini{width:62px;height:62px;border:3px solid #b31313;border-radius:50%;display:flex;flex-direction:column;align-items:center;justify-content:center;transform:rotate(-8deg);color:#b31313;font-weight:900;text-align:center;line-height:1}.tax-seal-mini small{font-size:6px;margin-top:4px}.tax-hero-title{font-size:18px;font-weight:1000;color:#86110d}.tax-obligation-hero strong{display:block;font-size:11px;color:#51352b}.tax-obligation-hero small{display:block;font-size:8px;color:#876f63;margin-top:3px}.tax-status-card{margin:9px;padding:10px;border-radius:12px;border:1px solid #dfbd86;background:#fff4d9;display:grid;gap:3px}.tax-status-card span{font-size:11px;font-weight:1000;color:#8e120c}.tax-status-card b{font-size:10px}.tax-status-card small{font-size:8px;color:#806b5b}.tax-kpi-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:7px;padding:0 9px 9px}.tax-kpi-grid>div{padding:9px;border:1px solid #e4cfb5;border-radius:10px;background:#fff}.tax-kpi-grid small{display:block;font-size:7px;color:#80695b;font-weight:900}.tax-kpi-grid b{display:block;margin-top:3px;font-size:12px;color:#321f18}.tax-kpi-total{border:2px solid #a51a14!important;background:#fff4ef!important}.tax-kpi-total b{color:#a10d0d!important}.tax-panel{margin:0 9px 9px;padding:9px;border:1px solid #d8c0a1;border-radius:12px;background:#fffdf9}.tax-panel h3{margin:0 0 7px;font-size:10px;color:#6a3927}.tax-timeline{display:grid;gap:5px}.tax-step{display:grid;grid-template-columns:75px 1fr;gap:6px;align-items:center;padding:7px;border-radius:8px;background:#faf6ef;border-left:4px solid #d6c1a7}.tax-step b{font-size:8px;color:#624536}.tax-step span{font-size:8px;color:#79685c}.tax-step.active{background:#fff0e8;border-left-color:#b51c16;box-shadow:inset 0 0 0 1px rgba(181,28,22,.12)}.tax-step.active b{color:#a10d0d}.tax-detail-grid{display:grid;grid-template-columns:1fr auto;gap:0}.tax-detail-grid span,.tax-detail-grid>b{padding:6px 4px;border-bottom:1px dotted #dcc8ae;font-size:8px}.tax-detail-grid>b{text-align:right;color:#321f18}.tax-due-card{text-align:center;border:2px solid #a51a14;background:linear-gradient(180deg,#fff8f2,#fff)}.tax-due-big{font-size:24px;font-weight:1000;color:#a10d0d;margin:4px}.tax-due-card>div:not(.tax-due-big){font-size:9px}.tax-due-card p{font-size:8px;color:#756357}.tax-pay-btn{width:100%;border:0;border-radius:10px;padding:10px;background:linear-gradient(135deg,#a80e0e,#d92a1f);color:#fff;font-weight:1000;font-size:11px}.tax-late-banner{margin:9px;padding:9px;border-radius:9px;background:#f7eee5;color:#6d5345;text-align:center;font-size:8px}.tax-live-footer{padding:8px 10px;text-align:center;color:#47704e;font-size:8px;border-top:1px dashed #d9c2a8}.tax-obligation-modal>.close{margin:8px 9px;width:calc(100% - 18px)}
@media(max-width:600px){.tax-obligation-modal{width:96vw!important}.tax-hero-title{font-size:15px}.tax-obligation-hero{grid-template-columns:58px 1fr;padding:9px}.tax-seal-mini{width:54px;height:54px}.tax-kpi-grid b{font-size:10px}.tax-step{grid-template-columns:68px 1fr}.tax-detail-grid span,.tax-detail-grid>b,.tax-step span,.tax-step b{font-size:7.5px}}


/* v2.7.x — viral tax dossier / new logo + two red official-style stamps */
.tax-obligation-modal{width:min(760px,97vw)!important;max-height:94vh!important;overflow:auto!important;background:#efe8dc!important;border:2px solid #8d130f!important;box-shadow:0 18px 55px rgba(65,20,10,.30)!important;padding:0!important}
.tax-file-header{display:grid;grid-template-columns:92px 1fr auto;gap:10px;align-items:center;padding:12px;background:linear-gradient(135deg,#7f0d0b,#c81f17 55%,#7d0b09);color:#fff;border-bottom:4px solid #d9a63b}
.tax-file-logo{width:88px;height:88px;border-radius:16px;background:rgba(255,255,255,.96);display:flex;align-items:center;justify-content:center;padding:4px;box-shadow:0 4px 12px rgba(0,0,0,.28)}
.tax-file-logo img{width:100%;height:100%;object-fit:contain}
.tax-file-kicker{font-size:7px;font-weight:1000;letter-spacing:1.2px;opacity:.86}
.tax-file-headtext h2{margin:2px 0 2px;font-size:18px;font-weight:1000;letter-spacing:.4px;color:#fff!important;text-shadow:0 2px 4px rgba(60,0,0,.55);line-height:1.15}
.tax-file-headtext strong{display:block;font-size:10px;color:#ffe8a0}
.tax-file-headtext small{display:block;margin-top:3px;font-size:7px;opacity:.88}
.tax-file-no{min-width:108px;padding:7px;border:1px solid rgba(255,224,150,.7);border-radius:8px;background:rgba(0,0,0,.16);text-align:right}
.tax-file-no span,.tax-file-no small{display:block;font-size:6.5px;opacity:.8}.tax-file-no b{display:block;font-size:8px;margin:2px 0;color:#fff0b8}
.tax-document-paper{position:relative;margin:10px;border:1px solid #b7a48c;background:#fffdf8;box-shadow:inset 0 0 0 5px #f2eadc, inset 0 0 0 6px #cdbda7;padding:14px 12px 16px;overflow:hidden}
.tax-document-paper:before,.tax-document-paper:after{content:"";position:absolute;pointer-events:none;border:1px solid rgba(151,26,20,.25);width:36px;height:36px}.tax-document-paper:before{left:5px;top:5px;border-right:0;border-bottom:0}.tax-document-paper:after{right:5px;bottom:5px;border-left:0;border-top:0}
.tax-paper-title{text-align:center;font-weight:1000;font-size:15px;color:#74100d;letter-spacing:.7px}.tax-paper-sub{text-align:center;font-size:7px;color:#92715e;margin:2px 0 8px;letter-spacing:1px}
.tax-document-paper .tax-status-card{margin:0 0 9px}
.tax-document-paper .tax-panel{background:rgba(255,255,255,.82)}
.tax-stamp{position:absolute;z-index:4;pointer-events:none;mix-blend-mode:multiply}.tax-stamp img{display:block;object-fit:contain;filter:drop-shadow(0 2px 2px rgba(120,0,0,.12))}.tax-stamp-center{left:50%;top:53%;transform:translate(-50%,-50%) rotate(-8deg)}.tax-stamp-center img{width:122px;height:122px;opacity:.82}.tax-stamp-top{right:20px;top:250px;transform:rotate(10deg)}.tax-stamp-top img{width:78px;height:78px;opacity:.48}.tax-stamp-bottom{left:22px;bottom:92px;transform:rotate(-12deg)}.tax-stamp-bottom img{width:82px;height:82px;opacity:.48}
.tax-signature-row{display:grid;grid-template-columns:1fr 1fr 1fr;gap:8px;margin:16px 4px 0;padding-top:10px;border-top:1px dashed #b9a58c;text-align:center;color:#6e5b4d;font-size:7px;font-weight:800}
.tax-signature-row span:nth-child(2){color:#8d130f}
.tax-document-paper .tax-kpi-grid,.tax-document-paper .tax-panel,.tax-document-paper .tax-status-card{position:relative;z-index:2}
@media(max-width:600px){.tax-file-header{grid-template-columns:62px 1fr;gap:8px;padding:8px}.tax-file-logo{width:60px;height:60px;border-radius:10px}.tax-file-headtext h2{font-size:13px}.tax-file-headtext strong{font-size:8px}.tax-file-headtext small{font-size:6px}.tax-file-kicker{font-size:5.5px}.tax-file-no{grid-column:1/-1;text-align:center;min-width:0;padding:4px}.tax-file-no span,.tax-file-no small{display:inline;font-size:6px}.tax-file-no b{display:inline;font-size:7px;margin:0 5px}.tax-document-paper{margin:6px;padding:11px 8px 12px}.tax-paper-title{font-size:11px}.tax-paper-sub{font-size:6px}.tax-stamp-center img{width:96px;height:96px}.tax-stamp-top{right:8px;top:235px}.tax-stamp-top img{width:62px;height:62px}.tax-stamp-bottom{left:8px;bottom:78px}.tax-stamp-bottom img{width:64px;height:64px}.tax-stamp-center{left:50%;top:53%;transform:translate(-50%,-50%) rotate(-8deg)}.tax-signature-row{font-size:6px;gap:4px;margin-top:12px}.tax-document-paper .tax-kpi-grid{gap:5px}.tax-document-paper .tax-kpi-grid b{font-size:9px}}

/* v2.7.6 — Viral unified box UI refresh. Presentation only; no game-state logic. */
:root{--ui-red:#a30f12;--ui-red2:#d7261e;--ui-gold:#d7a83d;--ui-ink:#2a1d18;--ui-paper:#fffaf2;--ui-line:#ead8bd;--ui-shadow:0 18px 45px rgba(62,25,10,.20)}
.ui-viral-box,.ranking-review-modal.ui-viral-box,.tthms-finance-modal.ui-viral-box,.tthms-wealth-modal.ui-viral-box{width:min(760px,96vw)!important;max-height:92vh;overflow:auto!important;background:linear-gradient(145deg,#fffdf9,#f7eee0)!important;color:var(--ui-ink)!important;border:1px solid #c9a873!important;border-radius:22px!important;box-shadow:var(--ui-shadow)!important;padding:0!important;position:relative}
.ui-viral-box:before{content:"";display:block;height:6px;background:linear-gradient(90deg,#7f090b,var(--ui-red2),var(--ui-gold),var(--ui-red));border-radius:22px 22px 0 0}
.ui-viral-box>h2{margin:0;padding:15px 18px 5px;color:#7e0c0e!important;font-size:20px;font-weight:1000;letter-spacing:.3px;text-align:left}
.ui-viral-box>p{margin:5px 18px 12px;color:#705b4c;font-size:11px;line-height:1.55}
.ui-box-kicker{padding:11px 18px 0;color:#a30f12;font-size:8px;font-weight:1000;letter-spacing:1.5px;text-transform:uppercase}
.ui-viral-box .close{margin:12px 16px 16px;width:calc(100% - 32px)!important;border:1px solid #8f1717!important;border-radius:13px!important;background:linear-gradient(135deg,#a30f12,#d52b22)!important;color:#fff!important;font-weight:1000!important;min-height:44px;box-shadow:0 6px 16px rgba(163,15,18,.18)}
.ui-viral-box button{border-radius:11px!important;font-weight:900;transition:transform .12s ease,box-shadow .12s ease,filter .12s ease}
.ui-viral-box button:active{transform:scale(.98)}
.ui-viral-box input,.ui-viral-box select{border:1px solid #d8c4a8!important;border-radius:11px!important;background:#fff!important;color:#34251e!important;min-height:40px;box-sizing:border-box}
.ui-viral-box .primary{border:1px solid #8e0f10!important;background:linear-gradient(135deg,#a30f12,#d72a21)!important;color:#fff!important;box-shadow:0 6px 14px rgba(163,15,18,.16)}
/* Ranking */
.ui-ranking-box .leaderboard-box{margin:0 14px 12px!important;border:1px solid #e0cba9!important;border-radius:16px!important;background:#fff!important;overflow:hidden;box-shadow:inset 0 0 0 1px rgba(255,255,255,.7)}
.ui-ranking-box .leaderboard-head-row{background:linear-gradient(135deg,#7e0c0e,#b91716)!important;color:#fff!important;padding:11px 9px!important;font-size:9px!important;font-weight:1000!important;position:sticky;top:0;z-index:2}
.ui-ranking-box .leaderboard-tabs{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:6px;
  margin:0 14px 10px;
}
.ui-ranking-box .leaderboard-tabs .leaderboard-tab{
  min-height:44px;
  padding:8px 7px;
  border:1px solid #d6b477!important;
  border-radius:12px!important;
  background:#fff7e6!important;
  color:#4b2a1d!important;
  font-size:11px;
  font-weight:900;
  white-space:nowrap;
}
.ui-ranking-box .leaderboard-tabs .leaderboard-tab.active{
  background:linear-gradient(135deg,#f3dfb1,#fff5dc)!important;
  border-color:#a96b25!important;
  box-shadow:inset 0 -3px 0 #b77b3a;
}

.ui-ranking-box .leader-row{margin:0!important;padding:11px 9px!important;border-bottom:1px solid #f0e4d4!important;background:#fff!important;min-height:44px;box-sizing:border-box}
.ui-ranking-box .leader-row:nth-child(even){background:#fffaf2!important}
.ui-ranking-box .leader-row:first-child{background:linear-gradient(90deg,#fff6d8,#fff)!important;box-shadow:inset 4px 0 #d7a83d}
.ui-ranking-box .rank{font-weight:1000!important;color:#a30f12!important}.ui-ranking-box .leader-name{font-size:10px!important;color:#38261e!important}.ui-ranking-box .leader-revenue,.ui-ranking-box .leader-profit{font-size:9px!important}
/* Import / display */
.ui-import-box .bulk-toolbar,.ui-display-box .bulk-toolbar{margin:0 14px 9px!important;padding:9px!important;border:1px solid var(--ui-line)!important;border-radius:14px!important;background:#fff7e9!important;display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.ui-import-box .bulk-toolbar button,.ui-display-box .bulk-toolbar button{min-height:36px;border:1px solid #d3b88e!important;background:#fff!important;color:#5c3928!important;padding:7px 10px!important}
.ui-import-box .bulk-list,.ui-display-box .bulk-list{margin:0 14px!important;max-height:54vh!important;overflow:auto!important;border:1px solid #e2d2ba;border-radius:14px;background:#fff}
.ui-import-box .bulk-row,.ui-display-box .bulk-row{display:grid!important;grid-template-columns:minmax(0,1fr) auto 82px!important;gap:8px!important;align-items:center!important;padding:10px!important;margin:0!important;border:0!important;border-bottom:1px solid #f0e6d8!important;background:transparent!important}
.ui-import-box .bulk-row:nth-child(even),.ui-display-box .bulk-row:nth-child(even){background:#fffaf4!important}
.ui-import-box .bulk-row label,.ui-display-box .bulk-row label{min-width:0;font-size:11px}.ui-import-box .bulk-row span,.ui-display-box .bulk-row span{font-size:9px;color:#725e51}.ui-import-box .bulk-qty,.ui-display-box .shelf-qty{width:82px!important;text-align:center;font-weight:900}
.ui-import-box .bulk-summary,.ui-display-box .bulk-summary{margin:10px 14px!important;padding:10px 12px!important;border:2px solid #cfa34d!important;border-radius:13px!important;background:#fff5d9!important;color:#6e351b!important;font-size:10px;font-weight:900}
.ui-import-box #buyBatch,.ui-display-box #shelfBatch{margin:0 14px 4px;width:calc(100% - 28px);min-height:46px}
/* Employees */
.ui-employees-box .box-role-card{background:#fff}
.ui-employees-box>div:not(.ui-box-kicker):not(.box-role-card){ }
.ui-employees-box .hire-emp,.ui-employees-box .fire-emp,.ui-employees-box .pay-emp-salary{min-height:38px;padding:7px 10px;border:1px solid #d4b88e!important;background:#fff!important;color:#633626!important}
.ui-employees-box .hire-emp.primary,.ui-employees-box .pay-emp-salary.primary{background:linear-gradient(135deg,#a30f12,#d92a20)!important;color:#fff!important;border-color:#8d0e10!important}
/* Since legacy employee cards are inline-styled, use descendant div selectors carefully. */
.ui-employees-box>div:not(.ui-box-kicker):not(.ui-viral-box){border-color:#e2cfb1!important;border-radius:16px!important;background:linear-gradient(180deg,#fff,#fffaf4)!important;box-shadow:0 5px 14px rgba(70,35,10,.07);margin:9px 14px!important;padding:13px!important}
/* Store level */
.tthms-store-level-box .ui-box-kicker{padding-left:0}.tthms-store-level-box{overflow:auto}.tthms-store-level-box>div[style*="font-size:24px"]{margin:0 16px 10px!important;padding:13px!important;border-radius:15px!important;background:linear-gradient(135deg,#7f0d0e,#c82019)!important;color:#fff!important;box-shadow:0 8px 20px rgba(126,13,14,.18)}
.tthms-store-level-box>p{color:#6f5547!important}.tthms-store-level-box>div[style*="border:1px solid #ddd"]{border-color:#dfcfb7!important;background:#fff!important;border-radius:15px!important}.tthms-store-level-box>div[style*="text-align:left"]{background:#fffaf2;padding:12px!important;border:1px dashed #d5b989;border-radius:14px}
/* Finance */
.ui-finance-box .finance-wealth-grid{margin:0 14px 12px!important;gap:9px!important}.ui-finance-box .finance-wealth-card{border:1px solid #d7bd95!important;border-radius:17px!important;background:linear-gradient(145deg,#fff,#fff7e8)!important;box-shadow:0 7px 18px rgba(65,30,10,.09)!important;padding:9px!important}.ui-finance-box .finance-wealth-card img{border-radius:12px!important}.ui-finance-box .finance-wealth-card span{color:#7d0d0e!important}.ui-finance-box .finance-loans-section{margin:0 14px 10px!important}.ui-finance-box .finance-loans-section>div{border:1px solid #e0ceb3!important;border-radius:15px!important;background:#fff!important;padding:13px!important;margin:9px 0!important;box-shadow:0 4px 12px rgba(65,30,10,.06)}
/* Bank / gold */
.ui-wealth-box .wealth-panels{gap:10px!important;padding:0 14px 10px}.ui-wealth-box .wealth-panel{border:1px solid #d9c09a!important;border-radius:17px!important;background:linear-gradient(180deg,#fff,#fffaf2)!important;box-shadow:0 7px 18px rgba(65,30,10,.08)!important;padding:12px!important}.ui-wealth-box .wealth-panel h3{color:#7e0c0e!important;font-size:14px}.ui-wealth-box .wealth-rate{display:inline-block;padding:5px 8px;border-radius:999px;background:#fff0c9;color:#8a4a13;font-weight:1000;font-size:10px}.ui-wealth-box .wealth-balance{padding:9px;border-radius:11px;background:#fff5df;border:1px solid #e5c992;font-size:10px}.ui-wealth-box .wealth-term-list{margin-top:10px;padding:9px;border-radius:12px;background:#faf5ec;border:1px dashed #d6c1a2}.ui-wealth-box .wealth-term-row{padding:8px 0!important;border-bottom:1px solid #eadfce!important;gap:8px}.ui-wealth-box .gold-bars{padding:12px;border-radius:14px;background:radial-gradient(circle,#fff4c5,#fff);border:1px solid #e0c66e;min-height:54px}.ui-wealth-box .gold-bars span{filter:drop-shadow(0 3px 3px rgba(120,80,0,.18))}
/* Security */
.ui-security-box>div[style*="border:1px solid #ddd"]{margin:9px 14px!important;padding:13px!important;border-color:#dec9a9!important;border-radius:16px!important;background:linear-gradient(180deg,#fff,#fff7ec)!important;box-shadow:0 5px 14px rgba(65,30,10,.07)}
.ui-security-box>div[style*="background:#f5f5f5"]{margin:9px 14px!important;background:#f8f1e6!important;border:1px dashed #d5b98c}
/* Reviews */
.ui-reviews-box .rating-summary{margin:0 14px 10px!important;border:2px solid #d8ad45!important;background:linear-gradient(135deg,#fff2bf,#fff)!important;border-radius:15px!important;font-size:22px!important;padding:13px!important;color:#7b3b12}
.ui-reviews-box .reviews-box{margin:0 14px 12px!important;border:1px solid #e1d0b7!important;border-radius:15px!important;padding:7px!important;background:#fff!important}
.ui-reviews-box .review-item{margin:6px!important;border-radius:12px!important;padding:10px!important;border:1px solid #eee0cf!important;box-shadow:0 3px 8px rgba(65,30,10,.04)}
.ui-reviews-box .review-item.good{background:#f4fff5!important;border-left:4px solid #1e8a45!important}.ui-reviews-box .review-item.bad{background:#fff6f4!important;border-left:4px solid #c41d1d!important}
/* Utility */
.ui-utility-box .utility-modal-grid{padding:0 14px 10px!important;gap:8px!important}.ui-utility-box .utility-modal-grid button{min-height:56px!important;border:1px solid #dcc5a3!important;background:linear-gradient(145deg,#fff,#fff7e8)!important;color:#57372a!important;box-shadow:0 5px 12px rgba(65,30,10,.06)}.ui-utility-box .utility-modal-grid button:hover{filter:brightness(.98);box-shadow:0 7px 16px rgba(65,30,10,.1)}
/* Expense history */
.ui-expense-box .expense-history-note{margin:0 14px 9px!important;padding:8px 10px!important;border-radius:10px;background:#fff5dd!important;border:1px dashed #d7b979!important;color:#765642!important}.ui-expense-box .expense-history-list{margin:0 14px!important;border:1px solid #e2d2ba;border-radius:15px;background:#fff;overflow:auto}.ui-expense-box .expense-history-item{padding:10px!important;border-bottom:1px solid #eee2d2!important}.ui-expense-box .expense-history-main strong{color:#a30f12!important}.ui-expense-box .expense-history-actions{padding:0 14px 4px}.ui-expense-box .expense-history-actions button{min-height:42px}
/* Mobile */
@media(max-width:600px){
  .ui-viral-box{width:97vw!important;max-height:94vh;border-radius:18px!important}
  .ui-ranking-box{
    width:calc(100vw - 16px)!important;
    max-width:calc(100vw - 16px)!important;
    max-height:calc(100dvh - 16px)!important;
    margin:0!important;
  }
  .ui-ranking-box .leaderboard-box{
    margin-left:8px!important;
    margin-right:8px!important;
  }
.ui-viral-box>h2{font-size:15px;padding:12px 12px 4px}.ui-box-kicker{padding:8px 12px 0;font-size:7px}.ui-viral-box>p{margin:4px 12px 10px;font-size:9px}.ui-import-box .bulk-toolbar,.ui-display-box .bulk-toolbar{margin:0 9px 7px!important;padding:7px!important}.ui-import-box .bulk-list,.ui-display-box .bulk-list{margin:0 9px!important;max-height:52vh!important}.ui-import-box .bulk-row,.ui-display-box .bulk-row{grid-template-columns:minmax(0,1fr) 66px!important;gap:5px!important;padding:8px!important}.ui-import-box .bulk-row span,.ui-display-box .bulk-row span{grid-column:1/2;font-size:8px}.ui-import-box .bulk-qty,.ui-display-box .shelf-qty{grid-column:2;grid-row:1/3;width:66px!important}.ui-import-box #buyBatch,.ui-display-box #shelfBatch{margin:0 9px 3px;width:calc(100% - 18px)}.ui-employees-box>div:not(.ui-box-kicker):not(.ui-viral-box){margin:7px 9px!important;padding:10px!important}.ui-security-box>div[style*="border:1px solid #ddd"],.ui-security-box>div[style*="background:#f5f5f5"]{margin:7px 9px!important}.ui-finance-box .finance-wealth-grid,.ui-finance-box .finance-loans-section{margin-left:9px!important;margin-right:9px!important}.ui-wealth-box .wealth-panels{padding:0 9px 8px}.ui-ranking-box .leaderboard-box,.ui-reviews-box .rating-summary,.ui-reviews-box .reviews-box{margin-left:9px!important;margin-right:9px!important}.ui-expense-box .expense-history-note,.ui-expense-box .expense-history-list{margin-left:9px!important;margin-right:9px!important}.ui-utility-box .utility-modal-grid{padding:0 9px 8px!important;grid-template-columns:repeat(2,1fr)!important}.ui-utility-box .utility-modal-grid button{min-height:52px!important;font-size:10px!important}.tthms-store-level-box{padding:12px!important}.tthms-store-level-box>div[style*="font-size:24px"]{margin-left:0!important;margin-right:0!important;font-size:18px!important}}

/* v2.7.7 — VIRAL STORE COMMAND UI
 * Visual-only refresh for the main game dashboard and management modals.
 * No game state, storage, transaction or gameplay logic is changed here.
 */
:root{
  --viral-red:#c91f32;--viral-red-dark:#8f1020;--viral-gold:#e8ad32;
  --viral-cream:#fff8ea;--viral-paper:#fffdf8;--viral-ink:#2d211b;
  --viral-line:#e6c98e;--viral-green:#16845a;--viral-blue:#2478b8;
}
#tthms-app{background:radial-gradient(circle at 50% -10%,#fffdf5 0,#f5e6cf 42%,#ead6b8 100%);}
.tthms{border-radius:0 0 24px 24px;background:var(--viral-cream);box-shadow:0 18px 55px #4d291b26;}
.game-top{padding:10px 12px 11px;background:linear-gradient(135deg,#fffdf7 0%,#fff1d4 52%,#ffe5c5 100%);border-bottom:2px solid #d7aa61;position:relative;}
.game-top:before{content:"✦ TIỆM TẠP HÓA ✦";display:block;text-align:center;font-size:9px;font-weight:1000;letter-spacing:2px;color:#a44a2e;margin-bottom:5px;}
.game-top-main{background:#ffffffd9;border:1px solid #ead09c;border-radius:18px;padding:8px;box-shadow:0 5px 14px #6b3b1d12;}
.day{background:#fff5d9;border:1px solid #e6c67e;border-radius:12px;padding:5px 8px;}
.day b{font-size:15px;color:#8c271e}.day span{font-size:10px;color:#7b6555}
.shop-title{color:#a9142a;font-size:12px;text-transform:uppercase;letter-spacing:.3px}.shop-title strong{font-size:23px;color:#231913;margin-top:2px}
.top-right{background:#fff5d9;border:1px solid #e6c67e;border-radius:12px;padding:5px 8px}.stars{font-size:17px;color:#e3a51e}
.game-stage{padding:9px 9px 10px;background:linear-gradient(#f5e3c7,#ead1ac);}
.scene{border:3px solid #8c4a31;border-radius:20px;box-shadow:0 8px 0 #9d69464a, inset 0 0 0 2px #fff5d0;}
.awning{height:58px;filter:saturate(1.08);border-bottom:4px solid #7c3c2e;}
.status-pill{background:#fffdf2ee;border:2px solid #a66a3f;border-radius:999px;padding:6px 10px;box-shadow:0 3px 9px #0002;}
.counter-board{background:linear-gradient(180deg,#fff2d2,#eac99a);border-color:#75442e;box-shadow:0 6px 0 #9a603e;}
.counter-label{background:#fff1bd;border-color:#a66b3e;color:#5b2d20;box-shadow:0 2px 0 #d7a55f;}
.product-trays{gap:7px}.tray{border:2px solid #8a735f;border-radius:14px;background:linear-gradient(#fffefa,#fff1d8);box-shadow:0 4px 0 #b59b7f66;}.tray.has-stock{background:linear-gradient(#fffef9,#ffe9bb);border-color:#9a653f}.tray .tray-icon{filter:drop-shadow(0 2px 1px #0002)}
.qty{background:#c91f32;color:#fff;border-color:#7e0f1c;box-shadow:0 2px 5px #0003;}
.game-controls-footer{padding:10px;background:linear-gradient(#fff5df,#f4dfbf);border-top:2px solid #d3a35e;}
.guide-footer{background:linear-gradient(135deg,#9e1628,#d32b3d);border:1px solid #7f0f1d;border-radius:14px;box-shadow:0 4px 0 #77101b;font-size:11px;letter-spacing:.15px;}
.footer-control-grid{gap:9px}.footer-store-tools{gap:8px!important}
.mobile-icon-grid{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;}
.mobile-icon-box{position:relative;min-height:78px!important;padding:9px 5px!important;border:1px solid #dfc487!important;border-radius:16px!important;background:linear-gradient(180deg,#fffdf7,#fff0d0)!important;color:#3b271d!important;box-shadow:0 4px 0 #c8a36d!important;transition:transform .12s ease,box-shadow .12s ease,filter .12s ease;}
.mobile-icon-box:active{transform:translateY(2px);box-shadow:0 2px 0 #c8a36d!important;filter:brightness(.98)}
.mobile-icon-box .mobile-icon{display:grid;place-items:center;width:38px;height:38px;margin:0 auto 5px;border-radius:12px;background:linear-gradient(135deg,#c51f35,#e7a82d);box-shadow:0 3px 7px #7a241d2b;font-size:21px;}
.mobile-icon-box b{display:block;font-size:10px;font-weight:1000;line-height:1.15;color:#4a261c}.mobile-icon-box small{display:block;margin-top:3px;font-size:7.5px;color:#806957;line-height:1.15}
.tthms-leaderboard-top-box{background:linear-gradient(180deg,#fff5c9,#ffe3a2)!important;border-color:#d8a22c!important}.tthms-leaderboard-top-box .mobile-icon{background:linear-gradient(135deg,#d89b16,#f1c34d)}
.mobile-icon-open{background:linear-gradient(180deg,#ecfff5,#d8f6e7)!important;border-color:#78bd9b!important}.mobile-icon-store{background:linear-gradient(180deg,#fff0ed,#ffe1d8)!important}.tthms-security-box{background:linear-gradient(180deg,#eef7ff,#dceeff)!important;border-color:#83add2!important}.mobile-utility-box{background:linear-gradient(180deg,#f6efff,#e9ddff)!important}.mobile-info-box{background:linear-gradient(180deg,#f1f7ff,#e2edff)!important}.mobile-icon-save{background:linear-gradient(180deg,#f1fff7,#dff7ea)!important}
.shelf-control{border:2px solid #c28b45;background:linear-gradient(180deg,#fff7df,#ffe6b5);border-radius:16px;box-shadow:0 4px 0 #b27a42;}.shelf-control-title{color:#7d2b1d;font-size:11px}.shelf-control-main strong{color:#2d211b}.shelf-control-main button{border-radius:11px;background:#9d1b2e!important;box-shadow:0 3px 0 #6f111e!important}.shelf-control-main button:last-child{background:#bd7b16!important;box-shadow:0 3px 0 #8b5a0d!important}
.game-bottom{background:linear-gradient(135deg,#351e17,#5b2d21);color:#fff;border-top:3px solid #d9a73a;padding:9px 10px;border-radius:0 0 18px 18px;box-shadow:inset 0 1px #fff3;}.money-row{display:grid!important;grid-template-columns:repeat(2,1fr);gap:6px!important}.money-row span,.tthms-total-revenue{background:#ffffff12;border:1px solid #ffffff1f;border-radius:10px;padding:7px 8px;color:#fff7e3;font-size:9px!important}.tthms-total-revenue{margin-top:7px;text-align:center;background:linear-gradient(135deg,#9b182b,#c83a36);border-color:#e2a744;font-weight:1000}

/* All management modals: unified viral command-center cards. */
.modal{background:#21140db8!important;backdrop-filter:blur(5px);}
.modal .box{border:0!important;border-radius:22px!important;background:linear-gradient(180deg,#fffdf8,#fff0d1)!important;box-shadow:0 20px 60px #0005,0 0 0 2px #d9a653!important;padding:16px!important;color:var(--viral-ink);}
.modal .box h1,.modal .box h2,.modal .box h3{color:#8e1726;letter-spacing:.2px;text-transform:uppercase;}
.modal .box h2{font-size:20px;margin:4px 0 10px}.modal .box h3{font-size:14px}
.modal .box p{color:#665347;font-size:11px;line-height:1.45}.modal .box button,.modal .box .primary{border-radius:12px!important;border:1px solid #b77b3a!important;min-height:42px;padding:9px 12px!important;font-weight:1000;background:linear-gradient(180deg,#fffaf0,#f7dfb3);color:#4b2a1d;box-shadow:0 3px 0 #c1955e;}
.modal .box button.primary{background:linear-gradient(135deg,#a9152b,#d62d40)!important;color:#fff!important;border-color:#7d0e1e!important;box-shadow:0 3px 0 #70101b!important;}
.modal .box button.close{background:#f2e5d2!important;color:#634b3b!important;border-color:#cbb08c!important;}
.modal .box input,.modal .box select,.modal .box textarea{border:1px solid #d6bd91!important;border-radius:11px!important;background:#fffdf8!important;padding:9px!important;min-height:40px;}

/* Cards used by shop management panels */
.bulk-box .bulk-toolbar,.bulk-toolbar{background:#fff5dc!important;border:1px solid #e0c58d!important;border-radius:14px!important;padding:8px!important;box-shadow:inset 0 1px #fff;}
.bulk-list{display:flex!important;flex-direction:column;gap:7px!important;}
.bulk-row{background:#fffdf8!important;border:1px solid #e3cda6!important;border-radius:14px!important;padding:9px!important;box-shadow:0 2px 6px #5d351510;}
.bulk-row:has(input:checked){border-color:#d39a31!important;background:#fff7d8!important;}
.expense-history-box,.bookkeeping-modal,.tax-obligation-modal,.tthms-wealth-modal,.employee-modal,.leaderboard-modal,.multi-store-modal{border-radius:22px!important;}
.wealth-panels{gap:10px!important}.wealth-panel{border:1px solid #dfc487!important;border-radius:18px!important;background:linear-gradient(180deg,#fffdf8,#fff0d1)!important;box-shadow:0 4px 12px #6b3b1d12!important;overflow:hidden;}
.wealth-panel h3{padding:10px 12px!important;margin:0!important;background:linear-gradient(135deg,#8e1726,#c82a38);color:#fff!important;font-size:13px!important;}
.leaderboard-box{background:#fff7df!important;border:1px solid #e0c487!important;border-radius:16px!important;padding:10px!important}.leader-row{background:#fffdf8!important;border:1px solid #e5cfaa!important;border-radius:12px!important;box-shadow:0 2px 5px #5d351512!important}.leader-row:first-of-type{background:linear-gradient(135deg,#fff0b9,#ffe4a0)!important;border-color:#d8a02b!important;}

@media(max-width:600px){
 .game-top-main{grid-template-columns:1fr auto 1fr;gap:5px;padding:6px}.game-top:before{font-size:8px;letter-spacing:1.4px}.shop-title strong{font-size:20px}.day b{font-size:13px}.stars{font-size:14px}.top-right small{font-size:8px}
 .scene{border-radius:16px}.mobile-icon-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.mobile-icon-box{min-height:74px!important;border-radius:14px!important}.mobile-icon-box .mobile-icon{width:34px;height:34px;font-size:19px}.mobile-icon-box b{font-size:9px}.mobile-icon-box small{font-size:7px}.game-bottom{border-radius:0 0 14px 14px}.money-row{gap:5px!important}.money-row span,.tthms-total-revenue{font-size:8px!important;padding:6px}
 .modal .box{border-radius:18px!important;padding:12px!important}.modal .box h2{font-size:17px}.modal .box h3{font-size:13px}.modal .box button{min-height:44px}
}
@media(min-width:601px){.mobile-icon-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.mobile-icon-box{min-height:86px!important}}

/* v2.7.8 — Soft Viral UI Theme: gentle pastel palette, no gameplay logic changes */
:root{--cream:#f8f7f3;--paper:#fffdfa;--ink:#3f4650;--brown:#8a7a70;--pink:#e7a7b9;--blue:#9cc8dc;--green:#9bc8b0;--line:#e6ddd5;--lav:#c9c1e8;--peach:#f2c7ad;--soft-shadow:rgba(82,72,66,.12)}
#tthms-app{color:#3f4650;background:#f3f0ed}
.tthms{background:#f7f4f1;box-shadow:0 10px 34px rgba(70,60,55,.10)}
.game-top{background:rgba(255,253,250,.96);border-bottom:1px solid #ebe3dc}
.shop-title{color:#b97f94}.shop-title strong{color:#4d5660}.day span,.top-right,.stars small{color:#7f8790}
.stars{color:#d9ad58}
.game-stage,.game-bottom,.game-controls-footer{background:#f5f2ef}
.scene{border-color:#d8cbc1;box-shadow:inset 0 0 0 9999px rgba(255,255,255,.08)}
.awning{background:repeating-linear-gradient(90deg,#eab8c7 0 52px,#fffaf6 52px 104px);border-bottom-color:#d0b4b8}
.avatar-bubble{border-color:#efd2dc;box-shadow:0 3px 8px rgba(70,60,55,.12)}
.avatar-bubble.active{outline-color:#9bc8b0}
.customer-dialog{background:#fffdfa;border-color:#d6c6bc;box-shadow:0 5px 12px rgba(70,60,55,.12)}
.customer-dialog:before{border-top-color:#d6c6bc}
.dialog-title em{color:#c98299}
.patience{background:#eee9e3;border-color:#d2c7bf}.patience i{background:#9bc8b0}
.guide,.guide-footer{background:#9cc8dc;color:#344752;box-shadow:0 3px 0 #82afc2}
.counter-board{background:#f8f0e8;border-color:#cbb8aa;box-shadow:0 5px 0 #d7c1b3}
.counter-label{background:#f6dfcf;border-color:#d1b09b;color:#65554b}
.tray{border-color:#d9d0c9;background:#fffdfa;box-shadow:0 3px 0 #d6cbc3}
.tray.has-stock{background:linear-gradient(#fffdfa,#f8f0e8)}
.qty{background:#eadfcf;border-color:#c7b7a8}
.store-tools button{border-color:#d2c2b8;background:#fffdfa;color:#505960;box-shadow:0 3px 0 #d7cbc3}
.store-tools button.primary{background:#9cc8dc;color:#344752;border-color:#82afc2}
.store-tools button.green{background:#9bc8b0;color:#345146;border-color:#82af9a}
.status-pill{background:rgba(255,253,250,.92);border-color:#d7c8be}
.queue-card{background:#fffdfa;border-color:#d6c7bd;box-shadow:0 3px 7px rgba(70,60,55,.10)}
.pay{background:#9bc8b0;color:#29463a}.leave{background:#e6a8b4;color:#633d48}
.action-row button{background:#b9addb;color:#413a58;box-shadow:0 2px 0 #a99ccf}
.money-row{background:#fffdfa;border-color:#e3d8d0}
.reviews-box{background:#fffdfa;border-top-color:#e3d8d0}
.review-item.good{background:#edf7f1}.review-item.bad{background:#fdf0f2}
.modal.show{background:rgba(55,50,48,.34)}
.box{background:#fffdfa;border:1px solid #e7ddd6;box-shadow:0 14px 42px rgba(70,60,55,.14)}
.row{border-bottom-color:#eee5df}.row button,.box button{background:#b9addb;color:#413a58}
.auth-game{background-color:#dbeef4}.auth-game:before{background:linear-gradient(180deg,rgba(255,255,255,.10),rgba(150,125,115,.08))}
.auth-box{background:rgba(255,253,250,.97);border-color:#d8c5bd;box-shadow:0 15px 40px rgba(70,60,55,.16)}
.auth-tabs button{background:#eee7e2;color:#655b55}.auth-tabs button.active{background:#b9addb;color:#413a58}
.auth-box input{border-color:#ddd1c9;background:#fffdfa}.auth-box #authSubmit{background:#9bc8b0;color:#29463a}
.bulk-summary{background:#fff8f2;border-color:#e5d9d0}
.compact-info-btn{background:#fffdfa;color:#59626b;box-shadow:0 2px 0 #d8ccc4}.compact-info-panel.open .compact-info-btn{background:#eee8f6}
.compact-info-content .leaderboard-box,.compact-info-content .reviews-box,.ranking-review-modal .leaderboard-box,.ranking-review-modal .reviews-box,.ranking-review-modal .rating-summary{background:#fffdfa;border-color:#e4d9d2}
.vehicle-pawn-actions,.vehicle-pawn-active{background:#fffaf5;border-color:#ddcec4}.vehicle-pawn-active{border-color:#dcc99b;background:#fff8e7}
.pawn-choice{border-color:#ddd0c7;background:#fffdfa;color:#4e5960}.pawn-choice.pawn-bank{border-color:#bda78f;background:#d8c4b0;color:#493f38}.pawn-choice.pawn-social{border-color:#d29eac;background:#e5b9c5;color:#573c44}
.vehicle-card.pawned{border-color:#dcc99b;background:#fff8e7}
.owner-choice{border-color:#e5dad2;background:#fffdfa}.owner-choice.selected{border-color:#9bc8b0;box-shadow:0 0 0 3px rgba(155,200,176,.16)}
.promo-buy-btn{border-color:#d2b17f!important;background:#ead3a4!important;color:#514433!important;box-shadow:0 3px 0 #d1b886!important}
.public-promo-message{background:#fff8e8;border-color:#ead8ad;color:#655744}
.promo-submit-box textarea{border-color:#ddd0c8;background:#fffdfa}
.tthms-zalo-support{background:rgba(255,253,250,.98);border-color:#a9cddd;box-shadow:0 6px 24px rgba(70,60,55,.12)}
.tthms-zalo-support a{background:#9cc8dc;color:#344752!important}.tthms-zalo-support .tthms-zalo-toggle{border-color:#a9cddd;background:#fffdfa;color:#64899a}
.expense-history-box{background:rgba(120,105,95,.045)}
.save-game-guide-btn{background:#fff1df!important;color:#6c5b4d!important;border-color:#dfc5a6!important}.save-game-guide-modal-box{border-color:#d5c0b3}.save-game-guide-inner{background:#fff8ef;border-color:#dfc7b2}.save-game-guide-title{color:#789caf}
.tthms-chat-toggle,.tthms-chat-box{background:rgba(74,78,86,.94);border-color:rgba(255,255,255,.16)}
.tthms-extra-box button,.tthms-extra-box a{border-color:rgba(100,90,85,.12);background:#fffdfa;color:#4d5860}
@media(max-width:600px){.box{border-radius:20px}.action-row button{min-height:40px}.store-tools button{box-shadow:0 2px 0 #d7cbc3}}

/* v2.7.9 — Light-background contrast pass
 * Keep all important numbers/text readable on the soft pastel theme.
 * UI only: no gameplay/state logic changes.
 */
.game-bottom{
  background:linear-gradient(180deg,#fffdfa,#f7f3ee)!important;
  color:#20252b!important;
  border-top:1px solid #e4d9d0!important;
}
.money-row{
  background:#fff!important;
  border:1px solid #e3d9d1!important;
  color:#20252b!important;
  box-shadow:0 3px 10px rgba(70,60,55,.06)!important;
}
.money-row span,
.tthms-total-revenue{
  background:#fff!important;
  color:#20252b!important;
  border:1px solid #ddd4cd!important;
  text-shadow:none!important;
}
.money-row span b,
.money-row span strong,
.tthms-total-revenue b,
.tthms-total-revenue strong{color:#111827!important;}

/* Display/shelf quantities: black on light cards */
.tray,
.mobile-shelf-card,
.mobile-icon-box,
.bulk-row,
.bulk-summary,
.ui-display-box .row,
.ui-import-box .row{
  color:#20252b;
}
.tray b,
.tray .qty,
.mobile-shelf-card strong,
.mobile-shelf-card .shelf-control-main strong,
.mobile-shelf-card .shelf-control-note,
.bulk-row span,
.bulk-row label b,
.ui-display-box .row b,
.ui-import-box .row b{
  color:#111827!important;
  text-shadow:none!important;
}
.qty{
  background:#fff!important;
  color:#111827!important;
  border-color:#bfb6af!important;
  box-shadow:0 2px 5px rgba(50,45,42,.10)!important;
}

/* Light statistic cards throughout management boxes */
.ms-summary-card>div,
.ms-store-card,
.ms-land-card,
.tax-kpi-grid>div,
.tax-panel,
.book-tags span,
.leader-row,
.owner-choice,
.pawn-choice,
.vehicle-card,
.tthms-extra-box,
.tthms-extra-box button,
.tthms-extra-box a{
  color:#20252b!important;
}
.ms-summary-card>div b,
.ms-store-card b,
.ms-store-card strong,
.ms-land-card strong,
.tax-kpi-grid b,
.tax-detail-grid>b,
.leader-row b,
.vehicle-card b{
  color:#111827!important;
}

/* Do not force white text onto pale/white buttons and fields. */
.modal .box input,
.modal .box select,
.modal .box textarea{
  color:#20252b!important;
}
.modal .box input::placeholder,
.modal .box textarea::placeholder{color:#7b858e!important;opacity:1!important;}

/* Staff information on light employee cards */
.ui-employees-box .employee-card,
.ui-employees-box .ms-employee-card,
.ui-employees-box .employee-row,
.ui-employees-box .ms-employee-row{
  color:#20252b!important;
}
.ui-employees-box .employee-card b,
.ui-employees-box .employee-row b,
.ui-employees-box .ms-employee-card b,
.ui-employees-box .ms-employee-row b{
  color:#111827!important;
}

/* Finance / bank / gold: light panels use dark readable text. */
.wealth-panel:not(:has(h3[style])){
  color:#20252b!important;
}
.wealth-panel p,
.wealth-panel .wealth-balance,
.wealth-panel .wealth-term-list,
.wealth-panel .wealth-rate,
.wealth-panel small,
.wealth-panel label{
  color:#30363d!important;
}
.wealth-panel .wealth-balance b,
.wealth-panel .wealth-rate,
.wealth-panel .wealth-term-list b{
  color:#111827!important;
}

/* Review/history cards on light backgrounds */
.review-item,
.expense-history-box .row,
.book-row:not(.head){color:#20252b!important;}
.review-item b,
.expense-history-box .row b,
.book-row:not(.head) b{color:#111827!important;}

@media(max-width:600px){
  .money-row span,.tthms-total-revenue{font-size:9px!important;color:#111827!important;}
  .tray b{font-size:9px!important;color:#111827!important;}
  .qty{min-width:25px!important;height:25px!important;font-size:11px!important;font-weight:1000!important;}
}


/* TTHMS IN-GAME TAX AWARD */
.tax-award-modal{width:min(980px,97vw)!important;max-height:94vh!important;overflow:auto!important;background:#f7f3ea!important;border:1px solid #c8ad7a!important;border-radius:16px!important;box-shadow:0 16px 50px rgba(55,42,25,.22)!important;padding:0!important}
.tax-award-top{height:48px;padding:0 14px;display:flex;align-items:center;justify-content:space-between;background:#fffaf0;border-bottom:1px solid #ddcfb3;color:#6b5030;font-size:12px;font-weight:900;letter-spacing:.4px}
.tax-award-top button{border:0;background:transparent;color:#725638;font-size:27px;line-height:1;cursor:pointer;padding:4px 8px}
.tax-award-canvas-wrap{padding:10px;background:#eee8db}
#tthmsTaxAwardCanvas{display:block;width:100%;height:auto;border-radius:10px;background:#fbf8f0;box-shadow:0 3px 14px rgba(50,40,25,.12)}
.tax-award-actions{display:flex;gap:10px;padding:12px;background:#fffaf0;position:sticky;bottom:0}
.tax-award-actions button{flex:1;min-height:44px;border-radius:11px;font-weight:900;font-size:12px;cursor:pointer}
.tax-award-save{border:1px solid #a9854d;background:#a9854d;color:#fff}
.tax-award-close{border:1px solid #cbb99b;background:#fff;color:#5f4b37}
@media(max-width:600px){
 .tax-award-modal{width:98vw!important;border-radius:12px!important}
 .tax-award-canvas-wrap{padding:5px}
 .tax-award-actions{padding:9px;gap:7px}
 .tax-award-actions button{min-height:42px;font-size:11px}
}

/* v2.8.2 — Viral unified event UI 01–04. Visual-only; event logic unchanged. */
.tthms-event-card{position:relative;overflow:hidden;background:linear-gradient(180deg,#fff 0%,#f8fafc 100%)!important;color:#111!important;border:1px solid #e5e7eb!important;border-radius:24px!important;box-shadow:0 18px 55px rgba(15,23,42,.20)!important;font-family:inherit}
.tthms-event-card:before{content:"";position:absolute;left:0;right:0;top:0;height:7px;background:linear-gradient(90deg,#111827,#64748b,#111827);opacity:.95}
.tthms-event-kicker{font-size:10px;letter-spacing:.12em;font-weight:950;color:#64748b;margin:2px 0 5px;text-transform:uppercase}
.tthms-event-title,.tthms-landlord-title{font-weight:950;letter-spacing:-.02em}
.tthms-event-hero{position:relative;width:min(180px,42vw);height:116px;margin:8px auto 12px;border-radius:20px;background:#fff;border:1px solid #e5e7eb;display:flex;align-items:center;justify-content:center;overflow:hidden}
.tthms-event-hero img{width:100%;height:100%;object-fit:contain;padding:8px;box-sizing:border-box}
.tthms-event-hero span{position:absolute;right:8px;bottom:6px;font-size:25px;filter:drop-shadow(0 2px 3px rgba(0,0,0,.18))}
.tthms-ei-title{margin-top:2px!important}
.tthms-ei-error{background:#f8fafc!important;border:1px solid #dbe2ea!important}
.tthms-ei-meta span,.tthms-ei-balance,.tthms-ei-note{border:1px solid #e5e7eb!important;background:#fff!important}
.tthms-ei-fine{background:#f8fafc!important;border:2px solid #111827!important}
.tthms-ei-fine small{font-size:10px;letter-spacing:.08em;color:#64748b}
.tthms-event-hint{font-size:11px;color:#64748b;margin-top:8px}
.tthms-landlord-overlay{position:fixed;inset:0;z-index:10060;display:flex;align-items:center;justify-content:center;padding:12px;background:rgba(15,23,42,.55);box-sizing:border-box}
.tthms-landlord-card{width:min(94vw,500px);max-height:calc(100vh - 24px);overflow:auto;padding:20px 16px 16px;box-sizing:border-box;text-align:center}
.tthms-landlord-title{font-size:23px;line-height:1.15;margin:2px 28px 10px}
.tthms-landlord-owner{display:flex;align-items:center;justify-content:center;gap:10px;margin:8px 0 10px;text-align:left}
.tthms-landlord-owner-icon{width:46px;height:46px;border-radius:14px;background:#f1f5f9;display:flex;align-items:center;justify-content:center;font-size:27px}
.tthms-landlord-owner small{display:block;color:#64748b;margin-top:2px}
.tthms-landlord-reason{padding:12px;border-radius:15px;background:#f8fafc;border:1px solid #e5e7eb;font-size:14px;line-height:1.45;font-weight:750;margin:10px 0}
.tthms-landlord-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:10px 0}
.tthms-landlord-grid>div{padding:10px 8px;border:1px solid #e5e7eb;border-radius:14px;background:#fff;font-size:11px;color:#64748b}
.tthms-landlord-grid b{display:block;color:#111827;font-size:16px;margin-top:3px}
.tthms-finance-grid>div{min-height:55px}
.tthms-finance-grid .amount{grid-column:1/-1;background:#f1f5f9;border-color:#cbd5e1}
.tthms-finance-grid .amount b{font-size:22px}
.tthms-rent-grid .rent-up{background:#f8fafc}
.tthms-rent-grid .rent-up b{font-size:20px}
.tthms-landlord-note{padding:10px 12px;border-radius:13px;background:#f8fafc;color:#475569;font-size:12px;line-height:1.4;margin:10px 0}
.tthms-landlord-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:12px}
.tthms-landlord-actions button{min-height:50px;border:1px solid #111827;border-radius:14px;background:#111827;color:#fff;font-weight:900;font-size:12px;cursor:pointer;touch-action:manipulation}
.tthms-landlord-actions button:last-child{grid-column:1/-1;background:#fff;color:#111827}
.tthms-landlord-actions small{font-size:10px;opacity:.85}
.tthms-event-owner-hero{display:flex;align-items:center;justify-content:center;gap:10px;margin:6px auto 10px}
.tthms-event-owner-hero img{width:72px;height:82px;object-fit:contain;border-radius:18px;background:#f8fafc;border:1px solid #e5e7eb;padding:5px}
.tthms-event-owner-hero div{text-align:left}.tthms-event-owner-hero b{font-size:15px}.tthms-event-owner-hero small{display:block;color:#64748b;margin-top:3px}
.tthms-event-maintext{font-size:16px;line-height:1.4;margin:8px 0;color:#111827}
.tthms-event-subtext{font-size:12px;line-height:1.4;color:#64748b;margin:0 0 10px}
.tthms-event-stat-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:12px 0}
.tthms-event-stat-grid>div{padding:10px;border:1px solid #e5e7eb;border-radius:14px;background:#fff;text-align:left}
.tthms-event-stat-grid small{display:block;color:#64748b;font-size:9px;font-weight:900;letter-spacing:.08em}
.tthms-event-stat-grid b{display:block;color:#111827;font-size:14px;margin-top:3px}
.tthms-event-stat-grid .danger{background:#f8fafc;border-color:#cbd5e1}
.tthms-event-primary{width:100%;min-height:50px;border:1px solid #111827;border-radius:15px;background:#111827;color:#fff;font-weight:950;font-size:12px;touch-action:manipulation}
@media(max-width:430px){
 .tthms-landlord-card{width:calc(100vw - 18px);padding:17px 11px 12px;border-radius:20px!important}
 .tthms-landlord-title{font-size:20px}.tthms-landlord-reason{font-size:13px}.tthms-landlord-grid b{font-size:14px}
 .tthms-event-hero{height:96px;width:min(155px,42vw)}.tthms-event-stat-grid b{font-size:13px}
 .tthms-landlord-actions button{font-size:11px;min-height:48px}
}

/* v2.8.2 — Viral unified event UI 01–04. Visual-only; event logic unchanged. */
.tthms-event-card{position:relative;overflow:hidden;background:linear-gradient(180deg,#fff 0%,#f8fafc 100%)!important;color:#111!important;border:1px solid #e5e7eb!important;border-radius:24px!important;box-shadow:0 18px 55px rgba(15,23,42,.20)!important;font-family:inherit}
.tthms-event-card:before{content:"";position:absolute;left:0;right:0;top:0;height:7px;background:linear-gradient(90deg,#111827,#64748b,#111827);opacity:.95}
.tthms-event-kicker{font-size:10px;letter-spacing:.12em;font-weight:950;color:#64748b;margin:2px 0 5px;text-transform:uppercase}
.tthms-event-title,.tthms-landlord-title{font-weight:950;letter-spacing:-.02em}
.tthms-event-hero{position:relative;width:min(180px,42vw);height:116px;margin:8px auto 12px;border-radius:20px;background:#fff;border:1px solid #e5e7eb;display:flex;align-items:center;justify-content:center;overflow:hidden}
.tthms-event-hero img{width:100%;height:100%;object-fit:contain;padding:8px;box-sizing:border-box}
.tthms-event-hero span{position:absolute;right:8px;bottom:6px;font-size:25px;filter:drop-shadow(0 2px 3px rgba(0,0,0,.18))}
.tthms-ei-error{background:#f8fafc!important;border:1px solid #dbe2ea!important}.tthms-ei-meta span,.tthms-ei-balance,.tthms-ei-note{border:1px solid #e5e7eb!important;background:#fff!important}.tthms-ei-fine{background:#f8fafc!important;border:2px solid #111827!important}.tthms-ei-fine small{font-size:10px;letter-spacing:.08em;color:#64748b}.tthms-event-hint{font-size:11px;color:#64748b;margin-top:8px}
.tthms-landlord-overlay{position:fixed;inset:0;z-index:10060;display:flex;align-items:center;justify-content:center;padding:12px;background:rgba(15,23,42,.55);box-sizing:border-box}.tthms-landlord-card{width:min(94vw,500px);max-height:calc(100vh - 24px);overflow:auto;padding:20px 16px 16px;box-sizing:border-box;text-align:center}.tthms-landlord-title{font-size:23px;line-height:1.15;margin:2px 28px 10px}.tthms-landlord-owner{display:flex;align-items:center;justify-content:center;gap:10px;margin:8px 0 10px;text-align:left}.tthms-landlord-owner-icon{width:46px;height:46px;border-radius:14px;background:#f1f5f9;display:flex;align-items:center;justify-content:center;font-size:27px}.tthms-landlord-owner small{display:block;color:#64748b;margin-top:2px}.tthms-landlord-reason{padding:12px;border-radius:15px;background:#f8fafc;border:1px solid #e5e7eb;font-size:14px;line-height:1.45;font-weight:750;margin:10px 0}.tthms-landlord-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:10px 0}.tthms-landlord-grid>div{padding:10px 8px;border:1px solid #e5e7eb;border-radius:14px;background:#fff;font-size:11px;color:#64748b}.tthms-landlord-grid b{display:block;color:#111827;font-size:16px;margin-top:3px}.tthms-finance-grid .amount{grid-column:1/-1;background:#f1f5f9;border-color:#cbd5e1}.tthms-finance-grid .amount b{font-size:22px}.tthms-rent-grid .rent-up{background:#f8fafc}.tthms-rent-grid .rent-up b{font-size:20px}.tthms-landlord-note{padding:10px 12px;border-radius:13px;background:#f8fafc;color:#475569;font-size:12px;line-height:1.4;margin:10px 0}.tthms-landlord-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:12px}.tthms-landlord-actions button{min-height:50px;border:1px solid #111827;border-radius:14px;background:#111827;color:#fff;font-weight:900;font-size:12px;cursor:pointer;touch-action:manipulation}.tthms-landlord-actions button:last-child{grid-column:1/-1;background:#fff;color:#111827}.tthms-landlord-actions small{font-size:10px;opacity:.85}.tthms-event-owner-hero{display:flex;align-items:center;justify-content:center;gap:10px;margin:6px auto 10px}.tthms-event-owner-hero img{width:72px;height:82px;object-fit:contain;border-radius:18px;background:#f8fafc;border:1px solid #e5e7eb;padding:5px}.tthms-event-owner-hero div{text-align:left}.tthms-event-owner-hero b{font-size:15px}.tthms-event-owner-hero small{display:block;color:#64748b;margin-top:3px}.tthms-event-maintext{font-size:16px;line-height:1.4;margin:8px 0;color:#111827}.tthms-event-subtext{font-size:12px;line-height:1.4;color:#64748b;margin:0 0 10px}.tthms-event-stat-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:12px 0}.tthms-event-stat-grid>div{padding:10px;border:1px solid #e5e7eb;border-radius:14px;background:#fff;text-align:left}.tthms-event-stat-grid small{display:block;color:#64748b;font-size:9px;font-weight:900;letter-spacing:.08em}.tthms-event-stat-grid b{display:block;color:#111827;font-size:14px;margin-top:3px}.tthms-event-stat-grid .danger{background:#f8fafc;border-color:#cbd5e1}.tthms-event-primary{width:100%;min-height:50px;border:1px solid #111827;border-radius:15px;background:#111827;color:#fff;font-weight:950;font-size:12px;touch-action:manipulation}
@media(max-width:430px){.tthms-landlord-card{width:calc(100vw - 18px);padding:17px 11px 12px;border-radius:20px!important}.tthms-landlord-title{font-size:20px}.tthms-landlord-reason{font-size:13px}.tthms-landlord-grid b{font-size:14px}.tthms-event-hero{height:96px;width:min(155px,42vw)}.tthms-event-stat-grid b{font-size:13px}.tthms-landlord-actions button{font-size:11px;min-height:48px}}

/* v2.8.4: compact copyable progress-code UI */
.save-game-guide-modal-box .tthms-save-method-card{margin:10px 0;padding:10px;border:2px solid #d7c3a7;border-radius:14px;background:#fffdf8;box-shadow:0 4px 14px rgba(80,55,30,.06)}
.save-game-guide-modal-box .tthms-save-method-head{font-weight:900;font-size:13px;color:#5d765f;margin-bottom:5px}
.save-game-guide-modal-box .tthms-save-method-card p{margin:5px 0 8px;font-size:10px;line-height:1.4;color:#66594d}
.save-game-guide-modal-box .tthms-progress-code-wrap{background:#f5f8f4;border:1px solid #cddbcf;border-radius:11px;padding:7px}
.save-game-guide-modal-box .tthms-progress-code-wrap textarea,.save-game-guide-modal-box .tthms-progress-paste{width:100%;box-sizing:border-box;min-height:58px;resize:none;border:1px solid #c7d0c9;border-radius:8px;background:#fff;color:#222;font-size:10px;line-height:1.35;padding:7px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace}
.save-game-guide-modal-box .tthms-progress-code-actions{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-top:6px}
.save-game-guide-modal-box .tthms-progress-code-actions button,.save-game-guide-modal-box #tthmsProgressRestore{min-height:34px;border:0;border-radius:9px;font-weight:900;cursor:pointer}
.save-game-guide-modal-box #tthmsProgressCreate{background:#5d8f68;color:#fff}
.save-game-guide-modal-box #tthmsProgressCopy{background:#e9f0ea;color:#315c3a}
.save-game-guide-modal-box .tthms-progress-paste{margin-top:8px;min-height:50px}
.save-game-guide-modal-box #tthmsProgressRestore{width:100%;margin-top:6px;background:#4e789d;color:#fff}
@media(max-width:600px){.save-game-guide-modal-box .tthms-save-method-card{padding:8px}.save-game-guide-modal-box .tthms-save-method-card p{font-size:9px}.save-game-guide-modal-box .tthms-progress-code-wrap textarea,.save-game-guide-modal-box .tthms-progress-paste{font-size:8px;min-height:52px}}


/* v15.38.2 - mandatory daily reward gate */
.tthms-daily-reward-gate{position:fixed;inset:0;z-index:2147483001;display:flex;align-items:center;justify-content:center;padding:16px;box-sizing:border-box;background:rgba(0,0,0,.62);pointer-events:auto;touch-action:none;overscroll-behavior:contain}
.tthms-daily-reward-locked{overflow:hidden!important}
.tthms-daily-reward-box{position:relative;z-index:1;display:flex;align-items:center;gap:10px;width:min(92vw,520px);padding:14px 16px;border:3px solid #d63638;border-radius:18px;background:rgba(255,255,255,.99);box-shadow:0 12px 40px rgba(0,0,0,.32);box-sizing:border-box}
.tthms-daily-reward-icon{font-size:30px;line-height:1}.tthms-daily-reward-body{display:flex;flex:1;min-width:0;flex-direction:column;gap:2px}.tthms-daily-reward-body strong{font-size:14px;color:#1d2327}.tthms-daily-reward-body span{font-size:12px;color:#646970}.tthms-daily-reward-body small{font-size:11px;color:#b32d2e;font-weight:800}.tthms-daily-reward-box button{display:inline-block;border:0;border-radius:10px;padding:10px 13px;font-weight:800;background:#d63638;color:#fff;white-space:nowrap;cursor:pointer;min-height:40px}.tthms-daily-reward-box button:disabled{opacity:.65;cursor:not-allowed}
@media(max-width:520px){.tthms-daily-reward-box{gap:8px;width:min(94vw,420px);padding:12px}.tthms-daily-reward-icon{font-size:25px}.tthms-daily-reward-body strong{font-size:12px}.tthms-daily-reward-body span{font-size:11px}.tthms-daily-reward-body small{font-size:10px}.tthms-daily-reward-box button{font-size:11px;padding:9px 10px}}

/* Tax partial-payment UI */
.tax-pay-form{display:grid;gap:8px;margin-top:12px}.tax-pay-form label{font-weight:800}.tax-pay-form input{width:100%;box-sizing:border-box;padding:12px;border:1px solid #d7c8b8;border-radius:10px;font-size:16px}.tax-pay-form small{opacity:.78}.tax-pay-result{margin-top:10px;padding:10px;border-radius:10px;background:#f7f2ea;font-weight:700}

/* v2.9.0 WORLD MAP ENTRY UI — mobile first */
.tthms-world-map-screen{position:relative;min-height:100svh;height:100svh;overflow:hidden;background:#071a32;color:#fff;font-family:inherit;isolation:isolate}
.tthms-world-map-bg{position:absolute;inset:0;background-position:center 42%;background-size:cover;filter:saturate(1.06) brightness(.86);z-index:-3}
.tthms-world-map-shade{position:absolute;inset:0;background:linear-gradient(180deg,rgba(2,11,28,.58),rgba(3,18,37,.08) 42%,rgba(2,10,25,.88) 100%);z-index:-2;pointer-events:none}
.tthms-world-map-top{position:absolute;top:max(10px,env(safe-area-inset-top));left:10px;right:10px;display:flex;justify-content:space-between;gap:8px;z-index:5}
.tthms-world-brand,.tthms-world-status{display:flex;align-items:center;gap:8px;border:1px solid rgba(255,255,255,.25);background:rgba(5,20,42,.78);backdrop-filter:blur(10px);border-radius:16px;padding:8px 10px;box-shadow:0 8px 24px rgba(0,0,0,.25)}
.tthms-world-brand>span{font-size:26px}.tthms-world-brand b{display:block;font-size:13px}.tthms-world-brand small,.tthms-world-status small{display:block;opacity:.78;font-size:10px;margin-top:2px}
.tthms-world-status{min-width:78px;justify-content:center}.tthms-world-status span{font-size:20px}.tthms-world-status b{font-size:12px}
.tthms-world-map-title{position:absolute;top:78px;left:50%;transform:translateX(-50%);text-align:center;background:rgba(0,0,0,.48);border:1px solid rgba(255,255,255,.2);border-radius:14px;padding:7px 14px;z-index:4;white-space:nowrap;backdrop-filter:blur(8px)}
.tthms-world-map-title b{display:block;font-size:17px}.tthms-world-map-title small{font-size:10px;opacity:.78}
.tthms-world-markers{position:absolute;inset:0;z-index:4;pointer-events:none}
.tthms-world-marker{position:absolute;transform:translate(-50%,-50%);z-index:4;display:flex;flex-direction:column;align-items:center;border:0;background:transparent;color:#fff;padding:0;cursor:pointer;pointer-events:auto;filter:drop-shadow(0 7px 12px rgba(0,0,0,.35))}
.tthms-world-pin-num{width:34px;height:34px;border-radius:50% 50% 50% 8px;transform:rotate(-45deg);display:grid;place-items:center;background:linear-gradient(145deg,#fff,#ffd84d);border:3px solid #fff;box-shadow:0 0 0 4px rgba(255,204,50,.22);font-size:14px;font-weight:1000;color:#271900}
.tthms-world-pin-num::first-letter{transform:rotate(45deg)}
.tthms-world-pin-shop{margin-top:-7px;padding:3px 7px;border-radius:7px;background:#d93724;border:2px solid #fff;font-size:7px;font-weight:1000;letter-spacing:.4px}
.tthms-world-pin-label{margin-top:5px;padding:5px 8px;border-radius:10px;background:rgba(4,15,30,.92);border:1px solid rgba(255,215,80,.65);font-size:10px;font-weight:800;text-align:center;box-shadow:0 5px 16px rgba(0,0,0,.25);white-space:nowrap}
.tthms-world-pin-label b{display:block}.tthms-world-pin-label small{display:block;color:#ffd94a;font-size:8px;margin-top:2px}
.tthms-world-marker.is-active .tthms-world-pin-num{box-shadow:0 0 0 5px rgba(255,216,75,.35),0 0 25px rgba(255,216,75,.75);animation:tthmsWorldPulse 1.7s infinite}
.tthms-world-pin-label small{display:block;color:#ffd94a;font-size:9px;margin-top:2px}
@keyframes tthmsWorldPulse{0%,100%{transform:scale(.75);opacity:.1}50%{transform:scale(1.15);opacity:.65}}
.tthms-world-selected{position:absolute;left:10px;right:10px;bottom:204px;display:flex;align-items:center;justify-content:center;padding:0;border:0;background:transparent;backdrop-filter:none;border-radius:0;z-index:6;box-shadow:none}
.tthms-world-selected-icon{width:43px;height:43px;border-radius:13px;display:grid;place-items:center;background:linear-gradient(145deg,#fff5a7,#ffbd37);font-size:23px;flex:none}
.tthms-world-selected-copy{min-width:0;flex:1}.tthms-world-selected-copy small{display:block;color:#ffd64c;font-size:8px;font-weight:900}.tthms-world-selected-copy b{display:block;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tthms-world-selected-copy span{display:block;font-size:10px;opacity:.82;margin-top:2px}
#tthmsWorldEnter{border:0;border-radius:12px;padding:11px 12px;background:linear-gradient(180deg,#8dff4b,#2ec72f);color:#06230b;font-weight:1000;box-shadow:0 5px 0 #17861d,0 7px 20px rgba(55,220,50,.24);white-space:nowrap;cursor:pointer}
.tthms-world-shop-list{position:absolute;left:0;right:0;bottom:0;height:190px;background:linear-gradient(180deg,rgba(3,12,25,.76),rgba(3,10,21,.98));border-top:1px solid rgba(255,255,255,.15);padding:9px 10px max(10px,env(safe-area-inset-bottom));z-index:7;box-sizing:border-box}
.tthms-world-list-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:7px}.tthms-world-list-head b{font-size:12px}.tthms-world-list-head span{font-size:9px;opacity:.65}
.tthms-world-cards{display:flex;gap:7px;overflow-x:auto;overflow-y:hidden;padding:1px 1px 7px;scroll-snap-type:x mandatory;-webkit-overflow-scrolling:touch}
.tthms-world-shop-card{flex:0 0 112px;min-height:132px;border:1px solid rgba(255,255,255,.16);border-radius:13px;background:rgba(255,255,255,.07);color:#fff;padding:7px;display:flex;flex-direction:column;align-items:flex-start;text-align:left;scroll-snap-align:start;cursor:pointer}
.tthms-world-shop-card.is-selected{border-color:#ffd84b;background:linear-gradient(180deg,rgba(255,211,70,.22),rgba(255,255,255,.08));box-shadow:0 0 0 2px rgba(255,216,75,.14)}
.tthms-world-shop-card.is-locked{opacity:.6}.tthms-world-card-num{width:22px;height:22px;border-radius:7px;display:grid;place-items:center;background:#ffd94a;color:#2a1a00;font-size:11px;font-weight:1000}.tthms-world-card-icon{font-size:25px;margin:4px 0}.tthms-world-card-name{font-size:10px;font-weight:900;line-height:1.15}.tthms-world-card-place{font-size:8px;opacity:.72;margin-top:3px;line-height:1.2}
@media(min-width:700px){
 .tthms-world-map-title{top:90px}.tthms-world-selected{bottom:235px;left:5%;right:5%}.tthms-world-shop-list{height:220px}.tthms-world-shop-card{flex-basis:145px}.tthms-world-map-top{left:5%;right:5%}
}
@media(max-width:380px){
 .tthms-world-selected{bottom:196px;padding:7px}.tthms-world-selected-icon{width:36px;height:36px;font-size:19px}#tthmsWorldEnter{padding:9px 8px;font-size:11px}.tthms-world-shop-list{height:184px}.tthms-world-shop-card{flex-basis:102px;min-height:127px}
}

/* v2.9.4 WORLD MAP: compact financial header, no gem/diamond box. */
.tthms-world-status{min-width:120px;max-width:48vw;justify-content:center;text-align:center}.tthms-world-status b{font-size:12px;white-space:nowrap}.tthms-world-status small{font-size:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@media(max-width:520px){.tthms-world-status{min-width:112px;padding:7px 9px}.tthms-world-status b{font-size:11px}.tthms-world-status small{font-size:8px}}

/* v2.9.5: region-specific shop thumbnails; map layout/background unchanged. */
.tthms-world-card-image{width:100%;height:62px;object-fit:cover;border-radius:9px;margin:4px 0 5px;border:1px solid rgba(255,255,255,.18);display:block;background:#17304b}.tthms-world-card-icon{display:none}.tthms-world-map-title{display:none!important}

/* v2.9.6: entry area only shows the VÀO GAME button; store selection remains in the cards below the map. */
.tthms-world-selected-icon,.tthms-world-selected-copy{display:none!important}

/* v2.9.7 – chain stores use the same shelf-management language as the main store */
.ms-chain-store-hero{position:relative;margin:8px 0 12px;border-radius:16px;overflow:hidden;border:1px solid rgba(255,255,255,.16);background:#10233a;min-height:116px;box-shadow:0 8px 24px rgba(0,0,0,.14)}
.ms-chain-store-hero img{width:100%;height:116px;display:block;object-fit:cover}
.ms-chain-store-hero-overlay{position:absolute;inset:auto 0 0;padding:28px 12px 10px;background:linear-gradient(180deg,transparent,rgba(0,0,0,.82));color:#fff}
.ms-chain-store-hero-overlay b{display:block;font-size:15px}.ms-chain-store-hero-overlay small{display:block;font-size:10px;opacity:.86;margin-top:2px}
.ms-shelf-manager{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px;border-radius:14px;background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.1)}
.ms-shelf-stats{display:flex;flex-direction:column;gap:3px;min-width:0}.ms-shelf-stats b{font-size:20px}.ms-shelf-stats span{font-size:11px}.ms-shelf-stats small{font-size:9px;opacity:.7}
.ms-shelf-actions{display:flex;justify-content:flex-end;min-width:145px}.ms-shelf-actions .ms-primary-action{font-size:10px;padding:10px 9px;line-height:1.2}
.ms-shelf-max{font-size:10px;font-weight:900;padding:10px;border-radius:10px;background:rgba(255,215,75,.16);color:#ffd84b}
.ms-shelf-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin-top:9px}.ms-shelf-slot,.ms-shelf-more{border:1px solid rgba(255,255,255,.1);border-radius:10px;padding:8px;background:rgba(255,255,255,.04);font-size:9px}.ms-shelf-slot b{display:block;font-size:10px}.ms-shelf-slot span{display:block;margin-top:3px;opacity:.72}.ms-shelf-more{display:grid;place-items:center;min-height:42px;opacity:.65}
@media(max-width:520px){.ms-shelf-manager{align-items:stretch;flex-direction:column}.ms-shelf-actions{min-width:0}.ms-shelf-actions .ms-primary-action{width:100%}.ms-shelf-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.ms-chain-store-hero,.ms-chain-store-hero img{min-height:100px;height:100px}}


/* v2.10.2 mobile performance pass: visual-only containment.
 * Keeps the existing game rules/UI while reducing repaint and compositing cost
 * on iPhone/Android. No gameplay state or financial logic is affected. */
/* v15.40.0 mobile modal positioning fix:
 * Do NOT apply layout/paint containment to the ancestor of fixed overlays.
 * #modal and other fixed gates must be positioned against the real viewport. */
.tthms{contain:none!important;}
.game-stage{contain:layout paint;}
.scene{contain:layout paint;}
.product-trays{contain:layout paint;}
.queue{contain:layout paint;}
.game-controls-footer,.game-bottom{contain:layout paint;}
.payment-bag{contain:layout paint;}
@media (max-width:520px){
  .modal.show{backdrop-filter:none!important;}
  .tthms-world-brand,.tthms-world-status,.tthms-world-map-title{backdrop-filter:none!important;}
  .auth-box{backdrop-filter:none;}
  .scene{box-shadow:none;}
  .avatar-bubble,.customer-dialog,.queue-card,.tray,.store-tools button{box-shadow:0 2px 5px #0002;}
}
@media (prefers-reduced-motion:reduce){
  .payment-bag,.ms-money-float,.sale-money-toast,.tthms-result-glow,.tthms-world-marker.is-active .tthms-world-pin-num{animation:none!important;transition:none!important;}
}

/* v3 performance layer: visual-only mobile GPU/paint reduction. No game-state logic. */
@media (max-width: 600px){
  .modal{backdrop-filter:none!important;-webkit-backdrop-filter:none!important;background:#21140dd9!important}
  .auth-box{backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
  .ui-viral-box button,.mobile-icon-box{transition:none!important}
  .ui-viral-box .utility-modal-grid button:hover{filter:none!important;box-shadow:0 5px 12px rgba(65,30,10,.06)!important}
  .scene{box-shadow:none!important}
  .game-top-main,.customer-dialog,.avatar-bubble,.guide,.counter-board,.tray,.queue-card,.status-pill,.mobile-icon-box,.shelf-control,.game-bottom{box-shadow:none!important}
  .tthms{box-shadow:none!important}
  .gold-bars span,.tray .tray-icon{filter:none!important}
}
/* Decode images off the main rendering path where supported. */
img{image-rendering:auto;}

/* Reward box close controls: closing never claims or changes financial state. */
.tthms-reward-6h-box,.tthms-daily-reward-box{position:relative}
.tthms-reward-6h-close,.tthms-daily-reward-close{position:absolute!important;top:6px;right:7px;z-index:5;width:30px!important;height:30px!important;min-height:30px!important;padding:0!important;border:0!important;border-radius:50%!important;background:transparent!important;color:#555!important;font-size:24px!important;line-height:28px!important;font-weight:700!important;cursor:pointer!important;box-shadow:none!important}
.tthms-reward-6h-close:hover,.tthms-daily-reward-close:hover{background:rgba(0,0,0,.08)!important;color:#111!important}
.tthms-reward-6h-box{padding-top:20px!important}
.tthms-daily-reward-box{padding-top:20px!important}

/* Mobile render guard: keep frequent shelf quantity updates isolated from the rest of the page. */
.product-trays,.tray,.queue-card{contain:layout paint;backface-visibility:hidden;}

/* v15.39.0: STABLE MOBILE GAME FRAME
 * Giữ vùng chơi có kích thước ổn định khi mở/đóng cửa, thêm khách chờ,
 * đổi cửa tiệm hoặc render lại. Không để aspect-ratio/content làm khung nhảy.
 */
#tthms-app{width:100%;max-width:100%;overflow-x:hidden;}
#tthms-app>.tthms{width:100%;max-width:760px;margin:0 auto;}
@media(max-width:600px){
  #tthms-app{min-height:100%;}
  #tthms-app>.tthms{min-height:100%;}
  #tthms-app>.tthms .game-stage{
    min-height:0;
    height:clamp(520px,142vw,680px);
    max-height:680px;
    overflow:hidden;
    padding:0 8px 8px;
    box-sizing:border-box;
  }
  #tthms-app>.tthms .scene{
    width:100%;
    height:100%;
    min-height:0;
    max-height:none;
    aspect-ratio:auto;
    overflow:hidden;
  }
  #tthms-app>.tthms .counter{top:33%;bottom:24%;}
  #tthms-app>.tthms .product-trays{top:30%;bottom:0;}
  #tthms-app>.tthms .queue{min-height:52px;max-height:22%;overflow:hidden;}
  #tthms-app>.tthms .vehicle-parking{max-height:10%;}
}


/* v15.39.1: final mobile frame lock. The game scene no longer follows browser dvh changes.
 * This is presentation-only and does not touch game state, money, inventory or timers.
 */
@media(max-width:600px){
  #tthms-app>.tthms .game-stage{
    height:clamp(520px,142vw,680px)!important;
    min-height:clamp(520px,142vw,680px)!important;
    max-height:680px!important;
    contain:layout paint size!important;
    overflow:hidden!important;
  }
  #tthms-app>.tthms .scene{
    height:100%!important;
    min-height:0!important;
    max-height:none!important;
    aspect-ratio:auto!important;
    contain:layout paint size!important;
  }
  #tthms-app>.tthms .hud-bubbles,
  #tthms-app>.tthms .queue,
  #tthms-app>.tthms .customer-dialog{
    contain:layout paint;
  }
}

/* v15.39.1 - REWARD BOX CENTER LOCK
 * Luôn neo 2 box thưởng chính giữa viewport, đặc biệt trên iOS/Android.
 * Chỉ thay đổi vị trí/kích thước hiển thị; không thay đổi logic nhận thưởng.
 */
.tthms-reward-6h-gate,
.tthms-daily-reward-gate{
  position:fixed!important;
  left:0!important;
  right:0!important;
  top:0!important;
  bottom:0!important;
  width:100%!important;
  height:100%!important;
  min-height:100vh!important;
  min-height:100svh!important;
  min-height:100dvh!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  place-items:center!important;
  padding:calc(12px + env(safe-area-inset-top)) calc(12px + env(safe-area-inset-right)) calc(12px + env(safe-area-inset-bottom)) calc(12px + env(safe-area-inset-left))!important;
  box-sizing:border-box!important;
  overflow:auto!important;
}
.tthms-reward-6h-box,
.tthms-daily-reward-box{
  position:relative!important;
  inset:auto!important;
  margin:auto!important;
  flex:0 1 auto!important;
  max-height:calc(100dvh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom))!important;
  overflow:auto!important;
  transform:none!important;
}
@media(max-width:520px){
  .tthms-reward-6h-gate,
  .tthms-daily-reward-gate{
    padding:calc(10px + env(safe-area-inset-top)) calc(10px + env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) calc(10px + env(safe-area-inset-left))!important;
  }
  .tthms-reward-6h-box,
  .tthms-daily-reward-box{
    width:min(94vw,420px)!important;
    max-width:94vw!important;
  }
}


/* v15.40.1 — iOS/Android PAYMENT VIEWPORT STABILITY
 * Root cause fixed:
 *  1) payment modal used 100vh + later 100dvh, which changes when Safari's
 *     address/tool bars expand/collapse;
 *  2) opening payment toggled overflow:hidden on html/body, which can cause
 *     iOS Safari to re-anchor/restore the page scroll position;
 *  3) payment completion replaces queue/dialog DOM and can trigger scroll
 *     anchoring.
 *
 * This block is presentation-only. It does not touch money, inventory,
 * customer orders, or payment logic.
 */
@media(max-width:900px){
  html,body{
    overflow-anchor:none!important;
  }
  #tthms-app,
  #tthms-app>.tthms,
  #tthms-app .game-stage,
  #tthms-app .scene,
  #tthms-app .customer-dialog-slot,
  #tthms-app .queue{
    overflow-anchor:none!important;
  }

  /* Keep the payment overlay tied to the stable small viewport.
     svh does not resize when Safari's URL bar animates. */
  .modal.payment-modal{
    position:fixed!important;
    inset:0!important;
    width:100vw!important;
    height:100svh!important;
    min-height:100svh!important;
    max-height:100svh!important;
    padding:8px!important;
    margin:0!important;
    align-items:center!important;
    justify-content:center!important;
    overflow:hidden!important;
    overscroll-behavior:none!important;
    touch-action:none!important;
  }

  .modal.payment-modal .payment-check-box{
    width:min(calc(100vw - 16px),720px)!important;
    max-width:720px!important;
    max-height:calc(100svh - 16px)!important;
    height:auto!important;
    margin:0 auto!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    overscroll-behavior:contain!important;
    -webkit-overflow-scrolling:touch!important;
    transform:none!important;
  }

  /* Do not hide the document itself while payment is open.
     The fixed modal already captures the interaction. On iOS, toggling
     document overflow is a common source of vertical scroll jumps. */
  html.tthms-payment-lock,
  body.tthms-payment-lock{
    overflow-x:hidden!important;
    overflow-y:auto!important;
    touch-action:auto!important;
    position:static!important;
    width:auto!important;
  }
}

/* Fallback for older browsers without svh. */
@supports not (height:100svh){
  @media(max-width:900px){
    .modal.payment-modal{
      height:100vh!important;
      min-height:100vh!important;
      max-height:100vh!important;
    }
    .modal.payment-modal .payment-check-box{
      max-height:calc(100vh - 16px)!important;
    }
  }
}


/* v2.8.30 — mobile-first hybrid 2D/2.5D shop presentation. Pure CSS, no WebGL or extra network requests. */
.tthms-view-toggle{
  position:absolute;right:8px;top:43px;z-index:25;border:1px solid #80563d;
  border-radius:999px;padding:6px 10px;background:linear-gradient(180deg,#fff8df,#f3c77b);
  color:#55341f;font-weight:900;font-size:10px;line-height:1.2;box-shadow:0 3px 0 #9c6846,0 5px 10px #0002;
  touch-action:manipulation;cursor:pointer;-webkit-tap-highlight-color:transparent
}
.tthms-view-toggle:active{transform:translateY(2px);box-shadow:0 1px 0 #9c6846}
.scene{isolation:isolate}
.scene.tthms-scene-3d{
  perspective:1000px;
  background-image:linear-gradient(180deg,#d6edff33 0%,#ffe8c533 48%,#d0a47a44 100%),var(--tthms-custom-game-bg, url('../images/tiem-tap-hoa-portrait-bg.jpg'));
  background-size:cover;background-position:center
}
.scene.tthms-scene-3d:before{
  content:"";position:absolute;left:-8%;right:-8%;top:43%;bottom:-8%;z-index:0;pointer-events:none;
  background-color:#d6b38a;
  background-image:linear-gradient(30deg,#ffffff20 12%,transparent 12.5%,transparent 87%,#ffffff20 87.5%,#ffffff20),
    linear-gradient(150deg,#ffffff20 12%,transparent 12.5%,transparent 87%,#ffffff20 87.5%,#ffffff20),
    linear-gradient(30deg,#ffffff20 12%,transparent 12.5%,transparent 87%,#ffffff20 87.5%,#ffffff20),
    linear-gradient(150deg,#ffffff20 12%,transparent 12.5%,transparent 87%,#ffffff20 87.5%,#ffffff20);
  background-size:44px 76px;background-position:0 0,0 0,22px 38px,22px 38px;
  opacity:.42;transform:perspective(500px) rotateX(7deg);transform-origin:top center
}
.scene.tthms-scene-3d .counter{
  transform:perspective(900px) rotateX(2deg);transform-origin:center top;
  filter:drop-shadow(0 10px 5px #59391f30)
}
.scene.tthms-scene-3d .counter-board{
  background:linear-gradient(180deg,#f9e5bd 0%,#e8b77e 76%,#b87951 77%,#9b6244 100%);
  border-color:#805033;box-shadow:0 7px 0 #855337,0 12px 15px #3f2a1b30
}
.scene.tthms-scene-3d .product-trays{transform:perspective(850px) rotateX(4deg);transform-origin:center top}
.scene.tthms-scene-3d .tray{
  border-color:#76543a;border-radius:7px 7px 4px 4px;
  background:linear-gradient(145deg,#fffdf5 0%,#f6dfb8 78%,#d7ad7b 100%);
  box-shadow:inset 0 2px 0 #fff9,0 4px 0 #9a704d,0 7px 7px #422b1b25
}
.scene.tthms-scene-3d .tray.has-stock:after{
  content:"";position:absolute;left:0;right:0;bottom:0;height:5px;
  background:linear-gradient(90deg,#b77d4f,#f1d2a2,#b77d4f);opacity:.9;pointer-events:none
}
.scene.tthms-scene-3d .awning{filter:drop-shadow(0 5px 3px #59391f40);border-bottom-color:#8d4f42}
.scene.tthms-scene-3d .avatar-bubble,.scene.tthms-scene-3d .customer-dialog,
.scene.tthms-scene-3d .queue-card{box-shadow:0 5px 0 #6b45272a,0 8px 12px #0002}
.scene.tthms-scene-3d .status-pill{box-shadow:0 3px 0 #0002}
@media(max-width:480px){
 .tthms-view-toggle{top:42px;right:7px;padding:5px 8px;font-size:9px}
 .scene.tthms-scene-3d .counter{filter:drop-shadow(0 6px 3px #59391f24)}
}
@media(prefers-reduced-motion:reduce){
 .tthms-view-toggle,.scene.tthms-scene-3d *{scroll-behavior:auto!important;transition:none!important;animation-duration:.001ms!important}
}
