.zip-game {
  --zip-ink: #183e36;
  max-width: 480px;
  margin: 0 auto;
  color: var(--zip-ink);
  font-family: inherit;
}
.zip-game [hidden] { display: none; }
.zip-game select, .zip-game button { font: inherit; color: inherit; }
.zip-game button { cursor: pointer; }
.zip-game button:disabled { opacity: .45; cursor: default; }
.zip-game :focus-visible { outline: 3px solid #ad540b; outline-offset: 2px; }
.zip-choices { display: flex; align-items: end; flex-wrap: wrap; gap: 8px; }
.zip-choices label { flex: 1 1 82px; min-width: 0; font-size: .77rem; font-weight: 700; }
.zip-choices label:first-child { flex-grow: 1.35; }
.zip-choices label[data-zip-pack-label] { flex-grow: 1.6; }
.zip-choices select, .zip-choices button, .zip-actions button {
  min-height: 44px;
  padding: 5px 8px;
  border: 1.5px solid #74958a;
  border-radius: 8px;
  background: #fffff7;
  font-size: .875rem;
  font-weight: 650;
}
.zip-choices select { display: block; width: 100%; margin-top: 3px; }
.zip-choices button { flex: 1 0 82px; }
.zip-readout { display: flex; justify-content: space-between; align-items: baseline; gap: .6rem; margin: 12px 0 7px; }
.zip-readout strong { font-family: var(--font-display); font-size: 1.05rem; }
.zip-readout span { font-size: .85rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.zip-frame { overflow: hidden; padding: 4px; border: 2px solid var(--zip-ink); border-radius: 12px; background: var(--zip-ink); box-shadow: 0 3px 0 #103027; }
.zip-frame:focus-within { outline: 3px solid #b66319; outline-offset: 2px; }
.zip-board {
  position: relative;
  display: grid;
  grid-template: repeat(var(--zip-size), minmax(0, 1fr)) / repeat(var(--zip-size), minmax(0, 1fr));
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 6px;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.zip-board:focus { outline: 0; }
.zip-board .zip-cell {
  display: grid;
  position: relative;
  place-items: center;
  width: 100%;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: inset 0 0 0 .6px #a8b8ab;
  background: #fcf9ea;
  touch-action: none;
}
.zip-board .zip-cell.zip-visited { background: #d5edda; }
.zip-ribbon { position: absolute; pointer-events: none; inset: 0; width: 100%; height: 100%; }
.zip-ribbon polyline { fill: none; stroke: #168466; stroke-width: .26; stroke-linecap: round; stroke-linejoin: round; }
.zip-waypoint, .zip-tip::after {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 64%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--zip-ink);
  color: #fffdf2;
  font-weight: 800;
  line-height: 1;
  font-size: clamp(.95rem, 3.4vw, 1.5rem);
  pointer-events: none;
}
.zip-next .zip-waypoint { background: #ffce56; color: #273427; outline: 2px dashed #78511e; outline-offset: 2px; }
.zip-cell.zip-tip::after { content: ''; width: 30%; position: absolute; background: #fffdf2; border: 3px solid #137357; }
.zip-cell.zip-tip:has(.zip-waypoint)::after { width: 76%; background: transparent; border: 2px solid #137357; }
.zip-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 14px 0 8px; }
.zip-actions [data-zip-hint] { background: #e2f1dc; border-color: #4c785b; }
.zip-game p { margin: 6px 0; font-size: .82rem; line-height: 1.45; }
.zip-game [data-zip-status] { min-height: 2.9em; font-weight: 650; }
.zip-game .zip-save { color: #4c6457; font-size: .73rem; }
@media (max-width: 480px) {
  .zip-choices { gap: 5px; }
  .zip-choices select { padding-inline: 4px; }
  .zip-readout { margin-top: 8px; }
  .zip-frame { padding: 2px; }
}
