.hidden-for-play { display: none !important; }
#hud .hud-root, .hud-root { position: absolute; inset: 0; pointer-events: none; font-family: var(--font); font-weight: 900; color: #fff; }
.hud-root * { box-sizing: border-box; }
.hud-txt { color: #fff; -webkit-text-stroke: 0.14em #7a3b52; paint-order: stroke fill; text-shadow: 0 3px 0 rgba(122,59,82,.6); font-weight: 900; }
.hud-hp { position: absolute; left: 68px; top: 12px; display: flex; align-items: center; gap: 6px; }
.hud-heart { font-size: clamp(20px, 4vh, 30px); color: #ff8fab; line-height: 1; }
.hud-hpbar { width: min(20vw, 240px); height: 16px; border-radius: 10px; background: rgba(255,244,236,.8); border: 3px solid #7a3b52; overflow: hidden; box-shadow: 0 3px 0 rgba(122,59,82,.5), inset 0 3px 0 rgba(255,255,255,.7); position: relative; }
.hud-hpfill { height: 100%; width: 100%; border-radius: 8px; background: linear-gradient(90deg, #ffb3c7, #bfe8d8); transition: width .15s; }
.hud-hpfill.low { background: linear-gradient(90deg, #ff6f8f, #ffb3c7); animation: hudBlink .5s infinite alternate; }
@keyframes hudBlink { to { filter: brightness(1.3); } }
.hud-hpname { position: absolute; left: 0; right: 0; top: 100%; display:none; }
.hud-top { position: absolute; left: 50%; top: 6px; transform: translateX(-50%); text-align: center; display: flex; flex-direction: column; align-items: center; min-width: 30vw; }
.hud-score { font-size: clamp(22px, 4.2vh, 40px); line-height: 1.05; font-variant-numeric: tabular-nums; }
.hud-timer { font-size: clamp(22px, 4.6vh, 44px); line-height: 1.05; color: #fff3a8; transition: transform .1s; }
.hud-timer.red { color: #ff6f8f; animation: hudBlink .4s infinite alternate; }
.hud-sub { font-size: max(13px, 2.2vh); line-height: 1.2; opacity: .95; white-space: nowrap; }
.hud-prog { width: min(28vw, 260px); height: 6px; margin-top: 3px; border-radius: 4px; background: rgba(122,59,82,.45); overflow: hidden; }
.hud-progfill { height: 100%; width: 0; background: linear-gradient(90deg, #ffb3c7, #fff3a8, #bfe8d8); }
.hud-combo { position: absolute; left: 50%; top: 30%; transform: translate(-50%, -50%); text-align: center; opacity: 0; line-height: 1; }
.hud-combo .n { font-size: clamp(34px, 9vh, 80px); display: block; }
.hud-combo .l { font-size: clamp(14px, 3vh, 26px); display: block; color: #fff3a8; }
.hud-pop { position: absolute; left: 0; top: 0; opacity: 0; white-space: nowrap; font-size: clamp(18px, 4vh, 34px); transform: translate(-50%, -50%); }
.hud-pop.perfect { background: linear-gradient(90deg, #ff8fab, #fff3a8, #bfe8d8, #a8d8ff, #c9b8ff); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-stroke: 0; filter: drop-shadow(0 2px 0 #7a3b52) drop-shadow(0 0 1px #7a3b52) drop-shadow(0 0 1px #7a3b52); }
.hud-pop.great { color: #bfe8d8; }
.hud-pop.good { color: #fff3a8; }
.hud-pop.miss { color: #b7aec4; }
.hud-pop.broken { color: #c9b8ff; }
.hud-pop.plus { color: #fff3a8; }
.hud-pop.chord { font-size: clamp(30px, 8vh, 70px); background: linear-gradient(90deg, #ff8fab, #fff3a8, #bfe8d8, #a8d8ff, #c9b8ff); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-stroke: 0; filter: drop-shadow(0 3px 0 #7a3b52) drop-shadow(0 0 2px #7a3b52); }
.hud-count { position: absolute; left: 50%; top: 45%; transform: translate(-50%, -50%); font-size: clamp(60px, 18vh, 160px); opacity: 0; }
.hud-bubble { position: absolute; transform: translate(-50%, -100%); padding: 6px 12px; border-radius: 14px; background: #fff4ec; color: #7a3b52; border: 3px solid #7a3b52; font-size: max(14px, 2.4vh); white-space: nowrap; display: none; animation: hudBob .8s infinite alternate ease-in-out; }
.hud-bubble::after { content: ""; position: absolute; left: 50%; top: 100%; margin-left: -7px; border: 7px solid transparent; border-top-color: #7a3b52; }
@keyframes hudBob { to { margin-top: -8px; } }
.hud-hint { position: absolute; left: 50%; top: max(76px, 15%); transform: translateX(-50%); display: none; max-width: 70vw; text-align: center; font-size: max(15px, 3vh); }
.hud-loading { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); padding: 8px 18px; border-radius: 20px; background: rgba(255,244,236,.9); color: #7a3b52; border: 3px solid #7a3b52; font-size: max(15px, 3vh); display: none; }
.pl-revive { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); pointer-events: auto; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 22px 28px; min-width: min(60vw, 420px); animation: plPop .28s cubic-bezier(.3,1.5,.5,1); }
.pl-revive .t { font-size: clamp(22px, 5vh, 40px); color: #fff; -webkit-text-stroke: 0.14em #7a3b52; paint-order: stroke fill; text-shadow: 0 3px 0 rgba(122,59,82,.6); }
.pl-revive .btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 48px; cursor: pointer; }
.pl-revive .btn img { height: 1.6em; width: 1.6em; object-fit: contain; }
@keyframes plPop { from { transform: translate(-50%, -50%) scale(.5); opacity: 0; } to { transform: translate(-50%, -50%) scale(1); opacity: 1; } }
.pl-result { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; pointer-events: auto; background: rgba(90,40,70,.35); font-family: var(--font); font-weight: 900; animation: plFade .25s; }
@keyframes plFade { from { opacity: 0; } }
.pl-rank { font-size: clamp(80px, 26vh, 240px); line-height: 1; -webkit-text-stroke: 0.08em #7a3b52; paint-order: stroke fill; text-shadow: 0 6px 0 rgba(122,59,82,.7); animation: plSlam .5s cubic-bezier(.3,1.6,.5,1); }
.pl-rank.S { background: linear-gradient(90deg, #ff8fab, #fff3a8, #bfe8d8, #a8d8ff, #c9b8ff); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-stroke: 0; filter: drop-shadow(0 5px 0 #7a3b52) drop-shadow(0 0 3px #7a3b52); }
.pl-rank.A { color: #ff8fab; } .pl-rank.B { color: #bfe8d8; } .pl-rank.C { color: #c9b8ff; }
@keyframes plSlam { from { transform: scale(3); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.pl-title { font-size: clamp(22px, 5.5vh, 46px); color: #fff3a8; -webkit-text-stroke: 0.14em #7a3b52; paint-order: stroke fill; text-shadow: 0 3px 0 rgba(122,59,82,.6); }
.pl-score { font-size: clamp(26px, 6vh, 52px); color: #fff; -webkit-text-stroke: 0.14em #7a3b52; paint-order: stroke fill; text-shadow: 0 3px 0 rgba(122,59,82,.6); font-variant-numeric: tabular-nums; }
.pl-fish { display: flex; align-items: center; gap: 6px; font-size: clamp(20px, 4.4vh, 36px); color: #fff; -webkit-text-stroke: 0.14em #7a3b52; paint-order: stroke fill; text-shadow: 0 3px 0 rgba(122,59,82,.6); }
.pl-fish img { height: 1.3em; }
.pl-cats { display: flex; gap: clamp(8px, 2vw, 22px); margin-top: 6px; }
.pl-cat { position: relative; display: flex; flex-direction: column; align-items: center; animation: plPop2 .4s backwards; }
.pl-cat img { height: clamp(44px, 12vh, 96px); width: auto; filter: drop-shadow(0 3px 0 rgba(122,59,82,.5)); }
.pl-cat .xp { font-size: max(14px, 2.8vh); color: #bfe8d8; -webkit-text-stroke: 0.14em #7a3b52; paint-order: stroke fill; }
.pl-cat .bd { font-size: max(12px, 2.2vh); color: #7a3b52; background: #fff3a8; border-radius: 10px; padding: 1px 8px; border: 2px solid #7a3b52; white-space: nowrap; }
@keyframes plPop2 { from { transform: scale(0); opacity: 0; } }
