/* Harvest Dash: compact menus and a full-height playfield. */
:root {
  --bg-dark: #101e20;
  --bg-panel: #182e30;
  --text-muted: #abc0bb;
  --accent: #ffcf68;
  --accent2: #85ddb2;
}
body {
  padding: 12px;
  background: #101e20;
}
.wr-layout {
  max-width: 1600px;
  height: calc(100dvh - 24px);
  gap: 10px;
}
.wr-header {
  border-radius: 8px;
  padding: 10px 16px;
  flex-shrink: 0;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
}
.wr-title,
.wr-modal h2 {
  background: none;
  -webkit-text-fill-color: currentColor;
  color: #fff8e5;
  letter-spacing: 0;
}
.wr-title {
  font-size: 23px;
}
.wr-sub {
  color: #9eb7b0;
  font-size: 10px;
  letter-spacing: 0;
}
.header-left {
  gap: 12px;
}
.header-right {
  gap: 7px;
}
.header-center {
  flex-wrap: nowrap;
  gap: 10px;
}
.p2-badge[hidden] {
  display: none;
}
body:has(#gameSetup:not([style*='display: none'])) .header-center,
body:has(#gameSetup:not([style*='display: none'])) .level-badge {
  display: none;
}
body:has(#gameSetup:not([style*='display: none'])) .wr-header {
  grid-template-columns: 1fr auto;
}
.hub-btn {
  border-radius: 6px;
  padding: 8px 10px;
}
.lives-badge,
.score-block,
.harvest-block {
  border-radius: 6px;
  box-shadow: none;
}
.level-badge {
  background: transparent;
  box-shadow: none;
  padding: 5px;
  color: #c4d6ca;
  font-size: 11px;
  letter-spacing: 0;
}
.score-val {
  font:
    900 22px 'Outfit',
    sans-serif;
  min-width: 45px;
}
.score-block {
  padding: 6px 12px;
}
.harvest-block {
  width: 145px;
  min-width: 110px;
}
.badge-label,
.badge-hearts,
.score-label,
.harvest-top span {
  letter-spacing: 0;
}
.tool-btn {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #f3f6e9;
  background: #ffffff08;
  border: 1px solid #d7e3d633;
  border-radius: 6px;
  cursor: pointer;
}
.tool-btn svg {
  width: 18px;
  height: 18px;
}
.tool-btn:hover:not(:disabled) {
  background: #ffffff18;
  border-color: #ffcf68;
}
.tool-btn:disabled {
  opacity: 0.35;
  cursor: default;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #ffcf68;
  outline-offset: 3px;
}
.wr-canvas-wrapper {
  flex: 1;
  min-height: 0;
  border-radius: 8px;
  background: #192c2e;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
#runnerCanvas {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 0;
}
.wr-overlay {
  background: #102b2b26;
  backdrop-filter: none;
  padding: 22px;
  overflow: auto;
}
#gameSetup {
  justify-content: flex-end;
}
.wr-modal {
  border-radius: 8px;
  background: #183133f5;
  border: 1px solid #c2d8c959;
  box-shadow: 0 18px 48px #0a252a55;
  max-height: 100%;
  animation: none;
}
.setup-menu {
  width: min(700px, 100%);
  padding: 26px;
  text-align: left;
  margin-right: 3%;
}
.setup-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}
.setup-heading svg {
  color: #a1e6b9;
  width: 34px;
  height: 34px;
}
.setup-heading h2 {
  margin: 0;
  font-size: 36px;
}
.farm-selection {
  padding-bottom: 20px;
  border-bottom: 1px solid #c8e1c82b;
}
.panel-head {
  margin-bottom: 12px;
}
.panel-head span,
.diff-label {
  color: #b9d0c3;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
}
.panel-head strong {
  font-size: 11px;
  color: #9eb9af;
}
.campaign-map {
  grid-template-columns: repeat(15, minmax(0, 1fr));
  gap: 5px;
}
.map-node {
  appearance: none;
  min-height: 44px;
  width: 100%;
  font-family: inherit;
  border-radius: 5px;
  background: #102326;
  color: #65837c;
}
button.map-node:not(:disabled) {
  cursor: pointer;
}
.map-node span {
  font-size: 13px;
}
.map-node small {
  right: 3px;
  bottom: 3px;
  font-size: 8px;
}
.map-node.current {
  background: #274b43;
  border-color: #79b199;
  box-shadow: none;
}
.map-node.cleared {
  background: #234638;
  border-color: #478666;
  color: #9aebba;
}
.map-node.selected {
  background: #ffcf68;
  border: 2px solid #fff1c6;
  color: #27362b;
  box-shadow: 0 3px 0 #b18436;
}
.map-node.selected small {
  color: #536444;
}
.map-node.locked {
  opacity: 0.7;
}
.map-node.boss:not(.selected) {
  border-color: #b5766b;
}
.selected-field {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-top: 16px;
}
.selected-field > span {
  color: #ffcf68;
  font-size: 10px;
  white-space: nowrap;
}
.selected-field > strong {
  color: #f2f8e9;
  font-size: 19px;
  line-height: 1.25;
}
.setup-options {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 22px;
  margin: 20px 0;
}
.setup-options fieldset {
  min-width: 0;
  border: 0;
  margin: 0;
  padding: 0;
}
.diff-label {
  padding: 0;
  margin-bottom: 10px;
}
.diff-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}
.diff-opt {
  position: relative;
  min-width: 0;
  min-height: 44px;
  padding: 8px 5px;
  justify-content: center;
  border-radius: 5px;
  background: #102326;
  border: 1px solid #bfd9c435;
}
.diff-opt span {
  font-size: 13px;
  color: #bbcec5;
}
.diff-opt.selected {
  background: #305c4d;
  border-color: #86d0a7;
}
.diff-opt.selected span {
  color: #f1ffe8;
}
.diff-opt:hover {
  background: #305c4d;
  border-color: #86d0a7;
}
.diff-opt input {
  display: block;
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.diff-opt:focus-within {
  outline: 3px solid #ffcf68;
  outline-offset: 2px;
}
.academic-detail {
  display: block;
  color: #a8bfb3;
  font-size: 10px;
  margin-top: 9px;
  line-height: 1.4;
}
.start-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #ffcf68;
  color: #26362c;
  border-radius: 6px;
  box-shadow: 0 3px 0 #ab8033;
  letter-spacing: 0;
  min-height: 48px;
}
.start-btn svg,
.secondary-btn svg {
  width: 18px;
  height: 18px;
}
.start-btn:hover {
  box-shadow: 0 3px 0 #ab8033;
  transform: none;
  filter: brightness(1.06);
}
.start-btn:active {
  transform: translateY(2px);
}
.secondary-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 6px;
  color: #c4d4c9;
}
.controls-link {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  margin: 14px auto 0;
  color: #b9d0c4;
  background: none;
  border: 0;
  font:
    600 12px 'Outfit',
    sans-serif;
  cursor: pointer;
  padding: 6px 12px;
}
.controls-link svg {
  width: 17px;
  height: 17px;
}
.controls-link:hover {
  color: #ffcf68;
}
.campaign-map-panel,
.end-stats {
  border: 0;
  border-radius: 0;
  background: none;
  padding: 12px 0;
}
.wr-modal p {
  color: #bdcec3;
}
.end-stats {
  border-top: 1px solid #c1d7c633;
}
.runner-dialog {
  position: fixed;
  margin: auto;
  width: min(540px, calc(100% - 28px));
  max-height: calc(100dvh - 28px);
  overflow: auto;
  padding: 28px;
  border: 1px solid #acc8b866;
  border-radius: 8px;
  background: #183133;
  color: #f4f7e9;
  font-family: var(--font);
}
.runner-dialog::backdrop {
  background: #071917b0;
}
.runner-dialog h2 {
  font-size: 25px;
  margin-bottom: 20px;
  padding-right: 20px;
}
.runner-dialog p {
  color: #bcd0c3;
  font-size: 13px;
  line-height: 1.6;
  margin: 14px 0;
}
.dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
}
.runner-controls > div {
  padding: 12px 0;
  border-bottom: 1px solid #d5ebcb25;
}
.runner-controls dt {
  color: #ffcf68;
  font-size: 12px;
  margin-bottom: 8px;
}
.runner-controls dd {
  font-size: 12px;
  line-height: 2;
}
.runner-controls kbd {
  font: 700 12px var(--font);
  padding: 3px 6px;
  margin-right: 4px;
  border: 1px solid #c0dac048;
  border-radius: 4px;
  background: #112627;
}
.touch-controls {
  display: none;
}
body:has(#gameSetup:not([style*='display: none'])) #mobileGamepad,
body:has(#gameEnd[style*='display: flex']) #mobileGamepad {
  display: none;
}
#kid-timer-btn {
  display: none !important;
}
body.fs-mode .wr-layout {
  height: 100dvh;
}
body.fs-mode .wr-header {
  opacity: 1;
  position: relative;
  inset: auto;
  border-radius: 0;
  padding: 6px 14px;
}
body.fs-mode .wr-canvas-wrapper {
  height: auto;
  min-height: 0;
  border-radius: 0;
}
body.fs-mode #runnerCanvas {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
body.mobile-mode {
  padding: 6px;
}
body.mobile-mode .wr-layout {
  height: calc(100dvh - 12px);
  gap: 6px;
}
body.mobile-mode .wr-header {
  grid-template-columns: 1fr auto;
  justify-items: stretch;
  padding: 7px 9px;
  border-radius: 6px;
}
body.mobile-mode .header-right {
  display: flex;
}
body.mobile-mode .header-center {
  display: none;
}
body.mobile-mode .wr-canvas-wrapper {
  padding-bottom: 116px;
  border-radius: 6px;
}
body.mobile-mode .keyboard-controls {
  display: none;
}
body.mobile-mode .touch-controls {
  display: block;
}
body.mobile-mode .mode-row .diff-options {
  grid-template-columns: 1fr;
}
body.mobile-mode #mobileGamepad {
  height: 116px;
}
body.mobile-mode:has(#gameSetup:not([style*='display: none'])) .wr-canvas-wrapper {
  padding-bottom: 0;
}
.mgp-btn {
  background: #183e40e6;
}
.mgp-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.mgp-left-btn,
.mgp-right-btn {
  width: 54px;
  height: 54px;
  margin: 0;
  align-self: center;
}
.mgp-right {
  flex-direction: row;
  align-items: center;
  gap: 8px;
}
.mgp-jump-btn {
  width: 64px;
  height: 64px;
}
.mgp-drop-btn {
  width: 42px;
  height: 42px;
  border-radius: 6px;
}
.mgp-jump-btn {
  background: #367158e6;
  border-color: #9cddbc;
}
@media (max-width: 1100px) {
  .wr-header {
    gap: 8px;
  }
  .wr-sub,
  .header-center .lives-badge {
    display: none;
  }
  .setup-menu {
    margin-right: 0;
  }
}
@media (max-width: 760px) {
  .wr-layout {
    height: calc(100dvh - 24px);
  }
  .wr-header {
    grid-template-columns: 1fr auto;
    justify-items: stretch;
    padding: 8px;
  }
  .wr-title {
    font-size: 19px;
  }
  .header-right {
    display: flex;
  }
  .header-center,
  .level-badge {
    display: none;
  }
  .header-left {
    gap: 8px;
  }
  .tool-btn {
    width: 32px;
    height: 32px;
  }
  .wr-overlay {
    padding: 12px;
  }
  .setup-menu {
    width: 100%;
    padding: 20px;
  }
  .setup-heading {
    margin-bottom: 18px;
  }
  .setup-heading h2 {
    font-size: 29px;
  }
  .campaign-map {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
  }
  .map-node {
    min-height: 36px;
  }
  .setup-options {
    grid-template-columns: 1fr;
    gap: 16px;
    margin: 16px 0;
  }
  .diff-opt {
    flex-direction: column;
    min-height: 40px;
    padding: 8px 4px;
  }
  .diff-opt span {
    font-size: 13px;
  }
  .selected-field {
    margin-top: 12px;
    gap: 8px;
  }
  .selected-field > strong {
    font-size: 17px;
  }
  .farm-selection {
    padding-bottom: 16px;
  }
  .panel-head {
    gap: 6px;
  }
  .end-map-panel .map-node {
    min-height: 26px;
  }
  #gameEnd {
    align-items: flex-start;
  }
}
@media (max-height: 560px) and (min-width: 650px) {
  .setup-menu {
    width: 620px;
    padding: 16px 22px;
  }
  .setup-heading {
    margin-bottom: 10px;
  }
  .setup-heading h2 {
    font-size: 27px;
  }
  .setup-heading svg {
    width: 25px;
    height: 25px;
  }
  .campaign-map {
    grid-template-columns: repeat(15, minmax(0, 1fr));
  }
  .map-node {
    min-height: 32px;
  }
  .farm-selection {
    padding-bottom: 10px;
  }
  .selected-field {
    margin-top: 8px;
  }
  .selected-field strong {
    font-size: 16px;
  }
  .setup-options {
    grid-template-columns: 1.2fr 1fr;
    margin: 10px 0;
    gap: 18px;
  }
  .diff-label {
    margin-bottom: 6px;
  }
  .diff-opt {
    min-height: 32px;
  }
  .academic-detail {
    display: none;
  }
  .controls-link {
    margin-top: 8px;
    padding: 2px 8px;
  }
  .start-btn {
    min-height: 40px;
    padding: 9px;
  }
  .wr-overlay {
    padding: 10px;
  }
  body.mobile-mode .wr-canvas-wrapper {
    padding-bottom: 0;
  }
  body.mobile-mode #mobileGamepad {
    height: 88px;
  }
  .mgp-left {
    grid-template-rows: 36px 36px;
  }
  .mgp-right {
    flex-direction: row;
    align-items: flex-end;
  }
  .mgp-jump-btn {
    width: 60px;
    height: 60px;
  }
  .mgp-drop-btn {
    width: 44px;
    height: 38px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
@media (max-width: 380px) {
  .header-right {
    gap: 4px;
  }
  .tool-btn {
    width: 28px;
  }
  body.mobile-mode .wr-title {
    font-size: 15px;
  }
}
@media (max-width: 450px) and (max-height: 660px) {
  .setup-menu {
    padding: 14px;
  }
  .setup-heading {
    margin-bottom: 12px;
    gap: 8px;
  }
  .setup-heading h2 {
    font-size: 24px;
  }
  .setup-heading svg {
    width: 26px;
    height: 26px;
  }
  .panel-head {
    margin-bottom: 8px;
  }
  .campaign-map {
    gap: 4px;
  }
  .map-node {
    min-height: 28px;
  }
  .selected-field {
    margin-top: 10px;
  }
  .selected-field strong {
    font-size: 15px;
  }
  .farm-selection {
    padding-bottom: 12px;
  }
  .setup-options {
    gap: 10px;
    margin: 12px 0;
  }
  .diff-label {
    margin-bottom: 6px;
  }
  .diff-opt {
    min-height: 36px;
  }
  .academic-detail {
    margin-top: 6px;
  }
  .start-btn {
    min-height: 40px;
    padding: 9px;
  }
  .controls-link {
    margin-top: 8px;
    padding: 3px;
  }
}
