/* topup.css - ToyWars Thailand /topup (topup.html + topup.js): site header, hero, RT package shop (tabs "แพ็กเกจ RT" / "ประวัติการเติม"),
   login card, QR payment dialog.  Layout follows the owner's other top-up page; colours follow the game's login screen (deep navy + yellow). */
:root{
  --navy-0: #050817; --navy-1: #0b1640; --navy-2: #13225c; --navy-3: #1c3182; --navy-4: #2a46b0;
  --ink: #eef2ff; --mute: #a9b6e3; --dim: #7383bd;
  --gold: #ffd21f; --gold-2: #ffb300; --gold-3: #ff8a00; --gold-ink: #241452;
  --red: #ff3d5a; --green: #22c06b; --line: rgba(160, 180, 255, .16);
  --font-h: 'Kanit', 'Prompt', 'Leelawadee UI', 'Tahoma', sans-serif;
  --font: 'Prompt', 'Kanit', 'Leelawadee UI', 'Tahoma', sans-serif;
  --atlas: url(/assets/ui/atlas/login_1024_tw.webp);
}
*, *::before, *::after{box-sizing: border-box;}
html{-webkit-text-size-adjust: 100%;}
body.tw{margin: 0; min-height: 100vh; background: var(--navy-0); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.6; overflow-x: hidden;}
body.tw.modal-open{overflow: hidden;}
a{color: var(--gold);}
button, input{font: inherit;}
[hidden]{display: none !important;}
.tw-wrap{width: min(100% - 32px, 1000px); margin-left: auto; margin-right: auto;}

/* ---------------------------------------------------------------- header */
.tw-top{position: sticky; top: 0; z-index: 50; background: linear-gradient(180deg, rgba(8, 14, 44, .97), rgba(11, 22, 64, .94)); border-bottom: 1px solid var(--line);
  box-shadow: 0 4px 18px rgba(0, 0, 0, .35); backdrop-filter: blur(6px);}
.tw-top__in{display: flex; align-items: center; gap: 28px; width: min(100% - 32px, 1200px); height: 68px; margin: 0 auto;}
/* the ToyWars wordmark cropped out of the login atlas (logo ~ x300..712, y212..418 of 1024); "lighten" drops the card's black behind it */
.tw-logo{--lh: 50px; flex: 0 0 auto; display: block; width: calc(var(--lh) * 2); height: var(--lh); background: var(--atlas) no-repeat;
  background-size: calc(var(--lh) * 4.971) auto; background-position: calc(var(--lh) * -1.456) calc(var(--lh) * -1.029); mix-blend-mode: lighten;}
.tw-nav{display: flex; align-items: center; gap: 6px;}
.tw-nav__a{display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 14px; border-radius: 999px; color: var(--mute); font-family: var(--font-h);
  font-size: 16.5px; font-weight: 500; text-decoration: none; transition: color .15s, background .15s;}
.tw-nav__a svg{width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;}
.tw-nav__a:hover{color: #fff; background: rgba(255, 255, 255, .06);}
.tw-nav__a.is-on{color: var(--gold); background: rgba(255, 210, 31, .12); box-shadow: inset 0 0 0 1px rgba(255, 210, 31, .35);}
.tw-top__end{display: flex; align-items: center; gap: 12px; margin-left: auto;}
.tw-nav__a--play{display: none;}
.tw-guest, .tw-userbox{display: inline-flex; align-items: center; gap: 8px;}
.tw-hbtn{display: inline-flex; align-items: center; height: 38px; padding: 0 16px; border-radius: 999px; color: #fff; font-family: var(--font-h); font-size: 15.5px; font-weight: 500;
  text-decoration: none; background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 1px var(--line); white-space: nowrap; transition: background .15s;}
.tw-hbtn:hover{background: rgba(255, 255, 255, .15);}
.tw-hbtn--line{color: var(--gold); box-shadow: inset 0 0 0 1.5px rgba(255, 210, 31, .6); background: transparent;}
.tw-hbtn.is-on{background: rgba(255, 210, 31, .14); color: var(--gold);}
.tw-chip{display: inline-flex; align-items: center; gap: 6px; height: 38px; max-width: 300px; padding: 0 14px; border-radius: 999px; background: rgba(255, 255, 255, .07);
  box-shadow: inset 0 0 0 1px var(--line); font-family: var(--font-h); font-size: 15px; color: #fff; white-space: nowrap;}
.tw-chip__name{min-width: 0; overflow: hidden; text-overflow: ellipsis; margin-right: 4px;}
.tw-chip b{color: var(--gold); font-weight: 600; font-size: 16px;}
.tw-hout{height: 38px; padding: 0 12px; border: 0; border-radius: 999px; background: transparent; color: var(--mute); font-family: var(--font-h); font-size: 14.5px; cursor: pointer; white-space: nowrap;}
.tw-hout:hover{color: #fff; background: rgba(255, 255, 255, .07);}
.tw-play{display: inline-flex; align-items: center; justify-content: center; height: 42px; padding: 0 24px; border-radius: 999px; font-family: var(--font-h); font-size: 17px;
  font-weight: 600; color: var(--gold-ink); text-decoration: none; background: linear-gradient(180deg, #ffe45c 0%, var(--gold) 45%, var(--gold-2) 100%);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .55) inset, 0 4px 14px rgba(255, 170, 0, .35); transition: transform .1s, filter .15s;}
.tw-play:hover{filter: brightness(1.06);}
.tw-play:active{transform: translateY(1px);}

/* ---------------------------------------------------------------- hero + page frame */
.tw-page{position: relative; background:
  radial-gradient(900px 520px at 15% 520px, rgba(84, 60, 220, .22), transparent 70%),
  radial-gradient(800px 520px at 88% 900px, rgba(0, 170, 255, .14), transparent 70%),
  linear-gradient(180deg, #070b1e 0, var(--navy-1) 520px, #0a1238 1400px, var(--navy-0) 100%);}
.tw-hero{position: relative; height: 270px; background:
  linear-gradient(90deg, #070b1e calc(50% - 450px), rgba(7, 11, 30, 0) calc(50% - 300px), rgba(7, 11, 30, 0) calc(50% + 300px), #070b1e calc(50% + 450px)),
  linear-gradient(180deg, rgba(7, 11, 30, 0) 70%, rgba(11, 22, 64, .9) 100%),
  var(--atlas) 50% -146px / 900px auto no-repeat, #070b1e;
  border-bottom: 5px solid var(--gold);}
.tw-hero::after{content: ''; position: absolute; left: 0; right: 0; bottom: -5px; height: 5px; background: linear-gradient(90deg, transparent, #fff8c4, transparent); opacity: .7;}
.tw-body{position: relative; padding: 38px 0 80px;}
.tw-head{text-align: center; padding: 0 16px;}
.tw-h1{margin: 0; font-family: var(--font-h); font-size: 54px; font-weight: 700; line-height: 1.2; color: #fff; text-shadow: 0 3px 0 rgba(0, 0, 0, .35);}
.tw-h1 span{color: var(--gold); text-shadow: 0 3px 0 #b85a00, 0 0 24px rgba(255, 190, 0, .35);}
.tw-sub{margin: 8px auto 28px; max-width: 860px; font-size: 18px; font-weight: 300; line-height: 1.7; color: var(--mute);}
.tw-sub strong{color: #fff; font-weight: 500;}
.tw-sub span{display: block; color: var(--gold); font-weight: 400;}

/* ---------------------------------------------------------------- notices / login / account */
.tw-notices{margin-bottom: 22px;}
.tw-notices > :not([hidden]) ~ :not([hidden]){margin-top: 14px;}
.tw-alert{border-radius: 20px; padding: 18px 24px; background: linear-gradient(180deg, rgba(28, 49, 130, .75), rgba(19, 34, 92, .8)); color: var(--mute);
  border-left: 7px solid var(--gold); box-shadow: inset 0 0 0 1px var(--line), 0 10px 26px rgba(0, 0, 0, .3); font-size: 16px; line-height: 1.6;}
.tw-alert strong{display: block; margin-bottom: 2px; font-family: var(--font-h); font-size: 20px; font-weight: 600; color: #fff;}
.tw-alert p{margin: 0;}
.tw-alert--warn{border-left-color: var(--red); background: linear-gradient(180deg, rgba(120, 24, 52, .55), rgba(60, 16, 46, .7));}
.tw-alert--warn strong{color: #ffd5dc;}
.tw-alert--warn p{color: #ffc2cc;}
.tw-login{display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 16px 26px; align-items: center;}
.tw-login__form{display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; align-items: end;}
.tw-field{display: flex; flex-direction: column; gap: 4px; min-width: 0;}
.tw-field span{font-size: 13.5px; color: var(--mute);}
.tw-field input{width: 100%; height: 46px; padding: 0 14px; border: 0; border-radius: 12px; background: rgba(4, 8, 28, .65); color: #fff; font-size: 16px;
  box-shadow: inset 0 0 0 1px rgba(160, 180, 255, .28); outline: none; transition: box-shadow .15s;}
.tw-field input:focus{box-shadow: inset 0 0 0 2px var(--gold);}
.tw-login__err{grid-column: 1 / -1; margin: 0; padding: 8px 12px; border-radius: 10px; background: rgba(255, 61, 90, .16); color: #ffc2cc; font-size: 14.5px;}
.tw-login.is-flash{animation: tw-flash 1s ease 1;}
@keyframes tw-flash{0%, 100%{box-shadow: inset 0 0 0 1px var(--line), 0 10px 26px rgba(0, 0, 0, .3);} 30%{box-shadow: inset 0 0 0 3px var(--gold), 0 0 30px rgba(255, 210, 31, .45);}}
.tw-account{display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; padding: 14px 22px; border-radius: 18px;
  background: linear-gradient(180deg, rgba(28, 49, 130, .75), rgba(19, 34, 92, .8)); box-shadow: inset 0 0 0 1px var(--line), 0 10px 26px rgba(0, 0, 0, .3); font-size: 16.5px; color: var(--mute);}
.tw-account strong{color: #fff; font-weight: 500;}
.tw-account__bal{display: inline-flex; align-items: center; gap: 8px;}
.tw-account__bal b{font-family: var(--font-h); font-size: 24px; font-weight: 600; color: var(--gold);}
.tw-link{margin-left: auto; padding: 6px 4px; border: 0; background: none; color: var(--mute); font-size: 15px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer;}
.tw-link:hover{color: #fff;}

/* ---------------------------------------------------------------- the shop panel */
.tw-shell{width: min(100% - 32px, 1000px); margin: 0 auto; padding: 22px 22px 28px; border-radius: 28px;
  background: linear-gradient(180deg, #22389a 0%, #172a78 40%, #0f1d58 100%); box-shadow: inset 0 0 0 1px rgba(160, 180, 255, .22), 0 20px 50px rgba(0, 0, 0, .45);}
.tw-tabs{display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 18px;}
.tw-tab{display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 22px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .08);
  color: var(--mute); font-family: var(--font-h); font-size: 17px; font-weight: 500; cursor: pointer; box-shadow: inset 0 0 0 1px var(--line); transition: background .15s, color .15s;}
.tw-tab svg{width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;}
.tw-tab:hover{color: #fff; background: rgba(255, 255, 255, .13);}
.tw-tab.is-on{color: var(--gold-ink); background: linear-gradient(180deg, #ffe45c, var(--gold) 50%, var(--gold-2)); box-shadow: 0 4px 14px rgba(255, 170, 0, .3);}
.tw-tab--end{margin-left: auto;}
.tw-grid{display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px;}
.tw-card{position: relative; display: flex; flex-direction: column; align-items: center; padding: 18px 16px; border-radius: 20px; overflow: hidden;
  background: radial-gradient(120% 70% at 50% 0%, rgba(120, 140, 255, .22), transparent 70%), linear-gradient(180deg, #23399c, #172a78);
  box-shadow: inset 0 0 0 1px rgba(170, 190, 255, .25), 0 8px 20px rgba(0, 0, 20, .35); transition: transform .15s, box-shadow .15s;}
.tw-card:hover{transform: translateY(-3px); box-shadow: inset 0 0 0 1px rgba(255, 210, 31, .55), 0 12px 26px rgba(0, 0, 20, .45);}
.tw-card.is-best{box-shadow: inset 0 0 0 2px var(--gold), 0 0 26px rgba(255, 190, 0, .3), 0 8px 20px rgba(0, 0, 20, .35);}
.tw-card__label{min-height: 20px; margin: 0 0 2px; font-family: var(--font-h); font-size: 12.5px; font-weight: 500; letter-spacing: .06em; color: var(--mute); text-transform: uppercase;}
.tw-gems{display: block; width: 100%; max-width: 220px; height: auto; aspect-ratio: 220 / 140; margin: 2px auto 4px;}
.tw-amt{display: flex; align-items: baseline; gap: 6px; margin: 0; font-family: var(--font-h); font-size: 32px; font-weight: 700; line-height: 1.15; color: var(--gold);
  text-shadow: 0 2px 0 #9a4a00, 0 0 18px rgba(255, 190, 0, .25);}
.tw-unit{font-size: 17px; font-weight: 600; color: var(--gold-2); text-shadow: none;}
.tw-total{margin: 4px 0 12px; min-height: 22px; font-size: 14px; color: var(--mute);}
.tw-total b{color: #fff; font-weight: 500;}
.tw-ribbon{position: absolute; top: 12px; right: 12px; display: inline-flex; align-items: center; gap: 4px; padding: 3px 11px; border-radius: 999px;
  background: linear-gradient(180deg, #ff5a72, #e0203f); color: #fff; font-family: var(--font-h); font-size: 13.5px; font-weight: 500; box-shadow: 0 3px 8px rgba(150, 0, 30, .4);}
.tw-best{position: absolute; top: 12px; left: 12px; padding: 3px 11px; border-radius: 999px; background: var(--gold); color: var(--gold-ink); font-family: var(--font-h);
  font-size: 13px; font-weight: 600;}
.tw-price{display: flex; align-items: baseline; justify-content: center; gap: 6px; width: 100%; min-height: 50px; margin-top: auto; padding: 10px 12px; border: 0; border-radius: 14px;
  background: linear-gradient(180deg, #ffe45c 0%, var(--gold) 45%, var(--gold-2) 100%); color: var(--gold-ink); font-family: var(--font-h); font-size: 22px; font-weight: 700;
  cursor: pointer; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .45), 0 4px 0 #b86a00; transition: transform .1s, filter .15s, box-shadow .1s;}
.tw-price small{font-size: 15px; font-weight: 500;}
.tw-price:hover{filter: brightness(1.07);}
.tw-price:active{transform: translateY(3px); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .45), 0 1px 0 #b86a00;}
.tw-price.is-busy{opacity: .6; cursor: progress;}
.tw-price.is-off, .tw-price:disabled{cursor: not-allowed; filter: grayscale(1) brightness(.75); opacity: .7; transform: none;}
.tw-why{margin: 8px 0 0; font-size: 13px; color: #ffc2cc; text-align: center;}
.tw-empty{display: flex; align-items: center; justify-content: center; gap: 10px; grid-column: 1 / -1; margin: 0; padding: 30px 10px; text-align: center; color: var(--mute); font-size: 17px;}
.tw-empty .tw-btn{margin-left: 6px;}
.tw-tab:focus-visible, .tw-price:focus-visible, .tw-btn:focus-visible, .tw-x:focus-visible, .tw-play:focus-visible, .tw-nav__a:focus-visible, .tw-link:focus-visible, .tw-copy:focus-visible{
  outline: 3px solid #fff; outline-offset: 2px;}

/* ---------------------------------------------------------------- history */
.tw-hist{display: flex; flex-direction: column; gap: 10px;}
.tw-row{display: grid; grid-template-columns: 1fr auto; gap: 4px 14px; padding: 14px 18px; border-radius: 16px; background: rgba(5, 10, 40, .4); box-shadow: inset 0 0 0 1px var(--line);}
.tw-row__main{display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-family: var(--font-h); font-size: 18px; font-weight: 500; color: #fff;}
.tw-row__main img{width: 22px; height: 22px;}
.tw-row__main b{color: var(--gold); font-weight: 600;}
.tw-row__meta{grid-column: 1 / -1; font-size: 13.5px; color: var(--mute); word-break: break-word;}
.tw-row__act{grid-column: 1 / -1; margin-top: 4px;}
.tw-badge{align-self: start; padding: 3px 12px; border-radius: 999px; font-size: 13.5px; font-weight: 500; white-space: nowrap; background: rgba(255, 255, 255, .1); color: var(--mute);}
.tw-badge--credited{background: rgba(34, 192, 107, .18); color: #7df0ac;}
.tw-badge--pending{background: rgba(255, 210, 31, .16); color: var(--gold);}
.tw-badge--failed{background: rgba(255, 61, 90, .18); color: #ffb3c0;}
.tw-badge--expired, .tw-badge--cancelled{background: rgba(255, 255, 255, .08); color: var(--dim);}

/* ---------------------------------------------------------------- notes + footer */
.tw-notes{margin-top: 34px; padding: 24px 30px; border-radius: 22px; background: rgba(19, 34, 92, .55); box-shadow: inset 0 0 0 1px var(--line); color: var(--mute);}
.tw-notes > strong{display: block; margin-bottom: 8px; font-family: var(--font-h); font-size: 20px; font-weight: 600; color: #fff;}
.tw-notes ol{margin: 0; padding-left: 22px;}
.tw-notes li{margin: 6px 0; font-size: 15.5px; line-height: 1.65;}
.tw-notes li strong{color: var(--gold); font-weight: 500;}
.tw-foot{border-top: 1px solid var(--line); background: #04060f;}
.tw-foot__in{display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; width: min(100% - 32px, 1000px); margin: 0 auto; padding: 26px 0 30px;}
.tw-logo--foot{--lh: 40px;}
.tw-foot__nav{display: flex; flex-wrap: wrap; gap: 6px 18px;}
.tw-foot__nav a{color: var(--mute); text-decoration: none; font-size: 15px;}
.tw-foot__nav a:hover{color: #fff;}
.tw-foot__c{margin: 0 0 0 auto; font-size: 13.5px; color: var(--dim);}

/* ---------------------------------------------------------------- payment dialog (white, so the QR scans well) */
.tw-modal{position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(2, 5, 20, .72); backdrop-filter: blur(3px);}
.tw-dialog{position: relative; width: min(100%, 460px); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow-y: auto; padding: 22px 22px 20px; border-radius: 24px;
  background: #fff; color: #1d2752; box-shadow: 0 0 0 3px var(--gold), 0 24px 60px rgba(0, 0, 0, .55); font-size: 15.5px;}
.tw-dialog__title{margin: 0 40px 12px 0; font-family: var(--font-h); font-size: 23px; font-weight: 600; line-height: 1.3; color: var(--navy-1);}
.tw-x{position: absolute; top: 12px; right: 12px; width: 38px; height: 38px; border: 0; border-radius: 50%; background: #eef1fa; color: #2c3870; font-size: 17px; cursor: pointer;}
.tw-x:hover{background: #dfe4f5;}
.tw-sum{display: flex; justify-content: space-between; gap: 10px; padding: 10px 14px; border-radius: 12px; background: #f1f4fc; font-size: 15.5px;}
.tw-sum b{color: #c06a00;}
.tw-qr{display: block; width: min(100%, 260px); height: auto; aspect-ratio: 1; margin: 14px auto 6px; padding: 6px; border-radius: 14px; background: #fff;
  box-shadow: 0 0 0 2px #dfe5f5; image-rendering: pixelated;}
.tw-pay-label{margin: 8px 0 0; text-align: center; font-size: 14.5px; color: #5a6690;}
.tw-amount{display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px 10px; margin: 0; font-family: var(--font-h); font-size: 40px; font-weight: 700; line-height: 1.15; color: var(--navy-3);}
.tw-amount small{font-size: 18px; font-weight: 500; color: #3a4675;}
.tw-copy{border: 0; border-radius: 10px; padding: 7px 12px; background: var(--navy-1); color: var(--gold); font-family: var(--font-h); font-size: 14.5px; font-weight: 500; cursor: pointer;}
.tw-copy.is-done{background: var(--green); color: #fff;}
.tw-exact{margin: 6px 0 10px; padding: 8px 12px; border-radius: 10px; background: #fff3d6; text-align: center; font-size: 14.5px; font-weight: 500; color: #8a4b00;}
.tw-timer{display: flex; align-items: center; gap: 10px; margin: 10px 0 6px;}
.tw-timer__bar{flex: 1 1 auto; height: 9px; border-radius: 999px; background: #e7ebf6; overflow: hidden;}
.tw-timer__fill{display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--gold-2), var(--gold)); transition: width .9s linear;}
.tw-timer__txt{min-width: 64px; text-align: right; font-family: var(--font-h); font-size: 21px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--navy-3);}
.tw-timer.is-low .tw-timer__txt{color: #d0213d;}
.tw-timer.is-low .tw-timer__fill{background: #e53950;}
.tw-state{display: flex; align-items: center; justify-content: center; gap: 10px; margin: 8px 0 4px; font-size: 14.5px; color: #3a4675; text-align: center;}
.tw-spin{width: 16px; height: 16px; flex: 0 0 16px; border: 3px solid rgba(120, 140, 220, .35); border-top-color: var(--gold-2); border-radius: 50%; animation: tw-spin .9s linear infinite;}
@keyframes tw-spin{to{transform: rotate(360deg);}}
.tw-ref{margin: 8px 0 4px; text-align: center; font-size: 13.5px; color: #5a6690; word-break: break-all;}
.tw-ref b{color: #1d2752; font-weight: 600; letter-spacing: .03em;}
.tw-actions{display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 12px;}
.tw-btn{min-height: 46px; padding: 0 22px; border: 0; border-radius: 12px; background: var(--navy-2); color: #fff; font-family: var(--font-h); font-size: 16px; font-weight: 500; cursor: pointer;
  transition: filter .15s;}
.tw-btn:hover{filter: brightness(1.15);}
.tw-btn--gold{background: linear-gradient(180deg, #ffe45c, var(--gold) 50%, var(--gold-2)); color: var(--gold-ink); font-weight: 600; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .4);}
.tw-btn--gold:hover{filter: brightness(1.06);}
.tw-btn--ghost{background: #eef1fa; color: #2c3870;}
.tw-btn--ghost:hover{filter: brightness(.97);}
.tw-btn--danger{background: #e0203f; color: #fff;}
.tw-btn:disabled{opacity: .6; cursor: progress;}
.tw-msg{margin: 10px 0; padding: 12px 14px; border-radius: 12px; background: #f1f4fc; line-height: 1.55;}
.tw-msg--err{background: #fde8ec; color: #8e1426;}
.tw-confirm{margin: 12px 0 0; padding: 12px 14px; border-radius: 12px; background: #fff3d6; color: #6f3d00; font-size: 14.5px; text-align: center;}
.tw-done{text-align: center; padding-top: 4px;}
.tw-done__mark{position: relative; display: flex; align-items: center; justify-content: center; width: 92px; height: 92px; margin: 4px auto 10px; border-radius: 50%;
  background: linear-gradient(180deg, #3bd982, #19a457); color: #fff; font-size: 52px; line-height: 1; box-shadow: 0 0 0 6px #e3f8ec, 0 8px 20px rgba(20, 130, 60, .35);}
.tw-done__title{margin: 0; font-family: var(--font-h); font-size: 26px; font-weight: 600; color: #148045;}
.tw-done__rt{display: flex; align-items: center; justify-content: center; gap: 8px; margin: 4px 0 6px; font-family: var(--font-h); font-size: 36px; font-weight: 700; color: #e08a00;}
.tw-done__rt img{width: 38px; height: 38px;}
.tw-done__bal{margin: 0 0 6px; font-size: 16px; color: #3a4675;}
.tw-done__bal b{color: var(--navy-3); font-family: var(--font-h); font-size: 19px;}

.tw-toast{position: fixed; left: 50%; bottom: 24px; z-index: 120; transform: translateX(-50%); max-width: calc(100% - 32px); padding: 12px 20px; border-radius: 14px;
  background: #1d2752; color: #fff; box-shadow: 0 0 0 1px rgba(255, 210, 31, .4), 0 10px 30px rgba(0, 0, 0, .5); font-size: 15px;}

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1100px){.tw-h1{font-size: 46px;}.tw-sub{font-size: 17px;}}
@media (max-width: 900px){
  .tw-top__in{gap: 14px;}
  .tw-login{grid-template-columns: 1fr;}
  .tw-grid{grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px;}}
@media (max-width: 720px){
  .tw-top__in{flex-wrap: wrap; height: auto; padding: 8px 0 6px; row-gap: 4px;}
  .tw-logo{--lh: 40px;}
  .tw-nav{order: 3; width: 100%; justify-content: space-between; gap: 4px;}
  .tw-nav__a{flex: 1 1 0; justify-content: center; height: 36px; padding: 0 6px; font-size: 14.5px; gap: 5px;}
  .tw-nav__a svg{width: 16px; height: 16px;}
  .tw-top__end{gap: 6px; min-width: 0;}
  .tw-guest, .tw-userbox{gap: 6px; min-width: 0;}
  .tw-hbtn{height: 34px; padding: 0 12px; font-size: 14px;}
  .tw-chip{height: 34px; max-width: 190px; padding: 0 10px; font-size: 13.5px; gap: 4px;}
  .tw-chip b{font-size: 14.5px;}
  .tw-hout{height: 34px; padding: 0 8px; font-size: 13px;}
  .tw-play{display: none;}
  .tw-nav__a--play{display: inline-flex; color: var(--gold);}
  .tw-nav__a--play svg{fill: currentColor; stroke: none;}
  .tw-hero{height: 196px; background:
    linear-gradient(180deg, rgba(7, 11, 30, 0) 70%, rgba(11, 22, 64, .9) 100%),
    var(--atlas) 50% -95px / 620px auto no-repeat, #070b1e; border-bottom-width: 4px;}
  .tw-body{padding: 24px 0 50px;}
  .tw-h1{font-size: 36px;}
  .tw-sub{font-size: 15px; line-height: 1.65; margin-bottom: 20px;}
  .tw-wrap, .tw-shell{width: calc(100% - 20px);}
  .tw-alert{padding: 15px 16px; border-radius: 18px; border-left-width: 6px;}
  .tw-alert strong{font-size: 18px;}
  .tw-alert p{font-size: 14.5px;}
  .tw-login__form{grid-template-columns: 1fr;}
  .tw-account{padding: 12px 16px; gap: 4px 14px; font-size: 15px;}
  .tw-account__who{flex: 1 1 100%;}
  .tw-account__bal b{font-size: 22px;}
  .tw-shell{padding: 14px 10px 16px; border-radius: 22px;}
  .tw-tabs{gap: 8px; margin-bottom: 12px;}
  .tw-tab{min-height: 40px; padding: 0 14px; font-size: 15px; gap: 6px;}
  .tw-grid{gap: 10px;}
  .tw-card{padding: 34px 8px 10px; border-radius: 16px;}
  .tw-card__label{font-size: 11px;}
  .tw-amt{font-size: 24px; gap: 4px;}
  .tw-unit{font-size: 14px;}
  .tw-total{font-size: 12px; margin-bottom: 8px; min-height: 19px;}
  .tw-ribbon{top: 8px; right: 8px; padding: 2px 8px; font-size: 11.5px;}
  .tw-best{position: static; margin: -6px 0 2px; padding: 1px 10px; font-size: 11.5px;}
  .tw-price{min-height: 44px; font-size: 18px; border-radius: 12px;}
  .tw-price small{font-size: 13px;}
  .tw-row{padding: 12px 14px;}
  .tw-row__main{font-size: 16px;}
  .tw-notes{padding: 18px 18px; margin-top: 26px;}
  .tw-notes li{font-size: 14.5px;}
  .tw-foot__c{margin-left: 0; width: 100%;}
  .tw-dialog{padding: 18px 16px 16px; border-radius: 20px;}
  .tw-dialog__title{font-size: 20px;}
  .tw-amount{font-size: 34px;}
  .tw-qr{width: min(100%, 230px);}}
@media (max-height: 760px) and (min-width: 721px){.tw-qr{width: 200px;}.tw-dialog{padding-top: 18px;}}
@media (max-width: 360px){.tw-amt{font-size: 21px;}.tw-price{font-size: 16px;}.tw-nav__a svg{display: none;}}
@media (prefers-reduced-motion: reduce){.tw-spin{animation: none;}.tw-timer__fill{transition: none;}.tw-card, .tw-price, .tw-play{transition: none;}.tw-card:hover{transform: none;}.tw-login.is-flash{animation: none;}}

/* ---------------------------------------------------------------- site header v2 (7 menu items: หน้าแรก ดาวน์โหลด เติมเงิน แรงค์ แคลน Discord + เข้าเล่น)
   The same block sits at the end of home.css, topup.css, download.css and rankclan.css so every page's header looks and wraps the same:
   > 1180px one row (menu without icons, online pill = person icon + number, logout = icon);
   721-1180px two rows: logo + online + account, then the whole menu (with icons) incl. "เข้าเล่น";
   <= 720px the menu row scrolls sideways ("เข้าเล่น" first), edge to edge with a fade on the right. */
.tw-top__in{gap: 22px;}
.tw-nav{gap: 2px; min-width: 0;}
.tw-nav__a{padding: 0 12px; white-space: nowrap;}
.tw-nav__a svg{display: none;}
.tw-nav__a--dc svg{display: block; width: 19px; height: 19px; fill: currentColor; stroke: none;}
.tw-nav__a--dc:hover{color: #fff; background: rgba(88, 101, 242, .32);}
.tw-nav__a--play{display: none;}
.tw-top__end{gap: 10px; margin-left: auto;}
.tw-top .tw-online{flex: 0 0 auto; margin-left: -10px; font-size: 0; gap: 6px; padding: 0 11px;}
.tw-top .tw-online b{font-size: 13px;}
.tw-top .tw-online b::before{content: ''; display: inline-block; width: 13px; height: 13px; margin-right: 4px; vertical-align: -1px; background: #8ff0b6;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='7.5' r='4.5'/%3E%3Cpath d='M3.5 22a8.5 8.5 0 0 1 17 0z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='7.5' r='4.5'/%3E%3Cpath d='M3.5 22a8.5 8.5 0 0 1 17 0z'/%3E%3C/svg%3E") center / contain no-repeat;}
.tw-chip{max-width: 230px;}
.tw-hout{position: relative; flex: 0 0 auto; width: 38px; padding: 0; font-size: 0; background: rgba(255, 255, 255, .07); box-shadow: inset 0 0 0 1px var(--line);}
.tw-hout::before{content: ''; position: absolute; inset: 0; margin: auto; width: 17px; height: 17px; background: var(--mute);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 4h4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2h-4M10 8l-4 4 4 4M6 12h10'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 4h4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2h-4M10 8l-4 4 4 4M6 12h10'/%3E%3C/svg%3E") center / contain no-repeat;}
.tw-hout:hover::before{background: #fff;}
.tw-nav__a:focus-visible, .tw-hout:focus-visible, .tw-hbtn:focus-visible, .tw-play:focus-visible{outline: 3px solid #fff; outline-offset: 2px;}
@media (max-width: 1180px){
  .tw-top__in{flex-wrap: wrap; height: auto; padding: 8px 0 6px; row-gap: 4px; gap: 10px;}
  .tw-nav{order: 3; flex: 1 1 100%; width: 100%; justify-content: flex-start; gap: 4px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none;}
  .tw-nav::-webkit-scrollbar{display: none;}
  .tw-nav__a{flex: 1 0 auto; justify-content: center; height: 38px; padding: 0 12px; font-size: 15px; gap: 6px;}
  .tw-nav__a svg{display: block; width: 16px; height: 16px;}
  .tw-nav__a--dc svg{width: 17px; height: 17px;}
  .tw-nav__a--play{display: inline-flex; order: -1; color: var(--gold);}
  .tw-nav__a--play svg{fill: currentColor; stroke: none;}
  .tw-play{display: none;}
  .tw-top .tw-online{order: 1; margin-left: 0; height: 30px;}
  .tw-top__end{order: 2; gap: 6px; min-width: 0;}}
@media (max-width: 720px){
  .tw-top__in{gap: 8px;}
  .tw-nav{flex: 0 0 auto; width: calc(100% + 32px); margin: 0 -16px; padding: 0 16px; gap: 2px;
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 30px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 30px), transparent);}
  .tw-nav__a{flex: 0 0 auto; height: 36px; padding: 0 11px; font-size: 14.5px; gap: 5px;}
  .tw-nav__a svg{display: block;}
  .tw-guest, .tw-userbox{gap: 6px; min-width: 0;}
  .tw-hbtn{height: 34px; padding: 0 11px; font-size: 13.5px;}
  .tw-chip{height: 34px; max-width: 142px; padding: 0 10px; font-size: 13.5px; gap: 4px;}
  .tw-chip b{font-size: 14.5px;}
  .tw-hout{width: 34px; height: 34px;}
  .tw-top .tw-online{height: 28px; padding: 0 8px; gap: 5px;}
  .tw-top .tw-online i{display: none;}
  .tw-top .tw-online b::before{margin-right: 3px;}}
@media (max-width: 380px){
  .tw-hbtn{padding: 0 8px; font-size: 13px;}
  .tw-chip{max-width: 128px;}}
@media (max-width: 720px){.tw-logo{--lh: 36px;}}
@media (max-width: 380px){.tw-logo{--lh: 32px;}}
