:root {
  --ink: #f3e6cf;
  --dim: #8a7a63;
  --warm: #ffb45c;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  background: #050407;
  color: var(--ink);
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  -webkit-user-select: none;
  user-select: none;
  cursor: default;
  touch-action: none;
}

#game {
  display: block;
  width: 100vw;
  height: 100vh;
}

#hud {
  position: fixed;
  top: 0; left: 0; right: 0;
  padding: 18px 22px;
  pointer-events: none;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 6px rgba(0,0,0,.85);
}

.hud-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.hearts {
  font-size: 20px;
  letter-spacing: 3px;
  color: #ff7a4d;
  filter: drop-shadow(0 0 6px rgba(255,90,40,.45));
}

.depth {
  font-size: 34px;
  font-weight: 300;
  letter-spacing: .5px;
  color: #fff3df;
  opacity: .92;
}
.depth i, .meta i {
  font-style: normal;
  font-size: .55em;
  margin-left: 3px;
  color: var(--dim);
}

.oil {
  margin-top: 10px;
  height: 3px;
  width: 170px;
  background: rgba(255,255,255,.09);
  border-radius: 2px;
  overflow: hidden;
}
#oil-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #ff8a3c, #ffd08a);
  transition: width .06s linear;
}

.meta {
  margin-top: 8px;
  font-size: 12px;
  color: var(--dim);
  letter-spacing: .4px;
  display: flex;
  gap: 6px;
  align-items: baseline;
}
.meta em { font-style: normal; }
.meta b { color: var(--ink); font-weight: 500; }
.meta .dot { opacity: .5; }

#hint {
  position: fixed;
  left: 0; right: 0;
  bottom: 18px;
  text-align: center;
  font-size: 12px;
  color: rgba(243,230,207,.42);
  letter-spacing: .6px;
  pointer-events: none;
  transition: opacity .6s ease;
}
#hint.gone { opacity: 0; }

kbd {
  display: inline-block;
  padding: 1px 5px;
  margin: 0 2px;
  font: inherit;
  font-size: .92em;
  color: rgba(243,230,207,.75);
  border: 1px solid rgba(243,230,207,.22);
  border-radius: 4px;
  background: rgba(255,255,255,.04);
}

#overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(120% 90% at 50% 45%, rgba(10,6,4,.35), rgba(3,2,4,.86));
  opacity: 1;
  transition: opacity .45s ease;
}
#overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.card { text-align: center; }

.card h1 {
  margin: 0 0 6px;
  font-size: 40px;
  font-weight: 300;
  letter-spacing: 12px;
  color: #ffdda8;
  text-indent: 12px;
  text-shadow: 0 0 34px rgba(255,150,60,.35);
}

.card p {
  margin: 0;
  font-size: 13px;
  color: rgba(243,230,207,.55);
  letter-spacing: .6px;
}
.card p b { color: #ffdda8; font-weight: 500; }
.card .again {
  margin-top: 22px;
  font-size: 12px;
  color: rgba(243,230,207,.35);
}

@media (max-width: 520px) {
  .depth { font-size: 26px; }
  .card h1 { font-size: 30px; letter-spacing: 8px; }
  #hint { font-size: 11px; }
}
