/* 구멍 삼키기 */
.stage.hl { background: #4e7d44; touch-action: none; overscroll-behavior: none; user-select: none; -webkit-user-select: none; }
.hl-cv { position: absolute; inset: 0; display: block; touch-action: none; cursor: crosshair; }

.hl-hud { position: absolute; left: 8px; top: 8px; z-index: 2; display: flex; gap: 6px; align-items: stretch; }
.hl-box { min-width: 66px; padding: 3px 10px 4px; border-radius: 12px; text-align: center; pointer-events: none;
  background: rgba(20, 24, 44, 0.62); border: 1px solid rgba(255, 255, 255, 0.14); }
.hl-box span { display: block; font-size: 11px; color: #c9cde6; letter-spacing: 0.04em; white-space: nowrap; }
.hl-box b { display: block; font-family: var(--title); font-weight: 400; font-size: 22px; line-height: 1.15; color: #fff; font-variant-numeric: tabular-nums; }
.hl-tbox b { color: #9fe0ff; }
.hl-tbox.hurry { background: rgba(200, 40, 50, 0.72); animation: hl-beat 1s ease-in-out infinite; }
.hl-tbox.hurry b { color: #fff; }
@keyframes hl-beat { 50% { transform: scale(1.07); } }
.hl-pause { width: 42px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.14); background: rgba(20, 24, 44, 0.62);
  display: flex; align-items: center; justify-content: center; gap: 5px; cursor: pointer; padding: 0; }
.hl-pause i { display: block; width: 5px; height: 16px; border-radius: 2px; background: #fff; }
.hl-pause:active { transform: scale(0.94); }

/* 정리하기: 위쪽 가운데 진행 막대 */
.hl-prog { position: absolute; top: 10px; right: 10px; z-index: 2; width: min(46vw, 300px); display: flex; align-items: center; gap: 8px; pointer-events: none;
  background: rgba(20, 24, 44, 0.62); border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 14px; padding: 8px 10px; }
.hl-prog[hidden] { display: none; }
.hl-bar { position: relative; flex: 1; height: 14px; border-radius: 7px; background: rgba(255, 255, 255, 0.14); }
.hl-bar i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 7px; background: linear-gradient(90deg, #17d3b0, #9fe0ff); transition: width 0.15s; }
.hl-bar em { position: absolute; top: 50%; transform: translate(-50%, -54%); font-style: normal; font-size: 15px; color: rgba(255, 255, 255, 0.35); text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); }
.hl-bar em.on { color: #ffc83d; }
.hl-prog b { font-family: var(--title); font-weight: 400; font-size: 20px; color: #fff; min-width: 44px; text-align: right; font-variant-numeric: tabular-nums; }

/* 알림 띠 · 첫 판 안내 · 삼켜졌을 때 */
.hl-toast { position: absolute; left: 50%; top: 64px; z-index: 3; transform: translate(-50%, -14px); opacity: 0; pointer-events: none; white-space: nowrap;
  padding: 8px 18px; border-radius: 999px; background: rgba(20, 24, 44, 0.82); color: #fff; font-family: var(--title); font-size: 19px;
  border: 1px solid rgba(255, 200, 61, 0.6); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3); transition: opacity 0.25s, transform 0.25s; }
.hl-toast.on { opacity: 1; transform: translate(-50%, 0); }
.hl-hint { position: absolute; left: 50%; bottom: 13%; z-index: 3; transform: translateX(-50%); pointer-events: none; text-align: center;
  padding: 10px 20px; border-radius: 16px; background: rgba(20, 24, 44, 0.78); color: #fff; font-size: 16px; font-weight: 700;
  max-width: calc(100% - 32px); animation: hl-float 1.6s ease-in-out infinite; }
@keyframes hl-float { 50% { transform: translate(-50%, -6px); } }
.hl-dead { position: absolute; left: 50%; top: 42%; z-index: 3; transform: translate(-50%, -50%); text-align: center; pointer-events: none;
  padding: 14px 24px; border-radius: 18px; background: rgba(20, 24, 44, 0.8); color: #fff; }
.hl-dead b { display: block; font-family: var(--title); font-weight: 400; font-size: 24px; }
.hl-dead span { display: block; font-size: 15px; color: #c9cde6; margin-top: 2px; }
.hl-hint[hidden], .hl-dead[hidden] { display: none; }

/* 시작 · 멈춤 · 끝 화면 */
.hl .overlay { background: rgba(16, 22, 40, 0.48); z-index: 10; }
.hl .panel { touch-action: pan-y; }
.hl-art { display: block; width: 220px; height: auto; margin: -8px auto 0; }
.hl .panel h2 { margin-top: 2px; }
.hl-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 4px 0 12px; }
.hl-mode { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 12px 8px 10px; border: 0; border-radius: 16px; cursor: pointer; color: #fff;
  background: linear-gradient(135deg, #6a77ff, #4350e0); box-shadow: 0 8px 20px rgba(79, 91, 234, 0.35); font: inherit; }
.hl-mode.b-clean { background: linear-gradient(135deg, #22d2b2, #0fa58f); box-shadow: 0 8px 20px rgba(15, 165, 143, 0.32); }
.hl-mode b { font-family: var(--title); font-weight: 400; font-size: 22px; line-height: 1.1; }
.hl-mode span { font-size: 12.5px; line-height: 1.3; opacity: 0.92; }
.hl-mode small { font-size: 12px; color: #fff3c2; min-height: 1em; }
.hl-mode:hover { filter: brightness(1.07); }
.hl-mode:active { transform: scale(0.97); }
.hl .panel ul { font-size: 14px; line-height: 1.5; margin-bottom: 4px; }
.hl .panel .stats { margin: 10px 0 12px; }
.hl-stars { display: flex; justify-content: center; gap: 6px; margin: 2px 0 4px; }
.hl-stars[hidden] { display: none; }
.hl-stars i { font-style: normal; font-size: 40px; line-height: 1; color: #dfe2ee; }
.hl-stars i.on { color: #ffc83d; text-shadow: 0 2px 8px rgba(255, 200, 61, 0.5); animation: hl-star 0.4s ease-out both; }
.hl-stars i.on:nth-child(2) { animation-delay: 0.15s; }
.hl-stars i.on:nth-child(3) { animation-delay: 0.3s; }
@keyframes hl-star { from { transform: scale(0.2) rotate(-30deg); } 70% { transform: scale(1.25); } }
.hl-rank { list-style: none; margin: 0 0 8px; padding: 0; text-align: left; font-size: 13.5px; columns: 2; column-gap: 6px; }
.hl-rank[hidden] { display: none; }
.hl-rank li { display: flex; align-items: center; gap: 6px; padding: 3px 8px; border-radius: 9px; break-inside: avoid; }
.hl-rank li { background: var(--panel-2); margin-bottom: 4px; }
.hl-rank li.me { background: var(--main-soft); color: var(--main-ink); font-weight: 800; }
.hl-rank li i { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.hl-rank li span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hl-rank li b { font-variant-numeric: tabular-nums; }

@media (max-width: 380px) {
  .hl-box { min-width: 54px; padding: 2px 7px 3px; }
  .hl-box b { font-size: 19px; }
  .hl-mode b { font-size: 19px; }
}
@media (max-width: 520px) {
  .hl-prog { top: auto; bottom: 12px; right: 50%; transform: translateX(50%); width: min(80vw, 320px); }
}
@media (max-height: 600px) {
  .hl-art { width: 160px; }
  .hl .panel { padding: 14px 18px; }
  .hl .panel h2 { font-size: 28px; }
  .hl .panel ul { font-size: 13px; }
}
@media (max-height: 460px) {
  .hl-art { display: none; }
  .hl .panel h2 { font-size: 24px; margin-top: 0; }
  .hl .panel ul { display: none; }
  .hl-rank { font-size: 13px; }
  .hl-rank li { padding: 2px 8px; }
  .hl .panel .stats { margin: 6px 0 8px; }
  .hl .panel .stats b { font-size: 21px; }
}
/* 눕힌 폰: 끝 화면을 넓게 */
@media (max-height: 460px) and (min-width: 600px) {
  .hl .panel { width: min(600px, 100%); }
}
.stage.hl.hl-idle .hl-hud, .stage.hl.hl-idle .hl-prog { display: none; }
