/* Life count and refill dialog share the existing game chrome and safe areas. */
.game-heading.has-lives-hud { position:relative; }
.lives-hud {
  position:relative;display:flex;align-items:center;justify-content:center;gap:4px;min-width:88px;
  min-height:44px;height:44px;padding:13px 6px 0;border:0;border-radius:11px;
  color:#92283e;background:transparent;box-shadow:none;font-weight:900;
  font-variant-numeric:tabular-nums;white-space:nowrap;
}
.lives-hud::before {
  content:'';position:absolute;left:0;right:0;bottom:0;height:31px;pointer-events:none;
  border:1px solid #ffc2c6;border-radius:11px;background:linear-gradient(#fff4ed,#ffd1d4);
  box-shadow:inset 0 1px 0 #fff,0 2px 0 #77354a66;
}
.lives-hud > * { position:relative; }
.lives-hud svg { width:19px;height:19px;fill:#e34a68;stroke:#b83050;stroke-width:1.2;flex:none; }
.lives-hud strong { min-width:16px;font-size:13px;line-height:1; }
.lives-hud #lives-timer { min-width:29px;font-size:8px;line-height:1.1;text-align:center; }
.lives-hud.is-unlimited strong { font-size:19px; }
.lives-hud.is-empty::before { background:linear-gradient(#ffe3e3,#f9a5b1);border-color:#ffdadb; }
.lives-hud:disabled { opacity:.8; }
.lives-hud:active:not(:disabled) { transform:translateY(1px); }

.immersive-game .game-heading.has-lives-hud {
  flex-basis:72px;min-height:72px;height:72px;
}
.immersive-game .game-heading.has-lives-hud > .icon-button {
  position:absolute;left:max(12px,var(--safe-left));top:13px;
}
.immersive-game .game-heading.has-lives-hud > div:nth-child(2) {
  position:static;align-self:flex-start;padding:0;margin:0;min-width:0;
}
.immersive-game .game-heading.has-lives-hud #world-label,
.immersive-game .game-heading.has-lives-hud #level-title {
  position:absolute;left:calc(max(12px,var(--safe-left)) + 54px);
  right:calc(max(12px,var(--safe-right)) + 84px);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.immersive-game .game-heading.has-lives-hud #world-label { top:6px;max-height:12px; }
.immersive-game .game-heading.has-lives-hud #level-title { top:20px;max-height:20px; }
.immersive-game .game-heading.has-lives-hud .level-counter { top:6px; }
.immersive-game .game-heading.has-lives-hud .coin-hud {
  right:max(12px,var(--safe-right));bottom:3px;min-width:80px;max-width:90px;
  min-height:31px;height:31px;padding:3px 6px;
}
.immersive-game .game-heading.has-lives-hud .coin-hud strong { overflow:hidden;text-overflow:ellipsis; }
.immersive-game .game-heading.has-lives-hud .lives-hud {
  position:absolute;right:calc(max(12px,var(--safe-right)) + 98px);bottom:3px;
  min-width:88px;width:88px;height:44px;min-height:44px;
}

.lives-overview {
  display:grid;grid-template-columns:42px auto;justify-content:center;align-items:center;
  column-gap:10px;row-gap:4px;padding:17px 12px 15px;margin-bottom:15px;
  border:1px solid #f2b8bc;border-radius:19px;background:linear-gradient(145deg,#fff4ee,#ffe0de);
}
.lives-overview > svg,.lives-confirm-icon > svg {
  width:42px;height:42px;fill:#e85170;stroke:#bc2e51;stroke-width:1;
  filter:drop-shadow(0 3px 0 #b8465538);
}
.lives-overview > strong { color:#8e3047;font-size:30px;line-height:1;font-variant-numeric:tabular-nums; }
.lives-overview > p { grid-column:1/-1;color:#784557;font-size:12px;text-align:center;font-weight:700;font-variant-numeric:tabular-nums; }
.lives-current-rule { color:#4b5770;font-size:12px;line-height:1.55;margin:0 0 15px; }
.lives-actions { display:flex;flex-direction:column;gap:8px; }
.lives-actions .primary-button { background:linear-gradient(#e16b97,#ba416f);color:#fff;box-shadow:0 3px 0 #872b4f; }
.lives-actions .primary-button:hover:not(:disabled) { background:linear-gradient(#e67fa5,#c44d7c); }
.lives-actions .secondary-button { background:linear-gradient(#fff6cf,#ffdf9a);border:1px solid #dfb768;color:#774824; }
.lives-note { font-size:11px;line-height:1.5;color:#697184;margin:0 0 5px; }
.lives-wallet { margin:0;text-align:center;font-size:11px;color:#80603b;font-weight:800; }
.lives-rules { border-top:1px solid #ddcfba;border-bottom:1px solid #ddcfba;padding:10px 0;margin:16px 0 12px; }
.lives-rules summary { min-height:24px;cursor:pointer;color:#455675;font-size:12px;font-weight:800;line-height:24px; }
.lives-rules p { margin:8px 0 0;color:#617086;font-size:11px;line-height:1.6; }
.lives-return { margin-top:4px; }
.lives-confirm-icon { display:flex;justify-content:center;margin:0 0 15px; }
.lives-confirm-price { color:#3b4762;font-weight:800;font-size:16px;line-height:1.5;text-align:center;margin:0 0 12px; }
#lives-confirm-wallet { text-align:center;margin-bottom:18px; }
#lives-confirm-note { text-align:center;margin-top:13px; }
.lives-loading { color:#526078;font-size:14px;line-height:1.7;min-height:64px;padding:10px 0; }
.life-result-note {
  margin:12px 0 16px;padding:9px 12px;border:1px solid #eec4cb;border-radius:12px;
  background:#fff0ed;color:#8a334a;font-size:12px;line-height:1.5;font-weight:800;
  text-align:center;font-variant-numeric:tabular-nums;
}
.lives-shortcut { width:100%;min-height:44px;margin:16px 0 0;font-size:13px; }

@media(max-width:360px) {
  .immersive-game .game-heading.has-lives-hud > .icon-button { left:8px; }
  .immersive-game .game-heading.has-lives-hud #world-label,
  .immersive-game .game-heading.has-lives-hud #level-title { left:58px;right:84px; }
  .immersive-game .game-heading.has-lives-hud .coin-hud { right:8px;min-width:76px;max-width:86px; }
  .immersive-game .game-heading.has-lives-hud .lives-hud { right:102px; }
  .lives-overview { padding:13px 9px; }
  .lives-confirm-price { font-size:15px; }
}
@media(max-height:700px) and (orientation:portrait) {
  .immersive-game .game-heading.has-lives-hud { flex-basis:68px;min-height:68px;height:68px; }
  .immersive-game .game-heading.has-lives-hud #world-label { top:3px; }
  .immersive-game .game-heading.has-lives-hud #level-title { top:16px;max-height:17px; }
  .immersive-game .game-heading.has-lives-hud > .icon-button { top:10px; }
}
@media(orientation:landscape) and (max-height:600px) {
  .immersive-game .game-heading.has-lives-hud { width:300px;height:68px;min-height:68px; }
  .immersive-game .game-heading.has-lives-hud > .icon-button { left:8px;top:10px; }
  .immersive-game .game-heading.has-lives-hud #world-label,
  .immersive-game .game-heading.has-lives-hud #level-title { left:62px;right:85px; }
  .immersive-game .game-heading.has-lives-hud #world-label { top:2px; }
  .immersive-game .game-heading.has-lives-hud #level-title { top:15px;font-size:13px!important; }
  .immersive-game .game-heading.has-lives-hud .coin-hud { right:8px;min-width:76px;max-width:86px; }
  .immersive-game .game-heading.has-lives-hud .lives-hud { right:102px; }
  .immersive-game .game-shell:has(.has-lives-hud) .challenge-strip { top:calc(var(--safe-top) + 76px); }
}
