/* TUTU game top-up — สีและตัวอักษรหลักของร้าน */
:root {
  --paper: #fff8fb;
  --card: #ffffff;
  --ink: #2b2140;
  --ink-soft: #7a6b86;
  --line: #f5dce7;
  --grape: #f2468b;       /* ชมพูหลัก */
  --grape-deep: #d62f74;
  --pink: #ff7aa8;
  --pink-soft: #ffe7f0;
  --sun: #ffc93c;
  --mint: #12a983;        /* เขียวมิ้นเข้ม (สถานะสำเร็จ) */
  --mint-mid: #5fd6b8;
  --mint-soft: #ddf7ef;
  --red: #d8334a;
  --grad: linear-gradient(120deg, #f2468b 0%, #ff7aa8 55%, #ff9fb0 100%);
  --grad-mint: linear-gradient(120deg, #12a983, #3fcfae);
  --shadow: 0 10px 30px -12px rgba(242, 70, 139, 0.35);
  --display: 'Mitr', 'Sarabun', system-ui, sans-serif;
  --body: 'Sarabun', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--body); font-size: 17px; line-height: 1.6; }
a { color: var(--grape); }
h1, h2, h3 { font-family: var(--display); font-weight: 500; line-height: 1.25; margin: 0; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }
[hidden] { display: none !important; }

.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; max-width: 1040px; margin: 0 auto; }
.brand { display: flex; align-items: baseline; gap: 8px; text-decoration: none; color: var(--ink); }
.brand-mark { font-family: var(--display); font-weight: 600; font-size: 30px; letter-spacing: -0.5px; color: #fff; background: var(--grape); padding: 0 12px 2px; border-radius: 12px 12px 12px 2px; box-shadow: 4px 4px 0 var(--pink); }
.brand-sub { font-family: var(--display); font-size: 16px; color: var(--ink-soft); }
.top-link { font-family: var(--display); font-size: 15px; text-decoration: none; padding: 8px 12px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); white-space: nowrap; }
.notice { background: var(--sun); color: #3a2c00; text-align: center; padding: 8px 16px; font-size: 15px; font-weight: 500; }
main { max-width: 1040px; margin: 0 auto; padding: 8px 16px 140px; outline: none; }
.foot { text-align: center; color: var(--ink-soft); font-size: 14px; padding: 24px 16px 120px; }

.lead { margin: 18px 0 20px; }
.lead h1 { font-size: clamp(30px, 7vw, 46px); font-weight: 600; letter-spacing: -0.5px; }
.lead p { margin: 6px 0 0; color: var(--ink-soft); max-width: 34em; }
.search { width: 100%; max-width: 420px; padding: 12px 16px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--card); margin-bottom: 18px; }

.games { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.game { display: block; text-decoration: none; color: var(--ink); background: var(--card); border: 1.5px solid var(--line); border-radius: 18px; overflow: hidden; }
.game:hover { border-color: var(--grape); }
.game-art { aspect-ratio: 4 / 3; display: grid; place-items: center; font-family: var(--display); font-size: 44px; font-weight: 600; color: #fff; background: var(--grape); }
.game-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tone-1 { background: var(--pink); } .tone-2 { background: #2b9be0; } .tone-3 { background: var(--mint); } .tone-4 { background: #f08a24; }
.game-name { padding: 10px 12px 2px; font-family: var(--display); font-size: 17px; }
.game-cat { padding: 0 12px 12px; font-size: 14px; color: var(--ink-soft); }
.empty { padding: 40px 0; color: var(--ink-soft); }

.back { display: inline-block; margin: 10px 0 4px; font-size: 15px; text-decoration: none; }
.game-head h1 { font-size: clamp(26px, 6vw, 36px); font-weight: 600; }
.step { margin-top: 26px; }
.step h2 { font-size: 20px; display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.step-no { width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-size: 16px; flex: none; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; max-width: 640px; }
.field label { display: block; font-weight: 500; margin-bottom: 4px; }
.field input, .field select { width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--card); }
.field input:focus, .field select:focus { border-color: var(--grape); }
.hint { font-size: 14px; color: var(--ink-soft); margin: 8px 0 0; max-width: 40em; }
.warn { color: #8a5a00; }

.packs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.pack { position: relative; }
.pack input { position: absolute; opacity: 0; inset: 0; }
.pack-body { display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 14px; border: 1.5px solid var(--line); border-radius: 16px; background: var(--card); cursor: pointer; }
.pack-name { font-family: var(--display); font-size: 16px; line-height: 1.3; }
.pack-price { margin-top: auto; font-family: var(--display); font-size: 20px; font-weight: 600; color: var(--grape-deep); }
.pack-limit { font-size: 13px; color: #8a5a00; }
.pack input:checked + .pack-body { border-color: var(--grape); background: #f1edff; box-shadow: 3px 3px 0 var(--grape); }
.pack input:focus-visible + .pack-body { outline: 3px solid var(--sun); outline-offset: 2px; }

.paybar { position: fixed; left: 0; right: 0; bottom: 0; background: var(--ink); color: #fff; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
.paybar-in { max-width: 1008px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.paybar-sum { min-width: 0; }
.paybar-label { font-size: 14px; opacity: 0.75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.paybar-total { font-family: var(--display); font-size: 24px; font-weight: 600; line-height: 1.1; }
.btn { font-family: var(--display); font-size: 17px; font-weight: 500; border: 0; border-radius: 14px; padding: 13px 22px; background: var(--pink); color: #fff; cursor: pointer; text-decoration: none; display: inline-block; text-align: center; }
.btn:disabled { background: #6a668a; cursor: not-allowed; }
.btn-grape { background: var(--grape); }
.btn-line { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.error { background: #ffe9ec; color: #8f1226; border-radius: 12px; padding: 10px 14px; margin-top: 14px; max-width: 640px; }

.ticket { max-width: 520px; margin: 22px auto 0; background: var(--card); border: 1.5px solid var(--line); border-radius: 22px; overflow: hidden; }
.ticket-top { padding: 22px 22px 18px; color: #fff; background: var(--grape); }
.ticket-top.is-ok { background: var(--mint); }
.ticket-top.is-bad { background: var(--red); }
.ticket-top.is-wait { background: var(--ink); }
.ticket-status { font-family: var(--display); font-size: 28px; font-weight: 600; }
.ticket-hint { margin: 2px 0 0; opacity: 0.92; }
.ticket-body { padding: 18px 22px 22px; }
.rows { margin: 0; }
.rows div { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.rows dt { color: var(--ink-soft); flex: none; }
.rows dd { margin: 0; text-align: right; font-weight: 500; overflow-wrap: anywhere; }
.rows .total dd { font-family: var(--display); font-size: 22px; color: var(--grape-deep); }
.paybox { margin-top: 18px; text-align: center; }
.paybox img { width: 240px; max-width: 100%; border: 1.5px solid var(--line); border-radius: 14px; }
.paybox .btn { width: 100%; }
.pay-step { font-family: var(--display); font-size: 17px; margin: 14px 0 8px; text-align: left; }
.paybox img.qr { width: 260px; border: 1.5px solid var(--line); border-radius: 14px; image-rendering: pixelated; }
.slipbox { margin-top: 10px; text-align: center; }
.slip-btn { width: 100%; cursor: pointer; }
.slip-btn.busy { opacity: 0.6; pointer-events: none; }
.slip-msg { margin: 10px 0 0; font-size: 15px; min-height: 1.4em; }
.slip-msg.bad { color: #8f1226; }
.slip-msg.good { color: #06664e; }
.countdown { font-family: var(--display); font-size: 18px; margin: 10px 0; }
.progress { display: flex; gap: 6px; margin-top: 14px; }
.progress span { flex: 1; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.3); }
.progress span.on { background: #fff; }
.ticket-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.mine { max-width: 560px; list-style: none; padding: 0; margin: 14px 0; }
.mine a { display: flex; justify-content: space-between; gap: 12px; padding: 14px 16px; margin-bottom: 8px; background: var(--card); border: 1.5px solid var(--line); border-radius: 14px; text-decoration: none; color: var(--ink); }
.mine small { color: var(--ink-soft); }
@media (prefers-reduced-motion: no-preference) { .btn, .pack-body, .game { transition: border-color 0.12s, background-color 0.12s; } }

/* ---------- สมาชิก ---------- */
.top-nav { display: flex; gap: 8px; align-items: center; }
.top-link.plain { border-color: transparent; background: transparent; }
.wallet-pill b { color: var(--grape-deep); font-weight: 600; }
.auth { max-width: 420px; margin: 26px auto 0; background: var(--card); border: 1.5px solid var(--line); border-radius: 22px; padding: 24px 22px; }
.auth.inline { margin: 0 0 16px; max-width: 460px; }
.auth h1 { font-size: 28px; font-weight: 600; }
.auth h2, .topup h2, .sub { font-size: 20px; margin: 0 0 10px; }
.auth .field { margin-top: 14px; }
.auth .btn { width: 100%; margin-top: 16px; }
.auth-switch { text-align: center; margin: 14px 0 0; }
.acct-tabs { display: flex; gap: 6px; border-bottom: 1.5px solid var(--line); margin: 6px 0 18px; overflow-x: auto; }
.acct-tab { font-family: var(--display); font-size: 16px; padding: 10px 12px; text-decoration: none; color: var(--ink-soft); border-bottom: 3px solid transparent; margin-bottom: -1.5px; white-space: nowrap; }
.acct-tab.on { color: var(--ink); border-bottom-color: var(--grape); }
.wallet-card { max-width: 460px; background: var(--grape); color: #fff; border-radius: 22px; padding: 20px 22px; box-shadow: 5px 5px 0 var(--pink); }
.wallet-card .hint { color: rgba(255, 255, 255, 0.85); }
.wallet-label { font-size: 15px; opacity: 0.85; }
.wallet-amount { font-family: var(--display); font-size: 38px; font-weight: 600; line-height: 1.2; }
.topup { max-width: 460px; margin: 22px 0; background: var(--card); border: 1.5px solid var(--line); border-radius: 20px; padding: 18px; }
.topup .btn { width: 100%; margin-top: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.chip-amt { font-family: var(--display); font-size: 16px; padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--card); cursor: pointer; }
.chip-amt:hover { border-color: var(--grape); }
.ledger { max-width: 560px; list-style: none; padding: 0; margin: 0; }
.ledger li { display: flex; justify-content: space-between; gap: 12px; padding: 12px 4px; border-bottom: 1px dashed var(--line); }
.ledger small, .mine .right small { color: var(--ink-soft); }
.ledger b { font-family: var(--display); white-space: nowrap; }
.pos { color: var(--mint); }
.neg { color: var(--red); }
.mine .right { text-align: right; white-space: nowrap; }
.walletpay { margin-top: 18px; padding: 14px; border-radius: 16px; background: #f1edff; text-align: center; }
.walletpay .btn { width: 100%; }
.walletpay.low p { margin: 0; }
.or-line { text-align: center; color: var(--ink-soft); font-size: 14px; margin: 16px 0 0; }
.logout { margin-top: 4px; }


/* ---------- ธีมชมพู + มิ้น ---------- */
body {
  background:
    radial-gradient(600px 380px at 8% -60px, rgba(255, 122, 168, 0.22), transparent 70%),
    radial-gradient(520px 360px at 100% 120px, rgba(95, 214, 184, 0.22), transparent 70%),
    var(--paper);
  background-repeat: no-repeat;
}
.top-wrap { position: sticky; top: 0; z-index: 20; background: rgba(255, 248, 251, 0.82); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid rgba(245, 220, 231, 0.8); }
.top { padding: 8px 16px; }
.brand { flex: none; }
.brand img { display: block; height: 52px; width: auto; }
.top-link { border-color: var(--line); transition: border-color .15s, color .15s; }
.top-link:hover { border-color: var(--pink); color: var(--grape-deep); }
.wallet-pill { background: var(--mint-soft); border-color: #bfeee0; }
.wallet-pill b { color: #0b7f62; }

.lead h1 { color: var(--ink); }
.hero { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 18px 0 22px; padding: 26px 26px; border-radius: 28px; background: linear-gradient(135deg, #ffe3ee 0%, #fff4f8 50%, #dcf7ef 100%); border: 1.5px solid #fbd3e2; position: relative; overflow: hidden; }
.hero::after { content: ''; position: absolute; right: -50px; bottom: -70px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(95, 214, 184, 0.35), transparent 70%); pointer-events: none; }
.hero-text { position: relative; z-index: 1; min-width: 0; }
.hero .hl { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; padding-left: .2em; }
.hero-logo { width: 230px; max-width: 34%; height: auto; flex: none; position: relative; z-index: 1; filter: drop-shadow(0 8px 18px rgba(242, 70, 139, 0.18)); }
.perks { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.perks li { font-size: 14px; font-weight: 500; padding: 5px 12px 5px 28px; border-radius: 999px; background: #fff; border: 1px solid #c9f0e3; color: #0b7f62; position: relative; }
.perks li::before { content: ''; position: absolute; left: 11px; top: 50%; width: 9px; height: 9px; margin-top: -4.5px; border-radius: 50%; background: var(--mint-mid); box-shadow: 0 0 0 3px #dff7ef; }

.search { border-radius: 999px; padding: 12px 18px; box-shadow: 0 4px 14px -8px rgba(242, 70, 139, 0.3); }
.search:focus { border-color: var(--pink); outline: none; box-shadow: 0 0 0 4px var(--pink-soft); }

.game { border-radius: 22px; box-shadow: 0 2px 0 rgba(245, 220, 231, 0.9); }
.game:hover { border-color: var(--pink); box-shadow: var(--shadow); }
.game-art { background: var(--grad); }
.tone-1 { background: var(--grad-mint); } .tone-2 { background: linear-gradient(120deg, #ff9fb0, #ffc2b4); } .tone-3 { background: linear-gradient(120deg, #3fcfae, #9be7d3); } .tone-4 { background: linear-gradient(120deg, #d62f74, #ff7aa8); }
.game-name { font-weight: 500; }

.step-no { background: var(--grad); box-shadow: 0 4px 10px -4px rgba(242, 70, 139, 0.6); }
.field input, .field select { transition: border-color .15s, box-shadow .15s; }
.field input:focus, .field select:focus { border-color: var(--pink); outline: none; box-shadow: 0 0 0 4px var(--pink-soft); }

.pack-body { border-radius: 18px; transition: border-color .15s, box-shadow .15s, transform .15s; }
.pack-body:hover { border-color: var(--pink); }
.pack-price { color: var(--grape-deep); }
.pack input:checked + .pack-body { border-color: var(--grape); background: #fff0f6; box-shadow: 0 0 0 3px var(--pink-soft), var(--shadow); }
.pack input:checked + .pack-body::after { content: '✓'; position: absolute; top: 8px; right: 8px; width: 22px; height: 22px; border-radius: 50%; background: var(--mint); color: #fff; font-size: 13px; font-weight: 700; display: grid; place-items: center; }

.paybar { background: rgba(255, 255, 255, 0.94); color: var(--ink); border-top: 1.5px solid var(--line); box-shadow: 0 -10px 30px -18px rgba(242, 70, 139, 0.45); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.paybar-label { color: var(--ink-soft); opacity: 1; }
.paybar-total { color: var(--grape-deep); }

.btn { background: var(--grad); box-shadow: 0 8px 18px -10px rgba(214, 47, 116, 0.8); text-shadow: 0 1px 1px rgba(150, 20, 70, 0.25); }
.btn:disabled { background: #cbbfd0; box-shadow: none; text-shadow: none; }
.btn-grape { background: var(--grad-mint); box-shadow: 0 8px 18px -10px rgba(18, 169, 131, 0.8); text-shadow: 0 1px 1px rgba(5, 90, 70, 0.3); }
.btn-line { background: #fff; box-shadow: none; text-shadow: none; }
.btn-line:hover { border-color: var(--pink); }

.ticket { border-radius: 26px; box-shadow: var(--shadow); }
.ticket-top { background: var(--grad); }
.ticket-top.is-ok { background: var(--grad-mint); }
.rows .total dd { color: var(--grape-deep); }
.paybox img.qr { border-color: var(--pink); box-shadow: 0 0 0 6px var(--pink-soft); }

.mine a { transition: border-color .15s, box-shadow .15s; }
.mine a:hover { border-color: var(--pink); box-shadow: var(--shadow); }

.auth { box-shadow: var(--shadow); border-radius: 26px; overflow: hidden; }
.auth::before { content: ''; display: block; height: 6px; margin: -24px -22px 18px; background: linear-gradient(90deg, #f2468b, #ff9fb0, #5fd6b8); }
.acct-tab.on { border-bottom-color: var(--grape); color: var(--grape-deep); }
.wallet-card { background: linear-gradient(130deg, #f2468b 0%, #ff8fae 55%, #5fd6b8 130%); box-shadow: 0 16px 30px -16px rgba(242, 70, 139, 0.7); position: relative; overflow: hidden; }
.wallet-card::after { content: ''; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%; background: rgba(255, 255, 255, 0.16); }
.chip-amt:hover { border-color: var(--pink); background: #fff0f6; }
.walletpay { background: var(--mint-soft); border: 1.5px solid #bfeee0; }

.foot { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.foot-logo { width: 110px; height: auto; opacity: 0.9; }

@media (prefers-reduced-motion: no-preference) {
  .game { transition: transform .18s, box-shadow .18s, border-color .18s; }
  .game:hover { transform: translateY(-3px); }
  .btn { transition: transform .12s, box-shadow .12s, filter .12s; }
  .btn:not(:disabled):hover { transform: translateY(-1px); filter: brightness(1.04); }
  .btn:not(:disabled):active { transform: translateY(1px); }
}
@media (max-width: 560px) {
  .brand img { height: 40px; }
  .hero { padding: 20px 18px; }
  .hero-logo { display: none; }
  .top-link { padding: 7px 10px; font-size: 14px; }
}
.auth-reason { margin: 12px 0 0; padding: 10px 14px; border-radius: 12px; background: var(--pink-soft); color: #a3165a; font-weight: 500; font-size: 15px; }

/* ---------- หัวกระต่าย (เกมโปรด) ---------- */
.game-cell { position: relative; }
.game-cell .game { height: 100%; }
.fav { position: absolute; top: 8px; right: 8px; width: 40px; height: 40px; padding: 4px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.92); box-shadow: 0 4px 12px -4px rgba(214, 47, 116, 0.45); cursor: pointer; display: grid; place-items: center; -webkit-tap-highlight-color: transparent; }
.fav:hover { background: #fff; }
.bunny { width: 28px; height: 28px; display: block; overflow: visible; }
.bunny .b-ear, .bunny .b-head { fill: #fff; stroke: #f59bbf; stroke-width: 1.6; }
.bunny .b-in { fill: #ffe0ec; }
.bunny .b-eye { fill: #d7aec0; }
.bunny .b-nose { fill: #f59bbf; }
.bunny .b-blush { fill: transparent; }
.fav.on .bunny .b-ear, .fav.on .bunny .b-head { fill: #ff6fa5; stroke: #f2468b; }
.fav.on .bunny .b-in { fill: #ffd0e2; }
.fav.on .bunny .b-eye { fill: #2b2140; }
.fav.on .bunny .b-nose { fill: #fff; }
.fav.on .bunny .b-blush { fill: #ffb6d0; }
.fav-big { position: static; width: auto; height: auto; display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px 6px 8px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; box-shadow: none; font-family: var(--display); font-size: 15px; color: var(--ink-soft); }
.fav-big.on { border-color: #ffc0d8; background: var(--pink-soft); color: var(--grape-deep); }
.game-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.sec-title { display: flex; align-items: center; gap: 8px; font-size: 20px; margin: 4px 0 12px; }
.sec-title .bunny { width: 26px; height: 26px; }
.sec-title .bunny .b-ear, .sec-title .bunny .b-head { fill: #ff6fa5; stroke: #f2468b; }
.sec-title .bunny .b-in { fill: #ffd0e2; }
.sec-title .bunny .b-eye { fill: #2b2140; }
.sec-title .bunny .b-nose { fill: #fff; }
.sec-title .bunny .b-blush { fill: #ffb6d0; }
.fav-sec { margin-bottom: 26px; padding: 16px; border-radius: 24px; background: linear-gradient(135deg, #fff0f6, #eefbf6); border: 1.5px dashed #fbc6da; }
.all-title { margin-top: 0; }
@media (prefers-reduced-motion: no-preference) {
  .fav { transition: transform .15s, background-color .15s; }
  .fav:hover .b-ears { transform: translateY(-1px); }
  .b-ears { transition: transform .15s; transform-origin: 16px 16px; }
  .fav.pop .bunny { animation: bunny-pop .5s ease; }
  .fav.pop .b-ears { animation: bunny-ears .6s ease; }
}
@keyframes bunny-pop { 0% { transform: scale(1); } 35% { transform: scale(1.32) rotate(-6deg); } 65% { transform: scale(0.92) rotate(3deg); } 100% { transform: scale(1); } }
@keyframes bunny-ears { 0%, 100% { transform: rotate(0); } 30% { transform: rotate(-8deg) translateY(-2px); } 60% { transform: rotate(6deg); } }

/* ---------- ปุ่ม Google ---------- */
.btn-google { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; margin-top: 16px; padding: 12px 16px; border-radius: 14px; border: 1.5px solid #e3dbe6; background: #fff; color: #2b2140; font-family: var(--display); font-size: 16px; font-weight: 500; text-decoration: none; box-shadow: 0 4px 12px -8px rgba(43, 33, 64, 0.35); }
.btn-google:hover { border-color: #c9bdd0; background: #fdfbff; }
.g-logo { width: 20px; height: 20px; flex: none; }
.or-sep { display: flex; align-items: center; gap: 10px; color: var(--ink-soft); font-size: 14px; margin: 16px 0 0; }
.or-sep::before, .or-sep::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.g-linked { display: flex; align-items: center; gap: 10px; max-width: 460px; margin: 0 0 14px; padding: 10px 14px; border-radius: 14px; background: #fff; border: 1.5px solid var(--line); font-size: 15px; }
.btn-fb { background: #1877f2; border-color: #1877f2; color: #fff; margin-top: 10px; }
.btn-fb:hover { background: #166fe0; border-color: #166fe0; }
.btn-google + .or-sep, .btn-fb + .or-sep { margin-top: 16px; }

/* ---------- หน้านโยบาย ---------- */
.legal { max-width: 760px; padding-top: 24px; padding-bottom: 60px; }
.legal h1 { font-size: clamp(28px, 6vw, 38px); font-weight: 600; }
.legal h2 { font-size: 21px; margin: 26px 0 8px; color: var(--grape-deep); }
.legal ul { padding-left: 1.2em; margin: 0; }
.legal li { margin-bottom: 6px; }
.foot-links { font-size: 14px; }
.foot-links a { color: var(--ink-soft); }

/* ---------- จัดตัวหนังสือให้เรียงสวย ---------- */
h1, h2, h3, .ticket-status { text-wrap: balance; }
p, li, .hint { text-wrap: pretty; }
.game { display: flex; flex-direction: column; }
.game-name { font-size: 16px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: calc(1.35em * 2 + 12px); padding-top: 12px; }
.game-cat { margin-top: auto; padding-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pack-name { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pack-price, .paybar-total, .wallet-amount, .rows dd, .ledger b { font-variant-numeric: tabular-nums; }
.perks li { white-space: nowrap; }

/* =========================================================
   หน้าร้านแบบใหม่ (เมนู + แบนเนอร์มาสคอต + หมวด + ยอดนิยม)
   ========================================================= */
.ic { width: 20px; height: 20px; display: block; flex: none; }
.top { max-width: 1180px; gap: 16px; padding: 10px 16px; }
.brand img { height: 56px; }
.mainnav { display: flex; gap: 4px; align-items: center; margin: 0 auto; }
.nav-a { display: inline-flex; align-items: center; gap: 7px; padding: 9px 15px; border-radius: 999px; text-decoration: none; color: var(--ink); font-family: var(--display); font-size: 15.5px; white-space: nowrap; transition: background-color .15s, color .15s; }
.nav-a .ic { width: 18px; height: 18px; color: var(--grape); }
.nav-a:hover { background: var(--pink-soft); }
.nav-a.on { background: var(--grad); color: #fff; box-shadow: 0 8px 18px -10px rgba(214, 47, 116, .8); }
.nav-a.on .ic { color: #fff; }
.top-actions { display: flex; align-items: center; gap: 10px; flex: none; }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 1.5px solid var(--line); color: var(--ink); }
.icon-btn:hover { border-color: var(--pink); color: var(--grape-deep); }
.login-btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px; background: var(--grad); color: #fff; text-decoration: none; font-family: var(--display); font-size: 15.5px; white-space: nowrap; box-shadow: 0 8px 18px -10px rgba(214, 47, 116, .8); }
.login-btn.me-btn { background: #fff; color: var(--ink); border: 1.5px solid var(--line); box-shadow: none; padding: 9px 14px; }
.login-btn.me-btn .ic { color: var(--grape); }
main { max-width: 1180px; }

/* แบนเนอร์ */
.hero2 { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: 12px; margin: 18px 0 18px; padding: 34px 40px; border-radius: 32px; overflow: hidden;
  background: radial-gradient(520px 320px at 85% 40%, rgba(95, 214, 184, .35), transparent 70%), radial-gradient(500px 300px at 60% 110%, rgba(255, 122, 168, .28), transparent 70%), linear-gradient(120deg, #fff0f6 0%, #fff7fa 45%, #e9fbf5 100%);
  border: 1.5px solid #fbd3e2; }
.hero2-text { position: relative; z-index: 2; }
.eyebrow { margin: 0 0 6px; font-family: var(--display); letter-spacing: .32em; font-size: 14px; color: var(--ink-soft); }
.hero2 h1 { font-size: clamp(36px, 5.6vw, 64px); font-weight: 600; line-height: 1.12; letter-spacing: -.5px; text-wrap: initial; }
.hero2 .hl { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; padding: 0 .12em; }
.hero2 .h1-2 { display: inline-block; padding-left: 1.6em; }
.script { font-family: 'Caveat', 'Mali', cursive; font-size: 30px; color: #c45a8a; margin: 4px 0 18px; transform: rotate(-4deg); transform-origin: left; }
.cta { display: inline-flex; align-items: center; gap: 16px; padding: 10px 10px 10px 28px; border-radius: 999px; background: var(--grad); color: #fff; text-decoration: none; font-family: var(--display); font-size: 19px; box-shadow: 0 16px 30px -14px rgba(214, 47, 116, .85); }
.cta-ar { width: 44px; height: 44px; border-radius: 50%; background: #fff; color: var(--grape); display: grid; place-items: center; }
.perks2 { list-style: none; padding: 0; margin: 26px 0 0; display: flex; flex-wrap: wrap; gap: 14px 26px; }
.perks2 li, .why3 li { display: flex; align-items: center; gap: 10px; }
.perks2 b, .why3 b, .steps3 b { display: block; font-family: var(--display); font-weight: 500; font-size: 16px; line-height: 1.25; }
.perks2 small, .why3 small, .steps3 small { display: block; color: var(--ink-soft); font-size: 13.5px; line-height: 1.35; }
.pk { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: #fff; box-shadow: 0 6px 16px -8px rgba(214, 47, 116, .45); flex: none; }
.pk .ic { width: 22px; height: 22px; }
.pk-bolt { color: #ff6fa5; } .pk-shield { color: var(--mint); } .pk-heart { color: #ff7aa8; }

.hero2-art { position: relative; min-height: 340px; display: grid; place-items: center; }
.mascot { position: relative; z-index: 2; width: min(330px, 92%); height: auto; filter: drop-shadow(0 18px 28px rgba(242, 70, 139, .22)); }
.hero2-logo { position: absolute; z-index: 3; left: 4%; bottom: 6%; width: 150px; height: auto; transform: rotate(-6deg); filter: drop-shadow(0 6px 12px rgba(242, 70, 139, .25)); }
.blob { position: absolute; border-radius: 50%; }
.b1 { width: 300px; height: 300px; background: radial-gradient(circle at 35% 35%, #fff, #ffd9e8 60%, #ffc2da); opacity: .9; }
.b2 { width: 120px; height: 120px; right: 4%; top: 2%; background: radial-gradient(circle at 35% 35%, #fff, #c9f4e7 70%); }
.spark { position: absolute; color: #ff8fb5; font-size: 22px; z-index: 1; }
.s1 { left: 10%; top: 10%; font-size: 26px; } .s2 { right: 16%; bottom: 18%; color: var(--mint-mid); font-size: 30px; } .s3 { left: 24%; bottom: 30%; color: #ffc93c; font-size: 20px; }
.planet { position: absolute; right: 2%; bottom: 8%; width: 46px; height: 46px; border-radius: 50%; background: linear-gradient(135deg, #ffd0e2, #ff9fc0); z-index: 1; }
.planet::after { content: ''; position: absolute; left: -12px; right: -12px; top: 18px; height: 10px; border-radius: 50%; border: 3px solid #5fd6b8; transform: rotate(-18deg); }
.heart-f { position: absolute; left: 6%; top: 46%; color: #ff7aa8; font-size: 22px; z-index: 1; }
.hand { position: absolute; z-index: 3; right: 0; top: 4%; margin: 0; font-family: 'Mali', var(--display); font-weight: 500; font-size: 17px; line-height: 1.45; color: #b04a7c; transform: rotate(-8deg); text-align: left; }

/* หมวดเกม */
.cats { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 10px; margin-bottom: 14px; scrollbar-width: thin; }
.cat { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-width: 112px; padding: 12px 14px; border-radius: 18px; border: 1.5px solid var(--line); background: #fff; color: var(--ink); font-family: var(--display); font-size: 14.5px; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.cat:hover { border-color: var(--pink); }
.cat .ic { width: 30px; height: 30px; color: var(--grape); }
.cat.on { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 10px 20px -12px rgba(214, 47, 116, .9); }
.cat.on .ic { color: #fff; }
.cat-thumb { width: 32px; height: 32px; border-radius: 10px; overflow: hidden; display: grid; place-items: center; color: #fff; font-size: 16px; }
.cat-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* หัวข้อแต่ละส่วน */
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.sec-head .sec-title { margin: 0; }
.sec-title .ic, .sec-title > span > .ic { width: 24px; height: 24px; }
.ic-fire { color: #ff6fa5; } .ic-pad, .ic-steps { color: var(--grape); } .ic-shield { color: var(--mint); } .ic-star { color: #ffb400; }
.more { display: inline-flex; align-items: center; gap: 6px; font-size: 14.5px; color: var(--ink-soft); text-decoration: none; }
.more .ic { width: 16px; height: 16px; }
.more:hover { color: var(--grape-deep); }

/* เกมยอดนิยม */
.pop { margin-bottom: 26px; }
.pop-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.pop-card { position: relative; display: block; aspect-ratio: 4 / 3.1; border-radius: 18px; overflow: hidden; color: #fff; text-decoration: none; background: var(--grad); }
.pop-card img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.pop-card .art-letter { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--display); font-size: 48px; font-weight: 600; }
.pop-shade { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(43, 33, 64, .78)); }
.pop-name { position: absolute; left: 12px; right: 48px; bottom: 11px; font-family: var(--display); font-size: 15px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pop-go { position: absolute; right: 10px; bottom: 10px; width: 30px; height: 30px; border-radius: 50%; background: #fff; color: var(--grape); display: grid; place-items: center; }
.pop-go .ic { width: 16px; height: 16px; }
.pop-card:hover img { transform: scale(1.05); }

/* เกมทั้งหมด + ค้นหา */
.all-sec { margin-bottom: 30px; scroll-margin-top: 90px; }
.search2 { display: flex; align-items: center; gap: 8px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; width: min(340px, 100%); color: var(--ink-soft); }
.search2:focus-within { border-color: var(--pink); box-shadow: 0 0 0 4px var(--pink-soft); }
.search2 .search { border: 0; box-shadow: none; margin: 0; padding: 11px 0; width: 100%; background: transparent; outline: none; }
.search2 .search:focus { box-shadow: none; }
.game-art .art-letter { font-size: 44px; }

/* แผง 3 ช่องล่าง */
.info3 { display: grid; grid-template-columns: 1.15fr 1fr 1fr; gap: 14px; margin-bottom: 10px; }
.panel { background: #fff; border: 1.5px solid var(--line); border-radius: 22px; padding: 18px 20px; box-shadow: 0 10px 30px -24px rgba(242, 70, 139, .5); scroll-margin-top: 90px; }
.panel .sec-title { font-size: 18px; }
.steps3 { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; counter-reset: st; }
.steps3 li { display: flex; align-items: center; gap: 12px; position: relative; }
.st-ic { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #ffe0ec, #ddf7ef); color: var(--grape-deep); flex: none; position: relative; }
.st-ic .ic { width: 22px; height: 22px; }
.steps3 li::before { counter-increment: st; content: counter(st); position: absolute; left: 32px; top: -4px; z-index: 1; width: 20px; height: 20px; border-radius: 50%; background: var(--mint); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.why3 { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.rev-score { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.rev-score .big { font-family: var(--display); font-size: 44px; font-weight: 600; line-height: 1; color: var(--ink); }
.stars-row { display: inline-flex; gap: 1px; font-size: 20px; color: #f1dce6; letter-spacing: 0; }
.stars-row .on { color: #ffb400; }
.rev-count { margin: 4px 0 10px; color: var(--ink-soft); font-size: 14px; }
.rev-quote { margin: 0; padding: 10px 14px; border-radius: 14px; background: var(--pink-soft); font-size: 15px; }
.rev-quote cite { display: block; margin-top: 4px; font-style: normal; font-size: 13px; color: var(--ink-soft); }
.rev-empty { text-align: center; padding: 6px 0; }
.rev-empty p { margin: 6px 0 0; }
.rev-empty small { color: var(--ink-soft); }

/* หน้ารีวิวทั้งหมด */
.rev-head { margin-bottom: 14px; }
.rev-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.rev-item { background: #fff; border: 1.5px solid var(--line); border-radius: 18px; padding: 14px 16px; }
.rev-item p { margin: 6px 0; }
.rev-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.rev-top small { color: var(--ink-soft); }
.rev-more { margin-top: 16px; text-align: center; }

/* รีวิวในหน้าออเดอร์ */
.review-form, .my-review { margin-top: 18px; padding: 14px; border-radius: 16px; background: var(--pink-soft); border: 1.5px solid #ffc0d8; display: grid; gap: 8px; }
.review-form textarea { width: 100%; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 12px; resize: vertical; font: inherit; background: #fff; }
.my-review p { margin: 0; }
.star-pick { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; }
.star-pick label { cursor: pointer; font-size: 32px; line-height: 1; color: #f1d2df; position: relative; }
.star-pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-pick label:has(input:checked), .star-pick label:has(input:checked) ~ label, .star-pick label:hover, .star-pick label:hover ~ label { color: #ffb400; }
.star-pick label:has(input:focus-visible) { outline: 3px solid var(--sun); outline-offset: 2px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (prefers-reduced-motion: no-preference) {
  .m-ears { transform-origin: 160px 120px; animation: ear-wiggle 4s ease-in-out infinite; }
  .spark, .heart-f { animation: twinkle 3s ease-in-out infinite; }
  .s2 { animation-delay: 1s; } .s3 { animation-delay: 2s; } .heart-f { animation-delay: .5s; }
  .mascot { animation: float 5s ease-in-out infinite; }
}
@keyframes ear-wiggle { 0%, 80%, 100% { transform: rotate(0); } 85% { transform: rotate(-3deg); } 90% { transform: rotate(3deg); } }
@keyframes twinkle { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .45; transform: scale(.8); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

@media (max-width: 1080px) {
  .nav-a { padding: 8px 11px; font-size: 14.5px; }
  .nav-a .ic { display: none; }
  .info3 { grid-template-columns: 1fr 1fr; }
  .rev-panel { grid-column: span 2; }
}
@media (max-width: 860px) {
  .top { flex-wrap: wrap; row-gap: 6px; }
  .mainnav { order: 3; width: 100%; margin: 0; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
  .mainnav::-webkit-scrollbar { display: none; }
  .top-actions { margin-left: auto; }
  .hero2 { grid-template-columns: 1fr; padding: 24px 20px 10px; }
  .hero2-art { min-height: 250px; order: -1; margin-bottom: -10px; }
  .b1 { width: 220px; height: 220px; }
  .mascot { width: 230px; }
  .hero2-logo { width: 110px; }
  .hand { font-size: 14px; }
  .info3 { grid-template-columns: 1fr; }
  .rev-panel { grid-column: auto; }
}
@media (max-width: 560px) {
  .brand img { height: 42px; }
  .icon-btn { width: 40px; height: 40px; }
  .login-btn { padding: 9px 13px; font-size: 14.5px; }
  .login-btn.me-btn span { display: none; }
  .wallet-pill { font-size: 13.5px; padding: 7px 10px; }
  .hero2 h1 { font-size: 38px; }
  .hero2 .h1-2 { padding-left: .8em; }
  .script { font-size: 25px; }
  .cta { font-size: 17px; padding-left: 20px; }
  .cta-ar { width: 38px; height: 38px; }
  .perks2 { gap: 12px 18px; }
  .pop-row { grid-auto-columns: 46%; }
  .cat { min-width: 96px; padding: 10px; }
  .search2 { width: 100%; }
}
/* ปรับสีพื้นรูปเกม + แถวจุดเด่นให้อยู่บรรทัดเดียว */
.pop-card, .cat-thumb { background: var(--grad); }
:is(.pop-card, .cat-thumb).tone-1 { background: var(--grad-mint); }
:is(.pop-card, .cat-thumb).tone-2 { background: linear-gradient(120deg, #ff9fb0, #ffc2b4); }
:is(.pop-card, .cat-thumb).tone-3 { background: linear-gradient(120deg, #3fcfae, #9be7d3); }
:is(.pop-card, .cat-thumb).tone-4 { background: linear-gradient(120deg, #d62f74, #ff7aa8); }
.perks2 { display: grid; grid-template-columns: repeat(3, max-content); gap: 14px 22px; }
@media (max-width: 1080px) { .perks2 { grid-template-columns: repeat(2, max-content); } }
@media (max-width: 860px) { .hero2-logo { display: none; } }
@media (max-width: 560px) { .perks2 { grid-template-columns: 1fr; } }
.pop-row { grid-auto-columns: max(150px, calc((100% - 84px) / 8)); }
@media (max-width: 560px) { .pop-row { grid-auto-columns: 46%; } }
/* มาสคอต: กะพริบตา + หัวใจลอย */
@media (prefers-reduced-motion: no-preference) {
  .m-eyes { transform-origin: 160px 170px; animation: blink 5s infinite; }
  .m-heart { transform-origin: 262px 100px; animation: heart-pop 2.4s ease-in-out infinite; }
}
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
@keyframes heart-pop { 0%, 100% { transform: translateY(0) scale(1); opacity: 1; } 50% { transform: translateY(-6px) scale(1.12); opacity: .85; } }
.contact-text { font-family: var(--display); font-size: 17px; margin: 0 0 6px; overflow-wrap: anywhere; }
.ic-chat { color: var(--grape); }

/* มาสคอตสาวกระต่าย (รูปของร้าน) + ขยับดุ๊กดิ๊ก */
.mascot-img { width: min(360px, 94%); height: auto; filter: drop-shadow(0 16px 26px rgba(242, 70, 139, .25)); transform-origin: 50% 92%; cursor: pointer; }
@media (prefers-reduced-motion: no-preference) {
  .mascot-img { animation: dukdik 2.8s ease-in-out infinite; }
  .mascot-img:hover, .mascot-img.hop { animation: hop .7s ease-in-out; }
}
@keyframes dukdik {
  0%, 100% { transform: translateY(0) rotate(0) scale(1, 1); }
  12% { transform: translateY(0) rotate(0) scale(1.03, .97); }
  24% { transform: translateY(-10px) rotate(-3deg) scale(.98, 1.02); }
  36% { transform: translateY(0) rotate(2.5deg) scale(1.02, .98); }
  48% { transform: translateY(-5px) rotate(-1.5deg) scale(1, 1); }
  60% { transform: translateY(0) rotate(1deg); }
  72% { transform: translateY(0) rotate(0); }
}
@keyframes hop {
  0% { transform: translateY(0) scale(1, 1); }
  20% { transform: translateY(0) scale(1.06, .92); }
  50% { transform: translateY(-26px) rotate(-4deg) scale(.96, 1.05); }
  75% { transform: translateY(0) rotate(3deg) scale(1.04, .95); }
  100% { transform: translateY(0) rotate(0) scale(1, 1); }
}
@media (max-width: 860px) { .mascot-img { width: 240px; } }
.hero2-logo { display: none; }
.mascot-img { -webkit-mask-image: linear-gradient(to bottom, #000 80%, transparent 99%); mask-image: linear-gradient(to bottom, #000 80%, transparent 99%); }
@media (max-width: 560px) { .hand { display: none; } }
.mascot-img { -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 7%, #000 80%, transparent 99%); mask-image: linear-gradient(to bottom, transparent 0, #000 7%, #000 80%, transparent 99%); }

/* ---------- กระต่ายในหน้าออเดอร์ ---------- */
.omascot { position: relative; max-width: 520px; margin: 18px auto -14px; display: flex; align-items: flex-end; justify-content: center; gap: 4px; z-index: 1; }
.mascot-svg { width: 150px; height: auto; flex: none; filter: drop-shadow(0 10px 16px rgba(242, 70, 139, .2)); transform-origin: 50% 95%; }
.omascot .m-happy { display: none; }
.omascot.yay .m-eyes { display: none; }
.omascot.yay .m-happy { display: inline; }
.bubble { position: relative; margin: 0 0 70px; padding: 10px 14px; border-radius: 18px 18px 18px 4px; background: #fff; border: 1.5px solid #ffc0d8; font-family: var(--display); font-size: 15px; color: var(--grape-deep); box-shadow: 0 8px 20px -14px rgba(242, 70, 139, .7); max-width: 220px; }
.omascot.yay .bubble { border-color: #a9ead8; color: #0b7f62; }
.dots { display: inline-flex; gap: 3px; margin-left: 4px; vertical-align: middle; }
.dots i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; display: block; }
.cf { position: absolute; font-size: 20px; color: #ff7aa8; opacity: 0; }
.c1 { left: 22%; top: 30%; } .c2 { left: 36%; top: 6%; color: var(--mint-mid); } .c3 { left: 50%; top: 2%; color: #ffc93c; } .c4 { left: 14%; top: 60%; color: #ffb6d0; } .c5 { left: 46%; top: 40%; color: var(--mint-mid); }
@media (prefers-reduced-motion: no-preference) {
  .omascot.busy .mascot-svg { animation: gaming 1s ease-in-out infinite; }
  .omascot.busy .m-paw-l { animation: tap .5s ease-in-out infinite; }
  .omascot.busy .m-paw-r { animation: tap .5s ease-in-out .25s infinite; }
  .omascot.busy .m-ears { transform-origin: 160px 120px; animation: ear-wiggle 1.6s ease-in-out infinite; }
  .omascot.busy .m-eyes { transform-origin: 160px 170px; animation: blink 3.5s infinite; }
  .dots i { animation: dot 1.2s ease-in-out infinite; }
  .dots i:nth-child(2) { animation-delay: .2s; } .dots i:nth-child(3) { animation-delay: .4s; }
  .omascot.yay .mascot-svg { animation: yay-jump 1.1s ease-in-out infinite; }
  .omascot.yay .m-heart { animation: heart-pop 1.1s ease-in-out infinite; }
  .omascot.yay .cf { animation: confetti 2.2s ease-out infinite; }
  .c2 { animation-delay: .3s !important; } .c3 { animation-delay: .7s !important; } .c4 { animation-delay: 1s !important; } .c5 { animation-delay: 1.4s !important; }
}
.omascot.yay .cf { opacity: 1; }
@keyframes gaming { 0%, 100% { transform: rotate(-2deg) translateY(0); } 50% { transform: rotate(2deg) translateY(-3px); } }
@keyframes tap { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(3px); } }
@keyframes dot { 0%, 60%, 100% { transform: translateY(0); opacity: .4; } 30% { transform: translateY(-4px); opacity: 1; } }
@keyframes yay-jump { 0%, 100% { transform: translateY(0) scale(1, 1); } 15% { transform: translateY(0) scale(1.06, .93); } 45% { transform: translateY(-22px) rotate(-4deg) scale(.97, 1.04); } 70% { transform: translateY(0) rotate(3deg) scale(1.04, .96); } }
@keyframes confetti { 0% { transform: translateY(10px) scale(.4); opacity: 0; } 25% { opacity: 1; } 100% { transform: translateY(-50px) rotate(40deg) scale(1.1); opacity: 0; } }
@media (max-width: 560px) { .mascot-svg { width: 120px; } .bubble { font-size: 14px; margin-bottom: 56px; } }

/* กระต่ายอยู่ในแถบสีของออเดอร์ */
.ticket-top { position: relative; overflow: hidden; }
.ticket-top.has-mascot { padding-right: 140px; min-height: 150px; }
.ticket-top .omascot { position: absolute; right: 10px; bottom: 50%; transform: translateY(50%); margin: 0; width: 130px; display: block; z-index: 0; }
.ticket-top .mascot-svg { width: 130px; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .18)); }
.ticket-top .cf { color: #fff; }
.ticket-top .c1 { left: -6%; top: 30%; } .ticket-top .c2 { left: 10%; top: 0; } .ticket-top .c3 { left: 70%; top: -4%; color: #ffe27a; } .ticket-top .c4 { left: 88%; top: 34%; } .ticket-top .c5 { left: 40%; top: 6%; }
.ticket-top > :not(.omascot) { position: relative; z-index: 1; }
@media (max-width: 560px) {
  .ticket-top.has-mascot { padding-right: 112px; }
  .ticket-top .omascot, .ticket-top .mascot-svg { width: 104px; }
}

/* ---------- แพ็กแบ่งหมวด + รูปแพ็ก ---------- */
.pack-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; margin-bottom: 4px; scrollbar-width: none; }
.pack-tab { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; font-family: var(--display); font-size: 15px; cursor: pointer; color: var(--ink); }
.pack-tab:hover { border-color: var(--pink); }
.pack-tab.on { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 8px 18px -10px rgba(214, 47, 116, .8); }
.pack-group { margin-top: 10px; }
.pack-gtitle { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; font-size: 18px; margin: 6px 0 10px; }
.pack-gtitle small { font-family: var(--body); font-size: 13.5px; font-weight: 600; color: #a3165a; background: var(--pink-soft); padding: 2px 10px; border-radius: 999px; }
.pack.has-img .pack-body { padding: 10px 12px 12px; }
.pack-img { display: grid; place-items: center; aspect-ratio: 1 / 1; margin: -2px -4px 4px; border-radius: 12px; background: #fff; overflow: hidden; }
.pack-img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.pack.has-img .pack-name { font-size: 14.5px; }
@media (max-width: 560px) { .packs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pack-img { aspect-ratio: 4 / 3; }

/* รูปแพ็กให้สมดุล: กรอบสีอ่อนเท่ากันทุกใบ รูปอยู่กลาง พื้นขาวของรูปกลืนไปกับกรอบ ขอบที่ตัดมาไม่เห็นเป็นเส้น */
.pack-img { aspect-ratio: 4 / 3; margin: 0 0 6px; padding: 8px; border-radius: 14px; background: radial-gradient(circle at 50% 45%, #ffffff 0%, #fff4f8 55%, #ecfaf5 100%); }
.pack-img img { width: 100%; height: 100%; object-fit: contain; object-position: center; mix-blend-mode: multiply;
  -webkit-mask-image: radial-gradient(ellipse 72% 70% at 50% 50%, #000 78%, transparent 100%); mask-image: radial-gradient(ellipse 72% 70% at 50% 50%, #000 78%, transparent 100%); }
.pack.has-img .pack-body { padding: 10px; }
.pack input:checked + .pack-body .pack-img { background: radial-gradient(circle at 50% 45%, #ffffff 0%, #ffe7f0 60%, #ddf7ef 100%); }
@media (prefers-reduced-motion: no-preference) { .pack-img img { transition: transform .2s; } .pack-body:hover .pack-img img { transform: scale(1.05); } }
.pack-img { padding: 4px; }
.pack-img img { -webkit-mask-image: radial-gradient(ellipse 82% 80% at 50% 50%, #000 82%, transparent 100%); mask-image: radial-gradient(ellipse 82% 80% at 50% 50%, #000 82%, transparent 100%); }

/* หัวกระต่ายเกมโปรด (รูปทรงของร้าน) */
.bunny-m { width: 26px; height: 26px; display: block; background: #f6c4d7; -webkit-mask: url(/bunny-mask.png) center / contain no-repeat; mask: url(/bunny-mask.png) center / contain no-repeat; transition: background-color .15s; }
.fav:hover .bunny-m { background: #f59bbf; }
.fav.on .bunny-m, .sec-title .bunny-m { background: linear-gradient(160deg, #ff8fb8, #f2468b); }
.sec-title .bunny-m { width: 24px; height: 24px; }
.fav-big .bunny-m { width: 22px; height: 22px; }
@media (prefers-reduced-motion: no-preference) {
  .fav.pop .bunny-m { animation: bunny-pop .5s ease; }
}
/* รูปแพ็กที่ร้านเตรียมเอง (ขอบสะอาดแล้ว) แสดงเต็มรูป ไม่ทำขอบจาง ตัวหนังสือในรูปจะได้ชัด */
.pack-img.own { padding: 2px; }
.pack-img.own img { -webkit-mask-image: none; mask-image: none; }
/* ให้รูปพอดีกรอบจริง ๆ (ไม่ล้นจนโดนตัดล่าง) */
.pack-img { position: relative; display: block; }
.pack-img img { position: absolute; inset: 5px; width: calc(100% - 10px); height: calc(100% - 10px); object-fit: contain; }
.pack-img.own img { inset: 3px; width: calc(100% - 6px); height: calc(100% - 6px); }

/* ---------- ป๊อปอัปประกาศตอนเข้าเว็บ ---------- */
.npop-wrap { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: rgba(43, 33, 64, .45); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.npop { width: min(440px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; background: #fff; border-radius: 26px; padding: 26px 24px 22px; text-align: center; box-shadow: 0 30px 60px -20px rgba(43, 33, 64, .5); border-top: 6px solid #ff8fb5; }
.npop-ic { font-size: 40px; line-height: 1; margin-bottom: 8px; }
.npop h2 { font-size: 21px; font-weight: 600; margin-bottom: 12px; color: var(--grape-deep); }
.npop p { margin: 0 0 10px; font-size: 15.5px; color: var(--ink); }
.npop b { color: #a3165a; }
.npop-now { background: #fff4d6; color: #7a5200 !important; border-radius: 12px; padding: 8px 12px; font-weight: 600; }
.npop-sign { color: var(--ink-soft) !important; }
.npop .btn { width: 100%; margin-top: 8px; }
body.npop-open { overflow: hidden; }
@media (prefers-reduced-motion: no-preference) { .npop { animation: npop-in .28s ease-out; } }
@keyframes npop-in { from { transform: translateY(16px) scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- เกมที่ ZafeZone ปิดชั่วคราว: การ์ดสีทึบ กดไม่ได้ ---------- */
.game-cell.is-closed .game { cursor: not-allowed; background: #f3f0f4; border-color: #e4dde6; box-shadow: none; transform: none !important; }
.game-cell.is-closed .game-art { filter: grayscale(1) brightness(.75); }
.game-cell.is-closed .game-art { position: relative; }
.game-cell.is-closed .game-name, .game-cell.is-closed .game-cat { color: #9a92a3; }
.closed-tag { position: absolute; inset: auto 0 0 0; padding: 6px 8px; background: rgba(43, 33, 64, .82); color: #fff; font-family: var(--display); font-size: 14px; text-align: center; letter-spacing: .5px; filter: none; }

/* ---------- แชทกับร้าน ---------- */
.chat-open-btn, [data-openchat].btn { display: inline-flex; align-items: center; gap: 8px; }
.contact-panel .chat-open-btn { margin: 4px 0 10px; }
.chat { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 60; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
body:has(.paybar) .chat { bottom: calc(92px + env(safe-area-inset-bottom)); }
body.npop-open .chat { display: none; }
.chat-fab { position: relative; display: flex; align-items: center; gap: 8px; border: 0; border-radius: 999px; padding: 12px 18px 12px 14px; background: var(--grad); color: #fff; font-family: var(--display); font-size: 16px; cursor: pointer; box-shadow: 0 10px 24px -10px rgba(214, 47, 116, .9); }
.chat-fab .ic { width: 22px; height: 22px; }
.chat.is-open .chat-fab { padding: 12px; }
.chat.is-open .chat-fab-t { display: none; }
.chat-badge { position: absolute; top: -6px; right: -4px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--sun); color: #3a2c00; font-size: 13px; line-height: 22px; text-align: center; box-shadow: 0 0 0 2px #fff; }
.chat-box { width: min(370px, calc(100vw - 32px)); height: min(520px, calc(100vh - 150px)); display: flex; flex-direction: column; background: var(--card); border: 1.5px solid var(--line); border-radius: 22px; box-shadow: 0 24px 50px -20px rgba(43, 33, 64, .45); overflow: hidden; }
.chat-box[hidden] { display: none !important; }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--grad); color: #fff; }
.chat-head img { width: 40px; height: 40px; border-radius: 50%; background: #fff; object-fit: cover; object-position: top; }
.chat-head div { flex: 1; min-width: 0; line-height: 1.3; }
.chat-head b { display: block; font-family: var(--display); font-weight: 500; font-size: 16px; }
.chat-head small { font-size: 13px; opacity: .92; }
.chat-x { border: 0; background: rgba(255, 255, 255, .22); color: #fff; width: 34px; height: 34px; border-radius: 50%; cursor: pointer; font-size: 15px; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 14px 12px; background: var(--paper); display: flex; flex-direction: column; gap: 8px; overscroll-behavior: contain; }
.chat-empty { margin: auto 0; text-align: center; color: var(--ink-soft); font-size: 15px; }
.chat-tip { background: var(--mint-soft); color: #0d6f57; border-radius: 12px; padding: 8px 10px; font-size: 14px; }
.cm { display: flex; flex-direction: column; max-width: 82%; }
.cm-b { padding: 8px 12px; border-radius: 16px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15.5px; line-height: 1.5; }
.cm small { font-size: 12px; color: var(--ink-soft); margin: 2px 6px 0; }
.cm-me { align-self: flex-end; align-items: flex-end; }
.cm-me .cm-b { background: var(--grape); color: #fff; border-bottom-right-radius: 4px; }
.cm-shop { align-self: flex-start; }
.cm-shop .cm-b { background: #fff; border: 1.5px solid var(--line); border-bottom-left-radius: 4px; }
.chat-err { margin: 0; padding: 6px 12px; background: #ffe9ec; color: #8f1226; font-size: 14px; }
.chat-form { display: flex; align-items: flex-end; gap: 8px; padding: 10px; border-top: 1.5px solid var(--line); background: #fff; }
.chat-form textarea { flex: 1; resize: none; border: 1.5px solid var(--line); border-radius: 14px; padding: 9px 12px; font: inherit; font-size: 16px; line-height: 1.4; max-height: 110px; }
.chat-form textarea:focus { border-color: var(--pink); outline: none; }
.chat-send { flex: none; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--grad-mint); color: #fff; display: grid; place-items: center; cursor: pointer; }
.chat-send:disabled { opacity: .5; cursor: wait; }
@media (max-width: 560px) {
  .chat-fab-t { display: none; }
  .chat-fab { padding: 14px; }
  .chat.is-open, body:has(.paybar) .chat.is-open { inset: 0; padding: 0; align-items: stretch; }
  .chat.is-open .chat-head { padding-top: calc(10px + env(safe-area-inset-top)); }
  .chat.is-open .chat-form { padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
  .chat.is-open .chat-fab { display: none; }
  .chat.is-open .chat-box { width: 100%; height: 100%; border-radius: 0; border: 0; }
}
@media (prefers-reduced-motion: no-preference) {
  .chat.has-unread .chat-fab { animation: chatPing 1.6s ease-in-out infinite; }
  @keyframes chatPing { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }
}

.chat-attach { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: var(--grape); background: var(--pink-soft); cursor: pointer; }
.chat-attach:hover { background: #ffd6e6; }
.chat-attach.busy { opacity: .5; pointer-events: none; animation: chatPing 1s ease-in-out infinite; }
.cm-b.has-img { padding: 4px; }
.cm-b.has-img a { display: block; }
.cm-b img { display: block; max-width: 100%; max-height: 260px; border-radius: 12px; background: #fff; }

/* ประวัติการเติมเงิน (หน้ากระเป๋า) */
.topup-hist .th-st { font-style: normal; font-size: 13px; padding: 1px 9px; border-radius: 999px; background: #ececf2; color: #555; white-space: nowrap; }
.topup-hist .th-paid { background: var(--mint-soft); color: #0d6f57; }
.topup-hist .th-awaiting_payment { background: #fff0c2; color: #6b4a00; }
.topup-hist .th-pay { font-size: 14px; font-weight: 500; }
.topup-hist .muted-amt { color: var(--ink-soft); font-weight: 500; }
.topup-hist li { align-items: flex-start; }
.topup-hist .th-main { flex: 1; min-width: 0; }
.topup-hist .th-slip { flex: none; display: block; width: 52px; height: 68px; margin-right: 12px; border-radius: 10px; overflow: hidden; border: 1.5px solid var(--line); background: #fff; }
.topup-hist .th-slip img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }

/* ---------- โค้ดส่วนลด ---------- */
.promo-box { margin-top: 14px; padding-top: 14px; border-top: 1.5px dashed var(--line); }
.promo-box label { display: block; font-size: 15px; margin-bottom: 6px; }
.promo-row { display: flex; gap: 8px; }
.promo-row input { flex: 1; min-width: 0; text-transform: uppercase; padding: 11px 14px; border: 1.5px solid var(--line); border-radius: 14px; font-size: 16px; }
.promo-row .btn { padding: 10px 16px; white-space: nowrap; }
.promo-msg { margin: 8px 0 0; font-size: 15px; }
.promo-msg.good { color: var(--mint); font-weight: 500; }
.promo-msg.bad { color: var(--red); }
.paybar-total s { opacity: .6; font-size: .75em; margin-right: 4px; }
.rows .disc dd { color: var(--mint); font-weight: 600; }

/* การ์ดเกม: กรอบรูปสี่เหลี่ยมจัตุรัสคงที่ รูปพอดีกรอบเสมอ (กัน Safari / iPad ยืดรูปล้นทับชื่อเกม) */
.game-art { position: relative; overflow: hidden; aspect-ratio: 1 / 1; flex: none; width: 100%; height: auto; }
.game-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.game-art .art-letter { position: relative; }
.game-name { position: relative; background: var(--card); }
.game-cell.is-closed .game-name { background: transparent; }

/* รูปเกมแบบไอคอนแอป (มุมโค้ง/มุมโปร่งใสในตัวรูป): วางเป็นไอคอนมุมโค้งบนพื้นเรียบ ไม่ให้สีพื้นหลังโผล่ตามมุม */
.game-art:has(img) { background: linear-gradient(180deg, #fff5f9, #ffe9f2); }
.game-art img { inset: 10px; width: calc(100% - 20px); height: calc(100% - 20px); border-radius: 22%; background: transparent; box-shadow: 0 6px 16px -10px rgba(43, 33, 64, .45); }
.game-cell.is-closed .game-art:has(img) { background: #ece8ee; }
/* การ์ดเกมยอดนิยม / ไอคอนหมวด: ขยายรูปเล็กน้อยเพื่อตัดมุมโค้งที่ติดมากับรูปออก */
.pop-card img { transform: scale(1.14); }
.pop-card:hover img { transform: scale(1.19); }
.cat-thumb img { transform: scale(1.16); }
/* รูปที่ไม่ใช่จัตุรัส (เช่นแบนเนอร์แนวนอน): แสดงเต็มรูป ไม่ตัดซ้ายขวา */
.game-art img.art-wide, .cat-thumb img.art-wide { object-fit: contain; background: #fff; }
.pop-card img.art-wide { transform: none; }
.pop-card:hover img.art-wide { transform: scale(1.04); }

/* แนบสลิปจากมือถือ */
.phone-slip { margin-top: 10px; text-align: center; }
.phone-slip .btn { font-size: 15px; padding: 10px 16px; }
.phone-slip-box { display: flex; gap: 14px; align-items: center; text-align: left; margin-top: 12px; padding: 14px; border: 1.5px dashed var(--mint-mid); border-radius: 16px; background: var(--mint-soft); }
.phone-slip-box img { flex: none; border-radius: 10px; background: #fff; padding: 6px; image-rendering: pixelated; }
.phone-slip-box b { font-family: var(--display); font-weight: 500; }
.phone-slip-box p { margin: 4px 0 0; font-size: 14px; }
.phone-slip-box .warn-mini { color: #8f1226; font-weight: 500; }
.up-page { max-width: 460px; margin: 16px auto; }
.up-page .slip-btn { width: 100%; font-size: 18px; padding: 16px; }

/* แนบสลิปบนคอม: แท็บ + กรอบลากวาง */
.slip-panel { margin-top: 12px; text-align: left; }
.slip-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.slip-tab { display: flex; gap: 10px; align-items: center; text-align: left; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 16px; background: #fff; cursor: pointer; font: inherit; color: var(--ink); }
.slip-tab .st-i { flex: none; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: var(--pink-soft); font-size: 20px; }
.slip-tab b { display: block; font-family: var(--display); font-weight: 500; font-size: 15px; }
.slip-tab small { display: block; font-size: 12.5px; color: var(--ink-soft); line-height: 1.35; }
.slip-tab.on { border-color: var(--grape); background: #fff5f9; box-shadow: 0 0 0 3px var(--pink-soft); }
.slip-pane { margin-top: 10px; }
.slip-drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 170px; padding: 18px; border: 2px dashed #f2b9cf; border-radius: 18px; background: #fffafc; text-align: center; cursor: pointer; transition: border-color .15s, background-color .15s; }
.slip-drop:hover, .slip-drop.over { border-color: var(--grape); background: var(--pink-soft); }
.slip-drop .sd-ic { font-size: 40px; line-height: 1; }
.slip-drop u { color: var(--grape); font-weight: 600; }
.slip-drop small { color: var(--ink-soft); font-size: 13px; }
.slip-drop.busy { opacity: .6; pointer-events: none; }
.slip-panel .phone-slip-box { margin-top: 10px; }
.slip-panel .phone-slip-box[hidden] { display: none; }

/* ตรวจ UID */
.uid-row { display: flex; gap: 8px; }
.uid-row input { flex: 1; min-width: 0; }
.uid-btn { flex: none; padding: 10px 18px; font-size: 16px; }
.uid-result { margin: 8px 0 0; padding: 8px 12px; border-radius: 12px; font-size: 15px; background: var(--paper); color: var(--ink-soft); }
.uid-result.good { background: var(--mint-soft); color: #0d6f57; }
.uid-result.good b { font-family: var(--display); font-size: 18px; font-weight: 600; }
.uid-result.bad { background: #ffe9ec; color: #8f1226; }
.uid-result.warn { background: #fff4d6; color: #5a4300; }
.rows .role-name { color: #0d6f57; font-weight: 600; }
/* ขยายการ์ดเกม: การ์ดใหญ่ขึ้น (คอม 6 เกม/แถว) และรูปเต็มขึ้น (ขอบรอบรูปบางลง) */
.games { grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)); gap: 14px; }
.game-art img { inset: 6px; width: calc(100% - 12px); height: calc(100% - 12px); }
@media (max-width: 560px) { .games { grid-template-columns: repeat(2, 1fr); gap: 12px; } }

/* รูปเกมเต็มกรอบ: ไม่มีขอบชมพูรอบรูป (รูปกว้างอย่าง Teamfight ยังแสดงทั้งรูปบนพื้นขาว) */
.game { isolation: isolate; }
.game-art { border-radius: 20px 20px 0 0; }
.game-art:has(img) { background: #fff; }
.game-art img { inset: 0; width: 100%; height: 100%; border-radius: 0; box-shadow: none; image-rendering: auto; -webkit-backface-visibility: hidden; backface-visibility: hidden; }
/* ขยายเฉพาะรูปที่มีมุมขาวติดมาในไฟล์ (app.js คำนวณให้ทีละรูป) */
.game-art img:not(.art-wide) { transform: scale(var(--art-zoom, 1)); transform-origin: center; }

/* ---------- ตะกร้า: เลือกหลายแพ็ก + จำนวน ---------- */
.pick-hint { margin: -4px 0 10px; }
.pack-qty { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 4px; padding: 3px; border-radius: 999px; background: #fff; border: 1.5px solid var(--pink-soft); }
.pack-qty[hidden] { display: none; }
.pack-qty button { width: 32px; height: 32px; border: 0; border-radius: 50%; background: var(--pink-soft); color: var(--grape-deep); font: 600 20px/1 var(--display); cursor: pointer; display: grid; place-items: center; touch-action: manipulation; }
.pack-qty button:hover:not(:disabled) { background: var(--pink); color: #fff; }
.pack-qty button:disabled { opacity: .35; cursor: not-allowed; }
.pack-qty button:focus-visible { outline: 3px solid var(--sun); outline-offset: 1px; }
.pack-qty b { min-width: 2ch; text-align: center; font: 600 17px/1 var(--display); color: var(--ink); font-variant-numeric: tabular-nums; }
.cart-sum { margin-top: 14px; padding: 14px 16px; border: 1.5px solid var(--pink-soft); border-radius: 18px; background: #fff8fb; }
.cs-head { display: flex; align-items: center; gap: 8px; font-family: var(--display); font-size: 16px; margin-bottom: 6px; }
.cs-head b { color: var(--grape-deep); }
.cs-clear { margin-left: auto; border: 0; background: none; color: var(--ink-soft); font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer; padding: 4px; }
.cart-sum ul { list-style: none; margin: 0; padding: 0; }
.cart-sum li { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.cs-name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.cs-name b { color: var(--grape-deep); }
.cs-price { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 500; }
.cs-del { flex: none; width: 30px; height: 30px; border: 0; border-radius: 50%; background: transparent; color: var(--ink-soft); cursor: pointer; font-size: 14px; }
.cs-del:hover { background: var(--pink-soft); color: var(--grape-deep); }
.cs-row { display: flex; justify-content: space-between; padding: 8px 0 0; }
.cs-row.disc { color: var(--mint); font-weight: 600; }
.cs-row.total b { font-family: var(--display); font-size: 20px; color: var(--grape-deep); font-variant-numeric: tabular-nums; }
.cart-sum .hint { margin: 8px 0 0; }

/* หน้าออเดอร์: รายการแพ็กในตะกร้า */
.rows .ci { display: block; }
.rows .ci dd { text-align: left; margin-top: 6px; }
.ci-list { list-style: none; margin: 0; padding: 0; }
.ci-list li { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; padding: 6px 0; }
.ci-list li + li { border-top: 1px dotted var(--line); }
.ci-name { flex: 1; min-width: 0; font-weight: 500; }
.ci-name b { color: var(--grape-deep); }
.ci-disc { color: var(--mint); font-weight: 600; }
.ci-price { font-variant-numeric: tabular-nums; white-space: nowrap; }
.ci-st { font-size: 12.5px; padding: 2px 9px; border-radius: 999px; background: #eef1f6; color: var(--ink-soft); white-space: nowrap; }
.ci-st.st-success { background: var(--mint-soft); color: #0d6f57; }
.ci-st.st-refund_required { background: #ffe4e4; color: #b42318; }
.ci-st.st-refunded { background: #fff3d6; color: #8a5a00; }
.ci-st.st-processing, .ci-st.st-paid, .ci-st.st-sending, .ci-st.st-on_hold { background: var(--pink-soft); color: var(--grape-deep); }
.cart-note { margin: 0 0 10px; padding: 10px 12px; border-radius: 12px; background: var(--pink-soft); font-size: 14px; }
/* ปุ่มเพจ Facebook ท้ายเว็บ */
.foot-fb { display: inline-flex; align-items: center; gap: 8px; margin: 6px 0 2px; padding: 9px 18px; border-radius: 999px; background: #1877f2; color: #fff; text-decoration: none; font-family: var(--display); font-size: 15px; box-shadow: 0 8px 18px -10px rgba(24, 119, 242, .8); }
.foot-fb[hidden] { display: none; }
.foot-fb:hover { background: #0f66d8; }
.foot-fb:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }
.foot-fb svg { width: 18px; height: 18px; flex: none; }
/* ป๊อปอัปชวนเข้าสู่ระบบ (ตอนกดเลือกแพ็กโดยยังไม่ล็อกอิน) */
.login-pop { text-align: center; }
.lp-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
.lp-btns .btn { min-width: 140px; text-decoration: none; text-align: center; }
.lp-close { margin-top: 12px; border: 0; background: none; color: var(--ink-soft); font: inherit; font-size: 15px; text-decoration: underline; cursor: pointer; padding: 6px; }
/* กล่องเตือนตรวจ UID (พื้นทึบ อ่านชัด) */
.uid-warn { display: flex; flex-direction: column; gap: 2px; margin: 14px 0 4px; padding: 12px 16px; border-radius: 14px; background: #ffb020; color: #3d2600; box-shadow: 0 8px 18px -12px rgba(180, 110, 0, .8); line-height: 1.45; }
.uid-warn b { font-family: var(--display); font-weight: 600; font-size: 16.5px; }
.uid-warn span { font-size: 15px; }
.legal h3 { font-size: 17px; margin: 16px 0 6px; font-family: var(--display); font-weight: 500; }
.legal p { margin: 0 0 10px; }
.uid-warn a { color: inherit; font-weight: 600; }
.tbl-wrap { overflow-x: auto; margin: 6px 0 4px; }
.legal-tbl { width: 100%; border-collapse: collapse; font-size: 15px; background: var(--card); border-radius: 14px; overflow: hidden; }
.legal-tbl th, .legal-tbl td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.legal-tbl th { background: var(--pink-soft); font-family: var(--display); font-weight: 500; }
.foot-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px; padding: 0 16px; }
.hint.agree { margin-top: 14px; font-size: 14px; }

/* ป๊อปอัปประกาศแบบรูปโปสเตอร์ (23:00 – 03:00) */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.npop.npop-img { width: min(460px, 100%, calc((100vh - 150px) * .8)); padding: 0; border-top: 0; background: #fff3f8; overflow: hidden auto; }
.npop-img img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; }
.npop-foot { padding: 10px 14px 14px; }
.npop-foot .npop-now { margin: 0 0 10px; padding: 9px 12px; font-size: 14.5px; line-height: 1.55; text-align: center; }
.npop-now span { display: block; }
.npop-now b { color: inherit; white-space: nowrap; }
.npop-foot .btn { margin-top: 0; }

/* ฟองป๊อปอัป "เติมสำเร็จแล้ว" มุมซ้ายล่าง */
.sbub { position: fixed; left: 16px; bottom: 18px; z-index: 60; max-width: min(360px, calc(100vw - 104px)); animation: bub-up .7s cubic-bezier(.2, 1.6, .4, 1) both, bub-float 3.2s ease-in-out .7s infinite; }
.sbub-in { position: relative; display: flex; align-items: center; gap: 10px; padding: 8px 20px 8px 8px; border-radius: 30px; text-decoration: none; color: var(--ink);
  background: radial-gradient(circle at 18% 22%, rgba(255, 255, 255, .95) 0 14%, transparent 15%), linear-gradient(135deg, #fff, #fff2f8);
  box-shadow: 0 14px 30px -14px rgba(214, 47, 116, .55), inset 0 0 0 1px rgba(255, 255, 255, .8); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
/* ขอบสีรุ้งแบบฟองสบู่ (หมุนช้า ๆ) */
.sbub-in::before { content: ""; position: absolute; inset: -2.5px; border-radius: inherit; padding: 2.5px; z-index: -1;
  background: conic-gradient(from var(--bub-a, 0deg), #ff9fc6, #ffd27a, #9fe7cf, #a8c8ff, #e0b3ff, #ff9fc6);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
/* แสงสะท้อนบนฟอง */
.sbub-in::after { content: ""; position: absolute; right: 16px; top: 5px; width: 26px; height: 8px; border-radius: 50%; background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .95)); transform: rotate(-12deg); pointer-events: none; }
a.sbub-in:hover { box-shadow: 0 16px 34px -14px rgba(214, 47, 116, .7), inset 0 0 0 1px #fff; }
.sbub-thumb { width: 40px; height: 40px; flex: none; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--grape); color: #fff; font-family: var(--display); font-size: 16px; box-shadow: 0 0 0 2.5px #fff; }
.sbub-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sbub-txt { min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.sbub-k { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 600; color: var(--mint); }
.sbub-k .ic { width: 13px; height: 13px; stroke-width: 2.6; }
.sbub-v { font-size: 14px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.sbub-v b { font-family: var(--display); font-weight: 500; }
.sbub-x { position: absolute; top: -7px; right: -7px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: #fff; color: var(--ink-soft); font-size: 15px; line-height: 1; cursor: pointer; box-shadow: 0 2px 8px -2px rgba(43, 33, 64, .35); display: grid; place-items: center; padding: 0; }
.sbub-x:hover { color: var(--grape-deep); }
.sbub.popping { animation: bub-pop .32s ease-in forwards; }
.sbub-drop { position: fixed; z-index: 61; width: var(--s); height: var(--s); margin: calc(var(--s) / -2) 0 0 calc(var(--s) / -2); border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 30% 30%, #fff 0 22%, rgba(255, 200, 225, .55) 23%, rgba(168, 200, 255, .45) 100%); box-shadow: inset 0 0 0 1px rgba(255, 159, 198, .7);
  animation: bub-drop .6s ease-out forwards; }
@property --bub-a { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@keyframes bub-up { 0% { opacity: 0; transform: translateY(40px) scale(.55); } 60% { opacity: 1; } 100% { opacity: 1; transform: none; } }
@keyframes bub-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes bub-pop { 0% { transform: scale(1); opacity: 1; } 45% { transform: scale(1.1, 1.06); opacity: 1; } 100% { transform: scale(1.25); opacity: 0; } }
@keyframes bub-drop { 0% { transform: translate(0, 0) scale(.4); opacity: 1; } 100% { transform: translate(var(--dx), var(--dy)) scale(1); opacity: 0; } }
@keyframes bub-spin { to { --bub-a: 360deg; } }
.sbub-in::before { animation: bub-spin 4s linear infinite; }
@media (prefers-reduced-motion: reduce) {
  .sbub, .sbub-in::before { animation: none; }
}
@media (max-width: 560px) {
  .sbub { left: 12px; bottom: 14px; }
  .sbub-in { padding: 6px 15px 6px 6px; gap: 8px; }
  .sbub-thumb { width: 34px; height: 34px; }
  .sbub-v { font-size: 13px; }
}


.game-art, .pop-card { position: relative; }

/* ราคาในแพ็ก: ราคาเราตัวหนาสีเข้ม / ราคาทางการขีดฆ่าตัวเล็กสีจางอยู่ใต้ (ถ้ามี) */
.pack-price { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.pp-now { font-weight: 600; font-size: 20px; line-height: 1.25; color: #e5154f; }
.pp-was { font-family: var(--display); font-size: 12.5px; font-weight: 400; line-height: 1.2; color: #b9aec0; text-decoration-thickness: 1px; text-decoration-color: currentColor; }
@media (max-width: 560px) { .pp-now { font-size: 18px; } }
