/* สอนในแอป (x-tour.js) + ศูนย์วิธีใช้ (x-howto.js) — คลาส tr- / ht- กันชนหน้าอื่น
   จอมืดด้วยเงาของช่อง (box-shadow) · ตัวบัง 4 ด้านรับนิ้วนอกช่อง · ป้ายดำเรียบเส้นบาง */
.tr-root { position:fixed; inset:0; z-index:100000; pointer-events:none; opacity:0; transition:opacity .2s; }
.tr-root.on { opacity:1; }
.tr-blk { position:fixed; pointer-events:auto; background:transparent; touch-action:none; }
.tr-root.full .tr-blk[data-b="t"] { background:rgba(0,0,0,.62); }
.tr-hole { position:fixed; border-radius:14px; box-shadow:0 0 0 2px var(--tint), 0 0 0 200vmax rgba(0,0,0,.62); pointer-events:none; }
.tr-hole.move { transition:left .3s cubic-bezier(.3,.1,.2,1), top .3s cubic-bezier(.3,.1,.2,1), width .3s, height .3s; }
.tr-hole::after { content:''; position:absolute; inset:-2px; border-radius:inherit; border:2px solid var(--tint); animation:tr-pulse 1.6s ease-out infinite; }
@keyframes tr-pulse { 0% { transform:scale(1); opacity:.8; } 100% { transform:scale(1.08); opacity:0; } }
.tr-hole.nudge::after { animation:tr-pulse .5s ease-out 2; }
.tr-root.look .tr-hole { pointer-events:auto; }
.tr-num { position:absolute; top:-11px; right:12px; min-width:22px; height:22px; padding:0 6px; border-radius:11px; background:var(--tint); color:#fff;
  font-size:12px; font-weight:800; display:grid; place-items:center; box-shadow:0 2px 8px rgba(0,0,0,.5); }
.tr-tip { position:fixed; pointer-events:auto; background:#0d0d0f; border:1px solid #2a2a2e; border-radius:16px; padding:12px 14px 10px;
  box-shadow:0 10px 30px rgba(0,0,0,.6); color:#fff; transition:top .25s, left .25s; }
.tr-root.busy .tr-tip { opacity:.85; }
.tr-tip.shake { animation:tr-shake .35s; }
@keyframes tr-shake { 25% { transform:translateX(-5px); } 75% { transform:translateX(5px); } }
.tr-arrow { position:absolute; width:14px; height:14px; background:#0d0d0f; border:1px solid #2a2a2e; transform:rotate(45deg); margin-left:-7px; }
.tr-arrow.up { top:-8px; border-right:0; border-bottom:0; }
.tr-arrow.down { bottom:-8px; border-left:0; border-top:0; }
.tr-arrow.none { display:none; }
.tr-top { display:flex; align-items:center; justify-content:space-between; margin-bottom:4px; }
.tr-step { font-size:12px; font-weight:700; color:var(--tint); letter-spacing:.2px; }
.tr-x { width:30px; height:30px; margin:-4px -6px 0 0; border:0; border-radius:50%; background:transparent; color:var(--muted); font-size:16px; display:grid; place-items:center; }
.tr-text { font-size:16px; font-weight:600; line-height:1.4; }
.tr-html:empty, .tr-html.hidden { display:none; }
.tr-html { margin-top:10px; }
.tr-bar { display:flex; align-items:center; gap:6px; margin-top:10px; }
.tr-sp { flex:1; }
.tr-btn { height:34px; padding:0 12px; border-radius:17px; border:1px solid #2a2a2e; background:transparent; color:var(--ink-2, #ddd); font-size:14px; font-weight:600; }
.tr-btn.primary { background:var(--tint); border-color:var(--tint); color:#fff; }
.tr-btn.tint { color:var(--tint); border-color:var(--tint); background:transparent; background:color-mix(in srgb, var(--tint) 14%, transparent); }
.tr-btn:disabled { opacity:.4; }
.tr-btn:active { transform:scale(.97); }
.tr-btn.hidden { display:none; }
/* ภาพแชท LINE ที่ลูกค้าจะเห็น */
.tr-line { background:#8cabd9; border-radius:14px; padding:0 0 10px; overflow:hidden; display:flex; flex-direction:column; gap:8px; }
.tr-lh { background:#273246; color:#fff; font-size:13px; padding:8px 10px; display:flex; gap:8px; align-items:center; }
.tr-lb { align-self:flex-start; max-width:82%; margin:0 10px; background:#fff; color:#111; border-radius:14px; padding:7px 10px; font-size:13px; line-height:1.4; }
.tr-lb.me { align-self:flex-end; background:#06c755; color:#fff; }
html[data-theme="light"] .tr-tip, html[data-theme="light"] .tr-arrow { background:#fff; color:#000; border-color:#e3e3e8; }
@media (prefers-reduced-motion: reduce) { .tr-hole::after, .tr-tip.shake { animation:none; } .tr-hole.move, .tr-tip, .tr-root { transition:none; } }

/* ศูนย์วิธีใช้: ปุ่มคู่ใต้ชื่อเรื่อง (ไม่ยัดท้ายแถว) */
.ht-intro { margin:0 4px 6px; }
.ht-row .txt { min-width:0; }
.ht-btns { display:flex; gap:8px; margin-top:8px; }
.ht-btns:empty { display:none; }
.ht-b { flex:1; height:34px; border-radius:17px; border:1px solid var(--line); background:transparent; color:var(--tint); font-size:14px; font-weight:600;
  display:inline-flex; align-items:center; justify-content:center; gap:5px; }
.ht-b i { font-size:17px; }
.ht-b.hidden { display:none; }
.ht-b:active { transform:scale(.97); }
.ht-row.ht-none { opacity:.5; }
.ht-big { display:flex; flex-direction:column; gap:10px; margin-top:6px; }
.ht-big .btn { justify-content:center; gap:6px; }
.ht-help { font-size:20px; }
.sheet-wrap.ri-inst .page-nav { display:flex; align-items:center; justify-content:space-between; }
.ht-navq { flex:none; width:34px; height:34px; border:0; border-radius:50%; background:var(--card-2); color:var(--ink); font-size:19px; display:grid; place-items:center; }
.tr-pill { font-size:12px; font-weight:700; color:var(--orange); border:1px solid var(--orange); border-radius:999px; padding:3px 9px; margin-left:auto; margin-right:8px; white-space:nowrap; }
/* ภาพประกอบในป้าย (การ์ดสลิปจำลอง / ขั้นตอนสแกนบัตร) */
.tr-mock { border:1px solid #2a2a2e; border-radius:12px; padding:10px; font-size:13px; line-height:1.45; display:flex; flex-direction:column; gap:6px; }
.tr-mr { display:flex; align-items:center; gap:8px; color:var(--ink-2, #ddd); }
.tr-mr i { color:var(--tint); font-size:16px; }
.tr-mt { color:var(--orange, #f5a524); }
.tr-mbtn { display:flex; flex-wrap:wrap; gap:6px; }
.tr-mbtn span { padding:4px 10px; border-radius:12px; border:1px solid #2a2a2e; font-size:12px; font-weight:600; }
.tr-mbtn .p { background:var(--tint); border-color:var(--tint); color:#fff; }
.tr-mbtn .d { color:var(--red, #ff453a); border-color:var(--red, #ff453a); }
html[data-theme="light"] .tr-mock, html[data-theme="light"] .tr-mbtn span { border-color:#e3e3e8; }
