Files

2180 lines
52 KiB
CSS

/* Main Lobby — CSS ชุดเดิม (ปรับ body → .lobby-page) + guide / toast / overlay / vignette */
* { box-sizing: border-box; }
html {
min-height: 100%;
-webkit-text-size-adjust: 100%;
}
/* Noto local file removed — use Google Kanit in index.html (avoids 404 on /Create%20Room/FONTS/...) */
: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: '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: '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: 1cqh; /* ความอ้วน scrollbar */
--lobby-leaderboard-scrollbar-thumb-inset: 1cqh;
--lobby-leaderboard-scrollbar-offset-x: 1cqh; /* + = ขยับ scrollbar ไปขวา */
--lobby-leaderboard-font-size: 2.1cqh;
--lobby-leaderboard-content-inset-top: 37%;
--lobby-leaderboard-content-inset-right: 4%;
--lobby-leaderboard-content-inset-bottom: 4%;
--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;
-webkit-mask-image: url('IMAGE/leaderboard-bg.png');
-webkit-mask-repeat: no-repeat;
-webkit-mask-size: 100% 100%;
mask-image: url('IMAGE/leaderboard-bg.png');
mask-repeat: no-repeat;
mask-size: 100% 100%;
}
.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-thumb-inset) + 2px);
scrollbar-width: none;
}
.lobby-leaderboard-scroll::after {
content: '';
position: absolute;
top: 0;
right: calc(var(--lobby-leaderboard-scrollbar-offset-x) * -1);
width: var(--lobby-leaderboard-scrollbar-width);
height: 100%;
pointer-events: none;
opacity: 0.95;
border-radius: 999px;
background:
linear-gradient(180deg, rgba(127, 225, 255, 0.25) 0%, rgba(54, 126, 188, 0.2) 100%),
linear-gradient(180deg, rgba(20, 37, 72, 0.85) 0%, rgba(19, 34, 63, 0.78) 100%);
box-shadow:
inset 0 0 0 1px rgba(115, 220, 255, 0.26),
0 0 0 1px rgba(43, 88, 149, 0.35);
}
.lobby-leaderboard-scroll-thumb {
position: absolute;
right: calc((var(--lobby-leaderboard-scrollbar-offset-x) * -1) + 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: none;
background:
linear-gradient(180deg, #ff9adf 0%, #ff4fb5 42%, #e02b92 100%);
box-shadow:
inset 0 0 0 1px rgba(255, 210, 240, 0.52),
0 0 8px rgba(255, 83, 181, 0.45);
}
.lobby-leaderboard-list {
list-style: none;
margin: 0 auto;
margin-top: 0;
padding: 0;
width: 100%;
max-width: 100%;
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/public/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/public/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/public/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/public/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/public/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));
}
.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;
}
/* ---- News panel: ซ่อนกล่องขาว (news-banner-bg.png) ใช้พื้นมืดเข้าธีมแทน ---- */
.lobby-news-bg {
display: none !important;
}
.lobby-news-wrap {
background: linear-gradient(180deg, rgba(12, 18, 40, 0.92), rgba(10, 16, 34, 0.92));
border: 2px solid rgba(34, 211, 238, 0.65);
border-radius: 12px;
box-shadow:
0 0 14px rgba(34, 211, 238, 0.35),
inset 0 0 18px rgba(34, 211, 238, 0.12);
}
/* ===== ห้องแต่งตัว (Customize popup) — Phase 1 ===== */
.lobby-customize-overlay {
position: fixed;
inset: 0;
z-index: 150;
display: flex;
align-items: center;
justify-content: center;
padding: 16px;
}
.lobby-customize-overlay.hidden { display: none !important; }
.lobby-customize-backdrop {
position: absolute;
inset: 0;
background: rgba(4, 6, 18, 0.78);
backdrop-filter: blur(4px);
}
.lobby-customize-dialog {
position: relative;
width: min(92vw, 720px);
max-height: 90vh;
overflow: hidden auto;
display: flex;
flex-direction: column;
gap: clamp(0.5rem, 1.6vh, 1rem);
padding: clamp(1rem, 3vw, 1.6rem) clamp(1rem, 3vw, 1.8rem) clamp(1.2rem, 3vw, 1.8rem);
border-radius: 18px;
background: linear-gradient(180deg, rgba(14, 20, 44, 0.97), rgba(9, 13, 30, 0.97));
border: 2px solid rgba(34, 211, 238, 0.7);
box-shadow:
0 0 22px rgba(34, 211, 238, 0.45),
0 0 48px rgba(236, 72, 153, 0.28),
inset 0 0 24px rgba(34, 211, 238, 0.1);
}
.lobby-customize-titlebar {
display: flex;
align-items: center;
justify-content: center;
position: relative;
}
.lobby-customize-title {
margin: 0;
font-size: clamp(1.1rem, 3vw, 1.6rem);
font-weight: 700;
color: #e8faff;
text-shadow: 0 0 12px rgba(34, 211, 238, 0.6);
}
.lobby-customize-close {
position: absolute;
right: 0;
top: 0;
width: 38px;
height: 38px;
border: 2px solid rgba(236, 72, 153, 0.6);
border-radius: 10px;
background: rgba(20, 16, 40, 0.6);
color: #ff8fd0;
font-size: 1.4rem;
line-height: 1;
cursor: pointer;
}
.lobby-customize-close:hover { background: rgba(236, 72, 153, 0.25); }
.lobby-customize-row {
display: flex;
align-items: center;
gap: clamp(0.5rem, 2vw, 1rem);
flex-wrap: wrap;
}
.lobby-customize-row-label {
height: clamp(20px, 3.4vh, 30px);
width: auto;
flex: 0 0 auto;
}
.lobby-customize-swatches {
display: flex;
flex-wrap: wrap;
gap: clamp(6px, 1vw, 10px);
}
.lobby-customize-swatch {
padding: 0;
border: 2px solid transparent;
border-radius: 8px;
background: none;
cursor: pointer;
line-height: 0;
}
.lobby-customize-swatch img {
display: block;
width: clamp(28px, 4vw, 40px);
height: auto;
border-radius: 6px;
}
.lobby-customize-swatch.is-selected {
border-color: #22d3ee;
box-shadow: 0 0 10px rgba(34, 211, 238, 0.7);
}
.lobby-customize-tabs {
position: relative;
width: 100%;
max-width: 560px;
margin: 0 auto;
aspect-ratio: 776 / 118;
}
.lobby-customize-tabbar-img {
display: block;
width: 100%;
height: 100%;
object-fit: contain;
pointer-events: none;
}
.lobby-customize-tabhit {
position: absolute;
top: 0;
height: 100%;
width: 33.34%;
padding: 0;
border: none;
background: transparent;
cursor: pointer;
}
.lobby-customize-tabhit[data-tab="face"] { left: 0; }
.lobby-customize-tabhit[data-tab="hair"] { left: 33.33%; }
.lobby-customize-tabhit[data-tab="cloth"] { left: 66.66%; }
.lobby-customize-items {
flex: 1;
min-height: clamp(140px, 30vh, 280px);
max-height: 42vh;
overflow-y: auto;
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: clamp(8px, 1.5vw, 14px);
padding: clamp(8px, 1.5vw, 14px);
border-radius: 12px;
background: rgba(8, 12, 28, 0.6);
border: 1px solid rgba(34, 211, 238, 0.25);
}
.lobby-customize-item {
position: relative;
padding: 6px;
border: 2px solid rgba(34, 211, 238, 0.3);
border-radius: 12px;
background: rgba(18, 26, 52, 0.7);
cursor: pointer;
aspect-ratio: 1;
display: flex;
align-items: center;
justify-content: center;
}
.lobby-customize-item.is-selected {
border-color: #22d3ee;
box-shadow: 0 0 10px rgba(34, 211, 238, 0.6);
}
.lobby-customize-item-img {
width: 78%;
height: auto;
object-fit: contain;
}
.lobby-customize-item-price {
position: absolute;
bottom: 4px;
left: 50%;
transform: translateX(-50%);
font-size: 0.7rem;
font-weight: 700;
color: #ffe066;
background: rgba(0, 0, 0, 0.45);
border-radius: 8px;
padding: 1px 8px;
}
.lobby-customize-empty {
grid-column: 1 / -1;
align-self: center;
text-align: center;
color: rgba(255, 255, 255, 0.6);
padding: 2rem 1rem;
font-size: 0.95rem;
}
.lobby-customize-confirm {
align-self: center;
padding: 0;
border: none;
background: none;
cursor: pointer;
}
.lobby-customize-confirm img {
display: block;
width: min(60vw, 240px);
height: auto;
}
@media (max-width: 560px) {
.lobby-customize-items { grid-template-columns: repeat(3, 1fr); }
}