/* ===== index.php แผงหน้าหลัก — แบบ A พรีเมียม น้ำเงิน-ทอง (prefix ix-) ===== */
.ix { --navy: #0b1e3f; --ink: #1d2b53; --mut: #6b7690; --line: #e8ebf2; --gold: #d9a93c; --gold2: #ffd54f; background: #f4f6fb; padding-bottom: 8px; color: var(--ink); }
.ix svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ix a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }

.ix-hero { position: relative; overflow: hidden; color: #fff; padding: 26px 18px 78px;
  background: radial-gradient(120% 90% at 85% 0%, #3b4f99 0%, #0b1e3f 55%, #081530 100%); }
.ix-hero::before { content: ""; position: absolute; right: -60px; top: -40px; width: 240px; height: 240px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 213, 79, .35), transparent 65%); }
.ix-bird { position: absolute; right: 4px; top: 22px; width: 132px; filter: drop-shadow(0 8px 20px rgba(255, 213, 79, .35)); animation: ixFloat 4s ease-in-out infinite; }
.ix-kicker { position: relative; display: inline-block; font-size: 10.5px; letter-spacing: 1px; color: var(--gold2); background: rgba(255, 213, 79, .12); border: 1px solid rgba(255, 213, 79, .3); border-radius: 99px; padding: 3px 10px; }
.ix-hero h2 { position: relative; margin: 12px 0 6px; font-size: 25px; font-weight: 700; line-height: 1.35; max-width: 64%; }
.ix-hero h2 em { font-style: normal; color: var(--gold2); }
.ix-hero p { position: relative; margin: 0; font-size: 13px; opacity: .78; max-width: 62%; line-height: 1.55; }
.ix-cta { position: relative; z-index: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; }
.ix-cta a { display: inline-flex; align-items: center; gap: 2px; border-radius: 99px; padding: 9px 18px; font-size: 13.5px; font-weight: 600; transition: transform .15s; }
.ix-cta a:active { transform: scale(.96); }
.ix-cta a svg { width: 16px; height: 16px; stroke-width: 2.4; }
.ix-cta .gold { background: linear-gradient(90deg, #d9a93c, #f3cf6a); color: var(--navy) !important; box-shadow: 0 6px 16px rgba(217, 169, 60, .35); }
.ix-cta .ghost { border: 1.5px solid rgba(255, 255, 255, .45); color: #fff !important; }
.ix-cta .hi { font-size: 13.5px; font-weight: 600; color: #fff; margin-right: 4px; }

.ix-stats { position: relative; z-index: 2; display: flex; margin: -54px 14px 0; padding: 14px 4px; background: #fff; border-radius: 18px; box-shadow: 0 10px 28px rgba(11, 30, 63, .14); animation: ixUp .5s ease both; }
.ix-stats div { flex: 1; text-align: center; border-right: 1px solid var(--line); }
.ix-stats div:last-child { border-right: 0; }
.ix-stats strong { display: block; font-size: 18px; font-weight: 800; }
.ix-stats span { font-size: 11.5px; color: var(--mut); }

.ix-tabs.box-con-01 { position: sticky; top: 0; z-index: 20; margin: 14px 14px 0; padding: 6px; background: #fff; border-radius: 16px; box-shadow: 0 2px 10px rgba(11, 30, 63, .07); }
.ix-tabs .flex { display: flex; gap: 4px; }
.ix-tab { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 0 7px; border-radius: 12px; font-size: 11.5px; color: var(--mut); cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background .3s, color .3s, transform .15s; }
.ix-tab:active { transform: scale(.94); }
.ix-tab svg { width: 21px; height: 21px; transition: color .3s, transform .3s; }
.ix-tab.is-active { background: var(--navy); color: #fff; font-weight: 600; }
.ix-tab.is-active svg { color: var(--gold2); transform: translateY(-1px); }

.ix-sec { display: flex; align-items: center; justify-content: space-between; margin: 22px 16px 10px; }
.ix-sec b { font-size: 16px; font-weight: 700; display: flex; align-items: baseline; gap: 8px; }
.ix-sec b small { font-size: 11.5px; font-weight: 400; color: var(--mut); }
.ix-sec a { display: flex; align-items: center; font-size: 12.5px; font-weight: 600; color: #7b5cd6; white-space: nowrap; }
.ix-sec a svg { width: 15px; height: 15px; }
.ix-card { background: #fff; margin: 0 14px; border-radius: 18px; padding: 4px 14px; box-shadow: 0 2px 8px rgba(11, 30, 63, .05); }
.ix-empty { text-align: center; color: var(--mut); font-size: 13px; padding: 14px 0; margin: 0; }

.ix-pod { display: flex; align-items: flex-end; gap: 8px; margin: 0 14px; }
.ix-pod a { flex: 1; min-width: 0; position: relative; text-align: center; background: #fff; border-radius: 18px; padding: 14px 6px 12px; box-shadow: 0 2px 10px rgba(11, 30, 63, .06); animation: ixUp .5s ease both; }
.ix-pod a.mid { padding-top: 22px; background: linear-gradient(180deg, #fff8e1, #fff); box-shadow: 0 8px 20px rgba(217, 169, 60, .2); animation-delay: .08s; }
.ix-pod .av { display: block; width: 56px; height: 56px; border-radius: 50%; object-fit: cover; margin: 0 auto 6px; border: 3px solid var(--gold); background: #e8eef9; }
.ix-pod a.mid .av { width: 68px; height: 68px; }
.ix-pod .crown { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, #ffd54f, #d9a93c); color: var(--navy); font-weight: 800; font-size: 13px; display: grid; place-items: center; box-shadow: 0 3px 8px rgba(217, 169, 60, .5); }
.ix-pod .k { display: inline-block; font-size: 10px; font-weight: 600; background: #f3eeff; color: #7b5cd6; border-radius: 6px; padding: 1px 7px; margin-bottom: 4px; }
.ix-pod b { display: block; font-size: 12.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ix-pod small { display: block; font-size: 10.5px; color: var(--mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.ix-sp { display: flex; gap: 14px; overflow-x: auto; scrollbar-width: none; padding: 4px 16px 4px; }
.ix-sp::-webkit-scrollbar { display: none; }
.ix-sp a { flex: none; width: 66px; text-align: center; font-size: 11px; }
.ix-sp .av { display: block; width: 58px; height: 58px; border-radius: 3px; /* 2026-11-06 ลูกค้า: โลโก้ผู้สนับสนุนเป็นสี่เหลี่ยมขอบมน 3px (เดิมวงกลม) */ object-fit: cover; margin: 0 auto 6px; background: #fff; box-shadow: 0 0 0 2.5px #fff, 0 0 0 4.5px var(--gold); }
.ix-sp span { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ix-sp small { display: block; color: #d08f12; font-weight: 700; font-size: 10.5px; }

.ix-ads { margin: 22px 14px 0; border-radius: 16px; overflow: hidden; box-shadow: 0 4px 14px rgba(11, 30, 63, .1); }
.ix-ads .ads-slider { margin: 0; border-radius: 16px; }
.ix-af.af { margin: 16px 14px 0; }
.ix-af .af-ico { color: #d08f12; }
.ix-af .af-ico svg { width: 20px; height: 20px; }

.ix-fund { position: relative; overflow: hidden; display: block; margin: 16px 14px 0; border-radius: 22px; padding: 18px; color: #fff !important; background: linear-gradient(120deg, #0b1e3f, #2a3f78 60%, #7b5cd6); box-shadow: 0 10px 24px rgba(42, 63, 120, .25); }
.ix-fund::after { content: ""; position: absolute; right: -30px; top: -30px; width: 150px; height: 150px; border-radius: 50%; background: rgba(255, 213, 79, .2); }
.ix-fund small { font-size: 12px; opacity: .78; }
.ix-fund strong { display: block; font-size: 30px; font-weight: 800; color: var(--gold2); margin: 2px 0; }
.ix-fund strong em { font-style: normal; font-size: 13px; color: #fff; opacity: .8; margin-left: 5px; font-weight: 500; }
.ix-fund p { margin: 0; font-size: 12.5px; opacity: .82; }
.ix-fund .go { position: relative; z-index: 1; display: inline-flex; align-items: center; margin-top: 12px; background: #fff; color: var(--navy); font-size: 12.5px; font-weight: 700; border-radius: 99px; padding: 7px 14px; }
.ix-fund .go svg { width: 15px; height: 15px; stroke-width: 2.4; }

.ix-news { display: flex; gap: 11px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.ix-news:last-child { border-bottom: 0; }
.ix-news img { width: 88px; height: 66px; border-radius: 12px; object-fit: cover; flex: none; background: #e8eef9; }
.ix-news > span { min-width: 0; }
.ix-news b { font-size: 13.5px; font-weight: 600; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ix-news small { display: flex; gap: 12px; color: var(--mut); font-size: 11.5px; margin-top: 4px; }
.ix-news small span { display: flex; align-items: center; gap: 3px; }
.ix-news small svg { width: 13px; height: 13px; }

.ix-mats { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; padding: 2px 14px 6px; }
.ix-mats::-webkit-scrollbar { display: none; }
.ix-mats .item-con-1 { flex: 0 0 150px; background: #fff; border-radius: 16px; overflow: hidden; box-shadow: 0 2px 8px rgba(11, 30, 63, .06); margin: 0; }

.ix-start { padding: 14px; }
.ix-roles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ix-roles .role { border: 1.5px solid var(--line); border-radius: 14px; padding: 10px; text-align: left; cursor: pointer; transition: border-color .2s, background .2s; }
.ix-roles .role.active { border-color: #7b5cd6; background: #faf8ff; }
.ix-roles .role .ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; }
.ix-roles .role .ic svg { width: 18px; height: 18px; }
.ix-roles .role b { display: block; font-size: 13.5px; margin-top: 6px; }
.ix-roles .role > span:last-child { display: block; font-size: 11px; color: var(--mut); line-height: 1.35; }
.ix-roles .c1 { background: #eef1ff; color: #3d5af1; } .ix-roles .c2 { background: #f3eeff; color: #7b5cd6; } .ix-roles .c3 { background: #ffeef7; color: #d84f97; } .ix-roles .c4 { background: #fff6e2; color: #d08f12; }
.ix-btn { display: block; text-align: center; border-radius: 14px; padding: 12px; font-weight: 600; font-size: 14px; margin-top: 10px; }
.ix-btn.navy { background: var(--navy); color: #fff !important; }
.ix-btn.light { background: #eff1f5; }

@keyframes ixUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes ixFloat { 50% { transform: translateY(-6px); } }
@media (max-width: 360px) { .ix-hero h2 { font-size: 22px; } .ix-bird { width: 110px; } .ix-tab { font-size: 10.5px; } }

.ix-bird { width: 112px; height: auto; top: 14px; right: 10px; }
@media (max-width: 360px) { .ix-bird { width: 96px; } }

/* ส่วนหัวให้ตรงแบบ A (ไม่มีแถบบน) */
.ix-hero { padding: 16px 16px 72px; }
.ix-top { position: relative; z-index: 2; display: flex; align-items: center; gap: 10px; }
.ix-top img { width: 30px; height: auto; filter: drop-shadow(0 2px 6px rgba(255, 213, 79, .35)); }
.ix-top div { flex: 1; min-width: 0; }
.ix-top b { display: block; font-size: 15px; font-weight: 700; letter-spacing: .5px; }
.ix-top small { display: block; font-size: 10.5px; opacity: .72; }
.ix-login { flex: none; background: var(--gold2); color: var(--navy) !important; font-weight: 700; font-size: 13px; border-radius: 99px; padding: 7px 16px; box-shadow: 0 4px 12px rgba(255, 213, 79, .35); transition: transform .15s; }
.ix-login:active { transform: scale(.95); }
.ix-bell { position: relative; flex: none; width: 38px; height: 38px; border-radius: 12px; background: rgba(255, 255, 255, .12); display: grid; place-items: center; color: var(--gold2) !important; }
.ix-bell svg { width: 20px; height: 20px; }
.ix-bell i { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 99px; background: #e0455a; color: #fff; font-size: 10.5px; font-weight: 700; font-style: normal; line-height: 18px; text-align: center; border: 2px solid #0b1e3f; box-sizing: content-box; }
.ix-hero h2 { margin-top: 22px; }
.ix-bird { width: 118px; top: 58px; right: 8px; }
@media (max-width: 360px) { .ix-bird { width: 100px; top: 64px; } }
/* นกด้านขวาให้เล็กลง */
.ix-bird { width: 84px; top: 70px; right: 14px; }
@media (max-width: 360px) { .ix-bird { width: 72px; top: 74px; } }

/* ขยับนกไปทางซ้าย */
.ix-bird { right: 40px; }
@media (max-width: 360px) { .ix-bird { right: 28px; } }

/* ===== แผงนักเรียน (includes/index_student.php) — ixs- ===== */
.ixs-top { display: flex; align-items: center; gap: 10px; padding: 12px 16px; color: #fff; background: radial-gradient(120% 140% at 85% 0%, #3b4f99 0%, #0b1e3f 60%, #081530 100%); }
.ixs-top img { width: 28px; height: auto; }
.ixs-top b { display: block; font-size: 14.5px; letter-spacing: .5px; }
.ixs-top small { font-size: 10.5px; opacity: .72; }
.ixs-banner { display: block; width: 100%; height: auto; }
.ixs .ix-tabs.box-con-01 { margin-top: -18px; position: sticky; }
.ixs-cat { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 12px; }
.ixs-cat a { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; padding: 10px 2px; border-radius: 14px; background: #f7f8fb; transition: transform .15s; }
.ixs-cat a:active { transform: scale(.95); }
.ixs-cat .ic { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; margin-bottom: 4px; }
.ixs-cat .ic svg { width: 22px; height: 22px; }
.ixs-cat .l { font-size: 11px; color: var(--mut); line-height: 1.3; }
.ixs-cat b { font-size: 12.5px; }
.ixs .c1 { background: #e9f9ec; color: #18a058; } .ixs .c2 { background: #e5f6fd; color: #1f8fcf; } .ixs .c3 { background: #f3eeff; color: #7b5cd6; } .ixs .c4 { background: #fff1e3; color: #e07b16; }
.ixs .c5 { background: #ffeef3; color: #e0456f; } .ixs .c6 { background: #e6f8f5; color: #12968a; } .ixs .c7 { background: #eef1ff; color: #3d5af1; } .ixs .c8 { background: #eff1f5; color: #56627a; }
.ixs-coin { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; color: #d08f12; font-size: 12.5px; white-space: nowrap; }
.ixs-coin i { width: 13px; height: 13px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #ffe58a, #d9a93c); box-shadow: inset 0 0 0 1.5px #b9862a; }
.ixs-pod { display: flex; align-items: flex-end; gap: 8px; margin: 14px 14px 0; }
.ixs-pod a { flex: 1; min-width: 0; position: relative; text-align: center; background: #fff; border-radius: 18px; padding: 16px 6px 12px; box-shadow: 0 2px 10px rgba(11, 30, 63, .06); animation: ixUp .5s ease both; }
.ixs-pod a.mid { padding-top: 24px; background: linear-gradient(180deg, #fff8e1, #fff); box-shadow: 0 8px 20px rgba(217, 169, 60, .2); }
.ixs-pod .av { display: block; width: 56px; height: 56px; border-radius: 50%; object-fit: cover; margin: 0 auto 6px; border: 3px solid var(--rk); }
.ixs-pod a.mid .av { width: 70px; height: 70px; }
.ixs-pod .rk { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; color: #fff; background: var(--rk); box-shadow: 0 3px 8px rgba(0, 0, 0, .2); }
.ixs-pod b { display: block; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ixs-pod small { display: block; font-size: 10.5px; color: var(--mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 4px; }
.ixs-list { margin-top: 10px; }
.ixs-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.ixs-row:last-child { border-bottom: 0; }
.ixs-row .n { width: 22px; text-align: center; font-weight: 800; color: #a0a9bd; flex: none; }
.ixs-row .av { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; }
.ixs-row .t { flex: 1; min-width: 0; }
.ixs-row .t b { display: block; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ixs-row .t small { display: block; font-size: 11px; color: var(--mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ixs-don { position: relative; overflow: hidden; display: flex; align-items: center; gap: 12px; margin: 22px 14px 0; border-radius: 22px; padding: 16px; color: #fff !important; background: linear-gradient(120deg, #0b1e3f, #2a3f78 60%, #7b5cd6); box-shadow: 0 10px 24px rgba(42, 63, 120, .25); }
.ixs-don::after { content: ""; position: absolute; right: -30px; top: -30px; width: 140px; height: 140px; border-radius: 50%; background: rgba(255, 213, 79, .2); }
.ixs-don img { position: relative; z-index: 1; width: 88px; height: auto; flex: none; animation: ixsShake 2.5s infinite; }
.ixs-don div { position: relative; z-index: 1; }
.ixs-don small { display: block; font-size: 11.5px; opacity: .8; }
.ixs-don strong { font-size: 28px; font-weight: 800; color: var(--gold2); }
.ixs-don em { font-style: normal; font-size: 12.5px; margin-left: 5px; opacity: .85; }
.ixs-live { display: inline-flex; align-items: center; gap: 5px; background: #ffeef0; color: #e0455a; font-size: 10.5px; font-weight: 700; border-radius: 99px; padding: 2px 9px; vertical-align: middle; }
.ixs-live i { width: 7px; height: 7px; border-radius: 50%; background: #e0455a; animation: ixsBlink 1.2s infinite; }
.ixs .ix-sec b:has(.ixs-live) { align-items: center; }
.ixs-af.af { margin: 0 14px; }
.ixs-champs { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; padding: 2px 14px 6px; }
.ixs-champs::-webkit-scrollbar { display: none; }
.ixs-champ { flex: 0 0 150px; background: #fff; border-radius: 18px; overflow: hidden; box-shadow: 0 2px 8px rgba(11, 30, 63, .06); text-align: center; padding-bottom: 12px; }
.ixs-champ .tg { display: flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; color: #fff; padding: 6px 10px; text-align: left; }
.ixs-champ .tg svg { width: 14px; height: 14px; }
.ixs-champ .av { display: block; width: 62px; height: 62px; border-radius: 50%; object-fit: cover; margin: 12px auto 6px; border: 3px solid #fff; box-shadow: 0 0 0 2px var(--gold); }
.ixs-champ b { display: block; font-size: 12.5px; padding: 0 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ixs-champ small { display: block; font-size: 10.5px; color: var(--mut); padding: 0 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ixs-champ .v { display: block; font-size: 17px; font-weight: 800; margin-top: 6px; }
.ixs-champ .v em { font-style: normal; font-size: 11px; font-weight: 500; color: var(--mut); }
.ixs-cta { margin-top: 20px; padding: 16px; }
.ixs-cta > b { font-size: 16px; }
.ixs-cta p { font-size: 12.5px; color: var(--mut); margin: 4px 0 10px; }
.ixs-cta ul { list-style: none; margin: 0; padding: 0; }
.ixs-cta li { display: flex; gap: 8px; font-size: 13px; margin: 7px 0; }
.ixs-cta li svg { width: 17px; height: 17px; color: #18a058; stroke-width: 2.8; }
.ixs-btn { display: block; text-align: center; margin-top: 14px; border-radius: 14px; padding: 12px; font-weight: 700; font-size: 14px; background: linear-gradient(90deg, #d9a93c, #f3cf6a); color: var(--navy) !important; box-shadow: 0 6px 14px rgba(217, 169, 60, .3); }
@keyframes ixsShake { 0%, 80%, 100% { transform: none; } 84% { transform: rotate(-6deg); } 88% { transform: rotate(6deg); } 92% { transform: rotate(-4deg); } }
@keyframes ixsBlink { 50% { opacity: .25; } }
/* Top 10 แบบ A: เวทีแท่นรางวัล */
.ixs-hd b { flex-direction: column; align-items: flex-start !important; gap: 0 !important; white-space: nowrap; }
.ixs-hd b small { display: block; }
.ixs-stage { position: relative; overflow: hidden; margin: 0 14px; border-radius: 24px; padding: 14px 10px 0; color: #fff; background: radial-gradient(120% 90% at 50% 0%, #3b4f99 0%, #0b1e3f 60%, #081530 100%); box-shadow: 0 10px 24px rgba(11, 30, 63, .22); }
.ixs-stage::before { content: ""; position: absolute; left: 50%; top: -50px; width: 280px; height: 280px; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(circle, rgba(255, 213, 79, .35), transparent 65%); pointer-events: none; }
.ixs-per { position: relative; display: flex; justify-content: center; gap: 6px; margin-bottom: 14px; }
.ixs-per button { border: 0; font: inherit; font-size: 12px; color: #fff; padding: 5px 13px; border-radius: 99px; background: rgba(255, 255, 255, .12); cursor: pointer; transition: background .2s, color .2s; }
.ixs-per button.on { background: var(--gold2); color: var(--navy); font-weight: 700; }
.ixs-podium { position: relative; display: flex; align-items: flex-end; gap: 6px; min-height: 120px; }
.ixs-podium.in > a { animation: ixUp .4s ease both; }
.ixs-podium > a { flex: 1; min-width: 0; text-align: center; color: #fff !important; }
.ixs-podium .av { display: block; width: 58px; height: 58px; border-radius: 50%; object-fit: cover; margin: 0 auto 6px; border: 3px solid var(--c); box-shadow: 0 0 0 4px rgba(255, 255, 255, .08); background: #1c4fd6; }
.ixs-podium .mid .av { width: 76px; height: 76px; box-shadow: 0 0 0 5px rgba(255, 213, 79, .25), 0 8px 24px rgba(255, 213, 79, .35); }
.ixs-podium .crown { display: block; margin: 0 auto -4px; width: 30px; height: 24px; animation: ixFloat 2.8s ease-in-out infinite; }
.ixs-podium .crown svg { width: 30px; height: 24px; fill: var(--gold2); stroke: #b9862a; stroke-width: 1.2; }
.ixs-podium b { display: block; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ixs-podium small { display: block; font-size: 10px; opacity: .7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ixs-podium .ixs-coin { color: var(--gold2); font-size: 12.5px; margin: 4px 0 8px; }
.ixs-podium .step { display: grid; place-items: center; border-radius: 12px 12px 0 0; font-size: 26px; font-weight: 800; color: rgba(255, 255, 255, .92); background: linear-gradient(180deg, var(--c), color-mix(in srgb, var(--c) 55%, #0b1e3f)); }
.ixs-podium .s1 .step { height: 92px; } .ixs-podium .s2 .step { height: 66px; } .ixs-podium .s3 .step { height: 50px; }
.ixs-none { width: 100%; text-align: center; font-size: 13px; opacity: .75; margin: 30px 0; }
.ixs-list.in { animation: ixUp .35s ease both; }
.ixs-row .bar { display: block; height: 5px; border-radius: 99px; background: #f1f3f8; margin-top: 5px; overflow: hidden; }
.ixs-row .bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #ffd54f, #d9a93c); }
.ixs [data-per-box][hidden] { display: none !important; }
/* จำนวน LSP: ตัวเลข + โลโก้ LSP (ไม่โดนตัด) */
.ixs-coin { flex: none; gap: 3px; }
.ixs-coin .lsp-ic { width: 18px; height: 18px; object-fit: contain; }
.ixs-podium .ixs-coin { justify-content: center; }
.ixs-podium .ixs-coin .lsp-ic { width: 17px; height: 17px; }
.ixs-row { min-width: 0; }

/* ===== แผงคุณครู (includes/index_teacher.php) — ixt- ===== */
.ixt [data-tper-box][hidden] { display: none !important; }
.ixt-tier { display: inline-block; font-size: 9.5px; font-weight: 700; border-radius: 6px; padding: 1px 6px; margin-left: 4px; background: linear-gradient(90deg, #d9a93c, #f3cf6a); color: #4a3200; vertical-align: 1px; }
.ixt-earn { margin: 0 14px; border-radius: 20px; padding: 4px 14px; background: linear-gradient(135deg, #e7f8ef, #fff 60%); box-shadow: 0 2px 8px rgba(11, 30, 63, .05); }
.ixt-earn .ixs-row { border-color: rgba(24, 160, 88, .12); }
.ixs-row .bar.g i { background: linear-gradient(90deg, #55c48a, #18a058); }
.ixs-coin.g { color: #18a058; }

/* ===== แผงสปอนเซอร์ (includes/index_sponsor.php) — ixp- ===== */
.ixp-camps { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 2px 14px 8px; }
.ixp-camps::-webkit-scrollbar { display: none; }
.ixp-camp { flex: 0 0 86%; scroll-snap-align: center; display: flex; flex-direction: column; background: #fff; border-radius: 22px; overflow: hidden; box-shadow: 0 4px 14px rgba(11, 30, 63, .08); }
.ixp-camp .cv { position: relative; display: block; height: 150px; background: #e8eef9; }
.ixp-camp .cv img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ixp-camp .cv em { position: absolute; left: 12px; top: 12px; font-style: normal; font-size: 11px; font-weight: 700; background: #18a058; color: #fff; border-radius: 99px; padding: 3px 10px; }
.ixp-camp .cv em.end { background: #6b7690; }
.ixp-camp .bd { display: flex; flex-direction: column; gap: 4px; padding: 14px; }
.ixp-camp .bd > b { font-size: 15px; line-height: 1.35; }
.ixp-camp .org { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--mut); }
.ixp-camp .org img { width: 22px; height: 22px; border-radius: 6px; object-fit: contain; border: 1px solid var(--line); background: #fff; }
.ixp-camp .ds { font-size: 12.5px; color: #4a5872; line-height: 1.55; }
.ixp-camp .meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 11.5px; color: var(--mut); margin-top: 2px; }
.ixp-camp .meta span { display: flex; align-items: center; gap: 4px; }
.ixp-camp .meta svg { width: 14px; height: 14px; }
.ixp-camp .pg { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--mut); margin-top: 6px; }
.ixp-camp .prog { display: block; height: 10px; border-radius: 99px; background: #eef0f6; overflow: hidden; }
.ixp-camp .prog i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #ffd54f, #d9a93c); }
.ixp-camp .val { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--mut); margin-top: 4px; }
.ixp-dots { display: flex; justify-content: center; gap: 5px; margin-top: 2px; }
.ixp-dots i { width: 6px; height: 6px; border-radius: 99px; background: #cfd5e1; transition: width .3s, background .3s; }
.ixp-dots i.on { width: 18px; background: #7b5cd6; }
.ixp-st4 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px; margin-top: 14px; }
.ixp-st4 > div { border-radius: 14px; padding: 10px; background: #f7f8fb; min-width: 0; }
.ixp-st4 .ic { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; margin-bottom: 4px; }
.ixp-st4 .ic svg { width: 16px; height: 16px; }
.ixp-st4 small { display: block; font-size: 11px; color: var(--mut); }
.ixp-st4 b { display: block; font-size: 15px; margin: 1px 0; }
.ixp-st4 b .ixs-coin { color: var(--ink); font-size: 15px; }
.ixs-podium .av.lg, .ixs-row .av.lg { object-fit: contain; background: #fff; border-radius: 16px; padding: 4px; }
.ixs-row .av.lg { border-radius: 12px; border: 1px solid var(--line); }
.ixs-row .t small.w { white-space: normal; }
.ixp-amt { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.ixp-amt small { font-size: 10.5px; color: var(--mut); }
/* ===== แผงองค์กร (includes/index_org.php) — ixo- ===== */
.ixo-cat { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 12px; }
.ixo-cat a { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 1px; padding: 12px 4px 10px; border-radius: 14px; background: #f7f8fb; transition: transform .15s; }
.ixo-cat a:active { transform: scale(.95); }
.ixo-cat .ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 6px; }
.ixo-cat .ic svg { width: 22px; height: 22px; }
.ixo-cat b { font-size: 13px; }
.ixo-cat small { font-size: 11px; color: var(--mut); }

/* ================================================================
   เดสก์ท็อป (จอ ≥ 1024px): ขยาย index.php เป็นหน้าเว็บ + กล่องข้อมูลเพิ่ม
   มือถือ: .ix-grid เป็นบล็อกปกติ เรียงเหมือนเดิม · กล่อง .ixb-dt และเมนู .ix-dnav ซ่อน
   ================================================================ */
.ixb-dt, .ix-dnav { display: none; }
.ix-lsp { display: inline-flex; align-items: center; gap: 3px; font-weight: 700; white-space: nowrap; color: #d08f12; font-size: 12.5px; }
.ix-lsp .lsp-ic { width: 15px; height: 15px; }
.ix-pill { display: inline-block; font-size: 11px; font-weight: 600; border-radius: 6px; padding: 1px 8px; white-space: nowrap; }
.ix-pill.ok { background: #e6f6ec; color: #1f8a4c; } .ix-pill.warn { background: #fff3df; color: #c77c0b; } .ix-pill.bad { background: #fde8ea; color: #d33349; } .ix-pill.mid { background: #eff1f5; color: var(--mut); }
.ix-tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.ix-tbl th { text-align: left; font-weight: 500; font-size: 12px; color: var(--mut); padding: 9px 12px; background: #fafbfd; border-bottom: 1px solid var(--line); }
.ix-tbl td { padding: 9px 12px; border-bottom: 1px solid #f1f3f7; }
.ix-tbl tr:last-child td { border-bottom: 0; }
.ix-tbl tbody tr { cursor: pointer; transition: background .15s; }
.ix-tbl tbody tr:hover { background: #faf8ff; }
.ix-tblw { padding: 0 !important; overflow: hidden; }
.ix-li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid #f1f3f7; font-size: 13px; }
.ix-li:last-child { border-bottom: 0; }
.ix-li:hover b { color: #7b5cd6; }
.ix-li .n { width: 18px; text-align: center; font-weight: 800; color: #a0a9bd; flex: none; }
.ix-li .n1 { color: #e0a92a; } .ix-li .n2 { color: #9aa6bd; } .ix-li .n3 { color: #c47a3c; }
.ix-li img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex: none; background: #e8eef9; }
.ix-li .t { flex: 1; min-width: 0; }
.ix-li .t b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .15s; }
.ix-li .t small { display: block; font-size: 11.5px; color: var(--mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ix-li .pc { width: 44px; height: 34px; border-radius: 9px; background: #e6f8f1; color: #18a874; font-weight: 700; font-size: 12px; display: grid; place-items: center; flex: none; }
.ix-li .bar { display: block; height: 5px; border-radius: 99px; background: #eef0f6; margin-top: 4px; overflow: hidden; }
.ix-li .bar em { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #55c48a, #18a058); }
.ix-li .dt { width: 44px; border-radius: 9px; background: #f3eeff; color: #7b5cd6; text-align: center; padding: 4px 0; flex: none; }
.ix-li .dt b { display: block; font-size: 16px; line-height: 1.1; }
.ix-li .dt small { font-size: 10px; }

@media (min-width: 1024px) {
  .app:has(.ix) { max-width: 1280px; }
  /* หัว */
  .ix-hero { padding: 18px 40px 104px; }
  .ix-top img { width: 34px; }
  .ix-top b { font-size: 17px; }
  .ix-dnav { display: flex; gap: 2px; margin: 0 8px 0 auto; }
  .ix-dnav a { color: rgba(255, 255, 255, .82) !important; font-size: 14px; padding: 7px 12px; border-radius: 10px; transition: background .15s, color .15s; }
  .ix-dnav a:hover { background: rgba(255, 255, 255, .1); color: var(--gold2) !important; }
  .ix-top > div { flex: none; }
  .ix-hero h2 { font-size: 40px; max-width: 60%; margin-top: 40px; }
  .ix-hero p { font-size: 16px; max-width: 60%; }
  .ix-bird { width: 150px; top: 78px; right: 14%; }
  .ix-stats { max-width: 920px; margin: -58px auto 0; padding: 18px 8px; }
  .ix-stats strong { font-size: 26px; }
  .ix-stats span { font-size: 13px; }
  .ix-tabs.box-con-01 { max-width: 920px; margin: 16px auto 0; }
  .ix-tab { flex-direction: row; justify-content: center; gap: 8px; font-size: 14px; padding: 10px 0; }
  /* ตาราง 12 คอลัมน์ */
  .ix-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 20px 18px; grid-auto-flow: row dense; align-items: start; padding: 22px 24px 0; }
  .ixb { min-width: 0; }
  .ixb-dt { display: block; }
  .ixb-top1, .ixb-spons, .ixb-ads, .ixb-dtsch { grid-column: span 8; }
  .ixb-live { grid-column: 9 / 13; grid-row: 1 / span 3; position: sticky; top: 16px; }
  .ixb-fund, .ixb-dtstu, .ixb-dttch, .ixb-dtproj { grid-column: span 4; }
  .ixb-news, .ixb-dtev { grid-column: span 6; }
  .ixb-mats, .ixb-start { grid-column: 1 / -1; }
  .ixb-start:empty { display: none; }
  .ix-grid .ix-sec { margin: 0 2px 10px; }
  .ix-grid .ix-card, .ix-grid .ix-pod, .ix-grid .ix-ads, .ix-grid .ix-af.af, .ix-grid .ix-fund { margin-left: 0; margin-right: 0; }
  .ix-grid .ix-card { padding: 6px 16px; }
  .ix-grid .ix-ads, .ix-grid .ix-af.af, .ix-grid .ix-fund { margin-top: 0; }
  .ix-grid .ix-sp { padding: 4px 2px; gap: 22px; overflow: visible; flex-wrap: wrap; }
  .ix-grid .ix-sp a { width: 84px; }
  .ix-grid .ix-sp .av { width: 66px; height: 66px; }
  .ix-grid .ix-pod { gap: 14px; }
  .ix-grid .ix-pod a { padding: 20px 10px 16px; transition: transform .2s, box-shadow .2s; }
  .ix-grid .ix-pod a:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(11, 30, 63, .12); }
  .ix-grid .ix-pod .av { width: 72px; height: 72px; }
  .ix-grid .ix-pod a.mid .av { width: 88px; height: 88px; }
  .ix-grid .ix-pod b { font-size: 14px; }
  .ix-grid .ix-ads .ads-slider, .ix-grid .ix-ads img { border-radius: 16px; }
  .ix-grid .ix-fund { min-height: 168px; }
  .ix-grid .ix-news img { width: 120px; height: 80px; }
  .ix-grid .ix-mats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; overflow: visible; padding: 0; }
  .ix-grid .ix-mats .item-con-1 { flex: none; width: auto; transition: transform .2s, box-shadow .2s; }
  .ix-grid .ix-mats .item-con-1:hover { transform: translateY(-4px); box-shadow: 0 10px 24px rgba(11, 30, 63, .12); }
  .ix-grid .ix-start { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; align-items: center; margin: 0; padding: 18px; }
  .ix-grid .ix-start .ix-roles { grid-template-columns: repeat(4, 1fr); grid-row: span 2; }
  .ix-grid .ix-start .ix-btn { margin: 0; }

  /* แท็บอื่น (นักเรียน/ครู/สปอนเซอร์/องค์กร): จัดกึ่งกลาง ไม่ยืดเต็มจอ */

  .ixs > :not(.ixs-bnr):not(.ixh):not(script) { max-width: 980px; margin-left: auto !important; margin-right: auto !important; }
  .ixs .ix-tabs.box-con-01 { max-width: 920px; }
  .ixs-cat { grid-template-columns: repeat(8, 1fr); }
  .ixo-cat { grid-template-columns: repeat(6, 1fr); }
  .ixs-champs, .ixp-camps { padding-left: 0; padding-right: 0; }
  .ixp-camp { flex-basis: calc(50% - 6px); }
  .ixs-stage { padding: 18px 40px 0; }
  .ixs-podium .av { width: 72px; height: 72px; }
  .ixs-podium .mid .av { width: 92px; height: 92px; }
  .ixp-st4 { grid-template-columns: repeat(4, 1fr); }
}
/* แท็บเล็ต 768–1023px: เมนูล่างถูกซ่อน → แสดงลิงก์เมนูในส่วนหัวแทน */
@media (min-width: 768px) and (max-width: 1023px) {
  .ix-dnav { display: flex; flex-wrap: wrap; gap: 2px; margin: 0 6px 0 auto; }
  .ix-dnav a { color: rgba(255, 255, 255, .85) !important; font-size: 12.5px; padding: 5px 8px; border-radius: 8px; }
  .ix-top > div { flex: none; }
}
/* ส่วนเริ่มต้นใช้งานว่าง (ล็อกอินแล้ว) ไม่ต้องกินพื้นที่ */
.ixb-start:not(:has(*)) { display: none; }

/* ===== แก้เลย์เอาต์เดสก์ท็อป: 2 คอลัมน์อิสระ (ซ้าย .ix-colm เนื้อหาหลัก · ขวา .ix-cols แถบข้าง) แทนตาราง 12 ช่องที่ทำให้ LIVE ทับ ===== */
/* มือถือ: ตัวห่อคอลัมน์ไม่มีกล่อง (display:contents) แล้วเรียงด้วย order ให้เหมือนเดิม */
.ix-grid { display: flex; flex-direction: column; }
.ix-colm, .ix-cols { display: contents; }
.ixb-top1 { order: 1; } .ixb-spons { order: 2; } .ixb-ads { order: 3; } .ixb-live { order: 4; } .ixb-fund { order: 5; }
.ixb-dtsch { order: 6; } .ixb-dtstu { order: 7; } .ixb-dttch { order: 8; } .ixb-dtproj { order: 9; }
.ixb-news { order: 10; } .ixb-dtev { order: 11; } .ixb-mats { order: 12; } .ixb-start { order: 13; }
/* 2026-10-31 มือถือ: แสดง "ทุนการศึกษาที่เปิดรับ" (การ์ดมีรูป .ix-schm แทนตาราง) + "กิจกรรมเปิดรับสมัคร" (ผู้ใช้: ขาดกิจกรรมที่รับสมัครกับทุน / ต้องมีภาพ) */
.ix-schm { display: none; }
.ix-thl { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid #f1f3f7; color: inherit; }
.ix-thl:last-child { border-bottom: 0; }
.ix-thl img { width: 86px; height: 86px; border-radius: 14px; object-fit: cover; flex: none; background: #eef1f8; }
.ix-thl .t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ix-thl b { font-size: 14px; font-weight: 700; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ix-thl small { font-size: 12px; color: var(--mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ix-thl .ft { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; }
.ix-evi .th { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; flex: none; background: #eef1f8; }
@media (max-width: 1023px) {
  .ixb-dtsch, .ixb-dtev { display: block; }
  .ixb-dtsch .ix-tblw { display: none; }
  .ixb-dtsch .ix-schm { display: block; }
}
@media (min-width: 1024px) {
  .ix-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; grid-auto-flow: row; gap: 20px; align-items: start; }
  .ix-colm, .ix-cols { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
  .ix-grid .ixb { grid-column: auto; grid-row: auto; position: static; order: 0; }
  .ix-grid .ixb-start { grid-column: 1 / -1; }
  .ix-grid .ix-fund { min-height: 0; }
  .ix-grid .ix-mats { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .ix-grid .ix-af.af { margin: 0; }
}
/* ================================================================
   เดสก์ท็อป แบบ A "เรียบหรู 2 คอลัมน์" (desktop_v2_preview.html) — 2026-10-09
   มือถือ: ซ่อนชิ้นส่วนเฉพาะเดสก์ท็อป · .ix-two ไม่มีกล่อง
   ================================================================ */
.ix-kick, .ix-hbtns, .ix-glass, .ix-me, .ix-pod-dt, .ix-hic { display: none; }
.ix-two { display: contents; }
@media (min-width: 1024px) {
  /* หัว */
  .ix-hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); grid-template-areas: "top top" "kick glass" "h glass" "p glass" "btn glass"; column-gap: 48px; align-items: start; padding: 0 44px 84px; }
  .ix-hero::before { right: 12%; top: -140px; width: 540px; height: 540px; background: radial-gradient(circle, rgba(255, 213, 79, .26), transparent 62%); }
  .ix-top { grid-area: top; height: 74px; margin-bottom: 26px; }
  .ix-kick { grid-area: kick; display: inline-block; justify-self: start; font-size: 12px; letter-spacing: 1px; color: var(--gold2); border: 1px solid rgba(255, 213, 79, .35); border-radius: 99px; padding: 4px 12px; position: relative; }
  .ix-hero h2 { grid-area: h; font-size: 46px; line-height: 1.2; margin: 14px 0 10px; max-width: none; }
  .ix-hero p { grid-area: p; font-size: 16px; max-width: none; margin: 0 0 22px; }
  .ix-bird { display: none; }
  .ix-hbtns { grid-area: btn; display: flex; gap: 10px; position: relative; z-index: 1; }
  .ix-hbtns a { display: inline-flex; align-items: center; gap: 4px; border-radius: 12px; padding: 12px 22px; font-weight: 700; font-size: 14px; transition: transform .15s; }
  .ix-hbtns a:hover { transform: translateY(-2px); }
  .ix-hbtns svg { width: 16px; height: 16px; stroke-width: 2.4; }
  .ix-hbtns .g { background: linear-gradient(90deg, #d9a93c, #f3cf6a); color: var(--navy) !important; box-shadow: 0 8px 20px rgba(217, 169, 60, .35); }
  .ix-hbtns .o { border: 1.5px solid rgba(255, 255, 255, .35); color: #fff !important; }
  .ix-glass { grid-area: glass; display: block; align-self: center; position: relative; z-index: 1; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .14); backdrop-filter: blur(8px); border-radius: 22px; padding: 22px; margin-top: 20px; }
  .ix-glass img { position: absolute; right: 20px; top: -64px; width: 104px; height: auto; filter: drop-shadow(0 12px 30px rgba(255, 213, 79, .4)); animation: ixFloat 4s ease-in-out infinite; }
  .ix-glass small { font-size: 12.5px; opacity: .72; }
  .ix-glass strong { display: block; font-size: 34px; font-weight: 800; color: var(--gold2); margin: 2px 0 14px; }
  .ix-glass .g4 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .ix-glass .g4 div { background: rgba(255, 255, 255, .06); border-radius: 14px; padding: 12px 14px; }
  .ix-glass .g4 b { display: block; font-size: 21px; }
  .ix-glass .g4 span { font-size: 12px; opacity: .75; }
  .ix-me { display: flex; align-items: center; gap: 8px; color: #fff !important; font-size: 13px; margin-left: 4px; }
  .ix-me img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; border: 2px solid var(--gold2); }
  .ix-stats { display: none; }
  .ix-tabs.box-con-01 { max-width: 760px; margin: -28px auto 0; position: relative; z-index: 3; box-shadow: 0 10px 30px rgba(11, 30, 63, .14); }

  /* การ์ด */
  .ix-grid { padding: 30px 32px 0; gap: 22px; }
  .ix-colm, .ix-cols { gap: 22px; }
  .ix-colm .ixb-top1 { order: 1; } .ix-colm .ixb-ads { order: 2; } .ix-colm .ixb-dtsch { order: 3; } .ix-colm .ix-two { order: 4; } .ix-colm .ixb-mats { order: 5; }
  .ix-two { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
  .ix-grid .ixb:not(.ixb-ads):not(.ixb-fund):not(.ixb-live):not(.ixb-start) { background: #fff; border: 1px solid #edf0f5; border-radius: 18px; padding: 18px 20px; box-shadow: 0 2px 10px rgba(11, 30, 63, .04); }
  .ix-grid .ixb .ix-card { background: none; box-shadow: none; border: 0; border-radius: 0; padding: 0; margin: 0; }
  .ix-grid .ix-sec { margin: 0 0 12px; align-items: center; }
  .ix-grid .ix-sec b { align-items: center; gap: 10px; font-size: 16px; }
  .ix-hic { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; flex: none; }
  .ix-hic svg { width: 18px; height: 18px; }
  .ix .p1 { background: #eef1ff; color: #3d5af1; } .ix .p2 { background: #f3eeff; color: #7b5cd6; } .ix .p3 { background: #fff6e2; color: #d08f12; } .ix .p4 { background: #e6f8f1; color: #18a874; }
  .ix .p5 { background: #ffeef0; color: #e0455a; } .ix .p6 { background: #e8f5ff; color: #2a95e6; } .ix .p7 { background: #ffeef7; color: #d84f97; }
  /* Top 1: 4 การ์ดเท่ากัน */
  .ix-grid .ix-pod { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-items: stretch; }
  .ix-grid .ix-pod a, .ix-grid .ix-pod a.mid { padding: 16px 10px; background: linear-gradient(180deg, #fffaf0, #fff); border: 1px solid #f4e8c8; box-shadow: none; border-radius: 16px; }
  .ix-grid .ix-pod .crown { display: none; }
  .ix-grid .ix-pod .av, .ix-grid .ix-pod a.mid .av { width: 64px; height: 64px; }
  .ix-pod-dt { display: block; text-align: center; animation: ixUp .5s ease both; }
  /* ทุน: ตารางชิดขอบการ์ด */
  .ix-grid .ixb-dtsch { padding: 18px 0 6px !important; }
  .ix-grid .ixb-dtsch .ix-sec { padding: 0 20px; }
  .ix-grid .ix-tbl th:first-child, .ix-grid .ix-tbl td:first-child { padding-left: 20px; }
  .ix-grid .ix-tbl th { background: none; }
  /* ผู้สนับสนุน */
  .ix-grid .ix-sp { gap: 20px; padding: 4px 0; }
  .ix-grid .ix-sp a { width: 86px; }
  .ix-grid .ix-sp .av { width: 66px; height: 66px; object-fit: contain; background: #fff; }
  /* โฆษณา / ยอดทุน / LIVE */
  .ix-grid .ix-ads { margin: 0; border-radius: 18px; }
  .ix-grid .ix-fund { margin: 0; border-radius: 18px; padding: 20px; }
  .ix-grid .ix-af.af { margin: 0; border-radius: 18px; }
  .ix-grid .ix-mats { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
/* แก้ให้ตรงแบบ A: ส่วนหัวน้ำเงินกว้างเต็มจอ (เนื้อหาข้างในยังกว้าง 1280 กึ่งกลาง) */
@media (min-width: 1024px) {
  body:has(.ix) { overflow-x: hidden; }
  .ix-hero { margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); padding-left: max(44px, calc(50vw - 640px + 44px)); padding-right: max(44px, calc(50vw - 640px + 44px)); }
  .ix-hero::before { right: max(12%, calc(50vw - 640px + 120px)); }
  .ix-hero::after { content: ""; position: absolute; left: max(-120px, calc(50vw - 900px)); bottom: -200px; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(circle, rgba(123, 92, 214, .22), transparent 65%); pointer-events: none; }
}
/* ส่วนท้ายเว็บแบบ A (เฉพาะหน้าแรกบนเดสก์ท็อป): พื้นน้ำเงินเต็มจอ 5 คอลัมน์ */
.ft-cols { display: none; }
@media (min-width: 1024px) {
  .app:has(.ix) .site-footer { margin: 40px calc(50% - 50vw) 0; padding: 36px max(44px, calc(50vw - 640px + 44px)) 18px; background: #0b1e3f; color: #9aa6c4; text-align: left; border: 0; font-size: 13px; }
  .app:has(.ix) .site-footer > :not(.ft-cols):not(.copyright) { display: none; }
  .app:has(.ix) .ft-cols { display: grid; grid-template-columns: 2fr repeat(4, 1fr); gap: 28px; }
  .app:has(.ix) .ft-cols b { display: block; color: #fff; font-size: 14px; margin-bottom: 10px; }
  .app:has(.ix) .ft-cols a { display: block; color: #9aa6c4; margin: 7px 0; transition: color .15s; }
  .app:has(.ix) .ft-cols a:hover { color: var(--gold2, #ffd54f); }
  .app:has(.ix) .ft-brand { display: flex; gap: 12px; align-items: flex-start; }
  .app:has(.ix) .ft-brand img { width: 34px; height: auto; }
  .app:has(.ix) .ft-brand b { font-size: 17px; letter-spacing: .6px; margin: 2px 0 0; }
  .app:has(.ix) .ft-brand small { display: block; font-size: 11px; letter-spacing: 1px; opacity: .7; }
  .app:has(.ix) .ft-brand { flex-wrap: wrap; }
  .app:has(.ix) .ft-brand p { flex-basis: 100%; margin: 6px 0 0; line-height: 1.7; }
  .app:has(.ix) .site-footer .copyright { margin-top: 24px; padding-top: 14px; border-top: 1px solid #1f2d55; color: #9aa6c4; opacity: .75; font-size: 12px; text-align: left; }
}
/* กล่องครอบทุกแท็บใน index.php มีพื้นขาว (style="background:#fff") → โผล่เป็นแถบขาวก่อนส่วนท้าย บนเดสก์ท็อปให้โปร่งใส */
@media (min-width: 1024px) {
  .app:has(.ix) > div[style*="background"] { background: transparent !important; }
  .app:has(.ix) .ix { padding-bottom: 0; }
  .app:has(.ix) .ix > div[style*="height:16px"] { display: none; }
}

/* ===== หัวแท็บนักเรียน/ครู/สปอนเซอร์/องค์กร =====
   มือถือ: รูปแบนเนอร์ .ixs-bnr (642×458) เต็มความกว้าง
   แท็บเล็ต 768–1023: รูปเต็มใบกึ่งกลาง บนแถบรูปเดียวกันเบลอ (ไม่ยืด/ไม่ตัด)
   เดสก์ท็อป ≥1024: ซ่อนรูป ใช้หัวน้ำเงิน-ทองแบบหน้าหลัก (.ix-hero.ixh จาก includes/index_tab_hero.php) */
.ixs-bnr { position: relative; }
.ixh { display: none !important; }
@media (min-width: 768px) and (max-width: 1023px) {
  .ixs-bnr { overflow: hidden; background: #0b1e3f; padding: 24px 16px 40px; }
  .ixs-bnr::before { content: ''; position: absolute; inset: -40px; background: var(--bn) center / cover no-repeat; filter: blur(30px) brightness(.5) saturate(1.25); }
  .ixs-bnr .ixs-banner { position: relative; z-index: 1; width: auto; max-width: 100%; height: 340px; margin: 0 auto; border-radius: 18px; box-shadow: 0 18px 44px rgba(0, 0, 0, .4), 0 0 0 1px rgba(255, 213, 79, .35); }
  .ixs .ixs-bnr + .ix-tabs.box-con-01 { margin-top: -22px !important; z-index: 3; }
}
@media (min-width: 1024px) {
  .ixs-bnr { display: none; }
  .ixh { display: grid !important; grid-template-areas: "top top" ". glass" "kick glass" "h glass" "p glass" "btn glass" ". glass"; grid-template-rows: auto 1fr auto auto auto auto 1fr; }
  .ixs .ixh + .ix-tabs.box-con-01 { max-width: 760px; margin-top: -28px !important; position: relative; z-index: 3; box-shadow: 0 10px 30px rgba(11, 30, 63, .14); }
  .ixh-glass { padding: 22px 22px 20px; }
  .ixh-glass img { position: static; animation: none; filter: none; width: auto; }
  .ixh-who { display: flex; align-items: center; gap: 14px; margin: 10px 0 16px; padding: 12px 14px; border-radius: 16px; background: linear-gradient(90deg, rgba(255, 213, 79, .16), rgba(255, 255, 255, .04)); border: 1px solid rgba(255, 213, 79, .3); color: #fff !important; transition: transform .15s; }
  .ixh-who:hover { transform: translateY(-2px); }
  .ixh-glass .ixh-who img { width: 58px; height: 58px; border-radius: 50%; object-fit: cover; flex: none; background: #fff; border: 2px solid var(--gold2); box-shadow: 0 0 0 4px rgba(255, 213, 79, .18); }
  .ixh-who span { flex: 1; min-width: 0; }
  .ixh-who b { display: block; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ixh-who i { display: block; font-style: normal; font-size: 12.5px; opacity: .72; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ixh-who em { flex: none; font-style: normal; font-weight: 800; font-size: 15px; color: var(--navy); background: linear-gradient(135deg, #f3cf6a, #d9a93c); border-radius: 99px; padding: 5px 12px; }
  .ixh-blb { display: block; font-size: 12.5px; opacity: .72; }
  .ixh-glass strong { display: flex; align-items: center; gap: 8px; margin: 2px 0 14px; }
  .ixh-glass strong img { width: 30px; height: 30px; }
}
/* 2026-10-16 สื่อการสอนหน้าแรก: การ์ด .sr-mcard แบบ search.php · 3×3 (9 รายการ) + ปุ่มดูทั้งหมด */
.ix-mg.sr-grid { display: grid; padding: 2px 16px 4px; }
.ix-mg .sr-mcv svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; opacity: .92; }
.ix-mg .sr-tag svg { width: 9px; height: 9px; fill: currentColor; stroke: none; }
.ix-mg-all { display: flex; align-items: center; justify-content: center; gap: 2px; margin: 10px 16px 4px; height: 40px; border-radius: 12px; background: #f3f0ff; color: #7b5cd6; font-size: 13px; font-weight: 700; }
.ix-mg-all svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; }
@media (min-width: 1024px) { .ix-grid .ix-mg.sr-grid { padding: 0; } .ix-grid .ix-mg-all { margin: 12px 0 0; } }
@media (min-width: 768px) { .ix-mg.sr-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 12px; } .ix-mg .sr-mt { font-size: 13px; height: 35px; } .ix-mg .sr-mp b { font-size: 15px; } }
/* 2026-10-16 มือถือ/แท็บเล็ต: สื่อการสอน ขึ้นก่อนการ์ด "ทุนการศึกษาบนแพลตฟอร์ม" (order 5 เท่ากัน → สื่ออยู่ก่อนตามลำดับ HTML) */
@media (max-width: 1023px) { .ixb-mats { order: 5; } }

/* ===== แท็บกระจกใส (ต่อจากแบบ A · mockup_glass_tabs.html) 2026-10-23 — svg เดิมเป็นปุ่มกลมกระจก ไม่ต้องแก้ PHP
   มือถือ: กระจกใสบนพื้นอ่อน ตัวหนังสือน้ำเงิน · คอม ≥1024: ยกแถบขึ้นไปลอยบนหัวสีน้ำเงินทั้งแถบ ตัวหนังสือขาว ===== */
body .ix-tabs.box-con-01 { padding: 8px 6px; border-radius: 24px; background: linear-gradient(180deg, rgba(255, 255, 255, .38), rgba(255, 255, 255, .12)); border: 1px solid rgba(255, 255, 255, .75); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .95), inset 0 -1px 0 rgba(11, 30, 63, .05), 0 8px 24px rgba(11, 30, 63, .12) !important; -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%); }
body .ix-tabs .ix-tab { gap: 4px; padding: 0; background: none; color: #3b4a6b; font-weight: 600; }
body .ix-tabs .ix-tab svg { box-sizing: border-box; width: 44px; height: 44px; padding: 11px; border-radius: 50%; transform: none; color: #0b1e3f; background: radial-gradient(120% 90% at 50% 0%, rgba(255, 255, 255, .85), rgba(255, 255, 255, .15) 65%); border: 1px solid rgba(255, 255, 255, .95); box-shadow: inset 0 1px 1px #fff, inset 0 -2px 5px rgba(11, 30, 63, .1), 0 3px 8px rgba(11, 30, 63, .12); transition: border-color .3s, background .3s, box-shadow .3s, color .3s; }
body .ix-tabs .ix-tab.is-active { background: none; color: #0b1e3f; font-weight: 800; }
body .ix-tabs .ix-tab.is-active svg { color: #b97a00; border-color: rgba(230, 168, 23, .95); background: radial-gradient(120% 90% at 50% 0%, rgba(255, 244, 200, .95), rgba(245, 197, 66, .3) 70%); box-shadow: inset 0 1px 1px #fff, inset 0 -2px 5px rgba(185, 122, 0, .2), 0 0 0 3px rgba(245, 197, 66, .2), 0 4px 12px rgba(230, 168, 23, .35); transform: none; }
@media (max-width: 360px) { body .ix-tabs .ix-tab svg { width: 40px; height: 40px; padding: 10px; } }
@media (min-width: 768px) { body .ix-tabs .ix-tab { flex-direction: row; justify-content: center; gap: 10px; padding: 0; } }
@media (min-width: 1024px) {
  body .ix-tabs.box-con-01.box-con-01.box-con-01 { margin-top: -74px !important; background: linear-gradient(180deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .04)); border-color: rgba(255, 255, 255, .32); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 12px 30px rgba(0, 0, 0, .25) !important; }
  body .ix-tabs .ix-tab { color: rgba(255, 255, 255, .85); }
  body .ix-tabs .ix-tab svg { color: #fff; background: radial-gradient(120% 90% at 50% 0%, rgba(255, 255, 255, .25), rgba(255, 255, 255, .03) 60%); border-color: rgba(255, 255, 255, .45); box-shadow: inset 0 1px 1px rgba(255, 255, 255, .6), inset 0 -3px 6px rgba(0, 0, 0, .25), 0 2px 6px rgba(0, 0, 0, .2); }
  body .ix-tabs .ix-tab.is-active { color: #fff; }
  body .ix-tabs .ix-tab.is-active svg { color: var(--gold2); border-color: rgba(245, 197, 66, .9); background: radial-gradient(120% 90% at 50% 0%, rgba(245, 197, 66, .4), rgba(245, 197, 66, .05) 65%); box-shadow: inset 0 1px 1px rgba(255, 255, 255, .7), inset 0 -3px 6px rgba(0, 0, 0, .25), 0 0 14px rgba(245, 197, 66, .45); }
}
/* 2026-10-31 กิจกรรมเปิดรับสมัคร ออกแบบใหม่ แบบ B ที่ผู้ใช้เลือก (การ์ดใหญ่ + รายการ · ixev-B) */
.ixb-dtev svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ixev-B { color: #0b1e3f; }
.ixev-B a { color: inherit !important; text-decoration: none; }
.ixev-B .dt { position: absolute; left: 10px; top: 10px; width: 46px; padding: 5px 0 4px; border-radius: 12px; background: rgba(255,255,255,.95); text-align: center; box-shadow: 0 4px 12px rgba(11,30,63,.18); color: #0b1e3f; }
.ixev-B .dt b { display: block; font-size: 18px; font-weight: 800; line-height: 1.05; color: #7b5cd6; }
.ixev-B .dt small { font-size: 10.5px; font-weight: 600; color: #5d6680; }
/* B: การ์ดใหญ่ + รายการ */
.ixev-B { margin: 0 14px; background: #fff; border-radius: 20px; padding: 12px; box-shadow: 0 2px 12px rgba(11,30,63,.06); }
.ixev-B .hero { position: relative; display: block; border-radius: 16px; overflow: hidden; aspect-ratio: 16 / 11; background: #0b1e3f; }
.ixev-B .hero img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; margin: 0; border-radius: 0; object-fit: cover; display: block; }
.ixev-B .hero .cap { position: absolute; inset: auto 0 0 0; padding: 40px 14px 12px; background: linear-gradient(transparent, rgba(8,18,40,.88)); color: #fff; display: flex; flex-direction: column; gap: 4px; }
.ixev-B .hero .cap b { font-size: 16px; line-height: 1.35; }
.ixev-B .hero .cap small { display: flex; align-items: center; gap: 4px; font-size: 12px; opacity: .85; }
.ixev-B .hero .bar { background: rgba(255,255,255,.25); }
.ixev-B .hero .bar i { background: linear-gradient(90deg, #ffd66b, #f0a92b); }
.ixev-B .hero .ft { display: flex; justify-content: space-between; align-items: center; font-size: 12px; }
.ixev-B .hero .ft em { font-style: normal; font-weight: 800; color: #0b1e3f; background: #ffd66b; padding: 5px 12px; border-radius: 99px; }
.ixev-B .row { display: flex; gap: 12px; padding: 12px 2px 2px; margin-top: 10px; border-top: 1px solid #f1f3f7; }
.ixev-B .row .im { position: relative; width: 104px; height: 78px; border-radius: 14px; overflow: hidden; flex: none; background: #eef1f8; }
.ixev-B .row .im img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ixev-B .row .dt { left: 6px; top: 6px; width: 36px; padding: 3px 0; border-radius: 9px; }
.ixev-B .row .dt b { font-size: 14px; } .ixev-B .row .dt small { font-size: 9.5px; }
.ixev-B .row .t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ixev-B .row .t b { font-size: 14px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ixev-B .row .t small { display: flex; align-items: center; gap: 4px; font-size: 11.5px; color: #7a849c; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 1024px) { .ix-grid .ixev-B { margin: 0; padding: 0; background: none; box-shadow: none; } } /* จอคอม: กล่อง section เป็นการ์ดขาวอยู่แล้ว */

/* 2026-10-31 กิจกรรมของทุกโรงเรียน / ของสปอนเซอร์ (includes/index_owner_events.php) — แบบ C ที่ผู้ใช้เลือก: ฟีด */
[class*="ixoe-"] { color: #0b1e3f; }
[class*="ixoe-"] a { color: inherit !important; text-decoration: none; }
[class*="ixoe-"] svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
/* C: ฟีดโรงเรียน */
.ixoe-C { padding: 6px 14px; }
.ixoe-C .it { display: block; padding: 12px 0; border-bottom: 1px solid #f1f3f7; }
.ixoe-C .it:last-child { border-bottom: 0; }
.ixoe-C .sch { display: flex; align-items: center; gap: 10px; }
.ixoe-C .sch > img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; flex: none; border: 1px solid #eef0f6; }
.ixoe-C .sch > span { flex: 1; min-width: 0; } .ixoe-C .sch b { display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .ixoe-C .sch small { font-size: 11.5px; color: #7a849c; }
.ixoe-C .sch em { font-style: normal; flex: none; padding: 3px 10px; border-radius: 99px; background: #eef0f6; color: #8a93a8; font-size: 11px; font-weight: 700; }
.ixoe-C .sch em.op { background: #e7f7ee; color: #128a4a; }
.ixoe-C .bd { display: flex; gap: 12px; margin-top: 10px; padding: 10px; border-radius: 16px; background: #f8f9fd; }
.ixoe-C .bd > img { width: 96px; height: 72px; border-radius: 12px; object-fit: cover; flex: none; }
.ixoe-C .bd > span { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ixoe-C .bd b { font-size: 14px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ixoe-C .bd small { display: flex; align-items: center; gap: 4px; font-size: 11.5px; color: #7a849c; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
