@font-face {
  font-family: Space Grotesk;
  src: url("/fonts/space-grotesk-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: DM Sans;
  src: url("/fonts/dm-sans-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 1000;
  font-display: swap;
}
:root {
  --cream: #f7efdf;
  --paper: #fffaf1;
  --ink: #302536;
  --muted: #74685b;
  --orange: #ed7134;
  --purple: #9d8bca;
  --yellow: #f6cd55;
  --teal: #83bbad;
  --line: #e4dacb;
  --heading: "Space Grotesk", sans-serif;
  --body: "DM Sans", sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--body);
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}
button,
input {
  font: inherit;
}
button,
a,
input {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  color: inherit;
}
button:disabled {
  cursor: wait;
  opacity: 0.5;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 5px;
}
button {
  touch-action: manipulation;
}
button svg {
  width: 21px;
  height: 21px;
}
button[hidden],
[hidden] {
  display: none !important;
}
a {
  color: inherit;
}
.app-shell {
  max-width: 1320px;
  margin: auto;
  padding: 0 56px;
}
.site-header {
  min-height: 118px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  gap: 20px;
}
.wordmark {
  text-decoration: none;
  display: flex;
  gap: 11px;
  align-items: center;
  font: 700 29px/0.95 var(--heading);
  letter-spacing: -1.2px;
}
.wordmark b {
  color: var(--orange);
}
.wordmark small {
  display: block;
  margin-top: 9px;
  font: 700 8px/1 var(--body);
  letter-spacing: 1.8px;
}
.brand-symbol {
  position: relative;
  display: grid;
  place-items: center;
  background: var(--orange);
  border: 2px solid var(--ink);
  width: 41px;
  height: 49px;
  border-radius: 8px;
  transform: rotate(-9deg);
  box-shadow: 3px 3px 0 var(--ink);
  font-size: 36px;
  font-weight: 700;
}
.brand-symbol span {
  position: absolute;
  right: 2px;
  top: 3px;
  font-size: 12px;
}
.header-actions {
  display: flex;
  gap: 18px;
  align-items: center;
}
.saved-indicator {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  color: #6f675e;
}
.saved-indicator i {
  width: 6px;
  height: 6px;
  background: #639780;
  border-radius: 50%;
}
.saved-indicator.offline i {
  background: var(--orange);
}
.icon-button {
  display: grid;
  place-items: center;
  padding: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid #c3b8a8;
  background: transparent;
  font: 600 15px var(--heading);
}
.icon-button:hover {
  background: #eee4d2;
  border-color: var(--ink);
}
.main-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 68px;
  margin: 43px 0 38px;
  min-height: 600px;
  align-items: stretch;
}
.playful-panel {
  border-radius: 24px;
  background: var(--orange);
  overflow: hidden;
  position: relative;
  min-height: 610px;
  padding: 39px 36px 24px;
  display: flex;
  flex-direction: column;
}
.panel-eyebrow {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.7px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.panel-eyebrow span {
  width: 7px;
  height: 7px;
  background: var(--ink);
  border-radius: 50%;
}
.playful-panel h1 {
  font: 700 clamp(32px, 3.35vw, 45px)/1.12 var(--heading);
  letter-spacing: -2px;
  margin: 25px 0 14px;
}
.playful-panel h1 em {
  font-style: normal;
  color: var(--paper);
  position: relative;
}
.playful-panel h1 em:after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: -1px;
  width: 100%;
  height: 4px;
  background: var(--paper);
  border-radius: 50%;
  transform: rotate(-4deg);
}
.playful-panel > p {
  font-size: 14px;
  line-height: 1.7;
  margin: 0;
  color: #4e3329;
}
.card-scene {
  position: relative;
  height: 284px;
  width: 100%;
  margin: 30px 0 4px;
}
.playing-card {
  position: absolute;
  top: 18px;
  left: 50%;
  width: 151px;
  height: 218px;
  border: 2.5px solid var(--ink);
  border-radius: 13px;
  box-shadow: 5px 6px 0 #302536;
  display: flex;
  align-items: center;
  justify-content: center;
}
.playing-card:before {
  content: "";
  position: absolute;
  inset: 30px 10px;
  border: 1.5px solid #30253655;
  border-radius: 50%;
  transform: rotate(-24deg);
}
.card-purple {
  background: var(--purple);
  transform: translateX(-126%) rotate(-20deg);
  z-index: 1;
  top: 28px;
}
.card-yellow {
  background: var(--yellow);
  transform: translateX(-49%) rotate(-2deg);
  z-index: 2;
}
.card-teal {
  background: var(--teal);
  transform: translateX(25%) rotate(18deg);
  z-index: 3;
  top: 43px;
}
.card-corner {
  position: absolute;
  left: 12px;
  top: 11px;
  font: 700 18px/1 var(--heading);
}
.card-number {
  font: 700 116px/1 var(--heading);
  letter-spacing: -11px;
  padding-right: 9px;
}
.card-teal .card-number {
  font-size: 61px;
  letter-spacing: -6px;
}
.card-bottom {
  position: absolute;
  bottom: 13px;
  right: 13px;
  font: 700 10px var(--heading);
  letter-spacing: 1px;
}
.spark {
  position: absolute;
  font-size: 48px;
  z-index: 4;
}
.spark-one {
  top: -25px;
  right: 14px;
  color: var(--paper);
  transform: rotate(9deg);
}
.spark-two {
  bottom: 2px;
  left: 4px;
  font-size: 33px;
}
.round-sticker {
  position: absolute;
  width: 87px;
  height: 87px;
  bottom: -3px;
  left: 47%;
  z-index: 5;
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  border-radius: 50%;
  background: var(--paper);
  transform: rotate(-13deg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  font: 700 13px/1.05 var(--heading);
  letter-spacing: -0.3px;
}
.round-sticker span {
  font-size: 24px;
  margin-top: 1px;
}
.panel-bottom {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 13px;
  font-size: 8px;
  letter-spacing: 1.7px;
  font-weight: 800;
  padding-top: 14px;
  border-top: 1px solid #30253635;
}
.mini-cards {
  font-size: 21px;
  letter-spacing: -8px;
  margin-right: 7px;
}
.workspace {
  padding: 19px 0 15px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}
.screen {
  width: 100%;
  max-width: 470px;
  margin: auto;
}
.step-track {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 38px;
}
.step-node {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid #d3c7b4;
  color: #74685b;
  font: 600 10px var(--heading);
}
.step-node.active {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.step-node.done {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--ink);
}
.step-line {
  width: 23px;
  height: 1px;
  background: #d3c7b4;
}
.step-label {
  margin-left: auto;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 1px;
  font-weight: 700;
  text-transform: uppercase;
}
.eyebrow {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.7px;
  text-transform: uppercase;
  color: #80604c;
  margin: 0 0 12px;
}
.screen h2 {
  font: 700 39px/1.13 var(--heading);
  letter-spacing: -1.7px;
  margin: 0 0 13px;
}
.screen .intro {
  font-size: 14px;
  line-height: 1.65;
  color: var(--muted);
  margin: 0 0 29px;
  max-width: 350px;
}
.count-picker {
  position: relative;
  margin: 36px 0 22px;
  min-height: 147px;
  background: var(--paper);
  border: 1.5px solid #ded3c3;
  border-radius: 19px;
  display: flex;
  align-items: center;
  justify-content: space-around;
}
.count-button {
  width: 45px;
  height: 45px;
  border: 1.5px solid #d9cdb9;
  border-radius: 50%;
  background: transparent;
  font: 400 25px var(--heading);
  display: grid;
  place-items: center;
}
.count-button:disabled {
  opacity: 0.3;
  cursor: default;
}
.count-button:hover:enabled {
  background: var(--yellow);
  border-color: var(--ink);
}
.count-center {
  text-align: center;
  display: flex;
  flex-direction: column;
  min-width: 87px;
}
.count-number {
  font: 700 64px/0.95 var(--heading);
  letter-spacing: -3px;
}
.count-label {
  font-size: 11px;
  color: var(--muted);
  margin-top: 10px;
}
.player-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 33px;
}
.player-dots span {
  width: 11px;
  height: 11px;
  border: 1.3px solid var(--ink);
  border-radius: 50%;
  background: var(--player-color);
}
.primary-button {
  width: 100%;
  padding: 18px 20px;
  min-height: 56px;
  border: 1.5px solid var(--ink);
  border-radius: 11px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 650;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  transition:
    background 0.15s,
    transform 0.15s,
    box-shadow 0.15s;
}
.primary-button:hover:enabled {
  background: #44334b;
  transform: translateY(-2px);
  box-shadow: 0 4px 0 #30253620;
}
.primary-button .arrow {
  margin-left: auto;
  font-size: 22px;
  line-height: 14px;
  font-weight: 400;
}
.primary-button.orange {
  background: var(--orange);
  color: var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
}
.primary-button.orange:hover:enabled {
  background: #f78246;
  box-shadow: 3px 5px 0 var(--ink);
}
.quiet-note {
  text-align: center;
  font-size: 11px;
  line-height: 1.6;
  color: #74685b;
  margin: 19px 0 0;
}
.setup-footnote {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
}
.setup-footnote svg {
  width: 13px;
  height: 13px;
}
.text-button {
  background: transparent;
  border: 0;
  font-size: 12px;
  padding: 7px 0;
  color: #756957;
}
.text-button:hover {
  color: var(--ink);
}
.text-button span {
  margin-left: 8px;
}
.back-button {
  display: flex;
  gap: 7px;
  align-items: center;
  font-size: 12px;
  background: transparent;
  border: 0;
  padding: 0;
  margin-bottom: 23px;
  color: var(--muted);
}
.back-button:hover {
  color: var(--ink);
}
.name-list {
  display: flex;
  flex-direction: column;
  gap: 11px;
  margin-bottom: 25px;
  max-height: 290px;
  overflow-y: auto;
  padding: 2px 3px 4px 0;
  scrollbar-width: thin;
}
.name-row {
  display: flex;
  gap: 12px;
  align-items: center;
}
.avatar {
  display: grid;
  place-items: center;
  width: 39px;
  height: 39px;
  flex-shrink: 0;
  background: var(--player-color, var(--purple));
  border: 1.5px solid var(--ink);
  border-radius: 11px;
  font: 700 15px var(--heading);
}
.name-row input {
  min-width: 0;
  width: 100%;
  height: 49px;
  border: 1.5px solid #dcd0bf;
  border-radius: 10px;
  background: var(--paper);
  padding: 0 14px;
  color: var(--ink);
  outline: none;
  font-size: 16px;
}
.name-row input:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px #ed71341c;
}
.name-row input::placeholder {
  color: #b1a393;
}
.name-row input:invalid:not(:placeholder-shown) {
  border-color: #bb4835;
}
.target-options {
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.target-option {
  display: flex;
  align-items: center;
  text-align: left;
  width: 100%;
  border: 1.5px solid #ddd1c0;
  border-radius: 12px;
  background: var(--paper);
  padding: 17px 18px;
  gap: 15px;
  min-height: 78px;
}
.target-option.selected {
  background: #f9e9c0;
  border-color: #b18f36;
  box-shadow: 0 0 0 2px #f9e9c0;
}
.target-option:hover:enabled {
  border-color: var(--ink);
  transform: translateX(3px);
}
.target-number {
  font: 700 29px/1 var(--heading);
  letter-spacing: -1px;
  width: 58px;
}
.target-description {
  font-size: 12px;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.target-description small {
  font-size: 10px;
  color: var(--muted);
  font-weight: 400;
}
.target-arrow {
  margin-left: auto;
  font-size: 22px;
}
.default-tag {
  background: var(--yellow);
  border-radius: 4px;
  padding: 3px 6px;
  font: 700 8px var(--body);
  letter-spacing: 0.6px;
  margin-left: 6px;
  vertical-align: middle;
}
.game-layout .playful-panel {
  min-height: 690px;
}
.game-layout .workspace {
  padding-top: 0;
  justify-content: flex-start;
}
.game-layout .screen {
  margin-top: 0;
}
.game-topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.round-badge {
  font-size: 10px;
  letter-spacing: 1.1px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 7px;
}
.round-badge i {
  width: 7px;
  height: 7px;
  background: var(--orange);
  border-radius: 50%;
}
.target-badge {
  font-size: 11px;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 7px 10px;
  border-radius: 6px;
  display: flex;
  gap: 5px;
  align-items: center;
}
.target-badge svg {
  width: 12px;
  height: 12px;
}
.current-score {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 17px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 22px;
}
.current-score-label {
  font-size: 11px;
  color: var(--muted);
  max-width: 58%;
  overflow-wrap: anywhere;
}
.current-score strong {
  flex-shrink: 0;
  text-align: right;
  font: 700 27px var(--heading);
  letter-spacing: -1px;
}
.current-score strong small {
  font: 400 11px var(--body);
  letter-spacing: 0;
  color: var(--muted);
  margin-left: 5px;
}
.turn-heading {
  display: flex;
  gap: 13px;
  align-items: center;
  margin-bottom: 24px;
}
.turn-heading .avatar {
  width: 46px;
  height: 46px;
  font-size: 20px;
  border-radius: 14px;
  transform: rotate(-5deg);
}
.turn-heading h2 {
  font-size: 32px;
  margin: 2px 0 0;
  letter-spacing: -1.2px;
  overflow-wrap: anywhere;
}
.turn-heading .eyebrow {
  font-size: 9px;
  margin: 0;
  letter-spacing: 1.4px;
}
.input-label {
  font-size: 11px;
  font-weight: 650;
  display: block;
  margin-bottom: 9px;
}
.score-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  border: 1.5px solid #d6c9b8;
  border-radius: 13px;
  background: var(--paper);
  overflow: hidden;
}
.score-input-wrap:focus-within {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px #ed713422;
}
.score-input {
  border: 0;
  background: transparent;
  width: 100%;
  min-width: 0;
  outline: none;
  padding: 8px 21px 10px;
  color: var(--ink);
  font: 700 63px/1.2 var(--heading);
  letter-spacing: -3px;
  border-radius: 13px;
}
.score-input::placeholder {
  color: #d4c8b5;
  opacity: 1;
}
.score-input-unit {
  padding-right: 19px;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}
.modifier-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 20px 0 10px;
}
.modifier-heading label {
  font-size: 11px;
  font-weight: 650;
}
.modifier-heading span {
  font-size: 10px;
  color: var(--muted);
}
.modifier-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 7px;
}
.modifier-button {
  position: relative;
  border: 1.5px solid #d7cbb9;
  border-radius: 9px;
  background: var(--paper);
  padding: 11px 0;
  min-height: 46px;
  font: 600 16px var(--heading);
  transition:
    background 0.15s,
    border-color 0.15s;
}
.modifier-button:hover {
  border-color: var(--ink);
}
.modifier-button[aria-pressed="true"] {
  background: var(--yellow);
  border-color: var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
  transform: translate(-1px, -1px);
}
.modifier-button.double {
  background: #e9e1f1;
  border-color: #ccbcdf;
}
.modifier-button.double[aria-pressed="true"] {
  background: var(--purple);
  border-color: var(--ink);
}
.flip7-button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  background: transparent;
  border: 1px dashed #cfc2b0;
  border-radius: 9px;
  margin-top: 10px;
  padding: 10px 12px;
  font-size: 11px;
  min-height: 42px;
}
.flip7-button b {
  margin-left: auto;
  font-family: var(--heading);
  font-size: 13px;
}
.flip7-button[aria-pressed="true"] {
  background: #dbede3;
  border-style: solid;
  border-color: #508570;
}
.flip7-button .check-box {
  height: 14px;
  width: 14px;
  border: 1px solid #ac9c86;
  border-radius: 4px;
  display: grid;
  place-items: center;
  font-size: 10px;
}
.flip7-button[aria-pressed="true"] .check-box {
  background: var(--ink);
  border-color: var(--ink);
  color: white;
}
.score-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 17px 0 17px;
  min-height: 30px;
}
.score-formula {
  font-size: 11px;
  color: var(--muted);
}
.round-points {
  font: 700 23px var(--heading);
  letter-spacing: -0.7px;
}
.round-points small {
  font: 400 11px var(--body);
  letter-spacing: 0;
  margin-left: 3px;
  color: var(--muted);
}
.score-form .quiet-note {
  margin-top: 12px;
  font-size: 10px;
}
.scoreboard {
  border-top: 1px solid var(--line);
  margin-top: 27px;
  padding-top: 17px;
}
.scoreboard-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.scoreboard-title h3 {
  font: 700 10px var(--body);
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin: 0;
}
.scoreboard-title button {
  font-size: 10px;
  padding: 0;
}
.scoreboard-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 9px;
}
.scoreboard-row {
  display: flex;
  min-width: 0;
  gap: 9px;
  align-items: center;
  font-size: 12px;
}
.scoreboard-row .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--player-color);
  flex-shrink: 0;
  border: 1px solid #30253666;
}
.scoreboard-name {
  max-width: 40%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.scoreboard-row.active .scoreboard-name {
  font-weight: 750;
}
.scoreboard-track {
  flex: 1;
  height: 3px;
  background: #e7dece;
  border-radius: 4px;
  overflow: hidden;
}
.scoreboard-track span {
  display: block;
  background: var(--player-color);
  height: 100%;
  border-radius: 4px;
}
.scoreboard-points {
  font: 700 12px var(--heading);
  width: 27px;
  text-align: right;
}
.game-options {
  display: flex;
  justify-content: center;
  margin: 12px 0 0;
}
.game-options .text-button {
  font-size: 10px;
  color: #74685b;
}
.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 0 28px;
  border-top: 1px solid var(--line);
  align-items: center;
  color: #74685b;
  font-size: 10px;
}
.site-footer .text-button {
  font-size: 10px;
  color: #766951;
}
.footer-note {
  font-size: 9px;
}
.toast {
  position: fixed;
  bottom: max(24px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  z-index: 100;
  max-width: min(90vw, 470px);
  width: max-content;
  padding: 13px 20px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--paper);
  font-size: 13px;
  line-height: 1.5;
  box-shadow: 0 6px 24px #30253622;
  transition:
    opacity 0.2s,
    transform 0.2s;
}
.toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
.info-dialog {
  background: var(--paper);
  color: var(--ink);
  border: 1.5px solid var(--ink);
  border-radius: 20px;
  padding: 33px;
  max-width: 440px;
  width: calc(100% - 36px);
  box-shadow: 6px 6px 0 #30253644;
}
.info-dialog::backdrop {
  background: #30253688;
  backdrop-filter: blur(3px);
}
.info-dialog h2 {
  font: 700 28px/1.15 var(--heading);
  letter-spacing: -1px;
  margin: 7px 0 20px;
}
.info-dialog p,
.info-dialog li {
  color: #7a6b5c;
  font-size: 13px;
  line-height: 1.8;
}
.info-dialog ol {
  padding-left: 21px;
}
.info-dialog .dialog-close {
  float: right;
  margin: -17px -17px 3px 10px;
}
.dialog-formula {
  background: var(--yellow);
  padding: 16px;
  border-radius: 9px;
  font: 600 14px var(--heading);
  line-height: 1.6;
}
.dialog-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}
.dialog-actions .primary-button {
  font-size: 12px;
}
.secondary-button {
  background: transparent;
  border: 1.5px solid #c9baa5;
  border-radius: 11px;
  padding: 15px 20px;
  font-size: 13px;
  font-weight: 600;
  min-height: 50px;
}
.secondary-button:hover {
  background: #eee3cf;
}
.loading-state {
  text-align: center;
  padding: 70px 0;
  color: var(--muted);
  font-size: 13px;
}
.loading-mark {
  display: inline-grid;
  place-items: center;
  background: var(--yellow);
  border: 2px solid var(--ink);
  width: 70px;
  height: 94px;
  border-radius: 12px;
  font: 700 65px var(--heading);
  transform: rotate(-8deg);
  color: var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
}
.error-state h2 {
  font-size: 30px;
}
.error-state p {
  color: var(--muted);
  line-height: 1.7;
  font-size: 14px;
}
.error-state .primary-button {
  margin-top: 24px;
}
.error-state .secondary-button {
  width: 100%;
  margin-top: 12px;
}
.noscript {
  position: fixed;
  inset: 30%;
  padding: 30px;
  background: var(--paper);
  border: 2px solid var(--ink);
  z-index: 101;
  text-align: center;
}
.winner-layout {
  display: block;
  min-height: calc(100svh - 258px);
  margin-top: 30px;
}
.winner-layout .playful-panel {
  display: none;
}
.winner-layout .workspace {
  padding: 0;
}
.winner-layout .screen {
  max-width: 600px;
}
.winner-screen {
  text-align: center;
  padding: 20px 0 25px;
}
.winner-eyebrow {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  background: var(--yellow);
  border: 1.5px solid var(--ink);
  border-radius: 100px;
  padding: 8px 14px;
  font-size: 9px;
  letter-spacing: 1.7px;
  font-weight: 800;
  transform: rotate(-3deg);
}
.winner-trophy {
  position: relative;
  width: 134px;
  height: 146px;
  margin: 26px auto 20px;
  display: grid;
  place-items: center;
}
.winner-trophy:before {
  content: "";
  position: absolute;
  width: 135px;
  height: 135px;
  background: var(--orange);
  border-radius: 40px;
  transform: rotate(-9deg);
  box-shadow: 5px 5px 0 var(--ink);
  border: 2px solid var(--ink);
}
.winner-trophy svg {
  position: relative;
  z-index: 1;
  width: 76px;
  height: 76px;
  stroke-width: 1.4;
}
.winner-screen .winner-subtitle {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 7px;
}
.winner-screen h2 {
  font-size: clamp(45px, 7vw, 74px);
  line-height: 1.05;
  letter-spacing: -3px;
  margin: 0 0 15px;
  overflow-wrap: anywhere;
}
.winner-score {
  font: 700 23px var(--heading);
  margin: 0 0 6px;
}
.winner-score small {
  font: 400 12px var(--body);
  color: var(--muted);
}
.winner-caption {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}
.final-ranking {
  display: flex;
  gap: 9px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 29px 0 33px;
}
.rank-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  border: 1px solid #d8cbb7;
  background: var(--paper);
  padding: 10px 13px;
  border-radius: 10px;
  font-size: 11px;
  max-width: 100%;
}
.rank-chip span {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rank-chip b {
  font-family: var(--heading);
}
.rank-chip i {
  height: 8px;
  width: 8px;
  background: var(--player-color);
  border: 1px solid #30253677;
  border-radius: 50%;
}
.rematch-question {
  font: 600 19px var(--heading);
  letter-spacing: -0.5px;
  margin: 0 0 14px;
}
.rematch-actions {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 11px;
  max-width: 410px;
  margin: auto;
}
.winner-screen > .text-button {
  font-size: 10px;
  margin-top: 17px;
}
.confetti-piece {
  position: fixed;
  top: -25px;
  pointer-events: none;
  z-index: 90;
  width: 9px;
  height: 14px;
  border-radius: 2px;
}
#confetti {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 90;
}
.mobile-game-title {
  display: none;
}
.mobile-game-tools {
  display: none;
}
@media (min-width: 1450px) {
  .app-shell {
    padding-top: 15px;
  }
  .main-layout {
    margin-top: 55px;
    margin-bottom: 50px;
  }
}
@media (max-width: 1100px) {
  .app-shell {
    padding: 0 35px;
  }
  .main-layout {
    gap: 38px;
  }
  .playful-panel {
    padding: 32px 26px 24px;
  }
  .playful-panel h1 {
    font-size: 37px;
  }
  .playing-card {
    width: 130px;
    height: 197px;
  }
  .card-number {
    font-size: 100px;
  }
  .card-teal .card-number {
    font-size: 55px;
  }
  .panel-eyebrow {
    font-size: 8px;
    letter-spacing: 1.2px;
  }
  .panel-bottom {
    font-size: 7px;
    letter-spacing: 1.2px;
  }
  .card-scene {
    margin-top: 43px;
  }
  .screen h2 {
    font-size: 35px;
  }
  .turn-heading h2 {
    font-size: 30px;
  }
}
/* Keep the mobile app inside the visible viewport, including above the keyboard.
   Only lists and dialogs scroll; the score entry controls remain on screen. */
@media (max-width: 800px) {
  html,
  body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    overscroll-behavior: none;
  }
  .app-shell {
    position: fixed;
    top: var(--app-top, 0px);
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: var(--app-height, 100dvh);
    max-width: 580px;
    padding: env(safe-area-inset-top) max(16px, env(safe-area-inset-right))
      max(8px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .site-header {
    min-height: 64px;
    flex: 0 0 64px;
  }
  .wordmark {
    font-size: 23px;
  }
  .brand-symbol {
    width: 30px;
    height: 36px;
    font-size: 27px;
  }
  .wordmark small {
    font-size: 6px;
    letter-spacing: 1.6px;
    margin-top: 5px;
  }
  .header-actions {
    gap: 12px;
  }
  .saved-indicator {
    font-size: 10px;
  }
  .main-layout,
  .main-layout.game-layout,
  .main-layout.winner-layout {
    display: flex;
    flex: 1;
    min-height: 0;
    margin: 14px 0 6px;
  }
  .main-layout .playful-panel,
  .site-footer {
    display: none;
  }
  .main-layout .workspace {
    flex: 1;
    min-height: 0;
    padding: 0;
  }
  .screen {
    max-width: none;
    max-height: 100%;
    min-height: 0;
  }
  .screen h2 {
    font-size: 32px;
    margin-bottom: 9px;
  }
  .step-track {
    margin-bottom: 20px;
  }
  .eyebrow {
    margin-bottom: 8px;
  }
  .screen .intro {
    margin-bottom: 18px;
    line-height: 1.5;
  }
  .back-button {
    min-height: 26px;
    margin-bottom: 12px;
  }
  .primary-button {
    min-height: 50px;
    padding: 13px 16px;
  }
  .primary-button:hover:enabled {
    transform: none;
  }
  .quiet-note {
    margin-top: 12px;
  }
  .count-picker {
    min-height: 112px;
    margin: 20px 0 18px;
  }
  .count-number {
    font-size: 56px;
  }
  .player-dots {
    margin-bottom: 20px;
  }
  /* iOS zooms focused inputs whose computed font size is below 16px. */
  input,
  .name-row input {
    font-size: 16px;
  }
  html[data-screen="names"] .screen {
    display: flex;
    flex-direction: column;
    height: 100%;
  }
  html[data-screen="names"] .screen > * {
    flex-shrink: 0;
  }
  #names-form {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 12px;
    min-height: 0;
  }
  html[data-screen="names"] .screen > #names-form {
    flex-shrink: 1;
  }
  .name-list {
    flex: 1;
    min-height: 0;
    max-height: none;
    margin: 0;
    padding: 3px 4px 5px 0;
    overscroll-behavior: contain;
    scroll-padding-block: 5px;
    -webkit-overflow-scrolling: touch;
  }
  .name-row,
  #names-form > .primary-button {
    flex-shrink: 0;
  }
  .target-options {
    gap: 9px;
  }
  .target-option {
    min-height: 63px;
    padding: 11px 13px;
  }
  .target-description {
    font-size: 11px;
  }
  .target-description small {
    font-size: 9px;
  }
  .game-layout .screen {
    display: grid;
    height: 100%;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: repeat(4, auto);
    align-content: center;
    gap: 10px;
  }
  .game-topline {
    grid-area: 1 / 1 / 2 / -1;
    margin: 0;
    min-height: 26px;
  }
  .target-badge {
    padding: 5px 8px;
  }
  .current-score {
    grid-area: 2 / 2;
    min-width: 106px;
    min-height: 54px;
    margin: 0;
    padding: 7px 10px;
    justify-content: flex-end;
  }
  .current-score-label {
    display: none;
  }
  .current-score strong {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1px;
    font-size: 25px;
    line-height: 1.05;
  }
  .current-score strong small {
    font-size: 9px;
    margin: 0;
  }
  .turn-heading {
    grid-area: 2 / 1;
    gap: 9px;
    min-width: 0;
    margin: 0;
  }
  .turn-heading > div {
    min-width: 0;
  }
  .turn-heading .avatar {
    width: 37px;
    height: 40px;
    border-radius: 10px;
    font-size: 18px;
  }
  .turn-heading .eyebrow {
    font-size: 8px;
    letter-spacing: 1px;
  }
  .turn-heading h2 {
    font-size: 26px;
    margin: 3px 0 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .score-form {
    grid-area: 3 / 1 / 4 / -1;
    display: grid;
    gap: 6px;
    min-width: 0;
  }
  .score-form > * {
    margin: 0;
  }
  .input-label,
  .modifier-heading {
    min-height: 14px;
  }
  .score-input {
    padding: 3px 16px 5px;
    font-size: 44px;
    line-height: 1.2;
    letter-spacing: -2px;
  }
  .score-input-wrap {
    min-height: 64px;
  }
  .modifier-heading {
    margin-top: 3px;
  }
  .modifier-grid {
    gap: 6px;
  }
  .modifier-button {
    min-height: 44px;
    padding: 8px 0;
    font-size: 16px;
  }
  .flip7-button {
    min-height: 40px;
    padding: 7px 9px;
    gap: 6px;
    font-size: 10px;
  }
  .flip7-button .check-box {
    flex-shrink: 0;
  }
  .score-preview {
    min-height: 28px;
    gap: 8px;
  }
  .score-formula {
    font-size: 10px;
  }
  .round-points {
    flex-shrink: 0;
    font-size: 22px;
  }
  .score-form .quiet-note {
    margin: 0;
    line-height: 1.4;
  }
  .game-layout .scoreboard,
  .game-layout .game-options {
    display: none;
  }
  .mobile-game-tools {
    grid-area: 4 / 1 / 5 / -1;
    display: flex;
    justify-content: center;
    gap: 6px;
    min-width: 0;
  }
  .mobile-game-tools .text-button {
    flex: 1;
    min-height: 36px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 10px;
    white-space: nowrap;
  }
  html[data-screen="winner"] .site-header {
    display: none;
  }
  .winner-layout .screen {
    height: 100%;
  }
  .winner-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    min-height: 0;
    padding: 8px 0;
  }
  .winner-screen > * {
    flex-shrink: 0;
  }
  .winner-trophy {
    height: 66px;
    width: 66px;
    margin: 18px auto 12px;
  }
  .winner-trophy:before {
    width: 62px;
    height: 62px;
    border-radius: 19px;
    box-shadow: 3px 3px 0 var(--ink);
  }
  .winner-trophy svg {
    width: 42px;
    height: 42px;
  }
  .winner-screen .winner-subtitle {
    margin: 0 0 5px;
  }
  .winner-screen h2 {
    font-size: 44px;
    margin-bottom: 9px;
    max-width: 100%;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
  }
  .winner-screen .final-ranking {
    flex: 1 1 auto;
    min-height: 36px;
    max-height: 180px;
    width: 100%;
    align-content: flex-start;
    gap: 7px;
    margin: 16px 0;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .rank-chip {
    padding: 9px 10px;
  }
  .rematch-question {
    margin-bottom: 10px;
  }
  .rematch-actions {
    width: 100%;
    margin: 0;
  }
  .winner-screen > .text-button {
    margin-top: 9px;
  }
  .info-dialog {
    top: calc(var(--app-top, 0px) + 12px);
    bottom: auto;
    max-height: calc(var(--app-height, 100dvh) - 24px);
    margin: 0 auto;
    padding: 27px;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .info-dialog .scoreboard {
    display: block;
    margin-top: 10px;
  }
  .toast {
    top: calc(var(--app-top, 0px) + 8px);
    bottom: auto;
  }
  .keyboard-open .app-shell {
    padding-top: 8px;
    padding-bottom: 8px;
  }
  .keyboard-open .site-header {
    display: none;
  }
  :is(.short-viewport, .keyboard-open) .main-layout {
    margin: 6px 0 2px;
  }
  :is(.short-viewport, .keyboard-open) .game-layout .screen {
    gap: 8px;
  }
  :is(.short-viewport, .keyboard-open) .current-score {
    min-height: 46px;
    padding-block: 5px;
  }
  :is(.short-viewport, .keyboard-open) .score-input-wrap {
    min-height: 54px;
  }
  :is(.short-viewport, .keyboard-open) .score-input {
    font-size: 38px;
  }
  :is(.short-viewport, .keyboard-open) .modifier-heading,
  :is(.short-viewport, .keyboard-open) .score-form .quiet-note {
    display: none;
  }
  :is(.short-viewport, .keyboard-open) .modifier-button {
    min-height: 40px;
    padding-block: 6px;
  }
  :is(.short-viewport, .keyboard-open) .flip7-button {
    min-height: 36px;
    padding-block: 5px;
  }
  :is(.short-viewport, .keyboard-open) .score-preview {
    min-height: 24px;
  }
  :is(.short-viewport, .keyboard-open) .score-form .primary-button {
    min-height: 46px;
    padding-block: 10px;
  }
  :is(.short-viewport, .keyboard-open) .mobile-game-tools .text-button {
    min-height: 32px;
    padding-block: 4px;
  }
  :is(.short-viewport, .keyboard-open)[data-screen="names"] .step-track,
  :is(.short-viewport, .keyboard-open)[data-screen="names"] .eyebrow,
  :is(.short-viewport, .keyboard-open)[data-screen="names"] .intro,
  :is(.short-viewport, .keyboard-open)[data-screen="names"] .quiet-note {
    display: none;
  }
  .short-viewport[data-screen="count"] .step-track,
  .short-viewport[data-screen="target"] .step-track {
    margin-bottom: 12px;
  }
  .short-viewport[data-screen="target"] .eyebrow,
  .short-viewport[data-screen="target"] .intro,
  .short-viewport[data-screen="count"] .eyebrow {
    display: none;
  }
  .short-viewport .winner-trophy,
  .short-viewport .winner-subtitle {
    display: none;
  }
  .short-viewport .winner-screen h2 {
    margin-top: 12px;
    font-size: 36px;
  }
  .tiny-viewport .site-header,
  .tiny-viewport .game-topline,
  .tiny-viewport .input-label {
    display: none;
  }
  .tiny-viewport .app-shell {
    padding-top: 6px;
    padding-bottom: 6px;
  }
  .tiny-viewport .game-layout .screen {
    grid-template-rows: repeat(3, auto);
    gap: 4px;
  }
  .tiny-viewport .current-score {
    grid-row: 1;
    min-height: 38px;
    padding: 3px 8px;
  }
  .tiny-viewport .current-score strong {
    font-size: 21px;
  }
  .tiny-viewport .turn-heading {
    grid-row: 1;
  }
  .tiny-viewport .turn-heading .avatar {
    width: 31px;
    height: 33px;
    font-size: 16px;
  }
  .tiny-viewport .turn-heading h2 {
    font-size: 23px;
  }
  .tiny-viewport .score-form {
    grid-row: 2;
    gap: 4px;
  }
  .tiny-viewport .score-input-wrap {
    min-height: 40px;
  }
  .tiny-viewport .score-input {
    font-size: 30px;
    padding-block: 0;
  }
  .tiny-viewport .modifier-button {
    min-height: 36px;
    padding-block: 4px;
  }
  .tiny-viewport .flip7-button {
    min-height: 32px;
    padding-block: 3px;
  }
  .tiny-viewport .score-preview {
    min-height: 22px;
  }
  .tiny-viewport .round-points {
    font-size: 19px;
  }
  .tiny-viewport .score-form .primary-button {
    min-height: 40px;
    padding-block: 7px;
  }
  .tiny-viewport .mobile-game-tools {
    grid-row: 3;
  }
  .tiny-viewport .mobile-game-tools .text-button {
    min-height: 28px;
    padding-block: 3px;
  }
  .tiny-viewport[data-screen="names"] h2 {
    font-size: 27px;
  }
  .tiny-viewport[data-screen="names"] .back-button {
    margin-bottom: 5px;
  }
  .tiny-viewport #names-form {
    gap: 8px;
  }
  .tiny-viewport #names-form .primary-button {
    min-height: 44px;
    padding-block: 10px;
  }
}
@media (max-width: 430px) {
  .saved-indicator {
    font-size: 0;
    gap: 0;
  }
  .saved-indicator i {
    width: 7px;
    height: 7px;
  }
  .target-option {
    gap: 9px;
  }
  .target-number {
    width: 49px;
    font-size: 26px;
  }
  .default-tag {
    font-size: 7px;
    margin-left: 3px;
  }
  .rematch-actions {
    grid-template-columns: 1.4fr 1fr;
  }
  .rank-chip {
    font-size: 10px;
  }
}
@media (max-width: 800px) and (max-height: 680px) {
  html[data-screen="target"] .eyebrow,
  html[data-screen="target"] .intro {
    display: none;
  }
  html[data-screen="target"] .step-track {
    margin-bottom: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
