.play-app {
  --farm-ink: #173f31;
  --farm-muted: #405e47;
  --farm-paper: #fffced;
  --farm-line: #94b28e;
  --farm-teal: #087355;
  --farm-gold: #c48123;
  color: var(--farm-ink);
}
.farm-stage,
.farm-message {
  box-sizing: border-box;
  width: min(100%, 700px);
  padding: 6px clamp(12px, 3vw, 26px) 22px;
  margin: 0 auto;
  text-align: center;
}
.farm-heading {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 40px;
  align-items: center;
  width: min(100%, 570px);
  margin: 0 auto 12px;
  gap: 8px;
}
.farm-heading-copy {
  min-width: 0;
}
.farm-date {
  font-size: 0.73rem;
  font-weight: 650;
  letter-spacing: 0.07em;
  margin: 0 0 3px;
  color: var(--farm-muted);
}
.farm-title,
.farm-message h1,
.farm-modal h2 {
  font-family: Georgia, 'STIX Two Text', serif;
  letter-spacing: -0.035em;
  font-weight: 600;
  color: var(--farm-ink);
}
.farm-title {
  font-size: clamp(1.5rem, 3.4vw, 2.2rem);
  line-height: 1.06;
  margin: 0;
  text-wrap: balance;
}
.farm-arrow {
  display: grid;
  place-items: center;
  font: 1.3rem/1 sans-serif;
  width: 36px;
  height: 36px;
  border: 1px solid var(--farm-line);
  border-radius: 50%;
  background: #fffdeb;
  color: var(--farm-ink);
  text-decoration: none;
}
.farm-arrow:hover {
  background: #d9f6b5;
}
.farm-arrow.farm-inactive {
  opacity: 0.38;
}
.farm-board {
  position: relative;
  isolation: isolate;
  box-sizing: content-box;
  aspect-ratio: var(--ratio);
  width: min(calc(100% - 6px), clamp(180px, calc((100svh - 301px) * var(--ratio)), 590px));
  margin: 0 auto;
  overflow: hidden;
  border: 3px solid #356a43;
  border-radius: 9px;
  box-shadow: 0 3px 0 #75a37a40;
  background: #bfeb8b;
}
.farm-map,
.farm-grid {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.farm-grid {
  display: grid;
  grid-template-rows: repeat(var(--rows), minmax(0, 1fr));
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.farm-row {
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  min-height: 0;
}
.farm-cell {
  position: relative;
  appearance: none;
  display: block;
  background: transparent !important;
  color: inherit;
  border: 0 !important;
  padding: 0 !important;
  border-radius: 0;
  box-shadow: none !important;
  margin: 0;
  min-width: 0;
  min-height: 0;
  width: 100%;
  height: 100%;
  cursor: crosshair;
}
.farm-cell:focus-visible {
  z-index: 2;
  outline: 3px dashed #133e32;
  outline-offset: -4px;
  background: #fff3 !important;
}
@media (hover: hover) {
  .farm-cell:hover {
    outline: 1px solid #fffde8;
    outline-offset: -2px;
  }
}
.farm-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin: 12px auto 0;
  width: min(100%, 528px);
}
.farm-stat {
  display: flex;
  align-items: baseline;
  gap: 7px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.farm-stat > span {
  font-size: 0.77rem;
  font-weight: 600;
  color: var(--farm-muted);
}
.farm-stat > strong {
  font-size: 1.1rem;
  font-weight: 720;
  color: var(--farm-ink);
}
.farm-mode-link,
.farm-text-button {
  color: var(--farm-teal);
  font: inherit;
  font-weight: 600;
  font-size: 0.8rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.farm-text-button {
  background: none;
  border: 0;
  padding: 4px 3px;
}
.farm-text-button:disabled {
  opacity: 0.45;
  cursor: default;
}
.farm-actions,
.farm-dialog-actions,
.farm-result-links,
.farm-aux {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
.farm-actions {
  margin: 12px auto 0;
}
.farm-button {
  box-sizing: border-box;
  appearance: none;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 8px 15px;
  min-height: 38px;
  border: 1px solid #759772;
  border-radius: 7px;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 650;
  line-height: 1.18;
  cursor: pointer;
  text-decoration: none;
  color: var(--farm-ink, #173f31);
  background: #fffdeb;
  text-align: center;
}
.farm-button:hover:not(:disabled) {
  background: #e7f8c8;
}
.farm-button.farm-primary {
  background: #087355;
  border-color: #087355;
  color: #fffef2;
}
.farm-button.farm-primary:hover:not(:disabled) {
  background: #075d46;
}
.farm-button:disabled {
  opacity: 1;
  border-color: #a1bb96;
  background: #e1f0cc;
  color: #526b4f;
  cursor: default;
}
.farm-button.farm-primary:disabled {
  background: #c5ebcd;
  border-color: #91b99b;
  color: #46664e;
}
.farm-button.farm-orchard {
  border-color: #b78730;
  background: #ffe79a;
}
.farm-aux {
  margin: 5px 0 0;
  gap: 10px;
}
.farm-aux:empty,
.farm-aux:not(:has(:not([hidden]))) {
  display: none;
}
.farm-note {
  color: var(--farm-muted);
  font-size: 0.76rem;
  line-height: 1.42;
  margin: 8px auto 0;
  max-width: 550px;
  text-wrap: balance;
}
.farm-message {
  margin: 12vh auto;
  padding: 20px;
}
.farm-message h1 {
  font-size: clamp(1.5rem, 5vw, 2.4rem);
  text-wrap: balance;
}
.farm-modal {
  box-sizing: border-box;
  width: min(420px, calc(100% - 28px));
  max-height: calc(100dvh - 38px);
  border: 1px solid #7a9d76;
  background: #fffced;
  color: #173f31;
  border-radius: 13px;
  box-shadow: 0 16px 54px #225a4233;
  padding: clamp(20px, 4vw, 32px);
  text-align: center;
  overflow: auto;
}
.farm-modal::backdrop {
  background: #235e49a6;
}
.farm-modal-head {
  display: block;
}
.farm-modal h2 {
  margin: 0;
  font-size: 1.62rem;
  line-height: 1.1;
  text-wrap: balance;
}
.farm-modal-body p {
  margin: 0.8rem 0;
}
.farm-modal .farm-dialog-actions {
  margin-top: 18px;
}
.farm-result-score {
  font-family: Georgia, 'STIX Two Text', serif;
  font-size: 3.8rem;
  line-height: 1.1;
  letter-spacing: -0.05em;
}
.farm-result-identity {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 3px;
  margin: 16px 0 0;
  overflow-wrap: anywhere;
}
.farm-medal {
  font-weight: 680;
  color: #83550b;
}
.farm-cutoffs,
.farm-check {
  font-size: 0.84rem;
  color: #3e604a;
}
.farm-check {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
}
.farm-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  clip-path: inset(50%);
  white-space: nowrap;
  overflow: hidden;
}
.farm-stage [hidden] {
  display: none !important;
}
@media (max-width: 560px) {
  .farm-stage {
    padding: 6px 10px 16px;
  }
  .farm-heading {
    grid-template-columns: 32px minmax(0, 1fr) 32px;
    margin-bottom: 12px;
  }
  .farm-arrow {
    width: 31px;
    height: 31px;
  }
  .farm-status {
    margin-top: 10px;
    gap: 4px;
  }
  .farm-stat {
    gap: 4px;
  }
  .farm-stat > span,
  .farm-mode-link {
    font-size: 0.72rem;
  }
  .farm-stat > strong {
    font-size: 0.95rem;
  }
  .farm-button {
    padding: 8px 11px;
    min-height: 40px;
    font-size: 0.82rem;
  }
  .farm-actions {
    align-items: stretch;
    gap: 6px;
  }
  .farm-actions .farm-button {
    flex: 1 1 0;
    min-width: 0;
    max-width: 145px;
    padding-inline: 5px;
    overflow-wrap: anywhere;
  }
}
@media (max-height: 520px) and (min-width: 600px) {
  .farm-title {
    font-size: 1.35rem;
  }
  .farm-heading {
    margin-bottom: 5px;
  }
  .farm-stage {
    padding-top: 0;
  }
  .farm-board {
    width: min(62vw, clamp(88px, calc((100svh - 211px) * var(--ratio)), 500px));
  }
  .farm-status,
  .farm-actions {
    margin-top: 5px;
  }
  .farm-note {
    margin-top: 4px;
  }
}
