/* 웹 전용 — 바탕화면 대신 하늘과 잔디를 그린다 */
html, body {
  /* 풀밭은 3D 가 그린다 (scenery.js). 여기는 하늘만 맡는다. */
  /* --sky1~3 은 오늘 날씨가 정한다 (sim/weather.js). 값이 없으면 맑은 날 색이다. */
  background: linear-gradient(var(--sky1, #8FC7F5) 0%, var(--sky2, #BFE0FA) 62%, var(--sky3, #DFF0FB) 100%);
  overscroll-behavior: none;
  -webkit-user-select: none; user-select: none;
}
body.tp-hidden #stageHost, body.tp-hidden #bubbles { display: none; }

/* 구름 — 캔버스 '위'에 얹는다. 화면 위쪽은 아주 멀어서 하늘색이 된 땅이라, 거기가 하늘 노릇을 한다.
   한 덩어리가 아니라 동그라미 대여섯 개를 겹쳐야 구름처럼 보인다. */
#clouds { position: fixed; inset: 0; z-index: 4; pointer-events: none; overflow: hidden; }
.cloud { position: absolute; pointer-events: none; filter: blur(0.4px); }
.cloud i {
  position: absolute; display: block; height: 0; border-radius: 50%;
  background: #FFFFFF;
}
body[data-wx="cloudy"] .cloud i, body[data-wx="rain"] .cloud i { background: #E6EAEE; }
body[data-wx="rain"] .cloud { filter: blur(1.6px); }
body[data-wx="hot"] .cloud { filter: blur(1px); }

/* 마당 위에 얇게 덮이는 그늘 — 숫자는 날씨가 정한다 */
#wxdim { position: fixed; inset: 0; pointer-events: none; z-index: 5;
  background: #43505C; opacity: var(--wx-dim, 0); transition: opacity .9s ease; }

/* 트레이 메뉴를 대신하는 화면 버튼 */
#webbar {
  position: absolute; top: 12px; right: 14px; display: flex; gap: 6px; z-index: 30;
  background: rgba(255,253,245,.9); border: 2px solid #2B1B0E; border-radius: 12px;
  padding: 5px 7px; box-shadow: 2px 2px 0 #2B1B0E;
}
#webbar button {
  font: inherit; font-size: 13px; border: 0; background: transparent; cursor: pointer;
  padding: 4px 8px; border-radius: 8px; box-shadow: none; color: #2B1B0E;
}
#webbar button:hover { background: #FFE9A8; }
#webbar button:active { transform: none; }
#webbar .sep { width: 1px; background: #E0D6C0; margin: 2px 2px; }

/* 처음 오는 사람을 위한 안내 */
#welcome {
  position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%);
  background: rgba(255,253,245,.96); border: 3px solid #2B1B0E; border-radius: 18px;
  padding: 22px 26px; max-width: 460px; box-shadow: 5px 5px 0 #2B1B0E; z-index: 40; text-align: center;
}
#welcome h2 { margin: 0 0 8px; font-size: 21px; }
#welcome p { margin: 6px 0; font-size: 14px; line-height: 1.65; color: #5A4A33; }
#welcome button { margin-top: 12px; font-size: 15px; padding: 9px 20px; }

/* 저장이 막힌 브라우저(시크릿 창 등) 경고 */
#nosave {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  background: #7a2f1a; color: #ffe9e0; font-size: 13px;
  padding: 9px 14px; text-align: center; line-height: 1.5;
}
#webbar button.danger { color: #8a2b16; }
#webbar button.danger:hover { background: #ffe4dc; }
#welcome .tiny { font-size: 12px; opacity: .75; line-height: 1.6; margin-top: 10px; }
#welcome .tiny a { color: inherit; }

/* 가만히 두면 버튼이 조용히 사라진다 */
#webbar { transition: opacity .55s ease, transform .55s ease; }
body.uiIdle #webbar { opacity: 0; transform: translateY(-8px); pointer-events: none; }
#webbar button.on { background: #FFD873; }

/* 버튼은 아이콘 하나만 — 화면을 마당에 내준다 */
#webbar { padding: 0; border-radius: 999px; }
#webbar button#wbMenu {
  font-size: 22px; line-height: 1; padding: 10px 13px; border-radius: 999px;
}

/* 이어하기 / 새로 시작 */
#welcome .wRow { display: flex; gap: 10px; justify-content: center; margin-top: 14px; }
#welcome .wRow button { flex: 1; max-width: 190px; white-space: nowrap; }
