:root {
  color-scheme: dark;
  --night: #0e0d0d;
  --paper: #f4f0e7;
  --muted: #c0b7b2;
  --red: #ed303b;
  font-family: system-ui, -apple-system, "Hiragino Kaku Gothic ProN", sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--night); color: var(--paper); }
main { width: min(100% - 2rem, 31rem); margin: auto; padding-bottom: 2rem; }
header { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid var(--red); }
header a { padding: .85rem .15rem; color: var(--muted); text-decoration: none; font-size: .875rem; }
header a:first-child { color: var(--paper); font-weight: 750; letter-spacing: .12em; }
:focus-visible { outline: 2px solid #ff848a; outline-offset: 4px; }
.intro { text-align: center; padding: 1.25rem 0 1rem; }
.intro img { display: block; margin: 0 auto; width: clamp(8rem, 39vw, 11rem); height: auto; border: 1px solid #594336; }
h1 { margin: .65rem 0 .45rem; font-size: clamp(1.65rem, 7vw, 2.5rem); line-height: 1.25; }
.intro p { margin: 0; color: var(--muted); line-height: 1.55; }
.panel { background: #171515; border: 1px solid #423738; padding: .9rem; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0 0 .8rem; text-align: center; }
.stats div + div { border-left: 1px solid #443839; }
.stats dt { font-size: .875rem; color: var(--muted); }
.stats dd { margin: .15rem 0 0; font-size: 1.65rem; font-weight: 750; font-variant-numeric: tabular-nums; }
.unit { font-size: .85rem; margin-inline-start: .2rem; }
button { touch-action: manipulation; font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.action { width: 100%; min-height: 3rem; border: 1px solid #f6636b; background: #b51f2a; color: white; font-weight: 750; }
.action:hover { background: #c9222f; }
.board { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.tile { display: grid; place-items: center; height: clamp(3.3rem, 13vw, 4.8rem); border: 1px solid #514344; background: #221b1c; color: #3d1614; padding: .2rem; }
.tile span { visibility: hidden; }
.tile[data-active] span {
  visibility: visible;
  display: grid;
  place-items: center;
  width: min(100%, 4.1rem);
  height: min(100%, 3.1rem);
  padding-top: .2rem;
  background: #efc68e;
  clip-path: polygon(0 23%, 50% 0, 100% 23%, 100% 100%, 0 100%);
  font-weight: 800;
  font-size: .85rem;
}
.tile[data-active] { border-color: #ed986b; }
.fortune { margin-top: 1rem; padding: 1rem; text-align: center; background: #efe4cf; color: #2e1d18; border-top: 4px solid #a6252c; }
.fortune h2 { margin: 0; font-size: 1rem; }
#luck { margin: .35rem 0; color: #9a202a; font-weight: 900; font-size: clamp(2rem, 9vw, 3rem); }
#message { margin: 0; line-height: 1.5; }
