:root {
  font-family: "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  color: #172119;
  background: #dff2d2;
  --soil: #7c4b2f;
  --soil-dark: #4b2c1e;
  --grass: #79bd59;
  --grass-dark: #5a9d45;
  --panel: #f9e5b8;
  --line: #6e4a2a;
  --green: #236b45;
  --gold: #f2bd41;
  --wood: #8f5a32;
  --wood-dark: #55321f;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, #7fc4e8 0 34%, #86be5d 34% 100%);
  image-rendering: pixelated;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.game-shell {
  min-height: 100vh;
}

.creator-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(320px, 520px);
  gap: 32px;
  align-items: center;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0;
}

.creator-copy h1 {
  margin: 0;
  font-size: clamp(3rem, 9vw, 7rem);
  line-height: 0.92;
  color: #173a25;
}

.creator-copy p {
  max-width: 520px;
  font-size: 1.1rem;
  line-height: 1.6;
}

.eyebrow {
  margin: 0 0 8px;
  color: #49684e;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.creator-card,
.panel,
.hud {
  border: 4px solid var(--wood-dark);
  background:
    linear-gradient(90deg, rgba(116, 70, 36, 0.1) 0 2px, transparent 2px 18px),
    var(--panel);
  box-shadow:
    inset 0 0 0 3px rgba(255, 255, 255, 0.28),
    0 8px 0 rgba(65, 42, 24, 0.22),
    0 18px 44px rgba(39, 62, 30, 0.16);
}

.creator-card {
  border-radius: 8px;
  padding: 24px;
}

.avatar-preview {
  height: 220px;
  display: grid;
  place-items: center;
  position: relative;
}

.avatar-head {
  width: 118px;
  height: 118px;
  border-radius: 50% 50% 44% 44%;
  background: #c98755;
  position: relative;
  overflow: hidden;
  box-shadow: inset -10px -12px rgba(0, 0, 0, 0.08);
}

.avatar-hair {
  position: absolute;
  left: 4px;
  right: 4px;
  top: -4px;
  height: 54px;
  border-radius: 56px 56px 28px 28px;
  background: #3b2416;
  box-shadow:
    -14px 22px 0 -6px currentColor,
    14px 22px 0 -6px currentColor,
    inset 0 -10px rgba(255, 255, 255, 0.08);
  color: #3b2416;
  z-index: 1;
}

.avatar-shirt {
  width: 170px;
  height: 96px;
  margin-top: -24px;
  border-radius: 40px 40px 8px 8px;
  background: #2f8f6a;
}

.avatar-eye {
  position: absolute;
  top: 48px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #244a7a;
  border: 3px solid #fff;
  z-index: 2;
}

.avatar-eye.left {
  left: 32px;
}

.avatar-eye.right {
  right: 32px;
}

.avatar-mouth {
  position: absolute;
  left: 50%;
  bottom: 24px;
  width: 38px;
  height: 16px;
  border-bottom: 6px solid #6d2f28;
  border-radius: 0 0 26px 26px;
  transform: translateX(-50%);
  z-index: 2;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

label {
  display: grid;
  gap: 6px;
  font-weight: 800;
}

input,
select {
  width: 100%;
  min-height: 42px;
  border: 3px solid rgba(86, 54, 29, 0.42);
  border-radius: 6px;
  padding: 8px 10px;
  background: #fffdf4;
  color: #18251d;
}

input[type="color"] {
  padding: 4px;
}

.primary-button,
.panel-actions button,
.sell-button {
  min-height: 46px;
  border-radius: 8px;
  border: 3px solid var(--wood-dark);
  background: linear-gradient(180deg, #3e8a55, #236b45);
  color: white;
  font-weight: 900;
  box-shadow: inset 0 3px rgba(255, 255, 255, 0.22), 0 4px 0 rgba(49, 31, 19, 0.28);
}

.primary-button {
  width: 100%;
  min-height: 52px;
}

.creator-actions {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.continue-button {
  min-height: 48px;
  border: 3px solid var(--wood-dark);
  border-radius: 8px;
  background: #f1c84b;
  color: #3f2a1b;
  font-weight: 900;
}

.play-screen {
  min-height: 100vh;
  padding: 14px;
  display: grid;
  grid-template-columns: 220px minmax(520px, 1fr) 260px;
  grid-template-rows: auto 1fr;
  gap: 12px;
}

.top-hud {
  grid-column: 1 / -1;
  border-radius: 8px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.top-hud h2 {
  margin: 0;
}

.stat-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.stat-row span,
.inventory span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  border: 2px solid rgba(86, 54, 29, 0.34);
  border-radius: 8px;
  padding: 6px 10px;
  background: rgba(255, 248, 216, 0.74);
}

.panel {
  border-radius: 8px;
  padding: 12px;
  align-self: stretch;
  overflow: auto;
}

.game-stage {
  min-height: calc(100vh - 112px);
  position: relative;
  overflow: hidden;
  border: 5px solid #4c7c3c;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(124, 202, 240, 0.88) 0 22%, transparent 22%),
    linear-gradient(180deg, #8ac267, #6cac4e);
  outline: none;
  box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.15);
}

.game-stage:focus-visible {
  box-shadow: 0 0 0 4px rgba(255, 224, 113, 0.7);
}

.world-map {
  width: 1900px;
  height: 980px;
  position: absolute;
  left: 0;
  top: 0;
  background:
    radial-gradient(circle at 210px 170px, rgba(255,255,255,0.62) 0 54px, transparent 56px),
    radial-gradient(circle at 790px 150px, rgba(255,255,255,0.52) 0 46px, transparent 48px),
    radial-gradient(circle at 1180px 170px, #ffe278 0 54px, transparent 56px),
    linear-gradient(90deg, rgba(79, 143, 61, 0.16) 0 2px, transparent 2px 48px),
    linear-gradient(0deg, rgba(79, 143, 61, 0.16) 0 2px, transparent 2px 48px),
    repeating-linear-gradient(35deg, rgba(255,255,255,0.05) 0 8px, transparent 8px 36px),
    linear-gradient(180deg, #86c961, #67ad4d);
  background-size: auto, auto, auto, 48px 48px, 48px 48px, auto, auto;
  transform-origin: top left;
}

.world-map.is-inside {
  width: 760px;
  height: 520px;
  background: #8f5a32;
}

.world-map.is-town {
  width: 980px;
  height: 620px;
  background:
    linear-gradient(90deg, rgba(116, 82, 42, 0.14) 0 3px, transparent 3px 64px),
    linear-gradient(0deg, rgba(116, 82, 42, 0.14) 0 3px, transparent 3px 64px),
    #79b764;
}

.world-map.is-secret {
  width: 1200px;
  height: 720px;
  background: #354034;
}

.world-map.is-island {
  width: 1450px;
  height: 820px;
  background: #58a9c8;
}

.island-ground {
  position: absolute;
  inset: 24px 28px;
  border: 10px solid rgba(244, 226, 157, 0.84);
  border-radius: 46% 40% 44% 38% / 40% 46% 36% 44%;
  background: #75b85c;
  box-shadow: 0 0 0 28px rgba(62, 148, 184, 0.82);
}

.island-moon {
  border-color: #d7dce7;
  background:
    radial-gradient(circle at 24% 22%, rgba(83, 92, 117, 0.22) 0 38px, transparent 40px),
    radial-gradient(circle at 72% 58%, rgba(83, 92, 117, 0.18) 0 55px, transparent 57px),
    #aeb8c8;
}

.island-ginger {
  border-color: #ecc175;
  background: linear-gradient(145deg, #7fba58 0 60%, #8b593b 61% 100%);
}

.island-night {
  border-color: #7770a0;
  background:
    radial-gradient(circle at 78% 22%, rgba(221, 224, 255, 0.78) 0 38px, transparent 40px),
    #3f4960;
}

.island-mines {
  border-color: #8a8f8b;
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,0.06) 0 8px, transparent 9px 42px),
    #687066;
}

.island-last {
  border-color: #f1d272;
  background:
    radial-gradient(circle at 50% 42%, rgba(255,244,177,0.38) 0 100px, transparent 102px),
    #6f9d75;
}

.island-name,
.island-farm-label,
.island-town-label {
  position: absolute;
  z-index: 5;
  border: 3px solid rgba(54, 44, 31, 0.32);
  border-radius: 8px;
  padding: 8px 12px;
  background: rgba(255, 250, 220, 0.88);
  color: #3f2a1b;
  font-weight: 900;
}

.island-name {
  left: 44px;
  top: 38px;
  display: grid;
}

.island-farm-label { left: 270px; top: 95px; }
.island-town-label { right: 130px; top: 100px; }

.island-shop,
.island-well,
.island-pier {
  position: absolute;
  z-index: 7;
  border: 5px solid #4d2b1d;
  border-radius: 8px;
  color: #3f2a1b;
  font-weight: 900;
  box-shadow: 0 8px 0 rgba(57, 39, 24, 0.24);
}

.island-shop {
  left: 1110px;
  top: 220px;
  width: 170px;
  min-height: 135px;
  background: #e8a95a;
}

.island-well {
  left: 1005px;
  top: 475px;
  width: 100px;
  min-height: 86px;
  border-radius: 50%;
  background: #75b9d2;
}

.island-pier {
  left: 38px;
  top: 650px;
  width: 155px;
  min-height: 92px;
  background: #d8b56f;
}

.island-landmark {
  position: absolute;
  z-index: 2;
  right: 260px;
  bottom: 100px;
  width: 180px;
  height: 170px;
  border-radius: 50% 50% 16px 16px;
  background: rgba(56, 75, 61, 0.3);
}

.landmark-ginger {
  background:
    radial-gradient(ellipse at 50% 18%, #ffb04e 0 22px, #cf452d 23px 42px, transparent 43px),
    linear-gradient(75deg, transparent 0 18%, #654536 19% 81%, transparent 82%);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.landmark-moon { border: 10px solid rgba(77, 85, 105, 0.35); background: rgba(82, 92, 116, 0.2); }
.landmark-night { background: #27263f; box-shadow: 0 0 32px rgba(133, 117, 209, 0.45); }
.landmark-mines { background: #414743; clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.landmark-last { background: #d9c45e; clip-path: polygon(50% 0, 100% 100%, 0 100%); }

.island-plot {
  border-color: #5a3822;
}

.secret-area-ground {
  position: absolute;
  inset: 0;
}

.secret-mine {
  background:
    radial-gradient(circle at 28% 30%, rgba(180, 190, 182, 0.16) 0 70px, transparent 72px),
    repeating-linear-gradient(135deg, rgba(255,255,255,0.04) 0 6px, transparent 7px 40px),
    #4a4d49;
}

.secret-forest {
  background:
    radial-gradient(circle at 18% 20%, #345d36 0 100px, transparent 102px),
    radial-gradient(circle at 78% 30%, #284c30 0 150px, transparent 152px),
    #4f7641;
}

.secret-crystal {
  background:
    radial-gradient(circle at 30% 34%, rgba(163, 124, 227, 0.4) 0 80px, transparent 82px),
    radial-gradient(circle at 78% 62%, rgba(91, 174, 211, 0.3) 0 110px, transparent 112px),
    #28243b;
}

.secret-swamp {
  background:
    radial-gradient(ellipse at 28% 65%, #52766d 0 120px, transparent 122px),
    radial-gradient(ellipse at 72% 35%, #476b62 0 150px, transparent 152px),
    #647952;
}

.secret-area-title {
  position: absolute;
  left: 30px;
  top: 26px;
  z-index: 4;
  display: grid;
  gap: 2px;
  padding: 10px 14px;
  border: 3px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  background: rgba(25, 31, 28, 0.82);
  color: white;
}

.secret-area-exit {
  position: absolute;
  left: 34px;
  top: 580px;
  z-index: 5;
  width: 150px;
  min-height: 64px;
  border: 4px solid #4d2b1d;
  border-radius: 8px;
  background: #e0bd6b;
  color: #3f2a1b;
  font-weight: 900;
}

.secret-gate {
  position: absolute;
  width: 210px;
  min-height: 92px;
  z-index: 4;
  display: grid;
  place-content: center;
  gap: 4px;
  border: 5px solid #4d2b1d;
  border-radius: 8px 8px 2px 2px;
  background: #5c625d;
  color: white;
  font-weight: 900;
  box-shadow: 0 8px 0 rgba(59, 38, 24, 0.3);
}

.gate-forest { background: #3e7144; }
.gate-crystal { background: #554681; }
.gate-swamp { background: #55736a; }

.secret-forage {
  position: absolute;
  width: 100px;
  min-height: 78px;
  margin-left: -50px;
  margin-top: -39px;
  border: 4px solid #315b36;
  border-radius: 50% 50% 12px 12px;
  background: #83b866;
  color: #243c28;
  font-weight: 900;
  box-shadow: 0 8px 0 rgba(35, 68, 38, 0.24);
}

.secret-forage small,
.secret-node small {
  display: block;
}

.area-panel-copy {
  display: grid;
  gap: 5px;
  padding: 10px;
  border: 2px solid rgba(86, 54, 29, 0.3);
  border-radius: 8px;
  background: rgba(255, 248, 216, 0.7);
}

.secret-area-button {
  border-color: #66559a;
  background: #eee9ff;
}

.meadow-zone {
  position: absolute;
  left: 1380px;
  top: 90px;
  width: 470px;
  height: 810px;
  display: grid;
  align-items: start;
  justify-items: center;
  padding-top: 18px;
  border: 5px solid rgba(73, 122, 57, 0.34);
  border-radius: 16px;
  color: rgba(49, 84, 39, 0.72);
  font-weight: 900;
  background:
    radial-gradient(circle at 22% 20%, rgba(255, 236, 142, 0.36) 0 20px, transparent 21px),
    radial-gradient(circle at 78% 70%, rgba(255, 236, 142, 0.32) 0 24px, transparent 25px),
    linear-gradient(90deg, rgba(91, 155, 72, 0.16) 0 2px, transparent 2px 40px),
    linear-gradient(0deg, rgba(91, 155, 72, 0.16) 0 2px, transparent 2px 40px),
    #94c96a;
  background-size: auto, auto, 40px 40px, 40px 40px, auto;
  box-shadow: inset 0 0 0 5px rgba(255, 255, 255, 0.12);
  pointer-events: none;
}

.town-road {
  position: absolute;
  left: 22px;
  top: 378px;
  width: 170px;
  height: 110px;
  display: grid;
  place-items: center;
  border: 5px solid rgba(116, 82, 42, 0.35);
  border-radius: 999px;
  background: #d8b56f;
  color: #5b3522;
  font-weight: 900;
  box-shadow: inset 0 0 0 4px rgba(255, 237, 165, 0.18);
  z-index: 6;
}

.path {
  position: absolute;
  background:
    linear-gradient(90deg, rgba(125, 89, 45, 0.14) 0 4px, transparent 4px 30px),
    #d8b56f;
  border: 4px solid rgba(116, 82, 42, 0.26);
  box-shadow: inset 0 0 0 4px rgba(255, 237, 165, 0.18);
}

.main-path {
  left: 170px;
  top: 690px;
  width: 1160px;
  height: 86px;
  border-radius: 999px;
}

.meadow-path {
  left: 1255px;
  top: 430px;
  width: 280px;
  height: 70px;
  border-radius: 999px;
  transform: rotate(-12deg);
}

.pond {
  position: absolute;
  left: 80px;
  top: 150px;
  width: 260px;
  height: 160px;
  border-radius: 48% 52% 56% 44%;
  background:
    radial-gradient(circle at 35% 28%, rgba(255,255,255,0.78) 0 18px, transparent 19px),
    #5fb4d8;
  border: 8px solid rgba(51, 118, 76, 0.22);
}

.well,
.shop,
.barn,
.farmhouse {
  position: absolute;
  display: grid;
  place-items: center;
  min-width: 136px;
  min-height: 96px;
  border: 5px solid #5b3522;
  border-radius: 4px;
  color: white;
  font-weight: 900;
  text-shadow: 0 2px 0 rgba(0,0,0,0.18);
  box-shadow: 0 9px 0 rgba(65, 40, 24, 0.25), 0 14px 22px rgba(32, 61, 25, 0.18);
}

.well {
  left: 118px;
  top: 670px;
  border-radius: 50%;
  background: radial-gradient(circle, #74c1dd 0 38%, #7e593d 39% 100%);
}

.farmhouse {
  left: 195px;
  top: 390px;
  width: 170px;
  height: 128px;
  background:
    linear-gradient(90deg, transparent 0 43%, #5b3522 44% 56%, transparent 57%),
    linear-gradient(0deg, #6c3d25 0 18%, transparent 19%),
    #d79655;
}

.farmhouse::before {
  content: "";
  position: absolute;
  top: -54px;
  left: 8px;
  right: 8px;
  height: 70px;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.14) 0 5px, transparent 5px 24px),
    #8f342b;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.farmhouse::after {
  content: "";
  position: absolute;
  right: 22px;
  top: 32px;
  width: 34px;
  height: 28px;
  border: 4px solid #5b3522;
  background: #7fc4e8;
}

.shop {
  left: 1210px;
  top: 190px;
  background:
    linear-gradient(90deg, transparent 0 43%, #5b3522 44% 56%, transparent 57%),
    linear-gradient(0deg, #f5df8d 0 22%, transparent 23%),
    linear-gradient(135deg, transparent 0 48%, rgba(255,255,255,0.32) 49% 52%, transparent 53%),
    #b65737;
}

.barn {
  left: 1080px;
  top: 720px;
  width: 210px;
  height: 140px;
  background:
    linear-gradient(90deg, transparent 0 46%, #5b3522 47% 53%, transparent 54%),
    linear-gradient(0deg, #5b3522 0 14%, transparent 15%),
    #9b3b2f;
}

.barn::before,
.shop::before {
  content: "";
  position: absolute;
  top: -42px;
  left: 12px;
  right: 12px;
  height: 58px;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.12) 0 4px, transparent 4px 22px),
    #6f2a27;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.room-floor {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(87, 50, 29, 0.35) 0 3px, transparent 3px 80px),
    linear-gradient(0deg, rgba(87, 50, 29, 0.35) 0 3px, transparent 3px 80px),
    #b97843;
  border: 10px solid #4e2d1d;
  box-shadow: inset 0 0 0 8px rgba(255, 229, 166, 0.12);
}

.room-bed,
.room-door {
  position: absolute;
  border: 5px solid #4e2d1d;
  border-radius: 6px;
  color: transparent;
  box-shadow: 0 7px 0 rgba(54, 31, 19, 0.24);
}

.room-bed {
  left: 70px;
  top: 90px;
  width: 190px;
  height: 122px;
  background:
    linear-gradient(90deg, #fff2c4 0 32%, transparent 33%),
    linear-gradient(0deg, #cc5d50 0 58%, #f4d38a 59%);
}

.room-bed::after {
  content: "";
  position: absolute;
  left: 14px;
  top: 14px;
  width: 58px;
  height: 38px;
  border-radius: 6px;
  background: #fff7dc;
}

.room-door {
  left: 330px;
  top: 408px;
  width: 104px;
  height: 76px;
  background: #6d4128;
}

.room-door::after {
  content: "";
  position: absolute;
  right: 18px;
  top: 31px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #f0c75e;
}

.room-rug {
  position: absolute;
  left: 295px;
  top: 220px;
  width: 170px;
  height: 110px;
  border: 5px solid #6d2f34;
  border-radius: 12px;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.16) 0 8px, transparent 8px 28px),
    #b94c58;
}

.room-table {
  position: absolute;
  right: 95px;
  top: 170px;
  width: 110px;
  height: 82px;
  border: 5px solid #4e2d1d;
  border-radius: 8px;
  background: #8a552f;
}

.room-window {
  position: absolute;
  right: 110px;
  top: 58px;
  width: 90px;
  height: 62px;
  border: 6px solid #4e2d1d;
  background:
    linear-gradient(90deg, transparent 0 44%, #4e2d1d 45% 55%, transparent 56%),
    linear-gradient(0deg, transparent 0 44%, #4e2d1d 45% 55%, transparent 56%),
    #7fc4e8;
}

.town-ground {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(79, 143, 61, 0.14) 0 2px, transparent 2px 52px),
    linear-gradient(0deg, rgba(79, 143, 61, 0.14) 0 2px, transparent 2px 52px),
    radial-gradient(circle at 48% 62%, #d8b56f 0 86px, transparent 88px),
    #82bd66;
}

.town-shop,
.town-house,
.town-exit,
.town-furnace {
  position: absolute;
  display: grid;
  place-items: center;
  border: 5px solid #5b3522;
  border-radius: 4px;
  color: white;
  font-weight: 900;
  text-shadow: 0 2px 0 rgba(0,0,0,0.18);
  box-shadow: 0 8px 0 rgba(65, 40, 24, 0.25), 0 14px 22px rgba(32, 61, 25, 0.18);
}

.town-shop {
  width: 180px;
  height: 122px;
}

.town-shop::before,
.town-house::before {
  content: "";
  position: absolute;
  top: -48px;
  left: 8px;
  right: 8px;
  height: 62px;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.12) 0 4px, transparent 4px 22px),
    #7d3631;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.fertilizer-shop {
  left: 125px;
  top: 170px;
  background: #579b4a;
}

.animal-shop {
  left: 410px;
  top: 170px;
  background: #c07a4c;
}

.blacksmith-shop {
  left: 675px;
  top: 180px;
  background:
    linear-gradient(0deg, #4b4b4b 0 22%, transparent 23%),
    #6f6d65;
}

.greengrocer-shop {
  left: 70px;
  top: 430px;
  width: 150px;
  height: 100px;
  background:
    radial-gradient(circle at 28% 34%, #f1d24f 0 12px, transparent 13px),
    radial-gradient(circle at 64% 50%, #d84a36 0 13px, transparent 14px),
    #4f9b45;
}

.florist-shop {
  left: 260px;
  top: 430px;
  width: 150px;
  height: 100px;
  background:
    radial-gradient(circle at 32% 38%, #ffd7ef 0 12px, transparent 13px),
    radial-gradient(circle at 64% 42%, #d16ce0 0 12px, transparent 13px),
    #7e66b8;
}

.cafe-shop {
  left: 455px;
  top: 432px;
  width: 150px;
  height: 100px;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.22) 0 16px, transparent 17px 34px),
    #b86f42;
}

.carpenter-shop {
  left: 830px;
  top: 120px;
  width: 140px;
  height: 112px;
  background:
    linear-gradient(90deg, rgba(75, 45, 23, 0.24) 0 12px, transparent 13px 28px),
    #9b6a3f;
}

.town-exit {
  left: 840px;
  top: 386px;
  width: 112px;
  height: 92px;
  border-radius: 999px;
  background: #d8b56f;
  color: #5b3522;
  text-shadow: none;
}

.town-furnace {
  left: 690px;
  top: 380px;
  width: 96px;
  height: 96px;
  border-radius: 18px 18px 8px 8px;
  background:
    radial-gradient(circle at 50% 68%, #ffb347 0 18px, #a73426 19px 32px, transparent 33px),
    #4d4d4d;
}

.town-fisherman {
  position: absolute;
  left: 600px;
  top: 505px;
  z-index: 9;
  width: 120px;
  min-height: 82px;
  border: 5px solid #3d4c54;
  border-radius: 50% 50% 12px 12px;
  background:
    linear-gradient(180deg, #e8f4f5 0 38%, #3c87a6 39% 100%);
  color: #183b49;
  font-weight: 900;
  box-shadow: 0 10px 0 rgba(42, 67, 77, 0.28);
}

.town-fisherman::after {
  content: "";
  position: absolute;
  left: -42px;
  right: -42px;
  bottom: -22px;
  height: 18px;
  border-radius: 50%;
  background: rgba(63, 143, 174, 0.58);
  z-index: -1;
}

.town-house {
  width: 132px;
  height: 100px;
  background: #d79655;
}

.house-a {
  left: 24px;
  top: 52px;
}

.house-b {
  left: 300px;
  top: 62px;
}

.house-c {
  left: 548px;
  top: 58px;
}

.npc {
  position: absolute;
  width: 42px;
  height: 70px;
  z-index: 8;
  color: #2e2118;
  font-size: 0.72rem;
  font-weight: 900;
  text-align: center;
  text-shadow: 0 1px rgba(255,255,255,0.5);
}

.npc.mirek {
  left: 158px;
  top: 542px;
}

.npc.ema {
  left: 354px;
  top: 542px;
}

.npc::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 0;
  width: 28px;
  height: 28px;
  border-radius: 50% 50% 44% 44%;
  border: 3px solid #4e2d1d;
  background: #c98755;
  box-shadow: inset 0 8px #1f1a16;
}

.npc::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 27px;
  width: 32px;
  height: 34px;
  border: 3px solid #4e2d1d;
  border-radius: 10px 10px 4px 4px;
}

.npc span {
  position: absolute;
  left: -20px;
  right: -20px;
  top: 64px;
}

.alex {
  left: 194px;
  top: 310px;
}

.alex::before {
  background:
    radial-gradient(circle at 36% 55%, #276b46 0 3px, transparent 4px),
    radial-gradient(circle at 64% 55%, #276b46 0 3px, transparent 4px),
    #c98755;
  box-shadow: inset 0 9px #191817;
}

.alex::after {
  background: #3e76c4;
}

.karolina {
  left: 482px;
  top: 310px;
}

.karolina::before {
  box-shadow: inset 0 10px #7b4b2d;
}

.karolina::after {
  background: #d46a8c;
}

.smith {
  left: 742px;
  top: 315px;
}

.smith::before {
  box-shadow: inset 0 8px #4b4b4b;
}

.smith::after {
  background: #444;
}

.orchard-tree {
  position: absolute;
  width: 110px;
  height: 110px;
  margin-left: -55px;
  margin-top: -78px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 34% 30%, #9ad66b 0 18px, transparent 19px),
    radial-gradient(circle at 62% 44%, #6fb64e 0 30px, transparent 31px),
    #4b8d3e;
  border: 4px solid #326a31;
  box-shadow: 0 16px 0 -4px #6b3d25;
  color: transparent;
  overflow: visible;
}

.orchard-tree::before {
  content: "";
  position: absolute;
  left: 42px;
  bottom: -24px;
  width: 26px;
  height: 42px;
  border: 4px solid #4d2b1d;
  background: #8f5a32;
}

.orchard-tree.is-near {
  outline: 5px solid rgba(255, 225, 95, 0.84);
  outline-offset: 4px;
}

.tree-stage-0 {
  width: 44px;
  height: 36px;
  margin-left: -22px;
  margin-top: -18px;
  border-radius: 8px;
  background: #8f5a32;
  box-shadow: none;
}

.tree-stage-0::before {
  display: none;
}

.tree-stage-1 {
  width: 56px;
  height: 62px;
  margin-left: -28px;
  margin-top: -54px;
}

.tree-stage-2 {
  width: 82px;
  height: 86px;
  margin-left: -41px;
  margin-top: -70px;
}

.tree-one {
  left: 360px;
  top: 120px;
}

.tree-two {
  left: 520px;
  top: 130px;
}

.tree-three {
  left: 690px;
  top: 115px;
}

.rock {
  position: absolute;
  width: 74px;
  height: 58px;
  margin-left: -37px;
  margin-top: -29px;
  border: 4px solid #414442;
  border-radius: 16px 14px 12px 18px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.28) 0 24%, transparent 25%),
    #858c86;
  color: transparent;
  box-shadow: 0 7px 0 rgba(42, 43, 39, 0.25);
}

.rock small {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: -24px;
  min-height: 18px;
  border-radius: 999px;
  background: rgba(255, 248, 216, 0.85);
  color: #3d3128;
  font-size: 0.7rem;
  font-weight: 900;
}

.rock.is-near {
  outline: 5px solid rgba(255, 225, 95, 0.84);
  outline-offset: 4px;
}

.rock-hardStone {
  width: 84px;
  height: 64px;
  background: linear-gradient(135deg, rgba(255,255,255,0.18) 0 22%, transparent 23%), #686d68;
}

.rock-copper {
  background: linear-gradient(135deg, rgba(255,255,255,0.22) 0 22%, transparent 23%), #b56a3f;
}

.rock-iron {
  background: linear-gradient(135deg, rgba(255,255,255,0.26) 0 22%, transparent 23%), #78828a;
}

.rock-gold {
  background: linear-gradient(135deg, rgba(255,255,255,0.34) 0 22%, transparent 23%), #d9ab32;
}

.rock-voidOre {
  width: 92px;
  height: 70px;
  border-color: #231933;
  background:
    radial-gradient(circle at 62% 40%, rgba(143, 93, 213, 0.85) 0 12px, transparent 13px),
    linear-gradient(135deg, rgba(255,255,255,0.18) 0 20%, transparent 21%),
    #2d2244;
}

.farm-plot {
  position: absolute;
  width: 108px;
  height: 92px;
  margin-left: -54px;
  margin-top: -46px;
  border: 5px solid #4d2b1d;
  border-radius: 4px;
  background:
    linear-gradient(180deg, rgba(55, 34, 22, calc((100 - var(--moisture)) * 0.003)), rgba(55, 34, 22, calc((100 - var(--moisture)) * 0.001))),
    repeating-linear-gradient(8deg, rgba(255,255,255,0.08) 0 6px, transparent 6px 20px),
    linear-gradient(135deg, #a06a42, #5f3826);
  box-shadow: 0 7px 0 rgba(42, 27, 17, 0.24);
}

.farm-plot::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 6px;
  background:
    radial-gradient(circle at 22% 42%, rgba(116, 190, 216, calc(var(--moisture) * 0.006)) 0 9px, transparent 10px),
    radial-gradient(circle at 76% 34%, rgba(116, 190, 216, calc(var(--moisture) * 0.004)) 0 7px, transparent 8px),
    repeating-linear-gradient(0deg, transparent 0 12px, rgba(40, 23, 13, 0.18) 13px 16px);
  pointer-events: none;
}

.farm-plot.is-near {
  outline: 5px solid rgba(255, 225, 95, 0.84);
  outline-offset: 3px;
}

.farm-plot.is-harvestable {
  animation: readyPulse 900ms ease-in-out infinite alternate;
}

@keyframes readyPulse {
  from {
    filter: brightness(1);
  }

  to {
    filter: brightness(1.22);
  }
}

.crop {
  position: absolute;
  left: 50%;
  bottom: 28px;
  width: var(--crop-size);
  height: var(--crop-size);
  transform: translateX(-50%);
  z-index: 1;
}

.crop-stem {
  position: absolute;
  left: 50%;
  bottom: 8px;
  width: 8px;
  height: calc(var(--crop-size) * 0.74);
  border-radius: 999px;
  background: #236b3d;
  transform: translateX(-50%);
}

.crop-leaf {
  position: absolute;
  bottom: 24px;
  width: 26px;
  height: 18px;
  border-radius: 50% 0 50% 0;
  background: #2f9157;
}

.crop-leaf.one {
  left: 6px;
  transform: rotate(-22deg);
}

.crop-leaf.two {
  right: 6px;
  transform: scaleX(-1) rotate(-22deg);
}

.crop-leaf.three {
  left: 50%;
  bottom: 35px;
  width: 22px;
  transform: translateX(-50%) rotate(45deg);
}

.crop-fruit {
  position: absolute;
  left: 50%;
  top: 5px;
  width: var(--fruit-size);
  height: var(--fruit-size);
  border-radius: 50%;
  background: var(--crop-color);
  transform: translateX(-50%);
  box-shadow: inset -5px -6px rgba(0, 0, 0, 0.14);
}

.crop-detail {
  position: absolute;
  display: none;
}

.crop-carrot .crop-fruit {
  top: 22px;
  width: calc(var(--fruit-size) * 0.75);
  height: calc(var(--fruit-size) * 1.45);
  border-radius: 50% 50% 70% 70%;
  clip-path: polygon(50% 100%, 8% 10%, 92% 10%);
}

.crop-strawberry .crop-fruit {
  border-radius: 55% 55% 62% 62%;
  clip-path: polygon(50% 100%, 8% 30%, 24% 6%, 76% 6%, 92% 30%);
}

.crop-strawberry .crop-detail {
  display: block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #ffe8a3;
  top: 17px;
}

.crop-strawberry .crop-detail.one {
  left: 42%;
}

.crop-strawberry .crop-detail.two {
  left: 57%;
  top: 26px;
}

.crop-pumpkin .crop-fruit {
  width: calc(var(--fruit-size) * 1.55);
  height: calc(var(--fruit-size) * 1.1);
  border-radius: 48%;
  background:
    linear-gradient(90deg, transparent 0 18%, rgba(121, 64, 21, 0.18) 19% 22%, transparent 23% 46%, rgba(121, 64, 21, 0.18) 47% 51%, transparent 52% 76%, rgba(121, 64, 21, 0.18) 77% 80%, transparent 81%),
    var(--crop-color);
}

.crop-blueberry .crop-fruit {
  box-shadow:
    -12px 8px 0 -4px #34479f,
    12px 8px 0 -4px #34479f,
    inset -5px -6px rgba(0, 0, 0, 0.14);
}

.crop-sunflower .crop-fruit {
  background:
    radial-gradient(circle, #6d4524 0 38%, transparent 39%),
    repeating-conic-gradient(#f7d55b 0 16deg, #d99b2d 17deg 28deg);
  border-radius: 50%;
}

.crop-tulip .crop-fruit {
  top: 8px;
  width: calc(var(--fruit-size) * 1.15);
  height: calc(var(--fruit-size) * 1.1);
  border-radius: 12px 12px 50% 50%;
  clip-path: polygon(0 30%, 24% 0, 50% 28%, 76% 0, 100% 30%, 78% 100%, 22% 100%);
}

.crop-rose .crop-fruit {
  background:
    radial-gradient(circle at 38% 42%, #f07b92 0 18%, transparent 19%),
    radial-gradient(circle at 62% 42%, #a82549 0 22%, transparent 23%),
    radial-gradient(circle at 50% 62%, var(--crop-color) 0 46%, transparent 47%);
  border-radius: 50%;
}

.crop-lavender .crop-stem {
  width: 6px;
}

.crop-lavender .crop-fruit {
  width: calc(var(--fruit-size) * 0.55);
  height: calc(var(--fruit-size) * 1.9);
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 15%, #b4a5ff 0 5px, transparent 6px),
    radial-gradient(circle at 50% 36%, #8c7ce5 0 6px, transparent 7px),
    radial-gradient(circle at 50% 58%, #6f61c8 0 6px, transparent 7px),
    radial-gradient(circle at 50% 78%, #5949a8 0 5px, transparent 6px);
}

.crop-potato .crop-fruit,
.crop-onion .crop-fruit {
  top: 20px;
  width: calc(var(--fruit-size) * 1.15);
  height: calc(var(--fruit-size) * 0.9);
  border-radius: 46% 46% 54% 54%;
}

.crop-onion .crop-fruit {
  background:
    linear-gradient(90deg, transparent 0 44%, rgba(130, 97, 50, 0.18) 45% 55%, transparent 56%),
    var(--crop-color);
}

.crop-tomato .crop-fruit {
  box-shadow:
    -11px 8px 0 -5px #b92f25,
    11px 8px 0 -5px #b92f25,
    inset -5px -6px rgba(0, 0, 0, 0.14);
}

.crop-corn .crop-fruit {
  width: calc(var(--fruit-size) * 0.75);
  height: calc(var(--fruit-size) * 1.7);
  border-radius: 999px;
  background:
    repeating-linear-gradient(0deg, rgba(123, 91, 22, 0.18) 0 4px, transparent 5px 10px),
    var(--crop-color);
}

.crop-cucumber .crop-fruit {
  width: calc(var(--fruit-size) * 1.7);
  height: calc(var(--fruit-size) * 0.72);
  border-radius: 999px;
}

.crop-melon .crop-fruit {
  width: calc(var(--fruit-size) * 1.65);
  height: calc(var(--fruit-size) * 1.25);
  border-radius: 50%;
  background:
    repeating-linear-gradient(90deg, rgba(26, 92, 45, 0.4) 0 8px, transparent 9px 18px),
    var(--crop-color);
}

.crop-poppy .crop-fruit,
.crop-lily .crop-fruit,
.crop-orchid .crop-fruit,
.crop-daisy .crop-fruit,
.crop-violet .crop-fruit,
.crop-marigold .crop-fruit,
.crop-peony .crop-fruit,
.crop-lotus .crop-fruit,
.crop-nightbloom .crop-fruit {
  background:
    radial-gradient(circle at 35% 35%, var(--crop-color) 0 26%, transparent 27%),
    radial-gradient(circle at 65% 35%, var(--crop-color) 0 26%, transparent 27%),
    radial-gradient(circle at 50% 65%, var(--crop-color) 0 30%, transparent 31%),
    radial-gradient(circle at 50% 50%, #f2c94c 0 14%, transparent 15%);
  box-shadow: none;
}

.crop-lily .crop-fruit {
  filter: drop-shadow(0 0 2px rgba(80, 62, 35, 0.24));
}

.crop-orchid .crop-fruit {
  transform: translateX(-50%) rotate(12deg);
}

.crop-daisy .crop-fruit {
  background:
    radial-gradient(circle at 50% 50%, #e4b63e 0 14%, transparent 15%),
    repeating-conic-gradient(#fff9df 0 18deg, transparent 19deg 36deg);
  box-shadow: none;
}

.crop-violet .crop-fruit {
  transform: translateX(-50%) rotate(-10deg);
}

.crop-marigold .crop-fruit {
  background:
    radial-gradient(circle at 50% 50%, #8c4f16 0 16%, transparent 17%),
    repeating-conic-gradient(#f7b23d 0 15deg, #d77b22 16deg 29deg);
  box-shadow: none;
}

.crop-peony .crop-fruit {
  width: calc(var(--fruit-size) * 1.28);
  height: calc(var(--fruit-size) * 1.28);
  background:
    radial-gradient(circle at 38% 42%, #ffd0dd 0 20%, transparent 21%),
    radial-gradient(circle at 62% 44%, #d85d89 0 25%, transparent 26%),
    radial-gradient(circle at 50% 62%, var(--crop-color) 0 44%, transparent 45%);
}

.crop-lotus .crop-fruit {
  top: 10px;
  width: calc(var(--fruit-size) * 1.35);
  height: calc(var(--fruit-size) * 0.98);
  clip-path: polygon(50% 0, 64% 35%, 100% 24%, 76% 60%, 88% 100%, 50% 76%, 12% 100%, 24% 60%, 0 24%, 36% 35%);
}

.crop-nightbloom .crop-fruit {
  background:
    radial-gradient(circle at 50% 50%, #d9d0ff 0 13%, transparent 14%),
    repeating-conic-gradient(#4d3e91 0 20deg, #211b4f 21deg 40deg);
  box-shadow: 0 0 12px rgba(129, 104, 224, 0.55);
}

.plot-progress {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 6px;
  min-height: 20px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #3f2a1b;
  font-size: 0.75rem;
  font-weight: 900;
  z-index: 2;
}

.soil-meter {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 8px;
  min-height: 20px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.66);
  color: #3f2a1b;
  font-size: 0.75rem;
  font-weight: 900;
}

.player {
  position: absolute;
  width: 64px;
  height: 94px;
  transform: translate(-50%, -78%);
  z-index: 10;
  pointer-events: none;
  filter: drop-shadow(0 9px 5px rgba(0,0,0,0.22));
}

.player.is-acting {
  animation: player-bob 260ms ease-out;
}

.player.is-left {
  transform: translate(-50%, -78%) scaleX(-1);
}

.player-head {
  width: 42px;
  height: 42px;
  margin: 0 auto;
  border-radius: 50% 50% 44% 44%;
  background: #c98755;
  position: relative;
  overflow: hidden;
}

.player-hair {
  position: absolute;
  left: 2px;
  right: 2px;
  top: -2px;
  height: 20px;
  border-radius: 22px 22px 12px 12px;
  background: #3b2416;
  z-index: 1;
}

.player-head::before,
.player-head::after {
  content: "";
  position: absolute;
  top: 18px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--eye-color);
  border: 2px solid white;
  z-index: 2;
}

.player-head::before {
  left: 10px;
}

.player-head::after {
  right: 10px;
}

.player-mouth {
  position: absolute;
  left: 50%;
  bottom: 7px;
  width: 15px;
  height: 7px;
  border-bottom: 3px solid #6d2f28;
  border-radius: 0 0 12px 12px;
  transform: translateX(-50%);
  z-index: 2;
}

.player-shirt {
  width: 58px;
  height: 48px;
  margin: -4px auto 0;
  border-radius: 18px 18px 8px 8px;
  background: #2f8f6a;
}

.action-pop {
  position: absolute;
  z-index: 35;
  min-width: 54px;
  padding: 6px 9px;
  border: 2px solid rgba(63, 42, 27, 0.2);
  border-radius: 999px;
  background: rgba(255, 248, 217, 0.94);
  color: #3f2a1b;
  font-size: 0.74rem;
  font-weight: 900;
  text-align: center;
  pointer-events: none;
  transform: translate(-50%, -118%);
  animation: action-pop 900ms ease-out forwards;
}

.action-water {
  background: rgba(204, 238, 255, 0.96);
  color: #16516b;
}

.action-mine,
.action-chop,
.action-break {
  background: rgba(229, 218, 199, 0.96);
}

.action-sell,
.action-buy {
  background: rgba(255, 235, 145, 0.96);
}

.action-sleep {
  background: rgba(48, 44, 75, 0.94);
  color: white;
}

.sleep-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  background: rgba(18, 24, 44, 0);
  color: #fff5ce;
  font-size: clamp(2rem, 6vw, 5rem);
  font-weight: 900;
  opacity: 0;
  pointer-events: none;
  transition: opacity 280ms ease, background 600ms ease;
}

.sleep-overlay span {
  transform: translateY(18px) scale(0.96);
  opacity: 0;
  transition: transform 420ms ease, opacity 420ms ease;
}

.sleep-overlay.is-active {
  background: rgba(18, 24, 44, 0.86);
  opacity: 1;
}

.sleep-overlay.is-active span {
  transform: translateY(0) scale(1);
  opacity: 1;
}

@keyframes player-bob {
  0% { margin-top: 0; }
  45% { margin-top: -10px; }
  100% { margin-top: 0; }
}

@keyframes action-pop {
  0% {
    opacity: 0;
    transform: translate(-50%, -78%) scale(0.86);
  }
  18% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -175%) scale(1.05);
  }
}

.seed-list,
.shop-list,
.inventory,
.panel-actions {
  display: grid;
  gap: 8px;
}

.seed-button,
.shop-button {
  min-height: 58px;
  border: 3px solid rgba(86, 54, 29, 0.24);
  border-radius: 6px;
  padding: 9px;
  text-align: left;
  background:
    linear-gradient(90deg, rgba(116, 70, 36, 0.08) 0 2px, transparent 2px 18px),
    #fff4c9;
  box-shadow: 0 3px 0 rgba(86, 54, 29, 0.16);
}

.seed-button.is-selected {
  border-color: #2d734a;
  background: #dff0b5;
}

.shop-button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.seed-button strong,
.shop-button strong,
.seed-button small,
.shop-button small {
  display: block;
}

.seed-button small,
.shop-button small {
  color: #52624d;
  line-height: 1.35;
}

.panel-actions {
  margin-top: 12px;
  grid-template-columns: 1fr 1fr;
}

.mobile-pad {
  display: none;
  grid-template-columns: repeat(3, 44px);
  grid-template-rows: repeat(2, 44px);
  gap: 6px;
  justify-content: center;
  margin-top: 12px;
}

.mobile-pad button {
  border-radius: 8px;
  background: #e6dba9;
  color: #26341e;
  font-weight: 900;
}

.mobile-pad button:first-child {
  grid-column: 2;
}

.inventory-title {
  margin-top: 16px;
}

.sell-button {
  width: 100%;
  margin-top: 10px;
  background: #7d5731;
}

.message {
  min-height: 96px;
  margin: 14px 0 0;
  padding: 12px;
  border-radius: 8px;
  background: rgba(35, 107, 69, 0.12);
  line-height: 1.45;
  font-weight: 850;
}

.seed-picker {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(17, 28, 20, 0.38);
}

.seed-picker-box {
  width: min(460px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--panel);
  box-shadow: 0 24px 60px rgba(28, 43, 25, 0.32);
}

.picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.picker-head button {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: #7d5731;
  color: #fff;
  font-size: 1.4rem;
  font-weight: 900;
}

.picker-grid {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.picker-seed {
  min-height: 72px;
  border: 2px solid transparent;
  border-radius: 8px;
  padding: 10px;
  text-align: left;
  background: #fffdf4;
}

.picker-seed:hover,
.picker-seed:focus-visible {
  border-color: var(--green);
  background: #ddf3d8;
}

.picker-seed strong,
.picker-seed small {
  display: block;
}

.picker-seed small {
  color: #52624d;
  line-height: 1.35;
}

@media (max-width: 1040px) {
  .play-screen {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto minmax(520px, 1fr) auto;
  }

  .game-stage {
    min-height: 560px;
  }

  .seed-panel,
  .info-panel {
    display: grid;
    align-self: auto;
  }

  .mobile-pad {
    display: grid;
  }
}

@media (max-width: 700px) {
  .creator-screen {
    grid-template-columns: 1fr;
    width: min(100% - 20px, 1120px);
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .top-hud {
    align-items: flex-start;
    flex-direction: column;
  }

  .stat-row {
    justify-content: flex-start;
  }
}
