/* Missing Link - letterpress paper, ink and iron. */
.ml-stage{position:relative;width:100%;max-width:388px;margin:0 auto;border-radius:12px;overflow:hidden;background:#EDE3CC;box-shadow:0 0 0 3px #1F1B17,0 8px 0 3px #0c0b0a;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-tap-highlight-color:transparent}
.ml-canvas{display:block;touch-action:none;margin:0 auto}
.ml-over{position:absolute;inset:0;z-index:2}
.ml-over[hidden]{display:none}
.ml-card{display:flex;flex-direction:column;justify-content:center;gap:.7rem;padding:1.1rem 1.1rem calc(1.1rem + env(safe-area-inset-bottom));background:rgba(237,227,204,.96);color:#1F1B17;font-family:Rockwell,"Roboto Slab","Courier New",Georgia,serif;text-align:center;overflow:auto}
.ml-card h2{font-size:1.9rem;letter-spacing:.02em;text-transform:uppercase}
.ml-lede{font-size:.98rem;line-height:1.4}
.ml-lede b{background:#FBF5E3;border:2px solid #1F1B17;border-radius:5px;padding:0 .3em;font-size:.85em;text-transform:uppercase}
.ml-best{font-size:.8rem;color:#6a5f4c}
.ml-btn{min-height:48px;min-width:48px;padding:.5rem 1rem;border:2px solid #1F1B17;border-radius:8px;background:#FBF5E3;color:#1F1B17;font:700 1rem Rockwell,"Roboto Slab","Courier New",Georgia,serif;box-shadow:0 4px 0 #1F1B17;cursor:pointer;touch-action:manipulation;transition:transform .08s,box-shadow .08s}
.ml-btn:active{transform:translateY(3px);box-shadow:0 1px 0 #1F1B17}
.ml-btn:focus-visible,.ml-chip:focus-visible{outline:3px solid #CF3F25;outline-offset:2px}
.ml-btn:disabled{opacity:.45;cursor:default}
.ml-primary{background:#CF3F25;color:#FBF5E3;font-size:1.2rem;min-height:56px}
.ml-row{display:flex;gap:.6rem}.ml-row .ml-btn{flex:1}
.ml-packs{display:flex;flex-wrap:wrap;gap:.4rem;justify-content:center}
.ml-chip{min-height:44px;padding:.25rem .8rem;border:2px solid #1F1B17;border-radius:999px;background:#EFE4C8;color:#1F1B17;font:700 .85rem Rockwell,"Roboto Slab","Courier New",Georgia,serif;cursor:pointer;touch-action:manipulation}
.ml-chip[aria-pressed=true]{background:#1F5F63;color:#FBF5E3}
.ml-chip:disabled{opacity:.4}
.ml-stats{list-style:none;display:grid;gap:.25rem;font-size:1.05rem}
.ml-bar{display:flex;gap:.6rem;max-width:388px;margin:.9rem auto 0}.ml-bar .ml-btn{flex:1;background:#2a2622;color:#EDE3CC;border-color:#EDE3CC;box-shadow:0 4px 0 #EDE3CC}
.ml-bar .ml-btn:active{box-shadow:0 1px 0 #EDE3CC}
.ml-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.ml-guide{max-width:388px;margin:1.2rem auto 0;font-size:.9rem;line-height:1.5;opacity:.85}
.ml-guide h2{font-size:1rem;margin-bottom:.3rem}
@media (prefers-reduced-motion:reduce){.ml-btn{transition:none}}

.ml-lvl{display:flex;align-items:center;justify-content:center;gap:.6rem}
.ml-lvl .ml-btn{min-height:44px;min-width:56px;padding:.1rem .6rem;font-size:1.4rem;line-height:1}
.ml-lstars{min-width:7.5rem;font-size:.95rem;font-weight:700;letter-spacing:.04em}
.ml-nextgoal{color:#1F5F63;font-weight:700}
.ml-rstars{display:flex;justify-content:center;gap:.5rem;font-size:2.4rem;line-height:1;color:#B8862B}
.ml-rstars[hidden]{display:none}
.ml-rstars span{display:inline-block;animation:ml-pop .45s cubic-bezier(.2,1.6,.4,1) both}
.ml-rstars span.off{color:#c9bb98;animation-name:none}
.ml-rstars span:nth-child(2){animation-delay:.15s}.ml-rstars span:nth-child(3){animation-delay:.3s}
.ml-stats li.ml-rec{color:#CF3F25;font-weight:800}
#ml-result:not([hidden]){animation:ml-in .25s ease-out}
@keyframes ml-pop{from{transform:scale(0) rotate(-40deg)}to{transform:scale(1) rotate(0)}}
@keyframes ml-in{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){.ml-rstars span,#ml-result:not([hidden]){animation:none}}
#ml-title{gap:.45rem;padding-top:.8rem}#ml-title h2{font-size:1.6rem}#ml-title .ml-lede{font-size:.9rem}
/* full screen: stage fills the shell stage, board takes the height, no scroll */
html.pip-immersive .game-wrap.pip-stage,html.pip-native .game-wrap.pip-stage,.game-wrap.pip-stage:fullscreen{display:flex;flex-direction:column;align-items:center;gap:.5rem;overflow:hidden;padding-bottom:env(safe-area-inset-bottom)}
html.pip-immersive .ml-stage,html.pip-native .ml-stage,.pip-stage:fullscreen .ml-stage{flex:1 1 0;min-height:0;height:auto!important;width:100%;max-width:640px}
html.pip-immersive .ml-guide,html.pip-native .ml-guide,.pip-stage:fullscreen .ml-guide{display:none}
html.pip-immersive .ml-bar,html.pip-native .ml-bar,.pip-stage:fullscreen .ml-bar{flex:none;width:100%;max-width:640px;margin:0 auto;padding:0 .5rem .4rem}
html.pip-immersive .ml-bar .ml-btn,html.pip-native .ml-bar .ml-btn{min-height:48px}
@media (orientation:landscape) and (max-height:520px){
html.pip-immersive .game-wrap.pip-stage,html.pip-native .game-wrap.pip-stage{flex-direction:row;align-items:stretch;justify-content:center}
html.pip-immersive .ml-bar,html.pip-native .ml-bar{flex-direction:column;width:130px;max-width:130px;justify-content:center;margin:0;padding:.4rem}
html.pip-immersive #ml-title .ml-lede,html.pip-native #ml-title .ml-lede,html.pip-immersive #ml-title .ml-best,html.pip-native #ml-title .ml-best{display:none}
html.pip-immersive .ml-card,html.pip-native .ml-card{gap:.35rem;padding:.5rem .8rem}
html.pip-immersive #ml-title h2,html.pip-native #ml-title h2{font-size:1.2rem}
}
