/* DeskPlay · 공용 '화면 틀' 모양 (2026-11-18, 지침 13-0-8) — 코드 /island/screen.js. 장소 css 보다 **뒤에** 싣는다.
   넓은 가로(교실 TV·PC)는 건드리지 않는다. 아래는 모두 html.sc-compact(폭 1100px 아래 또는 높이 560px 아래) 안에서만. */
.sc-more{display:none!important}
.sc-menu,.sc-tip{position:absolute;z-index:5}
.sc-menu[hidden],.sc-tip[hidden]{display:none}
.sc-tip{left:50%;top:calc(max(8px,env(safe-area-inset-top)) + 56px);transform:translateX(-50%);background:#173a5ee6;color:#fff;font-weight:800;font-size:15px;padding:.5em 1.1em;border-radius:999px;white-space:nowrap;pointer-events:none}
.sc-tap{pointer-events:auto;cursor:pointer}
/* ---- 작은 화면: 위 줄 = 🏠 · 제목 · (별) · ☰ ---- */
html.sc-compact .sc-more{display:inline-flex!important}
html.sc-compact .a3-top{gap:8px;flex-wrap:nowrap;padding:max(8px,env(safe-area-inset-top)) max(10px,env(safe-area-inset-right)) 6px max(10px,env(safe-area-inset-left))}
html.sc-compact .a3-top>*{transition:opacity .35s}
html.sc-compact .a3-top .a3-btn{font-size:16px;white-space:nowrap;flex:none;min-height:40px;box-sizing:border-box}
html.sc-compact .a3-title{font-size:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
html.sc-compact .a3-star{font-size:18px;white-space:nowrap;flex:none;padding:.25em .7em}
html.sc-compact.sc-away .a3-top>*:not(.sc-more):not(.a3-star){opacity:0;pointer-events:none}
html.sc-compact.sc-away .sc-more{opacity:.55}
/* ☰ 안: 옮겨 온 단추들 (🗑 처럼 그림만 있는 단추는 title 을 글자로) */
html.sc-compact .sc-menu{right:max(10px,env(safe-area-inset-right));top:calc(max(8px,env(safe-area-inset-top)) + 50px);display:grid;grid-template-columns:1fr;gap:10px;background:#fffefbf5;border-radius:24px;padding:12px;box-shadow:0 10px 30px #0006;pointer-events:auto;max-height:calc(100vh - 76px);overflow:auto}
html.sc-compact .sc-menu .a3-btn{justify-content:flex-start;font-size:17px;white-space:nowrap;min-height:46px;box-sizing:border-box;box-shadow:0 4px 0 #0002;background:#eef5fa}
html.sc-compact .sc-menu .a3-btn[title]:not([title=""])::after{content:" " attr(title)}
/* 큰 단추 하나(내 그림 넣기): 오른쪽 아래 엄지 자리 — 짝꿍 위 */
html.sc-compact .sc-fab{position:absolute;z-index:3;right:max(12px,env(safe-area-inset-right));bottom:var(--sc-fab,27vh);font-size:16px;white-space:nowrap;min-height:46px;padding:.55em 1em}
html.sc-compact:not(.sc-play) .sc-fab{display:none}   /* 첫 화면에서는 시작 단추만 */
/* 화면 글자: 위 줄이 낮아진 만큼 올리고 작게 */
html.sc-compact .a3-up{top:calc(max(8px,env(safe-area-inset-top)) + 52px);right:max(10px,env(safe-area-inset-right));font-size:13px;max-width:calc(var(--vw,1vw)*62)}
html.sc-compact .a3-pip{top:calc(max(8px,env(safe-area-inset-top)) + 52px);left:max(10px,env(safe-area-inset-left));width:clamp(84px,calc(var(--vw,1vw)*20),150px);border-width:3px;border-radius:14px}
html.sc-compact .a3-hint{font-size:15px;padding:.5em 1em;max-width:calc(var(--vw,1vw)*92);bottom:var(--sc-hint,29vh)}
html.sc-compact .a3-fps{display:none}
html.sc-compact .a3-card{max-height:calc(100vh - 16px);overflow:auto;box-sizing:border-box;padding:18px 16px;border-radius:28px}
html.sc-compact .a3-card h1{font-size:clamp(24px,calc(var(--vw,1vw)*5),40px)}
html.sc-compact .a3-card p{font-size:clamp(14px,calc(var(--vw,1vw)*2.4),20px)}
html.sc-compact .a3-modes{gap:12px;margin:.8em 0 .5em}
html.sc-compact .a3-mode{font-size:clamp(20px,calc(var(--vw,1vw)*3.4),30px);padding:.7em .5em;border-radius:24px;flex:1 1 220px}
html.sc-compact .a3-mode.c{flex:1 1 100%;font-size:15px;padding:.7em;box-shadow:0 5px 0 #b9c9d8}
html.sc-compact .a3-capin canvas{max-height:56vh;border-width:4px;border-radius:20px}
html.sc-compact .a3-capbtns .a3-btn{font-size:16px}
html.sc-compact .a3-capmsg{font-size:16px;text-align:center}
html.sc-compact .cr-card{max-height:calc(100vh - 16px);overflow:auto;box-sizing:border-box;border-radius:28px}
html.sc-compact .cr-chip{top:calc(max(8px,env(safe-area-inset-top)) + 96px)}
html.sc-compact .ck-clrin{padding:20px;border-radius:24px}
/* 조종석: 작은 화면에서는 낮게 (장면이 더 보이게) */
html.sc-compact .ck-basket{left:max(12px,env(safe-area-inset-left));bottom:max(10px,env(safe-area-inset-bottom));padding:4px 10px 4px 6px;border-width:2px}
html.sc-compact .ck-basket b{font-size:20px}html.sc-compact .ck-basket i{width:24px;height:24px;font-size:14px}
/* 낮은 가로 (휴대폰 가로) */
@media (max-height:560px){
  html.sc-compact{--sc-hint:25vh;--sc-fab:30vh}
  html.sc-compact .ck{height:22vh}
  html.sc-compact .ck.art .ck-hood{left:28%;right:28%;width:44%}
  html.sc-compact .ck-buddy{height:26vh;right:2%}
  html.sc-compact .sc-menu{grid-template-columns:1fr 1fr}
  html.sc-compact .a3-card{padding:12px 16px}
  html.sc-compact .a3-card h1{font-size:24px}
  html.sc-compact .a3-modes{flex-wrap:nowrap}
  html.sc-compact .a3-mode{padding:.5em .4em;font-size:20px}
  html.sc-compact .a3-mode.c{flex:0 1 auto;font-size:14px}
  html.sc-compact .a3-capin canvas{max-height:50vh}
  /* '이렇게 놀아요' 판(extract.js guideUI): 낮은 화면에 다 들어가게 */
  html.sc-compact .aqx-guide>div{padding:10px 22px 12px;max-height:96vh;overflow:auto;box-sizing:border-box;border-radius:22px;width:min(640px,calc(var(--vw,1vw)*92))}
  html.sc-compact .aqx-guide h2{font-size:20px;margin:0 0 4px}
  html.sc-compact .aqx-guide p{font-size:15px;margin:1px 0;gap:10px}
  html.sc-compact .aqx-guide p em{font-size:1.5em}
  html.sc-compact .aqx-guide small{font-size:12px;margin-top:2px}
  html.sc-compact .aqx-gx{margin-top:4px}
  html.sc-compact .aqx-gx b{font-size:14px;padding:4px 14px}
  html.sc-compact .aqx-gx i{margin-top:6px;height:6px}
  html.sc-compact .aqx-gtop{padding:6px 14px;gap:10px;border-radius:16px}
  html.sc-compact .aqx-gtop>em{font-size:22px}html.sc-compact .aqx-gtop b{font-size:15px}html.sc-compact .aqx-gtop span{font-size:13px}html.sc-compact .aqx-gtop i{font-size:12px}
  html.sc-compact .cr-card{padding:10px 20px}
  html.sc-compact .cr-n{font-size:64px}
  html.sc-compact #a3 .cr-b{width:52px;height:52px;font-size:30px}
  html.sc-compact #a3 .cr-go{min-height:48px;font-size:22px;margin-top:.3em}
}
/* 세로 (휴대폰·태블릿을 세워 듦) */
@media (orientation:portrait){
  html.sc-compact{--sc-hint:27vh;--sc-fab:19vh}
  html.sc-compact .ck{height:16vh}
  html.sc-compact .ck.art .ck-hood{left:9%;right:9%;width:82%;bottom:-3vh}
  html.sc-compact .ck-buddy{height:15vh;right:1%;bottom:-1vh}
  html.sc-compact .ck-plate{font-size:13px}
  html.sc-compact .ck-basket{bottom:calc(15vh + 6px)}
  html.sc-compact .a3-up{flex-wrap:wrap;border-radius:18px;max-width:calc(var(--vw,1vw)*68);row-gap:2px;font-size:12px}
  html.sc-compact .aqx-guide>div{padding:16px 18px;box-sizing:border-box;max-height:96vh;overflow:auto}
}
