/* member.superlsm99.link ธีมใหม่ ui=2 — mobile first, ดีไซน์ตาม www.superlsm99.link ui=2 (css2/app.css ของเว็บหลัก) */
:root {
    --blue: #1f5fe0;
    --blue-d: #1648b8;
    --orange: #ff7a1a;
    --orange-d: #f05f00;
    --navy: #0d1b4c;
    --text: #1d2747;
    --muted: #6b7591;
    --bg: #f4f7fd;
    --panel: #e9f0fc;
    --line: #dbe4f5;
    --app-w: 440px;
    --bn-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.ui2 {
    margin: 0;
    font-family: 'Kanit', 'Noto Sans Thai', sans-serif;
    font-size: 15px;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg);
}
/* หน้าเก่า (.legacy) โหลด css2/base.css ที่ใส่รูป bg-1.png ไว้ใน body::before → ปิดให้พื้นหลังเหมือนหน้าแรก */
body.ui2::before { display: none; }
.ui2 img { max-width: 100%; height: auto; }
/* reset เฉพาะส่วนธีมใหม่ (:where = specificity 0 ไม่ทับ class ของปุ่ม) */
:where(.u2) img { display: block; }
:where(.u2) a { color: inherit; text-decoration: none; }
:where(.u2) button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:where(.u2) :is(h1, h2, h3, p) { margin: 0; }

.ic { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* โครงหลัก */
.app {
    position: relative;
    max-width: var(--app-w);
    min-height: 100vh;
    margin: 0 auto;
    background: #fff;
    padding-bottom: calc(var(--bn-h) + env(safe-area-inset-bottom));
    display: flex; flex-direction: column;
}
.app > main, .app > .legacy { flex: 1 0 auto; }
.app.no-bn { padding-bottom: 0; }

/* header: โลโก้ซ้าย | แจ้งเตือน · ยอดเงิน+ฝาก · เมนูผู้ใช้ (แบบ member.77up.lol .u2-hd-r) */
.hd {
    position: sticky; top: 0; z-index: 20;
    display: flex; align-items: center; gap: 8px;
    height: 56px; padding: 0 10px 0 12px;
    background: #fff;
    box-shadow: 0 1px 0 var(--line);
}
.hd-logo { flex: 0 1 auto; min-width: 0; }
.hd-logo img { height: 24px; width: auto; max-width: 100%; object-fit: contain; object-position: left center; }
.hd-r { margin-left: auto; flex: none; display: flex; align-items: center; gap: 6px; }
.hd-btn {
    position: relative;
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 10px;
    color: var(--navy);
}
.hd-btn:hover { background: var(--panel); }
.hd-dot {
    position: absolute; top: 0; right: -2px;
    min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px;
    font-size: 10.5px; font-weight: 600; line-height: 17px; text-align: center; color: #fff;
    background: #e5484d; box-shadow: 0 0 0 2px #fff;
}
/* ปุ่มกลมแจ้งเตือน */
.hd-bell {
    position: relative;
    display: grid; place-items: center;
    width: 36px; height: 36px; border-radius: 50%;
    color: var(--blue); background: var(--panel);
    box-shadow: inset 0 0 0 1px var(--line);
}
.hd-bell .ic { width: 19px; height: 19px; }
/* กล่องยอดเงิน + ปุ่มฝาก */
.hd-wl {
    display: flex; align-items: center; gap: 5px; min-width: 0;
    height: 38px; padding: 3px 3px 3px 6px; border-radius: 999px;
    background: var(--panel); box-shadow: inset 0 0 0 1px var(--line);
}
.hd-wl-coin { width: 22px; height: 22px; flex: none; }
.hd-wl-v { font-size: 14px; font-weight: 600; color: var(--navy); white-space: nowrap; font-variant-numeric: tabular-nums; }
.hd-wl-dep {
    display: grid; place-items: center; flex: none;
    width: 32px; height: 32px; border-radius: 50%;
    color: #fff; background: linear-gradient(180deg, #ff8c32, var(--orange-d));
    box-shadow: 0 2px 6px rgba(240, 95, 0, .35);
}
.hd-wl-dep .ic { width: 18px; height: 18px; stroke-width: 2.6; }
/* รูปผู้ใช้ */
.hd-av {
    position: relative; display: block; flex: none;
    width: 38px; height: 38px; padding: 2px; border-radius: 50%;
    background: linear-gradient(135deg, #5b9bff, var(--blue) 45%, var(--navy));
}
.hd-av > span {
    display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%;
    color: var(--blue); background: #fff;
}
.hd-av > span .ic { width: 19px; height: 19px; }
.hd-av-cr {
    position: absolute; right: -3px; bottom: -3px;
    display: grid; place-items: center; width: 16px; height: 16px; border-radius: 50%;
    color: #fff; background: var(--blue); box-shadow: 0 0 0 2px #fff;
}
.hd-av-cr .ic { width: 11px; height: 11px; stroke-width: 3; }
/* dropdown — ยึดขอบขวาของ header (.hd sticky) ไม่หลุดจอ */
.hd-dd {
    position: absolute; top: calc(100% + 4px); right: 8px; z-index: 30;
    width: 300px; max-width: calc(100vw - 20px); max-height: calc(100vh - 80px); overflow: auto;
    padding: 12px; border-radius: 16px;
    background: #fff; border: 1px solid var(--line);
    box-shadow: 0 14px 34px rgba(13, 27, 76, .18);
    opacity: 0; visibility: hidden; transform: translateY(-6px);
    transition: opacity .15s, transform .15s, visibility .15s;
}
.hd-dd.is-open { opacity: 1; visibility: visible; transform: none; }
.hd-dd-user { width: 320px; padding: 0; }
.hd-dd-ttl { font-weight: 600; color: var(--navy); margin-bottom: 8px; }
.dd-top {
    display: flex; align-items: center; gap: 10px; padding: 14px;
    background: linear-gradient(180deg, var(--panel), #fff);
}
.dd-top b { display: block; font-weight: 600; color: var(--navy); line-height: 1.3; }
.dd-top small { font-size: 12px; color: var(--muted); }
.dd-bal { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 4px 14px 12px; }
.dd-bal > div {
    display: flex; align-items: center; gap: 6px; min-width: 0;
    padding: 7px 8px; border-radius: 10px;
    background: var(--bg); border: 1px solid var(--line);
}
.dd-bal img { width: 22px; height: 22px; flex: none; }
.dd-bal span { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.dd-bal small { font-size: 11px; color: var(--muted); }
.dd-bal b { font-size: 14px; font-weight: 600; color: var(--navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.dd-qa { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 0 14px 10px; }
.dd-qa .btn2 { height: 40px; font-size: 15px; border-radius: 10px; }
.dd-qa .dd-qa-w { color: var(--blue); background: #fff; border: 1px solid var(--blue); box-shadow: none; }
.dd-qa .dd-qa-w:hover { color: var(--blue); }
.hd-dd-user .mn { padding: 0 14px 4px; border-top: 1px solid var(--line); }
@media (max-width: 360px) {
    .hd { gap: 6px; padding: 0 8px; }
    .hd-logo img { height: 20px; }
    .hd-r { gap: 4px; }
    .hd-wl-v { font-size: 13px; }
}

/* ปุ่ม */
.btn2 {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 48px; padding: 0 16px;
    border-radius: 12px;
    font-size: 17px; font-weight: 500; color: #fff;
    box-shadow: 0 3px 8px rgba(13, 27, 76, .15);
    transition: transform .1s, filter .15s;
}
.btn2:active { transform: scale(.97); }
.btn2:hover { filter: brightness(1.06); color: #fff; }
.btn2-blue { background: linear-gradient(180deg, #2c6ff0, var(--blue-d)); }
.btn2-orange { background: linear-gradient(180deg, #ff8c32, var(--orange-d)); }
.btn2-block { width: 100%; }

/* ส่วนเนื้อหา */
.wrap { padding: 12px 12px 4px; }
.sec-hd { display: flex; align-items: center; justify-content: space-between; margin: 6px 0 10px; }
.sec-ttl {
    position: relative;
    font-size: 22px; font-weight: 600; color: var(--navy);
    padding-bottom: 4px;
}
.sec-ttl::after {
    content: ""; position: absolute; left: 0; bottom: 0;
    width: 28px; height: 3px; border-radius: 3px; background: var(--orange);
}
.sec-all { display: inline-flex; align-items: center; gap: 2px; font-size: 14px; font-weight: 500; color: var(--blue); }
.sec-all:hover { color: var(--blue-d); }
.sec-all .ic { width: 16px; height: 16px; }

/* ---------- หน้าแรก ---------- */
/* แจ้งข่าว */
.nt { display: grid; gap: 8px; }
.nt-item {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 10px 12px; border-radius: 12px;
    background: #fff8ec; border: 1px solid #ffe2b8;
}
.nt-item .ic { width: 20px; height: 20px; margin-top: 2px; color: var(--orange-d); }
.nt-ttl { font-size: 14px; font-weight: 500; color: var(--navy); line-height: 1.35; }
.nt-time { font-size: 12px; color: var(--muted); }

/* กระเป๋าเครดิต */
.wl {
    position: relative; overflow: hidden;
    padding: 14px 16px 16px;
    color: #fff;
    background: linear-gradient(135deg, #0d1b4c 0%, #163a9c 55%, var(--blue) 100%);
    border-radius: 18px;
    box-shadow: 0 8px 22px rgba(13, 27, 76, .28);
}
.wl::before {
    content: ""; position: absolute; top: -40%; right: -30px;
    width: 190px; height: 180%;
    background: linear-gradient(90deg,
        transparent 0 22%, var(--orange) 22% 32%, transparent 32% 46%,
        rgba(255, 255, 255, .14) 46% 53%, transparent 53% 64%,
        rgba(255, 140, 50, .45) 64% 69%, transparent 69%);
    transform: skewX(-24deg);
    opacity: .55;
}
.wl > * { position: relative; }
/* แบบ member.77up.lol #wallet-blc: ไอคอน + ยอดเงินทั้งหมด / ชิปเครดิต · เพชร */
.wl-top { display: flex; align-items: center; gap: 12px; }
.wl-ic {
    display: grid; place-items: center; flex: none;
    width: 46px; height: 46px; border-radius: 12px;
    color: #fff; background: linear-gradient(180deg, #ff8c32, var(--orange-d));
    box-shadow: 0 4px 14px rgba(255, 122, 26, .4);
}
.wl-ic .ic { width: 24px; height: 24px; }
.wl-t { min-width: 0; flex: 1 1 auto; }
.wl-t small { display: block; font-size: 12.5px; opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wl-t b {
    display: block; font-size: 28px; font-weight: 600; line-height: 1.15;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums;
    text-shadow: 0 2px 12px rgba(255, 122, 26, .45);
}
.wl-t b em { font-style: normal; font-size: 18px; margin-right: 3px; color: #ffc04d; }
.wl-ref {
    display: flex; align-items: center; justify-content: center; flex: none;
    width: 32px; height: 32px;
    border-radius: 50%; background: rgba(255, 255, 255, .16); color: #fff;
}
.wl-ref .ic { width: 18px; height: 18px; }
.wl-ref.is-spin .ic { animation: ui2-spin .7s linear infinite; }
.wl-chips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.wl-chip {
    display: flex; align-items: center; gap: 7px; min-width: 0;
    padding: 8px; border-radius: 10px;
    background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .18);
}
.wl-chip img { width: 24px; height: 24px; flex: none; }
.wl-chip div { min-width: 0; }
.wl-chip small { display: block; font-size: 11px; line-height: 1.1; opacity: .75; }
.wl-chip b { display: block; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.wl-btn {
    display: flex; align-items: center; justify-content: center; gap: 5px; min-width: 0;
    border-radius: 10px; font-size: 15px; font-weight: 500; white-space: nowrap;
    transition: transform .1s, filter .15s;
}
.wl-btn .ic { width: 18px; height: 18px; }
.wl-btn:active { transform: scale(.97); }
.wl-btn:hover { filter: brightness(1.06); }
.wl-btn-dep { color: #fff; background: linear-gradient(180deg, #ff8c32, var(--orange-d)); box-shadow: 0 3px 10px rgba(240, 95, 0, .35); }
.wl-btn-dep:hover { color: #fff; }
.wl-btn-wd { color: var(--blue-d); background: #fff; }
.wl-btn-wd:hover { color: var(--blue-d); }

/* เมนูลัด */
.qk { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.qk-item {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    padding: 8px;
    font-size: 17px; font-weight: 600; line-height: 1.25; color: var(--navy);
    background: var(--panel); border-radius: 14px;
    transition: transform .1s;
}
.qk-item:active { transform: scale(.97); }
.qk-ic { width: 56px; height: 56px; flex: none; }

/* สไลด์ (scroll-snap) */
.sl { position: relative; border-radius: 14px; overflow: hidden; box-shadow: 0 4px 14px rgba(13, 27, 76, .15); }
.sl-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.sl-track::-webkit-scrollbar { display: none; }
.sl-item { flex: 0 0 100%; scroll-snap-align: start; }
.sl-item img { width: 100%; }
.sl-dots { position: absolute; left: 0; right: 0; bottom: 8px; display: flex; justify-content: center; gap: 6px; }
.sl-dots i {
    width: 8px; height: 8px; border-radius: 8px;
    background: rgba(255, 255, 255, .8); box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
    transition: width .25s, background-color .25s;
}
.sl-dots i.is-on { width: 18px; background: var(--orange); }
/* hero เต็มความกว้างใต้ header (ชุดเดียวกับ superlsm99.link ui2 .hero) */
.sl-hero { border-radius: 0; box-shadow: none; }
.sl-hero .sl-item img { aspect-ratio: 960 / 500; object-fit: cover; }
.sl-hero .sl-dots { bottom: 10px; }

/* box หวย แบบ member.77up.lol #u2-lotto (.lottery-banner-section ค่ามือถือ) — สีธีม superlsm99 ; ใบแรก หวยรัฐบาลไทย 2x2 */
.lb-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.lb-card {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    min-width: 0; aspect-ratio: 1 / 1; overflow: hidden;
    padding: 6px 2px; border-radius: 12px;
    color: var(--navy); text-align: center;
    background: #fff; border: 1px solid var(--line);
    box-shadow: 0 3px 10px rgba(13, 27, 76, .08);
    transition: transform .1s, border-color .15s;
}
.lb-card:hover { border-color: var(--blue); }
.lb-card:active { transform: scale(.97); }
.lb-card > * { flex-shrink: 0; }
.lb-head { display: contents; }
.lb-icon {
    display: grid; place-items: center; flex: none;
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--panel); box-shadow: inset 0 0 0 1px rgba(31, 95, 224, .2);
}
.ui2 .lb-icon img { width: 100%; height: 100%; object-fit: contain; }
.ui2 .lb-icon .lb-flag { width: 22px; height: 22px; border-radius: 50%; box-shadow: 0 1px 3px rgba(13, 27, 76, .25); }
.lb-name {
    display: block; max-width: 100%;
    font-size: 12px; font-weight: 600; line-height: 1.25;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lb-date { margin-top: -2px; font-size: 10px; color: var(--muted); }
.lb-result { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; width: 100%; padding: 0 3px; }
.lb-result > span { display: flex; flex-direction: column; padding: 1px 2px; border-radius: 6px; background: var(--panel); }
.lb-result small { font-size: 9px; font-weight: 500; line-height: 1.3; color: var(--muted); }
.lb-result b { font-size: 14px; font-weight: 700; line-height: 1.2; letter-spacing: .04em; color: var(--blue-d); font-variant-numeric: tabular-nums; }
.lb-result.wait b { color: #b3bfd9; }
.lb-result .lb-wide { grid-column: 1 / -1; }
.lb-result .lb-wide b { word-spacing: .35em; }
.lb-first { display: none; }
.lb-count { display: flex; flex-direction: column; align-items: center; width: 100%; padding: 0 4px; line-height: 1.25; }
.lb-count small { font-size: 10px; font-weight: 500; }
.lb-count b { font-size: 13px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.lb-count.open { color: #e5384f; }
.lb-count.soon { color: #16a05a; }
.lb-cards [hidden] { display: none !important; }
/* ใบใหญ่ หวยรัฐบาลไทย — พื้น gradient น้ำเงินอ่อน → ส้มอ่อน ชื่อ/เลขสีน้ำเงินเข้ม รางวัลที่ 1 สีส้ม */
.lb-card:first-child {
    grid-column: span 2; grid-row: span 2;
    gap: 5px; padding: 8px 4px;
    color: var(--navy); border-color: #cfdcf6;
    background:
        radial-gradient(90% 65% at 100% 100%, rgba(255, 170, 110, .45) 0%, rgba(255, 170, 110, 0) 70%),
        linear-gradient(150deg, #dbe7ff 0%, #eef3ff 50%, #ffe7d4 100%);
    box-shadow: 0 6px 18px rgba(31, 95, 224, .14);
}
.lb-card:first-child .lb-head { display: flex; align-items: center; justify-content: center; gap: 6px; max-width: 100%; }
.lb-card:first-child .lb-icon { width: 44px; height: 44px; background: #fff; box-shadow: 0 2px 8px rgba(13, 27, 76, .12); }
.lb-card:first-child .lb-name { font-size: 16px; font-weight: 700; color: var(--navy); }
.lb-card:first-child .lb-date { margin-top: -4px; color: var(--muted); }
.lb-card:first-child .lb-first {
    display: flex; flex-direction: column;
    width: calc(100% - 16px); padding: 4px 6px; border-radius: 12px;
}
.lb-card:first-child .lb-first,
.lb-card:first-child .lb-result > span { background: rgba(255, 255, 255, .75); border: 1px solid rgba(31, 95, 224, .14); }
.lb-first small { font-size: 11px; font-weight: 500; color: var(--muted); }
.lb-first b { font-size: 24px; font-weight: 700; line-height: 1.15; letter-spacing: .08em; color: var(--orange-d); font-variant-numeric: tabular-nums; }
.lb-card:first-child .lb-result { width: calc(100% - 16px); padding: 0; gap: 6px; }
.lb-card:first-child .lb-result b { font-size: 20px; }
.lb-card:first-child .lb-count b { font-size: 20px; }
@media (max-width: 380px) {
    .lb-card { gap: 2px; padding: 4px 2px; }
    .lb-icon { width: 26px; height: 26px; }
    .ui2 .lb-icon .lb-flag { width: 18px; height: 18px; }
    .lb-name { font-size: 11px; }
    .lb-result b { font-size: 13px; }
    .lb-card:first-child { gap: 3px; }
    .lb-card:first-child .lb-icon { width: 36px; height: 36px; }
    .lb-first b { font-size: 21px; }
    .lb-card:first-child .lb-result b { font-size: 17px; }
}

/* กิจกรรมพิเศษ — การ์ดไอคอนซ้าย + หัวข้อ (อังกฤษ/ไทย) และคำอธิบายขวา */
.pk-list { display: grid; gap: 10px; }
.pk-card {
    position: relative; display: flex; align-items: center; gap: 12px;
    padding: 12px 34px 12px 12px; overflow: hidden;
    background: #fff; border: 1px solid var(--line); border-radius: 14px;
    box-shadow: 0 4px 14px rgba(13, 27, 76, .07);
}
.pk-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: linear-gradient(180deg, var(--blue), var(--orange)); }
.pk-ic {
    flex: 0 0 72px; height: 72px; display: flex; align-items: center; justify-content: center; border-radius: 14px;
    background: radial-gradient(circle at 70% 25%, #ffe7d4 0, rgba(255, 231, 212, 0) 55%), linear-gradient(150deg, #dbe7ff, #eef3ff);
}
.pk-ic img { width: 58px; height: 58px; object-fit: contain; filter: drop-shadow(0 3px 4px rgba(13, 27, 76, .22)); }
.pk-tx { display: flex; flex-direction: column; min-width: 0; }
.pk-en { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; line-height: 1.2; color: var(--orange-d); }
.pk-th { font-size: 17px; font-weight: 600; line-height: 1.3; color: var(--navy); }
.pk-desc { margin-top: 2px; font-size: 13px; line-height: 1.4; color: var(--muted); }
.pk-go { position: absolute; right: 10px; top: 50%; width: 18px; height: 18px; margin-top: -9px; color: var(--blue); }

/* โปรโมชั่น — การ์ดแถวละ 1 (.pm) + sheet รายละเอียด (.sheet-pro) */
.pm-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.pm-card {
    display: flex; flex-direction: column; overflow: hidden;
    background: #fff; border: 1px solid var(--line); border-radius: 12px;
    box-shadow: 0 4px 14px rgba(13, 27, 76, .07);
}
.pm-card img { display: block; width: 100%; aspect-ratio: 960 / 500; object-fit: cover; }
.pm-tx { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px 12px; }
.pm-ttl, .pm-desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pm-ttl { font-size: 15px; font-weight: 600; line-height: 1.35; color: var(--navy); }
.pm-desc { font-size: 13px; line-height: 1.4; color: var(--muted); }
.sheet .sheet-box.is-dragging { transition: none; }
.sheet-pro .sheet-box { padding: 0 16px calc(20px + env(safe-area-inset-bottom)); transition: transform .36s cubic-bezier(.22, 1, .36, 1); }
.pro-hd { position: sticky; top: 0; z-index: 2; height: 30px; margin: 0 -16px; background: #fff; }
.pro-grip { position: absolute; left: 50%; top: 9px; width: 40px; height: 4px; margin-left: -20px; border-radius: 4px; background: #d3dbec; }
.pro-x {
    position: absolute; right: 8px; top: 6px; width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    border: 0; border-radius: 50%; background: var(--panel); color: var(--navy); cursor: pointer;
}
.pro-x .ic { width: 18px; height: 18px; }
.pro-img { display: block; width: 100%; aspect-ratio: 960 / 500; object-fit: cover; margin-top: 8px; border-radius: 12px; box-shadow: 0 4px 14px rgba(13, 27, 76, .15); }
.pro-ttl { margin: 14px 0 8px; font-size: 19px; font-weight: 600; line-height: 1.35; color: var(--navy); }
.pro-detail { padding-top: 10px; border-top: 1px solid var(--line); font-size: 14px; line-height: 1.65; color: var(--text); overflow-wrap: anywhere; }
/* รายละเอียดจาก editor มี font-family/font-size inline — ใช้ฟอนต์ของธีม */
.pro-detail * { font-family: inherit !important; font-size: inherit !important; max-width: 100%; }
.pro-detail h1, .pro-detail h2, .pro-detail h3, .pro-detail h4 { margin: 0 0 6px; font-size: 15px !important; font-weight: 600; color: var(--blue-d); }
.pro-detail p { margin: 0 0 6px; }
.pro-detail ul, .pro-detail ol { margin: 0 0 8px; padding-left: 20px; }
.pro-detail ul { list-style: disc; }
.pro-detail ol { list-style: decimal; }
.pro-detail strong, .pro-detail b { font-weight: 600; color: var(--navy); }
.pro-detail a { color: var(--blue); text-decoration: underline; }
.pro-detail img { height: auto; border-radius: 8px; }

/* footer */
.ft { margin-top: 16px; padding: 12px; text-align: center; background: var(--panel); font-size: 13px; color: var(--muted); }
.ft-age { display: flex; align-items: center; justify-content: center; gap: 8px; }
.ft-18 {
    display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; border: 2px solid var(--navy); border-radius: 50%;
    font-size: 11px; font-weight: 600; color: var(--navy);
}
.ft-copy { margin-top: 6px; font-size: 12px; }

/* bottom nav */
.bn {
    position: fixed; z-index: 30; bottom: 0; left: 50%;
    width: 100%; max-width: var(--app-w);
    transform: translateX(-50%);
    display: grid; grid-template-columns: repeat(5, 1fr);
    height: calc(var(--bn-h) + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    background: #fff;
    box-shadow: 0 -2px 12px rgba(13, 27, 76, .1);
}
.bn-item {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    font-size: 12px; color: var(--blue);
}
.bn-item:hover { color: var(--blue); }
.bn-item .ic { width: 24px; height: 24px; }
.bn-main { justify-content: flex-end; padding-bottom: 6px; color: var(--orange); font-weight: 500; }
.bn-main:hover { color: var(--orange); }
.bn-main-ic {
    display: flex; align-items: center; justify-content: center;
    width: 54px; height: 54px; margin-top: -26px;
    border: 4px solid #fff; border-radius: 50%;
    background: linear-gradient(180deg, #ff8c32, var(--orange-d));
    color: #fff;
    box-shadow: 0 4px 12px rgba(240, 95, 0, .4);
}
.bn-main-ic .ic { width: 26px; height: 26px; }

/* bottom sheet / popup — z-index เหนือ LIVECHAT (9999) */
.sheet { position: fixed; inset: 0; z-index: 10000; visibility: hidden; }
.sheet.is-open { visibility: visible; }
.sheet-bg { position: absolute; inset: 0; background: rgba(5, 12, 35, .55); opacity: 0; transition: opacity .2s; }
.sheet.is-open .sheet-bg { opacity: 1; }
.sheet-box {
    position: absolute; bottom: 0; left: 50%;
    width: 100%; max-width: var(--app-w);
    max-height: 90vh; overflow-y: auto;
    padding: 22px 16px calc(22px + env(safe-area-inset-bottom));
    background: #fff;
    border-radius: 18px 18px 0 0;
    transform: translate(-50%, 100%);
    transition: transform .25s ease;
}
.sheet.is-open .sheet-box { transform: translate(-50%, 0); }
.sheet-x {
    position: absolute; right: 12px; top: 12px; z-index: 2;
    display: flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: 50%;
    color: var(--muted); background: var(--panel);
}
.sheet-x .ic { width: 18px; height: 18px; }
.sheet-ttl { font-size: 20px; font-weight: 600; color: var(--navy); margin-bottom: 14px; }

/* เมนูผู้ใช้ (ใน dropdown) */
.mn-av {
    display: grid; place-items: center; flex: none;
    width: 44px; height: 44px; border-radius: 50%;
    color: #fff; background: linear-gradient(135deg, var(--navy), var(--blue));
}
.mn { display: grid; padding-top: 6px; }
.mn a {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 4px; border-bottom: 1px solid var(--line);
    font-weight: 500; color: var(--navy);
}
.mn a .ic { width: 22px; height: 22px; color: var(--blue); }
.mn a.is-out { color: #c0262d; border-bottom: 0; }
.mn a.is-out .ic { color: #c0262d; }

/* แจ้งข่าว (dropdown) */
.nw-list { display: grid; gap: 8px; }
.nw-list a { display: block; padding: 10px 12px; border-radius: 12px; background: var(--bg); }
.nw-list a.is-unread { background: #fff8ec; }
.nw-list b { display: block; font-weight: 500; color: var(--navy); }
.nw-list small { color: var(--muted); }

/* ติดต่อ */
.contact { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.contact-item {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    min-height: 52px; padding: 10px 16px; border-radius: 12px;
    font-size: 16px; font-weight: 600; color: #fff !important;
}
.contact-item img { width: 28px; height: 28px; flex: none; }
.contact-item.is-line { background: #06C755; }
.contact-item.is-tg { background: #2AABEE; }

/* popup ประกาศ */
.pp .sheet-box { padding: 14px 14px calc(16px + env(safe-area-inset-bottom)); }
.pp-ttl { padding: 4px 44px 10px 4px; font-size: 18px; font-weight: 600; color: var(--navy); }
.pp .sl { box-shadow: none; }
.pp-ft { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.pp-chk { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); cursor: pointer; }
.pp-chk input { width: 18px; height: 18px; accent-color: var(--blue); }
.pp-ft .btn2 { height: 40px; font-size: 15px; }

body.is-locked { overflow: hidden; }

/* ---------- หน้าเข้าสู่ระบบ / สมัครสมาชิก (หน้าเต็ม) ---------- */
.au-banner img { width: 100%; aspect-ratio: 960 / 500; object-fit: cover; }
.au-card { position: relative; margin-top: -18px; background: #fff; border-radius: 18px 18px 0 0; }
.lg-hd {
    position: relative; overflow: hidden;
    padding: 16px 20px 30px;
    color: #fff;
    background: linear-gradient(135deg, #0d1b4c 0%, #163a9c 55%, var(--blue) 100%);
    border-radius: 18px 18px 0 0;
}
.lg-hd::before {
    content: ""; position: absolute; top: -40%; right: -20px;
    width: 200px; height: 180%;
    background: linear-gradient(90deg,
        transparent 0 22%, var(--orange) 22% 34%, transparent 34% 46%,
        rgba(255, 255, 255, .16) 46% 53%, transparent 53% 64%,
        rgba(255, 140, 50, .5) 64% 69%, transparent 69%);
    transform: skewX(-24deg);
}
.lg-hd > * { position: relative; z-index: 1; }
.lg-eyebrow { font-size: 12px; font-weight: 600; font-style: italic; letter-spacing: .08em; color: rgba(255, 255, 255, .75); }
.lg-eyebrow b { color: #ffb347; font-weight: 700; }
.lg-ttl { margin-top: 2px; font-size: 30px; font-weight: 800; font-style: italic; line-height: 1.15; }
.lg-sub { margin-top: 4px; font-size: 14px; color: rgba(255, 255, 255, .82); }

.lg-form {
    position: relative; z-index: 1;
    display: grid; gap: 12px;
    margin-top: -16px; padding: 22px 16px 18px;
    background: #fff;
    border-radius: 18px 18px 0 0;
}

/* ช่องกรอก label ลอย */
.fl {
    position: relative;
    display: flex; align-items: center;
    height: 58px;
    border: 1.5px solid var(--line); border-radius: 14px;
    background: var(--bg);
    transition: border-color .15s, box-shadow .15s, background .15s;
}
.fl > .ic { position: absolute; left: 14px; color: var(--muted); transition: color .15s; }
.fl input {
    width: 100%; height: 100%;
    padding: 20px 14px 4px 46px;
    border: 0; outline: 0; border-radius: 14px; background: none;
    font: inherit; font-size: 16px; color: var(--text);
}
.fl input:-webkit-autofill { -webkit-box-shadow: 0 0 0 40px var(--bg) inset; }
.fl label {
    position: absolute; left: 46px; top: 50%;
    transform: translateY(-50%);
    margin: 0;
    font-size: 16px; color: var(--muted);
    pointer-events: none;
    transition: top .15s, font-size .15s, color .15s;
}
.fl input:focus + label,
.fl input:not(:placeholder-shown) + label,
.fl input:-webkit-autofill + label { top: 15px; font-size: 12px; font-weight: 500; color: var(--blue); }
.fl:focus-within { border-color: var(--blue); background: #fff; box-shadow: 0 0 0 4px rgba(31, 95, 224, .12); }
.fl:focus-within > .ic { color: var(--blue); }
.fl.is-invalid { border-color: #e5484d; box-shadow: 0 0 0 4px rgba(229, 72, 77, .12); }
.fl.has-eye input { padding-right: 52px; }
.fl-eye {
    position: absolute; right: 6px;
    display: flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border-radius: 10px;
    color: var(--muted);
}
.fl-eye .ic-hide,
.fl-eye[aria-pressed="true"] .ic-show { display: none; }
.fl-eye[aria-pressed="true"] .ic-hide { display: block; }
.fl-ok {
    position: absolute; right: 16px;
    color: #16a34a;
    opacity: 0; transform: scale(.6);
    transition: opacity .15s, transform .15s;
}
.fl.is-match .fl-ok { opacity: 1; transform: none; }

.lg-err {
    display: none; align-items: flex-start; gap: 8px;
    padding: 10px 12px; border-radius: 12px;
    background: #fff1f1; color: #c0262d;
    font-size: 14px; line-height: 1.45;
}
.lg-err.is-show { display: flex; }
.lg-err .ic { width: 20px; height: 20px; }

.lg-submit { height: 54px; margin-top: 2px; border-radius: 14px; font-size: 18px; font-weight: 600; }
.lg-spin {
    display: none; width: 20px; height: 20px;
    border: 2.5px solid rgba(255, 255, 255, .4); border-top-color: #fff; border-radius: 50%;
    animation: ui2-spin .7s linear infinite;
}
.lg-form.is-loading .lg-spin { display: inline-block; }
.lg-form.is-loading .lg-submit { pointer-events: none; filter: saturate(.8); }
.lg-form.is-shake { animation: ui2-shake .4s; }

.lg-forgot { display: flex; align-items: center; justify-content: center; gap: 2px; justify-self: center; padding: 4px 8px; font-size: 14px; color: var(--muted); }
.lg-forgot b { font-weight: 500; color: var(--blue); }
.lg-forgot .ic { width: 18px; height: 18px; }
.lg-or { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.lg-or::before, .lg-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.lg-reg {
    height: 50px; border-radius: 14px;
    border: 1.5px solid var(--orange);
    background: #fff; color: var(--orange-d);
    box-shadow: none;
}
.lg-reg:hover { background: #fff6ef; color: var(--orange-d); }

/* สมัครสมาชิก */
.rg-steps { display: flex; gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; }
.rg-steps li {
    position: relative; flex: 1;
    padding-top: 9px;
    font-size: 12px; color: rgba(255, 255, 255, .6);
}
.rg-steps li::before {
    content: ""; position: absolute; top: 0; left: 0; right: 0;
    height: 4px; border-radius: 4px;
    background: rgba(255, 255, 255, .22);
    transition: background .2s;
}
.rg-steps li.is-on { color: #fff; font-weight: 500; }
.rg-steps li.is-on::before { background: var(--orange); }

#register .rg-panel { display: none; gap: 12px; }
#register[data-step="1"] [data-panel="1"],
#register[data-step="age"] [data-panel="age"],
#register[data-step="2"] [data-panel="2"] { display: grid; }
#register [data-show] { display: none; }
#register[data-step="1"] [data-show~="1"],
#register[data-step="2"] [data-show~="2"] { display: flex; }

.rg-submit { background: linear-gradient(180deg, #ff8c32, var(--orange-d)); }
.rg-age { justify-items: center; text-align: center; padding: 4px 0; }
.rg-age-badge {
    display: flex; align-items: center; justify-content: center;
    width: 64px; height: 64px; border-radius: 50%;
    border: 3px solid var(--orange);
    font-size: 20px; font-weight: 700; font-style: italic; color: var(--orange-d);
}
.rg-age-ttl { font-size: 18px; font-weight: 600; color: var(--navy); }
.rg-age-txt { margin-top: -6px; font-size: 14px; color: var(--muted); }
.rg-ghost { background: var(--panel); color: var(--navy); box-shadow: none; }
.rg-ghost:hover { color: var(--navy); }

.rg-label { font-size: 14px; font-weight: 500; color: var(--navy); }
.rg-banks {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
    max-height: 200px; overflow-y: auto; padding: 2px;
}
.rg-bank {
    position: relative;
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    margin: 0; padding: 8px 2px;
    border: 1.5px solid var(--line); border-radius: 12px;
    text-align: center; cursor: pointer;
    transition: border-color .15s, background .15s, box-shadow .15s;
}
.rg-bank input { position: absolute; opacity: 0; pointer-events: none; }
.rg-bank-logo { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; }
.rg-bank-logo img { width: 24px; height: 24px; object-fit: contain; }
.rg-bank-name { font-size: 11px; line-height: 1.25; color: var(--text); overflow-wrap: anywhere; }
.rg-bank:focus-within { border-color: var(--blue); }
.rg-bank.is-on { border-color: var(--blue); background: #f0f5ff; box-shadow: 0 0 0 3px rgba(31, 95, 224, .12); }
.rg-banks.is-invalid { border-radius: 12px; box-shadow: 0 0 0 2px rgba(229, 72, 77, .5); }
.rg-note { margin-top: -4px; font-size: 12.5px; color: var(--muted); }

@keyframes ui2-spin { to { transform: rotate(360deg); } }
@keyframes ui2-shake {
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}
@media (prefers-reduced-motion: reduce) {
    .sheet-box, .sheet-bg { transition: none; }
    .lg-form.is-shake { animation: none; }
}

/* ---------- หน้าที่ยังไม่ได้ทำใหม่ (ใช้ css เดิมใน .legacy) ---------- */
.legacy { padding-bottom: 8px; background: #11131b; color: #fff; }
.legacy #contents { padding-top: 10px; }
.legacy + .ft { margin-top: 0; }

/* ---------- หน้าฝาก (/deposit = desktop2/deposite-gateway.php): UX แบบ member.77up.lol/deposit สีธีม superlsm99 — แก้แค่หน้าตา ไม่แตะ JS ---------- */
.legacy:has(.u2-dep) { background: var(--bg); color: var(--text); }
.legacy:has(.u2-dep) #contents { padding-top: 0; }
body.ui2 .u2-dep > .container { padding: 12px; max-width: none; }
body.ui2 .u2-dep-wl { margin-bottom: 14px; }
/* หัว: ไอคอน + ชื่อ + ขั้นตอน 1-2-3 */
body.ui2 .u2-dep-head { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; }
body.ui2 .u2-dep-head .ic {
    flex: 0 0 46px; width: 46px; height: 46px; border-radius: 14px;
    display: grid; place-items: center; color: #fff;
    background: linear-gradient(180deg, #ff8c32, var(--orange-d)); box-shadow: 0 4px 14px rgba(255, 122, 26, .35);
}
body.ui2 .u2-dep-head .ic svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
body.ui2 .u2-dep-head .ttl { margin: 0; color: var(--navy); font-size: 21px; font-weight: 600; line-height: 1.2; }
body.ui2 .u2-dep-steps { display: flex; flex-wrap: wrap; gap: 4px 6px; margin: 5px 0 0; padding: 0; list-style: none; }
body.ui2 .u2-dep-steps li {
    display: flex; align-items: center; gap: 5px; padding: 2px 10px 2px 3px;
    border-radius: 999px; background: #fff; border: 1px solid var(--line);
    color: var(--muted); font-size: 12.5px; line-height: 1.5;
}
body.ui2 .u2-dep-steps li b { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--panel); color: var(--muted); font-size: 11px; font-weight: 600; }
body.ui2 .u2-dep-steps li.on { border-color: rgba(255, 122, 26, .6); color: var(--orange-d); }
body.ui2 .u2-dep-steps li.on b { background: linear-gradient(180deg, #ff8c32, var(--orange-d)); color: #fff; }
body.ui2 .u2-dep-steps li.done b { background: #16a05a; color: #fff; }
/* แท็บ: ปุ่มแคปซูล / มีแท็บเดียวก็ซ่อนแถบ */
body.ui2 #deposite .tab-box .tab { display: flex; gap: 6px; margin: 0 0 10px; padding: 5px; border-radius: 14px; background: var(--panel); border: 0; }
body.ui2 #deposite .tab-box .tab li {
    flex: 1; width: auto; margin: 0; padding: 9px 6px; border-radius: 10px;
    background: transparent; color: var(--muted); font-size: 15px; text-align: center; transition: background .15s;
}
body.ui2 #deposite .tab-box .tab li.select { background: #fff; color: var(--blue-d); font-weight: 600; box-shadow: 0 2px 8px rgba(13, 27, 76, .1); }
body.ui2 #deposite .tab-box .tab:has(li:only-child) { display: none; }
body.ui2 #deposite .tab-box .cont-wrap { padding: 0; border-radius: 0; background: none; box-shadow: none; color: var(--text); }
body.ui2 #deposite .tab-box .cont-wrap .inner { padding: 0; background: none; }
/* วิธีการฝากเงิน: การ์ดขาว เลขข้อในวงกลมส้ม */
body.ui2 #deposite .u2-dep-how {
    margin: 0; padding: 14px 14px 12px; border-radius: 14px;
    border: 1px solid var(--line); background: #fff; color: var(--text); font-size: 14px;
    box-shadow: 0 3px 10px rgba(13, 27, 76, .06);
}
body.ui2 #deposite .u2-dep-how > strong { display: block; margin-bottom: 10px; text-align: center; color: var(--navy); font-size: 16px; font-weight: 600; }
body.ui2 #deposite .u2-dep-how ol { margin: 0; padding: 0; list-style: none; counter-reset: u2s; }
body.ui2 #deposite .u2-dep-how li {
    list-style: none; position: relative; margin: 0 0 8px; padding-left: 32px;
    counter-increment: u2s; line-height: 1.5; color: var(--text); font-size: 14px;
}
body.ui2 #deposite .u2-dep-how li::before {
    content: counter(u2s); position: absolute; left: 0; top: 0;
    width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
    background: linear-gradient(180deg, #ff8c32, var(--orange-d)); color: #fff; font-size: 12px; font-weight: 600;
}
body.ui2 #deposite .u2-dep-how li em { display: block; font-style: normal; font-size: 12.5px; color: #e5384f; }
body.ui2 #deposite .u2-dep-how > p { margin: 4px 0 0; padding-top: 10px; border-top: 1px dashed var(--line); text-align: center; color: var(--blue-d); font-weight: 500; }
/* กรอกยอด + ปุ่มยอดด่วน */
body.ui2 #deposite .deposite-amount {
    margin-top: 12px !important; padding: 14px; border-radius: 14px;
    border: 1px solid var(--line); background: #fff; box-shadow: 0 3px 10px rgba(13, 27, 76, .06);
}
body.ui2 #deposite .deposite-amount .txt-label { color: var(--navy); text-shadow: none; font-weight: 600; font-size: 16px; }
body.ui2 #deposite .deposite-amount .txt-label i { color: var(--orange); }
body.ui2 #deposite .deposite-amount .text-success { color: var(--blue-d) !important; }
body.ui2 #deposite .u2-dep-amt .input-num {
    position: relative; display: flex; align-items: center; margin-top: 12px; height: 58px;
    border-radius: 14px; border: 2px solid var(--line); background: var(--bg);
    transition: border-color .15s, box-shadow .15s;
}
body.ui2 #deposite .u2-dep-amt .input-num:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(31, 95, 224, .15); }
body.ui2 #deposite .u2-dep-amt .input-num .cur { flex: none; padding: 0 4px 0 16px; color: var(--orange-d); font-size: 24px; font-weight: 600; }
body.ui2 #deposite .u2-dep-amt .input-num .form-control {
    height: 100%; min-width: 0; padding: 0 14px 0 4px; border: 0; background: transparent; box-shadow: none;
    color: var(--navy); font-size: 26px; font-weight: 600; font-variant-numeric: tabular-nums;
}
body.ui2 #deposite .u2-dep-amt .input-num .form-control::placeholder { color: #b3bfd9; }
body.ui2 .u2-dep-quick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
body.ui2 .u2-dep-quick button {
    height: 40px; border-radius: 10px; border: 1.5px solid var(--line); background: #fff;
    color: var(--navy); font-family: inherit; font-size: 15px; font-weight: 500; transition: border-color .15s, background .15s;
}
body.ui2 .u2-dep-quick button:hover { border-color: var(--blue); }
body.ui2 .u2-dep-quick button.on { border-color: var(--blue); background: var(--panel); color: var(--blue-d); font-weight: 600; }
body.ui2 #deposite .u2-dep-amt .txt-hint { margin-top: 8px; color: var(--muted); font-size: 13px; text-align: center; }
body.ui2 #deposite .u2-dep-ok {
    display: block; width: 100%; height: 50px; margin-top: 12px; border: 0; border-radius: 14px;
    background: linear-gradient(180deg, #ff8c32, var(--orange-d)); color: #fff; font-size: 18px; font-weight: 600;
    box-shadow: 0 6px 16px rgba(240, 95, 0, .28);
}
body.ui2 #deposite .u2-dep-ok:hover:not(:disabled) { filter: brightness(1.05); }
body.ui2 #deposite .u2-dep-ok:disabled { background: #dfe6f3; color: #9aa6c2; box-shadow: none; opacity: 1; }
/* ปุ่ม LINE */
body.ui2 .u2-dep-line {
    display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 12px 14px;
    border-radius: 16px; border: 1px solid rgba(6, 199, 85, .35); text-decoration: none;
    background: radial-gradient(120% 120% at 0% 0%, rgba(6, 199, 85, .14), transparent 60%), #fff;
    box-shadow: 0 3px 10px rgba(13, 27, 76, .06);
}
body.ui2 .u2-dep-line .ic { flex: 0 0 48px; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: #06C755; box-shadow: 0 4px 12px rgba(6, 199, 85, .3); }
body.ui2 .u2-dep-line .ic img { width: 30px; height: 30px; filter: brightness(0) invert(1); }
body.ui2 .u2-dep-line .tx { flex: 1; min-width: 0; line-height: 1.25; }
body.ui2 .u2-dep-line .tx small { display: block; color: var(--muted); font-size: 12.5px; }
body.ui2 .u2-dep-line .tx b { display: block; color: var(--navy); font-size: 18px; font-weight: 600; white-space: nowrap; }
body.ui2 .u2-dep-line .tx em { font-style: normal; color: #06a64a; }
body.ui2 .u2-dep-line .go {
    flex: none; display: flex; align-items: center; gap: 3px; padding: 8px 10px 8px 12px; border-radius: 999px;
    background: #06C755; color: #fff; font-size: 13.5px; font-weight: 600; white-space: nowrap;
}
body.ui2 .u2-dep-line .go .ic { width: 15px; height: 15px; flex: none; display: block; background: none; box-shadow: none; border-radius: 0; stroke-width: 2.6; }
/* gateway อื่น (ไม่ใช่ P2Pay): กล่องบัญชี */
body.ui2 #deposite .deposite-bank { border-radius: 14px; border: 1px solid var(--line); background: #fff; box-shadow: 0 3px 10px rgba(13, 27, 76, .06); }
body.ui2 #deposite .deposite-bank .bank-detail { color: var(--navy); text-shadow: none; }
body.ui2 #deposite .deposite-bank .bank-copy { color: var(--orange-d); }
/* ขั้นที่ 2: การ์ดโอนเงิน (P2Pay) — การ์ดขาวแบบขั้นที่ 1 ตัวเลข/ปุ่มส้ม */
body.ui2 #deposite .p2pay-transfer-card {
    margin-top: 0; border-radius: 14px; border: 1px solid var(--line); color: var(--text);
    background: #fff; box-shadow: 0 3px 10px rgba(13, 27, 76, .06);
}
body.ui2 #deposite .p2pay-transfer-card__header { padding: 11px 14px; font-size: 15px; font-weight: 600; color: var(--navy); background: none; border-bottom: 1px solid var(--line); }
body.ui2 #deposite .p2pay-transfer-card__header i { color: var(--orange); }
body.ui2 #deposite .p2pay-transfer-card__body { padding: 12px 14px 14px; }
body.ui2 #deposite .p2pay-transfer-hero { margin-bottom: 12px; padding: 0 0 12px; background: none; border: 0; border-bottom: 1px dashed var(--line); }
body.ui2 #deposite .p2pay-transfer-hero__num { color: var(--orange-d); -webkit-text-fill-color: var(--orange-d); background: none; text-shadow: none; }
body.ui2 #deposite .p2pay-transfer-hero__unit { color: var(--navy); }
body.ui2 #deposite .p2pay-transfer-hero__thai { color: var(--muted); }
body.ui2 #deposite .p2pay-transfer-qr__frame { border: 2px solid var(--line); border-radius: 14px; background: #fff; box-shadow: none; }
body.ui2 #deposite .p2pay-transfer-qr__hint { color: var(--muted); }
body.ui2 #deposite .p2pay-transfer-qr__hint i { color: var(--blue); }
body.ui2 #deposite .p2pay-transfer-bank { margin-bottom: 12px; padding: 12px 14px; background: var(--bg); border: 1px solid var(--line); border-radius: 14px; }
body.ui2 #deposite .p2pay-transfer-bank__header { margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
body.ui2 #deposite .p2pay-transfer-bank__logo { width: 40px; height: 40px; padding: 6px; border-radius: 50%; }
body.ui2 #deposite .p2pay-transfer-bank__name { color: var(--navy); font-weight: 600; }
body.ui2 #deposite .p2pay-transfer-bank__field + .p2pay-transfer-bank__field { margin-top: 10px; }
body.ui2 #deposite .p2pay-transfer-bank__label { margin-bottom: 2px; color: var(--muted); font-size: 12px; font-weight: 500; letter-spacing: 0; }
body.ui2 #deposite .p2pay-transfer-bank__number { color: var(--blue-d); font-size: 22px; letter-spacing: .03em; font-variant-numeric: tabular-nums; }
body.ui2 #deposite .p2pay-transfer-bank__value { color: var(--navy); font-weight: 600; }
body.ui2 #deposite .p2pay-transfer-bank__copy { padding: 7px 14px; background: linear-gradient(180deg, #ff8c32, var(--orange-d)); border: 0; color: #fff; font-size: 14px; font-weight: 600; border-radius: 10px; }
body.ui2 #deposite .p2pay-transfer-notice-bar { color: #7a3b00; background: #fff4e8; border: 1px solid rgba(255, 140, 50, .45); border-radius: 10px; }
body.ui2 #deposite .p2pay-transfer-notice-bar i { color: var(--orange); }
body.ui2 #deposite .p2pay-transfer-notice-bar strong { color: var(--orange-d); background: none; padding: 0; }
body.ui2 #deposite .p2pay-transfer-card .p2pay-remark-alert { margin: 10px 0 0; }
body.ui2 #deposite .p2pay-transfer-card .p2pay-slip-wrap { margin-top: 12px !important; padding-top: 12px; border-top: 1px solid var(--line); }
body.ui2 #deposite .p2pay-slip-wrap .txt-label { color: var(--navy) !important; font-size: 14px; font-weight: 600; }
body.ui2 #deposite .p2pay-slip-wrap .txt-label i { color: var(--orange); }
body.ui2 #deposite .p2pay-slip-wrap .p2pay_slip_pick {
    display: flex; align-items: center; justify-content: center; gap: 10px; margin: 0; padding: 10px;
    border: 2px dashed rgba(255, 122, 26, .55); border-radius: 14px; background: #fff8f1; color: var(--orange-d);
}
body.ui2 #deposite .p2pay-slip-wrap .p2pay_slip_pick i.fa-2x { font-size: 22px; }
body.ui2 #deposite .p2pay-slip-wrap .p2pay_slip_pick div { margin-top: 0 !important; }
body.ui2 #deposite .p2pay-slip-wrap .btn-warning {
    width: 100%; height: 44px; padding: 0 22px; border: 0; border-radius: 12px;
    background: linear-gradient(180deg, #ff8c32, var(--orange-d)); color: #fff; font-size: 16px; font-weight: 600;
}
body.ui2 #deposite .p2pay-slip-wrap .btn-warning:disabled { background: #dfe6f3; color: #9aa6c2; opacity: 1; }
/* นับถอยหลัง (แสดงเฉพาะขั้นโอน) — FlipDown เดิมซ่อน */
.u2-timer { display: none; }
body.ui2 .u2-dep-s2 .u2-timer {
    display: block; margin: 0 0 12px; padding: 9px 14px 10px; border-radius: 14px; text-align: center; color: var(--navy);
    background: linear-gradient(150deg, #0d1b4c 0%, #163a9c 60%, var(--blue) 100%); border: 0;
}
body.ui2 .u2-dep-s2 .u2-timer .t { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 14px; font-weight: 600; color: #fff; }
body.ui2 .u2-dep-s2 .u2-timer .t .ic { width: 18px; height: 18px; color: #ffc04d; }
body.ui2 .u2-dep-s2 .u2-timer .v { display: flex; align-items: flex-start; justify-content: center; gap: 5px; margin: 6px 0 8px; }
body.ui2 .u2-dep-s2 .u2-timer .g > span { display: flex; gap: 4px; }
body.ui2 .u2-dep-s2 .u2-timer .g b {
    position: relative; width: 40px; height: 54px; display: grid; place-items: center; border-radius: 8px;
    background: linear-gradient(180deg, #fff 50%, #eef3ff 50%); color: var(--navy);
    font-size: 38px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; box-shadow: 0 4px 10px rgba(0, 0, 0, .25);
}
body.ui2 .u2-dep-s2 .u2-timer .g b::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: rgba(13, 27, 76, .15); }
body.ui2 .u2-dep-s2 .u2-timer .c { height: 54px; display: flex; align-items: center; color: #ffc04d; font-size: 30px; font-weight: 700; }
body.ui2 .u2-dep-s2 .u2-timer .bar { height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .2); overflow: hidden; }
body.ui2 .u2-dep-s2 .u2-timer .bar span { display: block; height: 100%; width: 99%; background: linear-gradient(90deg, #ffc04d, var(--orange)); }
body.ui2 .u2-dep-s2 #deposite #flipdown-p2pay { display: none !important; }
/* ขั้นโอน: กล่องสถานะ + ปุ่ม */
body.ui2 .u2-dep-s2 #deposite .cont-wrap > .cont-item .deposite-amount > .txt-label,
body.ui2 .u2-dep-s2 #deposite .cont-wrap > .cont-item .deposite-amount > .text-success { display: none !important; }
body.ui2 #deposite .p2pay-actions { display: grid !important; grid-template-columns: 1fr 1fr; gap: 8px !important; margin: 12px 0 0 !important; width: 100%; }
body.ui2 #deposite .p2pay-actions .btn {
    width: 100% !important; min-width: 0 !important; height: auto !important; line-height: 1.3 !important; margin: 0 !important;
    padding: 11px 8px !important; border-radius: 12px !important; font-size: 14px !important; box-shadow: none !important;
}
body.ui2 #deposite .p2pay-actions .p2pay-btn-primary { grid-column: 1 / -1; font-size: 16px !important; background: linear-gradient(180deg, #ff8c32, var(--orange-d)); border: 0; color: #fff; font-weight: 600; }
body.ui2 #deposite .p2pay-actions .p2pay-btn-primary:hover:not([disabled]) { background: linear-gradient(180deg, #ff8c32, var(--orange-d)); filter: brightness(1.05); }
body.ui2 #deposite .p2pay-actions .p2pay-btn-change-amount { background: #fff; border: 1.5px solid var(--blue); color: var(--blue-d); text-shadow: none; }
body.ui2 #deposite .p2pay-actions .p2pay-btn-change-amount:hover:not([disabled]) { background: var(--panel); border-color: var(--blue); color: var(--blue-d); }
body.ui2 #deposite .p2pay-actions .p2pay-btn-secondary { background: var(--panel); border-color: var(--panel); color: var(--muted); }
body.ui2 #deposite .p2pay-actions .p2pay-btn-secondary:hover:not([disabled]) { background: var(--line); border-color: var(--line); color: var(--text); }
/* popup ยืนยันยอด / ยกเลิก / เปลี่ยนยอด: การ์ดน้ำเงินแบบกล่องยอดเงิน ปุ่มส้ม */
body.ui2 #paymentAmountConfirmModal .modal-content.p2pay-modal-card,
body.ui2 #p2payCancelConfirmModal .modal-content.p2pay-modal-card,
body.ui2 #p2payEditAmountConfirmModal .modal-content.p2pay-modal-card {
    overflow: hidden; border-radius: 18px; border: 0; color: #fff;
    background: linear-gradient(150deg, #0d1b4c 0%, #163a9c 70%, var(--blue) 100%) !important;
    box-shadow: 0 20px 50px rgba(13, 27, 76, .5);
    margin-left: auto; margin-right: auto; /* จอ < 576px .modal-dialog เต็มกว้าง แต่การ์ด max-width 420 → จัดกลาง */
}
body.ui2 #paymentAmountConfirmModal .modal-header,
body.ui2 #p2payCancelConfirmModal .modal-header,
body.ui2 #p2payEditAmountConfirmModal .modal-header { background: rgba(255, 255, 255, .08); border-bottom: 1px solid rgba(255, 255, 255, .14); }
body.ui2 #paymentAmountConfirmModal .modal-title,
body.ui2 #p2payCancelConfirmModal .modal-title,
body.ui2 #p2payEditAmountConfirmModal .modal-title { color: #fff; font-weight: 600; }
body.ui2 #paymentAmountConfirmModal .payment-amount-confirm-highlight,
body.ui2 #paymentAmountConfirmModal .deposit-result-amount { color: #ffc04d; }
body.ui2 #paymentAmountConfirmModal .payment-amount-confirm-highlight { background: rgba(255, 255, 255, .1); border-color: rgba(255, 192, 77, .7); }
body.ui2 #paymentAmountConfirmModal .deposit-confirm-amount-thai { color: rgba(255, 255, 255, .75); }
body.ui2 #paymentAmountConfirmModal .modal-footer,
body.ui2 #p2payCancelConfirmModal .modal-footer,
body.ui2 #p2payEditAmountConfirmModal .modal-footer { border-top: 1px solid rgba(255, 255, 255, .14); background: rgba(0, 0, 0, .12); }
body.ui2 #paymentAmountConfirmModal .modal-footer .btn,
body.ui2 #p2payCancelConfirmModal .modal-footer .btn,
body.ui2 #p2payEditAmountConfirmModal .modal-footer .btn { min-width: 110px; height: 42px; border-radius: 12px; font-weight: 600; }
body.ui2 #paymentAmountConfirmModal .modal-footer .btn-success,
body.ui2 #p2payEditAmountConfirmModal .modal-footer .btn-warning { background: linear-gradient(180deg, #ff8c32, var(--orange-d)); border: 0; color: #fff; }
body.ui2 #paymentAmountConfirmModal .modal-footer .btn-secondary,
body.ui2 #p2payCancelConfirmModal .modal-footer .btn-secondary,
body.ui2 #p2payEditAmountConfirmModal .modal-footer .btn-secondary { background: rgba(255, 255, 255, .14); border-color: transparent; color: #fff; }
/* ---------- หน้าถอน (/withdraw = desktop2/withdraw.php): UX แบบ member.77up.lol/withdraw สีธีม superlsm99 — หัว/กล่องยอดเงิน/ปุ่มยอดด่วน ใช้ชุดหน้าฝาก ; โทนน้ำเงินให้ต่างจากหน้าฝาก ; JS เดิมไม่แตะ ---------- */
.legacy:has(.u2-wd) { background: var(--bg); color: var(--text); }
.legacy:has(.u2-wd) #contents { padding-top: 0; }
body.ui2 #withdraw.u2-wd { padding: 12px 12px 8px; }
body.ui2 .u2-wd .u2-dep-head .ic { background: linear-gradient(180deg, #3a7bf0, var(--blue-d)); box-shadow: 0 4px 14px rgba(31, 95, 224, .35); }
body.ui2 .u2-dep-head .sub { margin: 3px 0 0; color: var(--muted); font-size: 13px; line-height: 1.4; }
body.ui2 .u2-wd .u2-pg-card {
    margin-bottom: 12px; padding: 14px; border-radius: 14px;
    border: 1px solid var(--line); background: #fff; color: var(--text); box-shadow: 0 3px 10px rgba(13, 27, 76, .06);
}
body.ui2 .u2-wd .u2-pg-ttl { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; color: var(--navy); font-size: 16px; font-weight: 600; line-height: 1.4; }
body.ui2 .u2-wd .u2-pg-ttl i { color: var(--blue); }
body.ui2 #withdraw .u2-wd-acc { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); }
body.ui2 #withdraw .u2-wd-acc .logo img { display: block; width: 48px; height: 48px; padding: 6px; border-radius: 50%; object-fit: contain; }
body.ui2 #withdraw .u2-wd-acc .det { min-width: 0; line-height: 1.4; }
body.ui2 #withdraw .u2-wd-acc .bank { color: var(--muted); font-size: 13.5px; }
body.ui2 #withdraw .u2-wd-acc .num { color: var(--blue-d); font-size: 21px; font-weight: 600; letter-spacing: .03em; line-height: 1.3; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
body.ui2 #withdraw .u2-wd-acc .name { color: var(--navy); font-size: 14px; font-weight: 500; }
body.ui2 #withdraw .u2-wd-acc .name i { color: var(--blue); margin-right: 2px; }
body.ui2 #withdraw .u2-wd-last { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); }
body.ui2 #withdraw .u2-wd-last .amt { color: var(--navy); line-height: 1.3; }
body.ui2 #withdraw .u2-wd-last .amt small { display: block; color: var(--muted); font-size: 12.5px; }
body.ui2 #withdraw .u2-wd-last .amt b { color: var(--orange-d); font-size: 26px; font-weight: 600; margin-right: 4px; }
body.ui2 #withdraw .u2-wd-last .meta { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 6px; }
body.ui2 #withdraw .u2-wd-last .time { color: var(--muted); font-size: 13px; }
body.ui2 #withdraw .u2-wd-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--muted); font-size: 13.5px; font-weight: 500; line-height: 1.4; }
body.ui2 #withdraw .u2-wd-badge.pending { background: #fff4e8; border-color: rgba(255, 140, 50, .5); color: var(--orange-d); }
body.ui2 #withdraw .u2-wd-badge.ok { background: #e8f8ef; border-color: rgba(22, 160, 90, .45); color: #12804a; }
body.ui2 #withdraw .u2-wd-badge.cancel { background: #fdecee; border-color: rgba(229, 56, 79, .4); color: #c8283e; }
body.ui2 .u2-wd .u2-pg-field { margin-bottom: 14px; }
body.ui2 .u2-wd .u2-pg-field > label { display: block; margin: 0 0 6px; color: var(--navy); font-size: 14.5px; font-weight: 500; line-height: 1.4; }
body.ui2 .u2-wd .u2-pg-inp, body.ui2 #withdraw .u2-wd-amt {
    display: flex; align-items: center; border-radius: 12px; border: 2px solid var(--line); background: var(--bg);
    transition: border-color .15s, box-shadow .15s;
}
body.ui2 .u2-wd .u2-pg-inp > i { flex: none; width: 42px; text-align: center; font-size: 16px; color: var(--blue); }
body.ui2 .u2-wd .u2-pg-inp .form-control, body.ui2 #withdraw .u2-wd-amt .form-control {
    flex: 1; min-width: 0; height: 46px; padding: 0 14px 0 0; border: 0; border-radius: 0;
    background: transparent; box-shadow: none; color: var(--navy); font-size: 16px; line-height: normal;
}
body.ui2 .u2-wd .u2-pg-inp .form-control[readonly] { opacity: 1; color: var(--muted); }
body.ui2 #withdraw .u2-wd-amt { height: 58px; }
body.ui2 #withdraw .u2-wd-amt .cur { flex: none; padding: 0 4px 0 16px; color: var(--blue); font-size: 24px; font-weight: 600; }
body.ui2 #withdraw .u2-wd-amt .form-control { height: 100%; padding-left: 4px; font-size: 26px; font-weight: 600; font-variant-numeric: tabular-nums; }
body.ui2 #withdraw .u2-wd-amt .form-control::placeholder { color: #b3bfd9; }
body.ui2 #withdraw .u2-wd-amt:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(31, 95, 224, .15); }
body.ui2 #withdraw .u2-wd-minmax { margin-top: 8px; color: var(--muted); font-size: 13px; }
body.ui2 #withdraw .u2-wd-minmax b { color: var(--blue-d); }
body.ui2 #withdraw .u2-dep-quick button:disabled { opacity: .4; cursor: not-allowed; }
body.ui2 #withdraw .u2-wd-tip { margin-top: 10px; padding: 8px 12px; border-radius: 10px; background: #fff4e8; border: 1px solid rgba(255, 140, 50, .4); color: #8a4300; font-size: 13px; line-height: 1.5; }
body.ui2 #withdraw .u2-wd-tip i { color: var(--orange); margin-right: 4px; }
body.ui2 .u2-wd .u2-pg-btn {
    display: block; width: 100%; height: 50px; margin-top: 4px; border: 0; border-radius: 14px;
    background: linear-gradient(180deg, #ff8c32, var(--orange-d)); color: #fff; font-family: inherit; font-size: 18px; font-weight: 600;
    box-shadow: 0 6px 16px rgba(240, 95, 0, .28); cursor: pointer;
}
body.ui2 .u2-wd .u2-pg-btn:hover:not(:disabled) { filter: brightness(1.05); }
body.ui2 .u2-wd .u2-pg-btn:disabled { background: #dfe6f3; color: #9aa6c2; box-shadow: none; cursor: not-allowed; }
body.ui2 .u2-wd .u2-pg-alert { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 12px; padding: 10px 14px; border-radius: 12px; font-size: 14px; line-height: 1.5; }
body.ui2 .u2-wd .u2-pg-alert > i { margin-top: 3px; }
body.ui2 .u2-wd form .u2-pg-btn + .u2-pg-alert { margin-top: 12px; }
body.ui2 .u2-wd .u2-pg-alert.err { background: #fdecee; border: 1px solid rgba(229, 56, 79, .4); color: #b42234; }
body.ui2 .u2-wd .u2-pg-alert.err > i { color: #e5384f; }
body.ui2 .u2-wd .u2-pg-alert.ok { background: #e8f8ef; border: 1px solid rgba(22, 160, 90, .4); color: #12804a; }
body.ui2 .u2-wd .u2-pg-alert.ok > i { color: #16a05a; }
/* ---------- บันทึกการเงิน (/logs-credit = desktop2/logs/credit.php): หัว .u2-dep-head + แท็บกรอง + รายการการ์ด ---------- */
.legacy:has(.u2-lc) { background: var(--bg); color: var(--text); }
.legacy:has(.u2-lc) #contents { padding-top: 0; }
body.ui2 #logs.u2-lc { padding: 12px 12px 8px; }
body.ui2 .u2-lc .u2-dep-head > div { flex: 1; min-width: 0; }
body.ui2 .u2-lc .u2-dep-head .ic { background: linear-gradient(180deg, #3a7bf0, var(--blue-d)); box-shadow: 0 4px 14px rgba(31, 95, 224, .35); }
body.ui2 .u2-lc-ref {
    flex: none; width: 40px; height: 40px; display: grid; place-items: center; padding: 0;
    border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--blue); cursor: pointer;
}
body.ui2 .u2-lc-ref svg, body.ui2 .u2-lc-ic svg, body.ui2 .u2-lc-empty svg { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
body.ui2 .u2-lc-ref svg { width: 20px; height: 20px; }
body.ui2 .u2-lc-ref:active svg { transform: rotate(-90deg); transition: transform .2s; }
body.ui2 .u2-lc-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 0 0 12px; padding: 5px; border-radius: 14px; background: var(--panel); }
body.ui2 .u2-lc-tabs button {
    height: 38px; border: 0; border-radius: 10px; background: transparent;
    color: var(--muted); font-family: inherit; font-size: 14.5px; font-weight: 500; cursor: pointer;
}
body.ui2 .u2-lc-tabs button.on { background: #fff; color: var(--blue-d); font-weight: 600; box-shadow: 0 2px 8px rgba(13, 27, 76, .1); }
body.ui2 .u2-lc-list { display: grid; gap: 8px; }
body.ui2 .u2-lc-row {
    display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px;
    border: 1px solid var(--line); background: #fff; box-shadow: 0 3px 10px rgba(13, 27, 76, .05);
}
body.ui2 .u2-lc-ic { flex: 0 0 42px; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; }
body.ui2 .u2-lc-ic svg { width: 22px; height: 22px; }
body.ui2 .u2-lc-row.is-dep .u2-lc-ic { background: #e8f8ef; color: #12804a; }
body.ui2 .u2-lc-row.is-wd .u2-lc-ic { background: #fff1e5; color: var(--orange-d); }
body.ui2 .u2-lc-tx { flex: 1; min-width: 0; line-height: 1.35; }
body.ui2 .u2-lc-tx b { display: block; color: var(--navy); font-size: 15px; font-weight: 600; }
body.ui2 .u2-lc-tx small { display: block; color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
body.ui2 .u2-lc-amt { flex: none; text-align: right; font-size: 17px; font-weight: 600; line-height: 1.2; font-variant-numeric: tabular-nums; white-space: nowrap; }
body.ui2 .u2-lc-amt small { display: block; color: var(--muted); font-size: 11.5px; font-weight: 400; }
body.ui2 .u2-lc-row.is-dep .u2-lc-amt { color: #12804a; }
body.ui2 .u2-lc-row.is-wd .u2-lc-amt { color: var(--orange-d); }
body.ui2 .u2-lc-skel { display: grid; gap: 8px; }
body.ui2 .u2-lc-skel i {
    display: block; height: 68px; border-radius: 14px;
    background: linear-gradient(90deg, #eef2fa 25%, #f8faff 50%, #eef2fa 75%) 0 0 / 200% 100%; animation: u2-lc-sk 1.2s linear infinite;
}
@keyframes u2-lc-sk { to { background-position: -200% 0; } }
body.ui2 .u2-lc-empty {
    display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 26px 16px 18px;
    border-radius: 14px; border: 1px dashed var(--line); background: #fff; text-align: center;
}
body.ui2 .u2-lc-empty > svg { width: 44px; height: 44px; padding: 10px; box-sizing: content-box; border-radius: 50%; background: var(--panel); color: var(--blue); }
body.ui2 .u2-lc-empty b { color: var(--navy); font-size: 15px; font-weight: 600; }
/* ---------- เปลี่ยนรหัสผ่าน (/password = desktop2/password.php): การ์ดฟอร์มเดียว + ปุ่มดูรหัส + เช็คลิสต์ตามเงื่อนไขของ controller ; JS เดิมไม่แตะ ---------- */
.legacy:has(.u2-pw) { background: var(--bg); color: var(--text); }
.legacy:has(.u2-pw) #contents { padding-top: 0; }
body.ui2 #password.u2-pw { padding: 12px 12px 8px; }
body.ui2 .u2-pw .u2-dep-head .ic { background: linear-gradient(180deg, #3a7bf0, var(--blue-d)); box-shadow: 0 4px 14px rgba(31, 95, 224, .35); }
body.ui2 .u2-pw svg { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
body.ui2 .u2-pw-card {
    display: block; margin: 0; padding: 14px; border-radius: 14px;
    border: 1px solid var(--line); background: #fff; color: var(--text); box-shadow: 0 3px 10px rgba(13, 27, 76, .06);
}
body.ui2 .u2-pw-user { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; padding: 12px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); }
body.ui2 .u2-pw-user .av { flex: none; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: var(--panel); color: var(--blue); }
body.ui2 .u2-pw-user .av svg { width: 22px; height: 22px; }
body.ui2 .u2-pw-user small { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.3; }
body.ui2 .u2-pw-user b { display: block; color: var(--navy); font-size: 17px; font-weight: 600; letter-spacing: .03em; line-height: 1.3; overflow-wrap: anywhere; }
body.ui2 .u2-pw-alert { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 14px; padding: 10px 14px; border-radius: 12px; font-size: 14px; line-height: 1.5; }
body.ui2 .u2-pw-alert svg { flex: none; width: 20px; height: 20px; margin-top: 1px; }
body.ui2 .u2-pw-alert b { display: block; font-weight: 600; }
body.ui2 .u2-pw-alert.err { background: #fdecee; border: 1px solid rgba(229, 56, 79, .4); color: #b42234; }
body.ui2 .u2-pw-alert.ok { background: #e8f8ef; border: 1px solid rgba(22, 160, 90, .4); color: #12804a; }
body.ui2 .u2-pw-field { margin-bottom: 14px; }
body.ui2 .u2-pw-field > label { display: block; margin: 0 0 6px; color: var(--navy); font-size: 14.5px; font-weight: 500; line-height: 1.4; }
body.ui2 .u2-pw-inp {
    display: flex; align-items: center; border-radius: 12px; border: 2px solid var(--line); background: var(--bg);
    transition: border-color .15s, box-shadow .15s;
}
body.ui2 .u2-pw-inp:focus-within { border-color: var(--blue); background: #fff; box-shadow: 0 0 0 3px rgba(31, 95, 224, .15); }
body.ui2 .u2-pw-inp .lk { flex: none; width: 42px; height: 20px; color: var(--blue); }
body.ui2 .u2-pw-inp .form-control {
    flex: 1; min-width: 0; height: 48px; padding: 0; border: 0; border-radius: 0;
    background: transparent; box-shadow: none; color: var(--navy); font-size: 16px; line-height: normal;
}
body.ui2 .u2-pw-inp .form-control::placeholder { color: #a9b5cf; }
body.ui2 .u2-pw-inp .form-control:disabled { opacity: .6; }
body.ui2 .u2-pw-inp .eye { flex: none; width: 46px; height: 48px; display: grid; place-items: center; padding: 0; border: 0; background: none; color: #9aa6c2; cursor: pointer; }
body.ui2 .u2-pw-inp .eye svg { width: 21px; height: 21px; }
body.ui2 .u2-pw-inp .eye.on { color: var(--blue); }
body.ui2 .u2-pw-inp .eye.on .eye-sl { display: none; }
body.ui2 .u2-pw-chk { display: grid; gap: 6px; margin: 2px 0 16px; padding: 10px 12px; list-style: none; border-radius: 12px; background: var(--bg); }
body.ui2 .u2-pw-chk li { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13.5px; line-height: 1.4; }
body.ui2 .u2-pw-chk li svg { flex: none; width: 18px; height: 18px; color: #b8c3da; }
body.ui2 .u2-pw-chk li.ok { color: #12804a; }
body.ui2 .u2-pw-chk li.ok svg { color: #16a05a; }
body.ui2 .u2-pw-chk li.bad { color: #c8283e; }
body.ui2 .u2-pw-chk li.bad svg { color: #e5384f; }
body.ui2 .u2-pw-btn {
    display: block; width: 100%; height: 50px; border: 0; border-radius: 14px;
    background: linear-gradient(180deg, #ff8c32, var(--orange-d)); color: #fff; font-family: inherit; font-size: 18px; font-weight: 600;
    box-shadow: 0 6px 16px rgba(240, 95, 0, .28); cursor: pointer;
}
body.ui2 .u2-pw-btn:hover:not(:disabled) { filter: brightness(1.05); }
body.ui2 .u2-pw-btn:disabled { background: #dfe6f3; color: #9aa6c2; box-shadow: none; cursor: not-allowed; }
/* ---------- หน้า x120 (/?action=x120 = desktop2/x120.php): แบบ member.77up.lol/heng (.lottery-schedule การ์ด 2 คอลัมน์ + นับถอยหลัง) สีธีม superlsm99 ---------- */
.legacy:has(.lottery-schedule) { background: var(--bg); color: var(--text); }
.legacy:has(.lottery-schedule) #contents { padding-top: 0; }
body.ui2 .lottery-schedule { padding: 14px 12px 8px; }
body.ui2 .lottery-schedule-section { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
body.ui2 .lottery-schedule-section + .lottery-schedule-section { margin-top: 18px; }
body.ui2 .lottery-schedule-head {
    grid-column: 1 / -1; justify-self: start; margin-bottom: 2px; padding: 8px 18px; border-radius: 999px;
    background: linear-gradient(180deg, #3a7bf0, var(--blue-d)); color: #fff; font-size: 14px; font-weight: 600; line-height: 1.2;
    box-shadow: 0 4px 12px rgba(31, 95, 224, .3);
}
body.ui2 .lottery-schedule-card {
    display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 10px; border-radius: 12px;
    border: 1px solid var(--line); background: #fff; text-decoration: none; box-shadow: 0 3px 10px rgba(13, 27, 76, .06);
    transition: transform .2s, border-color .2s, box-shadow .2s;
}
body.ui2 .lottery-schedule-card:hover { transform: translateY(-2px); border-color: var(--blue); box-shadow: 0 6px 16px rgba(31, 95, 224, .16); text-decoration: none; }
body.ui2 .lottery-schedule-card.is-loading { opacity: .6; pointer-events: none; }
body.ui2 .lottery-schedule-card .card-top { display: flex; align-items: flex-start; gap: 10px; }
body.ui2 .lottery-schedule-card .flag-icon {
    flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--panel) center / cover no-repeat;
    box-shadow: 0 0 0 1px var(--line), 0 2px 6px rgba(13, 27, 76, .15);
}
body.ui2 .lottery-schedule-card .card-info { flex: 1; min-width: 0; }
body.ui2 .lottery-schedule-card .card-title { margin-bottom: 3px; color: var(--navy); font-size: 13.5px; font-weight: 600; line-height: 1.35; word-break: break-word; }
body.ui2 .lottery-schedule-card .card-close {
    display: inline-block; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg);
    color: var(--muted); font-size: 11.5px; font-weight: 500; line-height: 1.3; white-space: nowrap;
}
body.ui2 .lottery-schedule-card .card-countdown {
    display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 36px; padding: 8px 12px; border-radius: 999px;
    background: #fdecee; border: 1px solid rgba(229, 56, 79, .3); color: #d32f45;
}
body.ui2 .lottery-schedule-card .card-countdown.allow { background: #e8f8ef; border-color: rgba(22, 160, 90, .35); color: #12804a; }
body.ui2 .lottery-schedule-card .card-countdown i { font-size: 13px; line-height: 1; }
body.ui2 .lottery-schedule-card .card-countdown .timer { font-size: 14px; font-weight: 700; letter-spacing: .05em; line-height: 1; font-variant-numeric: tabular-nums; }
body.ui2 #x120-loading-overlay { position: fixed; inset: 0; z-index: 99999; display: none; align-items: center; justify-content: center; background: rgba(13, 27, 76, .55); }
body.ui2 #x120-loading-overlay .loading-box { min-width: 240px; padding: 26px 30px; border-radius: 18px; background: #fff; text-align: center; box-shadow: 0 16px 40px rgba(13, 27, 76, .3); }
body.ui2 #x120-loading-overlay .loading-spinner { margin-bottom: 12px; color: var(--blue); font-size: 2.4rem; }
body.ui2 #x120-loading-overlay .loading-text { color: var(--navy); font-size: 17px; font-weight: 600; line-height: 1.4; }
body.ui2 #x120-loading-overlay .loading-sub { margin-top: 4px; color: var(--muted); font-size: 14px; }
/* ---------- หน้าแต้ม (point): /point-exchange /point-score /point-wheel /point-mystery (desktop2/point/*.php) — หัว .u2-dep-head + การ์ดเพชร + การ์ดขาว ; JS เดิม (แก้บั๊กเล็กน้อย ดู doc) ---------- */
.legacy:has(.u2-pt) { background: var(--bg); color: var(--text); }
.legacy:has(.u2-pt) #contents { padding-top: 0; }
body.ui2 .u2-pt { padding: 12px 12px 8px; }
body.ui2 .u2-pt .u2-dep-head .ic { background: linear-gradient(180deg, #3a7bf0, var(--blue-d)); box-shadow: 0 4px 14px rgba(31, 95, 224, .35); }
body.ui2 .u2-pt svg { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
body.ui2 .u2-pt .u2-dep-head .sub img { width: 16px; height: 16px; vertical-align: -3px; }
/* 2026-10-21: หัวหน้าแต้มใช้รูปไอคอนเดียวกับ .pk-list .pk-ic หน้าแรก (perk-ic-*.webp) แทน svg */
body.ui2 .u2-pt .u2-dep-head .ic.ic-img { background: radial-gradient(circle at 70% 25%, #ffe7d4 0, rgba(255, 231, 212, 0) 55%), linear-gradient(150deg, #dbe7ff, #eef3ff); box-shadow: 0 4px 14px rgba(13, 27, 76, .12); }
body.ui2 .u2-pt .u2-dep-head .ic.ic-img img { width: 38px; height: 38px; object-fit: contain; filter: drop-shadow(0 2px 3px rgba(13, 27, 76, .22)); }
body.ui2 .u2-pt .u2-dep-head .sub b { color: var(--blue-d); }
/* การ์ดเพชร */
body.ui2 .u2-pt-bal {
    display: flex; align-items: center; gap: 12px; margin: 0 0 12px; padding: 12px 14px; border-radius: 16px; color: #fff;
    background: linear-gradient(135deg, #2f6df0 0%, var(--blue-d) 60%, #0f3a9c 100%); box-shadow: 0 8px 20px rgba(22, 72, 184, .3);
}
body.ui2 .u2-pt-bal > img { flex: none; width: 44px; height: 44px; object-fit: contain; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .25)); }
body.ui2 .u2-pt-bal > div { flex: 1; min-width: 0; line-height: 1.2; }
body.ui2 .u2-pt-bal small { display: block; opacity: .85; font-size: 12.5px; }
body.ui2 .u2-pt-bal b { font-size: 26px; font-weight: 600; font-variant-numeric: tabular-nums; }
body.ui2 .u2-pt-bal .lim { flex: none; padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, .18); font-size: 12.5px; white-space: nowrap; }
/* คำอธิบาย / กติกา */
body.ui2 .u2-pt-desc { margin: 0 0 12px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: #fff; color: var(--navy); font-size: 14px; line-height: 1.6; }
body.ui2 .u2-pt-desc p { margin: 0 0 6px; }
body.ui2 .u2-pt-desc p:last-child { margin-bottom: 0; }
body.ui2 .u2-pt-desc img { max-width: 100%; height: auto; border-radius: 10px; }
body.ui2 .u2-pt-rule { margin-top: 12px; padding: 0; }
body.ui2 .u2-pt-rule summary { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; cursor: pointer; font-weight: 600; list-style: none; }
body.ui2 .u2-pt-rule summary::-webkit-details-marker { display: none; }
body.ui2 .u2-pt-rule summary::after { content: ""; width: 8px; height: 8px; margin-right: 4px; border-right: 2px solid var(--blue); border-bottom: 2px solid var(--blue); transform: rotate(45deg); transition: transform .2s; }
body.ui2 .u2-pt-rule[open] summary::after { transform: rotate(-135deg); }
body.ui2 .u2-pt-rule > div { padding: 0 14px 12px; color: var(--muted); }
/* กริดรายการ (ร้านค้า/กล่องสุ่ม) */
body.ui2 .u2-ex-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
body.ui2 .u2-ex-item {
    display: flex; flex-direction: column; align-items: stretch; gap: 6px; min-width: 0; padding: 8px 8px 10px; text-align: center;
    border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: 0 3px 10px rgba(13, 27, 76, .06);
    font-family: inherit; cursor: pointer; transition: transform .15s, border-color .15s, box-shadow .15s;
}
body.ui2 .u2-ex-item:hover { transform: translateY(-2px); border-color: var(--blue); box-shadow: 0 6px 16px rgba(31, 95, 224, .15); }
body.ui2 .u2-ex-item .img { display: grid; place-items: center; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 10px; background: var(--panel); }
body.ui2 .u2-ex-item .img > img { width: 100%; height: 100%; object-fit: contain; }
body.ui2 .u2-ex-item .nm { color: var(--navy); font-size: 14px; font-weight: 600; line-height: 1.3; }
body.ui2 .u2-ex-item .get { color: var(--muted); font-size: 13px; line-height: 1.3; }
body.ui2 .u2-ex-item .get b { color: var(--orange-d); font-size: 16px; font-weight: 600; }
body.ui2 .u2-ex-item .cost {
    display: flex; align-items: center; justify-content: center; gap: 5px; height: 36px; border-radius: 999px;
    background: linear-gradient(180deg, #ff8c32, var(--orange-d)); color: #fff; font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums;
    box-shadow: 0 4px 10px rgba(240, 95, 0, .22);
}
body.ui2 .u2-ex-item .cost img, body.ui2 .u2-pt .vals img, body.ui2 .u2-pt-modal .u2-pt-mrow img, body.ui2 .u2-pt .pill img, body.ui2 .u2-pt-modal .pill img, body.ui2 .u2-sc-match .rw img { width: 18px; height: 18px; object-fit: contain; }
body.ui2 .u2-ex-item.low .cost { background: #e4ebf7; color: var(--muted); box-shadow: none; }
body.ui2 .u2-mb-item .img { aspect-ratio: auto; height: 150px; overflow: visible; background: radial-gradient(circle at 50% 55%, #dfe9ff 0, var(--panel) 70%); }
body.ui2 .u2-mb-item .cube-box, body.ui2 .u2-mb-mcube .cube-box { animation: none; cursor: inherit; }
body.ui2 .u2-mb-item .cube-box { transform: scale(.78); }
body.ui2 .u2-mb-item .hexagon, body.ui2 .u2-mb-mcube .hexagon { display: none; }
/* หัวข้อย่อย / ประวัติ / ว่าง */
body.ui2 .u2-pt-sec { margin: 18px 0 8px; color: var(--navy); font-size: 16px; font-weight: 600; }
body.ui2 .u2-pt-log { display: grid; gap: 8px; }
body.ui2 .u2-pt-log .it { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: #fff; }
body.ui2 .u2-pt-log .tx { flex: 1; min-width: 0; line-height: 1.35; }
body.ui2 .u2-pt-log .tx b { display: block; color: var(--navy); font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
body.ui2 .u2-pt-log .tx small { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
body.ui2 .u2-pt-log .vals { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
body.ui2 .u2-pt-log .vals span { display: inline-flex; align-items: center; gap: 3px; }
body.ui2 .u2-pt-log .vals .cost { color: #d32f45; }
body.ui2 .u2-pt-log .vals .gain { color: #12804a; }
body.ui2 .u2-pt-empty { padding: 18px 14px; border-radius: 14px; border: 1px dashed var(--line); background: #fff; color: var(--muted); font-size: 14px; text-align: center; }
body.ui2 .u2-pt-more { height: 40px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--blue-d); font-family: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
body.ui2 .u2-pt-badge { display: inline-flex; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); color: var(--muted); font-size: 12.5px; font-weight: 600; line-height: 1.5; }
body.ui2 .u2-pt-badge.ok { background: #e8f8ef; border-color: rgba(22, 160, 90, .4); color: #12804a; }
body.ui2 .u2-pt-badge.bad { background: #fdecee; border-color: rgba(229, 56, 79, .35); color: #c8283e; }
/* ปุ่ม */
body.ui2 .u2-pt-btn, body.ui2 .u2-pt-btn2 {
    display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 48px; border-radius: 14px;
    font-family: inherit; font-size: 17px; font-weight: 600; cursor: pointer;
}
body.ui2 .u2-pt-btn { border: 0; background: linear-gradient(180deg, #ff8c32, var(--orange-d)); color: #fff; box-shadow: 0 6px 16px rgba(240, 95, 0, .28); }
body.ui2 .u2-pt-btn:hover:not(:disabled) { filter: brightness(1.05); }
body.ui2 .u2-pt-btn:disabled { background: #dfe6f3; color: #9aa6c2; box-shadow: none; cursor: not-allowed; }
body.ui2 .u2-pt-btn2 { border: 1px solid var(--line); background: #fff; color: var(--navy); }
body.ui2 .u2-pt .pill, body.ui2 .u2-pt-modal .pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px; background: rgba(255, 255, 255, .22); font-size: 15px; }
/* modal (ร้านค้า/กล่องสุ่ม) */
body.ui2 .u2-pt-modal .modal-dialog { max-width: 400px; margin-left: auto; margin-right: auto; padding: 0 14px; }
body.ui2 .u2-pt-modal .modal-content { display: flex; flex-direction: column; gap: 10px; padding: 18px; border: 0; border-radius: 20px; background: #fff; color: var(--navy); box-shadow: 0 20px 50px rgba(13, 27, 76, .3); }
body.ui2 .u2-pt-mimg { display: grid; place-items: center; aspect-ratio: 16 / 10; border-radius: 14px; background: var(--panel); overflow: hidden; }
body.ui2 .u2-pt-mimg img { width: 80%; height: 100%; object-fit: contain; }
body.ui2 .u2-pt-mttl { text-align: center; font-size: 18px; font-weight: 600; }
body.ui2 .u2-pt-mttl b { color: var(--orange-d); font-size: 22px; }
body.ui2 .u2-pt-mrow { display: flex; align-items: center; justify-content: space-between; padding: 9px 12px; border-radius: 12px; background: var(--bg); font-size: 14px; }
body.ui2 .u2-pt-mrow span { color: var(--muted); }
body.ui2 .u2-pt-mrow b { display: inline-flex; align-items: center; gap: 4px; font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
body.ui2 .u2-pt-warn { padding: 8px 12px; border-radius: 10px; background: #fff4e8; border: 1px solid rgba(255, 140, 50, .4); color: #8a4300; font-size: 13.5px; text-align: center; }
body.ui2 .u2-pt-mbtns { display: grid; grid-template-columns: 1fr 1.6fr; gap: 10px; margin-top: 4px; }
body.ui2 .u2-pt-load { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 10px 0 4px; color: var(--muted); font-size: 14px; }
body.ui2 .u2-pt-load i { width: 34px; height: 34px; border: 3px solid var(--line); border-top-color: var(--blue); border-radius: 50%; animation: u2-pt-spin .8s linear infinite; }
@keyframes u2-pt-spin { to { transform: rotate(360deg); } }
body.ui2 .u2-mb-mcube { display: grid; place-items: center; height: 170px; border-radius: 14px; background: radial-gradient(circle at 50% 55%, #dfe9ff 0, var(--panel) 70%); }
body.ui2 .u2-mb-rw { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; max-width: 300px; margin: 0 auto; padding: 0; list-style: none; }
body.ui2 .u2-mb-rw li { overflow: hidden; padding: 4px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); }
body.ui2 .u2-mb-rw img { display: block; width: 100%; max-width: 90px; height: auto; aspect-ratio: 1; margin: 0 auto; object-fit: contain; } /* รูปรางวัล 90x90 ไม่ขยายเกินขนาดจริง */
body.ui2 .mystery { background: rgba(13, 27, 76, .7); }
/* ทายสกอร์ */
body.ui2 .u2-sc-match { margin: 0 0 12px; padding: 12px 14px 14px; border-radius: 16px; border: 1px solid var(--line); background: #fff; box-shadow: 0 3px 10px rgba(13, 27, 76, .06); }
body.ui2 .u2-sc-match .sc-hd { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
body.ui2 .u2-sc-match .time { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
body.ui2 .u2-sc-match .time svg { width: 15px; height: 15px; }
body.ui2 .u2-sc-match .rw { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px; color: var(--muted); font-size: 12.5px; }
body.ui2 .u2-sc-match .rw b { display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px; border-radius: 999px; background: #fff4e8; color: var(--orange-d); font-size: 13px; font-weight: 600; }
body.ui2 .u2-sc-match .teams { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: start; gap: 8px; margin: 0 0 14px; }
body.ui2 .u2-sc-match .tm { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; text-align: center; }
body.ui2 .u2-sc-match .logo { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg); }
body.ui2 .u2-sc-match .logo img { width: 40px; height: 40px; object-fit: contain; }
body.ui2 .u2-sc-match .tm b { min-height: 2.6em; color: var(--navy); font-size: 14px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
body.ui2 .u2-sc-match .tm input {
    width: 72px; height: 54px; padding: 0; border-radius: 14px; border: 2px solid var(--line); background: var(--bg);
    color: var(--navy); font-family: inherit; font-size: 26px; font-weight: 600; text-align: center; outline: 0; transition: border-color .15s, box-shadow .15s;
}
body.ui2 .u2-sc-match .tm input:focus { border-color: var(--blue); background: #fff; box-shadow: 0 0 0 3px rgba(31, 95, 224, .15); }
body.ui2 .u2-sc-match .tm input::placeholder { color: #b3bfd9; }
body.ui2 .u2-sc-match .tm input:disabled { color: var(--blue-d); opacity: 1; }
body.ui2 .u2-sc-match .vs { align-self: center; margin-top: 28px; color: #b3bfd9; font-size: 15px; font-weight: 700; }
body.ui2 .u2-sc-sent { display: flex; align-items: center; justify-content: center; gap: 6px; height: 46px; border-radius: 14px; background: #e8f8ef; border: 1px solid rgba(22, 160, 90, .35); color: #12804a; font-size: 15px; font-weight: 600; }
body.ui2 .u2-sc-sent svg { width: 18px; height: 18px; }
body.ui2 .u2-sc-his { margin: 0 0 8px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: #fff; }
body.ui2 .u2-sc-his .sc-hd { display: flex; align-items: center; justify-content: space-between; margin: 0 0 6px; color: var(--muted); font-size: 12.5px; }
body.ui2 .u2-sc-his .tb { display: grid; grid-template-columns: minmax(0, 1fr) 48px 56px; align-items: center; gap: 4px 6px; font-size: 14px; }
body.ui2 .u2-sc-his .th { color: var(--muted); font-size: 12px; text-align: center; }
body.ui2 .u2-sc-his .nm { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.ui2 .u2-sc-his .nm img { flex: none; width: 22px; height: 22px; object-fit: contain; }
body.ui2 .u2-sc-his .tb b { color: var(--navy); font-weight: 600; text-align: center; }
/* กงล้อ */
body.ui2 .u2-wh-stage { overflow: hidden; border-radius: 18px; background: radial-gradient(circle at 50% 40%, #2f6df0 0, var(--blue-d) 45%, var(--navy) 100%); box-shadow: 0 10px 24px rgba(13, 27, 76, .25); }
body.ui2 .u2-wh-stage #play { padding: 0; }
body.ui2 .u2-wh-stage canvas { display: block; }
/* ---------- โปรไฟล์ (/account = desktop2/account.php): การ์ดผู้ใช้ + บัญชีรับเงิน + ปุ่มคัดลอก + ลิงก์ลัด ---------- */
.legacy:has(.u2-ac), .legacy:has(.u2-nw) { background: var(--bg); color: var(--text); }
.legacy:has(.u2-ac) #contents, .legacy:has(.u2-nw) #contents { padding-top: 0; }
body.ui2 #account.u2-ac { padding: 12px 12px 8px; }
body.ui2 .u2-ac .u2-dep-head .ic { background: linear-gradient(180deg, #3a7bf0, var(--blue-d)); box-shadow: 0 4px 14px rgba(31, 95, 224, .35); }
body.ui2 .u2-ac svg { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
body.ui2 .u2-ac-card { margin: 0 0 12px; padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: #fff; color: var(--text); box-shadow: 0 3px 10px rgba(13, 27, 76, .06); }
body.ui2 .u2-ac-sec { margin: 4px 2px 8px; color: var(--navy); font-size: 15px; font-weight: 600; }
body.ui2 .u2-ac-user, body.ui2 .u2-ac-bank { display: flex; align-items: center; gap: 12px; }
body.ui2 .u2-ac-user .av { flex: none; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; background: linear-gradient(180deg, #3a7bf0, var(--blue-d)); color: #fff; }
body.ui2 .u2-ac-user .av svg { width: 24px; height: 24px; }
body.ui2 .u2-ac-user .tx, body.ui2 .u2-ac-bank .det { flex: 1; min-width: 0; line-height: 1.35; }
body.ui2 .u2-ac-user small { display: block; color: var(--muted); font-size: 12.5px; }
body.ui2 .u2-ac-user b { display: block; color: var(--navy); font-size: 18px; font-weight: 600; letter-spacing: .03em; overflow-wrap: anywhere; }
body.ui2 .u2-ac-copy {
    flex: none; display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 10px;
    border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--blue-d);
    font-family: inherit; font-size: 13px; font-weight: 500; cursor: pointer;
}
body.ui2 .u2-ac-copy svg { width: 15px; height: 15px; }
body.ui2 .u2-ac-copy:active { transform: scale(.96); }
body.ui2 .u2-ac-rows { display: grid; margin: 12px 0 0; padding: 2px 12px; border-radius: 12px; background: var(--bg); }
body.ui2 .u2-ac-rows > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 10px 0; }
body.ui2 .u2-ac-rows > div + div { border-top: 1px solid var(--line); }
body.ui2 .u2-ac-rows dt { flex: none; color: var(--muted); font-size: 13.5px; font-weight: 400; }
body.ui2 .u2-ac-rows dd { margin: 0; min-width: 0; color: var(--navy); font-size: 15px; font-weight: 500; text-align: right; overflow-wrap: anywhere; }
body.ui2 .u2-ac-rows dd.num, body.ui2 .u2-ac-bank .num { font-variant-numeric: tabular-nums; letter-spacing: .03em; }
body.ui2 .u2-ac-bank .logo img { display: block; width: 48px; height: 48px; padding: 6px; border-radius: 50%; object-fit: contain; }
body.ui2 .u2-ac-bank .bank { color: var(--muted); font-size: 13px; }
body.ui2 .u2-ac-bank .num { color: var(--blue-d); font-size: 20px; font-weight: 600; overflow-wrap: anywhere; }
body.ui2 .u2-ac-bank .name { color: var(--navy); font-size: 14px; }
body.ui2 .u2-ac-note { display: flex; align-items: flex-start; gap: 8px; margin: 12px 0 0; padding: 10px 12px; border-radius: 12px; background: #fff4e8; color: #8a4a12; font-size: 13px; line-height: 1.5; }
body.ui2 .u2-ac-note svg { flex: none; width: 18px; height: 18px; margin-top: 1px; color: var(--orange-d); }
body.ui2 .u2-ac-note a { color: var(--orange-d); font-weight: 600; text-decoration: underline; }
body.ui2 .u2-ac-links { overflow: hidden; border-radius: 14px; border: 1px solid var(--line); background: #fff; box-shadow: 0 3px 10px rgba(13, 27, 76, .06); }
body.ui2 .u2-ac-links a { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 14px; color: var(--navy); font-size: 15px; font-weight: 500; }
body.ui2 .u2-ac-links a + a { border-top: 1px solid var(--line); }
body.ui2 .u2-ac-links a:active { background: var(--bg); }
body.ui2 .u2-ac-links .i { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--panel); color: var(--blue); }
body.ui2 .u2-ac-links .i svg { width: 19px; height: 19px; }
body.ui2 .u2-ac-links .go { width: 18px; height: 18px; margin-left: auto; color: #b3bfd9; }
body.ui2 .u2-ac-links a.out { color: #c8283e; }
body.ui2 .u2-ac-links a.out .i { background: #fdecee; color: #e5384f; }

/* ---------- อ่านข่าว (/news-{id} = desktop2/news.php): ปุ่มย้อนกลับ + การ์ดข่าว (เนื้อหาจาก editor ใช้ฟอนต์ธีม) + โหลด/ไม่พบ ---------- */
body.ui2 #news.u2-nw { padding: 12px 12px 8px; }
body.ui2 .u2-nw svg { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
body.ui2 .u2-nw-back { display: inline-flex; align-items: center; gap: 4px; height: 34px; margin: 0 0 10px; padding: 0 12px 0 6px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--navy); font-size: 14px; font-weight: 500; }
body.ui2 .u2-nw-back svg { width: 18px; height: 18px; color: var(--blue); }
body.ui2 .u2-nw-card { margin: 0 0 14px; padding: 16px 14px; border-radius: 16px; border: 1px solid var(--line); background: #fff; color: var(--text); box-shadow: 0 3px 10px rgba(13, 27, 76, .06); }
body.ui2 .u2-nw-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
body.ui2 .u2-nw-meta .tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; background: var(--panel); color: var(--blue-d); font-size: 12.5px; font-weight: 600; }
body.ui2 .u2-nw-meta .time { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
body.ui2 .u2-nw-meta svg { width: 14px; height: 14px; }
body.ui2 .u2-nw-ttl { margin: 10px 0 12px; color: var(--navy); font-size: 19px; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
body.ui2 .u2-nw-body { padding-top: 12px; border-top: 1px solid var(--line); color: var(--text); font-size: 15px; line-height: 1.7; overflow-wrap: anywhere; }
body.ui2 .u2-nw-body * { font-family: inherit !important; max-width: 100%; }
body.ui2 .u2-nw-body p { margin: 0 0 8px; }
body.ui2 .u2-nw-body h1, body.ui2 .u2-nw-body h2, body.ui2 .u2-nw-body h3, body.ui2 .u2-nw-body h4 { margin: 0 0 8px; color: var(--blue-d); font-size: 16px !important; font-weight: 600; }
body.ui2 .u2-nw-body ul, body.ui2 .u2-nw-body ol { margin: 0 0 8px; padding-left: 20px; }
body.ui2 .u2-nw-body ul { list-style: disc; }
body.ui2 .u2-nw-body ol { list-style: decimal; }
body.ui2 .u2-nw-body strong, body.ui2 .u2-nw-body b { font-weight: 600; color: var(--navy); }
body.ui2 .u2-nw-body a { color: var(--blue); text-decoration: underline; }
body.ui2 .u2-nw-body img { height: auto !important; border-radius: 12px; }
body.ui2 .u2-nw-body table { width: 100% !important; border-collapse: collapse; }
body.ui2 .u2-nw-load { display: grid; gap: 10px; }
body.ui2 .u2-nw-load i { display: block; height: 16px; border-radius: 8px; background: linear-gradient(90deg, #eef2fa 25%, #f8faff 50%, #eef2fa 75%) 0 0 / 200% 100%; animation: u2-lc-sk 1.2s linear infinite; }
body.ui2 .u2-nw-load i:first-child { width: 40%; }
body.ui2 .u2-nw-load i:last-child { height: 160px; border-radius: 12px; }
body.ui2 .u2-nw-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 26px 16px; text-align: center; }
body.ui2 .u2-nw-empty .ic { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; background: var(--panel); color: var(--blue); }
body.ui2 .u2-nw-empty .ic svg { width: 26px; height: 26px; }
body.ui2 .u2-nw-empty b { color: var(--navy); font-size: 17px; font-weight: 600; }
body.ui2 .u2-nw-empty p { margin: 0; color: var(--muted); font-size: 14px; }
/* css เดิมขีดเส้นใต้ลิงก์ — ปุ่ม/ลิงก์ของธีมไม่ต้องมี */
body.ui2 .u2-ac-links a, body.ui2 .u2-nw-back, body.ui2 .u2-nw-home { text-decoration: none; }
body.ui2 .u2-nw-home { display: flex; align-items: center; justify-content: center; width: 100%; height: 48px; border-radius: 14px; font-size: 16px; }

@media (max-width: 380px) {
    body.ui2 .u2-dep-head { gap: 10px; }
    body.ui2 .u2-dep-steps li { font-size: 11.5px; padding: 2px 7px 2px 3px; gap: 4px; }
    body.ui2 .u2-dep-line { gap: 10px; padding: 10px 12px; }
    body.ui2 .u2-dep-line .tx b { font-size: 15px; }
    body.ui2 .u2-dep-line .go { padding: 7px 8px 7px 10px; font-size: 12.5px; }
}

/* จอคอม: กรอบมือถือกลางจอ */
@media (min-width: 480px) {
    body.ui2 { background: radial-gradient(circle at 50% 0, #1d4fb8 0, #0d1b4c 60%) fixed; }
    .app { box-shadow: 0 0 40px rgba(0, 0, 0, .45); }
}

/* ---------- แถบติดตั้งแอป (PWA) บนสุดเหนือ header — _pwa.php #pwa-bar (ชุดเดียวกับ www, แบบ supervip2541) ---------- */
.pwa-bar {
    position: relative; z-index: 21;
    display: flex; align-items: center; gap: 10px; min-height: 48px;
    padding: 6px 8px 6px 12px;
    background: linear-gradient(90deg, #1f5fe0 0%, #0d1b4c 100%);
    color: #fff; line-height: 1.3;
}
.pwa-bar[hidden] { display: none; }
.pwa-bar > img { flex: none; width: 34px; height: 34px; border-radius: 8px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .35); }
.pwa-bar-tx { flex: 1; min-width: 0; display: grid; }
.pwa-bar-tx b { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pwa-bar-tx small { font-size: 12px; font-weight: 300; color: rgba(255, 255, 255, .8); }
.pwa-bar.is-help .pwa-bar-tx small { color: #ffd2a8; }
.pwa-bar-tx small svg { width: 14px; height: 14px; vertical-align: -2px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pwa-bar-btn {
    flex: none; display: inline-flex; align-items: center; height: 32px; padding: 0 14px; border: 0; border-radius: 16px;
    background: linear-gradient(180deg, #ff9a4a 0%, #ff7a1a 50%, #f05f00 100%); color: #fff; text-decoration: none;
    font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}
.pwa-bar-x { flex: none; display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; border: 0; background: none; color: rgba(255, 255, 255, .75); cursor: pointer; }
.pwa-bar-x svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
