
.tmk-hud {
  --k-nen: radial-gradient(120% 80% at 50% 0%, rgba(255, 214, 140, 0.14), rgba(0, 0, 0, 0) 62%),
           linear-gradient(rgb(60, 43, 28) 0%, rgb(40, 28, 17) 55%, rgb(26, 18, 10) 100%);
  --k-vien: #d6ad5e;
  --k-bong: 0 0 0 1px #120b05, 0 6px 16px rgba(5, 3, 1, 0.55), inset 0 1px 0 rgba(255, 236, 190, 0.3), inset 0 0 0 2px rgba(18, 12, 6, 0.85);
  --k-nhan: #8fe0b0;
  --k-nhan-toi: 40, 120, 80;
  --tmk-vien: rgba(214, 173, 94, 0.85);
  --tmk-nen: rgba(28, 19, 11, 0.94);
  position: fixed; inset: 0; z-index: 30; pointer-events: none;
  font: 700 12px/1.25 var(--font-serif, 'Noto Serif', Georgia, serif); color: #f4e6c4; text-shadow: 0 1px 2px #000;
}
.tmk-hud.ma { --k-nhan: #ff6a86; --k-nhan-toi: 150, 20, 44; }
.tmk-dinh {
  position: absolute; left: 50%; top: calc(env(safe-area-inset-top, 0px) + 6px); transform: translateX(-50%);
  width: clamp(208px, calc(100vw - 2 * var(--tmk-ben, 262px)), 380px);
  display: flex; flex-direction: column; align-items: stretch; gap: 4px;
}
.tmk-tren {
  position: relative; display: flex; align-items: center; gap: 8px; padding: 4px 6px 4px 12px; border-radius: 6px;
  background: var(--k-nen); border: 1px solid var(--k-vien); box-shadow: var(--k-bong); white-space: nowrap; min-height: 26px;
}
.tmk-tren::before {                       
  content: ''; position: absolute; left: 4px; top: 5px; bottom: 5px; width: 3px; border-radius: 2px;
  background: var(--k-nhan); box-shadow: 0 0 6px var(--k-nhan);
}
.tmk-ten { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: 13px; letter-spacing: 0.02em; }
.tmk-gio {
  flex: 0 0 auto; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; color: #ffe08a; font-variant-numeric: tabular-nums;
  background: rgba(0, 0, 0, 0.35); box-shadow: inset 0 0 0 1px rgba(214, 173, 94, 0.45);
}
.tmk-gio:empty { display: none; }
.tmk-gio.gap { color: #ff7a7a; box-shadow: inset 0 0 0 1px #ff4a5a; animation: tmk-nhay 0.6s steps(2) infinite; }
.tmk-tiendo {
  position: relative; height: 13px; border-radius: 3px; overflow: hidden;
  background: linear-gradient(#120c06, #22170d); border: 1px solid var(--k-vien); box-shadow: 0 0 0 1px #120b05, 0 3px 8px rgba(0, 0, 0, 0.45);
}
.tmk-tiendo i {
  display: block; height: 100%; width: 0; transition: width 0.4s;
  background: linear-gradient(180deg, #b8f59a 0%, #5fbf5a 45%, #2e7a3a 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.tmk-tiendo-chu {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 9.5px; line-height: 1; color: #fff8e0; letter-spacing: 0.04em; text-shadow: 0 1px 1px #000, 0 0 3px #000;
}
.tmk-kiep {
  padding: 3px 10px; border-radius: 5px; text-align: center; font-size: 12px; color: #ffe0e4;
  background: linear-gradient(rgba(110, 14, 30, 0.96), rgba(60, 6, 16, 0.96)); border: 1px solid #ff5a6e;
  box-shadow: 0 0 0 1px #1a0306, 0 0 14px rgba(255, 40, 70, 0.45); animation: tmk-nhay 1.2s ease-in-out infinite;
}
@keyframes tmk-nhay { 50% { opacity: 0.6; } }
.tmk-trang { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }
.tmk-trang span {
  padding: 1px 9px; border-radius: 999px; font-size: 11px; background: var(--tmk-nen);
  border: 1px solid rgba(214, 173, 94, 0.6); box-shadow: 0 0 0 1px #120b05;
}
.tmk-trang .phu { border-color: #ffd86a; color: #ffe8a8; }
.tmk-trang .ma { border-color: #d05aa8; color: #ffc4ea; }
.tmk-trang .do { border-color: #c89a5a; color: #ffe0b8; }
.tmk-trang .gon { border-color: #6ac0ff; color: #bfe6ff; animation: tmk-nhay 1.4s ease-in-out infinite; }
.tmk-tren .tmk-nut-hd.roi {
  flex: 0 0 auto; width: auto; height: auto; min-width: 0; padding: 2px 8px; border-radius: 4px; font-size: 10.5px; line-height: 1.2;
  color: #f2dcb0; background: linear-gradient(rgb(90, 66, 41), rgb(46, 32, 21) 70%, rgb(34, 23, 14));
  border: 1px solid #cfa456; box-shadow: 0 0 0 1px #120b05, inset 0 1px 0 rgba(255, 238, 198, 0.35); order: 9;
}
.tmk-trai {
  position: absolute; left: calc(env(safe-area-inset-left, 0px) + 12px); top: 210px; width: 230px; box-sizing: border-box;
  display: flex; flex-direction: column; gap: 3px; padding: 6px 8px 7px; border-radius: 6px; pointer-events: auto; cursor: pointer;
  background: var(--k-nen); border: 1px solid var(--k-vien); box-shadow: var(--k-bong);
  font-size: 11.5px; -webkit-tap-highlight-color: transparent;
}
.tmk-trai-dau { display: flex; align-items: center; gap: 6px; padding-bottom: 3px; border-bottom: 1px solid rgba(214, 173, 94, 0.3); }
.tmk-trai-dau b { flex: 1; color: #ffe08a; font-size: 12.5px; letter-spacing: 0.04em; }
.tmk-trai-dau em {
  font-style: normal; font-size: 10.5px; padding: 0 7px; border-radius: 999px; color: #1c1206;
  background: linear-gradient(#ffe7a0, #d6a648); box-shadow: 0 0 0 1px #3a2408;
}
.tmk-trai-mui { width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid #d6ad5e; transition: transform 0.2s; }
.tmk-trai.gon .tmk-trai-mui { transform: rotate(-90deg); }
.tmk-trai.gon .tmk-viec { display: none; }
.tmk-trai.gon .tmk-trai-dau { padding-bottom: 0; border-bottom: none; }
.tmk-viec { display: grid; grid-template-columns: 12px 1fr; column-gap: 6px; align-items: center; }
.tmk-viec > i {
  width: 10px; height: 10px; border-radius: 2px; box-sizing: border-box;
  border: 1px solid #d6ad5e; background: rgba(0, 0, 0, 0.45); box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.6);
}
.tmk-viec span { color: #f4e6c4; }
.tmk-viec small { grid-column: 2; font-size: 10px; font-weight: 400; color: #e8c886; }
.tmk-viec.xong > i { background: linear-gradient(#a6ef8a, #3c9a48); border-color: #c8ffb0; position: relative; }
.tmk-viec.xong > i::after {
  content: ''; position: absolute; left: 2.5px; top: 0; width: 3px; height: 6px;
  border: solid #0c2a10; border-width: 0 1.5px 1.5px 0; transform: rotate(40deg);
}
.tmk-viec.xong span { color: #9fd89a; opacity: 0.75; text-decoration: line-through; text-decoration-color: rgba(159, 216, 154, 0.6); }
.tmk-cho {
  display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 8px 12px 10px; border-radius: 6px; pointer-events: auto;
  background: var(--k-nen); border: 1px solid var(--k-vien); box-shadow: var(--k-bong);
}
.tmk-cho > b { color: #ffe08a; font-size: 13px; letter-spacing: 0.04em; }
.tmk-cho-ds { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }
.tmk-cho-ds span { padding: 1px 8px; border-radius: 999px; background: rgba(0, 0, 0, 0.35); box-shadow: inset 0 0 0 1px rgba(214, 173, 94, 0.4); font-size: 11px; }
.tmk-cho-ds span.chu { background: linear-gradient(#ffe7a0, #c8952e); color: #2a1a06; text-shadow: none; box-shadow: 0 0 0 1px #3a2408; }
.tmk-cho small { font-size: 10px; opacity: 0.85; text-align: center; }
.tmk-nuts {
  position: absolute; right: calc(env(safe-area-inset-right, 0px) + 14px); bottom: calc(env(safe-area-inset-bottom, 0px) + 16px);
  display: flex; flex-direction: row-reverse; flex-wrap: wrap-reverse; align-items: flex-end; justify-content: flex-start;
  gap: 10px; max-width: 214px;
}
.tmk-nut-hd {
  --n1: rgb(92, 68, 41); --n2: rgb(44, 31, 20); --nv: #d2a858; --nc: #fff3d6;
  pointer-events: auto; cursor: pointer; box-sizing: border-box; width: 58px; height: 58px; padding: 4px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; text-align: center;
  font: inherit; font-size: 11px; line-height: 1.08; color: var(--nc); letter-spacing: 0.01em;
  background: radial-gradient(110% 70% at 50% 8%, rgba(255, 226, 160, 0.3), rgba(0, 0, 0, 0) 55%),
              radial-gradient(circle at 50% 60%, var(--n1), var(--n2) 72%, rgb(22, 15, 9));
  border: 1.6px solid var(--nv);
  box-shadow: 0 0 0 1px #100a05, 0 5px 10px rgba(6, 4, 2, 0.6), inset 0 2px 2px rgba(255, 240, 200, 0.28), inset 0 -5px 9px rgba(0, 0, 0, 0.5);
  -webkit-tap-highlight-color: transparent; touch-action: manipulation; transition: transform 0.08s, filter 0.15s;
}
.tmk-nut-hd:active { transform: scale(0.94); filter: brightness(1.15); }
.tmk-nut-hd.lon { order: -1; width: 84px; height: 84px; font-size: 15px; letter-spacing: 0.04em; border-width: 2px; }
.tmk-nut-hd.dung { --n1: rgb(63, 122, 96); --n2: rgb(27, 58, 45); --nv: #a9e8c8; --nc: #effff6; }
.tmk-nut-hd.bao { --n1: rgb(170, 34, 44); --n2: rgb(84, 10, 18); --nv: #ff9a9a; animation: tmk-dap 1s ease-in-out infinite; }
.tmk-nut-hd.phe { --n1: rgb(96, 16, 30); --n2: rgb(42, 6, 14); --nv: #b84a62; --nc: #ffc0cc; }
.tmk-nut-hd.phe.san { --n1: rgb(196, 22, 52); --n2: rgb(92, 6, 22); --nv: #ff6a86; --nc: #fff; animation: tmk-dap 0.9s ease-in-out infinite; }
.tmk-nut-hd.don, .tmk-nut-hd.kiep { --n1: rgb(92, 26, 80); --n2: rgb(40, 8, 36); --nv: #d07ab8; --nc: #ffd8f2; }
.tmk-nut-hd.van, .tmk-nut-hd.phap, .tmk-nut-hd.anh { --n1: rgb(30, 84, 120); --n2: rgb(12, 36, 56); --nv: #7ac8ff; --nc: #e2f4ff; }
.tmk-nut-hd.linhphu { --n1: rgb(150, 110, 24); --n2: rgb(70, 48, 8); --nv: #ffe08a; animation: tmk-dap 1.2s ease-in-out infinite; }
.tmk-nut-hd.huyen, .tmk-nut-hd.banh { --n1: rgb(70, 28, 96); --n2: rgb(30, 10, 44); --nv: #b88ae0; --nc: #f0dcff; }
.tmk-nut-hd.hon { --n1: rgb(52, 66, 110); --n2: rgb(20, 26, 50); --nv: #b0c8ff; --nc: #e4ecff; }
.tmk-nut-hd:disabled { filter: grayscale(0.6) brightness(0.75); cursor: default; }
@keyframes tmk-dap {
  50% { box-shadow: 0 0 0 1px #100a05, 0 0 18px var(--nv), inset 0 2px 2px rgba(255, 240, 200, 0.28), inset 0 -5px 9px rgba(0, 0, 0, 0.5); }
}
.tmk-hon {
  position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(env(safe-area-inset-bottom, 0px) + 12px);
  width: min(300px, calc(100vw - 440px)); min-width: 200px;
  display: flex; flex-direction: column; gap: 3px; pointer-events: auto;
}
.tmk-hon-log { font-size: 11px; color: #c8d0e8; display: flex; flex-direction: column; gap: 1px; font-style: italic; }
.tmk-hon-in, .tmk-hop-in {
  font: inherit; font-size: 13px; padding: 5px 8px; border-radius: 6px; color: #fff;
  background: rgba(16, 12, 8, 0.92); border: 1px solid #a8865a; min-width: 0;
}
.tmk-den {
  position: absolute; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 110px); transform: translateX(-50%);
  padding: 6px 12px; border-radius: 6px; text-align: center;
  background: var(--k-nen); border: 1px solid var(--k-vien); box-shadow: var(--k-bong);
}
.tmk-den b { color: #ffd88a; }
.tmk-den-luoi { display: grid; grid-template-columns: repeat(5, auto); gap: 3px 8px; margin-top: 3px; font-size: 12px; }
.tmk-den-luoi .sang { text-shadow: 0 0 6px currentColor, 0 1px 2px #000; }
.tmk-den-luoi .tat { color: #5a5a62; text-decoration: line-through; }
#tmk-banner {
  position: fixed; left: 50%; top: 64px; transform: translateX(-50%); z-index: 31; pointer-events: none;
  display: flex; flex-direction: column; align-items: center; gap: 1px; text-align: center;
  max-width: calc(100vw - 24px); padding: 6px 34px 7px; box-sizing: border-box;
  font-family: var(--font-serif, 'Noto Serif', Georgia, serif);
  background: linear-gradient(90deg, rgba(20, 12, 6, 0), rgba(20, 12, 6, 0.86) 18%, rgba(20, 12, 6, 0.86) 82%, rgba(20, 12, 6, 0));
  border-top: 1px solid; border-bottom: 1px solid;
  border-image: linear-gradient(90deg, rgba(214, 173, 94, 0), #d6ad5e 25%, #ffe7a0 50%, #d6ad5e 75%, rgba(214, 173, 94, 0)) 1;
  text-shadow: 0 2px 4px #000;
}
#tmk-banner.hien { animation: tmk-ron 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.2); }
@keyframes tmk-ron { from { opacity: 0; transform: translateX(-50%) scaleX(0.6); } to { opacity: 1; transform: translateX(-50%); } }
#tmk-banner strong { font-size: 22px; color: #ffe8b0; letter-spacing: 0.12em; text-shadow: 0 0 12px rgba(255, 190, 90, 0.55), 0 2px 3px #000; }
#tmk-banner small { font-size: 12px; color: #f0d8b8; font-weight: 600; }
body.tmk-trong #hud-journal,
body.tmk-trong #hotbar,
body.tmk-trong #phu-bar,
body.tmk-trong #hud-target,
body.tmk-trong #party-hud,
body.tmk-trong #btn-target,
body.tmk-trong #btn-fly,
body.tmk-trong #btn-auto-touch,
body.tmk-trong #btn-meditate-touch,
body.tmk-trong #btn-fishing-stop-touch,
body.tmk-trong #touch-buttons [id^="qs-"],
body.tmk-trong #btn-attack { display: none !important; }
.tmk-modal {
  position: fixed; inset: 0; z-index: 240; display: flex; align-items: center; justify-content: center;
  background: rgba(2, 4, 12, 0.55); font: 700 13px/1.3 var(--font-serif, serif); color: #eef0ff;
}
.tmk-modal-hop {
  max-width: calc(100vw - 16px); max-height: calc(100vh - 16px); overflow: auto; box-sizing: border-box;
  padding: 12px 14px; border-radius: 12px; background: rgba(12, 16, 36, 0.97); border: 1px solid #7a90d8;
  box-shadow: 0 6px 30px rgba(0, 0, 0, 0.6);
}
.tmk-modal h3 { margin: 0 0 6px; font-size: 16px; color: #ffe08a; text-align: center; }
.tmk-nut {
  cursor: pointer; font: inherit; font-size: 13px; padding: 6px 12px; border-radius: 8px; margin: 3px;
  color: #eef0ff; background: rgba(40, 54, 100, 0.95); border: 1px solid #7a90d8;
}
.tmk-nut.chinh { background: rgba(150, 110, 30, 0.95); border-color: #ffd88a; color: #fff6dc; }
.tmk-nut.giu { background: rgba(40, 120, 70, 0.95); border-color: #8fe08a; }
.tmk-nut:disabled { opacity: 0.45; cursor: default; }
.tmk-nut-dai {
  display: flex; flex-direction: column; align-items: flex-start; width: 100%; margin: 4px 0; padding: 7px 10px; cursor: pointer;
  font: inherit; color: #ffd6e0; background: rgba(60, 10, 26, 0.95); border: 1px solid #b04060; border-radius: 8px; text-align: left;
}
.tmk-nut-dai small { font-size: 11px; opacity: 0.85; }
.tmk-nut-nho { cursor: pointer; font: inherit; font-size: 11px; margin: 2px; padding: 3px 7px; border-radius: 6px; color: #ffd6e0; background: rgba(50, 12, 26, 0.95); border: 1px solid #8a3a54; }
.tmk-hop-hep { width: min(340px, calc(100vw - 40px)); }
.tmk-cau-ds { margin: 6px 0; }
.tmk-modal.vai { background: rgba(0, 0, 0, 0.78); }
.tmk-modal.vai .tmk-modal-hop { background: transparent; border: none; box-shadow: none; text-align: center; }
.tmk-vai { display: flex; flex-direction: column; align-items: center; gap: 6px; animation: tmk-hien 0.6s ease-out; }
.tmk-vai small { font-size: 13px; opacity: 0.8; }
.tmk-vai-mat { font-size: 46px; text-shadow: 0 0 18px currentColor, 0 2px 4px #000; }
.tmk-vai strong { font-size: 32px; letter-spacing: 0.2em; }
.tmk-vai.dt strong { color: #9fd0ff; text-shadow: 0 0 16px #3a7aff; }
.tmk-vai.ma strong { color: #ff4a6a; text-shadow: 0 0 18px #ff0030; }
.tmk-vai p { margin: 0; font-size: 14px; color: #dfe4f6; }
.tmk-vai p.tmk-vai-viec { margin-top: 4px; padding: 5px 12px; border-radius: 6px; background: rgba(255, 255, 255, 0.08);
  color: #fff3c4; font-size: 15px; text-align: center; }
@keyframes tmk-hien { from { opacity: 0; transform: scale(1.3); } to { opacity: 1; transform: none; } }
.tmk-game { width: min(360px, calc(100vw - 40px)); text-align: center; }
.tmk-game p { margin: 4px 0; font-size: 12px; color: #c8d0ec; }
.tmk-game-vung { min-height: 120px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; }
.tmk-game-loi { display: block; min-height: 14px; color: #ff9a9a; font-size: 11px; }
.tmk-game-xong { font-size: 56px; color: #8fe08a; text-shadow: 0 0 16px #3fd05a; }
.tmk-g-den { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; }
.tmk-g-den-o { cursor: pointer; font: inherit; font-size: 12px; padding: 8px 2px; border-radius: 6px; color: #eee; background: #1a1610; border: 2px solid; }
.tmk-g-den-o.sang { background: #6a4a10; box-shadow: 0 0 12px #ffcf4a; }
.tmk-g-den-o.sai { background: #4a1010; }
.tmk-g-kim { position: relative; width: 100%; height: 26px; border-radius: 6px; background: #241a12; border: 1px solid #7a5a3a; overflow: hidden; }
.tmk-g-kim .lua { position: absolute; top: 0; bottom: 0; background: linear-gradient(90deg, #ff7a2a, #ffcf4a); }
.tmk-g-kim .kim { position: absolute; top: -2px; bottom: -2px; width: 3px; margin-left: -1px; background: #fff; box-shadow: 0 0 6px #fff; }
.tmk-g-cau { font-size: 18px !important; color: #ffe8b8 !important; letter-spacing: 0.04em; }
.tmk-g-hanh { display: flex; gap: 18px; }
.tmk-g-hanh > div { display: flex; flex-direction: column; gap: 4px; }
.tmk-g-hanh-o { cursor: pointer; font: inherit; font-size: 14px; min-width: 64px; padding: 5px 8px; border-radius: 6px; background: #161c34; border: 1px solid #4a5a90; }
.tmk-g-hanh-o.chon { border-color: #ffe08a; box-shadow: 0 0 8px #ffe08a; }
.tmk-g-hanh-o.noi { opacity: 0.5; border-color: #8fe08a; }
.tmk-g-binh { position: relative; width: 70px; height: 120px; border-radius: 6px 6px 14px 14px; border: 2px solid #8ab0d0; overflow: hidden; background: #0c1424; }
.tmk-g-binh i { position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: linear-gradient(0deg, #2a6ac0, #6ab8ff); }
.tmk-g-binh b { position: absolute; left: 0; right: 0; background: rgba(120, 255, 140, 0.25); border-top: 1px dashed #8fe08a; border-bottom: 1px dashed #8fe08a; z-index: 1; }
.tmk-g-cham { position: relative; width: 100%; height: 150px; border-radius: 8px; overflow: hidden; }
.tmk-g-cham.tuyet { background: linear-gradient(180deg, #8ea8c8, #c8d8ea); }
.tmk-g-cham.kinh { background: linear-gradient(135deg, #3a6a8a, #8ac0d8); }
.tmk-g-dom { position: absolute; width: 34px; height: 26px; margin: -13px 0 0 -17px; cursor: pointer; border: none; border-radius: 50%; background: radial-gradient(#fff, rgba(255, 255, 255, 0.4) 60%, transparent 70%); transition: opacity 0.25s, transform 0.25s; }
.tmk-g-cham.kinh .tmk-g-dom { background: radial-gradient(rgba(40, 40, 50, 0.85), rgba(40, 40, 50, 0.3) 60%, transparent 70%); }
.tmk-g-dom.het { opacity: 0; transform: scale(0.3); pointer-events: none; }
.tmk-g-vong { position: relative; width: 70px; height: 90px; border-radius: 8px; border: 2px solid #c8a060; overflow: hidden; background: #1a140c; }
.tmk-g-vong i { position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: linear-gradient(0deg, #c88a2a, #ffe08a); }
.tmk-hop { width: min(560px, calc(100vw - 32px)); display: flex; flex-direction: column; gap: 6px; }
.tmk-hop-dau { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; align-items: baseline; }
.tmk-hop-dau b { color: #ffd0d8; }
.tmk-hop-gio { color: #ffe08a; font-variant-numeric: tabular-nums; }
.tmk-hop-luoi { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 5px; }
.tmk-hop-the {
  cursor: pointer; font: inherit; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 5px 4px;
  border-radius: 8px; color: #eef0ff; background: #161c34; border: 1px solid #44508a;
}
.tmk-hop-the i { width: 14px; height: 14px; border-radius: 50%; box-shadow: 0 0 6px rgba(255, 255, 255, 0.3); }
.tmk-hop-the small { font-size: 10px; color: #9aa4c8; }
.tmk-hop-the small.phieu { color: #8fe08a; }
.tmk-hop-the em { font-style: normal; font-size: 11px; color: #ffcf4a; }
.tmk-hop-the.toi { border-color: #ffe08a; }
.tmk-hop-the.chon { border-color: #ff5a7a; box-shadow: 0 0 10px #ff2a4a; }
.tmk-hop-the.chet { opacity: 0.45; }
.tmk-hop-the:disabled { cursor: default; }
.tmk-hop-chan { display: flex; justify-content: center; align-items: center; gap: 8px; flex-wrap: wrap; }
.tmk-hop-kq { color: #ffe08a; }
.tmk-hop-log { height: 120px; overflow-y: auto; padding: 4px 6px; border-radius: 6px; background: rgba(0, 0, 0, 0.35); font-size: 12px; font-weight: 400; }
.tmk-hop-dong.hon { opacity: 0.7; font-style: italic; }
.tmk-hop-noi { display: flex; gap: 4px; }
.tmk-hop-noi .tmk-hop-in { flex: 1; }
.tmk-ket { width: min(420px, calc(100vw - 40px)); text-align: center; }
.tmk-ket h2 { margin: 2px 0; font-size: 26px; letter-spacing: 0.12em; }
.tmk-ket.dt h2 { color: #9fd0ff; text-shadow: 0 0 14px #3a7aff; }
.tmk-ket.ma h2 { color: #ff5a7a; text-shadow: 0 0 14px #ff0030; }
.tmk-ket-ds { display: flex; flex-direction: column; gap: 2px; margin: 8px 0; text-align: left; }
.tmk-ket-dong { display: grid; grid-template-columns: 48px 1fr auto; gap: 6px; padding: 2px 6px; border-radius: 6px; background: rgba(40, 50, 90, 0.4); }
.tmk-ket-dong.ma { background: rgba(110, 16, 36, 0.55); }
.tmk-ket-dong small { color: #b8c0dc; font-size: 11px; }
.tmk-ket-thuong { color: #ffe08a; }
.tmk-den.xa { bottom: auto; top: calc(env(safe-area-inset-top, 0px) + 146px); left: auto; right: 8px; transform: none; padding: 4px 6px; }
.tmk-den.xa .tmk-den-luoi { font-size: 10px; gap: 1px 5px; }
.tmk-kinh {
  position: absolute; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 96px); transform: translateX(-50%);
  padding: 6px 8px; border-radius: 10px; background: rgba(6, 18, 34, 0.92); border: 1px solid #5aa8e0; text-align: center;
}
.tmk-kinh b { color: #bfe6ff; }
.tmk-kinh-hang { display: flex; gap: 8px; margin-top: 4px; }
.tmk-kinh-o { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.tmk-kinh-o small { font-size: 10px; color: #a8c8e8; }
.tmk-kinh-mat {
  position: relative; width: min(96px, 26vw); aspect-ratio: 1; border-radius: 50%; overflow: hidden;
  background: radial-gradient(circle at 40% 35%, #3c7aaa, #163858 60%, #081a2c); border: 2px solid #8ab8d8;
  box-shadow: inset 0 0 12px rgba(160, 220, 255, 0.4);
}
.tmk-kinh-o.duc .tmk-kinh-mat { background: radial-gradient(circle, #3a4048, #1a1e24); filter: blur(0.5px); }
.tmk-kinh-mat i {
  position: absolute; transform: translate(-50%, -50%); font-style: normal; font-size: 10px; white-space: nowrap;
  text-shadow: 0 0 4px currentColor, 0 1px 2px #000;
}
.tmk-kinh-mat i.khuyen { color: #ffffff; }
.tmk-cai { display: flex; flex-direction: column; gap: 2px; width: 100%; margin: 2px 0; }
.tmk-cai small { text-align: center; }
.tmk-cai-hang { display: flex; align-items: center; gap: 3px; flex-wrap: wrap; justify-content: center; }
.tmk-cai-hang span { font-size: 10px; opacity: 0.8; min-width: 86px; text-align: right; margin-right: 2px; }
.tmk-cai-o {
  cursor: pointer; font: inherit; font-size: 10px; padding: 2px 7px; border-radius: 6px; color: #dfe4f6;
  background: rgba(30, 40, 80, 0.9); border: 1px solid #44508a;
}
.tmk-cai-o.chon { background: rgba(150, 110, 30, 0.95); border-color: #ffd88a; color: #fff6dc; }
.tmk-nut-dai.phu { color: #fff0c8; background: rgba(80, 60, 10, 0.95); border-color: #d8a840; }
.tmk-ghi { display: block; text-align: center; font-size: 11px; color: #c8b0e0; margin-bottom: 6px; }
.tmk-vai.th strong { color: #ffb05a; text-shadow: 0 0 16px #ff7a00; }
.tmk-vai em { font-style: normal; font-size: 14px; color: #ffe08a; }
.tmk-ket.th h2 { color: #ffb05a; text-shadow: 0 0 14px #ff7a00; }
.tmk-ket-dong.th { background: rgba(110, 70, 16, 0.55); }
.tmk-ket-the { display: flex; justify-content: center; gap: 4px; margin: 6px 0 2px; }
.tmk-ht { display: flex; flex-direction: column; gap: 2px; margin: 8px 0; text-align: left; max-height: 46vh; overflow-y: auto; font-size: 12px; }
.tmk-ht-dong { display: grid; grid-template-columns: 38px 1fr; gap: 6px; padding: 2px 6px; border-radius: 6px; background: rgba(40, 50, 90, 0.35); }
.tmk-ht-dong em { font-style: normal; color: #9aa4c8; font-variant-numeric: tabular-nums; }
.tmk-ht-dong.phe { background: rgba(110, 16, 36, 0.45); }
.tmk-ht-dong.an { background: rgba(120, 90, 20, 0.45); }
.tmk-ht-dong.ket { background: rgba(40, 90, 60, 0.5); }
.tmk-ht-mat small { font-size: 10px; color: #b8c0dc; font-weight: 400; }
body.tmk-choi .dh-toast { display: none !important; }
.tmk-nut-hd.lon.dai { font-size: 12.5px; letter-spacing: 0; }
.tmk-modal { background: radial-gradient(ellipse at center, rgba(8, 6, 4, 0.45), rgba(2, 2, 6, 0.72)); }
.tmk-modal-hop {
  position: relative; padding: 14px 16px; border-radius: 8px;
  background: radial-gradient(120% 60% at 50% 0%, rgba(255, 214, 140, 0.12), rgba(0, 0, 0, 0) 60%),
              linear-gradient(rgb(52, 37, 24) 0%, rgb(34, 24, 15) 60%, rgb(24, 16, 9) 100%);
  border: 1px solid #d6ad5e;
  box-shadow: 0 0 0 1px #120b05, 0 0 0 4px rgba(18, 12, 6, 0.6), 0 12px 36px rgba(0, 0, 0, 0.7),
              inset 0 1px 0 rgba(255, 236, 190, 0.3), inset 0 0 0 2px rgba(18, 12, 6, 0.85);
}
.tmk-modal h3 {
  color: #ffe08a; letter-spacing: 0.1em; padding-bottom: 6px; margin-bottom: 8px;
  border-bottom: 1px solid; border-image: linear-gradient(90deg, rgba(214, 173, 94, 0), #d6ad5e, rgba(214, 173, 94, 0)) 1;
}
.tmk-nut {
  color: #f4e2bc; border-radius: 6px; padding: 7px 14px;
  background: radial-gradient(120% 80% at 50% 0%, rgba(255, 220, 150, 0.22), rgba(0, 0, 0, 0) 60%),
              linear-gradient(rgb(90, 66, 41), rgb(46, 32, 21) 70%, rgb(34, 23, 14));
  border: 1px solid #cfa456;
  box-shadow: 0 0 0 1px #120b05, 0 3px 7px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 238, 198, 0.35), inset 0 -3px 5px rgba(0, 0, 0, 0.45);
}
.tmk-nut.chinh {
  color: #2a1804; text-shadow: 0 1px 0 rgba(255, 240, 200, 0.5);
  background: linear-gradient(#ffe9a8 0%, #e8bd5a 45%, #b9842a 100%); border-color: #fff0c0;
  box-shadow: 0 0 0 1px #3a2408, 0 3px 8px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.tmk-nut.giu { color: #eaffea; background: linear-gradient(#5fbf6a, #2e7a3a); border-color: #b8f5a8; }
.tmk-nut:not(:disabled):hover { filter: brightness(1.1); }
.tmk-nut-dai { border-radius: 6px; box-shadow: 0 0 0 1px #120b05, inset 0 1px 0 rgba(255, 220, 220, 0.18); }
.tmk-cai-o { background: rgba(0, 0, 0, 0.35); border-color: rgba(214, 173, 94, 0.45); color: #ead8b4; }
.tmk-cai-o.chon { background: linear-gradient(#ffe9a8, #c8952e); color: #2a1804; border-color: #fff0c0; text-shadow: none; }
.tmk-hop-the { background: linear-gradient(rgb(46, 33, 21), rgb(28, 19, 11)); border-color: rgba(214, 173, 94, 0.45); box-shadow: 0 0 0 1px #120b05; }
.tmk-hop-the.toi { border-color: #ffe08a; box-shadow: 0 0 0 1px #120b05, 0 0 8px rgba(255, 224, 138, 0.4); }
.tmk-hop-the small { color: #c8b28a; }
.tmk-hop-log { background: rgba(0, 0, 0, 0.4); box-shadow: inset 0 0 0 1px rgba(214, 173, 94, 0.25); }
.tmk-ket-dong { background: rgba(60, 44, 26, 0.55); }
.tmk-ht-dong { background: rgba(60, 44, 26, 0.45); }
.tmk-g-hanh-o { background: rgb(36, 26, 16); border-color: rgba(214, 173, 94, 0.5); }
.tmk-kinh { background: linear-gradient(rgba(10, 30, 50, 0.95), rgba(6, 16, 30, 0.95)); border-color: #8ac8f0; box-shadow: 0 0 0 1px #04101c, 0 6px 16px rgba(0, 0, 0, 0.55); }
@media (max-height: 500px) {
  .tmk-dinh { top: calc(env(safe-area-inset-top, 0px) + 4px); gap: 3px; }
  .tmk-tren { min-height: 22px; padding: 2px 4px 2px 10px; }
  .tmk-ten { font-size: 12px; }
  .tmk-gio { font-size: 10.5px; padding: 0 6px; }
  .tmk-tiendo { height: 11px; }
  .tmk-tiendo-chu { font-size: 8.5px; }
  .tmk-kiep { font-size: 11px; padding: 2px 8px; }
  .tmk-trai { width: 196px; padding: 4px 7px 5px; font-size: 10.5px; gap: 2px; }
  .tmk-trai-dau b { font-size: 11.5px; }
  .tmk-viec small { font-size: 9px; }
  .tmk-nuts { gap: 8px; max-width: 180px; right: calc(env(safe-area-inset-right, 0px) + 10px); bottom: calc(env(safe-area-inset-bottom, 0px) + 10px); }
  .tmk-nut-hd { width: 50px; height: 50px; font-size: 10px; }
  .tmk-nut-hd.lon { width: 70px; height: 70px; font-size: 13px; }
  .tmk-nut-hd.lon.dai { font-size: 11px; }
  #tmk-banner { padding: 4px 26px 5px; }
  #tmk-banner strong { font-size: 17px; }
  #tmk-banner small { font-size: 10.5px; }
  .tmk-den { bottom: calc(env(safe-area-inset-bottom, 0px) + 70px); padding: 4px 8px; }
  .tmk-kinh { bottom: calc(env(safe-area-inset-bottom, 0px) + 8px); }
  .tmk-kinh-mat { width: min(72px, 18vw); }
  .tmk-modal-hop { padding: 10px 12px; max-height: calc(100vh - 10px); }
}
@media (max-width: 560px) {
  .tmk-dinh { width: calc(100vw - 16px); }   
  .tmk-trai { width: 180px; }
  .tmk-hon { width: calc(100vw - 32px); }
}
.tmk-trai.phai { left: auto; right: calc(env(safe-area-inset-right, 0px) + 12px); }
.tmk-cho.phai {
  position: absolute; right: calc(env(safe-area-inset-right, 0px) + 12px); width: 220px; box-sizing: border-box;
  max-height: calc(100vh - 120px); overflow-y: auto; padding: 6px 8px 8px; gap: 4px;
}
.tmk-cho.phai > b { font-size: 12px; }
.tmk-cho.phai .tmk-cho-ds span { font-size: 10px; padding: 0 6px; }
.tmk-cho.phai .tmk-cai-hang span { min-width: 56px; }
.tmk-cho.phai .tmk-nut { padding: 5px 12px; font-size: 12px; }
