/* Lily Ripples - woodblock pond. Scoped under .lr */
.lr{--cream:#f2e8cf;--water:#14293e;--bank:#0a1622;--ochre:#e0b054;--moss:#8bb868;--red:#e4572e;
  display:block;color:var(--cream);padding-bottom:max(0px,env(safe-area-inset-bottom))}
.lr-hud{display:flex;align-items:center;gap:.4rem;margin:0 0 .5rem;flex-wrap:wrap}
.lr-meta{display:flex;flex-direction:column;min-width:5.5rem;line-height:1.15;font-size:.85rem}
.lr-meta span{font-size:.72rem;opacity:.8}
.lr-taps{display:flex;gap:4px;flex:1;min-width:60px;flex-wrap:wrap}
.lr-taps i{width:11px;height:11px;border-radius:50%;border:2px solid var(--cream);opacity:.35}
.lr-taps i.on{background:var(--cream);opacity:1}
.lr-icon,.lr-btn,.lr-cell{font:inherit;color:var(--cream);background:#1c3a57;border:2px solid var(--cream);border-radius:10px;cursor:pointer;min-height:44px;touch-action:manipulation}
.lr-icon{padding:0 .6rem;font-size:.78rem;min-width:44px}
.lr-icon:disabled{opacity:.4;cursor:default}
.lr-icon:focus-visible,.lr-btn:focus-visible,.lr-cell:focus-visible{outline:3px solid var(--ochre);outline-offset:2px}
.lr-icon:active,.lr-btn:active,.lr-cell:active{transform:translateY(1px)}
.lr-stage{position:relative;display:block;width:fit-content;max-width:100%;margin:0 auto;background:var(--water);border-radius:6px;overflow:hidden;touch-action:none;-webkit-user-select:none;user-select:none}
.lr-stage canvas{display:block;touch-action:none;-webkit-tap-highlight-color:transparent;cursor:crosshair;max-width:100%}
.lr-overlay{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:safe center;gap:.5rem;padding:1rem;background:rgba(10,22,34,.9);text-align:center;overflow-y:auto;touch-action:pan-y}
.lr-overlay[hidden]{display:none}
.lr-overlay h2{font-size:1.7rem;letter-spacing:.02em;color:var(--ochre)}
.lr-lede{font-size:.9rem;max-width:18rem}
#lr-title-body,#lr-result-body{display:flex;flex-direction:column;align-items:center;gap:.55rem;width:100%}
.lr-btn{padding:.5rem 1.1rem;font-size:1rem;min-width:11rem;display:inline-flex;gap:.5rem;align-items:center;justify-content:center}
.lr-btn.primary{background:var(--ochre);color:#1a1405;border-color:#1a1405;font-weight:700}
.lr-btn small{font-size:.75rem;opacity:.85}
.lr-row{display:flex;gap:.5rem;flex-wrap:wrap;justify-content:center}
.lr-row .lr-btn{min-width:6rem}
.lr-info{font-size:.8rem;opacity:.9;max-width:18rem}
.lr-score{font-size:1.25rem;font-weight:700}
.lr-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:.4rem;width:100%;max-width:20rem;margin-top:.2rem}
.lr-cell{display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:1rem;min-height:48px;padding:.2rem}
.lr-cell:disabled{opacity:.35;cursor:default}
.lr-stars{display:inline-flex;gap:3px}
.lr-stars i{width:9px;height:9px;transform:rotate(45deg);border:1.5px solid var(--cream);opacity:.4}
.lr-stars i.on{background:var(--ochre);border-color:var(--ochre);opacity:1}
.lr-stars.big i{width:18px;height:18px;margin:0 6px}
.lr-hint{min-height:2.6em;margin:.5rem auto 0;max-width:22rem;text-align:center;font-size:.85rem}
@media (prefers-reduced-motion:no-preference){.lr-overlay{animation:lrfade .25s ease-out}@keyframes lrfade{from{opacity:0}to{opacity:1}}}
@media (max-width:380px){.lr-icon{padding:0 .4rem;font-size:.72rem}}
/* Phone: facts and footer actions sit below the pond so it starts high */
.game-wrap{display:flex;flex-direction:column}
.game-wrap .facts{order:4}.game-wrap .pip-actions{order:5}
/* Full screen (native and immersive): pond fills the stage under the dock */
html:is(.pip-immersive,.pip-native) .game-wrap{display:flex!important;flex-direction:column;overflow:hidden!important;padding-left:0;padding-right:0}
html:is(.pip-immersive,.pip-native) .lr-hud{padding:0 8px}
html:is(.pip-immersive,.pip-native) .lr{flex:1 1 auto;min-height:0;display:flex;flex-direction:column;padding-bottom:0}
html:is(.pip-immersive,.pip-native) .lr-hud{flex:none;margin-bottom:.3rem;flex-wrap:nowrap;overflow:hidden}
html:is(.pip-immersive,.pip-native) .lr-stage{flex:1 1 auto;min-height:0;width:100%;max-width:none;margin:0;display:flex;align-items:center;justify-content:center}
html:is(.pip-immersive,.pip-native) .lr-stage canvas{max-width:100%;max-height:100%}
html:is(.pip-immersive,.pip-native) .lr-hint{flex:none;min-height:0;margin:.3rem auto 0;font-size:.78rem}
html:is(.pip-immersive,.pip-native) .game-header,html:is(.pip-immersive,.pip-native) .ad-well,html:is(.pip-immersive,.pip-native) .facts{display:none}
@media (orientation:landscape) and (max-height:520px){
html:is(.pip-immersive,.pip-native) .lr{flex-direction:row;gap:.5rem}
html:is(.pip-immersive,.pip-native) .lr-hud{flex-direction:column;align-items:stretch;width:7.5rem;margin:0;overflow-y:auto;flex-wrap:nowrap}
html:is(.pip-immersive,.pip-native) .lr-taps{flex:none}
html:is(.pip-immersive,.pip-native) .lr-hint{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
}
