/* 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); }
