/* Spell Monsters base styles: mobile first, 375px base */
:root{--pink:#C2338C;--deep:#4A1250;--yellow:#FFE066;--mint:#7FE8B8;--soft:rgba(255,255,255,.22)}
*{box-sizing:border-box}
html{font-size:16px;-webkit-text-size-adjust:100%}
body{margin:0;background:var(--pink);color:#fff;font-family:"Trebuchet MS",system-ui,-apple-system,sans-serif;min-height:100vh;min-height:100dvh}
h1{font-size:32px;font-weight:600;margin:6px 0}
h2{font-size:22px;font-weight:600;margin:8px 0}
p{margin:6px 0}
.screen{max-width:480px;margin:0 auto;padding:16px 16px 96px}
.center{text-align:center}
.sm{font-size:14px;opacity:.92}
.top{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:10px;flex-wrap:wrap}
.pill{background:var(--soft);border-radius:20px;padding:6px 12px;font-size:14px;display:inline-block}
.row{display:flex;gap:8px}
.row>*{flex:1}
.btn{font-family:inherit;border:none;cursor:pointer;min-height:48px;font-size:16px;font-weight:600;border-radius:14px;padding:0 16px;color:var(--deep);background:#fff;transition:transform .1s;-webkit-tap-highlight-color:transparent}
.btn:active{transform:scale(.96)}
.btn.yellow{background:var(--yellow)}
.btn.mint{background:var(--mint)}
.btn.ghost{background:var(--soft);color:#fff}
.btn.big{width:100%;min-height:60px;font-size:20px;border-radius:18px;margin-top:10px}
.btn.full{width:100%;margin-top:8px}
input,textarea{font-family:inherit;font-size:16px;border-radius:12px;border:2px solid transparent;padding:12px;width:100%;color:var(--deep);background:#fff}
input:focus,textarea:focus,.btn:focus-visible,.tile:focus-visible,.card:focus-visible{outline:3px solid var(--yellow);outline-offset:2px}
textarea{min-height:110px;resize:vertical}
label{display:block;font-size:14px;margin:12px 0 4px;text-align:left}
.panel{background:rgba(255,255,255,.16);border-radius:16px;padding:12px;margin:10px 0;text-align:left}
.panel h3{margin:0 0 6px;font-size:16px}
.line{display:flex;justify-content:space-between;gap:8px;padding:6px 0;border-top:1px solid rgba(255,255,255,.2);font-size:14px}
.line:first-of-type{border-top:none}
.msg{min-height:24px;margin:6px 0;font-size:15px;color:var(--yellow)}
.slots{display:flex;gap:4px;justify-content:center;margin:14px 0}
.slot{flex:1 1 0;max-width:44px;min-width:20px;height:54px;border-radius:10px;background:var(--soft);border:2px dashed rgba(255,255,255,.65);display:flex;align-items:center;justify-content:center;font-size:clamp(16px,6vw,28px);font-weight:600}
.slot.f{background:#fff;color:var(--deep);border:2px solid #fff}
.slot.ok{background:var(--mint);color:var(--deep);border:2px solid var(--mint)}
.tiles{display:flex;flex-wrap:wrap;gap:8px;justify-content:center}
.tile{font-family:inherit;width:46px;height:50px;font-size:24px;font-weight:600;border:none;border-radius:12px;background:var(--yellow);color:var(--deep);cursor:pointer;padding:0}
.tile:active{transform:scale(.92)}
.tile.u{opacity:.25}
.kb{display:flex;flex-direction:column;gap:6px;width:100%}
.kbrow{display:flex;gap:4px;justify-content:center}
.key{font-family:inherit;flex:1 1 0;max-width:40px;height:48px;font-size:20px;font-weight:600;border:none;border-radius:8px;background:var(--yellow);color:var(--deep);cursor:pointer;padding:0}
.key.wide{max-width:56px}
.key:active{transform:scale(.92)}
#env-badge{position:fixed;top:0;left:0;background:#FFE066;color:#4A1250;font-size:12px;font-weight:600;padding:2px 8px;border-radius:0 0 8px 0;z-index:50}
#toast{position:fixed;left:50%;bottom:90px;transform:translateX(-50%);background:#fff;color:var(--deep);padding:12px 18px;border-radius:16px;max-width:90%;z-index:60;font-size:15px;text-align:center}
#bug-btn{position:fixed;right:12px;bottom:12px;width:48px;height:48px;border-radius:50%;border:none;background:var(--yellow);color:var(--deep);font-size:22px;font-weight:700;cursor:pointer;z-index:40}
.modal{position:fixed;inset:0;background:rgba(30,10,40,.7);display:flex;align-items:center;justify-content:center;padding:16px;z-index:70}
.modal-box{background:var(--pink);border-radius:20px;padding:16px;width:100%;max-width:420px;max-height:90vh;overflow:auto}
@media (min-width:768px){
  html{font-size:18px}
  .screen{max-width:560px;padding-top:32px}
  .tile{width:52px;height:56px}
}
