.lp{--ink:#0f2630;--ink2:#17394a;--cream:#f1e9d2;--brass:#d9a441;color:var(--cream);background:var(--ink);border-radius:14px;padding:.6rem;font-family:system-ui,-apple-system,"Segoe UI",sans-serif;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}
.lp-hud{display:flex;justify-content:space-between;align-items:flex-end;gap:.5rem;padding:.1rem .25rem .4rem}
.lp-hud>div{display:flex;flex-direction:column;min-width:0}
.lp-k{font-size:.62rem;letter-spacing:.12em;text-transform:uppercase;opacity:.65}
.lp-hud b{font-size:1.05rem;font-variant-numeric:tabular-nums;color:var(--cream)}
.lp-spares{display:flex;gap:5px;padding-top:4px}
.lp-spares i{width:14px;height:14px;border:2px solid var(--cream);border-radius:3px 3px 7px 7px;display:block;opacity:.35}
.lp-spares i.on{background:var(--brass);border-color:var(--brass);opacity:1}
.lp-info{min-height:1.1rem;font-size:.75rem;opacity:.75;padding:0 .25rem .35rem}
.lp-stage{position:relative;width:100%;border-radius:10px;overflow:hidden;line-height:0;background:var(--ink);touch-action:none}
#lp-canvas{display:block;touch-action:none;width:100%;max-width:100%;cursor:pointer;outline:none}
.lp-fb{padding:1rem;line-height:1.4}
.lp-ov{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:rgba(15,38,48,.82);padding:1rem;line-height:1.4;animation:lpIn .25s ease-out}
.lp-ov[hidden]{display:none}
#lp-cont[hidden]{display:none}
.lp-card .lp-btn{width:100%}
.lp-stats-row{display:flex;justify-content:center;gap:.9rem}
.lp-streak{color:var(--brass);font-weight:700}
.lp-card h2{text-shadow:0 2px 0 rgba(0,0,0,.35)}
.lp-stars svg.on{filter:drop-shadow(0 0 6px rgba(217,164,65,.7))}
.lp-card{width:100%;max-width:280px;text-align:center;display:flex;flex-direction:column;gap:.6rem;padding:max(0px,env(safe-area-inset-top)) 0 0}
.lp-card h2{font-size:1.45rem;color:var(--cream);margin:0}
.lp-card p{margin:0;font-size:.9rem}
.lp-stars{display:flex;justify-content:center;gap:6px;min-height:0}
.lp-stars svg{fill:none;stroke:var(--cream);stroke-width:1.5;opacity:.5}
.lp-stars svg.on{fill:var(--brass);stroke:var(--brass);opacity:1;animation:lpPop .4s ease-out both}
.lp-small{font-size:.74rem;opacity:.78;line-height:1.4}
.lp-btn{font:inherit;font-weight:700;font-size:1rem;min-height:48px;min-width:48px;padding:.5rem 1rem;border-radius:10px;border:2px solid var(--cream);background:transparent;color:var(--cream);cursor:pointer;touch-action:manipulation}
.lp-btn:active{transform:translateY(1px)}
.lp-btn:focus-visible{outline:3px solid var(--brass);outline-offset:2px}
.lp-main{background:var(--brass);border-color:var(--brass);color:#1b1304}
.lp-btn:disabled{opacity:.4;cursor:default}
.lp-bar{display:flex;gap:.5rem;margin-top:.6rem;padding-bottom:env(safe-area-inset-bottom)}
.lp-serve{flex:1 1 auto;background:var(--brass);border-color:var(--brass);color:#1b1304;min-height:52px;font-size:1.1rem}
.lp-serve:disabled{background:transparent;color:var(--cream);border-color:var(--cream)}
.lp-sm{flex:0 0 auto;font-size:.8rem;padding:.4rem .7rem}
.lp .lp-small{padding:.5rem .25rem 0}
.lp-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
@keyframes lpIn{from{opacity:0}to{opacity:1}}
@keyframes lpPop{from{transform:scale(.4)}to{transform:scale(1)}}
@media (prefers-reduced-motion:reduce){.lp *{animation:none!important;transition:none!important}}
/* full screen: fill the stage below the dock */
html.pip-immersive .game-wrap.pip-stage,html.pip-native .game-wrap.pip-stage{padding:0;overflow:hidden}
html.pip-immersive .lp,html.pip-native .lp{height:100%;box-sizing:border-box;display:flex;flex-direction:column;border-radius:0;padding:.5rem .6rem calc(.5rem + env(safe-area-inset-bottom)) .6rem;padding-left:max(.6rem,env(safe-area-inset-left));padding-right:max(.6rem,env(safe-area-inset-right))}
html.pip-immersive .lp-stage,html.pip-native .lp-stage{flex:1 1 0;min-height:0;display:flex;align-items:center;justify-content:center;width:100%}
html.pip-immersive #lp-canvas,html.pip-native #lp-canvas{flex:none;width:auto;max-width:100%;max-height:100%}
html.pip-immersive .lp>.lp-small,html.pip-native .lp>.lp-small,html.pip-immersive .lp-info,html.pip-native .lp-info{display:none}
html.pip-immersive .lp-bar,html.pip-native .lp-bar{padding-bottom:0;flex:none}
html.pip-immersive .lp-btn,html.pip-native .lp-btn{min-height:48px}
@media (orientation:landscape) and (max-height:500px){
html.pip-immersive .lp,html.pip-native .lp{display:grid;grid-template-columns:1fr 150px;grid-template-rows:auto 1fr;column-gap:.6rem}
html.pip-immersive .lp-hud,html.pip-native .lp-hud{grid-column:2;grid-row:1;flex-direction:column;align-items:stretch;gap:.3rem}
html.pip-immersive .lp-stage,html.pip-native .lp-stage{grid-column:1;grid-row:1/3}
html.pip-immersive .lp-bar,html.pip-native .lp-bar{grid-column:2;grid-row:2;flex-direction:column;justify-content:flex-end;margin-top:0}
html.pip-immersive .lp-serve,html.pip-native .lp-serve{flex:none}
}
/* full screen fit pass: use the whole width in portrait, whole height in landscape */
html.pip-immersive .lp,html.pip-native .lp{padding:.3rem 0 env(safe-area-inset-bottom) 0;padding-left:env(safe-area-inset-left);padding-right:env(safe-area-inset-right)}
html.pip-immersive .lp-hud,html.pip-native .lp-hud,html.pip-immersive .lp-bar,html.pip-native .lp-bar{padding-left:.6rem;padding-right:.6rem}
html.pip-immersive .lp-stage,html.pip-native .lp-stage{border-radius:0}
@media (orientation:landscape) and (max-height:500px){
html.pip-immersive .lp,html.pip-native .lp{padding:2px .5rem 2px .3rem;padding-left:max(.3rem,env(safe-area-inset-left));padding-right:max(.5rem,env(safe-area-inset-right));grid-template-columns:1fr 160px}
html.pip-immersive .lp-hud,html.pip-native .lp-hud,html.pip-immersive .lp-bar,html.pip-native .lp-bar{padding-left:0;padding-right:0}
html.pip-immersive .lp-stage,html.pip-native .lp-stage{height:100%}
}
