/* =====================================================
   landing_page.php — ชั้นเก็บรายละเอียด (INFINITY X)
   โหลดต่อจาก: css/landing-page.css
   ถอด <link> บรรทัดเดียว = กลับหน้าตาก่อน polish
   ⚠️ ไฟล์นี้ถูกลงทะเบียนใน $cacheSources ของ landing_page.php แล้ว
      (ไม่งั้นแก้ CSS แล้วหน้าไม่เปลี่ยนเพราะ output cache 5 นาที)

   ── ที่แก้ในรอบนี้ (24 ส.ค. 2569) ────────────────────────
   1. ปุ่ม Discord ลอย (.mobile-discord-btn) ลอยทับปุ่มเลื่อนการ์ด Bringer และ
      แถวตารางอันดับ → เจ้าของสั่งให้เอาออกทั้งเดสก์ท็อปและมือถือ (ลบมาร์กอัปแล้ว)
   1b. ปุ่มโซเชียลใน hero บนมือถือ: ตัดคำนำหน้า "แฟนเพจ/เข้าร่วม" ออก ปุ่มจะได้ไม่ใหญ่
   2. หมวด CHARACTER ที่ ≤1024px วางภาพตัวละครไว้กลางจอแบบ absolute แล้ววาง
      ชื่อคลาส/คำอธิบายทับลงไปตรง ๆ → อ่านไม่ออกทั้งคู่ (เจ้าของย้ำเรื่องห้ามทับซ้อน)
      → เรียงเป็นชั้น: ภาพอยู่บน ข้อความอยู่ล่าง
   3. ป้าย EXP/DROP/ALZ ใน hero แสดง × เป็นก้อนสี่เหลี่ยม — โค้ด PHP ครอบ
      <span class="chip-x"> ไว้แล้วแต่ไม่เคยมีกฎ CSS รองรับ (คอมเมนต์บอกว่าแก้แล้ว)
   4. ชื่อคลาสในแถวเลือกตัวละครโดนตัดเป็น "FORCE SHIELD…" / "FORCE GUNNE…"
      → ให้ตัดขึ้นบรรทัดใหม่แทนการตัดคำ
   5. ตารางอันดับบนมือถือเลื่อนแนวนอนได้อยู่แล้วแต่ไม่มีสัญญาณบอก
      → เพิ่มเงาขอบขวา + ป้ายบอก "ปัดเพื่อดูเพิ่ม"
   ===================================================== */

/* =====================================================
   1. ปุ่ม Discord ลอย — ถอดออกแล้วทุกขนาดจอ (เจ้าของสั่ง 24 ส.ค. 2569)
   มาร์กอัปถูกลบออกจาก landing_page.php แล้ว กฎนี้กันไว้เผื่อมีที่อื่น
   สร้าง element คลาสนี้ขึ้นมาอีก (สไตล์เดิมยังอยู่ใน landing-page.css)
   ===================================================== */
.mobile-discord-btn { display: none !important; }

/* =====================================================
   1b. ปุ่มโซเชียลใน hero — จอแคบเอาคำนำหน้าออก
   "แฟนเพจ Facebook" / "เข้าร่วม Discord" ตัดเป็น 2 บรรทัดบนมือถือ
   ทำให้ปุ่มสูงเกือบเท่าการ์ด → เหลือแค่ชื่อช่องทาง ปุ่มเตี้ยลงครึ่งหนึ่ง
   ===================================================== */
@media (max-width: 768px) {
    .btn-social-prefix { display: none; }

    .btn-social {
        white-space: nowrap;
        gap: 8px;
    }
}

/* =====================================================
   2. หมวด CHARACTER — เลิกวางข้อความทับภาพเมื่อจอแคบ
   ≤1024px: ภาพถูกจัดกลางแบบ absolute (left:50% + translateX)
   ส่วน .character-info ก็อยู่กลางเหมือนกัน → ซ้อนกันพอดี
   ===================================================== */
@media (max-width: 1024px) {
    .character-showcase {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
    }

    /* คืนภาพเข้า flow — ค่า bottom/left/transform ของเดิมจึงไม่มีผลอีก */
    .character-featured {
        position: static;
        transform: none;
        width: min(360px, 76vw);
        margin: 0 auto;
        order: 1;
    }

    .character-info {
        order: 2;
        width: 100%;
        margin-left: 0;
        padding-right: 0;
    }

    /* ของเดิมเผื่อที่ว่างไว้ให้ภาพที่ลอยล้นลงมา — ตอนนี้ภาพอยู่ใน flow แล้ว */
    .character-section { min-height: 0; }
    .character-showcase { min-height: 0; }
}

@media (max-width: 768px) {
    /* คุมด้วยความสูง ไม่ใช่ความกว้าง — ภาพตัวละครสูงมาก ถ้าปล่อยตามความกว้าง
       จะดันแถวเลือกคลาส (ตัวควบคุมของหมวดนี้) หลุดจอไปไกล กดแล้วไม่เห็นผล */
    .character-featured { width: auto; }
    .character-featured img {
        max-height: 260px;
        width: auto;
        max-width: 74vw;
        margin: 0 auto;
    }
    .character-section { padding-bottom: 40px; }
}

/* =====================================================
   3. เครื่องหมาย × ในป้ายอัตรา (EXP ×100 / DROP ×50 / ALZ ×30)
   ฟอนต์ Prompt/Kanit วาด U+00D7 เป็นก้อนทึบเล็ก ๆ อ่านไม่ออก
   → ใช้ฟอนต์ที่วาดถูกต้องเฉพาะอักขระตัวนี้ (ข้อมูลใน DB คงเดิม)
   ===================================================== */
.chip-x {
    font-family: 'Cinzel', 'Times New Roman', serif;
    font-weight: 700;
    font-size: 0.92em;
    line-height: 1;
    margin-right: 1px;
    vertical-align: baseline;
}

/* =====================================================
   4. ชื่อคลาสในแถวเลือกตัวละคร — ห้ามตัดคำ
   ชื่อยาวสุด FORCE SHIELDER / FORCE GUNNER ยาวเกินไทล์ 100px
   ===================================================== */
.char-select-item {
    height: auto;
    min-height: 100px;
}

.char-label {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    letter-spacing: .4px;
    line-height: 1.2;
    word-break: normal;
    overflow-wrap: anywhere;
}

@media (max-width: 768px) {
    .char-select-item {
        height: auto;
        min-height: 82px;
    }
}

/* =====================================================
   5. ตารางอันดับบนมือถือ — บอกให้รู้ว่าปัดดูต่อได้
   (.ranking-table-wrapper มี overflow:auto อยู่แล้ว แต่ผู้เล่นไม่รู้
    เห็นแค่คอลัมน์ LEVEL ถูกตัดครึ่งแล้วคิดว่าหน้าเสีย)
   ===================================================== */
/* จอกว้างเห็นทุกคอลัมน์อยู่แล้ว ไม่ต้องมีป้ายบอก
   ⚠️ กฎนี้ต้องอยู่ "ก่อน" บล็อก @media ด้านล่าง — เดิมวางไว้หลัง จึงทับ display:flex
   ของจอแคบกลับเป็น none ตลอด ป้ายไม่เคยโผล่เลย (พบตอน critique 5 ก.ย. 2569) */
.ranking-scroll-hint { display: none; }

@media (max-width: 900px) {
    .ranking-table-wrapper {
        /* เงาบอกว่ายังมีเนื้อหาต่อทางขวา — ติดขอบขวาของกล่องที่เลื่อนได้ */
        background-image: linear-gradient(to left, rgba(15, 30, 61, .10), rgba(15, 30, 61, 0));
        background-repeat: no-repeat;
        background-size: 26px 100%;
        background-position: right center;
        background-attachment: local;
    }

    .ranking-scroll-hint {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        margin: 8px 0 0;
        font-size: 11.5px;
        color: var(--ix-ink-2, #44557A);
    }
    .ranking-scroll-hint svg { flex-shrink: 0; }
}

/* =====================================================
   รอบยกระดับ 25 ส.ค. 2569 — CTA hero + ระบบ motion + optimize
   ===================================================== */

/* ---------- CTA หลักใน hero ----------
   เดิม hero ไม่มีทางไปเล่นเกมเลย (มีแต่ปุ่มโซเชียล)
   ลำดับตั้งแต่ 5 ก.ย. 2569: หลัก = สมัครไอดีฟรี (น้ำเงินเต็ม — ตัวเดียวกับ navbar/แถบล่าง/ท้ายหน้า)
   รอง = ดาวน์โหลดเกม (ขอบ + บรรทัดขนาดไฟล์/ระบบ) · โซเชียลถอยเป็นปุ่ม ghost เล็กลง */
.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 30px;
}

.btn-hero-primary,
.btn-hero-secondary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border-radius: 10px;
    font-family: 'Prompt', sans-serif;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: transform .18s ease-out, box-shadow .18s ease-out,
                background .18s ease-out, border-color .18s ease-out;
}

.btn-hero-primary {
    position: relative;
    overflow: hidden;
    padding: 16px 30px;
    font-size: 1.02rem;
    color: #fff;
    background: linear-gradient(180deg, var(--ix-blue-soft) 0%, var(--ix-blue) 100%);
    border: 1px solid var(--ix-blue);
    box-shadow: 0 10px 26px -10px rgba(29, 78, 216, .55);
}
.btn-hero-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 34px -12px rgba(29, 78, 216, .65);
}
/* แสงกวาดผ่านปุ่มตอน hover — ลูกเล่นเดียวที่ให้ปุ่มหลักเท่านั้น */
.btn-hero-primary::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: -80%;
    width: 55%;
    background: linear-gradient(105deg, transparent 0%, rgba(255, 255, 255, .32) 50%, transparent 100%);
    transform: skewX(-18deg);
    transition: left .55s cubic-bezier(.22, .61, .36, 1);
    pointer-events: none;
}
.btn-hero-primary:hover::after { left: 130%; }

.btn-hero-secondary {
    padding: 15px 24px;
    font-size: 0.96rem;
    color: var(--ix-blue-deep);
    background: rgba(255, 255, 255, .85);
    border: 1.5px solid var(--ix-blue-soft);
}
.btn-hero-secondary:hover {
    transform: translateY(-2px);
    background: #fff;
    border-color: var(--ix-blue);
    box-shadow: 0 10px 24px -12px rgba(29, 78, 216, .4);
}
.btn-hero-secondary svg { transition: transform .18s ease-out; }
.btn-hero-secondary:hover svg { transform: translateX(3px); }

.btn-hero-primary:focus-visible,
.btn-hero-secondary:focus-visible,
.btn-social:focus-visible {
    outline: 2px solid var(--ix-blue);
    outline-offset: 3px;
}

/* โซเชียล — ปุ่มขาวกระจกฝ้าพรีเมียม + ไอคอนอยู่ใน chip ไล่สีของแบรนด์ + hover เรืองแสงตามแบรนด์ */
.hero-social { margin-top: 18px; gap: 12px; }
.btn-social {
    padding: 7px 18px 7px 7px;          /* ซ้ายชิดเพราะมี icon chip */
    gap: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: .01em;
    color: var(--ix-ink);
    background: rgba(255, 255, 255, .9);
    border: 1px solid var(--ix-line);
    border-radius: 12px;
    box-shadow: 0 4px 14px -8px rgba(15, 30, 61, .28);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    transition: transform .2s ease, box-shadow .25s ease, border-color .2s ease, background .2s ease;
}
.btn-social-ic {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px; height: 34px;
    border-radius: 9px;
    color: #fff;                         /* svg fill=currentColor → ขาว */
    flex: none;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 4px 10px -4px rgba(0,0,0,.35);
    transition: transform .2s ease, box-shadow .25s ease;
}
.btn-social-ic svg { display: block; }
.btn-fb .btn-social-ic { background: linear-gradient(155deg, #3d97ff 0%, #1877F2 55%, #0d5fd1 100%); }
.btn-dc .btn-social-ic { background: linear-gradient(155deg, #8b96ff 0%, #5865F2 55%, #414bcc 100%); }
.btn-social-tx { line-height: 1.1; }

.btn-social:hover { transform: translateY(-2px); background: #fff; }
.btn-social:hover .btn-social-ic { transform: scale(1.06); }
.btn-fb:hover { border-color: rgba(24,119,242,.5);  box-shadow: 0 12px 26px -12px rgba(24,119,242,.6); }
.btn-dc:hover { border-color: rgba(88,101,242,.5);  box-shadow: 0 12px 26px -12px rgba(88,101,242,.6); }

@media (max-width: 768px) {
    .hero-cta { gap: 10px; margin-top: 24px; }
    .btn-hero-primary { padding: 14px 24px; font-size: 0.98rem; flex: 1 1 auto; justify-content: center; }
    .btn-hero-secondary { padding: 13px 20px; font-size: 0.92rem; flex: 1 1 auto; justify-content: center; }
    .btn-social { flex: 0 1 auto; }
}

/* ---------- Scroll-reveal ----------
   สถานะซ่อนถูก gate ด้วย html.lp-motion (JS เติมให้เฉพาะเมื่อ
   IntersectionObserver พร้อมและผู้ใช้ไม่ได้ปิดเอฟเฟกต์)              */
html.lp-motion .lp-rv {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .65s ease, transform .65s cubic-bezier(.22, .61, .36, 1);
    transition-delay: var(--rv-d, 0ms);
    will-change: opacity, transform;
}
html.lp-motion .lp-rv.lp-in {
    opacity: 1;
    transform: none;
    will-change: auto;
}

/* ---------- ประสิทธิภาพการวาด ----------
   ⚠️ ลอง content-visibility:auto กับหมวดใต้จอแล้วต้องถอด:
   ความสูงประเมิน (contain-intrinsic-size) ไม่ตรงของจริง ทำให้ตำแหน่ง
   เลื่อน/anchor (#screenshots ฯลฯ) เพี้ยน — หน้ามี nav แบบ anchor ทั้งหน้า
   ความเสี่ยงไม่คุ้มกำไร (รูปทั้งหมด lazy-load อยู่แล้ว) */

/* ---------- รายละเอียดมืออาชีพเล็ก ๆ ---------- */
::selection { background: rgba(59, 130, 246, .25); color: var(--ix-ink); }

/* =====================================================
   รอบยกระดับ 2 ก.ย. 2569 — "สวยที่สุด มืออาชีพที่สุด แต่สไตล์เดิม"
   คงโทเคนสี / ความโค้ง / รูปทรงปุ่มชุดเดิมทั้งหมด เพิ่มเฉพาะความประณีต
   และเก็บสิ่งที่หลุดจากชุดเดียวกัน (มุม 4px · หัวข้อขนาดไม่เท่ากัน · สีม่วง)
   ===================================================== */

/* ---------- 1. Hero ---------- */

/* ชิปข้อมูลเซิร์ฟเวอร์ — เดิมเป็น grid 4 คอลัมน์ตายตัว ชิปที่ 5 (ออนไลน์) จึงตกลงมา
   อยู่บรรทัดล่างโดด ๆ ทั้งที่แถวบนยังเหลือที่ → ให้ไหลตามความกว้างจริง */
.server-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.chip {
    background: rgba(255, 255, 255, .86);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    box-shadow: 0 4px 12px -8px rgba(15, 30, 61, .35);
}

/* การ์ดสถานะเปิดเซิร์ฟ/นับถอยหลัง — เดิมมุม 4px (--ix-radius-panel) แข็งกว่าทุกองค์ประกอบ
   ในหน้า (10–14px) และไม่มีเงา ดูเหมือนกล่องแปะทับวิดีโอ → ปรับให้เข้าชุดการ์ดของธีม */
.cb-countdown {
    border-radius: 12px;
    border-color: var(--ix-line);
    background: rgba(255, 255, 255, .9);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    box-shadow: 0 14px 34px -20px rgba(15, 30, 61, .35);
}
.cb-when {
    border-radius: 6px;
    border-color: var(--ix-line);
}
.cb-unit {
    border-radius: 10px;
    border-color: var(--ix-line);
    background: rgba(255, 255, 255, .7);
}
/* จุดเขียว "เปิดแล้ว" เต้นเบา ๆ เหมือนจุดบนชิปออนไลน์ (keyframes ix-pulse อยู่ใน landing-page.css) */
.cb-countdown.is-live .cb-dot {
    animation: ix-pulse 2.2s ease-out infinite;
}

/* สัญญาณเลื่อนลง — เส้นบาง 1px กับจุดแสงไหลลง วางกลางขอบล่าง hero (markup อยู่ท้าย .hero) */
.hero-scroll {
    position: absolute;
    left: 50%;
    bottom: 26px;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    transform: translateX(-50%);
    color: var(--ix-blue);
    opacity: .8;
    transition: opacity .2s ease, transform .25s cubic-bezier(.22, .61, .36, 1);
}
.hero-scroll:hover {
    opacity: 1;
    transform: translateX(-50%) translateY(3px);
}
.hero-scroll-line {
    position: relative;
    width: 1px;
    height: 36px;
    border-radius: 1px;
    background: rgba(29, 78, 216, .22);
    overflow: hidden;
}
.hero-scroll-line::after {
    content: '';
    position: absolute;
    left: 0;
    top: -45%;
    width: 100%;
    height: 45%;
    background: linear-gradient(180deg, transparent, var(--ix-blue));
    animation: heroScrollDrop 2s cubic-bezier(.22, .61, .36, 1) infinite;
}
@keyframes heroScrollDrop {
    0%   { top: -45%; opacity: 0; }
    25%  { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}
@media (max-width: 900px) {
    .hero-scroll { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .hero-scroll-line::after { animation: none; top: 30%; opacity: .8; }
    .cb-countdown.is-live .cb-dot { animation: none; }
}

/* ---------- 2. หัวข้อ section ทุกหมวดต้องเท่ากัน ----------
   STRONGEST PLAYERS ใช้ .bringer-title ที่ทับขนาดเหลือ 18px (มรดกจากตอนคลาสนี้ใช้กับหัวการ์ด)
   ทั้งที่เป็น h2 ระดับเดียวกับ TOP PLAYERS / CHARACTER → คืนขนาดให้เท่ากับ .section-title */
h2.section-title.bringer-title {
    font-size: 36px;
    letter-spacing: 8px;
    color: var(--ix-ink);
}
@media (max-width: 768px) {
    h2.section-title.bringer-title { font-size: 28px; letter-spacing: 4px; }
}
@media (max-width: 480px) {
    h2.section-title.bringer-title { font-size: 24px; letter-spacing: 3px; }
}
/* หัวข้อภาษาอังกฤษที่ตัดขึ้นบรรทัดใหม่บนจอแคบ ให้สองบรรทัดยาวใกล้กัน ไม่เหลือคำเดียวโดดบรรทัดล่าง
   ⚠️ ใช้กับหัวข้ออังกฤษเท่านั้น — ลองกับคำโปรยไทยแล้วเบราว์เซอร์ตัดกลางคำที่ไม่อยู่ในพจนานุกรม
   ("เคล็ด|ลับ", "ชา|แนล") เพราะ balance ไปเลือกจุดตัดที่ตัวตัดคำไทยคิดว่าถูก */
.section-title, .guide-title, .pvs-title, .screenshots-title, .character-title, .team-title {
    text-wrap: balance;
}

/* ---------- 3. แถบสถานะ INT ----------
   หน้าผู้ใช้ห้ามใช้สีม่วง (CLAUDE.md) — INT เดิมไล่ม่วง → ไล่น้ำเงินของแบรนด์ (เข้ม→อ่อน)
   ยังแยกจาก STR แดง / DEX เขียวได้ชัด และตรงกับแถบ INT ในป๊อปอัปตัวละคร (.cm-stat.int) */
.stat-bar-fill.int-fill {
    background: linear-gradient(90deg, #1E3A8A 0%, #2563EB 55%, #60A5FA 100%);
}

/* ---------- 4. ตารางอันดับ ---------- */
/* หัวตาราง "ชื่อตัวละคร" เคยหักเป็น 2 บรรทัดบนมือถือ — ตารางเลื่อนแนวนอนได้อยู่แล้ว ไม่ต้องหัก */
.ranking-table th { white-space: nowrap; }

/* แท็บอันดับ + ตัวกรองคลาสบนจอแคบ — เดิม wrap เป็น 2 แถว เหลือ "ONLINE" / "FG DM" โดดอยู่แถวล่าง
   → เลื่อนแนวนอนแถวเดียว + เฟดขอบขวาบอกว่ายังมีต่อ (เฟดเป็น flex item แบบ sticky
   จึงติดขอบขวาของกล่องตลอดเวลาที่เลื่อน โดยไม่ต้องใช้ mask ที่จะกินขอบการ์ดไปด้วย) */
@media (max-width: 768px) {
    .ranking-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .ranking-tabs,
    .war-class-filter {
        position: relative;
        flex-wrap: nowrap;
        justify-content: flex-start;
        width: 100%;
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
        scroll-snap-type: x proximity;
        -webkit-overflow-scrolling: touch;
    }
    .ranking-tabs::-webkit-scrollbar,
    .war-class-filter::-webkit-scrollbar { display: none; }
    .ranking-tabs::after,
    .war-class-filter::after {
        content: '';
        position: sticky;
        right: 0;
        flex: 0 0 34px;
        margin-left: -34px;
        align-self: stretch;
        background: linear-gradient(90deg, rgba(255, 255, 255, 0), #FFFFFF 78%);
        pointer-events: none;
    }
    .rank-tab,
    .class-filter-btn {
        flex: 0 0 auto;
        scroll-snap-align: start;
        white-space: nowrap;
    }
    /* สามเหลี่ยมใต้แท็บที่เลือกจะโดน overflow ตัด — ซ่อนบนจอแคบ (แท็บที่เลือกเป็นน้ำเงินทึบเห็นชัดอยู่แล้ว) */
    .rank-tab.active::after { display: none; }
}

/* ---------- 5. Bringer — สถานะว่าง ----------
   เดิม "ไม่มีข้อมูล" ลอยอยู่ระหว่างปุ่มเลื่อนสองข้างที่ยังกดได้ทั้งที่ไม่มีอะไรให้เลื่อน
   → การ์ดสถานะว่างชุดเดียวกับตารางอันดับตอนปิด (ไอคอนในวงกลมฟ้าอ่อน + หัวข้อ + เงื่อนไข) */
.bringer-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    min-height: 220px;
    padding: 36px 24px;
    text-align: center;
    background: var(--ix-white);
    border: 1px solid var(--ix-line);
    border-radius: 14px;
    box-shadow: var(--ix-shadow-card);
}
.bringer-empty-ic {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin-bottom: 8px;
    border-radius: 50%;
    background: var(--ix-tint);
    border: 1px solid var(--ix-line);
    color: var(--ix-blue-soft);
}
.bringer-empty-ic svg { display: block; }
.bringer-empty-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--ix-ink);
}
.bringer-empty-hint {
    max-width: 440px;
    font-size: 13px;
    line-height: 1.65;
    color: var(--ix-ink-2);
}
.bringer-carousel.is-empty .carousel-btn { display: none; }
/* ตอนว่าง carousel ไม่มีปุ่มสองข้างแล้ว การ์ดจะยืดเต็มความกว้าง section
   → คุมให้กว้างเท่ากล่องเงื่อนไขด้านบน (.bringer-rules 860px) จะได้อยู่ในแนวเดียวกัน */
.bringer-carousel.is-empty {
    max-width: 860px;
    margin-inline: auto;
}
.bringer-carousel.is-empty .bringer-slider {
    padding: 0;
    scroll-snap-type: none;
}

/* ---------- 6. รายละเอียดมืออาชีพเล็ก ๆ ทั้งหน้า ---------- */

/* เลขขั้นตอนในการ์ดคู่มือ — เพชรกรอบน้ำเงินกลายเป็นเพชรทึบตอนชี้การ์ด (คู่กับการ์ดที่ยกตัวขึ้นอยู่แล้ว) */
.guide-card-icon {
    transition: background .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.step-number { transition: color .3s ease; }
.guide-card:hover .guide-card-icon {
    background: linear-gradient(180deg, var(--ix-blue-soft) 0%, var(--ix-blue) 100%);
    border-color: var(--ix-blue);
    box-shadow: 0 8px 18px -8px rgba(29, 78, 216, .55);
}
.guide-card:hover .step-number { color: #fff; }

/* ลิงก์ในฟุตเตอร์ขยับไปทางขวานิดหนึ่งตอนชี้ (บอกว่าเป็นลิงก์จริง ไม่ใช่รายการเฉย ๆ) */
.f-links a {
    display: inline-block;
    transition: color .15s ease-out, transform .2s cubic-bezier(.22, .61, .36, 1);
}
.f-links a:hover { transform: translateX(3px); }

/* โฟกัสคีย์บอร์ดเห็นชัดทุกลิงก์/ปุ่มในหน้า — รูปแบบเดียวกับปุ่ม hero
   (องค์ประกอบที่มีสไตล์โฟกัสของตัวเองอยู่แล้ว specificity สูงกว่า จึงไม่ถูกทับ) */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--ix-blue);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    .f-links a:hover { transform: none; }
    .hero-scroll:hover { transform: translateX(-50%); }
}

/* =====================================================
   รอบ conversion + มือถือ 5 ก.ย. 2569 (ตามผล critique)
   เลนส์: คนแปลกหน้า → ผู้เล่น · มือถือ · เฟรมแรกของ hero
   ===================================================== */

/* ---------- 1. ปุ่มทึบทุกตัว: คอนทราสต์ตัวหนังสือขาว ≥4.5:1 ----------
   gradient เดิมเริ่มที่ --ix-blue-soft (#3B82F6) → ขาวบนขอบบนปุ่มได้แค่ 3.68:1
   เริ่มที่ #2563EB (5.2:1) แทน — สีนี้ใช้อยู่แล้วในเส้น/เพชรของ hero จึงอยู่ในพาเลตต์เดิม */
:root { --ix-blue-mid: #2563EB; }
.btn-hero-primary,
.mobile-action-btn.btn-register,
.rank-tab.active,
.class-filter-btn.active,
.bringer-tab[data-nation="capella"].active,
.guide-card:hover .guide-card-icon {
    background: linear-gradient(180deg, var(--ix-blue-mid) 0%, var(--ix-blue) 100%);
}
.mobile-action-btn.btn-register:hover,
.mobile-action-btn.btn-register:active {
    background: linear-gradient(180deg, var(--ix-blue-mid) 0%, var(--ix-blue-deep) 100%);
}

/* ---------- 2. Hero: ข้อมูลตัดสินใจต้องไม่ใช่ตัวเล็กสุดในหน้า ---------- */
.tagline { font-size: .76rem; letter-spacing: .22em; color: var(--ix-blue-deep); }
@media (max-width: 560px) {
    /* จอแคบ: เส้นประดับสองข้างกินที่จนบรรทัดชื่อเกมหัก → ซ่อนเส้น ลด tracking ให้จบบรรทัดเดียว */
    .tagline { font-size: .68rem; letter-spacing: .13em; gap: 8px; }
    .tagline svg { display: none; }
}
.pvs-subtitle strong { white-space: nowrap; }
.hero-sub strong { color: var(--ix-ink); font-weight: 700; }
.server-chips { margin-top: 22px; }
.chip { font-size: .86rem; padding: 8px 15px; letter-spacing: .05em; }
.chip b { font-size: 1.02em; }

/* การ์ดสถานะตอนเปิดแล้ว — เหลือบรรทัดเดียว (เดิมสูง 104px และซ้ำข้อความกับปุ่มใต้มัน) */
.cb-countdown.is-live { gap: 0; padding: 12px 16px; max-width: 460px; margin-bottom: 0; }
.cb-countdown.is-live .cb-live { display: none; }

/* ปุ่มรอง (ดาวน์โหลด) บอกขนาดไฟล์ + ระบบในตัว */
.btn-hero-tx { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; line-height: 1.15; }
.btn-hero-meta { font-size: .68rem; font-weight: 600; letter-spacing: .04em; color: var(--ix-ink-2); }
.btn-hero-secondary:has(.btn-hero-meta) { padding-top: 10px; padding-bottom: 10px; }

/* หมายเหตุ "เล่นบน PC" + ปุ่มคัดลอกลิงก์ — โชว์เฉพาะจอแคบ (คนเดสก์ท็อปกดโหลดได้เลย) */
.hero-cta-note {
    display: none;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 10px;
    margin-top: 12px;
    font-size: .78rem;
    line-height: 1.6;
    color: var(--ix-ink-2);
}
.hero-cta-note svg { flex: none; color: var(--ix-blue); }
.hero-copy-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 38px;
    padding: 6px 12px;
    border: 1px solid var(--ix-line);
    border-radius: 8px;
    background: rgba(255, 255, 255, .88);
    color: var(--ix-blue);
    font: 600 .76rem 'Prompt', sans-serif;
    cursor: pointer;
    transition: border-color .18s ease, background .18s ease, color .18s ease;
}
.hero-copy-link.is-done { border-color: rgba(21, 128, 61, .45); color: var(--i-green, #15803D); background: rgba(34, 197, 94, .12); }
@media (max-width: 768px) {
    .hero-cta-note { display: flex; }
    .hero-cta-note > span { flex: 1 1 100%; }
}

/* ---------- 3. มือถือ: hero สูงพอดีเนื้อหา + navbar เหลือโลโก้กับแฮมเบอร์เกอร์ ----------
   เดิม .hero-art กัน min-height 400px เป็นเกราะเปล่าใต้ปุ่มโซเชียล และ navbar มีปุ่มสมัคร
   ซ้ำกับ hero + แถบล่าง รวมเป็น "สมัครสมาชิก" 3 ปุ่มในจอแรก */
@media (max-width: 900px) {
    .hero-art { min-height: 0; margin-top: 0; }
    .hero-inner { padding-top: 36px; padding-bottom: 56px; }
}
/* ---------- 4. แถบปุ่มล่างมือถือ ----------
   ซ่อนขณะปุ่มคู่ใน hero ยังอยู่ในจอ (body.hero-cta-visible จาก JS) และตอนเมนูเปิด
   ปุ่มสูง ≥44px ฟอนต์ 14px (เดิม 41px / 12px) */
.mobile-bottom-btns {
    padding: 9px 10px calc(9px + env(safe-area-inset-bottom, 0px));
    transition: transform .32s cubic-bezier(.22, .61, .36, 1), opacity .25s ease;
}
body.hero-cta-visible .mobile-bottom-btns {
    transform: translateY(115%);
    opacity: 0;
    pointer-events: none;
}
.mobile-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 auto;
    min-height: 44px;
    padding: 10px 14px;
    font-size: 14px;
    letter-spacing: .02em;
}
.mobile-action-btn.btn-register { flex: 1.3 1 auto; font-size: 14px; letter-spacing: .02em; text-transform: none; }
.mobile-menu-dots { flex: 0 0 auto; min-width: 44px; margin-left: 0; }
@media (max-width: 768px) {
    .footer .copyright { padding-bottom: 90px; }   /* กันแถบล่างทับ copyright */
}

/* ---------- 5. เมนูข้างมือถือ → ย้ายไป css/site-nav.css (nav-unify 11 ก.ย. 2569) ---------- */

/* ---------- 6. Tap target ≥44px ทั่วหน้า (จอสัมผัส) ---------- */
.ss-lb-close { width: 44px; height: 44px; }
.class-filter-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.class-filter-ic { width: 18px; height: 18px; border-radius: 4px; object-fit: cover; flex: none; }
@media (max-width: 768px) {
    .rank-tab, .guide-tab, .pvs-video-tab, .pvs-chapter-btn, .bringer-tab { min-height: 44px; }
    .class-filter-btn { min-height: 42px; padding: 6px 12px; }
    .pvs-btn { min-width: 40px; min-height: 40px; }
    .hero-copy-link { min-height: 44px; }
    .ranking-tabs, .war-class-filter { gap: 6px; }
    .socials a { width: 44px; height: 44px; }
    .char-select-item { min-height: 88px; }
}

/* ---------- 7. อันดับปิดอยู่ → ยุบเหลือแผงแจ้ง + ปุ่ม Discord ----------
   (เดิมวาดแท็บ 5 + ตัวกรอง 10 + หัวตาราง เหนือแม่กุญแจ ≈700px บนมือถือโดยไม่มีอะไรให้กด) */
.ranking-section.is-closed .ranking-controls,
.ranking-section.is-closed .ranking-table thead,
.ranking-section.is-closed .ranking-scroll-hint { display: none; }
.ranking-section.is-closed .ranking-table-wrapper { max-width: 860px; margin-inline: auto; background-image: none; }
/* ตารางมี min-width 500px ไว้เลื่อนดูคอลัมน์ — ตอนปิดไม่มีคอลัมน์ ให้กว้างเท่ากล่อง แผงแจ้งจะได้อยู่กลางจริง */
.ranking-section.is-closed .ranking-table { min-width: 0; width: 100%; }
.ranking-closed-follow { display: flex; justify-content: center; margin-top: 18px; }
.ranking-closed-follow .btn-hero-secondary { font-size: .9rem; padding: 12px 20px; }
.ranking-closed-follow svg { color: #5865F2; }

/* ---------- 8. หัวข้อหมวดบนจอแคบ: ซ่อนเส้นข้าง ให้ตัวหนังสือมีที่พอ ไม่หัก "TOP / PLAYERS" ---------- */
@media (max-width: 560px) {
    .section-bar, .guide-bar, .pvs-bar, .screenshots-bar, .character-bar, .team-bar { display: none; }
    .section-title-row, .guide-title-row, .pvs-title-row, .screenshots-title-row, .character-title-row, .team-title-row { gap: 12px; }
    .section-title, .guide-title, .pvs-title, .screenshots-title, .character-title, .team-title,
    h2.section-title.bringer-title { letter-spacing: 3px; }
}

/* ---------- 9. แท็บ Storm Bringer: แดง = accent (เพชร/เส้น) ไม่ใช่พื้นเต็ม ----------
   แดงในโปรเจกต์นี้เหลือไว้เฉพาะงานอันตราย — สีชาติ Procyon ยังอยู่ที่ไอคอนข้าวหลามตัด */
.bringer-tab[data-nation="procyon"].active {
    background: linear-gradient(180deg, var(--ix-ink) 0%, var(--ix-navy) 100%);
    box-shadow: 0 6px 18px -6px rgba(15, 30, 61, .5);
}
.bringer-tab[data-nation="procyon"].active::after { border-top-color: var(--ix-navy); }
.bringer-tab[data-nation="procyon"].active .nation-icon.storm { box-shadow: 0 0 0 2px rgba(255, 255, 255, .35); }

/* ---------- 10. ไลต์บ็อกซ์: คำบรรยายใต้ภาพ + ขนาดบนมือถือ ---------- */
.ss-lb-meta { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.ss-lb-caption { margin: 0; color: #fff; font-family: 'Prompt', sans-serif; font-size: .92rem; font-weight: 500; line-height: 1.5; text-align: center; }
#ss-lb-counter { font-family: 'Prompt', sans-serif; letter-spacing: 1px; }
@media (max-width: 768px) {
    .ss-lb-prev, .ss-lb-next { width: 40px; height: 64px; }
    .ss-lb-prev { left: 8px; }
    .ss-lb-next { right: 8px; }
    #ss-lb-img { max-width: 92vw; max-height: 70vh; }
}

/* ---------- 11. สไลเดอร์เสียงของ player (ทำเอง แทน input[type=range]) ---------- */
/* ความกว้างคงที่ 60px ตลอด — เดิมยืดจาก 0 ตอนชี้ ทำให้ป้ายเวลาข้าง ๆ กระโดด (layout thrash)
   ตอนไม่ชี้เหลือแถบจาง ๆ ให้รู้ว่ามี ชี้/โฟกัสแล้วเข้ม → เปลี่ยนแค่ opacity */
.pvs-vol {
    position: relative;
    display: flex;
    align-items: center;
    width: 60px;
    height: 24px;
    border-radius: 3px;
    overflow: hidden;
    cursor: pointer;
    opacity: .45;
    transition: opacity .2s ease;
}
.pvs-vol::before { content: ''; position: absolute; left: 0; right: 0; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .3); }
.pvs-vol-fill { position: absolute; left: 0; height: 3px; width: 100%; border-radius: 3px; background: var(--ix-blue-soft); }
.pvs-vol-fill::after { content: ''; position: absolute; right: 0; top: 50%; width: 10px; height: 10px; margin-top: -5px; border-radius: 50%; background: #fff; }
.pvs-volume-wrap:hover .pvs-vol,
.pvs-volume-wrap:focus-within .pvs-vol { opacity: 1; }
.pvs-vol:focus-visible { outline: 2px solid var(--ix-blue-soft); outline-offset: 2px; }
@media (pointer: coarse) { .pvs-vol { opacity: 1; } }

/* ---------- 12. (Closing CTA ท้ายหน้า — เจ้าของสั่งถอดออก 5 ก.ย. 2569) ---------- */

/* ---------- 12b. VIDEO GUIDE: คู่มือวิดีโอ 5 คลิป (5 ก.ย. 2569) ----------
   .pvs-now = ชื่อคลิปที่กำลังดู เหนือ player · .pvs-clips = ปุ่มเลือกคลิป (การ์ดรูปย่อ + EP + ชื่อ)
   เดสก์ท็อป 5 คอลัมน์เท่ากัน · จอแคบเลื่อนแนวนอน snap ทีละการ์ด (แพทเทิร์นเดียวกับแท็บอันดับ) */
.pvs-now {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 16px;
    font-family: 'Prompt', sans-serif;
    font-size: .9rem;
    color: var(--ix-ink-2);
}
.pvs-now svg { color: var(--ix-blue); flex: none; }
.pvs-now-lb { font-weight: 500; }
.pvs-now strong { font-size: 1.05rem; font-weight: 700; color: var(--ix-ink); }

/* แผ่นสำรองเมื่อไม่มี poster — พื้น navy + ชื่อหัวข้อ (ซ่อนเมื่อมี poster หรือกำลังเล่น) */
.pvs-fallback {
    position: absolute;
    inset: 0;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 24px;
    background: linear-gradient(160deg, var(--ix-ink) 0%, var(--ix-navy) 100%);
    color: #fff;
    text-align: center;
    pointer-events: none;
}
.pvs-fallback svg { opacity: .7; }
.pvs-fallback-title { font-family: 'Prompt', sans-serif; font-size: 1.15rem; font-weight: 700; letter-spacing: .02em; }
.pvs-player.no-poster .pvs-fallback { display: flex; }
/* ไม่มี poster + preload=none → <video> ไม่รู้ขนาดตัวเอง จะยุบเหลือ 150px — กันไว้ด้วยสัดส่วน 16:9 */
.pvs-player.no-poster .preview-video-player { aspect-ratio: 16 / 9; }
.pvs-player.no-poster:not(.paused) .pvs-fallback,
.pvs-player.no-poster .pvs-overlay.hidden ~ .pvs-fallback { display: none; }

.pvs-clips {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    margin: 26px 0 0;
}
.pvs-clip {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
    min-width: 0;
    text-align: left;
    background: var(--ix-white);
    border: 1.5px solid var(--ix-line);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    color: var(--ix-ink-2);
    box-shadow: var(--ix-shadow-card);
    transition: border-color .2s ease, transform .2s cubic-bezier(.22, .61, .36, 1), box-shadow .2s ease, color .2s ease;
}
.pvs-clip:hover { border-color: rgba(29, 78, 216, .45); transform: translateY(-3px); color: var(--ix-blue); }
.pvs-clip.active { border-color: var(--ix-blue); color: var(--ix-blue); box-shadow: 0 12px 28px -14px rgba(29, 78, 216, .55); }
.pvs-clip:focus-visible { outline: 2px solid var(--ix-blue); outline-offset: 3px; }
.pvs-clip-thumb {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    background: linear-gradient(160deg, var(--ix-ink) 0%, var(--ix-navy) 100%);
    overflow: hidden;
}
.pvs-clip-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.pvs-clip:hover .pvs-clip-thumb img { transform: scale(1.04); }
.pvs-clip-thumb-fb {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    color: #fff;
    font-family: 'Prompt', sans-serif;
    font-size: .78rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.4;
}
.pvs-clip-play {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 34px;
    height: 34px;
    margin: -17px 0 0 -17px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, .92);
    color: var(--ix-blue);
    box-shadow: 0 6px 16px -6px rgba(15, 30, 61, .55);
    transition: transform .2s ease, background .2s ease, color .2s ease;
}
.pvs-clip-play svg { margin-left: 2px; }
.pvs-clip.active .pvs-clip-play { background: var(--ix-blue); color: #fff; }
.pvs-clip:hover .pvs-clip-play { transform: scale(1.08); }
/* คลิปที่เลือก: เส้นน้ำเงินใต้รูปย่อ บอกสถานะได้แม้ไม่เห็นสีขอบ */
.pvs-clip.active .pvs-clip-thumb::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 3px;
    background: var(--ix-blue);
}
.pvs-clip-body {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 48px;
    padding: 9px 11px 10px;
}
.pvs-clip-body .pvs-tab-ep { flex: none; }
.pvs-clip.active .pvs-tab-ep { background: var(--ix-blue); color: #fff; }
.pvs-clip-name {
    font-family: 'Prompt', sans-serif;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    color: inherit;
}

@media (max-width: 1024px) {
    .pvs-clips { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
    .pvs-now { margin-bottom: 12px; font-size: .84rem; }
    .pvs-now strong { font-size: .98rem; }
    /* แถวเลื่อนแนวนอน — การ์ดกว้าง 62vw ให้เห็นการ์ดถัดไปโผล่ขอบขวา (บอกว่าเลื่อนได้) */
    .pvs-clips {
        display: flex;
        gap: 10px;
        margin: 20px -16px 0;
        padding: 4px 16px 10px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }
    .pvs-clips::-webkit-scrollbar { display: none; }
    .pvs-clip { flex: 0 0 62vw; max-width: 260px; scroll-snap-align: start; }
    .pvs-clip:hover { transform: none; }
}


/* ---------- 13. ฟุตเตอร์ ----------
   สไตล์ปุ่มติดตามข่าวสาร/ลิงก์ฟุตเตอร์ย้ายไปอยู่ landing-page.css (บล็อก FOOTER)
   เพราะ includes/site_footer.php ใช้ร่วมกับ news.php / news_detail.php ที่ไม่โหลดไฟล์นี้ */

/* ---------- 14. ลดการเคลื่อนไหว: ตัดทุก animation/transition ที่ยังหลุด (fadeIn แผง, คลื่นแถบชาแนล) ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
        scroll-behavior: auto !important;
    }
    html.lp-motion .lp-rv { opacity: 1; transform: none; }
    .mobile-bottom-btns { transition: none; }
}
