*{box-sizing:border-box}html,body{margin:0;height:100%;background:#0a0d14;color:#e8ecff;font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto}
#hud{position:sticky;top:0;z-index:5;display:flex;justify-content:space-between;align-items:center;padding:10px 14px;background:linear-gradient(180deg,#0f1422,#0c111d);border-bottom:1px solid #1a2340;backdrop-filter:blur(3px)}
.brand{font-weight:800;letter-spacing:.5px}
.stats{opacity:.9}
#tabs{display:flex;gap:8px;max-width:1280px;margin:10px auto 0;padding:0 12px}
.tab{background:#111832;border:1px solid #22325a;color:#e8ecff;padding:8px 12px;border-radius:12px;cursor:pointer;transition:.15s all}
.tab.active{background:#18244a;border-color:#2a4480}
.tab:hover{transform:translateY(-1px)}
#stage{display:flex;justify-content:center;padding:0 12px}
#game{width:100%;height:auto;max-width:1280px;border-radius:14px;box-shadow:0 10px 40px rgba(0,0,0,.35);border:1px solid #16203a}
#ui{max-width:1280px;margin:10px auto;display:grid;grid-template-columns:1.4fr .6fr;gap:12px;padding:0 12px}
#dialog{background:rgba(15,21,37,.8);border:1px solid #1f2a4a;border-radius:14px;padding:14px;min-height:170px;box-shadow:inset 0 0 0 1px rgba(255,255,255,.02)}
#speaker{display:flex;align-items:center;gap:10px;font-weight:700;margin-bottom:6px}
#speaker canvas{border-radius:50%;border:1px solid #2a3c70;box-shadow:0 0 0 2px rgba(255,255,255,.03) inset}
#choices{display:grid;gap:8px;margin-top:10px}
.choice{background:#122040;border:1px solid #253a6c;border-radius:12px;padding:10px;cursor:pointer;transition:.15s}
.choice:hover{background:#172a54}
#side .title{font-weight:700;margin-bottom:6px}
#inventory{background:rgba(15,21,37,.8);border:1px solid #1f2a4a;border-radius:14px;padding:12px;margin-bottom:10px}
#grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.slot{height:48px;border-radius:10px;border:1px dashed #3b4f86;display:flex;align-items:center;justify-content:center;opacity:.9;cursor:pointer}
.slot.has{border-style:solid;background:rgba(30,46,92,.35)}
.slot.sel{outline:2px solid #6aa6ff}
#ready{opacity:.85;font-size:12px;margin-top:6px}
#toolbar{display:flex;gap:8px;justify-content:flex-end}
button{border-radius:10px;border:1px solid #2b3e6e;background:#15254f;color:#e8ecff;padding:10px 12px;cursor:pointer}
button:hover{background:#1a2e60}
@media (max-width:980px){#ui{grid-template-columns:1fr}}
