/* ตัวโหลดมาสคอตกลาง — เหมือนกันทุก repo ต่างกันแค่ --go-overlay-bg (สีพื้นหลังหลักของเว็บนั้น ทึบ 0.88) */
:root {
  --go-overlay-bg: rgba(247, 247, 245, 0.88); /* production-gocup: --ui-bg #f7f7f5 */
}

@keyframes go-hop    { 0%,100% { transform: translateY(0) } 35% { transform: translateY(-12px) } 65% { transform: translateY(0) } }
@keyframes go-shadow { 0%,100% { transform: scaleX(1); opacity: .35 } 35% { transform: scaleX(.8); opacity: .18 } 65% { transform: scaleX(1); opacity: .35 } }
@keyframes go-dot    { 0%,80%,100% { opacity: .25; transform: scale(.8) } 40% { opacity: 1; transform: scale(1) } }
.go-hop    { animation: go-hop 1.3s ease-in-out infinite; transform-origin: 50% 100% }
.go-shadow { animation: go-shadow 1.3s ease-in-out infinite }
.go-d1 { animation: go-dot 1.2s infinite 0s } .go-d2 { animation: go-dot 1.2s infinite .2s } .go-d3 { animation: go-dot 1.2s infinite .4s }
@media (prefers-reduced-motion: reduce) { .go-hop, .go-shadow, .go-d1, .go-d2, .go-d3 { animation: none } }

.go-figure { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.go-img { display: block; max-width: 100%; height: auto; aspect-ratio: 640 / 150; user-select: none; }
.go-shadow { display: block; max-width: 88%; border-radius: 999px; background: #c9b8a3; opacity: .35; }

.go-caption { display: flex; align-items: baseline; justify-content: center; flex-wrap: wrap; gap: 5px; text-align: center; }
.go-dot { display: inline-block; flex: none; border-radius: 999px; }

/* A — ทั้งหน้า · คำสั่ง 34 (CEO 12/10): ขนาดเท่า B (ทับหน้า) — รูป 240px ทุกจอ ตัวหนังสือ 16px จุด 6px ระยะ 18px */
.go-loading-page {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  width: 100%; min-height: 40vh; box-sizing: border-box; padding: 32px 16px;
}
.go-loading-page.go-compact { min-height: 0; padding: 24px 8px; }
.go-figure-page .go-img { width: 240px; }
.go-figure-page .go-shadow { width: 210px; height: 8px; }
.go-caption-page { font-size: 16px; font-weight: 700; color: #6b5f52; }
.go-dot-page { width: 6px; height: 6px; background: #c94f1c; }

/* B — ทับหน้า: รับคลิกทันที มองเห็นหลัง .go-visible (เพิ่มหลังรอ 300ms) */
.go-loading-overlay {
  position: fixed; inset: 0; z-index: 2147483000;
  display: flex; align-items: center; justify-content: center;
  padding: 16px; box-sizing: border-box;
  background: transparent; cursor: progress;
  transition: background-color 150ms ease;
}
.go-loading-overlay.go-visible { background: var(--go-overlay-bg); }
.go-overlay-inner {
  display: flex; flex-direction: column; align-items: center; gap: 18px;
  opacity: 0; transition: opacity 150ms ease;
}
.go-loading-overlay.go-visible .go-overlay-inner { opacity: 1; }
.go-figure-overlay .go-img { width: 240px; }
.go-figure-overlay .go-shadow { width: 210px; height: 8px; }
.go-caption-overlay { font-size: 16px; font-weight: 700; color: #6b5f52; }
.go-dot-overlay { width: 6px; height: 6px; background: #c94f1c; }

/* C — ในปุ่ม (ไม่มีรูป) จุดใช้สีตัวอักษรปุ่ม · บรรทัดเดียวเสมอ ไม่ดันขนาดปุ่ม (CEO 23/09)
   .go-has-idle: ป้ายเดิม (.go-lt-idle) ค้างไว้แบบมองไม่เห็น → ปุ่มกว้าง/สูงเท่าตอนไม่โหลดเป๊ะ ข้อความโหลด (.go-lt-live)
   ซ้อนในช่องเดียวกันโดยไม่มีส่วนในการคำนวณความกว้าง (ล้นออกสองข้างเท่ากันได้ ถ้าวัดแล้วยังอยู่ในเนื้อที่ปุ่ม)
   data-go-fit="dots" = ปุ่มแคบใส่ข้อความเต็มไม่พอ → แสดงแค่จุด */
.go-loading-text { display: inline-flex; align-items: center; justify-content: center; }
.go-loading-text:not(.go-has-idle) { white-space: nowrap; }
.go-loading-text.go-has-idle { display: inline-grid; justify-items: center; align-items: center; }
.go-has-idle > .go-lt-idle, .go-has-idle > .go-lt-live { grid-area: 1 / 1; }
.go-lt-idle { visibility: hidden; }
.go-has-idle > .go-lt-live { width: 0; min-width: 100%; contain: inline-size; justify-self: stretch; }
.go-lt-live { display: flex; align-items: baseline; justify-content: center; gap: 4px; white-space: nowrap; transform: translateX(var(--go-shift, 0px)); }
.go-lt-msg { flex: none; }
.go-lt-dots { flex: none; display: inline-flex; align-items: baseline; gap: 4px; }
.go-loading-text[data-go-fit="dots"] .go-lt-msg { display: none; }
.go-loading-text[data-go-fit="dots"] .go-lt-live { align-items: center; }
/* data-go-fit="full" = ข้างไอคอนไม่พอแต่ทั้งปุ่มพอ → ซ่อนไอคอน/ของอื่นในปุ่มระหว่างโหลด (ยังกินที่เดิม ปุ่มไม่ขยับ)
   กฎนี้หายเองทันทีที่ตัวโหลดถูกถอดออก */
:is(button, a, label, summary, [role="button"]):has(.go-loading-text[data-go-fit="full"]) * { visibility: hidden; }
.go-loading-text[data-go-fit="full"] .go-lt-live,
.go-loading-text[data-go-fit="full"] .go-lt-live *,
.go-loading-text[data-go-fit="full"] .go-lt-sr { visibility: visible; }
.go-lt-sr {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.go-dot-text { width: 5px; height: 5px; background: currentColor; }
