/* Lobby — reference 06 (laid out on the 941x1672 stage; landscape variant under #stage.land) + overlays */
.lobby { background: var(--surface) url(../assets/ui/paper_bg.webp) center/100% 100%; }
.lobby::after { content: ''; position: absolute; inset: 6px; pointer-events: none; box-shadow: inset 0 0 0 3px var(--bronze-dark), inset 0 0 0 6px var(--border); }

.lobby .prof { position: absolute; left: 0; top: 0; width: 100%; height: 124px; display: flex; align-items: center; gap: 18px; padding: 0 18px 0 46px; box-sizing: border-box; background: var(--frame-dark); box-shadow: inset 0 -4px 0 var(--accent), inset 0 -7px 0 var(--bronze-dark); color: var(--light-text); z-index: 3; }
.lobby .ava-f { width: 112px; height: 112px; flex: none; background: var(--accent); clip-path: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%); display: grid; place-items: center; margin-top: 14px; }
.lobby .ava-f img { width: 100px; height: 100px; object-fit: cover; object-position: 30% 20%; clip-path: inherit; background: var(--primary); }
.lobby .who { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 1; }
.lobby .pname { font: 900 36px/1.1 var(--f-slab); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 240px; }
.lobby .lv { align-self: flex-start; font: 900 24px/1 var(--f-slab); color: var(--text); background: var(--accent); padding: 4px 16px; clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%); }
.lobby .vsep { width: 2px; height: 64px; background: var(--bronze-dark); box-shadow: 1px 0 0 #6d5032; }
.lobby .cur { display: flex; align-items: center; gap: 10px; font: 900 36px/1 var(--f-slab); }
.lobby .cur img { width: 52px; height: 52px; }
.lobby .gear { width: 74px; height: 74px; --c: 12px; color: var(--accent); flex: none; }
.lobby .gear svg { width: 42px; }
.lobby .langbtn { position: absolute; top: 134px; inset-inline-end: 22px; z-index: 3; display: flex; align-items: center; gap: 6px; padding: 8px 14px; font: 800 22px/1 var(--f-sans); color: var(--light-text); background: var(--frame-dark); box-shadow: inset 0 0 0 2px var(--accent); clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px); }

.lobby .titlebox { position: absolute; left: 0; top: 128px; width: 941px; height: 270px; }
.lobby .castle { position: absolute; top: 34px; width: 210px; opacity: .85; mix-blend-mode: multiply; }
.lobby .castle-l { left: 14px; } .lobby .castle-r { right: 14px; }
.lobby .title { position: absolute; left: 120px; right: 120px; top: 46px; margin: 0; display: flex; flex-direction: column; align-items: center; font: 400 92px/0.94 var(--f-display); letter-spacing: -.025em; text-transform: uppercase; text-align: center; }
.lobby .title span { display: block; white-space: nowrap; text-shadow: 2px 3px 0 rgba(56, 40, 36, .18); }
.lobby .t1 { color: var(--text); } .lobby .t2 { color: var(--secondary); font-size: 96px; }
.lobby .tagline { position: absolute; left: 50%; transform: translateX(-50%); top: 238px; height: 42px; font: 900 24px/1 var(--f-slab); letter-spacing: .06em; white-space: nowrap; z-index: 2; }
.lobby .hero { position: absolute; left: 0; top: 380px; width: 941px; height: 306px; }
.lobby .hero img { width: 100%; height: 100%; object-fit: cover; mix-blend-mode: multiply; -webkit-mask: linear-gradient(180deg, transparent 0, #000 12%, #000 86%, transparent); mask: linear-gradient(180deg, transparent 0, #000 12%, #000 86%, transparent); }

.lobby .demo { position: absolute; left: 190px; top: 676px; width: 560px; height: 400px; perspective: 900px; }
.lobby .demo-board { position: absolute; inset: 0 0 20px; transform: rotateX(24deg); transform-origin: 50% 100%; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 14px; background: #8d7a62; box-shadow: inset 0 0 0 6px #6d6151, inset 0 0 0 9px var(--frame-dark), 0 10px 14px rgba(37, 34, 31, .35); }
.lobby .dc { background: var(--stone-sand); box-shadow: inset 0 0 0 2px rgba(91, 57, 40, .35); }
.lobby .demo-tiles { position: absolute; inset: 14px; }
.lobby .dt { position: absolute; width: 25%; height: 25%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; transition: left .25s, top .25s; }
.lobby .dt img { height: 92%; position: absolute; bottom: 8%; filter: drop-shadow(0 3px 2px rgba(0, 0, 0, .3)); }
.lobby .dt span { position: relative; font: 900 30px/1 var(--f-sans); background: #f3dfb8; color: var(--text); padding: 2px 10px; margin-bottom: 4px; box-shadow: inset 0 0 0 2px var(--bronze-dark); clip-path: polygon(6px 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 0 100%, 0 6px); }
.lobby .side { position: absolute; top: 760px; width: 162px; height: 240px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; border: 3px dashed var(--text-muted); color: var(--text); text-align: center; }
.lobby .side img { width: 130px; mix-blend-mode: multiply; }
.lobby .side b { font: 900 26px/1.05 var(--f-slab); text-transform: uppercase; padding: 0 6px; }
.lobby .side-l { left: 24px; } .lobby .side-r { right: 24px; }

.lobby .duel { position: absolute; left: 0; width: 100%; top: 1078px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.lobby .nd { height: 60px; min-width: 420px; font: 900 28px/1 var(--f-slab); letter-spacing: .06em; }
.lobby .info { display: flex; gap: 22px; font: 900 24px/1 var(--f-slab); color: var(--text); text-transform: uppercase; }
.lobby .info span { padding: 6px 16px; box-shadow: inset 0 0 0 2px var(--bronze-dark); }
.lobby .info .on { color: var(--primary); text-transform: none; }
.lobby .play { position: absolute; left: 41px; top: 1182px; width: 858px; height: 180px; --c: 26px; gap: 26px; }
.lobby .play::before { inset: 9px; } .lobby .play::after { inset: 12px; }
.lobby .play .sw { width: 112px; height: 112px; color: var(--light-text); }
.lobby .play .lau { position: absolute; top: 46px; color: var(--accent); opacity: .85; }
.lobby .play .lau-l { left: 70px; transform: scaleX(-1); } .lobby .play .lau-r { right: 70px; }
.lobby .play .pl { display: flex; flex-direction: column; align-items: center; }
.lobby .p1 { font: 400 88px/1 var(--f-stamp); letter-spacing: .02em; white-space: nowrap; }
.lobby .p2 { font: 800 32px/1.1 var(--f-sans); text-transform: none; }
.lobby .play:hover { filter: drop-shadow(0 4px 4px rgba(56, 40, 36, .35)) brightness(1.06); }
.lobby .rooms { position: absolute; left: 71px; top: 1386px; width: 800px; height: 104px; display: flex; align-items: center; gap: 18px; padding: 0 24px; box-sizing: border-box; clip-path: polygon(22px 0, calc(100% - 22px) 0, 100% 50%, calc(100% - 22px) 100%, 22px 100%, 0 50%); }
.lobby .door { width: 104px; height: 88px; object-fit: contain; mix-blend-mode: multiply; }
.lobby .rt { font: 400 54px/1 var(--f-display); flex: 1; text-transform: uppercase; white-space: nowrap; }
.lobby .rsep { width: 3px; height: 60px; background: var(--bronze-dark); }
.lobby .rb { font: 800 32px/1 var(--f-sans); padding: 14px 18px; color: var(--text); }
.lobby .rb:active { transform: translateY(2px); }
.lobby .nav { position: absolute; left: 0; bottom: 0; width: 100%; height: 158px; display: grid; grid-template-columns: repeat(5, 1fr); background: var(--frame-dark); box-shadow: inset 0 4px 0 var(--accent), inset 0 7px 0 var(--bronze-dark); padding: 16px 14px 12px; box-sizing: border-box; gap: 6px; }
.lobby .nav button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--surface); font: 900 28px/1 var(--f-slab); white-space: nowrap; overflow: hidden; border-inline-start: 3px solid #4a3a28; }
.lobby .nav button:first-child { border: 0; }
.lobby .nav svg { height: 58px; width: 70px; color: var(--accent); }
.lobby .nav button.on svg { color: #f6d48f; }
.lobby .nav button.on { background: var(--secondary); color: var(--light-text); box-shadow: inset 0 0 0 4px var(--accent), inset 0 0 0 6px var(--bronze-dark); clip-path: polygon(12px 0, calc(100% - 12px) 0, 100% 12px, 100% calc(100% - 12px), calc(100% - 12px) 100%, 12px 100%, 0 calc(100% - 12px), 0 12px); border: 0; }
.lobby .howto { position: absolute; left: 22px; top: 134px; height: 50px; padding: 0 18px; --c: 8px; font: 800 20px var(--f-sans); text-transform: none; gap: 8px; z-index: 3; }
.lobby .howto::before { inset: 3px; } .lobby .howto::after { inset: 4px; }

/* ---- landscape lobby: art + board left, actions right ---- */
#stage.land .lobby .prof { left: 900px; width: 772px; padding-left: 24px; }
#stage.land .lobby .pname { max-width: 150px; font-size: 30px; }
#stage.land .lobby .cur { font-size: 30px; } #stage.land .lobby .cur img { width: 42px; height: 42px; }
#stage.land .lobby .titlebox { left: 0; top: 8px; width: 900px; }
#stage.land .lobby .castle { width: 180px; }
#stage.land .lobby .hero { left: 0; top: 300px; width: 900px; height: 292px; }
#stage.land .lobby .demo { left: 210px; top: 560px; width: 480px; height: 360px; }
#stage.land .lobby .side { top: 620px; width: 150px; height: 220px; }
#stage.land .lobby .side-l { left: 30px; } #stage.land .lobby .side-r { left: 720px; right: auto; }
#stage.land .lobby .langbtn { top: 136px; }
#stage.land .lobby .howto { left: 920px; top: 136px; }
#stage.land .lobby .duel { left: 900px; width: 772px; top: 214px; }
#stage.land .lobby .play { left: 940px; top: 350px; width: 692px; height: 170px; }
#stage.land .lobby .play .lau-r { right: 36px; } #stage.land .lobby .play .lau-l { left: 36px; }
#stage.land .lobby .rooms { left: 950px; top: 548px; width: 672px; }
#stage.land .lobby .rt { font-size: 46px; }
#stage.land .lobby .nav { left: 900px; width: 772px; height: 150px; }

/* ---- overlays ---- */
.modal.searching .sheet .btn, .modal.room .sheet .btn, .modal.pausem .sheet .btn { height: 96px; margin: 16px auto 0; width: 520px; font-size: 38px; }
.search { text-align: center; }
.search .spinner { display: flex; align-items: center; justify-content: center; gap: 30px; margin: 10px 0 18px; }
.search .spinner img { height: 190px; animation: hop .7s ease-in-out infinite alternate; }
.search .spinner .q { animation-delay: .35s; filter: brightness(.25) sepia(1) hue-rotate(-20deg); transform: scaleX(-1); }
.search .vs { font: 400 70px/1 var(--f-stamp); color: var(--secondary); }
.search .sub { font: 900 30px var(--f-slab); color: var(--text-muted); }
@keyframes hop { to { translate: 0 -14px; } }
.versus { background: rgba(21, 39, 69, .86); }
.vsbox { position: relative; display: grid; grid-template-columns: 1fr 120px 1fr; align-items: center; width: 900px; color: var(--light-text); animation: vsin .45s cubic-bezier(.2, 1.4, .4, 1); }
.vs-side { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 26px 10px; }
.vs-me { background: var(--primary); box-shadow: inset 0 0 0 5px var(--accent); }
.vs-op { background: var(--secondary); box-shadow: inset 0 0 0 5px var(--accent); }
.vs-side img { width: 220px; height: 170px; object-fit: cover; object-position: 30% 20%; }
.vs-side b { font: 900 40px/1.1 var(--f-slab); max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vs-side span { font: 800 26px var(--f-sans); }
.vs-mid { text-align: center; font: 400 96px/1 var(--f-stamp); color: var(--accent); -webkit-text-stroke: 4px var(--frame-dark); paint-order: stroke; }
.found { grid-column: 1 / -1; text-align: center; font: 900 44px var(--f-slab); text-transform: uppercase; color: var(--accent); }
@keyframes vsin { from { transform: scale(.6); opacity: 0; } }
.room .lbl { text-align: center; font: 800 28px var(--f-sans); margin: 0; color: var(--text-muted); }
.room .code { text-align: center; font: 400 130px/1.1 var(--f-stamp); letter-spacing: .12em; color: var(--primary); }
.room .wait { text-align: center; font: 800 28px var(--f-sans); }
.room h3 { font: 900 30px var(--f-slab); text-transform: uppercase; margin: 26px 0 10px; }
.joinrow { display: flex; gap: 16px; align-items: center; }
.codein { flex: 1; height: 92px; box-sizing: border-box; padding: 0 16px; font: 800 44px var(--f-sans); letter-spacing: .2em; text-transform: uppercase; color: var(--text); background: var(--surface); border: 2px solid var(--bronze-dark); clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 8px, 100% calc(100% - 8px), calc(100% - 8px) 100%, 8px 100%, 0 calc(100% - 8px), 0 8px); outline: none; user-select: text; }
.codein::placeholder { letter-spacing: 0; font-size: 28px; color: var(--text-muted); }
.codein:focus { border-color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); }
.joinrow .btn { width: 200px !important; margin: 0 !important; height: 92px !important; }
.room .err { color: var(--danger); font: 800 26px var(--f-sans); min-height: 30px; margin: 8px 0; }
.rlist { list-style: none; margin: 0; padding: 0; }
.rlist li { display: flex; align-items: center; gap: 14px; padding: 10px 0; border-bottom: 2px solid var(--bronze-dark); font: 800 28px var(--f-sans); }
.rlist li img { width: 64px; height: 50px; object-fit: cover; object-position: 30% 20%; }
.rlist .hn { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rlist .lvl { color: var(--text-muted); font-size: 22px; }
.rlist b { font: 900 30px var(--f-slab); color: var(--primary); letter-spacing: .1em; }
.rlist .btn { width: 150px !important; height: 70px !important; margin: 0 !important; font-size: 26px !important; }
.rlist .empty { justify-content: center; color: var(--text-muted); }
.pausem .sheet { width: 640px; text-align: center; }
.netbar { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); z-index: 60; padding: 8px 18px; font: 800 22px var(--f-sans); color: var(--light-text); background: var(--secondary); box-shadow: 0 0 0 2px var(--accent); }

/* daily quests card (left side box of the lobby demo row) */
.lobby .side.daily { cursor: pointer; background: rgba(244, 228, 200, .55); font: inherit; }
.lobby .side.daily .scroll { width: 92px; height: 92px; color: var(--primary); }
.lobby .side.daily b { font-size: 24px; }
.lobby .side.daily .dq-n { font: 900 26px/1 var(--f-slab); color: var(--primary-dark); }
.lobby .side.daily.ready { border-color: var(--secondary); border-style: solid; box-shadow: inset 0 0 0 3px var(--accent); }
.lobby .side.daily .dot { position: absolute; top: -10px; inset-inline-end: -10px; width: 26px; height: 26px; background: var(--secondary); transform: rotate(45deg); box-shadow: 0 0 0 3px var(--accent); animation: dqpulse 1.2s ease-in-out infinite alternate; }
@keyframes dqpulse { to { transform: rotate(45deg) scale(1.18); } }
.lobby .side.daily .dq-n { direction: ltr; unicode-bidi: isolate; }
