* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { width: 100%; height: 100%; overflow: hidden; background: #04050a;
  font-family: Georgia, "Times New Roman", serif; color: #d8cdb8; }
#game-canvas { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
#hud { position: fixed; inset: 0; pointer-events: none; z-index: 5; }
.meters { position: absolute; top: 14px; }
#keys { left: 16px; }
.lbl { display: block; font-size: 11px; letter-spacing: 2px; text-transform: uppercase;
  color: #8f86a8; margin-bottom: 4px; }
.pip { display: inline-block; width: 16px; height: 16px; border-radius: 50% 50% 46% 54%;
  border: 1px solid #6a6480; margin-right: 6px; background: rgba(20,18,30,.5); }
.pip.full { background: #efe2b4; border-color: #efe2b4; box-shadow: 0 0 12px #e8cf7a; }
#breath { left: 130px; top: 18px; }
#breath b { display: block; width: 130px; height: 9px; border: 1px solid #6a6480;
  border-radius: 5px; overflow: hidden; background: rgba(20,18,30,.5); }
#breathfill { display: block; height: 100%; width: 100%;
  background: linear-gradient(90deg, #5d7ce0, #b9c8f0); transition: width .2s; }
#timer { left: 280px; top: 18px; font-size: 15px; color: #b6ad95; }
#score { left: 360px; top: 18px; font-size: 15px; color: #d9c07a; }
#crosshair { position: absolute; left: 50%; top: 50%; width: 6px; height: 6px;
  margin: -3px; border-radius: 50%; background: rgba(230,220,190,.6); box-shadow: 0 0 4px #000; }
#vignette { position: absolute; inset: 0; opacity: 0;
  background: radial-gradient(ellipse at center, transparent 35%, rgba(120,8,8,.85) 100%); }
#msg { position: absolute; left: 50%; top: 62%; transform: translateX(-50%);
  max-width: 78%; text-align: center; font-size: 17px; color: #efe6cd;
  text-shadow: 0 2px 6px #000; background: rgba(6,5,12,.45); padding: 8px 14px; border-radius: 8px; }
.hidden { display: none !important; }
.overlay { position: fixed; inset: 0; z-index: 10; display: flex; align-items: center;
  justify-content: center; background: rgba(3,3,8,.88); }
.panel { max-width: 520px; width: 90%; text-align: center; padding: 30px 26px;
  border: 1px solid #3a3450; border-radius: 14px; background: rgba(10,9,18,.92);
  box-shadow: 0 0 60px rgba(70,40,120,.25); }
.panel h1 { font-size: 44px; letter-spacing: 10px; color: #e8dfc0;
  text-shadow: 0 0 22px rgba(180,140,60,.45); }
.panel h2 { font-size: 30px; letter-spacing: 4px; }
.panel h2.win { color: #e8d67a; } .panel h2.lose { color: #c0525a; }
.tag { color: #9d93b8; margin: 10px 0 18px; font-style: italic; }
.howto { list-style: none; text-align: left; font-size: 14.5px; line-height: 1.7; color: #c4bb9f;
  margin-bottom: 22px; }
.howto b { color: #efe2b4; }
#btn-start, #btn-restart { font: inherit; font-size: 17px; letter-spacing: 2px; cursor: pointer;
  color: #0c0a14; background: linear-gradient(180deg, #efe2b4, #cbb26a);
  border: none; padding: 13px 30px; border-radius: 8px; box-shadow: 0 0 24px rgba(220,180,90,.4); }
#btn-start:hover, #btn-restart:hover { filter: brightness(1.15); }
.scoreline { margin: 12px 0 20px; color: #d9c07a; }
#touch { position: fixed; inset: 0; z-index: 8; pointer-events: none; }
#tc-pad { position: absolute; left: 18px; bottom: 18px; width: 120px; height: 120px;
  border-radius: 50%; background: rgba(40,36,64,.55); border: 2px solid #6a6492;
  pointer-events: auto; touch-action: none; }
#tc-stick { position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; margin: -26px;
  border-radius: 50%; background: rgba(150,140,200,.55); border: 2px solid #8a84b2; }
#tc-look { position: absolute; right: 0; top: 0; width: 55%; height: 100%;
  pointer-events: auto; touch-action: none; }
.tc-btn { position: absolute; right: 18px; width: 68px; height: 68px; border-radius: 50%;
  font: inherit; font-size: 13px; letter-spacing: 1px; color: #d8cdb8;
  background: rgba(40,36,64,.6); border: 2px solid #6a6492; pointer-events: auto;
  touch-action: none; }
#tc-btn-interact { bottom: 120px; } #tc-btn-sprint { bottom: 36px; right: 106px; }
#tc-btn-lantern { bottom: 36px; }
.tc-btn.on { background: rgba(230,200,120,.4); border-color: #cbb26a; }
@media (pointer: fine) { #touch { display: none; } }
@media (max-width: 700px) {
  #breath { left: 16px; top: 76px; }
  #timer  { left: 16px; top: 116px; }
  #score  { left: 130px; top: 116px; }
  #msg { top: 55%; font-size: 15px; }
  .panel h1 { font-size: 34px; letter-spacing: 6px; }
  .howto { font-size: 13px; }
}
