.snow-game {
  --blue: #203a4b;
  --night: #18313f;
  --vellum: #fff4dc;
  --gold: #ffd28d;
  --light: #e1f0eb;
  --ripples: #acc9cb;
  max-width: 1060px;
  margin-inline: auto;
  color: var(--blue);
}
.snow-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: .8rem 1.2rem;
  margin-bottom: 1.25rem;
}
.snow-heading h1 { font-size: clamp(2.65rem, 5.4vw, 4.9rem); }
.snow-heading .kicker { margin-bottom: .35rem; color: #86414a; }
.snow-heading p { margin-top: .65rem; color: #394f54; }
.snow-machine {
  overflow: hidden;
  border: 1px solid #132a3b;
  border-radius: 16px;
  background: var(--night);
  color: var(--light);
  box-shadow: 0 14px 35px #1a354326, 0 1px 2px #152c384d;
}
.snow-dashboard {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
  padding: .75rem 1.25rem;
}
.snow-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(5rem, auto)) minmax(5.5rem, 1fr);
  gap: .35rem 1.1rem;
  align-items: start;
  margin: 0;
}
.snow-stats dt {
  color: #c7dcd9;
  font-size: .68rem;
  font-weight: 750;
  letter-spacing: .075em;
  text-transform: uppercase;
}
.snow-stats dd {
  color: #fff1cf;
  font-size: 1.12rem;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  margin: .15rem 0 0;
}
.snow-tools { display: flex; gap: .5rem; }
.snow-game button, .snow-game select { min-height: 44px; }
.snow-quiet, .snow-primary, .snow-lanes button, .snow-pace select {
  padding: .45rem .8rem;
  border: 1px solid #889f9f;
  border-radius: 7px;
  background: transparent;
  color: inherit;
  font-size: .87rem;
  font-weight: 750;
  line-height: 1.2;
}
.snow-quiet { white-space: nowrap; }
.snow-heading .snow-quiet { flex-shrink: 0; }
.snow-game button:enabled:hover, .snow-game select:hover { box-shadow: inset 0 0 0 999px #87a3a324; }
.snow-game button:disabled { opacity: .58; }
.snow-primary {
  border-color: #6c302c;
  background: #963b47;
  color: #fff6e7;
}
.snow-stage {
  position: relative;
  background: #365264;
  min-width: 0;
}
.snow-stage:focus { outline: none; }
.snow-stage:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: -4px;
}
.snow-stage canvas {
  display: block;
  width: 100%;
  aspect-ratio: 2.34;
  touch-action: pan-x pan-y;
}
.snow-settle {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(min(100%, 270px), 39%);
  align-items: center;
  padding: 1.25rem 2.3rem;
  background: linear-gradient(90deg, transparent 18%, #1e364850 62%, #1c31457a);
}
.snow-ticket {
  position: relative;
  grid-column: 2;
  display: grid;
  gap: .7rem;
  padding: clamp(1.05rem, 2.7vw, 1.9rem);
  border: 1px solid #ae9267;
  border-radius: 10px;
  background: var(--vellum);
  box-shadow: 0 7px 0 #3147536b, 0 12px 38px #12273555;
  color: #403c40;
}
.snow-ticket::before {
  position: absolute;
  inset: 5px;
  border: 1px dashed #c8a56c;
  border-radius: 7px;
  content: '';
  pointer-events: none;
}
.snow-issue {
  color: #86414a;
  font-size: .69rem;
  font-weight: 800;
  letter-spacing: .095em;
  text-transform: uppercase;
}
.snow-ticket h2 { color: #203a4b; font-size: clamp(1.9rem, 3.4vw, 2.6rem); }
.snow-ticket p { margin: 0; }
.snow-ticket [data-best] { color: #853a46; font-size: .84rem; font-weight: 750; }
.snow-panel-actions { display: flex; align-items: end; flex-wrap: wrap; gap: .45rem; }
.snow-pace {
  display: grid;
  gap: .22rem;
  font-size: .76rem;
  font-weight: 750;
}
.snow-pace select { background: #fff9ef; }
.snow-copy {
  display: grid;
  gap: .25rem;
  font-size: .86rem;
  font-weight: 650;
}
.snow-copy textarea { width: 100%; min-width: 0; }
.snow-game[data-phase="ready"] .snow-dashboard,
.snow-game[data-phase="ready"] .snow-deck { display: none; }
.snow-deck {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(49%, auto);
  gap: 1rem;
  align-items: center;
  padding: .75rem 1.25rem;
  border-top: 1px solid #648087;
}
.snow-next { color: var(--gold); font-weight: 750; font-size: .93rem; }
.snow-log { color: #dbebea; font-size: .88rem; margin-top: .15rem; }
.snow-inputs { display: flex; gap: 8px; }
.snow-lanes {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}
.snow-lanes button {
  min-width: 0;
  min-height: 53px;
  background: #294653;
  border-color: #66828a;
}
.snow-lanes button[aria-pressed=true]:enabled {
  border-color: #e9ce99;
  color: #272f35;
  background: #ffe3aa;
}
.snow-lanes small {
  display: block;
  margin-top: .24rem;
  font-size: .72rem;
  font-weight: 600;
  line-height: 1.15;
}
.snow-lanes small:empty { display: none; }
.snow-rules {
  margin: 1rem auto 0;
  max-width: 65ch;
  border: 1px solid #ccdbd7;
  border-radius: 9px;
  padding: .7rem .95rem;
  background: #eef2eb;
}
.snow-rules summary { cursor: pointer; font-weight: 750; }
.snow-rules div { margin-top: .65rem; }
.snow-rules kbd { font-weight: 750; }
.snow-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}
@media (max-width: 820px) {
  .snow-stage canvas { aspect-ratio: 1.95; }
  .snow-settle { padding: 1rem 1.3rem; }
  .snow-deck { grid-template-columns: 1fr; gap: .45rem; }
}
@media (max-width: 610px) {
  .snow-heading { position: relative; display: block; }
  .snow-heading .kicker { min-height: 44px; padding-right: 90px; }
  .snow-heading .snow-quiet { position: absolute; top: 0; right: 0; }
  .snow-stage canvas { aspect-ratio: 1.45; }
  .snow-settle {
    position: relative;
    display: block;
    padding: .65rem;
    background: #365264;
  }
  .snow-stage:has(.snow-settle:not([hidden])) canvas { aspect-ratio: 2.45; }
  .snow-ticket { padding: .92rem; gap: .5rem; }
  .snow-ticket p { line-height: 1.35; }
  .snow-dashboard, .snow-deck { padding: .65rem; }
  .snow-dashboard { align-items: stretch; gap: .55rem; flex-direction: column; }
  .snow-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .34rem .45rem; }
  .snow-stats dt { letter-spacing: 0; }
  .snow-stats dd { font-size: .97rem; }
  .snow-tools { display: grid; grid-template-columns: repeat(2, 1fr); }
  .snow-inputs { flex-direction: column; }
  .snow-lanes button { padding-inline: .3rem; }
}
