:root {
  --paper: #f5f2e9;
  --ink: #262820;
  --orange: #f4582c;
  --muted: #77786d;
  --line: #d8d8cc;
  --lime: #e6eea3;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  color: inherit;
}
button:focus-visible,
a:focus-visible,
textarea:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 4px;
}
button {
  touch-action: manipulation;
}
button:disabled {
  cursor: wait;
  opacity: 0.7;
}
[hidden] {
  display: none !important;
}
header {
  max-width: 1320px;
  margin: auto;
  height: 102px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  border-bottom: 1px solid var(--line);
}
.wordmark {
  font-size: 42px;
  letter-spacing: -3px;
  font-weight: 900;
  color: var(--ink);
  text-decoration: none;
}
.wordmark span {
  color: var(--orange);
  font-size: 29px;
  display: inline-block;
  vertical-align: top;
  padding: 4px 0 0 7px;
}
.header-note {
  font-size: 13px;
  color: var(--muted);
}
.plain {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: 12px 19px;
  font-size: 12px;
}
main {
  max-width: 1224px;
  margin: auto;
  padding: 0 32px;
}
.intro {
  padding: 32px 0 25px;
  text-align: center;
}
.eyebrow {
  font-family: monospace;
  font-size: 11px;
  letter-spacing: 1.7px;
  display: flex;
  gap: 9px;
  align-items: center;
  justify-content: center;
}
.dot {
  height: 7px;
  width: 7px;
  border-radius: 50%;
  background: var(--orange);
}
h1 {
  font-size: clamp(56px, 6.9vw, 91px);
  letter-spacing: -6px;
  line-height: 1.05;
  margin: 20px 0 16px;
  font-weight: 900;
  position: relative;
  display: inline-block;
}
h1 > span {
  font-family: Georgia, serif;
  font-style: italic;
  font-weight: normal;
  color: var(--orange);
}
.spark {
  position: absolute;
  right: -68px;
  top: 3px;
  width: 45px;
  height: 45px;
  stroke: var(--orange);
  stroke-width: 3;
  transform: rotate(13deg);
}
.intro p {
  font-size: 16px;
  color: var(--muted);
}
.workspace {
  display: grid;
  grid-template-columns: 195px minmax(0, 590px) 205px;
  justify-content: center;
  gap: 26px;
  align-items: start;
}
.modes {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding-top: 18px;
}
.modes button {
  background: transparent;
  border: 1px solid transparent;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  padding: 15px 12px;
  border-radius: 9px;
  white-space: nowrap;
}
.modes button span {
  display: inline-block;
  width: 31px;
  font-size: 22px;
  vertical-align: middle;
  font-weight: normal;
}
.modes button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--paper);
}
.modes button:hover:not([aria-pressed="true"]) {
  background: #eae7dc;
}
.decision-card {
  border: 1px solid #cecec1;
  border-radius: 17px;
  background: #fcfaf3;
  overflow: hidden;
  box-shadow: 0 5px 0 #e4e2d7;
}
.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  border-bottom: 1px solid #e4e2d7;
  font: 10px monospace;
  letter-spacing: 1px;
}
.fair-badge {
  color: #62694b;
  font-size: 9px;
}
.play-area {
  padding: 5px 30px 16px;
  text-align: center;
}
.coin-wrap {
  position: relative;
  width: 100%;
  height: 210px;
  display: flex;
  justify-content: center;
  align-items: center;
  isolation: isolate;
}
.coin {
  height: 161px;
  width: 161px;
  border-radius: 50%;
  background: #f4b643;
  border: 2px solid #a86c15;
  box-shadow:
    0 7px 0 #ce8d24,
    0 9px 0 #a86c15,
    0 18px 24px #28282012;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  outline: 1px dashed #a86c15;
  outline-offset: -10px;
  transform: rotate(-12deg);
  position: relative;
  z-index: 1;
}
.coin-small {
  font: 7px monospace;
  letter-spacing: 1.3px;
}
.coin-face {
  font-family: Georgia, serif;
  font-size: 88px;
  line-height: 1.18;
  font-style: italic;
  color: #805323;
  text-shadow: 1px 2px #f8cf6b;
}
.orbit {
  position: absolute;
  width: 260px;
  height: 130px;
  border: 1px solid #dedbcc;
  border-radius: 50%;
  transform: rotate(-20deg);
  z-index: -1;
}
.orbit-two {
  width: 200px;
  height: 205px;
  transform: rotate(25deg);
  border-style: dashed;
}
.doodle {
  position: absolute;
  color: var(--orange);
}
.d1 {
  top: 41px;
  right: 20%;
  font-size: 30px;
}
.d2 {
  bottom: 34px;
  left: 20%;
  font-size: 26px;
}
.coin-note {
  font:
    italic 12px Georgia,
    serif;
  position: absolute;
  right: 1%;
  bottom: 31px;
  transform: rotate(-9deg);
  color: var(--muted);
  text-align: left;
  line-height: 1.4;
}
h2 {
  font-size: 24px;
  letter-spacing: -0.9px;
  margin: 8px 0 10px;
}
.subtext {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  margin: 0 0 18px;
}
.coin-options {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 25px;
  font-size: 12px;
  margin: 25px 0 28px;
}
.coin-options label {
  color: var(--muted);
}
select {
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
  font-weight: bold;
  padding: 8px 3px;
  cursor: pointer;
}
.text-button {
  background: transparent;
  border: 0;
  padding: 8px 0;
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.go {
  border: 0;
  background: var(--orange);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 18px 23px;
  min-height: 60px;
  font-size: 17px;
  letter-spacing: -0.3px;
  font-weight: 700;
  border-radius: 9px;
  box-shadow: 0 3px 0 #bc3b16;
  transition:
    transform 0.15s,
    background 0.15s;
}
.go:hover {
  background: #de451b;
  transform: translateY(-1px);
}
.go:active {
  transform: translateY(2px);
  box-shadow: none;
}
.go > span:last-child {
  font-size: 26px;
  font-weight: normal;
}
.keyboard-hint {
  font: 9px monospace;
  letter-spacing: 1px;
  margin: 18px 0 1px;
  color: #66695d;
}
.keyboard-hint span {
  color: #96978c;
}
.side-note {
  margin-top: 61px;
  background: var(--lime);
  padding: 24px 21px 20px;
  transform: rotate(3deg);
  box-shadow: 3px 4px 0 #2428200a;
  position: relative;
}
.side-note:before {
  content: "";
  position: absolute;
  width: 67px;
  height: 22px;
  top: -11px;
  left: 60px;
  background: #d5d3c275;
  transform: rotate(-9deg);
}
.note-star {
  font-size: 40px;
  font-weight: normal;
}
.side-note h3 {
  font-size: 20px;
  line-height: 1.15;
  letter-spacing: -0.7px;
  margin: 18px 0 15px;
}
.side-note p {
  font-size: 12px;
  line-height: 1.6;
}
.note-line {
  border-top: 1px solid #bfc67f;
  margin: 23px 0 15px;
}
.note-footer {
  font: 8px monospace;
  line-height: 1.7;
  letter-spacing: 0.5px;
}
.bottom-strip {
  border-top: 1px solid var(--line);
  margin-top: 48px;
  padding: 23px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font: 9px monospace;
  letter-spacing: 0.7px;
  color: var(--muted);
}
.bottom-strip span:nth-child(2) {
  font:
    12px Arial,
    sans-serif;
  letter-spacing: 0;
}
.bottom-strip b {
  font-size: 20px;
  color: var(--orange);
  padding-left: 7px;
}
footer {
  max-width: 1224px;
  margin: 0 auto;
  padding: 13px 32px 28px;
  display: flex;
  justify-content: space-between;
  font: 10px monospace;
  color: #85877b;
  gap: 20px;
}
.two-fields {
  display: flex;
  gap: 12px;
  margin: 0 0 22px;
  text-align: left;
}
.two-fields label {
  font-size: 11px;
  flex: 1;
  min-width: 0;
}
.two-fields input {
  display: block;
  width: 100%;
  margin-top: 7px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: transparent;
  font-size: 13px;
}
.panel-icon {
  font-size: 55px;
  color: var(--orange);
  margin: 19px 0 13px;
}
.input-label {
  text-align: left;
  display: block;
  font: 10px monospace;
  letter-spacing: 1px;
  margin: 24px 0 10px;
}
textarea {
  display: block;
  width: 100%;
  resize: vertical;
  min-height: 135px;
  max-height: 350px;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 9px;
  padding: 14px 16px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
}
textarea::placeholder {
  color: #999b8c;
}
.list-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  margin-top: 12px;
  gap: 12px;
  min-height: 24px;
}
.list-options label {
  display: flex;
  align-items: center;
  gap: 6px;
}
.list-options input[type="checkbox"] {
  accent-color: var(--orange);
  width: 17px;
  height: 17px;
}
.list-options input[type="number"] {
  width: 59px;
  border: 1px solid var(--line);
  padding: 6px;
  border-radius: 5px;
  background: transparent;
}
.list-options > span {
  color: var(--muted);
  font: 10px monospace;
}
.input-hint {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
  text-align: left;
  margin-bottom: 2px;
}
#example {
  display: block;
  margin-bottom: 20px;
}
#error {
  background: #ffe6db;
  color: #9f2a09;
  padding: 12px;
  border-radius: 7px;
  text-align: left;
  font-size: 13px;
  line-height: 1.4;
}
#result {
  margin: 20px 0 24px;
  padding: 21px 15px;
  background: #eaf0bf;
  border: 1px solid #d9dfaa;
  border-radius: 9px;
  animation: reveal 0.25s ease-out;
}
.result-kicker {
  font: 9px monospace;
  letter-spacing: 1.4px;
}
#result-content {
  font-size: 34px;
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -1px;
  margin: 14px 0;
  overflow-wrap: anywhere;
}
#result-detail {
  font-size: 11px;
  line-height: 1.6;
  color: #646b4b;
  white-space: pre-line;
}
.result-group {
  font-size: 15px;
  font-weight: normal;
  letter-spacing: 0;
  text-align: left;
  border-bottom: 1px solid #d0d7a3;
  padding: 10px 2px;
  line-height: 1.5;
}
.result-group b {
  display: block;
  font: 10px monospace;
  color: #69704b;
  margin-bottom: 3px;
}
.history {
  max-width: 590px;
  margin: 35px auto 0;
}
.history-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.history-heading h3 {
  font-size: 13px;
  font-weight: 500;
}
.history ol {
  list-style: none;
  margin: 8px 0;
  padding: 0;
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.history li {
  max-width: 100%;
  overflow-wrap: anywhere;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 11px;
  padding: 9px 12px;
  color: #676b59;
}
.history li span {
  font: 9px monospace;
  opacity: 0.7;
  padding-right: 8px;
}
.flipping {
  animation: toss 0.55s ease-in-out;
}
.noscript {
  text-align: center;
  padding: 30px;
}
@keyframes toss {
  0% {
    transform: rotate(-12deg) scale(1);
  }
  50% {
    transform: translateY(-25px) rotateY(540deg) rotate(-12deg) scale(1.1);
  }
  100% {
    transform: rotateY(1080deg) rotate(-12deg);
  }
}
@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1050px) {
  .workspace {
    grid-template-columns: 170px minmax(0, 560px);
    gap: 22px;
  }
  .side-note {
    display: none;
  }
  .intro {
    padding-top: 42px;
  }
  .bottom-strip span:last-child {
    display: none;
  }
}
@media (max-width: 650px) {
  header {
    height: 77px;
    padding: 0 22px;
  }
  .wordmark {
    font-size: 35px;
  }
  .wordmark span {
    font-size: 24px;
  }
  .header-note {
    display: none;
  }
  .plain {
    padding: 10px 13px;
    font-size: 11px;
  }
  main {
    padding: 0 17px;
  }
  .intro {
    padding: 31px 0 21px;
  }
  .eyebrow {
    font-size: 9px;
    letter-spacing: 1.2px;
  }
  h1 {
    font-size: 60px;
    letter-spacing: -4px;
    margin: 18px 0 9px;
  }
  .spark {
    width: 27px;
    right: -31px;
    top: 0;
  }
  .intro p {
    font-size: 13px;
    margin-bottom: 8px;
  }
  .workspace {
    display: flex;
    flex-direction: column;
    gap: 13px;
  }
  .modes {
    display: flex;
    flex-direction: row;
    width: 100%;
    gap: 6px;
    overflow-x: auto;
    padding: 4px 0 9px;
    scrollbar-width: none;
  }
  .modes button {
    padding: 10px 13px;
    font-size: 11px;
    flex-shrink: 0;
    border: 1px solid var(--line);
    border-radius: 30px;
  }
  .modes button span {
    font-size: 16px;
    width: 22px;
  }
  .decision-card {
    width: 100%;
    border-radius: 13px;
  }
  .card-top {
    padding: 14px 17px;
    font-size: 9px;
  }
  .fair-badge {
    font-size: 8px;
  }
  .play-area {
    padding: 0 20px 16px;
  }
  .coin-wrap {
    height: 204px;
  }
  .coin {
    width: 137px;
    height: 137px;
  }
  .coin-face {
    font-size: 73px;
  }
  .coin-small {
    font-size: 6px;
  }
  .orbit-one {
    width: 225px;
    height: 110px;
  }
  .orbit-two {
    width: 172px;
    height: 177px;
  }
  .coin-note {
    font-size: 10px;
    right: 0;
    bottom: 23px;
  }
  .d1 {
    right: 15%;
    top: 29px;
  }
  .d2 {
    left: 13%;
    bottom: 27px;
  }
  h2 {
    font-size: 22px;
    margin-top: 7px;
  }
  .subtext {
    font-size: 12px;
  }
  .coin-options {
    margin: 17px 0 23px;
    gap: 19px;
  }
  .go {
    min-height: 58px;
    font-size: 16px;
  }
  .keyboard-hint span {
    display: none;
  }
  .bottom-strip {
    margin-top: 31px;
    padding: 19px 0;
    gap: 20px;
  }
  .bottom-strip span:first-child {
    font-size: 8px;
  }
  .bottom-strip span:nth-child(2) {
    font-size: 10px;
  }
  .bottom-strip b {
    display: none;
  }
  footer {
    padding: 7px 18px 25px;
    flex-direction: column;
    gap: 9px;
    font-size: 9px;
  }
  #result-content {
    font-size: 29px;
  }
  .history {
    margin-top: 24px;
  }
  .panel-icon {
    margin-top: 20px;
    font-size: 43px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 650px) {
  .modes {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 5px;
    overflow: visible;
    padding-bottom: 1px;
  }
  .modes button {
    font-size: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 9px 2px;
    border-radius: 12px;
    min-height: 62px;
    min-width: 0;
  }
  .modes button span {
    width: auto;
    font-size: 20px;
  }
  .modes button:after {
    content: attr(data-mobile);
    font-size: 10px;
    font-weight: 600;
  }
  .list-options {
    flex-wrap: wrap;
  }
  #draw-label select {
    max-width: 115px;
  }
}

@media (max-width: 380px) {
  .spark {
    right: 0;
    top: -17px;
    width: 22px;
    height: 22px;
  }
}
