:root {
  font-family: "Yu Gothic", Meiryo, sans-serif;
  color: #f3f0e6;
  background: #151d18;
  --accent: #e7fa86;
  --muted: #a3ab9e;
  --line: #f4f0df20;
  --stage-height: min(760px, calc(100svh - 146px));
  color-scheme: dark;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: radial-gradient(ellipse at 10% 60%, #29332a88, transparent 60%);
  min-height: 100svh;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  font: inherit;
}
button:focus-visible,
a:focus-visible,
canvas:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 4px;
}
[hidden] {
  display: none !important;
}
.site-header {
  height: 76px;
  max-width: 1240px;
  margin: auto;
  padding: 0 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.brand {
  font-size: 21px;
  font-weight: 900;
  letter-spacing: -1px;
}
.brand > span {
  font-size: 18px;
  margin-left: 4px;
}
.brand i {
  color: var(--accent);
  font-style: normal;
}
nav {
  display: flex;
  gap: 30px;
  align-items: center;
}
.edition {
  font: 10px monospace;
  letter-spacing: 2px;
  color: var(--muted);
}
.demo-link {
  font-size: 12px;
  border-bottom: 1px solid #9ba38e;
  padding: 8px 0;
}
.demo-link span {
  margin-left: 13px;
  color: var(--accent);
}
main {
  max-width: 1180px;
  margin: auto;
  padding: 22px 38px 16px;
  display: grid;
  grid-template-columns: minmax(310px, 1fr) auto;
  gap: 54px;
  align-items: center;
}
.eyebrow {
  font-size: 9px;
  letter-spacing: 2.8px;
  color: var(--muted);
  margin: 0 0 25px;
}
.eyebrow > span {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  margin-right: 9px;
}
.copy h1 {
  margin: 0;
  line-height: 1.14;
  letter-spacing: -2px;
}
.title-prefix {
  display: block;
  font-size: clamp(20px, 2.8vw, 35px);
  font-weight: 700;
}
.ten {
  display: block;
  color: var(--accent);
  font-family: Arial, sans-serif;
  font-size: clamp(85px, 10vw, 148px);
  font-weight: 800;
  letter-spacing: -9px;
  line-height: 1.08;
  position: relative;
}
.ten > span {
  font-size: 0.48em;
  letter-spacing: -3px;
  margin-left: 6px;
}
.ten > i {
  font:
    italic 15px "Yu Mincho",
    serif;
  color: #aeb4a1;
  letter-spacing: 1px;
  margin-left: 19px;
  vertical-align: middle;
}
.title-end {
  display: block;
  font-size: clamp(36px, 4.2vw, 54px);
  font-weight: 900;
}
.lead {
  font-size: 15px;
  line-height: 1.9;
  margin: 25px 0 23px;
  color: #d2d7c9;
}
.how {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  max-width: 390px;
}
.pointer-icon {
  font: 30px Arial;
  color: var(--accent);
  transform: rotate(-15deg);
}
.how strong {
  font-size: 12px;
}
.how p {
  font-size: 10px;
  color: var(--muted);
  margin: 7px 0 0;
  line-height: 1.6;
}
.beats {
  display: flex;
  gap: 23px;
  margin: 12px 0 24px;
}
.beats span {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: var(--muted);
  font-size: 9px;
}
.beats b {
  color: #e4e8d8;
  font: 18px monospace;
}
.beats span:last-child b {
  color: var(--accent);
}
.aside-note {
  font-size: 10px;
  color: #8b9585;
  letter-spacing: 1px;
}
.game-column {
  width: calc(var(--stage-height) * 0.75);
}
#stage {
  position: relative;
  width: 100%;
  aspect-ratio: 3/4;
  background: #303b31;
  border-radius: 13px;
  overflow: hidden;
  isolation: isolate;
  box-shadow: 0 24px 70px #0006;
}
canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  user-select: none;
}
.stage-edge {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border: 1px solid #f7fbe530;
  border-radius: 13px;
}
.stage-brand {
  position: absolute;
  bottom: 11px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 8px;
  letter-spacing: 1px;
  color: #fff9;
  pointer-events: none;
}
.hud {
  position: absolute;
  top: 22px;
  left: 23px;
  pointer-events: none;
  text-shadow: 0 2px 10px #0009;
}
.hud > span {
  font-size: 9px;
  letter-spacing: 2px;
}
.hud > div {
  display: flex;
  align-items: baseline;
  gap: 7px;
}
.hud strong {
  font-size: clamp(32px, 4vw, 49px);
  font-family: Arial, sans-serif;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -2px;
}
.hud small {
  font-size: 11px;
}
.top-actions {
  position: absolute;
  z-index: 3;
  top: 21px;
  right: 17px;
  display: flex;
  gap: 8px;
  align-items: center;
}
.sound {
  border: 1px solid #fff4;
  background: #15231f55;
  backdrop-filter: blur(5px);
  color: #eee;
  font-size: 10px;
  min-width: 51px;
  min-height: 44px;
  border-radius: 100px;
  cursor: pointer;
}
#demo-badge {
  font: 9px monospace;
  letter-spacing: 1px;
  color: var(--accent);
}
.overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  flex-direction: column;
  padding: 26px 28px;
  gap: 10px;
}
.intro {
  justify-content: flex-end;
  background: linear-gradient(transparent 60%, #14201ee8);
  pointer-events: none;
}
.speech {
  position: absolute;
  top: 33%;
  right: 9%;
  color: #fff;
  font:
    bold 22px/1.5 "Yu Mincho",
    serif;
  transform: rotate(8deg);
  text-shadow: 0 2px 12px #0008;
}
.speech span {
  display: block;
  color: var(--accent);
  margin-left: 15px;
}
.start-block {
  width: 100%;
  text-align: center;
  margin-bottom: 6px;
  pointer-events: auto;
}
.start-block p {
  font-size: 11px;
  letter-spacing: 1px;
  margin: 0 0 12px;
}
.start-block small {
  display: block;
  font-size: 8px;
  color: #c5cbba;
  margin-top: 10px;
}
.primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  min-height: 52px;
  padding: 14px 20px;
  background: var(--accent);
  color: #19211b;
  border: 0;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition:
    background 0.15s,
    transform 0.15s;
}
.primary:hover {
  background: #f0ffb4;
  transform: translateY(-1px);
}
.primary:disabled {
  opacity: 0.6;
  cursor: wait;
  transform: none;
}
.game-caption {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  font-size: 8px;
  letter-spacing: 1px;
  color: #9ba491;
}
.game-caption > span:first-child {
  font-family: monospace;
  font-size: 8px;
}
.result {
  justify-content: center;
  background: #14201eeb;
  backdrop-filter: blur(8px);
  gap: 9px;
  text-align: center;
}
.result-stamp {
  font: 700 25px Arial;
  width: 56px;
  height: 56px;
  border: 1px solid #dae6c955;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #bcc7b0;
  transform: rotate(-12deg);
  margin-bottom: 9px;
}
.won .result-stamp {
  background: var(--accent);
  border: 0;
  color: #15211a;
  animation: clear-stamp 0.55s cubic-bezier(0.16, 1.4, 0.3, 1) both;
}
.result .eyebrow {
  font-size: 9px;
  letter-spacing: 2px;
  margin: 4px 0 5px;
}
.result h2 {
  font: 800 clamp(30px, 4vw, 44px) Arial;
  margin: 0;
  letter-spacing: -1px;
}
.won h2 {
  color: var(--accent);
  font-size: clamp(35px, 5vw, 52px);
  text-shadow: 0 0 28px #dfff7166;
  animation: clear-title 0.62s cubic-bezier(0.16, 1.35, 0.3, 1) both;
}
@keyframes clear-stamp {
  from { opacity: 0; transform: rotate(-32deg) scale(2.4); }
  to { opacity: 1; transform: rotate(-12deg) scale(1); }
}
@keyframes clear-title {
  0% { opacity: 0; transform: scale(0.45); letter-spacing: 12px; }
  70% { transform: scale(1.12); }
  100% { opacity: 1; transform: scale(1); letter-spacing: -1px; }
}
.survival-label {
  font-size: 10px;
  margin: 14px 0 0;
  color: #bac4ae;
  letter-spacing: 2px;
}
.survival {
  display: flex;
  align-items: baseline;
  gap: 7px;
}
.survival strong {
  font: 700 53px Arial;
  letter-spacing: -2px;
  font-variant-numeric: tabular-nums;
}
.survival > span {
  font-size: 12px;
}
.result-title {
  font-size: 14px;
  margin: 4px 0 0;
}
.result #near-count {
  font-size: 10px;
  color: #a6b29a;
  margin: 0 0 13px;
}
.share-button {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  border: 1px solid #f4f4e655;
  min-height: 48px;
  border-radius: 6px;
  width: 100%;
  font-size: 12px;
}
.share-button:hover {
  background: #ffffff12;
}
.back-link {
  font-size: 10px;
  color: #a7b19e;
  margin-top: 7px;
  padding: 8px;
}
.paused {
  background: #15221bed;
  justify-content: center;
  text-align: center;
  z-index: 5;
}
.paused h2 {
  margin: 0;
}
.paused p {
  font-size: 12px;
}
.paused .primary {
  max-width: 260px;
}
footer {
  max-width: 1240px;
  margin: auto;
  padding: 0 38px 13px;
  display: flex;
  justify-content: space-between;
  color: #788472;
  font-size: 8px;
  letter-spacing: 1px;
}
footer > span:last-child {
  font-family: monospace;
}
.demo .stage-brand {
  color: #ffffcf;
  font-weight: 700;
}
.demo .copy .lead::after {
  content: "DEMO MODE";
  display: block;
  color: var(--accent);
  font: 11px monospace;
  letter-spacing: 3px;
  margin-top: 16px;
}
@media (min-width: 761px) and (max-height: 720px) {
  .eyebrow {
    margin-bottom: 15px;
  }
  .lead {
    margin: 17px 0;
  }
  .how {
    padding: 13px 0;
  }
  .beats {
    margin: 9px 0 17px;
  }
  .ten {
    font-size: 108px;
  }
  .result-stamp {
    display: none;
  }
  .result {
    gap: 7px;
  }
  .survival strong {
    font-size: 45px;
  }
}
@media (max-width: 960px) and (min-width: 761px) {
  main {
    gap: 25px;
    padding-left: 25px;
    padding-right: 25px;
  }
  .title-prefix {
    font-size: 24px;
  }
  .title-end {
    font-size: 40px;
  }
  .ten {
    font-size: 108px;
  }
  .beats {
    gap: 20px;
  }
  .game-column {
    max-width: 44vw;
  }
  .edition {
    display: none;
  }
}
@media (max-width: 760px) {
  :root {
    --stage-height: min(calc(100svh - 151px), calc((100vw - 24px) * 4 / 3));
  }
  .site-header {
    height: 53px;
    padding: 0 17px;
    border-bottom: 0;
  }
  .brand {
    font-size: 18px;
  }
  .brand > span {
    font-size: 16px;
  }
  .edition {
    display: none;
  }
  .demo-link {
    font-size: 10px;
    padding: 6px 0;
  }
  .demo-link span {
    margin-left: 6px;
  }
  main {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0 12px 12px;
  }
  .copy {
    width: 100%;
    max-width: 490px;
    text-align: center;
  }
  .copy .eyebrow,
  .lead,
  .how,
  .beats,
  .aside-note {
    display: none;
  }
  .copy h1 {
    font-size: 16px;
    letter-spacing: -0.5px;
    line-height: 1.5;
  }
  .title-prefix,
  .title-end {
    display: inline;
    font-size: 16px;
  }
  .ten {
    display: inline;
    font-size: 22px;
    line-height: 1;
    letter-spacing: -1px;
    margin: 0 3px;
  }
  .ten > span {
    font-size: 16px;
    margin: 0;
    letter-spacing: 0;
  }
  .ten > i {
    display: none;
  }
  .game-column {
    max-width: 100%;
    width: calc(var(--stage-height) * 0.75);
  }
  #stage {
    border-radius: 10px;
  }
  .hud {
    top: 17px;
    left: 18px;
  }
  .hud strong {
    font-size: 39px;
  }
  .top-actions {
    top: 14px;
    right: 13px;
  }
  .overlay {
    padding: 22px;
    gap: 8px;
  }
  .speech {
    font-size: 19px;
  }
  .start-block p {
    font-size: 10px;
  }
  .primary {
    min-height: 48px;
    font-size: 13px;
  }
  .game-caption {
    font-size: 7px;
    margin-top: 9px;
    letter-spacing: 0.4px;
  }
  .game-caption > span:first-child {
    font-size: 7px;
  }
  footer {
    justify-content: center;
    padding: 0 12px 8px;
    font-size: 7px;
  }
  footer > span:last-child {
    display: none;
  }
  .result h2 {
    font-size: 33px;
  }
  .result-stamp {
    width: 43px;
    height: 43px;
    font-size: 22px;
    margin-bottom: 3px;
  }
  .survival strong {
    font-size: 44px;
  }
  .result-title {
    font-size: 12px;
  }
  .result .eyebrow {
    font-size: 8px;
  }
  .result #near-count {
    margin-bottom: 9px;
  }
  .share-button {
    min-height: 45px;
  }
  .survival-label {
    margin-top: 8px;
  }
  .demo .copy .lead::after {
    display: none;
  }
}
@media (max-width: 760px) and (max-height: 650px) {
  .result-stamp,
  .game-caption,
  footer {
    display: none;
  }
  .result {
    gap: 5px;
  }
  .result h2 {
    font-size: 28px;
  }
  .survival strong {
    font-size: 37px;
  }
  .result .primary,
  .share-button {
    min-height: 43px;
  }
  .speech {
    font-size: 16px;
  }
  .start-block small {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}
