#hud { position: fixed; inset: 0; pointer-events: none; color: #e8e2f7;
       font-family: Georgia, serif; }
#hud.hidden { display: none; }
#hud > * { pointer-events: auto; }
#char-panel { position: absolute; top: 14px; left: 14px; display: flex; gap: 10px;
  background: rgba(10, 6, 26, .72); border: 1px solid #4b3d7a; border-radius: 12px;
  padding: 10px 14px 10px 10px; backdrop-filter: blur(6px); align-items: center; }
#portrait { width: 64px; height: 64px; border-radius: 10px; border: 1px solid #6a5acd; }
#char-name { font-size: 15px; letter-spacing: .5px; }
#char-levels { font-size: 12px; color: #a99ed4; margin-top: 4px; }
#hp-orb { position: absolute; bottom: 18px; left: 18px; width: 74px; height: 74px;
  border-radius: 50%; border: 2px solid #4b3d7a; background: #17102e; overflow: hidden;
  display: flex; align-items: center; justify-content: center; }
#hp-fill { position: absolute; left: 0; right: 0; bottom: 0; background:
  linear-gradient(180deg, #ff5d73, #a3122e); transition: height .3s; }
#hp-text { position: relative; font-size: 17px; font-weight: bold; text-shadow: 0 1px 3px #000; }
#gold-panel { position: absolute; top: 14px; right: 14px; background: rgba(10,6,26,.72);
  border: 1px solid #4b3d7a; border-radius: 10px; padding: 7px 13px; color: #ffd166; }
#inventory { position: absolute; bottom: 18px; right: 18px; display: grid;
  grid-template-columns: repeat(5, 44px); gap: 5px; background: rgba(10,6,26,.72);
  border: 1px solid #4b3d7a; border-radius: 12px; padding: 9px; }
.inv-slot { width: 44px; height: 44px; border-radius: 8px; background: #17102e;
  border: 1px solid #2c2250; display: flex; align-items: center; justify-content: center;
  font-size: 11px; text-align: center; cursor: default; color: #cabffa; }
.inv-slot.food { cursor: pointer; border-color: #6a5acd; }
.inv-slot.food:hover { background: #251a4a; }
#log { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%);
  width: min(460px, 60vw); max-height: 110px; overflow: hidden; display: flex;
  flex-direction: column-reverse; font-size: 13px; color: #b7aede;
  text-shadow: 0 1px 2px #000; }
#log div { padding: 1px 0; }
#toasts { position: absolute; top: 90px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; gap: 6px; align-items: center; }
.toast { background: rgba(20, 12, 44, .9); border: 1px solid #6a5acd; border-radius: 10px;
  padding: 6px 16px; font-size: 14px; animation: toast 2.6s forwards; }
@keyframes toast { 0% { opacity: 0; transform: translateY(-8px); }
  12% { opacity: 1; transform: none; } 80% { opacity: 1; } 100% { opacity: 0; } }
