/* ส่วนเพิ่มเฉพาะเด็ค STANNOX — styles.css เป็นสำเนาเด็ค iDoi ห้ามแก้ตรงนั้น */

/* ปก: ไม่มีภาพสินค้าจริง ใช้ wordmark ของ STANNOX แทนภาพกระป๋องของ iDoi */
.cover .client-mark { position: absolute; right: var(--pad); top: 50%; transform: translateY(-50%);
  width: 360px; opacity: .92; }

/* ป้ายร่าง — ติดมุมขวาบนทุกสไลด์จนกว่าจะเสร็จจริง */
.draft-tag { position: absolute; right: var(--pad); bottom: 22px; font-size: 12px; letter-spacing: .08em;
  color: rgba(17, 17, 17, .45); }
.slide.dark .draft-tag, .cover .draft-tag { color: rgba(255, 255, 255, .45); }

/* ช่องที่ยังรอข้อมูลจริงจาก STANNOX — ต้องเห็นชัดว่าไม่ใช่ข้อมูล */
.todo { display: inline-block; border: 1.5px dashed var(--steel); border-radius: 4px; padding: 1px 9px;
  color: var(--steel); font-size: max(.9em, 12px); font-weight: 500; }
.todo-box { border: 1.5px dashed var(--steel); border-radius: 6px; padding: 18px 22px; color: var(--steel);
  font-size: 16px; line-height: 1.55; }
.todo-box b { color: var(--can); font-weight: 600; }

/* คำเตือนว่าเป็นสมมติฐาน */
.hypo { display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: .04em; color: var(--flag);
  border: 1.5px solid var(--flag); border-radius: 4px; padding: 2px 8px; margin-bottom: 14px; align-self: flex-start; }

html.read-mode .cover .client-mark { position: static; transform: none; width: 200px; margin: 28px 20px 4px; display: block; }
html.read-mode .draft-tag { display: none; }

/* ---- แก้จากผล impeccable audit 13 พ.ย. 2026 ---- */
.draft-tag { letter-spacing: .02em; }

/* คอนทราสต์บนสไลด์พื้นสว่าง: หัวสไลด์ เลขหน้า และที่มา เดิมได้ 2.7–3.7:1 */
.slide:not(.dark):not(.cover) .masthead span:first-child,
.slide:not(.dark):not(.cover) .folio,
.slide:not(.dark):not(.cover) .source { color: rgba(17, 17, 17, .72); }
.slide.dark .hypo { color: #FF9A92; border-color: #FF9A92; }

/* จอมือถือ: ตัวอักษรเล็กสุด 12px และซ่อนคอลัมน์รองของตารางกว้าง */
html.read-mode .slide .source, html.read-mode .slide .folio,
html.read-mode .slide .masthead, html.read-mode .bar .cap span { font-size: 12px; }
@media (max-width: 480px) { html.read-mode .hide-narrow { display: none; } }
html.read-mode .slide .folio { display: none; }  /* เลขหน้าทับขีดสีหัวข้อบนมือถือ และไม่มีประโยชน์ในโหมดเลื่อนอ่าน */

/* แถบปุ่มล่างในโหมดสไลด์บนมือถือ/แท็บเล็ตแนวตั้ง (Joey เจอปุ่มตกขอบบน Android 13 พ.ย. 2026):
   เดิมสูงตายตัว 42px ปุ่มจึงตัดคำเป็น 2 บรรทัดและล้นจอเมื่อจอแคบหรือมือถือขยายตัวอักษร */
.chrome { height: auto; min-height: 42px; padding-top: 6px; padding-bottom: max(6px, env(safe-area-inset-bottom));
  gap: 8px 10px; flex-wrap: wrap; }
.chrome button, .chrome .count { white-space: nowrap; flex: 0 0 auto; }
@media (pointer: coarse), (max-width: 1100px) { .chrome .hint { display: none; } }
@media (max-width: 760px) { .chrome #grid-open { display: none; } }
.rotate-hint { inset: max(16px, env(safe-area-inset-top)) 0 auto; }  /* ย้ายไปบนจอ ไม่ให้ทับแถบปุ่มที่สูงขึ้นเมื่อขยายตัวอักษร */

/* ---- เด็คฉบับเสนอลูกค้า v2 (13 พ.ย. 2026) ---- */
/* แถวภาพปกสินค้าจริงจาก Shopee */
.product-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin: 6px 0 4px; }
.product-row figure { margin: 0; }
.product-row img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; display: block;
  border: 1px solid var(--rule); }
.product-row figcaption { font-size: 14px; margin-top: 8px; color: rgba(17, 17, 17, .78); }

/* สตอรีบอร์ดคลิปตัวอย่าง */
.board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 6px; }
.board .card { border: 1px solid var(--rule-d); border-radius: 8px; padding: 18px 18px 14px; }
.board .card-head { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.board .card-head img { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; flex: 0 0 auto; }
.board .card-head b { display: block; font-size: 17px; }
.board .card-head span { display: block; font-size: 13px; color: rgba(255, 255, 255, .62); margin-top: 3px; }
.board ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.board li { font-size: 15px; line-height: 1.45; color: rgba(255, 255, 255, .88); }
.board li em { display: block; font-style: normal; font-size: 12.5px; font-weight: 600; color: #FFD392; margin-bottom: 2px; }

html.read-mode .product-row { grid-template-columns: repeat(2, 1fr); gap: 14px; }
html.read-mode .board { grid-template-columns: 1fr; gap: 14px; }
html.read-mode .slide.dark .hypo { margin-bottom: 10px; }
.slide.dark .col-head.go { color: #7FD0EC; } .slide.dark .col-head.flag { color: #FF9A92; }  /* คอนทราสต์บนพื้นดำ (เดิม 3.7:1) */

/* ภาพปกคลิปกดไปดูคลิปจริงบน TikTok ได้ (13 พ.ย. 2026) */
.clip-link { position: relative; display: block; width: fit-content; align-self: flex-start; color: inherit; text-decoration: none; border-radius: 4px; }
.clip-link .cover { display: block; transition: filter .15s ease; }
.clip-link:hover .cover, .clip-link:focus-visible .cover { filter: brightness(.82); }
.clip-link:focus-visible { outline: 2px solid #92F2FF; outline-offset: 3px; }
.clip-link .play { position: absolute; right: 8px; bottom: 8px; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; font-size: 13px; color: #111; background: rgba(255, 255, 255, .92);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .25); pointer-events: none; }

/* เผยทีละส่วน (13 พ.ย. 2026) — app.js ใส่ .on ให้ .step ทีละชิ้น; โหมดอ่าน/ไม่มี JS เห็นครบ */
html.js:not(.read-mode) .step { opacity: 0; transform: translateY(10px); transition: opacity .35s ease, transform .35s ease; }
html.js:not(.read-mode) .step.on { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { html.js:not(.read-mode) .step { transform: none; transition: opacity .01s; } }
tr.step { transition: opacity .35s ease; }
.ask { font-size: 64px; font-weight: 600; line-height: 1.2; letter-spacing: -.01em; margin: 40px 0 28px; max-width: 18ch; }
.ask-sub { font-size: 22px; line-height: 1.5; color: rgba(255, 255, 255, .78); max-width: 40ch; }
.reveal-row td { font-weight: 600; }
.ratio { font-size: 15px; color: rgba(17, 17, 17, .7); margin-top: 6px; }
html.read-mode .ask { font-size: 34px; margin: 18px 0 14px; }
html.read-mode .ask-sub { font-size: 17px; }

/* เผยทีละส่วน (13 พ.ย. 2026) — app.js ใส่ .on ให้ .step ทีละชิ้น; โหมดอ่าน/ไม่มี JS เห็นครบ */
html.js:not(.read-mode) .step { opacity: 0; transform: translateY(10px); transition: opacity .35s ease, transform .35s ease; }
html.js:not(.read-mode) .step.on { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { html.js:not(.read-mode) .step { transform: none; transition: opacity .01s; } }
.ask { font-size: 64px; font-weight: 600; line-height: 1.2; letter-spacing: -.01em; margin: 40px 0 28px; max-width: 18ch; }
.ask-sub { font-size: 22px; line-height: 1.5; color: rgba(255, 255, 255, .78); max-width: 40ch; }
.ratio { font-size: 15px; color: rgba(17, 17, 17, .7); margin-top: 6px; }
html.read-mode .ask { font-size: 34px; margin: 18px 0 14px; }
html.read-mode .ask-sub { font-size: 17px; }

/* ================= กราฟและโมชัน (13 พ.ย. 2026) =================
   ชุดสีช่องทางขาย (ใช้บนสไลด์พื้นดำเท่านั้น) ผ่าน dataviz validator --mode dark --surface #000:
   affiliate #2E86DE · ร้านเอง #CF7A2C · ค้นหาเอง #9D5BD9 (ΔE CVD ต่ำสุด 25.3, คอนทราสต์ ≥3:1) */
:root { --c-aff: #2E86DE; --c-own: #CF7A2C; --c-mall: #9D5BD9; --ease-out: cubic-bezier(.16, 1, .3, 1); }

/* แท่งแนวนอน: ป้าย | แท่ง | ค่า */
.hchart { display: grid; gap: 10px; margin: 10px 0 4px; }
.hrow { display: grid; grid-template-columns: 190px 1fr 150px; align-items: center; gap: 14px; }
.hrow .hl { font-size: 16px; font-weight: 500; }
.hrow .hl small { display: block; font-size: 12.5px; font-weight: 400; color: rgba(17,17,17,.62); }
.slide.dark .hrow .hl small { color: rgba(255,255,255,.62); }
.hrow .track { height: 22px; position: relative; }
.hrow .fill { position: absolute; inset: 0 auto 0 0; width: max(4px, calc(var(--v) * 100%)); border-radius: 0 4px 4px 0;
  background: rgba(17,17,17,.24); transform-origin: left center; }
.slide.dark .hrow .fill { background: rgba(255,255,255,.3); }
.hrow.hi .fill { background: #111; }
.slide.dark .hrow.hi .fill { background: #fff; }
.hrow .hv { font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; }
.hrow .hv small { font-size: 12.5px; font-weight: 400; color: rgba(17,17,17,.62); margin-left: 4px; }
.slide.dark .hrow .hv small { color: rgba(255,255,255,.62); }
.hchart .axis-note { font-size: 12.5px; color: rgba(17,17,17,.62); }
.slide.dark .hchart .axis-note { color: rgba(255,255,255,.62); }

/* แท่งซ้อนสัดส่วนช่องทาง */
.stack-chart { display: grid; gap: 12px; margin: 8px 0; }
.srow { display: grid; grid-template-columns: 190px 1fr 70px; align-items: center; gap: 14px; }
.srow .hl { font-size: 16px; font-weight: 500; }
.srow .sbar { display: flex; gap: 2px; height: 24px; }
.srow .seg { flex: 0 0 calc(var(--w) * 1%); border-radius: 0; min-width: 2px; }
.srow .seg:last-child { border-radius: 0 4px 4px 0; }
.srow .seg.aff { background: var(--c-aff); } .srow .seg.own { background: var(--c-own); } .srow .seg.mall { background: var(--c-mall); }
.srow .pct { font-size: 15px; font-variant-numeric: tabular-nums; color: rgba(255,255,255,.85); }
.srow.hi .hl { font-weight: 700; }
.legend { display: flex; gap: 22px; font-size: 14px; color: rgba(255,255,255,.8); margin-bottom: 4px; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 7px; vertical-align: -1px; }
.legend .aff { background: var(--c-aff); } .legend .own { background: var(--c-own); } .legend .mall { background: var(--c-mall); }

/* คอลัมน์ฉากทัศน์ */
.cols { display: flex; align-items: flex-end; gap: 36px; height: 300px; margin: 18px 0 6px; padding-bottom: 54px; position: relative; }
.col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; position: relative; }
.col .range { position: relative; width: 56%; margin: 0 auto; height: calc(var(--hi) * 100%); }
.col .hi-part { position: absolute; inset: 0; border-radius: 4px 4px 0 0; background: rgba(17,17,17,.12); transform-origin: bottom; }
.col .lo-part { position: absolute; left: 0; right: 0; bottom: 0; height: calc(var(--lo) / var(--hi) * 100%); background: #111; transform-origin: bottom; }
.col.now .lo-part { background: rgba(17,17,17,.4); }
.col .top { position: absolute; bottom: calc(100% + 6px); left: 0; right: 0; text-align: center; font-size: 15px; font-weight: 600; white-space: nowrap; }
.col .top small { display: block; font-size: 12px; font-weight: 400; color: rgba(17,17,17,.62); }
.col .cap { position: absolute; top: 100%; left: 0; right: 0; text-align: center; padding-top: 10px; font-size: 14px; }
.col .cap b { display: block; font-size: 17px; }

/* จุดแทนคลิปต่อครีเอเตอร์ 10 คน */
.dots-row { display: grid; grid-template-columns: 170px 1fr 120px; align-items: center; gap: 16px; margin: 12px 0; }
.dots { display: flex; flex-wrap: wrap; gap: 6px; }
.dots i { width: 18px; height: 18px; border-radius: 4px; background: rgba(255,255,255,.88); display: block; }
.dots i.part { background: linear-gradient(90deg, rgba(255,255,255,.88) var(--p), rgba(255,255,255,.18) var(--p)); }
.dots-row .hl { font-size: 17px; font-weight: 600; }
.dots-row .hv { font-size: 30px; font-weight: 600; font-variant-numeric: tabular-nums; }
.dots-row.hi .dots i { background: #FFD392; }
.dots-row.hi .dots i.part { background: linear-gradient(90deg, #FFD392 var(--p), rgba(255,255,255,.18) var(--p)); }

/* ---------- โมชัน (เฉพาะโหมดสไลด์ ไม่มี reduce-motion) ---------- */
@media (prefers-reduced-motion: no-preference) {
  html.js:not(.read-mode) .hchart:not(.grow) .fill { transform: scaleX(0); }
  html.js:not(.read-mode) .hchart .fill { transition: transform .9s var(--ease-out); transition-delay: calc(var(--i, 0) * 90ms + 150ms); }
  html.js:not(.read-mode) .stack-chart:not(.grow) .sbar { clip-path: inset(0 100% 0 0); }
  html.js:not(.read-mode) .stack-chart .sbar { transition: clip-path 1s var(--ease-out); transition-delay: calc(var(--i, 0) * 120ms + 150ms); }
  html.js:not(.read-mode) .cols:not(.grow) .hi-part, html.js:not(.read-mode) .cols:not(.grow) .lo-part { transform: scaleY(0); }
  html.js:not(.read-mode) .cols .lo-part { transition: transform .8s var(--ease-out); transition-delay: calc(var(--i, 0) * 140ms + 150ms); }
  html.js:not(.read-mode) .cols .hi-part { transition: transform .8s var(--ease-out); transition-delay: calc(var(--i, 0) * 140ms + 550ms); }
  html.js:not(.read-mode) .dots:not(.grow) i { transform: scale(0); opacity: 0; }
  html.js:not(.read-mode) .dots i { transition: transform .35s var(--ease-out), opacity .2s; transition-delay: calc(var(--d, 0) * 35ms); }

  /* สไลด์เข้า: หัวข้อเผยขึ้นจากใต้เส้น · เนื้อหาไล่ขึ้น */
  html.js:not(.read-mode) .slide.play h1, html.js:not(.read-mode) .slide.play h2, html.js:not(.read-mode) .slide.play .ask {
    animation: stx-wipe .75s var(--ease-out) both; }
  html.js:not(.read-mode) .slide.play .slide-body > :not(.step):not(h1):not(h2):not(.ask) {
    animation: stx-rise .6s var(--ease-out) both; animation-delay: .18s; }
  html.js:not(.read-mode) .slide.play .slide-body > :nth-child(3):not(.step) { animation-delay: .26s; }
  html.js:not(.read-mode) .slide.play .slide-body > :nth-child(4):not(.step) { animation-delay: .34s; }
  html.js:not(.read-mode) .slide.play .slide-body > :nth-child(n+5):not(.step) { animation-delay: .42s; }
  html.js:not(.read-mode) .slide.play .client-mark { animation: stx-rise .9s var(--ease-out) both .3s; }
  html.js:not(.read-mode) .slide.play .spectrum { animation: stx-sweep 1.1s var(--ease-out) both .2s; }
  html.js:not(.read-mode) .slide.play .clip-link .cover, html.js:not(.read-mode) .slide.play .product-row img { animation: stx-zoom .9s var(--ease-out) both .2s; }
}
@keyframes stx-wipe { from { clip-path: inset(0 0 100% 0); transform: translateY(18px); } to { clip-path: inset(0 0 -10% 0); transform: none; } }
@keyframes stx-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes stx-sweep { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes stx-zoom { from { opacity: 0; transform: scale(1.06); } to { opacity: 1; transform: none; } }

/* มือถือโหมดอ่าน */
html.read-mode .hrow, html.read-mode .srow { grid-template-columns: 1fr; gap: 6px; }
html.read-mode .hrow .hv { font-size: 15px; }
html.read-mode .cols { gap: 12px; height: 220px; }
html.read-mode .col .cap { font-size: 12px; } html.read-mode .col .cap b { font-size: 14px; }
html.read-mode .col .top { font-size: 12px; }
html.read-mode .dots-row { grid-template-columns: 1fr; gap: 6px; }
html.read-mode .dots i { width: 14px; height: 14px; }
.split .hchart .hrow { grid-template-columns: 120px 1fr 74px; gap: 10px; }
.split .hchart .hrow .hl { font-size: 14.5px; }
.split .hchart .hrow .hv { font-size: 15px; }
.srow .hl small { display: block; font-size: 12.5px; font-weight: 400; color: rgba(255,255,255,.62); }
.hrow .bar-in { position: absolute; top: 50%; transform: translateY(-50%); font-size: 13.5px; font-weight: 600; white-space: nowrap; left: 10px; color: #111; }
.hrow .bar-in.out { left: calc(var(--v) * 100% + 10px); color: inherit; }
.slide.dark .hrow .bar-in.out { color: #fff; }
.hrow .track { overflow: visible; }
@media (prefers-reduced-motion: no-preference) {
  html.js:not(.read-mode) .hchart:not(.grow) .bar-in { opacity: 0; }
  html.js:not(.read-mode) .hchart .bar-in { transition: opacity .4s ease .7s; }
}
.slide.dark .hrow .bar-in { color: #fff; }
.clips-row.four.compact { --cover-h: 186px; }
.brand-figs { gap: 48px; margin: 4px 0 14px; }
.brand-figs .fig .n { font-size: 40px; }
.cols.mini { height: 210px; gap: 18px; padding-bottom: 34px; margin-top: 30px; }
.cols.mini .col .range { width: 62%; }
.cols.mini .col.now .lo-part { background: rgba(17,17,17,.4); }
.cols.mini .col:not(.now) .lo-part { background: #111; }

/* ---------- โหมดรีวิว: คอมเมนต์รายสไลด์ (เฉพาะลิงก์ ?review=) ---------- */
.rv-btn { position: fixed; right: 18px; bottom: calc(64px + env(safe-area-inset-bottom)); z-index: 60;
  font: 600 14px "IBM Plex Sans Thai", system-ui, sans-serif; color: #111; background: #FFD392; border: 0;
  border-radius: 999px; padding: 11px 18px; min-height: 44px; cursor: pointer; box-shadow: 0 2px 10px rgba(0,0,0,.35); }
.rv-panel { position: fixed; right: 18px; bottom: calc(118px + env(safe-area-inset-bottom)); z-index: 61; width: min(420px, calc(100vw - 36px));
  background: #fff; color: #111; border-radius: 10px; padding: 16px; box-shadow: 0 10px 40px rgba(0,0,0,.45);
  font-family: "IBM Plex Sans Thai", system-ui, sans-serif; display: none; }
.rv-panel.open { display: block; }
.rv-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.rv-title { font-size: 14.5px; line-height: 1.4; flex: 1; }
.rv-x { border: 0; background: none; font-size: 24px; line-height: 1; cursor: pointer; min-width: 44px; min-height: 44px; margin: -10px -10px 0 0; }
.rv-text { width: 100%; font: 15px/1.5 "IBM Plex Sans Thai", system-ui, sans-serif; border: 1px solid rgba(17,17,17,.25);
  border-radius: 6px; padding: 10px; resize: vertical; }
.rv-row { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; gap: 10px; }
.rv-status { font-size: 13px; color: rgba(17,17,17,.7); }
.rv-save { font: 600 14px "IBM Plex Sans Thai", system-ui, sans-serif; background: #111; color: #fff; border: 0; border-radius: 6px;
  padding: 10px 18px; min-height: 44px; cursor: pointer; }
.rv-all { margin-top: 12px; font-size: 13.5px; }
.rv-all summary { cursor: pointer; color: rgba(17,17,17,.75); min-height: 32px; }
.rv-list { max-height: 200px; overflow: auto; padding-left: 20px; margin: 6px 0 0; }
.rv-list li { margin: 4px 0; white-space: pre-wrap; }
.slide.rv-has .folio::after { content: " 💬"; }
.clip .amount small { display: block; font-size: 11.5px; font-weight: 400; opacity: .65; margin-top: 1px; letter-spacing: 0; }
table.shops td small { display: block; font-size: 12px; font-weight: 400; color: rgba(17,17,17,.6); }
table.shops td.dim { font-size: 13.5px; }
table.mini-t td { font-size: 14.5px; padding-top: 6px; padding-bottom: 6px; }
/* ปก: ยกหัวข้อขึ้นให้ระดับเดียวกับหน้าอื่น */
.slide.cover .slide-body { justify-content: flex-start; padding-top: 0; top: 78px; }
html.read-mode .slide.cover .slide-body { top: auto; }
.rv-copy { margin: 4px 0 2px; min-height: 32px; padding: 4px 12px; border: 1px solid rgba(17,17,17,.3); border-radius: 6px; background: #fff; font: inherit; font-size: 13px; cursor: pointer; }
.rv-copy:hover { background: #f2f2f2; }

.slide.dark .ratio { color: rgba(255,255,255,.72); }
/* แบรนด์ที่เคยร่วมงาน (โลโก้ชุดเดียวกับเว็บบริษัท ออกแบบมาสำหรับพื้นดำ) */
.logo-wall { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 0 18px; margin: 26px 0 8px; }
.logo-cell { height: 150px; display: grid; place-items: center; border-top: 1px solid rgba(255,255,255,.12); }
.logo-cell img { max-width: 86%; max-height: 54px; object-fit: contain; }
.logo-cell[data-brand="ascend"] img, .logo-cell[data-brand="baac"] img, .logo-cell[data-brand="silpakorn"] img { max-height: 76px; }
@media (prefers-reduced-motion: no-preference) {
  html.js:not(.read-mode) .slide.play .logo-cell { animation: stx-rise .55s var(--ease-out) both; animation-delay: calc(.25s + var(--i) * 45ms); }
}
html.read-mode .logo-wall { grid-template-columns: repeat(4, minmax(0, 1fr)); }
html.read-mode .logo-cell { height: 84px; }
html.read-mode .logo-cell img { max-height: 40px; }
