/* Main Lobby — CSS ชุดเดิม (ปรับ body → .lobby-page) + guide / toast / overlay / vignette */ * { box-sizing: border-box; } html { min-height: 100%; -webkit-text-size-adjust: 100%; } @font-face { font-family: 'NotoSansThai'; src: url('../FONTS/NotoSansThai-ExtraBold.ttf') format('truetype'); font-weight: 100 900; font-style: normal; font-display: swap; } :root { --lobby-character-height: 62cqh; /* ความสูงตัวละครแบบพิกเซลคงที่ */ --lobby-character-stand-y: 0px; /* จุดยืนเท้าจากด้านล่างจอแบบพิกเซลคงที่ */ --lobby-character-foot-offset: 18cqh; /* จูนละเอียดเพิ่ม/ลดจากจุดยืนหลัก */ --lobby-character-anchor-x: 50%; /* จุดยึดตัวละครแนวนอน */ --lobby-character-anchor-shift-x: -50%; /* ชดเชยให้อยู่กึ่งกลางจาก anchor-x */ --lobby-character-anchor-y: 50%; /* จุดยึดตัวละครแนวตั้ง (100%=ยึดเท้า) */ --lobby-bg-anchor-x: 50%; --lobby-bg-anchor-y: 88%; /* จุดฐานของฉากหลังที่ต้องการยึดเป็นหลัก */ } .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; } body.lobby-page { margin: 0; min-height: 100vh; min-height: 100dvh; overflow-x: hidden; font-family: 'NotoSansThai', 'Kanit', 'Sarabun', 'Segoe UI', system-ui, sans-serif; color: #fff; background: #060818; -webkit-tap-highlight-color: transparent; } body.lobby-page button, body.lobby-page input, body.lobby-page textarea, body.lobby-page select { font-family: inherit; } body.lobby-page, body.lobby-page * { font-family: 'NotoSansThai', 'Kanit', 'Sarabun', 'Segoe UI', system-ui, sans-serif; } /* ปุ่มที่กดง่ายบนมือถือ */ @media (hover: none) and (pointer: coarse) { .lobby-btn-cloth, .lobby-btn-start, .lobby-btn-quiz, .lobby-btn-daily, .lobby-btn-tutorial, .lobby-btn-profile, .lobby-btn-ai-chat { min-height: 44px; min-width: 44px; } } /* ---- vignette (เสริม) ---- */ .lobby-vignette { position: fixed; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(ellipse 85% 75% at 50% 48%, transparent 0%, rgba(0, 0, 0, 0.08) 40%, rgba(0, 0, 0, 0.45) 100%); } /* ---- พื้นหลัง ---- */ .lobby-bg { position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 0; overflow: hidden; } .lobby-bg-img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; object-position: var(--lobby-bg-anchor-x) var(--lobby-bg-anchor-y); } /* ---- ชั้น UI ทั้งหมด ---- */ .lobby-ui { position: relative; z-index: 2; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); } /* ---- Header ---- */ .lobby-header { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; gap: 0.5rem clamp(1rem, 4vw, 2rem); padding: clamp(0.5rem, 2vw, 1rem) clamp(1rem, 4vw, 2rem); align-items: start; flex-shrink: 0; position: relative; z-index: 6; } @media (min-width: 768px) { .lobby-header { grid-template-columns: 1fr min(320px, 28vw); padding-right: 24px; } .lobby-news-wrap { width: 100%; max-width: 320px; } .lobby-btn-daily { margin-left: auto; } .lobby-footer { padding-right: 24px; } } @media (min-width: 1200px) { .lobby-header { grid-template-columns: 1fr 320px; } } @media (max-width: 767px) { .lobby-header { grid-template-columns: 1fr auto; padding-right: clamp(1rem, 4vw, 2rem); } .lobby-news-wrap { max-width: min(320px, 28vw); } .lobby-btn-daily { max-width: min(200px, 18vw); width: auto; } .lobby-footer { padding-right: clamp(1rem, 4vw, 2rem); } } .lobby-profile-panel { grid-column: 1; grid-row: 1; } .lobby-news-wrap { grid-column: 2; grid-row: 1; } .lobby-header-row2-left { grid-column: 1; grid-row: 2; display: flex; align-items: center; gap: 0.5rem; } .lobby-btn-daily { grid-column: 2; grid-row: 2; } .lobby-btn-help { z-index: 10; width: 40px; height: 40px; border: none; border-radius: 8px; background: rgba(0, 180, 220, 0.25); color: #00d4ff; font-size: 1.25rem; font-weight: bold; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 12px rgba(0, 212, 255, 0.4); } .lobby-btn-help:hover { background: rgba(0, 180, 220, 0.4); } .lobby-profile-panel { position: relative; flex-shrink: 0; width: fit-content; max-width: 280px; } .lobby-profile-bg { display: block; width: 100%; max-width: 280px; height: auto; object-fit: contain; vertical-align: top; } .lobby-profile-inner { position: absolute; top: 0; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: clamp(0.3rem, 1.2vw, 0.5rem); padding: 8% 6% 8% 5%; box-sizing: border-box; overflow: hidden; } .lobby-avatar-wrap { width: 30%; max-width: 72px; flex-shrink: 0; aspect-ratio: 1; align-self: center; display: flex; align-items: center; justify-content: center; overflow: hidden; border-radius: 6px; height: 55px; padding-left: 14px; } .lobby-avatar-mask { width: 100%; height: 100%; object-fit: cover; object-position: center -10%; display: block; -webkit-touch-callout: none; } .lobby-profile-info { flex: 1; min-width: 0; overflow: hidden; padding-left: clamp(0.15rem, 0.6vw, 0.35rem); } .lobby-profile-name { margin: 0 0 0.1em; font-size: clamp(0.85rem, 1.5vw, 1.15rem); font-weight: bold; color: #fff; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .lobby-profile-meta { margin: 0; font-size: clamp(0.55rem, 0.9vw, 0.65rem); color: #da62aa; line-height: 1.3; } .lobby-profile-coins { margin: 0.2em 0 0; font-size: clamp(0.55rem, 0.9vw, 0.65rem); color: #b0b0b0; display: flex; align-items: center; gap: 0.25em; line-height: 1.3; } .lobby-coin-icon { width: 1.2em; height: 1.2em; object-fit: contain; } .lobby-news-wrap { position: relative; max-width: 320px; width: 320px; justify-self: end; display: block; } .lobby-news-bg { display: block; width: 100%; height: auto; object-fit: contain; vertical-align: top; } .lobby-news-img { position: absolute; left: 0; right: 0; top: 0; width: 100%; min-width: 100%; height: auto; max-height: 100%; object-fit: contain; object-position: top center; transform: translateX(5.5%); } .lobby-btn-daily { position: relative; padding: 0; border: none; background: none; cursor: pointer; max-width: min(320px, 26vw); width: min(320px, 26vw); justify-self: end; } .lobby-daily-img { display: block; width: 100%; height: auto; object-fit: contain; max-width: 100%; } .lobby-daily-dot { position: absolute; top: 7%; right: 5%; width: 8.5%; height: auto; aspect-ratio: 1 / 1; border-radius: 50%; background: #e53935; } /* ---- กลุ่มตัวละคร + ปุ่มห้องแต่งตัว ---- */ .lobby-character-area { position: absolute; left: 0; right: 0; bottom: 19%; z-index: 3; pointer-events: none; min-height: 50vh; display: flex; align-items: flex-end; justify-content: center; gap: clamp(0.5rem, 2vw, 1.5rem); } .lobby-character-area .lobby-btn-cloth { pointer-events: auto; } .lobby-character-center { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%) scale(3); transform-origin: center bottom; width: min(160px, 14vw); height: min(142px, 18vh); display: flex; align-items: flex-end; justify-content: center; } .lobby-character-img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; object-position: center bottom; visibility: hidden; } @keyframes lobby-char-idle-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-0.35cqh); } } .lobby-character-img.lobby-character-img--visible { visibility: visible; animation: lobby-char-idle-bob 2.6s ease-in-out infinite; transform-origin: center bottom; will-change: transform; } /* ---- ปุ่มห้องแต่งตัว ---- */ .lobby-center-left { position: absolute; left: 50%; bottom: 0; z-index: 4; display: flex; align-items: center; transform: translate(calc(-50% - 12vw), -5em); } .lobby-btn-cloth { padding: 0; border: none; background: none; cursor: pointer; max-width: min(117px, 13vw); } .lobby-btn-cloth-img { display: block; width: 100%; height: auto; object-fit: contain; } /* ---- ลีดเดอร์บอร์ด ---- */ .lobby-leaderboard { --lobby-leaderboard-height: 38cqh; /* ปรับความสูง leaderboard */ --lobby-daily-leaderboard-gap: 0cqh; /* ระยะห่างจากปุ่มรางวัลประจำวัน (ติดลบได้) */ --lobby-leaderboard-row-height: 7cqh; /* ปรับความสูงแต่ละรายชื่อ */ --lobby-leaderboard-rank-icon-size: 2.3em; /* ปรับขนาดไอคอนอันดับ 1-3 */ --lobby-leaderboard-scrollbar-width: max(8px, 1.1cqh); /* ความอ้วน scrollbar */ --lobby-leaderboard-scrollbar-safe-gap: 10px; /* เว้นช่องกันทับตัวหนังสือ */ --lobby-leaderboard-scrollbar-thumb-inset: 1px; --lobby-leaderboard-scrollbar-offset-x: 0px; /* ตำแหน่งแถบ scrollbar */ --lobby-leaderboard-font-size: 2.1cqh; --lobby-leaderboard-content-inset-top: 37%; --lobby-leaderboard-content-inset-right: 8.5%; --lobby-leaderboard-content-inset-bottom: 8%; --lobby-leaderboard-content-inset-left: 6%; position: absolute; top: 19em; right: clamp(0.5rem, 2vw, 1.5rem); height: var(--lobby-leaderboard-height); width: calc(var(--lobby-leaderboard-height) * (417 / 443)); aspect-ratio: 417 / 443; z-index: 5; overflow: hidden; isolation: isolate; } .lobby-leaderboard-bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: contain; pointer-events: none; z-index: 0; } .lobby-leaderboard-mask { position: absolute; top: var(--lobby-leaderboard-content-inset-top); right: var(--lobby-leaderboard-content-inset-right); bottom: var(--lobby-leaderboard-content-inset-bottom); left: var(--lobby-leaderboard-content-inset-left); z-index: 1; overflow: hidden; border-radius: 10px; } .lobby-leaderboard-inner { position: absolute; inset: 0; z-index: 1; padding: clamp(0.45rem, 0.95cqh, 0.9rem) clamp(0.45rem, 1cqh, 0.85rem) clamp(0.45rem, 0.95cqh, 0.9rem); overflow-y: hidden; overflow-x: hidden; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; width: 100%; max-width: 100%; box-sizing: border-box; } .lobby-leaderboard-scroll { position: relative; width: 100%; height: 100%; margin-right: 0; overflow-y: auto; overflow-x: hidden; padding-right: calc(var(--lobby-leaderboard-scrollbar-width) + var(--lobby-leaderboard-scrollbar-safe-gap)); scrollbar-width: none; cursor: grab; } .lobby-leaderboard-scroll.is-dragging { cursor: grabbing; } body.lobby-page.lobby-leaderboard-dragging, body.lobby-page.lobby-leaderboard-dragging * { user-select: none !important; } .lobby-leaderboard-scroll-track { position: absolute; top: 0; right: 0; width: var(--lobby-leaderboard-scrollbar-width); height: 100%; pointer-events: none; opacity: 1; border-radius: 999px; background: #1b2740; border: 1px solid #22324f; z-index: 1; } .lobby-leaderboard-scroll-thumb { position: absolute; right: var(--lobby-leaderboard-scrollbar-thumb-inset); top: var(--lobby-leaderboard-scrollbar-thumb-inset); width: calc(var(--lobby-leaderboard-scrollbar-width) - (var(--lobby-leaderboard-scrollbar-thumb-inset) * 2)); min-height: 18px; border-radius: 999px; pointer-events: auto; z-index: 2; background: #f04cdc; box-shadow: inset 0 0 0 1px rgba(255, 210, 240, 0.52), 0 0 8px rgba(255, 83, 181, 0.45); display: block; cursor: grab; } .lobby-leaderboard-scroll-thumb.is-dragging { cursor: grabbing; } .lobby-leaderboard-scroll::-webkit-scrollbar { width: 0; height: 0; } .lobby-leaderboard-scroll::-webkit-scrollbar-track { background: transparent; border: 0; } .lobby-leaderboard-scroll::-webkit-scrollbar-thumb { background: transparent; border: 0; } .lobby-leaderboard-list { list-style: none; margin: 0 auto; margin-top: 0; padding: 0; width: 100%; max-width: 100%; padding-right: 2px; min-height: 0; overflow: visible; display: flex; flex-direction: column; gap: clamp(0.2rem, 0.5cqh, 0.45rem); align-self: center; } .lobby-leaderboard-list li { display: flex; align-items: flex-start; gap: 0.5rem; width: 100%; min-width: 0; font-size: var(--lobby-leaderboard-font-size); color: #fff; min-height: var(--lobby-leaderboard-row-height); } .lobby-rank-icon { width: var(--lobby-leaderboard-rank-icon-size); height: var(--lobby-leaderboard-rank-icon-size); flex-shrink: 0; } .lobby-rank-icon { object-fit: contain; } .lobby-rank-num { display: inline-flex; align-items: center; justify-content: center; width: var(--lobby-leaderboard-rank-icon-size); height: var(--lobby-leaderboard-rank-icon-size); font-weight: 700; color: #ffffff; border-radius: 50%; background: rgba(118, 145, 212, 0); border: 1px solid rgba(201, 219, 255, 0); line-height: 1.2; flex-shrink: 0; opacity: 1; } .lobby-rank-num::after { content: '.'; } .lobby-rank-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.05em; } .lobby-rank-name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; } .lobby-rank-case { font-size: 0.82em; color: rgba(255, 255, 255, 0.78); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; } .lobby-rank-score { flex-shrink: 0; margin-left: auto; color: #ffffff; font-weight: 700; line-height: 1.3; } .lobby-leaderboard, .lobby-leaderboard * { font-family: 'Kanit', 'Sarabun', 'Segoe UI', system-ui, sans-serif; font-weight: 500; } /* ---- Footer ---- */ .lobby-footer { margin-top: auto; display: flex; justify-content: space-between; align-items: flex-end; padding: clamp(0.5rem, 2vw, 1rem) clamp(1rem, 4vw, 2rem); gap: 1rem; flex-shrink: 0; position: relative; } .lobby-footer-left, .lobby-footer-right { flex-shrink: 0; display: flex; align-items: flex-end; position: relative; z-index: 1; } .lobby-footer-left { max-width: 135px; width: 135px; } .lobby-footer-right { max-width: 104px; width: 104px; } .lobby-btn-tutorial, .lobby-btn-profile, .lobby-btn-ai-chat { padding: 0; border: none; background: none; cursor: pointer; display: block; max-width: 135px; width: 135px; } .lobby-btn-tutorial-img { display: block; width: 104px; height: auto; object-fit: contain; transform: translateX(-14.5%); } .lobby-btn-profile-img, .lobby-btn-ai-chat-img { display: block; width: 100%; height: auto; object-fit: contain; } .lobby-footer-center { display: flex; justify-content: center; align-items: flex-end; gap: clamp(0.5rem, 2vw, 1rem); flex: 1; min-width: 0; position: absolute; left: 50%; transform: translateX(-50%); bottom: clamp(0.5rem, 2vw, 1rem); z-index: 10; } .lobby-btn-start, .lobby-btn-quiz { padding: 0; border: none; background: none; cursor: pointer; max-width: 260px; } .lobby-btn-start-img, .lobby-btn-quiz-img { display: block; width: 100%; height: auto; object-fit: contain; } /* ========== RESPONSIVE ========== */ @media (min-width: 1920px) { .lobby-profile-panel { max-width: 280px; } .lobby-profile-bg { max-width: 280px; } .lobby-news-wrap { max-width: 320px; } .lobby-btn-daily { max-width: 320px; width: 320px; } .lobby-character-center { transform: translateX(-50%) scale(3); width: 160px; height: 142px; } .lobby-character-area { bottom: 19%; } .lobby-leaderboard { right: 24px; top: 19em; } .lobby-btn-start, .lobby-btn-quiz { max-width: 260px; } .lobby-footer-left { max-width: 135px; width: 135px; } .lobby-footer-right { max-width: 104px; width: 104px; } .lobby-btn-tutorial, .lobby-btn-profile { max-width: 104px; width: 104px; } .lobby-btn-ai-chat { max-width: 135px; width: 135px; } } @media (min-width: 1200px) and (max-width: 1919px) { .lobby-character-center { transform: translateX(-50%) scale(2.5); width: 140px; height: 124px; } .lobby-center-left { transform: translate(calc(-50% - 11vw), -4em); } .lobby-leaderboard { right: clamp(0.5rem, 2vw, 1.5rem); } } @media (max-width: 1199px) { .lobby-header { grid-template-columns: 1fr 1fr; gap: 0.5rem 1rem; } .lobby-profile-panel { max-width: 280px; } .lobby-news-wrap { max-width: 320px; width: 320px; } .lobby-character-area { bottom: 20%; min-height: 45vh; } .lobby-character-center { transform: translateX(-50%) scale(2.5); width: 130px; height: 115px; } .lobby-center-left { transform: translate(calc(-50% - 10vw), -4em); } .lobby-btn-cloth { max-width: 98px; } .lobby-leaderboard { right: 12px; top: 19em; } .lobby-leaderboard-list { width: 100%; max-width: 100%; } .lobby-leaderboard-list li { width: 100%; } .lobby-footer-center { gap: 0.75rem; } .lobby-btn-start, .lobby-btn-quiz { max-width: 240px; } } @media (max-width: 767px) { .lobby-ui { display: flex; flex-direction: column; min-height: 100vh; } .lobby-header { grid-template-columns: 1fr auto; grid-template-rows: auto auto auto; padding: 0.5rem 0.75rem; } .lobby-profile-panel { grid-column: 1; grid-row: 1; max-width: 280px; } .lobby-news-wrap { grid-column: 2; grid-row: 1; max-width: 320px; width: 320px; } .lobby-header-row2-left { grid-column: 1; grid-row: 2; } .lobby-btn-daily { grid-column: 2; grid-row: 2; max-width: min(320px, 26vw); width: min(320px, 26vw); } .lobby-profile-name { font-size: 0.85rem; } .lobby-profile-meta, .lobby-profile-coins { font-size: 0.5rem; } .lobby-character-area { position: relative; left: auto; right: auto; bottom: auto; flex: 1; min-height: 140px; } .lobby-character-center { transform: translateX(-50%) scale(2.5); width: 100px; height: 90px; } .lobby-center-left { transform: translate(calc(-50% - 9vw), -3em); } .lobby-btn-cloth { max-width: 72px; } .lobby-leaderboard { position: relative; top: auto; right: auto; --lobby-leaderboard-height: min(50cqh, 430px); width: min(calc(var(--lobby-leaderboard-height) * (417 / 443)), 90vw); max-width: none; margin: 0 auto; flex-shrink: 0; } .lobby-leaderboard-mask { border-radius: 9px; } .lobby-leaderboard-list { margin: 0 auto; width: 100%; max-width: 100%; } .lobby-leaderboard-list li { font-size: var(--lobby-leaderboard-font-size); width: 100%; display: flex; align-items: flex-start; gap: 0.5rem; } .lobby-rank-score { flex-shrink: 0; margin-left: auto; color: #ffc107; } .lobby-footer { flex-wrap: wrap; justify-content: center; padding: 0.75rem; } .lobby-footer-left { position: absolute; left: 0.5rem; bottom: 0.75rem; } .lobby-footer-right { position: absolute; right: 0.5rem; bottom: 0.75rem; } .lobby-footer-center { position: relative; left: auto; transform: none; flex: 1 1 100%; margin-top: 0.5rem; padding-top: 0.5rem; } .lobby-btn-start, .lobby-btn-quiz { max-width: 200px; } .lobby-footer-left { max-width: 104px; width: 104px; } .lobby-footer-right { max-width: 80px; width: 80px; } .lobby-btn-tutorial-img { width: 80px; } } @media (max-width: 479px) { .lobby-profile-panel { max-width: min(280px, 42vw); } .lobby-news-wrap { max-width: min(320px, 48vw); width: min(320px, 48vw); } .lobby-btn-daily { max-width: min(200px, 42vw); width: min(200px, 42vw); } .lobby-daily-dot { width: 9%; top: 2.2%; right: 2.2%; } .lobby-character-center { transform: translateX(-50%) scale(3.2); width: 80px; height: 70px; } .lobby-center-left { transform: translate(calc(-50% - 10vw), -3em); } .lobby-btn-cloth { max-width: 59px; } .lobby-leaderboard { --lobby-leaderboard-height: min(47cqh, 390px); width: min(calc(var(--lobby-leaderboard-height) * (417 / 443)), 92vw); max-width: none; } .lobby-leaderboard-list { width: 100%; max-width: 100%; } .lobby-leaderboard-list li { width: 100%; display: flex; align-items: flex-start; gap: 0.5rem; } .lobby-rank-score { flex-shrink: 0; margin-left: auto; color: #ffc107; } .lobby-btn-start, .lobby-btn-quiz { max-width: min(200px, 44vw); } .lobby-footer-left { max-width: min(104px, 23vw); width: min(104px, 23vw); } .lobby-footer-right { max-width: min(80px, 18vw); width: min(80px, 18vw); } } /* ========== MOBILE LANDSCAPE — Scale ตาม mock (จอ ≤932px landscape) ========== */ @media (max-width: 932px) and (orientation: landscape) { body.lobby-page { min-height: 100dvh; min-height: 100svh; } .lobby-ui { min-height: 100dvh; min-height: 100svh; max-height: 100dvh; max-height: 100svh; overflow: hidden; padding: max(0.25rem, env(safe-area-inset-top)) max(0.5rem, env(safe-area-inset-right)) max(0.25rem, env(safe-area-inset-bottom)) max(0.5rem, env(safe-area-inset-left)); } /* ---- Header ---- */ .lobby-header { grid-template-columns: 1fr auto; grid-template-rows: auto auto; gap: min(0.4rem, 1vh) min(0.75rem, 1.5vw); padding: min(0.4rem, 1vh) min(0.75rem, 1.5vw); } .lobby-profile-panel { max-width: min(180px, 20vw); } .lobby-profile-bg { max-width: min(180px, 20vw); } .lobby-profile-inner { padding: 6% 5% 6% 4%; gap: min(0.25rem, 0.8vw); } .lobby-profile-name { font-size: clamp(0.55rem, 1.6vh, 0.75rem); white-space: nowrap; text-overflow: ellipsis; overflow: hidden; } .lobby-profile-meta, .lobby-profile-coins { font-size: clamp(0.42rem, 1.2vh, 0.55rem); white-space: nowrap; text-overflow: ellipsis; overflow: hidden; } .lobby-avatar-wrap { width: 54%; max-width: min(55px, 11vh); max-height: min(74px, 8vh); height: 75px; padding-left: 12px; } .lobby-news-wrap { max-width: min(200px, 22vw); width: min(200px, 22vw); overflow: hidden; } .lobby-news-img { max-height: 100%; object-fit: contain; } .lobby-btn-daily { max-width: min(160px, 18vw); width: min(160px, 18vw); } .lobby-daily-dot { width: 9%; top: 2.2%; right: 2.2%; } .lobby-header-row2-left { gap: min(0.4rem, 1vw); } .lobby-btn-tutorial, .lobby-btn-profile { max-width: min(48px, 5.5vw); width: min(48px, 5.5vw); } .lobby-btn-ai-chat { max-width: min(62px, 7vw); width: min(62px, 7vw); } .lobby-btn-tutorial-img { width: min(48px, 5.5vw); transform: translateX(-14.5%); } /* ---- ตัวละคร (ขยายใหญ่ตาม mock) ---- */ .lobby-character-area { position: absolute; left: 0; right: 0; bottom: 12%; min-height: 40vh; } .lobby-character-center { transform: translateX(-50%) scale(2.5); width: min(120px, 13vw); height: min(110px, 22vh); } .lobby-center-left { transform: translate(calc(-50% - 10vw), -3em); } .lobby-btn-cloth { max-width: min(80px, 9vw); } /* ---- ลีดเดอร์บอร์ด ---- */ .lobby-leaderboard { position: absolute; top: auto; bottom: max(50px, 12vh); right: max(0.5rem, env(safe-area-inset-right)); --lobby-leaderboard-height: min(46cqh, 240px); width: min(calc(var(--lobby-leaderboard-height) * (417 / 443)), 24vw); margin: 0; } .lobby-leaderboard-list { max-width: 100%; gap: 0.35rem; margin-top: 0.4rem; } .lobby-leaderboard-list li { font-size: var(--lobby-leaderboard-font-size); gap: 0.3rem; min-height: 1.4em; } .lobby-rank-icon, .lobby-rank-num { width: var(--lobby-leaderboard-rank-icon-size); height: var(--lobby-leaderboard-rank-icon-size); } /* ---- Footer (ลดขนาดปุ่ม landscape) ---- */ .lobby-footer { padding: min(0.3rem, 0.8vh) min(0.5rem, 1vw); gap: 0.4rem; flex-wrap: nowrap; justify-content: space-between; align-items: flex-end; } .lobby-footer-left { max-width: min(70px, 8vw); width: min(70px, 8vw); } .lobby-footer-right { max-width: min(54px, 6.5vw); width: min(54px, 6.5vw); } .lobby-footer-center { position: absolute; left: 50%; transform: translateX(-50%); bottom: min(0.4rem, 1vh); gap: min(0.6rem, 1.2vw); flex: 0 1 auto; margin-top: 0; padding-top: 0; } .lobby-footer-left { position: relative; left: auto; bottom: auto; z-index: 2; } .lobby-footer-right { position: relative; right: auto; bottom: auto; z-index: 2; } .lobby-btn-start, .lobby-btn-quiz { max-width: min(170px, 19vw); } /* ---- Guide bar ---- */ .lobby-guide-img { max-height: min(34vh, 200px); } .lobby-guide-bar--top .lobby-guide-img { max-height: min(38vh, 220px); } .lobby-guide-next img { height: clamp(30px, 7vw, 40px); } /* ---- AI Chat ---- */ #lobby-ai-chat-panel:not(.lobby-ai-chat-hidden) { max-height: min(72vh, 280px); width: min(300px, 42vw); font-size: 0.8rem; padding: 3.3rem; padding-left: 2.6rem; /* เพิ่ม = ขยับเนื้อหาขวา */ padding-right: 1.4rem; /* ลดเพื่อชดเชยพื้นที่ */ } } /* จอเตี้ยมาก (landscape + height ≤ 380px) — ลดอีกนิด */ @media (max-height: 380px) and (orientation: landscape) { .lobby-header { padding: 0.2rem 0.5rem; gap: 0.2rem 0.5rem; } .lobby-profile-panel { max-width: min(150px, 18vw); } .lobby-profile-bg { max-width: min(150px, 18vw); } .lobby-profile-inner { padding: 5% 4% 5% 3%; gap: min(0.15rem, 0.6vw); } .lobby-profile-name { font-size: clamp(0.45rem, 1.3vh, 0.62rem); } .lobby-profile-meta, .lobby-profile-coins { font-size: clamp(0.36rem, 1vh, 0.48rem); } .lobby-avatar-wrap { width: 26%; max-width: min(30px, 7vh); max-height: min(30px, 7vh); } .lobby-news-wrap { max-width: min(160px, 20vw); width: min(160px, 20vw); } .lobby-btn-daily { max-width: min(140px, 17vw); width: min(140px, 17vw); } .lobby-btn-tutorial, .lobby-btn-profile { max-width: min(40px, 5vw); width: min(40px, 5vw); } .lobby-btn-ai-chat { max-width: min(52px, 6.5vw); width: min(52px, 6.5vw); } .lobby-btn-tutorial-img { width: min(40px, 5vw); } .lobby-character-center { transform: translateX(-50%) scale(2.2); width: min(100px, 12vw); height: min(90px, 20vh); } .lobby-center-left { transform: translate(calc(-50% - 8vw), -2em); } .lobby-btn-cloth { max-width: min(68px, 8vw); } .lobby-leaderboard { --lobby-leaderboard-height: min(40cqh, 180px); width: min(calc(var(--lobby-leaderboard-height) * (417 / 443)), 22vw); bottom: max(44px, 11vh); } .lobby-leaderboard-list { max-width: 100%; gap: 0.3rem; } .lobby-leaderboard-list li { font-size: var(--lobby-leaderboard-font-size); } .lobby-footer { padding: 0.2rem 0.4rem; } .lobby-footer-left { max-width: min(57px, 7vw); width: min(57px, 7vw); } .lobby-footer-right { max-width: min(44px, 5.5vw); width: min(44px, 5.5vw); } .lobby-btn-start, .lobby-btn-quiz { max-width: min(145px, 17vw); } } /* ---- แชท AI (อ้างอิง room-lobby) ---- */ #lobby-ai-chat-panel.lobby-ai-chat-hidden { display: none !important; } #lobby-ai-chat-panel:not(.lobby-ai-chat-hidden) { position: fixed; left: 8px; right: auto; z-index: 20; display: flex; flex-flow: column; box-sizing: border-box; margin: 0; overflow: visible; background: url(/Game/img/chat-msg-bg-alpha.png) center/100% 100% no-repeat; background-color: transparent; border: none; box-shadow: none; border-radius: 12px; padding: 2.6rem; width: 454px; height: 526px; max-width: calc(100vw - 2.5rem); bottom: clamp(0.5rem, 2vw, 1rem); pointer-events: none; } /* พื้นแผงโปร่งไม่ดักคลิก — เปิด/ปิดเฉพาะจากปุ่ม footer + ปิดในแผง */ #lobby-ai-chat-panel:not(.lobby-ai-chat-hidden) .lobby-ai-chat-header, #lobby-ai-chat-panel:not(.lobby-ai-chat-hidden) .lobby-ai-chat-messages, #lobby-ai-chat-panel:not(.lobby-ai-chat-hidden) .lobby-ai-chat-form, #lobby-ai-chat-panel:not(.lobby-ai-chat-hidden) .lobby-ai-chat-admin-link { pointer-events: auto; } #lobby-ai-chat-panel .lobby-ai-chat-header { display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; margin: 0px -2rem 0 -2rem; padding: 0px 1rem; min-height: 50px; height: 50px; overflow: visible; background: url(/Game/img/AI-chat-line.png) bottom repeat-x; background-size: 100% 3px; background-color: transparent; } #lobby-ai-chat-panel .lobby-ai-chat-title { display: flex; align-items: flex-end; gap: 0.5rem; line-height: 0; } #lobby-ai-chat-panel .lobby-ai-chat-title > img:first-child { width: 100px; height: 116px; object-fit: cover; margin-top: -39px; margin-left: 16px; flex-shrink: 0; position: relative; z-index: 1; } #lobby-ai-chat-panel .lobby-ai-chat-title-label { height: 75px; width: auto; object-fit: contain; display: block; flex-shrink: 0; margin-bottom: -2px; } #lobby-ai-chat-panel .lobby-ai-chat-close { display: flex; align-items: center; justify-content: center; width: 60px; height: 60px; padding: 0; border: none; border-radius: 8px; background: transparent; cursor: pointer; margin-left: auto; } #lobby-ai-chat-panel .lobby-ai-chat-close img { width: 60px; height: 60px; object-fit: contain; } #lobby-ai-chat-panel .lobby-ai-chat-close:hover { opacity: 0.9; } #lobby-ai-chat-panel .lobby-ai-chat-messages { flex: 1; min-height: 0; height: auto; overflow-y: auto; padding: 0.2rem 0.35rem 0.25rem 0; font-size: 1.05rem; display: flex; flex-direction: column; gap: 0.5rem; background: none; border: none; scrollbar-width: thin; scrollbar-color: rgba(244, 252, 255, 0.98) rgba(53, 110, 167, 0.28); } #lobby-ai-chat-panel .lobby-ai-chat-messages::-webkit-scrollbar { width: 1rem; scrollbar-width: auto; } #lobby-ai-chat-panel .lobby-ai-chat-messages::-webkit-scrollbar-track { border-radius: 999px; background: linear-gradient(180deg, rgba(38, 77, 125, 0.45) 0%, rgba(32, 66, 106, 0.38) 100%); box-shadow: inset 0 0 0 1px rgba(107, 193, 255, 0.25); } #lobby-ai-chat-panel .lobby-ai-chat-messages::-webkit-scrollbar-thumb { border-radius: 999px; background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(221, 244, 255, 0.96) 100%); box-shadow: 0 0 10px rgba(169, 239, 255, 0.55), inset 0 0 0 1px rgba(180, 235, 255, 0.9); } #lobby-ai-chat-panel .lobby-ai-chat-form { display: flex; gap: 0rem; align-items: center; padding: 0.6rem 0; flex-shrink: 0; background: none; border: none; width: calc(100% + 3rem); /* ขยายกว้างกว่าเดิม */ margin-left: 0rem; /* ดันออกซ้าย */ margin-right: 0rem; /* ดันออกขวา */ } #lobby-ai-chat-panel #lobby-ai-chat-input { flex: 0.85; min-width: 0; min-height: 50px; padding: 0.6rem 0.85rem; border-radius: 8px; border: 1px solid rgba(0, 212, 255, 0.32); background: rgba(30, 35, 50, 0.55); color: #c0caf5; font-size: 1.05rem; margin: 0; } #lobby-ai-chat-panel .lobby-ai-chat-send { display: flex; align-items: center; justify-content: center; width: 73px; height: 73px; flex-shrink: 0; padding: 0; border: none; border-radius: 10px; background: transparent; cursor: pointer; outline: none; position: relative; margin-left: 0rem; /* ดันออกซ้าย */ margin-right: -0.7rem; } #lobby-ai-chat-panel .lobby-ai-chat-send:focus, #lobby-ai-chat-panel .lobby-ai-chat-send:focus-visible { outline: none !important; box-shadow: none !important; border-color: transparent !important; } #lobby-ai-chat-panel .lobby-ai-chat-send img { width: 102px; height: 98px; object-fit: contain; pointer-events: none; } #lobby-ai-chat-panel .lobby-ai-chat-send img:focus, #lobby-ai-chat-panel .lobby-ai-chat-send img:focus-visible { outline: none !important; box-shadow: none !important; } #lobby-ai-chat-panel .lobby-ai-chat-send:hover { opacity: 0.9; } #lobby-ai-chat-panel .lobby-ai-chat-msg { padding: 0.58rem 0.92rem; border-radius: 12px; max-width: 90%; font-size: 1.05rem; line-height: 1.33; background-size: 100% 100%; background-repeat: no-repeat; background-position: center; border: none; box-shadow: none; } #lobby-ai-chat-panel .lobby-ai-chat-msg-user { align-self: flex-end; text-align: right; background-image: url(/Game/img/chat-bubble-me.png); background-color: rgba(122, 162, 247, 0.2); color: #f787e4; } #lobby-ai-chat-panel .lobby-ai-chat-msg-ai { align-self: flex-start; text-align: left; background-image: url(/Game/img/chat-bubble-friend.png); background-color: rgba(158, 206, 106, 0.2); color: #f2f8ff; } #lobby-ai-chat-panel .lobby-ai-chat-typing { display: flex; align-items: center; gap: 4px; padding: 14px 18px; min-height: 28px; flex-shrink: 0; background-image: url(/Game/img/chat-bubble-friend.png); background-color: rgba(158, 206, 106, 0.32); background-size: 100% 100%; background-repeat: no-repeat; background-position: center; } #lobby-ai-chat-panel .lobby-ai-typing-dot { width: 8px; height: 8px; border-radius: 50%; background: #f2f8ff; animation: lobby-ai-typing-bounce 1.4s ease-in-out infinite both; } #lobby-ai-chat-panel .lobby-ai-typing-dot:nth-child(1) { animation-delay: 0s; } #lobby-ai-chat-panel .lobby-ai-typing-dot:nth-child(2) { animation-delay: 0.2s; } #lobby-ai-chat-panel .lobby-ai-typing-dot:nth-child(3) { animation-delay: 0.4s; } @keyframes lobby-ai-typing-bounce { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-6px); } } #lobby-ai-chat-panel .lobby-ai-chat-admin-link { margin: 0.35rem 0 0 0; font-size: 0.75rem; flex-shrink: 0; } #lobby-ai-chat-panel .lobby-ai-chat-admin-link a { color: #9ece6a; } /* ---- Guide ทีละขั้น — asset /Main-Lobby/IMAGE/guide (guide-01…05, btn-next) ---- */ .lobby-guide-dim { position: fixed; inset: 0; z-index: 21; background: rgba(2, 8, 22, 0.74); pointer-events: auto; -webkit-tap-highlight-color: transparent; } .lobby-guide-dim.hidden { display: none !important; } /* Overlay cutout — เจาะรูตรงปุ่มเป้าหมาย มืดทั้งจอยกเว้นจุดไฮไลต์ */ .lobby-guide-focus { position: fixed; z-index: 21; left: 0; top: 0; width: 0; height: 0; border: 2px solid rgba(34, 211, 238, 0.85); border-radius: 14px; box-shadow: 0 0 0 9999px rgba(2, 8, 22, 0.78), 0 0 24px 4px rgba(34, 211, 238, 0.45), inset 0 0 10px rgba(34, 211, 238, 0.12); pointer-events: none; opacity: 0; transition: opacity 0.25s ease, left 0.25s ease, top 0.25s ease, width 0.25s ease, height 0.25s ease, border-radius 0.25s ease; box-sizing: border-box; } .lobby-guide-focus:not(.hidden) { opacity: 1; } .lobby-guide-focus.hidden { opacity: 0 !important; pointer-events: none !important; } .lobby-guide-bar { position: fixed; z-index: 22; left: 0; right: 0; bottom: 0; padding-bottom: env(safe-area-inset-bottom); pointer-events: none; } .lobby-guide-bar--top { top: 0; bottom: auto; padding-top: max(8px, env(safe-area-inset-top)); padding-bottom: 0; } .lobby-guide-bar:not(.hidden) { pointer-events: none; } /* รูป guide ไม่ดักคลิก — คลิกตกไปที่เลเยอร์มืดด้านล่าง; กดได้เฉพาะปุ่มถัดไป/รับทราบ */ .lobby-guide-bar:not(.hidden) .lobby-guide-img { pointer-events: none; } .lobby-guide-bar:not(.hidden) .lobby-guide-next { pointer-events: auto; } .lobby-guide-frame { --lobby-guide-next-width: 10%; /* ขนาดปุ่ม next เทียบกับความกว้าง guide-frame */ position: relative; width: 97vw; max-width: none; aspect-ratio: 1863 / 251; margin: 0 auto; } .lobby-guide-img { display: block; width: 100%; height: 100%; max-height: none; object-fit: contain; object-position: bottom center; } .lobby-guide-bar--top .lobby-guide-img { object-position: top center; } .lobby-guide-next { position: absolute; right: 1%; bottom: 16%; width: var(--lobby-guide-next-width); min-width: 0; aspect-ratio: 169 / 84; padding: 0; border: none; background: transparent; cursor: pointer; filter: drop-shadow(0 0 8px rgba(236, 72, 153, 0.5)); } .lobby-guide-bar--top .lobby-guide-next { right: 1%; bottom: 16%; } .lobby-guide-next img { display: block; width: 100%; height: 100%; object-fit: contain; } .lobby-guide-bar.hidden { display: none !important; } /* เว้นพื้นที่ footer เฉพาะตอนแถบคำแนะนำอยู่ล่าง (ขั้น 1–3) */ body.lobby-guide-active:not(.lobby-guide-top-step) .lobby-footer { padding-bottom: min(42vh, 280px); } @media (max-width: 767px) { body.lobby-guide-active:not(.lobby-guide-top-step) .lobby-footer { padding-bottom: min(48vh, 320px); } } /* ---- Howto overlay ---- */ .lobby-overlay { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(4, 6, 18, 0.88); backdrop-filter: blur(8px); } .lobby-overlay.hidden { display: none !important; } .lobby-howto-inner { max-width: min(96vw, 560px); text-align: center; } .lobby-howto-inner > img:first-of-type { max-width: 100%; height: auto; } .lobby-howto-close { margin-top: 12px; } .lobby-icon-btn { padding: 0; border: none; background: transparent; cursor: pointer; } .lobby-howto-close img { max-width: min(88vw, 420px); height: auto; } /* ---- Toast ---- */ .lobby-toast { position: fixed; z-index: 200; left: 50%; bottom: 120px; transform: translateX(-50%); max-width: min(90vw, 360px); padding: 10px 14px; font-size: 0.85rem; text-align: center; color: #ecfeff; background: rgba(15, 23, 42, 0.92); border: 1px solid rgba(34, 211, 238, 0.4); border-radius: 8px; box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45); opacity: 0; pointer-events: none; transition: opacity 0.25s ease; } .lobby-toast.lobby-toast--show { opacity: 1; } /* ---- Character lock to platform ---- */ .lobby-character-center { position: fixed !important; left: var(--lobby-character-anchor-x) !important; bottom: calc(var(--lobby-character-stand-y) + var(--lobby-character-foot-offset)) !important; transform: translateX(var(--lobby-character-anchor-shift-x)) !important; transform-origin: center bottom !important; /* pivot ที่เท้า */ width: auto !important; height: var(--lobby-character-height) !important; min-height: 0 !important; z-index: 4; display: flex; align-items: flex-end; justify-content: center; } .lobby-character-img { height: 100% !important; width: auto !important; max-height: none !important; max-width: none !important; object-fit: contain; object-position: 50% var(--lobby-character-anchor-y); } /* ---- Cloth button image ratio lock ---- */ .lobby-btn-cloth { --lobby-btn-cloth-shift-y: -50px; /* ขยับตำแหน่งปุ่มขึ้น/ลง */ max-width: none !important; width: auto !important; transform: translateY(var(--lobby-btn-cloth-shift-y)); } .lobby-btn-cloth-img { --lobby-btn-cloth-height: 20cqh; /* ปรับความสูงปุ่มห้องแต่งตัว */ display: block; height: var(--lobby-btn-cloth-height) !important; width: calc(var(--lobby-btn-cloth-height) * (161 / 176)) !important; aspect-ratio: 161 / 176; max-width: none !important; object-fit: contain; } /* ---- Footer buttons size control (cqh) ---- */ .lobby-footer { --lobby-footer-side-btn-width: 20cqh; /* AI chat */ --lobby-footer-profile-btn-width: 12cqh; /* profile / tutorial */ --lobby-footer-main-btn-width: 40cqh; /* start / quiz */ --lobby-footer-center-gap: 1.1cqh; --lobby-footer-tutorial-img-width: 9.6cqh; } .lobby-footer-left { width: var(--lobby-footer-side-btn-width) !important; max-width: var(--lobby-footer-side-btn-width) !important; } .lobby-footer-right { width: var(--lobby-footer-profile-btn-width) !important; max-width: var(--lobby-footer-profile-btn-width) !important; } .lobby-btn-ai-chat { width: var(--lobby-footer-side-btn-width) !important; max-width: var(--lobby-footer-side-btn-width) !important; transform: translateX(-1cqw) !important; } .lobby-btn-profile, .lobby-btn-tutorial { width: var(--lobby-footer-profile-btn-width) !important; max-width: var(--lobby-footer-profile-btn-width) !important; } .lobby-btn-tutorial-img { width: var(--lobby-footer-tutorial-img-width) !important; } .lobby-footer-center { gap: var(--lobby-footer-center-gap) !important; } .lobby-btn-start, .lobby-btn-quiz { width: var(--lobby-footer-main-btn-width) !important; max-width: var(--lobby-footer-main-btn-width) !important; } /* ---- Header buttons size control (cqh) ---- */ .lobby-header { --lobby-header-daily-btn-width: 36cqh; --lobby-header-tutorial-size: 12cqh; } .lobby-header .lobby-btn-daily { width: var(--lobby-header-daily-btn-width) !important; max-width: var(--lobby-header-daily-btn-width) !important; } .lobby-header .lobby-daily-img { width: 100% !important; max-width: 100% !important; } .lobby-header .lobby-header-row2-left .lobby-btn-tutorial { width: var(--lobby-header-tutorial-size) !important; max-width: var(--lobby-header-tutorial-size) !important; } .lobby-header .lobby-btn-tutorial-img { width: var(--lobby-header-tutorial-size) !important; max-width: var(--lobby-header-tutorial-size) !important; height: auto; } /* ---- Header columns width lock ---- */ .lobby-header { --lobby-header-left-col: 40%; --lobby-header-right-col: 40%; grid-template-columns: minmax(0, var(--lobby-header-left-col)) minmax(0, var(--lobby-header-right-col)) !important; justify-content: space-between; } .lobby-profile-panel, .lobby-news-wrap, .lobby-btn-daily { width: 100% !important; max-width: 100% !important; } /* ---- Header profile/news ratio lock + cqh sizing ---- */ .lobby-header { --lobby-profile-panel-height: 18cqh; /* ปรับความสูง profile panel */ --lobby-news-wrap-height: 20cqh; /* ปรับความสูง news panel */ --lobby-news-wrap-shift-y: 1.2cqh; /* ขยับ news panel ลง */ --lobby-news-label-height: 3.18cqh; /* ปรับความสูง news.png */ --lobby-news-label-shift-y: -1.8cqh; /* ขยับ news.png ลง */ } .lobby-profile-panel { height: var(--lobby-profile-panel-height) !important; width: calc(var(--lobby-profile-panel-height) * (491 / 198)) !important; max-width: 100% !important; aspect-ratio: 491 / 198; transform: translateX(-0.5cqw); } .lobby-profile-bg { width: 100% !important; height: 100% !important; max-width: none !important; aspect-ratio: 491 / 198; object-fit: contain; } .lobby-news-wrap { height: var(--lobby-news-wrap-height) !important; width: calc(var(--lobby-news-wrap-height) * (517 / 213)) !important; max-width: 100% !important; aspect-ratio: 517 / 213; transform: translateY(var(--lobby-news-wrap-shift-y)); margin-right: -1%; } .lobby-news-bg { width: 100% !important; height: 100% !important; aspect-ratio: 517 / 213; object-fit: contain; } .lobby-news-img { left: 50% !important; right: auto !important; top: calc(8% + var(--lobby-news-label-shift-y)) !important; height: var(--lobby-news-label-height) !important; width: calc(var(--lobby-news-label-height) * (459 / 34)) !important; max-width: 92% !important; aspect-ratio: 459 / 34; transform: translateX(-50%) !important; } /* ---- Profile panel children scale with parent ---- */ .lobby-profile-panel { --lobby-profile-name-font-size: 3.5cqh; --lobby-profile-meta-font-size: 1.45cqh; --lobby-profile-text-gap: 0.2cqh; /* ระยะห่างระหว่างข้อความ 3 บรรทัด */ --lobby-profile-coin-size: 2.2em; /* ขนาดไอคอนเหรียญ */ --lobby-profile-avatar-size: 27%; /* ขนาดกรอบ avatar */ --lobby-profile-avatar-shift-x: 17%; /* ขยับกรอบ avatar ซ้าย/ขวา */ --lobby-profile-avatar-shift-y: -0.8cqh; /* ขยับกรอบ avatar ขึ้น/ลง */ --lobby-profile-avatar-radius: 5%; --lobby-avatar-mask-scale: 1.1; /* ปรับขนาดรูป avatar ภายใน mask */ --lobby-avatar-mask-shift-y: 0%; /* จูนตำแหน่งรูป avatar ขึ้น/ลง */ --lobby-profile-info-shift-x: 5%; /* ขยับข้อมูลโปรไฟล์ไปทางขวา */ } .lobby-profile-inner { gap: 2%; padding: 8% 6% 8% 5%; } .lobby-avatar-wrap { width: var(--lobby-profile-avatar-size) !important; flex: 0 0 var(--lobby-profile-avatar-size) !important; max-width: var(--lobby-profile-avatar-size) !important; min-width: 0; height: auto !important; aspect-ratio: 1 / 1; overflow: hidden !important; position: relative; isolation: isolate; clip-path: inset(0 round var(--lobby-profile-avatar-radius)); padding-left: 0; border-radius: var(--lobby-profile-avatar-radius); transform: translate(var(--lobby-profile-avatar-shift-x), var(--lobby-profile-avatar-shift-y)); } .lobby-avatar-mask { position: absolute; inset: 0; width: 100%; height: 100%; display: block; transform: translateY(var(--lobby-avatar-mask-shift-y)) scale(var(--lobby-avatar-mask-scale)) !important; transform-origin: center top; object-fit: cover; object-position: center top; } .lobby-profile-info { padding-left: 1.2%; transform: translateX(var(--lobby-profile-info-shift-x)); } .lobby-profile-name { margin: 0 0 var(--lobby-profile-text-gap) !important; font-size: var(--lobby-profile-name-font-size); } .lobby-profile-meta, .lobby-profile-coins { margin: 0 0 var(--lobby-profile-text-gap) !important; font-size: var(--lobby-profile-meta-font-size); } .lobby-profile-coins { margin-bottom: 0 !important; } .lobby-coin-icon { width: var(--lobby-profile-coin-size) !important; height: var(--lobby-profile-coin-size) !important; } /* ================================================== */ /* Animations — entrance (ตอนขึ้น) / press (ตอนกด) */ /* accents (ตอนเปลี่ยน/แจ้งเตือน) */ /* ================================================== */ @keyframes lb-rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: translateY(0); } } @keyframes lb-fade { from { opacity: 0; } to { opacity: 1; } } @keyframes lb-from-left { from { opacity: 0; transform: translateX(-26px); } to { opacity: 1; transform: translateX(0); } } @keyframes lb-from-right { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: translateX(0); } } @keyframes lb-char-in { from { opacity: 0; transform: translateY(18px) scale(.96); } to { opacity: 1; transform: translateY(0) scale(1); } } @keyframes lb-dot-pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.35); opacity: .55; } } /* press feedback — เปิดเสมอ (ทุกปุ่ม) */ .lobby-btn-tutorial, .lobby-btn-daily, .lobby-btn-cloth, .lobby-btn-ai-chat, .lobby-btn-start, .lobby-btn-quiz, .lobby-btn-profile, .lobby-guide-next, .lobby-icon-btn { transition: transform .13s ease, filter .2s; -webkit-tap-highlight-color: transparent; } .lobby-btn-tutorial:hover, .lobby-btn-daily:hover, .lobby-btn-cloth:hover, .lobby-btn-ai-chat:hover, .lobby-btn-start:hover, .lobby-btn-quiz:hover, .lobby-btn-profile:hover, .lobby-guide-next:hover, .lobby-icon-btn:hover { filter: brightness(1.13); } .lobby-btn-tutorial:active, .lobby-btn-daily:active, .lobby-btn-cloth:active, .lobby-btn-ai-chat:active, .lobby-btn-profile:active, .lobby-guide-next:active, .lobby-icon-btn:active { transform: scale(.91); } .lobby-btn-start:active, .lobby-btn-quiz:active { transform: scale(.95); } .lobby-leaderboard-list li { transition: filter .18s ease, transform .18s ease; } .lobby-leaderboard-list li:hover { filter: brightness(1.12); transform: translateX(2px); } @media (prefers-reduced-motion: no-preference) { /* entrance: โผล่ไล่ทีละส่วน */ .lobby-profile-panel { animation: lb-from-left .55s cubic-bezier(.2,.85,.25,1) .05s both; } .lobby-news-wrap { animation: lb-rise .55s cubic-bezier(.2,.85,.25,1) .12s both; } .lobby-header-row2-left { animation: lb-fade .5s ease .18s both; } .lobby-btn-daily { animation: lb-fade .5s ease .2s backwards; } .lobby-center-left { animation: lb-fade .5s ease .24s both; } .lobby-character-center { animation: lb-char-in .7s cubic-bezier(.2,.85,.25,1) .22s both; } .lobby-leaderboard { animation: lb-from-right .6s cubic-bezier(.2,.85,.25,1) .3s both; } .lobby-footer { animation: lb-rise .6s cubic-bezier(.2,.85,.25,1) .4s both; } /* accent: จุดแจ้งเตือน daily เต้น */ .lobby-daily-dot { animation: lb-dot-pulse 1.6s ease-in-out infinite; } }