/* Larger controls, square resource panels, and an immersive live map. */
#sunny-hud.focus-controls .fh-circle {
  width: 76px;
  height: 76px;
}
#sunny-hud .fh-circle .fh-icon {
  width: 64px;
  height: 64px;
}
.fh-topbar {
  gap: 20px;
  align-items: flex-start;
}
#sunny-hud .fh-profile {
  min-width: 250px;
  max-width: 300px;
  gap: 14px;
  padding: 14px 20px 14px 14px;
  border-radius: 0;
  background: #20251ff2;
  border: 1px solid #d5bc82;
  box-shadow: 0 6px 22px #0003;
}
.fh-profile > img {
  width: 58px;
  height: 58px;
  border-radius: 0;
  border: 0;
}
.fh-profile strong {
  font-size: 26px;
}
.fh-profile small {
  font-size: 13px;
  margin-top: 7px;
}
.fh-profile #sunny-xp {
  font-size: 11px;
}
.fh-xp {
  height: 5px;
  margin-top: 8px;
  border-radius: 0;
}
.fh-wallet {
  gap: 12px;
  padding-top: 6px;
}
#sunny-hud .fh-wallet button {
  min-width: 132px;
  height: 72px;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 0;
  border-color: #d5bc82;
  background: #20251ff2;
  box-shadow: 0 6px 22px #0003;
}
.fh-wallet .fh-icon {
  width: 38px;
  height: 38px;
}
.fh-wallet strong {
  font-size: 30px;
}
.fh-wallet button > span {
  font-size: 23px;
}
#sunny-hud .fh-storage {
  gap: 14px;
  min-width: 250px;
  min-height: 76px;
  padding: 13px 20px;
  border-radius: 0;
  border-color: #d5bc82;
  background: #20251ff2;
  box-shadow: 0 6px 22px #0003;
}
.fh-storage > .fh-icon {
  width: 48px;
  height: 48px;
}
.fh-storage-copy {
  display: flex;
  min-width: 115px;
  flex: 1;
  flex-direction: column;
  gap: 5px;
  text-align: left;
}
.fh-storage-copy small {
  color: #e8c987;
  font:
    600 10px "Space Grotesk",
    sans-serif;
  letter-spacing: 1.2px;
}
.fh-storage-copy strong {
  font:
    700 23px "Barlow Condensed",
    sans-serif;
}
.fh-storage-track {
  display: block;
  width: 100%;
  height: 6px;
  border-radius: 0;
  background: #ffffff25;
}
.fh-storage-track i {
  background: #e7bd62;
}
.fh-minimap {
  top: 121px;
}
.fh-shortcuts {
  top: 329px;
  gap: 14px;
  right: 20px;
}
#sunny-hud .fh-map-tools .fh-circle {
  width: 58px;
  height: 58px;
}
#sunny-hud .fh-map-tools .fh-icon {
  width: 48px;
  height: 48px;
}
.fh-movement {
  width: 222px;
  height: 222px;
}
#sunny-hud .fh-movement .fh-circle {
  width: 70px;
  height: 70px;
}
.fh-move-w {
  left: 76px;
}
.fh-move-a {
  top: 76px;
}
.fh-move-d {
  left: 152px;
  top: 76px;
}
.fh-move-s {
  left: 76px;
  top: 152px;
}
#sunny-hud .fh-actions .fh-circle {
  width: 82px;
  height: 82px;
}
#sunny-hud .fh-actions .fh-icon {
  width: 69px;
  height: 69px;
}
#sunny-inspector.field-dock {
  top: 118px;
  width: 340px;
}
#sunny-inspector.field-dock .field-step {
  width: 70px;
  height: 70px;
}
.field-steps .fh-icon {
  width: 59px;
  height: 59px;
}
.field-steps {
  gap: 12px;
  padding: 12px 18px;
}
#sunny-inspector.field-dock .field-summary .fh-circle {
  width: 40px;
  height: 40px;
}
.field-summary .fh-icon {
  width: 30px;
  height: 30px;
}
#sunny-hud .farm-clock {
  top: 116px;
  border-radius: 0;
  min-height: 57px;
}
.farm-clock strong {
  font-size: 18px;
}
.farm-home-controls {
  bottom: 115px;
}
#sunny-hud .farm-home-controls button {
  min-height: 42px;
  font-size: 12px;
  border-radius: 0;
}
.fh-farmers {
  position: absolute;
  left: 20px;
  top: 185px;
  display: flex;
  gap: 7px;
  pointer-events: auto;
}
#sunny-hud .fh-farmers button {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 11px;
  border: 1px solid #b9b9a36b;
  background: #20251feb;
  color: #e8dfc5;
  font:
    600 10px "Space Grotesk",
    sans-serif;
  min-height: 48px;
}
.fh-farmers img {
  width: 30px;
  height: 30px;
  object-fit: cover;
}
.fh-farmers button:last-child img {
  filter: hue-rotate(24deg);
}
#sunny-hud .fh-farmers [aria-pressed="true"] {
  border-color: #f3c75f;
  background: #3c4330;
  color: #ffe7a3;
}
#farm-waypoint {
  bottom: 114px;
}
/* The map uses almost the full viewport. The scene stays live through the cutout. */
#farm-overview-ui {
  display: flex;
  padding: 16px;
  color: #fff8e9;
  font-family: "Space Grotesk", sans-serif;
}
#farm-overview-ui[hidden] {
  display: none !important;
}
#farm-overview-ui .farm-map-backdrop {
  background: #101a17f5 !important;
}
.farm-map-dialog {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 1px solid #e6c58480;
  box-shadow: 0 12px 60px #0005;
  pointer-events: none;
}
.farm-map-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  background: #20251ff5;
  gap: 16px;
}
.farm-map-heading small {
  font-size: 9px;
  letter-spacing: 2px;
  color: #e7bd62;
}
.farm-map-heading h1 {
  margin: 6px 0 0;
  font:
    800 36px/0.95 "Barlow Condensed",
    sans-serif;
}
#farm-map-close {
  width: 52px;
  height: 52px;
  border: 1px solid #d5bc82;
  background: #ffffff09;
  color: #fff8e9;
  font: 300 35px sans-serif;
  cursor: pointer;
}
.farm-map-destinations {
  display: flex;
  gap: 0;
  background: #20251ff5;
  padding: 0 24px 12px;
  flex-wrap: wrap;
  pointer-events: auto;
}
.farm-map-destinations button {
  display: flex;
  gap: 17px;
  align-items: center;
  padding: 10px 16px;
  border: 1px solid #f1d59b40;
  border-right: 0;
  background: transparent;
  color: #efe2c4;
  font:
    600 11px "Space Grotesk",
    sans-serif;
  cursor: pointer;
}
.farm-map-destinations button:last-child {
  border-right: 1px solid #f1d59b40;
}
.farm-map-destinations [aria-pressed="true"] {
  background: #e7bd62;
  color: #20251f;
}
#farm-overview-ui .farm-map-view {
  display: flex;
  flex: 1;
  min-height: 0;
  max-width: none;
  width: 100%;
  padding: 0;
  margin: 0;
  overflow: hidden;
  gap: 0;
  justify-content: stretch;
  pointer-events: none;
}
#farm-map-stage {
  width: 100%;
  height: 100%;
  min-height: 0;
  flex: 1;
  cursor: crosshair;
  touch-action: none;
}
.farm-map-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 15px 24px;
  background: #20251ff5;
  pointer-events: auto;
  min-height: 83px;
}
#farm-map-status {
  font-size: 11px;
  min-height: 0;
  margin: 0 0 5px;
  line-height: 1.4;
}
#farm-map-clear {
  margin: 0;
  padding: 3px 0;
  border: 0;
  font-size: 14px;
  min-height: 25px;
}
.farm-map-continue {
  display: flex;
  align-items: center;
  gap: 24px;
  background: #e7bd62;
  border: 1px solid #ffdc91;
  padding: 17px 23px;
  color: #20251f;
  min-height: 54px;
  font:
    800 20px "Barlow Condensed",
    sans-serif;
  cursor: pointer;
  white-space: nowrap;
}
.map-place-label {
  font-size: 10px;
  padding: 5px 8px;
  background: #1c2824eb;
  border-radius: 0;
}
.map-compass {
  font-size: 14px;
}
.farm-map-dialog button:focus-visible {
  outline: 3px solid #fff1c7;
  outline-offset: 3px;
}
/* Building information shares the orders' scenic card treatment. */
#sunny-dialog .farm-content-card:has(.building-detail) {
  background: #202420 !important;
  color: #fff4db !important;
  isolation: isolate;
  overflow: hidden;
}
#sunny-dialog .farm-content-card:has(.building-detail)::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, #171e1977, #171e19f5 75%),
    var(--building-art) center/cover;
  opacity: 0.95;
}
.building-detail {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  --building-art: url("../assets/sunny/items/barn-level1.webp");
}
.building-detail > .sunny-prop-preview {
  width: 100%;
  height: 180px;
  object-fit: contain;
}
.building-detail h3 {
  color: #f3d18d;
  font:
    800 38px "Barlow Condensed",
    sans-serif !important;
}
.building-detail p {
  color: #f4e8cb !important;
  line-height: 1.6;
}
.building-detail .cost-item {
  color: #fff1c7;
}
.building-detail .sunny-button {
  margin: 8px 6px 0 0;
}
/* Sleep artwork contains actual single/duo sleeping poses, not standing actors. */
#farm-sleep-curtain {
  background: radial-gradient(ellipse, #182b31db, #111923fc);
  gap: 12px;
  transition:
    opacity 0.25s,
    visibility 0.25s;
}
#farm-sleep-art {
  width: min(68vh, 590px);
  height: min(68vh, 590px);
  max-width: 90vw;
  max-height: 90vw;
  background-image: var(--farm-sleep-art);
  background-size: 400% 200%;
  background-repeat: no-repeat;
  border: 1px solid #eacb8c66;
  box-shadow: 0 15px 70px #0008;
}
#farm-sleep-curtain strong {
  font-size: 27px;
  letter-spacing: 2px;
}
#farm-sleep-curtain span {
  font-size: 12px;
}
body.farm-bedtime #sunny-inspector {
  visibility: hidden;
}
body.farm-bedtime #sunny-hud button {
  pointer-events: none !important;
  opacity: 0.65;
}
@media (max-width: 760px) {
  #sunny-hud .fh-topbar {
    bottom: auto;
    align-content: flex-start;
  }
  #sunny-hud .fh-wallet {
    width: 100%;
  }
  #sunny-hud .fh-wallet button {
    flex: 1;
    min-width: 0;
    padding-inline: 8px;
    gap: 5px;
  }
  #sunny-hud .fh-wallet strong {
    font-size: 24px;
  }
  #sunny-hud .fh-wallet .fh-icon {
    width: 28px;
    height: 28px;
  }
  #sunny-hud .fh-wallet button > span {
    font-size: 16px;
  }
}
@media (max-width: 1150px) and (min-width: 761px) {
  #sunny-hud .fh-profile {
    min-width: 210px;
    max-width: 250px;
    padding: 12px;
  }
  .fh-profile strong {
    font-size: 23px;
  }
  .fh-wallet {
    gap: 8px;
  }
  #sunny-hud .fh-wallet button {
    min-width: 108px;
    padding: 12px;
    height: 68px;
    gap: 8px;
  }
  .fh-wallet strong {
    font-size: 27px;
  }
  .fh-wallet .fh-icon {
    width: 32px;
    height: 32px;
  }
}
@media (min-width: 761px) and (max-height: 850px) {
  .fh-shortcuts {
    display: grid;
    grid-template-columns: 76px 76px;
    top: 325px;
    gap: 12px;
  }
  .fh-shortcuts .fh-circle:last-child {
    grid-column: 2;
  }
}
@media (max-width: 760px) {
  .fh-topbar {
    inset: 12px;
    gap: 10px;
    align-items: center;
  }
  #sunny-hud .fh-profile {
    min-width: 0;
    max-width: calc(100% - 130px);
    padding: 10px;
    gap: 9px;
    flex: 1;
  }
  .fh-profile > img {
    width: 44px;
    height: 44px;
  }
  .fh-profile strong {
    font-size: 21px;
  }
  .fh-profile small {
    font-size: 11px;
    margin-top: 5px;
  }
  .fh-profile #sunny-xp {
    font-size: 9px;
    margin-left: 4px;
  }
  .fh-xp {
    height: 4px;
    margin-top: 6px;
  }
  .fh-top-tools {
    gap: 8px;
  }
  #sunny-hud .fh-top-tools .fh-circle {
    width: 56px;
    height: 56px;
  }
  #sunny-hud .fh-top-tools .fh-icon {
    width: 47px;
    height: 47px;
  }
  .fh-wallet {
    order: 3;
    flex-basis: 100%;
    gap: 8px;
    padding: 0;
  }
  #sunny-hud .fh-wallet button {
    min-width: 94px;
    height: 51px;
    gap: 9px;
    padding: 10px 13px;
  }
  .fh-wallet strong {
    font-size: 25px;
  }
  .fh-wallet .fh-icon {
    width: 29px;
    height: 29px;
  }
  .fh-wallet button > span {
    font-size: 18px;
  }
  .fh-minimap {
    top: 164px;
    right: 12px;
  }
  .fh-map-open {
    width: 88px;
    height: 88px;
  }
  #sunny-hud .fh-map-tools .fh-circle {
    width: 47px;
    height: 47px;
  }
  #sunny-hud .fh-map-tools .fh-icon {
    width: 39px;
    height: 39px;
  }
  .fh-map-tools {
    gap: 5px;
  }
  .fh-shortcuts {
    right: 12px;
    top: 320px;
    display: flex;
    gap: 10px;
  }
  #sunny-hud .fh-shortcuts .fh-circle {
    width: 60px;
    height: 60px;
  }
  #sunny-hud .fh-shortcuts .fh-icon {
    width: 51px;
    height: 51px;
  }
  .fh-movement {
    left: 12px;
    bottom: 15px;
    width: 186px;
    height: 186px;
  }
  #sunny-hud .fh-movement .fh-circle {
    width: 58px;
    height: 58px;
  }
  #sunny-hud .fh-movement .fh-icon {
    width: 49px;
    height: 49px;
  }
  .fh-move-w {
    left: 64px;
  }
  .fh-move-a {
    top: 64px;
  }
  .fh-move-d {
    left: 128px;
    top: 64px;
  }
  .fh-move-s {
    left: 64px;
    top: 128px;
  }
  .fh-actions {
    right: 12px;
    bottom: 15px;
    gap: 9px;
    flex-direction: column;
  }
  #sunny-hud .fh-actions .fh-circle {
    width: 62px;
    height: 62px;
  }
  #sunny-hud .fh-actions .fh-icon {
    width: 53px;
    height: 53px;
  }
  #sunny-hud .fh-storage {
    min-width: 0;
    width: 116px;
    min-height: 73px;
    left: calc((198px + 100vw - 74px) / 2);
    bottom: 25px;
    padding: 8px;
    gap: 5px;
  }
  .fh-storage > .fh-icon {
    width: 29px;
    height: 29px;
  }
  .fh-storage-copy {
    min-width: 0;
    gap: 4px;
  }
  .fh-storage-copy small {
    font-size: 7px;
    letter-spacing: 0.2px;
  }
  .fh-storage-copy strong {
    font-size: 18px;
  }
  .fh-storage-track {
    display: block;
    height: 5px;
  }
  #sunny-hud .farm-clock {
    left: 12px;
    top: 158px;
    min-width: 148px;
    padding: 9px 12px;
    min-height: 57px;
  }
  .farm-clock strong {
    font-size: 17px;
  }
  .fh-farmers {
    left: 12px;
    top: 225px;
    gap: 5px;
  }
  #sunny-hud .fh-farmers button {
    padding: 6px 8px;
    font-size: 8px;
    min-height: 40px;
  }
  .fh-farmers img {
    width: 24px;
    height: 24px;
  }
  #sunny-inspector.field-dock {
    top: 278px;
    left: 12px;
    transform: none;
    width: 244px;
    max-width: calc(100vw - 102px);
  }
  #sunny-inspector.field-dock .field-step {
    width: 54px;
    height: 54px;
  }
  .field-steps .fh-icon {
    width: 45px;
    height: 45px;
  }
  .field-steps {
    gap: 7px;
    padding: 9px;
  }
  .field-summary {
    padding: 6px;
    gap: 4px;
  }
  #sunny-inspector.field-dock .field-summary .fh-circle {
    width: 32px;
    height: 32px;
  }
  .field-summary .fh-icon {
    width: 24px;
    height: 24px;
  }
  .farm-home-controls {
    bottom: 108px;
    left: 50%;
    top: auto;
    transform: translateX(-50%);
    width: auto;
    flex-direction: row;
  }
  #farm-waypoint {
    bottom: 220px;
    font-size: 10px;
  }
  .farm-map-heading {
    padding: 14px;
  }
  .farm-map-heading h1 {
    font-size: 29px;
  }
  .farm-map-heading small {
    font-size: 8px;
  }
  #farm-overview-ui {
    padding: 8px;
  }
  .farm-map-destinations {
    padding: 0 14px 10px;
    gap: 5px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }
  .farm-map-destinations button {
    border: 1px solid #f1d59b40;
    font-size: 9px;
    padding: 8px;
    gap: 5px;
    justify-content: space-between;
  }
  .farm-map-bottom {
    padding: 12px;
    gap: 10px;
    flex-wrap: wrap;
  }
  .farm-map-continue {
    width: 100%;
    justify-content: space-between;
    padding: 12px 16px;
    min-height: 48px;
    font-size: 19px;
  }
  .farm-map-bottom > div {
    display: flex;
    justify-content: space-between;
    width: 100%;
    gap: 9px;
    align-items: center;
  }
  #farm-map-status {
    font-size: 9px;
    max-width: 210px;
    margin: 0;
  }
  #farm-map-clear {
    font-size: 12px;
    white-space: nowrap;
  }
  .map-place-label {
    font-size: 8px;
    padding: 3px 5px;
  }
}
@media (max-width: 760px) and (max-height: 740px) {
  .fh-map-tools {
    display: none;
  }
  .fh-shortcuts {
    top: 278px;
    display: grid;
    grid-template-columns: 54px 54px;
    gap: 8px;
  }
  #sunny-hud .fh-shortcuts .fh-circle {
    width: 54px;
    height: 54px;
  }
  #sunny-hud .fh-shortcuts .fh-icon {
    width: 46px;
    height: 46px;
  }
  .fh-shortcuts .fh-circle:last-child {
    grid-column: 2;
  }
  #sunny-inspector.field-dock {
    width: 225px;
    max-width: calc(100vw - 142px);
  }
  #sunny-inspector.field-dock .field-step {
    width: 48px;
    height: 48px;
  }
  .field-steps .fh-icon {
    width: 40px;
    height: 40px;
  }
  .field-summary > img {
    display: none;
  }
  .field-summary strong {
    font-size: 17px;
  }
  .field-summary small {
    font-size: 8px;
  }
}
@media (max-height: 700px) and (min-width: 761px) {
  #sunny-hud .fh-profile {
    min-width: 210px;
    padding: 9px 12px;
    max-width: 240px;
  }
  .fh-profile > img {
    width: 44px;
    height: 44px;
  }
  .fh-profile strong {
    font-size: 23px;
  }
  .fh-topbar {
    inset: 10px 14px;
    gap: 12px;
  }
  .fh-wallet {
    padding: 0;
  }
  #sunny-hud .fh-wallet button {
    height: 62px;
    min-width: 110px;
    padding: 10px 13px;
  }
  .fh-wallet strong {
    font-size: 25px;
  }
  #sunny-hud .fh-top-tools .fh-circle {
    width: 62px;
    height: 62px;
  }
  #sunny-hud .fh-top-tools .fh-icon {
    width: 52px;
    height: 52px;
  }
  .fh-minimap {
    top: 93px;
  }
  .fh-map-open {
    width: 94px;
    height: 94px;
  }
  .fh-map-tools {
    display: none;
  }
  .fh-shortcuts {
    top: 205px;
    grid-template-columns: 60px 60px;
    gap: 10px;
  }
  #sunny-hud .fh-shortcuts .fh-circle {
    width: 60px;
    height: 60px;
  }
  #sunny-hud .fh-shortcuts .fh-icon {
    width: 51px;
    height: 51px;
  }
  .fh-movement {
    width: 192px;
    height: 192px;
  }
  #sunny-hud .fh-movement .fh-circle {
    width: 60px;
    height: 60px;
  }
  .fh-move-w {
    left: 66px;
  }
  .fh-move-a {
    top: 66px;
  }
  .fh-move-d {
    left: 132px;
    top: 66px;
  }
  .fh-move-s {
    left: 66px;
    top: 132px;
  }
  #sunny-hud .fh-actions .fh-circle {
    width: 68px;
    height: 68px;
  }
  #sunny-hud .fh-actions .fh-icon {
    width: 57px;
    height: 57px;
  }
  #sunny-hud .farm-clock {
    top: 93px;
  }
  .fh-farmers {
    top: 162px;
  }
  .farm-home-controls {
    bottom: 108px;
  }
  #sunny-inspector.field-dock {
    top: 93px;
    width: 300px;
  }
  #sunny-inspector.field-dock .field-step {
    width: 58px;
    height: 58px;
  }
  .field-steps .fh-icon {
    width: 49px;
    height: 49px;
  }
}
@media (max-height: 520px) and (min-width: 761px) {
  .fh-shortcuts {
    top: 199px;
    grid-template-columns: 54px 54px 54px;
  }
  #sunny-hud .fh-shortcuts .fh-circle {
    width: 54px;
    height: 54px;
  }
  .fh-shortcuts .fh-circle:last-child {
    grid-column: auto;
  }
  .fh-movement {
    width: 162px;
    height: 162px;
  }
  #sunny-hud .fh-movement .fh-circle {
    width: 50px;
    height: 50px;
  }
  .fh-move-w {
    left: 56px;
  }
  .fh-move-a {
    top: 56px;
  }
  .fh-move-d {
    left: 112px;
    top: 56px;
  }
  .fh-move-s {
    left: 56px;
    top: 112px;
  }
  .fh-map-open {
    width: 82px;
    height: 82px;
  }
  .fh-map-heading {
    padding: 10px 16px;
  }
  .farm-map-heading h1 {
    font-size: 28px;
  }
  .farm-map-bottom {
    min-height: 66px;
    padding: 10px 16px;
  }
  .farm-map-destinations {
    padding-bottom: 8px;
  }
  .farm-map-destinations button {
    padding: 7px 12px;
  }
  .farm-map-continue {
    min-height: 44px;
    padding: 11px 17px;
  }
}
@media (max-width: 760px) {
  #sunny-hud .fh-shortcuts {
    display: grid;
    grid-template-columns: 60px 60px;
    gap: 10px;
  }
  .fh-shortcuts .fh-circle:last-child {
    grid-column: 2;
  }
  #sunny-inspector.field-dock {
    max-width: calc(100vw - 156px);
  }
}
@media (max-width: 760px) and (max-height: 740px) {
  #sunny-hud .fh-shortcuts {
    grid-template-columns: 54px 54px;
    gap: 8px;
  }
}
@media (max-height: 700px) and (min-width: 761px) {
  #sunny-hud .fh-topbar {
    bottom: auto;
    align-content: flex-start;
  }
}
@media (max-width: 760px) {
  #sunny-hud.focus-controls .fh-wallet button {
    flex: 1;
    min-width: 0;
    padding-inline: 8px;
    gap: 5px;
  }
}
@media (max-height: 520px) and (min-width: 761px) {
  #sunny-hud .fh-shortcuts {
    top: 188px;
  }
  .farm-map-dialog {
    position: relative;
  }
  .farm-map-heading {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    z-index: 2;
    padding: 10px 16px;
    background: #20251fdf;
  }
  .farm-map-heading h1 {
    font-size: 25px;
  }
  .farm-map-heading small {
    font-size: 7px;
  }
  #farm-map-close {
    width: 40px;
    height: 40px;
    font-size: 28px;
  }
  .farm-map-destinations {
    display: none;
  }
  .farm-map-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 2;
    min-height: 58px;
    background: #20251fdf;
  }
  .farm-map-continue {
    min-height: 40px;
    font-size: 17px;
  }
  .farm-map-bottom > div {
    max-width: 50%;
  }
}
@media (max-width: 600px) and (max-height: 680px) {
  .fh-map-open {
    width: 64px;
    height: 64px;
  }
  .fh-map-open > span {
    left: 22px;
  }
  .fh-minimap {
    top: 157px;
  }
  .fh-map-tools {
    display: none;
  }
  #sunny-hud .fh-shortcuts {
    top: 228px;
    grid-template-columns: 52px 52px;
    gap: 7px;
  }
  #sunny-hud .fh-shortcuts .fh-circle {
    width: 52px;
    height: 52px;
  }
  #sunny-hud .fh-shortcuts .fh-icon {
    width: 44px;
    height: 44px;
  }
  #sunny-hud .fh-actions .fh-circle {
    width: 56px;
    height: 56px;
  }
  #sunny-hud .fh-actions .fh-icon {
    width: 48px;
    height: 48px;
  }
  .fh-actions {
    gap: 8px;
  }
}
/* Generated matching farm joystick; the thumb moves independently of its base. */
#sunny-hud .fh-movement.farm-joystick {
  width: 168px;
  height: 168px;
  left: 20px;
  bottom: max(20px, env(safe-area-inset-bottom));
  transform: none;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
  isolation: isolate;
}
.farm-joystick img {
  position: absolute;
  pointer-events: none;
  object-fit: contain;
  user-select: none;
}
.joystick-base {
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.9;
}
.joystick-thumb {
  width: 48%;
  height: 48%;
  left: 26%;
  top: 26%;
  transform: translate(var(--stick-x, 0px), var(--stick-y, 0px));
  transition: transform 0.14s ease-out;
  filter: drop-shadow(0 4px 5px #0006);
}
.farm-joystick.active {
  cursor: grabbing;
}
.farm-joystick.active .joystick-thumb {
  transition: none;
}
.farm-joystick.active .joystick-base {
  opacity: 1;
}
@media (max-width: 760px) {
  #sunny-hud .fh-movement.farm-joystick {
    width: 136px;
    height: 136px;
    left: 12px;
    bottom: max(15px, env(safe-area-inset-bottom));
  }
}
@media (max-height: 500px) {
  #sunny-hud .fh-movement.farm-joystick {
    width: 116px;
    height: 116px;
    left: 12px;
    bottom: max(10px, env(safe-area-inset-bottom));
  }
}
body.farm-building .farm-joystick {
  visibility: hidden;
}
#sunny-placement {
  max-width: calc(100vw - 24px);
  flex-wrap: wrap;
  justify-content: center;
}
#sunny-placement .sunny-button {
  min-height: 44px;
  min-width: 44px;
}
/* Placement dedicates the view to the meadow and keeps its confirmation reachable. */
body.farm-building #sunny-hud > * {
  visibility: hidden;
}
body.farm-building #sunny-inspector {
  visibility: hidden;
}
body.farm-building #sunny-placement {
  top: auto;
  bottom: max(16px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100vw - 24px);
  padding: 10px 14px;
  gap: 10px;
}
body.farm-building #sunny-placement > img {
  width: 35px;
  height: 35px;
}
body.farm-building #sunny-placement strong {
  font-size: 16px;
}
body.farm-building #sunny-placement span {
  font-size: 12px;
}
body.farm-building #sunny-placement .sunny-button {
  padding: 10px 14px;
  font-size: 13px;
}
@media (max-width: 500px) {
  body.farm-building #sunny-placement {
    width: calc(100vw - 32px);
  }
  body.farm-building #sunny-placement > span {
    flex-basis: 100%;
    text-align: center;
  }
}
/* Existing lobby geometry, with deliberate actions and compact page content. */
:is(#cod-lobby, #sunny-dialog, #match-report)
  :is(button, a, [data-action], label.import-save) {
  cursor: pointer;
}
:is(#cod-lobby, #sunny-dialog, #match-report) button:disabled {
  cursor: default;
}
.arena-tabs .farm-context-back {
  padding: 0 !important;
  width: 38px;
  min-width: 38px;
  font: 24px/1 sans-serif !important;
}
.arena-tabs .farm-context-back[hidden] {
  display: none !important;
}
#sunny-dialog .farm-compact-profile {
  gap: 10px;
}
#sunny-dialog .farm-camera-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}
#sunny-dialog [data-view="camera"] .camera-preview {
  flex: none;
  aspect-ratio: 2272/941;
  width: 100%;
  min-height: 0;
}
#sunny-dialog [data-view="camera"] .camera-preview canvas {
  width: 100% !important;
  height: 100% !important;
  border-radius: 6px;
}
#sunny-hud .fh-actions {
  display: grid;
  grid-template-columns: repeat(3, auto);
  align-items: center;
  gap: 10px;
}
#sunny-hud .fh-actions > .fh-circle:nth-child(-n + 2) {
  grid-row: 1;
}
#sunny-hud .fh-actions > .fh-circle:nth-child(n + 3) {
  grid-row: 2;
}
#sunny-hud .fh-actions > .fh-circle:nth-child(1) {
  grid-column: 2;
}
#sunny-hud .fh-actions > .fh-circle:nth-child(2) {
  grid-column: 3;
}
#farm-overview-ui {
  inset: 0 !important;
  padding: 0 !important;
  width: 100vw !important;
  height: 100dvh !important;
  max-width: none !important;
  box-sizing: border-box;
}
#farm-overview-ui .farm-map-backdrop {
  background:
    linear-gradient(#17251dc9, #17251dd9),
    url("../assets/sunny/loader-background.webp") center/cover !important;
}
#farm-overview-ui .farm-map-dialog {
  border: 0;
  box-shadow: none;
}
#farm-overview-ui .farm-map-heading {
  background: #1e3029e8;
  border-bottom: 1px solid #e7bd6255;
}
#farm-overview-ui .farm-map-heading h1 {
  font-family: Lilita, sans-serif;
  font-weight: 400;
}
#farm-overview-ui .farm-map-heading > div {
  padding-left: 55px;
  position: relative;
}
#farm-overview-ui .farm-map-heading > div:before {
  content: "M";
  position: absolute;
  left: 0;
  top: 1px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #e7bd62;
  color: #214535;
  border: 2px solid #fff4ce;
  font:
    28px Lilita,
    sans-serif;
}
#farm-overview-ui .farm-map-destinations {
  background: #e7bd62;
  color: #214535;
  padding: 7px 24px;
  gap: 6px;
}
#farm-overview-ui .farm-map-destinations button {
  background: #fff7df80;
  color: #214535;
  border: 0;
  border-radius: 6px;
}
#farm-overview-ui .farm-map-bottom {
  background: #243a30ef;
}
#farm-overview-ui .farm-map-continue {
  border-radius: 7px;
  font-family: Lilita, sans-serif;
  font-weight: 400;
}
@media (max-width: 760px) {
  #sunny-hud .fh-actions {
    grid-template-columns: repeat(2, auto);
    gap: 7px;
  }
  #sunny-hud .fh-actions > .fh-circle:nth-child(1) {
    grid-column: 1;
    grid-row: 1;
  }
  #sunny-hud .fh-actions > .fh-circle:nth-child(2) {
    grid-column: 2;
    grid-row: 1;
  }
  #sunny-hud .fh-actions > .fh-circle:nth-child(3) {
    grid-column: 2;
    grid-row: 2;
  }
  #sunny-hud .fh-actions > .fh-circle:nth-child(4) {
    grid-column: 2;
    grid-row: 3;
  }
  #sunny-hud .fh-actions > .fh-circle:nth-child(5) {
    grid-column: 2;
    grid-row: 4;
  }
  #sunny-hud .fh-actions > .fh-circle:nth-child(-n + 2) {
    width: 50px;
    height: 50px;
  }
  #sunny-hud .fh-actions > .fh-circle:nth-child(-n + 2) .fh-icon {
    width: 43px;
    height: 43px;
  }
  #farm-overview-ui .farm-map-destinations {
    padding: 6px 12px;
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-height: 520px) {
  #sunny-hud .fh-actions {
    grid-template-columns: repeat(5, auto);
  }
  #sunny-hud .fh-actions > .fh-circle:nth-child(n) {
    grid-row: 1;
    grid-column: auto;
    width: 50px;
    height: 50px;
  }
  #sunny-hud .fh-actions > .fh-circle:nth-child(n) .fh-icon {
    width: 43px;
    height: 43px;
  }
}
@media (max-height: 520px) and (min-width: 761px) {
  #farm-overview-ui .farm-map-destinations {
    display: flex;
    position: absolute;
    left: 0;
    right: 0;
    top: 66px;
    z-index: 3;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 5px 12px;
    background: #e7bd62e8;
  }
  #farm-overview-ui .farm-map-destinations button {
    white-space: nowrap;
    font-size: 9px;
    padding: 7px 11px;
  }
}
#farm-overview-ui .farm-map-view {
  position: relative;
  z-index: 0 !important;
}
#farm-overview-ui .farm-map-destinations {
  position: relative;
  z-index: 25;
}
#farm-overview-ui .farm-map-heading,
#farm-overview-ui .farm-map-bottom {
  position: relative;
  z-index: 25;
}
@media (max-height: 520px) and (min-width: 761px) {
  #farm-overview-ui .farm-map-destinations {
    position: absolute;
    z-index: 30;
  }
  #farm-overview-ui .farm-map-heading {
    position: absolute;
    z-index: 30;
  }
  #farm-overview-ui .farm-map-bottom {
    position: absolute;
    z-index: 30;
  }
}
#sunny-dialog [data-view="camera"] .camera-preview {
  flex: 1;
  aspect-ratio: auto;
  max-height: min(160px, calc(100% - 80px));
  min-height: 0;
}
/* Keep the two time controls clear of the original action and shortcut rails. */
#sunny-hud .fh-actions {
  display: flex;
  flex-direction: row;
  gap: 10px;
}
#sunny-hud .fh-actions > .fh-circle:nth-child(n) {
  grid-column: auto;
  grid-row: auto;
  width: 82px;
  height: 82px;
}
#sunny-hud .fh-actions > .fh-circle:nth-child(n) .fh-icon {
  width: 69px;
  height: 69px;
}
.fh-time-actions {
  position: absolute;
  right: 305px;
  bottom: 22px;
  display: flex;
  gap: 10px;
  pointer-events: auto;
}
@media (max-width: 760px) {
  #sunny-hud .fh-actions {
    flex-direction: column;
  }
  #sunny-hud .fh-actions > .fh-circle:nth-child(n) {
    width: 62px;
    height: 62px;
  }
  #sunny-hud .fh-actions > .fh-circle:nth-child(n) .fh-icon {
    width: 53px;
    height: 53px;
  }
  .fh-time-actions {
    left: 12px;
    right: auto;
    bottom: 180px;
    gap: 7px;
  }
  #sunny-hud .fh-time-actions .fh-circle {
    width: 50px;
    height: 50px;
  }
  #sunny-hud .fh-time-actions .fh-icon {
    width: 43px;
    height: 43px;
  }
}
@media (max-width: 479px) and (max-height: 650px) {
  #sunny-hud .fh-shortcuts {
    left: 12px;
    right: auto;
    top: 278px;
    grid-template-columns: repeat(5, 44px);
    gap: 8px;
  }
  #sunny-hud .fh-shortcuts .fh-circle {
    width: 44px;
    height: 44px;
  }
  #sunny-hud .fh-shortcuts .fh-icon {
    width: 38px;
    height: 38px;
  }
  #sunny-hud .fh-shortcuts .fh-circle:last-child {
    grid-column: auto;
  }
  #sunny-hud .fh-actions {
    flex-direction: row;
    right: 12px;
    bottom: 82px;
    gap: 8px;
  }
  #sunny-hud .fh-actions > .fh-circle:nth-child(n) {
    width: 44px;
    height: 44px;
  }
  #sunny-hud .fh-actions > .fh-circle:nth-child(n) .fh-icon {
    width: 38px;
    height: 38px;
  }
  #sunny-hud .fh-time-actions {
    left: auto;
    right: 12px;
    bottom: 190px;
  }
  #sunny-hud .fh-time-actions .fh-circle {
    width: 44px;
    height: 44px;
  }
  #sunny-hud .fh-time-actions .fh-icon {
    width: 38px;
    height: 38px;
  }
  #sunny-hud .fh-storage {
    left: auto;
    right: 12px;
    bottom: 12px;
    transform: none;
    width: 154px;
    min-height: 57px;
  }
  #sunny-hud .fh-movement.farm-joystick {
    width: 116px;
    height: 116px;
    bottom: 12px;
  }
  #sunny-inspector.field-dock {
    top: 328px;
    width: 190px;
    max-width: 190px;
  }
  #sunny-inspector.field-dock .field-step {
    width: 44px;
    height: 44px;
  }
  .field-steps {
    gap: 5px;
    padding: 7px;
  }
  .field-summary {
    padding: 5px;
  }
  .farm-home-controls {
    left: 12px;
    bottom: 140px;
    transform: none;
  }
}
@media (max-height: 520px) and (min-width: 480px) {
  #sunny-hud .fh-topbar {
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr) 94px;
    gap: 10px;
    inset: 10px 12px auto;
    align-items: center;
  }
  #sunny-hud .fh-profile {
    width: 160px;
    min-width: 0;
    max-width: none;
    padding: 6px;
    gap: 6px;
  }
  #sunny-hud .fh-profile > img {
    width: 34px;
    height: 34px;
  }
  #sunny-hud .fh-profile strong {
    font-size: 18px;
  }
  #sunny-hud .fh-profile small {
    font-size: 9px;
    margin-top: 4px;
  }
  #sunny-hud .fh-profile #sunny-xp {
    display: none;
  }
  #sunny-hud .fh-wallet {
    order: 0;
    flex-basis: auto;
    gap: 5px;
    width: 100%;
  }
  #sunny-hud .fh-wallet button {
    height: 46px;
    min-width: 0;
    padding: 6px;
    gap: 4px;
    flex: 1;
  }
  #sunny-hud .fh-wallet strong {
    font-size: 18px;
  }
  #sunny-hud .fh-wallet .fh-icon {
    width: 22px;
    height: 22px;
  }
  #sunny-hud .fh-wallet button > span {
    font-size: 13px;
  }
  #sunny-hud .fh-top-tools {
    gap: 6px;
  }
  #sunny-hud .fh-top-tools .fh-circle {
    width: 44px;
    height: 44px;
  }
  #sunny-hud .fh-top-tools .fh-icon {
    width: 38px;
    height: 38px;
  }
  #sunny-hud .farm-clock {
    top: 82px;
    min-height: 44px;
    padding: 7px 12px;
  }
  #sunny-hud .farm-clock strong {
    font-size: 16px;
  }
  #sunny-hud .fh-farmers {
    top: 136px;
  }
  #sunny-hud .fh-farmers button {
    min-height: 34px;
    padding: 4px 7px;
    font-size: 8px;
  }
  #sunny-hud .fh-farmers img {
    width: 24px;
    height: 24px;
  }
  #sunny-hud .fh-minimap {
    top: 82px;
    right: 12px;
  }
  .fh-map-tools {
    display: none;
  }
  #sunny-hud .fh-map-open {
    width: 78px;
    height: 78px;
  }
  #sunny-hud .fh-shortcuts {
    top: 176px;
    right: 12px;
    left: auto;
    display: grid;
    grid-template-columns: repeat(5, 44px);
    gap: 8px;
  }
  #sunny-hud .fh-shortcuts .fh-circle {
    width: 44px;
    height: 44px;
  }
  #sunny-hud .fh-shortcuts .fh-icon {
    width: 38px;
    height: 38px;
  }
  #sunny-hud .fh-shortcuts .fh-circle:last-child {
    grid-column: auto;
  }
  #sunny-hud .fh-actions {
    flex-direction: row;
    right: 12px;
    bottom: 12px;
    gap: 8px;
  }
  #sunny-hud .fh-actions > .fh-circle:nth-child(n) {
    width: 50px;
    height: 50px;
  }
  #sunny-hud .fh-actions > .fh-circle:nth-child(n) .fh-icon {
    width: 43px;
    height: 43px;
  }
  #sunny-hud .fh-time-actions {
    left: auto;
    right: 196px;
    bottom: 12px;
    gap: 6px;
  }
  #sunny-hud .fh-time-actions .fh-circle {
    width: 44px;
    height: 44px;
  }
  #sunny-hud .fh-time-actions .fh-icon {
    width: 38px;
    height: 38px;
  }
  #sunny-hud .fh-storage {
    left: 145px;
    right: auto;
    bottom: 12px;
    transform: none;
    width: 150px;
    min-width: 0;
    min-height: 57px;
    padding: 8px;
    gap: 7px;
  }
  #sunny-hud .fh-storage-copy {
    min-width: 0;
  }
  #sunny-hud .fh-storage > .fh-icon {
    width: 30px;
    height: 30px;
  }
  #sunny-hud .fh-storage-copy small {
    font-size: 8px;
  }
  #sunny-hud .fh-storage-copy strong {
    font-size: 18px;
  }
  #sunny-hud .fh-movement.farm-joystick {
    width: 116px;
    height: 116px;
    bottom: 12px;
  }
  .farm-home-controls {
    left: 50%;
    bottom: 85px;
    transform: translateX(-50%);
  }
  #sunny-inspector.field-dock {
    left: 180px;
    top: 82px;
    width: 240px;
    max-width: 240px;
  }
}
#farm-map-teleport {
  position: fixed;
  z-index: 40;
  width: 60px;
  height: 60px;
  padding: 3px;
  border: 2px solid #ecc975;
  border-radius: 50%;
  background: #183c36;
  box-shadow: 0 4px 18px #0009;
  cursor: pointer;
  pointer-events: auto;
}
#farm-map-teleport img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
#farm-map-teleport:focus-visible {
  outline: 3px solid white;
  outline-offset: 3px;
}

#farm-run-mode {
  position: absolute;
  left: 198px;
  bottom: auto;
  top: 70%;
  width: 88px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 3px 8px;
  border: 1px solid #dbc58e;
  border-radius: 18px;
  background: #203d30f5;
  color: #f8e6b5;
  pointer-events: auto;
  cursor: pointer;
  font:
    600 11px "Space Grotesk",
    sans-serif;
  box-shadow: 0 3px 10px #0004;
}
#farm-run-mode.is-running {
  background: #e1bd69;
  color: #213c2d;
}
.run-mode-art {
  display: block;
  width: 22px;
  height: 28px;
  background: var(--farm-run-art) 0 0/176px 84px no-repeat;
}
#farm-run-mode:focus-visible {
  outline: 3px solid #fff1bb;
  outline-offset: 3px;
}
