* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: #10141e;
  color: #f4e6ca;
  font-family: 'Microsoft YaHei', sans-serif;
}
button {
  border: 1px solid #947b56;
  border-radius: 3px;
  color: #f6e8d0;
  background: #252634;
  padding: 8px 15px;
  cursor: pointer;
}
button:hover,
button:focus-visible {
  background: #594439;
}
section {
  position: relative;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}
canvas {
  width: 100%;
  height: 100%;
  display: block;
  image-rendering: pixelated;
  outline: none;
}
#curtain {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  justify-items: center;
  background: linear-gradient(90deg, #100f1cbe, #15132185, #100f1cbe);
  padding: 24px;
}
#curtain[hidden],
[hidden] {
  display: none !important;
}
h2 {
  font-size: clamp(32px, 5vw, 76px);
  letter-spacing: 0.15em;
  margin: 0;
  color: #ffdf9f;
  text-shadow: 0 3px 12px #2c1420;
}
#story {
  line-height: 1.8;
  max-width: 38em;
}
#action {
  background: #85394b;
  margin: 12px;
  padding: 12px 28px;
}
#hint {
  position: absolute;
  left: 50%;
  bottom: max(5%, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  margin: 0;
  width: max-content;
  max-width: 88%;
  text-align: center;
  color: #fff6e1;
  font: 600 clamp(16px, 2vw, 23px)/1.65 Georgia, "SimSun", serif;
  text-shadow: 0 1px 3px #160d0b, 0 1px 6px #160d0b, 0 0 12px #160d0b;
  pointer-events: none;
  opacity: 0;
  transition: opacity .3s;
}
#hint.visible { opacity: 1; }
#curtain { z-index: 1; }
#controls { line-height: 1.7; color: #f2d7aa; }
.dawn canvas {
  filter: sepia(0.2) brightness(1.2);
  transition: filter 4s;
}
section.dawn:after {
  content: '';
  pointer-events: none;
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, #ffcf8722, transparent 65%);
}
