:root {
  --bg: #F2F2F2;
  --card: #FFFFFF;
  --text: #0A0A0A;
  --muted: #737373;
  --border: #E5E5E5;
  --accent: #FF24A3;
  --pink-500: #EC4899;
  --pink-600: #DB2777;
  --pink-50: #FDF2F8;
  --pink-100: #FCE7F3;
  --amber: #D97706;
  --amber-border: #FDE68A;
  --font: "Dangrek", "Geist", "Kantumruy Pro", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-km-title: "Dangrek", "Battambang", "Kantumruy Pro", var(--font);
}

* { box-sizing: border-box; margin: 0; padding: 0; touch-action: manipulation; }
html { touch-action: manipulation; -webkit-text-size-adjust: 100%; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
[hidden] { display: none !important; }

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Dangrek", var(--font);
  overflow-x: hidden;
}
body.has-bar { padding-bottom: 104px; }
body.no-scroll { overflow: hidden; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .1);
}
.topbar-inner {
  height: 64px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.icon-btn {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--text);
  transition: background .2s;
}
.icon-btn:hover { background: #F5F5F5; }
.icon-btn svg { width: 24px; height: 24px; }
.top-logo img { width: 40px; height: 40px; transition: transform .2s; }
.top-logo:hover img { transform: scale(1.06); }
.login-btn {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(255, 36, 163, .3);
  transition: filter .2s;
}
.login-btn:hover { filter: brightness(1.06); }
.login-btn svg { width: 16px; height: 16px; }

/* ---------- Drawer ---------- */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(0, 0, 0, .4);
}
.drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 61;
  width: min(300px, 85vw);
  background: #fff;
  box-shadow: 4px 0 30px rgba(0, 0, 0, .15);
  transform: translateX(-100%);
  transition: transform .3s ease;
  display: flex;
  flex-direction: column;
}
.drawer.is-open { transform: none; }
.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 12px 12px 20px;
  border-bottom: 1px solid var(--border);
}
.drawer-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.drawer-nav { padding: 12px; overflow-y: auto; }
.drawer-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  transition: background .2s, color .2s;
}
.drawer-nav a:hover, .drawer-nav a.is-current { background: var(--pink-50); color: var(--pink-600); }
.drawer-nav svg { width: 18px; height: 18px; flex: none; }
.drawer-nav img { width: 24px; height: 24px; border-radius: 6px; flex: none; }
.drawer-label {
  margin: 14px 12px 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Page ---------- */
.page {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 24px 48px;
}

.banner {
  position: relative;
  height: 220px;
  border-radius: 12px;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(120deg, var(--b1, #7C3AED), var(--b2, #EC4899) 60%, var(--b3, #FB923C));
}
.banner::before {
  content: "";
  position: absolute;
  inset: -60%;
  background: repeating-conic-gradient(from 0deg at 70% 50%, rgba(255,255,255,.08) 0 9deg, transparent 9deg 22deg);
  z-index: -1;
}
.banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, .55), rgba(0, 0, 0, .05) 55%, transparent);
}
.banner-art { position: absolute; inset: 0; z-index: -1; }
.b-coin { position: absolute; filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .3)); opacity: .95; }
.b-coin.c1 { width: 120px; left: 8%; top: -24px; transform: rotate(-18deg); }
.b-coin.c2 { width: 70px; left: 32%; top: 40px; transform: rotate(12deg); opacity: .8; }
.b-coin.c3 { width: 54px; left: 22%; bottom: 30px; transform: rotate(-8deg); opacity: .7; }
.b-coin.c4 { width: 90px; right: 30%; top: 18px; transform: rotate(20deg); opacity: .85; }
.b-coin.c5 { width: 46px; right: 4%; top: 22px; opacity: .75; }
.banner-product {
  position: absolute;
  right: 7%;
  top: 50%;
  width: 170px;
  border-radius: 22px;
  border: 3px solid rgba(255, 255, 255, .8);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .35);
  transform: translateY(-50%) rotate(6deg);
  z-index: 0;
}
.banner-title {
  position: absolute;
  left: 16px;
  bottom: 16px;
  z-index: 1;
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  text-shadow: 0 2px 8px rgba(0, 0, 0, .3);
}

.notice {
  margin: 0 0 22px !important;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
  padding: 16px 20px;
  border-radius: 8px;
  background: var(--pink-50);
  border: 1px solid #FBCFE8;
  color: #831843;
}
.notice svg { width: 20px; height: 20px; flex: none; color: var(--pink-600); }
.notice p { font-size: 14px; line-height: 1.6; }

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 16px;
  margin-top: 0;
  align-items: start;
}
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
}

/* ---------- Info card ---------- */
.info-card { position: sticky; top: 80px; padding: 24px; }
.info-top { display: flex; align-items: center; gap: 16px; }
.info-img { width: 100px; height: 100px; border-radius: 8px; object-fit: cover; flex: none; }
.info-top h2 { font-size: 20px; font-weight: 700; line-height: 1.4; }
.info-feats {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 10px;
  margin-top: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--text);
}
.info-feats li {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: "Dangrek", "Kantumruy Pro", var(--font);
  font-size: 12px;
  line-height: 1.35;
}
.info-feats svg { width: 12px; height: 12px; flex: none; }
.info-desc {
  margin-top: 16px;
  color: #404040;
  font-size: 14px;
  line-height: 1.75;
}

/* ---------- Steps ---------- */
.steps { display: flex; flex-direction: column; gap: 24px; }
.step { padding: 24px; }
.step-head {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 14px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--text);
}
.step-num {
  flex: none;
  width: 24px;
  height: 24px;
  margin: 0 4px;
  display: grid;
  place-items: center;
  border: 2px solid var(--accent);
  border-radius: 6px;
  color: var(--accent);
  transform: rotate(45deg);
}
.step-num span { transform: rotate(-45deg); font-size: 13px; font-weight: 700; }
.step-head h3 {
  font-family: "Dangrek", var(--font-km-title);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.4;
}
.help { position: relative; display: grid; place-items: center; color: var(--text); cursor: help; outline: none; }
.help svg { width: 18px; height: 18px; }
.help-tip {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  z-index: 5;
  width: 260px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #171717;
  color: #fff;
  font-size: 12px;
  line-height: 1.5;
  transform: translateX(-50%);
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s;
}
.help:hover .help-tip, .help:focus .help-tip { opacity: 1; visibility: visible; }

/* Form */
.fields { display: flex; flex-direction: column; gap: 22px; }
.field label { display: block; margin-bottom: 10px; font-size: 14px; font-weight: 500; }
.req { color: #EF4444; }
.input-wrap { position: relative; }
.input-wrap input {
  width: 100%;
  height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  font-size: 14px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.input-wrap input::placeholder { color: #A3A3A3; font-family: "Dangrek", "Kantumruy Pro", var(--font); }
.input-wrap input:focus { border-color: var(--pink-500); box-shadow: 0 0 0 3px rgba(236, 72, 153, .15); }
.field.has-error input { border-color: #EF4444; }
.field-error { margin-top: 6px; font-size: 12px; color: #EF4444; min-height: 0; }
.field-error:empty { display: none; }
.eye {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  color: var(--muted);
}
.eye:hover { background: #F5F5F5; }
.eye svg { width: 16px; height: 16px; }
.input-wrap input[type="password"], .input-wrap.has-eye input { padding-right: 42px; }

.verify-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}
.verify-result { margin-right: auto; font-size: 13px; }
.verified {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 6px;
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  color: #15803D;
  font-weight: 500;
}
.verified svg { width: 14px; height: 14px; }
.check-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border-radius: 6px;
  background: var(--pink-500);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  transition: background .2s, opacity .2s;
}
.check-btn:hover:not(:disabled) { background: var(--pink-600); }
.check-btn:disabled { background: #F5F5F5; color: #A3A3A3; cursor: not-allowed; }
.check-btn svg { width: 16px; height: 16px; }
.check-btn.is-done { background: #16A34A; color: #fff; }
.check-btn.is-loading svg { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Packages */
.pkg-group + .pkg-group { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--border); }
.pkg-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 16px;
  font-weight: 600;
}
.pkg-title svg { width: 20px; height: 20px; }
.pkg-title.recommended { color: var(--amber); }
.pkg-title.hot { color: var(--pink-600); }
.pkg-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }

.pkg {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 12px;
  text-align: left;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  transition: transform .15s, box-shadow .2s, border-color .2s, background .2s;
}
.pkg:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(0, 0, 0, .08); }
.pkg-text { display: flex; flex-direction: column; min-width: 0; }
.pkg-name { font-size: 16px; font-weight: 500; line-height: 1.4; }
.pkg-price { margin-top: 2px; font-size: 14px; color: var(--muted); }
.pkg-icon { flex: none; display: grid; place-items: center; }
.pkg-icon img { width: 24px; height: 24px; object-fit: contain; }

.pkg.top {
  padding: 18px 20px;
  border: 2px solid var(--amber-border);
  border-radius: 12px;
  background: linear-gradient(135deg, #FFFBEB, #fff 70%);
  box-shadow: 0 4px 14px rgba(251, 191, 36, .18);
}
.pkg.top .pkg-name { font-size: 17px; font-weight: 700; color: #262626; }
.pkg.top .pkg-price { color: var(--amber); font-weight: 700; }
.pkg.top .pkg-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #FFFBEB, #FEF3C7 60%, #FDE68A);
  box-shadow: 0 4px 12px rgba(251, 191, 36, .35);
}
.pkg.top .pkg-icon img { width: 28px; height: 28px; }
.pkg-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px 3px 7px;
  border-radius: 0 10px 0 10px;
  background: linear-gradient(90deg, #FBBF24, #F97316);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
}
.pkg-badge svg { width: 11px; height: 11px; }

.pkg.hot {
  padding: 16px;
  border-color: var(--pink-100);
  background: linear-gradient(135deg, var(--pink-50), #fff);
  box-shadow: 0 2px 10px rgba(236, 72, 153, .08);
}
.pkg.hot .pkg-name { font-weight: 600; color: #262626; }
.pkg.hot .pkg-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--pink-100);
  color: #6366F1;
}
.pkg.hot .pkg-icon img { width: 26px; height: 26px; }
.pkg.hot .pkg-icon svg { width: 24px; height: 24px; }

.pkg.is-selected {
  border-color: var(--pink-500);
  background: var(--pink-50);
  box-shadow: 0 0 0 1px var(--pink-500), 0 6px 18px rgba(236, 72, 153, .18);
}
.pkg.top.is-selected { border-color: var(--pink-500); background: linear-gradient(135deg, #FFF1F8, #fff 70%); }
.pkg-check {
  position: absolute;
  left: -7px;
  top: -7px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: none;
  place-items: center;
  background: var(--pink-500);
  color: #fff;
  box-shadow: 0 2px 6px rgba(236, 72, 153, .4);
}
.pkg-check svg { width: 12px; height: 12px; }
.pkg.is-selected .pkg-check { display: grid; }

/* Payment */
.pay-grid { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.pay-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 20px 16px;
  border-radius: 14px;
  border: 1px solid rgba(236, 72, 153, .4);
  background: #fff;
  text-align: left;
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.pay-option:hover { border-color: rgba(236, 72, 153, .7); }
.pay-option[aria-checked="true"] {
  border-color: var(--accent);
  background: var(--pink-50);
  box-shadow: 0 0 0 3px rgba(255, 36, 163, .12);
}
.pay-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pay-logo {
  flex: none;
  width: 40px;
  height: 40px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 4px;
  color: #fff;
  font-weight: 700;
  line-height: 1;
  text-align: center;
}
.pay-logo-top { flex: 48; display: grid; place-items: center; background: #055E7C; font-size: 12px; letter-spacing: .02em; }
.pay-logo-bottom { flex: 22; display: grid; place-items: center; background: #E1232E; font-size: 6px; letter-spacing: .12em; }
.pay-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pay-text b { font-size: 16px; font-weight: 500; color: var(--text); }
.pay-text small { font-size: 14px; color: var(--muted); }
.pay-check {
  flex: none;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  border: 1px solid var(--accent);
  background: #fff;
  color: transparent;
  transition: background .2s, color .2s;
}
.pay-check svg { width: 14px; height: 14px; }
.pay-option[aria-checked="true"] .pay-check { background: var(--accent); color: #fff; }
.coupon { margin-top: 24px; padding-top: 18px; border-top: 1px dashed var(--border); }
.coupon-label { display: flex; align-items: center; gap: 8px; color: var(--pink-600); font-size: 14px; font-weight: 500; }
.coupon-label svg { width: 16px; height: 16px; }
.coupon-row { display: flex; gap: 8px; margin-top: 10px; }
.coupon-row input {
  flex: 1;
  min-width: 0;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  text-transform: uppercase;
  outline: none;
}
.coupon-row input:focus { border-color: var(--pink-500); box-shadow: 0 0 0 3px rgba(236, 72, 153, .15); }
.coupon-row input::placeholder { color: #A3A3A3; }
.coupon-signin { margin-top: 8px; font-size: 12px; color: var(--muted); }
.coupon-signin a { color: var(--pink-600); text-decoration: underline; }
.coupon-msg { margin-top: 8px; font-size: 12px; }
.coupon-msg:empty { display: none; }
.coupon-msg.ok { color: #15803D; }
.coupon-msg.err { color: #EF4444; }

.btn-pink {
  height: 40px;
  padding: 0 18px;
  border-radius: 6px;
  background: var(--pink-500);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  transition: background .2s, opacity .2s;
}
.btn-pink:hover:not(:disabled) { background: var(--pink-600); }
.btn-pink:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- Order bar ---------- */
.order-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  background: #fff;
  border-top: 1px solid var(--border);
  box-shadow: 0 -6px 24px rgba(0, 0, 0, .08);
  animation: barIn .25s ease;
}
@keyframes barIn { from { transform: translateY(100%); } }
.order-bar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px 16px;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "item btn" "hint btn";
  align-items: center;
  column-gap: 16px;
  row-gap: 6px;
}
.order-item { grid-area: item; display: flex; align-items: center; gap: 12px; min-width: 0; }
.order-icon {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  background: #FFFBEB;
}
.order-icon img { width: 22px; height: 22px; object-fit: contain; }
.order-item b { display: block; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.order-price { font-size: 12px; color: var(--muted); }
.order-price s { margin-right: 6px; }
.order-price em { font-style: normal; color: var(--pink-600); font-weight: 600; }
.order-hint {
  grid-area: hint;
  justify-self: start;
  padding: 3px 10px;
  border-radius: 999px;
  background: #F5F5F5;
  color: #525252;
  font-size: 12px;
}
.order-hint.ready { background: #F0FDF4; color: #15803D; }
.continue-btn { grid-area: btn; height: 44px; padding: 0 32px; background: var(--accent); }
.continue-btn:hover:not(:disabled) { background: #E6008A; }
.continue-btn.is-off { opacity: .5; }
.continue-btn.is-off:hover { background: var(--accent); }

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 64px;
  padding: 40px 24px;
  background: rgba(255, 255, 255, .14);
  border-top: 1px solid rgba(255, 255, 255, .25);
  box-shadow: 0 -12px 40px rgba(74, 6, 54, .12);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  color: var(--pink-100);
}
.footer-inner { max-width: 1024px; margin: 0 auto; text-align: center; }
.footer-brand { display: inline-flex; align-items: center; gap: 10px; text-align: left; }
.footer-brand b { display: block; font-family: "Dangrek", var(--font-display); font-size: 20px; font-weight: 900; color: #fff; }
.footer-brand small { display: block; font-size: 9px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.footer-tagline { margin-top: 14px; font-size: 12px; }
.site-footer .features { margin: 24px 0 0; text-align: left; color: #fff; }
.footer-social { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 6px 18px rgba(74, 6, 54, .16);
  transition: transform .2s;
}
.social-btn:hover { transform: translateY(-2px); }
.social-btn svg { width: 20px; height: 20px; }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, .2);
  font-size: 12px;
}
.footer-bottom b { color: #fff; }
.accept { display: flex; align-items: center; gap: 10px; font-weight: 700; color: #fff; }
.accept-box {
  display: inline-flex;
  gap: 4px;
  padding: 5px 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .2);
  border: 1px solid rgba(255, 255, 255, .35);
}
.mini {
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 8px;
  font-weight: 900;
  color: #fff;
}
.mini.aba { background: #0B5A73; }
.mini.khqr { background: #E1232C; }

.features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 16px 0;
}
.feature {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .3);
  box-shadow: 0 6px 20px rgba(74, 6, 54, .08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.feature-icon {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .25);
}
.feature-icon svg { width: 16px; height: 16px; }
.feature b { display: block; font-size: 12px; font-weight: 700; line-height: 1.3; }
.feature small { display: block; font-size: 10px; color: var(--pink-100); font-weight: 500; }
.site-footer {
  --ink: #2B0A22;
  --pink-100: #FCE7F3;
  --font-display: "Dangrek", "Outfit", "Kantumruy Pro", var(--font);
  margin-top: 40px;
  background: linear-gradient(180deg, #F23BA0 0%, #E8238E 45%, #C9177C 100%);
  color: var(--pink-100);
}
@media (max-width: 640px) {
  .site-footer { padding: 32px 16px; }
  .site-footer .features { grid-template-columns: repeat(2, 1fr); }
  .site-footer .footer-bottom { justify-content: center; text-align: center; }
}

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .5); animation: fade .2s; }
.modal-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding: 24px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .25);
  animation: pop .25s ease;
}
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.modal-close { position: absolute; top: 12px; right: 12px; }
.modal-close svg { width: 20px; height: 20px; }
.modal-title { font-family: "Dangrek", var(--font-km-title); font-size: 20px; font-weight: 700; }
.modal-sub { margin-top: 2px; color: var(--muted); font-size: 13px; }
.summary { margin-top: 18px; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.summary div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; font-size: 14px; }
.summary div + div { border-top: 1px solid var(--border); }
.summary dt { color: var(--muted); }
.summary dd { font-weight: 500; text-align: right; word-break: break-all; }
.summary .total { background: var(--pink-50); }
.summary .total dd { color: var(--pink-600); font-size: 16px; font-weight: 700; }
.khqr-box { margin-top: 18px; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); text-align: center; }
.khqr-head { padding: 10px; background: #E1232C; color: #fff; font-weight: 700; letter-spacing: .08em; }
.khqr-body { padding: 18px; }
.khqr-amount { font-size: 24px; font-weight: 700; }
.qr-placeholder {
  width: 170px;
  height: 170px;
  margin: 14px auto 10px;
  display: grid;
  place-items: center;
  border: 2px dashed #D4D4D4;
  border-radius: 12px;
  color: #A3A3A3;
  font-size: 12px;
  line-height: 1.5;
}
.qr-placeholder svg { display: block; width: 48px; height: 48px; margin: 0 auto 6px; }
.khqr-note { font-size: 12px; color: var(--muted); }
.modal-actions { display: flex; gap: 10px; margin-top: 18px; }
.modal-actions > * { flex: 1; }
.btn-ghost {
  height: 40px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 14px;
  font-weight: 500;
  display: grid;
  place-items: center;
}
.btn-ghost:hover { background: #FAFAFA; }
.modal-actions .btn-pink { display: grid; place-items: center; }
.success { text-align: center; padding: 8px 0; }
.success-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 14px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #DCFCE7;
  color: #16A34A;
}
.success-icon svg { width: 32px; height: 32px; }
.order-id { display: inline-block; margin-top: 12px; padding: 6px 12px; border-radius: 8px; background: #F5F5F5; font-family: ui-monospace, Consolas, monospace; font-weight: 600; }
.success p { margin-top: 10px; font-size: 14px; color: #525252; line-height: 1.6; }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  top: 80px;
  z-index: 90;
  max-width: calc(100vw - 32px);
  padding: 10px 16px;
  border-radius: 8px;
  background: #171717;
  color: #fff;
  font-size: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .2);
  transform: translate(-50%, -20px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, transform .25s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .pkg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .info-card { position: static; }
  .pkg-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .input-wrap input, .coupon-row input { font-size: 16px; }
  .topbar-inner { padding: 0 12px; gap: 10px; }
  .page { padding: 16px 16px 40px; }
  .banner { height: 170px; }
  .banner-product { width: 110px; right: 5%; }
  .b-coin.c1 { width: 80px; }
  .b-coin.c4 { width: 60px; }
  .notice { padding: 12px 14px; }
  .notice p { font-size: 13px; }
  .step, .info-card { padding: 18px; }
  .step-head h3 { font-size: 19px; }
  .pkg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .pkg, .pkg.top, .pkg.hot { padding: 12px; gap: 6px; }
  .pkg.top .pkg-icon, .pkg.hot .pkg-icon { width: 34px; height: 34px; }
  .pkg.top .pkg-icon img, .pkg.hot .pkg-icon img { width: 22px; height: 22px; }
  .pkg.top .pkg-name { font-size: 15px; }
  .pkg-name { font-size: 14px; }
  .pkg-price { font-size: 13px; }
  .pay-grid { gap: 10px; }
  .help-tip { left: auto; right: -10px; transform: none; width: 220px; }
  .order-bar-inner { grid-template-columns: 1fr auto; grid-template-areas: "item hint" "btn btn"; row-gap: 10px; }
  .order-hint { justify-self: end; font-size: 11px; text-align: right; }
  .continue-btn { width: 100%; }
  body.has-bar { padding-bottom: 130px; }
}

/* ---------- Light / dark switch ---------- */
.theme-btn {
  width: 36px;
  height: 36px;
  flex: none;
  margin-left: auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  transition: background .2s;
}
.theme-btn:hover { background: var(--pink-50); }
.theme-btn svg { width: 18px; height: 18px; }
.theme-btn + .login-btn { margin-left: 0; }
.theme-btn .i-sun { display: none; }
[data-theme="dark"] .theme-btn .i-moon { display: none; }
[data-theme="dark"] .theme-btn .i-sun { display: block; color: #FFD166; }

/* ---------- Dark mode ---------- */
[data-theme="dark"] {
  --bg: #0F0B10;
  --card: #1A1419;
  --text: #F3ECF1;
  --muted: #A69AA3;
  --border: #2E2530;
  --pink-50: #2A1323;
  --pink-100: #3B1A31;
  --amber: #F5A524;
  --amber-border: #6B4A12;
}
[data-theme="dark"] .topbar { background: var(--card); box-shadow: 0 2px 10px rgba(0, 0, 0, .4); }
[data-theme="dark"] .icon-btn:hover, [data-theme="dark"] .eye:hover { background: #2A2229; }
[data-theme="dark"] .drawer { background: var(--card); }
[data-theme="dark"] .notice { border-color: #5A2147; color: #FFB3DC; }
[data-theme="dark"] .info-desc { color: #CFC4CC; }
[data-theme="dark"] .input-wrap input,
[data-theme="dark"] .coupon-row input { background: #120D12; color: var(--text); }
[data-theme="dark"] .input-wrap input::placeholder,
[data-theme="dark"] .coupon-row input::placeholder { color: #776C75; }
[data-theme="dark"] .pkg { background: var(--card); }
[data-theme="dark"] .pkg:hover { box-shadow: 0 4px 14px rgba(0, 0, 0, .4); }
[data-theme="dark"] .pkg.top { background: linear-gradient(135deg, #2B2210, var(--card) 70%); box-shadow: 0 4px 14px rgba(0, 0, 0, .3); }
[data-theme="dark"] .pkg.top .pkg-name,
[data-theme="dark"] .pkg.hot .pkg-name { color: var(--text); }
[data-theme="dark"] .pkg.top .pkg-icon { background: radial-gradient(circle at 35% 30%, #4A3A14, #2F250E); box-shadow: none; }
[data-theme="dark"] .pkg.hot { background: linear-gradient(135deg, var(--pink-50), var(--card)); box-shadow: none; }
[data-theme="dark"] .pkg.top.is-selected { background: linear-gradient(135deg, #3A1430, var(--card) 70%); }
[data-theme="dark"] .pay-option,
[data-theme="dark"] .pay-check { background: var(--card); }
[data-theme="dark"] .pay-option[aria-checked="true"] { background: var(--pink-50); }
[data-theme="dark"] .pay-option[aria-checked="true"] .pay-check { background: var(--accent); }
[data-theme="dark"] .coupon-msg.ok { color: #4ADE80; }
[data-theme="dark"] .order-bar { background: var(--card); box-shadow: 0 -6px 24px rgba(0, 0, 0, .4); }
[data-theme="dark"] .order-icon { background: #2B2210; }
[data-theme="dark"] .order-hint { background: #2A2229; color: #CFC4CC; }
[data-theme="dark"] .modal-card { background: var(--card); }
[data-theme="dark"] .qr-placeholder { border-color: #3A3039; color: #776C75; }
[data-theme="dark"] .btn-ghost { background: var(--card); }
[data-theme="dark"] .btn-ghost:hover { background: #241C23; }
[data-theme="dark"] .order-id { background: #2A2229; }
[data-theme="dark"] .success p { color: var(--muted); }
[data-theme="dark"] .success-icon { background: #12351F; color: #4ADE80; }
[data-theme="dark"] .toast { background: #2E2530; }
[data-theme="dark"] .site-footer { background: linear-gradient(180deg, #2A0F24 0%, #1A0B17 50%, #120A10 100%); border-top-color: rgba(255, 255, 255, .08); color: #CDB8C6; }
[data-theme="dark"] .site-footer .social-btn { background: #251A24; color: #F7E8F1; box-shadow: 0 6px 18px rgba(0, 0, 0, .35); }
[data-theme="dark"] .site-footer .footer-bottom { border-top-color: rgba(255, 255, 255, .08); }
[data-theme="dark"] .site-footer .feature { background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .08); }
[data-theme="dark"] .site-footer .feature-icon { background: rgba(255, 87, 190, .18); color: #FF8FD0; }
[data-theme="dark"] .accept-box { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .12); }

/* ---------- Customer order page ---------- */
.order-page { max-width: 640px; }
.order-page .step-head { flex-wrap: wrap; }
.order-head { justify-content: space-between; }
.hint-line { margin-top: 12px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.success-note { margin-top: 12px; font-size: 13px; color: var(--muted); line-height: 1.6; }
.order-status { padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #FEF3C7; color: #B45309; }
.order-status.processing { background: #DBEAFE; color: #1D4ED8; }
.order-status.completed { background: #DCFCE7; color: #15803D; }
.order-status.cancelled { background: #F3F4F6; color: #6B7280; }
.gift-box { margin-top: 18px; padding: 18px; border-radius: 14px; border: 2px dashed var(--accent); background: var(--pink-50); text-align: center; }
.gift-box.waiting { border-color: var(--border); background: var(--bg); }
.gift-label { font-size: 14px; font-weight: 600; }
.gift-code {
  margin: 12px 0;
  padding: 14px;
  border-radius: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  font-family: ui-monospace, Consolas, monospace;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: .08em;
  word-break: break-all;
  user-select: all;
}
.gift-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.gift-actions > * { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 150px; }
.gift-actions svg { width: 16px; height: 16px; }
.my-orders { display: flex; flex-direction: column; gap: 8px; }
.my-order { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--card); }
.my-order:hover { border-color: var(--pink-500); }
.my-order b { display: block; font-family: ui-monospace, Consolas, monospace; }
.my-order small { color: var(--muted); font-size: 12px; }
[data-theme="dark"] .order-status { background: #3A2A0C; color: #FBBF24; }
[data-theme="dark"] .order-status.processing { background: #172554; color: #93C5FD; }
[data-theme="dark"] .order-status.completed { background: #12351F; color: #4ADE80; }
[data-theme="dark"] .order-status.cancelled { background: #2A2229; color: #A69AA3; }
