/* Mật Mã Tiệm Mật — isolated PWA mini-game, no checkout styles changed. */
.tm-mystery-launch{display:flex;align-items:center;gap:13px;width:calc(100% - 28px);margin:15px 14px 14px;padding:15px 16px;border:0;border-radius:19px;color:#fff;text-align:left;background:radial-gradient(circle at 95% 6%,#92556d 0,#51334f 36%,#2d1b38 100%);box-shadow:0 11px 22px #30203a30;cursor:pointer;position:relative;overflow:hidden}
.tm-mystery-launch:after{content:"✧";position:absolute;color:#f4c77e;opacity:.34;font-size:67px;right:46px;top:-22px;pointer-events:none}
.tm-mystery-launch-icon{width:48px;height:48px;flex:0 0 48px;display:grid;place-items:center;border:1px solid #f9d5a166;background:#ffffff19;border-radius:15px;font-size:23px}
.tm-mystery-launch-copy{min-width:0;display:flex;flex:1;flex-direction:column;gap:4px;z-index:1}
.tm-mystery-launch-copy strong{font-size:15px;font-weight:900;color:#fff}
.tm-mystery-launch-copy small{font-size:11px;line-height:1.45;color:#f1d7df}
.tm-mystery-launch-arrow{font-size:25px;color:#ffe0a1;z-index:1}
.tm-mystery-popup-cta{display:block;width:100%;margin-top:9px;border:1px solid #f8dca2!important;border-radius:14px!important;background:#4c2b50!important;color:#fff9e9!important;padding:11px 14px!important;font-size:12px!important;line-height:1.35;font-weight:850!important;cursor:pointer;box-shadow:0 5px 18px #22182b55}
.tm-mystery-popup-cta-seasonal{margin-top:10px;background:linear-gradient(115deg,#472747,#78516a)!important}
.tm-mystery-fab[hidden]{display:none!important}
.tm-mystery-fab{position:absolute;z-index:940;right:13px;bottom:calc(var(--tm-footer-nav-h, 68px) + env(safe-area-inset-bottom, 0px) + 95px);display:block;width:74px;height:74px;padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;cursor:pointer;transform-origin:50% 85%;animation:tmMysteryFabWiggle 5s ease-in-out infinite}
.tm-mystery-fab:focus-visible{outline:3px solid #9c4c76;outline-offset:3px}
.tm-mystery-fab img{display:block;width:100%;height:100%;max-width:100%;border:0;border-radius:0;object-fit:contain;filter:drop-shadow(0 5px 7px #331b3940);pointer-events:none}
@keyframes tmMysteryFabWiggle{0%,78%,100%{transform:rotate(0deg)}81%{transform:rotate(-6deg)}84%{transform:rotate(6deg)}87%{transform:rotate(-4deg)}90%{transform:rotate(3deg)}93%{transform:rotate(0deg)}}
.tm-mystery-wallet-link{display:flex;align-items:center;gap:11px;width:100%;padding:13px 15px;margin:10px 0 13px;border:1px solid #edd8e2;border-radius:15px;background:#fff7f8;color:#593a51;text-align:left;cursor:pointer}
.tm-mystery-wallet-link>span:first-child{font-size:24px}.tm-mystery-wallet-link>span:nth-child(2){display:flex;flex-direction:column;gap:3px;flex:1}
.tm-mystery-wallet-link strong{font-size:12px}.tm-mystery-wallet-link small{color:#9a7389;font-size:10px}
.tm-mystery-wallet-link>span:last-child{font-size:22px}
.tm-mystery-modal[hidden]{display:none!important}
.tm-mystery-modal{position:fixed;inset:0;z-index:1000000;background:#190e1cca;backdrop-filter:blur(7px);display:flex;align-items:center;justify-content:center;padding:12px;font-family:inherit}
.tm-mystery-modal *{box-sizing:border-box}
.tm-mystery-dialog{width:min(100%,450px);height:min(820px,94dvh);max-height:94vh;display:flex;flex-direction:column;overflow:hidden;border-radius:27px;background:#fffaf4;box-shadow:0 25px 75px #110e143d;color:#3c263b}
.tm-mystery-modal-header{flex:0 0 auto;display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:20px 20px 18px;background:radial-gradient(circle at 91% 20%,#784562,#4b2c4e 48%,#291934);color:#fff}
.tm-mystery-modal-header span{color:#f5d09a;font-size:10px;font-weight:900;letter-spacing:1.6px}
.tm-mystery-modal-header h2{font-family:Georgia,serif;color:#fff!important;font-size:29px!important;line-height:1.12!important;font-weight:500;margin:8px 0 0!important}
.tm-mystery-close{background:#ffffff24!important;border:1px solid #ffffff55!important;border-radius:10px!important;width:37px;height:37px;display:grid;place-items:center;color:#fff!important;cursor:pointer}
.tm-mystery-progress{display:flex;gap:6px;align-items:center;padding:13px 20px;background:#fff9f1;border-bottom:1px solid #f0e2d7}
.tm-mystery-progress span{height:6px;border-radius:10px;background:#e8dcd7;flex:1}
.tm-mystery-progress span.complete{background:#704364}.tm-mystery-progress span.current{background:#dfa179}
.tm-mystery-progress b{margin-left:5px;font-size:10px;color:#8b7181}
.tm-mystery-content{overflow-y:auto;flex:1;padding:18px 20px 28px;overscroll-behavior:contain}
.tm-mystery-tag{display:inline-block;color:#a26659;font-size:10px;letter-spacing:1.5px;font-weight:900}
.tm-mystery-content h3{font-size:22px!important;line-height:1.2!important;color:#38263a!important;letter-spacing:-.5px;margin:9px 0 12px!important}
.tm-mystery-content p{color:#816c7a;font-size:13px;line-height:1.7;margin:8px 0 15px}
.tm-mystery-riddle{font-family:Georgia,serif;color:#643d53;font-size:18px;line-height:1.53;margin:13px 0 16px;background:#f8ede1;border:1px solid #e9d5c6;border-radius:16px;padding:17px}
.tm-mystery-answers{display:grid;gap:9px}.tm-mystery-choice{display:block;width:100%;text-align:left;padding:12px 14px;border:1px solid #e8d7dc;background:#fff;border-radius:13px;color:#563b51;font-weight:700;font-size:13px;cursor:pointer}
.tm-mystery-choice[aria-pressed=true]{border-color:#9c5878;background:#f9e9ed;color:#683c56}
.tm-mystery-input{display:block;width:100%;height:46px!important;border:1px solid #d9c6d2!important;border-radius:12px!important;background:#fff!important;padding:12px!important;color:#40303e!important;font-size:14px!important}
.tm-mystery-primary{display:block;margin-top:14px;width:100%;border:0!important;border-radius:13px!important;padding:13px 15px!important;background:#3f2744!important;color:#fff!important;font-size:13px!important;font-weight:850!important;cursor:pointer}
.tm-mystery-primary:disabled{opacity:.5;cursor:not-allowed}
.tm-mystery-secondary{display:block;margin-top:9px;width:100%;border:1px solid #e3d4dc!important;border-radius:13px!important;padding:11px 15px!important;background:#fff7f4!important;color:#663e56!important;font-size:12px!important;font-weight:800!important;cursor:pointer}
.tm-mystery-message{margin-top:12px;font-size:12px;line-height:1.6;padding:11px 12px;border-radius:12px;background:#e8f4ed;color:#2c7451}
.tm-mystery-message.error{background:#fff0ed;color:#a94d58}
.tm-mystery-clues{display:grid;gap:7px;margin:13px 0}.tm-mystery-clue{background:#f8ede9;border:1px solid #f0e0dd;border-radius:11px;padding:10px 12px;color:#81586c;font-size:12px;line-height:1.5}
.tm-mystery-clue b{color:#a76f54}
.tm-mystery-prize{margin:16px 0;padding:21px 16px;border:1.5px dashed #cfaa7f;border-radius:17px;background:linear-gradient(135deg,#fff9e8,#f7e5cb);text-align:center}
.tm-mystery-prize .icon{font-size:47px}.tm-mystery-prize h3{font-size:20px!important;margin:9px 0!important}
.tm-mystery-prize strong{display:block;margin:14px 0 9px;padding:11px;border-radius:10px;background:#fff;letter-spacing:1.1px;font-size:13px;overflow-wrap:anywhere}
.tm-mystery-prize small{display:block;color:#9a7a78;font-size:11px;line-height:1.6}
.tm-mystery-status{display:inline-block;padding:5px 10px;border-radius:20px;background:#fff;color:#866a54;font-size:10px;font-weight:850}
.tm-mystery-status.used{background:#e7e5e5;color:#757575}.tm-mystery-status.ready{background:#dbf4e5;color:#23764b}
.tm-mystery-intro-art{margin:15px 0;border-radius:16px;min-height:108px;background:radial-gradient(circle at 68% 42%,#d9a885,#f3dcca 48%,#f8eee4);display:grid;place-items:center;color:#604059;font-size:46px}
.tm-mystery-bottom{flex:0 0 58px;background:#fff;border-top:1px solid #f0e4e2;display:flex;align-items:stretch}
.tm-mystery-bottom button{flex:1;border:0;background:transparent;color:#9b8390;font-size:12px;font-weight:800;cursor:pointer}
.tm-mystery-bottom button.active{color:#5e315a;border-top:3px solid #a86484}
.tm-mystery-fine{font-size:11px;color:#a48a94;margin:12px 0;line-height:1.6}
@media(max-width:520px){.tm-mystery-modal{padding:0;align-items:flex-end}.tm-mystery-dialog{height:96dvh;max-height:96dvh;border-radius:23px 23px 0 0;width:100%}.tm-mystery-launch{margin:10px 9px;width:calc(100% - 18px)}}
@media(prefers-reduced-motion:reduce){.tm-mystery-modal{backdrop-filter:none}.tm-mystery-fab{animation:none}}

/* 2026 refresh — playful, compact, high-contrast mobile puzzle experience. */
.tm-mystery-modal{background:#16102cbd;backdrop-filter:blur(13px);padding:18px}
.tm-mystery-dialog{position:relative;width:min(100%,474px);height:min(780px,94dvh);max-height:94dvh;border:1px solid #ffffff9e;border-radius:32px;background:#fcfaff;color:#302345;box-shadow:0 28px 90px #180e2a70,0 0 0 7px #ffffff12}
.tm-mystery-modal-header{position:relative;overflow:hidden;align-items:center;padding:22px 76px 19px 24px;background:linear-gradient(120deg,#33205f 0%,#6743a0 65%,#b361a6 100%);isolation:isolate}
.tm-mystery-modal-header:before,.tm-mystery-modal-header:after{content:"";position:absolute;border:1px solid #ffffff21;border-radius:50%;pointer-events:none;z-index:-1}
.tm-mystery-modal-header:before{width:170px;height:170px;right:-58px;top:-107px;background:#ffb6dd22}
.tm-mystery-modal-header:after{width:110px;height:110px;right:80px;bottom:-85px;background:#ae8dff36}
.tm-mystery-modal-header span{color:#ffe7a8;font:800 9px/1.4 ui-sans-serif,system-ui,sans-serif;letter-spacing:1.6px}
.tm-mystery-modal-header h2{font:900 24px/1.15 ui-sans-serif,system-ui,-apple-system,sans-serif!important;letter-spacing:-.75px;margin:5px 0 0!important;text-shadow:0 2px 10px #210c3640}
.tm-mystery-close{position:absolute;top:14px;right:16px;display:grid;place-items:center;width:43px!important;min-width:43px;height:43px;padding:0!important;border:1.5px solid #ffffff85!important;border-radius:50%!important;background:#ffffff35!important;color:#fff!important;font-size:21px!important;font-weight:900;box-shadow:0 5px 14px #1b0e3533;cursor:pointer;transition:background .2s,transform .2s}
.tm-mystery-close:hover{background:#ffffff3d!important}
.tm-mystery-close:focus-visible{outline:3px solid #ffe3b4;outline-offset:3px}
.tm-mystery-progress{display:block;flex:0 0 auto;padding:13px 22px 15px;background:#fff;border-bottom:1px solid #f0e9f8}
.tm-mystery-progress-caption{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:9px}
.tm-mystery-progress-caption span{flex:initial;height:auto;background:transparent;border-radius:0;font-size:10px;color:#9778af;font-weight:900;letter-spacing:1px}
.tm-mystery-progress-caption strong{font-size:12px;color:#7c4dc6;font-weight:900}
.tm-mystery-progress-bars{display:flex;align-items:center;gap:7px}
.tm-mystery-progress-bars span{height:7px;flex:1;border-radius:8px;background:#eee7f3;transition:background .35s ease}
.tm-mystery-progress-bars span.complete{background:linear-gradient(90deg,#f36c9c,#ac69dd)}
.tm-mystery-progress-bars span.current{background:linear-gradient(90deg,#aa78ee,#7860d8);box-shadow:0 0 0 3px #b783e521}
.tm-mystery-content{padding:23px 23px 30px;scrollbar-width:thin;scrollbar-color:#e0cde9 transparent;background:linear-gradient(180deg,#fdfbff 0%,#fff 70%)}
.tm-mystery-tag{display:inline-flex;align-items:center;gap:5px;padding:7px 11px;border-radius:50px;background:#f4ebff;color:#8d59c5;font:900 10px/1.3 ui-sans-serif,system-ui,sans-serif;letter-spacing:1.05px}
.tm-mystery-content h3{font:900 25px/1.2 ui-sans-serif,system-ui,-apple-system,sans-serif!important;letter-spacing:-.8px!important;color:#2b2046!important;margin:13px 0!important}
.tm-mystery-content p{color:#81768f;font-size:13px;line-height:1.6}
.tm-mystery-puzzle-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:13px}
.tm-mystery-stage-number{font-size:30px;font-weight:950;letter-spacing:-1.5px;color:#c1a4e3;line-height:1}
.tm-mystery-stage-number small{font-size:12px;color:#a89abb;letter-spacing:0}
.tm-mystery-puzzle-card{position:relative;overflow:hidden;padding:22px 20px 20px;border-radius:24px;background:linear-gradient(132deg,#fff0f7 0%,#f0ebff 84%);border:1px solid #f2ddf5;box-shadow:0 12px 30px #965bc414}
.tm-mystery-puzzle-card:after{content:"";position:absolute;width:118px;height:118px;border-radius:50%;right:-50px;top:-53px;background:#ffffff85;pointer-events:none}
.tm-mystery-card-symbol{display:grid;place-items:center;font-size:26px;width:52px;height:52px;border-radius:17px;background:#fff;box-shadow:0 8px 17px #9474bc25;transform:rotate(-5deg)}
.tm-mystery-puzzle-card h3{font-size:23px!important;margin:16px 0 9px!important}
.tm-mystery-riddle{font-family:inherit;font-size:16px!important;line-height:1.6!important;margin:0!important;padding:0!important;color:#524266!important;background:none!important;border:0!important;font-weight:560}
.tm-mystery-answer-label{font-size:10px;font-weight:900;letter-spacing:1.2px;color:#9378ac;margin:22px 0 10px}
.tm-mystery-answers{gap:10px}
.tm-mystery-choice{display:flex;align-items:center;gap:12px;text-align:left;min-height:58px;padding:9px 13px;border:1.5px solid #eee5f4;border-radius:17px;background:#fff;color:#55466f;font-size:14px;font-weight:740;box-shadow:0 4px 13px #31175108;transition:transform .18s,border-color .18s,box-shadow .18s,background .18s}
.tm-mystery-choice:hover{transform:translateY(-1px);border-color:#c69ff0}
.tm-mystery-choice-letter{width:35px;height:35px;border-radius:12px;background:#f3edfa;display:grid;place-items:center;flex-shrink:0;color:#8663b3;font-weight:950}
.tm-mystery-choice>span:nth-child(2){flex:1}
.tm-mystery-choice-check{opacity:0;width:23px;height:23px;border-radius:50%;display:grid;place-items:center;background:#9659cf;color:#fff;font-size:13px}
.tm-mystery-choice[aria-pressed=true]{border-color:#a776e8;background:#f7f1ff;color:#5b2e93;box-shadow:0 7px 18px #9e62da22}
.tm-mystery-choice[aria-pressed=true] .tm-mystery-choice-letter{background:#8750c3;color:#fff}
.tm-mystery-choice[aria-pressed=true] .tm-mystery-choice-check{opacity:1}
.tm-mystery-input{height:54px!important;border:1.5px solid #e5d7f2!important;border-radius:16px!important;padding:13px 16px!important;font:650 15px/1.2 ui-sans-serif,system-ui,sans-serif!important;color:#3f295b!important;box-shadow:0 4px 15px #9e62da0c}
.tm-mystery-input:focus{outline:3px solid #bf91f13b!important;border-color:#9561d9!important}
.tm-mystery-primary{display:flex;align-items:center;justify-content:center;gap:15px;margin-top:18px;min-height:52px;padding:14px 17px!important;border:0!important;border-radius:17px!important;background:linear-gradient(105deg,#ef619e 0%,#b456d0 50%,#785add 100%)!important;color:#fff!important;font-size:14px!important;font-weight:900!important;box-shadow:0 10px 22px #ac5ac13e;transition:transform .18s,filter .18s}
.tm-mystery-primary span{font-size:20px}
.tm-mystery-primary:not(:disabled):hover{transform:translateY(-1px);filter:saturate(1.12)}
.tm-mystery-primary:disabled{opacity:.45;box-shadow:none;transform:none}
.tm-mystery-secondary{padding:13px 15px!important;border:1.5px solid #e3d8f2!important;border-radius:16px!important;background:#faf7ff!important;color:#674596!important;font-size:13px!important;font-weight:850!important}
.tm-mystery-message{background:#e6f8f1;color:#227a59;border:1px solid #bdeed8;border-radius:13px;padding:11px 13px}
.tm-mystery-message.error{background:#fff0f4;color:#c54570;border-color:#ffd1df}
.tm-mystery-clues{display:grid;gap:8px;margin:18px 0}
.tm-mystery-clue{border:1px solid #eadffa;border-radius:14px;background:#faf6ff;padding:11px 13px;color:#74628c;font-size:12px}
.tm-mystery-clue b{color:#9956c4}
.tm-mystery-attempts{margin:12px 0;padding:9px 12px;background:#fff7e9;color:#956743;border-radius:11px;font-size:12px}
.tm-mystery-saved-note{text-align:center;font-size:11px!important;color:#a399af!important;margin-top:15px!important}
.tm-mystery-bottom{height:64px;flex:0 0 64px;background:#fff;border-top:1px solid #efe8f5;padding:7px 9px;gap:4px}
.tm-mystery-bottom button{display:flex;gap:5px;align-items:center;justify-content:center;flex:1;border:0!important;border-radius:13px;background:transparent!important;color:#9c8baa!important;font-size:12px;font-weight:850;transition:background .15s}
.tm-mystery-bottom button.active{background:#f2eafb!important;color:#7b4bc1!important;border-top:0!important}
.tm-mystery-bottom .tm-mystery-nav-menu{color:#725984!important}
.tm-mystery-loading{padding:60px 14px;text-align:center;font-weight:850;color:#8b66b0}
.tm-mystery-closed{text-align:center;padding:32px 12px}.tm-mystery-closed-emoji{font-size:66px;margin:6px 0 18px}
.tm-mystery-is-winner .tm-mystery-content{background:radial-gradient(circle at 50% 0,#fff0f7 0,#fff 58%)}
.tm-mystery-victory{text-align:center;position:relative;isolation:isolate;animation:tmMysterySuccessUp .6s both}
.tm-mystery-victory-badge{display:inline-block;background:#fff1cf;color:#a66a22;border-radius:99px;padding:9px 14px;font-size:10px;font-weight:950;letter-spacing:.5px;box-shadow:0 5px 18px #fecb7821}
.tm-mystery-victory>h3{font-size:30px!important;margin:15px 0 6px!important;background:linear-gradient(105deg,#ef5d95,#744ed4);color:transparent!important;background-clip:text;-webkit-background-clip:text}
.tm-mystery-victory>p{max-width:320px;margin:0 auto 13px;font-size:13px}
.tm-mystery-prize{position:relative;margin:18px 0;padding:16px 15px 17px;border:1px solid #edd4f8;border-radius:25px;background:linear-gradient(140deg,#ffffff,#f9f1ff);text-align:center;box-shadow:0 12px 36px #8d52cd1a;overflow:hidden}
.tm-mystery-prize:before{content:"✧";position:absolute;top:14px;left:20px;font-size:25px;color:#f3a5cb}
.tm-mystery-reward-photo{display:block;width:100%;height:195px;object-fit:cover;border-radius:17px;margin:0 auto 13px;background:#f3e8fb;box-shadow:0 7px 16px #573d8520}
.tm-mystery-reward-illustration{position:relative;display:grid;place-items:center;height:150px;background:radial-gradient(circle at 50% 45%,#ffdef2 0,#efe3ff 72%);border-radius:17px;font-size:90px;margin-bottom:13px}
.tm-mystery-reward-illustration span{position:absolute;color:#fff;text-shadow:0 0 8px #e798bb;font-size:32px;right:25%;top:10%}
.tm-mystery-prize h3{font-size:22px!important;margin:10px 0 4px!important;color:#3e2758!important}
.tm-mystery-prize p{font-size:12px;line-height:1.55;margin:8px 0 14px;color:#726481}
.tm-mystery-status{font-size:10px;font-weight:950;letter-spacing:.6px;background:#f8e1fa;color:#8a49b2;border-radius:99px;padding:8px 12px}
.tm-mystery-status.ready{background:#def8e9;color:#1b8556}.tm-mystery-status.waiting{background:#fff0d6;color:#9c6a23}.tm-mystery-status.used{background:#ededf3;color:#777184}
.tm-mystery-prize-info{padding:11px 13px;border-radius:15px;background:#fff;box-shadow:0 3px 14px #4a36600c;font-size:12px;color:#6f5489;line-height:1.5}
.tm-mystery-prize-info b{color:#6742a2}
.tm-mystery-prize-info small{display:block;color:#a197aa;font-size:10px;margin-top:5px}
.tm-mystery-pending .tm-mystery-prize-info{background:#fffaf0}
.tm-mystery-menu-btn{margin:12px auto 0!important}
.tm-mystery-confetti{position:absolute;z-index:2;inset:0;pointer-events:none;overflow:hidden}
.tm-mystery-confetti i{position:absolute;top:-7px;left:10%;width:8px;height:15px;background:#e978af;border-radius:2px;animation:tmMysteryConfetti 2.8s ease-out both}
.tm-mystery-confetti i:nth-child(2){left:25%;background:#8e7aec;animation-delay:.17s}.tm-mystery-confetti i:nth-child(3){left:41%;background:#f2cb5e;animation-delay:.32s}.tm-mystery-confetti i:nth-child(4){left:59%;background:#e978af;animation-delay:.11s}.tm-mystery-confetti i:nth-child(5){left:77%;background:#6bc9bf;animation-delay:.22s}.tm-mystery-confetti i:nth-child(6){left:89%;background:#8e7aec;animation-delay:.34s}.tm-mystery-confetti i:nth-child(7){left:33%;background:#6bc9bf;animation-delay:.39s}.tm-mystery-confetti i:nth-child(8){left:70%;background:#f2cb5e;animation-delay:.43s}
@keyframes tmMysteryConfetti{0%{opacity:0;transform:translateY(-15px) rotate(0)}12%{opacity:1}88%{opacity:1}100%{opacity:0;transform:translateY(370px) rotate(470deg)}}
@keyframes tmMysterySuccessUp{from{opacity:0;transform:translateY(15px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}
@media(max-width:520px){.tm-mystery-modal{padding:0;align-items:flex-end}.tm-mystery-dialog{width:100%;height:96dvh;max-height:96dvh;border-radius:26px 26px 0 0;border-bottom:0}.tm-mystery-modal-header{padding:18px 70px 16px 19px}.tm-mystery-close{top:14px;right:16px}.tm-mystery-modal-header h2{font-size:22px!important}.tm-mystery-content{padding:18px 18px 25px}.tm-mystery-progress{padding:12px 19px 14px}.tm-mystery-puzzle-card{padding:19px 17px}.tm-mystery-reward-photo{height:180px}}
@media(prefers-reduced-motion:reduce){.tm-mystery-choice,.tm-mystery-primary,.tm-mystery-victory,.tm-mystery-confetti i{animation:none!important;transition:none!important}}
