/* Page chrome for the web app: the approved mockups' 1920x1080 composition (header, ad rails, footer, game window),
   scaled to the browser window by app.js. Screen interiors come from app-screens.css (generated from the mockups). */
@font-face{font-family:'Jua';src:url(assets/fonts/jua.woff2) format('woff2');font-display:swap}
*{box-sizing:border-box;margin:0;padding:0}
html,body{width:100%;height:100%;overflow:hidden}
body{font-family:'Jua','Malgun Gothic',sans-serif;font-synthesis:none;color:#12345e;
  background:radial-gradient(circle at 50% 0,#5a7fe8 0,#3a55c8 40%,#22307e 100%)}
:root{--ui:'Jua'}
#page{position:absolute;left:0;top:0;width:1920px;height:1080px;transform-origin:0 0}
.abs{position:absolute}
.hidden{display:none!important}

/* site header */
.site{left:0;right:0;top:0;height:56px;display:flex;align-items:center;gap:28px;padding:0 360px;background:#ffffff26;backdrop-filter:blur(8px);border-bottom:2px solid #ffffff66;color:#fff;z-index:2}
.site>img{height:40px}
.site nav{display:flex;gap:24px;font-size:17px}
.site nav a{color:#fff;text-decoration:none}
.site .acct{margin-left:auto;display:flex;align-items:center;gap:14px;font-size:14px;color:#ffffffcc}
.site .acct b{color:#ffe36b}
.site .acct a{color:#fff;text-decoration:none;font-size:13px;background:#ffffff2e;border:1px solid #ffffff80;border-radius:14px;padding:4px 12px;cursor:pointer}

/* ad rails either side of the window, and a banner under it (none under the taller lobby) */
.ad{display:flex;flex-direction:column;gap:4px}
.ad div.live,#s-game.res .inad div.live{background:none;border:0;display:flex;align-items:flex-start;justify-content:center}
/* Google's own rule for when no ad is available: leave the box empty */
ins.adsbygoogle[data-ad-status=unfilled]{display:none!important}
.ad small{font-size:11px;color:#ffffffaa;text-align:center;letter-spacing:.5px}
.ad div{flex:1;border:1px solid #ffffff66;border-radius:8px;background:repeating-linear-gradient(45deg,#e9eef6 0 10px,#dfe6f1 10px 20px);
  color:#41557a;display:flex;align-items:center;justify-content:center;font-size:14px;text-align:center;line-height:1.5}
/* rails sit beside the enlarged window; the bottom banner was dropped so the window can grow */
.ad.l{left:250px;top:90px;width:160px;height:620px} .ad.r{left:1510px;top:90px;width:160px;height:620px}
.foot{left:0;right:0;bottom:0;height:48px;display:flex;align-items:center;justify-content:center;gap:22px;font-size:12px;color:#ffffffaa;border-top:1px solid #ffffff40}
.foot a{color:#ffffffdd;text-decoration:none}

/* game window: one frame, the active screen fills it; laid out at the mockups' 800x600 and drawn 1.3x larger */
.win{left:440px;top:72px;width:800px;height:600px;transform:scale(1.3);transform-origin:0 0;overflow:hidden;border-radius:18px;box-shadow:0 0 0 4px #ffffffaa,0 16px 40px #0a144088;background:#1553b8}
body.tall .win{height:710px}
.scr{position:absolute;inset:0;display:none;overflow:hidden}
.scr.on{display:block}

/* small app-only pieces the mockups did not need */
#s-game:not(.res) .resui{display:none}
.toast{left:50%;top:150px;z-index:20;transform:translate(-50%,-8px);padding:6px 18px;border-radius:8px;background:#0b2447e6;border:2px solid #fff;color:#fff;font-size:15px;
  white-space:nowrap;opacity:0;transition:opacity .2s,transform .2s;pointer-events:none}
.toast.on{opacity:1;transform:translate(-50%,0)}
.boot{inset:0;z-index:30;display:flex;align-items:center;justify-content:center;background:#06143acc;color:#fff;font-size:22px}
#s-lobby .acts .wt.on{background:linear-gradient(#86d6ff,#1a97e2);border-color:#0b5a96}
#s-lobby .rooms .room.empty{cursor:default}
#s-lobby .log>div.w,#s-room .log>div.w{color:#9c36b5}
#s-room .slot .kick{position:absolute;right:6px;bottom:6px;width:22px;height:22px;border-radius:6px;border:2px solid #8a2a05;background:linear-gradient(#ff9a6a,#e0480f);color:#fff;font:inherit;font-size:12px;cursor:pointer}
#s-room .pill:disabled,#s-room .chars button.lock{opacity:.45;cursor:not-allowed}
#s-room .teams.off{visibility:hidden}
/* in-game chat: a small box over the lower-left of the board, opened with Enter or the 채팅 button */
#s-game .gchat{left:16px;bottom:52px;width:300px;z-index:6;display:none;flex-direction:column;gap:4px}
#s-game .gchat.on{display:flex}
#s-game .gchat .log{height:96px;overflow:hidden;padding:4px 8px;border-radius:6px;background:#06143acc;color:#fff;font:12px/1.6 'Malgun Gothic',sans-serif}
#s-game .gchat .log b{color:#9fd6ff}
.log b[data-n]{cursor:pointer}
.log b[data-n]:hover{text-decoration:underline}
.mdl .seg.rs{display:grid;grid-template-columns:1fr 1fr;gap:6px}
.mdl .seg.rs button{white-space:nowrap;margin:0}
#s-game .gchat input{height:28px;border:2px solid #9fd6ff;border-radius:6px;padding:0 8px;font:12px 'Malgun Gothic',sans-serif}
#s-game canvas{display:block}
#s-game .sq span.empty kbd{opacity:.5}
/* room: a joining player and a ready stamp animate on their own, after the entrance motion has ended */
#s-room .slot.join{animation:room-slotPop .35s cubic-bezier(.2,.9,.3,1.25) both}
#s-room .slot.thud{animation:room-thud .3s ease-out .12s}
/* result chips: fewer than four players stay centred under the title */
#s-game.res .pcs{display:flex;justify-content:center}
#s-game.res .pc{width:144px;flex:none}
/* waiting room map panel: the map picture leads, name on it; facts as two chips and one line */
#s-room .mapp{padding:8px;display:flex;flex-direction:column;gap:6px}
#s-room .mapp .mshot{position:relative;height:112px;border-radius:8px;overflow:hidden;border:2px solid #1c64c8;box-shadow:0 3px 0 #0f4a9e55;flex:none}
#s-room .mapp .mshot img{width:100%;height:100%;object-fit:cover;border-radius:0;display:block}
#s-room .mapp .mshot::after{content:'';position:absolute;left:0;right:0;bottom:0;height:46px;background:linear-gradient(#0b244700,#0b2447d0)}
#s-room .mapp .mshot b{position:absolute;left:8px;right:8px;bottom:5px;z-index:1;font-weight:400;font-size:17px;color:#fff;-webkit-text-stroke:3px #0b2447;paint-order:stroke fill;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#s-room .mapp .mtag{position:absolute;left:5px;top:5px;z-index:1;font-size:10px;color:#fff;background:#1c64c8;border-radius:4px;padding:1px 6px}
#s-room .mapp .mmeta{display:flex;gap:5px}
#s-room .mapp .mmeta span{flex:1;height:22px;line-height:20px;text-align:center;font-size:12px;color:#0f4a9e;background:#fff;border:1px solid #a9d2f2;border-radius:6px}
#s-room .mapp .mfeat{font-size:12px;color:#2a4c78;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:0 2px}
#s-room .mapp .wt{margin-top:auto;flex:none}
/* game screen: the window grows further (1.55x) and the ad rails step outward to make room */
body.ingame .win{left:340px;top:64px;transform:scale(1.55)}
body.ingame .ad.l{left:150px} body.ingame .ad.r{left:1610px}

/* waiting room: live 3D kid in each seat (render3d portraitInto), animated like the images it replaced */
#s-room .slot .port img{position:absolute;inset:0;object-position:50% 100%}
#s-room .slot .port .f2{opacity:0;animation:game-blink 3.6s steps(1,end) infinite}
#s-room .slot:nth-child(2) .port .f2{animation-delay:-1.3s}
#s-room .slot:nth-child(3) .port .f2{animation-delay:-2.5s}
#s-room .slot:nth-child(4) .port .f2{animation-delay:-.6s}
