.btn-login-index{
    background: linear-gradient(
    90deg,
    #d6b85a 0%,
    #f5df8a 50%,
    #c9a43a 100%
);
    color: white;
    padding: 10px 25px;
    width: 200px;
    border: 0;
    border-radius: 100px;
    position: absolute;
    bottom: 0;
    margin: 40px 20px;
}
.con-img-index{
    position: relative;
}
.padding15{
    padding: 15px;
}
.box-con-01{
    background: #fff;
    padding: 10px;
    border-radius: 10px;
    box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;
}
.box-icon-menu-1{
    text-align: center;
    flex: 1;
    background: #fff4d300;
    border-right: 1.2px solid #ccc;
}
.box-icon-menu-2{
    text-align: center;
    flex: 1;
    background: #fff4d300;
}
.icon-menu-1{
    width: 35px;
    height: 35px;
}
.text-icon-menu-1{
    font-size: 0.8em;
    margin-top: -3px;
}
div{
    font-family: "Noto Sans Thai", sans-serif;
}
.active-menu-1{
    border-bottom: 2px solid #c9a43a;
    width: 70%;
    margin: auto;
}
.img-h-1{
    width: 50px;
    height: 50px;
}
.font020{
    font-size: 2em;
}
.font018{
    font-size: 1.8em;
}
.font016{
    font-size: 1.6em;
}
.font013{
    font-size: 1.3em;
}
.font012{
    font-size: 1.2em;
}
.font011{
    font-size: 1.1em;
}
.font010{
    font-size: 1.1em;
}
.font009{
    font-size: 0.9em;
}
.font008{
    font-size: 0.8em;
}
.font007{
    font-size: 0.7em;
}
.pro-fgh{
    text-align: center;
    flex: 1;
}
.img-hhg{
    width: 55px;
    height: 55px;
    border: #c9a43a solid 2px;
    border-radius: 100px;
}
.centerY{
    align-items: center;
}
.pk-gjh{
    width: 95%;
    border-radius: 15px;
    border: 1px solid #ccc;
}
.center{
    text-align: center;
}
.bold{
    font-weight: 600;
}
.img-jok{
    width: 35px;
    height: 35px;
    position: absolute;
    margin: -8px;
}
.relative{
    position: relative;
}
.box-item-pro-1{
    border: 1.2px solid #d8d8d8;
    padding: 10px;
    border-radius: 10px;
    margin-bottom: 10px;
}
.item-pro-1{
    width: 80px;
    height: 80px;
    border-radius: 10px;
    border: 1px solid #e6e6e6;
}
.flex-1{
    flex: 1;
}
.btn-lop{
    background: 0;
    border: 1.2px solid #ccc;
    padding: 5px 25px;
    border-radius: 100px;
}
.icon-deadline{
    width: 25px;
    height: 25px;
}
.icon-deadline-1{
    width: 17px;
    height: 17px;
    margin: 0 5px;
}
.conso-item{
    flex-wrap: wrap;
}
.wrap{
    flex-wrap: wrap;
}
.item-con-1{
    width: 33%;
    padding: 5px;
}
.item-con-1 img{
    width: 100%;
    border: 1px solid #ccc;
    border-radius: 10px;
}
.padding10{
    padding: 10px;
}
.box-grol{
    width: 100%;
}
.box-num-1{
    background: #fff;
    text-align: center;
    padding: 15px;
    border-radius: 10px;
    font-size: 1.1em;
    border: 1px solid #dfdfdf;
    color: #0b1e3f;
}
.box-num-2{
    background: #ffffff;
    border-radius: 10px;
    padding: 10px;
    text-align: center;
    border: 1px solid #dfdfdf;
    color: #0b1e3f;
}
.box-num-1{
    border-radius: 10px;
    font-size: 1.1em;
}
.alos-1{
    position: absolute;
    padding: 15px 25px;
}
.bg-num-1{
    width: 100%;
    border-radius: 10px;
}
.img-solid-1{
    width: 40px;
    height: 40px;
    margin-right: 5px;
}
.color-glod{
    color: #926e09;
}
.menu-v-1{
    background: #ecffe0;
    padding: 10px;
    text-align: center;
    width: 23%;
    margin: 3px;
    border-radius: 10px;
}
.menu-v-2{
    background: #e0f9ff;
    padding: 10px;
    text-align: center;
    width: 23%;
    margin: 3px;
    border-radius: 10px;
}
.menu-v-3{
    background: #f5e0ff;
    padding: 10px;
    text-align: center;
    width: 23%;
    margin: 3px;
    border-radius: 10px;
}
.menu-v-4{
    background: #ffefe0;
    padding: 10px;
    text-align: center;
    width: 23%;
    margin: 3px;
    border-radius: 10px;
}
.menu-v-5{
    background: #ffe0e7;
    padding: 10px;
    text-align: center;
    width: 23%;
    margin: 3px;
    border-radius: 10px;
}
.menu-v-6{
    background: #f5f5f5;
    padding: 10px;
    text-align: center;
    width: 23%;
    margin: 3px;
    border-radius: 10px;
}
.menu-v-7{
    background: #e2e2e2;
    padding: 10px;
    text-align: center;
    width: 23%;
    margin: 3px;
    border-radius: 10px;
}
.box-menu-v-1{
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}
.text1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.text2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.icon-menu-v{
    width: 33px;
    height: 33px;
}
.g-052{
    color: #664b00;
    font-size: 1.1em;
    font-weight: 600;
    position: absolute;
    z-index: 10;
}
.flex-1.center.relative {
    position: relative;
}

.box-g-052 {
    position: absolute;
    top: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: -10px;
}

.img-jok-052 {
    position: relative;
    width: 35px;
    height: 35px;
}
.top-child{
    width: 100%;
    padding: 5px;
}
.box-top-child{
    width: 33%;
}
.hero01 {
  background: linear-gradient(120deg, #fff 55%, #dbe6ff);
  border-radius: 16px;
  padding: 20px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow)
}



.donation-gift {
    display: inline-block;
    transform-origin: center bottom;
}

.donation-gift.shake {
    animation: giftShake 2.8s ease-in-out;
}

@keyframes giftShake {
    0% {
        transform: rotate(0deg) translateX(0);
    }

    15% {
        transform: rotate(-4deg) translateX(-3px);
    }

    30% {
        transform: rotate(4deg) translateX(3px);
    }

    45% {
        transform: rotate(-3deg) translateX(-2px);
    }

    60% {
        transform: rotate(3deg) translateX(2px);
    }

    75% {
        transform: rotate(-1.5deg) translateX(-1px);
    }

    100% {
        transform: rotate(0deg) translateX(0);
    }
}


.activity-card {
    width: 100%;
    max-width: 330px;
    box-sizing: border-box;

    background: #ffffff;
    border-radius: 10px;

    padding: 12px 14px 18px;

    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.10);

    font-family: "Noto Sans Thai", sans-serif;
    color: #071d49;
}


/* =========================
   Header
========================= */

.activity-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: 12px;
}

.activity-title {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
}

.live-badge {
    display: flex;
    align-items: center;
    gap: 3px;

    color: #16a34a;
    font-size: 10px;
    font-weight: 700;

    white-space: nowrap;
}

.live-dot {
    width: 5px;
    height: 5px;

    background: #22c55e;
    border-radius: 50%;

    animation: livePulse 1.5s infinite;
}

@keyframes livePulse {

    0% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: .4;
        transform: scale(1.3);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }

}


/* =========================
   กล่องกิจกรรม
========================= */

.activity-card {
    width: 100%;
    max-width: none;
    box-sizing: border-box;

    background: #fff;
    border-radius: 10px;

    padding: 14px 14px 18px;

    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.10);

    font-family: "Noto Sans Thai", sans-serif;
    color: #071d49;
}


/* =========================
   Header
========================= */

.activity-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: 12px;
}

.activity-title {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
}

.live-badge {
    display: flex;
    align-items: center;
    gap: 4px;

    color: #16a34a;
    font-size: 11px;
    font-weight: 700;
}

.live-dot {
    width: 6px;
    height: 6px;

    background: #22c55e;
    border-radius: 50%;

    animation: livePulse 1.5s infinite;
}


/* =========================
   รายการกิจกรรม
========================= */

.activity-item {
    display: flex;
    align-items: center;

    width: 100%;
    min-height: 45px;

    margin-bottom: 3px;
}


/* ไอคอน */

.activity-icon {
    width: 30px;
    height: 30px;
    min-width: 30px;

    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    color: #fff;

    font-size: 16px;
    font-weight: 700;

    margin-right: 10px;
}


/* สีไอคอน */

.activity-icon.green {
    background: #20c968;
}

.activity-icon.blue {
    background: #4b9cf5;
}

.activity-icon.orange {
    background: #ff963d;
}

.activity-icon.pink {
    background: #ff5182;
}

.activity-icon.purple {
    background: #a64df0;
}


/* =========================
   ข้อความ
========================= */

.activity-content {
    flex: 1;
    min-width: 0;
}

.activity-name {
    font-size: 12px;
    font-weight: 700;
    line-height: 1.35;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.activity-desc {
    font-size: 11px;
    font-weight: 400;
    line-height: 1.35;

    color: #102a54;
}


/* =========================
   จำนวนเงิน
========================= */

.activity-money {
    width: 55px;

    text-align: right;

    font-size: 11px;
    font-weight: 400;

    color: #102a54;

    white-space: nowrap;
}


/* =========================
   ปุ่ม
========================= */

.activity-button-wrap {
    display: flex;
    justify-content: center;

    margin-top: 15px;
}

.activity-button {
    width: 155px;
    height: 31px;

    background: #fff;

    border: 1px solid #7187b5;
    border-radius: 18px;

    color: #071d49;

    font-family: inherit;
    font-size: 11px;
    font-weight: 400;

    cursor: pointer;

    transition: .2s;
}

.activity-button:hover {
    background: #071d49;
    color: #fff;
}


/* =========================
   LIVE Animation
========================= */

@keyframes livePulse {

    0% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: .4;
        transform: scale(1.3);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }

}



.student-section {
    width: 100%;
    box-sizing: border-box;
}

.student-title {
    font-size: 15px;
    font-weight: 700;
    color: #071d49;
    margin-bottom: 10px;
}


/* =========================
   Grid
========================= */

.student-grid {
    display: grid;

    /* 3 คนต่อแถว */
    grid-template-columns: repeat(3, minmax(0, 1fr));

    gap: 7px;

    width: 100%;
}


/* =========================
   Card
========================= */

.student-card {
    min-width: 0;

    border: 1px solid #d3d3d3;
    border-radius: 9px;

    overflow: hidden;

    background: #fff;

    box-sizing: border-box;
}


/* =========================
   สาย
========================= */

.student-category {
    height: 28px;

    padding: 5px 7px 0;

    box-sizing: border-box;

    font-size: 11px;
    font-weight: 700;

    color: #123b76;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* =========================
   รูปนักเรียน
========================= */

.student-image {
    width: 100%;

    aspect-ratio: 1 / 1;

    overflow: hidden;

    background: #eee;
}

.student-image img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;
}


/* =========================
   ข้อมูล
========================= */

.student-info {
    text-align: center;

    padding: 7px 4px 9px;
}

.student-name {
    font-size: 11px;
    font-weight: 700;

    color: #16418a;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.student-school {
    font-size: 10px;

    color: #31558e;

    margin-top: 2px;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* =========================
   คะแนน
========================= */

.student-score {
    margin-top: 8px;

    color: #16418a;

    line-height: 1;
}

.student-score strong {
    font-size: 15px;
    font-weight: 700;
}

.student-score span {
    font-size: 9px;
    margin-left: 2px;
}


/* =========================
   ดูทั้งหมด
========================= */

.student-more {
    margin-top: 8px;

    font-size: 10px;
    font-weight: 700;

    color: #16418a;
}

/* ---------------------------------------- */

/* =====================================================
   TOP TEACHER / RANKING
===================================================== */

.top-student-section {
    width: 100%;
    box-sizing: border-box;

    position: relative;

    background:
        radial-gradient(
            circle at 50% 5%,
            rgba(255, 215, 100, 0.10),
            transparent 35%
        ),
        #ffffff;

    border-radius: 14px;

    padding: 15px 10px 14px;

    box-shadow:
        0 5px 18px rgba(7, 29, 73, 0.08),
        0 1px 3px rgba(7, 29, 73, 0.05);

    font-family: "Noto Sans Thai", sans-serif;

    color: #12366d;
}


/* =====================================================
   TITLE
===================================================== */

.top-student-title {
    position: relative;

    font-size: 14px;
    font-weight: 700;

    color: #071d49;

    padding-left: 10px;

    margin-bottom: 11px;
}

.top-student-title::before {
    content: "";

    position: absolute;

    left: 0;
    top: 3px;

    width: 3px;
    height: 15px;

    border-radius: 4px;

    background: linear-gradient(
        to bottom,
        #d8a52b,
        #f1cc6b
    );
}


/* =====================================================
   GRID
===================================================== */

.top-student-grid {
    display: grid;

    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 7px;
}


/* =====================================================
   CARD
===================================================== */

.top-student-card {
    position: relative;

    min-width: 0;

    box-sizing: border-box;

    background: linear-gradient(
        180deg,
        #ffffff 0%,
        #fbfcff 100%
    );

    border: 1px solid #dce2eb;

    border-radius: 10px;

    text-align: center;

    overflow: hidden;

    transition:
        transform .2s ease,
        box-shadow .2s ease;
}


/* Hover */

.top-student-card:hover {
    transform: translateY(-2px);

    box-shadow:
        0 5px 14px rgba(16, 55, 110, .10);
}


/* =====================================================
   RANK 1
===================================================== */

.rank-one {
    grid-column: 1 / -1;

    min-height: 169px;

    padding: 13px 6px 9px;

    border-color: #d7dde7;

    background:
        radial-gradient(
            circle at 50% 15%,
            rgba(255, 220, 100, .10),
            transparent 38%
        ),
        linear-gradient(
            180deg,
            #ffffff,
            #fafcff
        );
}


/* เส้นทองด้านบนอันดับ 1 */

.rank-one::before {
    content: "";

    position: absolute;

    left: 18%;
    right: 18%;
    top: 0;

    height: 2px;

    border-radius: 0 0 10px 10px;

    background: linear-gradient(
        90deg,
        transparent,
        #d9a62a,
        #f3d477,
        #d9a62a,
        transparent
    );
}


/* =====================================================
   RANK 2 / 3
===================================================== */

.rank-two,
.rank-three {
    min-height: 167px;

    padding: 12px 5px 8px;
}


/* =====================================================
   PHOTO
===================================================== */

.teacher-photo {
    position: relative;

    width: 78px;
    height: 78px;

    margin: 0 auto 5px;

    border-radius: 50%;

    overflow: hidden;

    background: #edf1f5;

    border: 2px solid #ffffff;

    box-shadow:
        0 0 0 1px #d7dce4,
        0 3px 8px rgba(20, 50, 90, .12);
}


.teacher-photo img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;
}


/* อันดับ 1 ใหญ่กว่า */

.rank-one .teacher-photo {
    width: 82px;
    height: 82px;

    margin-bottom: 4px;

    box-shadow:
        0 0 0 2px #ffffff,
        0 0 0 3px #e1c46c,
        0 4px 10px rgba(20, 50, 90, .15);
}


/* =====================================================
   NAME
===================================================== */

.teacher-name {
    font-size: 11px;

    font-weight: 700;

    line-height: 1.35;

    color: #174a9b;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;
}


/* อันดับ 1 */

.rank-one .teacher-name {
    font-size: 12px;
}


/* =====================================================
   SCHOOL
===================================================== */

.teacher-school {
    font-size: 9px;

    color: #6b7d9b;

    line-height: 1.3;

    margin-top: 1px;
}


/* =====================================================
   SCORE
===================================================== */

.teacher-score {
    margin-top: 5px;

    color: #174a9b;

    line-height: 1;
}

.teacher-score strong {
    font-size: 16px;

    font-weight: 800;

    letter-spacing: -.3px;
}


/* อันดับ 1 */

.rank-one .teacher-score {
    margin-top: 5px;
}

.rank-one .teacher-score strong {
    font-size: 17px;
}


/* =====================================================
   UNIT
===================================================== */

.teacher-unit {
    font-size: 9px;

    color: #7a8aa4;

    margin-top: 2px;
}


/* =====================================================
   MEDAL
===================================================== */

.rank-badge {
    position: absolute;

    left: 8px;
    top: 8px;

    width: 34px;
    height: 45px;

    z-index: 10;

    transform: rotate(-2deg);
}


/* เหรียญ */

.medal {
    position: relative;

    width: 26px;
    height: 26px;

    margin: 0 auto;

    border-radius: 50%;

    display: flex;

    align-items: center;
    justify-content: center;

    color: #ffffff;

    font-size: 12px;

    font-weight: 800;

    border: 2px solid #ffffff;

    box-sizing: border-box;

    box-shadow:
        0 2px 5px rgba(0, 0, 0, .20);

    z-index: 3;
}


/* วงแหวนในเหรียญ */

.medal::after {
    content: "";

    position: absolute;

    inset: 3px;

    border-radius: 50%;

    border: 1px solid rgba(255,255,255,.55);
}


/* =====================================================
   GOLD
===================================================== */

.medal-1 {
    background:
        radial-gradient(
            circle at 35% 30%,
            #fff7c9,
            #e5ad2e 48%,
            #b87808 100%
        );
}


/* =====================================================
   SILVER
===================================================== */

.medal-2 {
    background:
        radial-gradient(
            circle at 35% 30%,
            #ffffff,
            #aeb9c8 48%,
            #718093 100%
        );
}


/* =====================================================
   BRONZE
===================================================== */

.medal-3 {
    background:
        radial-gradient(
            circle at 35% 30%,
            #ffe0bd,
            #d77b3b 48%,
            #a94b1e 100%
        );
}


/* =====================================================
   RIBBON
===================================================== */

.ribbon {
    position: absolute;

    top: 23px;

    width: 9px;
    height: 22px;

    z-index: 1;

    clip-path: polygon(
        0 0,
        100% 0,
        88% 100%,
        50% 78%,
        12% 100%
    );
}


/* แดง */

.ribbon-red {
    left: 7px;

    background: linear-gradient(
        90deg,
        #c92735,
        #f05a61
    );

    transform: rotate(8deg);
}


/* น้ำเงิน */

.ribbon-blue {
    right: 7px;

    background: linear-gradient(
        90deg,
        #2455a4,
        #5082d1
    );

    transform: rotate(-8deg);
}


/* =====================================================
   BUTTON
===================================================== */

.top-student-button-wrap {
    display: flex;

    justify-content: center;

    margin-top: 13px;
}


.top-student-button {
    width: 200px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #ffffff;
    border: 1px solid #6682b6;
    border-radius: 20px;
    color: #174a9b;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s ease, color .2s ease, transform .2s ease;
}

.top-student-button span {
    font-size: 17px;

    line-height: 1;

    margin-top: -2px;

    transition: transform .2s ease;
}


.top-student-button:hover {
    background: #174a9b;

    color: #ffffff;

    transform: translateY(-1px);
}


.top-student-button:hover span {
    transform: translateX(3px);
}

/* -------------------------------------------------- */

/* =====================================================
   TOP EARNER
===================================================== */

.top-earner-section {
    width: 100%;
    box-sizing: border-box;

    background: #ffffff;

    border-radius: 12px;

    padding: 14px 10px 13px;

    box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;

    font-family: "Noto Sans Thai", sans-serif;

    color: #071d49;
    margin-top: 15px;
    margin-bottom: 15px;
}


/* =====================================================
   TITLE
===================================================== */

.top-earner-title {
    font-size: 14px;

    font-weight: 700;

    color: #071d49;

    margin-bottom: 10px;
}


/* =====================================================
   LIST
===================================================== */

.top-earner-list {
    width: 100%;
}


/* =====================================================
   ITEM
===================================================== */

.top-earner-item {
    position: relative;

    width: 100%;

    min-height: 43px;

    display: flex;

    align-items: center;

    box-sizing: border-box;

    margin-bottom: 2px;
}


/* =====================================================
   RANK
===================================================== */

.earner-rank {
    position: relative;

    width: 30px;
    min-width: 30px;

    height: 34px;

    margin-right: 5px;

    display: flex;
    align-items: center;
    justify-content: center;

    box-sizing: border-box;
}


/* =====================================================
   MEDAL
===================================================== */

.rank-medal .medal-number {
    position: relative;

    z-index: 3;

    width: 22px;
    height: 22px;

    border-radius: 50%;

    display: flex;

    align-items: center;
    justify-content: center;

    color: #ffffff;

    font-size: 10px;

    font-weight: 800;

    border: 1.5px solid #ffffff;

    box-shadow:
        0 1px 4px rgba(0, 0, 0, .20);
}


/* =====================================================
   GOLD
===================================================== */

.rank-gold .medal-number {
    background:
        radial-gradient(
            circle at 30% 25%,
            #fff6b4,
            #dfa929 48%,
            #ad7108 100%
        );
}


/* =====================================================
   SILVER
===================================================== */

.rank-silver .medal-number {
    background:
        radial-gradient(
            circle at 30% 25%,
            #ffffff,
            #aeb9c8 48%,
            #778394 100%
        );
}


/* =====================================================
   BRONZE
===================================================== */

.rank-bronze .medal-number {
    background:
        radial-gradient(
            circle at 30% 25%,
            #ffe0bc,
            #d77b3b 48%,
            #a94b1e 100%
        );
}


/* =====================================================
   RIBBON
===================================================== */

.medal-ribbon {
    position: absolute;

    top: 20px;

    width: 7px;
    height: 16px;

    z-index: 1;

    clip-path: polygon(
        0 0,
        100% 0,
        85% 100%,
        50% 75%,
        15% 100%
    );
}

.medal-ribbon.red {
    left: 7px;

    background: #df303d;

    transform: rotate(7deg);
}

.medal-ribbon.blue {
    right: 7px;

    background: #2d62b8;

    transform: rotate(-7deg);
}


/* =====================================================
   RANK 4 / 5
===================================================== */


.rank-number {
    width: 24px;
    height: 24px;

    min-width: 24px;
    min-height: 24px;

    flex: 0 0 24px;

    padding: 0;
    margin: 0 auto;
    margin-right: 10px;
    box-sizing: border-box;

    border-radius: 50%;

    border: 1px solid #ccd4df;

    background: linear-gradient(
        145deg,
        #ffffff,
        #edf1f6
    );

    color: #164a96;

    font-size: 10px;
    font-weight: 500;

    display: flex;
    align-items: center;
    justify-content: center;

    line-height: 1;
}

/* =====================================================
   PHOTO
===================================================== */

.earner-photo {
    width: 32px;
    height: 32px;

    min-width: 32px;

    border-radius: 50%;

    overflow: hidden;

    background: #edf0f4;

    border: 1px solid #d9dee6;

    margin-right: 8px;
}


.earner-photo img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;
}


/* =====================================================
   INFO
===================================================== */

.earner-info {
    flex: 1;

    min-width: 0;

    line-height: 1.2;
}


.earner-name {
    font-size: 11px;

    font-weight: 700;

    color: #174a9b;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;
}


.earner-school {
    font-size: 9px;

    color: #536b91;

    margin-top: 2px;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;
}


/* =====================================================
   MONEY
===================================================== */

.earner-money {
    min-width: 78px;

    margin-left: 5px;

    text-align: right;

    white-space: nowrap;

    font-size: 13px;

    font-weight: 500;

    color: #071d49;
}


/* =====================================================
   BUTTON
===================================================== */

.top-earner-button-wrap {
    display: flex;

    justify-content: center;

    margin-top: 8px;
}


.top-earner-button {
    width: 152px;

    height: 30px;

    display: flex;

    align-items: center;
    justify-content: center;

    gap: 11px;

    border-radius: 18px;

    border: 1px solid #6682b6;

    background: #ffffff;

    color: #174a9b;

    font-family: inherit;

    font-size: 10px;

    cursor: pointer;

    transition: .2s ease;
}


.top-earner-button b {
    font-size: 18px;

    font-weight: 400;

    line-height: 1;

    margin-top: -2px;
}


.top-earner-button:hover {
    background: #174a9b;

    color: #ffffff;

    border-color: #174a9b;
}

/* //---------------------------------------// */

.scholarship-card {
    width: 100%;
    padding: 10px;
    background: #fff;
    border: 1px solid #e7e7e7;
    border-radius: 13px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
    overflow: hidden;
    font-family: 'Noto Sans Thai', sans-serif;
    color: #102d66;
    margin-bottom: 15px;
}

.card-title {
    margin: 0 2px 8px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.5;
}

.cover-image {
    display: block;
    width: 100%;
    height: 240px;
    object-fit: cover;
    border-radius: 13px;
}

.status {
    display: inline-block;
    margin-top: 13px;
    padding: 4px 17px;
    background: #c8f9d9;
    color: #14944a;
    border-radius: 20px;
    font-size: 11px;
}

.campaign-title {
    margin-top: 9px;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.6;
}

.organization,
.description,
.stat-label,
.stat-sub {
    color: #52658c;
    font-size: 12px;
}

.organization {
    margin-top: 1px;
}

.description {
    margin-top: 8px;
    line-height: 1.9;
}

.meta-row {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-top: 14px;
    padding-bottom: 13px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 11px;
    color: #52658c;
    white-space: nowrap;
}

.meta-item i {
    width: 24px;
    height: 24px;
    color: #172f65;
    stroke-width: 1.8;
}

.divider {
    height: 1px;
    margin: 0 3px;
    background: #e5e5e5;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px 15px;
    padding: 15px 4px 5px;
}

.stat-item {
    display: flex;
    align-items: flex-start;
    gap: 9px;
}

.stat-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    stroke-width: 1.5;
}

.stat-item:nth-child(1) .stat-icon,
.stat-item:nth-child(2) .stat-icon {
    color: #17469e;
}

.stat-item:nth-child(3) .stat-icon {
    color: #ff354b;
}

.stat-item:nth-child(4) .stat-icon {
    color: #ffb000;
}

.stat-value {
    color: #102d66;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.6;
}

.stat-label,
.stat-sub {
    font-size: 11px;
    line-height: 1.5;
}

@media (max-width: 380px) {
    .scholarship-card {
        max-width: 100%;
    }

    .cover-image {
        height: 230px;
    }

    .meta-row {
        gap: 10px;
    }

    .stats-grid {
        gap: 18px 8px;
    }
}

/* ---------------  Rank11 ------- */

.sponsor-rank-v2-card {
    width: 100%;
    min-height: 540px;
    margin-bottom: 15px;
    padding: 20px 14px 26px;

    box-sizing: border-box;
    background: #fff;
    border: 1px solid #e9e9e9;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);

    font-family: "Noto Sans Thai", sans-serif;
    color: #102d66;
}

.sponsor-rank-v2-title {
    margin: 0 0 18px;
    color: #102d66;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.5;
}

.sponsor-rank-v2-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* แต่ละรายการ */
.sponsor-rank-v2-item {
    display: grid;
    grid-template-columns: 30px 68px minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 8px;

    min-height: 58px;
}

/* ส่วนอันดับ */
.sponsor-rank-v2-rank {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
}

/* วงกลมอันดับ */
.sponsor-rank-v2-badge {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 23px;
    height: 23px;

    border-radius: 50%;
    color: #fff;
    font-size: 12px;
    font-weight: 500;
}

/* อันดับ 1 */
.sponsor-rank-v2-gold {
    background: linear-gradient(145deg, #f8e19b, #c88b18);
    box-shadow: 0 1px 3px rgba(184, 130, 24, 0.25);
}

/* อันดับ 2 */
.sponsor-rank-v2-silver {
    background: linear-gradient(145deg, #e8e8e8, #999);
}

/* อันดับ 3 */
.sponsor-rank-v2-bronze {
    background: linear-gradient(145deg, #f8a99b, #c84118);
}

/* อันดับทั่วไป */
.sponsor-rank-v2-normal {
    background: #777;
}

/* ริบบิ้นเหรียญ */
.sponsor-rank-v2-ribbon {
    position: absolute;
    top: 18px;
    left: 3px;

    width: 16px;
    height: 14px;

    background: linear-gradient(
        135deg,
        #e53935 0 45%,
        #fff 45% 55%,
        #e53935 55%
    );

    clip-path: polygon(
        0 0,
        100% 0,
        100% 100%,
        50% 72%,
        0 100%
    );
}

/* โลโก้ */
.sponsor-rank-v2-logo {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 68px;
    height: 48px;

    box-sizing: border-box;
    border: 1px solid #d8d8d8;
    border-radius: 9px;
    background: #fff;
    overflow: hidden;
}

.sponsor-rank-v2-logo img {
    display: block;

    width: auto;
    height: auto;
    max-width: 88%;
    max-height: 88%;

    object-fit: contain;
}

/* ข้อมูลบริษัท */
.sponsor-rank-v2-info {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* ชื่อบริษัท */
.sponsor-rank-v2-name {
    min-width: 0;

    color: #102d66;
    font-size: 11px;
    font-weight: 400;
    line-height: 1.5;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ยอดเงิน */
.sponsor-rank-v2-amount {
    color: #102d66;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    white-space: nowrap;

    font-variant-numeric: tabular-nums;
}

/* จำนวนกิจกรรม */
.sponsor-rank-v2-events {
    align-self: start;

    margin-top: 5px;

    color: #52658c;
    font-size: 10px;
    font-weight: 400;
    line-height: 1.4;
    white-space: nowrap;
}

/* ปุ่มดูทั้งหมด */
.sponsor-rank-v2-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;

    width: 153px;
    height: 30px;

    margin: 34px auto 0;

    border: 1px solid #5274b9;
    border-radius: 20px;
    background: #fff;

    color: #315a9f;
    font-family: inherit;
    font-size: 12px;

    cursor: pointer;
    transition: background 0.2s ease;
}

.sponsor-rank-v2-button:hover {
    background: #f4f7fc;
}

.sponsor-rank-v2-arrow {
    font-size: 19px;
    line-height: 1;
}

/* Responsive */
@media (max-width: 420px) {

    .sponsor-rank-v2-card {
        padding: 18px 12px 26px;
    }

    .sponsor-rank-v2-title {
        font-size: 15px;
    }

    .sponsor-rank-v2-item {
        grid-template-columns: 28px 68px minmax(0, 1fr) auto;
        column-gap: 7px;
    }

    .sponsor-rank-v2-name {
        font-size: 10px;
    }

    .sponsor-rank-v2-amount {
        font-size: 14px;
    }

    .sponsor-rank-v2-events {
        font-size: 9px;
    }
}

/* ----------------------------------------- */
.sponsor-live-card {
    width: 100%;
    padding: 12px 12px 14px;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 9px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.07);
    font-family: 'Noto Sans Thai', sans-serif;
    color: #102d66;
    margin: 15px 0;
}

.sponsor-live-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 5px;
    margin-bottom: 12px;
}

.sponsor-live-header h2 {
    margin: 0;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.5;
    color: #102d66;
}

.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 1px 3px;
    background: #d5f9df;
    color: #00a83b;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.5;
    white-space: nowrap;
}

.live-dot {
    width: 4px;
    height: 4px;
    background: #00b83f;
    border-radius: 50%;
}

.sponsor-live-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.sponsor-live-item {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr) auto;
    align-items: start;
    gap: 9px;
    min-height: 69px;
}

.sponsor-live-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 36px;
    margin-top: 1px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
}

.sponsor-live-logo img {
    display: block;
    max-width: 88%;
    max-height: 88%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.sponsor-live-info {
    min-width: 0;
}

.sponsor-live-name {
    font-size: 15px;
    font-weight: 400;
    line-height: 1.5;
    color: #102d66;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sponsor-live-desc {
    margin-top: 2px;
    font-size: 10px;
    font-weight: 400;
    line-height: 1.6;
    color: #7182a0;
}

.sponsor-live-amount {
    margin-top: 3px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.5;
    color: #102d66;
}

.sponsor-live-time {
    padding-top: 1px;
    font-size: 10px;
    font-weight: 400;
    line-height: 1.5;
    color: #526fa6;
    white-space: nowrap;
}

.sponsor-live-more {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 128px;
    height: 25px;
    margin: 13px auto 0;
    border: 1px solid #5274b9;
    border-radius: 20px;
    background: #fff;
    color: #315a9f;
    font-family: inherit;
    font-size: 11px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.sponsor-live-more:hover {
    background: #f4f7fc;
}

.sponsor-live-more i {
    width: 14px;
    height: 14px;
    stroke-width: 1.5;
}

@media (max-width: 300px) {
    .sponsor-live-card {
        max-width: 100%;
        padding: 12px 10px 14px;
    }

    .sponsor-live-item {
        grid-template-columns: 52px minmax(0, 1fr) auto;
        gap: 7px;
    }

    .sponsor-live-logo {
        width: 52px;
    }

    .sponsor-live-name {
        font-size: 10px;
    }

    .sponsor-live-desc {
        font-size: 9px;
    }

    .sponsor-live-amount {
        font-size: 12px;
    }

    .sponsor-live-time {
        font-size: 9px;
    }
}

/* ----------------------------------- */

.category-card {
    width: 100%;
    max-width: 460px;
    margin-bottom: 15px;
    padding: 14px 12px 24px;
    background: #fff;
    border: 1px solid #e9e9e9;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    font-family: 'Noto Sans Thai', sans-serif;
    color: #102d66;
}

.category-title {
    margin: 0 0 17px;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.5;
    color: #333;
}

.category-list {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
}

.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-width: 0;
    cursor: pointer;
    text-align: center;
}

.category-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-bottom: 8px;
    border: 1.5px solid transparent;
    border-radius: 0;
    color: #31528f;
    transition: all 0.2s ease;
}

.category-icon i {
    width: 32px;
    height: 32px;
    stroke-width: 1.6;
}

.category-item.active .category-icon {
    /* border-color: #008cff; */
    color: #31528f;
}

.category-name {
    width: 100%;
    color: #102d66;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.5;
    white-space: nowrap;
}

.category-sub {
    width: 100%;
    margin-top: 1px;
    color: #52658c;
    font-size: 10px;
    font-weight: 400;
    line-height: 1.5;
    white-space: nowrap;
}

.category-item:hover .category-icon {
    color: #008cff;
}

@media (max-width: 380px) {
    .category-card {
        padding: 12px 8px 20px;
    }

    .category-list {
        gap: 3px;
    }

    .category-icon {
        width: 40px;
        height: 40px;
        margin-bottom: 6px;
    }

    .category-icon i {
        width: 29px;
        height: 29px;
    }

    .category-name {
        font-size: 10px;
    }

    .category-sub {
        font-size: 9px;
    }
}


/* ------------------------------------ */

.school-ranking-card {
    width: 100%;
    margin-bottom: 15px;
    max-width: 460px;
    padding: 20px 14px 18px;
    background: #ffffff;
    border: 1px solid #e8edf5;
    border-radius: 18px;
    box-shadow: 0 4px 18px rgba(20, 49, 100, 0.08);
    font-family: 'Noto Sans Thai', sans-serif;
    color: #102d66;
}

/* Header */

.school-ranking-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 18px;
}

.school-ranking-header h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
}

.school-ranking-header p {
    margin: 3px 0 0;
    font-size: 11px;
    color: #7182a0;
}

.ranking-year {
    padding: 4px 9px;
    border-radius: 20px;
    background: #eef4ff;
    color: #315a9f;
    font-size: 11px;
}

/* อันดับ 1 */

.school-top-card {
    position: relative;
    padding: 20px 16px 18px;
    border: 1px solid #dce8fb;
    border-radius: 16px;
    background: linear-gradient(145deg, #f7faff, #edf4ff);
    text-align: center;
}

.top-rank-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(145deg, #f7d879, #c38b21);
    color: #fff;
    font-size: 17px;
    font-weight: 600;
    box-shadow: 0 3px 8px rgba(190, 140, 40, 0.25);
}

.medal-ribbon {
    position: absolute;
    top: 29px;
    left: 8px;
    width: 22px;
    height: 20px;
    background: linear-gradient(90deg, #e94d43 0 45%, #fff 45% 55%, #e94d43 55%);
    clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 70%, 0 100%);
}

.school-logo-top {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 112px;
    height: 112px;
    margin: 0 auto 12px;
    background: #fff;
    border: 1px solid #d9e1ee;
    border-radius: 50%;
}

.school-logo-top img {
    max-width: 88%;
    max-height: 88%;
    object-fit: contain;
}

.school-top-info h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
}

.school-top-info p {
    margin: 3px 0 0;
    font-size: 12px;
    color: #7182a0;
}

/* สถิติอันดับ 1 */

.school-stat-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid #dce5f2;
    text-align: left;
}

.school-stat {
    display: flex;
    align-items: center;
    gap: 12px;
}

.school-stat img {
    width: 29px;
    height: 29px;
    object-fit: contain;
}

.school-stat strong {
    display: block;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.4;
    color: #1d4fa3;
}

.school-stat span {
    display: block;
    margin-top: 2px;
    font-size: 10px;
    color: #7182a0;
}

/* อันดับ 2 และ 3 */

.school-ranking-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 10px;
}

.school-rank-card {
    position: relative;
    padding: 16px 10px 14px;
    border: 1px solid #dfe5ed;
    border-radius: 14px;
    background: #fff;
    text-align: center;
}

.school-rank-card.third {
    border-color: #f3c6c6;
    background: #fffafb;
}

.rank-number {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
}

.rank-number.silver {
    background: linear-gradient(145deg, #dfe4ea, #8d98a8);
}

.rank-number.bronze {
    background: linear-gradient(145deg, #e6a17d, #ad5b35);
}

.school-rank-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 82px;
    height: 82px;
    margin: 0 auto 10px;
    background: #fff;
    border: 1px solid #e0e5ed;
    border-radius: 50%;
}

.school-rank-logo img {
    max-width: 88%;
    max-height: 88%;
    object-fit: contain;
}

.school-rank-card h3 {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.6;
    color: #1b4389;
}

.school-location {
    margin: 2px 0 14px;
    font-size: 10px;
    color: #7182a0;
}

/* สถิติอันดับ 2 และ 3 */

.rank-stats {
    padding-top: 12px;
    border-top: 1px solid #e5eaf1;
    text-align: left;
}

.rank-stats > div {
    margin-bottom: 12px;
}

.rank-stats > div:last-child {
    margin-bottom: 0;
}

.rank-stats strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    color: #1d4fa3;
}

.rank-stats span {
    display: block;
    margin-top: 2px;
    font-size: 9px;
    line-height: 1.5;
    color: #7182a0;
}

/* ปุ่ม */

.school-ranking-more {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    width: 150px;
    height: 34px;
    margin: 20px auto 0;
    border: 1px solid #5475b5;
    border-radius: 22px;
    background: #fff;
    color: #315a9f;
    font-family: inherit;
    font-size: 12px;
    cursor: pointer;
    transition: 0.2s ease;
}

.school-ranking-more:hover {
    background: #f1f6ff;
}

.school-ranking-more span {
    font-size: 20px;
    line-height: 1;
}

/* Responsive */

@media (max-width: 380px) {

    .school-ranking-card {
        padding: 16px 10px;
    }

    .school-ranking-header h2 {
        font-size: 14px;
    }

    .school-top-card {
        padding: 18px 12px 16px;
    }

    .school-logo-top {
        width: 96px;
        height: 96px;
    }

    .school-top-info h3 {
        font-size: 14px;
    }

    .school-rank-card {
        padding: 14px 8px 12px;
    }

    .school-rank-logo {
        width: 72px;
        height: 72px;
    }

    .school-rank-card h3 {
        font-size: 11px;
    }

    .rank-stats strong {
        font-size: 13px;
    }

}

/* ---------------------------------------- */

.sponsor-ranking-card {
    width: 100%;
    max-width: 425px;
    margin-bottom: 15px;
    padding: 22px 16px 36px;
    background: #fff;
    border: 1px solid #e9edf3;
    border-radius: 13px;
    box-shadow: 0 3px 15px rgba(20, 45, 90, 0.08);
    font-family: 'Noto Sans Thai', sans-serif;
    color: #092b6b;
}

/* Header */

.ranking-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 20px;
}

.ranking-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 500;
    line-height: 1.5;
    color: #092b6b;
}

.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 5px;
    border-radius: 3px;
    background: #c9ffd7;
    color: #00a83b;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.live-badge span {
    width: 5px;
    height: 5px;
    background: #00b83f;
    border-radius: 50%;
}

/* รายการ */

.ranking-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sponsor-item {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr) auto;
    align-items: center;
    gap: 15px;
    min-height: 56px;
}

.sponsor-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 86px;
    height: 56px;
    border: 1px solid #d8dce2;
    border-radius: 11px;
    background: #fff;
    overflow: hidden;
}

.sponsor-logo img {
    display: block;
    width: auto;
    height: auto;
    max-width: 88%;
    max-height: 88%;
    object-fit: contain;
}

/* ข้อมูลสปอนเซอร์ */

.sponsor-info {
    min-width: 0;
}

.sponsor-name {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    color: #092b6b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sponsor-desc {
    margin-top: 2px;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.5;
    color: #7182a0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* จำนวนเงินและเวลา */

.sponsor-amount {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
    white-space: nowrap;
}

.sponsor-amount span {
    font-size: 12px;
    font-weight: 400;
    line-height: 1.5;
    color: #5270a5;
}

.sponsor-amount strong {
    margin-top: 1px;
    font-size: 17px;
    font-weight: 500;
    line-height: 1.5;
    color: #092b6b;
}

/* ปุ่มดูทั้งหมด */

.ranking-more {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    width: 198px;
    height: 40px;
    margin: 28px auto 0;
    border: 1px solid #5274b9;
    border-radius: 24px;
    background: #fff;
    color: #315a9f;
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.ranking-more:hover {
    background: #f3f7ff;
}

.ranking-more .arrow {
    font-size: 22px;
    line-height: 1;
}

/* Responsive */

@media (max-width: 380px) {

    .sponsor-ranking-card {
        padding: 18px 12px 30px;
    }

    .ranking-header h2 {
        font-size: 16px;
    }

    .ranking-list {
        gap: 18px;
    }

    .sponsor-item {
        grid-template-columns: 70px minmax(0, 1fr) auto;
        gap: 10px;
    }

    .sponsor-logo {
        width: 70px;
        height: 54px;
    }

    .sponsor-name {
        font-size: 12px;
    }

    .sponsor-desc {
        font-size: 10px;
    }

    .sponsor-amount span {
        font-size: 10px;
    }

    .sponsor-amount strong {
        font-size: 14px;
    }

}


/* ------------------------------------ */


.donation-live-card {
    width: 100%;
    min-height: 405px;
    padding: 18px 14px 22px;
    box-sizing: border-box;
    margin-bottom: 15px;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);

    font-family: "Noto Sans Thai", sans-serif;
    color: #102d66;
}

.donation-live-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 15px;
}

.donation-live-header h2 {
    margin: 0;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.5;
    color: #102d66;
}

.donation-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;

    padding: 1px 4px;
    border-radius: 2px;
    background: #baffc6;

    color: #00852d;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.donation-live-badge i {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #13b94b;
}

.donation-live-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.donation-live-item {
    display: grid;
    grid-template-columns: 45px minmax(0, 1fr);
    column-gap: 8px;
    align-items: start;

    opacity: 0;
    transform: translateY(-18px);
    transition:
        opacity 0.55s ease,
        transform 0.55s ease;
}

.donation-live-item.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.donation-live-logo {
    width: 45px;
    height: 45px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid #d7d7d7;
    border-radius: 50%;
    background: #fff;
    overflow: hidden;
}

.donation-live-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.donation-live-content {
    min-width: 0;
}

.donation-live-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.donation-live-name {
    color: #102d66;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.5;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.donation-live-desc {
    margin-top: 1px;
    color: #7183a5;
    font-size: 9px;
    line-height: 1.5;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.donation-live-money {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
}

.donation-live-money span {
    color: #52658c;
    font-size: 9px;
    line-height: 1.4;
    white-space: nowrap;
}

.donation-live-money strong {
    color: #102d66;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    white-space: nowrap;
}

.donation-live-progress {
    width: 100%;
    height: 4px;
    margin-top: 4px;

    background: #d9d9d9;
    overflow: hidden;
}

.donation-live-progress-bar {
    height: 100%;
    background: #2eb866;
}

.donation-live-progress-text {
    margin-top: 2px;

    color: #52658c;
    font-size: 8px;
    line-height: 1.3;
    text-align: right;
}

.donation-live-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;

    width: 153px;
    height: 30px;

    margin: 23px auto 0;

    border: 1px solid #5274b9;
    border-radius: 20px;
    background: #fff;

    color: #315a9f;
    font-family: inherit;
    font-size: 12px;

    cursor: pointer;
}

.donation-live-arrow {
    font-size: 19px;
    line-height: 1;
}

@media (max-width: 420px) {

    .donation-live-card {
        padding: 18px 12px 22px;
    }

    .donation-live-item {
        grid-template-columns: 45px minmax(0, 1fr);
        column-gap: 8px;
    }

    .donation-live-name {
        font-size: 10px;
    }

    .donation-live-money strong {
        font-size: 13px;
    }

    .donation-live-desc {
        font-size: 8px;
    }
}
.me1{
    width: 30px;
    height: 30px;
}

/* ============================================================
   แฮมเบอร์เกอร์มุมบนขวา + เมนูสไลด์ (หน้าแรก ตอนยังไม่ล็อกอิน)
   ============================================================ */
.ham-btn{
    padding: 0;
}
.ham-ico{
    display: block;
    width: 18px;
}
.ham-ico i{
    display: block;
    height: 2px;
    border-radius: 2px;
    background: var(--navy);
    transition: transform .28s cubic-bezier(.22,1,.36,1), opacity .18s ease;
}
.ham-ico i + i{
    margin-top: 4px;
}
/* เปิดเมนูแล้วขีดสามเส้นพับเป็นกากบาท */
.ham-btn[aria-expanded="true"] .ham-ico i:nth-child(1){ transform: translateY(6px) rotate(45deg); }
.ham-btn[aria-expanded="true"] .ham-ico i:nth-child(2){ opacity: 0; }
.ham-btn[aria-expanded="true"] .ham-ico i:nth-child(3){ transform: translateY(-6px) rotate(-45deg); }

.gdrawer{
    position: fixed;
    inset: 0;
    z-index: 60;   /* .topbar อยู่ที่ 40 */
}
.gdrawer[hidden]{
    display: none;
}
.gdrawer-scrim{
    position: absolute;
    inset: 0;
    background: rgba(11,30,63,.45);
    opacity: 0;
    transition: opacity .28s ease;
}
.gdrawer.is-open .gdrawer-scrim{
    opacity: 1;
}
.gdrawer-panel{
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(320px, 86vw);
    display: flex;
    flex-direction: column;
    background: #fff;
    box-shadow: -8px 0 30px rgba(11,30,63,.18);
    transform: translateX(100%);
    transition: transform .3s cubic-bezier(.22,1,.36,1);
}
.gdrawer.is-open .gdrawer-panel{
    transform: none;
}

.gdrawer-head{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
}
.gdrawer-brand{
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: .5px;
    line-height: 1.2;
}
.gdrawer-brand img{
    width: 34px;
    height: 34px;
    object-fit: contain;
    flex: none;
}
.gdrawer-brand small{
    display: block;
    font-weight: 500;
    font-size: 10px;
    color: var(--muted);
    letter-spacing: 0;
}
.gdrawer-x{
    flex: none;
    width: 36px;
    height: 36px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    color: var(--navy);
    font-size: 15px;
    line-height: 1;
}

.gdrawer-body{
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 4px 10px 14px;
}
.gdrawer-label{
    padding: 12px 10px 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .6px;
    color: var(--muted);
}
.gdrawer-item{
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 11px 10px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: 600;
    text-align: left;
    transition: background .15s ease;
}
.gdrawer-item:hover{
    background: var(--sky);
}
.gdrawer-item.is-current{
    background: var(--sky);
    color: var(--navy);
}
.gdrawer-item.is-current::after{
    content: '';
    width: 7px;
    height: 7px;
    margin-left: auto;
    border-radius: 50%;
    background: var(--gold2);
}
.gdrawer-item img{
    width: 22px;
    height: 22px;
    object-fit: contain;
    flex: none;
}
.gdrawer-emoji{
    width: 22px;
    flex: none;
    text-align: center;
    font-size: 18px;
}

.gdrawer-foot{
    padding: 14px 16px;
    padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--line);
}

/* กันหน้าข้างหลังเลื่อนตอนเมนูเปิด */
body.gdrawer-lock{
    overflow: hidden;
}

@media (prefers-reduced-motion: reduce){
    .gdrawer-scrim,
    .gdrawer-panel,
    .gdrawer-item,
    .ham-ico i{
        transition: none;
    }
}


/* ----------  Ads slide  ----------------------- */
.ads-slider {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.ads-track {
    display: flex !important;
    flex-direction: row !important;
    width: 100%;
    transition: transform 0.9s ease-in-out;
}

.ads-item {
    flex: 0 0 100% !important;
    width: 100% !important;
    min-width: 100% !important;
}

.ads-item img {
    width: 100% !important;
    height: auto;
    display: block;
    border-radius: 10px;
    margin-bottom: 10px;
}

/* ---------------------------------------- */

.menu-buttons {
    display: flex;
    gap: 8px;
    padding: 7px;
    background: #f1eafa;
    border-radius: 10px;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 10px;
}

.menu-btn {
    flex: 1;
    height: 64px;
    border: none;
    background: #fff;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
    color: #5145cd;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.menu-btn i {
    font-size: 19px;
}

.menu-btn span {
    font-size: 11px;
    font-weight: 500;
}

/* ปุ่มที่เลือกอยู่ */
.menu-btn.active {
    background: #fff6d8;
    color: #e7a900;
    border: 1px solid #f3d77a;
}

/* ตอนเอาเมาส์ชี้ */
.menu-btn:hover {
    transform: translateY(-1px);
    background: #f8f7ff;
}

.menu-btn.active:hover {
    background: #fff3ce;
}

/* ------------------ ส่วน My goal------------------------------ */
.goal-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border: 6px solid #f4cf22;
    border-radius: 14px;
    padding: 8px;
    box-sizing: border-box;
    font-family: Arial, "Noto Sans Thai", sans-serif;
    box-shadow: 0 3px 12px rgba(0,0,0,0.08);
    margin-bottom: 10px;
}

/* Header */
.goal-header {
    height: 42px;
    display: flex;
    align-items: center;
    padding: 0 8px;
    background: linear-gradient(
        90deg,
        #ffe77a,
        #f5cf28,
        #ffe88a
    );
    border-radius: 9px;
}

.goal-title {
    display: flex;
    align-items: baseline;
    gap: 7px;
}

.goal-title strong {
    font-size: 18px;
    color: #111;
}

.goal-title span {
    font-size: 11px;
    font-weight: 600;
    color: #111;
}


/* Overall */
.overall-box {
    margin-top: 6px;
    padding: 8px 10px;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
}

.overall-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.overall-top strong {
    font-size: 12px;
    color: #243b68;
}

.overall-percent {
    margin-top: 1px;
    font-size: 26px;
    line-height: 28px;
    font-weight: 800;
    color: #183b79;
}

.overall-percent span {
    font-size: 15px;
}

.overall-count {
    text-align: right;
}

.overall-count strong {
    display: block;
    font-size: 11px;
}

.overall-count span {
    font-size: 9px;
    color: #444;
}


/* Main progress */
.progress-bar {
    width: 100%;
    height: 8px;
    margin-top: 3px;
    background: #e9e9e9;
    border-radius: 20px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(
        90deg,
        #f07d00,
        #ffbd24
    );
    border-radius: 20px;
}


/* Goal section */
.goals-section {
    margin-top: 5px;
    padding: 8px;
    border: 1px solid #e7e7e7;
    border-radius: 8px;
}

.goals-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.goals-title strong {
    font-size: 12px;
    color: #243b68;
}

.goals-title button {
    border: none;
    background: none;
    color: #ef8a00;
    font-size: 12px;
    cursor: pointer;
}


/* Goal list */
.goal-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 7px;
}

.goal-item {
    min-width: 0;
    padding: 7px 5px;
    background: #f7fbff;
    border: 1px solid #e5edf5;
    border-radius: 7px;
    text-align: center;
}


/* Icon */
.goal-icon {
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 38px;
}


/* Goal name */
.goal-name {
    min-height: 32px;
    font-size: 9px;
    font-weight: 600;
    color: #25375d;
}


/* Mini progress */
.goal-progress {
    margin-top: 4px;
    text-align: left;
}

.goal-progress strong {
    font-size: 9px;
    color: #25375d;
}

.mini-progress {
    width: 100%;
    height: 4px;
    margin-top: 2px;
    background: #e5e5e5;
    border-radius: 10px;
    overflow: hidden;
}

.mini-progress div {
    height: 100%;
    background: #ff9800;
    border-radius: 10px;
}

.goal-item:first-child .mini-progress div {
    background: #28ad55;
}


/* Status */
.goal-status {
    display: inline-block;
    margin-top: 6px;
    padding: 3px 7px;
    border-radius: 20px;
    font-size: 12px;
}

.goal-status.success {
    color: #279c52;
    background: #e3f7e9;
}

.goal-status.waiting {
    color: #e98a00;
    background: #fff1dc;
}

@media (max-width: 400px) {

    .goal-card {
        max-width: 100%;
    }

    .goal-list {
        gap: 5px;
    }

    .goal-icon {
        font-size: 40px;
        height: 55px;
    }

    .goal-name {
        font-size: 12px;
    }
}

/* --------------------- กระเป๋าเงิน ---------------------------------- */

.lsp-card {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    font-family: "Prompt", sans-serif;
    margin-bottom: 10px;
}

/* =========================
   HEADER
========================= */

.lsp-header {
    position: relative;
    height: 118px;
    padding: 15px 18px;
    box-sizing: border-box;

    background: linear-gradient(
        135deg,
        #172f73 0%,
        #071d51 100%
    );

    border-radius:  14px;
    color: #fff;
    overflow: hidden;

    box-shadow: 0 3px 8px rgba(0,0,0,.18);
    
}

/* icon + title */

.lsp-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lsp-icon {
    width: 30px;
    height: 30px;
    border-radius: 6px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #394fbd;
    color: #fff;

    font-size: 15px;
}

.lsp-title .title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
}

.lsp-title .date {
    margin-top: 3px;
    font-size: 8px;
    color: rgba(255,255,255,.65);
}

/* คะแนน */

.lsp-point {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);

    bottom: 10px;

    font-size: 36px;
    font-weight: 700;
    line-height: 1;

    letter-spacing: .5px;
}

.lsp-point span {
    font-size: 25px;
    vertical-align: middle;
    margin-left: 4px;
}

.lsp-label {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 1px;

    font-size: 7px;
    color: rgba(255,255,255,.65);
}

/* วงกลมตกแต่งด้านขวา */

.lsp-bg-icon {
    position: absolute;
    right: -5px;
    top: 12px;

    width: 65px;
    height: 65px;

    border-radius: 50%;

    background: rgba(57,79,189,.18);

    display: flex;
    align-items: center;
    justify-content: center;

    color: rgba(255,255,255,.08);

    font-size: 25px;
}

/* =========================
   MENU
========================= */

.lsp-menu {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 10px;
    padding-top: 30px;
    margin-top: -18px;
    box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;
    background: #f7f9ff;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
}

/* ปุ่ม */

.lsp-menu-item {
    position: relative;

    height: 72px;

    border: none;
    border-radius: 12px;

    background: #fff;

    cursor: pointer;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 5px;

    box-shadow:
        0 3px 10px rgba(36,64,120,.08);

    transition: .2s;
}

.lsp-menu-item:hover {
    transform: translateY(-2px);
    box-shadow:
        0 5px 14px rgba(36,64,120,.13);
}

/* icon */

.menu-icon {
    width: 34px;
    height: 34px;

    border-radius: 50%;

    background: #eef2ff;

    display: flex;
    align-items: center;
    justify-content: center;

    color: #3156d8;

    font-size: 15px;
}

/* text */

.menu-text {
    font-size: 10px;
    font-weight: 500;

    color: #26345c;
}

/* เส้นด้านล่าง */

.menu-line {
    position: absolute;

    bottom: 3px;

    width: 17px;
    height: 3px;

    border-radius: 10px;

    background: #3156d8;
}

/* --------------------- ภาพรวมเกรดเฉลี่ย ----------------- */

.learning-card {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    padding: 16px;
    box-sizing: border-box;

    background: #fff;

    border: 1px solid #e5e8ef;
    border-radius: 12px;

    box-shadow: 0 2px 8px rgba(0, 0, 0, .05);

    font-family: "Prompt", sans-serif;
    margin-bottom: 10px;
}

/* =========================
   HEADER
========================= */

.learning-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: 15px;
}

.learning-header h3 {
    margin: 0;

    font-size: 16px;
    font-weight: 700;

    color: #173a91;
}

.learning-header span {
    padding: 6px 10px;

    border: 1px solid #dce4f4;
    border-radius: 8px;

    background: #f8faff;

    color: #53648a;

    font-size: 10px;
    font-weight: 500;
}

/* =========================
   CONTENT
========================= */

.learning-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

/* =========================
   LEFT
========================= */

.learning-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    padding: 10px 20px 10px 5px;

    border-right: 1px solid #edf0f5;
}

/* Progress circle */

.progress-circle {
    --size: 126px;

    width: var(--size);
    height: var(--size);

    border-radius: 50%;

    background:
        conic-gradient(
            #174fc7 calc(var(--progress) * 1%),
            #dce3f3 0
        );

    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;
}

/* ทำวงกลมตรงกลาง */

.progress-circle::before {
    content: "";

    position: absolute;

    width: 100%;
    height: 100%;

    border-radius: 50%;

    background:
        conic-gradient(
            #1f58d7 calc(var(--progress) * 1%),
            transparent 0
        );

    -webkit-mask:
        radial-gradient(
            farthest-side,
            transparent calc(100% - 8px),
            #000 calc(100% - 7px)
        );

    mask:
        radial-gradient(
            farthest-side,
            transparent calc(100% - 8px),
            #000 calc(100% - 7px)
        );
}

.progress-inner {
    position: relative;

    width: 102px;
    height: 102px;

    background: #fff;

    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;
}

.progress-inner strong {
    color: #173a91;

    font-size: 32px;
    font-weight: 600;
}

/* Status */

.learning-status {
    text-align: center;

    margin-top: 24px;
}

.learning-status small {
    display: block;

    font-size: 10px;

    color: #4d67a0;

    margin-bottom: 4px;
}

.learning-status strong {
    display: block;

    font-size: 17px;

    color: #173a91;
}

/* =========================
   RIGHT
========================= */

.learning-right {
    padding-left: 18px;
}

/* Score */

.score-box {
    padding-bottom: 20px;

    border-bottom: 1px solid #edf0f5;
}

.score-box small,
.rank-box small {
    display: block;

    font-size: 11px;

    color: #53648a;

    margin-bottom: 3px;
}

.score-box > strong {
    display: block;

    font-size: 28px;

    line-height: 1.2;

    color: #173a91;
}

/* Stars */

.stars {
    display: flex;
    gap: 2px;

    margin-top: 8px;

    color: #f4a900;

    font-size: 18px;
}

/* =========================
   RANK
========================= */

.rank-box {
    position: relative;

    padding-top: 20px;

    min-height: 105px;
}

.rank-box > strong {
    display: block;

    color: #173a91;

    font-size: 17px;
}

.rank-box > strong span {
    font-size: 13px;
    font-weight: 400;
}

/* Chart */

.chart-icon {
    position: absolute;

    right: 5px;
    bottom: 0;

    width: 58px;
    height: 58px;

    display: flex;
    align-items: center;
    justify-content: center;

    color: #6c98e8;

    font-size: 43px;
}


/* ------------------------ กราฟ 8 ด้าน นักเรียน ------------------------ */

.matrix-card {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;

    padding: 14px 12px 10px;

    box-sizing: border-box;

    background: #fff;

    border: 1px solid #e4e7ed;
    border-radius: 13px;

    box-shadow: 0 2px 8px rgba(0,0,0,.04);

    font-family: "Prompt", sans-serif;
    color: #173b91;
    margin-bottom: 10px;
}

/* =========================
   HEADER
========================= */

.matrix-header {
    padding-left: 2px;
}

.matrix-header h3 {
    margin: 0;

    font-size: 15px;
    font-weight: 700;

    color: #173b91;
}

.matrix-header p {
    margin: 3px 0 0;

    font-size: 8px;

    color: #6073a0;
}


/* =========================
   CHART AREA
========================= */

.matrix-chart {
    position: relative;

    width: 100%;
    height: 260px;

    margin-top: 4px;
}

.radar-svg {
    position: absolute;

    width: 270px;
    height: 270px;

    left: 50%;
    top: -20px;

    transform: translateX(-50%);

    overflow: visible;
}


/* Grid */

.grid-line {
    fill: none;

    stroke: #dce4f3;
    stroke-width: 1;
}

.axis {
    stroke: #e3e8f2;
    stroke-width: 1;
}


/* Score */

.score-area {
    fill: rgba(75, 117, 220, .16);
}

.score-line {
    fill: none;

    stroke: #4b75dc;
    stroke-width: 2;
}

.score-point {
    fill: #4b75dc;
}


/* =========================
   CENTER SCORE
========================= */

.matrix-score {
    position: absolute;

    left: 50%;
    top: 120px;

    transform: translate(-50%, -50%);

    text-align: center;

    pointer-events: none;
}

.matrix-score strong {
    display: block;

    font-size: 27px;
    line-height: 1;

    color: #173b91;
}

.matrix-score span {
    display: block;

    margin-top: 4px;

    font-size: 8px;

    color: #63739b;
}


/* =========================
   ITEMS
========================= */

.matrix-item {
    position: absolute;

    display: flex;
    align-items: center;

    gap: 6px;

    white-space: nowrap;
}

.matrix-item small {
    display: block;

    font-size: 7px;

    color: #586b98;

    line-height: 1.3;
}

.matrix-item strong {
    display: block;

    margin-top: 1px;

    font-size: 11px;

    color: #173b91;
}


/* Icon */

.matrix-icon {
    width: 28px;
    height: 28px;

    flex: 0 0 28px;

    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 13px;

    background: #f2f6ff;
}


/* Colors */

.matrix-icon.green {
    color: #38a56b;
    background: #effaf4;
}

.matrix-icon.red {
    color: #e94a5d;
    background: #fff1f3;
}

.matrix-icon.blue {
    color: #4171df;
    background: #f0f5ff;
}

.matrix-icon.orange {
    color: #e89b20;
    background: #fff7e9;
}

.matrix-icon.purple {
    color: #8054db;
    background: #f5f0ff;
}


/* =========================
   POSITION
========================= */

/* 1 */
.item-1 {
    top: 0;
    left: 50%;

    transform: translateX(-50%);
}

/* 2 */
.item-2 {
    top: 50px;
    right: 0;
}

/* 3 */
.item-3 {
    top: 123px;
    right: -1px;
}

/* 4 */
.item-4 {
    top: 185px;
    right: 4px;
}

/* 5 */
.item-5 {
    bottom: 20px;
    left: 50%;

    transform: translateX(-50%);
}

/* 6 */
.item-6 {
    top: 185px;
    left: 3px;
}

/* 7 */
.item-7 {
    top: 123px;
    left: -1px;
}

/* 8 */
.item-8 {
    top: 50px;
    left: 0;
}

/* ============================================================
   เมนูทำรายการ 8 ช่อง (includes/profile_tabs.php)
   ============================================================ */
.ptabs {
    margin-bottom: 18px;
}

.ptabs-t {
    margin: 0 0 10px;
    font-size: 16px;
    font-weight: 700;
    color: var(--navy);
}

.ptabs-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}

.ptab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 66px;
    padding: 10px 4px;
    background: #fff;
    border: 1px solid #e6e8ee;
    border-radius: 8px;
    color: var(--navy);
    text-align: center;
    transition: .15s;
}

.ptab svg {
    width: 22px;
    height: 22px;
}

.ptab span {
    font-size: 10.5px;
    font-weight: 600;
    line-height: 1.2;
}

.ptab:hover {
    border-color: #c9cfdc;
}

.ptab.on {
    background: #fff4e0;
    border-color: #fff4e0;
    color: #f5a623;
}

@media (min-width: 768px) {
    .ptabs-grid {
        grid-template-columns: repeat(8, 1fr);
    }
}

/* หน้าที่ไม่มีแถบบน/เมนูล่าง ($__noChrome) — ไม่ต้องเว้นที่ให้เมนูล่าง */
.app.no-chrome {
    padding-bottom: 0;
}

/* ============================================================
   หน้าอัพเดตโปรไฟล์ (profile.php)
   ============================================================ */
.pf-head {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 8px 16px;
    background: #fff;
    border-bottom: 1px solid var(--line);
}

.pf-head h1 {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
    color: #1f2b45;
}

.pf-back {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 1.5px solid #1f2b45;
    border-radius: 8px;
    color: #1f2b45;
}

.pf-back svg {
    width: 18px;
    height: 18px;
}

.pf-card {
    background: #fff;
    border: 1px solid #eceef3;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(11, 30, 63, .06);
    padding: 18px 16px;
    margin-bottom: 16px;
}

.pf-card-t {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: var(--navy);
}

.pf-card-sub {
    margin: 2px 0 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e3e6ec;
    font-size: 11px;
    color: #5b6780;
}

/* การ์ดรูปโปรไฟล์ */
.pf-avatar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    padding: 20px 16px 22px;
}

.pf-avatar-ring {
    width: 150px;
    height: 150px;
    padding: 5px;
    border: 2px solid #e8c766;
    border-radius: 50%;
    background: #fff;
}

.pf-avatar-ring img {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.pf-btn-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 150px;
    padding: 9px 26px;
    background: var(--navy);
    color: #fff;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

/* ช่องกรอก */
.pf-field {
    margin-bottom: 14px;
}

.pf-field label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #1f2b45;
}

.pf-field label .req {
    color: var(--danger);
}

.pf-input {
    width: 100%;
    height: 44px;
    padding: 0 12px;
    background: #fff;
    border: 1px solid #d9dde5;
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    color: #1f2b45;
    text-align: center;
    text-align-last: center;
}

.pf-input::placeholder {
    color: #a3abba;
}

.pf-input:focus {
    outline: none;
    border-color: var(--navy);
}

select.pf-input:invalid,
select.pf-input option[value=""] {
    color: #a3abba;
}

.pf-input.pf-locked,
.pf-input:disabled {
    background: #fff;
    color: #1f2b45;
    font-weight: 600;
    -webkit-text-fill-color: #1f2b45;
    opacity: 1;
}

.pf-fam-group + .pf-fam-group {
    margin-top: 34px;
}

.pf-save {
    display: block;
    width: 100%;
    height: 44px;
    margin-top: 22px;
    border: 0;
    border-radius: 6px;
    background: var(--navy);
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.pf-save:active {
    transform: scale(.99);
}

@media (min-width: 768px) {
    .pf-page {
        max-width: 720px;
        margin: 0 auto;
    }
}

/* ============================================================
   หน้าผลการเรียน (grades.php) — ใช้ .pf-* ร่วมกับหน้าโปรไฟล์
   ============================================================ */
.pf-card-sub.gr-sub-flat {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: 0;
}

.gr-wrap {
    padding: 22px 16px 26px;
}

.gr-label {
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 500;
    color: #1f2b45;
}

.gr-add-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 44px;
    margin-bottom: 14px;
    border: 0;
    border-radius: 6px;
    background: var(--navy);
    color: #fff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
}

.gr-add-btn svg {
    width: 20px;
    height: 20px;
}

.gr-box {
    padding: 12px;
    margin-bottom: 12px;
    border: 1px solid #d9dde5;
    border-radius: 6px;
    background: #fff;
}

.gr-title {
    margin: 2px 0 10px;
    font-size: 14px;
    font-weight: 500;
    color: #1f2b45;
}

.gr-title small {
    margin-left: 6px;
    font-size: 11px;
    color: #7d8aa0;
}

.gr-gpa {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    height: 44px;
    padding: 0 12px;
    margin-bottom: 8px;
    border: 1px solid #d9dde5;
    border-radius: 6px;
    font-size: 14px;
    color: #1f2b45;
}

.gr-gpa b {
    font-weight: 500;
}

.gr-teacher {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 64px;
    padding: 10px 12px;
    border: 1px solid #d9dde5;
    border-radius: 6px;
}

.gr-t-av {
    flex: 0 0 auto;
    width: 60px;
    height: 60px;
    padding: 2px;
    border: 1.5px solid #e8c766;
    border-radius: 50%;
}

.gr-t-av img {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.gr-t-info {
    flex: 1;
    min-width: 0;
    line-height: 1.3;
}

.gr-t-info b {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: var(--navy);
}

.gr-t-info span {
    display: block;
    font-size: 12px;
    color: #5b6aa0;
}

.gr-status {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 56px;
    font-size: 11px;
}

.gr-status svg {
    width: 28px;
    height: 28px;
}

.gr-status.ok {
    color: #1faa3b;
}

.gr-status.ok svg circle {
    fill: #1faa3b;
}

.gr-status.wait {
    color: #f5a623;
}

.gr-status.wait svg circle {
    fill: #f5a623;
}

.gr-status.bad {
    color: var(--danger);
}

.gr-status.bad svg circle {
    fill: var(--danger);
}

.gr-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 12px;
}

.gr-actions form {
    margin: 0;
}

.gr-cheer {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    padding: 0 12px 0 6px;
    margin-right: auto;
    border-radius: 4px;
    border: 0;
    background: linear-gradient(90deg, #c9a13c 0%, #f1cf5f 100%);
    color: #fff;
    font-family: inherit;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
}

.gr-cheer span {
    font-size: 18px;
    line-height: 1;
}

.gr-btn {
    height: 34px;
    border: 0;
    border-radius: 3px;
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.gr-edit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 100px;
    background: var(--navy);
}

.gr-del {
    min-width: 58px;
    background: #2d2d2d;
}

.gr-warn {
    margin: 0 0 12px;
    padding: 8px 10px;
    border-radius: 6px;
    background: #fff4e0;
    color: #b7791f;
    font-size: 12px;
}

.gr-note {
    color: var(--danger) !important;
}

/* ---- ฟอร์มเพิ่ม/แก้ไขผลการเรียน (grades.php?form=1 / ?edit=ID) ---- */
.gr-subj-head2,
.gr-subj2 {
    display: grid;
    grid-template-columns: 40% 1fr 1fr 1fr 34px;
    gap: 5px;
    align-items: center;
}

.gr-subj-del2 {
    display: grid;
    place-items: center;
    width: 34px;
    height: 44px;
    padding: 0;
    border: 1px solid #f3c7c7;
    border-radius: 6px;
    background: #fff5f5;
    color: var(--danger);
    cursor: pointer;
}

.gr-subj-del2 svg {
    width: 18px;
    height: 18px;
}

.gr-subj-del2:hover {
    background: #fde2e2;
}

.gr-subj-head2 {
    margin: 6px 0 6px;
    font-size: 13px;
    font-weight: 600;
    color: #1f2b45;
    text-align: center;
}

.gr-subj-head2 span:first-child {
    text-align: left;
}

.gr-subj2 {
    margin-bottom: 8px;
}

.gr-subj2 .pf-input {
    padding: 0 4px;
}

.gr-subj2 .pf-input:first-child {
    padding: 0 12px;
    text-align: left;
    text-align-last: left;
}

.gr-add-subj {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 40%;
    height: 40px;
    margin: 2px 0 18px;
    border: 0;
    border-radius: 4px;
    background: var(--navy);
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.gr-add-subj svg {
    width: 18px;
    height: 18px;
}

.gr-gpa-calc {
    margin-bottom: 0;
}

.gr-sec {
    margin: 40px 0 12px;
    padding-bottom: 10px;
    border-bottom: 1.5px solid #cfd4dd;
    font-size: 14px;
    font-weight: 500;
    color: #1f2b45;
}

.gr-sec2 {
    margin: 24px 0 8px;
    font-size: 14px;
    font-weight: 500;
    color: #1f2b45;
}

.gr-search {
    position: relative;
}

.gr-search svg {
    position: absolute;
    left: 12px;
    top: 50%;
    width: 22px;
    height: 22px;
    transform: translateY(-50%);
    color: #1f2b45;
    pointer-events: none;
}

.gr-search input {
    width: 100%;
    height: 44px;
    padding: 0 40px;
    border: 1px solid #d9dde5;
    border-radius: 6px;
    background: #fff;
    font-family: inherit;
    font-size: 14px;
    text-align: center;
    -webkit-appearance: none;
    appearance: none;
}

.gr-search input:focus {
    outline: none;
    border-color: var(--navy);
}

.gr-search input::placeholder {
    color: #a3abba;
}

.gr-pick {
    position: relative;
    margin-bottom: 10px;
    cursor: pointer;
}

.gr-pick[hidden] {
    display: none;
}

.gr-pick input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.gr-pick-ic {
    color: #6b7280;
}

.gr-pick-ic circle {
    fill: none;
    stroke: #6b7280;
    stroke-width: 1.4;
}

.gr-pick-ic polyline {
    stroke: #6b7280;
}

.gr-pick:has(input:checked) {
    border-color: #1faa3b;
}

.gr-pick:has(input:checked) .gr-pick-ic {
    color: #1faa3b;
}

.gr-pick:has(input:checked) .gr-pick-ic circle {
    fill: #1faa3b;
    stroke: #1faa3b;
}

.gr-pick:has(input:checked) .gr-pick-ic polyline {
    stroke: #fff;
}

.gr-submit {
    margin-top: 18px;
}

.gr-empty {
    margin: 8px 0 0;
    text-align: center;
    font-size: 13px;
    color: #7d8aa0;
}

/* ============================================================
   หน้ารางวัล (awards.php) — ใช้ .pf-* / .gr-* ร่วม
   ============================================================ */
.aw-wrap {
    padding: 20px 18px 34px;
}

.aw-add {
    margin: 26px 0 0;
}

.aw-sec {
    margin-top: 30px;
}

.aw-item {
    padding: 8px 10px 10px;
    margin-bottom: 12px;
    border: 1.5px solid #f2c94c;
    border-radius: 8px;
    background: #fff;
}

.aw-main {
    display: flex;
    align-items: center;
    gap: 12px;
}

.aw-foot {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #f3ead0;
}

.aw-foot form {
    margin: 0;
}

.aw-created {
    flex: 1;
    min-width: 0;
    font-size: 11.5px;
    color: #7d8aa0;
}

.aw-btn {
    height: 30px;
    min-width: 64px;
    padding: 0 12px;
    font-size: 13px;
}

/* ช่องเลือกเอกสารแนบ (activities.php) */
.pf-field .ac-file {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    height: 44px;
    padding: 0 12px;
    border: 1px dashed #c9cfdc;
    border-radius: 6px;
    background: #fafbfd;
    color: var(--navy);
    font-size: 13px;
    cursor: pointer;
}

.ac-file svg {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
}

.ac-file span {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.aw-upload-hint {
    margin: -8px 0 14px;
    text-align: center;
    font-size: 11.5px;
    color: #7d8aa0;
}

.aw-thumb {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 90px;
    height: 84px;
    padding: 5px;
    border: 1px solid #d9dde5;
    border-radius: 8px;
    background: #fff;
    color: #d9a520;
    overflow: hidden;
}

.aw-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 3px;
}

.aw-thumb svg {
    width: 40px;
    height: 40px;
}

.aw-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.aw-info b {
    font-size: 14px;
    font-weight: 700;
    color: #1d3f8f;
}

.aw-desc {
    font-size: 13px;
    color: #4a6391;
    line-height: 1.35;
}

.aw-date {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    font-size: 13px;
    color: #1f2b45;
}

.aw-date svg {
    width: 18px;
    height: 18px;
}

.aw-upload {
    display: grid;
    place-items: center;
    min-height: 170px;
    margin-bottom: 16px;
    border: 1.5px dashed #c9cfdc;
    border-radius: 8px;
    background: #fafbfd;
    overflow: hidden;
    cursor: pointer;
}

.aw-upload img {
    width: 100%;
    max-height: 260px;
    object-fit: contain;
}

.aw-upload-ph {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 20px;
    color: var(--navy);
    text-align: center;
}

.aw-upload-ph[hidden] {
    display: none;
}

.aw-upload-ph svg {
    width: 34px;
    height: 34px;
}

.aw-upload-ph b {
    font-size: 14px;
    font-weight: 600;
}

.aw-upload-ph small {
    font-size: 11px;
    color: #7d8aa0;
}

/* ============================================================
   เข้าสู่ระบบ (login.php)
   ============================================================ */
.lg-top .brand span {
    font-size: 19px;
    color: #3a3a3a;
}

.lg-top .brand small {
    font-size: 12px;
    color: #4a4a4a;
}

.lg-top .logo-img {
    width: 46px;
    height: 46px;
}

.pf-back.lg-back {
    position: static;
    transform: none;
    width: 44px;
    height: 38px;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .08);
    color: #111;
}

.lg-banner {
    display: block;
    width: 100%;
    height: auto;
    margin: 6px 0 20px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(11, 30, 63, .08);
}

.lg-card {
    padding: 24px 20px 30px;
}

.lg-t {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: var(--navy);
}

.lg-t span {
    color: #e0701f;
}

.lg-sub {
    margin: 2px 0 18px;
    font-size: 13px;
    color: #4a6391;
}

.pf-field.lg-field label {
    font-size: 16px;
    font-weight: 500;
    color: var(--navy);
}

.lg-field .pf-input {
    height: 46px;
    font-size: 16px;
}

.lg-forgot {
    display: inline-block;
    margin-top: 2px;
    font-size: 15px;
    font-weight: 500;
    color: var(--navy);
}

.pf-save.lg-submit {
    height: 48px;
    margin-top: 28px;
    font-size: 16px;
}

.lg-reg {
    margin-top: 16px;
    text-align: center;
    font-size: 12.5px;
    color: #7d8aa0;
}

.lg-reg a {
    color: var(--blue);
    font-weight: 700;
}

/* ============================================================
   ฟีด (feed.php) — เพื่อนที่แนะนำ + การ์ดโพสต์ "กิจกรรมล่าสุด"
   ============================================================ */
.fd-friends {
    margin: 18px -4px 14px;
    padding: 12px 10px 14px;
    border-radius: 14px;
    background: #fafafd;
    scroll-margin-top: 12px;
}

.fd-friends-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    padding: 0 4px;
}

.fd-friends-head h3 {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #2d2d3a;
}

.fd-friends-head h3 svg {
    width: 20px;
    height: 20px;
    fill: #8b74e6;
}

.fd-friends-head a {
    font-size: 13px;
    font-weight: 500;
    color: #6d4fd8;
}

.fd-friends-row {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - 16px) / 3);
    gap: 8px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    padding: 2px 2px 6px;
}

.fd-friends-row::-webkit-scrollbar {
    display: none;
}

.fd-friend {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 8px 12px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(40, 30, 90, .08);
    text-align: center;
    scroll-snap-align: start;
}

.fd-friend-add {
    position: absolute;
    top: 7px;
    right: 7px;
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #6d4fd8;
}

.fd-friend-add svg {
    width: 14px;
    height: 14px;
    fill: #fff;
}

.fd-friend-av {
    width: 60px;
    height: 60px;
    margin-bottom: 6px;
    padding: 2px;
    border: 1.5px solid #d9dce5;
    border-radius: 50%;
}

.fd-friend-av img {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.fd-friend b {
    max-width: 100%;
    overflow: hidden;
    font-size: 13px;
    font-weight: 700;
    color: #2d2d3a;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.fd-friend > span {
    max-width: 100%;
    overflow: hidden;
    font-size: 11px;
    color: #6b7280;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.fd-friend form {
    width: 100%;
    margin: 8px 0 0;
}

.fd-friend button {
    width: 100%;
    height: 26px;
    border: 1px solid #8b74e6;
    border-radius: 7px;
    background: #fff;
    color: #6d4fd8;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.fd-friend button:hover {
    background: #f3f0fd;
}

.fd-latest {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 4px 0 12px;
    padding: 5px 12px 5px 8px;
    border-radius: 6px;
    background: #f1f1f4;
    font-size: 15px;
    font-weight: 600;
    color: #4b4b57;
}

.fd-latest svg {
    width: 18px;
    height: 18px;
    fill: #9a86ea;
}

.fd-post {
    padding: 0 0 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid #e3e6ec;
    scroll-margin-top: 12px;
}

.fd-post-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.fd-post-av {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    padding: 2px;
    border: 1.5px solid #d9dce5;
    border-radius: 50%;
}

.fd-post-av img {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.fd-post-who {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.fd-post-who b {
    font-size: 16px;
    font-weight: 700;
    color: var(--navy);
}

.fd-post-who span {
    font-size: 12px;
    color: #4a6391;
}

.fd-verified {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
}

.fd-laurel {
    width: 10px;
    height: 26px;
    margin-right: -3px;
    position: relative;
    z-index: 1;
}

.fd-laurel-r {
    margin: 0 0 0 -3px;
    transform: scaleX(-1);
}

.fd-verified-pill {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px 3px 5px;
    border: 1px solid #d9a520;
    border-radius: 6px;
    background: linear-gradient(180deg, #1b3a8a 0%, #0b1e3f 100%);
    color: #fff;
}

.fd-verified-pill svg {
    width: 15px;
    height: 15px;
}

.fd-verified-pill b {
    display: block;
    font-size: 8.5px;
    font-weight: 600;
    line-height: 1.2;
}

.fd-verified-pill small {
    display: block;
    font-size: 6px;
    line-height: 1.2;
    opacity: .85;
}

.fd-media {
    position: relative;
    overflow: hidden;
    border-radius: 14px;
    background: #e9ecf2;
}

.fd-media > img,
.fd-media > video {
    display: block;
    width: 100%;
    max-height: 520px;
    object-fit: cover;
}

.fd-media > video {
    background: #000;
    object-fit: contain;
}

.fd-share {
    position: absolute;
    top: 10px;
    right: 10px;
    display: grid;
    place-items: center;
    width: 40px;
    height: 32px;
    border: 0;
    border-radius: 8px;
    background: rgba(20, 20, 24, .7);
    color: #fff;
    cursor: pointer;
}

.fd-share svg {
    width: 20px;
    height: 20px;
}

.fd-received {
    position: absolute;
    left: 6px;
    bottom: 48px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.fd-received span {
    position: relative;
    display: block;
    width: 30px;
    height: 30px;
    border-radius: 7px;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .25);
}

.fd-received img {
    width: 100%;
    height: 100%;
    border-radius: 7px;
    object-fit: cover;
}

.fd-received[hidden] {
    display: none;
}

/* ของขวัญที่เพิ่งส่ง: เด้งเข้ามา */
.fd-received span.fd-new {
    animation: fdGiftIn .6s cubic-bezier(.2, 1.6, .4, 1), fdBob 2.4s ease-in-out .6s infinite;
}

@keyframes fdGiftIn {
    0% { transform: scale(0) rotate(-30deg); }
    60% { transform: scale(1.4) rotate(8deg); }
    100% { transform: scale(1) rotate(0); }
}

/* ของขวัญบนโพสต์ลอยขึ้นลงเบาๆ ไม่พร้อมกัน */
.fd-received span {
    animation: fdBob 2.4s ease-in-out infinite;
}

.fd-received span:nth-child(2) { animation-delay: -.8s; }
.fd-received span:nth-child(3) { animation-delay: -1.6s; }

@keyframes fdBob {
    0%, 100% { transform: translateY(0) rotate(-3deg); }
    50% { transform: translateY(-3px) rotate(3deg); }
}

@media (prefers-reduced-motion: reduce) {
    .fd-received span { animation: none; }
}

.fd-received i {
    position: absolute;
    right: -5px;
    bottom: -4px;
    padding: 0 3px;
    border-radius: 7px;
    background: #ff6b6b;
    color: #fff;
    font-size: 8px;
    font-style: normal;
    font-weight: 700;
    line-height: 13px;
}

/* โพสต์ข้อความล้วน: ของขวัญเรียงแนวนอนเหนือปุ่ม Like/ส่งกำลังใจ */
.fd-received.fd-received-row {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 2px 10px;
    padding-top: 4px;
}

.fd-received-row span {
    width: 34px;
    height: 34px;
}

.fd-received-row span:nth-child(4) { animation-delay: -.4s; }
.fd-received-row span:nth-child(5) { animation-delay: -1.2s; }
.fd-received-row span:nth-child(6) { animation-delay: -2s; }

/* ตัวเลข +n เปลี่ยน: เด้ง */
.fd-received i.fd-tick {
    animation: fdLikePop .45s cubic-bezier(.2, 1.6, .4, 1);
}

.fd-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.fd-media .fd-actions {
    position: absolute;
    left: 6px;
    right: 6px;
    bottom: 6px;
}

.fd-actions form {
    margin: 0;
}

.fd-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 30px;
    padding: 0 10px 0 7px;
    border: 0;
    border-radius: 7px;
    background: rgba(20, 20, 24, .78);
    color: #fff;
    font-family: inherit;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
}

.fd-chip svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: #7fa8ff;
    stroke-width: 2;
}

.fd-chip.is-liked svg {
    fill: #4d7cf5;
    stroke: #4d7cf5;
}

/* กดถูกใจ: หัวใจเด้ง */
.fd-chip.fd-pop svg {
    animation: fdLikePop .45s cubic-bezier(.2, 1.6, .4, 1);
}

@keyframes fdLikePop {
    0% { transform: scale(1); }
    40% { transform: scale(1.45); }
    100% { transform: scale(1); }
}

.fd-gift {
    font-size: 16px;
    line-height: 1;
}

.fd-more {
    margin-left: auto;
    padding: 0 10px;
}

.fd-more i {
    color: #f5a623;
    font-size: 16px;
    font-style: normal;
    font-weight: 700;
}

.fd-actions-plain .fd-chip {
    background: #f1f3f8;
    color: var(--navy);
}

.fd-actions-plain .fd-more i {
    color: #e0701f;
}

.fd-caption {
    display: -webkit-box;
    margin: 10px 2px 0;
    overflow: hidden;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.55;
    color: #1d3fa8;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.fd-caption.is-open {
    display: block;
    -webkit-line-clamp: unset;
}

.fd-actions-plain {
    margin-top: 10px;
}

.fd-rest {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

.fd-rest[hidden] {
    display: none;
}

.fd-rest img,
.fd-rest video {
    display: block;
    width: 100%;
    border-radius: 12px;
}

.fd-doc {
    display: block;
    padding: 10px 12px;
    border: 1px solid #e3e6ec;
    border-radius: 8px;
    font-size: 13px;
    color: var(--navy);
    word-break: break-all;
}

.fd-toast {
    position: fixed;
    left: 50%;
    bottom: 90px;
    z-index: 300;
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(20, 20, 24, .85);
    color: #fff;
    font-size: 13px;
    transform: translateX(-50%);
}

@media (max-width: 360px) {
    .fd-verified-pill small {
        display: none;
    }

    .fd-chip {
        padding: 0 8px 0 6px;
        font-size: 11px;
    }
}

/* ============================================================
   เริ่มต้นใช้งาน (start.php) — ใช้ .lg-* ของหน้า login ร่วม
   ============================================================ */
.st-page {
    padding-bottom: 26px;
}

.st-banner {
    position: relative;
}

.st-banner .lg-banner {
    margin-bottom: 0;
}

.st-robot {
    position: absolute;
    right: 4px;
    bottom: -58px;
    width: 76px;
    pointer-events: none;
}

.st-robot img {
    display: block;
    width: 100%;
    height: auto;
    mix-blend-mode: multiply;
}

.st-bubble {
    position: absolute;
    top: -30px;
    right: -4px;
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50% 50% 50% 4px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(47, 111, 224, .25);
    color: #2f6fe0;
    font-size: 20px;
    font-weight: 900;
}

.st-t {
    margin: 22px 88px 0 0;
    font-size: 19px;
    font-weight: 800;
    color: var(--navy);
}

.st-sub {
    margin: 2px 88px 16px 0;
    font-size: 13.5px;
    color: #4a6391;
}

.st-roles {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 22px;
}

.st-role {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 4px 12px;
    border: 1.5px solid transparent;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(11, 30, 63, .08);
    text-align: center;
    cursor: pointer;
    transition: .15s;
}

.st-role input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.st-role:has(input:checked) {
    border-color: #6f9bef;
    background: #f1f6ff;
}

.st-role:has(input:focus-visible) {
    outline: 2px solid var(--navy);
    outline-offset: 2px;
}

.st-ic {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin-bottom: 6px;
    border-radius: 50%;
}

.st-ic svg {
    width: 26px;
    height: 26px;
}

.st-role b {
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--navy);
}

.st-role small {
    margin-top: 4px;
    font-size: 8.5px;
    line-height: 1.35;
    color: #5b6aa0;
}

.st-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 46px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
}

.pf-save.st-btn {
    margin-top: 0;
    color: #fff;
}

.st-btn-light {
    margin-top: 14px;
    background: #b9d0fb;
    color: var(--navy);
}

.st-band {
    padding: 12px 0 18px;
    background: #eef3fb;
}

.st-band-in {
    padding: 0 16px;
}

.st-benefit {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 18px 12px 18px 22px;
    border-radius: 10px;
    background: #fff;
}

.st-benefit > div {
    flex: 1;
    min-width: 0;
}

.st-benefit h3 {
    margin: 0 0 8px;
    font-size: 15px;
    font-weight: 700;
    color: var(--navy);
}

.st-benefit ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.st-benefit li {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
    font-size: 12px;
    color: #1f2b45;
}

.st-benefit li svg {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    fill: #2f6fe0;
}

.st-shield {
    flex: 0 0 auto;
    width: 118px;
    height: 118px;
}

.st-privacy {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    padding: 12px 16px;
    border: 1px solid #fbe7c6;
    border-radius: 10px;
    background: #fffaf1;
}

.st-lock {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fdecc8;
}

.st-lock svg {
    width: 22px;
    height: 22px;
}

.st-privacy b {
    display: block;
    font-size: 12.5px;
    font-weight: 700;
    color: #d98a0b;
}

.st-privacy span {
    font-size: 11px;
    color: #3a3a3a;
}

.st-stats {
    margin-top: 12px;
    padding: 22px 20px 26px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(11, 30, 63, .06);
}

.st-stats h3 {
    margin: 0 0 18px;
    font-size: 17px;
    font-weight: 700;
    color: var(--navy);
}

.st-stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}

.st-stats-row div {
    display: flex;
    flex-direction: column;
    padding-left: 12px;
}

.st-stats-row div + div {
    border-left: 1px solid #e3e6ec;
}

.st-stats-row b {
    font-size: 22px;
    font-weight: 800;
    line-height: 1.2;
    color: #1d3f8f;
}

.st-stats-row span {
    font-size: 13px;
    color: #7d8aa0;
}

@media (max-width: 380px) {
    .st-role small {
        display: none;
    }

    .st-stats-row b {
        font-size: 18px;
    }
}

/* ============================================================
   ผู้รับรอง (endorsers.php) — ใช้การ์ดครู .gr-teacher ร่วม
   ============================================================ */
.en-wrap {
    padding-bottom: 40px;
}

.en-wrap .gr-label {
    margin-bottom: 14px;
}

.en-item {
    margin-bottom: 12px;
    padding: 12px 14px;
}

/* ============================================================
   เอกสาร (documents.php)
   ============================================================ */
.dc-wrap .gr-add-btn {
    margin-bottom: 20px;
}

.dc-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 4px 12px;
    padding: 10px 10px 10px 16px;
    border: 1px solid #c9cfdc;
    border-radius: 8px;
    background: #fff;
}

.dc-item form {
    margin: 0;
}

.dc-open {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.dc-ic {
    flex: 0 0 auto;
    width: 40px;
    height: 47px;
}

.dc-ic svg {
    display: block;
    width: 100%;
    height: 100%;
}

.dc-info {
    min-width: 0;
    display: flex;
    flex-direction: column;
    line-height: 1.35;
}

.dc-info b {
    overflow: hidden;
    font-size: 14px;
    font-weight: 700;
    color: var(--navy);
    white-space: nowrap;
    text-overflow: ellipsis;
}

.dc-info span {
    font-size: 12.5px;
    color: #5b6aa0;
}

.dc-del {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #a3abba;
    cursor: pointer;
}

.dc-del svg {
    width: 18px;
    height: 18px;
}

.dc-del:hover {
    background: #fde2e2;
    color: var(--danger);
}

/* ============================================================
   แนะนำตัว (intro.php)
   ============================================================ */
.in-form {
    padding: 24px 18px 30px;
}

.in-form .pf-field {
    margin-bottom: 18px;
}

.pf-input.pf-area {
    display: block;
    height: auto;
    min-height: 90px;
    padding: 12px 14px;
    line-height: 1.6;
    resize: vertical;
}

.in-ability {
    animation: inAbilityIn .2s ease-out;
}

.in-ability[hidden] {
    display: none;
}

@keyframes inAbilityIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: none; }
}

.in-radios {
    display: flex;
    gap: 44px;
    padding-top: 2px;
}

/* ใช้ .pf-field .in-radio เพื่อชนะกฎ .pf-field label { display:block } */
.pf-field .in-radio {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    color: #1f2b45;
    cursor: pointer;
}

.in-radio input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.in-radio i {
    display: inline-block;
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #d9dce2;
    transition: .15s;
}

.in-radio input:checked + i {
    background: #fff;
    box-shadow: inset 0 0 0 6px var(--navy);
}

.in-radio input:focus-visible + i {
    outline: 2px solid var(--navy);
    outline-offset: 2px;
}

.in-video {
    display: block;
    width: 100%;
    max-height: 240px;
    margin-bottom: 10px;
    border-radius: 6px;
    background: #000;
}

.in-video[hidden],
.in-video-note[hidden],
.in-video-del[hidden],
.pf-field .in-upload[hidden] {
    display: none;
}

.in-video-del {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    height: 38px;
    margin-bottom: 12px;
    border: 1px solid #f3c7c7;
    border-radius: 6px;
    background: #fff5f5;
    color: var(--danger);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.in-video-del svg {
    width: 16px;
    height: 16px;
}

.in-video-del:hover {
    background: #fde2e2;
}

.in-video-note {
    margin: -4px 0 10px;
    text-align: center;
    font-size: 11.5px;
    color: #b7791f;
}

/* .pf-field .in-upload ชนะกฎ .pf-field label { display:block } */
.in-upload,
.pf-field .in-upload {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    margin: 0;
    padding: 24px 16px 20px;
    border: 1.5px dashed #1d3fa8;
    border-radius: 6px;
    background: #fff;
    text-align: center;
    cursor: pointer;
}

.in-upload svg {
    width: 44px;
    height: 44px;
    margin-bottom: 6px;
}

.in-upload b {
    font-size: 14px;
    font-weight: 600;
    color: #1d3fa8;
    word-break: break-all;
}

.in-upload small {
    font-size: 12px;
    color: #7d8aa0;
}

/* ============================================================
   ทักษะ 8 ด้าน (skills.php) — กล่องคอมเมนต์ครู + คะแนนพฤติกรรม
   ============================================================ */
.sk-bar {
    margin-top: 18px;
    padding: 7px 12px;
    border-radius: 4px;
    background: var(--navy);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
}

.sk-box {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 10px;
    padding: 10px;
    border: 1px solid #cfd4dd;
    border-radius: 4px;
    background: #fff;
}

.sk-teacher {
    flex: 0 0 78px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.sk-teacher .sk-av {
    width: 52px;
    height: 52px;
    margin-bottom: 6px;
}

.sk-teacher b {
    font-size: 13px;
    font-weight: 700;
    color: var(--navy);
    word-break: break-word;
}

.sk-teacher span {
    font-size: 10px;
    color: #4a6391;
    word-break: break-word;
}

.sk-right {
    flex: 1;
    min-width: 0;
}

.sk-lbl {
    margin-bottom: 4px;
    font-size: 11.5px;
    font-weight: 600;
    color: #1f2b45;
}

.sk-comment {
    min-height: 44px;
    padding: 6px 8px;
    border: 1px solid #cfd4dd;
    border-radius: 5px;
    font-size: 11px;
    line-height: 1.5;
    color: #1d3f8f;
    word-break: break-word;
}

.sk-muted {
    color: #a3abba;
}

.sk-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 6px;
    margin-top: 10px;
}

.sk-score {
    font-size: 17px;
    font-weight: 600;
    line-height: 1.1;
    color: #1f2b45;
}

.sk-cheer {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 30px;
    padding: 0 10px 0 6px;
    border: 0;
    border-radius: 4px;
    background: linear-gradient(90deg, #c9a13c 0%, #f1cf5f 100%);
    color: #fff;
    font-family: inherit;
    font-size: 11.5px;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
}

.sk-cheer span {
    font-size: 15px;
    line-height: 1;
}

/* ============================================================
   Modal ของขวัญแห่งกำลังใจ (includes/gift_modal.php)
   ============================================================ */
.gm-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow-y: auto;
    background: rgba(11, 30, 63, .55);
}

.gm-overlay[hidden] {
    display: none;
}

.gm-sheet {
    position: relative;
    width: 100%;
    max-width: 520px;
    min-height: 100%;
    margin: 0;
    padding: 22px 14px 28px;
    background: #fff;
}

@media (min-width: 560px) {
    .gm-overlay {
        align-items: center;
        padding: 24px 0;
    }

    .gm-sheet {
        min-height: 0;
        border-radius: 16px;
        box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
    }
}

.gm-close {
    position: absolute;
    top: 14px;
    right: 14px;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 2px solid #555;
    border-radius: 50%;
    background: #fff;
    color: #555;
    cursor: pointer;
}

.gm-close svg {
    width: 20px;
    height: 20px;
}

.gm-head {
    padding: 4px 44px 0;
    margin-bottom: 16px;
    text-align: center;
}

.gm-head h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 800;
    line-height: 1.25;
    color: var(--navy);
}

.gm-head h2 span {
    color: #d9a520;
}

.gm-head p {
    margin: 2px 0 0;
    font-size: 12.5px;
    font-weight: 500;
    color: #1f2b45;
}

.gm-bal {
    display: inline-block;
    margin-top: 8px;
    padding: 3px 12px;
    border-radius: 999px;
    background: #fff4e0;
    font-size: 11.5px;
    color: #8a6a1f;
}

.gm-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px 8px;
}

.gm-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 6px 8px;
    border: 1.5px solid #f3e9d2;
    border-radius: 8px;
    background: #fdf8ee;
    box-shadow: 0 2px 6px rgba(160, 120, 40, .08);
    cursor: pointer;
    transition: .15s;
}

.gm-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.gm-card:has(input:checked) {
    border-color: #e0ac28;
    box-shadow: 0 0 0 3px rgba(224, 172, 40, .28);
}

/* LSP ไม่พอ: การ์ดจางลง (ยังมีสีและยังขยับ) มีป้ายกุญแจ "LSP ไม่พอ" และราคาเป็นสีแดง */
.gm-card.poor {
    border-color: #e6e7eb;
    background: #f6f6f8;
    box-shadow: none;
    cursor: pointer; /* กดแล้วไปหน้าเติมเงิน */
}

.gm-card.poor .gm-name,
.gm-card.poor .gm-line {
    opacity: .5;
}

.gm-card.poor .gm-img {
    opacity: .45;
}

.gm-card.poor .gm-price {
    border-color: #f3c7c7;
    background: #fff5f5;
    color: var(--danger);
}

.gm-card.poor .gm-price svg {
    fill: #e57373;
}

.gm-poor-tag {
    display: none;
}

.gm-card.poor .gm-poor-tag {
    position: absolute;
    top: 42%;
    left: 50%;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(40, 40, 48, .82);
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
    transform: translate(-50%, -50%);
}

.gm-poor-tag svg {
    width: 11px;
    height: 11px;
    fill: currentColor;
}

.gm-bal a {
    color: var(--blue);
    font-weight: 700;
}

.gm-name {
    display: flex;
    align-items: center;
    gap: 4px;
    align-self: stretch;
    min-height: 22px;
    font-size: 9.5px;
    font-weight: 700;
    line-height: 1.2;
    color: #1f2b45;
}

.gm-name i {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f1c24b, #c9921c);
    color: #fff;
    font-size: 10px;
    font-style: normal;
}

.gm-img {
    position: relative;
    display: grid;
    place-items: center;
    width: 100%;
    aspect-ratio: 188 / 176;
    margin: 4px 0 2px;
    overflow: hidden; /* ขอบรูปเป็นสีครีมเดียวกับการ์ด ตัดขอบแล้วมองไม่เห็นรอย */
    font-size: 44px;
}

.gm-img img,
.gm-emoji {
    width: 100%;
    height: 100%;
    object-fit: contain;
    mix-blend-mode: multiply;
    will-change: transform;
}

.gm-emoji {
    display: grid;
    place-items: center;
}

/* ---- Animation ของขวัญ: แต่ละชิ้นขยับคนละแบบ + ประกายวิบวับ ---- */
.gm-a-heart img  { animation: gmBeat 1.3s ease-in-out infinite; }
.gm-a-star img   { animation: gmTwirl 3s ease-in-out infinite; }
.gm-a-trophy img { animation: gmHop 1.8s cubic-bezier(.3, 0, .3, 1) infinite; transform-origin: 50% 100%; }
.gm-a-flower img { animation: gmSway 2.6s ease-in-out infinite; transform-origin: 50% 90%; }
.gm-a-book img   { animation: gmFloat 2.8s ease-in-out infinite; }
.gm-a-pencil img { animation: gmWrite 1.6s ease-in-out infinite; transform-origin: 30% 90%; }
.gm-a-bag img    { animation: gmHop 2.2s cubic-bezier(.3, 0, .3, 1) infinite; transform-origin: 50% 100%; }
.gm-a-note img   { animation: gmFloat 3.2s ease-in-out infinite; }
.gm-a-camera img { animation: gmSnap 2.6s ease-in-out infinite; }

/* แต่ละใบเริ่มไม่พร้อมกัน จะได้ไม่ขยับเป็นจังหวะเดียว */
.gm-card .gm-img img { animation-delay: calc(var(--i, 0) * -.37s); }

@keyframes gmBeat {
    0%, 100% { transform: scale(1); }
    15% { transform: scale(1.1); }
    30% { transform: scale(.97); }
    45% { transform: scale(1.07); }
}

@keyframes gmTwirl {
    0%, 100% { transform: rotate(0) scale(1); }
    25% { transform: rotate(-8deg) scale(1.05); }
    50% { transform: rotate(0) scale(1); }
    75% { transform: rotate(8deg) scale(1.05); }
}

@keyframes gmHop {
    0%, 100% { transform: translateY(0) scale(1, 1); }
    10% { transform: translateY(0) scale(1.05, .94); }
    35% { transform: translateY(-7%) scale(.97, 1.04); }
    55% { transform: translateY(0) scale(1.03, .97); }
    70% { transform: translateY(0) scale(1, 1); }
}

@keyframes gmSway {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}

@keyframes gmFloat {
    0%, 100% { transform: translateY(2%) rotate(-2deg); }
    50% { transform: translateY(-5%) rotate(2deg); }
}

@keyframes gmWrite {
    0%, 100% { transform: rotate(0) translateX(0); }
    25% { transform: rotate(-6deg) translateX(-3%); }
    50% { transform: rotate(3deg) translateX(3%); }
    75% { transform: rotate(-4deg) translateX(-1%); }
}

@keyframes gmSnap {
    0%, 70%, 100% { transform: scale(1); filter: brightness(1); }
    76% { transform: scale(.94); filter: brightness(1.35); }
    82% { transform: scale(1.05); filter: brightness(1); }
}

/* ประกายวิบวับ 3 จุดรอบของขวัญ */
.gm-spark {
    position: absolute;
    width: 9px;
    height: 9px;
    background: #f5c542;
    clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
    opacity: 0;
    pointer-events: none;
    animation: gmSpark 2.4s ease-in-out infinite;
}

.gm-spark.s1 { top: 10%; left: 12%; animation-delay: calc(var(--i, 0) * -.5s); }
.gm-spark.s2 { top: 18%; right: 10%; width: 7px; height: 7px; animation-delay: calc(var(--i, 0) * -.5s - .8s); }
.gm-spark.s3 { bottom: 16%; right: 18%; width: 6px; height: 6px; animation-delay: calc(var(--i, 0) * -.5s - 1.6s); }

@keyframes gmSpark {
    0%, 100% { opacity: 0; transform: scale(.3) rotate(0); }
    50% { opacity: 1; transform: scale(1) rotate(90deg); }
}

/* เปิด modal: การ์ดเด้งเข้ามาทีละใบ */
.gm-in .gm-card {
    animation: gmPop .45s cubic-bezier(.2, 1.4, .4, 1) both;
    animation-delay: calc(var(--i, 0) * 45ms);
}

@keyframes gmPop {
    from { opacity: 0; transform: translateY(14px) scale(.9); }
    to { opacity: 1; transform: none; }
}

/* ใบที่เลือก: ขยายนิดหน่อยและเร่งจังหวะให้ดูตื่นเต้น */
.gm-card:has(input:checked) .gm-img img {
    animation-duration: .8s;
}

.gm-card:has(input:checked) {
    transform: translateY(-3px);
}

/* กดส่ง: ของขวัญลอยขึ้นแล้วหายไป */
.gm-sending .gm-img {
    overflow: visible;
}

.gm-sending .gm-img img,
.gm-sending .gm-emoji {
    animation: gmFly .65s cubic-bezier(.5, -.4, .7, 1) forwards !important;
}

@keyframes gmFly {
    0% { transform: scale(1); opacity: 1; }
    35% { transform: translateY(8%) scale(1.15); opacity: 1; }
    100% { transform: translateY(-160%) scale(.4) rotate(-12deg); opacity: 0; }
}

/* ข้อความแจ้งผลหลังส่งของขวัญแบบไม่รีเฟรช */
.gm-toast {
    position: fixed;
    left: 50%;
    bottom: 90px;
    z-index: 300;
    max-width: calc(100% - 32px);
    padding: 10px 18px;
    border-radius: 999px;
    background: #1faa3b;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .2);
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    transform: translateX(-50%);
    animation: gmToastIn .3s ease-out;
}

.gm-toast.is-err {
    background: var(--danger);
}

@keyframes gmToastIn {
    from { opacity: 0; transform: translate(-50%, 12px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

@media (prefers-reduced-motion: reduce) {
    .gm-card .gm-img img,
    .gm-spark,
    .gm-in .gm-card {
        animation: none !important;
    }
}

.gm-line {
    min-height: 24px;
    font-size: 8.5px;
    line-height: 1.3;
    text-align: center;
    color: #3a3a3a;
}

.gm-price {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    align-self: stretch;
    height: 26px;
    margin-top: 4px;
    border: 1px solid #f0dcaa;
    border-radius: 5px;
    background: #fff9ea;
    font-size: 12px;
    font-weight: 600;
    color: #7a5516;
}

.gm-price svg {
    width: 14px;
    height: 14px;
    fill: #d9a520;
}

.gm-send {
    display: block;
    width: calc(100% - 20px);
    height: 50px;
    margin: 26px auto 0;
    border: 0;
    border-radius: 6px;
    background: var(--navy);
    color: #fff;
    font-family: inherit;
    font-size: 18px;
    font-weight: 500;
    cursor: pointer;
}

.gm-send:disabled {
    opacity: .45;
    cursor: not-allowed;
}

/* ============================================================
   หน้าทุนการศึกษา / ผู้สนับสนุน (scholarships.php) — sc-*
   ============================================================ */
.sc-page {
    padding-top: 18px;
    padding-bottom: 24px;
}

.sc-menu-t {
    margin: 0 0 12px;
    font-size: 20px;
    font-weight: 700;
    color: #1d4ea3;
}

.sc-menu {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 18px;
}

.sc-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 14px 4px 12px;
    background: #fff;
    border: 1px solid #eceef3;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(11, 30, 63, .06);
    color: #1d4ea3;
    text-align: center;
    transition: transform .15s, border-color .15s, box-shadow .15s;
}

.sc-tile:active {
    transform: scale(.96);
}

.sc-tile.on {
    border-color: #1d4ea3;
    box-shadow: 0 4px 14px rgba(29, 78, 163, .18);
}

.sc-tile svg {
    width: 34px;
    height: 34px;
    margin-bottom: 4px;
}

.sc-tile-l {
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.sc-tile-n {
    font-size: 14px;
    font-weight: 700;
}

.sc-bump {
    animation: scBump .5s ease;
}

@keyframes scBump {
    40% { transform: scale(1.5); color: #e6a817; }
}

.pf-card.sc-intro {
    padding: 16px;
}

.sc-intro-sub {
    margin: 2px 0 0;
    font-size: 11px;
    color: #5b6780;
}

.sc-list-t {
    margin: 4px 4px 14px;
    font-size: 15px;
    font-weight: 600;
    color: #1f2b45;
}

.sc-empty {
    margin: 10px 0;
    text-align: center;
    font-size: 13px;
    color: #8a93a6;
}

.sc-item {
    padding: 10px;
    border: 1px solid #d9dde5;
    border-radius: 6px;
    animation: scIn .35s ease both;
}

.sc-item + .sc-item {
    margin-top: 14px;
}

@keyframes scIn {
    from { opacity: 0; transform: translateY(8px); }
}

.sc-bar {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 4px;
    background: var(--navy);
    color: #fff;
    font-size: 12px;
}

.sc-box {
    margin-top: 10px;
    padding: 10px 12px;
    border: 1px solid #d9dde5;
    border-radius: 6px;
    background: #fff;
}

.sc-spo {
    display: flex;
    align-items: center;
    gap: 14px;
}

.sc-spo b {
    font-size: 14px;
    font-weight: 500;
    color: #1f2b45;
}

.sc-spo-v {
    font-size: 12px;
    color: #1f2b45;
}

.sc-logo {
    flex: 0 0 76px;
    height: 48px;
    display: grid;
    place-items: center;
    border: 1px solid #d9dde5;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.sc-logo img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.sc-logo span {
    font-size: 22px;
    font-weight: 700;
    color: var(--navy);
}

.sc-detail {
    padding: 14px 12px 6px;
    font-size: 13px;
    color: #1f2b45;
}

.sc-detail b,
.sc-value b {
    font-weight: 600;
    color: #1f2b45;
}

.sc-name {
    margin-bottom: 8px;
}

.sc-cond {
    display: flex;
    gap: 6px;
}

.sc-cond b {
    flex: 0 0 auto;
    white-space: nowrap;
}

.sc-cond ol {
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: sc;
    font-size: 11.5px;
    color: #3b63b0;
}

.sc-cond li {
    counter-increment: sc;
    position: relative;
    padding-left: 14px;
    margin-bottom: 10px;
    line-height: 1.7;
}

.sc-cond li::before {
    content: counter(sc) ".";
    position: absolute;
    left: 0;
}

.sc-value {
    font-size: 13px;
}

.sc-value span {
    font-size: 11.5px;
    color: #3b63b0;
}

.sc-reason {
    margin-top: 8px;
    font-size: 12px;
    color: var(--danger);
}

.sc-act {
    display: flex;
    justify-content: flex-end;
    margin-top: 14px;
}

.sc-act:empty {
    display: none;
}

.sc-send {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 176px;
    height: 38px;
    border: 0;
    border-radius: 4px;
    background: var(--navy);
    color: #fff;
    font-family: inherit;
    font-size: 15px;
    cursor: pointer;
    transition: transform .15s, opacity .15s;
}

.sc-send svg {
    width: 18px;
    height: 18px;
}

.sc-send:active {
    transform: scale(.96);
}

.sc-send.busy {
    opacity: .6;
    pointer-events: none;
}

.sc-send.busy svg {
    animation: scFly .7s ease-in infinite;
}

@keyframes scFly {
    to { transform: translate(10px, -10px); opacity: 0; }
}

.sc-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 176px;
    height: 38px;
    padding: 0 14px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
}

.sc-status.st-pending,
.sc-status.st-qualified {
    background: #fff5dc;
    color: #a66f00;
}

.sc-status.st-approved {
    background: #e3f6ea;
    color: #1f8a4c;
}

.sc-status.st-rejected {
    background: #fde8e8;
    color: #c0392b;
}

.sc-status.st-cancelled {
    background: #eef0f4;
    color: #6b7489;
}

.sc-pop {
    animation: scPop .4s ease;
}

@keyframes scPop {
    from { transform: scale(.7); opacity: 0; }
    60%  { transform: scale(1.06); }
}

.sc-toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    z-index: 999;
    max-width: 90%;
    padding: 10px 18px;
    border-radius: 999px;
    background: #1f8a4c;
    color: #fff;
    font-size: 13px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
    opacity: 0;
    transform: translate(-50%, 20px);
    pointer-events: none;
    transition: opacity .25s, transform .25s;
}

.sc-toast.bad {
    background: #c0392b;
}

.sc-toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* แถบหัวการ์ดตามสถานะคำขอ */
.sc-bar.sc-bar-wait {
    background: #ffc400;
    color: #1f2b45;
    font-weight: 500;
}

.sc-bar.sc-bar-ok {
    background: #1f8a4c;
}

.sc-bar.sc-bar-no {
    background: #c0392b;
}

.sc-act {
    gap: 10px;
    align-items: center;
}

.sc-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    padding: 0 16px;
    margin-right: auto;
    border: 1px solid var(--navy);
    border-radius: 4px;
    color: var(--navy);
    font-size: 14px;
    white-space: nowrap;
}

.sc-more:active {
    transform: scale(.96);
}

.sc-cancel {
    width: 176px;
    height: 38px;
    border: 0;
    border-radius: 4px;
    background: #2f2f31;
    color: #fff;
    font-family: inherit;
    font-size: 15px;
    cursor: pointer;
    transition: transform .15s, background .2s;
}

.sc-cancel:active {
    transform: scale(.96);
}

.sc-cancel.ask {
    background: #c0392b;
    font-size: 13px;
    animation: scShake .3s;
}

.sc-cancel.busy {
    opacity: .6;
    pointer-events: none;
}

@keyframes scShake {
    25% { transform: translateX(-3px); }
    75% { transform: translateX(3px); }
}

.sc-item.sc-out {
    transition: opacity .35s, transform .35s;
    opacity: 0;
    transform: translateX(40px);
}

.sc-item.sc-swap {
    animation: scPop .4s ease;
}

/* หน้ารายละเอียดทุน (scholarships.php?id=) */
.sc-item.sc-full {
    background: #fff;
    border-color: #eceef3;
    box-shadow: 0 2px 10px rgba(11, 30, 63, .06);
    border-radius: 10px;
}

.sc-cover {
    display: block;
    width: 100%;
    max-height: 220px;
    margin-bottom: 10px;
    border-radius: 6px;
    object-fit: cover;
}

.sc-row {
    margin-top: 6px;
    font-size: 13px;
}

.sc-row span {
    color: #3b63b0;
}

.sc-desc {
    margin: 8px 0 8px;
    font-size: 12.5px;
    line-height: 1.7;
    color: #4a5670;
}

.sc-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    text-align: center;
    padding: 12px 6px;
}

.sc-stats div + div {
    border-left: 1px solid #e3e6ec;
}

.sc-stats small {
    display: block;
    font-size: 11px;
    color: #5b6780;
}

.sc-stats b {
    display: block;
    font-size: 18px;
    color: var(--navy);
}

.sc-kv h4 {
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 600;
    color: #1f2b45;
}

.sc-kv div {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 6px 0;
    border-top: 1px dashed #e3e6ec;
    font-size: 12.5px;
}

.sc-kv span {
    color: #5b6780;
}

.sc-kv b {
    font-weight: 500;
    color: #1f2b45;
    text-align: right;
}

.sc-doc {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--navy);
    font-size: 13px;
}

.sc-doc svg {
    width: 22px;
    height: 22px;
}

.sc-doc small {
    margin-left: auto;
    color: #8a93a6;
    font-size: 11px;
}

.sc-detail-act .sc-act {
    justify-content: center;
}

.sc-detail-act .sc-send,
.sc-detail-act .sc-cancel,
.sc-detail-act .sc-status {
    width: 100%;
    height: 44px;
}

/* ============================================================
   หน้าสื่อการสอน (materials.php) — mt-*
   ============================================================ */
.mt-page {
    padding-top: 18px;
    padding-bottom: 24px;
}

.mt-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.mt-tabs a {
    display: grid;
    place-items: center;
    height: 44px;
    border-radius: 4px;
    background: #d9d9d9;
    color: #1f2b45;
    font-size: 15px;
    font-weight: 500;
    transition: background .2s, color .2s;
}

.mt-tabs a.on {
    background: var(--navy);
    color: #fff;
}

.pf-card.mt-intro {
    padding: 16px;
}

.mt-intro-sub {
    margin: 2px 0 0;
    font-size: 12px;
    color: #3b63b0;
}

.pf-card.mt-cats {
    padding: 14px 12px 12px;
}

.mt-cats .pf-card-t {
    margin-left: 4px;
}

.mt-cat-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    margin-top: 10px;
}

.mt-cat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 6px 0;
    border-radius: 8px;
    color: var(--navy);
    transition: background .2s, transform .15s;
}

.mt-cat:active {
    transform: scale(.94);
}

.mt-cat.on {
    background: #eef3ff;
}

.mt-g {
    display: flex;
    align-items: baseline;
    height: 38px;
    font-size: 34px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -.5px;
}

.mt-g small {
    font-size: .72em;
}

.mt-g sub {
    font-size: .45em;
    vertical-align: -0.2em;
}

.mt-cat-l {
    font-size: 11.5px;
    color: #3b63b0;
    white-space: nowrap;
}

.mt-empty {
    margin: 26px 0;
    text-align: center;
    font-size: 13px;
    color: #8a93a6;
}

.mt-empty a {
    display: inline-block;
    margin-top: 6px;
    color: var(--navy);
    font-weight: 600;
}

.mt-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px 16px;
}

.mt-item {
    min-width: 0;
    animation: scIn .35s ease both;
}

.mt-cover {
    aspect-ratio: 1 / 1;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid #d9dde5;
    border-radius: 6px;
    background: linear-gradient(135deg, #7c4dff22, #1c4fd622);
}

.mt-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mt-cover .mt-g {
    height: auto;
    font-size: 52px;
    color: #fff;
    text-shadow: 0 3px 10px rgba(0, 0, 0, .18);
}

/* ปกสำรองเมื่อไม่มีรูป: สีตามหมวดวิชา */
.mt-cover.mt-cv-th      { background: linear-gradient(135deg, #8e44ad, #c56cf0); }
.mt-cover.mt-cv-en      { background: linear-gradient(135deg, #1d4ea3, #4f8df5); }
.mt-cover.mt-cv-math    { background: linear-gradient(135deg, #e67e22, #f6b93b); }
.mt-cover.mt-cv-science { background: linear-gradient(135deg, #16a085, #48d1a8); }
.mt-cover.mt-cv-social  { background: linear-gradient(135deg, #c0392b, #f0776a); }

.mt-t {
    display: block;
    margin-top: 10px;
    font-size: 14px;
    font-weight: 500;
    color: #1f2b45;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mt-sub {
    font-size: 13px;
    color: #1f2b45;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mt-buy {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin-top: 8px;
}

.mt-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--navy);
}

.mt-price s {
    margin-left: 4px;
    font-size: 11px;
    font-weight: 400;
    color: #8a93a6;
}

.mt-buy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    line-height: 1;
    height: 32px;
    padding: 0 18px;
    border: 0;
    border-radius: 4px;
    background: var(--navy);
    color: #fff;
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
}

.mt-buy-btn:active {
    transform: scale(.95);
}

.mt-owned {
    padding: 4px 10px;
    border-radius: 4px;
    background: #e3f6ea;
    color: #1f8a4c;
    font-size: 12px;
    font-weight: 600;
}

a.mt-item {
    display: block;
    color: inherit;
}

a.mt-item:active .mt-cover {
    transform: scale(.97);
}

.mt-cover {
    transition: transform .15s;
}

/* ป้าย "วีดีโอ" บนปกสื่อที่มีวีดีโอตัวอย่าง */
.mt-cover {
    position: relative;
}

.mt-vbadge {
    position: absolute;
    left: 8px;
    bottom: 8px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 9px 3px 6px;
    border-radius: 999px;
    background: rgba(11, 30, 63, .78);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
}

.mt-vbadge svg {
    width: 13px;
    height: 13px;
    fill: #fff;
}

/* วีดีโอตัวอย่าง / ฉบับเต็ม */
.mt-hero-v {
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    background: #000;
}

.mt-hero-v video,
.mt-full-v {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    object-fit: contain;
}

.mt-full-v {
    margin-bottom: 8px;
    border-radius: 6px;
}

.mt-vtag {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 10px;
    border-radius: 4px;
    background: #e2bd45;
    color: #1f2b45;
    font-size: 12px;
    font-weight: 700;
    pointer-events: none;
}

/* ---- หน้ารายละเอียดสื่อ (materials.php?id=) ---- */
.mt-hero .mt-cover {
    border-radius: 6px;
}

.mt-hero .mt-cover .mt-g {
    font-size: 96px;
}

.mt-d-t {
    margin: 18px 0 4px;
    font-size: 17px;
    font-weight: 600;
    color: #1f2b45;
}

.mt-d-desc {
    margin: 0 0 8px;
    font-size: 13px;
    line-height: 1.6;
    color: #1f2b45;
}

.mt-d-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.mt-d-meta span {
    padding: 2px 10px;
    border-radius: 999px;
    background: #eef3ff;
    color: #3b63b0;
    font-size: 11px;
}

.mt-d-price s,
.mt-old {
    display: block;
    font-size: 15px;
    color: #e0463a;
    text-decoration-thickness: 2px;
}

.mt-d-price b {
    display: block;
    font-size: 18px;
    font-weight: 600;
    color: #1f2b45;
}

.mt-qty-wrap {
    margin: 18px 0 22px;
}

.mt-qty-l {
    display: block;
    margin-bottom: 6px;
    font-size: 15px;
    font-weight: 600;
    color: #1f2b45;
}

.mt-qty {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px;
    border-radius: 8px;
    background: #efefef;
}

.mt-qty button {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .12);
    cursor: pointer;
}

.mt-qty button:active {
    transform: scale(.9);
}

.mt-qty svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: #1f2b45;
    stroke-width: 2.4;
    stroke-linecap: round;
}

.mt-qty input {
    width: 104px;
    border: 0;
    background: transparent;
    text-align: center;
    font-family: inherit;
    font-size: 18px;
    color: #1f2b45;
    -moz-appearance: textfield;
}

.mt-qty input::-webkit-outer-spin-button,
.mt-qty input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.mt-qty input:focus {
    outline: none;
}

.mt-tick {
    animation: mtTick .25s ease;
}

@keyframes mtTick {
    50% { transform: scale(1.25); }
}

.mt-total {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    color: #5b6780;
}

.mt-total b {
    color: var(--navy);
}

.mt-order,
.mt-gift {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 50px;
    border: 0;
    border-radius: 4px;
    font-family: inherit;
    font-size: 16px;
    cursor: pointer;
    transition: transform .15s, opacity .15s;
}

.mt-order {
    background: var(--navy);
    color: #fff;
}

.mt-order:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.mt-gift {
    margin-top: 16px;
    background: #e2bd45;
    color: #fff;
}

.mt-gift img {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.mt-order:active,
.mt-gift:active {
    transform: scale(.98);
}

.mt-order.busy,
.mt-gift.busy {
    opacity: .6;
    pointer-events: none;
}

.mt-have {
    display: grid;
    place-items: center;
    height: 50px;
    border-radius: 4px;
    background: #e3f6ea;
    color: #1f8a4c;
    font-size: 15px;
    font-weight: 600;
}

.mt-pop {
    animation: scPop .45s ease;
}

.mt-topup {
    display: block;
    margin-top: 10px;
    padding: 8px;
    border-radius: 6px;
    background: #fde8e8;
    color: #c0392b;
    font-size: 13px;
    text-align: center;
}

.mt-shake {
    animation: scShake .3s 2;
}

.mt-files {
    margin-top: 22px;
}

.mt-files h3,
.mt-rec-t {
    margin: 0 0 10px;
    font-size: 16px;
    font-weight: 600;
    color: #1f2b45;
}

.mt-rec-t {
    margin-top: 34px;
}

.mt-files a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    margin-bottom: 8px;
    border: 1px solid #d9dde5;
    border-radius: 6px;
    color: #1f2b45;
    font-size: 13px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.mt-files a span {
    flex: 0 0 auto;
    padding: 2px 6px;
    border-radius: 4px;
    background: var(--navy);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
}

.mt-old {
    margin-top: 6px;
    font-size: 14px;
}

.mt-rec-p {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mt-rec-p b {
    font-size: 17px;
    font-weight: 600;
    color: #1f2b45;
}

.mt-rec-p svg {
    width: 24px;
    height: 24px;
    color: #1f2b45;
}

/* กองของขวัญกำลังใจหน้าราคา (หน้ารายละเอียดสื่อ) */
.mt-price-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.mt-mgifts {
    display: flex;
    align-items: center;
    padding: 6px 0 0 5px;
}

.mt-mgifts span {
    position: relative;
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    margin-left: -5px;
    border-radius: 50%;
    background: #fff8e6;
    box-shadow: 0 0 0 2px #fff, 0 3px 8px rgba(226, 189, 69, .35);
    z-index: calc(10 - var(--i, 0));
    /* ลอยขึ้นลงเบาๆ คนละจังหวะ */
    animation: mtFloat 2.6s ease-in-out infinite;
    animation-delay: calc(var(--i, 0) * -.45s);
}

.mt-mgifts img {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.mt-mgifts i {
    position: absolute;
    right: -5px;
    top: -5px;
    min-width: 14px;
    height: 14px;
    padding: 0 3px;
    border-radius: 999px;
    background: #e0463a;
    color: #fff;
    font-size: 8.5px;
    font-style: normal;
    font-weight: 700;
    line-height: 14px;
    text-align: center;
}

@keyframes mtFloat {
    0%, 100% { transform: translateY(0) rotate(0); }
    50%      { transform: translateY(-3px) rotate(-4deg); }
}

/* ของขวัญที่เพิ่งส่ง: หล่นลงมาเด้ง + ประกาย */
.mt-mgifts span.mt-land {
    animation: mtLand .7s cubic-bezier(.3, 1.6, .5, 1), mtFloat 2.6s ease-in-out .7s infinite;
}

.mt-mgifts span.mt-land::after {
    content: "";
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    border: 2px solid #e2bd45;
    opacity: 0;
    animation: mtRing .7s ease-out .25s;
    pointer-events: none;
}

@keyframes mtLand {
    0%   { transform: translateY(-26px) scale(.4) rotate(-25deg); opacity: 0; }
    60%  { transform: translateY(3px) scale(1.15) rotate(8deg); opacity: 1; }
    100% { transform: none; }
}

@keyframes mtRing {
    0%   { opacity: .9; transform: scale(.6); }
    100% { opacity: 0; transform: scale(1.5); }
}

@media (prefers-reduced-motion: reduce) {
    .mt-mgifts span,
    .mt-mgifts span.mt-land { animation: none; }
}

/* display ด้านล่างทับ attribute hidden — ต้องซ่อนเอง ไม่งั้นชั้นโปร่งใสบังการกดทั้งหน้า */
.mt-mgifts[hidden],
.mt-cf-ov[hidden],
.mt-cf-poor[hidden],
.mt-topup[hidden] {
    display: none;
}

/* modal ยืนยันการสั่งซื้อ (ต่ำกว่า toast เพื่อให้เห็นข้อความผลลัพธ์) */
.mt-cf-ov {
    position: fixed;
    inset: 0;
    z-index: 990;
    display: grid;
    place-items: center;
    padding: 16px;
    background: rgba(11, 30, 63, 0);
    transition: background .2s;
}

.mt-cf-ov.open {
    background: rgba(11, 30, 63, .5);
}

.mt-cf {
    width: 100%;
    max-width: 360px;
    padding: 22px 18px 18px;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 18px 40px rgba(0, 0, 0, .2);
    opacity: 0;
    transform: scale(.9) translateY(10px);
    transition: opacity .2s, transform .25s cubic-bezier(.2, .9, .3, 1.2);
}

.mt-cf-ov.open .mt-cf {
    opacity: 1;
    transform: none;
}

.mt-cf h3 {
    margin: 0 0 14px;
    font-size: 17px;
    font-weight: 600;
    text-align: center;
    color: var(--navy);
}

.mt-cf-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e3e6ec;
}

.mt-cf-thumb {
    flex: 0 0 64px;
}

.mt-cf-thumb .mt-cover .mt-g {
    font-size: 22px;
}

.mt-cf-thumb .mt-vbadge {
    display: none;
}

.mt-cf-item b {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #1f2b45;
}

.mt-cf-item small {
    font-size: 12px;
    color: #5b6780;
}

.mt-cf-rows {
    margin: 10px 0 0;
}

.mt-cf-rows div {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    font-size: 13px;
}

.mt-cf-rows dt {
    color: #5b6780;
}

.mt-cf-rows dd {
    margin: 0;
    color: #1f2b45;
    font-weight: 500;
}

.mt-cf-rows dd.mt-cf-total {
    font-size: 18px;
    font-weight: 700;
    color: var(--navy);
}

.mt-cf-rows dd.bad {
    color: #c0392b;
}

.mt-cf-poor {
    margin: 8px 0 0;
    padding: 8px;
    border-radius: 6px;
    background: #fde8e8;
    color: #c0392b;
    font-size: 12.5px;
    text-align: center;
}

.mt-cf-poor a {
    color: #c0392b;
    font-weight: 600;
}

.mt-cf-btns {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 10px;
    margin-top: 16px;
}

.mt-cf-btns .mt-order,
.mt-cf-no {
    height: 44px;
    font-size: 15px;
}

.mt-cf-no {
    border: 1px solid #c8cdd8;
    border-radius: 4px;
    background: #fff;
    color: #1f2b45;
    font-family: inherit;
    cursor: pointer;
}


@media (max-width: 380px) {
    .mt-g { font-size: 28px; }
    .mt-cat-l { font-size: 10px; }
    .sc-menu { gap: 6px; }
    .sc-more { padding: 0 10px; font-size: 13px; }
    .sc-send, .sc-cancel { width: 150px; }
    .sc-tile-l { font-size: 11px; }
    .sc-bar { font-size: 11px; }
}
/* ============================================================
   หน้าเติมเงิน (wallet.php) — ช่อง "กำหนดเอง" ไม่ให้ตกบรรทัดบนจอแคบ
   ============================================================ */
.topup-opt-lsp.small-t {
    gap: 3px;
    font-size: 11px;
    white-space: nowrap;
}

.topup-opt-lsp.small-t .topup-coin {
    flex: 0 0 auto;
    width: 14px;
    height: 14px;
    font-size: 8px;
}

.topup-opt-lsp.small-t + .topup-opt-thb {
    font-size: 9px;
    white-space: nowrap;
}

.wl-page {
    padding-top: 16px;
    padding-bottom: 24px;
}

/* ---- เนื้อหาสื่อในคลัง (materials.php?id=&view=content) ---- */
a.mt-have {
    text-decoration: none;
}

.mt-c-video {
    border-radius: 8px;
}

.mt-c-head {
    display: flex;
    align-items: center;
    gap: 14px;
}

.mt-c-thumb {
    flex: 0 0 96px;
}

.mt-c-thumb .mt-cover .mt-g {
    font-size: 34px;
}

.mt-c-meta .mt-d-t {
    margin: 0 0 2px;
}

.mt-c-meta span {
    font-size: 12px;
    color: #5b6780;
}

.mt-d-meta span.mt-c-own {
    background: #e3f6ea;
    color: #1f8a4c;
}

.mt-c-t {
    margin-top: 22px;
}

.mt-c-open {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    margin-bottom: 8px;
    border: 1px solid #d9dde5;
    border-radius: 8px;
    background: #fff;
    color: #1f2b45;
}

.mt-c-open span {
    flex: 0 0 auto;
    padding: 2px 6px;
    border-radius: 4px;
    background: var(--navy);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
}

.mt-c-open b {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.mt-c-open svg {
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    color: var(--navy);
}

.mt-c-shop {
    display: block;
    margin-top: 22px;
    font-size: 13px;
    color: #3b63b0;
    text-align: center;
}

/* ตัวอ่านเอกสารแบบสไลด์หน้ากระดาษ (PDF / รูป) */
.mt-reader {
    position: relative;
    margin-bottom: 14px;
    overflow: hidden;
    border-radius: 10px;
    background: #e9ecf2;
    outline: none;
}

.mt-rd-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.mt-rd-track::-webkit-scrollbar {
    display: none;
}

.mt-rd-page {
    flex: 0 0 100%;
    display: grid;
    place-items: center;
    padding: 14px 14px 10px;
    scroll-snap-align: center;
    scroll-snap-stop: always;
}

.mt-rd-page canvas,
.mt-rd-page img,
.mt-rd-ph {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 2px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(11, 30, 63, .16);
}

.mt-rd-ph {
    aspect-ratio: 1 / 1.414;
    background: linear-gradient(100deg, #fff 30%, #f1f3f7 50%, #fff 70%) 0 0 / 200% 100%;
    animation: mtShimmer 1.2s linear infinite;
}

@keyframes mtShimmer {
    to { background-position: -200% 0; }
}

.mt-rd-in {
    animation: mtPageIn .3s ease;
}

@keyframes mtPageIn {
    from { opacity: 0; }
}

.mt-rd-msg {
    position: absolute;
    left: 0;
    right: 0;
    top: 40%;
    margin: 0;
    text-align: center;
    font-size: 13px;
    color: #5b6780;
}

.mt-rd-msg[hidden] {
    display: none;
}

.mt-rd-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 4px 12px 10px;
}

.mt-rd-bar button {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .12);
    cursor: pointer;
}

.mt-rd-bar button:disabled {
    opacity: .35;
    cursor: default;
}

.mt-rd-bar button:not(:disabled):active {
    transform: scale(.9);
}

.mt-rd-bar svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: var(--navy);
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.mt-rd-bar .mt-rd-fs {
    position: absolute;
    right: 12px;
    bottom: 13px;
    width: 32px;
    height: 32px;
}

.mt-rd-bar .mt-rd-fs svg {
    width: 17px;
    height: 17px;
}

.mt-rd-n {
    min-width: 64px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    color: #1f2b45;
}

.mt-rd-prog {
    height: 3px;
    background: rgba(11, 30, 63, .08);
}

.mt-rd-prog i {
    display: block;
    width: 0;
    height: 100%;
    background: #e2bd45;
    transition: width .25s;
}

/* เต็มจอ: หน้ากระดาษพอดีความสูงจอ */
.mt-reader.mt-rd-full {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    margin: 0;
    border-radius: 0;
    background: #1c2130;
}

.mt-rd-full .mt-rd-track {
    flex: 1;
    min-height: 0;
}

.mt-rd-full .mt-rd-page {
    height: 100%;
    padding: 16px;
}

.mt-rd-full .mt-rd-page canvas,
.mt-rd-full .mt-rd-page img,
.mt-rd-full .mt-rd-ph {
    width: auto;
    max-width: 100%;
    max-height: 100%;
}

.mt-rd-full .mt-rd-ph {
    height: 100%;
}

.mt-rd-full .mt-rd-n {
    color: #fff;
}

.mt-rd-full .mt-rd-bar {
    padding-bottom: calc(10px + env(safe-area-inset-bottom));
}

.mt-c-dl-t {
    margin: 18px 0 8px;
    font-size: 13px;
    font-weight: 600;
    color: #5b6780;
}

/* ---- วีดีโอหลายตอน (EP) ในหน้าเนื้อหาสื่อ ---- */
.mt-player {
    position: relative;
}

.mt-next[hidden],
.mt-ep-dur:empty {
    display: none;
}

.mt-next {
    position: absolute;
    right: 10px;
    bottom: 54px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px 8px 14px;
    border-radius: 999px;
    background: rgba(11, 30, 63, .88);
    color: #fff;
    font-size: 13px;
    animation: scIn .3s ease;
}

.mt-next b {
    color: #e2bd45;
}

.mt-next button {
    height: 28px;
    padding: 0 12px;
    border: 0;
    border-radius: 999px;
    background: #e2bd45;
    color: #1f2b45;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.mt-next .mt-next-no {
    background: transparent;
    color: #c9d6f2;
    font-weight: 500;
}

.mt-ep-now {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
}

.mt-ep-tag {
    flex: 0 0 auto;
    padding: 3px 9px;
    border-radius: 4px;
    background: var(--navy);
    color: #e2bd45;
    font-size: 12px;
    font-weight: 700;
}

.mt-ep-now b {
    font-size: 14px;
    font-weight: 600;
    color: #1f2b45;
}

.mt-ep-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin: 22px 0 10px;
}

.mt-ep-head h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #1f2b45;
}

.mt-ep-head small {
    font-size: 12px;
    font-weight: 400;
    color: #8a93a6;
}

.mt-ep-head span {
    font-size: 12px;
    color: #1f8a4c;
}

.mt-eps {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mt-ep {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 8px;
    border: 1px solid #e3e6ec;
    border-radius: 10px;
    background: #fff;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color .2s, background .2s, transform .15s;
    animation: scIn .3s ease both;
    animation-delay: calc(var(--i) * 40ms);
}

.mt-ep:active {
    transform: scale(.98);
}

.mt-ep.on {
    border-color: var(--navy);
    background: #f4f7ff;
}

.mt-ep-th {
    position: relative;
    flex: 0 0 128px;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 6px;
    background: #1c2130;
}

.mt-ep-th img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mt-ep-no {
    display: grid;
    place-items: center;
    height: 100%;
    color: #fff;
    font-size: 22px;
    font-weight: 700;
}

.mt-ep-dur {
    position: absolute;
    right: 4px;
    bottom: 7px;
    padding: 1px 5px;
    border-radius: 3px;
    background: rgba(0, 0, 0, .72);
    color: #fff;
    font-size: 10px;
    font-style: normal;
}

.mt-ep-bar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: rgba(255, 255, 255, .35);
}

.mt-ep-bar i {
    display: block;
    width: 0;
    height: 100%;
    background: #e0463a;
    transition: width .3s;
}

/* ตอนที่กำลังเล่น: ม่านมืด + แท่งเสียงเต้น */
.mt-ep-eq {
    position: absolute;
    inset: 0;
    display: none;
    align-items: flex-end;
    justify-content: center;
    gap: 3px;
    padding-bottom: 38%;
    background: rgba(11, 30, 63, .55);
}

.mt-ep.on .mt-ep-eq {
    display: flex;
}

.mt-ep-eq i {
    width: 4px;
    height: 16px;
    border-radius: 2px;
    background: #e2bd45;
    transform-origin: bottom;
    animation: mtEq .9s ease-in-out infinite;
}

.mt-ep-eq i:nth-child(2) { animation-delay: -.3s; }
.mt-ep-eq i:nth-child(3) { animation-delay: -.6s; }

@keyframes mtEq {
    0%, 100% { transform: scaleY(.3); }
    50%      { transform: scaleY(1); }
}

.mt-ep-info {
    flex: 1;
    min-width: 0;
}

.mt-ep-info small {
    font-size: 11px;
    font-weight: 700;
    color: #3b63b0;
}

.mt-ep-info b {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.45;
    color: #1f2b45;
}

.mt-ep-st {
    font-size: 11px;
    font-style: normal;
    color: #8a93a6;
}

.mt-ep.on .mt-ep-st {
    color: var(--navy);
    font-weight: 600;
}

.mt-ep.done .mt-ep-st {
    color: #1f8a4c;
}

.mt-ep-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 12px;
}

.mt-ep-nav button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 42px;
    border: 1px solid var(--navy);
    border-radius: 4px;
    background: #fff;
    color: var(--navy);
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
}

.mt-ep-nav button:last-child {
    background: var(--navy);
    color: #fff;
}

.mt-ep-nav button:disabled {
    opacity: .35;
    cursor: default;
}

.mt-ep-nav svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@media (prefers-reduced-motion: reduce) {
    .mt-ep-eq i { animation: none; transform: scaleY(.7); }
}
/* ตัวอย่างเนื้อหาในหน้าร้าน: หน้าล็อกท้ายตัวอย่าง */
.mt-pv-t small {
    font-size: 12px;
    font-weight: 400;
    color: #8a93a6;
}

.mt-rd-lock {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    aspect-ratio: 1 / 1.414;
    padding: 20px;
    border-radius: 2px;
    background: linear-gradient(160deg, #0b1e3f, #1d4ea3);
    box-shadow: 0 4px 14px rgba(11, 30, 63, .16);
    color: #fff;
    text-align: center;
}

.mt-rd-full .mt-rd-lock {
    width: auto;
    height: 100%;
    max-width: 100%;
}

.mt-rd-lock svg {
    width: 44px;
    height: 44px;
    margin-bottom: 4px;
    fill: none;
    stroke: #e2bd45;
    stroke-width: 1.8;
    stroke-linecap: round;
    animation: mtFloat 2.6s ease-in-out infinite;
}

.mt-rd-lock b {
    font-size: 18px;
}

.mt-rd-lock span {
    font-size: 12.5px;
    color: #c9d6f2;
}

.mt-rd-lock .mt-rd-more {
    font-size: inherit;
    color: #e2bd45;
}

.mt-rd-buy {
    margin-top: 10px;
    padding: 10px 26px;
    border-radius: 4px;
    background: #e2bd45;
    color: #1f2b45;
    font-size: 14px;
    font-weight: 700;
}
/* ---- ปุ่ม ส่งกำลังใจ / ส่งของขวัญให้เพื่อน (หน้ารายละเอียดสื่อ) ---- */
.mt-gift-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); /* ไม่ใช่นักเรียน = เหลือปุ่มเดียวเต็มแถว */
    gap: 10px;
    margin-top: 16px;
}

.mt-gift-row .mt-gift {
    margin-top: 0;
    padding: 0 8px;
    font-size: 14.5px;
    white-space: nowrap;
}

.mt-gift-row .mt-gift img {
    width: 26px;
    height: 26px;
}

.mt-gift.mt-gift-friend {
    border: 1.5px solid #e2bd45;
    background: #fff;
    color: #a66f00;
}

.mt-gift-friend svg {
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ส่งให้เพื่อนสำเร็จ: กล่องของขวัญกระโดด */
.mt-gift-friend.mt-sent svg {
    animation: mtBoxHop .7s cubic-bezier(.3, 1.6, .5, 1);
}

@keyframes mtBoxHop {
    30% { transform: translateY(-9px) rotate(-12deg) scale(1.2); }
    60% { transform: translateY(0) rotate(8deg); }
}

@media (max-width: 380px) {
    .mt-gift-row .mt-gift { font-size: 13px; gap: 5px; }
}

/* sheet ค้นหาเพื่อน */
.mt-fs-ov[hidden],
.mt-fs-ov .mt-cf-poor[hidden] {
    display: none;
}

.mt-fs-ov {
    position: fixed;
    inset: 0;
    z-index: 995;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    background: rgba(11, 30, 63, 0);
    transition: background .25s;
}

.mt-fs-ov.open {
    background: rgba(11, 30, 63, .5);
}

.mt-fs {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 520px;
    max-height: 88vh;
    padding: 22px 16px calc(16px + env(safe-area-inset-bottom));
    border-radius: 18px 18px 0 0;
    background: #fff;
    transform: translateY(100%);
    transition: transform .3s cubic-bezier(.2, .8, .2, 1);
}

.mt-fs-ov.open .mt-fs {
    transform: none;
}

.mt-fs h3 {
    margin: 0 0 12px;
    font-size: 17px;
    font-weight: 700;
    color: var(--navy);
}

.mt-fs-x {
    position: absolute;
    top: 14px;
    right: 14px;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: #f1f3f7;
    cursor: pointer;
}

.mt-fs-x svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: #1f2b45;
    stroke-width: 2.2;
    stroke-linecap: round;
}

.mt-fs-item {
    padding-bottom: 12px;
}

.mt-fs-item .mt-cf-thumb {
    flex-basis: 52px;
}

.mt-fs-price {
    display: inline !important;
    font-size: 12px !important;
    color: var(--navy) !important;
}

.mt-fs-search {
    position: relative;
    margin-top: 12px;
}

.mt-fs-search svg {
    position: absolute;
    left: 12px;
    top: 50%;
    width: 18px;
    height: 18px;
    transform: translateY(-50%);
    fill: none;
    stroke: #8a93a6;
    stroke-width: 2;
    stroke-linecap: round;
}

.mt-fs-search input,
.mt-fs-msg {
    width: 100%;
    height: 42px;
    padding: 0 12px 0 38px;
    border: 1px solid #d9dde5;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    color: #1f2b45;
}

.mt-fs-msg {
    padding-left: 12px;
    margin-top: 10px;
}

.mt-fs-search input:focus,
.mt-fs-msg:focus {
    outline: none;
    border-color: var(--navy);
}

.mt-fs-hint {
    margin: 12px 2px 4px;
    font-size: 12px;
    color: #8a93a6;
}

.mt-fs-list {
    flex: 1;
    min-height: 140px;
    max-height: 38vh;
    overflow-y: auto;
}

.mt-fs-empty {
    margin: 36px 0;
    text-align: center;
    font-size: 13px;
    color: #8a93a6;
}

.mt-fs-p {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 8px 10px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: none;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    animation: scIn .3s ease both;
    animation-delay: calc(var(--i) * 30ms);
}

.mt-fs-p img {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
}

.mt-fs-p span {
    flex: 1;
    min-width: 0;
}

.mt-fs-p b {
    display: block;
    overflow: hidden;
    font-size: 14px;
    font-weight: 500;
    color: #1f2b45;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.mt-fs-p small {
    font-size: 11.5px;
    color: #8a93a6;
}

.mt-fs-p > i {
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    border: 2px solid #c8cdd8;
    border-radius: 50%;
    transition: border .15s;
}

.mt-fs-p.on {
    border-color: #e2bd45;
    background: #fffaf0;
}

.mt-fs-p.on > i {
    border: 7px solid #e2bd45;
}

.mt-fs-p.has {
    opacity: .5;
    cursor: default;
}

.mt-fs-p.has small {
    color: #1f8a4c;
}

.mt-fs .mt-cf-poor {
    margin-top: 10px;
}

.mt-fs-send {
    margin-top: 12px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
/* ============================================================
   ฟีดส่วนตัวของเพื่อน (user.php) — uf-*
   ============================================================ */
.uf-page {
    padding-top: 16px;
    padding-bottom: 24px;
}

.uf-card {
    position: relative;
    overflow: hidden;
    margin-bottom: 18px;
    padding: 0 16px 18px;
    border: 1px solid #eceef3;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(11, 30, 63, .06);
    text-align: center;
}

.uf-cover {
    height: 86px;
    margin: 0 -16px;
    background: linear-gradient(120deg, #0b1e3f 0%, #1d4ea3 60%, #e2bd45 140%);
}

.uf-av {
    width: 96px;
    height: 96px;
    margin: -48px auto 0;
    padding: 4px;
    border: 2px solid #e8c766;
    border-radius: 50%;
    background: #fff;
}

.uf-av img {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.uf-name {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 10px 0 2px;
    font-size: 18px;
    font-weight: 700;
    color: #1f2b45;
}

.uf-check {
    width: 20px;
    height: 20px;
}

.uf-sub {
    margin: 0;
    font-size: 12.5px;
    line-height: 1.6;
    color: #5b6780;
}

.uf-mutual {
    display: inline-block;
    margin-top: 6px;
    padding: 2px 10px;
    border-radius: 999px;
    background: #e3f6ea;
    color: #1f8a4c;
    font-size: 11px;
    font-weight: 600;
}

.uf-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin: 14px 0 16px;
    padding: 10px 0;
    border-top: 1px solid #eef0f4;
    border-bottom: 1px solid #eef0f4;
}

.uf-stats div + div {
    border-left: 1px solid #eef0f4;
}

.uf-stats b {
    display: block;
    font-size: 17px;
    color: var(--navy);
}

.uf-stats span {
    font-size: 11.5px;
    color: #8a93a6;
}

.uf-bump {
    display: inline-block;
    animation: scBump .5s ease;
}

.uf-btns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.uf-btns form {
    margin: 0;
}

.uf-follow,
.uf-cheer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    height: 42px;
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s, color .2s, transform .15s;
}

.uf-follow {
    border: 0;
    background: var(--navy);
    color: #fff;
}

.uf-follow.on {
    border: 1.5px solid var(--navy);
    background: #fff;
    color: var(--navy);
}

.uf-cheer {
    border: 0;
    background: #e2bd45;
    color: #fff;
}

.uf-follow:active,
.uf-cheer:active {
    transform: scale(.97);
}

.uf-latest {
    margin-bottom: 10px;
}

.uf-empty {
    padding: 40px 16px;
    text-align: center;
    color: #8a93a6;
}

.uf-empty div {
    font-size: 42px;
}

.uf-empty p {
    margin: 6px 0 0;
    font-size: 13px;
}
/* ของขวัญกำลังใจลอยไปมารอบรูปโปรไฟล์ (user.php) */
.uf-floaters {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 150px;
    pointer-events: none;
    z-index: 2;
}

.uf-av {
    position: relative;
    z-index: 1;
}

.uf-fl {
    position: absolute;
    width: 40px;
    height: 40px;
    pointer-events: auto;
    cursor: pointer;
    animation: ufWander var(--dur, 7s) ease-in-out var(--del, 0s) infinite;
}

/* 6 ตำแหน่ง: ซ้าย 3 ขวา 3 แต่ละช่องลอยคนละจังหวะ/ทิศ */
.uf-fl[data-slot="0"] { left: 7%;  top: 12px;  --dur: 6.5s; --del: -1s;   --wx: 10px;  --wy: 8px;  }
.uf-fl[data-slot="1"] { right: 7%; top: 14px;  --dur: 7.2s; --del: -3s;   --wx: -12px; --wy: 9px;  }
.uf-fl[data-slot="2"] { left: 19%; top: 66px;  --dur: 8s;   --del: -2s;   --wx: 12px;  --wy: -8px; }
.uf-fl[data-slot="3"] { right: 19%; top: 64px; --dur: 6.8s; --del: -4.5s; --wx: -10px; --wy: -10px; }
.uf-fl[data-slot="4"] { left: 6%;  top: 104px; --dur: 7.6s; --del: -5s;   --wx: 14px;  --wy: -6px; }
.uf-fl[data-slot="5"] { right: 6%; top: 102px; --dur: 8.4s; --del: -.5s;  --wx: -14px; --wy: -7px; }

@keyframes ufWander {
    0%, 100% { transform: translate(0, 0); }
    25%      { transform: translate(var(--wx), calc(var(--wy) * -1)); }
    50%      { transform: translate(calc(var(--wx) * .4), var(--wy)); }
    75%      { transform: translate(calc(var(--wx) * -.6), calc(var(--wy) * .4)); }
}

/* ตัวของขวัญ: การ์ดขาวมุมมน เต้นส่ายไปมา */
.uf-fl-in {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    padding: 3px;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(11, 30, 63, .25);
    animation: ufDance 2.2s ease-in-out infinite;
    animation-delay: calc(var(--del, 0s) * .3);
}

.uf-fl-in img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

@keyframes ufDance {
    0%, 100% { transform: rotate(-8deg) scale(1); }
    25%      { transform: rotate(6deg) scale(1.06) translateY(-3px); }
    50%      { transform: rotate(-4deg) scale(.98); }
    75%      { transform: rotate(9deg) scale(1.05) translateY(-2px); }
}

.uf-fl-in i {
    position: absolute;
    right: -6px;
    top: -6px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: #e0463a;
    color: #fff;
    font-size: 9px;
    font-style: normal;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
}

.uf-fl-in i.fd-tick {
    animation: fdLikePop .45s cubic-bezier(.2, 1.6, .4, 1);
}

/* แตะ / ได้ชิ้นเดิมซ้ำ: กระโดดหมุน */
.uf-fl.uf-hop .uf-fl-in {
    animation: ufHop .6s cubic-bezier(.3, 1.6, .5, 1), ufDance 2.2s ease-in-out .6s infinite;
}

@keyframes ufHop {
    40% { transform: translateY(-16px) rotate(20deg) scale(1.25); }
    70% { transform: translateY(0) rotate(-10deg) scale(.95); }
}

/* รูปโปรไฟล์เรืองแสงทองตอนได้รับกำลังใจ */
.uf-av.uf-av-glow {
    animation: ufGlow 1.1s ease-out;
}

@keyframes ufGlow {
    0%   { box-shadow: 0 0 0 0 rgba(226, 189, 69, .9); }
    100% { box-shadow: 0 0 0 22px rgba(226, 189, 69, 0); }
}

@media (prefers-reduced-motion: reduce) {
    .uf-fl, .uf-fl-in { animation: none; }
}
/* ============================================================
   หน้าถอนเงิน (wallet.php?a=withdraw) — wd-*
   ============================================================ */
.wd-profile {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 18px 16px;
    border: 1px solid #eceef3;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(11, 30, 63, .06);
}

.wd-av {
    flex: 0 0 128px;
    height: 128px;
    padding: 5px;
    border: 2px solid #e8c766;
    border-radius: 50%;
}

.wd-av img {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.wd-info {
    min-width: 0;
    color: var(--navy);
}

.wd-verified {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 12px 2px 8px;
    border: 1.5px solid #e2bd45;
    border-radius: 999px;
    color: #7a5516;
    font-size: 11.5px;
}

.wd-verified svg {
    width: 15px;
    height: 15px;
    fill: #f1b81c;
}

.wd-nick {
    margin-top: 6px;
    font-size: 26px;
    font-weight: 700;
    line-height: 1.2;
    color: #0b1e3f;
}

.wd-full {
    margin-bottom: 8px;
    font-size: 17px;
    color: #3b63b0;
}

.wd-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 5px;
    font-size: 13px;
    color: #3b63b0;
}

.wd-meta svg {
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    fill: none;
    stroke: #5b6780;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* การ์ดยอด LSP สีน้ำเงิน + ลายจุดมุมขวาล่าง */
.wd-bal {
    position: relative;
    overflow: hidden;
    margin-top: 14px;
    padding: 20px 16px 18px;
    border-radius: 8px;
    background: #0b1e5c;
    color: #fff;
    text-align: center;
}

.wd-bal::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    width: 150px;
    height: 90px;
    background: radial-gradient(circle, rgba(111, 150, 255, .45) 1.2px, transparent 1.6px) 0 0 / 9px 9px;
    -webkit-mask-image: linear-gradient(135deg, transparent 20%, #000 90%);
    mask-image: linear-gradient(135deg, transparent 20%, #000 90%);
    pointer-events: none;
}

.wd-bal-t {
    font-size: 21px;
    font-weight: 600;
}

.wd-bal-u {
    margin-top: 2px;
    font-size: 12.5px;
    color: #d6def5;
}

.wd-bal-n {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0 8px;
    font-size: 56px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 1px;
}

.wd-heart {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 50px;
    animation: fdBob 2.6s ease-in-out infinite;
}

.wd-heart svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .3));
}

.wd-heart b {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 3px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0;
    color: #0b1e5c;
}

.wd-bal-p {
    display: inline-block;
    margin-bottom: 8px;
    padding: 2px 10px;
    border-radius: 999px;
    background: rgba(226, 189, 69, .2);
    color: #ffd76a;
    font-size: 12px;
}

.wd-bal-note {
    position: relative;
    z-index: 1;
    font-size: 12.5px;
    color: #eef2ff;
}

.wd-bal-note b {
    font-weight: 700;
}

.wd-form {
    margin-top: 20px;
}

.wd-label {
    margin: 0 0 10px 2px;
    font-size: 18px;
    font-weight: 500;
    color: #1f2b45;
}

.wd-packs {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-bottom: 20px;
}

.wd-pack input {
    display: none;
}

.wd-pack span {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 70px;
    border: 1px solid #d9dde5;
    border-radius: 5px;
    background: #fff;
    color: #0b1e5c;
    cursor: pointer;
    transition: background .2s, color .2s, transform .15s;
}

.wd-pack b {
    font-size: 19px;
    font-weight: 500;
    line-height: 1.2;
}

.wd-pack small {
    font-size: 11px;
}

.wd-pack input:checked + span {
    border-color: #0b1e5c;
    background: #0b1e5c;
    color: #fff;
}

.wd-pack span:active {
    transform: scale(.95);
}

.wd-input {
    display: flex;
    align-items: center;
    height: 64px;
    overflow: hidden;
    border: 1px solid #d9dde5;
    border-radius: 5px;
    background: #fff;
}

.wd-pen {
    display: grid;
    place-items: center;
    flex: 0 0 68px;
    height: 100%;
    border-right: 1px solid #d9dde5;
    background: #f4f5f8;
}

.wd-pen svg {
    width: 38px;
    height: 38px;
    padding: 9px;
    border-radius: 50%;
    background: #0b1e5c;
    fill: none;
    stroke: #fff;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.wd-input input {
    flex: 1;
    min-width: 0;
    height: 100%;
    padding: 0 14px;
    border: 0;
    background: transparent;
    font-family: inherit;
    font-size: 19px;
    color: #1f2b45;
    -moz-appearance: textfield;
}

.wd-input input::-webkit-outer-spin-button,
.wd-input input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.wd-input input::placeholder {
    color: #9aa3b5;
}

.wd-input input:focus {
    outline: none;
}

.wd-input:focus-within {
    border-color: #0b1e5c;
}

.wd-unit {
    padding: 0 20px;
    font-size: 16px;
    color: #8a93a6;
}

.wd-help {
    margin: 10px 2px 26px;
    font-size: 14px;
    color: #5b6780;
}

.wd-submit {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 16px 22px 16px 26px;
    border: 0;
    border-radius: 8px;
    background: #0b1e5c;
    color: #fff;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(11, 30, 92, .25);
    transition: transform .15s;
}

.wd-submit:active {
    transform: scale(.98);
}

.wd-bag {
    display: grid;
    place-items: center;
    flex: 0 0 58px;
    height: 58px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #4f8df5, #1d4ea3);
    box-shadow: 0 0 0 4px rgba(79, 141, 245, .25);
}

.wd-bag svg {
    width: 30px;
    height: 30px;
}

.wd-submit-t {
    flex: 1;
}

.wd-submit-t b {
    display: block;
    font-size: 19px;
    font-weight: 600;
}

.wd-submit-t small {
    font-size: 13px;
    color: #d6def5;
}

.wd-chev {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: #fff;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.wd-safe {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 14px 0 0;
    font-size: 12px;
    color: #5b6780;
}

.wd-safe svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: #5b6780;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.wd-tx .topup-tx-ic svg {
    width: 32px;
    height: 32px;
    fill: none;
    stroke: #fff;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.wd-tx .topup-tx-amt {
    text-align: right;
}

.wd-tx .topup-tx-amt small {
    display: block;
    font-size: 11px;
    font-weight: 400;
    color: #8a93a6;
}

.wd-st {
    display: inline-block;
    margin-left: 4px;
    padding: 1px 7px;
    border-radius: 999px;
    font-size: 10.5px;
    vertical-align: 2px;
}

.wd-st-wait { background: #fff5dc; color: #a66f00; }
.wd-st-ok   { background: #e3f6ea; color: #1f8a4c; }
.wd-st-no   { background: #fde8e8; color: #c0392b; }

@media (max-width: 400px) {
    .wd-av { flex-basis: 104px; height: 104px; }
    .wd-nick { font-size: 22px; }
    .wd-full { font-size: 15px; }
    .wd-bal-n { font-size: 46px; }
    .wd-pack b { font-size: 16px; }
    .wd-packs { gap: 6px; }
}
/* ---- อัพโหลดรูปโปรไฟล์แบบเรียลไทม์ (profile.php) ---- */
.pf-avatar-ring {
    position: relative;
}

.pf-av-prog {
    position: absolute;
    inset: -7px;
    width: calc(100% + 14px);
    height: calc(100% + 14px);
    transform: rotate(-90deg);
    opacity: 0;
    transition: opacity .2s;
    pointer-events: none;
}

.pf-av-prog circle {
    fill: none;
    stroke: var(--navy);
    stroke-width: 3;
    stroke-linecap: round;
    transition: stroke-dashoffset .2s;
}

.pf-avatar-ring.uploading .pf-av-prog,
.pf-avatar-ring.done .pf-av-prog {
    opacity: 1;
}

.pf-avatar-ring.done .pf-av-prog circle {
    stroke: #1f8a4c;
}

.pf-av-pct {
    position: absolute;
    inset: 5px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(11, 30, 63, .45);
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    opacity: 0;
    transition: opacity .2s;
    pointer-events: none;
}

.pf-avatar-ring.uploading .pf-av-pct {
    opacity: 1;
}

.pf-av-ok {
    position: absolute;
    right: 4px;
    bottom: 4px;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 3px solid #fff;
    border-radius: 50%;
    background: #1f8a4c;
    color: #fff;
    font-size: 17px;
    font-weight: 700;
    transform: scale(0);
    pointer-events: none;
}

.pf-avatar-ring.done .pf-av-ok {
    animation: pfOk 1.6s cubic-bezier(.2, 1.6, .4, 1) forwards;
}

@keyframes pfOk {
    0%   { transform: scale(0); }
    20%  { transform: scale(1.2); }
    30%  { transform: scale(1); }
    85%  { transform: scale(1); opacity: 1; }
    100% { transform: scale(.6); opacity: 0; }
}

/* รูปโปรไฟล์ของเราถูกเปลี่ยนจากหน้า/แท็บอื่น: ค่อยๆ เด้งเข้า */
img.tl-av-swap {
    animation: tlAvSwap .6s ease;
}

@keyframes tlAvSwap {
    0%   { opacity: .2; transform: scale(.85); }
    60%  { opacity: 1; transform: scale(1.06); }
    100% { transform: scale(1); }
}
/* ============================================================
   แจ้งเตือน: dropdown จากกระดิ่ง (header.php) + หน้า notifications.php — nt-*
   ============================================================ */
.nt-drop[hidden] {
    display: none;
}

.nt-drop {
    position: absolute;
    top: calc(100% + 6px);
    right: 12px;
    z-index: 60;
    width: min(360px, calc(100vw - 24px));
    overflow: hidden;
    border: 1px solid #e3e6ec;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 16px 40px rgba(11, 30, 63, .18);
    opacity: 0;
    transform: translateY(-8px) scale(.97);
    transform-origin: top right;
    transition: opacity .18s, transform .22s cubic-bezier(.2, .9, .3, 1.2);
}

.nt-drop.open {
    opacity: 1;
    transform: none;
}

/* ลูกศรชี้ไปที่กระดิ่ง */
.nt-drop::before {
    content: "";
    position: absolute;
    top: -7px;
    right: 14px;
    width: 12px;
    height: 12px;
    border-top: 1px solid #e3e6ec;
    border-left: 1px solid #e3e6ec;
    background: #fff;
    transform: rotate(45deg);
}

.nt-drop-head {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px 10px;
    border-bottom: 1px solid #eef0f4;
    font-size: 15px;
    color: var(--navy);
}

.nt-drop-head span {
    padding: 1px 8px;
    border-radius: 999px;
    background: #fde8e8;
    color: #c0392b;
    font-size: 11px;
    font-weight: 600;
}

.nt-drop-head span:empty {
    display: none;
}

.nt-drop-list {
    max-height: min(380px, 60vh);
    overflow-y: auto;
}

.nt-drop-item,
.nt-item {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 14px;
    color: #1f2b45;
    text-decoration: none;
    animation: scIn .3s ease both;
    animation-delay: calc(var(--i, 0) * 35ms);
}

.nt-drop-item + .nt-drop-item {
    border-top: 1px solid #f1f3f7;
}

a.nt-drop-item:active,
a.nt-item:active {
    background: #f4f7ff;
}

.nt-drop-item.unread {
    background: #f5f8ff;
}

.nt-ic {
    display: grid;
    place-items: center;
    flex: 0 0 38px;
    height: 38px;
    border-radius: 50%;
    background: #eef3ff;
    font-size: 18px;
}

.nt-txt {
    flex: 1;
    min-width: 0;
}

.nt-txt b {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.4;
}

.nt-txt span {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 12.5px;
    line-height: 1.45;
    color: #5b6780;
}

.nt-txt small {
    font-size: 11px;
    color: #8a93a6;
}

.nt-dot {
    flex: 0 0 9px;
    width: 9px;
    height: 9px;
    margin-top: 6px;
    border-radius: 50%;
    background: #1d4ea3;
}

.nt-drop-sk {
    height: 58px;
    margin: 8px 14px;
    border-radius: 10px;
    background: linear-gradient(100deg, #f3f5f9 30%, #e9edf4 50%, #f3f5f9 70%) 0 0 / 200% 100%;
    animation: mtShimmer 1.2s linear infinite;
}

.nt-drop-empty {
    margin: 26px 0;
    text-align: center;
    font-size: 13px;
    color: #8a93a6;
}

.nt-drop-all {
    display: block;
    padding: 12px;
    border-top: 1px solid #eef0f4;
    background: #fafbfd;
    color: var(--navy);
    font-size: 13.5px;
    font-weight: 600;
    text-align: center;
}

/* หน้าเต็ม */
.nt-page {
    padding-top: 12px;
    padding-bottom: 24px;
}

.nt-group {
    margin: 16px 2px 8px;
    font-size: 14px;
    font-weight: 600;
    color: #5b6780;
}

.nt-list {
    overflow: hidden;
    border: 1px solid #eceef3;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(11, 30, 63, .05);
}

.nt-item {
    padding: 14px;
}

.nt-item + .nt-item {
    border-top: 1px solid #f1f3f7;
}

.nt-item.unread {
    background: #f5f8ff;
}

.nt-item .nt-ic {
    flex-basis: 44px;
    height: 44px;
    font-size: 20px;
}

.nt-item .nt-txt b {
    font-size: 14px;
}

.nt-item .nt-txt span {
    -webkit-line-clamp: 3;
    font-size: 13px;
}

.nt-empty {
    padding: 60px 20px;
    text-align: center;
    color: #5b6780;
}

.nt-empty-ic {
    font-size: 48px;
    animation: fdBob 2.4s ease-in-out infinite;
}

.nt-empty b {
    display: block;
    margin-top: 8px;
    font-size: 16px;
    color: #1f2b45;
}

.nt-empty p {
    margin: 4px 0 0;
    font-size: 13px;
}

.nt-more {
    margin-top: 18px;
}
/* ---- สื่อที่ได้รับเป็นของขวัญ: ผู้ส่ง (materials.php) ---- */
/* ป้ายของขวัญบนปก: รูปกล่องของขวัญใน assets */
.mt-item.mt-gifted .mt-cover::after {
    content: "";
    position: absolute;
    top: 6px;
    left: 6px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #fff url("../gift-boxes-set-with-gold-ribbon-bow-isolated-transperent-background-realistic-vector-holiday-surprise-box-birthday-wedding-christmas-celebration-banners%201.png") center / 24px no-repeat;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .2);
    animation: fdBob 2.4s ease-in-out infinite;
}

.mt-from {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    margin-top: 2px;
}

.mt-from img {
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    border: 1.5px solid #e2bd45;
    border-radius: 50%;
    object-fit: cover;
}

.mt-from span {
    overflow: hidden;
    font-size: 12.5px;
    color: #a66f00;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.mt-from b {
    font-weight: 600;
}

/* แถบผู้ส่งในหน้าเนื้อหาสื่อ */
.mt-giver {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 14px 0 4px;
    padding: 12px 14px;
    border: 1px solid #f1dfa6;
    border-radius: 12px;
    background: linear-gradient(120deg, #fffaf0, #fff3d6);
    color: #1f2b45;
}

.mt-giver-av {
    position: relative;
    flex: 0 0 48px;
    height: 48px;
}

.mt-giver-av img {
    width: 100%;
    height: 100%;
    border: 2px solid #e2bd45;
    border-radius: 50%;
    object-fit: cover;
}

.mt-giver-av .mt-giver-box {
    position: absolute;
    right: -8px;
    bottom: -6px;
    width: 26px;
    height: 26px;
    border: 0;
    border-radius: 0;
    object-fit: contain;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .2));
    animation: ufDance 2.2s ease-in-out infinite;
}

.mt-giver-t {
    flex: 1;
    min-width: 0;
}

.mt-giver-t small {
    display: block;
    font-size: 11.5px;
    color: #a66f00;
}

.mt-giver-t b {
    display: block;
    font-size: 15px;
    font-weight: 600;
}

.mt-giver svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: #a66f00;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
/* ---- การ์ดโพสต์: ลิงก์ไปหน้าโพสต์ + จำนวนรูป ---- */
a.fd-caption {
    color: #1d3fa8;
    text-decoration: none;
}

.fd-media-link {
    display: block;
}

.fd-media-link img {
    display: block;
    width: 100%;
}

.fd-img-count {
    position: absolute;
    top: 10px;
    left: 10px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px 3px 7px;
    border-radius: 999px;
    background: rgba(20, 20, 24, .7);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
}

.fd-img-count svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: #fff;
    stroke-width: 1.8;
    stroke-linejoin: round;
}

/* ============================================================
   หน้าโพสต์เต็ม (post.php) — ps-*
   ============================================================ */
.ps-page {
    padding-top: 14px;
    padding-bottom: 24px;
}

.ps-post {
    padding: 16px 14px 14px;
    border: 1px solid #eceef3;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(11, 30, 63, .06);
}

.ps-head {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ps-av img {
    display: block;
    width: 46px;
    height: 46px;
    border: 2px solid #e8c766;
    border-radius: 50%;
    object-fit: cover;
}

.ps-who {
    flex: 1;
    min-width: 0;
}

.ps-who a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #1f2b45;
}

.ps-who b {
    font-size: 15px;
}

.ps-who span {
    display: block;
    font-size: 11.5px;
    color: #8a93a6;
}

.ps-type {
    flex: 0 0 auto;
    padding: 3px 10px;
    border-radius: 999px;
    background: #eef3ff;
    color: #3b63b0;
    font-size: 11px;
    font-weight: 600;
}

.ps-type-activity { background: #e3f6ea; color: #1f8a4c; }
.ps-type-award    { background: #fff5dc; color: #a66f00; }
.ps-type-training { background: #f4ecf7; color: #7d3c98; }
.ps-type-work     { background: #fdecea; color: #c0392b; }

.ps-body {
    margin: 14px 2px 12px;
    font-size: 15px;
    line-height: 1.75;
    color: #1f2b45;
    word-break: break-word;
}

/* แกลเลอรีรูป: 1 รูปเต็ม / 2 รูปคู่ / 3+ รูปแรกใหญ่ + ตารางรูปที่เหลือ */
.ps-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
    overflow: hidden;
    margin: 0 -14px 12px;
}

.ps-ph {
    position: relative;
    display: block;
    padding: 0;
    border: 0;
    background: #eef0f4;
    cursor: zoom-in;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    animation: scIn .35s ease both;
    animation-delay: calc(var(--i) * 50ms);
}

.ps-ph img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s;
}

.ps-ph:active img {
    transform: scale(1.04);
}

.ps-gallery .ps-ph:first-child {
    grid-column: 1 / -1;
    aspect-ratio: 4 / 3;
}

.ps-gallery.ps-n2 .ps-ph:first-child {
    grid-column: auto;
    aspect-ratio: 1 / 1;
}

.ps-gallery.ps-n1 .ps-ph:first-child {
    aspect-ratio: auto;
}

.ps-gallery.ps-n4 .ps-ph:not(:first-child) {
    aspect-ratio: 3 / 4;
}

.ps-gallery.ps-n4 {
    grid-template-columns: repeat(3, 1fr);
}

.ps-gallery.ps-n5 .ps-ph:nth-child(n+6),
.ps-gallery .ps-ph:nth-child(n+6) {
    display: none;
}

.ps-more {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(11, 30, 63, .55);
    color: #fff;
    font-size: 26px;
    font-weight: 700;
}

.ps-video {
    display: block;
    width: 100%;
    margin-bottom: 12px;
    border-radius: 10px;
    background: #000;
}

.ps-stats {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 2px;
    border-top: 1px solid #f1f3f7;
    font-size: 12.5px;
    color: #5b6780;
}

.ps-likers {
    display: flex;
    padding-left: 6px;
}

.ps-likers img {
    width: 24px;
    height: 24px;
    margin-left: -6px;
    border: 2px solid #fff;
    border-radius: 50%;
    object-fit: cover;
}

.ps-gifts {
    margin-top: 2px;
}

.ps-actions {
    margin-top: 6px;
}

.ps-author {
    display: block;
    margin-top: 16px;
    text-align: center;
    font-size: 13.5px;
    color: #3b63b0;
}

/* ดูรูปเต็มจอ */
.ps-lb[hidden] {
    display: none;
}

.ps-lb {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(8, 12, 22, 0);
    transition: background .2s;
}

.ps-lb.open {
    background: rgba(8, 12, 22, .94);
}

.ps-lb-track {
    display: flex;
    height: 100%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    opacity: 0;
    transition: opacity .2s;
}

.ps-lb.open .ps-lb-track {
    opacity: 1;
}

.ps-lb-track::-webkit-scrollbar {
    display: none;
}

.ps-lb-slide {
    flex: 0 0 100%;
    display: grid;
    place-items: center;
    padding: 56px 10px 24px;
    scroll-snap-align: center;
}

.ps-lb-slide img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 4px;
}

.ps-lb-x {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .15);
    cursor: pointer;
}

.ps-lb-x svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: #fff;
    stroke-width: 2.2;
    stroke-linecap: round;
}

.ps-lb-n {
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    z-index: 1;
    text-align: center;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    pointer-events: none;
}
/* ---- ไอคอนกล่องของขวัญ (รูปใน assets) แทนอีโมจิ 🎁 บนปุ่มส่งกำลังใจ ---- */
img.fd-gift {
    width: 20px;
    height: 20px;
    object-fit: contain;
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .25));
}

.fd-chip:active img.fd-gift,
.uf-cheer:active .uf-cheer-ic {
    transform: scale(1.2) rotate(-10deg);
}

.uf-cheer-ic {
    width: 26px;
    height: 26px;
    object-fit: contain;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .25));
    transition: transform .15s;
}

.cheer-ic {
    width: 22px;
    height: 22px;
    margin-right: 4px;
    object-fit: contain;
    vertical-align: middle;
}

.mt-fs-ic {
    width: 24px;
    height: 24px;
    margin-left: 2px;
    object-fit: contain;
    vertical-align: -4px;
}
/* ============================================================
   โปรไฟล์สาธารณะ (public_profile.php) — pp-* ธีมม่วงลาเวนเดอร์ตาม mockup
   ============================================================ */
.pp-top,
.pp-page {
    --pp: #6d4fd8;
    --pp-2: #8b6cf0;
    --pp-soft: #efe9fd;
    --pp-ink: #1f1a3a;
    --pp-mute: #6b6687;
    --pp-line: #ece8f6;
}

.pp-top {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--pp-line);
}

.pp-top-back,
.pp-top-btn {
    position: relative;
    display: grid;
    place-items: center;
    flex: 0 0 36px;
    height: 36px;
    border: 1px solid var(--pp-line);
    border-radius: 50%;
    background: #fff;
    color: var(--pp-ink);
    cursor: pointer;
}

.pp-top svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.pp-top-btn circle {
    fill: currentColor;
    stroke: none;
}

.pp-top-btn i {
    position: absolute;
    top: -3px;
    right: -3px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--pp);
    color: #fff;
    font-size: 10px;
    font-style: normal;
    line-height: 16px;
    text-align: center;
}

.pp-brand {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 0;
    color: #8a5a00;
}

.pp-brand img {
    width: 34px;
}

.pp-brand span {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 16px;
    line-height: 1.1;
    color: #7a5516;
}

.pp-brand small {
    display: block;
    font-family: inherit;
    font-size: 8px;
    color: #8a93a6;
}

.pp-menu[hidden] {
    display: none;
}

.pp-menu {
    position: absolute;
    top: calc(100% + 4px);
    right: 12px;
    z-index: 40;
    min-width: 190px;
    overflow: hidden;
    border: 1px solid var(--pp-line);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(31, 26, 58, .16);
    animation: scIn .2s ease;
}

.pp-menu a,
.pp-menu button {
    display: block;
    width: 100%;
    padding: 11px 14px;
    border: 0;
    background: none;
    color: var(--pp-ink);
    font-family: inherit;
    font-size: 13.5px;
    text-align: left;
    cursor: pointer;
}

.pp-menu > * + * {
    border-top: 1px solid var(--pp-line);
}

.pp-page {
    padding: 14px 12px 28px;
    background: linear-gradient(180deg, #f6f3fd 0%, #fbfaff 40%, #fff 100%);
    color: var(--pp-ink);
}

.pp-card {
    margin-bottom: 12px;
    padding: 14px;
    border: 1px solid var(--pp-line);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(109, 79, 216, .05);
}

.pp-card h3 {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 6px;
    margin: 0 0 10px;
    font-size: 14px;
    font-weight: 700;
    color: var(--pp-ink);
}

.pp-card h3 small {
    margin-right: auto;
    margin-left: 4px;
    font-size: 11px;
    font-weight: 400;
    color: var(--pp-mute);
}

.pp-card h3 a {
    font-size: 11px;
    font-weight: 500;
    color: var(--pp);
    white-space: nowrap;
}

.pp-ic {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* การ์ดหลัก */
.pp-hero {
    position: relative;
    display: flex;
    gap: 6px;
    overflow: hidden;
    margin-bottom: 12px;
    padding: 16px 0 16px 16px;
    border-radius: 18px;
    background: radial-gradient(circle at 80% 20%, #fff 0%, transparent 45%), linear-gradient(135deg, #e7defc 0%, #f4effd 55%, #eadffc 100%);
    box-shadow: 0 6px 20px rgba(109, 79, 216, .12);
}

.pp-hero::after {
    content: "";
    position: absolute;
    left: -10%;
    right: 30%;
    bottom: -30px;
    height: 90px;
    background: radial-gradient(ellipse at 30% 100%, rgba(139, 108, 240, .22), transparent 70%);
    pointer-events: none;
}

.pp-hero-txt {
    position: relative;
    z-index: 1;
    flex: 1;
    min-width: 0;
}

.pp-public {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .75);
    color: var(--pp);
    font-size: 10.5px;
}

.pp-public .pp-ic {
    width: 13px;
    height: 13px;
}

.pp-hero h1 {
    margin: 8px 0 4px;
    font-size: 26px;
    font-weight: 800;
    line-height: 1.15;
    color: #1d1340;
}

.pp-full,
.pp-school {
    margin: 0;
    font-size: 12.5px;
    color: #4a4468;
}

.pp-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 8px 0 10px;
}

.pp-badges span {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 8px 2px 5px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 600;
}

.pp-badges .pp-ic {
    width: 13px;
    height: 13px;
}

.pp-b-id {
    background: #e3ddfb;
    color: #3d2a9c;
}

.pp-b-id .pp-ic {
    fill: #3d2a9c;
    stroke: none;
}

.pp-b-sc {
    background: #fff4d6;
    color: #8a5a00;
}

.pp-b-sc .pp-ic {
    fill: #e2bd45;
    stroke: none;
}

.pp-trust small {
    font-size: 11px;
    color: #4a4468;
}

.pp-trust div {
    display: flex;
    align-items: baseline;
    gap: 2px;
}

.pp-trust b {
    font-size: 28px;
    font-weight: 800;
    color: #1d1340;
}

.pp-trust > div > span:not(.pp-stars) {
    margin-right: 6px;
    font-size: 14px;
    font-weight: 700;
}

.pp-stars i {
    position: relative;
    font-size: 15px;
    font-style: normal;
    color: #d8d2ea;
}

.pp-stars i.on {
    color: #f1b81c;
}

.pp-stars i.half {
    background: linear-gradient(90deg, #f1b81c 50%, #d8d2ea 50%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.pp-photo {
    position: relative;
    flex: 0 0 44%;
    align-self: flex-end;
    margin-bottom: -16px;
}

.pp-arch {
    overflow: hidden;
    aspect-ratio: 5 / 6;
    border: 5px solid #f3d27a;
    border-bottom: 0;
    border-radius: 999px 999px 0 0;
    background: linear-gradient(180deg, #f7dd8f, #e8c766);
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .6);
}

.pp-arch img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
}

.pp-medal {
    position: absolute;
    right: 4px;
    bottom: 22px;
    width: 58px;
    height: 58px;
    filter: drop-shadow(0 4px 6px rgba(120, 80, 0, .35));
    animation: ufDance 3s ease-in-out infinite;
}

.pp-medal svg {
    width: 100%;
    height: 100%;
}

/* ปุ่มการกระทำ */
.pp-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-bottom: 12px;
    padding: 8px;
    border: 1px solid var(--pp-line);
    border-radius: 14px;
    background: #fff;
}

.pp-act {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 40px;
    padding: 0 4px;
    border: 0;
    border-radius: 10px;
    background: var(--pp-soft);
    color: var(--pp);
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: transform .15s, background .2s;
}

.pp-act:active {
    transform: scale(.95);
}

.pp-act .pp-ic {
    width: 17px;
    height: 17px;
}

.pp-act-main {
    background: linear-gradient(135deg, var(--pp-2), var(--pp));
    color: #fff;
    box-shadow: 0 4px 10px rgba(109, 79, 216, .3);
}

.pp-act-main.on {
    background: #fff;
    color: var(--pp);
    box-shadow: inset 0 0 0 1.5px var(--pp);
}

.pp-act-gold {
    background: #fff4d6;
    color: #8a5a00;
}

.pp-gift-ic {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

/* สถิติ */
.pp-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 12px 4px;
    text-align: center;
}

.pp-stats > div + div {
    border-left: 1px solid var(--pp-line);
}

.pp-stats .pp-ic {
    width: 22px;
    height: 22px;
    color: var(--pp);
}

.pp-stats small {
    display: block;
    font-size: 10.5px;
    color: var(--pp-mute);
}

.pp-stats b {
    display: inline-block;
    font-size: 17px;
    font-weight: 700;
}

/* วิดีโอแนะนำตัว */
.pp-video {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
}

.pp-video-txt {
    flex: 0 0 38%;
    padding-left: 4px;
}

.pp-video-txt h3 {
    margin-bottom: 2px;
}

.pp-video-txt p {
    margin: 0 0 12px;
    font-size: 11px;
    color: var(--pp-mute);
}

.pp-video-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border: 1.5px solid var(--pp);
    border-radius: 999px;
    background: #fff;
    color: var(--pp);
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.pp-video-btn .pp-ic {
    width: 14px;
    height: 14px;
}

.pp-video-thumb {
    position: relative;
    flex: 1;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, #c9b8f7, #efe9fd);
    cursor: pointer;
}

.pp-video-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    opacity: .92;
}

.pp-play {
    position: absolute;
    top: 50%;
    left: 50%;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .9);
    color: var(--pp);
    transform: translate(-50%, -50%);
    box-shadow: 0 4px 12px rgba(0, 0, 0, .2);
    animation: ppPulse 2s ease-in-out infinite;
}

@keyframes ppPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .7); }
    50%      { box-shadow: 0 0 0 10px rgba(255, 255, 255, 0); }
}

.pp-vbar {
    position: absolute;
    left: 10px;
    right: 44px;
    bottom: 10px;
    height: 3px;
    border-radius: 3px;
    background: rgba(255, 255, 255, .5);
}

.pp-vbar i {
    display: block;
    width: 22%;
    height: 100%;
    border-radius: 3px;
    background: var(--pp);
}

.pp-vdur {
    position: absolute;
    right: 8px;
    bottom: 4px;
    color: #fff;
    font-size: 10px;
}

.pp-vmodal[hidden] {
    display: none;
}

.pp-vmodal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 16px;
    background: rgba(8, 6, 20, 0);
    transition: background .2s;
}

.pp-vmodal.open {
    background: rgba(8, 6, 20, .9);
}

.pp-vmodal video {
    width: 100%;
    max-width: 720px;
    max-height: 80vh;
    border-radius: 12px;
    background: #000;
}

/* My Goal */
.pp-goal-bar {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    column-gap: 10px;
    font-size: 11px;
    color: var(--pp-mute);
}

.pp-bar {
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--pp-soft);
}

.pp-bar i {
    display: block;
    width: 0;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--pp-2), var(--pp));
    transition: width 1s cubic-bezier(.2, .8, .2, 1);
}

.pp-card.in .pp-bar i {
    width: var(--w);
}

.pp-goal-bar b {
    font-size: 20px;
    color: var(--pp);
}

.pp-goal-bar b small {
    font-size: 12px;
}

.pp-goal-bar em {
    grid-column: 1 / -1;
    justify-self: end;
    font-size: 10.5px;
    font-style: normal;
}

.pp-goal-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-top: 10px;
}

.pp-goal-it {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px;
    border: 1px solid var(--pp-line);
    border-radius: 10px;
    font-size: 11px;
}

.pp-goal-ic {
    font-size: 22px;
}

.pp-goal-it p {
    flex: 1;
    margin: 0;
    line-height: 1.35;
}

.pp-goal-it p small {
    display: block;
    color: var(--pp-mute);
}

.pp-goal-it div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2px;
}

.pp-goal-it b {
    font-size: 13px;
}

.pp-goal-it span {
    padding: 1px 5px;
    border-radius: 999px;
    font-size: 9px;
    white-space: nowrap;
}

.pp-goal-it .done { background: #e3f6ea; color: #1f8a4c; }
.pp-goal-it .doing { background: #fff4d6; color: #a66f00; }

/* ทางลัด */
.pp-short-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.pp-short-row a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 4px 10px;
    border: 1px solid var(--pp-line);
    border-radius: 12px;
    background: #fff;
    color: var(--pp-ink);
    font-size: 11px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(109, 79, 216, .06);
    transition: transform .15s;
}

.pp-short-row a:active {
    transform: scale(.95);
}

.pp-short-row span {
    font-size: 26px;
    line-height: 1;
}

/* ส่วนที่ 2: 2 คอลัมน์ตาม mockup */
.pp-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 10px;
    align-items: start;
}

.pp-grid .pp-card {
    padding: 12px 10px;
}

.pp-grid .pp-card h3 {
    font-size: 12.5px;
}

.pp-tl {
    margin: 0;
    padding: 0;
    list-style: none;
}

.pp-tl li {
    position: relative;
    display: flex;
    gap: 8px;
    padding: 0 0 12px 16px;
    font-size: 10.5px;
}

.pp-tl li::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 4px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #8a86a0;
}

.pp-tl li::after {
    content: "";
    position: absolute;
    left: 7.5px;
    top: 14px;
    bottom: 0;
    width: 1px;
    background: var(--pp-line);
}

.pp-tl li:last-child::after {
    display: none;
}

.pp-tl li.now::before {
    left: 2px;
    width: 12px;
    height: 12px;
    top: 2px;
    border: 3px solid #fff1c7;
    background: #f1b81c;
    box-sizing: border-box;
    box-shadow: 0 0 0 1px #f1b81c;
}

.pp-tl li > span {
    flex: 0 0 38px;
    color: var(--pp-mute);
}

.pp-tl b {
    display: block;
    font-size: 11px;
    font-weight: 600;
}

.pp-tl small {
    display: block;
    font-size: 10px;
    color: var(--pp-mute);
}

.pp-gpa-now b {
    font-size: 26px;
    font-weight: 800;
    color: #1d1340;
}

.pp-gpa-now small {
    margin-left: 4px;
    font-size: 10px;
    color: var(--pp-mute);
}

.pp-gpa-svg,
.pp-radar {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
}

.pp-grid line.pp-grid,
.pp-grid polygon.pp-grid,
svg .pp-grid {
    fill: none;
    stroke: #ebe7f5;
    stroke-width: 1;
}

.pp-gpa-line {
    fill: none;
    stroke: var(--pp);
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 600;
    stroke-dashoffset: 600;
}

.pp-card.in .pp-gpa-line {
    animation: ppDraw 1.4s ease forwards;
}

@keyframes ppDraw {
    to { stroke-dashoffset: 0; }
}

.pp-gpa-dot {
    fill: #fff;
    stroke: var(--pp);
    stroke-width: 2.5;
}

.pp-gpa-v,
.pp-gpa-x {
    font-size: 9px;
    text-anchor: middle;
    fill: var(--pp-ink);
}

.pp-gpa-x {
    fill: var(--pp-mute);
}

.pp-radar-l {
    font-size: 10px;
    fill: var(--pp-ink);
}

.pp-radar-shape {
    fill: rgba(109, 79, 216, .25);
    stroke: var(--pp);
    stroke-width: 2;
    stroke-linejoin: round;
    transform-origin: 150px 118px;
    transform: scale(0);
    transition: transform .9s cubic-bezier(.2, .9, .3, 1.15);
}

.pp-card.in .pp-radar-shape {
    transform: scale(1);
}

.pp-radar-dot {
    fill: var(--pp);
}

.pp-aw {
    display: flex;
    gap: 8px;
    padding: 6px 0;
}

.pp-aw + .pp-aw {
    border-top: 1px dashed var(--pp-line);
}

.pp-aw-ic {
    display: grid;
    place-items: center;
    flex: 0 0 40px;
    height: 40px;
    border-radius: 10px;
    background: #fff4d6;
    font-size: 24px;
}

.pp-aw b {
    display: block;
    font-size: 11px;
}

.pp-aw small {
    display: block;
    font-size: 10px;
    line-height: 1.4;
    color: var(--pp-mute);
}

.pp-trait {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 0;
    font-size: 11px;
}

.pp-trait + .pp-trait {
    border-top: 1px solid var(--pp-line);
}

.pp-trait .pp-ic {
    width: 17px;
    height: 17px;
    color: var(--pp);
}

.pp-trait span {
    flex: 1;
    color: var(--pp);
}

.pp-trait em {
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--pp-soft);
    color: var(--pp);
    font-size: 10px;
    font-style: normal;
}

.pp-evals {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(62px, 1fr));
    gap: 6px;
}

.pp-ev {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 6px 2px;
    border: 1px solid var(--pp-line);
    border-radius: 10px;
    color: var(--pp-ink);
    text-align: center;
}

.pp-ev img {
    width: 38px;
    height: 38px;
    margin-bottom: 3px;
    border-radius: 50%;
    object-fit: cover;
}

.pp-ev b {
    font-size: 10px;
}

.pp-ev small {
    font-size: 9px;
    color: var(--pp-mute);
}

.pp-ev em {
    font-size: 11.5px;
    font-style: normal;
    font-weight: 700;
}

.pp-ev-add {
    justify-content: center;
    border-style: dashed;
}

.pp-ev-add span {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border: 1px solid var(--pp-line);
    border-radius: 50%;
    font-size: 20px;
    color: var(--pp);
}

.pp-tl-sm li {
    padding-left: 14px;
}

.pp-card.pp-sup {
    border: 0;
    background: linear-gradient(160deg, #0b1e5c, #1a2f7a);
    color: #fff;
}

.pp-sup h3 {
    color: #fff;
}

.pp-sup-n {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.pp-sup-ic {
    width: 32px;
    height: 32px;
    align-self: center;
    object-fit: contain;
    animation: fdBob 2.6s ease-in-out infinite;
}

.pp-sup-n b {
    font-size: 24px;
    font-weight: 800;
}

.pp-sup-n small {
    font-size: 11px;
    color: #c9d6f2;
}

.pp-sup-av {
    display: flex;
    margin: 8px 0 6px;
    padding-left: 6px;
}

.pp-sup-av img,
.pp-sup-av span {
    width: 28px;
    height: 28px;
    margin-left: -6px;
    border: 2px solid #1a2f7a;
    border-radius: 50%;
    object-fit: cover;
}

.pp-sup-av span {
    display: grid;
    place-items: center;
    background: var(--pp-2);
    font-size: 10px;
    font-weight: 700;
}

.pp-sup p {
    margin: 0;
    font-size: 10px;
    color: #c9d6f2;
}

.pp-sup p b {
    color: #fff;
}

.pp-privacy .pp-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: 1px solid var(--pp-line);
    border-radius: 10px;
    color: var(--pp-ink);
}

.pp-privacy .pp-row + .pp-row {
    margin-top: 8px;
}

.pp-row span {
    flex: 1;
}

.pp-row b {
    display: block;
    font-size: 12.5px;
}

.pp-row small {
    font-size: 10.5px;
    color: var(--pp-mute);
}

/* การ์ดค่อยๆ โผล่ตอนเลื่อนถึง */
.pp-reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity .5s ease, transform .5s ease;
}

.pp-reveal.in {
    opacity: 1;
    transform: none;
}

@media (max-width: 360px) {
    .pp-grid { grid-template-columns: 1fr; }
    .pp-act { font-size: 10.5px; }
    .pp-hero h1 { font-size: 22px; }
}

@media (prefers-reduced-motion: reduce) {
    .pp-reveal { opacity: 1; transform: none; transition: none; }
    .pp-medal, .pp-play, .pp-sup-ic { animation: none; }
}
/* home.php: แท็บ "โปรไฟล์ของฉัน" เป็นลิงก์ไปโปรไฟล์สาธารณะ */
a.video-tab {
    text-decoration: none;
}


/* user.php ฟีดของฉัน: ปุ่มเป็นลิงก์ */
a.uf-follow,
a.uf-cheer {
    text-decoration: none;
}

.uf-empty a {
    color: var(--navy);
    font-weight: 600;
}


/* ============================================================
   เพื่อน / รายชื่อนักเรียน (students_list.php) — sl-*
   ============================================================ */
.sl-top {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 1px solid #e3e6ec;
    background: rgba(255, 255, 255, .95);
    backdrop-filter: blur(8px);
}

.sl-top-back {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    color: #1f2b45;
}

.sl-top svg {
    width: 26px;
    height: 26px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.sl-brand {
    display: flex;
    align-items: center;
    gap: 6px;
}

.sl-brand img {
    width: 40px;
}

.sl-brand span {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 20px;
    line-height: 1.05;
    color: #b8861b;
}

.sl-brand small {
    display: block;
    font-family: inherit;
    font-size: 8px;
    color: #7a5516;
}

.sl-bell {
    position: relative;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid #f1e3b8;
    border-radius: 50%;
    background: #fffdf6;
    color: #1f2b45;
}

.sl-bell svg {
    width: 22px;
    height: 22px;
}

.sl-bell i {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 999px;
    background: #8b7cf0;
    color: #fff;
    font-size: 11px;
    font-style: normal;
    line-height: 18px;
    text-align: center;
}

.sl-me {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 24px 16px 26px;
    border-bottom: 1px solid #e3e6ec;
    background: #fff;
}

.sl-me-av {
    flex: 0 0 104px;
    height: 104px;
    padding: 4px;
    border: 1.5px solid #9aa0ad;
    border-radius: 50%;
}

.sl-me-av img {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.sl-me-info {
    min-width: 0;
    flex: 1;
}

.sl-me-info h2 {
    margin: 0;
    font-size: 19px;
    font-weight: 700;
    color: #0b1e5c;
}

.sl-me-info p {
    margin: 2px 0 10px;
    font-size: 13px;
    color: #3b63b0;
}

.sl-me-stats {
    display: flex;
    gap: 18px;
}

.sl-me-stats span {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #1f2b45;
    white-space: nowrap;
}

.sl-me-stats b {
    font-size: 19px;
    font-weight: 600;
    color: #1f2b45;
}

.sl-page {
    padding-top: 18px;
    padding-bottom: 24px;
}

.sl-search label {
    display: block;
    margin: 0 2px 8px;
    font-size: 14px;
    font-weight: 600;
    color: #1f2b45;
}

.sl-search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 46px;
    padding: 0 12px;
    border: 1px solid #c8cdd8;
    border-radius: 6px;
    background: #fff;
}

.sl-search-box:focus-within {
    border-color: #0b1e5c;
}

.sl-search-box svg {
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    fill: none;
    stroke: #8a93a6;
    stroke-width: 2;
    stroke-linecap: round;
}

.sl-search-box input {
    flex: 1;
    min-width: 0;
    height: 100%;
    border: 0;
    background: transparent;
    font-family: inherit;
    font-size: 16px;
    color: #1f2b45;
    text-align: center;
}

.sl-search-box input:focus {
    outline: none;
    text-align: left;
}

.sl-h {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin: 18px 2px 8px;
    font-size: 14px;
    font-weight: 600;
    color: #1f2b45;
}

.sl-h small {
    font-size: 11px;
    font-weight: 400;
    color: #8a93a6;
}

.sl-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sl-item[hidden] {
    display: none;
}

.sl-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px 12px 18px;
    border: 1px solid #e3e6ec;
    border-radius: 6px;
    background: #fff;
    color: #1f2b45;
    box-shadow: 0 1px 4px rgba(11, 30, 63, .04);
    animation: scIn .3s ease both;
    animation-delay: calc(var(--i) * 30ms);
    transition: transform .15s, box-shadow .2s;
}

.sl-item:active {
    transform: scale(.98);
}

.sl-av {
    flex: 0 0 78px;
    height: 78px;
    padding: 3px;
    border: 1.5px solid #9aa0ad;
    border-radius: 50%;
}

.sl-av img {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.sl-txt {
    flex: 1;
    min-width: 0;
}

.sl-txt b {
    display: block;
    font-size: 16px;
    font-weight: 500;
}

.sl-txt em {
    margin-left: 4px;
    padding: 1px 7px;
    border-radius: 999px;
    background: #e3f6ea;
    color: #1f8a4c;
    font-size: 10px;
    font-style: normal;
    vertical-align: 2px;
}

.sl-txt small {
    display: block;
    overflow: hidden;
    font-size: 13px;
    color: #3b63b0;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.sl-chev {
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    fill: none;
    stroke: #1f2b45;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.sl-empty {
    margin: 30px 0;
    text-align: center;
    font-size: 13px;
    color: #8a93a6;
}

.sl-empty[hidden] {
    display: none;
}

@media (max-width: 380px) {
    .sl-me { gap: 12px; }
    .sl-me-av { flex-basis: 84px; height: 84px; }
    .sl-me-stats { gap: 12px; }
    .sl-me-stats b { font-size: 17px; }
    .sl-av { flex-basis: 64px; height: 64px; }
}
/* students_list.php: แถบเพื่อนของคุณ + การ์ดเพื่อนที่แนะนำแบบเล็ก 2 คอลัมน์ */
.sl-clear {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #eef0f4;
    color: #5b6780;
    font-size: 12px;
}

.sl-friends {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 2px 2px 8px;
    scrollbar-width: none;
}

.sl-friends::-webkit-scrollbar {
    display: none;
}

.sl-friends a {
    display: flex;
    flex: 0 0 62px;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: #1f2b45;
    animation: scIn .3s ease both;
}

.sl-friends img {
    width: 56px;
    height: 56px;
    padding: 2px;
    border: 2px solid #e2bd45;
    border-radius: 50%;
    object-fit: cover;
}

.sl-friends span {
    width: 100%;
    overflow: hidden;
    font-size: 11px;
    text-align: center;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.sl-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

@media (min-width: 600px) {
    .sl-grid { grid-template-columns: repeat(3, 1fr); }
}

.sl-card {
    display: flex;
    flex-direction: column;
    padding: 12px 10px 10px;
    border: 1px solid #e3e6ec;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 1px 4px rgba(11, 30, 63, .04);
    text-align: center;
    animation: scIn .3s ease both;
    animation-delay: calc(var(--i) * 30ms);
}

.sl-card-link {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    min-width: 0;
    color: #1f2b45;
}

.sl-card-av {
    width: 60px;
    height: 60px;
    margin-bottom: 6px;
    padding: 2px;
    border: 1.5px solid #9aa0ad;
    border-radius: 50%;
}

.sl-card-av img {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.sl-card b {
    width: 100%;
    overflow: hidden;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.sl-reason {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    min-height: 2.8em;
    margin-top: 2px;
    font-size: 11px;
    line-height: 1.4;
    color: #3b63b0;
}

.sl-reason i {
    margin-right: 3px;
    font-style: normal;
}

.sl-school {
    width: 100%;
    overflow: hidden;
    font-size: 10.5px;
    color: #8a93a6;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.sl-follow {
    width: 100%;
    height: 32px;
    margin-top: 8px;
    border: 0;
    border-radius: 6px;
    background: #0b1e5c;
    color: #fff;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s, color .2s, transform .15s;
}

.sl-follow:active {
    transform: scale(.95);
}

.sl-follow.on {
    background: #eef3ff;
    color: #0b1e5c;
}

.sl-follow.sl-pop {
    animation: scPop .4s ease;
}