/* 돈길 「월급 루팡 타이머」. 색은 var(--accent)와 밤 골목 토큰(#0b1422 바탕 · #f3f1e8 글자 · #8b97ad 보조)만
   폰: 설정 → (시작) → 카운터 한 칸씩. 넓은 창(1100px~): 왼쪽 설정 · 오른쪽 큰 카운터 */
.lp { display: grid; gap: 20px; }
.lp-set { display: flex; flex-direction: column; gap: 16px; }
.lp-pre { font-size: 13.5px; color: #8b97ad; line-height: 1.6; }
.lp-pre b { color: var(--accent); font-variant-numeric: tabular-nums; }
.lp-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* 카운터 무대: 동전이 떨어지는 캔버스 위에 큰 숫자 */
.lp-stage { position: relative; overflow: hidden; border-radius: 12px; min-height: 340px; display: flex; flex-direction: column;
  background: radial-gradient(120% 90% at 50% 100%, color-mix(in srgb, var(--accent) 16%, #0b1422), #0b1422 70%);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); }
.lp-coins { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.lp-coins[hidden] { display: none; }
.lp-live { position: relative; z-index: 1; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 28px 18px; text-align: center; }
.lp-act { font-size: 15px; color: #f3f1e8; font-weight: 700; }
.lp-num { font-family: "Black Han Sans", sans-serif; font-size: clamp(54px, 15vw, 88px); line-height: 1; color: #fff8ec; font-variant-numeric: tabular-nums; white-space: nowrap;
  text-shadow: 0 0 6px var(--accent), 0 0 24px var(--accent), 0 0 52px color-mix(in srgb, var(--accent) 60%, transparent); }
.lp-num i { font-style: normal; font-size: .42em; opacity: .75; }
.lp-num small { font-size: .42em; margin-left: .12em; }
.lp-time { font-size: 22px; font-weight: 700; color: #f3f1e8; font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.lp-rate { font-size: 14px; color: #8b97ad; line-height: 1.55; max-width: 26em; word-break: keep-all; }
.lp-stop { display: none; max-width: 320px; margin-top: 10px; font-size: 18px; padding: 17px; }
.lp[data-state="run"] .lp-stop { display: block; }
.lp-stop:focus-visible, .lp-start:focus-visible, .lp-wipe:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.lp[data-state="idle"] .lp-num { opacity: .35; }

/* 결과: 멈춘 숫자 아래에 이어서 */
.lp-out { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 16px; padding: 4px 18px 22px; }
.lp-out[hidden] { display: none; }
.lp[data-state="done"] .lp-live { display: none; } /* 멈추면 결과 숫자 하나만 남긴다 */
.lp[data-state="done"] .lp-out { padding-top: 26px; }
.lp-big { font-size: clamp(40px, 11vw, 64px); }
.lp-hist .svc-label { margin-bottom: 6px; }
.lp-hist dt { white-space: normal; }
.lp-wipe { margin-top: 8px; border: 0; background: none; color: #8b97ad; font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer; padding: 4px 0; }

/* 폰·태블릿: 한 번에 한 칸만 */
@media (max-width: 1099px) {
  .lp[data-state="idle"] .lp-stage { display: none; }
  .lp[data-state="run"] .lp-set, .lp[data-state="done"] .lp-set { display: none; }
  .lp-stage { min-height: min(520px, 70vh); }
}
/* 넓은 창: 왼쪽 설정 · 오른쪽 카운터를 크게 */
@media (min-width: 1100px) {
  .lp { grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); column-gap: 48px; align-items: stretch; }
  .lp-stage { min-height: 560px; }
  .lp-num { font-size: clamp(88px, 8vw, 132px); }
  .lp-time { font-size: 28px; }
  .lp[data-state="run"] .lp-set { opacity: .45; pointer-events: none; }
  .lp-out { padding: 4px 40px 32px; }
  .lp[data-state="done"] .lp-out { padding-top: 40px; }
  .lp-out > * { max-width: 640px; }
  .lp-big { font-size: clamp(64px, 6vw, 96px); }
}
@media (prefers-reduced-motion: reduce) { .lp-coins { display: none; } }
