/* cafe/style.css — 배터리 3%, 콘센트를 찾아라 전용 화면 요소 (공통 ui.css 위에 덧씌움) */

/* 배터리 (위 가운데) */
.cf-batt { position: absolute; left: 50%; top: calc(max(10px, env(safe-area-inset-top)) + 24px); transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: rgba(14, 10, 10, 0.72); border: 1px solid rgba(255, 80, 60, 0.45); border-radius: 16px; padding: 6px 14px 6px; text-shadow: 0 1px 2px #000; }
.cf-brow { display: flex; align-items: center; gap: 8px; }
.cf-pct { font-size: 30px; font-weight: 900; color: #ff3b30; font-variant-numeric: tabular-nums; line-height: 1; letter-spacing: -0.02em; }
.cf-dead { font-size: 12px; font-weight: 800; color: #f2e6d8; }
.cf-dead em { font-style: normal; color: #ffd54a; font-size: 14px; font-variant-numeric: tabular-nums; }
.cf-bicon { position: relative; display: inline-block; width: 38px; height: 19px; border: 2.5px solid #f2e6d8; border-radius: 5px; }
.cf-bicon::after { content: ''; position: absolute; right: -6px; top: 4px; width: 3px; height: 7px; border-radius: 0 2px 2px 0; background: #f2e6d8; }
.cf-bicon b { position: absolute; left: 2px; top: 2px; bottom: 2px; width: 10%; border-radius: 2px; background: #ff3b30; }
.cf-bicon.big { width: 74px; height: 36px; border-width: 4px; border-radius: 8px; }
.cf-bicon.big::after { right: -10px; top: 8px; width: 5px; height: 12px; }
.cf-bicon.big b { width: 9%; left: 3px; top: 3px; bottom: 3px; }
body.cf-low .cf-batt { animation: cfPulse 0.8s infinite alternate; }
body.cf-crit .cf-batt { animation: cfPulse 0.35s infinite alternate; border-color: #ff3b30; }
body.cf-charged .cf-batt { border-color: rgba(110, 230, 140, 0.6); animation: none; }
body.cf-charged .cf-pct { color: #6fe08a; font-size: 24px; }
body.cf-charged .cf-bicon b { background: #6fe08a; }
body.cf-charged .cf-dl { display: none; }
@keyframes cfPulse { to { background: rgba(120, 12, 10, 0.78); } }

/* 첫 화면 경고 (가운데 크게 → 위로 줄어듦) */
.cf-alert { position: fixed; inset: 0; z-index: 3; display: flex; align-items: center; justify-content: center; pointer-events: none; opacity: 0; }
.cf-alert.show { opacity: 1; }
.cf-alert-card { text-align: center; background: rgba(16, 8, 8, 0.82); border: 2px solid #ff3b30; border-radius: 22px; padding: 14px 26px 16px; box-shadow: 0 0 40px rgba(255, 40, 30, 0.45);
  transform: scale(1); transition: transform 0.38s ease-in, opacity 0.38s ease-in; margin-top: -8vh; }
.cf-alert.show .cf-alert-card { animation: cfPop 0.32s ease-out; }
.cf-alert.shrink .cf-alert-card { transform: translateY(-38vh) scale(0.35); opacity: 0; }
@keyframes cfPop { 0% { transform: scale(1.5); } 60% { transform: scale(0.94); } 100% { transform: scale(1); } }
.cf-alert-h { font-size: 20px; font-weight: 900; color: #fff; letter-spacing: 0.04em; }
.cf-alert-row { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 4px 0 2px; }
.cf-alert-pct { font-size: 88px; line-height: 1; font-weight: 900; color: #ff3b30; text-shadow: 0 0 24px rgba(255, 40, 30, 0.6), 0 3px 0 #000; }
.cf-alert-s { font-size: 15px; font-weight: 800; color: #f2e6d8; margin-top: 2px; }
.cf-alert-t { display: block; font-size: 46px; font-weight: 900; color: #ffd54a; font-variant-numeric: tabular-nums; line-height: 1.05; text-shadow: 0 3px 0 #000; }
@media (max-height: 520px) { .cf-alert-pct { font-size: 60px; } .cf-alert-t { font-size: 32px; } .cf-alert-card { padding: 8px 18px 10px; } }

/* 붉은 테두리 · 꺼짐 · 커피 튐 */
.cf-red { position: fixed; inset: 0; pointer-events: none; z-index: 1; opacity: 0;
  background: radial-gradient(ellipse at center, rgba(255,0,20,0) 42%, rgba(255,20,30,0.5) 78%, rgba(210,0,10,0.9)); }
.cf-dark { position: fixed; inset: 0; pointer-events: none; z-index: 3; opacity: 0; background: #020203; transition: opacity 0.25s; }
.cf-splash { position: fixed; inset: 0; pointer-events: none; z-index: 2; opacity: 0;
  background: radial-gradient(circle at 78% 92%, rgba(70,36,14,0.85) 0 9%, rgba(70,36,14,0) 16%), radial-gradient(circle at 62% 98%, rgba(80,42,16,0.8) 0 6%, rgba(80,42,16,0) 12%), radial-gradient(circle at 90% 74%, rgba(60,30,12,0.7) 0 4%, rgba(60,30,12,0) 9%); }
.cf-splash.big { background: radial-gradient(circle at 70% 85%, rgba(70,36,14,0.92) 0 22%, rgba(70,36,14,0) 38%), radial-gradient(circle at 30% 95%, rgba(80,42,16,0.85) 0 14%, rgba(80,42,16,0) 26%), radial-gradient(circle at 88% 50%, rgba(60,30,12,0.75) 0 8%, rgba(60,30,12,0) 16%), radial-gradient(circle at 45% 60%, rgba(90,48,18,0.55) 0 6%, rgba(90,48,18,0) 13%); }
.cf-splash.go { animation: cfSplash 1.1s ease-out forwards; }
.cf-splash.big.go { animation: cfSplash 2.6s ease-out forwards; }
@keyframes cfSplash { 0% { opacity: 1; } 60% { opacity: 0.85; } 100% { opacity: 0; } }

/* 안내 (아래 가운데) */
.cf-hint { position: absolute; left: 50%; bottom: calc(26px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(8px); max-width: min(92vw, 520px);
  background: rgba(10,10,14,0.74); border: 1px solid rgba(255,255,255,0.1); border-radius: 12px; padding: 8px 14px; font-size: 15px; font-weight: 800;
  text-align: center; word-break: keep-all; opacity: 0; transition: opacity 0.25s, transform 0.25s; }
.cf-hint.show { opacity: 1; transform: translateX(-50%) translateY(0); }
body.touch .cf-hint { bottom: auto; top: calc(max(10px, env(safe-area-inset-top)) + 104px); font-size: 14px; }
body.cf-on .cf-prompt { font-size: 15px; padding: 7px 14px; border: 1px solid rgba(255,213,74,0.45); top: calc(50% + 70px); white-space: normal; max-width: 86vw; text-align: center; word-break: keep-all; }

/* 머리 위 표시 (경쟁자 · 짐 싸는 중) */
.cf-tags { position: absolute; inset: 0; overflow: hidden; }
.cf-tag { position: absolute; left: 0; top: 0; font-size: 11px; font-weight: 900; padding: 3px 8px; border-radius: 999px; white-space: nowrap; will-change: transform; }
.cf-tag.rival { background: rgba(200, 30, 30, 0.85); color: #fff; }
.cf-tag.pack { background: rgba(255, 213, 74, 0.9); color: #1d1b18; }

/* 커피 출렁 막대 */
.cf-slosh .fill { background: linear-gradient(90deg, #8fd6a0, #e8d27a); }
.cf-slosh.danger .fill { background: linear-gradient(90deg, #ff9a4b, #ff3b2f); }
.cf-slosh.danger { animation: odsPulse 0.3s infinite alternate; }
.cf-ml { font-size: 11px !important; }
.cf-stolen { color: #ffb0a8; }

/* 버튼 글자 */
.ctl-btn small { font-size: 12px; font-weight: 800; }
.ctl-btn.slot-d .ctl-label { font-size: 18px; }
