/* Elemental sanctuary: scenery, rotating seal, fixed controls remain separate.
 * Labels and CSS borders render at display resolution; raster texture resolution is documented. */
#lobby.screen.active { display:block; padding:0; isolation:isolate; background:#080e0e url('../assets/img/lobby/sanctuary-4k.webp') center/cover no-repeat; }
@media (max-width:1000px) { #lobby.screen.active { background-image:url('../assets/img/lobby/sanctuary-mobile.webp'); } }
#lobby::before { content:''; position:absolute; inset:0; z-index:-1; background:linear-gradient(90deg,#05050344,transparent 50%),linear-gradient(0deg,#02060422,transparent 40%); pointer-events:none; }
#lobby .sanctuary-heading { position:absolute; top:2.8%; left:4.8%; display:flex; align-items:center; gap:2cqw; height:6cqh; color:#f5dfa6; }
#lobby .sanctuary-heading h1 { font-size:4.2cqh; letter-spacing:.03em; margin:0; padding-left:2cqw; border-left:1px solid #80633a; text-shadow:0 2px 6px #000; }
#lobby .sanctuary-brand { font:2.5cqh Georgia,serif; letter-spacing:.2em; white-space:nowrap; }
#lobby .sanctuary-brand span { font-size:5.5cqh; vertical-align:middle; margin:0 .35cqw; color:#bc9960; }
#lobby .lobby { position:absolute; inset:12% 3.5% 7.2%; display:grid; grid-template-columns:31% 1fr; gap:6%; }
#lobby .lobby-panel { border-radius:0; min-width:0; padding:0; }
#lobby .lobby-left { position:relative; padding:2.5cqh 1.9cqw 1.4cqh; border:1px solid #aa8446; outline:1px solid #594222; outline-offset:-5px; background:linear-gradient(100deg,#191309f5,#080b09ef); box-shadow:0 1cqh 3cqh #0009,inset 0 0 3cqh #000; }
#lobby .lobby-left::before,#lobby .lobby-left::after { content:'◇'; position:absolute; font-size:3cqh; color:#b08a48; pointer-events:none; top:-1.4cqh; text-shadow:0 0 8px #000; }
#lobby .lobby-left::before { left:-.5cqw; } #lobby .lobby-left::after { right:-.5cqw; }
#lobby .lobby-head { gap:.8cqw; margin:0 0 1.7cqh; flex-wrap:wrap; align-items:center; }
#lobby .lobby-head h2 { font-size:3.2cqh; letter-spacing:.14em; color:#f5dfa6; text-shadow:0 1px 6px #000; }
#lobby .lobby-instruction { flex:1; color:#b89b65; font-size:1.35cqh; line-height:1.6; }
#lobby .lobby-count { color:#8d805e; font-size:1.3cqh; margin-left:auto; }
#lobby .lobby-notice { font-size:1.35cqh; line-height:1.4; padding:.7cqh .6cqw; margin:0 0 1cqh; border:0; border-left:2px solid #8c764b; border-radius:0; background:#30261b80; }
#lobby .lobby-decks { grid-template-columns:repeat(2,minmax(0,1fr)); grid-auto-rows:22.2cqh; gap:1.15cqh .85cqw; padding:.6cqh .25cqw; scrollbar-width:thin; scrollbar-color:#856b3c #10120e; overscroll-behavior:contain; }
#lobby .lobby-deck { position:relative; border:1px solid #927142; border-radius:.35cqh; outline:1px solid #4d3922; outline-offset:-5px; background:radial-gradient(ellipse at 50% 15%,#332415aa,transparent 70%),linear-gradient(125deg,#14140f,#090d0c); padding:1.65cqh .6cqw 1cqh; box-shadow:inset 0 0 1cqh #000,0 2px 4px #0009; }
#lobby .lobby-deck::before { content:''; position:absolute; inset:.5cqh; pointer-events:none; border:1px solid #75583055; clip-path:polygon(0 0,12% 0,12% 1%,1% 1%,1% 12%,0 12%,0 0,100% 0,100% 12%,99% 12%,99% 1%,88% 1%,88% 0,100% 0,100% 100%,88% 100%,88% 99%,99% 99%,99% 88%,100% 88%,100% 100%,0 100%,0 88%,1% 88%,1% 99%,12% 99%,12% 100%,0 100%); }
#lobby .lobby-deck:hover { transform:none; border-color:#d7b76f; background-color:#22231a; }
#lobby .lobby-deck.sel { border-color:#ffe9a3; outline-color:#dfb964; box-shadow:0 0 .5cqh #fce7a3,0 0 1.5cqh #edb74788,inset 0 0 1.8cqh #99702b44; }
#lobby .lobby-deck-icon { width:15.3cqh; height:15.3cqh; max-width:100%; flex:0 1 auto; aspect-ratio:1; border-radius:50%; border:2px solid #be9656; outline:1px solid #5e482b; outline-offset:3px; background:radial-gradient(circle,#152027,#070d10 72%); box-shadow:inset 0 0 1.1cqh #000,0 .4cqh .8cqh #000; }
#lobby .lobby-deck-icon img { width:94%;height:94%; }
#lobby .lobby-deck-name { margin-top:1.2cqh; font-size:2.05cqh; color:#f0dd9f; letter-spacing:0; }
#lobby .lobby-deck.add { opacity:.8; }
#lobby .lobby-left-actions { gap:.6cqw; margin-top:1cqh; }
#lobby .lobby-left-actions .menu-btn { padding:.6cqh .7cqw; font-size:1.35cqh; border:1px solid #6b5634; background:#11130f; border-radius:2px; color:#c5ad7e; }
#lobby .lobby-right { position:relative; display:block; border:0; outline:0; background:none; box-shadow:none; overflow:visible; contain:none; }
#lobby .sanctuary-seal { position:absolute; width:69cqh; height:69cqh; left:50%; top:-11cqh; transform:translateX(-50%); pointer-events:none; }
#lobby .seal-rotor { position:absolute; inset:0; background:url('../assets/img/lobby/seal.png') center/contain no-repeat; border-radius:50%; transform:rotate(0deg); filter:brightness(.79); }
#lobby[data-match-state='searching'] .seal-rotor { will-change:transform; }
#lobby .seal-halo { position:absolute; inset:3%; border-radius:50%; border:1px solid #ddb76e50; box-shadow:inset 0 0 2cqh #51c1b514,0 0 2cqh #6ad6d51a; transition:box-shadow .6s; }
#lobby[data-match-state='searching'] .seal-halo { box-shadow:inset 0 0 3cqh #55d6ce45,0 0 4cqh #49b4b237; animation:sealBreath 3.6s ease-in-out infinite; }
#lobby[data-match-state='matched'] .seal-halo { animation:sealConfirm .48s ease-out; }
#lobby .seal-element { position:absolute; left:calc(50% + var(--ex)); top:calc(50% + var(--ey)); width:8.3cqh; height:8.3cqh; transform:translate(-50%,-50%); display:grid; place-items:center; border:2px solid #917446; outline:1px solid #302c21; outline-offset:3px; border-radius:50%; background:radial-gradient(circle,#162321,#090f10 72%); box-shadow:0 0 1cqh #000,inset 0 0 .5cqh #ceaf6855; }
#lobby .seal-element img { width:83%;height:83%;object-fit:contain; opacity:.72; }
#lobby .lobby-sel { position:absolute; inset:0; display:block; text-align:center; z-index:1; }
#lobby .lobby-sel-icon { position:absolute; left:50%; top:5.7cqh; transform:translateX(-50%); width:22.5cqh;height:22.5cqh; border:3px solid #e7c27c; outline:1px solid #b49154; outline-offset:5px; box-shadow:0 0 .6cqh #f2d990,0 0 2cqh #a27a33aa,inset 0 0 2cqh #000; background:radial-gradient(circle,#1e211a,#070c0e 70%); }
#lobby .lobby-sel-icon img { width:96%;height:96%; }
#lobby .sanctuary-player { position:absolute; top:29.7cqh; left:17%; width:66%; color:#e6cc8d; font:3.35cqh Georgia,serif; letter-spacing:.08em; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
#lobby .sanctuary-rank { position:absolute; top:34.7cqh; left:50%; transform:translateX(-50%); }
#lobby .sanctuary-rank .rank-trigger { font-size:2.4cqh; }
#lobby .sanctuary-rank .tier-em { --s:8.2cqh; }
#lobby .lobby-sel-name { position:absolute; top:44cqh; left:16%; width:68%; margin:0; font-size:3cqh; color:#f3dfa5; overflow:hidden;text-overflow:ellipsis;white-space:nowrap; padding-top:1.4cqh; border-top:1px solid #a181465c; background:linear-gradient(90deg,transparent,#13150fea,transparent); }
#lobby .lobby-sel-meta { position:absolute; top:49.8cqh; left:10%;width:80%;margin:0;color:#cbb480;font-size:1.95cqh; }
#lobby .lobby-sel-empty { position:absolute; top:25cqh; width:100%; font-size:2.4cqh; color:#d2c297; }
#lobby #matchDemo { position:absolute; top:54.4cqh; left:10%; width:80%; margin:0; padding:.8cqh 0; border-top:1px solid #8c704344; border-bottom:0; color:#d1ba87; font-size:1.7cqh; text-align:center; background:none; z-index:2; }
#lobby #matchDemoDots { display:inline-block;width:1.3em;text-align:left; }
#lobby .lobby-right .lobby-match { position:absolute; top:59cqh; left:13%; width:74%; height:13cqh; margin:0; padding:0 1cqw; z-index:3; border:2px solid #e2bd75; border-radius:1cqh; outline:2px solid #785a2c; outline-offset:4px; color:#ffe7ad; background:linear-gradient(170deg,#8f723a 0%,#181c16 9%,#111a18 45%,#080f0f 80%,#47776b 92%,#e4bc6c 96%,#4f3d22 100%); box-shadow:0 0 1cqh #e9c17d88,inset 0 0 0 5px #9b794655,inset 0 0 2.4cqh #2d837050,0 1cqh 1cqh #0009; font-size:5.35cqh; font-weight:800; letter-spacing:.14em; text-indent:.14em; text-shadow:0 0 1.6cqh #ffc96977,0 2px 2px #000; }
#lobby .lobby-right .lobby-match::before { content:'';position:absolute;inset:7px;border:1px solid #b29255; border-radius:.3cqh; pointer-events:none; }
#lobby .lobby-right .lobby-match:hover:not(:disabled) { background:linear-gradient(170deg,#b69b61,#21302a 12%,#101e1b 70%,#74b6a2 94%,#dfbc75); box-shadow:0 0 2cqh #e9c17d77,inset 0 0 2cqh #65c0aa50; }
#lobby .lobby-right .lobby-match:disabled { opacity:.57; filter:saturate(.55); }
#lobby .sanctuary-actions { position:absolute;top:76.5cqh;left:9%;width:82%;display:flex;gap:1.7cqw;z-index:3; }
#lobby .sanctuary-actions .menu-btn { min-width:0;width:33.333%;padding:1.15cqh .6cqw;border:1px solid #907244;outline:1px solid #4c3a24;outline-offset:3px;border-radius:2px;background:linear-gradient(#28251be6,#0a100eed);font-size:1.9cqh;color:#d6bf8d;box-shadow:inset 0 0 0 2px #181c13,0 .5cqh .9cqh #0009; }
#lobby > .lobby-user { position:absolute;top:2%;right:3.3%;width:23%;height:8.4cqh;z-index:6;display:flex;align-items:center;justify-content:space-between;border:1px solid #60492866;background:linear-gradient(90deg,#0d120ce8,#0c100ccc);padding:.4cqh 1cqw; }
#lobby .profile-identity { min-width:0; }
#lobby .profile-name { font:2.15cqh Georgia,serif;letter-spacing:.07em;color:#e5cd95;max-width:12cqw;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
#lobby .profile-status { display:flex;flex-direction:column;align-items:flex-end;gap:.5cqh;color:#b19a64;font-size:1.2cqh;white-space:nowrap; }
#lobby .profile-status .lobby-user-name { font-size:1.2cqh;color:#b9a675; }
#lobby .profile-status .online-dot { color:#54d68c; }
#lobby .rank-trigger { display:flex;align-items:center;gap:.4cqw;border:0;padding:0;background:none;color:#87d8ff;font-family:inherit;font-size:1.9cqh;font-weight:700;cursor:pointer;white-space:nowrap; }
#lobby .rank-trigger .tier-em { --s:5cqh; }
#lobby .rank-trigger .tier-num { font-size:calc(var(--s)*.2);width:auto;height:auto;background:none; }
#lobby .rank-unavailable { color:#b5ab91;font-size:1.65cqh; }
#lobby .rank-popover { display:none;position:fixed;z-index:50;box-sizing:border-box;width:min(430px,calc(100vw - 24px));padding:18px 20px;color:#e8d5a4;background:linear-gradient(140deg,#20190efc,#090f0ffc);border:1px solid #b18c48;box-shadow:0 10px 35px #000b,inset 0 0 0 3px #352819; border-radius:4px; }
#lobby .rank-popover.open { display:block; }
#lobby .rank-popover .lp-prog { margin:0;gap:12px; }
#lobby .rank-popover .tier-em { --s:60px; }
#lobby .rank-popover .tier-num { font-size:16px; }
#lobby .rank-popover .lp-mini small { font-size:13px; }
#lobby .rank-popover .lp-label { font-size:16px;margin-bottom:9px; }
#lobby .rank-popover .lp-bar-wrap { padding-bottom:20px; }
#lobby .rank-popover .lp-bar { height:14px;border-radius:12px; }
#lobby .rank-popover .rank-note { margin:0;font-size:14px;line-height:1.6; }
#lobby .lobby-wait { inset:auto 17% 12% 45%;z-index:5;background:none;pointer-events:none; }
#lobby .lobby-wait-box { width:100%;min-width:0;padding:.65cqh 1cqw;background:#0b1413f5;border:1px solid #ba9a60;border-radius:3px;box-shadow:0 0 2cqh #4bafa933;display:flex;gap:1cqw;align-items:center;justify-content:center; }
#lobby .lobby-wait-box h2 { font-size:1.6cqh;margin:0;color:#e1d4ad; }
#lobby .lobby-wait-deck { display:block;font-size:1.3cqh;color:#a4d4cb;white-space:nowrap; }
#lobby .lobby-wait-time { font-size:1.6cqh;margin:0;color:#9abcb4; }
#lobby .lobby-wait-box .menu-btn { pointer-events:auto;min-width:0;font-size:1.5cqh;padding:.45cqh 1cqw;margin:0;border:1px solid #947748;border-radius:2px; }
#lobby button:focus-visible { outline:2px solid #b1f3ef;outline-offset:4px; }
@keyframes sealBreath { 50% { opacity:.6; } }
@keyframes sealConfirm { 35% { box-shadow:inset 0 0 4cqh #c1fff599,0 0 5cqh #95eddb99; } }
#lobby .lobby { overflow:visible; }
#lobby .lobby-right:has(#matchDemo:not([hidden])) { overflow:visible; }
#lobby .lobby-decks { grid-auto-rows:20.6cqh; }
#lobby .lobby-deck-icon { width:14cqh;height:14cqh; }
#lobby .sanctuary-seal { top:-11cqh; }
#lobby #matchDemo { border:0;box-shadow:none;border-radius:0; }
#lobby .lobby-sel-name { background:none; border:0; text-shadow:0 2px 5px #000,0 0 10px #000; }
#lobby .lobby-right { transform:translateX(-3.5cqw); }
#lobby .lobby-right .lobby-match { left:19%;width:62%;clip-path:polygon(5% 0,95% 0,100% 50%,95% 100%,5% 100%,0 50%);border-radius:0; }
#lobby .sanctuary-actions { left:15%;width:70%; }
#lobby .sanctuary-rank .rank-trigger .tier-em { --s:8.2cqh; }
#lobby .profile-identity { padding-left:4cqw; }
#lobby .profile-identity .rank-trigger .tier-em { position:absolute;left:-2cqw;top:-.7cqh;--s:10cqh; }
#lobby .profile-identity .rank-trigger { font-size:2.1cqh; }
#lobby .lobby-right .lobby-match { border:0;outline:0;box-shadow:none;background:linear-gradient(#1b211cc7,#07110fde),url('../assets/img/lobby/seal.png') center/cover; }
#lobby .lobby-right .lobby-match::before { inset:0;border:0;border-radius:0;background:url('../assets/img/lobby/match-frame.svg') center/100% 100% no-repeat; }
#lobby .lobby-right .lobby-match:hover:not(:disabled) { background:linear-gradient(#2e3b2cc7,#0c211dde),url('../assets/img/lobby/seal.png') center/cover;box-shadow:none; }
/* The approved mockup wordmark takes precedence over the title-screen logo. */
#lobby .sanctuary-heading { gap:1.5cqw;top:1.5%;height:8.7cqh; }
#lobby .sanctuary-heading h1 { padding-left:1.5cqw; }
#lobby .sanctuary-brand { background-image:url('../assets/img/lobby/approved-lobby-source.png')!important;background-position:5.467626% 1.758499%!important;background-size:592.9078% 1069.3182%!important;width:16.86cqw!important;height:9.35cqh!important;mask-image:linear-gradient(90deg,transparent,#000 3%,#000 97%,transparent); }
#lobby > .lobby-user { right:1.6%;top:2%;width:24.7%;height:8cqh;padding:.5cqh .8cqw;border:1px solid #7e633a88;background:linear-gradient(90deg,#121710f2,#0d100ceb); }
#lobby .profile-identity { padding-left:4.3cqw;flex:1; }
#lobby .profile-identity .rank-trigger .tier-em { left:-1.9cqw;top:-1.15cqh;--s:10.5cqh; }
#lobby .profile-settings { background:none;border:0;color:#b59b63;font-size:2.8cqh;padding:.5cqh .8cqw;cursor:pointer; }
#lobby .profile-status { border-left:1px solid #7b63354d;padding-left:.8cqw; }
body:has(#lobby.active) > #settingsGearBtn { visibility:hidden; }
#lobby .seal-canvas { position:absolute;inset:0;width:100%;height:100%;pointer-events:none; }
#lobby .seal-webgl-ready .seal-rotor { background:none;filter:none; }
#lobby .seal-canvas[data-renderer='fallback'] { display:none; }
#lobby .sanctuary-seal::before { content:'';position:absolute;inset:3% -1% -3% 3%;border-radius:50%;background:#0008;filter:blur(1cqh);pointer-events:none; }
#lobby .seal-element { box-shadow:inset 0 2px 2px #f6d59877,inset 0 -3px 3px #000,2px 5px 5px #000b; }
#lobby .seal-element img { opacity:.9; }
#lobby .seal-preview-controls { position:absolute;top:73.7cqh;left:17%;width:66%;display:flex;align-items:center;justify-content:center;gap:.6cqw;z-index:4; }
#lobby #btnSealPreview { border:1px solid #9c8453;border-radius:3px;color:#eee0b4;background:#101b18;padding:.35cqh .7cqw;font-size:1.5cqh;cursor:pointer; }
#lobby #sealPreviewStatus { font-size:1.15cqh;color:#b8c9bd; }
#lobby #btnSealPreview[aria-pressed='true'] { border-color:#75cfbe;box-shadow:0 0 12px #44ba9e44; }
@media (prefers-reduced-motion:reduce) { #lobby *,#lobby *::before { animation:none!important;transition:none!important; } }
/* Approved title wordmark, sampled from the same original source as the title screen. */
#lobby .sanctuary-brand { display:block;width:18cqw;height:2.945cqw;background:url('../assets/img/ui/approved-title-source.png') 50.802139% 30.787309% / 304% 1045.55556% no-repeat;mask-image:linear-gradient(90deg,transparent,#000 2%,#000 98%,transparent); }
/* Keep the complete rotating badge envelope above the separate information plinth. */
#lobby .sanctuary-seal { width:70cqh;height:70cqh;top:-16cqh; }
#lobby .seal-element { left:calc(50% + var(--ex)*.855);top:calc(50% + var(--ey)*.855);width:7.1cqh;height:7.1cqh; }
#lobby .lobby-sel-icon { top:3.5cqh;width:21cqh;height:21cqh; }
#lobby .sanctuary-player { top:26cqh; }
#lobby .sanctuary-rank { top:30.5cqh; }
#lobby .lobby-deck-plinth { position:absolute;top:48cqh;left:17%;width:66%;height:9cqh;box-sizing:border-box;padding:1cqh 2cqw;background:linear-gradient(110deg,#090e0e,#231e13 48%,#0a0e0d);border-block:1px solid #a58548;clip-path:polygon(8% 0,92% 0,100% 100%,0 100%);box-shadow:inset 0 2px 0 #e8c77844,inset 0 -4px 15px #000; }
#lobby .lobby-deck-plinth::before { content:'◇';position:absolute;top:-.5cqh;left:0;width:100%;color:#c9a86a;font-size:1.8cqh;line-height:1; }
#lobby .lobby-sel-name { position:static;width:100%;padding:0;font-size:2.8cqh;line-height:1.3; }
#lobby .lobby-sel-meta { position:static;width:100%;font-size:1.8cqh;line-height:1.6; }
#lobby #matchDemo { top:57.4cqh; }
#lobby .lobby-right .lobby-match { top:61cqh;height:13cqh;left:17%;width:66%;isolation:isolate;background:linear-gradient(#10161244,#07110f66),url('../assets/img/lobby/seal.png') center/200% auto;filter:drop-shadow(0 5px 3px #000); }
#lobby .lobby-right .lobby-match::before { z-index:-1;background:url('../assets/img/lobby/approved-lobby-source.png') 71.48289% 80.72591% / 269.67742% 662.67606% no-repeat;mask-image:linear-gradient(0deg,#000 0 20%,transparent 20% 80%,#000 80%),linear-gradient(90deg,#000 0 13%,transparent 13% 87%,#000 87%); }
#lobby .lobby-right .lobby-match:disabled { opacity:1;color:#b8ae8d;filter:saturate(.45); }
#lobby .lobby-right .lobby-match { background:linear-gradient(#111813eb,#08100fed),url('../assets/img/lobby/seal.png') center/200% auto; }
#lobby .lobby-deck::before { inset:0;border:0;clip-path:none;background:url('../assets/img/lobby/approved-lobby-source.png') 20.9234% 26.3014% / 836% 445.9716% no-repeat;mask-image:linear-gradient(0deg,#000 0 5%,transparent 5% 95%,#000 95%),linear-gradient(90deg,#000 0 5%,transparent 5% 95%,#000 95%); }
#lobby .lobby-deck.sel::before { background-position:6.4719% 26.0274%; }
#lobby .sanctuary-actions .menu-btn { position:relative;isolation:isolate;border:0;outline:0;background:#151813;font-size:2.1cqh; }
#lobby .sanctuary-actions .menu-btn::before { content:'';position:absolute;inset:0;z-index:-1;background:url('../assets/img/lobby/approved-lobby-source.png') 49.83% 94.2% / 923.76% 1517.74% no-repeat;mask-image:linear-gradient(0deg,#000 0 20%,transparent 20% 80%,#000 80%),linear-gradient(90deg,#000 0 10%,transparent 10% 90%,#000 90%); }
#lobby .lobby-deck { border-width:3px;border-color:#b39256 #4e361c #372615 #8d6c3e;outline-offset:-7px;box-shadow:inset 0 0 0 2px #080a07,inset 0 0 0 4px #7e5c303d,inset 0 0 22px #000,0 4px 5px #000b; }
#lobby .sanctuary-actions .menu-btn { border-width:3px;border-color:#a48855 #4a341e #362616 #82653b;background:linear-gradient(115deg,#352b1c,#101410 45%,#242015);box-shadow:inset 0 0 0 1px #090c09,inset 0 0 0 3px #957a3b55,0 4px 5px #000b; }
/* The rest of the game remains 16:9. Lobby alone reflows for touch access. */
@media (max-width:700px) and (orientation:portrait) {
  #app:has(#lobby.active) { width:100vw!important;height:100dvh!important; }
  #lobby.screen.active { overflow-y:auto;overflow-x:hidden;background-size:auto 100%;background-attachment:local; }
  #lobby .sanctuary-heading { position:relative;left:auto;top:auto;margin:18px 18px 10px;height:auto;gap:12px; }
  #lobby .sanctuary-brand { font-size:11px; } #lobby .sanctuary-brand span { font-size:25px; }
  #lobby .sanctuary-heading h1 { font-size:22px;padding-left:12px; }
  #lobby > .lobby-user { position:relative;top:auto;right:auto;width:calc(100% - 36px);height:60px;margin:0 18px;padding:4px 12px; }
  #lobby .profile-name { font-size:15px;max-width:45vw; } #lobby .profile-status,#lobby .profile-status .lobby-user-name { font-size:12px; }
  #lobby .profile-identity { padding-left:46px; } #lobby .profile-identity .rank-trigger .tier-em { --s:55px;left:5px;top:2px; } #lobby .profile-identity .rank-trigger { font-size:15px; }
  #lobby .rank-trigger { font-size:15px;min-height:36px; } #lobby .rank-trigger .tier-em { --s:36px; } #lobby .lp-link { font-size:12px;min-height:28px; }
  #lobby .lobby { position:relative;inset:auto;display:flex;flex-direction:column;gap:20px;margin:16px 18px 26px; }
  #lobby .lobby-left { padding:18px 14px 12px;min-height:310px; }
  #lobby .lobby-head h2 { font-size:23px; } #lobby .lobby-instruction { font-size:11px; } #lobby .lobby-count { font-size:11px; }
  #lobby .lobby-notice { font-size:12px;padding:8px; } #lobby .lobby-decks { max-height:342px;grid-auto-rows:156px;gap:10px;flex:auto;padding:4px; }
  #lobby .lobby-deck { padding:12px 8px 8px; } #lobby .lobby-deck-icon { width:102px;height:102px; } #lobby .lobby-deck-name { font-size:15px;margin-top:12px; }
  #lobby .lobby-left-actions .menu-btn { font-size:13px;min-height:40px;padding:8px 12px; }
  #lobby .lobby-right { height:560px;flex:none;transform:none; }
  #lobby .sanctuary-seal { top:-8px;width:350px;height:350px;max-width:104%; }
  #lobby .seal-element { width:43px;height:43px;left:calc(50% + var(--mx));top:calc(50% + var(--my)); }
  #lobby .lobby-sel-icon { width:132px;height:132px;top:80px; }
  #lobby .sanctuary-player { top:224px;font-size:23px; }
  #lobby .sanctuary-rank { top:253px; } #lobby .sanctuary-rank .rank-trigger { font-size:17px; } #lobby .sanctuary-rank .rank-trigger .tier-em { --s:48px; }
  #lobby .lobby-sel-name { top:311px;font-size:23px;padding-top:9px; } #lobby .lobby-sel-meta { top:350px;font-size:14px; }
  #lobby #matchDemo { top:381px;left:0;width:100%;font-size:12px;padding:5px 0; }
  #lobby .lobby-right .lobby-match { top:416px;left:3%;width:94%;height:68px;font-size:32px; }
  #lobby .sanctuary-actions { top:503px;left:0;width:100%;gap:12px; } #lobby .sanctuary-actions .menu-btn { font-size:13px;min-height:44px;padding:8px 4px; }
  #lobby .rank-unavailable { font-size:14px; } #lobby .lobby-sel-empty { top:190px;font-size:18px; }
  #lobby .lobby-wait { position:fixed;left:18px;right:18px;bottom:12px; } #lobby .lobby-wait-box { padding:10px; } #lobby .lobby-wait-box h2,#lobby .lobby-wait-time { font-size:12px; } #lobby .lobby-wait-box .menu-btn { font-size:14px;min-height:40px;padding:8px 12px; }
}

@media (max-width:700px) and (orientation:portrait) {
  #lobby .sanctuary-brand { width:122px;height:20px;flex:none; }
  #lobby .sanctuary-brand { width:133px!important;height:42px!important; }
  #lobby .sanctuary-heading { margin-top:8px;margin-bottom:4px; }
  #lobby .profile-settings { font-size:23px;padding:4px 8px; }
  #lobby.screen.active { padding-bottom:190px; }
  #lobby .lobby { margin-top:12px;gap:18px; }
  #lobby .lobby-right { order:-1;height:414px; }
  #lobby .sanctuary-seal { top:0;width:330px;height:330px; }
  #lobby .seal-element { left:calc(50% + var(--mx)*.94);top:calc(50% + var(--my)*.94);width:40px;height:40px; }
  #lobby .lobby-sel-icon { width:116px;height:116px;top:60px; }
  #lobby .sanctuary-player { top:187px;font-size:22px; }
  #lobby .sanctuary-rank { top:216px; }
  #lobby .lobby-deck-plinth { top:342px;height:66px;left:6%;width:88%;padding:6px 18px; }
  #lobby .lobby-sel-name { font-size:23px; } #lobby .lobby-sel-meta { font-size:14px; }
  #lobby #matchDemo { position:fixed;top:auto;bottom:175px;left:0;width:100%;height:27px;background:#09110ff5;z-index:9;font-size:12px; }
  #lobby .seal-preview-controls { position:fixed;top:auto;bottom:140px;left:0;width:100%;height:35px;background:#09110ff5;z-index:11;gap:10px; }
  #lobby #btnSealPreview { font-size:13px;min-height:32px;padding:3px 9px; } #lobby #sealPreviewStatus { font-size:10px; }
  #lobby .lobby-right .lobby-match { position:fixed;top:auto;bottom:65px;left:4%;width:92%;height:76px;font-size:32px;z-index:10; }
  #lobby .sanctuary-actions { position:fixed;top:auto;bottom:10px;left:4%;width:92%;gap:10px;z-index:10; }
  #lobby .lobby-wait { bottom:209px;z-index:11; } #lobby .lobby-wait-deck { font-size:11px; }
}
@media (max-width:1000px) and (orientation:landscape) {
  #app:has(#lobby.active) { width:100vw!important;height:100dvh!important; }
  #lobby .sanctuary-heading { top:10px;left:20px;height:32px;gap:12px; }
  #lobby .sanctuary-brand { width:140px;height:23px; }
  #lobby .sanctuary-brand { width:140px!important;height:44px!important; }
  #lobby .profile-settings { font-size:23px;padding:3px 6px; }
  #lobby .sanctuary-heading h1 { font-size:23px;padding-left:12px; }
  #lobby > .lobby-user { top:6px;right:64px;width:32%;height:46px; }
  #lobby .profile-status .lp-link { font-size:12px;min-height:24px;min-width:60px;padding:1px 6px; }
  #lobby .profile-name,#lobby .profile-identity .rank-trigger { font-size:14px; }
  #lobby .profile-status,#lobby .profile-status .lobby-user-name { font-size:11px; }
  #lobby .profile-identity .rank-trigger .tier-em { --s:48px; }
  #lobby .lobby { inset:50px 16px 8px;grid-template-columns:38% 1fr;gap:3%; }
  #lobby .lobby-left { padding:12px; } #lobby .lobby-head { margin-bottom:8px;gap:8px; }
  #lobby .lobby-head h2 { font-size:21px; } #lobby .lobby-instruction,#lobby .lobby-count,#lobby .lobby-notice { font-size:11px; }
  #lobby .lobby-decks { grid-auto-rows:110px;gap:8px; } #lobby .lobby-deck { padding:8px 4px; }
  #lobby .lobby-deck-icon { width:65px;height:65px; } #lobby .lobby-deck-name { font-size:14px;margin-top:7px; }
  #lobby .lobby-left-actions .menu-btn { font-size:12px;min-height:36px; }
  #lobby .lobby-right { transform:none; }
  #lobby .sanctuary-seal { top:-18px;width:180px;height:180px; }
  #lobby .seal-element { left:calc(50% + var(--mx)*.51);top:calc(50% + var(--my)*.51);width:25px;height:25px; }
  #lobby .lobby-sel-icon { top:13px;width:68px;height:68px; }
  #lobby .sanctuary-player { top:90px;font-size:18px; }
  #lobby .sanctuary-rank { top:113px; } #lobby .sanctuary-rank .rank-trigger { font-size:14px; } #lobby .sanctuary-rank .rank-trigger .tier-em { --s:35px; }
  #lobby .lobby-deck-plinth { top:166px;left:12%;width:76%;height:47px;padding:2px 12px; }
  #lobby .lobby-sel-name { font-size:19px; } #lobby .lobby-sel-meta { font-size:12px; }
  #lobby #matchDemo { top:215px;font-size:12px;padding:2px 0;left:0;width:100%; }
  #lobby .lobby-right .lobby-match { top:238px;left:5%;width:90%;height:56px;font-size:28px!important; }
  #lobby .seal-preview-controls { top:178px;left:-8%;width:auto;display:block; } #lobby #btnSealPreview { font-size:12px;padding:5px; } #lobby #sealPreviewStatus { display:none; }
  #lobby .sanctuary-actions { top:296px;left:0;width:100%;gap:8px; } #lobby .sanctuary-actions .menu-btn { font-size:13px;min-height:44px; }
  #lobby.screen.active { overflow-y:auto; } #lobby .lobby-right { min-height:340px; }
  #lobby .lobby { bottom:auto;min-height:340px; } #lobby .lobby-left { max-height:332px; }
  #lobby .lobby-wait { position:fixed;left:44%;right:3%;bottom:8px; } #lobby .lobby-wait-box h2,#lobby .lobby-wait-time,#lobby .lobby-wait-deck { font-size:12px; }
}
/* Reference-coordinate desktop pass: the slab meets the raised altar rim. */
@media (min-width:1001px) {
  #lobby .lobby-left { padding-top:2.5cqh; }
  #lobby .lobby-head { margin-bottom:.55cqh; }
  #lobby .lobby-decks { grid-auto-rows:22.3cqh;gap:1.15cqh .85cqw; }
  #lobby .lobby-deck { padding-top:1.65cqh; }
  #lobby .lobby-deck-icon { width:16.1cqh;height:16.1cqh; }
  #lobby .lobby-left-actions { position:absolute;bottom:1.4cqh;right:1.9cqw;margin:0; }
  #lobby .lobby-decks { padding-bottom:4cqh; }
  #lobby .lobby-sel-icon { top:7cqh;width:22cqh;height:22cqh; }
  #lobby .sanctuary-player { top:28.2cqh; }
  #lobby .sanctuary-player::after { content:'';display:block;height:1.9cqh;width:15cqw;margin:.5cqh auto 0;background:url('../assets/img/lobby/approved-lobby-source.png') 65.7534% 45.9783% / 643.0769% 5227.7778% no-repeat; }
  #lobby .sanctuary-rank { top:33.5cqh; }
  #lobby .seal-element { left:calc(50% + var(--ex)*.72);top:calc(50% + var(--ey)*.72); }
  #lobby .lobby-deck-plinth { top:42.2cqh;left:26.4%;width:47.2%;height:9.7cqh;padding:1.5cqh 1cqw .6cqh; }
  #lobby .lobby-sel-name { font-size:3cqh; }
  #lobby .lobby-sel-meta { font-size:1.95cqh; }
  #lobby #matchDemo { top:52.8cqh; }
  #lobby .lobby-right .lobby-match { top:57cqh;left:18.2%;width:63.6%;height:14.5cqh;font-family:'Batang','Nanum Myeongjo',serif;font-size:5.3cqh;font-weight:600;letter-spacing:.12em;filter:drop-shadow(0 .45cqh .18cqh #000d) drop-shadow(0 1.2cqh .65cqh #0009); }
  #lobby .lobby-right .lobby-match::after { content:'';position:absolute;inset:10% 11% 12%;pointer-events:none;background:linear-gradient(175deg,#f7d98c14,transparent 30%,transparent 74%,#68dace18);box-shadow:inset 0 1px 1px #f4dc9b66,inset 0 -2px 3px #73dec44d;z-index:-1; }
  #lobby .seal-preview-controls { top:72.1cqh; }
  #lobby .sanctuary-actions { top:76.4cqh;left:17.2%;width:67.6%;gap:1.8cqw; }
  #lobby .sanctuary-actions .menu-btn { min-height:5.8cqh;font-size:2.05cqh;font-weight:400; }
}
@media (min-width:1001px) {
  #lobby .sanctuary-actions .menu-btn { padding-left:2.4cqw; }
  #lobby .sanctuary-actions .menu-btn::after { content:'';position:absolute;left:12%;top:50%;transform:translateY(-50%);width:1.95cqw;height:3.2cqh;background-image:url('../assets/img/lobby/approved-lobby-source.png');background-repeat:no-repeat;pointer-events:none; }
  #lobby #btnLobbyAi::after { background-size:5765.52% 3136.67%;background-position:46.926% 92.755%; }
  #lobby #btnLobbyEdit::after { background-size:5066.67% 3136.67%;background-position:60.403% 92.755%; }
  #lobby #btnLobbyBack::after { background-size:5971.43% 3619.23%;background-position:75.608% 92.6776%; }
}
@media (min-width:1001px) {
  #lobby .lobby-decks { grid-auto-rows:22.1cqh; }
  #lobby .lobby-left-actions { top:100%;bottom:auto;right:0;margin-top:.7cqh; }
  #lobby .sanctuary-player::after { mask-image:linear-gradient(90deg,transparent,#000 25%,#000 75%,transparent); }
  #lobby .seal-element { left:calc(50% + var(--ex)*.855);top:calc(50% + var(--ey)*.855);width:6.5cqh;height:6.5cqh; }
}
@media (min-width:1001px) {
  #lobby .lobby-decks { flex:none;height:68.5cqh;padding-bottom:0; }
  #lobby .sanctuary-player::after { background:url('../assets/img/lobby/rank-separator.svg') center/100% 100% no-repeat;mask-image:none; }
  #lobby .seal-element { width:5.55cqh;height:5.55cqh; }
  #lobby .lobby-right .lobby-match:hover:not(:disabled) { background:linear-gradient(#111813eb,#08100fed),url('../assets/img/lobby/seal.png') center/200% auto;box-shadow:none; }
}
/* Reference medallions now belong to the lit 3D seal mesh. DOM retains semantics
   and is used only if WebGL is unavailable. */
#lobby .seal-webgl-ready .seal-element { visibility:hidden; }
@media (min-width:1001px) {
  #lobby .sanctuary-seal { top:-11.7cqh; }
}
#lobby .lobby-right .lobby-match,#lobby .lobby-right .lobby-match:hover:not(:disabled) { background:linear-gradient(#12171222,#080f0d44),var(--slab-stone,url('../assets/img/lobby/seal.png')) center/100% 100%; }
@media (min-width:1001px) {
  #lobby .lobby-right .lobby-match { top:56.9cqh;height:14cqh; }
}
@media (min-width:1001px) {
  #lobby .sanctuary-heading h1 { font-family:'Batang','Nanum Myeongjo',serif;font-weight:700; }
  #lobby .lobby-left::before { content:'';inset:-1px;font-size:0;background:url('../assets/img/lobby/approved-lobby-source.png') 4.580153% 61.452514% / 339.14807% 123.490814% no-repeat;mask:linear-gradient(#000 0 0) top left/3cqw 5cqh no-repeat,linear-gradient(#000 0 0) top right/3cqw 5cqh no-repeat,linear-gradient(#000 0 0) bottom left/3cqw 5cqh no-repeat,linear-gradient(#000 0 0) bottom right/3cqw 5cqh no-repeat; }
  #lobby .lobby-left::after { content:none; }
}
/* Correctable integration fixes; source-derived fallback replaces legacy art. */
#lobby .sanctuary-actions .menu-btn::after { mix-blend-mode:screen; }
#lobby .slab-contact { position:absolute;left:24%;width:52%;top:70.3cqh;height:2.1cqh;z-index:2;pointer-events:none;background:radial-gradient(ellipse,#020706e6 0 38%,#02070680 58%,transparent 73%);filter:blur(.16cqh); }
@media (min-width:1001px) {
  #lobby .lobby-left-actions { top:auto;bottom:.7cqh;right:1.9cqw;margin:0;height:2.8cqh; }
  #lobby .lobby-left-actions .menu-btn { height:2.8cqh;min-height:0;padding:0 .6cqw;font-size:1.3cqh; }
  #lobby .lobby-decks { height:68.3cqh; }
  #lobby .sanctuary-seal { width:77cqh;height:77cqh;top:-15.3cqh; }
  #lobby .lobby-deck-plinth { clip-path:polygon(17.4% 0,82.6% 0,100% 100%,0 100%); }
  #lobby .lobby-right .lobby-match { -webkit-text-stroke:.012em #ffe7ad;filter:drop-shadow(0 .25cqh .1cqh #000e); }
}
@media (max-width:1000px) { #lobby .slab-contact { display:none; } }
/* Source architecture, not the former reimagined 4K scene. This raster is
   native 1672x941; controls, relief, text and interaction remain separate. */
#lobby.screen.active { background-image:url('../assets/img/lobby/sanctuary-reference-scene.png'); }
#lobby::before { background:none; }
#lobby .seal-rotor { background-image:url('../assets/img/lobby/reference-seal-fallback.png?v=0.4050');filter:none; }
#lobby .seal-element { visibility:hidden; }
#lobby .sanctuary-actions .menu-btn { background:#17170ff5; }
@media (min-width:1001px) {
  #lobby .lobby-deck-icon { border:1px solid #9d7b42;outline:none;box-shadow:0 1px 5px #000; }
  #lobby .lobby-deck-icon img { width:100%;height:100%; }
  #lobby .sanctuary-player { top:28.7cqh; }
  #lobby .sanctuary-rank { top:32.4cqh;left:47.5%; }
  #lobby .sanctuary-rank .rank-trigger .tier-em { --s:10cqh; }
  #lobby > .lobby-user { width:23.5%; }
  #lobby .profile-identity .rank-trigger .tier-em { left:-1.2cqw; }
  #lobby .lobby-count { visibility:hidden; }
  #lobby .lobby-left-actions { opacity:0;transition:opacity .15s; }
  #lobby .lobby-left:hover .lobby-left-actions,#lobby .lobby-left:focus-within .lobby-left-actions { opacity:1; }
  #lobby .lobby-deck-plinth { background:linear-gradient(110deg,#0c1511bd,#292418e0 48%,#0b1511bd); }
  #lobby .lobby-right .lobby-match { font-weight:800;letter-spacing:.08em;text-indent:.08em; }
  #lobby #matchDemo::before { content:'♟';display:inline-block;margin-right:.65cqw;color:#d1ba87;font-size:2.2cqh; }
}
#lobby #matchDemo::before { content:'';display:inline-block;width:2.7cqh;height:2.1cqh;vertical-align:-.3cqh;margin-right:.65cqw;background:url('../assets/img/lobby/approved-lobby-source.png') 55.52855% 67.0652% / 6430.769% 4480.952% no-repeat;mix-blend-mode:screen; }
@media (min-width:1001px) {
  #lobby .lobby-left::before { mix-blend-mode:screen;mask-size:2.5cqw 3.7cqh; }
  #lobby #matchDemo { isolation:isolate; }
  #lobby #matchDemo::after { content:'';position:absolute;inset:-1cqh 0 -.7cqh;z-index:-1;pointer-events:none;background:radial-gradient(ellipse 55% 85% at center,#11221ff5 0 54%,#11221fc9 70%,transparent 100%); }
  #lobby .lobby-deck-plinth { background:linear-gradient(#1a1b13e8,#101611ee),var(--slab-stone) center/100% 100%; }
}
@font-face { font-family:'Sanctuary Serif';src:url('../assets/fonts/lobby-serif-subset.ttf') format('truetype');font-style:normal;font-weight:700;font-display:swap; }
#lobby .sanctuary-heading h1,#lobby .lobby-right .lobby-match { font-family:'Sanctuary Serif','Noto Serif KR','Batang',serif; }
#lobby .lobby-deck::before { mask:none;background:url('../assets/img/lobby/frame-deck.png') center/100% 100% no-repeat; }
#lobby .lobby-deck.sel::before { background-image:url('../assets/img/lobby/frame-deck-selected.png');background-position:center; }
#lobby .sanctuary-actions .menu-btn::after { background-position:center!important;background-size:contain!important;mix-blend-mode:normal; }
#lobby #btnLobbyAi::after { background-image:url('../assets/img/lobby/icon-practice.png'); }
#lobby #btnLobbyEdit::after { background-image:url('../assets/img/lobby/icon-edit.png'); }
#lobby #btnLobbyBack::after { background-image:url('../assets/img/lobby/icon-back.png'); }
#lobby #matchDemo::before { background:url('../assets/img/lobby/icon-population.png') center/contain no-repeat;mix-blend-mode:normal; }
@media (min-width:1001px) {
 #lobby .lobby-left::before { mask:none;background:url('../assets/img/lobby/frame-panel.png') center/100% 100% no-repeat;mix-blend-mode:normal; }
 #lobby .sanctuary-seal { mask-image:linear-gradient(#000 0 78%,#0009 85%,transparent 96%); }
}
@media (max-width:700px) and (orientation:portrait) {
 #lobby .lobby-deck-plinth .lobby-sel-name { padding-top:0; }
 #lobby .lobby-deck-plinth .lobby-sel-meta { line-height:1.5; }
 #lobby .sanctuary-actions .menu-btn { padding-left:24px; }
 #lobby .sanctuary-actions .menu-btn::after { content:'';position:absolute;left:7px;top:50%;transform:translateY(-50%);width:18px;height:20px;background-repeat:no-repeat; }
}
@media (min-width:1001px) {
 #lobby .lobby-left { display:flex;flex-direction:column; }
 #lobby .lobby-decks { flex:1 1 auto;height:auto;min-height:0;margin-bottom:2.8cqh; }
 #lobby .sanctuary-brand { transform:translate(-.24cqw,.42cqh); }
 #lobby .sanctuary-heading h1 { transform:translateY(-.4cqh); }
 #lobby .sanctuary-rank:has(.rank-unavailable) { top:36cqh; }
 #lobby #matchDemo::after { background:radial-gradient(ellipse 42% 78% at center,#0d1915c9 0 42%,#0d191559 68%,transparent 100%); }
}
@media (min-width:1001px) { #lobby .lobby-deck-icon { width:16.4cqh;height:16.4cqh;border:0;outline:0;background:none; } }
@media (min-width:1001px) { #lobby .lobby-decks { grid-auto-rows:21.95cqh;margin-bottom:2.6cqh; } }
@media (min-width:1001px) {
 #lobby .sanctuary-seal { mask-image:linear-gradient(#000 0 78%,#0009 82%,transparent 87%); }
 #lobby #matchDemo::after { display:none; }
}
/* Source letter contours only, independently scalable; the real DOM label is
   retained for accessibility and switches normally for all other states. */
#lobby .lobby-right .lobby-match[data-reference-label] { color:transparent!important;text-shadow:none;-webkit-text-stroke:0; }
#lobby .lobby-right .lobby-match[data-reference-label]::after { content:'';position:absolute;pointer-events:none;inset:25.8% 20% 23.2%;z-index:1;background:url('../assets/img/lobby/label-match-reference.svg') center/contain no-repeat;box-shadow:none;filter:drop-shadow(0 0 .45cqh #f5d27980); }
@media (min-width:1001px) {
 #lobby[data-reference-title] .sanctuary-heading h1 { position:absolute;left:19.72cqw;top:1.48cqh;width:13.76cqw;height:5.74cqh;transform:none;padding:0;border:0;color:transparent;text-shadow:none;background:url('../assets/img/lobby/label-lobby-reference.svg') center/contain no-repeat; }
 #lobby[data-reference-title] .sanctuary-heading::after { content:'';position:absolute;left:18.06cqw;top:1.91cqh;height:4.8cqh;border-left:1px solid #80633a; }
}

@media (min-width:1001px) {
 #lobby .lobby-head { gap:2.1cqw; }
 #lobby .lobby-instruction { font-size:1.6cqh; }
 #lobby .sanctuary-rank .rank-trigger .tier-em { --s:11.3cqh; }
 #lobby .profile-identity .rank-trigger .tier-em { --s:11.8cqh;top:-1.6cqh;left:-1.6cqw; }
}
@media (min-width:1001px) {
 #lobby .lobby-count { display:none; }
 #lobby .lobby-instruction { white-space:nowrap; }
 #lobby .sanctuary-rank { top:31.5cqh; }
}

/* Match the approved front silhouette; fog occludes the lower moving relief. */
@media (min-width:1001px) {
 #lobby .sanctuary-seal { width:77.8cqh;height:77.8cqh;top:-16.5cqh;mask-image:linear-gradient(#000 0 72%,#000b 77%,#0004 82%,transparent 88%); }
 #lobby .sanctuary-seal::before { display:none; }
 #lobby .lobby-deck-plinth { top:42cqh;left:26%;width:48%;height:10cqh;border:0;clip-path:none;box-shadow:none;background:linear-gradient(90deg,transparent,#231b1285 24%,#241b11e3 50%,#231b1285 76%,transparent); }
 #lobby .lobby-deck-plinth::after { content:'';position:absolute;inset:0;pointer-events:none;background:url('../assets/img/lobby/plinth-lines.svg') center/100% 100% no-repeat; }
 #lobby .lobby-deck-plinth::before { display:none; }
}

#lobby .lobby-deck { border:0;outline:0;border-radius:0;background:radial-gradient(ellipse at 50% 20%,#44341e80,transparent 72%),linear-gradient(125deg,#241c11,#11130f);box-shadow:none; }
#lobby .lobby-deck.sel { border:0;outline:0;box-shadow:0 0 .6cqh #e9c77366;background:radial-gradient(ellipse at 50% 18%,#51402677,transparent 70%),linear-gradient(125deg,#241d12,#14170f); }
#lobby .lobby-deck::before { opacity:.85; }
#lobby .lobby-deck.sel::before { opacity:1; }
@media (min-width:1001px) {
 #lobby .sanctuary-actions { left:17.2%;width:65.7%;gap:1.6cqw; }
 #lobby #btnLobbyAi { flex:none;width:10.65cqw; }
 #lobby #btnLobbyEdit { flex:none;width:13.4cqw; }
 #lobby #btnLobbyBack { flex:none;width:11.72cqw; }
 #lobby .profile-settings { position:absolute;right:5cqw;width:4.3cqw;height:4.8cqh;border-left:1px solid #8d6d3859;border-radius:0;font-size:0;background:url('../assets/img/lobby/icon-settings.png') center/2.1cqh 2.5cqh no-repeat; }
 #lobby .profile-status { position:absolute;right:1cqw;top:50%;transform:translateY(-50%);border:0;padding:0; }
 #lobby .profile-status .lobby-user-name { font-size:1.4cqh;white-space:nowrap; }
}

#lobby .sanctuary-foreground { display:none; }
@media (min-width:1001px) { #lobby .sanctuary-foreground { display:block;position:absolute;inset:0;z-index:1;pointer-events:none;background:url('../assets/img/lobby/fixed-pillar-brackets.png') center/100% 100% no-repeat; } }

/* Measured source portrait center: (1065,273) at 1672x941. The official
   selected-deck bitmap remains independent; enlarge its visible content only. */
@media (min-width:1001px) {
 #lobby .lobby-sel-icon { top:6cqh; }
 #lobby .lobby-sel-icon img { width:104%;height:104%;max-width:none;flex:none; }
}


/* Existing account rewards stay in the deck panel, clear of fixed sanctuary controls. */
#lobby #lobbyWelcome { flex:none; margin:0 0 1cqh; font-size:max(11px,1.35cqh); }
#lobby #lobbyWelcome[hidden] { display:none; }
#lobby #lobbyWelcome .welcome-line { display:flex; align-items:center; gap:8px; }
#lobby #lobbyWelcome .welcome-line > span { flex:1; min-width:0; }
#lobby #btnClaimWelcome { flex:none; min-width:60px; min-height:44px; padding:6px 10px; font-size:13px; }
#lobby #welcomeClaimStatus { line-height:1.4; padding-top:3px; }
#lobby .lobby-network-actions { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; flex:none; margin:0 0 1cqh; }
#lobby .lobby-network-actions .menu-btn { width:100%; min-width:0; min-height:44px; margin:0; padding:6px 4px; font-size:clamp(11px,1.5cqh,14px); white-space:nowrap; letter-spacing:0; }
#lobby .sanctuary-actions .menu-btn { flex:1; width:auto; font-size:1.65cqh; }
#lobby #matchDemo { pointer-events:none; }
@media (max-width:1000px) {
  #lobby .sanctuary-actions .menu-btn { font-size:12px; min-height:44px; }
}
@media (max-width:700px) and (orientation:portrait) {
  #lobby.screen.active { scroll-padding-bottom:210px; }
  #lobby .sanctuary-actions { gap:6px; }
  #lobby .sanctuary-actions .menu-btn { font-size:11px; }
  #lobby #lobbyWelcome,#lobby #lobbyAssets { position:relative;z-index:12;background:#19150e;scroll-margin-bottom:210px; }
  #lobby .seal-preview-controls { z-index:13;pointer-events:none; }
  #lobby .lobby-right .lobby-match,#lobby .sanctuary-actions { z-index:20; }
}

/* Keep the square seal square when the portrait max-width clamps its width. */
@media (max-width:700px) and (orientation:portrait) {
  #lobby .sanctuary-seal { height:auto; aspect-ratio:1 / 1; }
}

/* Display names are user data: retain every character at narrow widths. */
#lobby .profile-name{letter-spacing:0;white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere;}

/* Supplied 22.jpg book crops. Pixel assets are never enlarged or recoloured. */
#lobby .lobby-left:has(#lobbyAssets) #lobbyDecks.lobby-decks{container-type:size;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));grid-auto-rows:0;gap:16px;justify-items:center;align-items:center;align-content:stretch;flex:1 1 0;height:auto;max-height:none;min-height:180px;padding:0;margin-bottom:8px;overflow:visible;}
#lobby .lobby-left .lobby-deck{--book-sw:227;--book-sh:293;--book-h:min(calc((100cqh - 16px)/2),calc(var(--book-sh)*1px/var(--book-dpr,1)),calc((100cqw - 12px)/2*var(--book-sh)/var(--book-sw)));height:var(--book-h);width:calc(var(--book-h)*var(--book-sw)/var(--book-sh));max-width:none;min-width:0;padding:0;display:block;position:relative;border:0;border-radius:3px;outline:0;background:none;box-shadow:none;transform:none;}
#lobby .lobby-left .lobby-deck[data-tribe=earth]{--book-frame:url('../assets/img/lobby/books-22/earth.png');}
#lobby .lobby-left .lobby-deck[data-tribe=fire]{--book-frame:url('../assets/img/lobby/books-22/fire.png');}
#lobby .lobby-left .lobby-deck[data-tribe=wind]{--book-frame:url('../assets/img/lobby/books-22/wind.png');}
#lobby .lobby-left .lobby-deck[data-tribe=water]{--book-sw:229;--book-sh:294;--book-frame:url('../assets/img/lobby/books-22/water.png');}
#lobby .lobby-left .lobby-deck[data-tribe=dark]{--book-sw:229;--book-sh:297;--book-frame:url('../assets/img/lobby/books-22/dark.png');}
#lobby .lobby-left .lobby-deck[data-tribe=light]{--book-sw:229;--book-sh:297;--book-frame:url('../assets/img/lobby/books-22/light.png');}
#lobby .lobby-left .lobby-deck::before,#lobby .lobby-left .lobby-deck.sel::before{content:'';inset:0;opacity:1;mask:none;clip-path:none;border:0;border-radius:0;background:var(--book-frame) center/100% 100% no-repeat;pointer-events:none;}
#lobby .lobby-left .lobby-deck.sel,#lobby .lobby-left .lobby-deck:hover{background:none;box-shadow:none;transform:none;}
#lobby .lobby-left .lobby-deck.sel::after,#lobby .lobby-left .lobby-deck:focus-visible::after{content:'';position:absolute;inset:-3px;border:2px solid #f2d88b;border-radius:5px;box-shadow:0 0 7px #edb54c90;pointer-events:none;}
#lobby .lobby-left .lobby-deck-icon{position:absolute;left:16.5%;top:21.7%;width:67%;height:auto;min-height:0;max-height:none;aspect-ratio:1;max-width:none;border:0;outline:0;box-shadow:none;background:#090f14;border-radius:50%;overflow:hidden;margin:0;padding:0;}
#lobby .lobby-left .lobby-deck-icon img,#lobby .lobby-left .lobby-deck-icon .element-emblem{width:100%;height:100%;max-width:none;}
#lobby .lobby-left .lobby-deck-name{position:absolute;left:9%;top:77%;width:82%;height:max(18px,15%);margin:0;padding:0 3px;box-sizing:border-box;display:block;font-size:clamp(11px,calc(var(--book-h)*.059),17px);line-height:max(18px,calc(var(--book-h)*.15));letter-spacing:0;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#f4dfaa;background:linear-gradient(90deg,#130e0ae8,#130e0a,#130e0ae8);}
#lobby .lobby-left .lobby-deck .lobby-ownership{position:absolute;top:-12px;bottom:auto;left:50%;width:max-content;max-width:140%;height:12px;line-height:12px;padding:0 2px;font-size:10px;white-space:nowrap;transform:translateX(-50%);background:#170b0b;color:#ffc9a8;}
#lobby .lobby-left .lobby-deck-empty{grid-column:1/-1;align-self:start;}
#lobby .lobby-left .lobby-deck-pager{position:relative;z-index:3;min-height:44px;margin:0;padding:0;gap:12px;}
#lobby .lobby-left .lobby-deck-pager button{min-width:44px;min-height:44px;font-size:18px;}
@media(max-width:700px) and (orientation:portrait){#lobby .lobby-left:has(#lobbyAssets) #lobbyDecks.lobby-decks{flex:none;height:360px;min-height:360px;}}
