:root {
  color-scheme: light;
  --paper: #f5f2e9;
  --ink: #23231f;
  --red: #cb3525;
  --coral: #ff7056;
  --line: #c6c3b8;
  --soft: #eae7dc;
  --muted: #66645c;
  --mono: ui-monospace, 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
  --sans: 'Helvetica Neue', Arial, Helvetica, sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  background: var(--paper);
  color: var(--ink);
  margin: 0;
  font: 16px/1.45 var(--sans);
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}
body > main {
  flex: 1;
}
button,
a,
input {
  touch-action: manipulation;
}
button,
input,
textarea {
  font: inherit;
}
button {
  color: inherit;
  cursor: pointer;
}
a {
  color: inherit;
}
button {
  border: 0;
  background: none;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid #2368ac;
  outline-offset: 3px;
}
h1:focus,
h2:focus {
  outline: none;
}
button:disabled {
  cursor: default;
}
[hidden],
.sprite {
  display: none !important;
}
.wrap {
  width: min(calc(100% - max(40px, env(safe-area-inset-left) * 2 + 24px)), 1104px);
  margin-inline: auto;
}
.icon {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
  pointer-events: none;
}
svg {
  vertical-align: middle;
}
.mast {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--ink);
  padding: calc(17px + env(safe-area-inset-top)) 0 15px;
}
.brand {
  display: inline-flex;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
  font-size: clamp(20px, 3vw, 29px);
  font-weight: 950;
  letter-spacing: -1.8px;
  line-height: 1;
  min-height: 44px;
}
.brand > img {
  color: var(--red);
  width: 32px;
  height: 32px;
  margin-right: 9px;
}
.brand > span,
.red,
.page-title > span {
  color: var(--red);
}
.mast-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}
.icon-button,
.nav-stats {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  border-radius: 50%;
}
.nav-stats {
  border-radius: 0;
  gap: 7px;
  font-size: 14px;
  font-weight: 650;
  margin-right: 7px;
  padding-right: 20px;
  border-right: 1px solid var(--line);
}
.icon-button {
  border: 1px solid var(--line);
}
.icon-button .icon {
  width: 18px;
  height: 18px;
}
.cover {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  align-items: center;
  gap: 24px;
  padding: clamp(28px, 4.5vw, 66px) 0 clamp(30px, 4.2vw, 62px);
}
.eyebrow,
.mono,
.task-rule,
.specimen figcaption,
.version {
  font: 650 11px/1.4 var(--mono);
  text-transform: uppercase;
  letter-spacing: 1.2px;
}
.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
}
.eyebrow i {
  display: inline-block;
  width: 9px;
  height: 9px;
  background: var(--red);
  transform: rotate(-10deg);
}
h1,
h2,
p,
figure {
  margin: 0;
}
.cover h1,
.page-title {
  font-weight: 850;
  letter-spacing: -0.059em;
  line-height: 0.98;
}
.cover h1 {
  font-size: clamp(42px, 5.9vw, 84px);
  margin: 22px 0 21px;
}
.cover h1 em {
  color: var(--red);
  font-style: italic;
}
.cover-copy > p {
  max-width: 390px;
  font-size: clamp(16px, 1.6vw, 19px);
  color: #4f4e46;
  line-height: 1.55;
}
.cover-copy strong {
  font-weight: 750;
  color: var(--ink);
}
.specimen {
  position: relative;
  justify-self: center;
  width: min(100%, 405px);
  text-align: center;
}
.frame-art {
  position: relative;
  background: radial-gradient(circle at 1px 1px, #bdb8aa 1px, transparent 1.4px) 0 0/13px 13px;
  isolation: isolate;
}
.frame-art:before,
.frame-art:after {
  content: '+';
  position: absolute;
  font: 16px var(--mono);
  color: #847f72;
  top: -8px;
  left: -5px;
}
.frame-art:after {
  top: auto;
  left: auto;
  right: -5px;
  bottom: -8px;
}
.frame-art img {
  display: block;
  mix-blend-mode: darken;
  width: 100%;
  height: clamp(230px, 25vw, 344px);
  object-fit: contain;
}
.specimen figcaption {
  font-size: 9px;
  color: var(--muted);
  margin-top: 12px;
  letter-spacing: 1.1px;
}
.specimen figcaption span {
  color: var(--ink);
  font-weight: 800;
  margin-right: 9px;
}
.primary.start-button {
  margin-top: 22px;
  min-width: 210px;
  min-height: 56px;
  justify-content: space-between;
  font-size: 19px;
}
.home-record {
  margin: 17px 0 30px;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 3px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  text-align: left;
}
.home-record .icon {
  height: 18px;
  width: 18px;
}
.home-record strong {
  margin-left: auto;
}
.home-record span:last-child {
  margin-left: 6px;
}
.invite,
.share-panel {
  border: 1px solid var(--ink);
  border-left: 5px solid var(--red);
  padding: 16px;
  margin: 0 0 22px;
  border-radius: 4px;
}
.invite p {
  font-weight: 650;
  margin-bottom: 9px;
}
.plain,
.back,
footer button {
  padding: 8px 2px;
  text-decoration: underline;
  text-underline-offset: 3px;
  min-height: 44px;
}
.plain,
.back {
  font-size: 14px;
}
.invite .plain {
  margin-left: 14px;
}
footer.wrap {
  margin-top: 20px;
  padding: 14px 0 max(17px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: var(--muted);
  font-size: 12px;
}
footer > span {
  font-weight: 850;
  letter-spacing: -0.5px;
}
footer .version {
  font-size: 10px;
  letter-spacing: 0;
  margin-left: 3px;
}
footer > div {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
footer a,
footer button {
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-underline-offset: 3px;
}
.interior {
  width: min(100%, 720px);
  margin: clamp(24px, 4vw, 54px) auto;
}
.page-title {
  font-size: clamp(42px, 6vw, 72px);
  margin: 16px 0 30px;
}
.subhead,
.rank h2,
.verdict h2 {
  font-size: 24px;
  letter-spacing: -1px;
  line-height: 1.14;
}
.primary,
.secondary,
.small-button {
  min-height: 48px;
  border-radius: 5px;
  padding: 12px 18px;
  font-weight: 700;
  display: inline-flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--ink);
}
.primary {
  background: var(--ink);
  color: var(--paper);
}
.primary .icon {
  color: var(--coral);
}
.secondary,
.small-button {
  background: #faf8ef;
}
.small-button {
  min-height: 44px;
  padding: 8px 13px;
  font-size: 14px;
}
.back {
  margin-top: 12px;
}
.muted,
.rank p {
  color: var(--muted);
  font-size: 14px;
}
.game-meta,
.task-top,
.hud,
.game-note,
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.hud {
  align-items: end;
  margin: 7px 0 12px;
}
.hud > div {
  display: flex;
  flex-direction: column;
}
.hud strong,
.hud-right b {
  font-variant-numeric: tabular-nums;
  letter-spacing: -3px;
  line-height: 1.05;
}
.hud strong {
  font-size: 56px;
}
.hud-right {
  text-align: right;
}
.hud-right b {
  font-size: 32px;
  letter-spacing: -1.5px;
}
.hud .mono {
  color: var(--muted);
  margin-bottom: 3px;
}
.timer,
.rank-line {
  height: 7px;
  background: #d9d5c9;
  overflow: hidden;
}
.timer > div,
.rank-line > div {
  height: 100%;
  background: var(--ink);
  transform-origin: left;
}
.timer > div {
  will-change: transform;
}
.timer.urgent > div {
  background: var(--red);
}
.urgent-clock {
  color: var(--red);
}
.task {
  background: #faf8ef;
  border: 1.5px solid var(--ink);
  border-radius: 7px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  margin: 18px 0 12px;
  min-height: 225px;
  height: clamp(225px, 32svh, 330px);
  text-align: center;
  padding: 15px 20px 0;
}
.task-top {
  color: var(--muted);
}
.question-body {
  display: flex;
  min-height: 0;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 7px;
  padding: 7px 0;
}
.question-body h2 {
  font-size: clamp(22px, 4vw, 37px);
  line-height: 1.05;
  letter-spacing: -0.045em;
  text-wrap: balance;
}
.task-rule {
  border-top: 1px dashed var(--line);
  color: var(--red);
  padding: 10px 0;
  font-weight: 750;
}
.stimulus,
.recap-visual {
  display: flex;
  flex-wrap: nowrap;
  align-items: baseline;
  justify-content: center;
  gap: 0.17em;
  line-height: 1.05;
  font-weight: 800;
  font-size: clamp(28px, 5vw, 48px);
}
.stimulus:empty,
.recap-visual:empty,
#inkCode:empty {
  display: none;
}
.stimulus .word {
  letter-spacing: 0.04em;
}
.large {
  font-size: 1.32em;
}
.small {
  font-size: 0.59em;
}
.arrow {
  font-size: 1.24em;
}
.beat {
  font-size: 0.73em;
}
.missing {
  color: #706c60;
}
.rot {
  color: #ae281c;
}
.blau {
  color: #1956a4;
}
.gruen {
  color: #276634;
}
.violett {
  color: #754395;
}
#inkCode {
  font: 600 11px var(--mono);
  color: var(--muted);
}
.answers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.answer {
  position: relative;
  min-height: 84px;
  background: var(--ink);
  color: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 6px;
  font-size: clamp(20px, 4vw, 33px);
  font-weight: 750;
  line-height: 1.05;
  letter-spacing: -0.035em;
  padding: 18px 9px;
  overflow-wrap: anywhere;
  user-select: none;
  -webkit-user-select: none;
}
.answer kbd {
  position: absolute;
  left: 7px;
  top: 5px;
  color: #b3afa4;
  font: 10px var(--mono);
}
.answer.chosen {
  background: var(--coral);
  color: var(--ink);
}
.game-note {
  margin-top: 10px;
  color: var(--muted);
  font: 12px var(--mono);
  min-height: 20px;
}
.game-note #feedback {
  font-weight: 750;
  color: var(--red);
}
body[data-screen='game'] footer,
body[data-screen='game'] .mast-tools {
  display: none;
}
body[data-screen='game'] .brand {
  pointer-events: none;
}
.ticket {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  border: 1.5px solid var(--ink);
  border-radius: 7px;
  overflow: hidden;
}
.scoreblock,
.verdict {
  padding: clamp(16px, 3vw, 32px);
}
.scoreblock {
  background: var(--ink);
  color: var(--paper);
}
.scoreblock strong {
  font-size: clamp(60px, 8vw, 90px);
  letter-spacing: -0.075em;
  line-height: 1.1;
}
.scoreblock > span:last-child {
  display: block;
  color: #e1dbcb;
  font-size: 14px;
  margin-top: 6px;
}
.verdict {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 9px;
}
.verdict > .mono {
  color: var(--red);
}
.verdict p {
  font-size: 15px;
}
.recap-visual {
  justify-content: flex-start;
  font-size: 24px;
}
.result-actions,
.share-panel > div {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
.result-actions > * {
  flex: 1;
}
.milestone {
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
  color: var(--red);
  font-weight: 700;
}
.share-panel {
  margin: 16px 0 0;
}
.share-panel label {
  font-weight: 700;
}
.share-panel textarea {
  display: block;
  width: 100%;
  padding: 9px;
  margin: 7px 0;
  border: 1px solid var(--line);
  background: #fffdf5;
  color: var(--ink);
}
.stat-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-block: 1px solid var(--ink);
  padding: 18px 0;
}
.stat-row > div {
  padding-inline: 16px;
  border-left: 1px solid var(--line);
}
.stat-row > div:first-child {
  border-left: 0;
  padding-left: 0;
}
.stat-row strong {
  display: block;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.2;
  letter-spacing: -0.06em;
}
.rank {
  background: var(--soft);
  border-left: 4px solid var(--red);
  margin: 22px 0;
  padding: 20px;
}
.rank h2 {
  margin: 8px 0 15px;
}
.rank-line {
  height: 4px;
}
.rank-line > div {
  background: var(--red);
}
.rank p {
  margin-top: 7px;
}
#recent {
  list-style: none;
  padding: 0;
  margin: 12px 0;
}
#recent li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
#recent strong {
  margin-left: auto;
}
#recent time {
  font: 11px var(--mono);
  color: var(--muted);
}
dialog {
  color: var(--ink);
  background: var(--paper);
  width: min(400px, calc(100% - 32px));
  padding: 22px;
  border: 2px solid var(--ink);
  border-radius: 8px;
}
dialog::backdrop {
  background: #25241d85;
}
.dialog-head h2 {
  letter-spacing: -1px;
}
.switch-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  font-weight: 650;
}
.switch-row small {
  font-size: 13px;
  display: block;
  font-weight: 400;
  color: var(--muted);
  margin-top: 3px;
}
.switch-row input {
  accent-color: var(--red);
  width: 22px;
  height: 22px;
  flex: none;
}
#erase {
  color: var(--red);
  margin-top: 12px;
}
#notice:not(:empty) {
  position: fixed;
  bottom: max(15px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 16px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 5px;
  z-index: 4;
  font-size: 14px;
  text-align: center;
  width: max-content;
  max-width: 90vw;
}
@media (hover: hover) {
  .icon-button:hover,
  .secondary:hover,
  .small-button:hover {
    background: var(--soft);
  }
  .primary:hover,
  .answer:not(:disabled):hover {
    background: #3b3a34;
  }
  .home-record:hover {
    text-decoration: underline;
  }
}
.primary:active,
.answer:active {
  transform: translateY(1px);
}
.bump {
  animation: bump 0.22s ease-out;
}
@keyframes bump {
  35% {
    transform: scale(1.14);
    color: var(--red);
  }
}
@media (max-width: 720px) {
  .cover {
    gap: 10px;
    grid-template-columns: 1.25fr 1fr;
  }
  .mast {
    padding-block: calc(9px + env(safe-area-inset-top)) 9px;
  }
}
@media (max-width: 580px) {
  .wrap {
    width: calc(100% - max(32px, env(safe-area-inset-left) * 2 + 20px));
  }
  .mast-tools {
    gap: 5px;
  }
  .nav-stats {
    padding: 0;
    margin: 0;
    border: 0;
  }
  .nav-stats span {
    display: none;
  }
  .brand > img {
    width: 25px;
    height: 25px;
    margin-right: 6px;
  }
  .icon-button {
    border: none;
  }
  .cover {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 20px 0 23px;
    position: relative;
  }
  .cover-copy {
    display: contents;
  }
  .cover .eyebrow {
    grid-row: 1;
    grid-column: 1;
    align-self: start;
  }
  .specimen {
    grid-row: 2;
    grid-column: 1;
    width: 69%;
    max-width: 265px;
    margin: 7px 0 10px;
  }
  .frame-art img {
    height: clamp(135px, 21svh, 193px);
  }
  .specimen figcaption {
    font-size: 8px;
    margin-top: 3px;
  }
  .cover h1 {
    grid-row: 3;
    margin: 5px 0 11px;
    font-size: clamp(41px, 10.9vw, 58px);
  }
  .primary.start-button {
    grid-row: 5;
    width: 100%;
    margin-top: 16px;
  }
  .cover-copy > p {
    grid-row: 4;
    max-width: 36ch;
    font-size: 15px;
  }
  .home-record {
    margin: 10px 0 7px;
    font-size: 13px;
  }
  .mast .icon-button,
  .mast .nav-stats {
    min-width: 44px;
  }
  footer.wrap {
    margin-top: 16px;
  }
  .interior {
    margin: 22px auto;
  }
  .ticket {
    grid-template-columns: 1fr;
  }
  .scoreblock,
  .verdict {
    padding: 17px 20px;
  }
  .scoreblock strong {
    font-size: 58px;
  }
  .scoreblock > div {
    display: inline-block;
    margin: 0 12px;
  }
  .scoreblock > .mono {
    display: block;
  }
  .scoreblock > div {
    margin-left: 0;
  }
  .scoreblock > span:last-child {
    display: inline;
  }
  .verdict h2 {
    font-size: 21px;
  }
  .result-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
  .hud strong {
    font-size: 48px;
  }
  .task {
    height: auto;
    min-height: 0;
    margin: 10px 0;
    flex: 1;
    padding-inline: 12px;
  }
  .answer {
    min-height: 70px;
  }
  .game-note {
    font-size: 11px;
  }
  .game-meta .plain {
    font-size: 12px;
  }
  .stat-row > div {
    padding-inline: 8px;
  }
  .stat-row .mono {
    font-size: 9px;
    letter-spacing: 0.4px;
  }
  .page-title {
    margin-bottom: 20px;
  }
  body[data-screen='game'] {
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    padding-bottom: env(safe-area-inset-bottom);
  }
  body[data-screen='game'] > main {
    display: flex;
    min-height: 0;
  }
  #game:not([hidden]) {
    display: flex;
    flex-direction: column;
    min-height: 0;
    margin: 5px auto 12px;
  }
  .question-body h2 {
    font-size: clamp(23px, 6.7vw, 34px);
  }
  .answers {
    gap: 8px;
  }
}
@media (max-height: 520px) {
  body[data-screen='game'] .mast {
    display: none;
  }
  #game:not([hidden]) {
    margin-block: 2px;
  }
  .game-meta .plain {
    min-height: 32px;
  }
  .hud strong {
    font-size: 31px;
  }
  .hud {
    margin: 0 0 5px;
  }
  .hud-right b {
    font-size: 24px;
  }
  .task {
    min-height: 95px;
    margin: 6px 0;
    height: clamp(104px, 36vh, 160px);
    padding-top: 5px;
  }
  .task-rule {
    padding: 3px;
  }
  .stimulus {
    font-size: 25px;
  }
  .question-body h2 {
    font-size: 20px;
  }
  .answer {
    min-height: 48px;
  }
  .game-note {
    margin-top: 4px;
  }
  .question-body {
    gap: 3px;
  }
  .task-top .mono {
    font-size: 9px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
.game-meta .plain {
  flex-shrink: 0;
}
.save-progress {
  display: block;
  color: var(--red);
  text-align: left;
}
.scoreblock.record > .mono:after {
  content: ' ★';
  color: var(--coral);
}
#home > .invite {
  margin: 20px 0 0;
}
@media (min-width: 581px) and (max-height: 760px) {
  body[data-screen='game'] {
    height: 100dvh;
    min-height: 0;
    padding-bottom: env(safe-area-inset-bottom);
  }
  body[data-screen='game'] > main {
    display: flex;
    min-height: 0;
  }
  #game:not([hidden]) {
    display: flex;
    flex-direction: column;
    min-height: 0;
    margin: 4px auto 10px;
  }
  .task {
    height: auto;
    min-height: 0;
    flex: 1;
  }
}
#scoreUnit {
  margin-left: 0.35em;
}
