* { box-sizing: border-box; }
html, body {
  margin: 0; height: 100%;
  background: #050608; color: #e8dcc0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
body { display: flex; flex-direction: column; height: 100vh; height: 100dvh; overflow: hidden; }

.hud {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem;
  padding: .5rem .8rem; background: #0b0d12; border-bottom: 1px solid #1d1a15;
  font-size: .9rem; user-select: none;
}
.hud { padding-left: 6.2rem !important; padding-right: 8.2rem !important; min-height: 3.6rem; }
.hud a.home { display: none; color: #c9a66b; text-decoration: none; }
.hud a.home:hover { text-decoration: underline; }
.belly b { color: #f0c87a; font-size: 1.1rem; margin-left: .2rem; }
.meter { display: flex; align-items: center; gap: .4rem; }
.meter .bar { width: 110px; height: 10px; border-radius: 6px; background: #1b1915; overflow: hidden; border: 1px solid #2c271f; }
.meter i { display: block; height: 100%; width: 0%; background: linear-gradient(90deg, #6b5a35, #e8c46d, #ffe6a8); border-radius: 6px; }
.wind { display: flex; align-items: center; gap: .3rem; color: #b6c4cf; }
.wind span { color: #e8dcc0; }
.sky {
  position: relative; flex: 1 1 120px; min-width: 120px; height: 14px; border-radius: 8px;
  background: linear-gradient(90deg, #070a1a 0%, #0d1430 55%, #2b2a4a 80%, #7a5a6a 93%, #d9a27a 100%);
  border: 1px solid #22243a; overflow: hidden;
}
.sky i {
  position: absolute; top: 1px; left: 0; width: 10px; height: 10px; border-radius: 50%;
  background: #f4eed8; box-shadow: 0 0 6px #f4eed8; transform: translateX(-50%);
}
.hud button {
  font: inherit; font-size: .85rem; color: #e8dcc0; background: #1a1712; border: 1px solid #3a3226;
  border-radius: 6px; padding: .25rem .6rem; cursor: pointer;
}

.stage { position: relative; flex: 1; min-height: 0; }
#floor { display: block; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }

.status {
  position: absolute; left: 50%; bottom: 1rem; transform: translateX(-50%);
  margin: 0; padding: .35rem .8rem; border-radius: 1rem; max-width: 90%;
  background: rgba(10, 9, 7, .75); color: #f2e3bf; font-size: .95rem; text-align: center;
  opacity: 0; transition: opacity .4s; pointer-events: none;
}
.status.show { opacity: 1; }

.panel {
  position: absolute; inset: 0; margin: auto; width: min(30rem, 92%); height: fit-content; max-height: 92%;
  overflow: auto; padding: 1.4rem 1.5rem; border-radius: 14px;
  background: rgba(14, 12, 9, .93); border: 1px solid #3a3122; box-shadow: 0 10px 40px #000;
  line-height: 1.5;
}
.panel.hidden { display: none; }
.panel h1, .panel h2 { margin: 0 0 .6rem; color: #f0c87a; font-weight: 600; letter-spacing: .02em; }
.panel em { color: #f0c87a; font-style: normal; }
.panel .small { font-size: .88rem; color: #b9ab8c; }
.how { padding-left: 1.1rem; margin: .6rem 0; }
.how li { margin: .15rem 0; }
.big {
  font: inherit; font-size: 1.05rem; color: #1a1209; background: #e8bd6a; border: 0;
  border-radius: 8px; padding: .6rem 1.2rem; cursor: pointer; margin-top: .4rem;
}
.big:hover { background: #f5cf85; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.btnlink { color: #c9a66b; }
.tally { list-style: none; padding: 0; margin: .8rem 0; }
.tally li { margin: .6rem 0; padding-left: .8rem; border-left: 3px solid #5a4528; }
.tally b { color: #f0c87a; }
.tally .note { display: block; font-size: .88rem; color: #b9ab8c; }

@media (max-width: 560px) {
  .hud { font-size: .82rem; gap: .4rem .8rem; }
  .meter .bar { width: 70px; }
  .sky { order: 10; flex-basis: 100%; }
  .panel { padding: 1rem 1rem; line-height: 1.4; }
  .panel .small { font-size: .8rem; margin: .4rem 0; }
  .panel h1 { font-size: 1.4rem; }
}
