html, body { margin: 0; height: 100%; overflow: hidden; background: #E9DDC7; }
body {
  font-family: 'Jost', sans-serif;
  -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent;
  touch-action: none;
}
#mount { position: fixed; inset: 0; background: #E9DDC7; }
#poster {
  position: absolute; inset: 0; overflow: hidden;
  background: #F3E7D3;
}
#gl, #ui {
  position: absolute; inset: 0; width: 100%; height: 100%; display: block;
}
#ui, #gl { touch-action: none; }
#grain {
  position: absolute; inset: 0; pointer-events: none;
  opacity: 0.05; mix-blend-mode: multiply;
  background-repeat: repeat; background-size: 190px 190px;
}
#hits {
  --u: calc(100vw / 1600);
  position: absolute; inset: 0; z-index: 3; pointer-events: none;
}
#hits[hidden] { display: none; }
#hits .hit {
  position: absolute; display: block; padding: 0; margin: 0;
  background: transparent; border: 0; color: transparent; font-size: 0;
  pointer-events: auto; cursor: pointer; touch-action: none;
  -webkit-appearance: none; appearance: none;
}
#hits .hit:focus-visible { outline: 3px solid #D9603B; outline-offset: 2px; }
#hits [data-act="tuck"] { left: calc(var(--u) * 30); bottom: calc(var(--u) * 34); width: calc(var(--u) * 248); height: calc(var(--u) * 84); }
#hits [data-act="left"] { left: calc(var(--u) * 292); bottom: calc(var(--u) * 34); width: calc(var(--u) * 248); height: calc(var(--u) * 84); }
#hits [data-act="right"] { left: calc(var(--u) * 554); bottom: calc(var(--u) * 34); width: calc(var(--u) * 248); height: calc(var(--u) * 84); }
#hits [data-act="grab"] { left: calc(var(--u) * 816); bottom: calc(var(--u) * 34); width: calc(var(--u) * 248); height: calc(var(--u) * 84); }
#hits [data-act="restart"] { left: calc(var(--u) * 1244); bottom: calc(var(--u) * 34); width: calc(var(--u) * 326); height: calc(var(--u) * 84); }
#hits #hitSound { left: calc(var(--u) * 1410); top: calc(var(--u) * 206); width: calc(var(--u) * 164); height: calc(var(--u) * 58); }
#dock {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 5;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  background: #F3E7D3;
  border-top: 3px solid #132E38;
  padding: 8px 10px calc(10px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -6px 0 rgba(19,46,56,0.16);
}
#dock[hidden] { display: none; }
#dock .dockRow, #dockStatus { width: min(96vw, 640px); }
#dock .dockRow { display: flex; gap: 7px; }
#dockStatus {
  display: flex; align-items: center; gap: 14px;
  background: #F3E7D3; border: 2px solid #132E38;
  box-shadow: 4px 4px 0 #6FA3BF;
  padding: 5px 8px;
  font-family: 'Jost', sans-serif; font-weight: 700; font-size: 11px;
  letter-spacing: 0.5px; color: #132E38;
}
#dockStatus b { font-family: 'Big Shoulders', sans-serif; font-size: 22px; font-weight: 900; line-height: 1; }
#dockStatus #dockSound {
  margin-left: auto; background: #F3E7D3; border: 2px solid #132E38;
  color: #132E38; font-family: 'Jost', sans-serif; font-weight: 700; font-size: 10px;
  padding: 4px 6px; cursor: pointer; touch-action: none;
}
#dockStatus #dockSound.off { background: #D9603B; color: #F3E7D3; border-color: #132E38; }
#dock .plate {
  position: relative; flex: 1; height: 54px;
  background: #F3E7D3; border: 2px solid #132E38; color: #132E38;
  font-family: 'Alfa Slab One', serif; font-size: 12px; letter-spacing: 0.5px;
  box-shadow: 4px 4px 0 #6FA3BF;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 2px; touch-action: none; cursor: pointer;
}
#dock .plate .lbl { font-size: 10px; line-height: 1.1; }
#dock .plate .pic { opacity: 0; height: 0; font-size: 0; }
#dock .plate.restart { height: 46px; background: #D9603B; color: #F3E7D3; box-shadow: 4px 4px 0 #132E38; }
#dock .plate:active, #dock .plate.on { transform: translate(2px,2px); box-shadow: 2px 2px 0 #6FA3BF; }
#dock .plate.restart:active, #dock .plate.restart.on { box-shadow: 2px 2px 0 #132E38; }
