/* =========================================================
   Nora Kingdom — ร้านค้า / สั่งซื้อ / ชำระเงิน / เช็กคิว (หน้าลูกค้า)
   ========================================================= */
.menu .menu-wide { grid-column: 1 / -1; min-height: 60px; font-size: 1.15rem; }
.sub-actions { display: flex; gap: 8px; justify-content: center; margin: -4px 0 12px; flex-wrap: wrap; }
.sub-actions .btn svg { width: 18px; height: 18px; }
.inline-ico { width: 18px !important; height: 18px !important; vertical-align: -3px; }
.prof-side > .win + .win, .style-layout > .win + .win { margin-top: 44px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.grow { flex: 1; min-width: 0; }
.input-bad { border-color: var(--bad) !important; box-shadow: 0 0 0 3px #ffd1d7 !important; }

/* breadcrumb */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: -6px 0 30px; font-family: var(--font-th); font-size: .88rem; }
.crumbs a { color: var(--ink); background: var(--white); border: 2px solid var(--ink); border-radius: 8px; padding: 0 8px; text-decoration: none; }
.crumbs span { color: var(--ink-soft); }
.crumbs i { font-style: normal; color: var(--ink-soft); }

/* หมวด */
.cat-grid { display: grid; gap: 12px; }
.cat-card {
  display: grid; grid-template-columns: 58px 1fr auto; gap: 12px; align-items: center;
  padding: 12px; border: var(--bw) solid var(--ink); border-radius: 14px; background: var(--white);
  box-shadow: inset 0 -4px 0 var(--lav-xl), 0 4px 0 var(--ink); color: var(--ink); text-decoration: none;
  transition: transform .08s;
}
.cat-card:hover { transform: translateY(-2px); }
.cat-card:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.cat-ico { width: 58px; height: 58px; display: grid; place-items: center; border: var(--bw) solid var(--ink); border-radius: 12px; background: var(--pink-l); }
.cat-ico svg { width: 36px; height: 36px; }
.cat-body { display: grid; gap: 2px; min-width: 0; }
.cat-body b { font-family: var(--font-th); font-weight: 500; font-size: 1.1rem; }
.cat-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 4px; }
.price-from { font-size: .9rem; color: var(--pink-d); font-weight: 600; }
.cat-arrow { color: var(--lav-d); }
.how { margin-top: 18px; padding: 12px; border: var(--bw) dashed var(--ink); border-radius: 12px; background: var(--cream); text-align: center; font-family: var(--font-th); }

/* stepper */
.stepper { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin: 4px 0 16px; padding: 0; list-style: none; }
.stepper li { display: grid; justify-items: center; gap: 2px; text-align: center; font-size: .74rem; font-family: var(--font-th); color: var(--ink-soft); position: relative; }
.stepper li:not(:last-child)::after { content: ''; position: absolute; top: 14px; left: calc(50% + 18px); right: calc(-50% + 18px); height: 3px; background: var(--lav-l); }
.stepper li.done::after { background: var(--ok); }
.stepper b { width: 30px; height: 30px; display: grid; place-items: center; border: var(--bw) solid var(--ink); border-radius: 9px; background: var(--white); font-family: var(--font-px); color: var(--ink); }
.stepper li.done b { background: var(--ok); }
.stepper li.now b { background: var(--pink); animation: bob .8s steps(2) infinite; }
.stepper li.now { color: var(--ink); font-weight: 500; }

/* แนว */
.style-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.style-card { display: grid; border: var(--bw) solid var(--ink); border-radius: 14px; background: var(--white); overflow: hidden; color: var(--ink); text-decoration: none; box-shadow: 0 4px 0 var(--ink); transition: transform .08s; }
.style-card:hover { transform: translateY(-2px); }
.style-card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-bottom: var(--bw) solid var(--ink); image-rendering: pixelated; background: var(--lav-xl); }
.style-body { display: grid; gap: 3px; padding: 8px 10px 10px; justify-items: start; }
.style-body b { font-family: var(--font-th); font-weight: 500; }
.style-body .small { line-height: 1.4; }

/* แพ็กเกจ */
.pkg-list { display: grid; gap: 8px; }
.pkg { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; border: var(--bw) solid var(--ink); border-radius: 12px; background: var(--white); cursor: default; }
div.pkg { grid-template-columns: 1fr auto; }
label.pkg { cursor: pointer; }
.pkg input { width: 22px; height: 22px; accent-color: var(--pink-d); margin: 0; }
label.pkg:has(input:checked) { background: var(--pink-l); box-shadow: inset 0 -4px 0 var(--pink); }
.pkg-in { display: grid; min-width: 0; }
.pkg-in b { font-family: var(--font-th); font-weight: 500; }
.pkg-price { font-size: 1.15rem; font-weight: 700; color: var(--pink-d); white-space: nowrap; }
.price-big { font-size: 1.3rem; color: var(--pink-d); }

/* เดโม่ในกรอบมือถือ */
.demo-zone { margin: 4px 0 6px; }
.phone { position: relative; width: min(300px, 100%); margin: 0 auto; aspect-ratio: 9/17; padding: 14px 10px; border: 4px solid var(--ink); border-radius: 30px; background: var(--ink); box-shadow: 0 6px 0 rgba(47,33,83,.3), inset 0 0 0 3px var(--lav-dd); }
.phone-notch { position: absolute; top: 5px; left: 50%; transform: translateX(-50%); width: 70px; height: 6px; border-radius: 6px; background: var(--lav-dd); }
.phone iframe { width: 100%; height: 100%; border: 0; border-radius: 18px; background: var(--white); display: block; }

/* แกลเลอรี */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.g-item { padding: 0; border: var(--bw) solid var(--ink); border-radius: 10px; overflow: hidden; background: var(--lav-xl); cursor: zoom-in; aspect-ratio: 1; }
.g-item img { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; display: block; }
.lb img { width: 100%; max-height: 62vh; object-fit: contain; border: var(--bw) solid var(--ink); border-radius: 12px; background: var(--lav-xl); image-rendering: pixelated; }
.lb-nav { display: flex; justify-content: center; align-items: center; gap: 14px; margin-top: 10px; }

/* สรุปออเดอร์ / ฟอร์ม */
.order-sum { display: grid; grid-template-columns: 64px 1fr auto; gap: 10px; align-items: center; padding: 10px; margin-bottom: 16px; border: var(--bw) solid var(--ink); border-radius: 12px; background: var(--cream); }
.order-sum img { width: 64px; height: 64px; object-fit: cover; border: var(--bw) solid var(--ink); border-radius: 10px; image-rendering: pixelated; }
.order-sum b { font-family: var(--font-th); font-weight: 500; }
.line-field { padding: 12px; border: var(--bw) solid var(--ink); border-radius: 12px; background: #eafaf0; }
.line-notice { display: flex; gap: 8px; align-items: flex-start; margin-top: 8px; font-size: .85rem; line-height: 1.5; }
.line-notice svg { flex: none; margin-top: 2px; }
.radio-row { display: flex; flex-wrap: wrap; gap: 8px; }
.radio-pill input { position: absolute; opacity: 0; }
.radio-pill span { display: inline-block; padding: 6px 14px; border: var(--bw) solid var(--ink); border-radius: 999px; background: var(--white); cursor: pointer; font-family: var(--font-th); font-size: .92rem; }
.radio-pill input:checked + span { background: var(--pink); box-shadow: inset 0 -3px 0 var(--pink-d); }
.radio-pill input:focus-visible + span { outline: 3px dashed var(--pink-d); outline-offset: 2px; }
.drop-sm { min-height: 80px; }
.drop-sm svg { width: 28px; }
.file-prev img { margin-top: 8px; max-height: 140px; border: var(--bw) solid var(--ink); border-radius: 10px; }

/* ติดตามออเดอร์ */
.order-card { display: grid; gap: 4px; padding: 12px; border: var(--bw) solid var(--ink); border-radius: 12px; background: var(--white); box-shadow: 0 4px 0 var(--ink); }
.order-id { font-size: 1.15rem; font-weight: 700; }
.state-box { display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: start; margin-top: 16px; padding: 12px; border: var(--bw) solid var(--ink); border-radius: 12px; background: var(--sky-l); font-family: var(--font-th); }
.state-box svg { width: 40px; }
.state-box.ok { background: #e3f7ea; }
.state-box.bad { background: #ffe6ea; }
.pay-panel { margin-top: 10px; }
.qr-box { display: grid; justify-items: center; gap: 2px; padding: 14px; margin: 0 auto 12px; width: min(280px, 100%); border: var(--bw) solid var(--ink); border-radius: 14px; background: var(--white); text-align: center; box-shadow: 0 4px 0 var(--ink); }
.qr-box svg { width: 200px; height: 200px; image-rendering: pixelated; }
.acc-more, .lookup-more { margin: 10px 0; }
.acc-more summary, .lookup-more summary { cursor: pointer; font-family: var(--font-th); color: var(--lav-dd); padding: 6px 0; }
.acc-list { display: grid; gap: 10px; }
.acc { display: grid; grid-template-columns: 44px 1fr auto; gap: 10px; align-items: center; padding: 10px; border: var(--bw) solid var(--ink); border-radius: 12px; background: var(--white); }
.acc-bank { width: 44px; height: 44px; display: grid; place-items: center; border: var(--bw) solid var(--ink); border-radius: 12px; color: var(--white); font-family: var(--font-th); font-size: 1.2rem; text-shadow: 0 2px 0 rgba(0,0,0,.2); }
.acc-info { min-width: 0; }
.acc-info b { font-family: var(--font-th); font-weight: 500; }
.acc-no { font-size: 1.05rem; letter-spacing: .04em; user-select: all; }
.acc-qr { grid-column: 1 / -1; width: 180px; margin: 6px auto 0; border: var(--bw) solid var(--ink); border-radius: 10px; }

/* คิว */
.q-legend { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; justify-content: center; }
.qs { display: inline-block; padding: 0 10px; border: 2px solid var(--ink); border-radius: 999px; font-family: var(--font-th); font-size: .78rem; line-height: 1.6; white-space: nowrap; }
.qs-waiting { background: #ece7f7; }
.qs-working { background: var(--gold); }
.qs-checking { background: var(--sky); }
.qs-done { background: #b7ecc9; }
.q-row { display: grid; grid-template-columns: 46px 1fr; gap: 10px; align-items: start; padding: 10px; margin-bottom: 10px; border: var(--bw) solid var(--ink); border-radius: 12px; background: var(--white); box-shadow: 0 3px 0 var(--ink); }
.q-row.mine { background: var(--pink-l); box-shadow: inset 0 0 0 3px var(--pink), 0 3px 0 var(--ink); }
.q-no { width: 46px; height: 46px; display: grid; place-items: center; border: var(--bw) solid var(--ink); border-radius: 10px; background: var(--lav-l); font-size: 1.3rem; font-weight: 700; }
.q-main { min-width: 0; }
.q-main b { font-family: var(--font-th); font-weight: 500; }
.stage-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; margin-top: 6px; }
.stage-bar span { height: 10px; border: 2px solid var(--ink); border-radius: 4px; background: var(--white); }
.stage-bar span.on { background: var(--ok); }
.stage-labels { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; margin-top: 2px; color: var(--ink-soft); font-size: .68rem; text-align: center; }
.stage-labels .cur { color: var(--ink); font-weight: 600; }

/* โปรไฟล์: LINE + ออเดอร์ */
.line-card { display: grid; grid-template-columns: 40px 1fr auto; gap: 10px; align-items: center; padding: 10px; border: var(--bw) solid var(--ink); border-radius: 12px; background: #eafaf0; }
.line-card svg { width: 36px; }
.line-card b { font-family: var(--font-th); font-weight: 500; }
.pts-row { display: flex; align-items: center; justify-content: space-between; margin: 12px 0; padding: 8px 12px; border: var(--bw) solid var(--ink); border-radius: 12px; background: var(--cream); font-family: var(--font-th); }
.pts-row svg { width: 22px; vertical-align: -5px; }
.pts-row b { font-size: 1.3rem; }
.order-mini-list { display: grid; gap: 8px; }
.order-mini { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; border: var(--bw) solid var(--ink); border-radius: 10px; background: var(--white); cursor: pointer; text-align: left; font: inherit; color: inherit; }
.order-mini .grow { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (min-width: 640px) {
  .cat-grid { grid-template-columns: 1fr 1fr; }
  .style-grid { grid-template-columns: repeat(3, 1fr); }
  .gallery { grid-template-columns: repeat(4, 1fr); }
  .stepper li { font-size: .82rem; }
}
@media (min-width: 980px) {
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .style-grid { grid-template-columns: repeat(4, 1fr); }
  .style-layout { display: grid; grid-template-columns: 1fr 360px; gap: 28px; align-items: start; }
  .style-layout > .win + .win { margin-top: 0; }
  .order-box { position: sticky; top: calc(var(--hud-h, 61px) + 90px); }
}
@media (max-width: 639px) {
  .menu { grid-template-columns: 1fr 1fr; gap: 10px; }
  .menu .btn:not(.menu-wide) { min-height: 50px; padding: 6px 10px; font-size: .92rem; gap: 6px; }
  .menu .btn:not(.menu-wide) svg { width: 22px; height: 22px; }
  .menu .btn .arrow { display: none; }
}

/* ===== ตะกร้า ===== */
.hud-cart { position: relative; }
.hud-cart svg { width: 20px !important; height: 20px !important; }
.cart-badge { position: absolute; top: -8px; right: -8px; min-width: 20px; height: 20px; padding: 0 4px; display: grid; place-items: center; border: 2px solid var(--ink); border-radius: 999px; background: var(--pink); font: 600 .72rem/1 var(--font-px); }
.buy-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.buy-row .btn { min-height: 54px; font-size: 1.05rem; }
.bump { animation: pop .35s; }
.cart-list { display: grid; gap: 10px; }
.cart-item { display: flex; gap: 10px; align-items: center; padding: 10px; border: var(--bw) solid var(--ink); border-radius: 12px; background: var(--white); box-shadow: 0 3px 0 var(--ink); }
.cart-item img { width: 64px; height: 64px; flex: none; object-fit: cover; border: var(--bw) solid var(--ink); border-radius: 10px; image-rendering: pixelated; }
.cart-item b { font-family: var(--font-th); font-weight: 500; font-size: .95rem; }
.cart-total { display: flex; justify-content: space-between; align-items: center; margin: 14px 0; padding: 10px 14px; border: var(--bw) dashed var(--ink); border-radius: 12px; background: var(--cream); font-family: var(--font-th); }
.info-rows { display: grid; gap: 0; border: var(--bw) solid var(--ink); border-radius: 12px; overflow: hidden; background: var(--white); }
.info-rows > div { display: flex; justify-content: space-between; gap: 10px; padding: 8px 12px; border-bottom: 2px dashed var(--lav-l); }
.info-rows > div:last-child { border-bottom: 0; }
.info-rows b { font-family: var(--font-th); font-weight: 500; text-align: right; }
.term { padding: 10px 12px; margin-bottom: 8px; border: 2px solid var(--lav-l); border-radius: 10px; background: var(--white); }
.term p { margin: 4px 0 0; white-space: pre-line; font-size: .92rem; }
.form-2 { display: grid; gap: 0 12px; }
.accept { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: var(--bw) solid var(--ink); border-radius: 12px; background: var(--lav-xl); cursor: pointer; font-size: .92rem; }
.accept input { width: 22px; height: 22px; flex: none; accent-color: var(--pink-d); margin-top: 2px; }
.linklike { background: none; border: 0; padding: 0; color: var(--pink-d); font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; }
.page > .win + .win, .page-narrow > .win + .win { margin-top: 44px; }

/* ===== ฟอร์มบรีฟ ===== */
.bf-sec { margin-bottom: 10px; border: var(--bw) solid var(--ink); border-radius: 12px; background: var(--white); overflow: hidden; }
.bf-sec > summary { list-style: none; cursor: pointer; display: grid; gap: 2px; padding: 10px 40px 10px 12px; background: var(--lav-xl); position: relative; font-family: var(--font-th); }
.bf-sec > summary::-webkit-details-marker { display: none; }
.bf-sec > summary::after { content: '▼'; position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-family: var(--font-px); font-size: .8rem; color: var(--lav-dd); }
.bf-sec[open] > summary { background: var(--pink-l); border-bottom: var(--bw) solid var(--ink); }
.bf-sec[open] > summary::after { content: '▲'; }
.bf-sec > summary small { color: var(--ink-soft); font-size: .8rem; font-family: var(--font-body); }
.bf-body { padding: 12px; }
.check-pill input:checked + span { background: var(--lav); box-shadow: inset 0 -3px 0 var(--lav-d); }
.check-pill input:checked + span::before { content: '✓ '; }
.pg-list { display: grid; gap: 8px; margin-bottom: 8px; }
.pg-row { display: grid; grid-template-columns: 1fr auto; gap: 6px; padding: 8px; border: 2px dashed var(--lav-l); border-radius: 10px; background: var(--lav-xl); }
.pg-row .pg-no { grid-column: 1; font-size: .82rem; }
.pg-row .pg-del { grid-column: 2; grid-row: 1; }
.pg-row .input { grid-column: 1 / -1; min-height: 40px; padding: 6px 10px; }
.bv-sec { margin: 12px 0 6px; padding: 4px 10px; border-radius: 8px; background: var(--lav-l); font-family: var(--font-th); font-weight: 500; }
.bv-row { padding: 6px 2px; border-bottom: 1px dashed var(--lav-l); white-space: pre-wrap; }
.bv-img { max-width: 160px; max-height: 160px; border: var(--bw) solid var(--ink); border-radius: 10px; }
.bv-page { padding: 6px 8px; margin: 4px 0; border-radius: 8px; background: var(--lav-xl); }

/* ===== ออเดอร์ ===== */
.order-items { display: grid; gap: 4px; margin: 6px 0; padding: 8px 10px; border-radius: 10px; background: var(--lav-xl); font-size: .9rem; }
.order-items .px { white-space: nowrap; }
.trk-q { display: flex; gap: 10px; align-items: flex-start; margin-top: 10px; }
.trk-q .q-no { width: 40px; height: 40px; font-size: 1.1rem; flex: none; }
.qr-img { width: 220px; max-width: 100%; border-radius: 10px; }

/* ===== ช่องทางโอน (แบบ Nora Payment) ===== */
.ch-rows { display: grid; gap: 10px; }
.ch-row { display: grid; grid-template-columns: 46px 1fr auto; gap: 10px; align-items: center; padding: 10px; border: var(--bw) solid var(--ink); border-radius: 14px; background: #fff5f9; }
.ch-row.t-promptpay { background: #f8f5ff; }
.ch-row.t-truemoney { background: #f3f7ff; }
.ch-ico { width: 46px; height: 46px; display: grid; place-items: center; border: var(--bw) solid var(--ink); border-radius: 50%; background: var(--white); }
.ch-ico svg { width: 26px; height: 26px; }
.ch-txt { display: grid; min-width: 0; }
.ch-lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-num { font-size: clamp(.95rem, 3.8vw, 1.1rem); letter-spacing: .04em; user-select: all; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-copy.done { background: var(--lav-l); }
.fly-heart { position: absolute; z-index: 400; width: 18px; pointer-events: none; animation: flyup 1.1s ease-out forwards; }
.fly-heart svg { width: 18px; height: 18px; }
@keyframes flyup { 0% { opacity: 0; transform: translate(-50%, 0) scale(.5); } 20% { opacity: 1; } 100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), -80px) scale(1.2); } }

.np-page { max-width: 900px; margin: 0 auto; }
.np-hero { display: grid; justify-items: center; text-align: center; gap: 2px; padding-top: 26px; }
.np-logo { position: relative; width: 112px; height: 112px; margin-bottom: 6px; }
.np-ring { position: absolute; inset: 0; border: 4px dashed var(--pink); border-radius: 50%; animation: spin 16s linear infinite; }
.np-ring.r2 { inset: 8px; border: 3px dotted var(--lav); animation-duration: 24s; animation-direction: reverse; }
.np-face { position: absolute; inset: 18px; display: grid; place-items: center; overflow: hidden; border: var(--bw) solid var(--ink); border-radius: 50%; background: var(--white); font-size: 1.8rem; box-shadow: 0 4px 0 var(--lav-l); }
.np-face img { width: 100%; height: 100%; object-fit: cover; }
.np-shop { font-family: var(--font-th); font-weight: 500; }
.np-dots { display: flex; gap: 6px; margin: 6px 0; }
.np-dots i { width: 6px; height: 6px; background: var(--pink); }
.np-dots i:nth-child(2) { background: var(--lav); }
.np-dots i:nth-child(3) { background: var(--sky); }
.np-greet { font-size: .85rem; color: var(--pink-d); font-family: var(--font-th); }
.np-title { font-size: 1.35rem; }
.np-sub { color: var(--ink-soft); margin: 0; font-size: .92rem; }
.np-pay { display: grid; gap: 22px; margin-top: 44px; }
.np-qr-side { display: grid; justify-items: center; gap: 14px; }
.np-h2 { font-size: 1.05rem; }
.np-qr { width: min(300px, 100%); aspect-ratio: 1; display: grid; place-items: center; padding: 16px; border: var(--bw) solid var(--ink); border-radius: 22px; background: var(--white); box-shadow: inset 0 0 0 4px var(--pink-l), 0 5px 0 var(--ink); }
.np-qr img, .np-qr svg { width: 100%; height: 100%; object-fit: contain; border-radius: 10px; image-rendering: auto; }
.np-qr-empty { display: grid; justify-items: center; gap: 6px; color: var(--ink-soft); font-size: .9rem; }
.np-qr-empty svg { width: 48px !important; height: 48px !important; opacity: .5; }
.np-acct { display: grid; justify-items: center; width: min(300px, 100%); padding: 10px 14px; border: var(--bw) solid var(--ink); border-radius: 14px; background: linear-gradient(120deg, #fff4f8, #f6f2ff); text-align: center; }
.np-acct small { color: var(--ink-soft); font-size: .8rem; }
.np-acct strong { font-family: var(--font-th); font-weight: 500; font-size: 1.1rem; overflow-wrap: anywhere; }
.np-ch-side { display: grid; gap: 12px; align-content: center; }
.np-divider { display: flex; align-items: center; gap: 10px; }
.np-divider::before, .np-divider::after { content: ''; flex: 1; border-top: 3px dashed var(--pink-l); }
.np-divider h2 { font-size: .95rem; white-space: nowrap; }
.np-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.np-foot p { margin: 0 0 8px; }
.np-mascot { position: relative; flex: none; }
.np-mascot-btn { width: 92px; height: 70px; border: 0; padding: 0; background: none; cursor: pointer; animation: bob 1.6s steps(2) infinite; }
.np-mascot-btn svg, .np-mascot-btn img { width: 88px; height: auto; max-height: 70px; object-fit: contain; }
.np-mascot-btn.jiggle { animation: jiggle .5s; }
@keyframes jiggle { 25% { transform: rotate(-8deg); } 75% { transform: rotate(8deg); } }
.np-bubble { position: absolute; right: 4px; bottom: calc(100% + 4px); padding: 6px 12px; border: var(--bw) solid var(--ink); border-radius: 12px; background: var(--white); font-family: var(--font-th); font-size: .82rem; white-space: nowrap; box-shadow: 0 3px 0 var(--ink); animation: popin .2s; z-index: 3; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== คิว: ไอเทมเกมหมุนรอบ ===== */
.orbit-stage { position: relative; display: grid; justify-items: center; gap: 10px; max-width: 400px; padding: 8px 44px 40px; margin: 4px auto 6px; }
.orbit { position: absolute; inset: 0; pointer-events: none; }
.orb { position: absolute; left: var(--x); top: var(--y); width: 30px; height: 30px; margin: -15px 0 0 -15px; opacity: 0; animation: orbPop 4.4s ease-in-out var(--d) infinite; }
.orb-in { display: block; width: 100%; height: 100%; }
.orb-in svg { width: 100%; height: 100%; animation: bob 1s steps(2) infinite; }
@keyframes orbPop { 0% { opacity: 0; transform: scale(.3) translateY(8px); } 14% { opacity: 1; transform: scale(1.15); } 22%, 62% { opacity: 1; transform: scale(1); } 78%, 100% { opacity: 0; transform: scale(.5) translateY(-6px); } }
.core-hero { position: relative; z-index: 1; width: 52px !important; animation: walk .4s steps(2) infinite; filter: drop-shadow(0 4px 0 rgba(47, 33, 83, .18)); }
.core-boxes { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; max-width: 300px; }
.core-box { display: grid; justify-items: center; align-content: center; gap: 6px; min-height: 108px; padding: 10px 6px; border: var(--bw) solid var(--ink); border-radius: 14px; background: radial-gradient(circle at 50% 30%, var(--white), var(--lav-xl) 75%); box-shadow: 0 0 0 4px var(--pink-l), 0 5px 0 rgba(47, 33, 83, .25); text-align: center; }
.core-lbl { font-family: var(--font-th); font-size: .78rem; font-weight: 700; color: var(--ink-2, var(--ink)); opacity: .8; }
.core-no { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 10px; font-size: 2.8rem; font-weight: 700; line-height: 1; }
.core-no.n-two { font-size: 1.5rem; gap: 5px; }
.core-no.n-many { font-size: 1.1rem; gap: 5px; }
.core-no.n-two > span, .core-no.n-many > span { min-width: 1.5em; padding: 3px 4px 1px; border: 2px solid var(--ink); border-radius: 8px; background: var(--gold-l, #fff3c4); text-align: center; box-shadow: 0 2px 0 var(--ink); }
.core-sub { font-family: var(--font-th); font-size: .72rem; opacity: .75; }
.core-box .qs { font-size: .8rem; }
.q-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.q-stats .stat b { font-size: 1.4rem; }
.q-row.now { box-shadow: inset 0 0 0 3px var(--gold), 0 3px 0 var(--ink); }
.qs-declined { background: #ffd6dc; }
.qs-cancelled { background: #e2e0ea; }
.stage-off { display: inline-block; margin-top: 6px; padding: 2px 10px; border: 2px solid var(--ink); border-radius: 8px; font-family: var(--font-th); font-size: .78rem; }
.no-anim .orb { animation: none; opacity: 1; }

@media (min-width: 640px) {
  .form-2 { grid-template-columns: 1fr 1fr; }
  .pg-row { grid-template-columns: 70px 1fr 1.6fr auto; align-items: center; }
  .pg-row .pg-no { grid-column: auto; }
  .pg-row .input { grid-column: auto; }
  .pg-row .pg-del { grid-column: auto; grid-row: auto; }
}
@media (min-width: 820px) {
  .np-pay { grid-template-columns: 1fr 1fr; align-items: center; }
}
@media (min-width: 980px) {
  .queue-grid { display: grid; grid-template-columns: 420px 1fr; gap: 28px; align-items: start; }
  .queue-grid > .win + .win { margin-top: 0; }
  .orbit-win { position: sticky; top: calc(var(--hud-h, 61px) + 90px); }
}
.queue-grid > .win + .win { margin-top: 44px; }
@media (min-width: 980px) { .queue-grid > .win + .win { margin-top: 0; } }

/* ===== คลังตัวเลือกป้าย ===== */
.cap-warn { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; margin: 8px 0 12px; border: 2px dashed #d9466a; border-radius: 12px; background: #fff0f3; color: #8f1d3a; font-size: .9rem; line-height: 1.5; }
.cap-warn b { color: #b3133a; }
.opt-kinds .tab { flex: 0 1 auto; display: inline-flex; gap: 6px; align-items: center; }
.opt-rule { margin: 4px 0 10px; }
.opt-types { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-bottom: 12px; }
.chip { font: inherit; font-family: var(--font-th); font-size: .9rem; padding: 6px 12px; min-height: 36px; border: 2px solid var(--ink); border-radius: 999px; background: var(--white); color: var(--ink); cursor: pointer; }
.chip.on { background: var(--pink); box-shadow: 0 3px 0 var(--ink); }
.chip .px { font-size: .75rem; opacity: .7; }
.og-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.og-card { display: grid; gap: 6px; padding: 8px; text-align: center; border: 3px solid var(--ink); border-radius: 14px; background: var(--white); box-shadow: 0 4px 0 var(--ink); }
.og-card img { width: 100%; aspect-ratio: 1; object-fit: cover; border: 2px solid var(--ink); border-radius: 10px; image-rendering: pixelated; background: var(--lav-xl); }
.og-card b { font-family: var(--font-th); font-weight: 500; font-size: .92rem; }
.opt-block { margin-top: 14px; padding-top: 6px; border-top: 3px dashed var(--lav-l); }
.opt-mode { margin-bottom: 10px; }
.opt-pick { padding: 10px; border: 2px solid var(--lav-l); border-radius: 12px; background: var(--lav-xl); }
.opt-pick.opt-bad { border-color: #d9466a; background: #fff0f3; }
.opt-pick .drop { margin-top: 8px; }
.opt-imgs { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.opt-img { position: relative; display: inline-block; }
.opt-img img { width: 84px; height: 84px; object-fit: cover; border: 2px solid var(--ink); border-radius: 10px; background: #fff; }
.opt-img .btn { position: absolute; top: -8px; right: -8px; min-height: 28px; width: 28px; padding: 0; }
.chat-box { margin-top: 14px; padding: 12px; border: 3px solid var(--ink); border-radius: 14px; background: #eefbf1; }
.chat-box.warn { background: #fff4d6; }
.chat-box > b { font-family: var(--font-th); font-weight: 500; display: flex; gap: 6px; align-items: center; }
.x-kind-bar { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin: 4px 0 12px; padding: 8px 10px; border: 2px dashed var(--lav-l); border-radius: 12px; }
.x-kind-bar .grow { flex: 1; }
.x-kind-bar > .small { flex: 1 1 100%; }
a.tab { text-decoration: none; color: inherit; display: inline-flex; align-items: center; justify-content: center; }
@media (prefers-reduced-motion: reduce) { .orb { animation: none !important; opacity: 1; } }
.radio-other { margin-top: 8px; }
/* แนว + ตัวเลือกป้าย */
.opt-style { padding: 10px 12px; border: 2px dashed var(--lav, #b9a6e8); border-radius: 12px; background: var(--white); }
.opt-follow { margin: 4px 0 6px; }
.opt-style .textarea, .opt-pick .textarea { margin-top: 6px; }
.opt-how { margin: 8px 0 4px; }
.opt-how .radio-pill span { font-size: .8rem; }
.opt-pickbox { margin-top: 6px; }
.opt-tip { margin: 6px 0 0; color: var(--ink); opacity: .85; }
/* กลุ่ม */
.grp-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.grp-card { display: grid; border: var(--bw) solid var(--ink); border-radius: 14px; overflow: hidden; background: var(--white); box-shadow: 0 4px 0 var(--ink); }
.grp-card > img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-bottom: var(--bw) solid var(--ink); background: var(--lav-xl); }
.grp-body { display: grid; gap: 6px; padding: 10px 12px 12px; }
.grp-body > b { font-family: var(--font-th); font-size: 1.02rem; }
.grp-note { display: inline-flex; align-items: center; gap: 4px; width: fit-content; padding: 2px 8px; border: 2px solid var(--ink); border-radius: 8px; background: #dff5e6; font-family: var(--font-th); font-size: .74rem; line-height: 1.4; }
.grp-note.agent { background: #fff1c9; }
.grp-buy .price-from { font-size: 1rem; }
.grp-card .buy-row { margin-top: 2px; }
.og-card .small { display: block; }
/* เว็บไซต์: เทมเพลต F / คัสตอม */
.web-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 4px 0 6px; }
.web-tabs .tab { justify-content: center; font-size: .86rem; }
.web-tab-desc { margin: 4px 0 12px; opacity: .85; }
.custom-cta { min-height: 52px; margin-bottom: 6px; }
.f-badge { background: #e3f6ea; }
.f-badge.lim { background: #fff1c9; }
.f-badge.full { background: #e2e0ea; }
.style-card.is-full img { filter: grayscale(.7); opacity: .75; }
.f-box { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 4px 8px; padding: 10px 12px; margin-bottom: 12px; border: 2px solid var(--ink); border-radius: 12px; background: #fffbea; font-family: var(--font-th); font-size: .9rem; }
.f-box > p { grid-column: 1 / -1; }
.f-box.full { background: #eeeaf6; }
.f-bar { grid-column: 1 / -1; height: 10px; border: 2px solid var(--ink); border-radius: 6px; background: var(--white); overflow: hidden; }
.f-bar i { display: block; height: 100%; background: repeating-linear-gradient(90deg, var(--gold) 0 8px, #ffbf1f 8px 16px); }
.quote-note { margin-top: 4px; padding: 6px 10px; border-radius: 8px; background: var(--lav-xl); }
.grp-card .buy-row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.grp-card .buy-row .btn { padding: 6px 4px; font-size: .8rem; white-space: nowrap; justify-content: center; }
.grp-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
/* ต้องเปิดอ่านข้อกำหนดก่อน */
.terms-open { margin: 4px 0 10px; }
.terms-open.read { background: #e3f6ea; }
.accept.is-locked { opacity: .6; }
.terms-lock { font-size: .75rem; }
.accept:not(.is-locked) .terms-lock { display: none; }
/* กลุ่ม: ตัวกรอง */
.grp-filter { display: grid; gap: 8px; padding: 10px 12px; border: 2px dashed var(--ink); border-radius: 14px; background: var(--white); }
.grp-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.grp-chips .chip { font-size: .78rem; }
.grp-flabel { font-family: var(--font-th); opacity: .8; margin-bottom: -2px; }
.grp-nets summary { cursor: pointer; font-family: var(--font-th); margin-bottom: 6px; }
.grp-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.grp-tags .badge { font-size: .68rem; }
.grp-desc { margin: 0; font-size: .8rem; line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; }
.grp-desc.clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.grp-more { justify-self: start; }
.grp-card > img { aspect-ratio: 1; }
