@font-face { font-family: "LINE Seed Sans TH"; src: url("/fonts/LINESeedSansTH_W_Rg.woff2") format("woff2"); font-style: normal; font-weight: 400; font-display: swap; }
@font-face { font-family: "LINE Seed Sans TH"; src: url("/fonts/LINESeedSansTH_W_Bd.woff2") format("woff2"); font-style: normal; font-weight: 700; font-display: swap; }
@font-face { font-family: "LINE Seed Sans TH"; src: url("/fonts/LINESeedSansTH_W_XBd.woff2") format("woff2"); font-style: normal; font-weight: 800 900; font-display: swap; }
:root {
  color-scheme: light;
  --page: #f5f7f9;
  --ink: #17191c;
  --muted: #6c737e;
  --line: #e8ebef;
  --blue: #2884f6;
  --blue-soft: #e9f2ff;
  font: 15px/1.5 "LINE Seed Sans TH", "Noto Sans Thai", "Leelawadee UI", Tahoma, system-ui, sans-serif;
  color: var(--ink);
  background: var(--page);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { min-width: 0; margin: 0; background: linear-gradient(180deg, #f2f6fc 0, var(--page) 150px); }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.shell { width: min(calc(100% - 88px), 1176px); margin-inline: auto; }
.topbar {
  position: sticky;
  z-index: 4;
  top: 0;
  min-height: 64px;
  border-bottom: 1px solid #e8edf3;
  background: #fff;
}
.topbar-inner { min-height: 64px; display: flex; align-items: center; gap: 26px; }
.wordmark { display: inline-flex; align-items: center; gap: 9px; flex: none; font: 900 17px/1 system-ui, sans-serif; letter-spacing: -.035em; }
.wordmark strong { color: var(--blue); }
.brand-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--blue-soft);
  color: var(--blue);
}
.brand-icon svg { width: 23px; }
.top-nav, .top-actions { display: flex; align-items: center; gap: 4px; }
.top-nav { white-space: nowrap; }
.top-nav a { display: block; padding: 8px 11px; color: #575c64; font-size: 14px; font-weight: 650; border-radius: 10px; }
.top-nav a:hover, .top-nav a[aria-current] { color: #1471df; background: var(--blue-soft); }
.top-actions { gap: 9px; margin-inline-start: auto; white-space: nowrap; }
.locale, .wallet-shortcut {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 35px;
  padding: 3px 10px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 13px;
}
.wallet-shortcut > span:first-child { color: var(--muted); }
.wallet-plus { display: grid; place-items: center; background: var(--blue); color: white; border-radius: 7px; width: 23px; height: 23px; font-weight: 800; }
.profile-shortcut { min-height: 36px; padding: 5px 11px; border: 1px solid var(--blue); border-radius: 10px; background: var(--blue); color: #fff; font-size: 13px; font-weight: 750; }
.profile-shortcut:hover { background: #115eb8; }
.storefront { padding: 34px 0 64px; scroll-margin-top: 80px; }
.storefront-heading { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin-bottom: 13px; }
.storefront-heading h1 { margin: 0; font-size: clamp(20px, 2.1vw, 25px); font-weight: 850; line-height: 1.28; letter-spacing: -.025em; }
.storefront-heading p { margin: 0; font-size: 12px; color: var(--muted); }
.storefront-search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 46px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: white;
  color: #7a8189;
}
.storefront-search svg { flex: 0 0 17px; width: 17px; }
.storefront-search input { flex: 1 1 auto; min-width: 0; border: 0; background: transparent; color: var(--ink); padding: 7px 0; font-size: 14px; }
.storefront-search input:focus { outline: none; }
.storefront-search:focus-within { outline: 2px solid var(--blue); }
.storefront-filters { display: flex; align-items: center; gap: 8px; margin: 13px 0 17px; overflow-x: auto; padding: 1px 1px 2px; }
.storefront-filters button { flex: none; min-height: 38px; padding: 7px 16px; color: #515761; background: #fff; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; font-weight: 680; }
.storefront-filters button[aria-pressed="true"] { background: #17191c; border-color: #17191c; color: white; }
.storefront-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 12px; }
.store-card { min-width: 0; position: relative; border: 1px solid var(--line); border-radius: 13px; background: white; box-shadow: 0 1px 3px #172d4610; }
.store-card:hover { border-color: #b2d3fd; }
.store-card-link { display: block; width: 100%; padding: 0; border: 0; border-radius: inherit; background: transparent; color: inherit; text-align: left; overflow: hidden; }
.store-cover { display: block; width: 100%; aspect-ratio: 5 / 4; object-fit: cover; background: #dce8fa; }
.store-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.store-card-copy { display: block; min-width: 0; padding: 6px 10px 10px; }
.store-card-name, .store-card-price { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.store-card-name { font-size: 13px; font-weight: 800; }
.store-card-price { margin-top: 2px; font-size: 12px; font-weight: 650; }
.store-favorite { position: absolute; top: 9px; right: 9px; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: #141c2a8c; color: white; font-size: 18px; display: grid; place-items: center; }
.store-favorite[aria-pressed="true"] { color: #ffd151; background: #17191cbf; }
.store-tag { position: absolute; pointer-events: none; top: 8px; left: 8px; max-width: calc(100% - 51px); padding: 2px 7px; border-radius: 999px; background: #17191c; color: #fff; font-size: 10px; font-weight: 800; white-space: nowrap; }
.store-tag[data-tag="promo"], .store-tag.promo { background: #f4ad33; color: #2c1b08; }
.storefront-grid > p { grid-column: 1 / -1; color: var(--muted); }

.wallet-shell { margin: 0 0 56px; scroll-margin-top: 80px; }
.wallet-shell summary { cursor: pointer; width: fit-content; font-weight: 750; color: #394557; padding: 8px 13px; border: 1px solid var(--line); border-radius: 11px; background: white; }
.wallet-shell[open] summary { margin-bottom: 12px; }
.purchase-history { max-width: 850px; min-height: 65vh; margin-inline: auto; padding-block: 32px 54px; scroll-margin-top: 78px; }
.history-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.history-heading h1 { margin: 0; font-size: clamp(22px, 4vw, 30px); }
.history-heading p { margin: 3px 0 0; color: var(--muted); }
.history-back { color: var(--blue); font-weight: 700; text-decoration: underline; }
.history-list { display: grid; gap: 10px; padding: 0; margin: 12px 0 0; list-style: none; }
.history-row { padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fbfdff; overflow-wrap: anywhere; }
.history-row-top { display: flex; align-items: baseline; justify-content: space-between; gap: 6px 14px; flex-wrap: wrap; }
.history-row h3 { margin: 0; }
.history-total { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.history-status { padding: 3px 9px; border-radius: 20px; background: #e9eef5; color: #3e5065; font-size: .82rem; font-weight: 700; }
.history-status[data-tone="pending"] { background: #fff1cf; color: #705000; }
.history-status[data-tone="success"] { background: #ddf5e7; color: #145836; }
.history-status[data-tone="problem"] { background: #ffebee; color: #861e2e; }
.history-row .history-meta { display: flex; gap: 3px 12px; flex-wrap: wrap; margin: 7px 0 0; font-size: .85rem; }
.history-row > button { margin-top: 9px; }
#purchase-history-status:empty, #purchase-history-notice:empty { display: none; }
.panel { border: 1px solid var(--line); border-radius: 17px; padding: 21px; background: #fff; box-shadow: 0 2px 8px #1b314c06; }
.panel h2, .panel h3 { margin: 0 0 10px; }
.panel h2 { font-size: 22px; }
.panel h3 { font-size: 17px; }
.panel p { color: var(--muted); margin: 8px 0; }
.panel label { display: block; margin-top: 12px; font-weight: 650; }
.panel input, .panel select { display: block; width: 100%; margin-top: 5px; padding: 9px 11px; color: var(--ink); background: white; border: 1px solid #dce3ec; border-radius: 10px; }
.panel .action, .panel .secondary { border-radius: 10px; padding: 9px 14px; font-weight: 750; }
.panel .action { width: 100%; margin-top: 12px; border: 1px solid var(--blue); background: var(--blue); color: #fff; }
.panel .secondary { border: 1px solid var(--line); background: var(--page); color: var(--ink); }
.panel button:disabled { opacity: .55; }
.panel .notice { background: var(--blue-soft); color: #315476; padding: 11px; border-radius: 10px; font-size: 13px; }
.wallet-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 22px; margin-top: 18px; }
.wallet-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.wallet-auth-actions { display: flex; align-items: stretch; gap: 10px; margin-top: 15px; }
.wallet-auth-actions .action, .wallet-review .action { width: auto; margin: 0; }
.wallet-total { color: #176ac3; font-size: 26px; font-weight: 850; }
.wallet-list { padding: 0; margin: 12px 0 0; list-style: none; }
.wallet-list li { padding: 12px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.wallet-list li p { margin: 4px 0; }
.wallet-list a { color: #176ac3; text-decoration: underline; }
.wallet-review { margin-top: 12px; }
.wallet-review button { margin: 10px 8px 0 0 !important; }
.wallet-qr { display: block; width: min(210px, 100%); aspect-ratio: 1; object-fit: contain; border-radius: 10px; margin: 14px 0; }
.wallet hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
.customer-auth-dialog { width: min(440px, calc(100% - 28px)); max-height: calc(100% - 28px); color: var(--ink); }
.customer-auth-dialog::backdrop { background: #17253d75; }
.customer-auth-dialog .detail-top h2 { margin: 0; }
.customer-auth-dialog .detail-close { flex-shrink: 0; }
#customer-auth-status:empty { display: none; }
#customer-auth-status { color: #a32626; }

.game-detail { width: min(1176px, calc(100% - 44px)); max-height: calc(100% - 44px); padding: 0; border: 1px solid var(--line); border-radius: 18px; background: var(--page); color: var(--ink); }
.rental-detail { width: min(630px, calc(100% - 20px)); }
.rental-detail h2 { margin: 0; }
.rental-detail .detail-top { margin-bottom: 15px; }
.rental-detail .notice { margin-bottom: 0; }
.rental-detail #rental-status:empty { display: none; }
.rental-detail #rental-confirm-cancel { margin-top: 8px; }
.rental-delivery { white-space: pre-wrap; }
.history-row .rental-delivery { margin-top: 10px; padding: 9px 12px; border-radius: 9px; background: #edf5ff; }
.history-row .rental-delivery summary { color: #16569a; cursor: pointer; font-weight: 750; }
.history-row .rental-delivery p { color: var(--ink); }
.store-rental .store-cover { object-fit: contain; background: #141414; }
.game-detail::backdrop { background: #17253d75; }
.detail-inner { padding: 23px; }
.detail-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.breadcrumb { margin: 0; color: var(--muted); font-size: 13px; }
.breadcrumb span { margin: 0 3px; }
.detail-close { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: white; color: var(--ink); font-size: 23px; }
.detail-heading { display: flex; align-items: center; gap: 15px; margin: 12px 0 20px; }
.detail-heading img { border-radius: 15px; object-fit: cover; }
.detail-heading h2 { margin: 0; font-size: clamp(21px, 3vw, 30px); }
.detail-heading p, .detail-fields .subtext { margin: 4px 0; color: var(--muted); font-size: 13px; }
.detail-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.detail-fields { display: grid; gap: 14px; min-width: 0; }
.section-icon { display: inline-grid; place-items: center; width: 27px; height: 27px; margin-inline-end: 5px; border-radius: 9px; color: #166fdf; background: var(--blue-soft); font-weight: 850; }
.detail-pack-grid:not(:empty) { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; margin-top: 13px; }
.detail-pack-grid button { min-width: 0; min-height: 58px; padding: 7px; background: white; color: var(--ink); border: 1px solid var(--line); border-radius: 11px; overflow-wrap: anywhere; }
.detail-pack-grid button:hover, .detail-pack-grid button[aria-pressed="true"], .detail-pack-grid button[aria-selected="true"] { border-color: var(--blue); background: var(--blue-soft); }
.result { overflow-wrap: anywhere; }

.site-footer { border-top: 1px solid var(--line); background: #fff; padding-top: 34px; color: #4a5360; font-size: 13px; }
.site-footer [id] { scroll-margin-top: 80px; }
.footer-grid { display: grid; grid-template-columns: 1.35fr 1fr 1fr 1fr; gap: 30px; padding-bottom: 28px; }
.footer-grid h2 { margin: 0 0 8px; color: var(--ink); font-size: 15px; }
.footer-grid p { margin: 7px 0; }
.footer-grid section > a:not(.wordmark) { display: block; width: fit-content; margin-block: 5px; }
.footer-grid section > a:hover { color: #166fdf; }
.footer-pill { display: inline-block; margin: 3px 4px 0 0; padding: 3px 7px; border-radius: 5px; background: var(--blue-soft); color: #176ac3; font-size: 11px; font-weight: 750; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; border-top: 1px solid var(--line); padding: 16px 0; }
.floating-help { position: fixed; z-index: 3; right: 35px; bottom: 21px; width: 57px; height: 57px; display: grid; place-items: center; border-radius: 50%; background: var(--blue); color: #fff; box-shadow: 0 7px 22px #1471df40; }
.floating-help svg { width: 30px; }

@media (max-width: 1180px) {
  .topbar-inner { gap: 15px; }
  .top-nav a { padding-inline: 8px; }
  .storefront-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
@media (max-width: 1010px) {
  .shell { width: calc(100% - 48px); }
  .topbar-inner { flex-wrap: wrap; gap: 7px 12px; padding-block: 8px; }
  .top-nav { order: 2; width: 100%; overflow-x: auto; }
  .top-actions { order: 1; }
  .purchase-history { scroll-margin-top: 112px; }
  .storefront-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .shell { width: calc(100% - 32px); }
  .storefront { padding-top: 25px; }
  .storefront-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
  .detail-layout, .wallet-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
  .floating-help { right: 16px; bottom: 16px; width: 49px; height: 49px; }
}
@media (max-width: 500px) {
  .storefront-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .top-actions { gap: 5px; }
  .locale { display: none; }
  .wallet-shortcut { gap: 4px; padding-inline: 6px; }
  .wallet-shortcut > span:first-child { display: none; }
  .storefront-filters button { padding-inline: 12px; }
  .store-card-copy { padding-inline: 7px; }
  .game-detail { width: calc(100% - 20px); max-height: calc(100% - 20px); }
  .detail-inner { padding: 13px; }
  .detail-pack-grid:not(:empty) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.summary-data { margin: 11px 0; font-size: 14px; }
.summary-data div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.summary-data dt { color: var(--muted); flex: none; }
.summary-data dd { margin: 0; text-align: end; font-weight: 700; }


.checkout-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.checkout-total strong, .detail-package-price { color: var(--blue); }
.checkout-total strong { font-size: 23px; }
.detail-package-name, .detail-package-price { display: block; }
.detail-package-price { margin-top: 5px; }
.checkout-confirmation {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--blue-soft);
}
.checkout-confirmation p { overflow-wrap: anywhere; margin: 5px 0 8px; }
.checkout-link { display: inline-block; margin-top: 10px; color: var(--blue); text-decoration: underline; }
#checkout-new { margin-top: 10px; }
#checkout-retry { margin-top: 10px; }
.saved-players { display: flex; align-items: end; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.saved-players label { flex: 1 1 190px; }
.saved-players button { white-space: nowrap; }

.storefront-category {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  color: var(--muted);
}
.storefront-category select {
  max-width: min(260px, 70vw);
  padding: 7px 12px;
  background: white;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 10px;
}
