/* 오래된 크롬(LG V30)에서도 돌도록 inset · gap · min() · aspect-ratio 를 쓰지 않는다 */
* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0; height: 100%; overflow: hidden;
  background: #FFFAF2; color: #33302C;
  font-family: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  -webkit-user-select: none; user-select: none;
  -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none;
}
.screen { position: absolute; top: 0; left: 0; right: 0; bottom: 0; }
.hidden { display: none !important; }

/* 처음 화면 */
#home { touch-action: none; overflow: hidden; padding: 16px; text-align: center; }
.title { font-size: 34px; margin: 22px 0 18px; letter-spacing: 3px; color: #FF7A45; font-weight: 900; }
#gameList { max-width: 520px; margin: 0 auto; }
.gcard {
  display: flex; align-items: center; text-align: left;
  background: #fff; border-radius: 24px; padding: 14px 16px; margin: 0 0 16px;
  box-shadow: 0 6px 0 #F3E3C8, 0 10px 24px rgba(255,166,77,.12);
}
.gcard:active { -webkit-transform: translateY(3px); transform: translateY(3px); box-shadow: 0 2px 0 #F3E3C8; }
.gicon { width: 118px; height: 70px; flex: 0 0 auto; margin-right: 16px; }
.gicon svg { width: 100%; height: 100%; display: block; }
.gname { font-size: 26px; font-weight: 700; }
.glvl { font-size: 15px; color: #9A8B78; margin-top: 4px; }
.miniflags { position: relative; width: 118px; height: 70px; }
.miniflags svg { position: absolute; width: 62px; height: 42px; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.lock { position: absolute; right: 12px; bottom: 12px; width: 52px; height: 52px; opacity: .35; }
.lock svg { position: absolute; top: 0; left: 0; width: 52px; height: 52px; }
.lock span { position: absolute; top: 0; left: 0; width: 52px; height: 52px; line-height: 52px; text-align: center; font-size: 22px; }
.lock.holding { opacity: 1; }

/* 게임 화면 */
#play { touch-action: none; }
.topbar { position: absolute; top: 0; left: 0; right: 0; height: 66px; display: flex; align-items: center; padding: 0 10px; }
.iconbtn {
  width: 54px; height: 54px; border-radius: 18px; background: #fff;
  font-size: 28px; line-height: 54px; text-align: center; box-shadow: 0 4px 0 #F3E3C8; flex: 0 0 auto;
}
.dots { flex: 1 1 auto; text-align: center; }
.dot { display: inline-block; width: 20px; height: 20px; border-radius: 10px; margin: 0 5px; background: #F1E6D3; vertical-align: middle; }
.dot.on { background: #FFB020; box-shadow: 0 0 0 4px rgba(255,176,32,.22); }
.lvl { width: 54px; text-align: right; font-size: 15px; color: #8A7D6E; flex: 0 0 auto; }
#stage { position: absolute; top: 66px; left: 0; right: 0; bottom: 0; overflow: hidden; }
#stage > svg { position: absolute; top: 0; left: 0; touch-action: none; }
.banner {
  position: absolute; left: 0; right: 0; top: 38%; text-align: center;
  font-size: 46px; font-weight: 900; color: #FF7A45; pointer-events: none;
}
#fx { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 50; }

/* 국기 게임 */
.fbox { position: absolute; background: #fff; border-radius: 10px; padding: 8px; box-shadow: 0 4px 10px rgba(0,0,0,.12); }
.fbox svg { display: block; width: 100%; height: 100%; }
.nbtn {
  position: absolute; background: #fff; border-radius: 20px; text-align: center; font-weight: 700;
  box-shadow: 0 6px 0 #F3E3C8, 0 10px 24px rgba(255,166,77,.12); color: #3A3129; white-space: nowrap; overflow: hidden;
}
.nbtn.ok { background: #2FCB7A; color: #fff; box-shadow: 0 6px 0 #1EA35E; }
.nbtn.no { opacity: .35; }
.nbtn.hint { -webkit-animation: hint 1s ease-in-out 3; animation: hint 1s ease-in-out 3; }
@-webkit-keyframes hint { 50% { box-shadow: 0 0 0 8px #FFB020; } }
@keyframes hint { 50% { box-shadow: 0 0 0 8px #FFB020; } }
.qname { position: absolute; left: 0; right: 0; text-align: center; font-weight: 800; color: #3A3129; }
.speak { display: inline-block; margin-left: 12px; font-size: .7em; vertical-align: middle; background: #fff; border-radius: 14px; padding: 2px 10px; box-shadow: 0 3px 0 #F3E3C8; }
.newtag { position: absolute; left: 0; right: 0; text-align: center; font-size: 20px; color: #FF7A45; font-weight: 800; }
.nextbtn {
  position: absolute; background: #FFB020; color: #fff; border-radius: 24px; text-align: center;
  font-weight: 800; box-shadow: 0 6px 0 #E8930A;
}

/* 엄마 설정 */
#mom { overflow-y: auto; -webkit-overflow-scrolling: touch; touch-action: pan-y; background: #FFFAF2; padding: 14px 14px 60px; font-size: 17px; -webkit-user-select: auto; user-select: auto; }
.momhead { display: flex; align-items: center; justify-content: space-between; margin: 0 0 12px; font-size: 22px; }
.box { background: #fff; border-radius: 14px; padding: 12px 14px; margin: 0 0 14px; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.box h3 { margin: 0 0 8px; font-size: 19px; }
.row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; margin: 8px 0; }
.row > span { margin-right: 10px; }
.box select { font-size: 16px; padding: 6px; max-width: 100%; }
.box input[type=checkbox] { width: 24px; height: 24px; }
.box input[type=range] { width: 200px; }
button.b { font-size: 17px; padding: 9px 14px; border-radius: 10px; border: 1px solid #D8CDBA; background: #fff; color: #3A3129; margin: 3px 6px 3px 0; }
button.b.sm { padding: 6px 14px; font-size: 20px; }
button.b.on { background: #FFB020; color: #fff; border-color: #FFB020; }
.note { font-size: 15px; color: #7A6E60; line-height: 1.55; }

/* 시작 단계 고르기 */
.ptitle { font-size: 20px; font-weight: 800; color: #FF7A45; }
.lvbtn {
  position: absolute; background: #fff; border-radius: 20px; text-align: center; overflow: hidden; padding: 4px 6px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  box-shadow: 0 6px 0 #F3E3C8, 0 10px 24px rgba(255,166,77,.12);
}
.lvbtn:active { -webkit-transform: translateY(3px); transform: translateY(3px); }
.lvnum { font-weight: 900; line-height: 1.1; }
.lvname { color: #8A7D6E; line-height: 1.25; margin-top: 4px; word-break: keep-all; }
.lvbtn.cur { background: #FFB020; color: #fff; box-shadow: 0 6px 0 #E8930A, 0 0 0 5px rgba(255,176,32,.25); }
.lvbtn.cur .lvname { color: #fff; }
/* 블록 내리기 단추 */
.bbtn { position: absolute; background: #fff; border-radius: 24px; box-shadow: 0 6px 0 #F3E3C8, 0 10px 24px rgba(255,166,77,.12); }
.bbtn svg { display: block; width: 100%; height: 100%; }
.bbtn:active { -webkit-transform: translateY(3px); transform: translateY(3px); box-shadow: 0 2px 0 #F3E3C8; }