
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
  src: url("/fonts/nunito-latin-ext.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
                 U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113,
                 U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
  src: url("/fonts/nunito-latin.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308,
                 U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ink: #2e222f;
  --shade: #3e3546;
  --band: #45293f;
  --hud: #694f62;
  --outline: #7f708a;
  --grey: #9babb2;
  --pale: #c7dcd0;
  --white: #ffffff;
  --yellow: #f9c22b;
  --amber: #f79617;
  --red: #e83b3b;
  --pink: #f04f78;
  --heart: #c32454;
  --line: 2px;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { background: var(--ink); }

body {
  margin: 0;
  padding: 0 0.5rem 2rem;
  color: var(--pale);
  font: 600 1rem/1.5 "Nunito", system-ui, sans-serif;
  text-align: center;
}

a { color: var(--yellow); text-underline-offset: 0.15em; }
a:hover { color: var(--white); }

:focus-visible { outline: var(--line) solid var(--yellow); outline-offset: 2px; }

header { padding: 0.6rem 0 0.5rem; }

h1 {
  margin: 0;
  font-size: clamp(1.4rem, 6vw, 2.1rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: 0.01em;
}
h1 a { color: var(--yellow); text-decoration: none; }
h1 a:hover { color: var(--yellow); }

h2 { margin: 0.5rem 0 1rem; font-size: 1.3rem; font-weight: 800; color: var(--white); }

main { margin: 0 auto; }

.unseen { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.button {
  display: inline-block;
  padding: 0.35rem 0.9rem;
  border: var(--line) solid var(--outline);
  background: var(--shade);
  color: var(--white);
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { border-color: var(--yellow); color: var(--white); }
.button:active { transform: translate(1px, 1px); }

.bar { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem; margin: 0.9rem 0; }

.play { --taken: 5.6rem; padding-top: 0.8rem; }
.play.watching { --taken: 8.3rem; }
.stage {
  position: relative;
  height: min(calc(100dvh - var(--taken)), calc((100vw - 1rem) * 1.5));
  min-height: 297px;
  max-width: 100%;
  aspect-ratio: 2 / 3;
  margin: 0 auto;
  outline: var(--line) solid var(--outline);
  background: #000;
}
@supports (height: round(down, 5px, 2px)) {
  .stage.whole {
    --step: calc(var(--dot) * 198);
    --room: min(max(100dvh - var(--taken), 297px), (100vw - 2rem) * 1.5);
    --high: max(round(down, var(--room), var(--step)), var(--step));
    width: calc(var(--high) * 2 / 3);
    height: var(--high);
    min-height: 0;
    max-width: none;
  }
}
.stage iframe { display: block; width: 100%; height: 100%; border: 0; }

.caption { margin: 0 0 0.5rem; color: var(--grey); font-size: 1.2rem; line-height: 1.4; }
.caption strong { color: var(--pale); }

.close {
  display: none;
  position: absolute;
  top: max(0.4rem, env(safe-area-inset-top));
  right: max(0.4rem, env(safe-area-inset-right));
  width: 2.2rem;
  height: 2.2rem;
  padding: 0;
  border: var(--line) solid var(--outline);
  background: var(--ink);
  color: var(--white);
  font: 800 1.3rem/1 "Nunito", system-ui, sans-serif;
  opacity: 0.75;
  cursor: pointer;
}
.stage:fullscreen, .pinned .stage {
  width: 100%;
  height: 100%;
  min-height: 0;
  max-width: none;
  aspect-ratio: auto;
  outline: 0;
}
.pinned .stage { position: fixed; inset: 0; z-index: 10; }
.stage:fullscreen .close, .pinned .close { display: block; }
html.pinned, .pinned body { overflow: hidden; }

.about { max-width: 646px; margin: 1.8rem auto 0; }
.about p { margin: 0 0 1rem; font-size: 1.2rem; line-height: 1.4; }
.about strong { color: var(--white); white-space: nowrap; }
.steam { display: block; width: 100%; height: 190px; border: 0; color-scheme: light; }

footer { margin-top: 2.5rem; font-size: 0.95rem; font-weight: 800; }
footer a { color: var(--grey); text-decoration: none; }
footer a:hover { color: var(--yellow); }

.board { max-width: 34rem; }

.days { display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem; margin: 0 0 0.8rem; }
.days time { flex: 1; color: var(--white); font-weight: 800; }
.turn { flex: 0 0 8.2rem; font-size: 0.95rem; white-space: nowrap; }
.turn.back { text-align: left; }
.turn.on { text-align: right; }

.rule { display: flex; align-items: center; justify-content: center; gap: 0.7rem; margin: 0 0 0.9rem; text-align: left; }
.rule .said { color: var(--grey); line-height: 1.3; }
.rule strong { display: block; color: var(--yellow); font-weight: 800; }
.rule .label { color: var(--white); }
.icon {
  flex: none;
  width: 36px;
  height: 36px;
  background: url("/game/rules.png") no-repeat;
  background-size: 216px auto;
  image-rendering: pixelated;
}
.i0 { background-position: 0px 0px; } .i1 { background-position: -36px 0px; } .i2 { background-position: -72px 0px; } .i3 { background-position: -108px 0px; }
.i4 { background-position: -144px 0px; } .i5 { background-position: -180px 0px; } .i6 { background-position: 0px -36px; } .i7 { background-position: -36px -36px; }
.i8 { background-position: -72px -36px; } .i9 { background-position: -108px -36px; } .i10 { background-position: -144px -36px; } .i11 { background-position: -180px -36px; }
.i12 { background-position: 0px -72px; } .i13 { background-position: -36px -72px; } .i14 { background-position: -72px -72px; } .i15 { background-position: -108px -72px; }
.i16 { background-position: -144px -72px; } .i17 { background-position: -180px -72px; } .i18 { background-position: 0px -108px; } .i19 { background-position: -36px -108px; }
.i20 { background-position: -72px -108px; } .i21 { background-position: -108px -108px; } .i22 { background-position: -144px -108px; } .i23 { background-position: -180px -108px; }

table {
  width: 100%;
  border: var(--line) solid var(--outline);
  border-collapse: collapse;
  background: var(--shade);
  text-align: left;
}
th, td { padding: 0.35rem 0.6rem; }
th { background: var(--band); color: var(--grey); font-size: 0.85rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; }
tbody tr:nth-child(even) { background: color-mix(in srgb, var(--shade) 80%, var(--ink)); }
.place { width: 2.6rem; color: var(--grey); text-align: right; font-variant-numeric: tabular-nums; }
.name { overflow-wrap: anywhere; }
td.name { color: var(--white); }
.score { width: 5rem; text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.replay { width: 4.6rem; text-align: right; }
.won { color: var(--yellow); }

.empty { margin: 2rem 0; padding: 1.4rem 1rem; border: var(--line) dashed var(--outline); color: var(--grey); }
.legend { margin: 0.8rem 0 0; color: var(--grey); font-size: 0.9rem; }

@media (max-width: 30rem) {
  .days { flex-wrap: wrap; }
  .days time { flex: 1 0 100%; order: -1; margin-bottom: 0.3rem; }
  .turn { flex: 1; }
  th, td { padding: 0.35rem 0.4rem; }
}

@media (prefers-reduced-motion: no-preference) {
  .button { transition: transform 60ms; }
}
