/* 별 따라 낙타 달리기 — 화면 모양. 색은 base.css 토큰을 쓴다. */
.scr-body { background: var(--night); color: var(--cream); --focus: var(--gold); }
.scr-body .topbar-title { color: var(--cream); font-size: 18px; }
@media (max-width: 420px) { .scr-body .topbar-title { display: none; } } /* 10/15: 대림절 배지가 뜨면 제목이 잘리던 것 */
.scr-pnote { margin: 12px auto 24px; font-size: 11px; opacity: .7; }
.scr { display: block; }
.scr-start, #end { color: var(--cream); }
.scr-start .say-row .bubble, #end .bubble { color: var(--ink); }
.scr-lead { max-width: 30em; }
.scr-intro { width: 100%; max-width: 520px; text-align: left; }
.scr-cover { width: 100%; max-width: 420px; aspect-ratio: 16 / 9; border-radius: var(--r-card); overflow: hidden; background: linear-gradient(#7B4FA0, #2F2A6B 60%, #EBC98D 60%); position: relative; }
.scr-cover img { width: 100%; height: 100%; object-fit: cover; }
.scr-cover::before { content: "★"; position: absolute; right: 18%; top: 12%; font-size: 44px; color: var(--gold); text-shadow: 0 0 18px #FFE08A; }
.scr-cover::after { content: "그림 자리 · 낙타와 별"; position: absolute; left: 0; right: 0; bottom: 8px; font-size: 14px; font-weight: 800; color: var(--ink); opacity: .6; }
.scr-cover.has-img::before, .scr-cover.has-img::after { display: none; }

/* 놀이 화면: 상단 막대 아래를 꽉 채움. 세로 = 무대 + 아래 큰 단추, 낮은 가로 = 단추가 무대 위에 */
.scr-play { display: flex; flex-direction: column; height: calc(100svh - 80px); min-height: 300px; }
.scr-stage { position: relative; flex: 1; min-height: 0; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; background: #2F2A6B; }
#cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

.scr-hud { position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: center; gap: 8px; padding: 8px 12px; pointer-events: none; }
.hud-pill { flex: none; min-width: 64px; height: 44px; padding: 0 12px; border-radius: 999px; display: flex; align-items: center; justify-content: center; gap: 2px; white-space: nowrap; background: rgba(18, 24, 56, .72); color: var(--cream); font-size: 20px; font-weight: 900; font-variant-numeric: tabular-nums; }
.hud-time::before { content: ""; }
.hud-count::before { content: "★"; font-size: 18px; color: var(--gold); margin-right: 2px; }
.hud-time.hurry { background: var(--joy); animation: jw-breathe .5s infinite; }
.hud-pill.bump { animation: jw-hop .3s; }
.hud-prog { position: relative; flex: 1; min-width: 40px; height: 14px; border-radius: 999px; background: rgba(18, 24, 56, .72); }
.hud-prog i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: inherit; background: var(--gold); }
.hud-prog b { position: absolute; right: -6px; top: 50%; transform: translateY(-50%); color: var(--gold); font-size: 24px; line-height: 1; text-shadow: 0 0 8px #FFE08A; }
.hud-pause { pointer-events: auto; width: 48px; height: 48px; font-size: 20px; background: var(--cream); color: var(--ink); }

/* 콤보 배지: 오른쪽 위 (시우 말풍선과 안 겹치게) */
.scr-combo { position: absolute; right: 10px; top: 62px; margin: 0; padding: 4px 14px; border-radius: 999px; background: var(--joy); color: var(--cream); font-size: 20px; font-weight: 900; pointer-events: none; box-shadow: 0 4px 0 rgba(0, 0, 0, .25); }
.scr-combo.bump { animation: jw-hop .25s; }
/* 처음 나오는 장애물 알림 */
.scr-tut.scr-tip { background: var(--gold); font-size: 20px; font-weight: 900; box-shadow: 0 5px 0 var(--gold-dark); animation: scr-pop .25s ease-out; }

/* 시우 말풍선: HUD 아래 왼쪽, 놀이를 가리지 않게 작게 */
.scr-say { position: absolute; left: 10px; right: 34%; top: 60px; pointer-events: none; }
.scr-say .say-row { margin: 0; align-items: center; }
.scr-say .say-fig { width: 40px; height: 48px; font-size: 11px; }
.scr-say .bubble { flex: 0 1 auto; font-size: 16px; padding: 6px 12px; }
.scr-say:empty { display: none; }
.scr-say .say-row { animation: scr-pop .25s ease-out; }
@keyframes scr-pop { from { transform: scale(.8); opacity: 0; } }

.scr-banner { position: absolute; left: 50%; top: 30%; transform: translate(-50%, -50%); width: max-content; max-width: calc(100% - 32px); padding: 10px 22px; border-radius: 999px; background: var(--gold); color: var(--ink); font-size: 22px; font-weight: 900; text-align: center; box-shadow: 0 6px 0 var(--gold-dark); pointer-events: none; animation: scr-pop .3s ease-out; }
.scr-banner small { display: block; font-size: 14px; font-weight: 800; }
.scr-tut { position: absolute; left: 50%; top: 48%; transform: translate(-50%, -50%); width: max-content; max-width: calc(100% - 24px); padding: 8px 16px; border-radius: 16px; background: rgba(255, 246, 227, .94); color: var(--ink); font-size: 16px; font-weight: 800; text-align: center; pointer-events: none; }

.scr-pause { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 16px; background: rgba(18, 24, 56, .7); font-size: 24px; font-weight: 900; }

.scr-pad { flex: none; display: flex; gap: 12px; padding: 12px 12px calc(12px + env(safe-area-inset-bottom)); background: var(--night-dark); touch-action: none; }
.pad { flex: 1; min-height: 84px; border: 0; border-radius: 24px; font-size: 22px; font-weight: 900; cursor: pointer; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: none; box-shadow: 0 6px 0 rgba(0, 0, 0, .35); }
.pad span { font-size: 18px; }
.pad-duck { background: var(--lake); color: var(--cream); }
.pad-jump { background: var(--gold); color: var(--ink); flex: 1.4; }
.pad.on { transform: translateY(4px); box-shadow: 0 2px 0 rgba(0, 0, 0, .35); }

/* 낮은 가로 화면(휴대폰 가로): 단추를 무대 양옆 기둥으로 (다가오는 장애물을 가리지 않게) */
@media (max-height: 520px) and (orientation: landscape) {
  .scr-body .topbar { padding: 4px 12px; }
  .scr-body .icon-btn { width: 44px; height: 44px; font-size: 20px; }
  .scr-play { display: grid; grid-template-columns: 104px 1fr 104px; height: calc(100svh - 52px); }
  .scr-stage { grid-column: 2; grid-row: 1; }
  .scr-pad { display: contents; }
  .pad { grid-row: 1; min-height: 0; margin: 8px; font-size: 17px; display: grid; place-content: center; gap: 4px; }
  .pad-duck { grid-column: 1; margin-left: max(8px, env(safe-area-inset-left)); }
  .pad-jump { grid-column: 3; margin-right: max(8px, env(safe-area-inset-right)); }
  .scr-play { background: var(--night-dark); }
  /* 낮은 화면: 낙타는 왼쪽 1/3에서 뛰어오르니(10/17 가운데 글이 박사·시우 얼굴을 덮음) 단계 글·말풍선은 오른쪽, 조작 안내는 낙타 위 하늘 */
  .scr-banner { top: 62%; left: 68%; max-width: 58%; font-size: 19px; }
  .scr-tut { top: 30%; max-width: 72%; }
  .scr-say { left: 52%; right: 10px; top: 104px; } /* 왼쪽 위에 두면 뛰어오른 낙타 위 박사·시우를 덮음 → 오른쪽, 연속 표시(콤보) 아래 */
}
@media (min-width: 900px) { .pad { max-width: 360px; } .scr-pad { justify-content: center; } }

/* 끝 화면 */
.scr-tally { width: 100%; max-width: 420px; display: grid; gap: 12px; padding: 16px; border-radius: var(--r-card); background: var(--cream); color: var(--ink); text-align: center; }
.scr-tally-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 16px; }
.scr-gift { display: grid; justify-items: center; gap: 4px; font-weight: 800; font-size: 15px; }
.scr-gift i { width: 40px; height: 40px; display: grid; place-items: center; font-style: normal; font-size: 30px; line-height: 1; }
.scr-gift--star i, .scr-gift--big i, .scr-gift--gem i { background: center / contain no-repeat; }
.scr-gift--star i { background-image: url(../../assets/img/play/star-camel-run/star.webp); width: 34px; }
.scr-gift--big i { background-image: url(../../assets/img/play/star-camel-run/big.webp); width: 46px; height: 46px; }
.scr-gift--gem i { background-image: url(../../assets/img/play/star-camel-run/gem.webp); }
.scr-gift--combo i::before { content: "★"; color: #F6B73C; font-size: 26px; }
.scr-gift b { font-size: 22px; font-weight: 900; }
.scr-total { font-size: 20px; font-weight: 900; }
.scr-verse { margin: 0; padding: 14px 16px; border-radius: 16px; background: var(--advent-dark); color: var(--cream); font-size: 18px; font-weight: 700; line-height: 1.5; text-align: left; }
.scr-verse cite { display: block; margin-top: 6px; font-size: 15px; font-style: normal; color: var(--gold); }
.scr-offer { font-size: 16px; line-height: 1.5; text-align: left; }

/* 가로 휴대폰: 그림 왼쪽, 제목·설명·시작 오른쪽 (시작 단추가 첫 화면 안, 고칠 일 1) */
@media (orientation: landscape) and (max-height: 500px) {
  .play-start { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-auto-flow: dense; align-items: center; gap: 10px 20px; padding: 8px 0; }
  .play-start > * { grid-column: 2; }
  .play-start > .scr-cover { grid-column: 1; grid-row: 1 / span 9; width: min(100%, calc((100svh - 110px) * 16 / 9)); justify-self: center; padding: 8px; }
}
